DeepSeek Harness (DSH) 的核心设计理念是「一切皆插件」。编写插件通常涉及构建工具链,而 dsh-greet 提供了一个最小化的参考实现。它不依赖复杂的构建步骤,直接注册了一个 greet 工具。
这是什么¶
该插件由 HDylanYueH 维护。它展示了如何编写一个纯 JavaScript 插件,并将其作为 dsh.bundle 发布到 GitHub,供 DSH profile 直接调用。
核心功能¶
- 注册工具:Agent 可以直接调用
greet(name)工具,接收返回值Hello, <name>!。 - 无构建步骤:使用纯 JavaScript,通过
cordis.patch.yml配置层,安装后立即可用。
安装与启用¶
- 执行安装命令:
dsh plugin --profile web add github:HDylanYueH/dsh-greet
- 重启 profile 以加载插件:
dsh --profile web
典型用法¶
在对话中指示模型使用该工具。例如询问:“Use the greet tool to greet Ada.” 模型会识别意图并调用 greet 工具,最终得到结果 Hello, Ada!。
结构与依赖¶
插件包含以下文件:
dsh-greet/
├── package.json # 声明 dsh.bundle (patch: ./cordis.patch.yml)
├── cordis.patch.yml # profile 列出此 bundle 时应用的层
└── index.js # Cordis 插件
依赖项包括 @deepseek-ai/dsh-tools 和 @deepseek-ai/cordis。
移除¶
若需移除,执行:
dsh plugin --profile web remove dsh-greet
适用场景与注意¶
适合希望快速验证 DSH 插件开发流程或需要轻量级工具的开发者。插件以当前 DSH 进程的权限运行,安装前请务必检查源码与许可证(MIT)。