Coordinates multiple AI agents in the cockpit.
Manages pane layout, routes pilot input to the focused pane, handles agent spawning/killing, and implements the takeover/release protocol.
Pilot modes:
:observe-- watching agents work (default):command-- sending directives to agents:takeover-- directly controlling an agent's terminal
Summary
Functions
Accept the pending layout recommendation.
Broadcast a directive to all agents.
Returns a specification to start this module under a supervisor.
Switch pilot focus to a different pane.
Get the current layout and agent status.
Get the pending recommendation, if any.
Get all agent statuses.
Kill an agent and remove its pane.
Pilot releases the taken-over agent's terminal.
Pilot takes over the focused agent's terminal.
Reject the pending layout recommendation.
Send a directive to a specific agent.
Route pilot input to the focused pane's agent (during takeover).
Spawn a new agent and assign it a pane.
Start the orchestrator.
Subscribe to orchestrator events.
Types
@type t() :: %Raxol.Agent.Orchestrator{ agents: %{required(atom()) => pid()}, event_log: CircularBuffer.t() | nil, focused_pane: atom() | nil, monitors: %{required(atom()) => reference()}, pane_layout: %{required(atom()) => map()}, pending_recommendation: map() | nil, pilot_mode: :observe | :command | :takeover, subscribers: MapSet.t(pid()) }
Functions
@spec accept_recommendation(pid()) :: :ok | {:error, :no_pending}
Accept the pending layout recommendation.
Broadcast a directive to all agents.
Returns a specification to start this module under a supervisor.
See Supervisor.
Switch pilot focus to a different pane.
Get the current layout and agent status.
Get the pending recommendation, if any.
Get all agent statuses.
Kill an agent and remove its pane.
Pilot releases the taken-over agent's terminal.
Pilot takes over the focused agent's terminal.
@spec reject_recommendation(pid()) :: :ok | {:error, :no_pending}
Reject the pending layout recommendation.
Send a directive to a specific agent.
Route pilot input to the focused pane's agent (during takeover).
Spawn a new agent and assign it a pane.
Start the orchestrator.
@spec subscribe(pid()) :: :ok
Subscribe to orchestrator events.