/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Writes to the real stdout, bypassing any monkey patching on process.stdout.write. */ export declare function writeToStdout(...args: Parameters): boolean; /** * Writes to the real stderr, bypassing any monkey patching on process.stderr.write. */ export declare function writeToStderr(...args: Parameters): boolean; /** * Monkey patches process.stdout.write and process.stderr.write to redirect output to the provided logger. * This prevents stray output from libraries (or the app itself) from corrupting the UI. * Returns a cleanup function that restores the original write methods. */ export declare function patchStdio(): () => void; /** * Creates proxies for process.stdout and process.stderr that use the real write methods * (writeToStdout and writeToStderr) bypassing any monkey patching. * This is used by Ink to render to the real output. * * Also adds error event handlers to prevent EPIPE crashes when output is piped * to a process that exits early. */ export declare function createInkStdio(): { stdout: NodeJS.WriteStream & { fd: 1; }; stderr: NodeJS.WriteStream & { fd: 2; }; };