From 5e757260a0be055892b48ec520d451cc82e1c191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AB=E6=88=91=E5=B0=8F=E6=9D=A8=E5=90=8C=E5=AD=A6?= Date: Sun, 11 Oct 2026 19:09:54 +0800 Subject: [PATCH] =?UTF-8?q?release:=201.1.71=20=E6=94=B6=E5=9B=9E=20#86=20?= =?UTF-8?q?steer=20=E8=AF=AF=E4=BC=A4=EF=BC=8C=E4=BF=AE=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E8=87=AA=E9=94=81=E4=B8=8E=E5=90=AF=E7=94=A8=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UI 队列 steer 仍走 followup;公共 steer() 回到 next-step。installed-rev 跨版本刷新 apply 占位。#88 给现行 renderedPrompt 锚点补标记。发版前检查入口语法。 Co-authored-by: Cursor --- .github/workflows/release.yml | 7 +++++++ README.md | 4 ++-- README.zh-CN.md | 4 ++-- lib/core.js | 39 ++++++++++++++++++++++++++++++++--- lib/reapply.js | 25 +++++++++++++++++++--- package.json | 2 +- release-notes.md | 18 ++++++++++++++++ 7 files changed, 88 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac05c6f..62217e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,13 @@ jobs: with: fetch-depth: 0 + - name: Syntax-check plugin entry + run: | + node --check lib/index.js + node --check lib/core.js + node --check lib/reapply.js + node --input-type=module -e "import './lib/index.js'" + - name: Publish GitHub Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 6369ead..43ae748 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)

-

Version 1.1.70

+

Version 1.1.71

DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required. @@ -161,7 +161,7 @@ Hub one-click on [dsh-plugin.org](https://dsh-plugin.org/plugins/yujunzhixue/dsh For the desktop client you can also click the button (`dsh://` deep link):

- Install in desktop client + Install in desktop client

### After the command: three steps diff --git a/README.zh-CN.md b/README.zh-CN.md index b1effab..440a7d3 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -4,7 +4,7 @@

⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)

-

Version 1.1.70

+

Version 1.1.71

DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分 @@ -165,7 +165,7 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 桌面客户端也可以点按钮(`dsh://` 唤起):

- 唤起客户端一键安装 + 唤起客户端一键安装

### 装完都要做这三步 diff --git a/lib/core.js b/lib/core.js index 7f7ae5a..c82b473 100644 --- a/lib/core.js +++ b/lib/core.js @@ -5521,7 +5521,7 @@ const NEW_TOOL_PATCHES = [ name: "SESSION_STEER_ALWAYS_FOLLOWUP", layer: "代码", layer_en: "Code", - desc: "steer 与队列 steer 一律 next-turn:立刻发第二轮不再进同一轮 next-step", + desc: "UI 队列 steer 走 followup/next-turn;公共 steer() 保持 next-step,send_message 仍下一步插入", file: ["api-session-controller", "agent-loop"], optional: true, skipIfMarked: true, @@ -5538,6 +5538,17 @@ const NEW_TOOL_PATCHES = [ "\t\t\t\tagent.followup(message); // [dsh-purge-86] queue steer → next-turn\n" + "\t\t\t\tbreak;", }, + { + // 收回 1.1.69 误改的公共 steer():send_message / 子代理投递仍要 next-step。 + pattern: + "\tsteer(input) {\n" + + "\t\tthis.send(input, \"next-turn\", true); // [dsh-purge-86] user steer always next-turn\n" + + "\t}", + replace: + "\tsteer(input) {\n" + + "\t\tthis.send(input, \"next-step\", true); // [dsh-purge-86] steer() stays next-step for send_message\n" + + "\t}", + }, { pattern: "\tsteer(input) {\n" + @@ -5545,11 +5556,12 @@ const NEW_TOOL_PATCHES = [ "\t}", replace: "\tsteer(input) {\n" + - "\t\tthis.send(input, \"next-turn\", true); // [dsh-purge-86] user steer always next-turn\n" + + "\t\tthis.send(input, \"next-step\", true); // [dsh-purge-86] steer() stays next-step for send_message\n" + "\t}", }, ], - markers: ["[dsh-purge-86]"], + forbid: ["[dsh-purge-86] user steer always next-turn"], + markers: ["[dsh-purge-86] steer() stays next-step"], }, { id: 87, @@ -5700,6 +5712,27 @@ const NEW_TOOL_PATCHES = [ "\t\t\tsystem = dshPurgeHung + (system ? \"\\n\\n\" + system : \"\"); // [dsh-purge-87] hang needle uses LF\n" + "\t\t}", }, + { + // 现行 #87 已写出 AND 头尾,只补 #88 标记,避免 0.2 renderedPrompt 宿主一直 pending。 + pattern: + "\t\tif (dshPurgeHung && !(dshPurgeTail && dshPurgeNorm.includes(dshPurgeTail) && dshPurgeHead && dshPurgeNorm.includes(dshPurgeHead))) {\n" + + "\t\t\trenderedPrompt = dshPurgeHung + (renderedPrompt ? \"\\n\\n\" + renderedPrompt : \"\"); // [dsh-purge-87] hang needle uses LF\n" + + "\t\t}", + replace: + "\t\tif (dshPurgeHung && !(dshPurgeTail && dshPurgeNorm.includes(dshPurgeTail) && dshPurgeHead && dshPurgeNorm.includes(dshPurgeHead))) { // [dsh-purge-88]\n" + + "\t\t\trenderedPrompt = dshPurgeHung + (renderedPrompt ? \"\\n\\n\" + renderedPrompt : \"\"); // [dsh-purge-87] hang needle uses LF\n" + + "\t\t}", + }, + { + pattern: + "\t\tif (dshPurgeHung && !(dshPurgeTail && dshPurgeNorm.includes(dshPurgeTail) && dshPurgeHead && dshPurgeNorm.includes(dshPurgeHead))) {\n" + + "\t\t\tsystem = dshPurgeHung + (system ? \"\\n\\n\" + system : \"\"); // [dsh-purge-87] hang needle uses LF\n" + + "\t\t}", + replace: + "\t\tif (dshPurgeHung && !(dshPurgeTail && dshPurgeNorm.includes(dshPurgeTail) && dshPurgeHead && dshPurgeNorm.includes(dshPurgeHead))) { // [dsh-purge-88]\n" + + "\t\t\tsystem = dshPurgeHung + (system ? \"\\n\\n\" + system : \"\"); // [dsh-purge-87] hang needle uses LF\n" + + "\t\t}", + }, ], markers: ["[dsh-purge-88]"], }, diff --git a/lib/reapply.js b/lib/reapply.js index 9811528..0f6cfd9 100644 --- a/lib/reapply.js +++ b/lib/reapply.js @@ -56,12 +56,24 @@ function isApplyPlaceholder(sha) { return text.startsWith("apply:") || text === "applied"; } +function applyPlaceholderVersion(sha) { + const m = String(sha || "").trim().match(/^apply:(.+)$/); + return m ? m[1] : ""; +} + +function refreshStaleApplyPlaceholder(sha) { + const ver = pluginVersion(); + const oldVer = applyPlaceholderVersion(sha); + if (oldVer && ver && oldVer !== ver) return `apply:${ver}`; + return String(sha || "").trim(); +} + /** 手动应用未必写过 installed-rev;空 sha 会让 settle 永远判未对齐并无限重启。 */ export function resolveApplySha(explicit) { const wanted = String(explicit == null ? "" : explicit).trim(); - if (wanted) return wanted; + if (wanted) return refreshStaleApplyPlaceholder(wanted) || wanted; const rev = installedRev(); - if (rev) return rev; + if (rev) return refreshStaleApplyPlaceholder(rev) || rev; const ver = pluginVersion(); return ver ? `apply:${ver}` : "applied"; } @@ -228,7 +240,14 @@ export function healEmptyAppliedStamp() { /** 安装后还没有 installed-rev 时先落盘占位(tarball / 手动应用常见)。 */ export function ensureInstalledRevSeed() { const current = installedRev(); - if (current) return current; + if (current) { + const next = refreshStaleApplyPlaceholder(current); + if (next && next !== current) { + writeInstalledRev(next); + return next; + } + return current; + } const stamp = readAppliedStamp(); if (stamp?.sha) { writeInstalledRev(stamp.sha); diff --git a/package.json b/package.json index c623860..ccd0712 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-purge", - "version": "1.1.70", + "version": "1.1.71", "description": "DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分", "type": "module", "main": "lib/index.js", diff --git a/release-notes.md b/release-notes.md index 460be64..66f25ca 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,3 +1,21 @@ +# 1.1.71 + +## 中文 + +- 版本 **1.1.71**。 +- 修复 1.1.70 的 `??` 混 `||`:插件启用时 `failed to import`(桌面 / Web 同一入口)。 +- #86 只改 UI 队列 steer → followup;公共 `steer()` 收回 next-step,代理间 `send_message` 仍下一步插入。 +- `installed-rev` 跨版本不再沿用旧 `apply:x.y.z`。#88 按现行 `renderedPrompt` / 旧 `system` 锚点打中的那条落标记。 +- 发版前 `node --check` 主入口,避免再把语法错误打进 Release。 + +## English + +- **1.1.71**. +- Fix 1.1.70 `??` mixed with `||`: enable failed to import on desktop and web. +- #86 keeps UI queue steer → followup. Public `steer()` is next-step again so `send_message` inserts at the next step. +- Stale `apply:x.y.z` in `installed-rev` refreshes across versions. #88 marks the host anchor that actually exists (`renderedPrompt` or `system`). +- Release CI syntax-checks the plugin entry. + # 1.1.70 ## 中文