学习研究
插件
dsh-extensions-wallpaperskin
haibala-aii
Wallpaper Engine skin plugin for the DeepSeek Harness web UI
deepseek-harnessdsh-pluginjavascriptwallpaper-engine
PROJECT TOPICS
PROJECT README
DSH(DeepSeek Harness)插件开发的完整指南仓库:从第一个插件到自动发布到社区。 面向 DSH 插件作者(agent 开发者),内容基于官方源码仓库 deepseek-ai/deepseek-harness。
| 内容 | 路径 | 说明 |
|---|---|---|
| 插件开发详解 | docs/plugin-development.md | 实现形式 / 生命周期 / 事件 / 工具 / 服务 / cordis.yml / 打包 / Web UI 插件 / 远程调用 / 工作流 / 参考索引 |
| 发布到社区指南 | docs/publishing.md | npm / GitHub / tarball 三通道,打包非必须的复用形态,GitHub Actions 全自动发布,自动发现/同步/发送体系 |
| 插件前端开发指南 | docs/plugin-frontend.md | Web GUI / Client 插件:dsh.client 包契约、Slot 槽位目录与选型、主题、设置卡片、外部包构建协议、HMR、Host↔Client 通信 |
| 示例插件 | examples/hello-plugin | 最小可用插件骨架(加载日志 + greet 工具),可直接复制改造成新插件 |
| 发布巡检脚本 | scripts/discover-plugins.mjs | 自动搜索账号下 dsh 相关仓库 → 对比 npm 发布状态 → 同步 checkout → 打 tag 触发 CI 发布 |
| 插件索引(作者) | plugins.md | anweat 的 DSH 插件集合:安装命令 / 版本 / 说明 / 新增流程 |
复制 examples/hello-plugin 到你的项目,然后:
// src/my-plugin.ts —— 插件 = 一个导出 apply 的 TS 模块
import type { Context } from '@deepseek-ai/cordis'
import { defineTool } from '@deepseek-ai/dsh-tools'
export const name = 'hello-plugin'
export const inject = ['tools']
export function apply(ctx: Context) {
console.log('[hello-plugin] plugin loaded!')
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 `Hello, ${args.name}!` },
}))
}
# cordis.yml —— 挂载补丁(name 为插件源码绝对路径)
- insert:
- id: hello
name: '/abs/path/to/your-plugin/src/my-plugin.ts'
cd <deepseek-harness 仓库根>
pnpm dsh web --patch /abs/path/to/your-plugin/cordis.yml
# 打开 http://127.0.0.1:3080,终端打印 [hello-plugin] plugin loaded!
| 内容 | 路径 |
|---|---|
| 用户插件教程(第一个插件→工具→配置→发布) | docs/user/develop/basic/** |
| 生命周期 / 服务 / 事件 | docs/user/develop/framework/** |
| 三方能力设计(Definition/Provider/Consumer) | docs/user/develop/practice/** |
| Cordis 概念速览 + 7 章教程 | docs/cordis-primer.md、docs/cordis-tutorial/** |
| 服务/事件 API 目录(按子系统生成) | docs/subsystems/** |
| 工具作者参考 | docs/cookbook/adding-a-tool.md |
| 架构说明 | docs/architecture.md、docs/capability-seams.md |
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。