dsh-auto-update: DSH checks for enabled plugin updates on startup

Introduction

In DeepSeek Harness (dsh), plugins are typically installed and enabled alongside the profile’s dependencies and dsh.profile.bundles. Since versions are distributed across the npm registry, manually cross-referencing package.json and running dsh plugin add is error-prone (easy to miss items) and doesn’t align with the “ready to work upon opening the environment” workflow.

Below is an introduction to the community plugin dsh-auto-update (maintainer 1708994293-hue): Every time DSH is opened, it checks in the background whether your downloaded and enabled plugins have forward-compatible semver updates available. If so, it lists them in the UI and asks for confirmation; only after confirmation does it proceed with the official dsh plugin add channel to update. If there are no updates, it remains silent. It is categorized as a Workflow plugin. See SkillHub for the directory page, and GitHub for the source code and documentation.

What is this

dsh-auto-update is a bundle plugin for DSH (npm package name @sueleven/dsh-auto-update, current documented version 1.0.1). It solves the problem of: automatically discovering upgradable versions for enabled plugins after startup, letting you decide whether to update, without overwriting profile configurations.

Compared to “fully manual version checking and one-by-one installation,” the check runs in the background approximately 8 seconds after startup without blocking the UI. The update semantics are consistent with the plugin marketplace, and a prompt to restart DSH is displayed upon completion for the changes to take effect.

Core Functions

The verifiable behaviors from the documentation are as follows:

  1. Check Scope: The intersection of the profile package.json dependencies and dsh.profile.bundles (downloaded and enabled). It excludes packages disabled in the marketplace, non-registry dependencies like file: / link: / git:, and the plugin itself.
  2. Version Comparison: Uses semver to list only forward-compatible upgrades; it will not suggest downgrades.
  3. UI: When new versions exist, a shell.overlay notification card appears in the bottom right corner, displaying “Plugin Current Version -> Latest Version” for each item. The buttons are Update All and Remind Later. It does not disturb the user if there are no updates.
  4. Update Path: Calls the official CLI channel identical to the DSH plugin marketplace (dsh plugin ... add, with --config.minimum-release-age=0), rather than directly modifying profile files.

The implementation is divided into the Host (lib/index.js: delayed checks, state machine, routes /dsh-auto-update/status|check|apply|dismiss), Client (lib/client.js: notification card and polling), and the checker/updater (lib/update.mjs: reads profile, queries npm, executes official add as needed).

Installation and Activation

Requires dsh 0.2.1 or higher (the plugin declares a dsh.bundle manifest). Node engine requirement is >=20 (see package.json).

Install from npm (Recommended, All Platforms)

The npm name dsh-auto-update was rejected for being too similar to an existing package name, so it was published with the scope as @sueleven/dsh-auto-update:

dsh plugin --profile desktop add @sueleven/dsh-auto-update

Install from GitHub

dsh plugin --profile desktop add github:1708994293-hue/dsh-auto-update

Install from Local Directory

# Windows: The script copies the plugin and calls the official dsh plugin channel to install
pwsh -NoProfile -File scripts/install.ps1

On any platform, you can also install via link (replace the path with the absolute path of this repository):

dsh plugin --profile desktop add link:<absolute path to this repo>

After installation, fully exit and restart DSH. dsh-auto-update should appear in the “Plugins” page of the sidebar.

Upgrading from 1.0.0

The frontend module registration name in 1.0.0 missed the npm scope, which could cause Desktop startup failure with the log duplicate factory registration for "dsh-auto-update"; this is fixed in 1.0.1. After fully exiting DSH, execute:

dsh plugin --profile desktop add '@sueleven/dsh-auto-update@1.0.1' --config.minimum-release-age=0

Reopen DSH; if the plugin was disabled previously due to a recovery operation, simply re-enable it in the plugins page.

Typical Usage

No additional operations are needed for daily use: After starting DSH, wait for the default ~8 seconds. If there are upgradable items, a notification card will pop up. Click “Update All” or “Remind Later” as needed.

For scripting or troubleshooting, you can call the updater directly in the plugin directory (the path varies by installation method: for npm installations, it is usually in the profile’s node_modules/@sueleven/dsh-auto-update; for local link: installations, it is mostly in ~/.dsh/plugins/dsh-auto-update):

# Check only, make no changes
node <plugin_dir>/lib/update.mjs --check

# List updatable items (JSON)
node <plugin_dir>/lib/update.mjs --check --json

update.mjs also supports --profile, --dry-run, and --help.

Environment Variables and Logs

Behavior can be adjusted via environment variables (as per the original documentation):

Variable Function
DSH_AUTO_UPDATE_DELAY_MS How long to delay the check after startup (default 8000)
DSH_AUTO_UPDATE_DISABLE=1 Do not check or show notifications for this startup
DSH_AUTO_UPDATE_PROFILE Override profile name (defaults to reading DSH_PROFILE, otherwise desktop)
DSH_AUTO_UPDATE_DATA_DIR Override log/state directory (defaults to the plugin package directory)

Logs and State:

  • <plugin_dir>/logs/auto-update.log: Check and update records
  • <plugin_dir>/logs/plugin.log: Lifecycle and errors
  • <plugin_dir>/state/last-run.json: Structured results of the most recent check

Use Cases and Notes

Who it is for: Developers who have multiple DSH plugins from npm enabled in their Desktop profile long-term, wish to receive passive upgrade notifications at startup, and want updates to go through the official dsh plugin add channel.

Notes:

  • The plugin runs with the current dsh process permissions. Please read the repository source code and the MIT license yourself before installation.
  • It only checks registry dependencies; link:, Git, and other non-registry installations will not appear in the updatable list.
  • Community directories (such as awesome-dsh-plugin) and SkillHub are community indexes and have no official affiliation with DeepSeek / High-Flyer. This plugin is a workflow extension in the ecosystem, not a built-in DSH feature.

Uninstall example:

dsh plugin --profile desktop remove @sueleven/dsh-auto-update

For Windows local installations, you can also use scripts/uninstall.ps1 in the repository to delete the plugin directory.

Conclusion

dsh-auto-update consolidates “aligning versions of enabled plugins” into a single check and user confirmation flow after every startup, reducing manual registry checks and missed updates. For installation instructions, environment variables, and manual check commands, please refer to the README:

  • Directory Page: https://www.skillhub.cn/plugins/1708994293-hue/dsh-auto-update
  • GitHub: https://github.com/1708994293-hue/dsh-auto-update
羽毛球分组比赛记分
小程序二维码

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

Xiaoye