Merge branch 'nxl/improve-compaction-strategy' into dev

This commit is contained in:
Dax Raad
2026-04-19 19:38:46 -04:00
7 changed files with 696 additions and 25 deletions

View File

@@ -204,6 +204,13 @@ const InfoSchema = Schema.Struct({
prune: Schema.optional(Schema.Boolean).annotate({
description: "Enable pruning of old tool outputs (default: true)",
}),
tail_turns: Schema.optional(NonNegativeInt).annotate({
description:
"Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)",
}),
tail_tokens: Schema.optional(NonNegativeInt).annotate({
description: "Token budget for retained recent turn spans during compaction",
}),
reserved: Schema.optional(NonNegativeInt).annotate({
description: "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
}),