/** * Host adapter — native-dialog questionnaire fallback (spec §10.2). * * Collects each question through PI's built-in dialogs (`ctx.ui.select` / `confirm` / `input`) and * assembles the structured answers via the pure {@link assembleAnswers} core. These dialogs work in * both TUI and RPC modes, so this is the path used whenever the rich `ctx.ui.custom` form cannot render * (RPC / JSON / print — see {@link useRichForm}). Modeled on kimchi's questionnaire-fallback pattern. * * PI is referenced only as a *type* ({@link ExtensionUIContext}, narrowed to {@link DialogUI}) — a * type-only import, so this module is fully offline-testable with a scripted fake. */ import type { ExtensionUIContext } from "@earendil-works/pi-coding-agent"; import type { Questionnaire } from "../flow/questionnaire.ts"; /** The subset of `ctx.ui` the fallback needs — narrowed so tests can supply a scripted stand-in. */ export type DialogUI = Pick; /** * Drive the questionnaire through native dialogs and return the structured answers keyed by * `question.key`. Returns `undefined` if the user dismisses any dialog: dismiss ≠ cancel, so the * caller keeps the run blocked (spec §10.2). */ export declare function collectViaDialogs(ui: DialogUI, questionnaire: Questionnaire): Promise | undefined>; //# sourceMappingURL=questionnaire-fallback.d.ts.map