deft-bridge 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "ACP → Ideal",
5
+ "description": "Ideal on the ACP front node, on the raw request (docs/FRONT-ENDS-DESIGN.md milestone 12): admission (methods, code-exec opt-in, retry receipts, the permission gate), the application-owned Ideal harness, the projection into ACP, then permissions and the reply. Ideal's permission questions pass Permission Policy (no rules here: the client decides)."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "ACP Endpoint",
11
+ "label": "ACP",
12
+ "config": { "transport": "stdio" }
13
+ },
14
+ {
15
+ "id": "admission",
16
+ "type": "Ideal Admission",
17
+ "label": "Admission",
18
+ "config": { "sessionCodeExec": { "$config": "backends.ideal.sessionCodeExec" } }
19
+ },
20
+ { "id": "ideal", "type": "Ideal Harness", "label": "Ideal", "config": {} },
21
+ { "id": "projection", "type": "Ideal Projection", "label": "Into ACP", "config": {} },
22
+ { "id": "policy", "type": "Permission Policy", "label": "Permissions", "config": {} },
23
+ { "id": "responder", "type": "ACP Responder", "label": "Reply", "config": {} },
24
+ { "id": "telemetry", "type": "Telemetry Sink", "label": "Telemetry", "config": {} }
25
+ ],
26
+ "connections": [
27
+ { "source": "endpoint", "sourceOutput": "out", "target": "admission", "targetInput": "in" },
28
+ { "source": "admission", "sourceOutput": "out", "target": "ideal", "targetInput": "in" },
29
+ { "source": "ideal", "sourceOutput": "out", "target": "projection", "targetInput": "in" },
30
+ { "source": "projection", "sourceOutput": "out", "target": "policy", "targetInput": "in" },
31
+ { "source": "policy", "sourceOutput": "out", "target": "responder", "targetInput": "in" },
32
+ { "source": "responder", "sourceOutput": "out", "target": "telemetry", "targetInput": "in" }
33
+ ]
34
+ }
@@ -0,0 +1,203 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "ACP → OpenAI",
5
+ "description": "Bridge's ACP agent on the OpenAI backend as one graph: the ACP endpoint, sessions, the OpenAI pipeline, updates and the reply (docs/FRONT-ENDS-DESIGN.md milestone 6)."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "ACP Endpoint",
11
+ "label": "ACP (stdio)",
12
+ "config": {
13
+ "transport": "stdio"
14
+ }
15
+ },
16
+ {
17
+ "id": "acp",
18
+ "type": "ACP Normalizer",
19
+ "label": "Initialize and sessions",
20
+ "config": {
21
+ "agentName": "bridge",
22
+ "agentTitle": "Bridge",
23
+ "protocols": { "$config": "server.acpProtocols", "$default": [1] }
24
+ }
25
+ },
26
+ {
27
+ "id": "load",
28
+ "type": "Session Load",
29
+ "label": "Load session",
30
+ "config": {}
31
+ },
32
+ {
33
+ "id": "history",
34
+ "type": "History Window",
35
+ "label": "History window",
36
+ "config": {
37
+ "maxEntries": 4
38
+ }
39
+ },
40
+ {
41
+ "id": "cwd",
42
+ "type": "CWD Context",
43
+ "label": "Working directory",
44
+ "config": {}
45
+ },
46
+ {
47
+ "id": "mcp",
48
+ "type": "Session MCP Tools",
49
+ "label": "Client MCP servers",
50
+ "config": {}
51
+ },
52
+ {
53
+ "id": "messages",
54
+ "type": "Prompt Messages",
55
+ "label": "Messages",
56
+ "config": {}
57
+ },
58
+ {
59
+ "id": "translator",
60
+ "type": "OpenAI Translator",
61
+ "label": "ACP → OpenAI",
62
+ "config": {
63
+ "defaultModel": {
64
+ "$config": "backends.openai.defaultModel",
65
+ "$default": "gpt-4"
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "id": "client",
71
+ "type": "OpenAI Client",
72
+ "label": "OpenAI API",
73
+ "config": {
74
+ "apiKey": {
75
+ "$config": "backends.openai.apiKey",
76
+ "$env": "OPENAI_API_KEY"
77
+ },
78
+ "baseURL": {
79
+ "$config": "backends.openai.baseURL"
80
+ },
81
+ "timeout": {
82
+ "$config": "backends.openai.timeoutMs"
83
+ },
84
+ "maxRetries": {
85
+ "$config": "backends.openai.maxRetries"
86
+ },
87
+ "maxToolIterations": {
88
+ "$config": "backends.openai.maxToolIterations",
89
+ "$default": 5
90
+ },
91
+ "toolMode": {
92
+ "$config": "backends.openai.toolMode",
93
+ "$default": "native"
94
+ }
95
+ }
96
+ },
97
+ {
98
+ "id": "normalizer",
99
+ "type": "OpenAI Normalizer",
100
+ "label": "Normalize Response",
101
+ "config": {}
102
+ },
103
+ {
104
+ "id": "persist",
105
+ "type": "Session Persistence",
106
+ "label": "Save history",
107
+ "config": {}
108
+ },
109
+ {
110
+ "id": "project",
111
+ "type": "Update Projection",
112
+ "label": "Session updates",
113
+ "config": {}
114
+ },
115
+ {
116
+ "id": "responder",
117
+ "type": "ACP Responder",
118
+ "label": "Reply",
119
+ "config": {}
120
+ },
121
+ {
122
+ "id": "telemetry",
123
+ "type": "Telemetry Sink",
124
+ "label": "Telemetry",
125
+ "config": {}
126
+ }
127
+ ],
128
+ "connections": [
129
+ {
130
+ "source": "endpoint",
131
+ "sourceOutput": "out",
132
+ "target": "acp",
133
+ "targetInput": "in"
134
+ },
135
+ {
136
+ "source": "acp",
137
+ "sourceOutput": "out",
138
+ "target": "load",
139
+ "targetInput": "in"
140
+ },
141
+ {
142
+ "source": "load",
143
+ "sourceOutput": "out",
144
+ "target": "history",
145
+ "targetInput": "in"
146
+ },
147
+ {
148
+ "source": "history",
149
+ "sourceOutput": "out",
150
+ "target": "cwd",
151
+ "targetInput": "in"
152
+ },
153
+ {
154
+ "source": "cwd",
155
+ "sourceOutput": "out",
156
+ "target": "mcp",
157
+ "targetInput": "in"
158
+ },
159
+ {
160
+ "source": "mcp",
161
+ "sourceOutput": "out",
162
+ "target": "messages",
163
+ "targetInput": "in"
164
+ },
165
+ {
166
+ "source": "messages",
167
+ "sourceOutput": "out",
168
+ "target": "translator",
169
+ "targetInput": "in"
170
+ },
171
+ {
172
+ "source": "translator",
173
+ "sourceOutput": "out",
174
+ "target": "client",
175
+ "targetInput": "in"
176
+ },
177
+ {
178
+ "source": "client",
179
+ "sourceOutput": "out",
180
+ "target": "normalizer",
181
+ "targetInput": "in"
182
+ },
183
+ {
184
+ "source": "normalizer",
185
+ "sourceOutput": "out",
186
+ "target": "persist",
187
+ "targetInput": "in"
188
+ },
189
+ {
190
+ "source": "persist",
191
+ "sourceOutput": "out",
192
+ "target": "project",
193
+ "targetInput": "in"
194
+ },
195
+ {
196
+ "source": "project",
197
+ "sourceOutput": "out",
198
+ "target": "responder",
199
+ "targetInput": "in"
200
+ },
201
+ { "source": "responder", "sourceOutput": "out", "target": "telemetry", "targetInput": "in" }
202
+ ]
203
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "ACP → Pi",
5
+ "description": "An ACP front with Pi as the back end (docs/FRONT-ENDS-DESIGN.md milestone 10): one Pi RPC process per session (`pi --mode rpc`, or BRIDGE_PI_COMMAND), which keeps the conversation itself; its text and thinking stream as ACP updates. Run with BRIDGE_GRAPH=graphs/acp-pi.json."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "ACP Endpoint",
11
+ "label": "ACP (stdio)",
12
+ "config": { "transport": "stdio" }
13
+ },
14
+ {
15
+ "id": "acp",
16
+ "type": "ACP Normalizer",
17
+ "label": "Initialize and sessions",
18
+ "config": {
19
+ "agentName": "bridge",
20
+ "agentTitle": "Bridge",
21
+ "protocols": { "$config": "server.acpProtocols", "$default": [1] }
22
+ }
23
+ },
24
+ { "id": "translator", "type": "Pi Translator", "label": "Prompt for Pi", "config": {} },
25
+ {
26
+ "id": "client",
27
+ "type": "Pi Client",
28
+ "label": "Pi (a process per session)",
29
+ "config": { "piCommand": { "$env": "BRIDGE_PI_COMMAND" } }
30
+ },
31
+ { "id": "normalizer", "type": "Pi Normalizer", "label": "Pi's answer", "config": {} },
32
+ { "id": "project", "type": "Update Projection", "label": "Session updates", "config": {} },
33
+ { "id": "responder", "type": "ACP Responder", "label": "Reply", "config": {} },
34
+ { "id": "telemetry", "type": "Telemetry Sink", "label": "Telemetry", "config": {} }
35
+ ],
36
+ "connections": [
37
+ { "source": "endpoint", "sourceOutput": "out", "target": "acp", "targetInput": "in" },
38
+ { "source": "acp", "sourceOutput": "out", "target": "translator", "targetInput": "in" },
39
+ { "source": "translator", "sourceOutput": "out", "target": "client", "targetInput": "in" },
40
+ { "source": "client", "sourceOutput": "out", "target": "normalizer", "targetInput": "in" },
41
+ { "source": "normalizer", "sourceOutput": "out", "target": "project", "targetInput": "in" },
42
+ { "source": "project", "sourceOutput": "out", "target": "responder", "targetInput": "in" },
43
+ { "source": "responder", "sourceOutput": "out", "target": "telemetry", "targetInput": "in" }
44
+ ]
45
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "ACP proxy",
5
+ "description": "An ACP \u2192 Bridge \u2192 ACP proxy: the client's messages go to a downstream agent, and the agent's permission questions pass a policy node first (docs/FRONT-ENDS-DESIGN.md milestone 7). The agent's command comes from BRIDGE_PROXY_AGENT (an executable that speaks ACP on stdio; wrap arguments in a script)."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "ACP Endpoint",
11
+ "label": "ACP (stdio)",
12
+ "config": {
13
+ "transport": "stdio"
14
+ }
15
+ },
16
+ {
17
+ "id": "agent",
18
+ "type": "ACP Client",
19
+ "label": "Downstream agent",
20
+ "config": {
21
+ "command": {
22
+ "$env": "BRIDGE_PROXY_AGENT"
23
+ },
24
+ "args": {
25
+ "$env": "BRIDGE_PROXY_AGENT_ARGS",
26
+ "$json": true
27
+ },
28
+ "protocols": {
29
+ "$config": "server.acpProtocols",
30
+ "$default": [1]
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "id": "policy",
36
+ "type": "Permission Policy",
37
+ "label": "Permissions",
38
+ "config": {
39
+ "rules": [
40
+ {
41
+ "title": "^Read ",
42
+ "decision": "allow"
43
+ }
44
+ ],
45
+ "default": "ask"
46
+ }
47
+ },
48
+ {
49
+ "id": "responder",
50
+ "type": "ACP Responder",
51
+ "label": "Reply",
52
+ "config": {}
53
+ },
54
+ {
55
+ "id": "telemetry",
56
+ "type": "Telemetry Sink",
57
+ "label": "Telemetry",
58
+ "config": {}
59
+ }
60
+ ],
61
+ "connections": [
62
+ {
63
+ "source": "endpoint",
64
+ "sourceOutput": "out",
65
+ "target": "agent",
66
+ "targetInput": "in"
67
+ },
68
+ {
69
+ "source": "agent",
70
+ "sourceOutput": "out",
71
+ "target": "policy",
72
+ "targetInput": "in"
73
+ },
74
+ {
75
+ "source": "policy",
76
+ "sourceOutput": "out",
77
+ "target": "responder",
78
+ "targetInput": "in"
79
+ },
80
+ {
81
+ "source": "responder",
82
+ "sourceOutput": "out",
83
+ "target": "telemetry",
84
+ "targetInput": "in"
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "MCP host → ACP agents",
5
+ "description": "bridge mcp as a graph: an MCP host's tool calls start and drive ACP agents; turn limits from [mcp.limits] and the call; the agents' permission questions pass the session's policy, then go to the host (docs/FRONT-ENDS-DESIGN.md milestone 9)."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "MCP Endpoint",
11
+ "label": "MCP (stdio)",
12
+ "config": {
13
+ "transport": "stdio"
14
+ }
15
+ },
16
+ {
17
+ "id": "limits",
18
+ "type": "Turn Limits",
19
+ "label": "Turn limits",
20
+ "config": {
21
+ "limits": {
22
+ "$config": "mcp.limits"
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "id": "agents",
28
+ "type": "Agent Sessions",
29
+ "label": "ACP agents",
30
+ "config": {}
31
+ },
32
+ {
33
+ "id": "policy",
34
+ "type": "Permission Policy",
35
+ "label": "Permissions",
36
+ "config": {
37
+ "default": "session"
38
+ }
39
+ },
40
+ {
41
+ "id": "responder",
42
+ "type": "MCP Responder",
43
+ "label": "Reply",
44
+ "config": {}
45
+ }
46
+ ],
47
+ "connections": [
48
+ {
49
+ "source": "endpoint",
50
+ "sourceOutput": "out",
51
+ "target": "limits",
52
+ "targetInput": "in"
53
+ },
54
+ {
55
+ "source": "limits",
56
+ "sourceOutput": "out",
57
+ "target": "agents",
58
+ "targetInput": "in"
59
+ },
60
+ {
61
+ "source": "agents",
62
+ "sourceOutput": "out",
63
+ "target": "policy",
64
+ "targetInput": "in"
65
+ },
66
+ {
67
+ "source": "policy",
68
+ "sourceOutput": "out",
69
+ "target": "responder",
70
+ "targetInput": "in"
71
+ }
72
+ ]
73
+ }
@@ -0,0 +1,176 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "metadata": {
4
+ "name": "Pi RPC → Anthropic",
5
+ "description": "Bridge's Pi RPC front (--pi-rpc) on the Anthropic backend (docs/FRONT-ENDS-DESIGN.md milestone 10): Pi commands become the standard prompt request, the same session nodes and backend as the ACP graph, and Pi events back. One conversation per connection."
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "endpoint",
10
+ "type": "Pi Endpoint",
11
+ "label": "Pi RPC (stdio)",
12
+ "config": {
13
+ "transport": "stdio"
14
+ }
15
+ },
16
+ {
17
+ "id": "acp",
18
+ "type": "Pi Commands",
19
+ "label": "Pi commands",
20
+ "config": {}
21
+ },
22
+ {
23
+ "id": "load",
24
+ "type": "Session Load",
25
+ "label": "Load session",
26
+ "config": {}
27
+ },
28
+ {
29
+ "id": "history",
30
+ "type": "History Window",
31
+ "label": "History window",
32
+ "config": {
33
+ "maxEntries": 4
34
+ }
35
+ },
36
+ {
37
+ "id": "cwd",
38
+ "type": "CWD Context",
39
+ "label": "Working directory",
40
+ "config": {}
41
+ },
42
+ {
43
+ "id": "messages",
44
+ "type": "Prompt Messages",
45
+ "label": "Messages",
46
+ "config": {}
47
+ },
48
+ {
49
+ "id": "translator",
50
+ "type": "Anthropic Translator",
51
+ "label": "ACP → Anthropic",
52
+ "config": {
53
+ "defaultModel": {
54
+ "$config": "backends.anthropic.defaultModel",
55
+ "$default": "claude-sonnet-4-20250514"
56
+ },
57
+ "defaultMaxTokens": {
58
+ "$config": "backends.anthropic.defaultMaxTokens",
59
+ "$default": 4096
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "id": "client",
65
+ "type": "Anthropic Client",
66
+ "label": "Anthropic API",
67
+ "config": {
68
+ "apiKey": {
69
+ "$config": "backends.anthropic.apiKey",
70
+ "$env": "ANTHROPIC_API_KEY"
71
+ },
72
+ "baseURL": {
73
+ "$config": "backends.anthropic.baseURL"
74
+ },
75
+ "timeout": {
76
+ "$config": "backends.anthropic.timeoutMs"
77
+ },
78
+ "maxRetries": {
79
+ "$config": "backends.anthropic.maxRetries"
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "id": "normalizer",
85
+ "type": "Anthropic Normalizer",
86
+ "label": "Normalize Response",
87
+ "config": {}
88
+ },
89
+ {
90
+ "id": "persist",
91
+ "type": "Session Persistence",
92
+ "label": "Save history",
93
+ "config": {}
94
+ },
95
+ {
96
+ "id": "project",
97
+ "type": "Pi Projection",
98
+ "label": "Pi events",
99
+ "config": {}
100
+ },
101
+ {
102
+ "id": "responder",
103
+ "type": "Pi Responder",
104
+ "label": "Reply and events",
105
+ "config": {}
106
+ }
107
+ ],
108
+ "connections": [
109
+ {
110
+ "source": "endpoint",
111
+ "sourceOutput": "out",
112
+ "target": "acp",
113
+ "targetInput": "in"
114
+ },
115
+ {
116
+ "source": "acp",
117
+ "sourceOutput": "out",
118
+ "target": "load",
119
+ "targetInput": "in"
120
+ },
121
+ {
122
+ "source": "load",
123
+ "sourceOutput": "out",
124
+ "target": "history",
125
+ "targetInput": "in"
126
+ },
127
+ {
128
+ "source": "history",
129
+ "sourceOutput": "out",
130
+ "target": "cwd",
131
+ "targetInput": "in"
132
+ },
133
+ {
134
+ "source": "cwd",
135
+ "sourceOutput": "out",
136
+ "target": "messages",
137
+ "targetInput": "in"
138
+ },
139
+ {
140
+ "source": "messages",
141
+ "sourceOutput": "out",
142
+ "target": "translator",
143
+ "targetInput": "in"
144
+ },
145
+ {
146
+ "source": "translator",
147
+ "sourceOutput": "out",
148
+ "target": "client",
149
+ "targetInput": "in"
150
+ },
151
+ {
152
+ "source": "client",
153
+ "sourceOutput": "out",
154
+ "target": "normalizer",
155
+ "targetInput": "in"
156
+ },
157
+ {
158
+ "source": "normalizer",
159
+ "sourceOutput": "out",
160
+ "target": "persist",
161
+ "targetInput": "in"
162
+ },
163
+ {
164
+ "source": "persist",
165
+ "sourceOutput": "out",
166
+ "target": "project",
167
+ "targetInput": "in"
168
+ },
169
+ {
170
+ "source": "project",
171
+ "sourceOutput": "out",
172
+ "target": "responder",
173
+ "targetInput": "in"
174
+ }
175
+ ]
176
+ }