Long tool results in DeepSeek Harness (DSH) create enormous context pressure. DSH includes a built-in excellent LLM compression mechanism (/compact), but it runs only after pressure has built up and requires additional model calls. The dsh-ledger-compact plugin performs shaping before results reach the model and provides a local mechanical folding method that requires no LLM calls.
Plugin Overview¶
This is a DeepSeek Harness plugin for inbound shaping before tool results reach the model and for providing local mechanical folding. It is maintained by telagod and licensed under MIT.
Core Features¶
The plugin mainly includes the following three features:
- Inbound shaping: Freezes oversized unsent tool results during the idle prep step. It processes only just-completed steps to ensure provider prefix caching is not broken.
- Mechanical folding: Uses
/fast-compactand input-bar folding to condense older history into brief folding cards. - Replace default compaction: Optionally reuses the official engine’s
summarizehook so that/compact, automatic compaction, and overflow recovery skip the LLM.
Install and Enable¶
Ensure the DeepSeek Harness version is >= 0.1.2-rc.1 before installing. Use the following command to install the plugin:
dsh plugin --profile web add github:telagod/dsh-ledger-compact
After installation, restart the web profile to activate it. The plugin inserts its own ID via a bundle patch.
Typical Usage¶
The plugin provides the following commands:
/fast-compact
/fast-compact status
/fast-compact: Manually trigger mechanical folding./fast-compact status: View health status, including inbound shaping counters, last error, and compaction engine hook status.
Notes¶
- Dependency requirement: Requires
dsh >= 0.1.2-rc.1. - Engine compatibility: Does not replace the DSH engine itself;
@deepseek-ai/dsh-compaction-basicmust be retained. - Vision feature: Vision sidecar is not supported, and the
/fast-compact vision …command has been removed. - PNG limitation: PNG image functionality is restricted to specific conditions, for example the model must explicitly support the
imagemodality, and image cost must be lower than text cost.
More Information¶
Plugin documentation and source code are available at:
- GitHub repository
- Community catalog