插件目录 / Developer / dsh-plugin-template
dsh-plugin-template
已验证 · 实测可装 bugmaker2
功能简介
dsh-plugin-template — DSH 插件(工具)
推荐 — 实测可用且热门
dsh-plugin-template — DSH 插件(工具) 实测能干净安装、正常启动。110+ stars,社区认可度高,是低风险选择。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-plugin-template
English | 中文
A complete dual-side DeepSeek Harness plugin template. It demonstrates the full plugin surface — a host plugin exposing a Typert Remote, and a client plugin mounting that Remote into a React view — with type-checking, linting, unit tests, CI, and publishing metadata wired up.
Out of the box it registers a greet Remote: the host composes "Hello, <name>" from a configurable prefix, and the client renders the result in a new "Greet" tab.
Structure
package.json # dsh.bundle + dsh.client manifests, scripts, peer deps
cordis.patch.yml # mounts the host plugin row into a profile
dsh.plugin.json # dsh.so registry manifest
src/index.ts # host entry: Config schema + Typert manifest registration
src/runtime.ts # host Remote service (TypertRemoteService)
src/typert.ts # Typert model manifest
src/contract.ts # strict wire contract shared by host and client
src/types.ts # shared host/client types
src/client/index.tsx # client entry: mounts Remote + registers the view slot
src/client/remote.ts # client Remote contribution + typed namespace
src/client/locales.ts # zh / en dictionaries
src/client/view.tsx # minimal React view
src/client/styles.ts # theme-token stylesheet
tests/ # vitest unit tests (contract + runtime)
build.mjs # esbuild dual build (host ESM + client CJS)
.github/workflows/ci.yml
package.json is the only manifest Harness needs. dsh.bundle.patch makes the package an installable profile bundle; dsh.client declares the Web client bundle and the client packages it injects. The host entry is the ordinary Cordis name/apply export; the client entry is bundled to lib/client.js and loaded by the Web harness module loader.
Requirements
- Node.js
>= 22.19(or>= 24) - pnpm
>= 9 - DeepSeek Harness
>=0.1.0-rc.6
Install from a local checkout
pnpm install
pnpm run build
dsh plugin --profile web add .
Restart the Web Harness after rebuilding the plugin. A "Greet" tab appears in the session view ring showing Hello, DSH.
Remove it with:
dsh plugin --profile web remove dsh-plugin-template
Install from Git
dsh plugin --profile web add github:you/dsh-plugin-template
A Git install fetches sources, not built artifacts, so pnpm runs the prepare script to build lib/. pnpm ≥10 blocks that build until you allow it; on the first failed add, dsh prints the fix — copy the package key it shows into the profile's pnpm-workspace.yaml:
allowBuilds:
dsh-plugin-template: true
then re-run the add. That allowance lets the package run code at install time, so only allow packages you trust (and pin a commit).
Development
pnpm run check
check runs typecheck, lint, test, and build. CI runs the same command after pnpm install --frozen-lockfile.
Individual scripts:
pnpm run build # esbuild dual bundle + declaration emit
pnpm run typecheck # tsc over src and tests
pnpm run lint # eslint
pnpm run test # vitest
Renaming the package
Keep these values in sync when you rename:
package.json→name,exports,filesbuild.mjs→ the__ModuleLoader__.loadidsrc/index.ts→namesrc/client/remote.ts→ package id and theTypertRemoteNamespace$…hex of the service keysrc/client/locales.ts→ locale namespace keysrc/client/index.tsx→ slot idsrc/typert.ts→packagesrc/contract.ts→ invocation idscordis.patch.yml→idandnamedsh.plugin.json→id
Discoverability
Add the GitHub topic dsh-plugin to your fork:
gh api --method PUT repos/YOUR-USER/dsh-plugin-template/topics \
-H 'Accept: application/vnd.github+json' \
-f 'names[]=dsh-plugin'
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-plugin-template」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:bugmaker2/dsh-plugin-template Headless(CLI)profile:
dsh plugin --profile headless add github:bugmaker2/dsh-plugin-template 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。