import type { MessengerAdapter, ButtonCallback } from './types.js'; export interface InstallOptions { /** Resolve a messenger by platform name; same shape as approval-router's. */ resolveMessenger: (platform: string) => MessengerAdapter | undefined; /** Platforms to bind onButtonCallback for. Defaults to a sensible * set; adapters without onButtonCallback are silently skipped. */ buttonCallbackPlatforms?: string[]; } /** Install the router. Idempotent — re-calling rebinds button handlers. */ export declare function install(opts: InstallOptions): void; /** Rebind a single platform's button handler. Used by web/server.ts * when it registers its messenger AFTER install(). */ export declare function bindButtonHandlerForPlatform(platform: string): void; /** * Inbound-text intercept. Called from cli.ts onMessage before the agent * router runs. Returns true iff this message resolved a pending ask * (caller should stop). * * threadKey is `platform:channelId:threadId` — same shape approval- * router uses; we split it back into the three components here so the * underlying pending map can look up by composite key. */ export declare function tryHandleAskReply(platform: string, channelId: string, threadId: string, text: string): boolean; /** * Unified `ask:` button-tap handler. Maps handleAskButton's outcome to a * Telegram ack + an optional in-place card edit: * - resolved → strip the card to a receipt (editChoiceCard) + ack ✓ * - rerender → re-render the toggle keyboard in place (updateChoiceCard) * - await-custom → prompt the user to type their answer * - invalid → ack the hint as a toast (card stays put) * - unmatched → ack "已失效" * Acks regardless so the user's spinner clears. Shared by approval-router * (the de-facto unified dispatcher) and this module's own binder. */ export declare function handleAskButtonClick(platform: string, cb: ButtonCallback, resolveMessenger: (platform: string) => MessengerAdapter | undefined): Promise; //# sourceMappingURL=ask-user-router.d.ts.map