abworks-dev/dsh-plugin-lab--plugins-dsh-tool-hello0

dsh-tool-hello

Workshop and lab for developing, testing, and maintaining DeepSeek Harness Cordis plugins.

包名
dsh-tool-hello
版本
0.1.0
最近更新
2026年9月1日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:abworks-dev/dsh-plugin-lab#c30fef161c49310ea94bdc5f6f91b8cada70ef5a&path:plugins/dsh-tool-hello

dsh-tool-hello

一个最小的 DeepSeek Harness Cordis 工具插件,注册 hello 工具,返回问候语。作为 Lab 中第一个正式插件,用来验证从 templates/minimal-tool 复制→改名→实现→验证的迁移流程。

工具

hello — 接受可选 name 参数,返回 { greeting }

输入: { name?: "DSH" }
输出: { greeting: "Hello, DSH!" }
  • 使用 execute(非 run
  • 参数用字段级 required: true(本工具参数可选,无必填项)
  • output.schema 为 object 且显式 additionalProperties: false
  • output.render 返回 ContentBlock[]

目录

src/index.ts          # Cordis plugin entrypoint and hello tool
tsconfig.json         # NodeNext + strict + declaration -> lib/
package.json          # dsh.bundle.patch and package scripts
cordis.patch.yml      # bundle/plugin row

开发

pnpm install
pnpm --filter dsh-tool-hello typecheck
pnpm --filter dsh-tool-hello build
pnpm test
pnpm check
pnpm --filter dsh-tool-hello pack

cordis.patch.yml 使用标准 insert / plugin row,id 与入口 export const name 均为 dsh-tool-hello

本地安装

在隔离 DSH profile 中生成 tarball 并用 CLI 安装:

pnpm --filter dsh-tool-hello pack
# 在隔离 profile 中执行:dsh plugin add .\dsh-tool-hello-0.1.0.tgz

以当前 DSH 版本的 dsh plugin --help 为准。安装后检查 profile 插件清单、启动日志和工具目录,确认 hello 已注册。真实 Loader/profile smoke test 尚未执行,属于待验证状态。

安全

仓库检查脚本会拒绝跟踪 lib/node_modules、DSH profile、凭据和 session 均已被仓库忽略,不要将这些内容提交。