julensun-ir/DSH-RESTART-TOOL

julensun-ir★ 1JavaScript最后同步: 2026-08-19

在 GitHub 打开

README 摘要

DSH-RESTART-TOOL Reliable restart & shutdown for DeepSeek Harness (dsh) web, for agents (model tools) and the GUI (sidebar power control) . 可靠地重啟 / 關閉 DeepSeek Harness (dsh) web 服務,供 agent(模型工具) 與 GUI(側邊欄電源控制) 使用。 Why this exists / 為什麼存在 On Windows, naive restart flows end with "the port closes but nothing comes back" . We hit every one of these traps and worked around them in code — worth knowing even if you never install this plugin: 在 Windows 上,「普通重啟」往往以 「端口關了、服務沒起來」 收場。以下四個坑我們都踩過並在代碼裡繞過—— 就算你不裝這個插件,也值得知道: 1. Async spawn race (the sneakiest) / 異步 spawn 競態(最隱蔽) — Node's child process.spawn is async on Windows. A helper that spawns and then drains its event loop ( child.unref() with nothing else pending) exits before CreateProcess finishes — the new process is never created , leaving only empty logs. Fix: await the 'spawn' event (with retry) or keep the event loop referenced (polling / a listener). Node 在 Windows 上 child process.spawn 是 異步 的:helper 在 spawn(...) 後若事件循環立即清空,會在進程創建完成前退出—— 新進程從未被創建 ,只剩兩個空日誌。修法:等 'spawn' 事件(失敗重試)或保持事件循環被引用。 2. The agent sandbox kill-on-close job / agent 沙箱 kill-on-close job — DSH wraps the agent shell in a JOB OBJECT LIMIT KILL ON JOB CLOSE job (no bre…

在 GitHub 查看完整 README →
工具/开发dsh-pluginsidebaragent

分类