dsh-update-safe: Rollback-Capable Updates for Harness via Source Code Installation

Introduction

When running DeepSeek Harness from source using pnpm dsh web, an upgrade typically means pulling a new tag, reinstalling dependencies, and restarting the process. If the new version fails to start, or if the user data directory has already been written with a new format, the cost of rollback can be high. The community plugin dsh-update-safe (maintainer zudazhuang) breaks down an update into several steps: verifying official releases, isolated builds, trial launch verification, supervised switching, and failure recovery. It targets source-code Web installation scenarios on macOS/Linux. npm global installations and Electron desktop packages are not supported.

What is this

dsh-update-safe is a community workflow plugin published on the SkillHub Plugin Directory and GitHub. The current package version is 0.4.2 (MIT). The description corresponds to the README: official release checking, scheduled updates, supervised switching, and failure rollback (supervised source update with rollback).

It serves only deployments of the “source code directory + pnpm dsh web” type; the plugin runs with the permissions of the current DSH process. Please verify the repository source code and licenses yourself before installation. This directory site and DeepSeek / High-Flyer (Hunyuan) have no official affiliation, and this is not an official app store entry.

Core Features

The following summarizes capabilities explicitly stated in the README, without expanding on details beyond configuration names found in the materials.

Version Checking

  • Check available at startup; an update entry is located at the bottom of the sidebar; manual “Check for Updates” is supported.
  • Scheduled checks can be enabled (default includes startup check + every 30 minutes); the check interval can be configured on the plugin details page, with changes taking effect in real-time. Expired checks are backfilled after the system resumes from sleep; network failures wait for the next cycle without continuous retries.
  • It cross-references GitHub official releases and npm release records; if the two are inconsistent, the update is aborted. Network errors display “Unverified”.
  • Pre-release and stable channels are compared separately, and downgrades are prohibited.

Automated Installation & Time Window

  • The daily installation window defaults to 03:00–04:00. The start time and window duration (15–240 minutes) are configurable; automated installation is disabled by default.
  • Preparation and installation only occur within the window if the system has been idle for the set duration, the supervised launch is active, and there are no uncommitted changes in the source code. If the system is busy for the entire window, it is postponed to the next day; automated installation does not start outside the window.
  • If supervised launch is not in use, automated installation is suspended; however, automated installation preferences can still be saved on the page.

Preparation, Switching, and Rollback

  • Downloads source code from deepseek-ai/deepseek-harness based on the release tag and cross-verifies it with npm metadata; installs locked dependencies and builds in an isolated directory.
  • Upgrades official external DSH dependencies within a copy of user data, performs a trial launch of the entire profile, and checks the actual running version; external plugin versions remain pinned.
  • Generates a private snapshot for uncommitted changes before switching; occupies the maintenance phase of existing Agents during switching, blocking the switch if work is running.
  • The supervision process waits for the old Harness to fully exit before replacing the Web profile dependency environment; if the launch fails, it restores the consistency snapshot and starts the original environment. The failed data copy is located at .dsh.failed-update-* adjacent to the user directory.
  • In the event of a power failure or forceful termination during switching, transaction.json, runtime.json, and locks must be handled according to the README instructions; automatic recovery for such interruptions is not yet available.

Supervised Launch & Mac Login Auto-start

Supervised launch calls pnpm dsh web --no-open via start-harness.sh. The “Switch” can only be completed in this mode; other launch methods can still check and prepare, but cannot switch.

DSH_SOURCE=/path/to/deepseek-harness ./start-harness.sh

DSH_SOURCE, DSH_HOME, and DSH_SAFE_UPDATE_ROOT can be used to specify the source code, user data, and update directories; the update directory must be outside the user data directory. Mac login auto-start requires Python 3; run install-login-start.py (stop any currently running supervised scripts before enabling); use python3 install-login-start.py --remove to disable.

Installation and Activation

Environment requirements (from README): Node.js ^22.19 or >=24, pnpm, Git; Mac login auto-start also requires Python 3. The README notes that the ConfigForms settings interface was verified on Harness 0.2.1-alpha.1; installation commands should follow the current release 0.4.2.

Install from npm within the Harness source directory (version pinned; npmmirror can be configured for domestic use):

pnpm dsh plugin --profile web add dsh-update-safe@0.4.2

Or use a fixed Release URL (the profile records the URL, making it usable when switching machines or cleaning up download directories):

pnpm dsh plugin --profile web add https://github.com/zudazhuang/dsh-update-safe/releases/download/v0.4.2/dsh-update-safe-0.4.2.tgz

You can also download dsh-update-safe-0.4.2.tgz from Releases and then:

pnpm dsh plugin --profile web add /absolute/path/dsh-update-safe-0.4.2.tgz

Local paths are written to the profile; you must reinstall if the file is moved or deleted; prefer using the URL form. Restart Harness after installation. An update entry will appear at the bottom of the sidebar, and the plugin details page name will be dsh-update-safe. Please visit the supervised instance address (default http://127.0.0.1:3080/); other running instances must be restarted to load the new plugin.

Typical Usage

  1. Install the plugin and restart. Set the check interval, channel, and idle duration on the plugin details page; if automated installation is required, first enable supervised launch and confirm the automated installation switch and daily time window.
  2. For daily use, rely on manual checks or wait for scheduled checks; when a new version is available, follow the on-page flow to “Prepare” (isolated build and trial launch), and then “Switch” after confirming everything is correct.
  3. For long-term uptime scenarios: use ./start-harness.sh after setting DSH_SOURCE; on Mac, you can use DSH_SOURCE=/path/to/deepseek-harness python3 install-login-start.py for login auto-start (does not automatically open the browser).

Update records, snapshots, and logs are stored in ~/.local/share/dsh-safe-release-update by default; runtime logs contain local launch authentication information and should not be leaked. The build process strips inherited secret and Git credential environment variables.

Use Cases & Notes

Who it is for: People maintaining the deepseek-harness source tree on macOS/Linux, using the Web profile for development or personal use, who want dual-source verification and a trial run before upgrading/switching, and wish to maintain user data consistency as much as possible upon failure.

Who it is NOT for: Users solely using npm global dsh or the Electron client; scenarios where users are unwilling to use supervised scripts to launch and only need “reminders of new versions” without controlled switching.

Security & Limitations (Key points from README):

  • No additional release signature verification; relies on GitHub HTTPS tag archives and npm integrity metadata.
  • The trial launch mainly checks Host activation and versions; frontend and third-party plugin behavior must still be verified manually after the update.
  • If there are merge conflicts in third-party source code, the update stops and lists conflicting files without overwriting them automatically.
  • The plugin does not automatically stash, commit, push, or reset the user source directory; Git ignored files are not included in snapshot migration.

Conclusion

dsh-update-safe transforms source Harness upgrades from “directly modifying the live environment” into a pipeline of “verify official dual-source → isolated build → trial launch → supervised switch → failure rollback”, combined with time-window and idle-condition controls for automated installation. For further information on packages and releases, see the GitHub Repository; for a directory summary, see the SkillHub Plugin Page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye