dsh-restart-backend
 
English | 中文
为 DeepSeek Harness(DSH)Web 页面左下角添加一个重启后端按钮。点击后即可一键重启 dsh web 后端进程。
点击按钮后,Host 侧会生成一个脱离当前进程的 watchdog,等待当前 dsh web 进程退出并释放端口,再用相同的启动参数拉起新的 dsh web 进程;旧进程通过 ctx.appExit 优雅退出。
特性
| 🔄 一键重启 | 无需打开终端,直接在 Web 界面重启后端 |
| 🧱 watchdog 拉起 | 脱离进程存活,等旧后端退出后按原参数重新启动 |
| 🔒 默认仅回环 | 默认只允许 127.0.0.1 / localhost 触发重启,避免远程误操作 |
| 📦 一次安装,长期有效 | 随 DSH 启动自动加载,重启不丢 |
安装
一键安装(推荐)
Windows(PowerShell)
irm https://raw.githubusercontent.com/woyeshishen/dsh-restart-backend/main/scripts/install.ps1 | iexmacOS / Linux
bash <(curl -fsSL https://raw.githubusercontent.com/woyeshishen/dsh-restart-backend/main/scripts/install.sh)dsh plugin 命令安装
从 npm
dsh plugin --profile web add @woyeshishen/dsh-restart-backend从 GitHub
dsh plugin --profile web add github:woyeshishen/dsh-restart-backend安装完成后,插件会自动挂载到 profile,重启 DSH(或硬刷新页面)即生效。
使用
安装后打开 DSH Web 页面,左侧边栏底部会出现一个圆形的 ↻ 重启后端 按钮。
需要重启后端时点击它即可。页面可能会短暂断开;后端重新起来后如未自动恢复,可手动刷新页面。
配置
插件提供一个可选配置项:
| 配置 | 类型 | 默认值 | 说明 |
|---|---|---|---|
allowRemoteRestart | boolean | false | 是否允许非回环/受信任来源触发重启。 |
如需允许远程触发,在 cordis.patch.yml 中加 config:
- insert:
- id: restart-backend
name: '@woyeshishen/dsh-restart-backend'
config:
allowRemoteRestart: true要求
License
[Apache-2.0](LICENSE)