/** * Clean up raw piped output so the agent sees readable text, not terminal * control noise. * * 1. Strip all ANSI escape sequences (colors, cursor movement, line clears). * 2. Simulate carriage-return overwrites: for each line, split on `\r` and * keep only the last segment — this is what the terminal would display * after a spinner/progress bar finishes. * 3. Collapse runs of blank lines. */ export declare function sanitizePipedOutput(raw: string): string; /** * If stdin is a pipe (not a TTY), read **all** data until EOF and return it as * a string. The returned promise only resolves once the write end of the pipe * is closed — i.e. the sending process has fully exited — so callers are * guaranteed to receive the complete output, not a partial snapshot from a * program that writes progressively. * * Returns `null` when: * - stdin is a TTY (interactive terminal) * - the pipe was empty or contained only whitespace */ export declare function drainPipedStdin(): Promise; /** * Reopen `/dev/tty` (or `CON` on Windows) as `process.stdin` so that the * interactive TUI can read keyboard input after the original piped stdin has * been consumed. * * @returns `true` if the swap succeeded, `false` if a TTY could not be opened * (e.g. running in a headless CI container with no controlling terminal). */ export declare function reopenStdinFromTTY(): boolean; //# sourceMappingURL=stdin-pipe.d.ts.map