mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-12-01 04:00:22 +08:00
release: 1.1.71 收回 #86 steer 误伤,修升级自锁与启用失败
UI 队列 steer 仍走 followup;公共 steer() 回到 next-step。installed-rev 跨版本刷新 apply 占位。#88 给现行 renderedPrompt 锚点补标记。发版前检查入口语法。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
e9eb980466
commit
f353fec04a
7 files changed
+88
-11
No files matched your search
@@ -21,6 +21,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Publish GitHub Release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<h1 align="center">⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)</h1>
|
<h1 align="center">⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)</h1>
|
||||||
|
|
||||||
<p align="center"><strong>Version 1.1.70</strong></p>
|
<p align="center"><strong>Version 1.1.71</strong></p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<em>DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required.</em>
|
<em>DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required.</em>
|
||||||
@@ -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):
|
For the desktop client you can also click the button (`dsh://` deep link):
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.70&repo=YuJunZhiXue%2Fdsh-purge&permissions=%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%2C%E6%9C%AC%E6%9C%BA%E8%A1%A5%E4%B8%81%2C%E8%AE%BE%E7%BD%AE%E9%A1%B5&downloadUrl=https%3A%2F%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>Install in desktop client</strong></a>
|
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.71&repo=YuJunZhiXue%2Fdsh-purge&permissions=%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%2C%E6%9C%AC%E6%9C%BA%E8%A1%A5%E4%B8%81%2C%E8%AE%BE%E7%BD%AE%E9%A1%B5&downloadUrl=https%3A%2F%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>Install in desktop client</strong></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### After the command: three steps
|
### After the command: three steps
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<h1 align="center">⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)</h1>
|
<h1 align="center">⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)</h1>
|
||||||
|
|
||||||
<p align="center"><strong>Version 1.1.70</strong></p>
|
<p align="center"><strong>Version 1.1.71</strong></p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<em>DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分</em>
|
<em>DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分</em>
|
||||||
@@ -165,7 +165,7 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审
|
|||||||
桌面客户端也可以点按钮(`dsh://` 唤起):
|
桌面客户端也可以点按钮(`dsh://` 唤起):
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.70&repo=YuJunZhiXue%2Fdsh-purge&permissions=%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%2C%E6%9C%AC%E6%9C%BA%E8%A1%A5%E4%B8%81%2C%E8%AE%BE%E7%BD%AE%E9%A1%B5&downloadUrl=https%3A%2F%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>唤起客户端一键安装</strong></a>
|
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.71&repo=YuJunZhiXue%2Fdsh-purge&permissions=%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%2C%E6%9C%AC%E6%9C%BA%E8%A1%A5%E4%B8%81%2C%E8%AE%BE%E7%BD%AE%E9%A1%B5&downloadUrl=https%3A%2F%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>唤起客户端一键安装</strong></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### 装完都要做这三步
|
### 装完都要做这三步
|
||||||
|
|||||||
+36
-3
@@ -5521,7 +5521,7 @@ const NEW_TOOL_PATCHES = [
|
|||||||
name: "SESSION_STEER_ALWAYS_FOLLOWUP",
|
name: "SESSION_STEER_ALWAYS_FOLLOWUP",
|
||||||
layer: "代码",
|
layer: "代码",
|
||||||
layer_en: "Code",
|
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"],
|
file: ["api-session-controller", "agent-loop"],
|
||||||
optional: true,
|
optional: true,
|
||||||
skipIfMarked: 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\tagent.followup(message); // [dsh-purge-86] queue steer → next-turn\n" +
|
||||||
"\t\t\t\tbreak;",
|
"\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:
|
pattern:
|
||||||
"\tsteer(input) {\n" +
|
"\tsteer(input) {\n" +
|
||||||
@@ -5545,11 +5556,12 @@ const NEW_TOOL_PATCHES = [
|
|||||||
"\t}",
|
"\t}",
|
||||||
replace:
|
replace:
|
||||||
"\tsteer(input) {\n" +
|
"\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}",
|
"\t}",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
markers: ["[dsh-purge-86]"],
|
forbid: ["[dsh-purge-86] user steer always next-turn"],
|
||||||
|
markers: ["[dsh-purge-86] steer() stays next-step"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 87,
|
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\tsystem = dshPurgeHung + (system ? \"\\n\\n\" + system : \"\"); // [dsh-purge-87] hang needle uses LF\n" +
|
||||||
"\t\t}",
|
"\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]"],
|
markers: ["[dsh-purge-88]"],
|
||||||
},
|
},
|
||||||
|
|||||||
+22
-3
@@ -56,12 +56,24 @@ function isApplyPlaceholder(sha) {
|
|||||||
return text.startsWith("apply:") || text === "applied";
|
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 永远判未对齐并无限重启。 */
|
/** 手动应用未必写过 installed-rev;空 sha 会让 settle 永远判未对齐并无限重启。 */
|
||||||
export function resolveApplySha(explicit) {
|
export function resolveApplySha(explicit) {
|
||||||
const wanted = String(explicit == null ? "" : explicit).trim();
|
const wanted = String(explicit == null ? "" : explicit).trim();
|
||||||
if (wanted) return wanted;
|
if (wanted) return refreshStaleApplyPlaceholder(wanted) || wanted;
|
||||||
const rev = installedRev();
|
const rev = installedRev();
|
||||||
if (rev) return rev;
|
if (rev) return refreshStaleApplyPlaceholder(rev) || rev;
|
||||||
const ver = pluginVersion();
|
const ver = pluginVersion();
|
||||||
return ver ? `apply:${ver}` : "applied";
|
return ver ? `apply:${ver}` : "applied";
|
||||||
}
|
}
|
||||||
@@ -228,7 +240,14 @@ export function healEmptyAppliedStamp() {
|
|||||||
/** 安装后还没有 installed-rev 时先落盘占位(tarball / 手动应用常见)。 */
|
/** 安装后还没有 installed-rev 时先落盘占位(tarball / 手动应用常见)。 */
|
||||||
export function ensureInstalledRevSeed() {
|
export function ensureInstalledRevSeed() {
|
||||||
const current = installedRev();
|
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();
|
const stamp = readAppliedStamp();
|
||||||
if (stamp?.sha) {
|
if (stamp?.sha) {
|
||||||
writeInstalledRev(stamp.sha);
|
writeInstalledRev(stamp.sha);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dsh-purge",
|
"name": "dsh-purge",
|
||||||
"version": "1.1.70",
|
"version": "1.1.71",
|
||||||
"description": "DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分",
|
"description": "DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
|||||||
@@ -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
|
# 1.1.70
|
||||||
|
|
||||||
## 中文
|
## 中文
|
||||||
|
|||||||
Reference in new issue
Block a user