dsh-plugin-scaffold: Minimal Out-of-Tree DSH Plugin Scaffold

Preface

DeepSeek Harness (DSH) breaks capabilities into composable plugin lines (patch bundles). When writing your own plugin, the common problem is not that the business logic can’t be written, but that the three-line division of the bundle, the host/browser split build, and the compatibility contract with a particular DSH core release are easy to wire up incorrectly; changing one place misses another, and only during smoke testing do you discover that the client anchor was never attached to the composition at all.

Below we introduce the dsh-plugin-scaffold (GitHub: cherrchen/dsh-plugin-scaffold) by maintainer cherrchen, under the SkillHub workflow category. It is a minimal out-of-tree scaffold that does not modify any upstream deepseek-harness packages: it sets up the compatibility gate, the host service line, and the browser client graph anchor line correctly first, and comes with a complete build / test / smoke chain; the business side only needs to replace the placeholder implementations in src/service.ts and src/client/index.ts. The repository currently has 0 stars and is licensed under MIT.

What Is This

In one sentence: a runnable DSH plugin skeleton + a rename checklist for when you fork it + a verification chain, not a finished plugin with built-in functionality.

The package name in package.json is @dsh-electron/dsh-plugin-scaffold, described as: compatibility gate, host service line, browser client anchor, and a complete build / test / smoke chain. src/service.ts exposes the placeholder service dshPluginScaffold, and apply in src/client/index.ts is empty—this is the intentional starting point.

Core Capabilities (matching the source material)

Three-line division of the bundle

Through conventions such as cordis.patch.yml, the scaffold fixes the ids of three kinds of patch lines (they need to be renamed together when forking):

Line id Role
dsh-plugin-scaffold-compat Startup gate: exact DSH version allowlist, unsupported / mixed / incomplete verdicts
dsh-plugin-scaffold-service Host service half; injects dshPluginScaffoldCompat, and does not start if the gate fails
dsh-plugin-scaffold-client Mounted on the bare package name, as the sole anchor for the web client graph to read the dsh.client declaration

Build and types

  • Split host/client build: tsdown produces the host ESM and the browser closure factory; tsc produces two sets of declarations separately (build:types + bundle).
  • exports surface: the root entry, ./compat, ./service, ./client all point to the corresponding artifacts under lib/ (see the repository’s package.json).

Compatibility contract

  • Source code is centralized in src/compat/dsh-version.ts: SUPPORTED_DSH_RELEASES, REQUIRED_CORE_PACKAGES, OPTIONAL_CORE_PACKAGES, and peerDependencies must stay consistent.
  • pnpm compat:check verifies that the allowlist, peers, development pin, and installed tree are all four consistent; drift causes an error.
  • The support matrix is an exact-version allowlist. When the version is not on the list or core packages are mixed, the gate service line does not start, and the composition behaves as “this plugin is not installed” (see the repository’s ADR-0001).

Currently recorded DSH support:

DSH series Supported version
0.2.1 0.2.1-rc.2

As a plugin consumer: versions in the table must match exactly; install with dsh plugin and no local Node toolchain is needed. For development from source: Node.js ^22.19.0 || >=24, pnpm 11.25.0 (recommended via corepack), and the development-pinned DSH is 0.2.1-rc.2.

Verification chain

pnpm verify:all runs lint, typecheck, build, test, composition smoke, pack gate, and pack smoke in sequence (it does not include compat:check; the pre-PR documentation requires running compat:check and docs:check separately).

Common script meanings (excerpted from the README):

pnpm compat:check       # allowlist / peers / development pin / installed tree all consistent
pnpm lint               # oxlint
pnpm typecheck          # host + client surfaces, noEmit
pnpm build              # declarations + tsdown bundle
pnpm test               # vitest; asserts against BUILT lib/, requires build first
pnpm smoke              # real dsh plugin add + --dump-config
pnpm pack:check         # tarball members, exports, patch references
pnpm smoke:packed       # rerun composition smoke against the packed artifact
pnpm docs:check         # documentation structure check
pnpm verify:all         # full chain except compat:check

Engineering conventions also include AGENTS.md, .agent/, the nine-section docs/, bilingual README/CHANGELOG, and CI / release / upgrade / diag related scripts.

Installation and Enabling

Install the local repository path into the DSH runtime and check the composition (commands from the README):

dsh plugin --profile web add /path/to/repo
dsh --profile web --dump-config | grep -A4 'dsh-plugin-scaffold'

You should see the compat, service, and client line registration information, for example:

# == @dsh-electron/dsh-plugin-scaffold
- id: dsh-plugin-scaffold-compat
  name: '@dsh-electron/dsh-plugin-scaffold/compat'
- id: dsh-plugin-scaffold-service
  name: '@dsh-electron/dsh-plugin-scaffold/service'
- id: dsh-plugin-scaffold-client
  name: '@dsh-electron/dsh-plugin-scaffold'

If dsh is not on the PATH (for example, running DSH from the source repository), replace dsh in the commands with pnpm dsh.

Please review the repository source code and the MIT license yourself before installing; the plugin runs with the current dsh process permissions, and a path installation means you trust the code under that directory.

Typical Usage

First verification in local development

Inside the scaffold project directory (the development workflow from the material):

export CI=true
pnpm install
pnpm verify:all

The first run needs access to the npm registry. pnpm test depends on the already-built lib/, so in the full chain build comes before test.

Forking into your own plugin

The scaffold’s identifiers are concentrated in a set of names. Following the README table, replace the package.json name and repository.url, the LICENSE copyright line, package name references in source/scripts/tests, the environment variable DSH_PLUGIN_SCAFFOLD_COMPAT, the service keys dshPluginScaffoldCompat / dshPluginScaffold, the Connection channel /dsh-plugin-scaffold, the patch line ids, and documentation filenames containing dsh-plugin-scaffold.

Locate all items to change at once:

grep -rn "dsh-plugin-scaffold\|dshPluginScaffold\|DSH_PLUGIN_SCAFFOLD" \
  --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=lib .

Then adjust the core package list and peerDependencies in src/compat/dsh-version.ts according to actual coupling, and run pnpm compat:check and pnpm verify:all.

Directory structure overview

src/
├── compat.ts                 # startup gate
├── compat/dsh-version.ts     # the compatibility contract itself
├── service.ts                # host placeholder service (replace with business logic)
├── client/                   # browser half (replace apply)
├── contract.ts               # Connection channel name
└── index.ts                  # public barrel; bare-package-name client anchor

For more detailed bundle conventions, development workflow, and troubleshooting, see the repository’s docs/ (e.g. docs/reference/dsh-plugin-bundle.md, docs/development/plugin-development-workflow.md).

Use Cases and Caveats

Who it’s for: teams or individuals who want to build out-of-tree plugins in the DSH ecosystem and want the three-line bundle, dual-end build, and smoke gate from day one; who need an actionable rename checklist when forking a new project.

Not suitable as: a feature plugin you can install and use directly—the current behavior is not yet implemented, with only a placeholder service and an empty apply.

Limitations (README known limitations):

  • No semver commitment on upstream seams; the upgrade lane only provides candidate version evidence, and expanding the support matrix requires manual decision.
  • Exact allowlist: when the host version does not match or packages are mixed, the relevant service line does not start.

The plugin directory page on SkillHub and the GitHub repository are community-maintained and have no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem philosophy is “everything is a plugin”, and this scaffold addresses the workflow of building plugin projects, rather than replacing the DSH itself.

Conclusion

dsh-plugin-scaffold turns the most easily misconfigured DSH plugin infrastructure (the compat / service / client three lines, dual-end build, four-way compatibility check, and verify chain) into a replicable starting point; you only need to replace the service and client behavior and complete the rename checklist. For details and contribution rules, defer to the repository README and AGENTS.md:

  • Directory page: https://www.skillhub.cn/plugins/cherrchen/dsh-plugin-scaffold
  • Source code: https://github.com/cherrchen/dsh-plugin-scaffold
羽毛球分组比赛记分
小程序二维码

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

Xiaoye