export declare const LOG_OMISSION_MARKER = "\n[...job log middle omitted...]\n"; export interface LogLimits { /** Bytes kept from the start of each job log. */ headBytes: number; /** Bytes kept from the end of each job log. */ tailBytes: number; /** Most bytes read from one job log stream before the rest is abandoned. */ maxReadBytes: number; /** Most bytes retained across every job log of one run context. */ totalBytes: number; } export declare const DEFAULT_LOG_LIMITS: LogLimits; /** * Reads a log stream keeping only a head and a tail window, so memory stays bounded by the limits * rather than by the log size. Bytes between the windows are replaced by an omission marker. */ export declare function collectDiagnosticWindow(stream: AsyncIterable, { headBytes, tailBytes, maxReadBytes }: LogLimits): Promise; export declare function fitDiagnosticWindow(log: string, maxBytes: number): string;