/** * Problem: * When the model invokes `ask_question`, upstream `agy_acp_server` presents a `session/request_permission` * modal choice and pauses execution awaiting user input. If the user types a new message into the chat * or cancels instead of picking a pre-defined choice, upstream rejects the prompt with * `"A foreground turn is already active"`, causing the turn to deadlock indefinitely. * * Solution: * Tracks in-flight `ask_question` requests and unblocks upstream by auto-cancelling the pending * permission question when a new user chat prompt arrives, dismissing the UI question spinner and * allowing the user's message to execute immediately. */ import { type AcpFix } from "../../core/types.js"; export declare const OTHER_OPTION_REGEX: RegExp; export interface QuestionItem { question?: string; options?: string[]; is_multi_select?: boolean; [key: string]: unknown; } export interface AskQuestionPayload { questions?: QuestionItem[]; [key: string]: unknown; } export declare function ensureOtherOption(raw: unknown): { modified: boolean; result: unknown; }; export declare function createQuestionOptionsFix(): AcpFix; export declare const missingQuestionFallbackFix: AcpFix; export declare const questionOptionsFix: AcpFix; //# sourceMappingURL=index.d.ts.map