Tianyi Cui 6d6b554fdf Merge remote-tracking branch 'origin/master' into worktree-export-jsdoc-gate 2 tháng trước cách đây
..
compact 116e2c45a8 docs: flatten single-file catalog dirs to docs/tool-catalog.md and docs/persistence-catalog.md 2 tháng trước cách đây
compact-basic cd9737d569 Gate JSDoc completeness on every package export 2 tháng trước cách đây
README.md cc15ef54ef Sync remaining chars-per-token prose in overview READMEs 2 tháng trước cách đây

README.md

compact/ — compaction capability family

A three-package capability seam (see capability seams): an abstract compaction interface, a backend that summarizes, and the model-facing tool that consumes it. The interface and a first backend (compact-basic/) exist; the consumer tool is deferred. All product packages.

Package Role ctx key
compact/ Abstract compaction seam (interface + compact/* events + CompactionResult) ctx.compact
compact-basic/ A backend: chars-per-token estimation (charsPerToken, default 4) + token-budget retention + llm.stream() summarization (registers ctx.compact)
tool-compact/ (deferred) Model-facing /compact tool over ctx.compact (registers on ctx.tools)

The interface lives at compact/compact/, the backend at compact/compact-basic/. Unlike the bash seam, it depends on dsh-session and dsh-llm — its verbs are defined over a Session and its output is the ContentBlock vocabulary, so the contract cannot be expressed without naming them. That deviation from the "interface depends only on cordis" guidance is intentional and recorded in the compaction capability-seam RFC. A tokenizer- or template-based backend would replace compact-basic without touching the interface or the tool.