evilevil/dsh-purge-021rc2
dsh-purge
dsh-purge is a community DeepSeek Harness plugin. Read the repository README before installing.
Install
npx @deepseek-ai/dsh plugin --profile web add github:evilevil/dsh-purge-021rc2Restart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-purge-021rc2)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from evilevil/dsh-purge-021rc2, cleaned of badges and images.
dsh-purge · DSH 0.2.1-rc.2 适配版
上游已经停更,这个仓库接着把它跑在 DeepSeek Harness 0.2.1-rc.2 上。
原项目 YuJunZhiXue/dsh-purge 在 2026-10 挂出「暂时停更」:不发新版、不处理 issue/PR、新版 dsh 也不保证跟上。最后一个正式版是
v1.1.71,master 上的1.1.72从未发版。本仓库以 1.1.72(master) 为基座,把 0.2.1-rc.2 上必崩的几处修掉,做成可直接安装的版本。上游恢复维护后,请优先回到上游。
- 版本:
1.1.72-dsh021rc2.4 - 适配:
@deepseek-ai/dsh/dsh-base0.2.1-rc.2(web profile,macOS 实测) - 基线:0.2.0-rc.2 仍可用(本版改动对 0.2.0 是向后兼容的)
- 许可:MIT(原作者 小杨 / YuJunZhiXue,署名见文末)
为什么需要这一版
0.2.1 改了提示词变量的注册范围:agent-loop 只注册 provider / model,不再注册 cwd。而 1.1.72 的 lib/identity.js 会无条件把 deployment:persona-suffix 换成 Your working directory is {{cwd}}.。结果是每一轮对话在发出模型请求之前就抛:
unknown prompt variable "[cwd]" in section "deployment:persona-suffix";
registered variables: provider, model
补丁面板这时是全绿的,因为崩点在提示词组装,不在补丁。
修了什么
对应上游 issue:#114、#126、#136、#132、#119、#127、#121。
| 问题 | 根因 | 修法 |
|---|---|---|
#114 / #126 / #136 每轮 unknown prompt variable "{{cwd}}" | 0.2.1 不再注册 cwd 变量,identity.js 却硬写 {{cwd}} | lib/identity.js 增加能力探测:assembled.variables 没有 cwd 就降级为静态文案 Your working directory is the current workspace.;组装末尾再兜底把任何残留 {{cwd}} 落成字面量。可用 DSH_PURGE_CWD=variable|static 强制 |
| 同一 bug 的第二入口 | 插件自己的 cordis.patch.yml 里也写着 personaSuffix: ... {{cwd}}. | 改成 personaSuffix: "",后缀统一由 identity 层决定 |
#132 应用后「清洗没有写进全部宿主,已取消重启」、#40 落成 skipped | 0.2.1 的 system-prompt 在 assemble 后新增 requiredContexts 过滤,旧 pattern 全不命中 | patch #40 增加 0.2.1 形状的 pattern + replacement,保留 requiredContexts 语义 |
#119 桌面端点「应用」后 dsh: fatal load failure | desktop.js 同步函数调 async atomicCopyFile() 没 await,Node 24 升级成 uncaughtException | 函数改 async、补 await,core.js / index.js 调用点同步 |
#127 / #106 应用后一份 .bak 都没有,还原/卸载失效 | HOST_SYNC 白名单漏 closeSync → hostFs.closeSync 未定义 → 占位句柄泄漏 → EPERM 静默失败 | 白名单补 closeSync / fsyncSync / truncateSync / writeSync / futimesSync / utimesSync |
| #121 Ctrl+Enter 插话静默失效 | 1.1.71 的 #86 把 case "steer" 改成 followup,与 steer() 的 next-step 冲突 | 1.1.72 已修正为 agent.steer;本版在真机确认落盘 |
| 红队预设注册失败(社区 fork 的修法) | presets/redteam/agent.cordis.yml 的 toolFilter.deny 列了未注册的 workflow / ralph,tools.restrict() 直接抛 unknown global tool | 移除 toolFilter,子代理隔离改由 maxDepth: 1 保证 |
未处理:上游 #133(Windows 桌面换包助手杀自己)属 Electron/Windows 路径,macOS 不复现,未改动;上游 #30(system section 过滤影响项目约定)属行为争议,不在适配范围。
安装
方式一:一键脚本(macOS,web profile)
curl -fsSL https://raw.githubusercontent.com/evilevil/dsh-purge-021rc2/main/scripts/install.sh | sh
脚本会:备份现有插件目录 → 解包本仓库发行版 → 写入 installed-rev / applied.json 戳(避免启动时误判版本落后而反复重打)。
方式二:手动
…

