Tim-ReJet/dsh-plugin-doctor ↗★ 0

dsh-plugin-doctor

Read-only audit of a DeepSeek Harness plugin repository against the dsh-plugin listing rules: dsh.bundle manifest, bundle patch rows, prerelease-safe @deepseek-ai/dsh peer ranges, shipped implementation files, repository age, description, and the dsh-plugin GitHub topic. Runs as the plugin_doctor tool and as a CLI. 适合插件开发者用于在提交前自检清单合规性与依赖范围。

패키지
dsh-plugin-doctor
호환성
미검증
Harness peer 범위
>=0.1.1-rc.1 <0.1.2-0 || >=0.2.0-rc.1 <0.2.1-0
Cordis peer 범위
^4.0.1
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 10. 4.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Tim-ReJet/dsh-plugin-doctor

dsh-plugin-doctor

A DeepSeek Harness host plugin and CLI that audits a repository against the mechanical rules the dsh-plugin directory enforces on a submission — the rules that a repository can satisfy silently, or fail silently, long before a maintainer reads it.

It registers one model-facing tool, plugin_doctor, and ships the same engine as a CLI. Both are read-only: nothing is written to the audited repository, and no network request is made unless network is true.

What it checks

Up to fifteen checks run. Which ones depends on what the repository declares — a repository with no parseable manifest runs fewer — and two run only when their condition exists (a patch outside the package directory, a peer range this checker cannot model).

Check idFails asWhat it reads
manifest.package-jsonerrorthe manifest exists and parses — the root package.json, or a subpackage that declares dsh.bundle
manifest.bundleerrordsh.bundle.patch is declared — a package declaring only dsh.client installs nothing installable
manifest.bundle-patch-fileerrorthe declared patch file exists, is a file, is non-empty
manifest.bundle-patch-location (conditional)warnthe patch is inside the package directory, so it ships in the package
manifest.bundle-patch-rowserrorthe patch is a top-level YAML sequence whose rows are id/name pairs and at least one row names this package
manifest.peer-dependencieswarnno official @deepseek-ai/* package sits in dependencies instead of peerDependencies
manifest.peer-prereleaseerrorevery @deepseek-ai/dsh* peer range admits the harness build in use, prerelease gate included; with no detectable harness version it falls back to a structural check and says so
manifest.peer-range-parsed (conditional)warna peer range uses syntax this checker does not model (it says so instead of guessing)
repo.ageerrorthe oldest root commit is at least one day old, read from git history
repo.implementationerrorimplementation files exist in the manifest directory, reached through main, bin, exports, files, or a src/lib/index.* fallback
packaging.meta-bundlewarnthe bundle ships a patch and behaviour of its own; a dependency list alone is not listed
description.substanceerrorpackage.json carries a description
description.marketingerrorthe description states what the plugin does rather than praising it (word-list heuristic)
packaging.repositorywarnrepository is declared and points at this repository, or says it cannot be confirmed without an origin remote
repo.topicerrorthe GitHub repository carries the dsh-plugin topic (needs --network, otherwise reported as skipped)

Every failure names the concrete fix. The CLI exits 0 when no check fails (and, under --strict, no warning fails), 1 when one does, and 2 on a usage error.

Install

Into a profile, once published to npm:

dsh plugin --profile web add dsh-plugin-doctor

From this repository, before any npm release:

dsh plugin --profile web add github:Tim-ReJet/dsh-plugin-doctor

Both append the bundle layer to that profile's dsh.profile.bundles; the layer inserts one host row named plugin-doctor. Confirm the layer composed:

dsh --profile web --dump-config | grep -A 3 plugin-doctor

For local development against a source checkout, skip the install and load the entry point with a patch overlay:

# doctor.overlay.yml
- insert:
    - id: plugin-doctor
      name: '/absolute/path/to/dsh-plugin-doctor/src/index.js'
      config:
        path: '/absolute/path/to/the/repository/you/are/auditing'
dsh --profile web --patch ./doctor.overlay.yml

Use

The tool, from any session where the plugin is composed:

Run plugin_doctor on this repository and fix what it reports.

It returns ok, errors, warnings, and a report. Its path, strict, and network parameters default to the row configuration in cordis.patch.yml.

The CLI, from a checkout — no install required:

node bin/dsh-plugin-doctor.mjs [path]
FlagEffect
--strictcount warnings as failures in the exit status
--networkverify the dsh-plugin GitHub topic (a GitHub request, via gh or GH_TOKEN)
--harness-version test peer ranges against this harness build instead of detecting one
--now clock override for the repository-age check (testing aid)
--jsonprint the whole result as JSON
--verboselist passing checks too
--emit-entryprint the data/plugins/__.yml entry the directory would want

--emit-entry always single-quotes and escapes the description, because a bare scalar breaks on a colon, on # (silently truncating it) and on a leading YAML indicator such as @. In a monorepo it points the entry at the subpackage that declares dsh.bundle.

The prerelease trap this exists for

An installable plugin peers on the harness packages. Almost every range that looks right is wrong for a prerelease harness, because node-semver admits a prerelease version only when some comparator in the matching branch carries a prerelease tag on the same major.minor.patch tuple:

// looks broad, silently excludes every 0.1.1-* and 0.2.0-* build
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.1 =0.1.1-rc.1 =0.2.0-rc.1 __.yml`, which `--emit-entry` prints — plus the `dsh-plugin` topic on the
repository and a repository at least a day old.

`dshmarket` installs only sources named in that curated registry, so carrying the topic alone makes a
repository discoverable under the topic, not installable from the market.

## License

MIT