dsh-hello-plugin
August 16, 2026 · View on GitHub
A minimal plugin for DeepSeek Harness that demonstrates how a plugin registers a settings namespace (Host half) and renders an editable settings card for it (Client half).
What it does
- Host half (
src/index.ts): registers a settings namespacehellowith four fields (greeting,showBadge,reminderEvery,allowedPaths). - Client half (
src/client/*): mounts the namespace as a standalone settings page via thesettings.sectionslot (id: 'dsh-demo-section'), editing the same namespace directly throughapi.settings.update.
The card appears at Settings → Plugins → Plugin configuration → dsh-hello-plugin.
Install
Use the plugin manager built into DeepSeek Harness. From inside this plugin
directory (dsh is installed globally):
dsh plugin --profile web add .
Restart Harness, then open Settings → Plugins → Plugin configuration. You will see the dsh-hello-plugin card (and a standalone page under Settings → dsh-hello-plugin).
DeepSeek Harness is still in Developer Preview. This release targets
0.1.0-rc.6.
Project layout
├── package.json # dsh.bundle + dsh.client + exports ./client
├── cordis.patch.yml # bundle 贡献的配置层(注册插件条目)
├── tsconfig.json # strict Host/Client 类型检查
├── tsdown.config.ts # 一个配置同时构建 Host + Client 半体
├── src/
│ ├── index.ts # Host 半体:注册 hello 设置命名空间
│ └── client/
│ ├── index.tsx # Client 入口:inject / apply / slot 注册
│ ├── DemoSettingsSection.tsx # settings.section 独立页
│ ├── locales.ts # zh/en 多语言字典
│ ├── settings.ts # 命名空间 + 类型 + 草稿 + decode + settingsOps
│ └── styles.ts # 设置卡片样式
├── tests/ # vitest 单元测试
└── lib/ # 构建产物(pnpm run build 生成)
Development
pnpm install
pnpm run check # typecheck + test + build
Two halves, one repo:
| 改什么 | 产物 | 命令 |
|---|---|---|
Host 源码 src/index.ts | lib/index.js | pnpm run build(或 --patch 指向源码) |
Client 源码 src/client/* | lib/client.js | pnpm run build(或 tsdown --watch) |
License
MIT