Files
research-blog/public/articles/deepseek-harness-architecture-evaluation/dsh-service-seams.svg
T
2026-08-14 18:43:07 +08:00

140 lines
8.2 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="760" viewBox="0 0 1440 760" role="img" aria-labelledby="title desc">
<title id="title">DeepSeek Harness 的三条 Service 能力边界</title>
<desc id="desc">shell、subagent 和会话持久化三项能力分别由 Definition 声明接口、Provider 注册实现、Consumer 调用 Service。</desc>
<defs>
<style>
.bg { fill: #f7f5ef; }
.panel { fill: #fffdf8; stroke: #d7d2c4; stroke-width: 2; }
.heading { fill: #1f2937; font: 700 26px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.label { fill: #52606d; font: 500 16px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.node-title { fill: #17212b; font: 650 17px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.node-role { fill: #52606d; font: 500 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.service-title { fill: #ffffff; font: 700 17px ui-monospace, SFMono-Regular, Menlo, monospace; }
.definition { fill: #eeeafb; stroke: #7c6fc4; stroke-width: 2; }
.provider { fill: #e6f4ec; stroke: #4f8a68; stroke-width: 2; }
.consumer { fill: #e8f0fa; stroke: #4f78a8; stroke-width: 2; }
.service { fill: #27384a; stroke: #17212b; stroke-width: 2; }
.edge { fill: none; stroke: #586574; stroke-width: 2.2; marker-end: url(#arrow); }
.legend { fill: #374151; font: 500 15px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
</style>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L9,3 z" fill="#586574"/>
</marker>
</defs>
<rect class="bg" x="0" y="0" width="1440" height="760"/>
<text class="heading" x="60" y="54">Service 能力边界:定义接口、注册实现、依赖调用</text>
<g transform="translate(830 28)">
<rect class="definition" x="0" y="0" width="20" height="20" rx="4"/><text class="legend" x="30" y="16">Definition</text>
<rect class="provider" x="145" y="0" width="20" height="20" rx="4"/><text class="legend" x="175" y="16">Provider</text>
<rect class="service" x="270" y="0" width="20" height="20" rx="4"/><text class="legend" x="300" y="16">Service</text>
<rect class="consumer" x="385" y="0" width="20" height="20" rx="4"/><text class="legend" x="415" y="16">Consumer</text>
</g>
<g transform="translate(40 88)">
<rect class="panel" width="430" height="620" rx="18"/>
<text class="heading" x="28" y="45">shell 能力</text>
<rect class="definition" x="28" y="86" width="166" height="68" rx="10"/>
<text class="node-title" x="111" y="113" text-anchor="middle">dsh-shell</text>
<text class="node-role" x="111" y="138" text-anchor="middle">Definition</text>
<rect class="provider" x="28" y="202" width="166" height="68" rx="10"/>
<text class="node-title" x="111" y="229" text-anchor="middle">dsh-bash-local</text>
<text class="node-role" x="111" y="254" text-anchor="middle">Provider</text>
<rect class="provider" x="28" y="318" width="166" height="68" rx="10"/>
<text class="node-title" x="111" y="345" text-anchor="middle">dsh-bash-sandbox</text>
<text class="node-role" x="111" y="370" text-anchor="middle">Provider</text>
<rect class="service" x="228" y="235" width="174" height="68" rx="10"/>
<text class="service-title" x="315" y="276" text-anchor="middle">ctx.shell</text>
<rect class="consumer" x="228" y="438" width="174" height="68" rx="10"/>
<text class="node-title" x="315" y="465" text-anchor="middle">dsh-tool-bash</text>
<text class="node-role" x="315" y="490" text-anchor="middle">Consumer</text>
<path class="edge" d="M194 120 C230 120 228 216 263 235"/>
<path class="edge" d="M194 236 L228 254"/>
<path class="edge" d="M194 352 C228 352 230 320 263 303"/>
<path class="edge" d="M315 303 L315 438"/>
</g>
<g transform="translate(505 88)">
<rect class="panel" width="430" height="620" rx="18"/>
<text class="heading" x="28" y="45">subagent 能力</text>
<rect class="definition" x="28" y="86" width="174" height="68" rx="10"/>
<text class="node-title" x="115" y="113" text-anchor="middle">dsh-subagent</text>
<text class="node-role" x="115" y="138" text-anchor="middle">Definition</text>
<rect class="provider" x="28" y="202" width="174" height="78" rx="10"/>
<text class="node-title" x="115" y="226" text-anchor="middle">dsh-subagent-</text>
<text class="node-title" x="115" y="247" text-anchor="middle">spawn-in-process</text>
<text class="node-role" x="115" y="269" text-anchor="middle">Provider</text>
<rect class="provider" x="28" y="328" width="174" height="78" rx="10"/>
<text class="node-title" x="115" y="352" text-anchor="middle">dsh-subagent-</text>
<text class="node-title" x="115" y="373" text-anchor="middle">fork-in-process</text>
<text class="node-role" x="115" y="395" text-anchor="middle">Provider</text>
<rect class="service" x="232" y="239" width="170" height="68" rx="10"/>
<text class="service-title" x="317" y="280" text-anchor="middle">ctx.subagents</text>
<rect class="consumer" x="232" y="408" width="170" height="68" rx="10"/>
<text class="node-title" x="317" y="435" text-anchor="middle">dsh-tool-subagent</text>
<text class="node-role" x="317" y="460" text-anchor="middle">Consumer</text>
<rect class="consumer" x="232" y="505" width="170" height="78" rx="10"/>
<text class="node-title" x="317" y="529" text-anchor="middle">dsh-tool-subagent-</text>
<text class="node-title" x="317" y="550" text-anchor="middle">control</text>
<text class="node-role" x="317" y="572" text-anchor="middle">Consumer</text>
<path class="edge" d="M202 120 C238 120 236 217 269 239"/>
<path class="edge" d="M202 241 L232 257"/>
<path class="edge" d="M202 367 C235 367 238 327 270 307"/>
<path class="edge" d="M317 307 L317 408"/>
<path class="edge" d="M347 307 C405 352 404 462 360 505"/>
</g>
<g transform="translate(970 88)">
<rect class="panel" width="430" height="620" rx="18"/>
<text class="heading" x="28" y="45">会话持久化能力</text>
<rect class="definition" x="28" y="86" width="180" height="78" rx="10"/>
<text class="node-title" x="118" y="110" text-anchor="middle">dsh-session-</text>
<text class="node-title" x="118" y="131" text-anchor="middle">persistence</text>
<text class="node-role" x="118" y="153" text-anchor="middle">Definition</text>
<rect class="provider" x="28" y="212" width="180" height="78" rx="10"/>
<text class="node-title" x="118" y="236" text-anchor="middle">dsh-session-</text>
<text class="node-title" x="118" y="257" text-anchor="middle">persistence-jsonl</text>
<text class="node-role" x="118" y="279" text-anchor="middle">Provider</text>
<rect class="provider" x="28" y="338" width="180" height="78" rx="10"/>
<text class="node-title" x="118" y="362" text-anchor="middle">dsh-session-</text>
<text class="node-title" x="118" y="383" text-anchor="middle">persistence-sqlite</text>
<text class="node-role" x="118" y="405" text-anchor="middle">Provider</text>
<rect class="service" x="236" y="248" width="166" height="78" rx="10"/>
<text class="service-title" x="319" y="282" text-anchor="middle">ctx.session</text>
<text class="service-title" x="319" y="305" text-anchor="middle">Persistence</text>
<rect class="consumer" x="236" y="432" width="166" height="68" rx="10"/>
<text class="node-title" x="319" y="459" text-anchor="middle">dsh-agent-loop</text>
<text class="node-role" x="319" y="484" text-anchor="middle">Consumer</text>
<rect class="consumer" x="236" y="527" width="166" height="68" rx="10"/>
<text class="node-title" x="319" y="554" text-anchor="middle">dsh-session-query</text>
<text class="node-role" x="319" y="579" text-anchor="middle">Consumer</text>
<path class="edge" d="M208 125 C240 125 239 226 270 248"/>
<path class="edge" d="M208 251 L236 267"/>
<path class="edge" d="M208 377 C242 377 242 344 272 326"/>
<path class="edge" d="M319 326 L319 432"/>
<path class="edge" d="M350 326 C406 375 405 486 360 527"/>
</g>
<text class="label" x="720" y="738" text-anchor="middle">Definition 声明接口;Provider 注册实现;Consumer 通过具名 Service 调用能力。</text>
</svg>