能力接缝(Capability Seam)
定义
DeepSeek Harness 中对”可替换能力”的统一抽象:一个接缝(seam)由三个角色组成——**服务定义(Service Definition)**声明接口、**服务提供者(Service Provider)**实现接口、**消费者(Consumer)**使用接口(通常是面向模型的工具)。
核心要点
三角色定义(原文)
“A seam is a swappable capability with three roles: a Service Definition declaring the interface, a Service Provider implementing it, and a Consumer using it, commonly a model-facing tool.”
一个包可以兼任多角色,但只有单一角色不算接缝——新增一个能力意味着要设计齐三个角色。
一次 provider 替换改变整个产品
“Filesystem and subprocess providers share one execution world, so pointing them at a remote sandbox moves Bash, PTY, and LSP with them, with no provider forks.”
文件系统(filesystem)与子进程(subprocess)provider 共享同一个执行世界,因此把它们指向远程沙箱时,Bash、PTY、LSP 会一起迁移,不需要为每个能力写独立的分叉。
Subagent 也是接缝
“Subagent providers vary just as widely behind one interface, from a fresh child agent to a delegated turn in another product.”
Subagent 的 provider 可以是从一个全新子 agent 到”在另一个产品里委派一个回合”的任意实现,都藏在同一个接口后面。
接缝的实例(DSH 中的能力)
模型适配(ctx.llm)、工具(ctx.tools)、文件系统(ctx.fs)、沙箱(ctx.sandbox)、shell(ctx.shell)、终端(ctx.terminals)、持久化、子代理、compaction、web、skill、workflow……都是接缝。
意义
接缝是 一切皆插件 的”接口层”表达:插件提供实现,接缝定义”换一个实现会改变什么”。它把 Harness工程 里分散的”可替换点”统一为一个可复用的设计词汇。