/** * Process-wide registry mapping a session id to its active {@link AskAnswerSource}. * * Decouples the `ask` tool (which reads the source via `AgentSession`) from the * notifications extension (which registers one), without threading a new method * through the extension/runner/controller wiring. A session may have multiple * sources. A "protocol" source always takes precedence over an "interactive" * source regardless of registration order; within the same kind, the most * recently registered source wins. Registering returns a disposer. */ /** Error code a remote ask source uses to signal that its own timeout fired. */ export declare const GJC_ASK_TIMEOUT_CODE = "gjc.ask.timeout"; import type { WorkflowGateEmitter } from "../modes/shared/agent-wire/workflow-gate-broker"; import type { AskAnswerSource } from "./index"; export type AskAnswerSourceKind = "protocol" | "interactive"; /** Register `source` for `sessionId`. Returns a disposer that restores the prior source. */ export declare function registerAskAnswerSource(sessionId: string, source: AskAnswerSource, kind?: AskAnswerSourceKind): () => void; /** The highest-priority answer source for `sessionId`, if one is registered. */ export declare function getAskAnswerSource(sessionId: string): AskAnswerSource | undefined; /** Publish a session's current workflow-gate emitter after mode initialization. */ export declare function notifyWorkflowGateEmitterChanged(sessionId: string, emitter: WorkflowGateEmitter | undefined): void; /** Observe workflow-gate emitter installation even when it occurs after session_start. */ export declare function registerWorkflowGateEmitterListener(sessionId: string, listener: (emitter: WorkflowGateEmitter | undefined) => void): () => void;