DeepSeek Harness Plugin

xchannel1987/dsh-power-xc

Stars ★ 1 Downloads (30d) 1,286 Category Tools & Capabilities Added 2026-08-30 npm dsh-power-xc

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

中文 | English

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_harness tool callable in conversations
  • Slash Commands: /restart and /shutdown commands
  • 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

  1. Click the power button in sidebar footer
  2. Select "Refresh", "Restart" or "Shutdown"
  3. Confirm the action

Method 2: Slash Commands

  • Type /restart to restart DSH
  • Type /shutdown to 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

MIT

🔗 Links

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.