Introduction

DeepSeek Harness (DSH) is designed around the principle of “everything is a plugin,” which makes it necessary to manage runtime versions through plugins. In multi-environment deployments, manually checking the web process version, the on-disk version, and the latest release on npm, then completing installation and restart, is a repetitive and error-prone process. dsh-version-autoupdate is a two-sided Cordis plugin designed to provide a visualized workflow for version detection, installation, and restart confirmation through a draggable floating capsule.

Features

This plugin primarily provides the following capabilities:

  1. Version visualization: Displays a draggable floating version capsule that reflects in real time the running version, the on-disk version, and the npm target version.
  2. Automatic detection: Checks version status every 60 seconds by default; refreshes more frequently while an update is running.
  3. Package manager support: Supports global installation with npm, pnpm, and Yarn Classic.
  4. API and system integration: Provides HTTP APIs for status queries and update operations; supports offline installation and systemd service management.
  5. Flexible update policies: Supports two channels: preview (including alpha/rc) and stable (official releases only).

Install and Enable

Install the plugin package globally with npm:

npm i -g dsh-version-autoupdate

After installation, load the package through DSH’s plugin management process. The package declares dsh.bundle.patch and exports["./client"]. If manual profile configuration is required, the Host plugin entry configuration is as follows:

- id: dsh-version-autoupdate
  name: dsh-version-autoupdate
  config:
    channel: preview
    updatePolicy: platform

After starting or restarting dsh web, use the floating capsule to view the version and perform check, install, and restart confirmation.

Configuration

The plugin provides the following configuration options:

Field Default Description
packageManager npm Specifies the package manager; supports npm, pnpm, yarn, or auto.
packageManagerPath None Absolute path to the package manager executable (the global installation directory is still verified).
channel preview Update channel. preview selects the semantically highest version (including alpha/rc); stable selects only official releases and falls back if no official release is available.
updatePolicy platform Update policy. platform is the default: Windows allows CLI updates, while Linux/macOS only detect updates. full enables supported CLI update operations.
minAvailableMemoryMb 400 Rejects updates when available memory on Linux is below the threshold; set to 0 to disable.
installTimeoutMs 1200000 Total installation timeout (default 20 minutes).
offlineInstall auto Offline installation policy. Can be overridden with always / never; use never with bundled templates.
systemdUnit dsh-web.service systemd unit name used to stop and start the service during offline installation.
restartDelayMs 2000 Delay after confirming a restart.

Restart logs, offline logs, and status files are stored in a non-empty DSH_HOME (defaulting to ~/.dsh if unset). The plugin does not provide a standalone home configuration option.

Usage and Limitations

  1. Global installation limitation: Global installation is performed only when the package manager’s global directory matches the real path of the currently running package. Global installation is not performed for npx, local projects, source, or unknown installation sources.
  2. Desktop differences: For the desktop edition, use the official DSH update flow; the plugin has not yet been integrated with the desktop native updates bridge, and process restart is not provided for the desktop edition or npx.
  3. Windows behavior: Windows does not restart automatically; users must click confirm manually.
  4. API endpoints: The plugin provides the following HTTP APIs:
    • GET /dsh-version-updater/status
    • POST /dsh-version-updater/check
    • POST /dsh-version-updater/install
    • POST /dsh-version-updater/restart
    • POST /dsh-version-updater/start-update (backward-compatible legacy entry point)

Conclusion

dsh-version-autoupdate provides DSH plugin developers with a visualized version management solution. Through standardized Host configuration and HTTP APIs, it can integrate well into existing deployment workflows. Before use, be sure to confirm that the package manager’s global directory path matches the runtime environment and select an appropriate updatePolicy based on the operating system policy.

GitHub repository