feat(compression): adaptive auto transcript compactor

This commit is contained in:
2025-10-26 00:25:23 +02:00
parent 877ece07be
commit a0868a9b49
13 changed files with 850 additions and 24 deletions

View File

@@ -189,3 +189,18 @@ illustrations:
- The pipeline reuses the same stub provider harness as the snapshot tests, so
new scenes should be added in tandem with `chat_snapshots.rs` to keep visual
regression coverage and documentation imagery aligned.
## 9. Transcript Compression
- The compactor lives under `[chat]` in `config.toml`. Defaults keep
`auto_compress = true`, `trigger_tokens = 6000`, and retain the last eight
turns verbatim.
- Strategy is configurable: `provider` summaries call back through the active
model (or `chat.model_override`), while `local` uses a heuristic bullet list
for fully offline runs.
- Users can disable the feature per session with `owlen --no-auto-compress`, or
at runtime via `:compress auto on|off`. `:compress now` triggers an immediate
compaction even when auto mode is disabled.
- Each compression pass replaces older turns with a system summary annotated by
`message.metadata.compression` (strategy, timestamps, token deltas, and the
archived message ids) to support audits and future rehydration tools.