Introduction¶
In the DeepSeek Harness (DSH) plugin ecosystem, directly managing an NPM registry is a common requirement. As a network tool, dsh-npm allows agents to directly query and search package information, verify versions, and perform publishing and deprecation operations through registry APIs or the local npm CLI, without manual intervention from developers.
Plugin Overview¶
Name: dsh-npm
Maintainer: zhengjy01
Category: Network tool
License: MIT
The plugin handles query operations by calling the official npm JSON API. For publishing and deprecation operations, it invokes the local npm CLI. It also supports injecting a Token via a configuration file to access private packages.
Core Features¶
The plugin provides the following tool capabilities:
- npm_status: Check the plugin’s runtime status, including the currently active registry, whether a Token is configured, whether the local npm CLI is available, and the configuration file path.
- npm_config: Configure the registry base URL and authentication Token. Configuration items are stored in
~/.dsh/dsh-npm.(permissions 0600), andreset: trueis supported to clear the configuration. - npm_info: Retrieve detailed package metadata, including the latest version, description, author, license, repository URL, publish timestamp, and dependency summary.
- npm_versions: List all published versions of a package in the registry and their corresponding publication dates.
- npm_search: Search the registry by keywords (package name, description, author, score).
- npm_publish: Execute a real
npm publish. Supported parameters includedir(publish directory),tag(tag),access(access level),otp(two-factor authentication),registry(specified registry),dryRun(dry-run mode), andforce(force overwrite). - npm_deprecate: Mark a package or a specific version as deprecated in the registry.
- Web panel: Provides a visual NPM panel on the DSH settings page for configuring the registry and Token (the Token value is masked), quickly querying package information, and searching the registry.
Installation and Activation¶
Before installation, make sure the DeepSeek Harness version is >= 0.1.5-rc.1.
Use the official installation command:
dsh plugin --profile web add dsh-npm
After installation is complete, the DSH Web service must be restarted for the changes to take effect.
Typical Usage¶
- Query public package information: No configuration is required. Use
npm_infodirectly to query metadata for public packages such asexpress. - Configure private package authentication: Use
npm_configto set a private registry URL or Token. - Pre-publish check: Before running
npm_publish, usenpm_infoornpm_versionsto confirm that the target version does not exist and avoid conflicts. - Safe publishing: First use
npm_publishwith thedryRun: trueparameter to perform a dry run, then execute the official publishing after confirmation. - Web interface operations: Open the NPM panel on the settings page to configure settings and perform searches directly.
Applicable Scenarios and Notes¶
- Environment requirement: The plugin requires DeepSeek Harness >= 0.1.5-rc.1.
- Permissions and security: The plugin runs with the permissions of the current DSH process. Be sure to review the source code before installation. The Token is stored in a local file with 0600 permissions and injected into commands via a temporary configuration file. It is never printed in logs or command lines.
- Operation risks:
npm_publishandnpm_deprecatewrite directly to the registry, and the operations are irreversible.- The
force: trueparameter forcibly overrides an existing version (npm blocks overwrites by default). Use it with extreme caution. - Ecosystem note: The plugin repository is a community site and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
dsh-npm provides DeepSeek Harness with complete NPM registry management capabilities, making it suitable for developers who need agents to automatically handle package versions, publishing, or queries. The related repository page and source code are available at: GitHub.