Models & Providers

dsh-learning-plugin

fengyufengzi/dsh-learning-plugin · ★ 0

fengyufengzi

A small DeepSeek Harness tool plugin for learning the Cordis extension model

README body is shown in Chinese.

License
MIT
Added
2026-08-17
Maintenance
active
Install kind
github
Manifest details
Manifest status
Declared
Manifest path
package.json#dsh
Manifest checked
2026-08-19
Lifecycle scripts
None found

Static manifest checks report declarations only; they are not compatibility or security review.

安装

dsh plugin --profile web add github:fengyufengzi/dsh-learning-plugin

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: zh · Read Chinese README

Table of contents
  1. 环境要求
  2. 本地开发
  3. 安装到 DSH profile
  4. 打包检查
  5. 项目结构
  6. 当前范围
  7. License

一个用于学习 DeepSeek Harness 插件机制的最小工具组合包。安装后,它向模型注册 learning_greet 工具。

这个项目展示四个 Harness 扩展点:

  1. inject = ['tools'] 声明服务依赖。
  2. Config 使用 Schemastery 校验部署配置。
  3. ctx.tools.register() 注册随插件生命周期自动撤销的能力。
  4. defineTool() 从同一份 schema 推导参数和输出类型。

环境要求

  • Node.js ^22.19.0 || >=24.0.0
  • Corepack
  • pnpm 11.7.0
  • DeepSeek Harness 0.1.0-rc.6 系列

Harness 尚处于开发者预览阶段,插件 API 可能发生破坏性变化。

本地开发

corepack pnpm install
corepack pnpm run check

check 会执行类型检查、测试和发布构建。构建产物写入 lib/。

安装到 DSH profile

先构建插件,然后从本项目目录把 checkout 安装到 web profile:

corepack pnpm run build
npx @deepseek-ai/dsh plugin --profile web add .
npx @deepseek-ai/dsh --profile web --dump-config
npx @deepseek-ai/dsh --profile web

package.json 中的 dsh.bundle 声明会让 DSH 自动应用 cordis.patch.yml。启动后可向模型提出:

Use learning_greet to greet Ada.

移除插件:

npx @deepseek-ai/dsh plugin --profile web remove dsh-learning-plugin

打包检查

corepack pnpm pack

生成的 tarball 应只包含 lib/、cordis.patch.yml、README、LICENSE 和包清单。

项目结构

src/index.ts              插件实现
tests/plugin.spec.ts      生命周期与真实 ToolRuntime 测试
cordis.patch.yml          可安装组合包的配置层
docs/source-walkthrough.zh.md
.github/workflows/ci.yml  Node 22/26 持续集成

当前范围

这是学习项目,不是诊断或生产运维插件。下一阶段计划基于这些机制实现隐私优先的 dsh-local-diagnostics。

License

MIT