Member Junction
    Preparing search index...

    Class StartRealtimeClientSessionResult

    Result of RealtimeClientSessionResolver.StartRealtimeClientSession — everything the browser needs to open its own provider socket plus the durable session linkage.

    Index

    Constructors

    Properties

    AgentSessionId: string

    ID of the newly created AIAgentSession record.

    AvatarStatusJson?: string

    JSON of the session's live-avatar status (RealtimeAvatarStatus from @memberjunction/ai): whether the voiced agent asked for an avatar, whether the model renders it, and why not. The browser reads it after connecting and tells the user once when the call is audio only. Null when the agent asked for no avatar (its video setting is off).

    ClientPolicyJson?: string

    JSON of the server's resolved channel policy for this session (RealtimeSessionClientPolicy): which of the channel candidates the browser reported are in the session (registry kill switch, agent and app channels configuration applied), with each one's resolved display and config, plus the app/static client-tool tiers. Null when the caller reported no channel candidates (a client that predates channel scoping) — the browser then resolves the scope locally.

    ConversationId: string

    ID of the conversation the session is attached to (supplied or freshly created).

    DriverClass?: string

    DriverClass of the vendor that actually runs the session (e.g. OpenAIRealtime, ElevenLabsRealtime). Null when unknown.

    Surfaced to the BROWSER because on the default-model path the framework picks the vendor itself: without this the caller cannot tell which vendor spoke, and so cannot diagnose a voice that did not land (issue #3530). ModelName alone is not enough — one model can resolve to different vendors depending on which API keys a deployment configures.

    EffectiveConfigJson?: string

    JSON of the RESOLVED effective realtime configuration for this session (type DefaultConfiguration ← agent TypeConfiguration ← authorized runtime overrides, deep-merged + normalized server-side). The browser uses it to apply client-side concerns (e.g. per-provider voice settings consumed by client drivers, narration pacing). Null only when the prepare service did not resolve a config (back-compat).

    EphemeralToken: string

    The short-lived client secret the browser presents to the provider to authenticate. Empty on a relay session (StartRealtimeClientSessionResult.Transport relay), whose StartRealtimeClientSessionResult.RelayUrl carries the relay's ticket instead.

    ExpiresAt: string

    ISO-8601 timestamp at which StartRealtimeClientSessionResult.EphemeralToken (or a relay session's ticket) expires.

    Model: string

    The provider realtime model id the session is scoped to (e.g. gpt-realtime).

    ModelName?: string

    Display name of the realtime model the session uses (e.g. GPT Realtime 2). Null when unknown.

    NarrationInstructionsTemplate?: string

    DB-driven progress-narration instruction template (contains a {{ progressMessage }} placeholder). Null when the narration prompt is not present in this deployment's metadata — the browser falls back to its built-in narration text.

    NarrationPaceMs?: number

    The effective narration pace (realtime.narration.paceMs from the co-agent's effective configuration) — minimum gap in ms between spoken progress updates. Null when not configured (the browser uses its built-in pacing default). In the client-direct topology narration pacing is enforced CLIENT-side, so the server surfaces the configured value here.

    PriorChannelStatesJson?: string

    JSON object string keyed by channel NAME mapping to that channel's persisted state JSON from the caller's PRIOR session (lastSessionId) — e.g. {"Whiteboard":"{...board scene...}"}. Null when no lastSessionId was supplied, the prior session has no persisted channel state, the prior session is not owned by the caller, or the restore failed for any reason (restore is strictly best-effort — a session start NEVER fails because of it).

    Provider: string

    The provider that minted the credential (e.g. 'openai').

    RelayUrl?: string

    Where a relay session's browser connects (MJAPI's realtime relay). Null on a direct session. The URL carries the session's ticket, so it is a credential and is never logged.

    SessionConfigJson: string

    JSON string of the provider-native session config the browser applies verbatim.

    Transport?: string

    How the browser reaches the provider: direct (with the ephemeral token) or relay (through MJAPI's realtime relay at StartRealtimeClientSessionResult.RelayUrl). Null means direct.