dsh-desktop-upgrade: Add "Upgrade DSH" entry to DSH Desktop

Preface

DSH Desktop updates its core via the official installer. However, although the Web settings page defines api.checkForUpdates() and the “Check for Updates” copy, the corresponding component is never rendered. The entry point available for daily use is primarily in the system tray (“Check for Updates…”), with the backend also automatically checking once every 6 hours and sending system notifications. The desktop core is located at <installation directory>\resources\app\node_modules\@deepseek-ai\dsh. The ~/.dsh/profiles/node_modules/@deepseek-ai/* entries under the profile are Junctions pointing to it. Therefore, modifying packages within the profile via npm/pnpm cannot upgrade the main application; the official installer channel must be used.

dsh-desktop-upgrade, maintained by Liu-fu-gui, is a client-side plugin within the DSH ecosystem. It does not modify any kernel files; instead, it supplements the official desktopRuntime.updates pipeline into the Settings page, system tray, and model tools. This allows developers and users to actively check versions and download installers.

What is this

In short: It adds a “DSH Upgrades” section to the DSH Desktop Web Settings, a “Upgrade DSH…” tray item, and the dsh_upgrade Cordis tool. All functions interface with official version services and installer downloads without replacing the core files in resources\app.

Core Features

Web Settings Page “DSH Upgrades”

The browser side (client.js) registers a settings.section to display the current version, the official latest version, and the update channel. It provides a “Check for Updates” button, which reveals a “Download and Install” button when a new version is available and downloadable for the current platform. Clicking download triggers the native desktop confirmation dialog. Upon confirmation, it follows the same installer channel as the official tray item.

Tray “Upgrade DSH…”

The Host side (index.js) registers a tray menu item. It queries the official version service; if a new version exists, it pops up a native confirmation (Download / Later). It then downloads the official installer via desktopRuntime.updates and launches it.

Model Tool dsh_upgrade

Called by agents during conversations; it does not bypass user confirmation:

Action Behavior
status Only reports version information; no popups
check Only checks for updates
upgrade Checks for updates then calls updates.confirmDownload(); downloads and installs the package only after confirmation

Bridge API (Browser ↔ Host)

Same-origin; only accepts trustedHosts from loopback / web runtime; rejects browser cross-site flags:

GET  /dsh-desktop-upgrade/status   -> { ok, result: { status, currentVersion, latestVersion, channel, canDownload, manualUrl } }
POST /dsh-desktop-upgrade/upgrade  -> { ok, result: { ...same as above, accepted } }

upgrade does not perform silent installation; the confirmation dialog is handled by the desktop application.

File Structure (for troubleshooting)

File Role
index.js Cordis plugin: Tray, dsh_upgrade, bridge assembly
bridge.js Version check, upgrade flow, bridge routing logic
client.js Web settings UI bundle
cordis.patch.yml Inserts the desktop-upgrade bundle line into the profile

The actual active locations for the plugin are the profile’s node_modules/dsh-desktop-upgrade and the dependencies + dsh.profile.bundles entries in package.json. These are synced automatically by dsh plugin; manual copying is not recommended.

Installation and Activation

Execute in the DSH Terminal (Settings → Open DSH Terminal) or in a terminal where the desktop dsh is in the PATH. dsh plugin will automatically add --profile desktop, run pnpm in the desktop profile directory, and register the bundle.

Before installation, it is recommended to back up the profile’s package.json and pnpm-lock.yaml as suggested in the README.

# Method 1: Install from GitHub (Recommended)
dsh plugin add github:Liu-fu-gui/dsh-desktop-upgrade

# Method 2: Local development state (Example path from README, replace with your directory)
dsh plugin add link:D:\trea\tmp\dsh-desktop-upgrade

# Confirm installation
dsh plugin list

The materials state that the package has not been published to npm yet. After installation, you must restart DSH Desktop (profile composition and client bundles do not hot-reload). To uninstall:

dsh plugin remove dsh-desktop-upgrade

Then restart the desktop application again.

Typical Usage

  1. Settings → DSH Upgrades: Entering this section automatically checks the official version once. If a new version exists, click “Download and Install”. After agreeing in the native confirmation dialog, the download completes and the installation wizard opens.
  2. Right-click Tray Icon → Upgrade DSH…: The flow is identical to above, but the entry point is in the system tray.
  3. In Conversation: For example, ask the agent to “Check if there is a new version of DSH” (corresponds to status / check), or “Upgrade DSH” (upgrade; this will still pop up a confirmation dialog on screen requiring manual consent).

The README suggests the following for syntax and test validation during local development:

node --check index.js; node --check bridge.js; node --check client.js
node --test test/bridge.test.mjs test/client.test.mjs

Use Cases and Notes

Who is it for: Users and intelligent agent developers who use DSH Desktop long-term, want to actively upgrade from the Settings page or via conversation, and do not want to touch the installation directory core.

Runtime Boundaries (Quoted from materials):

  • Available only for DSH Desktop releases; if desktopRuntime is absent, the tray is not registered, and the tool and bridge return unavailable.
  • In non-packaged mode (isPackaged === false), tray items are not registered; the bridge remains active but returns unavailable.
  • Does not perform in-app silent self-updates; does not replace the resources\app core; only drives the official installer channel.
  • Does not modify or depend on kernel files; only uses public Cordis services (tools, desktopRuntime, webServer) and official version/download endpoints.

Security Habits: The plugin runs with the permissions of the current DSH process. Before installation, read the source code and MIT license on GitHub to confirm the bridge only targets trusted hosts. The DeepSeek Harness Community Directory is an independent site and has no official affiliation with DeepSeek or Quantilla (Huanfang). Please judge for yourself whether to trust the maintainer and the repository before installing the plugin.

SemVer behavior examples recorded in the README: If the official latest version in the beta channel is lower than the current stable version, it will be judged as up-to-date to prevent guided downgrades.

Conclusion

dsh-desktop-upgrade supplements the official upgrade pipeline—originally hidden in the tray and scheduled tasks of DSH Desktop—into the Settings page and the dsh_upgrade tool. The path is consistent with “Check for Updates…”, and it does not touch the kernel Junctions. For installation or source code, see the Community Directory page and GitHub repository:

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

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

Xiaoye