/** * Shared caps for how much tool output may enter the conversation. Every * character returned by an executor is re-sent to the model on each * subsequent request, so oversized outputs cost quadratically over the * remaining run. Limits are measured in characters (UTF-16 code units), * which tracks token cost more closely than bytes and is what JS strings * measure exactly. Executors enforce these caps; tool descriptions * reference them so the model pages or narrows instead of retrying. * * Truncation notices always live in the preserved head/tail of an entry, * never in the elided middle. Provider-request building may re-truncate * long strings with its own (possibly tighter) middle-cut backstop * (session/services/message-builder.ts); keeping the notices at the edges * means the recovery guidance survives that cut too. */ /** Max characters of command output kept; beyond this the middle is elided. */ export declare const MAX_COMMAND_OUTPUT_CHARS = 48000; export declare function truncateCommandOutput(text: string, options?: { maxChars?: number; totalChars?: number; }): string; /** Max lines returned per file read when the range is larger or absent. */ export declare const MAX_READ_LINES = 2000; /** Max characters kept per line in file reads (defangs minified files). */ export declare const MAX_LINE_CHARS = 2000; /** Max characters returned per file read window. */ export declare const MAX_READ_OUTPUT_CHARS = 48000; /** Max characters returned per search query; beyond this the middle is elided. */ export declare const MAX_SEARCH_OUTPUT_CHARS = 48000;