Floating power dock for the DSH web GUI: one-click restart or graceful shutdown of the dsh host, loopback-guarded and dependency-free.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:mangomt/dsh-power
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Floating power dock for the DeepSeek Harness web GUI: one-click restart or graceful shutdown of the dsh web host, right from the page — no terminal, no settings menu, no session-management baggage.
Features
- Floating power dock pinned to the window's bottom-right corner (shell overlay, theme-aware): a restart button stacked above the power button, sharing one visual language and one confirm-flow.
- Click → confirm → act: each button opens the shared primitives Modal (取消 / 确认). Shutting down disposes the root fiber (session logs are flushed) and exits cleanly, with a hard-timer fallback. Restarting hands off to a detached helper that waits for the port to free, relaunches the exact
dshinvocation (same argv, same cwd), verifies it binds, and logs a diagnosis under tmpdir when anything fails — then the page polls/dsh-power/healthand reloads itself once the replacement host is back. - Same-origin loopback guard on every process-control route (identical discipline to dshmarket's
trustedRestartRequest): loopback socket only, no forwarding headers,Originmust equalHost. A random website cannot restart or shut down your local dsh. - Zero runtime dependencies — the host half runs on
node:built-ins; the client half only requiresreactand the host-injected ui-primitives. - Bilingual (简体中文 / English), following the DSH client locale conventions.
Requirements
- DeepSeek Harness
dsh≥ 0.1.0-rc.6 (thewebprofile). - Node.js ≥ 20.
Install
dsh plugin --profile web add dsh-power
or from a local checkout:
dsh plugin --profile web add link:/path/to/dsh-power
Restart dsh web. The power dock appears at the bottom-right of the page.
Usage
- Restart: click the ⟳ button, confirm, and wait — the dialog shows progress, and the page reloads itself when the service is back.
- Shut down: click the ⏻ button, confirm. The service exits gracefully; start it again with
dsh web(or your launcher).
How it works
The browser has no OS access, so it cannot kill a process directly. Instead the server acts on itself: the page POSTs to the loopback-guarded route, the host answers the request first (so the page can show the result), then teardown runs:
browser dsh host (Node) helper (detached)
│ POST /dsh-power/restart │ │
├───────────────────────────────>│ guard: loopback + same-origin │
│ 200 {restarting: true} │ │
│<───────────────────────────────│ │
│ │ spawn -e helper, unref │
│ │ wait restartDelayMs (response out) │
│ │ dispose root fiber → flush logs │
│ │ process.exit(0) ✝ │
│ GET /dsh-power/health (poll) │ │
│ × connection refused │ │
│ │ wait until port quiet │
│ │ spawn same dsh argv │
│ │ confirm port bound │
│ ✓ health 200 → reload │ │
Shutdown is the same without the helper: respond, delay, dispose the root fiber, exit.
Routes
| Method | Path | Effect |
|---|---|---|
| POST | /dsh-power/restart |
{restarting: true} → detached relaunch + exit |
| POST | /dsh-power/shutdown |
{shuttingDown: true} → graceful exit |
| GET | /dsh-power/health |
{ok: true} (liveness probe the page polls) |
Non-matching methods get 405; requests failing the loopback/same-origin guard get 403; a disabled restart also gets 403.
Configuration
Row config in cordis.patch.yml (defaults shown):
config:
shutdownDelayMs: 1000 # shutdown: response → graceful self-exit
restartDelayMs: 1000 # restart: response → helper handoff + self-exit
allowRestart: true # false under systemd/launchd/pm2 — the supervisor owns restarts
License
Links
More in this category
yjh051108/dsh-routing-suite★ 7015
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3684
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 322
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 212
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
Fishquito7/dsh-skill-mcp-panel★ 188
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
lire1131/dsh-undo-savepoint★ 179
Undo/redo & rollback system for DSH: every config change is auto-snapshotted; undo/redo/restore to any version from the WebUI or the offline CLI/GUI tools (works even when DSH fails to boot).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.