The Web interface of DeepSeek Harness (DSH) usually runs as a separate process. In development or operations scenarios, it is sometimes necessary to completely stop the dsh web process to release the port or force a cold start. The dsh-restart-button plugin adds a floating exit button to the bottom-right corner of the Web interface, allowing users to perform this operation through the GUI.

Core Features

  • Floating button: Fixed to the bottom-right corner, highlighted in red on hover.
  • Confirmation mechanism: After clicking, a themed confirmation card appears to prevent accidental operations.
  • Complete exit: Triggers termination of the dsh web process and releases its listening port.
  • Cold-start ready: After the process exits, the next start will be a cold start.

Installation and Enablement

Install using DSH’s plugin management tool:

dsh plugin --profile web add "dsh-restart-button"

After installation, restart the dsh web process to take effect.

Usage Flow

  1. Click the exit button in the bottom-right corner of the interface.
  2. Click Confirm in the confirmation card.
  3. The dsh web process exits completely, and the port is released.

Working Mechanism and Security

  • Server-side: Registers the POST /api/dsh-restart/quit route, which only accepts loopback requests. After returning a 200 response, it calls ctx.appExit.
  • Client-side: Uses native DOM manipulation, has no dependency on React, and is loaded via window.__ModuleLoader__.
  • Timeout mechanism: If the exit cleanup process hangs, the plugin triggers a forced exit after 8 seconds to ensure resources are released.
  • Security: Does not generate files, does not spawn new processes, and exits only via DSH’s ctx.appExit.

Prerequisites

The plugin requires DeepSeek Harness version 0.1.1-rc.1 or higher.

Summary

The plugin enables complete process exit through simple UI operations, making it suitable for scenarios that require frequent restarts or cold starts. The code is hosted on GitHub and follows the MIT license.