DeepSeek Harness plugin

Restart-service-button

DSH web plugin: a one-click restart-service button in the top-right corner of the GUI, with a settings page to reposition it. The button survives service restarts.

Jump to install

Source facts

Repository
DeBug-lzy/Restart-service-button
Latest update
Aug 18, 2026
Category
Development & Runtime
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/DeBug-lzy/Restart-service-button
Plugin: Restart-service-button
Author: DeBug-lzy

Check the source files

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

File explorer3 files
README.mdSource · read only

restart-service-button

一个 DeepSeek Harness (DSH) Web 插件:在 DSH 网页界面的右上角添加一个一键重启服务按钮,并提供一个设置页用于调整按钮位置。

因为是正式安装的 Web 插件(不是动态会话插件),按钮能跨服务重启存活——重启后按钮依然在,随时可以再次使用。

功能

  • 🖱️ 一键重启 dsh web 后端:点一下进入「确认重启?」状态,再点一下确认;按钮显示「重启中…」约 2 秒后变为「请刷新页面」。
  • ⚙️ 设置页(设置 → 重启按钮):以像素调整按钮的 top / right 偏移,修改立即生效,并通过 localStorage 记住位置(重启后不丢)。
  • 🎨 原生观感:使用 DSH 设计 token(--dsw-alias-*)、透明背景、轻量 hover。
  • 🔒 重启接口仅允许本机回环访问,局域网暴露的 DSH web 无法被远程触发重启。

环境要求

  • DSH web(dsh web 网页端),使用 web profile
  • Windows 为主力且经过充分测试的平台;附带 POSIX(macOS/Linux)尽力而为的实现

安装

dsh plugin --profile web add github:<owner>/restart-service-button

或者从本地目录安装:

dsh plugin --profile web add link:C:/path/to/restart-service-button

然后重启一次 web 服务让插件加载:

dsh web

(如果之前装过动态版插件,可直接用当前界面上仍存在的按钮触发第一次重启。)

使用

1. 打开 DSH 网页界面。 2. 右上角:点击 重启服务 → 按钮变红 确认重启?(5 秒无操作自动取消)→ 再点一次。 3. 服务重启;按钮约 2 秒后变为「请刷新页面」,等服务恢复后点击该按钮即可刷新。按钮已持久安装,随时可用。

调整位置:设置 → 重启按钮 → 修改 距离顶部 (top) / 距离右侧 (right)恢复默认 重置为 80 / 20。

工作原理

职责
Host(lib/index.js注册 POST /api/restart-service-button/restart(仅回环)。收到请求后启动分离进程(Windows 用 PowerShell -EncodedCommand,POSIX 用 nohup bash):等待约 2 秒 → 强杀当前 dsh web node 进程(按命令行 bin.js … web 匹配)→ 重新拉起 dsh web,日志写入 %TEMP%\dsh-web-restart-<时间戳>.log(Windows)/ /tmp/dsh-web-restart-<时间戳>.log(POSIX)。
Client(lib/client.jsshell.overlay 槽位注册按钮、在 settings.section 注册位置页;确认后向路由发 POST;位置存 localStorage

注意事项

  • 重启会杀掉当前 DSH 进程,正在进行的任务会被中断(会话已持久化,可恢复)。
  • 按钮位置按浏览器存于 localStorage(origin 级);清浏览器数据会回到默认 80 / 20。
  • POSIX 重启路径为尽力而为,测试充分度不如 Windows。

卸载

dsh plugin --profile web remove restart-service-button

然后重启 dsh web

许可证

[MIT](./LICENSE)