MingaAgent.Supervisor (Minga v0.1.0)

Copy Markdown View Source

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

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

sessions()

@spec sessions() :: [pid()]

Lists all running agent session pids.

start_link(opts \\ [])

@spec start_link(keyword()) :: Supervisor.on_start()

Starts the agent supervisor.

start_session(opts \\ [])

@spec start_session(keyword()) :: DynamicSupervisor.on_start_child()

Starts a new agent session under this supervisor.

stop_session(pid)

@spec stop_session(pid()) :: :ok | {:error, :not_found}

Stops a running agent session.