Foreword

The upgrade of DeepSeek Harness (DSH) involves replacing a native module (koffi). Installing it directly while the process is running can break module links and cause startup crashes. dsh-check-for-updates is a plugin designed to solve this issue (MIT License, maintained by ShanHaiFish). It automatically checks for new versions the first time the page is opened and provides a one-click upgrade entry through a popup when an update is found.

Core Features

The plugin ensures a stable and safe update process through the following mechanisms:

  1. Automatic check and popup notification: A single update check is automatically triggered the first time the Web page is opened. If a new version is found, a popup appears above the “Settings” button in the lower-left area and provides an [Update to {version}] button.
  2. Decoupled two-phase update: Clicking update only “schedules a task”; after exiting DSH, a separate process completes the installation. This fundamentally avoids the issue where upgrading koffi on Windows while running breaks module links and prevents dsh from starting.
  3. Triple verification after installation: After installation is completed, the standalone updater performs three verifications: npm exit code, on-disk version, and consistency of the koffi native module.
  4. Self-healing for broken koffi links: If verification finds broken links, it automatically restores them from the registry tarball. If the repair fails, it will notify you on the next startup.
  5. Startup self-check: Every time an update is checked, the integrity of koffi is verified. If corruption is found, a warning card is displayed with an [Schedule Repair] button.
  6. Debugging tool: Adds a “Test Network” button for debugging network connections.

Installation and Activation

Use the official DSH CLI to install the plugin:

dsh plugin --profile web add dsh-check-for-updates

After installation, the plugin does not need to be manually enabled; it becomes effective as soon as the Web page is loaded.

Usage

  1. Automatic check: One automatic check is performed the first time the Web page is opened.
  2. Manual check: Go to “Settings > General > DSH Update”, where you can manually click “Check for Updates” or “Test Network”.
  3. Perform update: Click “Update to {version}” in the popup or settings page. This operation only schedules a task; a background process completes the installation after you exit DSH.

Technical Details and Notes

  1. No hardcoded paths: The plugin detects the DSH installation root, version, and node/npm-cli at runtime, without relying on fixed paths.
  2. Mac/Linux path restrictions: If the path contains spaces or non-ASCII characters, it is recommended to copy it to a path without spaces before installing using file:.
  3. Version selection: The plugin retrieves the actual highest version from the npm registry (not limited to the latest tag).

Summary

Through a decoupled update flow and a triple verification mechanism, the plugin resolves the broken native module link issue during DSH upgrades and improves system stability and security.