Preface

The plugin tree for DeepSeek Harness (DSH) is synthesized only at startup, and plugins in profiles are managed by dsh plugin. This plugin closes the operational loop for Harness itself: there is no longer any need to open a terminal and run npm install --prefix ..., nor to switch to the native DeepSeekDesk settings page. In the Web settings panel, you can view the version, check for updates, install a newer version, and restart it to take effect.

Core Features

The plugin adds an Install / Update page to the web Settings, with the following capabilities:

  • Status at a Glance: Displays the current running version, installation directory, Node / npm version, listening port, and process PID.
  • Check for Updates: Reads dist-tags from the npm registry without relying on a local npm installation; local version comparison can still be performed offline.
  • Online Install / Update: Streams real-time logs, and the button explicitly states the target version (e.g., 在线更新到 v0.1.6-alpha.1).
  • Advanced Options: Supports selecting an update channel (latest / next / alpha / specified version), changing the installation directory, switching the registry, specifying the npm path, and saving the current choices as defaults.
  • Restart Harness: Waits for the old process to exit and then starts a new instance with the same arguments.
  • View harness.log: Displays the last 96KB of the file; tokens and _authToken values in it are masked.

Installation and Activation

Installing the plugin requires the -w (--workspace-root) argument. After installation or uninstallation, Harness must be restarted for the change to take effect.

dsh plugin --profile web add -w github:udisyue/dsh-update

After installation, open Settings in the web interface and the Install/Update page will be available.

Usage

Open Settings → Install/Update, then proceed in the following order:

  1. Review the status card: Confirm the current running version, installation directory, and detection source.
  2. Check for updates: Click the button; the plugin queries the highest version on the registry and its source channel.
  3. Install / update online: Click the primary button to perform the installation; logs are displayed in real time during the process, and the status refreshes automatically afterward.
  4. Configure advanced options: Adjust the channel, specify a version, or change defaults in Advanced Options; these settings can be saved as default values.
  5. Restart Harness: Click the restart button, confirm, wait for the old process to exit, and let the new instance start.
  6. View logs: If troubleshooting is needed, view the tail of harness.log.

Configuration

The plugin supports overriding default behavior through cordis.yml configuration items. Add the following to cordis.patch.yml in the profile directory:

- id: dsh-harness-updater
  name: dsh-harness-updater
  config:
    installDir: '/path/to/harness'      # 默认自动探测
    registry: 'https://registry.npmjs.org'
    npmPath: '/usr/bin/npm'             # 默认自动探测
    channel: 'latest'                   # 默认 latest
    restartEnabled: true                # 默认 true

Values modified on the settings page are persisted to $DSH_HOME/harness-updater/state.json (by default ~/.dsh/harness-updater/state.json, with permissions 0600).

Security and Behavior Details

  • Authentication: Every route is authenticated via connection.requestRejection to prevent DoS attacks and unauthorized access.
  • Data masking: Tokens and _authToken values returned in logs or task logs are automatically masked.
  • No data egress: It does not touch models, does not register system prompts, does not perform telemetry, and only requests the registry to query versions.
  • Token reuse: After restarting Harness, there is no need to obtain a token again; refreshing the browser page keeps the login state.
  • Default install target: By default, it installs the highest version across all registry dist-tags, and the UI explicitly labels the source channel.