DeepSeek Harness plugin

dsh-restart-web

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

Jump to install

Source facts

Repository
shaoyi1991/dsh-restart-web
Latest update
Aug 14, 2026
Category
UI Enhancements
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/shaoyi1991/dsh-restart-web
Plugin: dsh-restart-web
Author: shaoyi1991

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

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