Clarify DeepSeek Harness architecture

This commit is contained in:
wuyang6
2026-08-14 11:23:05 +08:00
parent a03dc0e1e4
commit de38186ff4
4 changed files with 386 additions and 50 deletions
@@ -0,0 +1,80 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="860" viewBox="0 0 1440 860" role="img" aria-labelledby="title desc">
<title id="title">DeepSeek Harness 协议边界图</title>
<desc id="desc">Web、ACP 和 SDK 从外部驱动 Agent;MCP 把外部工具接入 Tools;Cordis 位于 dsh 的 Node 进程内部,负责组件装配而不是远程通信。</desc>
<defs>
<style>
.bg { fill: #f7f4ec; }
.title { font: 700 30px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; fill: #183a34; }
.subtitle { font: 400 18px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; fill: #60706a; }
.outside { fill: #fffdf8; stroke: #70817b; stroke-width: 2; rx: 18; }
.inside { fill: #edf5f1; stroke: #286458; stroke-width: 2; rx: 18; }
.boundary { fill: none; stroke: #286458; stroke-width: 3; stroke-dasharray: 12 8; rx: 26; }
.focus { fill: #fff2df; stroke: #ca6715; stroke-width: 2.4; rx: 18; }
.label { font: 650 20px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; fill: #1f413a; }
.body { font: 400 16px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; fill: #354c47; }
.small { font: 400 15px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; fill: #66766f; }
.arrow { stroke: #286458; stroke-width: 3; fill: none; marker-end: url(#arrow); }
.bi { stroke: #ca6715; stroke-width: 3; fill: none; marker-start: url(#arrow-orange-start); marker-end: url(#arrow-orange); }
</style>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L0,6 L9,3 z" fill="#286458"/></marker>
<marker id="arrow-orange" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L0,6 L9,3 z" fill="#ca6715"/></marker>
<marker id="arrow-orange-start" markerWidth="10" markerHeight="10" refX="1" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M9,0 L9,6 L0,3 z" fill="#ca6715"/></marker>
</defs>
<rect class="bg" width="1440" height="860" rx="32"/>
<text class="title" x="64" y="64">协议边界:谁从哪里接进 Harness</text>
<text class="subtitle" x="64" y="98">先看进程边界,再看协议名称;Cordis 位于 dsh 进程内部,不是远程协议。</text>
<text class="small" x="62" y="150">dsh 进程外:驱动端</text>
<rect class="outside" x="60" y="176" width="260" height="116"/>
<text class="label" x="86" y="216">浏览器</text>
<text class="body" x="86" y="250">产品 UI 和交互</text>
<rect class="outside" x="60" y="342" width="260" height="116"/>
<text class="label" x="86" y="382">ACP Client</text>
<text class="body" x="86" y="416">编辑器或另一个 Agent</text>
<rect class="outside" x="60" y="508" width="260" height="116"/>
<text class="label" x="86" y="548">Python / TS 程序</text>
<text class="body" x="86" y="582">自动化、批量任务、评测器</text>
<rect class="boundary" x="420" y="132" width="680" height="604"/>
<text class="label" x="450" y="170">dsh:TypeScript / Node.js 进程</text>
<rect class="inside" x="466" y="202" width="250" height="92"/>
<text class="label" x="490" y="240">Web adapter</text>
<text class="body" x="490" y="268">HTTP POST / WebSocket</text>
<rect class="inside" x="466" y="342" width="250" height="92"/>
<text class="label" x="490" y="380">ACP adapter</text>
<text class="body" x="490" y="408">ACP JSON-RPC over stdio</text>
<rect class="inside" x="466" y="482" width="250" height="92"/>
<text class="label" x="490" y="520">SDK server</text>
<text class="body" x="490" y="548">line JSON-RPC 2.0 over stdio</text>
<rect class="focus" x="792" y="274" width="250" height="118"/>
<text class="label" x="816" y="314">Agent loop</text>
<text class="body" x="816" y="346">Web / ACP / SDK</text>
<text class="body" x="816" y="370">都从外部驱动整个 Agent</text>
<rect class="focus" x="792" y="454" width="250" height="118"/>
<text class="label" x="816" y="494">Tools registry</text>
<text class="body" x="816" y="526">本地工具与 MCP 工具</text>
<text class="body" x="816" y="550">以统一名称注册</text>
<rect class="inside" x="548" y="634" width="414" height="68"/>
<text class="label" x="572" y="676">Cordis:装配并管理以上进程内插件</text>
<path class="arrow" d="M320 234 H458"/>
<path class="arrow" d="M320 400 H458"/>
<path class="arrow" d="M320 566 H458"/>
<path class="arrow" d="M716 248 C760 248 760 316 784 326"/>
<path class="arrow" d="M716 388 H784"/>
<path class="arrow" d="M716 528 C760 528 760 364 784 350"/>
<path class="arrow" d="M917 392 V446"/>
<text class="small" x="1146" y="150">dsh 进程外:能力提供端</text>
<rect class="outside" x="1140" y="342" width="250" height="146"/>
<text class="label" x="1166" y="382">MCP Server</text>
<text class="body" x="1166" y="416">stdio 或 Streamable HTTP</text>
<text class="small" x="1166" y="450">当前只桥接 Tools</text>
<path class="bi" d="M1042 512 C1094 512 1094 420 1132 420"/>
<rect class="outside" x="120" y="778" width="1200" height="54"/>
<text class="body" x="148" y="812">记忆锚点:Web / ACP / SDK 把“请求”送进 Agent;MCP 把“工具”送进 Tools;Cordis 只负责 dsh 进程内的组装与生命周期。</text>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB