/**
 * DeferredQuestionRegistry
 *
 * In-process bridge between the SDK V2 `canUseTool` callback (which
 * expects a Promise) and the asynchronous, DB-backed answer that may
 * arrive from a different process (CLI, web). Each register() returns a
 * Promise that resolves on answer, rejects on cancel, or rejects with a
 * typed timeout error after a hard deadline.
 *
 * Implementation notes (spec 093, task 16):
 *  - One internal `Map<id, Entry>` keyed by question id; ids are unique.
 *  - register() throws synchronously on duplicate id so SDK callbacks
 *    can't accidentally overwrite an existing awaiter.
 *  - resolve/reject/timeout always run a single cleanup helper that
 *    clears the timer AND removes the map entry, so no timer leaks.
 *  - cancelAll matches by scope: appId is required (NFR-7), featureId
 *    and agentRunId narrow further. A scope with only appId rejects
 *    every awaiter under that app.
 *  - Settling a non-existent id is a no-op (e.g. an answer arrives for
 *    a question whose registration was never created in this process).
 */
import { type DeferredQuestionScope, type IDeferredQuestionRegistry } from '../../../../application/ports/output/agents/agent-question-service.interface.js';
export declare class DeferredQuestionRegistry implements IDeferredQuestionRegistry {
    private readonly entries;
    register(id: string, scope: DeferredQuestionScope, timeoutMs?: number): Promise<string>;
    resolve(id: string, answer: string): void;
    reject(id: string, reason?: string): void;
    cancelAll(scope: DeferredQuestionScope, reason?: string): number;
    has(id: string): boolean;
    private cleanup;
}
//# sourceMappingURL=deferred-question-registry.d.ts.map