Introduction

In the DeepSeek Harness ecosystem, extending functionality through plugins is a common practice. However, when installing third-party plugins, dependency conflicts, incompatible configuration tree structures, or startup failures often occur. The dsh-plugin-precheck plugin is designed to solve this pain point. Instead of modifying the original environment, it uses isolated trial installation and startup verification to catch potential issues before installation, ensuring system stability.

Core Capabilities

The plugin adds an “Install Precheck” tab to the Web GUI under “Settings → Plugins”. After entering an npm package name, the system performs the following checks in sequence:

  1. Resolve and lock the version: Uses pnpm view to retrieve package information and lock the version number.
  2. Basic compatibility check: Compares peerDependencies, Node engines, and the bundle manifest. If information is missing, it displays “Unable to confirm” instead of proceeding.
  3. Combined configuration check: Compares the new plugin’s cordis.patch.yml with the current configuration tree (retrieved via dsh --dump-config). It detects duplicate IDs (definite errors) or missing patch targets / overlapping targets from multiple plugins (suspected risks).
  4. Isolated trial installation and startup: Copies the profile text files into a temporary DSH_HOME and runs pnpm add to lock the version. Then it performs static verification through --dump-config and attempts a trial startup with --port 0 --no-open. The system waits for the readiness line and a 401 probe, with a 180-second timeout. The isolated environment contains no credentials, does not mount scheduled tasks, and does not touch the production environment.

A production installation is allowed only if all of the above checks pass.

Installation and Activation

Install the plugin using the official command:

dsh plugin --profile web add dsh-plugin-precheck

After installation, restart the DSH Web service to use it.

Working Principles and Interception

The plugin covers the pre-install check on this page and, when interception is enabled, the dsh-market install/update click actions in this browser tab.

The interception logic for marketplace plugins is implemented at the browser level. The dshmarket route is registered as exact, and there is no pre-install hook. The plugin intercepts window.fetch to identify requests such as POST /dsh-market/install and /dsh-market/update. After interception, the system maps the request to an installation source (installation: URL → registry entry → npm package name; update: package name → marketplace target version), runs the full precheck (including an isolated trial startup). Only after it passes is the original request allowed; if it is blocked or canceled, a synthetic 400 error is returned. Users can disable this feature at any time in the “Install Precheck” tab.

Scope and Limitations

Note that this plugin does not cover command-line dsh plugin add operations, nor does it affect other browser tabs.

In addition, passing the checks does not mean the plugin is permanently stable, nor does it mean it has passed a security audit. If marketplace plugins later change their endpoints or transport methods, the interception mechanism may fail (if it cannot be detected, it will not be enabled and will not cause false interception).

Short Conclusion

dsh-plugin-precheck provides developers with a safe plugin installation environment through isolated trial installation and browser-level interception, reducing configuration rollbacks caused by compatibility issues. The plugin is maintained by BaqiF2 and is open-sourced under the MIT license.