Pixir.SessionSupervisor (pixir v0.1.0)

Copy Markdown View Source

DynamicSupervisor of Pixir.Session processes (ADR 0001). A Session is started on demand — for a new conversation or to resume a persisted one — and is :transient, so it stays down once it finishes cleanly.

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a Session. Accepts :id (generated if absent), :workspace, and :role. Returns {:ok, session_id, pid} so the caller always learns the id.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(init_arg)

start_session(opts \\ [])

@spec start_session(keyword()) :: {:ok, String.t(), pid()} | {:error, term()}

Start a Session. Accepts :id (generated if absent), :workspace, and :role. Returns {:ok, session_id, pid} so the caller always learns the id.