Introduction

The plugin mechanism of DeepSeek Harness (DSH) allows mounting multiple plugins via a combination file. In practical development, the same module may be mounted repeatedly; when a plugin activates, it might throw an error, or some plugins might remain pending while waiting for an injection service that no one provides. If one relies on manual checks of the combination file, loader states, and error messages, the troubleshooting chain is quite long.

dsh-conflict-guardian places these checks during every DSH startup: it first scans the plugin states in the loader, then performs automatic handling for duplicate mountings, activation failures, missing dependencies, and non-running instances, and finally pops up a conflict report on the Web interface.

What is This

dsh-conflict-guardian is a DSH plugin maintained by baisama-cloud, licensed under MIT. It addresses the problem where startup-stage plugin conflicts are hard to detect and are not handled in a timely manner.

It does not rewrite plugin source code, nor does it parse service registrations inside plugin source code; the detection targets the loader’s runtime state and static configurations in the combination file.

Core Features

Below introduces several types of detection and handling methods.

Duplicate Mounting

  • When the same module is mounted repeatedly with exactly the same configuration, it is considered a duplicate instance;
  • The instance loaded after automatic deactivation is stopped, and the first one is retained;
  • Multi-instance Cordis with different configurations will not be misjudged.

Activation Failure and Missing Dependencies

  • Plugins that throw errors during activation (failed) will be automatically deactivated, and the failure reason will be reported;
  • Plugins that are pending because they are waiting for an injection service that no one provides will be automatically deactivated, and the missing service names will be listed.

Auto Recovery

  • For entries that are enabled but have no running instance, the plugin will attempt recovery;
  • Whether the recovery succeeds or not will be indicated.

Combination File Static Check

  • Static scan of the combination file;
  • When configuration line IDs are repeated within the same file, a warning is issued;
  • The configuration file is not modified.

Web Interface and Interface

  • When opening the DSH page, if there are conflicts, a report pops up;
  • The report displays the conflict location and handling result item by item;
  • Supports closing with “Rescan” or “Got it”.

Regarding the interface, when installed statically, the host lib/index.js registers the following on webServer:

POST /conflict-guardian/report
POST /conflict-guardian/rescan

During dynamic plugin runtime, the following harness.handle entry points are provided:

harness.handle('conflict-report')
harness.handle('conflict-rescan')

During dynamic plugin runtime, a conflict_check tool callable by the model is additionally registered.

Installation and Enablement

The installation/packaging steps given in verified materials are:

npm pack

Runtime environment requirements:

node >= 20

The way to enable it is to add the package to the plugin list in DSH configuration and declare an insertion entry in cordis.patch.yml:

- insert:
    - id: dsh-conflict-guardian
      name: 'dsh-conflict-guardian'

If running in static installation mode, lib/client.js is the bundled browser bundle; the host lib/index.js provides the aforementioned route entry points.

If running in dynamic plugin mode, the host also provides the harness.handle entry points and registers the conflict_check tool.

Typical Usage

  1. After installation and mounting, the plugin automatically scans the loader every time DSH starts;
  2. After detecting conflicts, they are immediately handled automatically, such as deactivating conflicting instances or recovering non-running instances, and a report is generated;
  3. When opening the DSH page, if there are conflicts, a report popup appears; you can click “Rescan” or “Got it” to close it;
  4. In dynamic plugin mode, the model can check at any time via the conflict_check tool;
  5. If you need to permanently disable a conflicting plugin, you can set disabled: true for that line in the combination file, or delete the redundant line.

Applicable Scenarios and Notes

It is suitable for developers maintaining DSH plugin combinations who wish to reduce the cost of troubleshooting conflicts during the startup phase.

Please note:

  • Deactivation and recovery are runtime operations and do not modify any cordis.yml;
  • After restart, it loads according to the original configuration and runs the detection again;
  • The conflict_check tool is only registered in dynamic plugin mode; static installation does not introduce extra dependencies;
  • Conflict detection is based on the loader’s runtime state and static analysis of the combination file; it does not parse service registrations inside plugin source code;
  • The plugin runs with the permissions of the current DSH process. You should check the source code, dependencies, and license before installation. The license is MIT.

Conclusion

The value of dsh-conflict-guardian lies in concentrating these startup issues—such as repeated mounting, activation failures, missing dependencies, and non-running instances—into a single scan for processing, and providing location and results through a Web report.

GitHub Repository: https://github.com/baisama-cloud/dsh-conflict-guardian . The community directory page URL is not provided in verified materials, so this article does not add a link.