Member Junction
    Preparing search index...

    Interface RealtimeChannelServerContext

    Immutable session facts handed to a BaseRealtimeChannelServer at BaseRealtimeChannelServer.Initialize. Deliberately plain data (string ids, no entity or UserInfo objects) so the base contract stays free of @memberjunction/core — concrete plugins that need richer server context load it themselves in the packages they ship in.

    interface RealtimeChannelServerContext {
        AgentID: string;
        AgentSessionConfig?: string;
        AgentSessionID: string;
        ConversationID: string;
        UserID: string;
        SendContextNote?(text: string): void;
    }
    Index

    Properties

    AgentID: string

    The session's agent id (AIAgentSession.AgentID — the co-agent on realtime voice sessions).

    AgentSessionConfig?: string

    Optional raw per-session config blob — the verbatim AIAgentSession.Config_ string the session was created with (the host passes it through; it stays opaque to the contract). A data-aware channel parses out only the keys it owns — e.g. the Media channel reads a per-session mediaCollectionID override here. Kept as a plain string (not a typed bag) so the base contract stays free of @memberjunction/core and channel-agnostic; null/absent when the session carries no config. Channels MUST treat it as untrusted input (validate ids before use).

    NOTE: deliberately named AgentSessionConfig (not SessionConfig) to avoid confusion with the unrelated import('./baseRealtime').ClientRealtimeSessionConfig.SessionConfig — the provider-driver "private pact" config bag. This field is the persisted AIAgentSession.Config_.

    AgentSessionID: string

    The durable MJ: AI Agent Sessions row id this plugin instance is bound to.

    ConversationID: string

    The conversation the session is attached to, or null when the session carries none.

    UserID: string

    The owning user's id (AIAgentSession.UserID) — ownership is enforced host-side on every relay.

    Methods

    • Optional perception sink — feeds a background context note into the live realtime model (the server-side counterpart of the client channel's RealtimeChannelContext.SendContextNote). The host wires this to IRealtimeSession.SendContextNote when the provider supports mid-session context injection; a server-side channel calls it to keep the agent aware of what is happening on its surface (a hand went up, who is speaking, time remaining) WITHOUT forcing a spoken reply.

      Optional because not every provider supports injecting conversation items into an open session (some only accept media frames + tool results), and because the host may construct the context before a live session exists. Channels MUST call it null-safely (this.Context?.SendContextNote?.(…)).

      Parameters

      • text: string

        The perception note to surface to the model (plain text; the channel owns any framing).

      Returns void