편집자 노트

重启入口

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

이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.

dsh-restart-web

English | 中文


Preview / 效果预览

DSH Web Settings showing the Restart page / DSH Web 设置中的「重启」页面

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

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

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


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

REPOSITORY SIGNALS

보안 및 설치 증거

이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.

출처 추적 가능

공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.

라이선스

저장소가 MIT 라이선스를 선언했습니다.

유지보수 활동

최근 180일 내 코드 업데이트가 있습니다.

설치 증거

재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.

설치 라이프사이클 스크립트

검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.