/** * A minimal keyboard-driven prompt set. * * Hand-rolled rather than pulled from a dependency: the primary invocation of * this CLI is `npx --yes @wildorder/program-pipeline`, where every transitive * dependency is a user-visible download, and these prompts need to render * per-row annotations (resolved path, detection state) that a generic * checkbox prompt fights. */ interface PromptInput { isTTY?: boolean | undefined; setRawMode?: (mode: boolean) => unknown; setEncoding: (encoding: BufferEncoding) => unknown; on: (event: "data", listener: (chunk: string) => void) => unknown; off: (event: "data", listener: (chunk: string) => void) => unknown; resume: () => unknown; pause: () => unknown; } interface PromptOutput { isTTY?: boolean | undefined; write: (chunk: string) => unknown; } export interface PromptStreams { input: PromptInput; output: PromptOutput; } export interface Choice { value: T; label: string; /** Right-hand annotation, dimmed. */ hint?: string; } export declare function defaultStreams(): PromptStreams; /** * Prompting is only safe when a human is on both ends. The CLI is also driven * by npm lifecycle hooks, CI, and the packaged skills themselves — a blocking * read in any of those hangs the process. */ export declare function isInteractive(streams?: PromptStreams, env?: NodeJS.ProcessEnv): boolean; export interface ChooseManyOptions { title: string; choices: Array>; /** Values checked when the prompt opens. */ initial: T[]; streams?: PromptStreams; env?: NodeJS.ProcessEnv; } /** * Multi-select. Resolves `undefined` when the user cancels, which callers must * distinguish from an empty selection. */ export declare function chooseMany(options: ChooseManyOptions): Promise; export interface ChooseOneOptions { title: string; choices: Array>; initial: T; streams?: PromptStreams; env?: NodeJS.ProcessEnv; } /** Single-select. Resolves `undefined` when the user cancels. */ export declare function chooseOne(options: ChooseOneOptions): Promise; export interface ConfirmOptions { title: string; initial?: boolean; streams?: PromptStreams; env?: NodeJS.ProcessEnv; } export declare function confirm(options: ConfirmOptions): Promise; export {}; //# sourceMappingURL=prompt.d.ts.map