Introduction

Developers using DSH Desktop on Windows mostly encounter three types of issues:

  1. The pnpm command generated on the desktop side becomes garbled when the path contains Chinese characters, and installing a plugin directly reports “System cannot find the specified path”;
  2. Market (dshmarket) updates only apply to the desktop profile, while the web side requires manual re-installation;
  3. pnpm intercepts newly published packages within 24 hours, so newly listed plugins cannot be installed.

dsh-client-fix targets these three issues. Below introduces its functionality, installation methods, and considerations.

What is this

dsh-client-fix is a DSH Desktop client repair plugin maintained by labi43186-spec, released under the MIT license, current version 1.5.0, with peerDependencies @deepseek-ai/cordis ^4.0.1. It performs three actions: fixes the pnpm shim encoding bug, automatically syncs the web profile to be consistent with the desktop, and pre-adds a minimumReleaseAgeExclude exemption. The README notes that it was made using DeepSeek-V4-Flash.

Core Functions

Fix pnpm shim encoding bug

When DSH Desktop starts, it generates runtime-commands/bin/pnpm.cmd. This file is written in UTF-8, but cmd.exe reads it according to GBK(936). When the path contains Chinese characters (e.g., D:\软件\...), it parses garbled text and reports “System cannot find the specified path”.

The plugin’s approach: 3 seconds after startup, automatically append a line chcp 65001 >nul (without BOM) to the second line of the shim. This is universal across code pages. After the desktop application restarts, if a bad shim is regenerated, the plugin automatically fixes it again, requiring no manual intervention.

fs.watch auto sync web (align to desktop)

The plugin watches package.json and pnpm-lock.yaml in the desktop profile. After changes, it debounces for 800ms and syncs the web profile to be consistent with the desktop:

  • desktop has, web has none → install
  • desktop has none, web has → remove (respecting manual uninstallation)
  • version differs → align with desktop version

Market (dshmarket) updates only operate on the desktop side; the web side is automatically followed by this plugin, requiring no manual operation.

Pre-add minimumReleaseAgeExclude exemption

pnpm intercepts newly published packages within 24 hours, reporting ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION. The plugin automatically writes pkg@version to minimumReleaseAgeExclude in pnpm-workspace.yaml before installation, allowing newly released packages to be installed directly.

Installation & Enable

The package is published to npm; you can choose either of the two installation methods.

Install to web profile (market default target, will automatically sync to desktop after installation):

dsh plugin --profile web add dsh-client-fix

Or install directly to desktop profile (the profile actually loaded by the desktop app; after installation, fs.watch will automatically sync the web side):

dsh plugin --profile desktop add dsh-client-fix

Both methods are equivalent. The difference lies in which profile is written to first; both will be automatically synced and completed later. Note to install using the npm package name, do not write the path.

For local development and debugging, you can use link: to point to the source code directory:

dsh plugin --profile desktop add link:C:/dshplugins/dsh-client-fix

The source code directory is recommended to be under a path without spaces, as paths with spaces will be truncated by the dsh→pnpm forwarding.

Built-in Interfaces

The plugin provides three interfaces:

  • /dsh-client-fix/status: View desktop/web plugin version comparison and sync status
  • /dsh-client-fix/sync: Manually trigger a sync (align to desktop)
  • /dsh-client-fix/repair-shims: Manually fix pnpm/node shim encoding

Outside of the automatic mechanisms, you can use these to manually trigger sync or fix shims.

Suitable Scenarios & Notes

Suitable for these situations:

  • Windows + DSH Desktop, installation path contains Chinese, dsh plugin reports “System cannot find the specified path”
  • Simultaneously using web and desktop profile, do not want to manually sync both sides every time after market updates
  • Need to install newly released plugins that haven’t passed pnpm’s 24-hour time limit

Pre-installation attention:

  • The plugin runs with the current dsh process permissions; it is recommended to check the source code and license (MIT) on GitHub before installing
  • Install using the npm package name, do not write the path
  • When using link: for local debugging, the source code directory should not contain spaces

Summary

dsh-client-fix delegates three repetitive tasks on the desktop side—fixing shim encoding, syncing web and desktop, and exempting new package installation—to the plugin for automatic handling, requiring basically no further attention after installation. DSH’s philosophy is “everything is a plugin,” and client-side repairs like this are filled by plugins, which is a manifestation of this idea.

  • Directory page: https://www.skillhub.cn/plugins/labi43186-spec/dsh-client-fix
  • Source code: https://github.com/labi43186-spec/dsh-client-fix

(The directory is maintained by the community independently, with no official affiliation to DeepSeek / Hypothesis.)