bugmaker2/dsh-plugin-template ↗★ 2
dsh-plugin-template
Minimal host and client plugin template for DeepSeek Harness.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:bugmaker2/dsh-plugin-template说明文档
阅读完整 README ↗dsh-plugin-template
English | 中文
这是一个可运行的 DeepSeek Harness Host + Client 最小插件模板。
包含内容
src/index.ts:Host 侧 Cordis 插件入口;src/client/index.ts:Web Client bundle 入口;- 一个用于验证 Host/Client 接线的共享 Typert Remote:
template/ping; dsh.plugin.json插件元数据;cordis.patch.ymlbundle 组合补丁;- TypeScript、ESLint、Vitest 和 esbuild 配置;
- 已提交的
lib/构建产物,使直接从 Git 安装时无需额外构建即可加载。
模板不包含面向模型的工具、设置页面、文件系统访问或任意子进程执行。请只为实际需求增加能力。
本地安装
dsh plugin --profile web add /absolute/path/to/dsh-plugin-template
重启 Web profile 并刷新页面。cordis.patch.yml 会挂载 Host 入口,package.json 中的 dsh.client 声明会让 Web 端加载 Client bundle。
验证 Remote
插件加载后,Host endpoint 是:
template/ping
它返回 { ok: true }。可以通过正在运行的 Harness Web API,或编写一个 Client contribution,调用该 endpoint。
开发
仓库按照 DSH 0.1.0-rc.6 的 package 布局创建,开发依赖指向本地 profile:
pnpm install
pnpm run check
pnpm run check 会依次执行类型检查、lint、测试以及 Host/Client 构建。lib/ 构建产物会被提交,因为直接从 Git 安装时消费者可能不会执行构建脚本。
可发现性
DeepSeek Harness 官方 README 建议社区插件添加 GitHub topic dsh-plugin。本仓库已经设置该 topic。为其他仓库设置时可以执行:
gh api --method PUT repos/OWNER/REPO/topics \\
-H 'Accept: application/vnd.github+json' \\
-f 'names[]=dsh-plugin'
npm keywords 中也包含 dsh-plugin,但官方 topic 页面使用的是 GitHub repository topic。
许可证
MIT