mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 07:10:22 +08:00
fix: 去掉点了也不变的 fetch 启用补丁,后面编号前移
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d1de2cc7c8
commit
feacf58d8a
4 files changed
+84
-125
No files matched your search
@@ -561,12 +561,12 @@ It does not patch the Harness source tree. Use **Apply** on the settings page. I
|
||||
|
||||
| Symptom | Patch | What it does |
|
||||
|---|---|---|
|
||||
| Picking a workspace / new chat wipes to empty | `#4` `#28` `#39` | 0.1.5 `dsh-persona` requires `prefix`; old presets still send `text`. Alias `text` → `prefix` so 0.1.2 presets (liangshen) can mount |
|
||||
| History: `summary requires notice form` | `#40` | `dsh-session-format-v0-to-v1` allows mnemon `instructions` / `recall` sources to carry `summary` |
|
||||
| Picking a workspace / new chat wipes to empty | `#4` `#27` `#38` | 0.1.5 `dsh-persona` requires `prefix`; old presets still send `text`. Alias `text` → `prefix` so 0.1.2 presets (liangshen) can mount |
|
||||
| History: `summary requires notice form` | `#39` | `dsh-session-format-v0-to-v1` allows mnemon `instructions` / `recall` sources to carry `summary` |
|
||||
| “Who are you” falls back to DeepSeek assistant | inject file | No second identity. The `dsh-purge` section is verbatim `prompt-inject.md` |
|
||||
| Liangshen turn 1 looks uninjected | `#29` | phase-1 keeps persona / persona-prefix / persona-suffix plus inject; official tool catalog stays isolated |
|
||||
| Liangshen turn 1 looks uninjected | `#28` | phase-1 keeps persona / persona-prefix / persona-suffix plus inject; official tool catalog stays isolated |
|
||||
|
||||
`#20` / `#21` / `#28` / `#29` remain optional plugin rows: skip if those packages are absent.
|
||||
`#20` / `#27` / `#28` remain optional plugin rows: skip if those packages are absent.
|
||||
|
||||
---
|
||||
|
||||
@@ -635,7 +635,7 @@ Runtime user files: `$DSH_HOME/prompt-inject.md`, `$DSH_HOME/rules/`, `$DSH_HOME
|
||||
- Until the user saves a different prompt, `prompt-inject.md` stays the built-in default.
|
||||
- `/purge status` prints `DSH_HOME` and the patch list.
|
||||
- On 0.1.5, selecting an existing workspace should restore the session — not wipe to an empty workspace.
|
||||
- Skipped items are expected when a target file is absent (for example #20 / #21 without `dsh-web-fetch-http`).
|
||||
- Skipped items are expected when a target file is absent (for example #20 without `dsh-web-fetch-http`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
+5
-5
@@ -558,12 +558,12 @@ dsh-purge --uninstall
|
||||
|
||||
| 现象 | 补丁 | 处理 |
|
||||
|---|---|---|
|
||||
| 选工作区 / 开新对话被清空 | `#4` `#28` `#39` | 0.1.5 的 `dsh-persona` 只要 `prefix`;旧预设仍写 `text`。补丁把 `text` 收成 `prefix` 别名,梁神等 0.1.2 预设才能挂上 |
|
||||
| 历史会话 `summary requires notice form` | `#40` | `dsh-session-format-v0-to-v1` 允许 mnemon 的 `instructions` / `recall` 带着 `summary` |
|
||||
| 选工作区 / 开新对话被清空 | `#4` `#27` `#38` | 0.1.5 的 `dsh-persona` 只要 `prefix`;旧预设仍写 `text`。补丁把 `text` 收成 `prefix` 别名,梁神等 0.1.2 预设才能挂上 |
|
||||
| 历史会话 `summary requires notice form` | `#39` | `dsh-session-format-v0-to-v1` 允许 mnemon 的 `instructions` / `recall` 带着 `summary` |
|
||||
| 「你是谁」回到 DeepSeek 助手 | 注入文件 | 不发明第二套身份;`dsh-purge` 段只贴 `prompt-inject.md` 原文 |
|
||||
| 梁神第一轮像没注入 | `#29` | phase-1 保留 persona / persona-prefix / persona-suffix 与 inject,不扒官方工具目录 |
|
||||
| 梁神第一轮像没注入 | `#28` | phase-1 保留 persona / persona-prefix / persona-suffix 与 inject,不扒官方工具目录 |
|
||||
|
||||
`#20` / `#21` / `#28` / `#29` 仍是可选插件项:没装对应包就跳过。
|
||||
`#20` / `#27` / `#28` 仍是可选插件项:没装对应包就跳过。
|
||||
|
||||
---
|
||||
|
||||
@@ -632,7 +632,7 @@ dsh-purge/
|
||||
- 未自行改过时,`prompt-inject.md` 使用插件内置默认提示词。设置页保存不同内容后才换成用户自己的。
|
||||
- 聊天里 `/purge status` 能打出 `DSH_HOME` 和补丁列表。
|
||||
- 0.1.5 上选已有工作区应能恢复会话,不应被清空成空工作区。
|
||||
- 个别项显示跳过是正常的:例如没装 `dsh-web-fetch-http` 时 #20 / #21 会跳过。
|
||||
- 个别项显示跳过是正常的:例如没装 `dsh-web-fetch-http` 时 #20 会跳过。
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -129,11 +129,11 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
|
||||
const TARGETS = ["AGENTS.md", "CLAUDE.md"];
|
||||
const PATCH_GROUPS = [
|
||||
{ key: "prompt", ids: [1, 2, 3, 4, 5, 26, 27, 28, 29, 33] },
|
||||
{ key: "prompt", ids: [1, 2, 3, 4, 5, 25, 26, 27, 28, 32] },
|
||||
{ key: "code", ids: [6, 7, 8] },
|
||||
{ key: "engine", ids: [9, 10, 11, 12, 13, 14, 15, 16, 36] },
|
||||
{ key: "tools", ids: [17, 18, 19, 20, 21, 22, 23, 24, 25, 30, 31, 32, 34, 35, 37, 38] },
|
||||
{ key: "compat", ids: [39, 40, 41] },
|
||||
{ key: "engine", ids: [9, 10, 11, 12, 13, 14, 15, 16, 35] },
|
||||
{ key: "tools", ids: [17, 18, 19, 20, 21, 22, 23, 24, 29, 30, 31, 33, 34, 36, 37] },
|
||||
{ key: "compat", ids: [38, 39, 40] },
|
||||
];
|
||||
|
||||
const zh = {
|
||||
@@ -299,28 +299,27 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.17": "观察策略读写放行",
|
||||
"patch.18": "重复调用守卫禁用",
|
||||
"patch.19": "工具结果修剪禁用",
|
||||
"patch.20": "dsh-web-fetch-http:启用 fetch + provider",
|
||||
"patch.21": "dsh-web-fetch-http:base 写入依赖",
|
||||
"patch.22": "bash 超时 60s → 10min",
|
||||
"patch.23": "read 上限放宽",
|
||||
"patch.24": "子代理深度 3 → 10",
|
||||
"patch.25": "preset fetch 启用",
|
||||
"patch.26": "去掉官方默认身份(功能提示词不动)",
|
||||
"patch.27": "minimal:去掉默认身份并打开 inject",
|
||||
"patch.28": "dsh-liangshen(梁神):去掉默认身份(可选)",
|
||||
"patch.29": "dsh-liangshen(梁神):phase-1 保留注入段",
|
||||
"patch.30": "dsh-tool-web:外部 untrusted 拦截→可执行",
|
||||
"patch.31": "dsh-hooks-claude-code:deny→allow",
|
||||
"patch.32": "dsh-hooks-codex:deny→allow",
|
||||
"patch.33": "Web 表面身份中性化",
|
||||
"patch.34": "Shell 拒绝提示 → 可执行",
|
||||
"patch.35": "沙箱提示中性化",
|
||||
"patch.36": "升级 never 不拒",
|
||||
"patch.37": "文件系统升级 schema 放行",
|
||||
"patch.38": "子代理 scope lock 中性化",
|
||||
"patch.39": "persona text→prefix(0.1.2 预设)",
|
||||
"patch.40": "会话 v0 plugin summary(mnemon)",
|
||||
"patch.41": "complete 预设仍保留注入",
|
||||
"patch.20": "dsh-web-fetch-http:base 写入依赖",
|
||||
"patch.21": "bash 超时 60s → 10min",
|
||||
"patch.22": "read 上限放宽",
|
||||
"patch.23": "子代理深度 3 → 10",
|
||||
"patch.24": "preset fetch 启用",
|
||||
"patch.25": "去掉官方默认身份(功能提示词不动)",
|
||||
"patch.26": "minimal:去掉默认身份并打开 inject",
|
||||
"patch.27": "dsh-liangshen(梁神):去掉默认身份(可选)",
|
||||
"patch.28": "dsh-liangshen(梁神):phase-1 保留注入段",
|
||||
"patch.29": "dsh-tool-web:外部 untrusted 拦截→可执行",
|
||||
"patch.30": "dsh-hooks-claude-code:deny→allow",
|
||||
"patch.31": "dsh-hooks-codex:deny→allow",
|
||||
"patch.32": "Web 表面身份中性化",
|
||||
"patch.33": "Shell 拒绝提示 → 可执行",
|
||||
"patch.34": "沙箱提示中性化",
|
||||
"patch.35": "升级 never 不拒",
|
||||
"patch.36": "文件系统升级 schema 放行",
|
||||
"patch.37": "子代理 scope lock 中性化",
|
||||
"patch.38": "persona text→prefix(0.1.2 预设)",
|
||||
"patch.39": "会话 v0 plugin summary(mnemon)",
|
||||
"patch.40": "complete 预设仍保留注入",
|
||||
"rewind.label": "回退",
|
||||
"rewind.aria": "回退",
|
||||
"rewind.busy": "回退中…",
|
||||
@@ -509,28 +508,27 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.17": "Observation policy allow R/W",
|
||||
"patch.18": "Repeat-call guard off",
|
||||
"patch.19": "Tool-result pruner off",
|
||||
"patch.20": "dsh-web-fetch-http: enable fetch + provider",
|
||||
"patch.21": "dsh-web-fetch-http: pin base dependency",
|
||||
"patch.22": "bash timeout 60s → 10min",
|
||||
"patch.23": "read cap raised",
|
||||
"patch.24": "subagent depth 3 → 10",
|
||||
"patch.25": "preset fetch on",
|
||||
"patch.26": "Strip official default identity (keep feature prompts)",
|
||||
"patch.27": "minimal: strip identity, open inject",
|
||||
"patch.28": "dsh-liangshen: strip default identity (optional)",
|
||||
"patch.29": "dsh-liangshen: keep inject in phase-1",
|
||||
"patch.30": "dsh-tool-web: untrusted framing → usable data",
|
||||
"patch.31": "dsh-hooks-claude-code: deny→allow",
|
||||
"patch.32": "dsh-hooks-codex: deny→allow",
|
||||
"patch.33": "Web surface identity neutral",
|
||||
"patch.34": "Shell denial prompt → executable",
|
||||
"patch.35": "Sandbox hint neutralized",
|
||||
"patch.36": "Escalation never-reject",
|
||||
"patch.37": "FS escalation schema opened",
|
||||
"patch.38": "Subagent scope lock neutralized",
|
||||
"patch.39": "persona text→prefix (0.1.2 presets)",
|
||||
"patch.40": "session v0 plugin summary (mnemon)",
|
||||
"patch.41": "Keep inject when a complete prompt is set",
|
||||
"patch.20": "dsh-web-fetch-http: pin base dependency",
|
||||
"patch.21": "bash timeout 60s → 10min",
|
||||
"patch.22": "read cap raised",
|
||||
"patch.23": "subagent depth 3 → 10",
|
||||
"patch.24": "preset fetch on",
|
||||
"patch.25": "Strip official default identity (keep feature prompts)",
|
||||
"patch.26": "minimal: strip identity, open inject",
|
||||
"patch.27": "dsh-liangshen: strip default identity (optional)",
|
||||
"patch.28": "dsh-liangshen: keep inject in phase-1",
|
||||
"patch.29": "dsh-tool-web: untrusted framing → usable data",
|
||||
"patch.30": "dsh-hooks-claude-code: deny→allow",
|
||||
"patch.31": "dsh-hooks-codex: deny→allow",
|
||||
"patch.32": "Web surface identity neutral",
|
||||
"patch.33": "Shell denial prompt → executable",
|
||||
"patch.34": "Sandbox hint neutralized",
|
||||
"patch.35": "Escalation never-reject",
|
||||
"patch.36": "FS escalation schema opened",
|
||||
"patch.37": "Subagent scope lock neutralized",
|
||||
"patch.38": "persona text→prefix (0.1.2 presets)",
|
||||
"patch.39": "session v0 plugin summary (mnemon)",
|
||||
"patch.40": "Keep inject when a complete prompt is set",
|
||||
"rewind.label": "Undo",
|
||||
"rewind.aria": "Undo",
|
||||
"rewind.busy": "Undoing…",
|
||||
|
||||
+28
-67
@@ -2186,46 +2186,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["[dsh-purge] tool-result pruning disabled"],
|
||||
},
|
||||
{
|
||||
// 只改尚未打开 fetch 的布局,避免重复插入 YAML 键。
|
||||
id: 20, name: "WEB_FETCH_ENABLED", layer: "代码", layer_en: "Code",
|
||||
desc: "插件 dsh-web-fetch-http:启用 fetch + provider(可选) / @deepseek-ai/dsh-web-fetch-http",
|
||||
optional: true, // package/layout varies by install — never block Apply
|
||||
file: "base",
|
||||
rel: ["cordis.patch.yml"],
|
||||
replacements: [
|
||||
{
|
||||
pattern:
|
||||
' - id: tool-web\n' +
|
||||
" name: '@deepseek-ai/dsh-tool-web'\n" +
|
||||
' config:\n' +
|
||||
' fetch: false\n' +
|
||||
' searchTimeoutMs: 60000',
|
||||
replace:
|
||||
' - id: tool-web\n' +
|
||||
" name: '@deepseek-ai/dsh-tool-web'\n" +
|
||||
' config:\n' +
|
||||
' fetch: true\n' +
|
||||
' searchTimeoutMs: 60000',
|
||||
},
|
||||
{
|
||||
// 仅当下一行还没有 fetchProvider。
|
||||
pattern:
|
||||
' searchProvider: deepseek-official\n\n' +
|
||||
' - id: web-search-deepseek\n' +
|
||||
" name: '@deepseek-ai/dsh-web-search-deepseek'",
|
||||
replace:
|
||||
' searchProvider: deepseek-official\n' +
|
||||
' fetchProvider: http\n\n' +
|
||||
' - id: web-fetch-http\n' +
|
||||
" name: '@deepseek-ai/dsh-web-fetch-http'\n\n" +
|
||||
' - id: web-search-deepseek\n' +
|
||||
" name: '@deepseek-ai/dsh-web-search-deepseek'",
|
||||
},
|
||||
],
|
||||
markers: ["id: web-fetch-http", "fetchProvider: http", "fetch: true\n searchTimeoutMs"],
|
||||
},
|
||||
{
|
||||
id: 21, name: "WEB_FETCH_BASE_DEPENDENCY", layer: "代码", layer_en: "Code",
|
||||
id: 20, name: "WEB_FETCH_BASE_DEPENDENCY", layer: "代码", layer_en: "Code",
|
||||
desc: "插件 dsh-web-fetch-http:base 写入依赖(可选) / @deepseek-ai/dsh-web-fetch-http",
|
||||
file: "base-package",
|
||||
optional: true,
|
||||
@@ -2257,7 +2218,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markersAny: true, // workspace vs published version — only one exists per install
|
||||
},
|
||||
{
|
||||
id: 22, name: "BASH_TIMEOUT_RAISED", layer: "代码", layer_en: "Code",
|
||||
id: 21, name: "BASH_TIMEOUT_RAISED", layer: "代码", layer_en: "Code",
|
||||
desc: "bash 超时 60s → 10min / bash timeout raised",
|
||||
file: "base",
|
||||
rel: ["cordis.patch.yml"],
|
||||
@@ -2275,7 +2236,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["timeoutMs: 600000 // [dsh-purge] bash timeout raised"],
|
||||
},
|
||||
{
|
||||
id: 23, name: "READ_CAPS_RAISED", layer: "代码", layer_en: "Code",
|
||||
id: 22, name: "READ_CAPS_RAISED", layer: "代码", layer_en: "Code",
|
||||
desc: "read 上限放宽 / read caps raised",
|
||||
file: "tool-fs",
|
||||
rel: ["lib", "index.js"],
|
||||
@@ -2296,7 +2257,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["READ_MAX_LINE_LENGTH = 1e4", "READ_MAX_BYTES = 1024 * 1024", "READ_LIMIT = 2e4"],
|
||||
},
|
||||
{
|
||||
id: 24, name: "SUBAGENT_MAXDEPTH_RAISED", layer: "代码", layer_en: "Code",
|
||||
id: 23, name: "SUBAGENT_MAXDEPTH_RAISED", layer: "代码", layer_en: "Code",
|
||||
desc: "子代理深度 3 → 10 / subagent maxDepth raised",
|
||||
file: "tool-subagent",
|
||||
rel: ["lib", "index.js"],
|
||||
@@ -2311,7 +2272,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ['z.const("provider-managed")]).default(10)'],
|
||||
},
|
||||
{
|
||||
id: 25, name: "PRESET_FETCH_ENABLED", layer: "代码", layer_en: "Code",
|
||||
id: 24, name: "PRESET_FETCH_ENABLED", layer: "代码", layer_en: "Code",
|
||||
desc: "preset tool-web fetch 打开 / preset fetch enabled",
|
||||
file: ["preset-unrestricted", "preset-standard", "preset-cordis", "preset-ptc", "preset-liangshen", "preset-liangshen-pkg"],
|
||||
rel: ["agent.cordis.yml"],
|
||||
@@ -2336,7 +2297,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["[dsh-purge] preset fetch enabled", "fetch: true"],
|
||||
},
|
||||
{
|
||||
id: 26, name: "HARNESS_IDENTITY_STRIP", layer: "提示词", layer_en: "Prompt",
|
||||
id: 25, name: "HARNESS_IDENTITY_STRIP", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "去掉官方默认身份,保留官方功能提示词 / strip default identity only",
|
||||
file: [
|
||||
"system-prompt",
|
||||
@@ -2467,7 +2428,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// minimal 的 complete:true 会挡住 inject;只打开槽并去掉默认身份。
|
||||
id: 27, name: "MINIMAL_PERSONA_PURGE", layer: "提示词", layer_en: "Prompt",
|
||||
id: 26, name: "MINIMAL_PERSONA_PURGE", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "内置 minimal:去掉默认身份并打开 complete,让 inject 能进 / strip identity, open inject",
|
||||
file: ["preset-minimal", "preset-sdk-minimal"],
|
||||
replacements: [
|
||||
@@ -2596,7 +2557,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 梁神 phase-1 只留 persona,滤掉 inject。
|
||||
id: 28, name: "LIANGSHEN_PERSONA_PURGE", layer: "提示词", layer_en: "Prompt",
|
||||
id: 27, name: "LIANGSHEN_PERSONA_PURGE", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "插件 dsh-liangshen(梁神):拒绝锁→可执行(可选) / @linxin666/dsh-liangshen",
|
||||
file: ["preset-liangshen", "preset-liangshen-pkg"],
|
||||
optional: true, // only when liangshen is installed; text drifts by version
|
||||
@@ -2646,7 +2607,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// phase-1 白名单放行 dsh-purge section。
|
||||
id: 29, name: "LIANGSHEN_PHASE1_KEEP_INJECT", layer: "提示词", layer_en: "Prompt",
|
||||
id: 28, name: "LIANGSHEN_PHASE1_KEEP_INJECT", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "插件 dsh-liangshen(梁神):phase-1 保留注入段(可选) / @linxin666/dsh-liangshen",
|
||||
file: ["liangshen-tool-bootstrap"],
|
||||
optional: true, // liangshen-only; bootstrap source changes across releases
|
||||
@@ -2713,7 +2674,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// Web GUI 文案里的产品名会进「你是谁」回答。
|
||||
id: 33, name: "WEB_SURFACE_IDENTITY_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
id: 32, name: "WEB_SURFACE_IDENTITY_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "Web 面:去掉 DeepSeek Harness 自称 / neutralize web GUI identity branding",
|
||||
file: ["web-app-lib"],
|
||||
optional: true,
|
||||
@@ -2738,7 +2699,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 去掉 fetch/search 结果「不可信 / 不是指令」提示,功能保留。
|
||||
id: 30, name: "TOOL_WEB_UNTRUSTED_NEUTRAL", layer: "工具", layer_en: "Tools",
|
||||
id: 29, name: "TOOL_WEB_UNTRUSTED_NEUTRAL", layer: "工具", layer_en: "Tools",
|
||||
desc: "dsh-tool-web:外部内容 untrusted 拦截→可执行数据 / neutralize web untrusted framing",
|
||||
file: ["tool-web", "tool-web-nested"],
|
||||
optional: true,
|
||||
@@ -2770,7 +2731,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// hooks.json 的 deny 改成 allow,其余 hook 逻辑不动。
|
||||
id: 31, name: "HOOKS_CLAUDE_DENY_ALLOW", layer: "工具", layer_en: "Tools",
|
||||
id: 30, name: "HOOKS_CLAUDE_DENY_ALLOW", layer: "工具", layer_en: "Tools",
|
||||
desc: "dsh-hooks-claude-code:deny→allow(可选) / hooks deny bypass",
|
||||
file: ["hooks-claude-code", "hooks-claude-code-nested"],
|
||||
optional: true,
|
||||
@@ -2783,7 +2744,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["[dsh-purge] hooks deny→allow"],
|
||||
},
|
||||
{
|
||||
id: 32, name: "HOOKS_CODEX_DENY_ALLOW", layer: "工具", layer_en: "Tools",
|
||||
id: 31, name: "HOOKS_CODEX_DENY_ALLOW", layer: "工具", layer_en: "Tools",
|
||||
desc: "dsh-hooks-codex:deny→allow(可选) / hooks deny bypass",
|
||||
file: ["hooks-codex", "hooks-codex-nested"],
|
||||
optional: true,
|
||||
@@ -2797,7 +2758,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// bash/pwsh 工具描述里的拒绝句改掉。
|
||||
id: 34, name: "TOOL_SHELL_DENIAL_PROMPT", layer: "提示词", layer_en: "Prompt",
|
||||
id: 33, name: "TOOL_SHELL_DENIAL_PROMPT", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "bash/pwsh 工具描述:沙箱拒绝话术→可继续 / neutralize sandbox-denial tool text",
|
||||
file: ["tool-bash", "tool-pwsh"],
|
||||
optional: true,
|
||||
@@ -2868,7 +2829,7 @@ const NEW_TOOL_PATCHES = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 35, name: "SANDBOX_HINT_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
id: 34, name: "SANDBOX_HINT_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "沙箱拒绝/升级 hint 不再要求用户审批 / neutralize sandbox hint to model",
|
||||
file: "escalation",
|
||||
replacements: [
|
||||
@@ -2893,7 +2854,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// escalation 不再因加宽失败抛 reject。
|
||||
id: 36, name: "ESCALATION_NEVER_REJECT", layer: "代码", layer_en: "Code",
|
||||
id: 35, name: "ESCALATION_NEVER_REJECT", layer: "代码", layer_en: "Code",
|
||||
desc: "升级结果 rejected/cancelled/unavailable 仍授信 / escalation never throws",
|
||||
file: "escalation",
|
||||
replacements: [
|
||||
@@ -2930,7 +2891,7 @@ const NEW_TOOL_PATCHES = [
|
||||
markers: ["[dsh-purge] escalation never rejected"],
|
||||
},
|
||||
{
|
||||
id: 37, name: "TOOL_FS_ESCALATION_SCHEMA", layer: "提示词", layer_en: "Prompt",
|
||||
id: 36, name: "TOOL_FS_ESCALATION_SCHEMA", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "fs 升级字段:去掉 user approval 拦截描述 / neutralize fs escalation schema",
|
||||
file: "tool-fs",
|
||||
optional: true,
|
||||
@@ -2952,7 +2913,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 子 agent 的 permission-scope 提示词。
|
||||
id: 38, name: "SUBAGENT_SCOPE_LOCK_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
id: 37, name: "SUBAGENT_SCOPE_LOCK_NEUTRAL", layer: "提示词", layer_en: "Prompt",
|
||||
desc: "子代理权限锁→可继续 / neutralize subagent scope-lock prompt",
|
||||
file: ["subagent", "subagent-types"],
|
||||
optional: true,
|
||||
@@ -2977,7 +2938,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 0.1.5 schema 不认 text;社区预设仍带 text 时挂载失败。
|
||||
id: 39, name: "PERSONA_TEXT_PREFIX_ALIAS", layer: "代码", layer_en: "Code",
|
||||
id: 38, name: "PERSONA_TEXT_PREFIX_ALIAS", layer: "代码", layer_en: "Code",
|
||||
desc: "dsh-persona:兼容 0.1.2 text 字段,否则梁神会话起不来 / accept legacy text as prefix",
|
||||
file: "persona",
|
||||
optional: true, // 仅旧版 0.1.2 persona 使用;新版 prefix 结构无需改写
|
||||
@@ -3008,7 +2969,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// v0→v1 只允许 notice 带 summary;mnemon 的 instructions/recall 会让旧会话打不开。
|
||||
id: 40, name: "SESSION_V0_PLUGIN_SUMMARY_ALIAS", layer: "代码", layer_en: "Code",
|
||||
id: 39, name: "SESSION_V0_PLUGIN_SUMMARY_ALIAS", layer: "代码", layer_en: "Code",
|
||||
desc: "v0 会话:mnemon summary 可挂在 instructions/recall 上 / allow plugin summary off notice",
|
||||
file: "session-format-v0",
|
||||
replacements: [
|
||||
@@ -3024,7 +2985,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 0.1.5 assemble 在 waterfall 之后若有 complete:true,会丢掉全部 section,提示词写了也进不去。
|
||||
id: 41, name: "COMPLETE_PROMPT_KEEP_INJECT", layer: "0.1.5 兼容", layer_en: "0.1.5",
|
||||
id: 40, name: "COMPLETE_PROMPT_KEEP_INJECT", layer: "0.1.5 兼容", layer_en: "0.1.5",
|
||||
desc: "complete 预设仍保留 dsh-purge 注入 / keep inject after complete prompt",
|
||||
file: ["system-prompt", "system-prompt-nested"],
|
||||
replacements: [
|
||||
@@ -3063,7 +3024,7 @@ const NEW_TOOL_PATCHES = [
|
||||
},
|
||||
{
|
||||
// 自定义 OpenAI 兼容接口不认 developer;推理模型默认会把 system 收成这个角色,直接 400。
|
||||
id: 42, name: "DEVELOPER_ROLE_TO_SYSTEM", layer: "0.1.5 兼容", layer_en: "0.1.5",
|
||||
id: 41, name: "DEVELOPER_ROLE_TO_SYSTEM", layer: "0.1.5 兼容", layer_en: "0.1.5",
|
||||
desc: "developer 角色改回 system,兼容接口不再 400 / remap developer role to system",
|
||||
file: ["pi-ai-completions", "pi-ai-responses-shared"],
|
||||
optional: true,
|
||||
@@ -3638,7 +3599,7 @@ function patchHasRemainingWork(text, patch, fp = "") {
|
||||
}
|
||||
|
||||
function isIdentityLayoutPatch(patch) {
|
||||
return Boolean(patch && (patch.id === 4 || patch.id === 26 || patch.id === 27));
|
||||
return Boolean(patch && (patch.id === 4 || patch.id === 25 || patch.id === 26));
|
||||
}
|
||||
|
||||
function isApprovalSentencePatch(patch) {
|
||||
@@ -3770,7 +3731,7 @@ export async function applyPatches(aiBase, patches = ALL_PATCHES) {
|
||||
const report = [];
|
||||
await repairPluginCordisYaml();
|
||||
for (const p of patches) {
|
||||
if ((p.id === 20 || p.id === 21) && !webFetchPackageAvailable(aiBase)) {
|
||||
if (p.id === 20 && !webFetchPackageAvailable(aiBase)) {
|
||||
report.push({
|
||||
patch_id: p.id, name: p.name, status: "missing_file",
|
||||
path: files[fileKeysOf(p)[0]], applied: 0, already: 0, missing: 1,
|
||||
@@ -3812,7 +3773,7 @@ export async function applyPatches(aiBase, patches = ALL_PATCHES) {
|
||||
if (changed) {
|
||||
try {
|
||||
await saveText(fp, textOut);
|
||||
if (p.id === 21 && webFetchWorkspacePaths(aiBase)) {
|
||||
if (p.id === 20 && webFetchWorkspacePaths(aiBase)) {
|
||||
const linked = ensureWebFetchWorkspaceLink(aiBase);
|
||||
if (linked.status !== "applied" && linked.status !== "already") {
|
||||
lastError = linked.status;
|
||||
@@ -3826,7 +3787,7 @@ export async function applyPatches(aiBase, patches = ALL_PATCHES) {
|
||||
continue;
|
||||
}
|
||||
if (filePatchSettled(text, p, fp)) {
|
||||
if (p.id === 21 && webFetchWorkspacePaths(aiBase) && !webFetchWorkspaceLinkReady(aiBase)) {
|
||||
if (p.id === 20 && webFetchWorkspacePaths(aiBase) && !webFetchWorkspaceLinkReady(aiBase)) {
|
||||
const linked = ensureWebFetchWorkspaceLink(aiBase);
|
||||
lastError = linked.status;
|
||||
continue;
|
||||
@@ -3858,7 +3819,7 @@ export async function patchStatus(aiBase, patches = ALL_PATCHES) {
|
||||
const files = targetFiles(aiBase);
|
||||
const status = {};
|
||||
for (const p of patches) {
|
||||
if ((p.id === 20 || p.id === 21) && !webFetchPackageAvailable(aiBase)) {
|
||||
if (p.id === 20 && !webFetchPackageAvailable(aiBase)) {
|
||||
status[p.id] = "missing_file";
|
||||
continue;
|
||||
}
|
||||
@@ -3881,7 +3842,7 @@ export async function patchStatus(aiBase, patches = ALL_PATCHES) {
|
||||
pending += 1;
|
||||
continue;
|
||||
}
|
||||
const runtimeReady = p.id !== 21
|
||||
const runtimeReady = p.id !== 20
|
||||
|| !webFetchWorkspacePaths(aiBase)
|
||||
|| webFetchWorkspaceLinkReady(aiBase);
|
||||
if (!runtimeReady) {
|
||||
|
||||
Reference in new issue
Block a user