import type { AskUserQuestion } from "../skills/tools/ask-user-tool.js";
interface PendingAskUserRequest {
    resolve(answers: Record<string, string> | null): void;
}
export interface TurnAskUserSetupHost {
    pendingAskUser: Map<string, PendingAskUserRequest>;
    sendNotification(method: string, params: Record<string, unknown>): void;
}
/**
 * Build the ask_user backend closure: mint a requestId, park its resolver in
 * `host.pendingAskUser`, and emit `turn.ask_user`. The answer is delivered later via
 * `thread.user_response` (handleUserResponse), which resolves the same map entry by requestId.
 *
 * Shared by the turn pipeline (configureTurnAskUser) and the Solo Spec phase
 * (handleAcpSoloSpecChat) so both drive the SAME UI channel. requestId isolation (full UUID) lets a
 * concurrent chat-turn ask and a spec-phase ask coexist in the one shared map without collision.
 *
 * The optional `signal` makes an unanswered ask abortable + self-cleaning: on abort we drop the
 * parked resolver from the map and resolve to null (caller degrades to a best-effort result), so a
 * cancelled/abandoned turn can't leak a map entry or hang the awaiting fork forever.
 */
export declare function makeAskUserBackend(host: TurnAskUserSetupHost): (questions: AskUserQuestion[], signal?: AbortSignal) => Promise<Record<string, string> | null>;
export declare function configureTurnAskUser(host: TurnAskUserSetupHost): void;
export {};
