import type { Readable, Writable } from "node:stream"; /** The prompt body, everything above the input line. */ export declare const CONSENT_PROMPT: string; /** The input line. Enter alone takes the recommended option. */ export declare const CONSENT_QUESTION = "Your choice [1/2]: "; /** What to say when the answer is neither 1 nor 2. */ export declare const CONSENT_REPROMPT = "Please answer 1 or 2 (or press Enter for 1)."; /** * Map one line of input to an answer. * * Empty (a bare Enter) accepts option 1. Anything that is not 1 or 2 returns * `null`, which means re-ask — never "assume the recommended one", because a * typo is not an answer to a question about permanent storage. */ export declare function interpretConsentAnswer(raw: string): boolean | null; /** * Ask the question on a terminal and resolve to the answer. * * Resolves `null` — meaning "no answer given" — if the input stream ends first * (Ctrl-D, a closed pipe, a killed terminal). The caller leaves the state unset * in that case and asks again next time rather than recording a choice the user * never made. * * Streams are injected so this is testable without a pty; `main()` passes the * real stdin and stderr. Output goes to stderr because stdout belongs to the * MCP protocol on every other path in this package. */ export declare function askAutoSaveConsent(opts: { input: Readable; output: Writable; /** Guard against an accidental headless call. Defaults to requiring a TTY. */ isTTY?: boolean; }): Promise; /** What is printed once the answer is in. */ export declare function consentOutcomeNotice(enabled: boolean, path: string): string; //# sourceMappingURL=consent.d.ts.map