Power management plugin for DeepSeek Harness - sidebar power button with restart/shutdown menu, self-contained restart engine without external dependencies, graceful session flush.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-power-xc
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xchannel1987/dsh-power-xc
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
DSH Power Management Plugin — Elegant restart and shutdown functionality for DeepSeek Harness via Web UI.
This plugin is based on dsh-power-button, with improvements and optimizations.
✨ Core Features
🔄 Refresh Functionality
- Page Refresh: Refresh the current browser page without restarting the DSH process
- Quick Recovery: Quickly recover when page state is abnormal
- Lightweight Operation: Unlike restart, refresh does not reload plugins and configuration, only refreshes the browser page
🔘 Sidebar Power Button
- Integrated Location: Positioned in sidebar footer, alongside Settings button
- Theme-Aware: Automatically adapts to current theme
- One-Click Access: No command line needed
🔄 Restart Functionality
- Smooth Transition: Windows-style full-screen transition animation
- Auto Reconnect: Page auto-refreshes after restart completes
- Session Preservation: Graceful session flush handling
- Self-Contained Engine: Built-in restart engine with no external dependencies
⏻ Shutdown Functionality
- Confirmation Dialog: Guards against accidental shutdowns
- Progress Display: Full-screen progress overlay
- Safe Exit: Ensures all resources are properly released
🛠️ Restart Engine Design
- Self-Contained: No PowerShell, no taskkill needed
- Detached Process: Spawns a separate .cjs helper process
- Port Waiting: Waits for old process to exit and port to free
- Command Preservation: Maintains original execPath/execArgv/argv/cwd
📣 Command Support
- Model Tool:
restart_harnesstool callable in conversations - Slash Commands:
/restartand/shutdowncommands - Compatibility: Auto-skips commands already registered by other plugins
🌐 Internationalization
- Bilingual Support: Follows profile's
locale.preference - Localized Notifications: Restart/shutdown status messages
🧹 Auto Cleanup
- Log Cleanup: Automatically removes restart-helper logs older than 7 days
- Resource Management: Prevents log file accumulation
📦 Installation
# Using DSH CLI
dsh plugin --profile web add dsh-power-xc
# Or using npm
npm install dsh-power-xc
Restart DSH after installation. A power button will appear in the sidebar footer.
🎮 Usage
Method 1: Web UI
- Click the power button in sidebar footer
- Select "Refresh", "Restart" or "Shutdown"
- Confirm the action
Method 2: Slash Commands
- Type
/restartto restart DSH - Type
/shutdownto close DSH
Method 3: Model Tool
Request the model to restart DSH in conversation; it will invoke the restart_harness tool.
🔄 Refresh vs Restart
| Action | Refresh | Restart |
|---|---|---|
| Reload plugins | ❌ | ✅ |
| Reload config | ❌ | ✅ |
| Process restart | ❌ | ✅ |
| Page refresh | ✅ | ✅ |
| Use case | Page state abnormal | Config/plugin changes |
Why do we need a refresh feature?
- When the page has display issues or is unresponsive, refresh can quickly recover
- After changing DSH settings, refresh can immediately show the effect (some settings require restart)
- Compared to restart, refresh is a lightweight operation that won't interrupt current agent tasks
- Refresh doesn't reload plugins and configuration, suitable for scenarios where only page state needs updating
⚙️ How It Works
User clicks restart
↓
Show transition animation
↓
Spawn detached helper process
↓
Wait for old process to exit
↓
Port freed
↓
Relaunch with original command line
↓
Page auto-reconnects
🔒 Security Design
- Detached Process: Helper runs independently of main process
- Timeout Protection: 30-second timeout mechanism
- Health Monitoring: Health check endpoint
- Graceful Exit: Session flush won't block restart
📄 License
🔗 Links
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38385
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37218
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28812
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9804
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6039
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4659
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.