fix(core): enforce tool output truncation variants

This commit is contained in:
Aiden Cline 2026-05-22 17:37:43 -05:00
commit 7cfcb644ab
5 changed files with 52 additions and 17 deletions

View file

@ -1294,11 +1294,21 @@ export type Config = {
enterprise?: {
url?: string
}
tool_output?: {
truncate?: boolean
max_lines?: number
max_bytes?: number
}
/**
* Configure tool output truncation. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.
*/
tool_output?:
| {
/**
* Disable tool output truncation
*/
truncate: false
}
| {
truncate?: true
max_lines?: number
max_bytes?: number
}
compaction?: {
auto?: boolean
prune?: boolean