deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
DSH 宿主插件:记录当前 profile 插件树中所有自定义插件,生成 JSON 清单快照。
@deepseek-ai/、cordis:
开头者;DSH 内置 bundle 的插件全部挂在这些前缀名下)local/github/npm/link/unknown)、
依赖声明原文、包根路径、启用状态、运行状态、序列化配置plugin_registry_list 工具,对话中被问到
"当前有哪些自定义插件"或需引用插件名称/版本/来源/状态时按需调用,
实时返回与 plugins.json 快照同源的清单inject: ['tools'](与官方工具插件
dsh-tool-todo 等一致):加载器等 tools(ToolRuntime)服务就绪后才启动
本插件,保证 ctx.get('tools') 注册工具时服务已可用。tools 行由
dsh-base 组合保证提供,属硬依赖——若某部署不提供 tools 服务,本插件
apply 不会执行(快照与监听随之不生效);注册过程抛错时才降级跳过并
记录 toolRegistration.failed,不阻断快照与 Web UI 功能;插件 dispose
时回收注册,兼容 HMR/重载在浏览器界面 设置 → 插件 页注册"自定义插件"tab(与"插件配置"、
"插件列表"同级,排在最后):实时展示自定义插件清单——名称、版本、来源
(本地/GitHub/npm)、启用/运行状态,可展开查看 entry id、包路径、依赖声明
与配置。数据经 Host 侧 remote 服务(pluginRegistry.list())实时读取,
与 plugins.json 快照同源。
默认写入 ~/.dsh/storages/plugins.json($DSH_HOME 已设置时写入
$DSH_HOME/storages/plugins.json),原子写(tmp + rename)。
{
"generatedAt": "2026-08-15T12:00:00.000Z",
"profile": "web",
"dshVersion": "0.1.0-rc.6",
"pluginCount": 3,
"plugins": [
{
"id": "turn-chime",
"name": "dsh-client-ui-turn-chime",
"version": "0.1.0",
"source": "local",
"sourceSpec": "file:./plugins/dsh-client-ui-turn-chime",
"entryPath": "C:/Users/.../.dsh/profiles/web/plugins/dsh-client-ui-turn-chime",
"enabled": true,
"running": true,
"config": {}
}
],
"toolRegistration": {
"status": "registered",
"tool": "plugin_registry_list"
}
}
toolRegistration 为 AI 工具注册诊断字段:插件 apply 时把注册结果随每次
快照落盘(registered/skipped/failed 及原因),复盘时直接从 plugins.json
确认注册状态,避免注册失败被 fail-soft 降级后不可观测。
| 字段 | 默认值 | 说明 |
|---|---|---|
outputFile |
~/.dsh/storages/plugins.json |
快照输出路径 |
excludePrefixes |
['@deepseek-ai/', 'cordis:'] |
视为内置插件而排除的模块名前缀 |
includeConfig |
true |
是否记录各插件配置 |
debounceMs |
300 |
插件树变化后刷新快照的去抖毫秒数 |
在 DSH profile 目录(例如 ~/.dsh/profiles/web/)下:
添加依赖:
// package.json
{
"dependencies": {
"dsh-host-plugin-registry": "github:liuyun847/dsh-host-plugin-registry"
}
}
然后 pnpm install(或 npm install)。
在 cordis.patch.yml 中注册插件行:
- insert:
- id: plugin-registry
name: 'dsh-host-plugin-registry'
- id: plugin-registry-gateway
name: 'dsh-host-plugin-registry/gateway'
其中 plugin-registry-gateway 为 Web UI 提供 remote 服务,仅需 Web 页面功能时也应注册。
重启 dsh web,刷新页面后生效。
本 profile 使用 pnpm nodeLinker: hoisted,file: 依赖会被复制到
node_modules/ 而非符号链接。修改 plugins/ 下的插件源码后,必须重新
执行 corepack pnpm install(或手动把文件复制到
node_modules/<plugin>/lib/),否则运行中的 DSH 加载的是旧副本。
新增/修改 cordis.patch.yml 后,运行中的 web 进程通过 HMR 热应用 patch;
若未生效(如插件 import 失败的历史),重启 dsh web 即可。
node test/client-mount.test.mjs
node test/register-tool.test.mjs
退出码 0 = 通过。
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。