<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="drawio" version="26.0.0">
  <diagram name="Architecture">
    <mxGraphModel dx="1422" dy="794" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1750" pageHeight="1050" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="多入口与 Channel 路由图" style="text;html=1;strokeColor=none;fillColor=none;fontSize=26;fontColor=#263238;fontStyle=1;align=left;verticalAlign=middle;whiteSpace=wrap" vertex="1" parent="1"><mxGeometry x="50" y="25" width="1650" height="42" as="geometry"/></mxCell>
        <mxCell id="entrances" value="外部入口" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e8f1fb;swimlaneFillColor=#ffffff;strokeColor=#3b82a0;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="50" y="150" width="320" height="690" as="geometry"/></mxCell>
        <mxCell id="web" value="Web Chat / Embed&#xa;POST /api/stream/chat" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="entrances"><mxGeometry x="40" y="65" width="240" height="82" as="geometry"/></mxCell>
        <mxCell id="im" value="飞书 / 企微 / 钉钉&#xa;长连接或回调" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="entrances"><mxGeometry x="40" y="205" width="240" height="82" as="geometry"/></mxCell>
        <mxCell id="openapi" value="OpenAPI / Headless" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="entrances"><mxGeometry x="40" y="345" width="240" height="82" as="geometry"/></mxCell>
        <mxCell id="schedule" value="Schedule / Async" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="entrances"><mxGeometry x="40" y="485" width="240" height="82" as="geometry"/></mxCell>
        <mxCell id="normalize" value="入口适配与路由" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#fff0df;swimlaneFillColor=#ffffff;strokeColor=#c96f2d;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="450" y="130" width="410" height="730" as="geometry"/></mxCell>
        <mxCell id="webchannel" value="WebChannel&#xa;targetAgentId 直达" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="normalize"><mxGeometry x="65" y="65" width="280" height="75" as="geometry"/></mxCell>
        <mxCell id="imadapter" value="Channel Adapter&#xa;InboundMessage 归一化" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="normalize"><mxGeometry x="65" y="190" width="280" height="75" as="geometry"/></mxCell>
        <mxCell id="auth" value="OpenAPI 鉴权&#xa;租户 / Agent / chatId" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="normalize"><mxGeometry x="65" y="315" width="280" height="75" as="geometry"/></mxCell>
        <mxCell id="scheduletrigger" value="Scheduler&#xa;租约 / 任务触发" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="normalize"><mxGeometry x="65" y="440" width="280" height="75" as="geometry"/></mxCell>
        <mxCell id="dispatcher" value="Dispatcher&#xa;Ledger · Trigger · Bind" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="normalize"><mxGeometry x="65" y="580" width="280" height="82" as="geometry"/></mxCell>
        <mxCell id="role" value="运行拓扑分流&#xa;组合部署 / Gateway 派发" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="930" y="390" width="290" height="95" as="geometry"/></mxCell>
        <mxCell id="runtime" value="Runtime / 组合角色执行侧" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e9f5ec;swimlaneFillColor=#ffffff;strokeColor=#4f8a5b;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="1290" y="130" width="400" height="500" as="geometry"/></mxCell>
        <mxCell id="runtimeapi" value="Runtime dispatch API" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime"><mxGeometry x="60" y="65" width="280" height="65" as="geometry"/></mxCell>
        <mxCell id="task" value="Chat ownership + TaskRuns" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime"><mxGeometry x="60" y="165" width="280" height="65" as="geometry"/></mxCell>
        <mxCell id="agent" value="AgentRunner + SDK query()" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime"><mxGeometry x="60" y="265" width="280" height="75" as="geometry"/></mxCell>
        <mxCell id="events" value="EventBus / Runtime events" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff6d9;strokeColor=#c28b20;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="runtime"><mxGeometry x="60" y="375" width="280" height="65" as="geometry"/></mxCell>
        <mxCell id="returns" value="返回路径" style="swimlane;startSize=36;html=1;container=1;collapsible=0;pointerEvents=0;fillColor=#e5f5f3;swimlaneFillColor=#ffffff;strokeColor=#3c8d87;fontColor=#263238;fontSize=15;fontStyle=1;dashed=0;strokeWidth=1.5;rounded=0;shadow=0" vertex="1" parent="1"><mxGeometry x="940" y="700" width="750" height="190" as="geometry"/></mxCell>
        <mxCell id="sse" value="浏览器 SSE&#xa;同一 Runtime" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="returns"><mxGeometry x="35" y="65" width="200" height="70" as="geometry"/></mxCell>
        <mxCell id="imreply" value="Gateway 回调&#xa;IM Reply" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="returns"><mxGeometry x="275" y="65" width="200" height="70" as="geometry"/></mxCell>
        <mxCell id="apicallback" value="OpenAPI Callback&#xa;状态查询" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#fff0df;strokeColor=#c96f2d;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="returns"><mxGeometry x="515" y="65" width="200" height="70" as="geometry"/></mxCell>
        <mxCell id="future" value="规划：扩展包 Channel contribution" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=13;fontStyle=0;dashed=1;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="470" y="900" width="360" height="60" as="geometry"/></mxCell>
        <mxCell id="web-normalize" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="web" target="webchannel"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="im-normalize" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="im" target="imadapter"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="api-normalize" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="openapi" target="auth"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="schedule-normalize" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="schedule" target="scheduletrigger"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="to-dispatch-webchannel" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.2;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="webchannel" target="dispatcher"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="to-dispatch-imadapter" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.4;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="imadapter" target="dispatcher"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="to-dispatch-auth" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.6000000000000001;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="auth" target="dispatcher"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="to-dispatch-scheduletrigger" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.8;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="scheduletrigger" target="dispatcher"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="dispatch-role" value="本地或派发" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="dispatcher" target="role"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="role-runtime" value="内部 HTTP" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=1;exitY=0.4;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="role" target="runtimeapi"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="runtime-task" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="runtimeapi" target="task"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="task-agent" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="task" target="agent"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="agent-events" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="agent" target="events"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="events-sse" value="Web" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0;exitY=0.6;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="events" target="sse"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1180" y="650"/><mxPoint x="1075" y="650"/></Array></mxGeometry></mxCell>
        <mxCell id="events-im" value="事件回调" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.4;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="events" target="imreply"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="events-api" value="事件回调" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#64748b;fontColor=#475569;fontSize=11;strokeWidth=1.5;dashed=0;endArrow=block;endFill=1;exitX=0.7;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="events" target="apicallback"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="legend-current" value="当前已落地" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=12;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="50" y="965" width="150" height="36" as="geometry"/></mxCell>
        <mxCell id="legend-planned" value="规划 / 待完善" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=12;fontStyle=0;dashed=1;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="220" y="965" width="160" height="36" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
