一切皆插件(Everything is a Plugin)
定义
DeepSeek Harness 的架构原则:Agent 的每一项能力——模型适配器、工具注册表、会话日志、agent loop 本身——都被实现为一个插件,挂在共享的 Cordis context 上,因此每一项能力都能从配置层被替换。
核心要点
与”硬编码核心 + 挂载点”的本质区别
传统 harness(如 Claude Code)有一个不可修改的核心循环,新功能通过 Hook / 工具注册等挂载点接入。DSH 把这个模式推到了极致——连循环本身都是插件:
“Every part of the product is a plugin, including the model adapter, the tool registry, the session log, and the agent loop itself, so every part is replaceable from configuration.”
“There is no privileged core to patch: you extend dsh by mounting a plugin beside the others.”
**不存在一个需要你去改的特权核心。**想扩展 dsh,只要在旁边再挂一个插件就行了。
注册即 effect(可逆)
所有注册都通过 ctx.effect() / ctx.on() 完成,register() 返回 disposer。插件卸载时,它注册的一切(prompt 段落、工具 schema、适配器、监听器)可预测地回退。这是 时空可组合性 中”可逆效应”的直接体现。
组合来自配置而非代码
一个运行中的 dsh 是启动时按序分层的插件树(bundle → profile patch → home patch → --patch)。开发者改配置(cordis.yml / patch)就能选、换、扩展能力,不改源码。
能力即插件清单(官方公告原文)
“Plugins provide every agent capability, including models, tools, skills, sessions, sandboxes, storage, loops, scheduling, and the UI.”
智能体的每一项能力都由插件提供——模型、工具、技能、会话、沙箱、存储、循环、调度,乃至界面本身,无一例外。
相关来源
- DeepSeek-Harness官方仓库与架构
- Cordis
- 能力接缝
- 对比:Harness工程 中的”循环永远不变,机制属于 Harness”(learn-claude-code教程)