"""Public compatibility module.

Conceptually, this module preserves the historical session-aware import
surface used by notebooks and analysis helpers.

It exists as a separate unit so legacy imports remain stable while the actual
implementation stays split between session I/O, trial-selection, and
context-analysis modules.

It connects the stable session-aware API to `session_io`, `session_trials`,
and `session_context`.
"""

from __future__ import annotations

from .session_context import (
    build_cd_context,
    compute_context_metrics,
    extract_late_delay_matrix,
    extract_trial_vectors_for_area,
    extract_window_matrix,
    get_area_units,
    project_trials_on_cd,
    safe_pearson,
    safe_spearman,
    sem,
)
from .session_io import (
    PathLike,
    _session_label,
    _units_df_from_session_or_path,
    get_available_areas_for_session,
    list_available_sessions,
)
from .session_trials import (
    get_completed_trials,
    get_context_trial_masks,
    get_go_hit_trials,
    get_go_whisker_trials,
    get_nogo_cr_trials,
    get_nogo_whisker_trials,
    get_quiet_trials,
    get_session_quiet_trials,
    to_bool_array,
)

__all__ = [
    "PathLike",
    "build_cd_context",
    "compute_context_metrics",
    "extract_late_delay_matrix",
    "extract_trial_vectors_for_area",
    "extract_window_matrix",
    "get_area_units",
    "get_available_areas_for_session",
    "get_completed_trials",
    "get_context_trial_masks",
    "get_go_hit_trials",
    "get_go_whisker_trials",
    "get_nogo_cr_trials",
    "get_nogo_whisker_trials",
    "get_quiet_trials",
    "get_session_quiet_trials",
    "list_available_sessions",
    "project_trials_on_cd",
    "safe_pearson",
    "safe_spearman",
    "sem",
    "to_bool_array",
]
