Member Junction
    Preparing search index...

    The live, in-memory handle for one running bridged session held by the engine. Carries the driver, the wired realtime session, the per-session turn-taking policy, and the persisted bridge row id so teardown can reach all of them.

    interface ActiveBridgeSession {
        AgentID?: string;
        AgentNames: string[];
        AgentRole?: string;
        AgentRunID?: string;
        AgentSessionID: string;
        BotParticipantID?: string;
        Bridge: BaseRealtimeBridge;
        ChannelHost?: IBridgeChannelHost;
        ConnectedAtMs: number;
        ContextUser?: UserInfo;
        DisableAutoResponse: boolean;
        ExecuteServerChannelTool?: (
            toolName: string,
            argsJson: string,
        ) => Promise<BridgeChannelToolResult>;
        FloorReleaseTimer?: Timeout;
        HasSeenHuman: boolean;
        HoldsFloor: boolean;
        IsTranscriptScribe: boolean;
        LastActivityMs: number;
        LastInboundSpeaker?: string;
        LeaveGraceTimer?: Timeout;
        MetadataProvider?: IMetadataProvider;
        ParticipationMode: "proactive" | "addressed-only";
        Provider: MJAIBridgeProviderEntity;
        RealtimeSession: IRealtimeSession;
        RoomKey?: string;
        ServerChannelTools: BridgeChannelToolDefinition[];
        SessionBridgeID: string;
        TargetAgentID?: string;
        TurnPolicy: TurnTakingPolicy;
    }
    Index

    Properties

    AgentID?: string

    The voicing agent's MJ: AI Agents id — stamped on this agent's transcript lines for attribution.

    AgentNames: string[]

    The names/aliases this agent answers to (moderator roster + addressed-only fallback).

    AgentRole?: string

    A short role/description of the voiced agent (moderator relevance context).

    AgentRunID?: string

    The voiced agent's MJ: AI Agent Runs id — tied to each moderator prompt run for observability.

    AgentSessionID: string

    The MJ: AI Agent Sessions row id the bridge is attached to.

    BotParticipantID?: string

    This session's own bot participant id on the endpoint — the speaker label on its own transcript lines.

    The concrete driver instance transporting media.

    ChannelHost?: IBridgeChannelHost

    The server-side channel host wired for this session (Part A), or undefined when the caller supplied none. Held so teardown can close the session's channels.

    ConnectedAtMs: number

    Epoch-ms when this session connected — drives the max-session-duration cap of the stale sweep.

    ContextUser?: UserInfo

    The context user the session runs as (for participant upserts / teardown writes).

    DisableAutoResponse: boolean

    Whether the model's blind auto-response is OFF for this session (multi-agent meeting). When true the bridge is the sole speech trigger — a Speak decision issues one RequestSpokenUpdate. When false the model auto-responds and the engine stays hands-off (forcing would double-fire).

    ExecuteServerChannelTool?: (
        toolName: string,
        argsJson: string,
    ) => Promise<BridgeChannelToolResult>

    Executes ONE server-channel tool call for this session, routed through the channel host. Bound by the runner-constructing layer to RealtimeSessionRunner.ExecuteServerChannelTool. undefined when no channel host was supplied. Never throws — resolves to a structured failure.

    FloorReleaseTimer?: Timeout

    Safety timer that force-releases a held floor after FLOOR_MAX_HOLD_MS in case the agent's final transcript never arrives — so one agent can't wedge the room's floor closed. Cleared on a normal release.

    HasSeenHuman: boolean

    Whether at least one HUMAN participant has been seen in the room. Auto-leave only fires after a human was present and then all humans left — so a bot that joins ahead of anyone (or a momentarily bot-only roster at startup) is never reaped prematurely. Set by the occupancy check off the driver roster.

    HoldsFloor: boolean

    Whether this session currently holds the room's speaking floor (multi-agent floor control). Set when the engine claims the floor before triggering speech in meeting mode, cleared when the agent's own final transcript lands (it finished) or on teardown. Single-agent rooms always hold trivially.

    IsTranscriptScribe: boolean

    Whether THIS session is the room's transcript scribe. Exactly one session per room writes the unified meeting transcript (its own speech + everything it hears), so a multi-agent room records one copy, not N. Elected at connect (first session in the room); re-elected if the scribe leaves.

    LastActivityMs: number

    Epoch-ms of the last inbound activity (transcript) — drives the idle cap of the stale sweep.

    LastInboundSpeaker?: string

    The participant identity of the most-recent inbound AUDIO frame (when the provider diarizes). Used to attribute a 'user' transcript to the speaker who produced it — since the model transcript itself has no speaker label. Approximate (single-speaker-at-a-time); undefined until the first diarized frame.

    LeaveGraceTimer?: Timeout

    Pending grace timer started when the last human leaves. If a human rejoins within the grace window (e.g. a page refresh) it is cleared; otherwise it fires AIBridgeEngine.StopBridgeSession so the bot leaves the empty room and its co-agent run finalizes. Cleared on any teardown.

    MetadataProvider?: IMetadataProvider

    The metadata provider bound to this session's entity operations.

    ParticipationMode: "proactive" | "addressed-only"

    This agent's participation style for the room moderator ('proactive' | 'addressed-only').

    The provider row backing this session.

    RealtimeSession: IRealtimeSession

    The realtime session the driver's media plane is wired to.

    RoomKey?: string

    The room key (driver ExternalConnectionId) this session is in — the unified-transcript room grouping.

    ServerChannelTools: BridgeChannelToolDefinition[]

    The server-executed tool definitions the session's channels contributed at connect (e.g. the Meeting Controls facilitator tools). Empty when no channel host / no contributing channels. The runner-constructing layer registers these as RealtimeSessionRunner.ServerChannelTools.

    SessionBridgeID: string

    The AIAgentSessionBridge row id (the durable record).

    TargetAgentID?: string

    The TARGET agent this co-agent voices (role/identity source for the moderator), when distinct from ActiveBridgeSession.AgentID.

    TurnPolicy: TurnTakingPolicy

    The per-session turn-taking policy gating generation.