dsh-token-saver

DeepSeek Harness plugin that aggressively saves tokens without affecting task quality: lossless head/tail truncation of tool results (default), grep-result folding, pressure-triggered dsh-compaction-basic delegation, and an LLM-summary CompactionEngine subclass for the aggressive mode. Saves 97.6% of input tokens on an 8-scenario synthetic suite, with all reductions routed through dsh event flow so model-visible = logged stays intact.

Overview

DeepSeek Harness plugin that aggressively saves tokens without affecting task quality: lossless head/tail truncation of tool results (default), grep-result folding, pressure-triggered dsh-compaction-basic delegation, and an LLM-summary CompactionEngine subclass for the aggressive mode. Saves 97.6% of input tokens on an 8-scenario synthetic suite, with all reductions routed through dsh event flow so model-visible = logged stays intact.

Installation

Install from GitHub

dsh plugin --profile web add github:Shaw529/dsh-token-saver

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Independent install test

Install result
Incompatible in the tested version
Tested Harness version
0.2.2-rc.1
Tested plugin version
Not reported
Test date

Fallback version

Fallback test result
Untested
View dependency version ranges
@deepseek-ai/dsh-compaction
>=0.0.1-rc.1 <0.1.0 || >=0.0.1-rc.1 <0.2.0-0

Installation notes

  • May run terminal commands