dsh-update-safe: Secure Update and Workflow for DeepSeek Harness Source Installation

Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture, where community capabilities are extended via plugins. This directory site is not officially affiliated with DeepSeek or High-Flyer; all plugins listed are published by the community. If you are running Harness from source using the Web profile, versions typically originate from official GitHub releases and npm metadata, but local workspace or dependency modifications may exist. Manually pulling tags, switching directories, or reinstalling dependencies—especially when overlapping with a running Agent session—can easily result in a half-upgraded state or data format inconsistencies.

Below is an introduction to the update workflow plugin released by maintainer zudazhuang. It is listed on the SkillHub directory as zudazhuang/dsh-upgrade (Category: Workflow). The current source code and installation package are available in the GitHub repository zudazhuang/dsh-update-safe. Starting from version 0.4.1, the npm package name is dsh-update-safe to distinguish it from another dsh-upgrade package by a different author on npm. The README describes it as an “Official version check and safe update plugin for DeepSeek Harness source installations.” It is designed for source-based Web installations on macOS/Linux and is not applicable to npm global installations or Electron desktop packages.

What is this

The plugin provides the following within Harness: version checking against official GitHub Releases and npm release records, configurable scheduled checks, isolated builds and trial launches in separate directories, and switching with failure recovery under a supervisor process. It is compatible with the ConfigForms and plugin detail pages specified in the README for versions 0.2.0-rc.2 and 0.2.1-alpha.1; documentation states it has been verified on 0.2.1-alpha.1. This is a community plugin, not an official DeepSeek product.

Core Features

Version Checking and UI Entry

After installation and Harness restart, an update entry appears at the bottom of the sidebar; the plugin detail page name is dsh-update-safe. You can manually “Check for updates.” Options for “Check for updates on Harness startup” and “Scheduled check for official version” can be toggled independently. Check-on-startup and periodic checking every 30 minutes are enabled by default. Changes to the check interval take effect immediately, and missed checks will be performed after the computer resumes from sleep. In case of network failure, the page displays “Unverified” and waits for the next cycle without continuous retrying. Pre-release and stable channels are compared separately, and downgrading is prohibited. The page displays the last check, next check, and next installation window.

Scheduling and Auto-Installation

Auto-installation is disabled by default. When enabled, it runs daily according to local time within a configurable window. The default installation window is 03:00–04:00; the start time and a duration between 15–240 minutes can be set. After the window begins, it verifies the official version and proceeds with preparation and installation only if the idle duration meets the setting, supervisor start is active, and there are no unhandled conflicts in the source code. If the entire window remains busy, it defers to the next day and does not initiate auto-installation outside the specified window. If supervisor start is not used, auto-installation is suspended, but auto-installation preferences can still be saved on the page.

Preparation, Switching, and Recovery

The preparation phase downloads source code from deepseek-ai/deepseek-harness based on release tags (using HTTPS tag archives, not relying on git clone), verifies the version, and cross-references it with npm release information. It installs locked dependencies and builds in an isolated directory. In a copy of the user data, it upgrades official external DSH dependencies, performs a trial launch of the entire profile, and checks the running version. External plugin versions remain fixed. Before switching, it re-verifies commits, deployed files, sessions, and tasks. Running work prevents switching, and new Agents are rejected during the maintenance period.

The supervisor process waits for the old Harness to fully exit during the switch, copies the user data directory, and replaces the Web profile dependency environment. If startup fails, it first preserves the upgraded user directory copy, then restores the consistency snapshot and starts the original environment. Failed data is located in .dsh.failed-update-* next to the user directory. Update records, snapshots, and logs are stored in ~/.local/share/dsh-safe-release-update by default. If the switching process is interrupted, you must inspect transaction.json, runtime.json, and the process group as described in the README before restoring from a completed snapshot; automatic recovery for such interruptions is not yet available.

Supervisor Start and Mac Login Auto-Start

Full switching capability relies on supervisor start. When in the Harness source directory or an explicitly specified path, you can use the start-harness.sh script within the repository:

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

The script starts the supervised Web profile via pnpm dsh web --no-open. You can use DSH_SOURCE, DSH_HOME, and DSH_SAFE_UPDATE_ROOT to specify the source code, user data, and update directories; the update directory must be outside the user data directory. On Mac, install-login-start.py can be used to configure user-level LaunchAgent login auto-start (requires Python 3). Use --remove to disable it.

Installation and Activation

Environment requirements: Node.js ^22.19 or >=24, pnpm, Git; Mac login auto-start also requires Python 3. Install the fixed version from npm in the Harness source directory:

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

Alternatively, use the fixed URL from the Release attachments (the profile records the URL, allowing reinstallation even after switching machines or clearing the download directory):

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

Restart Harness after installation. The README explicitly states: Do not use dsh plugin add dsh-upgrade to install this plugin; dsh-upgrade on npm belongs to a different author. When migrating from an old package name, first run pnpm dsh plugin --profile web remove <old-package-name> (e.g., the earlier dsh-upgrade or dsh-update-plugin in 0.4.0), then install dsh-update-safe@0.4.1. The internal configuration ID safe-release-update and data directory paths remain unchanged, but do not enable both bundles simultaneously. Supervisor start must be stopped before migration.

Typical Usage

  1. Install dsh-update-safe@0.4.1 in the source tree using the command above. After restart, use the sidebar bottom entry or the plugin page to view the version and check status.
  2. In the plugin settings, toggle or adjust scheduled checks, installation windows, idle duration, and channels as needed. For auto-installation, first start in supervisor mode using DSH_SOURCE=... ./start-harness.sh, then enable the auto-installation options.
  3. When a new version is detected, perform the check and “Prepare update” on the page. Execute the switch after confirming there are no active tasks and the time and idle conditions are met. If preparation or switching fails, use “Re-prepare update” or restore from a snapshot as described in the README, and check the logs in ~/.local/share/dsh-safe-release-update (logs contain local authentication information; do not share them externally).

Local working files, adjustments to package.json / pnpm-workspace.yaml / .npmrc, etc., will participate in the third-party migration. If there are conflicts that cannot be merged automatically, the update will halt, and the original environment will continue running; manual intervention is required before attempting again.

Applicable Scenarios and Notes

This is suitable for developers running Harness long-term via a source-based Web profile on local macOS/Linux, who wish to verify versions against official Releases/npm, and want to reduce the risk of “half-upgrades” through isolated builds and supervised switching.

Please read the plugin and Harness source code as well as the MIT license before installation. The plugin runs with the permissions of the current dsh process and will read/write the user data directory and update storage directory. This plugin verifies npm integrity metadata and GitHub HTTPS archives; the README states there is no additional release signature verification. Business behavior of the frontend and other third-party plugins still needs to be verified in the browser after the update. If official release and npm metadata are inconsistent, no update will occur. If an automatic update fails for the same target version, it will not automatically retry the same version; manual re-preparation is available.

Links

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

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

Xiaoye