/** * Oversized tool output, kept on disk instead of in the conversation. * * A command's output was capped at 200,000 characters and then pushed into the message history * whole. That is roughly 50,000 tokens — one and a half times the entire context window of a * 32k model — so a single verbose test run or install could not merely crowd the conversation * but exceed it outright. Worse, compaction retains the recent tail, so the offending message * was precisely the one it could not summarise away: the session stayed wedged until it aged out. * * The idea is taken from the DeepSeek Harness, whose spill seam persists a tool's oversized text * and hands the model a locator plus retrieval guidance rather than the text. It is a better * answer than truncation because nothing is lost — the output is a file the agent already has * tools to read and search. */ /** Above this many characters, a result goes to disk instead of into the conversation. */ export declare const SPILL_THRESHOLD = 16000; export interface SpillResult { /** What goes into the conversation. */ text: string; /** Where the whole output was written, relative to the workspace, when it was. */ file?: string; bytes?: number; } /** * Writes an oversized result to disk and returns what the model should see instead. * * Head and tail are both kept because they answer different questions: the head says what ran * and how it started, and the end of a build or test run is where the verdict is. A middle-only * excerpt would routinely omit the error everyone is looking for. * * A failure to write is not fatal — the result is truncated inline instead, with the truncation * stated. Losing the output is bad; losing the turn is worse. */ export declare function spillIfOversized(cwd: string, toolName: string, callId: string, result: string, threshold?: number): Promise; //# sourceMappingURL=spill.d.ts.map