diff --git a/client.js b/client.js index 48eb666..3f8f266 100644 --- a/client.js +++ b/client.js @@ -410,7 +410,8 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { "patch.80": "恢复官方极简工具表", "patch.81": "每一步重放完整 prompt-inject", "patch.82": "主进程兜底 DSH_PROFILE=desktop", - "patch.83": "host 信号杀静默退出不弹对话框", + "patch.83": "host 信号杀时不报错不弹对话框", + "patch.84": "host code=0 正常退出不报错 (消除 stopped 对话框)", "status.unlocated": "未定位", "status.na": "本端不需要", "metric.unlocated": "还没定位到本机 Harness", @@ -737,7 +738,8 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { "patch.80": "Restore official minimal tool plugins", "patch.81": "Replay the full prompt-inject every step", "patch.82": "Fallback DSH_PROFILE=desktop in main process", - "patch.83": "Silence host-stopped crash on signal kill", + "patch.83": "Don't fail on signal kill (no crash dialog)", + "patch.84": "Don't fail on code=0 clean exit (no stopped dialog)", "status.na": "Not for this host", "metric.sealed": "Official client found. Apply to unpack", "metric.sealed.count": "Sealed", diff --git a/lib/core.js b/lib/core.js index b19b455..0b94b3b 100644 --- a/lib/core.js +++ b/lib/core.js @@ -4525,7 +4525,7 @@ const NEW_TOOL_PATCHES = [ name: "DESKTOP_HOST_CLOSE_NO_FATAL", layer: "代码", layer_en: "Code", - desc: "host 被信号杀 (重启密封包) 时静默退出,不弹 crash dialog / silence host-stopped crash on signal kill", + desc: "host 被信号杀 (重启密封包) 时不报错,不弹 crash dialog / don't fail on signal kill", file: "desktop-shell", surfaces: ["desktop"], replacements: [ @@ -4554,6 +4554,31 @@ const NEW_TOOL_PATCHES = [ ], markers: ["[dsh-purge] signal kill"], }, + { + id: 84, + name: "DESKTOP_HOST_CLOSE_CODE0_NO_FAIL", + layer: "代码", + layer_en: "Code", + desc: "host code=0 正常退出不报错 (消除 stopped 对话框) / don't fail on code=0 clean exit", + file: "desktop-shell", + surfaces: ["desktop"], + optional: true, + replacements: [ + { + pattern: + "\t\t\t\tif (code === null || signal) { resolve(); return; }\n" + + "\t\t\t\tif (code !== 0) this.fail(/* @__PURE__ */ new Error(`dsh desktop host exited with ${String(code)}${suffix}`));\n" + + "\t\t\t\telse this.fail(/* @__PURE__ */ new Error(`dsh desktop host stopped${suffix}`));\n" + + "\t\t\t\tresolve();", + replace: + "\t\t\t\tif (code === null || signal) { resolve(); return; }\n" + + "\t\t\t\t// [dsh-purge] close no-fail v2: code=0 正常退出不报错,只有真正非 0 exit 才弹对话框\n" + + "\t\t\t\tif (code !== 0) this.fail(/* @__PURE__ */ new Error(`dsh desktop host exited with ${String(code)}${suffix}`));\n" + + "\t\t\t\tresolve();", + }, + ], + markers: ["[dsh-purge] close no-fail v2"], + }, { id: 67, name: "AGENT_LOOP_MESSAGES_GUARD",