export type ClarifyStreamEvent = { type: string; } & Record; /** User inactivity window before pending clarification is rejected (web/Telegram, etc.). */ export declare const CLARIFY_USER_RESPONSE_TIMEOUT_MS: number; export interface ClarifyBridgeRequest { question: string; choices?: string[]; default?: string; } export interface StartClarifyRequestOptions { sessionKey: string; /** Present for in-flight webchat runs. */ runId?: string; publishStream?: (event: ClarifyStreamEvent) => void; request: ClarifyBridgeRequest; /** e.g. Telegram inline keyboard + prompt message */ deliver?: (ctx: { sessionKey: string; requestId: string; request: ClarifyBridgeRequest; }) => Promise; } /** * Pending user answers for the `clarify` tool (web UI, Telegram, etc.). */ export declare class ClarifyBridge { private pending; /** sessionKey → requestId when waiting for a free-text reply (no multiple-choice). */ private pendingFreeTextBySession; startRequest(opts: StartClarifyRequestOptions): Promise; private deletePending; private clearFreeTextSlot; /** * Consume the user's next text message as the clarify answer (Telegram DM/group). */ tryConsumeFreeTextReply(sessionKey: string, text: string): boolean; handleChoiceCallback(requestId: string, choiceIndex: number): boolean; handleResponse(requestId: string, answer: string): boolean; cancelForRun(runId: string): void; dispose(): void; }