精选
为什么选中它
待人工精选——以下事实来自源码仓库。
它能做什么
Enhanced auto-compaction defaults for DeepSeek Harness agent presets
适合谁
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
风险提示
- 未发现明显风险信号;安装前仍建议查看源码。
Enhanced auto-compaction defaults for DeepSeek Harness agent presets
待人工精选——以下事实来自源码仓库。
Enhanced auto-compaction defaults for DeepSeek Harness agent presets
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
dsh plugin --profile web add github:songoao25/dsh-auto-compact 作者没有声明支持的平台。
dsh-compaction-basic), but the default trigger threshold is 80% of the model's context window — too late for large-context models. This tool lowers the threshold to 75% and adds per-route policies, so history is tidied up earlier and long sessions stay responsive. ## How it works DeepSeek Harness runs one compaction-basic instance per agent preset (per session). Profile-level patches cannot reach that subtree, so this tool directly injects configuration into the compaction-basic entry of every user-installed preset under ~/.dsh/.agent-presets/. - Default: trigger at 75% of the context window, keep the most recent 20% verbatim. - Per-route policies: - ChatGPT / Codex GPT-5.6 (272K context): trigger at 70%. - OpenCode Go DeepSeek V4 (1M declared context): trigger at 65%. - Keeps the existing summarization, retry, and safe-fallback behavior of dsh-compaction-basic (a failed summary preserves the original history and never silently drops context). - Manual /compact and tool-result pruning remain available. ## Installation bash cd dsh-auto-compact ./install.sh Restart DeepSeek Harness afterward. Roll back with: bash ./uninstall.sh ### Important: Factory Presets This tool only injects into user-installed presets under ~/.dsh/.agent-presets/. The factory presets (standard, code, cordis, minimal) ship with their own default compaction settings (80% trigger, 16% retain) and are read-only — this tool will not modify them. If you want enhanced compaction for a factory preset: 1. Copy it to your user presets directory: bash cp -r /opt/homebrew/lib/node_modules/@deepseek-ai/dsh/presets/<preset-name> ~/.dsh/.agent-presets/ 2. Run ./install.sh again to inject the enhanced configuration. 3. Select the copied preset in DSH's session setup. ## What the installer does - Finds every agent.cordis.yml under ~/.dsh/.agent-presets/. - Injects the policy block into the compaction-basic entry of each preset. - Backs up each modified file as agent.cordis.yml.bak-auto-compact. - Idempotent: a marker comment prevents double injection. - Skips presets that already configure compaction-basic themselves (merge manually in that case). - Never touches the read-only factory presets in the DSH install directory. ## Configuration All values live in scripts/inject.mjs (the CONFIG_BLOCK). Edit them before running ./install.sh if you want different thresholds. Preview with: bash node scripts/inject.mjs --dry-run | Key | Default | Meaning | |---|---|---| | thresholdRatio | 0.75 | Trigger compaction when estimated usage reaches this fraction of the model context window | | retainRatio | 0.20 | Keep the most recent fraction of the window verbatim | | modelPolicies | – | Per provider/model overrides | ## Safety - A failed summarization preserves the original history and logs a warning. - Automatic recovery never loops indefinitely (bounded retries). - The tool contains no secrets and no personal paths. - Installation is fully reversible via ./uninstall.sh. ## License MIT © songoao25不看 Star,人工一条条挑的。
把 DSH 的 settings.yaml 做成可视化看板:所有已注册的 settings namespace——包括官方界面从未覆盖的第三方插件配置——都渲染成可编辑表单。项目还早,但方向很对:告别手改 YAML。
给 DSH 的 DIY 轨迹可视化:把 agent 的计划与执行画成图,不用翻原始日志也能看清它在干嘛。项目还早,但补上了「一眼看懂 agent 在做什么」这个真实缺口。
从 Claude Code / Codex 把活派给 DSH:在宿主内拉起带分级预设的 DSH agent 会话,看原生子代理进度,还能借它的多模态桥给纯文本的 DSH 补上视觉和生图。编排型插件,把 DSH 变成其他编码 agent 的后端。