import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import type { TuiToolDeps, CallToolResultShape } from './tui-plan.js'; /** * Schema mirrors the native AskUserQuestion / PI ask_user_question shape (see * agent-adapter/pi/tool-shims.ts:26-45) so the LLM produces identical output regardless of * backend: a list of 1-4 questions, each with header / question / options[{label,description}] / * multiSelect. This shape is also what /hook/ask-user-question consumes and what * jsonl-tail.ts's normalizer expects — keeping all three aligned removes per-backend branches. */ interface AskUserOption { label: string; description?: string; } interface AskUserQuestion { question: string; header?: string; options?: AskUserOption[]; multiSelect?: boolean; } interface AskUserArgs { questions: AskUserQuestion[]; } /** * Webhook response contract (see orch/interactions/ask-user-question.ts:117-148): * - Success: { answers: { [questionText]: } } * (multi-select values are pre-joined with ", " by the platform) * - Error: { error: , answers: {} } (codes: 'timeout' | 'post_failed' | 'bus_not_initialized') */ export declare function runAskUser(args: AskUserArgs, deps: TuiToolDeps): Promise; export declare function registerTuiAskTools(server: McpServer, deps: TuiToolDeps): void; export {};