start-dsh-plugin
start dsh plugin
ikuokuo
@ikuokuo
⬇ 2
★ 0
main
安装
dsh plugin --profile web add github:ikuokuo/start-dsh-plugin
需要可复现安装时,可在仓库后追加 #commit 固定提交。
start dsh plugin
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/ikuokuo/start-dsh-plugin |
| 许可证 | 未标注(见仓库) |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-30 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# Start DSH Plugin
> 开始动手做 DeepSeek Harness 插件的笔记。
## 准备环境
dsh 从源码运行,见:
- dsh 说明: https://github.com/deepseek-ai/deepseek-harness/blob/master/README.zh.md#run-from-source
或见之前分享的 [DeepSeek Harness 开始](https://yyixx.com/series/agent/dsh/)。
## 开发插件
依照 dsh 文档,动手做一遍:
- 第一个插件: https://deepseek-harness.github.io/deepseek-harness/develop/basic/
- 第一个工具: https://deepseek-harness.github.io/deepseek-harness/develop/basic/tool
在 dsh 仓库根目录创建插件目录:
```bash
mkdir -p start-dsh-plugin/src
```
写 `start-dsh-plugin/src/index.ts`:
```ts
import type { Context } from '@deepseek-ai/cordis'
import { defineTool } from '@deepseek-ai/dsh-tools'
import Schema from '@deepseek-ai/schemastery'
// 插件名称
export const name = 'start-dsh-plugin'
// 注册就绪
// inject 让 Cordis 等待工具注册表就绪
export const inject = ['tools']
// 插件配置
// 对应 cordis.yml 中 config
export interface Config {
greeting: string
maxRetries: number
verbose?: boolean
}
// Schema 校验
// 在插件加载时执行校验。如果配置不合法,插件会加载失败并给出明确错误信息
export const Config: Schema = Schema.object({
greeting: Schema.string().default('Hello'),
maxRetries: Schema.number().default(3),
verbose: Schema.boolean().default(false),
})
// 插件实现
// 插件是一个导出 apply 函数的 TypeScript 模块,通过 ctx 注册能力
export function apply(ctx: Context, config: Config) {
console.log(`[${name}] plugin loaded!`)
// 注册一个 greet 工具
ctx.tools.register(defineTool({
name: 'greet',
description: 'Greet someone by name.',
parameters: {
name: { type: 'string', required: true, description: 'The name to greet' },
},
output: {
schema: { type: 'string' },
render: (_args, value) => [{ type: 'text', text: value }],
},
async execute(args) {
return `${config.greeting}, ${args.name}!`
},
}))
}
```
写 `start-dsh-plugin/cordis.yml`:
```yml
- insert:
- id: start-dsh-plugin
name: './src/index.ts'
config:
greeting: 'Hi there'
maxRetries: 5
```
重新运行 dsh web:
```bash
pnpm dsh web --patch ./start-dsh-plugin/cordis.yml
```
对话输入 `Use the greet tool to greet Ada.`,模型会调用 `greet` 工具,回复 `Hi there, Ada! 👋`。
## 打包插件
上述通过 `--patch` overlay 加载本地插件。
这里再动手打包成组合包(bundle),用 `dsh plugin add` 来安装。
写 `start-dsh-plugin/package.json`:
```json
{
"name": "start-dsh-plugin",
"version": "0.1.0",
"type": "module",
"main": "src/index.ts",
"files": ["src/index.ts", "cordis.patch.yml"],
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
}
```
写 `start-dsh-plugin/cordis.patch.yml`:
```yml
- insert:
- id: start-dsh-plugin
name: start-dsh-plugin
config:
greeting: 'Hi'
maxRetries: 5
```
安装进 dsh web:
```bash
# 从本地安装
pnpm dsh plugin --profile web add ./start-dsh-plugin
# 通过名称移除
pnpm dsh plugin --profile web remove start-dsh-plugin
```
dsh web 是预装的一个 profile,都位于 `$DSH_HOME/profiles/`。
之后,重新运行 dsh web(web 是 `--profile web` 的别名):
```bash
# 查看配置树
pnpm dsh web --dump-config | grep start-dsh-plugin
# 重新运行
pnpm dsh web
```
## 发布脚本
要发布,先得补齐再构建:
- [package.json](package.json)
- [tsconfig.json](tsconfig.json)
- [tsconfig.local.json](tsconfig.local.json)
构建 lib/:
```bash
cd start-dsh-plugin/
# 在 harness 仓库内构建
pnpm exec tsc -p tsconfig.local.json
# 或,clone 项目安装依赖再构建
pnpm install && pnpm run build
pnpm pack --dry-run
```
发布 tar:
```bash
rm -r lib/
# 打包
# 若在 harness 仓库内打包,把 package.json 里改为 "build": "tsc -p tsconfig.local.json"
pnpm pack
# 从 tar 包安装
pnpm dsh plugin --profile web add ./start-dsh-plugin-0.1.0.tgz
```
发布 npm:
```bash
pnpm login
pnpm publish --access public
# 从 npm 安装
pnpm dsh plugin --profile web add start-dsh-plugin
```
发布 github:
```bash
# 从 github 安装
# 官方文档要让允许从源码构建,但看其他插件就直接 package.json 指向源码、或把 lib/ 上传
pnpm dsh plugin --profile web add github:ikuokuo/start-dsh-plugin
```
## 一些问题
该 dsh 工具插件在其最新源码上不能正常启动,报错导入不了 'CallId'。
因其 dsh-tools 版本到了 0.1.2-alpha.1,而 package.json 里用的最新发布只到 "^0.1.1-rc.2"。
需在 harness 仓库内构建或打包,再安装。
## 哪找插件
- [DSH Market](https://dshmarket.com/)
- [Awesome DSH Plugin](https://awesome-dsh-plugin.com/)
- [Awesome DeepSeek Harness](https://github.com/0xsline/awesome-deepseek-harness)
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。