/** * CLI main orchestration - error handling and stream setup. * * This layer: * - Sets up output streams (for testability) * - Handles EPIPE errors gracefully (pipe closed by consumer) * - Handles top-level errors with proper formatting * - Coordinates between the thin shell (cli.ts) and core logic (run.ts) */ /** * Setup signal handlers for graceful shutdown. * * - SIGINT (Ctrl-C): First press shows message, second force exits with code 130 * - SIGTERM: Clean exit with code 143 (128 + 15) * * Exit codes follow standard Unix conventions: * - 130 = 128 + SIGINT (2) * - 143 = 128 + SIGTERM (15) */ export declare function setupSignalHandlers(stderr: NodeJS.WritableStream, exit: (code: number) => void): void; /** * Handle EPIPE errors gracefully (pipe closed by consumer like head/grep). * This is normal when piping to commands that don't consume all output. */ export declare function handlePipeErrors(stream: NodeJS.WritableStream, exit: (code: number) => void): void; export type CliMainArgs = { argv: string[]; env: Record; stdout: NodeJS.WritableStream; stderr: NodeJS.WritableStream; exit: (code: number) => void; setExitCode: (code: number) => void; }; export declare function runCliMain(args: CliMainArgs): Promise; //# sourceMappingURL=cli-main.d.ts.map