Member Junction
    Preparing search index...

    Interface ExecuteRelayedToolInput

    Input for RealtimeClientSessionService.ExecuteRelayedTool.

    Carries the single tool call the browser relayed plus the linkage needed to run a delegated target-agent run under the same session.

    interface ExecuteRelayedToolInput {
        AbortSignal?: AbortSignal;
        AgentSessionID: string;
        AllowedAgents?: RealtimeAllowedAgent[];
        AppContext?: AppContextSnapshot;
        AttributionUserID?: string;
        BrowserSessionID?: string;
        Call: RealtimeToolCall;
        DirectActions?: RealtimeDirectActionsConfig;
        OnProgress?: AgentExecutionProgressCallback;
        ParentRunID?: string;
        ResumeRunID?: string;
        TargetAgentID: string;
    }
    Index

    Properties

    AbortSignal?: AbortSignal

    Optional abort signal so a barge-in on the browser can cancel an in-flight delegated run. Threaded into the delegated agent run's cancellationToken.

    AgentSessionID: string

    The shared session id grouping this voice session's runs.

    AllowedAgents?: RealtimeAllowedAgent[]

    The session's effective allowed delegation targets (the union-accumulated set from the config cascade; Move 4). When the model names a colleague in the call arguments (agent), it must resolve to one of these (or the lead); an unknown name yields a structured "not available" result. Absent/empty ⇒ classic single-target behavior (every call routes to TargetAgentID).

    AppContext?: AppContextSnapshot

    The app-context snapshot the browser sent at session start, so the delegated run's prompt sees surface context and tools. It does not follow later navigation in the browser.

    AttributionUserID?: string

    The id of the human this delegation is FOR, threaded into the delegated run's userId.

    The relayed-tool path may execute under an ELEVATED principal (a scoped anonymous magic-link caller's role deliberately cannot write the AI run entities — issue #3371), so contextUser is not always the person. userId is what stamps MJ: AI Agent Runs.UserID and scopes context memory, both of which must stay the visitor's. Absent ⇒ falls back to contextUser.ID, which is correct for every non-elevated caller.

    BrowserSessionID?: string

    The browser's GraphQL session id. Lets the delegated run execute client tools the surface registered, because the client-tool request channel is keyed on this id.

    The tool call the browser relayed from the provider.

    Optional direct actions configuration for this session, derived once during session prep (cascade: co-agent + runtime overrides + target + app settings). When present, direct action enforcement checks this configuration instead of recomputing from target alone. Pass it only from server-side state, never from a client-writable source such as a session's Config.

    Optional progress callback invoked with each delegated-run progress event (mirrors the normal agent-run path's onProgress). The transport layer (the MJServer resolver) publishes these so the realtime model can narrate the target agent's progress while it runs. When omitted, the delegated run streams nothing and the model only receives the final tool result.

    ParentRunID?: string

    The id of the (co-agent) run that owns this session, used as the delegated run's parent. Optional. The caller passes it only when it is a run of this session.

    ResumeRunID?: string

    Optional id of a previously-paused delegated run (Status AwaitingFeedback) to RESUME instead of starting a fresh run. When set, delegateToTarget passes it as lastRunId (with autoPopulateLastRunPayload) to AgentRunner.RunAgent, so the user's answer continues the SAME interactive run (e.g. confirming a Query Builder task graph). The caller passes it only when it is a run of this session.

    TargetAgentID: string

    The top-level (lead) target agent id for invoke-target-agent delegation. The caller must have checked that the acting user may run this agent.