import { type ByteSource, IOResult } from '../../../io/types.ts'; import { type Limit } from '../../../types.ts'; export declare function maybeWithTimeout(stream: ByteSource | null, limit: Limit | null, command: string): ByteSource | null; export declare function runWithTimeout(promise: Promise, seconds: number | null, name: string): Promise; export declare function truncateStream(src: ByteSource, io: IOResult, limit: Limit): AsyncIterable; export declare function applyLimit(src: ByteSource, limit: Limit | null): Promise<[ByteSource | null, IOResult]>; /** * Apply output caps at a boundary and merge the outcome. * * The one boundary rule, shared by the command tree and the * whole-line runtimes: cap stdout, append the truncation notice to * stderr, and let an ERROR-mode guard override the exit code. */ export declare function guardOutput(stdout: ByteSource | null, stderr: ByteSource | null, exitCode: number, limit: Limit | null): Promise<[ByteSource | null, ByteSource | null, number]>; export declare function applyOpLimit(result: unknown, limit: Limit | null): Promise; //# sourceMappingURL=limit.d.ts.map