dsh-plugin-restart-continue
No description
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 21, 2026
- Updated
- Aug 22, 2026
Introduction
dsh-plugin-restart-continue
重启 dsh web 后,自动把最近 24 小时内被崩溃/重启打断的用户根对话冷恢复,并让模型继续干活。
通用设置 → 重启后续跑 可关(默认开)。
行为
- 触发:host 进程启动扫一次,不依赖浏览器是否连上。
- 对象:普通用户根对话(非 subagent / automation),且有项目
cwd。 - 判定:最新一轮是
interrupted(含未闭合轮次),打断时间在 24 小时内。 - 动作:
agents.resume并挂上会话记录的 preset,再发一条 plugin 来源的 Continue 通知。 - 卡在审批 / 提问 / Plan 确认也会续跑。
- 子代理不主动拉起。
- 已归档、空对话、已正常结束、超过 24 小时、已经 Continue 过的都跳过。
- 与 Host
dsh-host-apiproxy的中断续跑去重:同一会话每轮启动最多一条 Continue。
Continue 文案沿用 Host 的 “Continue the work that was interrupted by a restart.”,并提醒:先看工作区;只读/幂等可重试;有副作用先核对,不要盲目重放。
安装 / 更新
./install.sh
# ~/.dsh/profiles/web/cordis.patch.yml:
# - insert:
# - id: restart-continue
# name: '@wuxie/dsh-restart-continue'
# 重启 dsh web(host 半)
# 刷新页面(设置行)
验证
- 纯函数:
node scripts/qualify.test.mjs node --check lib/client.js;ESM 的index.js/logic.js复制为.mjs再查- 部署后:
cd ~/.dsh/profiles/web && node -e "await import('@wuxie/dsh-restart-continue')" - 运行日志:
pm2 logs dsh-web --lines 80 --nostream | grep restart-continue