85 lines
5.4 KiB
XML
85 lines
5.4 KiB
XML
<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 greet 请求调用图</title>
|
|
<desc id="desc">用户请求进入已经启动的 Agent,模型调用 greet 工具并返回结果;SessionEvent 在下方记录事实,但不是调用链的下一跳。</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; }
|
|
.box { fill: #fffdf8; stroke: #286458; stroke-width: 2; rx: 18; }
|
|
.focus { fill: #fff2df; stroke: #ca6715; stroke-width: 2.4; rx: 18; }
|
|
.event { fill: #edf5f1; stroke: #557b72; stroke-width: 2; rx: 18; }
|
|
.label { font: 650 19px -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; }
|
|
.solid { stroke: #286458; stroke-width: 3; fill: none; marker-end: url(#arrow); }
|
|
.return { stroke: #ca6715; stroke-width: 3; fill: none; marker-end: url(#arrow-orange); }
|
|
.dash { stroke: #7a8c86; stroke-width: 2.2; stroke-dasharray: 8 8; fill: none; marker-end: url(#arrow-gray); }
|
|
</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-gray" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L0,6 L9,3 z" fill="#7a8c86"/></marker>
|
|
</defs>
|
|
<rect class="bg" width="1440" height="860" rx="32"/>
|
|
<text class="title" x="64" y="64">一次 greet 请求:消息在已启动的组件之间怎样移动</text>
|
|
<text class="subtitle" x="64" y="98">这是一张运行时调用图;Profile、Bundle 和 Fiber 装配已经完成。</text>
|
|
|
|
<rect class="box" x="58" y="168" width="180" height="106"/>
|
|
<text class="label" x="82" y="207">用户入口</text>
|
|
<text class="body" x="82" y="238">Web / ACP / SDK</text>
|
|
|
|
<rect class="box" x="288" y="168" width="180" height="106"/>
|
|
<text class="label" x="312" y="207">Agent inbox</text>
|
|
<text class="body" x="312" y="238">“向 Ada 问好”</text>
|
|
|
|
<rect class="box" x="518" y="150" width="220" height="142"/>
|
|
<text class="label" x="542" y="190">Agent loop</text>
|
|
<text class="body" x="542" y="222">组装历史、系统提示</text>
|
|
<text class="body" x="542" y="248">和可用工具 schema</text>
|
|
|
|
<rect class="focus" x="788" y="150" width="220" height="142"/>
|
|
<text class="label" x="812" y="190">LLM</text>
|
|
<text class="body" x="812" y="222">决定调用工具:</text>
|
|
<text class="body" x="812" y="250">greet({ name: "Ada" })</text>
|
|
|
|
<rect class="box" x="1058" y="132" width="320" height="178"/>
|
|
<text class="label" x="1082" y="170">Guarded tool pipeline</text>
|
|
<text class="body" x="1082" y="204">pre-execute → approval → guard</text>
|
|
<text class="body" x="1082" y="232">→ execute → post-execute → result</text>
|
|
<text class="small" x="1082" y="268">最终调用 greet handler</text>
|
|
|
|
<path class="solid" d="M238 221 H280"/>
|
|
<path class="solid" d="M468 221 H510"/>
|
|
<path class="solid" d="M738 221 H780"/>
|
|
<path class="solid" d="M1008 221 H1050"/>
|
|
|
|
<rect class="focus" x="1058" y="374" width="320" height="112"/>
|
|
<text class="label" x="1082" y="414">greet 工具返回</text>
|
|
<text class="body" x="1082" y="450">“Hello, Ada!”</text>
|
|
<path class="return" d="M1218 310 V366"/>
|
|
|
|
<rect class="box" x="788" y="374" width="220" height="112"/>
|
|
<text class="label" x="812" y="414">LLM 继续生成</text>
|
|
<text class="body" x="812" y="450">把工具结果写成回答</text>
|
|
<path class="return" d="M1058 430 H1016"/>
|
|
|
|
<rect class="box" x="518" y="374" width="220" height="112"/>
|
|
<text class="label" x="542" y="414">Agent loop 收束</text>
|
|
<text class="body" x="542" y="450">提交 assistant/message</text>
|
|
<path class="return" d="M788 430 H746"/>
|
|
|
|
<rect class="box" x="288" y="374" width="180" height="112"/>
|
|
<text class="label" x="312" y="414">用户收到回答</text>
|
|
<text class="body" x="312" y="450">“已向 Ada 问好”</text>
|
|
<path class="return" d="M518 430 H476"/>
|
|
|
|
<rect class="event" x="140" y="610" width="1160" height="156"/>
|
|
<text class="label" x="170" y="650">SessionEvent 日志:记录旁路,不是请求的“下一跳”</text>
|
|
<text class="body" x="170" y="687">用户消息、step/start、模型消息、工具调用、工具结果和最终回答分别追加为 durable facts。</text>
|
|
<text class="body" x="170" y="719">历史重建、resume、fork、故障修复和 UI 投影都从这些事实派生。</text>
|
|
<path class="dash" d="M378 274 C378 430 380 520 444 600"/>
|
|
<path class="dash" d="M1218 486 C1218 540 1130 560 1080 602"/>
|
|
<path class="dash" d="M628 486 C628 545 650 565 676 602"/>
|
|
<text class="small" x="66" y="824">记忆锚点:Agent loop 决定“下一步做什么”;Tools 执行“具体动作”;SessionEvent 记录“发生过什么”。</text>
|
|
</svg>
|