DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Restart Button — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-restart-button

Restart Button

固定在侧边栏折叠开关左侧的一键 DSH 重启按钮:POST /dsh-restart,优雅终止,以分离方式重新启动相同的命令行,服务器恢复后自动刷新页面。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-restart-button@0.1.2
README兼容性版本

兼容性与来源证明

Restart Button 以 dsh-restart-button 发布,当前版本为 0.1.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.1.2stable
2026/8/16
0.1.1stable
2026/8/16
0.1.0stable
2026/8/16

相关插件

正在加载相关插件…

最新版
0.1.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
21 kB
文件数
7
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
71
最近提交
2026/8/16
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-restart-button

English | 中文

One-click restart DSH from the sidebar. A small icon button pinned to the left of the sidebar fold toggle: POST /dsh-restart → the host kills the current dsh --profile web process gracefully, relaunches the same command line detached in the background, and the page auto-reloads once the server is back.

Features

  • Icon-only sidebar button (standard refresh icon); the label appears on hover, like the other sidebar buttons.
  • Pinned to the left of the sidebar fold toggle; follows the sidebar across wide/rail states and window resize.
  • Graceful restart: SIGTERM first (dsh flushes sessions), SIGKILL escalation, waits for the port to free, relaunches the exact same command line detached, logs to /tmp/dsh-restart-button.log.
  • Environment survives the restart: the relaunch runs through your login shell and sources the shell rc first, so every variable you keep there (GitHub token, any other MCP server token, proxies, PATH overrides) reaches the new process — not just the stale snapshot from when dsh started. The current process env (DSH_HOME, …) is inherited as-is; the result is the union of both.
  • Auto page refresh: polls the origin every second (up to 60s) after the kill and hard-reloads when the new server answers.
  • Safety fence: the /dsh-restart endpoint only accepts loopback clients whose Origin (when present) matches the server's own Host (403 otherwise).

Install

# install the published bundle into the web profile
dsh plugin --profile web add dsh-restart-button
# restart dsh once to activate the new bundle
dsh web

For local development from a checkout:

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

The button appears at the top of the sidebar, immediately left of the collapse toggle.

How it works

  • Host half (lib/host.js): registers the exact route POST /dsh-restart on the harness web server. On request it writes a small restart script to a temp file and spawns it fully detached (detached: true, stdio: ignore, unref()), so the script survives this process's death. The script:
    1. sleeps 2s (the HTTP response reaches the browser first);
    2. finds the PID LISTENing on the server's actual port — read from ctx.webServer, never hardcoded — via lsof -nP -tiTCP:<port> -sTCP:LISTEN (the server only, never browser connections);
    3. kills it gracefully and waits for the port to free;
    4. relaunches the same command line detached through the user's login shell ($SHELL), sourcing ~/.zshrc / ~/.bash_profile first — see the environment note above.
  • Client half (lib/client.js): a window.__ModuleLoader__.load bundle that registers a sidebar.footer.action slot entry. The button is position: fixed and re-measured against the fold toggle on resize/sidebar-state changes; when the sidebar is a collapsed rail the toggle sits at the left edge, so the button falls back to its right side. After a successful POST it polls / and calls window.location.reload() once the server responds.

Notes

  • The restarted process runs detached in the background (the original terminal session is gone). Stop it with lsof -nP -tiTCP:<port> -sTCP:LISTEN → kill <pid>, or run dsh web in a terminal yourself instead.
  • lsof is required on the host (present by default on macOS/Linux).
  • The fallback relaunch command defaults to dsh --profile web when the old command line cannot be recovered.

License

MIT

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

DSCODE@toddzheng024/dscode-bundle完整的 DeepSeek 编码代理,支持持久化 shell、Ultra 协作和自动权限审查。Plugindsh-pluginDeepSeek Harness 社区插件市场,遵循官方插件规范——无需离开应用即可浏览、搜索并安装 9000+ 个由人工精选的社区插件。· DeepSeek Harness 社区插件市场(遵循官方开发规范):9000+ 人工精选社区插件,每日更新。Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话