dsh-compressor
Headroom 的精简移植,在不影响模型上下文缓存以及 Agent 性能的情况下,压缩工具的输出,至多减少 20% 的上下文。
lifeodyssey
@lifeodyssey
⬇ 1
★ 1
main
安装
dsh plugin --profile web add github:lifeodyssey/dsh-compressor
需要可复现安装时,可在仓库后追加 #commit 固定提交。
Headroom 的精简移植,在不影响模型上下文缓存以及 Agent 性能的情况下,压缩工具的输出,至多减少 20% 的上下文。
该插件未提供要点说明,请参考仓库 README。
context-compressiondeepseekdsh-plugin
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/lifeodyssey/dsh-compressor |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 1 |
| 最近推送 | 2026-08-15 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
[English](README.md) | [中文](README.zh-CN.md)
# dsh-compressor
[](https://www.npmjs.com/package/dsh-compressor)
[](https://github.com/lifeodyssey/dsh-compressor/actions/workflows/dsh-compressor.yml)
A slim port of [Headroom](https://github.com/headroomlabs-ai/headroom). Compresses tool output and cuts up to 20% of context, without affecting the model's context cache or agent performance.
## Install
```bash
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.
```mermaid
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](https://github.com/headroomlabs-ai/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
```bash
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):
```bash
cd plugins/dsh-compressor
pnpm install
pnpm test
pnpm typecheck
```
Crushers live in `crates/`:
```bash
cargo test --workspace
make test-parity
```
One change per PR. Plugin changes need tests; crusher changes need `cargo test`. Details: [CONTRIBUTING.md](CONTRIBUTING.md).
This plugin is MIT. `crates/headroom-*` remains Apache-2.0.
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。