import type { Readable, Writable } from "node:stream"; export interface CliContext { /** argv slice with the binary name and node entry already removed. */ argv: readonly string[]; /** Where normal output goes. Tests inject a `MemoryStream`. */ stdout: Writable; /** Where error and diagnostic output goes. */ stderr: Writable; /** * Stdin handle. The `route` subcommand reads from this when `--input` * is not supplied. Tests inject a primed `Readable` to simulate piping. */ stdin: Readable; /** Environment snapshot. Used to read `ROUTERLAB_*` overrides. */ env: NodeJS.ProcessEnv; /** Working directory. Used to resolve relative `--input` paths. */ cwd: string; } /** * Read stdin to completion as a UTF-8 string. * * Returns an empty string if stdin is a TTY (interactive shell, no pipe) * — that way `route route --task=qa --quality-bar=0.85` without `--input` and * without a piped stdin doesn't hang forever waiting on the user. */ export declare function readStdinToString(stdin: Readable): Promise; /** * Convenience: write a string + newline to a stream. Centralizing this * keeps the subcommands free of `\n` boilerplate and lets us swap the * underlying writer (e.g. if we ever want to color-tag stderr). */ export declare function writeLine(stream: Writable, line: string): void; //# sourceMappingURL=io.d.ts.map