Introduction

If you run DeepSeek Harness (DSH) via git checkout, for example by running pnpm dsh web in the checkout directory, upgrading usually requires manually executing git pull, pnpm install, pnpm clean, pnpm build:official, and then restarting the service; if the update fails, you also need to manually handle the old version.

The philosophy of DSH is “everything is a plugin”. Here is an introduction to dsh-self-update: it is a DSH plugin maintained by Shane-Jay, licensed under MIT, targeting DeepSeek Harness git-source installs, providing in-app checks, one-click update, rollback, and restart capabilities, and an optional native macOS shell.

What is it

dsh-self-update is an in-app self-update plugin for DeepSeek Harness git checkout installs.

The core problem it solves is: enabling git-source installed DSH to complete version checking, updating, failed rollback, and service restart within the app, instead of relying entirely on manual commands.

It only applies to DeepSeek Harness git checkout install scenarios. If DSH is installed via npm i -g @deepseek-ai/dsh, the plugin will hide itself and is not applicable to that installation method.

Core Features

  • Checks for new versions in the background every 6 hours by default, and also supports on-demand checks from the settings page or the macOS menu bar.
  • When a new version is available, a new version entry appears in the sidebar; opening the update panel allows you to view version comparisons and the commands that will be executed.
  • One-click execution of the following update steps, displaying progress step-by-step:
git pull --ff-only
pnpm install
pnpm clean
pnpm build:official
  • Refuses to modify a dirty working tree and will not discard local changes.
  • Provides a guided exit for divergent checkouts: saves local-only commits to a local-backup-<timestamp> branch, then hard resets the working tree to the remote before continuing the update.
  • Supports one-click rollback when update steps fail, and provides a CLI rollback command.
  • Requests service restart via process exit code 75, which can be used with systemd, PM2, or macOS shell to relaunch the service.
  • Optional native macOS shell: triggers Check for Updates… from the menu, and automatically relaunches the service when the process exit code is 75.
  • Hides itself for npm global install scenarios and is not applicable to npm i -g @deepseek-ai/dsh.

Installation and Usage

Execute the following in your DeepSeek Harness git checkout:

cd <your-deepseek-harness-checkout>
pnpm dsh plugin --profile web add dsh-self-update

Restart dsh service once after installation.

The plugin defaults to using the process working directory as the harness checkout; if the actual checkout path is different, you can override it using the plugin config repoRoot.

Typical Usage

On-demand Check

By default, checks for new versions in the background every 6 hours.

You can also check on-demand from the settings page or the macOS menu bar. When a new version is detected, a new version entry appears in the sidebar. Clicking it opens the update panel, which displays version comparisons and the commands that will be executed.

Restarting the Service

The plugin expresses “please restart” via process exit code 75. The runtime needs to handle this exit code in its own way.

Common runtime configurations can be set up as follows:

  • systemd: Configure RestartForceExitStatus=75
  • PM2: Configure autorestart: true
  • bare terminal: Run pnpm dsh web again
  • macOS shell: Built-in handling of exit code 75 and service relaunch

CLI Rollback

When an update fails or needs to be rolled back, you can use the CLI rollback command:

node scripts/rollback-harness.mjs

If you want to roll back to a specific commit explicitly:

node scripts/rollback-harness.mjs --sha <commit>

macOS Shell

Build the macOS app:

node macapp/build-mac-app.mjs

The output location is:

~/Applications/DSH.app

Building requires Xcode command line tools. On first launch, you can right-click and select Open; the app is ad-hoc signed and not notarized.

Opening the Update Panel

You can also open the panel by dispatching an event on window:

window.dispatchEvent(new Event('dsh-self-update:open'))

If you need to check immediately, you can set { check: true } in detail:

window.dispatchEvent(new Event('dsh-self-update:open', { detail: { check: true } }))

HTTP Write Interface

The HTTP write interface requires:

Content-Type: application/json

and requires a local Origin as a CSRF defense.

Suitable Scenarios and Notes

Suitable scenarios:

  • Using DeepSeek Harness via git checkout installation.
  • Wanting to complete version checking, updating, rollback, and restarting within the DSH app.
  • Wanting to provide a unified restart convention for systemd, PM2, macOS shell, or bare terminal.

Unsuitable or noteworthy scenarios:

  • Scenarios where DSH is installed via npm i -g @deepseek-ai/dsh. This scenario has no git working copy, so the plugin hides itself.
  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing.
  • When the working tree is in a dirty state, the plugin refuses to modify it and will not discard local changes.
  • The guided exit / realign path requires the working tree to not be dirty; local-only commits will be saved to a local-backup-<timestamp> branch first, then the working tree will be hard reset to the remote.
  • Exit code 75 restart relies on supervisor recognition; systemd, PM2, macOS shell, or bare terminal need to be configured or operated as described earlier.
  • macOS shell requires Xcode command line tools; the app is ad-hoc signed and not notarized; on first launch, right-click Open.
  • Verified materials show that package.json’s peerDependencies include @deepseek-ai/dsh-client-ui-renderer >=0.1.2-alpha.1 <0.2.0-0; the DSH badge in the README shows >= 0.1.2-alpha.1.

Conclusion

The value of dsh-self-update lies in: incorporating the common update, rollback, and restart processes for DeepSeek Harness git source installs into in-app operations, while retaining the CLI rollback and exit code 75 restart convention.

Reference links:

The directory page listed here is just a community plugin index, not an official app store.