import type { ExtensionUIContext } from "@earendil-works/pi-coding-agent"; type AskUserType = "confirm" | "choice" | "text"; export interface AskUserRequest { question: string; type: AskUserType; options?: string[]; default?: string; } /** * Result of rendering a prompt. `ok: true` carries the user's answer as a * string; `ok: false` carries a human-readable failure message (invalid * request, user cancellation, or pre-aborted signal). The caller maps this to * the tool-result shape (okResult / errResult). */ export type AskRender = { ok: true; value: string; } | { ok: false; message: string; }; /** The slice of ExtensionUIContext the renderer needs. Keeps test stubs small. */ export type AskUI = Pick; /** * Render an interactive prompt against the supplied UI context and return the * user's answer. The UI MUST be a live, TUI-bound context (the orchestrator's * own ctx.ui, whether reached directly or via the broker) — never a subagent's * no-op UI. * * Marks the input-router overlay active for the duration so the arrow-key * activators (thread-switcher ←→, whats-new ↓) are suppressed while pi's * built-in dialog owns keyboard focus, then restores on every exit path. */ export declare function renderAskPrompt(ui: AskUI, params: AskUserRequest, signal?: AbortSignal): Promise; export {};