DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-power-control

w

dsh-power-control

Manifest valid

Reload, restart, or shut down the DeepSeek Harness desktop app from inside its window.

UI (client)hasBundlePatch

dsh-power-control

Reload, restart, or shut down the DeepSeek Harness desktop app from inside its own window — no trip to the taskbar, no hunting for the tray icon.

A small, dependency-free DSH plugin: one power button in the sidebar footer, one menu, one confirmation dialog. Refresh works in any DSH surface; restart and shut down are Windows-desktop only, because that is where the app process tree lives.

在 DSH 界面里直接「刷新界面 / 重启应用 / 关闭应用」,不用再去任务栏关窗口。 刷新在任何 DSH 环境都能用;重启与关机只支持 Windows 桌面版。

Download

  • Installable bundle: dsh-power-control-1.0.0.zip — unzip it and install the folder (see below).
  • Or clone this repository — its root is the plugin: package.json, index.js, client.js, cordis.patch.yml, locale/, icon.svg. There is no build step and no compiled output to fetch.

Features

ActionWhat happens
Reload windowwindow.location.reload() — rebuilds the web UI from the running Host.
Restart appFlushes open sessions to disk, then restarts the whole desktop app (same executable, same profile, same workspace).
Shut down appFlushes open sessions to disk, then quits the whole desktop app.
  • One 40 px power button in the sidebar footer, beside Settings.
  • Menu opens upward as a frame-wide popover, so no sidebar scroll container can clip it.
  • Destructive actions are confirmed first; the confirmation names exactly what will be interrupted.
  • A status veil covers the window while the process is going down, with a fallback "reload this window" link if the process is still alive after 9 seconds.
  • Light/dark friendly: every color comes from DSH theme tokens (--dsw-alias-*).
  • Chinese and English UI, following the active DSH locale.

Requirements

  • Windows 10/11.
  • DeepSeek Harness desktop app (Electron shell) for restart and shut down. The reload action works in any DSH surface.
  • The plugin manager can load local bundles (the standard DSH plugin surface).

Install

The plugin is a local DSH bundle, not an npm package. Either way works:

Option 1 — the release zip. Download dsh-power-control-1.0.0.zip, unzip it, and install the unzipped folder (the one that contains package.json) with DSH's plugin manager:

plugin_manager install_bundle  target = <path to the unzipped dsh-power-control folder>

Option 2 — clone. Clone it somewhere stable and install the same folder:

git clone https://github.com/w17her/dsh-power-control.git "$env:USERPROFILE\dsh-power-control"

In both cases DSH links the directory into the active profile and reloads the Host, and the power button appears in the sidebar footer immediately. In the GUI, Settings → Plugins shows the same entry; installing from a local folder is the supported path for a bundle that is not published to a registry.

To update a clone: git pull. Client changes hot-reload; Host changes need the plugin to be toggled off and on (or the app restarted).

Uninstall

Disable the plugin in Settings → Plugins, or ask your DSH agent to uninstall the bundle @local/dsh-power-control. Nothing outside the DSH profile is touched.

How it works

DSH's desktop shell gives the page no quit or relaunch channel. The main window's close is intercepted and turned into "hide to tray", and the Host process is a child of the Electron main process: if the Host exits on its own, the parent treats it as a crash and shows the fatal-recovery dialog.

So the plugin splits the job in two:

  1. Host half (index.js, ESM) registers one route, POST /__dsh-power, with { "action": "probe" | "restart" | "shutdown" }. It:
    • verifies the caller comes from the desktop shell proxy (same-origin is not enough, so a foreign Origin is rejected),
    • identifies the desktop target: DSH_DESKTOP_NODE_EXECUTABLE, else the parent process image via Get-Process -Id <ppid>, and refuses to act unless the parent is the same executable (this is what keeps dsh web in a terminal safe),
    • flushes open sessions (ctx.get('sessions') → flush) with a 3 s budget,
    • answers 200, then spawns a detached PowerShell helper and returns. The helper outlives the Host, which is the point: it is the only actor that can kill the tree.
  2. Client half (client.js, window.__ModuleLoader__) renders the button and menu in sidebar.footer.action, and the menu/confirmation overlay in shell.overlay.

The helper script lives in %TEMP%\dsh-power-*\power.ps1, logs to %TEMP%\dsh-power-control.log, waits 700 ms so the HTTP response lands, then Stop-Process -Name <image> -Force. For a restart it waits for the old instance to disappear (up to 30 s), clears the desktop-only environment variables, and Start-Process the executable again — it never starts a second instance while the old one is still alive, so two instances can't race over the profile lock.

taskkill is deliberately not used: it is unreliable here (it can report Access denied even for a PID that no longer exists), while Stop-Process behaves.

Safety and limits

  • Running tasks are interrupted. Both restart and shut down end the app; the confirmation dialog says so. Sessions are flushed first, but an in-flight tool call is not resumed afterwards.
  • Scheduled tasks do not run while the app is closed.
  • The route only accepts requests that arrive through the desktop shell proxy and only on the loopback listener; it never trusts a remote Origin.
  • The plugin has no network client of its own and sends nothing anywhere.
  • Not affiliated with, or endorsed by, DeepSeek.

Repository layout

index.js            Host half: the /__dsh-power route and the helper launcher
client.js           Client half: sidebar button, menu, confirmation overlay
cordis.patch.yml    Bundle patch that inserts the plugin into the profile
locale/en.json      Plugin display metadata (English)
locale/zh.json      Plugin display metadata (Chinese)
icon.svg            Plugin icon

License

MIT — see LICENSE.

Comments

Loading…

Similar plugins

dsh-restart-plugin

by StarMoon-win

Sidebar restart button for DeepSeek Harness Desktop: one click fully quits and reopens the app.

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

Oct 19, 2026

dsh plugin --profile web add dsh-restart

by luumod

Close and restart controls for DeepSeek Harness Desktop and Web on Windows, in Settings → General.

Development & InfrastructureManifest valid

★ 0

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-desktop-lifecycle

by xichen-62

DSH Desktop 右上角电源菜单:关闭 / 重启整个应用。Windows only, MIT.

Manifest valid

★ 12

MIT

JavaScript

Oct 20, 2026

dsh plugin --profile web add dsh-power-menu

by jcfung1122

给 DeepSeek Harness Web 界面加一个电源按钮:一键关闭 DSH 或重启 Web UI。Power controls for the DeepSeek Harness Web GUI: shut down or restart DSH from the sidebar.

Manifest valid

★ 0

MIT

JavaScript

Aug 17, 2026

dsh plugin --profile web add dsh-power

by IHS470

DeepSeek Harness restart button in the DSH desktop window title bar

Development & InfrastructureManifest valid

★ 3

↓ 55/wk

MIT

JavaScript

Oct 3, 2026

dsh plugin --profile web add dsh-plugin-restart

by keyiadiannao

Self-contained power control for DeepSeek Harness: sidebar power button with upward restart/shutdown menu, Windows-shutdown-style overlay, own restart & shutdown engine (no dependency on other plugins

UI & ExperienceManifest valid

★ 9

↓ 38/wk

MIT

TypeScript

Oct 7, 2026

dsh plugin --profile web add dsh-power-button