In DeepSeek Harness, restarting or shutting down the app usually requires manual operations or reliance on external scripts. The yuyangouc/dsh-power-button plugin provides restart and shutdown functions directly in the DSH sidebar through a self-contained engine, without relying on external tools such as PowerShell or taskkill.
What This Is¶
The plugin adds a sidebar power button and restart/shutdown menu to DeepSeek Harness. It includes a self-contained restart engine that writes a separate helper .cjs file to manage process lifecycle and ensure automatic reload. The plugin is maintained by YuYangOUC and is licensed under the MIT License.
Core Features¶
- Sidebar Button: Located in the footer action slot, theme-aware, and styled to match the settings trigger.
- Restart/Shutdown Menu: A Windows-style overlay that automatically reloads after confirmation.
- Self-Contained Engine: Writes a separate
.cjshelper file, waits for the old process to exit and the port to be released, then restarts using the sameexecPath/execArgv/argv/cwd. No PowerShell, notaskkill. - Commands and Tools: Supports the
/restartand/shutdowncommands, as well as therestart_harnessmodel tool. - Localization: Supports Chinese and English interfaces.
- Startup Cleanup: Automatically deletes old log files older than 7 days.
Installation and Enabling¶
Install using the official installation command:
dsh plugin --profile web add "github:YuYangOUC/dsh-power-button#main"
After installation, restart DSH to use it. The plugin requires Node.js version >= 22.19.
Typical Usage¶
- Command Line: Enter
/restartor/shutdowndirectly in the chat. - Model Tool: After enabling
enableModelToolin the configuration, therestart_harnesstool can be used during conversations. - Configuration Example:
- id: dsh-power-button
config:
enableModelTool: true
Use Cases and Notes¶
- Safety: Destructive POST requests are protected by same-origin/loopback protection (CSRF); duplicate requests are rejected (returning 409).
- Restart Logic: The restart confirmation is only displayed through UI prompts and is not written to the session log. The restart marker is consumed and deleted at system startup.
- Log Control: Version 0.3.0 disables writing command-line and progress logs.
- Permission Requirements: The plugin runs with the permissions of the current DSH process. Be sure to review the source code and license before installing.
The plugin provides DSH with a reliable, self-contained lifecycle management solution. For more information, visit the plugin catalog or the source code.