import type { CloudChannel } from './relay/cloud-channel.js'; import type { IncomingMessage, ReplyStrategy } from './types.js'; import type { AskResolution, LocalCancelReason } from './relay/pending-asks.js'; export type LateClickHandler = (incoming: IncomingMessage, conversationKey: string, replyStrategy: ReplyStrategy) => void; /** Initialize the ask infrastructure. Must be called once at startup. */ export declare function initAsk(channel: CloudChannel): void; /** Register the late-click handler. Called from index.ts to avoid an import cycle. */ export declare function onLateClick(handler: LateClickHandler): void; /** Public type for the MCP tool's `options` argument before IDs are assigned. */ export interface AskOptionInput { title: string; description?: string; } export interface AskUserArgs { question: string; description?: string; options: AskOptionInput[]; multiSelect?: boolean; } /** * Send an ask_user choice card and await the user's selection. * * Resolves with a structured result: * - `answered`: user picked one or more options * - `wire_cancel`: card expired or user explicitly cancelled (from bot-app) * - `local_cancel`: superseded by a newer message, or SDK turn ended * * The caller (the MCP tool) is responsible for translating these into a * tool_result that the model can act on. */ export declare function askUser(conversationKey: string, incoming: IncomingMessage, args: AskUserArgs): Promise; /** Cancel all in-flight asks for a conversation (e.g. when a new message arrives). */ export declare function cancelAsksForConversation(conversationKey: string, reason: LocalCancelReason): number; /** Cancel everything (used on shutdown). */ export declare function cancelAllAsks(reason: LocalCancelReason): number;