<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="agent-surface-simplified-system-view-10745f2c" name="Agent surface — simplified system view">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <object id="1" label="Agent surface — simplified system view" schemaVersion="1" diagramId="agent-surface-simplified-system-view-10745f2c" canonicalAppearanceKey="md:docs/architecture/workspace/05-agent-surface.md#1" sourceSha256="10745f2cdc074b00f83649a6c5ecba73cb8087537204372df54b7db98c8fae42" metadataPayloadSha256="a89d2c77a7319b5ce222504f684a336f6129f011873c79ace42576d2e670dea2" generationKey="10c54ab3be462a797c6d919b8bcfb38ffc0ce905e0a798265cbe76c19f8bc1b6" concepts="[&quot;Agent surface&quot;]" keywords="[&quot;SQLite + files / Supabase RLS&quot;,&quot;streamable HTTP / SSE + Bearer&quot;,&quot;mints eli_pat_* tokens&quot;,&quot;PAT / JWT / MCP_LOCAL_TOKEN&quot;,&quot;External AI agent&quot;,&quot;stdio binary&quot;,&quot;Auth + rate limit&quot;,&quot;Setup wizard&quot;,&quot;PAT lifecycle UI&quot;,&quot;JSON-RPC over&quot;,&quot;HTTP/SSE&quot;,&quot;writes 5 agent config files&quot;,&quot;Settings - Developers (SaaS)&quot;,&quot;registers eli in agent configs&quot;,&quot;bin/eli-mcp.mjs&quot;,&quot;/api/mcp&quot;,&quot;lib/mcp/tools&quot;,&quot;stdin/stdout&quot;,&quot;local&quot;,&quot;route&quot;,&quot;StorageAdapter&quot;,&quot;Claude Code / Cursor / Codex / Gemini / OpenClaw&quot;]" application="{&quot;name&quot;:&quot;eli-ai&quot;,&quot;version&quot;:&quot;0.1.0&quot;}" packages="{&quot;mermaid&quot;:&quot;11.16.0&quot;,&quot;mermaidCli&quot;:&quot;11.16.0&quot;,&quot;playwright&quot;:&quot;1.62.1&quot;,&quot;playwrightCore&quot;:&quot;1.62.1&quot;,&quot;puppeteer&quot;:&quot;25.6.0&quot;,&quot;puppeteerCore&quot;:&quot;25.6.0&quot;}" environment="{&quot;architecture&quot;:&quot;x64&quot;,&quot;containerImage&quot;:&quot;playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109&quot;,&quot;node&quot;:&quot;v26.3.1&quot;,&quot;platform&quot;:&quot;linux&quot;,&quot;yarn&quot;:&quot;4.17.1&quot;}" renderer="{&quot;browser&quot;:{&quot;executableSha256&quot;:&quot;0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71&quot;,&quot;name&quot;:&quot;chromium&quot;,&quot;revision&quot;:&quot;1234&quot;,&quot;version&quot;:&quot;151.0.7922.34&quot;},&quot;font&quot;:{&quot;family&quot;:&quot;Eli Diagram Inter Variable&quot;,&quot;fileSha256&quot;:&quot;3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62&quot;,&quot;licenseSha256&quot;:&quot;3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345&quot;},&quot;mermaidConfigSha256&quot;:&quot;68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101&quot;,&quot;themeCssSha256&quot;:&quot;c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033&quot;}" adapterVersions="{&quot;diagramGenerator&quot;:&quot;2&quot;,&quot;drawioFlowchart&quot;:&quot;1&quot;,&quot;drawioGantt&quot;:&quot;1&quot;,&quot;drawioSequence&quot;:&quot;1&quot;,&quot;drawioState&quot;:&quot;1&quot;}" mermaidType="flowchart" direction="LR" generatedAt="2026-08-12T23:36:30.722Z" mermaidSource="flowchart LR&#10;    classDef ext fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f&#10;    classDef srv fill:#dcfce7,stroke:#22c55e,color:#14532d&#10;    classDef sec fill:#f3e8ff,stroke:#a855f7,color:#4c1d95&#10;&#10;    agent[&quot;External AI agent&lt;br/&gt;Claude Code / Cursor / Codex / Gemini / OpenClaw&quot;]:::ext&#10;    stdioT[&quot;stdio binary&lt;br/&gt;bin/eli-mcp.mjs (local)&quot;]:::srv&#10;    httpT[&quot;HTTP/SSE route&lt;br/&gt;/api/mcp (both modes)&quot;]:::srv&#10;    authRl[&quot;Auth + rate limit&lt;br/&gt;PAT / JWT / MCP_LOCAL_TOKEN&quot;]:::sec&#10;    toolSurface[&quot;16 MCP tools&lt;br/&gt;lib/mcp/tools/*&quot;]:::srv&#10;    storageAd[&quot;StorageAdapter (C1)&lt;br/&gt;SQLite + files / Supabase RLS&quot;]:::ext&#10;    wizard[&quot;Setup wizard&lt;br/&gt;writes 5 agent config files&quot;]:::sec&#10;    patUi[&quot;PAT lifecycle UI&lt;br/&gt;Settings - Developers (SaaS)&quot;]:::sec&#10;&#10;    wizard -.-&gt;|&quot;registers eli in agent configs&quot;| agent&#10;    agent --&gt;|&quot;JSON-RPC over stdin/stdout&quot;| stdioT&#10;    agent --&gt;|&quot;streamable HTTP / SSE + Bearer&quot;| httpT&#10;    httpT --&gt; authRl&#10;    authRl --&gt; toolSurface&#10;    stdioT --&gt; toolSurface&#10;    toolSurface --&gt; storageAd&#10;    patUi -.-&gt;|&quot;mints eli_pat_* tokens&quot;| authRl">
          <mxCell parent="0"/>
        </object>
        <object id="n:agent" label="External AI agentClaude Code / Cursor / Codex / Gemini / OpenClaw" mermaidId="agent" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#dbeafe !important;fontColor=#333333;html=1;rounded=0;strokeColor=#3b82f6 !important;whiteSpace=wrap;">
            <mxGeometry x="509.546875" y="122" width="256" height="124" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:stdioT" label="stdio binarybin/eli-mcp.mjs (local)" mermaidId="stdioT" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#dcfce7 !important;fontColor=#333333;html=1;rounded=0;strokeColor=#22c55e !important;whiteSpace=wrap;">
            <mxGeometry x="1500.53125" y="269.5" width="225.03125" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:httpT" label="HTTP/SSE route/api/mcp (both modes)" mermaidId="httpT" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#dcfce7 !important;fontColor=#333333;html=1;rounded=0;strokeColor=#22c55e !important;whiteSpace=wrap;">
            <mxGeometry x="1029.007813" y="8" width="229.078125" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:authRl" label="Auth + rate limitPAT / JWT / MCP_LOCAL_TOKEN" mermaidId="authRl" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#f3e8ff !important;fontColor=#333333;html=1;rounded=0;strokeColor=#a855f7 !important;whiteSpace=wrap;">
            <mxGeometry x="1485.046875" y="65" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:toolSurface" label="16 MCP toolslib/mcp/tools/*" mermaidId="toolSurface" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#dcfce7 !important;fontColor=#333333;html=1;rounded=0;strokeColor=#22c55e !important;whiteSpace=wrap;">
            <mxGeometry x="1791.046875" y="146" width="168.40625" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:storageAd" label="StorageAdapter (C1)SQLite + files / Supabase RLS" mermaidId="storageAd" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#dbeafe !important;fontColor=#333333;html=1;rounded=0;strokeColor=#3b82f6 !important;whiteSpace=wrap;">
            <mxGeometry x="2009.453125" y="134" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:wizard" label="Setup wizardwrites 5 agent config files" mermaidId="wizard" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#f3e8ff !important;fontColor=#333333;html=1;rounded=0;strokeColor=#a855f7 !important;whiteSpace=wrap;">
            <mxGeometry x="8" y="146" width="251.546875" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:patUi" label="PAT lifecycle UISettings - Developers (SaaS)" mermaidId="patUi" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#f3e8ff !important;fontColor=#333333;html=1;rounded=0;strokeColor=#a855f7 !important;whiteSpace=wrap;">
            <mxGeometry x="1015.546875" y="134" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_wizard_agent_0" label="registers eli in agent configs" mermaidId="L_wizard_agent_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:wizard" target="n:agent" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="259.546875" y="184" as="sourcePoint"/>
              <mxPoint x="509.546875" y="184" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="384.546875" y="184"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_agent_stdioT_0" label="JSON-RPC over stdin/stdout" mermaidId="L_agent_stdioT_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:agent" target="n:stdioT" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="764.559021" y="246" as="sourcePoint"/>
              <mxPoint x="1500.53125" y="307.5" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="890.546875" y="307.5"/>
                <mxPoint x="1143.546875" y="307.5"/>
                <mxPoint x="1378.296875" y="307.5"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_agent_httpT_0" label="streamable HTTP / SSE + Bearer" mermaidId="L_agent_httpT_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:agent" target="n:httpT" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="751.213542" y="122" as="sourcePoint"/>
              <mxPoint x="1029.007813" y="46" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="890.546875" y="46"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_httpT_authRl_0" label="" mermaidId="L_httpT_authRl_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:httpT" target="n:authRl" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1258.085938" y="46" as="sourcePoint"/>
              <mxPoint x="1485.046875" y="77.376997" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1378.296875" y="46"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_authRl_toolSurface_0" label="" mermaidId="L_authRl_toolSurface_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:authRl" target="n:toolSurface" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1741.046875" y="115" as="sourcePoint"/>
              <mxPoint x="1815.109149" y="146" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1766.046875" y="115"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_stdioT_toolSurface_0" label="" mermaidId="L_stdioT_toolSurface_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:stdioT" target="n:toolSurface" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1725.5625" y="307.5" as="sourcePoint"/>
              <mxPoint x="1841.649038" y="222" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1766.046875" y="307.5"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_toolSurface_storageAd_0" label="" mermaidId="L_toolSurface_storageAd_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:toolSurface" target="n:storageAd" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1959.453125" y="184" as="sourcePoint"/>
              <mxPoint x="2009.453125" y="184" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1984.453125" y="184"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_patUi_authRl_0" label="mints eli_pat_* tokens" mermaidId="L_patUi_authRl_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:patUi" target="n:authRl" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1271.546875" y="184" as="sourcePoint"/>
              <mxPoint x="1485.046875" y="152.623003" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1378.296875" y="184"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
