Preface¶
In DeepSeek Harness (DSH), plugins are mounted as individual configuration lines via the Cordis Loader. When the apply of a specific line throws an error, a service is registered redundantly, or dependencies are missing, the host marks that line as failed and halts it, while the rest of the system continues to run. The problem is: failed lines remain in an enabled state, potentially causing repeated collisions during the next startup or hot reload, and troubleshooting requires manually digging through the Loader tree.
dsh-plugin-doctor (maintainer hollowfyh, GitHub hollowfyh/dsh-plugin-doctor) performs periodic health checks: upon detecting a failed line, it uses the official API to persist the disabled state and leaves a queryable report and event log. It also supports manual scanning via /doctor when needed. The following section introduces its positioning, capabilities, and configuration methods.
What is this¶
In one sentence: A “plugin doctor” for DSH—it scans the Loader tree for failed lines, automatically disables them when policy allows while writing patch backups, and outputs diagnostic reports.
It is categorized as a workflow plugin. The current version is 0.1.0 (MIT License; package.json declares Node >= 22 and is marked compatible with DSH 0.2.1-rc.2). Community Directory Page: SkillHub · hollowfyh/dsh-plugin-doctor (Independent community site, with no official affiliation with DeepSeek or Quantsider).
Core Features¶
Failed Lines and Auto-Repair¶
When a plugin line conflicts during loading and DSH marks it as failed, this plugin will:
- Periodically scan the Loader tree (manual health checks are also available via
/doctor). - Call
pluginManager.setPluginEnabled(id, false)forfailedlines to persistently disable them (writing to the profile’scordis.patch.ymland triggering hot reload), allowing the remaining plugins to work as usual. - Append every repair to
$DSH_HOME/plugin-doctor/incidents.jsonl; overwrite the entire scan result in$DSH_HOME/plugin-doctor/report.json.
Slash Command¶
Registers /doctor, which allows initiating a health check at any time during runtime, complementing the background scheduled scans.
Dormant Lines (Report Only)¶
Lines that are enabled but have no live fibers (commonly caused by module import failures) will appear in the dormant field of the report; they are logged only and not processed automatically. Import failures often do not generate failed fibers, so these cases require manual verification of module names and dependencies.
Safety Boundaries (Explicitly Stated in README)¶
- Only disables; does not uninstall or modify
package.jsondependencies. - Does not process itself,
dsh-plugin-manager, plugin manifest modules, or read-only lines marked withreadOnlyReason. - There is a cap on the number of lines auto-repaired per startup (see config
maxFixesPerBoot). - Temporary conflicts (e.g.,
HMR transactions cannot be nested) are automatically retried up to 6 times. - Disabled lines can still be manually re-enabled on the “Plugins” page; repair records are queryable.
Installation and Activation¶
Neither the README nor the community directory page provides the original text of a standalone dsh plugin … installation command. The actual distribution form is a DSH bundle with cordis.patch.yml (see dsh.bundle.patch in the repository’s package.json). The installation method follows the plugin installation flow you select in SkillHub or DSH documentation; please read the repository source code and the MIT License yourself before installing, as the plugin runs with the permissions of the current DSH process.
After installation, add the config for this plugin line in the profile’s cordis.patch.yml (excerpted from README):
- id: plugin-doctor
name: 'dsh-plugin-doctor'
config:
autoFix: true # Default true: Automatically disable lines that fail to load
scanDelayMs: 3000 # Milliseconds to delay the first scan after startup
watchIntervalMs: 12000 # Scan interval during runtime (0 = scan only once at startup)
maxFixesPerBoot: 3 # Maximum number of lines to auto-repair per startup
Typical Usage and Reports¶
Automatic Scan Rhythm¶
By default, the first scan occurs approximately 3 seconds after startup, followed by scans every 12 seconds; setting watchIntervalMs to 0 restricts scanning to startup only. If you wish to only view without modifying, set autoFix to false.
Viewing report.json¶
Each scan overwrites report.json. The structure is as follows (see README for field meanings):
{
"at": "…",
"total": 199,
"active": 174,
"failed": [{ "entryId": "…", "moduleName": "…", "readOnlyReason": null }],
"dormant": [],
"fixed": [{ "entryId": "…", "result": { "application": "applied", "changed": true } }],
"skipped": [{ "entryId": "…", "reason": "…" }],
"errors": []
}
Manual Health Check¶
Execute /doctor in a DSH conversation or command entry to trigger the same detection logic as the periodic scan (whether to auto-repair is still determined by configurations such as autoFix).
In-Repository Self-Testing (Provided by Maintainer)¶
In a development environment after cloning the repository (this is not part of the DSH installation steps), you can run:
node test/smoke.mjs
This covers scenarios such as normal disabling, temporary conflict retries, autoFix disabled, and repair caps. For end-to-end fault injection, see test/broken-plugin.mjs (documented in README: the failed line is disabled and written with disabled: true).
Implementation Details and Limitations¶
Failure Detection: Prefers pluginManager.listPlugins() (which includes readOnlyReason and fiberPhase); if unavailable, it directly reads ctx.loader.entries() and maps phases based on fiber.state.
Repair and HMR: Repair goes through the official setPluginEnabled to write patches and trigger HMR. If this plugin creates a timer inside the apply of a hot reload transaction, directly calling repair might be rejected by runExclusive with “HMR transactions cannot be nested.” In the implementation, when available, it wraps the repair inside hmr.executing.exit(callback) to exit the transaction context before calling it.
Out of Scope:
- Browser-side module loading failures, slot-level UI overlap.
- If the host’s Loader tree fails to start up in the very early stage, this plugin cannot start either, requiring manual intervention.
- Import issues recorded as
dormantrequire manual checking of modules and dependencies.
Conclusion¶
dsh-plugin-doctor is suitable for developers who have already installed many DSH plugins and occasionally encounter single-line failed issues without wanting the entire machine to halt: use configurable auto-disable to remove conflicting lines from the hot path, use incidents.jsonl and report.json to keep a record, and use /doctor for instant health checks. Please refer to the repository README for details and updates.
- Community Directory: https://www.skillhub.cn/plugins/hollowfyh/dsh-plugin-doctor
- Source Code and Documentation: https://github.com/hollowfyh/dsh-plugin-doctor