DynamicSupervisor for AI agent session processes.
Each agent session (and its provider) runs under this supervisor with
:one_for_one strategy. A crash in one agent session is completely
isolated from the editor, buffers, and other agent sessions.
Summary
Functions
Returns a specification to start this module under a supervisor.
Lists all running agent session pids.
Starts the agent supervisor.
Starts a new agent session under this supervisor.
Stops a running agent session.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec sessions() :: [pid()]
Lists all running agent session pids.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts the agent supervisor.
@spec start_session(keyword()) :: DynamicSupervisor.on_start_child()
Starts a new agent session under this supervisor.
@spec stop_session(pid()) :: :ok | {:error, :not_found}
Stops a running agent session.