/** 64 MiB. Chosen to clear the largest `blast-radius` output observed in the corpus by a wide * margin while still bounding the daemon's heap. Raise it deliberately, not reflexively — if a * tool needs more than this, streaming is the answer rather than a bigger buffer. */ export declare const EXEC_MAX_BUFFER_BYTES: number; /** A child produced more output than the cap allows. * * Distinct from a generic failure ON PURPOSE: "this repo is too big for the current cap" and "the * tool crashed" need different responses from an operator, and collapsing them into one 500 is * the defect FINDING-050 describes in the gate. */ export declare class ExecOutputTooLarge extends Error { readonly file: string; readonly limitBytes: number; constructor(file: string, limitBytes: number); } /** Node reports the overflow through `code`, not the message. */ export declare function isMaxBufferError(err: unknown): boolean; type ExecOpts = { timeout?: number; cwd?: string; env?: NodeJS.ProcessEnv; /** Suppress the console window a child would open on Windows (git, etc.). */ windowsHide?: boolean; /** `number | undefined` on purpose: `exactOptionalPropertyTypes` would otherwise reject the very * shape this module defends against, making the guard below untypeable and untestable. */ maxBuffer?: number | undefined; }; /** The cap that will actually apply. Exported so the rule can be tested directly: proving it * end-to-end means making the process buffer 64 MiB, which is a disproportionate cost in CI for a * one-line ordering rule. The end-to-end overflow path is covered separately. */ export declare function resolveMaxBuffer(opts: ExecOpts): number; /** `execFile`, with a bounded output buffer and an overflow that says what it was. * * Callers may override `maxBuffer`, but not by forgetting it. */ export declare function execCapped(file: string, args: string[], opts?: ExecOpts): Promise<{ stdout: string; stderr: string; }>; export {}; //# sourceMappingURL=exec.d.ts.map