dshbase

插件目录 / UI & Skins / dsh-web-watchdog

dsh-web-watchdog

已验证 · 实测可装 catsenior507

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-16最近推送
跨平台平台

功能简介

Watchdog for the dsh web GUI: crash logging + exponential-backoff auto-restart supervisor + status panel

✅
我们的评价
可用 — 实测通过,早期项目

Watchdog for the dsh web GUI: crash logging + exponential-backoff auto-restart supervisor + status panel 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

🛡 dsh-web-watchdog

DeepSeek Harness Web GUI 的看护插件:
崩溃记录 + 指数退避自动重启 + 状态面板。

dsh web(dsh web,默认 http://127.0.0.1:3080)在 Windows 上偶发崩溃
(Node 24 libuv 退出断言、原生 TS 类型剥离等)。本插件在宿主进程内托管一个
脱离进程的 PowerShell 监督进程:

  • 📜 崩溃记录:宿主异常退出(退出码 != 0)时,把退出码、宿主 stderr/stdout
    末尾、Windows 事件日志追加到 crash.log;
  • 🔁 自动重启:按指数退避(默认 10s 起、上限 600s、连续最多 10 次)自动拉起
    node --no-warnings <bin> web;宿主正常退出(exit 0)不重启;
  • ⚡ 计划重启:面板按钮或 POST /api/watchdog/restart 写请求标记,监督进程
    在 2 秒内完成「停旧进程 → 拉新进程」;
  • 🤝 监督进程交接:重启后新宿主会拉起自己的监督进程,旧监督进程检测到
    pid 文件被接管后自动退出,避免双重监督。

安装

npm install
npm run build
dsh plugin --profile web add link:<本目录绝对路径>
# 重启 dsh web 后生效;右下角出现 🛡 按钮

面板 / API

端点 说明
GET /api/watchdog/status 宿主 PID、监督进程状态、配置、崩溃记录尾部
GET /api/watchdog/log?lines=60 崩溃日志尾部
POST /api/watchdog/restart 计划重启(浏览器会短暂断线,监督进程自动拉起)
GET /api/health 插件健康检查
curl http://127.0.0.1:4795/api/watchdog/status
curl -X POST http://127.0.0.1:4795/api/watchdog/restart

配置

首次运行在数据目录(默认 %USERPROFILE%\.dsh\web-watchdog,可用环境变量
DSH_WATCHDOG_DATA / DSH_WATCHDOG_PORT 覆盖)生成 config.json:

  • supervisor.nodePath / binPath / restartArgs:重启命令(自动探测,可覆盖);
  • supervisor.maxRestarts / backoffStartSec / backoffMaxSec:重启策略;
  • 崩溃记录:<数据目录>/crash.log,宿主日志:<数据目录>/web-logs/。

开发 / 自测

  • npm run build —— tsdown 产出 host half(lib/index.js)与 browser half(lib/client.js);
  • node test-isolated.mjs —— 隔离端到端测试:监督进程拉起、崩溃记录、自动重启、
    计划重启、监督交接(不接触真实 dsh web 进程)。
  • node test-deployment.mjs —— 真实部署形态端到端测试:假宿主通过插件的 WMI 机制拉起监督进程,
    再用 Stop-Process -Force 硬杀宿主,验证监督进程独立存活、恢复宿主环境、写崩溃记录并自动拉起新宿主。

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-web-watchdog」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:catsenior507/dsh-web-watchdog

Headless(CLI)profile:

dsh plugin --profile headless add github:catsenior507/dsh-web-watchdog

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

UI & Skins 里更多

浏览全部 7819 个插件 →