A slim port of Headroom: compresses tool output, cuts up to 20% of context, without affecting the model's context cache or agent performance.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:lifeodyssey/dsh-compressor
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
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.
Links
More in this category
liustack/modlens★ 1963
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
Anionex/dsh-vision-toolkit★ 440
Vision tasks for text-only models: intent-aware image Q&A, long-screenshot OCR, UI reproduction, grounding, and pixel diff.
superdesigndev/treg★ 419
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
Lum1104/dsh-browser★ 167
Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required.
ysr666/dsh-vision-router★ 155
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.
zhaoolee/notes★ 141
Export DSH conversations as Smartisan Notes-style PNGs, or create and update Markdown notes in a configured account-scoped workspace.