/** * Log and build-output compression. * * Build logs, test runs and stack traces are the content a debugging loop reads * most and the content that repeats hardest. This is also the engine with the * best lossless story: a run of identical lines collapses to one line and a * count, and that is FULLY reconstructible from the output -- the reader knows * exactly what was there and exactly how many times. * * WHAT IS NEVER COLLAPSED. Lines carrying an error, a failure, an exception or * a non-zero exit survive individually even when they repeat. Two identical * `AssertionError` lines are two failures, and telling a debugging agent it saw * "2x AssertionError" when it needed to see both stack frames is exactly the * "inappropriate compression strategy [where] the model may not be able to * obtain key details" their own documentation warns about. The tokens saved by * folding an error are the tokens that mattered. */ import type { CompressionResult, EngineContext } from './types.js'; /** Detects content worth treating as a log rather than prose. */ export declare function looksLikeLog(text: string): boolean; /** * Folds runs of identical lines into one line and a count. * * LOSSLESS BY CONSTRUCTION, which is the point. "the same line, 37 more times" * is not an approximation of the removed content -- it is a complete * description of it, and the model can reconstruct the original exactly without * asking anyone for anything. No spill, no path, no lookup. */ export declare function compressLog(text: string, ctx?: EngineContext): CompressionResult; //# sourceMappingURL=log.d.ts.map