/** * Interactivity predicate — the one source of truth for "can a prompt be * answered?" (tty-prompt-guard/AC-1). * * This lives in `core/` rather than `menu/` even though `menu/prompt.ts` * authored the predicate: `menu/index.ts` imports the command registrars in * order to dispatch, so a command reaching into `menu/` for one function would * close an import cycle. Every prompt site in the package — `commands/`, * `doctor/`, `menu/` — reads it from here. * * @module */ /** * Both streams must be a TTY (interactive-cli-menu/AC-10, tty-prompt-guard/AC-1). * * clack reads keys from stdin and renders to stdout, so either alone is * insufficient: `aidlc | less` has a TTY stdin with a piped stdout and would * paint escape sequences into the pipe, while `echo x | aidlc` has the reverse * and would render a prompt nobody can answer. Both idioms exist in this * package (`commands/cost.ts` keys on stdin; `doctor/context.ts` keyed on stdout * until tty-prompt-guard/AC-11), so the conjunction is stated explicitly rather * than inherited from a precedent. * * Deliberately *not* environment sniffing (`CI`, `TERM`, `FORCE_COLOR`): two * `isTTY` reads are deterministic, so a runner and a laptop cannot disagree * about whether a prompt was openable. */ export declare function isInteractive(): boolean; /** * Shared reason clause for a prompt that cannot be opened * (tty-prompt-guard/AC-14). * * Seven call sites explain the same condition. One constant keeps them from * drifting apart and gives the regression tests a single string to assert on * instead of seven hand-copied sentences. */ export declare const NO_TTY_REASON = "no interactive terminal (stdin and stdout must both be a TTY)"; //# sourceMappingURL=tty.d.ts.map