keyiadiannao/dsh-power-button 预览 preview

keyiadiannao/dsh-power-button

Plugin插件 Native原生 ⭐ 6 MIT UI & Themes界面与主题

DeepSeek Harness 的独立电源控制:侧边栏电源按钮,带有向上的重启/关机菜单,Windows 关机风格覆盖层,自带重启和关机引擎(不依赖其他插件)。

Project Overview项目介绍

This is a native power and lifecycle controller plugin built exclusively for DeepSeek Harness (DSH). It adds a theme-aware power button to the footer of DSH’s sidebar, matching the style of the adjacent settings button. Clicking the button opens a menu with restart and shutdown options, and displays a Windows-style full-screen transition overlay during the operation. To install the plugin, run the command dsh plugin --profile web add "github:keyiadiannao/dsh-power-button#master" in your terminal, then restart DSH to see the new button. It requires Node.js version 22.19 or newer to work properly.

Casual users can trigger restart or shutdown directly via the sidebar button, and a confirmation dialog prevents accidental shutdowns. After a successful restart, a localized toast notification appears in the corner of the UI to confirm the operation completed. In addition to the GUI button, the plugin also exposes slash commands /restart and /shutdown, plus a restart_harness model tool that can be called by DSH’s built-in AI model. The plugin automatically skips registering the model tool if another plugin already uses the same name, avoiding conflicts. This makes it suitable for both end users who interact with DSH via the GUI and developers who need to trigger restarts programmatically.

The plugin is released under the open-source MIT license, and includes pre-built artifacts so you don’t need to run any build steps after installing from Git. It automatically prunes old restart helper logs older than 7 days to keep your DSH runtime directory from accumulating unnecessary files. Multiple security measures are built in, including CSRF protection for API endpoints, blocking duplicate concurrent requests, and redacting credentials from log files. A small set of configuration options are available, letting you disable the model tool or adjust the maximum allowed delay for model-triggered restarts. All UI elements are available in both English and Chinese, matching your DSH profile’s locale setting.

这是一个专为DeepSeek Harness(DSH)打造的原生插件,作用是为DSH提供电源与生命周期控制功能。它在DSH侧边栏底部添加了一个主题适配的电源按钮,点击后弹出包含重启和关机选项的菜单,操作时还会显示符合系统风格的全屏过渡覆盖层。插件自带完整的重启和关机核心逻辑,不需要依赖任何第三方工具,可通过DSH内置的插件命令一行完成安装,安装后重启DSH即可看到侧边栏的电源按钮。

普通用户可直接通过侧边栏的电源按钮点击触发重启或关机操作,触发后会有确认步骤防止误操作,重启完成后还会弹出本地化的提示告知用户操作成功。除了图形界面按钮,插件还提供了/restart和/shutdown命令,以及restart_harness模型工具,方便不同使用习惯的用户调用。对于开发DSH插件的开发者来说,也可以通过模型工具在自动化流程中触发DSH重启,适配不同的开发工作流。

本插件采用MIT许可协议开源,要求系统Node版本不低于22.19,自带编译好的产物,通过Git安装后不需要额外构建。插件会自动清理7天前的旧重启助手日志,不会占用过多磁盘空间,同时内置多种安全机制,包括CSRF防护、重复请求拦截、命令行凭证擦除等,保障操作安全。首次运行安装后只需要重启一次DSH即可正常使用,用户可通过配置文件开启或关闭模型工具,调整最大延迟参数。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
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:keyiadiannao/dsh-power-button#master"

把 keyiadiannao/dsh-power-button 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-power-button

license DSH

English | 中文

A self-contained power & lifecycle controller for DeepSeek Harness: a sidebar power button with a Restart / Shutdown menu and a full-screen transition overlay. The restart/shutdown engine is built into the plugin — no third-party dependencies.

Developed with DeepSeek AI assistance; reviewed before release.

Features

  • Sidebar power button in the footer action slot, theme-aware and styled to match the adjacent Settings trigger.
  • Restart / Shutdown menu with a Windows-style full-screen transition overlay; the page auto-reloads after a confirmed restart.
  • Self-contained restart engine: writes a detached .cjs helper that takes over relaunching DSH through an ARM → COMMIT → ACK handshake, waits for the old process to exit, the port to free, and the session logs to stop growing, then relaunches with the same invocation and cwd — an ephemeral --port 0 is pinned to the port this process actually bound — and confirms the new instance by restartId. No PowerShell, no taskkill.
  • /restart and /shutdown commands, a restart_harness model tool (same name as anweat/dsh-restart; registration is skipped when another plugin already owns the name), and a read-only restart_status tool for checking whether a restart happened.
  • Localized UI and host notices (zh / en), following the profile's locale.preference.
  • Startup housekeeping: helper logs and scripts, per-restart handshake records, and undelivered restart notices older than 7 days are pruned from the runtime directory.

Screenshots

① Sidebar power button — a theme-aware footer entry, styled to match the adjacent Settings trigger.

Power button in the sidebar footer

② Restart / Shutdown menu — opens from the power button; two actions, one click away.

Restart / Shutdown menu

③ Shutdown confirm dialog — guard against accidental shutdowns: the default focus sits on Cancel, and only an explicit confirm actually stops the process.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-swarm 下一个 Next WorkbuddySkillGroups4DSH →