DeepSeek Harness plugin

dsh-plugin-factory

In-dsh plugin factory: scaffold, document, and validate DeepSeek Harness plugins (host tools AND client UI) from inside an agent session.

Jump to install

Source facts

Repository
ktziy/dsh-plugin-factory
Latest update
Aug 17, 2026
Category
Workflow & Automation
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/ktziy/dsh-plugin-factory
Plugin: dsh-plugin-factory
Author: ktziy

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-plugin-factory

> 让 dsh 的 AI 自己编写 dsh 插件 —— 自举式插件生成工具

为 DeepSeek Harness(dsh)会话中的 Agent 提供一套完整的插件开发工具链。当你说"帮我做一个 XX 插件"时,Agent 能自动生成合法代码、校验契约规范、并给出安装片段 —— 全程无需人工编写。

本插件由deepseek模型制作用于驱动deepseek harness

因为该模型发布不久,模型没有相关训练数据,所以由deepseekv4闪光版整理后由pro版分发为提示词包供模型使用

注意:本插件ai含量高达99.99%!!!

---

📦 安装

# 方式一:tarball(推荐,免构建)
dsh plugin --profile web add ./dsh-plugin-factory-0.3.2.tgz

# 方式二:Git 仓库
dsh plugin --profile web add github:ktziy/dsh-plugin-factory

# 方式三:NPM
dsh plugin --profile web add dsh-plugin-factory

---

🚀 快速开始

安装完成后,直接在 dsh 会话中对 Agent 说:

Use plugin_scaffold to create a plugin named weather-tool with toolName get_weather.

Agent 将自动返回:

  • ✅ 合法的插件骨架源码
  • ✅ 可直接粘贴的 --patch 安装片段

完整工作流程和高级用法,请参阅 [核心文档](docs/CORE.md)。

---

🎯 为什么需要它?

dsh 插件开发有一套严格的契约规范

  • apply(ctx) 生命周期函数
  • defineTool 工具定义
  • Schema DSL 硬约束

模型缺乏针对性的训练数据,直接生成代码容易出现 API 幻觉。本插件将这些契约规范打包成 「文档 + 脚手架 + 校验器」 三个工具,从源头约束 Agent 输出,确保生成代码的合法性。

---

🛠️ 工具能力

工具功能说明
plugin_doc按主题读取开发契约文档(core / tools / services / llm / compose / preset / client / api),支持 file= 按路径读取官方结构化参考(ref/)与官方原文(official/)
plugin_scaffold生成插件骨架,支持 6 种 kind:tool / service / event / llm-adapter / client / client-node
plugin_validate基于守卫规则静态自查(tool 的 defineTool 规则 + client 的 apply/inject/slots)

---

🧠 工作原理

用户需求
   ↓
Agent 调用 plugin_doc 读取契约规范
   ↓
调用 plugin_scaffold 生成合法骨架
   ↓
调用 plugin_validate 自查校验
   ↓
利用 dsh 的 fs/bash 工具落盘
   ↓
通过 dsh plugin add 加载插件
   ↓
✅ 插件就绪

---

📸 效果预览

> 待补充:docs/ ---

✨ 开发进度

类型完成度
Host 侧Tool 工具✅ 文档 + 脚手架 + 校验
Service 服务✅ 新增脚手架(Service 类 + declare module)
事件监听/拦截✅ 新增脚手架(ctx.on + 分发模式提示)
配置✅ 文档 + scaffold 带 Config 示例
LLM 适配器✅ 新增脚手架(LlmAdapter + StreamChunk 协议)
打包/发布✅ 文档 + 包本身是 bundle
Client 侧Client UI 插件(settings.section)✅ 文档 + 脚手架 + 校验 + 构建 + 挂载实测
对话节点 UI✅ 新增脚手架(ConversationNodeDefinition 全套)
其他槽位✅ 文档覆盖(client.md §3 完整清单)+ 两个代表模板

plugin_scaffold 现在支持 6 种 kind:

kind说明
toolHost 工具(defineTool)
serviceHost Service 类
eventHost 事件监听
llm-adapterHost LLM 适配器
clientWeb UI 插件(settings.section 槽位)
client-nodeWeb UI 对话节点

✅ 无模型自测 6 种全部通过,编译通过,打包 29KB。

---

📄 License

MIT © ktziy

---