Skip to content
Back to search

dsh-purge-021rc2

dsh-purge 社区适配版:上游已停更,这里让它继续跑在 DeepSeek Harness 0.2.1-rc.2 上(基于 1.1.72)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked yesterday
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/evilevil--dsh-purge-021rc2/badge.svg)](/listings/evilevil--dsh-purge-021rc2)

HTML

<a href="/listings/evilevil--dsh-purge-021rc2"><img src="/api/listings/evilevil--dsh-purge-021rc2/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

方式一:一键脚本(macOS,web profile)

curl -fsSL https://raw.githubusercontent.com/evilevil/dsh-purge-021rc2/main/scripts/install.sh | sh

脚本会:备份现有插件目录 → 解包本仓库发行版 → 写入 `installed-rev` / `applied.json` 戳(避免启动时误判版本落后而反复重打)。

方式二:手动

V=1.1.72-dsh021rc2.4
curl -fsSLO https://github.com/evilevil/dsh-purge-021rc2/releases/download/v$V/dsh-purge-$V.tgz
curl -fsSLO https://github.com/evilevil/dsh-purge-021rc2/releases/download/v$V/SHA256SUMS.txt
shasum -a 256 -c SHA256SUMS.txt
rm -rf "$DSH_HOME/profiles/web/node_modules/dsh-purge"
mkdir -p "$DSH_HOME/profiles/web/node_modules/dsh-purge"
tar xzf dsh-purge-$V.tgz -C "$DSH_HOME/profiles/web/node_modules/dsh-purge" --strip-components=1

方式三:写进 profile 依赖

"dsh-purge": "https://github.com/evilevil/dsh-purge-021rc2/releases/download/v1.1.72-dsh021rc2.4/dsh-purge-1.1.72-dsh021rc2.4.tgz"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 131 lines · 1 finding marked
  1. # dsh-purge · DSH 0.2.1-rc.2 适配版
  2. > **上游已经停更,这个仓库接着把它跑在 DeepSeek Harness 0.2.1-rc.2 上。**
  3. >
  4. > 原项目 [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge) 在 2026-10 挂出「暂时停更」:不发新版、不处理 issue/PR、新版 dsh 也不保证跟上。最后一个正式版是 `v1.1.71`,master 上的 `1.1.72` 从未发版。
  5. >
  6. > 本仓库以 **1.1.72(master)** 为基座,把 0.2.1-rc.2 上必崩的几处修掉,做成可直接安装的版本。**上游恢复维护后,请优先回到上游。**
  7. - 版本:`1.1.72-dsh021rc2.4`
  8. - 适配:`@deepseek-ai/dsh` / `dsh-base` **0.2.1-rc.2**(web profile,macOS 实测)
  9. - 基线:0.2.0-rc.2 仍可用(本版改动对 0.2.0 是向后兼容的)
  10. - 许可:MIT(原作者 小杨 / YuJunZhiXue,署名见文末)
  11. ## 为什么需要这一版
  12. 0.2.1 改了提示词变量的注册范围:agent-loop 只注册 `provider` / `model`,**不再注册 `cwd`**。而 1.1.72 的 `lib/identity.js` 会无条件把 `deployment:persona-suffix` 换成 `Your working directory is {{cwd}}.`。结果是**每一轮对话在发出模型请求之前**就抛:
  13. ```
  14. unknown prompt variable "[cwd]" in section "deployment:persona-suffix";
  15. registered variables: provider, model
  16. ```
  17. 补丁面板这时是全绿的,因为崩点在提示词组装,不在补丁。
  18. ## 修了什么
  19. 对应上游 issue:[#114](https://github.com/YuJunZhiXue/dsh-purge/issues/114)、[#126](https://github.com/YuJunZhiXue/dsh-purge/issues/126)、[#136](https://github.com/YuJunZhiXue/dsh-purge/issues/136)、[#132](https://github.com/YuJunZhiXue/dsh-purge/issues/132)、[#119](https://github.com/YuJunZhiXue/dsh-purge/issues/119)、[#127](https://github.com/YuJunZhiXue/dsh-purge/issues/127)、[#121](https://github.com/YuJunZhiXue/dsh-purge/issues/121)。
  20. | 问题 | 根因 | 修法 |
  21. |---|---|---|
  22. | **#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` 强制 |
  23. | 同一 bug 的第二入口 | 插件自己的 `cordis.patch.yml` 里也写着 `personaSuffix: ... {{cwd}}.` | 改成 `personaSuffix: ""`,后缀统一由 identity 层决定 |
  24. | **#132** 应用后「清洗没有写进全部宿主,已取消重启」、`#40` 落成 skipped | 0.2.1 的 `system-prompt` 在 assemble 后新增 `requiredContexts` 过滤,旧 pattern 全不命中 | patch `#40` 增加 0.2.1 形状的 pattern + replacement,保留 `requiredContexts` 语义 |
  25. | **#119** 桌面端点「应用」后 `dsh: fatal load failure` | `desktop.js` 同步函数调 async `atomicCopyFile()` 没 `await`,Node 24 升级成 uncaughtException | 函数改 async、补 `await`,`core.js` / `index.js` 调用点同步 |
  26. | **#127 / #106** 应用后一份 `.bak` 都没有,还原/卸载失效 | `HOST_SYNC` 白名单漏 `closeSync` → `hostFs.closeSync` 未定义 → 占位句柄泄漏 → EPERM 静默失败 | 白名单补 `closeSync / fsyncSync / truncateSync / writeSync / futimesSync / utimesSync` |
  27. | **#121** Ctrl+Enter 插话静默失效 | 1.1.71 的 `#86` 把 `case "steer"` 改成 `followup`,与 `steer()` 的 next-step 冲突 | 1.1.72 已修正为 `agent.steer`;本版在真机确认落盘 |
  28. | 红队预设注册失败(社区 fork 的修法) | `presets/redteam/agent.cordis.yml` 的 `toolFilter.deny` 列了未注册的 `workflow / ralph`,`tools.restrict()` 直接抛 `unknown global tool` | 移除 `toolFilter`,子代理隔离改由 `maxDepth: 1` 保证 |
  29. **未处理**:上游 #133(Windows 桌面换包助手杀自己)属 Electron/Windows 路径,macOS 不复现,未改动;上游 #30(system section 过滤影响项目约定)属行为争议,不在适配范围。
  30. ## 安装
  31. ### 方式一:一键脚本(macOS,web profile)
  32. ```sh
  33. curl -fsSL https://raw.githubusercontent.com/evilevil/dsh-purge-021rc2/main/scripts/install.sh | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 46 on GitHub
  34. ```
  35. 脚本会:备份现有插件目录 → 解包本仓库发行版 → 写入 `installed-rev` / `applied.json` 戳(避免启动时误判版本落后而反复重打)。
  36. ### 方式二:手动
  37. ```sh
  38. V=1.1.72-dsh021rc2.4
  39. curl -fsSLO https://github.com/evilevil/dsh-purge-021rc2/releases/download/v$V/dsh-purge-$V.tgz
  40. curl -fsSLO https://github.com/evilevil/dsh-purge-021rc2/releases/download/v$V/SHA256SUMS.txt
  41. shasum -a 256 -c SHA256SUMS.txt
  42. rm -rf "$DSH_HOME/profiles/web/node_modules/dsh-purge"
  43. mkdir -p "$DSH_HOME/profiles/web/node_modules/dsh-purge"
  44. tar xzf dsh-purge-$V.tgz -C "$DSH_HOME/profiles/web/node_modules/dsh-purge" --strip-components=1
  45. ```
  46. ### 方式三:写进 profile 依赖
  47. ```json
  48. "dsh-purge": "https://github.com/evilevil/dsh-purge-021rc2/releases/download/v1.1.72-dsh021rc2.4/dsh-purge-1.1.72-dsh021rc2.4.tgz"
  49. ```
  50. ## 装完怎么用
  51. 1. 完全退出并重开 DSH(补丁改的是已加载的 JS,不重启不生效);
  52. 2. 左侧栏 **Purge** → 状态页 → **应用**;
  53. 3. 成功会自动重启;重启后新开一轮对话,注入才进当前会话;
  54. 4. 面板应显示 **69 个补丁行 / 0 pending**,`#40 / #85 / #86 / #87–#92` 全绿。
  55. 想确认真的注入了:随便问一句「你是谁」,回答应该来自 `~/.dsh/prompt-inject.md` 的人格,而不是官方自我介绍。
  56. ## 验证
  57. 仓库自带三组离线测试,不依赖网络:
  58. ```sh
  59. node test/identity.test.mjs # 5 项:{{cwd}} 能力探测与降级
  60. node test/patches.test.mjs # 5 项:#40 命中 0.2.1 形状、#86 steer、#119/#127 静态断言
  61. node test/sandbox-apply.mjs # 把宿主目标文件复制到 /tmp 跑全量 apply
  62. ```
  63. 真机结果(macOS / dsh 0.2.1-rc.2 / web profile):
  64. ```
  65. 应用前:59/86 applied,11 pending,#40 skipped
  66. 应用后:70/86 applied,0 pending,#40 / #85 / #86 / #87–#92 applied
  67. hostCleanMarkersPresent === true
  68. hostPromptKeepsInject === true
  69. ```
  70. ## 与上游的关系
  71. - 代码基座:`YuJunZhiXue/dsh-purge` master `1.1.72`(MIT)
  72. - 原作者:**小杨 / [YuJunZhiXue](https://github.com/YuJunZhiXue/dsh-purge)**
  73. - 本仓库:社区适配分支,只做 0.2.1-rc.2 兼容修复,不改变产品行为与提示词内容
  74. - 上游原始 README 保留在 [`upstream-README.md`](upstream-README.md)、[`upstream-README.zh-CN.md`](upstream-README.zh-CN.md)、[`upstream-README.en.md`](upstream-README.en.md)
  75. - 依照上游《署名要求》:**借用名称、思路、代码或提示词必须署名并写明来源仓库** —— 本仓库保留 MIT 许可证、原作者版权声明,并在 README 与本说明中明确标注来源。二次分发请同样保留。
  76. ## 已知限制
  77. - 只验证了 **web profile + 官方桌面 0.2.1-rc.2 的代码形状**;0.2.0-rc.2 逻辑上兼容但未逐项回归。
  78. - 上游停止维护意味着 dsh 再改宿主结构时,补丁锚点需要重新对齐;欢迎 issue / PR。
  79. - `shim 目录: 未定位` 在 npx 安装下是正常现象(没有全局 `dsh` 启动器),不影响功能。
  80. - 本仓库不提供官方背书,使用风险自负;破甲类插件请只在自有环境做安全研究。
  81. ## 维护与发布
  82. 上游停更后,这个仓库自己发版,流程很短:
  83. 1. 改代码,同步改 `package.json` 的 `version`(例如 `1.1.72-dsh021rc2.4`)与 `CHANGELOG.md`;
  84. 2. 跑一遍离线测试:
  85. ```sh
  86. node test/identity.test.mjs && node test/patches.test.mjs
  87. ```
  88. 3. 打 tag 推上去,CI 会自动 `npm pack` + 生成 `SHA256SUMS.txt` 并发 Release:
  89. ```sh
  90. git tag v1.1.72-dsh021rc2.4 && git push origin v1.1.72-dsh021rc2.4
  91. ```
  92. 4. 本地升级:`PURGE_VERSION=<新版本> sh scripts/install.sh`
  93. 宿主再升级导致补丁锚点漂移时,优先跑 `test/sandbox-apply.mjs` 看是哪几条 pattern 不命中,再对着真实的 `@deepseek-ai/*` 源码补 pattern。
  94. ## License
  95. MIT。原始版权 `Copyright (c) 2026 小杨`,本仓库修改部分 `Copyright (c) 2026 evilevil`。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.