dsh-power-xc: DeepSeek Harness Power Management Plugin

DeepSeek Harness (DSH) adopts a plugin-based architecture. During development or debugging, adjusting configurations, reloading plugins, or restarting the Harness process is a common requirement. Relying on command-line operations not only interrupts the current session but may also lose part of the context. The dsh-power-xc plugin introduced in this article aims to solve this problem, providing DSH with graceful restart, shutdown, and page refresh capabilities, and supporting one-click operations via the Web UI.

Plugin Positioning

dsh-power-xc is a power management plugin for DeepSeek Harness, maintained by developer xchannel1987 and released under the MIT License. It achieves safe control of DSH processes by integrating a power button into the sidebar and using an independent restart engine.

Core Features

The plugin mainly provides the following capabilities:

  • Page Refresh: Refreshes the current browser page. Unlike restarting, refreshing does not reload plugins and configurations; it only refreshes the page. It is suitable for quick recovery when the page state is abnormal.
  • Sidebar Power Button: Integrated at the bottom of the sidebar, alongside the settings button. The button style automatically adapts to the current theme.
  • Restart Feature: Includes a Windows-style fullscreen transition animation. After the restart completes, the page automatically refreshes, and plugins and configurations are reloaded. The plugin has a built-in independent restart engine and does not depend on external tools (such as PowerShell or taskkill).
  • Shutdown Feature: Provides a confirmation dialog, with the default focus on the cancel button to prevent accidental operations. The shutdown process displays full-screen progress and ensures resources are properly released.
  • Slash Command Support: Supports /restart to restart DSH and /shutdown to shut down DSH.
  • Model Tool Support: Provides the restart_harness tool, allowing you to ask the model in a conversation to call it to restart Harness.
  • Log Cleanup: Automatically cleans up restart-helper logs from more than 7 days ago, preventing file accumulation.

Installation and Enablement

Ensure your DSH version meets the requirement (DSH ≥ 0.2.0-rc.1). Starting with version 0.2.0, the plugin relies on the Context provided by @deepseek-ai/cordis, so please check the host version before installation.

Use the official CLI to install it:

dsh plugin --profile web add dsh-power-xc

After installation, restart DSH, and a power button will appear at the bottom of the sidebar.

Typical Usage

The plugin provides three operation methods:

  1. Web UI Operation
    Click the power button at the bottom of the sidebar, select “Refresh”, “Restart”, or “Shutdown”, and confirm the operation.

  2. Slash Commands
    Enter /restart directly in the input box to restart DSH, or enter /shutdown to shut down DSH.

  3. Model Tool
    Ask the model in the conversation to restart DSH; the model will call the restart_harness tool to perform the operation.

Applicable Scenarios and Precautions

  • Refresh vs. Restart: If the page has display abnormalities or sluggish responses, use the refresh feature for quick recovery; if you need to reload plugins or configurations, you must use the restart feature.
  • Process Permissions: The plugin runs with the permissions of the current DSH process, which means it cannot perform system operations that require higher privileges.
  • Security Design: The restart process uses an independent helper process, with a 30-second timeout mechanism and health checks, supporting graceful exit.
  • Source Code Review: Although the plugin uses the MIT License, it is recommended to review its source code before installation to ensure it meets your security and compliance requirements.

Summary

dsh-power-xc provides DeepSeek Harness with a lightweight and secure power management solution. By combining the Web UI and command line, it simplifies restart and shutdown workflows during development and improves the tool’s user experience.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye