drscrewdriver/dsh-context-compression-improved
dsh-context-compression-improved is an auditable tool-result compression selector for DSH (a fork of dsh-context-compression-selector) with selectable Fresh / Aggregate / History / micro-compact / TailTrim / Native profiles plus an orthogonal code-skeleton gate that keeps imports and declarations while eliding function bodies - recording every reducer decision with exact token counts.
dsh-context-compression-improved adds selectable, auditable policies for shrinking tool-result context without modifying DeepSeek Harness core. Fresh pre-compresses a newly oversized tool result before the model sees it, Aggregate compresses fresh material again when it still grows past its budget, History / micro-compact replaces eligible old results while preserving recent working context, TailTrim is a Custom-only tail reduction path, and Native keeps the harness-style head/middle/tail trimming as one explicit profile. On top of those the fork adds an orthogonal code-skeleton gate: when enabled, an oversized fresh source-code result first keeps imports and type/function/class declarations, elides function bodies behind a marker and preserves error lines inside them, falling back to plain head pruning if the skeleton cannot be produced or verified - so the gate can never make context worse. It is off by default (codeSkeleton.enabled), independent of the selected profile, and strictly parsed. Every decision is recorded with stage, reducer, trigger, skip reason and exact token counts, a compression monitor shows net/gross savings, offsets, context usage, cache-hit rate, cost estimate and the turn-tail summary state with a per-session resume/disable override, and the settings section hosts the profile choice, the auto-compact trigger and the skeleton toggle.
Install
dsh plugin --profile web add dsh-context-compression-improved@latestCopied verbatim from the README's package install block. npm package dsh-context-compression-improved at 0.9.5 (registry check 2026-10-16; the registry repository field resolves back to this repo).
Compatibility
The README is explicit that the plugin supports DeepSeek models only: both the lossless measurement and the lossy compression depend on the bundled official DeepSeek tokenizers (deepseek-v4-flash, deepseek-v4-pro, deepseek-v4-flash-vision-exp), and on any other model it fails open and keeps the original tool results. It is a fork of dsh-context-compression-selector that adds the code-skeleton gate, an ESLint baseline in CI, a test:watch loop and the extra translations; settings are session-frozen like the upstream's, so changes affect newly observed sessions only. The README also recommends connecting DeepSeek through a custom /v1/responses endpoint rather than the Anthropic-style official route, because resume-replay 400s from that route cannot be repaired from the plugin side.
Details
- Repo: drscrewdriver/dsh-context-compression-improved
- Category: Agent Capabilities
- Stars: 3
- Version: GitHub repo drscrewdriver/dsh-context-compression-improved (3*); npm package dsh-context-compression-improved at 0.9.5 (registry check 2026-10-16; the registry repository field resolves back to this repo). MIT licensed; TypeScript; created 2026-09-05. The README declares support for 15 DSH rc releases across the 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 lines. English README with Chinese, Japanese, Korean, French, German, Italian, Russian and Spanish translations.
Alternatives
030611/dsh-telemetry-redactor · 173787247/dsh-wsl-env · acnlabs/dsh-plugin-acn