Member Junction
    Preparing search index...

    Interface RealtimeToolBrokerDeps

    The injected collaborators the broker needs to execute a tool call.

    Each member is a seam that decouples the broker from BaseAgent/metadata/DB so it can be exercised with mocks. In production, the RealtimeSessionRunner (and, in P5b, the client-direct server resolver) constructs these from BaseAgent-backed implementations.

    interface RealtimeToolBrokerDeps {
        DelegateToTarget: (
            request: DelegateToTargetRequest,
        ) => Promise<DelegatedResult>;
        ExecuteTool: (call: RealtimeToolCall) => Promise<ToolExecutionResult>;
        LogError?: RealtimeErrorLogger;
        LogStatus?: RealtimeStatusLogger;
    }
    Index

    Properties

    DelegateToTarget: (request: DelegateToTargetRequest) => Promise<DelegatedResult>

    Runs the target agent for an invoke-target-agent tool call. The broker creates and owns a fresh AbortController per delegated call and passes its signal in via DelegateToTargetRequest.AbortSignal; barge-in aborts it. In production this is backed by BaseAgent.ExecuteSubAgent (top-level target only — sub-agents are not exposed).

    ExecuteTool: (call: RealtimeToolCall) => Promise<ToolExecutionResult>

    Executes a non-target tool call (any tool other than invoke-target-agent). In production this routes to the co-agent's server/client/UI tool execution under the session's context user.

    Optional error logger.

    Optional verbose-aware status logger.