dsh-plugin-dependency-doctor: Offline Audit of Node Local Dependency Consistency

Introduction

When agents modify Node.js projects in DSH, the common problem isn’t “whether they are connected to the network to install packages,” but whether node_modules on disk aligns with package.json: missing packages, extra packages, or version mismatches. Relying solely on manual npm ls or temporary scripts is costly and not conducive to forming fixed steps in an agent workflow.

The following introduces the community plugin dsh-plugin-dependency-doctor (maintainer thegabopacheco-sudo). It performs local dependency auditing on Node projects without relying on the network, categorizing it under the admin-security direction in the community directory. It is suitable for incorporating “dependency health checks” into the DSH plugin ecosystem rather than running one-off commands separately.

What is it

dsh-plugin-dependency-doctor is an MCP-style plugin for DeepSeek Harness (DSH) (main in package.json is ./dist/server.mjs, current version 0.1.0, MIT license).

Official Description (from README): Performs local dependency auditing on Node projects, covering three categories of issues—missing dependencies in node_modules, extra dependencies, and inconsistent versions with package.json; it requires no network connection throughout.

The plugin is integrated into your DSH configuration in a “everything is a plugin” manner; the entry appears in the independent community directory skillhub.cn. It is not officially affiliated with DeepSeek/Huafan; please check the source code and license yourself before installing.

Core Features

The tools listed in the README are as follows.

Tool Function (from README original)
status Status (Estado)
scan Audit dependencies (Auditar dependencias)

Combining the plugin description, scan is used to perform local dependency auditing; status is used to view the plugin/tool side status. Specific parameters and return fields depend on the tool documentation after installation; this article does not expand on call examples not found in the materials.

Security-related conventions (from README Seguridad):

  • Default read-only; write operations require confirm:true and explicit user consent.
  • Environment variable DSH_DEPENDENCY_DOCTOR_MODE=read-only can disable write operations.
  • Whitelist and audit log path: <DSH_HOME>\cache\dependency-doctor\audit.jsonl (path format follows README; on Linux it usually corresponds to the same relative path under the configured DSH_HOME).

Runtime requirement: engines.node in package.json must be >=20.

Installation and Activation

  1. Add the plugin in DSH → Settings → Plugins and allow installing scripts (the repository contains scripts/postinstall.mjs).
  2. Or use the command line (commands from README, do not rewrite the repository name yourself):
dsh plugin --profile <perfil> add github:thegabopacheco-sudo/dsh-plugin-dependency-doctor

Replace <perfil> with the actual DSH profile name you are using. The installation source is identified as github:thegabopacheco-sudo/dsh-plugin-dependency-doctor.

Typical Usage

The materials do not provide complete scan / status examples with parameters. When implementing, you can follow the sequence below:

  1. After installing and enabling the plugin, call the MCP tool status in a DSH session to confirm the plugin is loaded.
  2. Point the working directory to the target Node project (its root directory should contain package.json, and local node_modules may exist if necessary), and call scan to perform an offline audit.
  3. Handle the three types of discrepancies based on the audit results: install missing dependencies, remove extra packages, and align versions with package.json; if the plugin provides repair actions requiring confirmation, only execute them after understanding the impact and setting confirm:true.

Audit and whitelist-related records will be written to the aforementioned audit.jsonl, facilitating traceability of who triggered what operation and when.

Use Cases and Notes

Who is it for

  • Maintaining Node monoliths or monorepo sub-packages in DSH, wanting to quickly discover “declaration vs disk” inconsistencies after modifying dependencies or merging branches.
  • Wanting dependency checks to not pull from the registry (intranet, offline, or compliance restriction scenarios).
  • Needing to incorporate dependency checks into admin-security type operational habits: default read-only, explicit confirmation before writing, and retaining audit logs.

Notes

  • The plugin reads project directories and DSH_HOME with the current dsh process user permissions; please read the GitHub repository source code and MIT license before installing.
  • Community directory stars and other info may change; refer to the directory page and the repository. When writing, the public stars on the repository were 0, which does not indicate completeness of functionality, only serves as a reference for ecosystem visibility.
  • Do not assume the plugin will execute npm install or modify package.json for you, unless you see explicit write operations and confirm:true requirements in the documentation or tool description.

Conclusion

dsh-plugin-dependency-doctor converges the three categories of inconsistencies in local Node dependencies into the DSH scan / status toolchain, emphasizing default read-only and audit paths, making it suitable as an offline health check step in agent development workflows.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye