Introduction

The philosophy of DeepSeek Harness is “everything is a plugin.” In practice, the main program updates, third-party plugin updates, backups, rollbacks, and restarts are often scattered across different locations: the main program might come from npm, plugins might come from npm or GitHub, and version checking methods are not entirely consistent.

dsh-update-checker provides a set of update management endpoints for DeepSeek Harness’s Web GUI: checking the update status of the main program and installed plugins, displaying notifications on the page, and supporting updates, backups, rollbacks, and restarts. It is not an official app store or a replacement for npm/GitHub version managers, but rather centralizes the update workflow into the DSH interface.

What Is This

dsh-update-checker is a DSH plugin maintained by Airmetro under the MIT license. Its core purpose is to perform status checks, backups, updates, rollbacks, and restarts for both the DeepSeek Harness main program and third-party plugins within a single Web GUI.

It primarily targets developers who are already using DeepSeek Harness and want to reduce manual version comparisons and manual execution of update commands.

Core Features

Main Program Update Check

The plugin checks for updates to the DeepSeek Harness main program and compares it with the npm latest version. This check follows stable-first and semver-aware rules, so pre-release latest versions won’t cause false positives.

Plugin Update Check

The plugin scans installed unofficial plugins and cross-references versions from both npm and GitHub sources to determine if higher versions are available.

Update Lifecycle

The plugin handles the entire update lifecycle for the main program and plugins in one place, including checking, backing up, updating, rolling back, and restarting.

The main program update includes:

  1. Dry-run protection: If a remove operation is planned, the process is aborted.
  2. Backup.
  3. Adaptive layout installation: Either in-place or using the -g flag.
  4. Post-installation verification: Checks that installed == latest.

Plugin updates use a temporary directory for installation and copying, with dependency version alignment; on npm ≥ 12, --allow-scripts is automatically used.

Updates and rollbacks are persisted to the profile’s package.json and lockfile to prevent subsequent installations from silently reverting.

Rollback

The plugin provides real rollback endpoints:

  • Main program: POST /rollback
  • Plugin: POST /plugin-rollback
  • Backup list: GET /backups.json

The GET /backups.json endpoint lists backup information for both the main program and plugins.

Restart Watchdog

The restart process generates a launcher based on the current process’s argv, kills by PID + port, and confirms recovery by listening on the port and probing for an HTTP 200 response.

GUI Notifications and Write Route Protection

The plugin provides locale-aware banners in the DSH Web GUI, following the DSH UI language (zh/en). It can display update, latest, and failure states, and supports suppression and change summaries.

Write routes require requests to include confirm:true and originate from loopback addresses, i.e., 127.0.0.1 or ::1.

Installation and Enabling

First, note a critical limitation: do not run npm install directly in $DSH_HOME/profiles, as npm may delete the entire node_modules directory.

The recommended approach is to install the package to a temporary directory first, then copy it to the DSH profile’s node_modules:

npm i dsh-update-checker --prefix <temp-dir> --no-save
cp -r <temp-dir>/node_modules/dsh-update-checker $DSH_HOME/profiles/node_modules/

This step places the plugin package in a location where the profile can resolve it, avoiding triggering an npm install directly in the profiles root directory.

Next, add the plugin entry in $DSH_HOME/profiles/web/cordis.patch.yml:

- insert:
    - id: dsh-update-checker
      name: 'dsh-update-checker'

Then, either apply the patch via HMR or restart dsh web, and finally refresh the page.

Typical Usage

The host routes include:

  • status.json
  • suppress
  • update
  • rollback
  • backups.json
  • restart
  • restart-status.json
  • plugins.json
  • plugin-update
  • plugin-rollback
  • plugin-exclude

The client checks for updates once on page load and then every 6 hours. The settings page will include rollback buttons.

Use Cases and Notes

Suitable for the following scenarios:

  • Using the DeepSeek Harness Web GUI and wanting to centrally view the update status of the main program and plugins.
  • Plugins may come from both npm and GitHub, requiring unified comparison for higher versions.
  • Wanting a backup before an update and a rollback entry after an update.
  • Needing to perform checks, updates, rollbacks, and restarts in one place.

Note the following limitations:

  1. Windows only: The restart flow spawns PowerShell; on other platform layouts, the update/restart buttons require code adaptation.
  2. Host code changes require a service restart; client changes take effect on the next page refresh via HMR.
  3. Backups are written to $DSH_HOME/dsh-update-checker-backups/<timestamp>/ before npm install.
  4. Do not run npm install directly in $DSH_HOME/profiles, as npm may delete the entire node_modules directory.
  5. The plugin runs in the dsh Web process environment with the permissions that process has; review the source code before installation and confirm that the MIT license meets your usage requirements.

Conclusion

The value of dsh-update-checker lies in centralizing the update workflow for the DeepSeek Harness main program and third-party plugins from scattered commands into the Web GUI: checking, backing up, updating, rolling back, and restarting are all handled within the same plugin.

GitHub Repository: https://github.com/Airmetro/dsh-update-checker