/** * True when an error from a writer that owns its sink reports that the peer * closed that sink. This intentionally accepts structural error objects rather * than requiring an `Error` instance. */ export declare function isKnownSinkPeerClosedError(error: unknown): boolean; /** * Backward-compatible local-sink classifier for output writers. Callers must * use it only when they own the sink that produced the error. */ export declare function isBrokenPipeError(error: unknown): boolean; /** * A classifier for process-level stdout peer-closed errors (`EPIPE`, `EIO`, * `EBADF`). Its direct-write evidence is private to each factory instance, so * only the owner that intercepted `process.stdout.write` can mark an error * for this classifier. */ export interface ProcessStdoutEpipeClassifier { markDirectProcessStdoutWriteError(error: unknown): void; isAttributableProcessStdoutEpipe(error: unknown): boolean; } export declare function createProcessStdoutEpipeClassifier(): ProcessStdoutEpipeClassifier; /** * Exit code for a producer terminated because its output pipe broke: * 128 + SIGPIPE (13), matching what shells report for SIGPIPE-killed tools * in `foo | head`-style pipelines. */ export declare const BROKEN_PIPE_EXIT_CODE = 141;