ProtectedContextThe bound session context, available from Initialize until Dispose.
null outside that window — guard with ?. in any code that can run early/late.
Matches the seeded MJ: AI Agent Channels row's Name.
The shared name prefix of every server-executed tool this channel contributes (e.g.
'MeetingControls_'). The host routes any tool call whose name starts with this prefix to
THIS plugin's ExecuteServerTool, which is what prevents tool-name collisions when
multiple channels are active in one session. A channel that contributes no server tools may
leave the default empty string (the host then never routes any call to it).
Mirrors the client half's ToolNamePrefix. Default: '' (no server tools).
Tears the plugin down: release any per-session resources, then drop the context. Subclasses
overriding this MUST call super.Dispose(). Invoked by the host after the post-close linger
window elapses (or immediately when the host is configured with no linger).
Executes ONE of this channel's server-side tools (a tool whose name starts with
ToolNamePrefix) and returns the result fed back to the model as the tool_response.
Implementations should NOT throw — return a { Success: false, Output } result so the model can
narrate the failure. The host additionally wraps anything thrown into a structured error, so a
throwing implementation can never break the live session. The default implementation returns a
structured "not implemented" error, so a channel that declares tools via
GetServerToolDefinitions but forgets to implement execution fails safely and visibly.
The full tool name the model invoked (begins with ToolNamePrefix).
The raw arguments JSON string the model emitted for the call.
The execution result (or a structured error), synchronously or as a promise.
No server-executed tools: the channel's stable ContextTool proxy and all surface client tools
execute in the browser via the unified client-tool resolver. Explicit [] documents the intent.
Binds the session context and invokes the OnInitialize hook. Called exactly once per session by the host, right after ClassFactory instantiation and before any lifecycle hook.
Live-only channel: it carries no state of record (it is a wire, not a document), so a landed
state save is intentionally not persisted. Returning null keeps nothing — a session resume
never rehydrates this channel.
null — never persist.
ProtectedOnSubclass hook invoked from Initialize once Context is bound — allocate any per-session state here. Default: no-op.
Invoked when the session is closed — from ANY close path: the user's explicit hang-up, the janitor's orphan/staleness sweeps, the graceful shutdown drain, or an error-path teardown (the reason says which). Fired once per session; Dispose follows after the host's brief post-close linger window (during which late state saves still route here first). Default: no-op.
The persisted close provenance, or null for legacy/unstamped rows.
Invoked by the host immediately after Initialize, when the durable session record has
been persisted (Status = 'Active') — the session id, agent, and conversation are all in
Context. Default: no-op.
Server half of the headless Client Context channel. One instance per realtime session (created by
RealtimeChannelServerHostfrom the channel registry — never construct directly).Contributes no server tools (GetServerToolDefinitions returns
[]) — the channel'sContextTooland client tools execute client-side — and persists no state of record (OnChannelStateSave returnsnull, the "keep nothing / live-only" posture), so a session resume never tries to rehydrate it.