DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Power Button — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
P

@yuyangouc/dsh-power-button

Power Button

DSH 的独立电源控制:侧边栏电源按钮,带有向上的“重启/关机”菜单,以及 Windows 关机样式的覆盖层。自带重启和关机引擎(不依赖其他插件),采用 MIT 许可证。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:YuYangOUC/dsh-power-button#5751d7e0666f3f2d074bc9b71e9c0abd354b6753
README兼容性版本
Power button in the sidebar footerRestart / Shutdown menuShutdown confirm dialogShutdown progress overlayRestart completed toast

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/8/28

版本

0.3.0stable
2026/8/28

相关插件

正在加载相关插件…

最新版
0.3.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/8/28
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Better Sidebardsh-better-sidebarDSH web 插件:类似 VSCode 的右侧边栏(资源管理器 / 编辑器 / 终端 / git / 浏览器),按对话会话隔离。提供服务,供其他插件注册侧边栏标签页和文件查看器。Deepseek Ipptdeepseek-ipptiPolloWork PPT Studio 及其精选幻灯片模板,作为原生 DeepSeek Harness 对话视图。Codex Ui@michengai/dsh-codex-uiDSH Codex UI — 为 DeepSeek Harness Web 提供 Codex 风格侧栏、工作区会话树、全局搜索和轮次导航Dream Skindsh-dream-skinDeepSeek Harness 换肤插件(Dream Skin for DSH):8 套 iOS / Linear 式清透冷调的高质感主题 + 弥散光壁纸 + 每款皮肤智能背景 + 强调色 + 主题包分享,把换肤做成材质与配色克制的高级感工艺,而非贴图。在原生 DSH Web 和第三方桌面客户端(DSH Desktop)中运行:8 款原创高端主题、玻璃材质、壁纸 2.0

README

dsh-power-button

English | 中文

Fork notes — this is a maintained fork of the upstream keyiadiannao/dsh-restart-button (MIT). Changes vs. 0.2.0: light-theme toast/overlay text contrast fix, log output disabled (restart-helper-*.log / dsh-web.log), power menu order flipped (Shutdown above Restart), and the power button height aligned to the 42px Settings trigger. See CHANGELOG.md.

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 waits for the old process to exit and the port to free, then relaunches DSH with the same execPath/execArgv/argv/cwd. No PowerShell, no taskkill.
  • /restart and /shutdown commands, plus a restart_harness model tool (same name as anweat/dsh-restart; registration is skipped when another plugin already owns the name).
  • Localized UI and host notices (zh / en), following the profile's locale.preference.
  • Startup housekeeping: legacy restart-helper-*.log files older than 7 days are pruned from the runtime directory (0.3.0 stopped writing new logs).

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.

Shutdown confirm dialog

④ Shutdown progress overlay — a Windows-style full-screen transition showing the current stage while the process winds down.

Shutdown progress overlay

⑤ Restart completed toast — after the page auto-reloads, a success notice confirms DSH is back.

Restart completed toast

Install

dsh plugin --profile web add "github:YuYangOUC/dsh-power-button#main"

Restart DSH; a power button appears in the sidebar footer. Requires Node ≥ 22.19.

Configuration

The plugin is configured through the profile's cordis layer (cordis.patch.yml or the settings UI):

KeyDefaultMeaning
enableModelTooltrueRegister the restart_harness model tool. Set false to keep restart exclusively on the GUI button and /restart.
maxDelayMs5000Upper bound (ms) for the model tool's delayMs argument. The effective floor is 1000 ms.

Example:

- id: dsh-power-button
  config:
    enableModelTool: true

How it works

click power → menu → Restart
[host]    POST /api/dsh-power-button/restart
          → write ~/.dsh/dsh-restart-helper-<pid>-<ts>.cjs
          → spawn `node <helper>` (detached, windowsHide)
[helper]  wait for old PID to exit → wait for port to free
          → spawn DSH again with same execPath/argv/cwd → self-delete
[host]    terminate after the HTTP response flushes
[client]  poll health → confirm new instanceId → auto reload

Shutdown posts /api/dsh-power-button/shutdown and terminates without relaunching. Because it is irreversible (the process must be started manually), the GUI confirms shutdown in a dialog before it fires — a second click is required. (/shutdown and the model tool remain single-action by design; the model never exposes shutdown.)

Design notes (from real issues hit during development):

  • The helper must run outside the process tree (detached + unref), otherwise terminating DSH kills the helper mid-flight.
  • The helper is a real .cjs file, not node -e: multi-line node -e scripts are mangled by Windows CreateProcess and die with a silent SyntaxError.
  • Restart success is confirmed by a per-process instanceId that must change (old → new), so a brief outage alone never fakes success.
  • Durable-write quiescence: after the old process exits and the port frees, the helper polls every session log's (size, mtimeMs) until two consecutive samples are identical (bounded at ~15s) before relaunching. The old process's session write-behind buffer can keep draining after its main loop exits; relaunching into a file that is still being appended interleaves stale seq numbers and corrupts the session — this check closes that window.

Safety

  • Destructive POSTs are protected by a same-origin / loopback guard (CSRF): the socket must be loopback, Host must be a loopback authority, and a browser Origin must match.
  • An at-most-once latch rejects duplicate transitions (a concurrent second POST gets 409).
  • The model tool's delayMs is floored at 1000 ms — the model cannot kill the process before its own turn settles.
  • The restart marker is consumed (deleted) on boot, so a later ordinary launch never misreports a restart.
  • No command-line or progress logs are written at all (0.3.0 disabled restart-helper-*.log and dsh-web.log); the helper and marker files are written 0600, the runtime directory 0700.

Restart confirmation — UI toast, never written into a session

After a successful restart the plugin shows a small localized toast ("Restarted" / "已重启" depending on the UI language) in the corner of the UI. This is purely a UI notice: nothing is written into any session log. (This replaced an earlier design that appended a synthetic assistant/message (turn: 0, step: 0) into the resumed conversation — that approach tripped the token-meter's step-pairing invariant and could corrupt large sessions, so it was removed. Tracked upstream: deepseek-ai/DeepSeek-Harness#802.)

Mechanics:

  • On boot, if the restart marker was consumed, /health reports restarted: true, fromInstanceId: <old>.
  • The client checks /health once after load; when restarted is true it shows the toast, then ACKs via POST /api/dsh-power-button/notice-shown so a later refresh does not re-show it.
  • Because the confirmation never touches a session file, a restart can no longer corrupt session logs or leave unpaired events behind.

Development

npm run build        # tsdown: host + client bundle
npm run typecheck    # tsc --noEmit
npm test             # vitest: marker lifecycle, delayMs clamp, argv redaction, log pruning

Tests isolate DSH_HOME via a vitest setup file, so they never touch your real ~/.dsh. Artifacts: host at lib/index.js, client bundle at lib/client.js (both committed — git installs are build-free).

License & Attribution

MIT. The "detached helper relaunch" idea follows anweat/dsh-restart (MIT); the implementation is independently written (real .cjs file, no PowerShell, dynamic port), no code copied.