dsh-market-expand: One-Click Updates and Safe Rollbacks for the DSH Plugin Marketplace

Preface

Installing plugins in DeepSeek Harness (DSH) usually involves the community dshmarket: browsing, installation, grouping, and backup are all convenient. However, there are three types of tasks that the market itself struggles to handle: market plugins require “uninstall then install,” meaning the update logic doesn’t run after uninstallation; plugins with daemon processes often face file-locking issues when updated while running; and for local development plugins mounted via link:, the market doesn’t track version updates for you.

If you don’t want to manually quit, open the command line, and reopen the desktop client for every update—and if you worry that an upgrade might prevent DSH from starting, or that accidentally clicking “Disable All Plugins” might wipe out your profile customizations—you need an assistant layer specifically designed to fill these gaps. Below is an introduction to dsh-market-expand, open-sourced by maintainer Jackbessaliuz (GitHub: Jackbessaliuz/dsh-market-expand). It is positioned as a patch layer for the market, not a replacement; it can be installed alongside dshmarket.

What is this

dsh-market-expand is a workflow extension for the DSH plugin market: you select packages to update in the interface, and after quitting DSH, the assistant completes the installation in the background using the desktop CLI (falling back to pnpm on failure), then automatically reopens the host upon completion. It performs a startup self-check after restart and, if necessary, rolls back only the plugins updated in that batch. It also supports update detection for the “Localized Plugins” group, as well as snapshotting and rollback.

The current npm package version is 1.3.0 (2026-10-22), licensed under MIT. The community directory categorizes it as “Workflow.”

Core Features

One-click Update All

The button is located at the top right of the “Localized Plugins” module on the market’s “Groups” page, next to “Check for Updates.” If the group structure changes, the plugin uses a three-level anchor fallback: it prioritizes the “Localized Plugins” group, otherwise the “Ungrouped” section, and finally the first group.

Clicking it scans the latest registry versions of npm plugins in the current profile (including the market itself); for packages installed via github:, it compares against the highest semver tag in the repository. After selecting targets, they are queued, and a progress window pops up in the bottom right, showing “N queued, waiting for DSH to exit.” After exiting DSH from the tray, the assistant installs in the background, updates dsh.profile.bundles, and automatically launches DSH when finished. Progress is visible once queuing succeeds; clicking again during the queuing period opens details where you can cancel.

Pre-update Risk Warnings

The selection panel labels risks for each package to help you judge before clicking “Update”:

  • Packages crossing major versions, pre-release versions (-beta / -rc), or those that modify official preset injections are considered to require separate handling.
  • Packages with GitHub-only sources are marked as “Installation may be slow,” which does not imply danger.
  • Normal minor version upgrades do not trigger extra warnings. Items with risks are selected by default, indicating potential breaking changes; you can uncheck them to update only relatively stable packages first.

Update Safety Net (Auto-rollback on Boot Failure)

If DSH fails to start after an update and restart, the assistant will: self-check within approximately 60 seconds; if a new crash-*-web-boot.log is found, parse the offending plugin and roll back only the packages updated in this batch; try to finish processing before the “Disable All Plugins” dialog is confirmed, reinstall the old versions, and self-check again. When the desktop client fails to start, if the user confirms disabling all plugins, sanitizeProfile() will modify patches and bundles, making customizations prone to loss—the safety net aims to narrow the problem down to the single update before this step occurs.

If the new host process exits prematurely (e.g., due to lingering subprocesses from the old instance or single-instance lock conflicts), the assistant waits about 8 seconds to confirm if an instance has taken over, avoiding false positives.

Starting from v1.3.0, the self-check also inspects the main window handle: if no window appears after about 90 seconds, it determines the process is stuck, ends it, restarts once, and attempts to restore the window to the foreground. Before restarting the host, it clears accumulated dsh-auth-* cookies and backs up the cookie library to mitigate Web authentication failures or missing windows caused by excessive authentication cookies.

Combination Breakage Check

Some updates may not crash the process but might rewrite official preset injections via dsh.bundle.patch.yml, or depend on entries you have set to disabled: true in your patch, causing the Agent preset page to be blank or sessions to report Unknown agent preset. Such issues may not be written to crash logs. After the update is complete but before restart, the assistant scans the bundle patches included in the updated packages and writes combination risks to the log and progress window. Before updating, it also backs up package.json, cordis.patch.yml, and .dsh-market/state.json to facilitate recovery in extreme cases.

Local Plugin Detection & Snapshots

You must first manually create a group named “Localized Plugins” (本地化插件) on the market’s “Groups” page, place link: plugins inside, and then click Check for Updates. Since v1.2.4, the plugin no longer automatically creates or writes to state.json to avoid conflicts with the market’s memory state causing group misalignment.

Detection compares versions based on the npm package name or GitHub repository configured for each plugin; when updates are available, inline prompts appear. The upgrade path involves automatic snapshotting, merging, and validation; conflicts are converted into suggestions for manual handling. The most recent 3 snapshots are retained for one-click rollback.

Progress & Failure Reports

A native progress window appears within about 1 second of clicking update, with a four-step track: Update → Self-check → Rollback → Restart. It scrolls real log lines such as dsh plugin add …. Success windows remain for about 60 seconds, while failure windows persist; on failure, a market-expand-update-failed-<timestamp>.txt file is written to the desktop, summarizing failed packages, self-check conclusions, combination risks, logs, and backup paths.

Installation & Enablement

Command line installation (replace <profile> with your profile name):

dsh plugin --profile <profile> add dsh-market-expand

For the official desktop client, please install via Settings → Plugins within the app; this profile is managed by the application’s plugin manager.

A proxy may be required when detecting GitHub sources or querying the registry. The plugin reads from environment variables and does not hardcode addresses:

Variable Description
DSH_GIT_PROXY Highest priority, e.g., http://127.0.0.1:7890
HTTPS_PROXY / HTTP_PROXY Standard variables, fallback
DSH_GIT_INSECURE=1 Relax git TLS verification in self-signed certificate environments (disabled by default)

You can also write them in ~/.dsh/.env for automatic loading at startup. If none are set, it connects directly.

Typical Usage

  1. Install this plugin and dshmarket (if the market is not already installed).
  2. Open the market’s “Groups” page; if you need local development plugin detection, manually create a “Localized Plugins” group and add link: plugins.
  3. Click Update All in the “Localized Plugins” or fallback location, select packages in the panel based on risk warnings, and confirm queuing.
  4. Fully exit DSH from the tray and wait for the progress window to finish updating and self-checking; if it fails, check the desktop report or logs and backups under ~/.dsh/market-expand/.
  5. If only maintaining local plugins, use Check for Updates in the same group to upgrade or rollback snapshots as prompted.

Applicable Scenarios & Notes

Suitable for users who frequently batch upgrade npm / GitHub source plugins and want DSH to automatically install and restart after exiting; also suitable for scenarios where you worry a single upgrade might cause startup failure or preset combination breakage and require automatic rollback and backup.

The plugin runs under the permissions of the current DSH process. During the update phase, it rewrites the current profile’s package.json, node_modules, and bundles, and writes queues and backups to ~/.dsh/market-expand/. Please read the source code and MIT license before installation to ensure it meets your security policy. It does not modify your cordis.patch.yml, sessions, or memory banks; it only reads crash logs.

The community plugin directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-market-expand complements the three things the market cannot do: one-click full updates after exit, a safety net at the startup and combination levels, and version detection plus snapshot rollback for local link: plugins. For further details, please refer to the directory page and the repository README.

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

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

Xiaoye