msyrain/ui-dsh-updater: Version Detection and One-click Upgrade in DSH Web GUI

Introduction

When running dsh web from a source checkout or installing the DeepSeek Harness desktop version, version information is often scattered across git tags, GitHub Releases, installation package manifests, and in-app update channels. Manually running git fetch to compare tags and checking the desktop app-update.yml is tedious and prone to errors, leading to incorrect judgments about whether an update is available or if the software is up-to-date when information is incomplete. The msyrain/ui-dsh-updater (npm package name @deepseek-ai/dsh-client-ui-dsh-updater) described below fixes the detection entry point at the bottom of the Web GUI’s left sidebar, directly above Settings. The host-side component aligns the current version with remote facts; when a reliable judgment cannot be made, it simply prompts “Cannot determine” rather than falsely reporting an update.

What is this

This is a DSH profile plugin categorized as Client in SkillHub, maintained by msyrain. It is packaged as an directly installable DSH bundle: the browser-side registers a sidebar.footer.action which opens a panel displaying the current version, latest version, and update status; the host-side provides GET /api/dsh-updater/status and POST /api/dsh-updater/update (mounted on the connection’s transport-neutral authenticated Fetch channel). It declares dsh.bundle.patch via cordis.patch.yml, and includes an install.mjs that writes the same patch line into the profile’s own cordis.patch.yml, requiring no modification of any files in the DSH repository.

Repository: https://github.com/msyrain/ui-dsh-updater
Directory Page: https://www.skillhub.cn/plugins/msyrain/ui-dsh-updater
License: MIT (README / package.json)

Core Features

UI Entry Point

An update entry point is added at the bottom of the sidebar (above Settings). The panel displays “Current Version / Latest Version / Update Available”; it supports one-click upgrades in applicable environments.

Two Profiles, Two Version Logics

dsh web and the DeepSeek Harness desktop version use independent profiles and must be installed separately:

dsh web (Source) DeepSeek Harness Desktop
Current Version Source git tag / commit (or .dsh-build record) Desktop installer manifest (app.asar/package.json, etc.)
Latest Version Source GitHub Repository Desktop app’s own release channel
One-click Upgrade Available N/A (Panel guides to in-app update)
Effective Change Restart dsh service; refresh page if only browser-side changed Restart desktop app

The desktop version’s current version reading order includes DSH_CLIENT_VERSION, app.asar/package.json, and desktop-runtime.json; the latest version comes from app-update.yml and corresponding channel manifests.

No False Reports

The version determination logic resides in the host-side (including src/version.ts). Tests cover semver pre-release sorting, update source manifest parsing, and decideUpdate behavior under various “cannot determine” branches: when facts are incomplete, the UI does not falsely report “Update Available” nor falsely report “Up-to-date”.

Installation & Enablement

This plugin is a standard profile plugin: the installer places a module resolvable by DSH into the target profile (default is a junction pointing to the source directory) and writes to the profile’s cordis.patch.yml, without modifying the profile’s package.json.

Requires Node >= 22 (package.json engines). Commands must be executed in the plugin directory (containing install.mjs); source code can be located anywhere, as the installer calculates the package root based on import.meta.url, and no absolute source path is stored within the profile.

Installing to dsh web

Prerequisite: dsh web has been run at least once, and %USERPROFILE%\.dsh\profiles\web exists. If using a custom DSH_HOME, add --dsh-home <path>.

cd <plugin-directory>
node install.mjs

If repoPath is not configured, the current version is based on the dsh service process’s working directory (the checkout root where dsh web was started); the latest version comes from GitHub. Restart the dsh service once after installation; afterwards, changes to only the browser-side can be applied with Ctrl+F5, but changes to the plugin’s host-side still require a host restart.

Installing to Desktop Version

Prerequisite: The desktop version has been started at least once (%USERPROFILE%\.dsh\profiles\desktop is created upon first launch).

cd <plugin-directory>
node install.mjs --profile desktop

Restart DeepSeek Harness after installation or plugin modifications. To uninstall:

node install.mjs --profile desktop --uninstall

Alternative: dsh plugin add

In environments where the dsh command is available, you can also use the official bundle installation method (for the desktop version, change --profile web to --profile desktop):

dsh plugin --profile web add "<plugin-directory>"

This method installs a copy via pnpm and adds it to the layer stack only upon next startup, lacking the real-time nature of a junction. Choose either the installer or dsh plugin add; using both simultaneously will insert two ui-dsh-updater entries into the layer stack. The installer will notify you if it detects it is already registered.

Junction vs. Copy

By default, node install.mjs creates a junction within the profile. Modifications to the source directory are automatically reflected to both host and browser sides via the junction. If you use node install.mjs --copy, you must sync after changing the source code:

node sync.mjs
node sync.mjs --check

It is recommended to use the default junction mode for development. If you move the source directory, re-run node install.mjs to rebuild the junction.

Verification

dsh --profile web --dump-config | Select-String ui-dsh-updater
Select-String -Path "$env:USERPROFILE\.dsh\profiles\web\cordis.patch.yml" -Pattern 'ui-dsh-updater'

You should see - id: ui-dsh-updater and name: './ui-dsh-updater/lib/index.js'. Then, refresh the dsh web page or restart the desktop app to confirm the update entry point appears above Settings.

Uninstall (Junction/Copy): node install.mjs --uninstall or add --profile desktop. Bundle method: dsh plugin --profile <web|desktop> remove @deepseek-ai/dsh-client-ui-dsh-updater. In junction mode, do not use File Explorer to recursively delete the installation directory within the profile to avoid accidentally deleting the source tree.

Typical Usage

  1. Run node install.mjs in the plugin directory (or add --profile desktop for the desktop version), and restart the host as described above.
  2. Open the DSH Web GUI, click the update entry point at the bottom of the sidebar (above Settings), and view the current and latest versions in the status panel.
  3. Source Version: If an update is determined to be available and the environment allows, you can trigger a one-click upgrade via the panel (corresponding to POST /api/dsh-updater/update; the repository distributes dsh-updater-run.ps1 with the package as the upgrade script). The upgrade is still subject to local git and network constraints.
  4. Desktop Version: The panel is used to know the version and whether a new version exists; the actual upgrade follows the in-app update process.

After modifying src/, you need to build in the plugin directory (the repository comes with a pre-built lib/):

pnpm install --ignore-scripts
pnpm run build
pnpm run verify
pnpm test

Use Cases & Notes

Suitable for users who maintain a dsh web checkout on a single machine for a long time, or who want to see the version and update status at a glance in the GUI for the desktop version. Community directories like SkillHub have no official affiliation with DeepSeek / High-Flyer. Please read the repository source code and the MIT license yourself before installation.

The plugin’s host-side runs with the current dsh process permissions; the one-click upgrade calls git and scripts. Ensure you trust the maintainer and the local checkout path before installing. If configurations like repoPath exist, refer to the profile / plugin documentation.

In junction mode, paths may contain spaces or Chinese characters; do not use Windows PowerShell 5.1 to manually create junctions with New-Item -ItemType Junction, to avoid incorrect transcoding of non-ASCII paths.

Conclusion

msyrain/ui-dsh-updater consolidates DSH version facts into a single location in the sidebar: the source version aligns with GitHub, and the desktop version aligns with the app’s release channel, clearly stating “Cannot determine” when information is insufficient. For details, build instructions, and contribution constraints, please refer to the repository README, CHANGELOG, and CONTRIBUTING.

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

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

Xiaoye