/** * The CLI's prompts, guarded against input that is gone. * * Inquirer does not settle a prompt whose input goes away: readline closes * (end of input, or the ^D a pty sends when its own stdin is /dev/null), * the event loop drains, and Node exits 13 with "unsettled top-level await" * (`vana login`, 2026-10-05). Every prompt goes through here instead, so * that is an answer: a yes/no question takes "no", the non-interactive * path; a question with no safe answer throws PromptInputClosedError, which * the CLI reports cleanly. */ import { confirm as inquirerConfirm, input as inquirerInput, password as inquirerPassword } from "@inquirer/prompts"; type PromptStream = NodeJS.ReadableStream & { readableEnded?: boolean; destroyed?: boolean; }; type PromptContext = { input?: PromptStream; output?: NodeJS.WritableStream; signal?: AbortSignal; }; type ConfirmConfig = Parameters[0]; type InputConfig = Parameters[0]; type PasswordConfig = Parameters[0]; export declare class PromptInputClosedError extends Error { constructor(); } export declare function isPromptInputClosed(error: unknown): boolean; /** * Run a prompt that aborts with PromptInputClosedError when `input` ends or * closes, or when the process runs out of work while it waits: then nothing * is left that could ever answer it. Other errors (Ctrl+C) pass through. */ export declare function withInputClosedGuard(run: (context: PromptContext) => Promise, context?: PromptContext): Promise; /** A yes/no question; end of input answers "no" and says so. */ export declare function confirm(config: ConfirmConfig, context?: PromptContext): Promise; export declare function input(config: InputConfig, context?: PromptContext): Promise; export declare function password(config: PasswordConfig, context?: PromptContext): Promise; export {}; //# sourceMappingURL=prompts.d.ts.map