dsh-dcp
Deterministic context compression for dsh — zero LLM calls, rule-based pruning that preserves paths, commands, error traces, and open todos verbatim. Compresses ~80k tokens to a few hundred.
dsh 的确定性上下文压缩后端:零 LLM 摘要调用,基于规则剪枝,逐字保留路径/命令/报错原文/未完成 todo,约 8 万 token 压到几百。
How to install
dsh plugin add @aiwayds/dsh-dcp About
dsh-dcp dsh(DeepSeek Harness)的确定性压缩后端:**上下文压缩不调 LLM**,开箱即用。 **简体中文** · English 为什么做 dsh 默认的压缩(compaction-basic)每次压缩都要让模型把旧对话**重新总结一遍**——费 token、慢、结果还不稳定。我们参考 opencode 社区的 opencode-dcp(去重、清错、"技术摘要代替散文"),做了一个纯代码版本: **零 LLM 调用**:压缩本身不消耗任何额外 token **输出稳定**:相同对话永远得到相同摘要 **中文友好**:用户原话/路径/命令/报错逐字保留,按 CJK 真实密度计价 **继承官方全部安全机制**:触发、保留尾巴、事务锁、tool-pairing 边界都复用 dsh 官方实现(只替换"摘要"这一环) 效果 与官方默认压缩的对比 | | 官方 compaction-basic | dsh-dcp | |---|---|---| | 摘要方式 | 每次调 LLM 重写 | 确定性代码抽取 | | 每次压缩的模型调用 | 1 次 | **0 次** | | 输出稳定性 | 同对话多次可能不同 | 相同输入永远相同 | | 摘要内容 | 语义归纳 | 逐字保硬信息(路径/命令/报错/待办/用户原话) | | 中文 | 依赖模型转写 | 原样保留 + CJ…
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 8
- mo. downloads
- 3.1K
- Last push
- 2026-09-24
- Created
- 2026-08-17
Links
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- dsh, dsh-plugin
Related plugins
mobile-mcp
mobile-next/mobile-mcp
Model Context Protocol Server for Mobile Automation and Scraping (iOS, Android, Emulators, Simulators and Real Devices)
davinci-resolve-mcp
samuelgursky/davinci-resolve-mcp
MCP server integration for DaVinci Resolve Studio
ssh-mcp
tufantunc/ssh-mcp
MCP server exposing SSH control for Linux servers via Model Context Protocol.