lifeodyssey/dsh-compressor
DeepSeek Harness plugin: compress tool output, cut up to 20% of context, without touching the context cache or agent performance.
Project Overview项目介绍
DSH compressor plugin is a slim port of Headroom that shortens oversized tool output after a run. It supports Log, Smart, Text, Search, and Diff crushers, reducing up to around 20% of context while preserving the already-sent prefix to keep the model context cache valid, and stores the original on disk. Use it when tool calls return long logs, JSON, or diffs. Note that Code-aware and Kompress crushers are not yet wired in.
DSH 压缩插件,移植自 Headroom,用于在工具调用后压缩过长输出。它支持 Log、Smart、Text、Search、Diff 五种压缩器,可削减最多约 20% 上下文,同时保留已发送前缀以维持缓存命中,并将原始内容落盘。适用于处理大型日志、JSON 或 diff 等冗长工具结果的场景。需注意 Code-aware 和 Kompress 压缩器尚未接入。
请帮我了解并安装插件:【dsh-compressor】【https://github.com/lifeodyssey/dsh-compressor】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-compressor
把 lifeodyssey/dsh-compressor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-compressor
A slim port of Headroom. Compresses tool output and cuts up to 20% of context, without affecting the model's context cache or agent performance.
Install
dsh plugin --profile web add dsh-compressor
How it works
A tool run leaves a long log / JSON / diff. Only a small part of it is useful. This plugin shortens that output before the next turn, keeps the original on disk, leaves the already-sent prefix alone so the cache stays valid, and gives the agent a tool to pull the full context back.
flowchart LR
A[Tool finishes] --> B{Output long?}
B -->|no| C[Full text stays]
B -->|yes| D[Shorten and save original]
D --> E[Model sees the useful part]
Compressor code comes from Headroom. Wired in today: Log / Smart / Text / Search / Diff. The only crushers not wired in yet:
- Code-aware (tree-sitter, source code)
- Kompress (ONNX, long prose)
Develop
cd plugins/dsh-compressor
pnpm install
pnpm test
Contributing
Open PRs on this repo, not on Headroom.
Plugin code is in plugins/dsh-compressor (Node 22+, pnpm):
cd plugins/dsh-compressor
pnpm install
pnpm test
pnpm typecheck
Crushers live in crates/:
cargo test --workspace
make test-parity
One change per PR. Plugin changes need tests; crusher changes need cargo test. Details: CONTRIBUTING.md.
This plugin is MIT. crates/headroom-* remains Apache-2.0.
Ephemeral-AI-Lab/dsh-plugins
SenmuuuuW/dsh-whale-report
openma-ai/deepseek-harness-acp
SnowCrescenter-tech/dsh-milestone
PerryLink/dsh-checkpoint-rewind
TFboy1/dsh-minecraft-ui
XieZongChen/dsh-md-notes
TencentCloud/tencentcloud-agentobs-sdk-dsh