dsh-token-summary: Periodically archive long conversation context into handover-ready Markdown archives.
`dsh-token-summary` is a DSH host plugin maintained at `tech-zerolei/dsh-token-summary`, categorized under "Memory" and licensed under MIT. It requires Node >= 22, DeepSeek Harness >= 0.2.1-rc.2, and has a package.json version of 2.0.1. It listens for session/event and only counts the actual billing usage reported by the provider within assistant/message. When the global accumulated tokens cross a threshold, it requests a structured summary from the model, writes it as `handoff-*.md`, and updates the index `README.md`. Key points include: incremental archiving, absolute boundary anchoring, allocating transcript budgets backwards from the newest, writing a statistical fallback file even if summary generation fails, and using `inject()` for notifications without waking the agent. The default `intervalTokens` is 2,000,000, while the README states 500,000 and the directory page lists 10,000,000; there is a discrepancy in figures, and the actual value takes precedence over documentation. Installation is performed using `dsh plugin add /path/to/dsh-token-summary` or by editing `cordis.patch.yml`; configuration options such as `intervalTokens`, `outputDir`, `provider/model`, and `maxTranscriptChars` are optional. It is suitable for Harness users running long-term tasks that require mid-way handovers or post-task reviews. The plugin runs with the privileges of the current DSH process, and summary calls will consume tokens from the used provider; users should check the source code and license before installing.
Read More