{ "name": "Ori Architecture", "width": 1220, "height": 640, "nodes": [ { "id": "browser", "x": 20, "y": 20, "w": 220, "h": 110, "label": "Browser\\nReact SPA", "kind": "box" }, { "id": "ui-components", "x": 20, "y": 150, "w": 220, "h": 150, "label": "UI Components\\n· Agent Panel\\n· Workspace Panel\\n· File Tree\\n· Monaco Editor\\n· Terminal (xterm.js)", "kind": "accent" }, { "id": "httpserver", "x": 370, "y": 20, "w": 280, "h": 90, "label": "httpserver\\nServes SPA + /ws", "kind": "dark" }, { "id": "bridge", "x": 370, "y": 140, "w": 280, "h": 130, "label": "bridge\\n· WebSocket ⇄ ACP\\n· Event broadcast\\n· Permission routing\\n· History replay", "kind": "dark" }, { "id": "agent", "x": 370, "y": 300, "w": 135, "h": 90, "label": "agent\\nACP session\\nlifecycle", "kind": "dark" }, { "id": "files", "x": 515, "y": 300, "w": 135, "h": 90, "label": "files\\nWorkspace\\nfile API", "kind": "dark" }, { "id": "terminal", "x": 370, "y": 410, "w": 135, "h": 90, "label": "terminal\\nPTY per\\nconnection", "kind": "dark" }, { "id": "mockagent", "x": 515, "y": 410, "w": 135, "h": 90, "label": "mockagent\\nDemo agent\\n(testing)", "kind": "accent" }, { "id": "acp-agent", "x": 800, "y": 230, "w": 400, "h": 130, "label": "ACP Agent\\n(claude-code-acp / Gemini CLI)\\n\\nJSON-RPC over stdio\\nsession_update · permission_request", "kind": "intent" }, { "id": "note", "x": 20, "y": 560, "w": 1180, "h": 60, "label": "Go backend bridges browser WebSockets to ACP stdio, broadcasting agent updates to all connected browsers while routing permissions back to the waiting call.", "kind": "note" } ], "edges": [ { "from": "browser", "to": "httpserver", "label": "1. load SPA" }, { "from": "browser", "to": "bridge", "label": "2. WebSocket\\n/ws", "fromSide": "right", "fromAt": 100, "toSide": "left", "toAt": 180 }, { "from": "ui-components", "to": "bridge", "label": "3. prompt +\\npermission\\nresponses", "fromSide": "right", "fromAt": 225, "toSide": "left", "toAt": 225 }, { "from": "bridge", "to": "ui-components", "label": "4. session_update\\nevents (replay)", "dashed": true, "waypoints": [{ "x": 310, "y": 230 }, { "x": 280, "y": 230 }] }, { "from": "bridge", "to": "agent", "label": "5. ACP\\nlifecycle", "fromSide": "bottom", "fromAt": 450, "toSide": "top", "toAt": 437 }, { "from": "agent", "to": "acp-agent", "label": "6. stdio\\nJSON-RPC", "fromSide": "right", "fromAt": 345, "toSide": "left", "toAt": 295 }, { "from": "acp-agent", "to": "bridge", "label": "7. updates +\\npermissions", "dashed": true, "waypoints": [{ "x": 720, "y": 200 }, { "x": 650, "y": 200 }] }, { "from": "ui-components", "to": "files", "label": "file ops", "fromSide": "right", "fromAt": 280, "toSide": "left", "toAt": 345, "dashed": true }, { "from": "ui-components", "to": "terminal", "label": "shell I/O", "fromSide": "bottom", "fromAt": 130, "toSide": "left", "toAt": 455, "dashed": true } ] }