1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
<mxfile host="65bd71144e">
<diagram id="ori-packages" name="ori package dependencies">
<mxGraphModel dx="727" dy="240" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="850" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="spa" value="ui/src — React SPA (chat panel + workspace: file tree, Monaco preview/editor, markdown/asciidoc rendering, xterm.js terminal)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="40" y="30" width="260" height="80" as="geometry"/>
</mxCell>
<mxCell id="uiembed" value="ui (Go package) (go:embed of the SPA production build)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="380" y="40" width="240" height="60" as="geometry"/>
</mxCell>
<mxCell id="cmdori" value="cmd/ori (entry point: wires config, agent, bridge, http)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="380" y="180" width="240" height="60" as="geometry"/>
</mxCell>
<mxCell id="config" value="internal/config (CLI flag parsing and validation)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="60" y="300" width="220" height="60" as="geometry"/>
</mxCell>
<mxCell id="httpserver" value="internal/httpserver (serves the embedded SPA, /healthz, mounts /ws)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="320" y="300" width="240" height="60" as="geometry"/>
</mxCell>
<mxCell id="bridge" value="internal/bridge (WS hub: broadcast, history replay, permission routing)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="600" y="300" width="250" height="60" as="geometry"/>
</mxCell>
<mxCell id="agentpkg" value="internal/agent (spawns the agent process, drives the ACP session)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="890" y="300" width="250" height="60" as="geometry"/>
</mxCell>
<mxCell id="mockagent" value="internal/mockagent (deterministic demo ACP agent scenario)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="890" y="180" width="250" height="60" as="geometry"/>
</mxCell>
<mxCell id="cmdmock" value="cmd/ori-mock-agent (the demo agent as a stdio binary)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="890" y="60" width="250" height="60" as="geometry"/>
</mxCell>
<mxCell id="acpsdk" value="github.com/coder/acp-go-sdk (ACP JSON-RPC client and agent library)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="740" y="460" width="250" height="60" as="geometry"/>
</mxCell>
<mxCell id="wslib" value="github.com/coder/websocket (WebSocket implementation)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="450" y="460" width="230" height="60" as="geometry"/>
</mxCell>
<mxCell id="adapter" value="npx @zed-industries/claude-code-acp (Claude Code ACP adapter — runtime subprocess)" style="rounded=1;whiteSpace=wrap;html=1;dashed=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="890" y="580" width="270" height="60" as="geometry"/>
</mxCell>
<mxCell id="filespkg" value="internal/files (workspace file API: list, read, write)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="60" y="420" width="220" height="60" as="geometry"/>
</mxCell>
<mxCell id="terminalpkg" value="internal/terminal (one shell per WebSocket, in a PTY)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="60" y="520" width="220" height="60" as="geometry"/>
</mxCell>
<mxCell id="ptylib" value="github.com/creack/pty (pseudo-terminal allocation)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="320" y="560" width="230" height="60" as="geometry"/>
</mxCell>
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdori" target="config" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdori" target="httpserver" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdori" target="bridge" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdori" target="agentpkg" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdori" target="uiembed" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e6" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="cmdmock" target="mockagent" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="mockagent" target="acpsdk" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e8" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="agentpkg" target="acpsdk" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e9" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="bridge" target="acpsdk" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e10" style="edgeStyle=orthogonalEdgeStyle;html=1;" parent="1" source="bridge" target="wslib" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e11" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="cmdori" target="filespkg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e12" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="cmdori" target="terminalpkg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e13" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="terminalpkg" target="ptylib">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e14" style="edgeStyle=orthogonalEdgeStyle;html=1;" edge="1" parent="1" source="terminalpkg" target="wslib">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r1" value="build embedded via go:embed" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;" parent="1" source="spa" target="uiembed" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r4" value="HTTP /api/files, /api/file" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;" edge="1" parent="1" source="spa" target="filespkg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r5" value="WebSocket /ws/terminal" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;" edge="1" parent="1" source="spa" target="terminalpkg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r2" value="WebSocket /ws (runtime)" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;" parent="1" source="spa" target="bridge" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r3" value="spawns (runtime, default --agent-cmd)" style="edgeStyle=orthogonalEdgeStyle;html=1;dashed=1;" parent="1" source="agentpkg" target="adapter" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
|