<?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="1700" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="Session、Memory、文件与生成物数据流图" 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="1600" height="42" as="geometry"/></mxCell>
        <mxCell id="agent-task" value="Agent Task&#xa;当前执行上下文" 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="1"><mxGeometry x="700" y="160" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="session" value="SessionService&#xa;acquire / continue / cancel / pause" 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="1"><mxGeometry x="250" y="350" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="memory" value="MemoryService&#xa;用户 / Agent 长期记忆" 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="1"><mxGeometry x="250" y="570" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="workspace" value="Agent workspace&#xa;运行规则 · Skill links · 工作文件" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="700" y="350" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="sessionfiles" value="Session files&#xa;附件 / 中间文件 / 结果文件" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e5f5f3;strokeColor=#3c8d87;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="1150" y="350" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="artifact" value="生成物服务&#xa;File · Widget · Publish · Share" 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="1"><mxGeometry x="1150" y="570" width="300" height="90" as="geometry"/></mxCell>
        <mxCell id="chatdb" value="Chat / Task / Message DB&#xa;status · owner · session_id · usage" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="200" y="790" width="350" height="100" as="geometry"/></mxCell>
        <mxCell id="myfs" value="MyFS&#xa;本地文件 / S3 兼容对象存储" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e5f5f3;strokeColor=#3c8d87;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="680" y="790" width="340" height="100" as="geometry"/></mxCell>
        <mxCell id="archive" value="Session Archive&#xa;JSONL · SDK session · owner epoch" style="shape=cylinder3;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e9f5ec;strokeColor=#4f8a5b;fontColor=#263238;fontSize=13;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="1"><mxGeometry x="1150" y="790" width="300" height="100" as="geometry"/></mxCell>
        <mxCell id="delivery" value="交付与访问边界" style="swimlane;startSize=28;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="450" y="970" width="800" height="70" as="geometry"/></mxCell>
        <mxCell id="ui" value="Web / Embed / IM / 分享页" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e8f1fb;strokeColor=#3b82a0;fontColor=#263238;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="delivery"><mxGeometry x="40" y="32" width="310" height="28" as="geometry"/></mxCell>
        <mxCell id="fileapi" value="统一 Session File API + 权限 / realpath 校验" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f1eafa;strokeColor=#8064a2;fontColor=#263238;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;spacing=8;align=center;verticalAlign=middle;shadow=0" vertex="1" parent="delivery"><mxGeometry x="390" y="32" width="370" height="28" as="geometry"/></mxCell>
        <mxCell id="task-session" 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;exitY=0.5;entryX=1;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="agent-task" target="session"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="600" y="250"/><mxPoint x="600" y="395"/></Array></mxGeometry></mxCell>
        <mxCell id="task-workspace" 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="agent-task" target="workspace"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="task-files" 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="agent-task" target="sessionfiles"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="memory-task" value="PromptComposer 注入" 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.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="memory" target="agent-task"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="160" y="615"/><mxPoint x="160" y="250"/><mxPoint x="700" y="250"/></Array></mxGeometry></mxCell>
        <mxCell id="session-chat" value="状态 / SDK session" 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.7;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="session" target="chatdb"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="180" y="415"/><mxPoint x="180" y="740"/><mxPoint x="375" y="740"/></Array></mxGeometry></mxCell>
        <mxCell id="memory-myfs" 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.7;entryX=0;entryY=0.4;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="memory" target="myfs"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="workspace-myfs" 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="workspace" target="myfs"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="files-myfs" 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;exitY=0.7;entryX=1;entryY=0.4;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="sessionfiles" target="myfs"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="files-artifact" 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="sessionfiles" target="artifact"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="artifact-archive" 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="artifact" target="archive"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="archive-fileapi" 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="archive" target="fileapi"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell>
        <mxCell id="artifact-ui" value="链接 / Widget" 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=1;entryX=0.8;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0" edge="1" parent="1" source="artifact" target="ui"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1100" y="910"/><mxPoint x="700" y="910"/></Array></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="1100" 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="1100" width="160" height="36" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
