dsh-compaction-threshold
在终端中运行以下命令:
dsh plugin install Lyoko-Jeremie/dsh-compaction-threshold
将以下提示词粘贴到 DeepSeek Harness 对话框中:
在 DeepSeek Harness 中执行 dsh plugin install Lyoko-Jeremie/dsh-compaction-threshold,或从 https://github.com/Lyoko-Jeremie/dsh-compaction-threshold 通过 Plugin Manager 安装。
插件介绍
在 DeepSeek Harness 的 web profile 里,压缩后端往往写在 agent preset 的 config.plugins 中。想只改自动压缩的压力阈值 thresholdRatio,却绕不开 cordis.patch 对整行 config 的替换:preset 里的插件声明又不在可递归 patch 的结构里,于是只能把上百行 preset 整份拷进 profile,bundle 一升级还容易和上游失同步。
dsh-compaction-threshold 在 agent 创建后、从 preset 隔离域取出 compaction 服务,用结构特征识别 dsh-compaction-basic 引擎,再整体替换其已解析且被冻结的配置,从而覆盖 thresholdRatio。profile 侧只需多挂一个插件行,不必动 preset 原文,也不引入第二份压缩引擎包。
你可以在 cordis.patch.yml 里按行覆盖 threshold(默认 0.5),合法区间为 (0, 1] 且需大于 retainRatio;手动 /compact 与自动压缩共用同一阈值。若 preset 里没有 basic 引擎,插件会安静跳过。
适合需要在不同 profile 或环境里微调压缩触发点、又不想维护整份 preset 副本的 Harness 用户;需知这是非官方运行时扩展,仅对插件加载后新建的 agent 生效。
使用场景
- 不想为改 thresholdRatio 复制整份 agent preset
- 需要在不同 profile 使用不同压缩触发阈值
- bundle 升级后希望少维护 preset 副本
适合人员
- 使用 web profile 的 DeepSeek Harness 用户
- 负责调优上下文与 token 用量的运维者
- 希望轻量扩展而非 fork preset 的开发者