Member Junction
    Preparing search index...

    Interface RealtimeClientSessionPrepResult

    Result of RealtimeClientSessionService.PrepareClientSession.

    On success, RealtimeClientSessionPrepResult.ClientConfig is the server-minted config the browser applies, and RealtimeClientSessionPrepResult.SessionParams is the params the server used to mint it (handy for the resolver to echo/persist). On failure, Success is false and ErrorMessage explains why — this method never throws for an unresolvable model/key.

    interface RealtimeClientSessionPrepResult {
        ClientConfig?: ClientRealtimeSessionConfig;
        CoAgentRunID?: string;
        CoAgentRunStepID?: string;
        EffectiveConfig?: RealtimeCoAgentConfig;
        ErrorMessage?: string;
        ModelID?: string;
        ModelName?: string;
        NarrationInstructionsTemplate?: string;
        NarrationPaceMs?: number;
        PromptRunID?: string;
        SessionParams?: RealtimeSessionParams;
        Success: boolean;
    }
    Index

    Properties

    The minted client-direct session config (token + provider session config). Present on success.

    CoAgentRunID?: string

    ID of the server-side co-agent observability AIAgentRun created for this session. Present when the run was created successfully; absent when run creation was skipped or failed (observability is best-effort and never fails the prepare). Delegated target-agent runs nest under this run via ParentRunID, and RealtimeClientSessionService.FinalizeCoAgentRun closes it when the session ends.

    CoAgentRunStepID?: string

    ID of the single MJ: AI Agent Run Steps row created under RealtimeClientSessionPrepResult.CoAgentRunID for the realtime session's system prompt (StepType Prompt, TargetID = the system prompt, TargetLogID = RealtimeClientSessionPrepResult.PromptRunID). It makes the co-agent run's Timeline non-empty. Present only when the co-agent's system prompt resolved AND the step saved (step creation is best-effort, like the runs themselves). Finalized alongside the runs by RealtimeClientSessionService.FinalizeCoAgentRun.

    EffectiveConfig?: RealtimeCoAgentConfig

    The RESOLVED effective realtime configuration for this session (type defaults ← agent config ← runtime overrides, deep-merged + normalized). Present on success — {} when no layer configured anything. Surfaced so the transport layer can echo it to the client (client drivers apply provider voice settings client-side in the client-direct topology).

    ErrorMessage?: string

    A human-readable failure reason. Present on failure.

    ModelID?: string

    The MJ: AI Models row id of the realtime model the session was minted with. Present on success.

    ModelName?: string

    The display name of the realtime model the session was minted with. Present on success.

    NarrationInstructionsTemplate?: string

    The DB-driven progress-narration instruction template (the Realtime Co-Agent - Progress Narration prompt's TemplateText, containing a {{ progressMessage }} placeholder). undefined when that prompt is not present in metadata — clients fall back to their built-in narration instruction text.

    NarrationPaceMs?: number

    The effective narration pace (realtime.narration.paceMs) — minimum gap in ms between spoken progress updates. undefined when not configured (clients/runners use their built-in default). In the CLIENT-DIRECT topology narration pacing is enforced client-side, so this is surfaced for the browser; the server-bridged runner consumes it directly via RealtimeSessionRunnerDeps.NarrationPaceMs.

    PromptRunID?: string

    ID of the server-side co-agent AIPromptRun linked to RealtimeClientSessionPrepResult.CoAgentRunID. Present only when the co-agent's system prompt resolved (so a prompt run could be created).

    SessionParams?: RealtimeSessionParams

    The session params the server built (system prompt, model, tools). Present on success.

    Success: boolean

    Whether the client session config was minted successfully.