lifeodyssey / dsh-compressor

已收录

DeepSeek Harness plugin: compress tool output, cut up to 20% of context, without touching the context cache or agent performance.

main工具 查看源代码

安装

npx -y @deepseek-ai/dsh plugin --profile web add github:lifeodyssey/dsh-compressor

此安装命令根据 GitHub 仓库地址生成,是未经验证的安装起点。

README

维护者编写的文档快照。

在 GitHub 查看 ↗
提交版本 76b39ab同步于 2026年8月18日

English | 中文

dsh-compressor

npm CI

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.

项目文件与信号

以下项目是目录快照中检测到的公开仓库信号。

插件清单已检测
测试已检测
贡献指南已检测
文档已检测
示例已检测

仓库信息

开发语言
Rust
许可证
MIT
最后更新
2026年8月15日 18:06

谨慎安装

请检查源代码、权限、生命周期脚本、依赖与网络访问;不受信任的插件应先在隔离环境中测试。