dsh-token-optimizer
Run the following command in DeepSeek Harness:
dsh plugin install Snow-ea/dsh-token-optimizer
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install Snow-ea/dsh-token-optimizer in your DeepSeek Harness 0.1.2-rc.1 Web profile to install this plugin; the source is available at https://github.com/Snow-ea/dsh-token-optimizer. Restart the running dsh web process after installation to activate it.
About this plugin
When you run multi-step Agent tasks on DeepSeek Harness, large tool-result texts keep re-entering the model context, burning tokens and slowing inference. dsh-token-optimizer performs a deterministic, lossy compression on successful tool results before they accumulate in context, and archives every replacement so you can retrieve the exact original text later through the session-authorized retrieve_spill interface.
At the root level it mounts a cache-aware BasicCompactionEngine adapter that fires automatically at 62.5% context pressure, ahead of DSH's built-in 80% fallback, so across Standard, PTC, Creator, and Minimal modes the stock engine has no second reduction pass to run. It also ships a Web conversation dashboard built on the Conversation, Renderer, and Session client contracts, letting you monitor session state and compaction effects from a browser.
If you are running Agents under a DSH 0.1.2-rc.1 Web profile and want to lower context pressure without altering the structured values that run_code programs receive, while gaining an auditable compression log and a visual panel, this plugin is built for that job.
Use Cases
- Multi-step Agent tasks where verbose tool results bloat the model context
- Retrieving exact original tool text after lossy compression
- Monitoring session state and compaction effects from a browser panel
Best For
- Developers running multi-Agent workloads on DSH 0.1.2-rc.1 Web profiles
- Teams that want to reduce token spend without altering structured run_code inputs
- Production users who need an auditable compression log and a visual management panel
Related Plugins
A unified suite combining hot runtime injection, task-aware thinking-mode routing, and a graded session protocol with red-team gates to sustain model diligence across long-horizon inference.
ModLens is a vision plugin for DeepSeek Harness that gives text-only models sight by reading images pasted directly into chat, with zero-config setup and multiple vision engines.
On-demand vision for text-only DeepSeek Harness agents: built-in free keyless vision chain and 14 vision tools, routing image turns as tool calls to vision models with pixel fidelity, no Python needed, one-command install.
Give text-only models in DeepSeek Harness eyes, enabling image Q&A, long-screenshot OCR, UI restoration, and GUI visual tasks.