Commit Graph
31 Commits
Author SHA1 Message Date
叫我小杨同学andCursor eb9af6b8fa release: 1.1.68
Co-authored-by: Cursor <cursoragent@cursor.com>

#92 技能块标量 description;#93 红队更新路径与 GitHub 回落;#94 桌面 CLI unpacked 回退;#95 拆除 refusal-recover;#96 bash 等待迁回 60s。注入置顶,capability 改名,用户 prompt 一律 followup,默认关闭自动继续。
2026-10-11 02:21:35 +08:00
叫我小杨同学 554277fcfb revert(#85): 撤销 host 自杀 Electron — 会被 Job Object 连带杀 → helper 来不及 spawn
YG 实测现象:点'应用重启'没反应,DSH 全死不 relaunch。
根因:host 作为 Electron 子进程,在 Chromium Job Object 里。host sync 调
PowerShell 杀 Electron → Electron 死 → Job 连带杀 host → execFileSync 没返
→ spawnHelper 没执行 → helper 没 spawn → 没 relaunch → 用户点了没反应。

保留 restart-desktop.js 的时序优化 (先 kill 再 cleanup,双保险)。
patch #83+#84 已经处理第二次之后的 close dialog (新 main.js 加载后 silent)。
第一次 restart 的 crash dialog 是 Electron 内存滞后的必然代价,YG 必须 fresh
open DSH 一次让新 main.js 加载到内存,之后永远不再弹。
2026-10-10 00:15:42 +08:00
叫我小杨同学 9d384d0723 fix(#85): host 自己同步杀 Electron 消除 restart 时序 crash dialog
根因:unpacked helper 分支流程
  1. host spawn helper (detached)
  2. host 250ms 后 process.exit(0)
  3. Electron main 收到 host close event → 跑**内存里的旧** close 回调
  4. 旧回调含 'else this.fail(stopped)' → crash dialog 弹
  5. helper awake (sleep 400) → kill Electron
  → T=10ms dialog 已弹,T=400ms+ 才杀 Electron,时序竞争 host 输

即使 main.js 磁盘已 patched(#83+#84 silent),Electron **启动时** 加载的内存
版本是旧的,host close 事件触发的是**内存里的旧回调**,仍 fail(stopped)。
#64 (ASAR_SWAP_PS1) 已经处理了 asar 模式,但 unpacked 模式没享受到。

修复 (lib/desktop.js spawnHelper):
  - 新 killInstallElectronSync(execPath):按安装根路径 (不是 /IM 全名)
    同步 PowerShell Stop-Process,防误伤同名第三方
  - spawnHelper 对 killApp 场景 Win 下先 sync kill Electron,再 spawn helper
  - Electron 死后 close event 没 subscriber → 旧回调不触发 → 没 dialog
  - host 作为 Electron 子进程,Electron parent 死不会连带杀 host (无 job object)
  - host spawn helper + 250ms 后 exit,此时 Electron 已死,安全

修复 (lib/restart-desktop.js killApp 分支):
  - win32 分支把开头 sleep(400) 挪到杀之后
  - 立刻 killOtherDesktopProcesses → sleep 500 → 二次 kill (双保险)
  - 兜底,防 host 的 killInstallElectronSync 漏掉的 pid
2026-10-10 00:07:28 +08:00
叫我小杨同学 06617553e0 fix(desktop): DSH_PROFILE 兜底 + console.warn 污染治理 + --updated 抢前台
- patch #82 main.js 启动顶部补 DSH_PROFILE=desktop 兜底 (双击 exe 从 explorer 继承 env 常缺 → host "cannot determine the boot profile" crash → dsh-purge 没 activate → inject 全断)
- lib/desktop.js 全部 console.warn("[dsh-purge] ...") 换成 logInternal() 写内部 log (不污染 host stderr → main.js:3729 fail 回调不再误报假 crash)
- lib/restart-desktop.js spawnEnv() 补 DSH_PROFILE + spawn argv 加 --updated (复用 Electron main.js:11256 raiseAfterUpdate 内部 moveTop+focus 强制前台,比外部 PS SetForegroundWindow 可靠) + PS 兜底保留做双保险
2026-10-09 20:49:41 +08:00
叫我小杨同学 3ad257e5a7 fix(desktop): PowerShell asar-swap restart 加 asar-missing guard — 修启动闪屏+慢
asar 已被 unpack 挪走后(desktop 常态), restartOfficialHarness 的 PowerShell
分支仍无条件 schedule 一次 kill-and-swap: fs.rename ENOENT, 但 Electron
已被 PowerShell 杀一遍 → 用户看到启动闪屏 + 多拉一次 Electron 启动慢。

此分支加 asarArchiveIsFile(asar) 前置守卫, 与 wscript 分支的 1406 行
守卫对齐; asar 不在时 early-return, 让宿主自然起 unpacked /app/。

同时在 D:\DeepSeek Harness\.dsh\profiles\desktop\cordis.patch.yml 加
compaction-basic disabled:false override: desktop 单 preset 下 web-app
的 disabled 把 base 的 compaction-basic 关了, 原设计 host plane 另装,
不装就 command-compact 永远 pending → host crash dialog。
2026-10-09 17:58:53 +08:00
叫我小杨同学 2794ac6055 fix(desktop): PowerShell 立即 kill Electron 消除 #64 crash dialog 根因
- ASAR_SWAP_PS1 不再等 WaitPid 优雅退出,改为立即 Stop-HarnessInstall;
  Electron main 和 host 一起被 kill,UI 来不及收 host 退出事件,
  main.js:3725 的"host stopped"对话框根本没机会显示。
  PowerShell 是 detached+stdio:ignore 独立进程,杀 Electron 不影响自己。
- scheduleAsarSwapRestart 接 ctx fallback,启动期自愈路径也能解析
  desktopRuntime 走 requestRestart 做双保险。
- gracefulExit timeout 从 4500/3000 缩到 2000/1500ms:PS 杀得快,
  不需要那么长的 handoff 窗口兜底。
- core.restartSealedDesktopIfNeeded 透传 input.ctx 给桌面层两条路径。
- index.js:scheduleApplyRestart / handlePurgeCommand 全链路加 ctx 参数,
  commands.register handler 把 effect 作用域 ctx 交到最深处的
  restartSealedDesktopIfNeeded 和 scheduleRestart。
- identity.js:isHardcodedExecRule 长度闸 800→1500,用户 rules 文件偶尔
  引用写死 preamble + 本体 >800 字节时不再被误剥。
2026-10-09 14:41:44 +08:00
叫我小杨同学 b17b98baa5 fix(desktop): 加长 asar swap gracefulExit timeout 到 4500ms, 加标注 #64 硬限制
- 有 runtime: 给宿主最大 4.5s 处理 requestRestart 内部副作用。宿主正常会
  在窗口内自己 kill host 不弹 crash;没 kill 兜底 process.exit 可能仍弹。
- 没 runtime: 延长到 3s 兜底, 注明"这条路径仍可能弹 host stopped"。

诚实标注: 宿主对 host exit 的 crash 判定由宿主 UX 控制, 插件无法影响。
requestRestart 是唯一通路。若实测仍崩, 需 DSH 官方修 requestRestart 或
修 crash 判定逻辑, 插件侧已无进一步手段。

版本号保持 1.1.67。
2026-10-09 14:23:25 +08:00
叫我小杨同学 e3fbbd1fd0 fix(desktop): 点重启弹崩溃根因 - 让宿主 ack 预期退出,别裸 process.exit
现象:点"应用"→ 弹"重启"对话框 → 点重启 → 弹"host stopped"崩溃对话框。
实际 PowerShell asar swap 正常启动了,只是宿主 main.js:3725 的 ChildProcess
listener 把 host 子进程退出一律当"崩溃"报,并把 host stderr 全 dump 给用户看
(2026-10-09 crash log 栈顶 `at ChildProcess.<anonymous> ... main.js:3725:36`
+ `maybeClose` + `_handle.onexit` 就是这条路径)。

修法:
1. scheduleAsarSwapRestart 加 options.runtime(desktopRuntime 实例)。
   有 runtime → 先 await runtime.requestRestart() 让宿主主动安排 restart,
   宿主知道 host 会主动退就不弹 crash;setTimeout 1.8s 兜底 process.exit。
   没 runtime → 兜底 process.exit 1.5s(比原 0.8s 长,给 PowerShell handoff
   更多时间)。两条路径都挂日志标记 planned exit 便于排查。
2. restartOfficialHarness 加 options.ctx / options.runtime,内部 desktopRuntimeOf
   拿到 runtime 后透传给 PowerShell 和 helper 两个 scheduleAsarSwapRestart 分支。
3. scheduleRestart 把 ctx 透传给 restartOfficialHarness,asar swap fallback 分支
   也拿 runtime 走同一条优雅退出路径。

版本号保持 1.1.67,不发新版。
2026-10-09 14:14:53 +08:00
叫我小杨同学 567aba33a3 fix(hang+leak): 7 文件修 assemble throw / crash listener / Map FIFO
卡死路径三连 (UI 发不出 / 任务到一半停):
1. index.js:system-prompt/assemble handler 的 await next() 加 try/catch。
   下游 waterfall 任一环节 throw 就把整条 assemble 弄死,原地卡住发不出去。
2. identity.js:installAssembleGuard wrapped 的 await orig(...) 加 try/catch。
   宿主原生 assemble throw 后 sections.map 会崩,症状就是"任务到一半苏醒"
   "连保存都救不了"的拒答 - 吞掉返回空装配兜底。
3. desktop.js:scheduleAsarSwapRestart 的 PowerShell spawn 加 'error' listener。
   没 handler 时 Node 当 uncaughtException 直接把宿主崩掉(2026-10-09 crash
   log at ChildProcess.<anonymous> main.js:3725 根因)。

启动卡顿 / ReDoS:
4. desktop.js:PROCESS_EXE_SCRIPT execFileSync timeout 15s → 6s。
   Win32_Process 枚举 1-3s 够用, 15s 把启动期 UI 卡 15s 太狠。
5. net-scope.js:ATTACK 正则加 100KB input cap。零宽环视 + 超长输入
   (贴代码/日志)会 ReDoS 把事件循环卡死。

内存积累(cordis 无 session/removed 事件可挂, FIFO 兜底):
6. continue-retry.js:createTracker bySession 加 CAP=200 / EVICT=50。
7. refusal-recover.js:bySession 加 CAP=200 / EVICT=50。
8. redteam/role-section.js:roleBySession 模块级 Map 加 CAP=400 / EVICT=100。

全局 handle 清理:
9. index.js:installHungPromptGlobal 返回 fn, effect cleanup 带 identity
   校验 delete __dshPurgeHungPrompt, 避免热重载时旧 cleanup 挖掉新实例。

版本号保持 1.1.67, 不发新版。
2026-10-09 14:06:07 +08:00
叫我小杨同学 1726711f52 fix: 发布 1.1.67,#85/#84 + 启动种子 + 85 项清单一次性修复
- #85 continue 续跑加 failStreak 阈值;refundContinue 不清 lastContinueSeq,连错 3 次放弃
- #84 region gate denialStream 单批 text-chunks 带 .length,不再卡宿主 UI
- 启动即种子:$DSH_HOME/prompt-inject.md 为空/缺失自动写加密默认稿,用户改过的不动
- Windows 重启脚本:pid+random 命名 + 直接 wscript.exe //B,不再 /IM 杀全名
- 官方 CLI shim 原子写 + .dsh-purge.bak 可回退
- WScript clean 判定两 null 放行,首装不卡;探测缓存不缓存空结果
- scheduleAsarRenameWhenIdle 的 .rename-pending 锁时钟回拨/30min 失效自动清
- 三处 execFileSync 加 maxBuffer: 8MB,大结果不再 ENOBUFS 静默
- net-scope / identity / hooks-deny / extract-asar / client.js / core.js / update.js / skills.js / refusal-recover / rewind / rules / reapply 等共 85 项修复
2026-10-09 11:52:39 +08:00
叫我小杨同学andCursor 2bf8bfb618 fix: 发布 1.1.65,截图报告与默认提示词
接入上游截图登记和六段报告,默认提示词按当前文稿重新加密。缺外部工具或密钥时技能仍可加载。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 16:52:44 +08:00
叫我小杨同学andCursor 8dcbad241b fix: 发布 1.1.61,多宿主 Apply 与 #73/#74、极简 preset
- Apply/reapply 同时写 npm-global 与桌面宿主;#73 地区闸门误拦;#74 提示词落盘与 resolveInjectText

- 极简 #80 官方 shell;agent-preset/selected 优先;adaptInjectForMinimalPreset;refusal-recover 扩展

- identity 注入去重与组装;默认提示词重加密 asset-table.js

Closes #73. Closes #74.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 18:13:19 +08:00
叫我小杨同学andCursor f50ebbc032 fix: 发布 1.1.60,极简/PTC 清洗、回退轮次与桌面补丁
- 反转 run_code/沙箱/plan 拦截(#60/#61/#63);minimal 补 agent-instructions(#26)

- 回退按当前轮定位(rewind + #74/#75);Apply 写入 client 包避免取消重启

- 默认提示词重新加密;#66/#67/#69/#71/#70 与 README #68 安装说明

Closes #66, #67, #69, #70, #71. Docs for #68.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 23:32:54 +08:00
叫我小杨同学andCursor 7ad39ad832 fix: 发布 1.1.59,应用后不再误报没写进宿主
重启校验同时认两条安装路径。原文里已经没有官方身份句和丢掉注入的写法时,不再因为旧标记对不上就取消重启。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 01:36:46 +08:00
叫我小杨同学andCursor 71defcc3da fix: 应用成功后自己重启一次
有新补丁或密封包还在时,点应用直接重启,不再弹出确认。没有新补丁就不重启。Windows、Linux、macOS 都退出再打开,斜杠不再干等。极简 bash 只删掉误留的镜像那一句。默认提示词继续用 default-prompt-inject.md 的加密槽,明文不进发布包。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 23:24:49 +08:00
叫我小杨同学andCursor 79714102a5 fix: 面板不再盖住官方对话,重打补丁不再回写前端包
浮层收成右侧窄条,底边停在输入框上方;演练台嵌在面板里时不再给官方窗口加右侧内边距。重打补丁时若前端 client.js 内容没变就不写,避免页面按旧 rev 404。桌面启动自检不再杀掉自己,清洗标记同时认新旧两句。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 21:24:20 +08:00
叫我小杨同学andCursor ce5e381ab8 fix: 发布 1.1.53,修应用后无限重启与市场 git 安装(#58–#61)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:54:38 +08:00
叫我小杨同学andCursor 33e06259b4 fix: 发布 1.1.52,禁自动官方更新交接与插件自更新,密封态自愈,重封默认提示词
Co-authored-by: Cursor <cursoragent@cursor.com>

#57 应用/重启不再跑官方 installer;applied 戳在 sealed/丢根时触发 reapply;启动永不自动更新插件;默认提示词重新加密写入 asset-table。
2026-10-03 01:15:37 +08:00
叫我小杨同学andCursor 94a7cf814e fix: 发布 1.1.49-beta.1,修 macOS 官方桌面重启假失败与解包后 CLI 失效(#53)。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 19:20:16 +08:00
叫我小杨同学andCursor ed4e83744d fix: 1.1.48 剔除桌面改读 profiles/web 的本机逻辑。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 17:31:49 +08:00
叫我小杨同学andCursor eb09b2e62d fix: 发布 1.1.48,桌面跟 Web 配置、红队派活与 skill/MCP 按任务选用。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 17:25:49 +08:00
叫我小杨同学andCursor 33baeeef45 fix: 发布 1.1.47,演练台环境适配与首次用户须知。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 13:55:13 +08:00
叫我小杨同学andCursor f2c244c78f fix: 发布 1.1.45,稳住默认注入并修正清洗进度显示。
点应用即写入默认提示词,不必先保存。剥掉外层 project_instructions 壳并钉死会话系统提示,避免第二轮注入失效。未定位宿主不再显示 0/63,本机不需要的项计入已就绪。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 02:09:44 +08:00
叫我小杨同学andCursor e8b745e29e fix: 发布 1.1.41,官方模式与红队分开注入,回退留在当前会话。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 20:00:23 +08:00
叫我小杨同学andCursor a049e3c7d5 fix: 发布 1.1.39,中文 Windows 官方桌面更新不再卡在准备重启
Fixes #47

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 20:10:51 +08:00
叫我小杨同学andCursor 701b4188cd fix: 发布 1.1.38,红队守住目标并修好模式不显示
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 18:15:28 +08:00
叫我小杨同学andCursor 75e7a2d849 fix: 发布 1.1.22,官方桌面 app.asar 还在时应用不再 ENOENT
归档还在时改写真实 resources/app;没有归档时仍用 node:fs。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 14:57:48 +08:00
叫我小杨同学andCursor 4ef30254f2 fix: 发布 1.1.21,修复 #43、#9、#15、#23、#42 报必需补丁失败
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 21:32:19 +08:00
叫我小杨同学andCursor 232c9e2461 feat: 发布 1.1.20,官方桌面升级安装已下载的新版本
对准 dsh 0.1.7-rc.2,并保留 0.1.7-rc.1 的旧锚点。安装目录不写死盘符。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 14:38:21 +08:00
叫我小杨同学andCursor 214fd47a8e feat: 发布 1.1.19,支持官方桌面 EXE
官方客户端可以应用并自己重启;修掉重启弹窗、残留 PowerShell,以及更新时要手动还原再应用的问题。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 02:47:29 +08:00
叫我小杨同学andCursor b84582e17c feat: 发布 1.1.7,Web / 桌面端分开安装并跟随当前桌面目录清洗
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 18:26:11 +08:00