Raxol. Adaptive. BehaviorTracker
(Raxol v2.6.0)
View Source
Records pilot interactions as time-series events.
Captures pane focus dwell times, command frequency, alert response latency, and layout overrides. Computes windowed aggregates and notifies subscribers for downstream recommendation.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type aggregate() :: %{ window_start: integer(), pane_dwell_times: %{required(atom()) => float()}, command_frequency: %{required(String.t()) => non_neg_integer()}, avg_alert_response_ms: float(), most_used_panes: [atom()], least_used_panes: [atom()], scroll_frequency: %{required(atom()) => non_neg_integer()}, scroll_velocity: %{required(atom()) => float()}, takeover_duration_ms: %{required(atom()) => float()}, layout_override_count: non_neg_integer(), command_concentration: %{required(atom()) => non_neg_integer()} }
@type behavior_event() :: %{timestamp: integer(), type: event_type(), data: map()}
@type event_type() ::
:pane_focus
| :pane_dwell
| :command_issued
| :alert_response
| :scroll_pattern
| :takeover_start
| :takeover_end
| :layout_override
@type t() :: %Raxol.Adaptive.BehaviorTracker{ aggregate_ref: reference() | nil, aggregates: %{required(integer()) => aggregate()}, buffer_size: pos_integer(), current_focus: atom() | nil, events: CircularBuffer.t(), session_id: binary() | nil, subscribers: MapSet.t(pid()), tracking_enabled: boolean(), window_size_ms: pos_integer() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec disable(GenServer.server()) :: :ok
@spec enable(GenServer.server()) :: :ok
@spec get_aggregates(GenServer.server(), pos_integer()) :: [aggregate()]
@spec get_recent_events(GenServer.server(), pos_integer()) :: [behavior_event()]
@spec record(GenServer.server(), event_type(), map()) :: :ok
@spec start_link(keyword()) :: GenServer.on_start()
@spec subscribe(GenServer.server()) :: :ok