import { type GrepMatch } from "./shell.js"; /** How much of a command's output comes back inline. Anything longer is * saved and replaced by a preview. */ export declare const MAX_STDOUT_LEN = 2000; /** What the model gets back for a command's output: short output as * printed, long output saved under `source` (the command that ran) and * replaced by the notice. An empty source means none was given. */ export declare function _keepOutput(text: string, exitCode: number, source?: string): string; /** The saved output, whole or a slice of lines; the same offset and limit * rules as `read`. */ export declare function _readSpill(name: string, offset: number, limit: number): string; /** One pattern's matches, when a search names several. */ export type PatternMatches = { pattern: string; matches: GrepMatch[]; }; /** Lines matching `pattern` in one saved output. With `morePatterns`, * every pattern is searched and the matches come back grouped by pattern, * `maxResults` for each, so one call can cover several topics. */ export declare function _grepSpill(pattern: string, name: string, maxResults: number, morePatterns?: string[]): GrepMatch[] | PatternMatches[];