DeepSeek Harness 插件

dsh-restart-web

One-click restart for DeepSeek Harness from the Web UI settings panel. Cross-platform (macOS, Linux, Windows).(英文原文)

跳到安装方式

来源信息

GitHub 仓库
shaoyi1991/dsh-restart-web
最近更新
2026年8月14日
分类
界面增强
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/shaoyi1991/dsh-restart-web
插件名:dsh-restart-web
作者:shaoyi1991

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-restart-web

[English](#english) | [中文](#中文)

---

Preview / 效果预览

![DSH Web Settings showing the Restart page / DSH Web 设置中的「重启」页面](assets/restart-settings.png)

The screenshot shows the added Restart entry in DSH Web Settings.

下图展示安装插件后 DSH Web 设置页新增的「重启」入口:点击即可安全重启整个 DSH 进程,页面约 5 秒后自动重新连接。

<a id="english"></a>

One-click Restart for DeepSeek Harness

Adds a Restart button to the DSH Web settings panel. Click it to safely restart the entire DSH process — the browser auto-refreshes after 5 seconds.

Install

dsh plugin --profile web add dsh-restart-web

Or from GitHub:

dsh plugin --profile web add github:shaoyi1991/dsh-restart-web

After install, restart DSH once, then open Settings → Restart in the Web UI.

Cross-platform

PlatformMethodStatus
macOSlsof + kill + process-group escape
Linuxlsof + kill + process-group escape
Windowsnetstat + taskkill

The restart logic runs as a standalone Node.js script (lib/restart.js), spawned as a detached process so it survives DSH's exit cleanup on all platforms.

How it works

Web UI (Settings → Restart)
    │
    ▼  POST /api/dsh-restart
Host plugin (lib/index.js)
    │
    ├── macOS/Linux: bash + set -m → restart.js in new process group
    └── Windows:     node → restart.js directly (detached)
          │
          ├── 1. Wait 2s (let HTTP response return)
          ├── 2. Kill process on port 3080
          ├── 3. Start new DSH: node bin.js web
          └── 4. Exit (DSH keeps running)

Why not just call dsh?

DSH is often installed via npx and not on PATH inside a subprocess's clean environment. This plugin uses process.execPath + process.argv[1] to get absolute paths that always work — no PATH dependency.

License

MIT

---

<a id="中文"></a>

DeepSeek Harness 一键重启插件

在 DSH Web 设置面板中添加「重启」按钮。点击后安全重启整个 DSH 进程,浏览器 5 秒后自动刷新重连。

安装

dsh plugin --profile web add dsh-restart-web

或从 GitHub 安装:

dsh plugin --profile web add github:shaoyi1991/dsh-restart-web

安装后重启一次 DSH,然后在 Web UI 中打开 设置 → 重启 即可使用。

跨平台支持

系统重启方式状态
macOSlsof + kill + 进程组逃逸
Linuxlsof + kill + 进程组逃逸
Windowsnetstat + taskkill

重启逻辑是一个独立的 Node.js 脚本(lib/restart.js),以独立进程方式启动,不受 DSH 退出清理影响。

工作原理

Web 界面(设置 → 重启)
    │
    ▼  POST /api/dsh-restart
Host 插件(lib/index.js)
    │
    ├── macOS/Linux: 用 bash set -m → 在新进程组中启动 restart.js
    └── Windows:     直接用 node → 启动 restart.js(detached 模式)
          │
          ├── 1. 等待 2 秒(让 HTTP 响应正常返回)
          ├── 2. 杀掉占用 3080 端口的进程
          ├── 3. 启动新的 DSH:node bin.js web
          └── 4. 退出(DSH 继续运行)

解决了什么问题

为什么不直接用 dsh 命令? DSH 通常通过 npx 安装,在子进程的清洁环境中 dsh 不在 PATH 上。本插件使用 process.execPath + process.argv[1] 获取绝对路径,不依赖 PATH。

为什么需要 set -m DSH 退出时会自动清理所有子进程组(kill(-pid, SIGKILL))。set -m 让重启脚本进入独立进程组,DSH 的清理杀不到它。(Windows 没有这个问题,直接用 detached 模式。)

使用场景

  • DSH 卡死、无响应
  • 安装新插件或修改配置后需要重新加载
  • 内存占用过高,想重启释放

开源协议

MIT