dsh-plugin-hello
其他 活跃维护

dsh-plugin-hello

xu1132/dsh-plugin-hello

极简设计的社区插件,注册了可调用的hello工具,部署流程轻量无冗余依赖,可快速集成到对应开发体系中完成工具调用,上手门槛极低。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
4 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:xu1132/dsh-plugin-hello
git clone https://github.com/xu1132/dsh-plugin-hello.git
git clone git@github.com:xu1132/dsh-plugin-hello.git
README.md main

dsh-plugin-hello

A minimal DeepSeek Harness community plugin. It registers a single model-callable tool, hello, that greets a caller by name. It is the smallest complete example of a dsh-plugin bundle and a good starting point for a first contribution.

What it does

When the plugin loads, it registers the hello tool on ctx.tools:

  • Input: name (string, required) — the person to greet.
  • Output: "<greeting>, <name>!" — for example Hello, Ada!.

The greeting prefix is configurable and defaults to Hello.

Install into a profile

dsh plugin forwards to pnpm inside the profile directory, so any pnpm install form works:

dsh plugin --profile demo add github:you/dsh-plugin-hello

The first run initializes the profile with @deepseek-ai/dsh-base, links this package, and appends it to the profile's dsh.profile.bundles because package.json declares dsh.bundle. A git install fetches sources, so pnpm runs the prepare script to build lib/ from src/. pnpm 10+ refuses that script until it is allowlisted; dsh prints the exact allowBuilds entry to copy into the profile's pnpm-workspace.yaml. Verify the composed layer, then boot:

dsh --profile demo --dump-config   # shows a "# == dsh-plugin-hello" layer
dsh --profile demo

Ask the model: Use the hello tool to greet Ada. It calls hello and receives Hello, Ada!.

Configure

Set a custom greeting by overriding the row in the profile's cordis.patch.yml:

- id: hello
  name: dsh-plugin-hello
  config:
    greeting: Howdy

Invalid configuration fails the load.

Development

pnpm install
pnpm run typecheck
pnpm run build     # emits lib/index.js and lib/index.d.ts
pnpm run test

Structure

hello/
├── package.json       # bundle manifest (dsh.bundle), scripts, deps
├── cordis.patch.yml   # the configuration layer the bundle inserts
├── src/index.ts       # the plugin: name / inject / Config / apply
├── tests/hello.spec.ts
├── tsconfig.json
└── vitest.config.ts

License

MIT