huasheng33991/dsh-power-button
DeepSeek Harness的一键启动/停止(重启)按钮,固定在窗口右下角。/ DSH 一键启停按钮。
Project Overview项目介绍
huasheng33991/dsh-power-button is a native plugin built exclusively for DeepSeek Harness (DSH). It adds a floating one-click restart and stop power button pinned to the bottom-right corner of the DSH window. Clicking the main button triggers a full restart of DSH, which automatically terminates the old running process, spawns a new one, and reconnects the frontend page. Hovering over the main button reveals a smaller secondary button that only stops DSH without automatically restarting it, and the button includes a color-coded status indicator.
The plugin exposes three HTTP routes for its core functionality. The /dsh-power/health GET route returns a simple { ok: true } response for health checks. The /dsh-power/restart POST route triggers the full restart workflow, and the /dsh-power/stop POST route triggers a stop-only action. For security, the restart endpoint only accepts same-origin requests from localhost, and any requests from proxies or forged origins are rejected with a 403 error.
To install the plugin, you first copy the repository into your DSH user-level plugins directory at ~/.dsh/plugins/, then add it as a file dependency to your web profile. Next, add the plugin name to the dsh.profile.bundles array in your profile's package.json. After completing these steps, restart the DSH web process and refresh the page to see the button. To uninstall, you just remove the dependency and delete the plugin entry from the dsh.profile.bundles array.
这是一款专为DeepSeek Harness开发的原生插件,会在DSH窗口右下角固定一个悬浮的一键启停电源按钮。点击主按钮即可一键重启DeepSeek Harness,自动停止旧进程、拉起新进程并重连页面;悬停主按钮会出现次级小按钮,点击可仅停止进程不自动重启。按钮自带状态指示:绿色代表运行中,红色代表离线,琥珀色脉冲代表正在重启中。
插件提供三个HTTP路由接口,分别是健康检查、重启和停止接口。为了保障安全,重启接口仅接受本机同源请求,拒绝任何代理转发,伪造来源的请求会直接返回403错误。重启机制会通过一个分离的node帮助进程等待端口释放,再按照原入口、参数、环境变量和工作目录完全重新拉起DSH,随后旧进程收到SIGTERM信号优雅退出。
安装需要先将本包放入DSH用户级插件目录,接着在profile层添加依赖,最后在profile的package.json中dsh.profile.bundles列表追加本插件名称,重启DSH web后刷新页面即可看到右下角的按钮。卸载需要移除依赖并从bundles列表中删除项目,整个流程不需要手动修改cordis.patch.yml,避免出现重复加载错误。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-power-button(huasheng33991/dsh-power-button)
仓库:https://github.com/huasheng33991/dsh-power-button
本站详情页:https://www.yhbd.top/plugins/huasheng33991-dsh-power-button/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-08-16 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:huasheng33991/dsh-power-button
把 huasheng33991/dsh-power-button 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-power-button
DeepSeek Harness 一键启停按钮 —— 固定在窗口右下角的悬浮电源键。
单击主按钮即可重启 DeepSeek Harness(停旧启新,自动拉起新进程并重连页面);悬停出现的小按钮可仅停止(不自动重启)。
- 状态点:绿 = 运行中 / 红 = 离线 / 琥珀脉冲 = 重启中
- 重启接口仅接受本机同源请求(拒绝代理转发),伪造来源一律 403
- 持久化安装:本体放
~/.dsh/plugins/dsh-power-button/,通过 profilepackage.json的dsh.profile.bundles自动加载,重启后依然存在
路由
| 路由 | 方法 | 说明 |
|---|---|---|
/dsh-power/health |
GET | 健康检查 { ok: true } |
/dsh-power/restart |
POST | 一键启停:detached helper 等端口释放后按原入口/参数/环境/cwd 重启 |
/dsh-power/stop |
POST | 仅停止,不自动重启 |
安装(profile 层)
# 1. 把本包放入 DSH 用户级插件目录
mkdir -p ~/.dsh/plugins
cp -r dsh-power-button ~/.dsh/plugins/
# 2. 加入 profile 依赖并安装
cd ~/.dsh/profiles/web
pnpm add file:~/.dsh/plugins/dsh-power-button
# 3. 在 package.json 的 dsh.profile.bundles 列表追加 "dsh-power-button"
# (注意:不要再在 cordis.patch.yml 手动 insert,避免 duplicate loader entry id)
# 4. 重启 dsh web 后刷新页面即可看到右下角按钮
卸载
cd ~/.dsh/profiles/web
pnpm remove dsh-power-button
# 并从 package.json 的 dsh.profile.bundles 移除 "dsh-power-button"
技术说明
重启机制:POST /dsh-power/restart 会派发一个 detached node helper,helper 等待 HTTP 端口释放后,用 process.execPath + execArgv + 原始 argv + cwd + 环境变量 重新拉起完全相同的 dsh 启动命令,随后旧进程收到 SIGTERM 优雅退出。新进程脱离原终端独立运行。
踩坑记录:helper 代码中
})换行后紧跟(async必须加前导分号(;(async),否则 ASI 会把 IIFE 吞进上一条语句,helper 静默不执行导致自启失败。
monk233/dsh-plugin-manager
BuLongY/dsh-proxy
kairoz9/dsh-mcp-admin
esengine/DeepSeek-Reasonix
strukto-ai/mirage
chuspeeism/dashi-taskboard
Aisland-SJL/dsh-worktable
ccch1mneyyy/working-activity