deft-bridge 0.0.0-stage → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +70 -2
- package/dist/bridge.js +29285 -0
- package/dist/graphs/acp-anthropic.json +184 -0
- package/dist/graphs/acp-claude-sdk.json +149 -0
- package/dist/graphs/acp-grok.json +179 -0
- package/dist/graphs/acp-ideal.json +34 -0
- package/dist/graphs/acp-openai.json +199 -0
- package/dist/graphs/acp-pi.json +45 -0
- package/dist/graphs/acp-proxy.json +87 -0
- package/dist/graphs/mcp.json +73 -0
- package/dist/graphs/pi-anthropic.json +173 -0
- package/dist/graphs/pi-grok.json +168 -0
- package/dist/graphs/pi-openai.json +176 -0
- package/package.json +65 -3
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "Pi RPC → Grok",
|
|
5
|
+
"description": "Bridge's Pi RPC front (--pi-rpc) on the Grok 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": "Grok Translator",
|
|
51
|
+
"label": "ACP → Grok",
|
|
52
|
+
"config": {}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "client",
|
|
56
|
+
"type": "Grok Client",
|
|
57
|
+
"label": "Grok Agent",
|
|
58
|
+
"config": {
|
|
59
|
+
"command": {
|
|
60
|
+
"$config": "backends.grok.command",
|
|
61
|
+
"$default": "grok"
|
|
62
|
+
},
|
|
63
|
+
"args": {
|
|
64
|
+
"$config": "backends.grok.args",
|
|
65
|
+
"$default": ["agent", "stdio"]
|
|
66
|
+
},
|
|
67
|
+
"env": {
|
|
68
|
+
"$config": "backends.grok.env"
|
|
69
|
+
},
|
|
70
|
+
"requestTimeoutMs": {
|
|
71
|
+
"$config": "backends.grok.requestTimeoutMs"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "normalizer",
|
|
77
|
+
"type": "Grok Normalizer",
|
|
78
|
+
"label": "Normalize Response",
|
|
79
|
+
"config": {}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "persist",
|
|
83
|
+
"type": "Session Persistence",
|
|
84
|
+
"label": "Save history",
|
|
85
|
+
"config": {}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "project",
|
|
89
|
+
"type": "Pi Projection",
|
|
90
|
+
"label": "Pi events",
|
|
91
|
+
"config": {}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "responder",
|
|
95
|
+
"type": "Pi Responder",
|
|
96
|
+
"label": "Reply and events",
|
|
97
|
+
"config": {}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"connections": [
|
|
101
|
+
{
|
|
102
|
+
"source": "endpoint",
|
|
103
|
+
"sourceOutput": "out",
|
|
104
|
+
"target": "acp",
|
|
105
|
+
"targetInput": "in"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"source": "acp",
|
|
109
|
+
"sourceOutput": "out",
|
|
110
|
+
"target": "load",
|
|
111
|
+
"targetInput": "in"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"source": "load",
|
|
115
|
+
"sourceOutput": "out",
|
|
116
|
+
"target": "history",
|
|
117
|
+
"targetInput": "in"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"source": "history",
|
|
121
|
+
"sourceOutput": "out",
|
|
122
|
+
"target": "cwd",
|
|
123
|
+
"targetInput": "in"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"source": "cwd",
|
|
127
|
+
"sourceOutput": "out",
|
|
128
|
+
"target": "messages",
|
|
129
|
+
"targetInput": "in"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"source": "messages",
|
|
133
|
+
"sourceOutput": "out",
|
|
134
|
+
"target": "translator",
|
|
135
|
+
"targetInput": "in"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"source": "translator",
|
|
139
|
+
"sourceOutput": "out",
|
|
140
|
+
"target": "client",
|
|
141
|
+
"targetInput": "in"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"source": "client",
|
|
145
|
+
"sourceOutput": "out",
|
|
146
|
+
"target": "normalizer",
|
|
147
|
+
"targetInput": "in"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"source": "normalizer",
|
|
151
|
+
"sourceOutput": "out",
|
|
152
|
+
"target": "persist",
|
|
153
|
+
"targetInput": "in"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"source": "persist",
|
|
157
|
+
"sourceOutput": "out",
|
|
158
|
+
"target": "project",
|
|
159
|
+
"targetInput": "in"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"source": "project",
|
|
163
|
+
"sourceOutput": "out",
|
|
164
|
+
"target": "responder",
|
|
165
|
+
"targetInput": "in"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "Pi RPC → OpenAI",
|
|
5
|
+
"description": "Bridge's Pi RPC front (--pi-rpc) on the OpenAI 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": "OpenAI Translator",
|
|
51
|
+
"label": "ACP → OpenAI",
|
|
52
|
+
"config": {
|
|
53
|
+
"defaultModel": {
|
|
54
|
+
"$config": "backends.openai.defaultModel",
|
|
55
|
+
"$default": "gpt-4"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "client",
|
|
61
|
+
"type": "OpenAI Client",
|
|
62
|
+
"label": "OpenAI API",
|
|
63
|
+
"config": {
|
|
64
|
+
"apiKey": {
|
|
65
|
+
"$config": "backends.openai.apiKey",
|
|
66
|
+
"$env": "OPENAI_API_KEY"
|
|
67
|
+
},
|
|
68
|
+
"baseURL": {
|
|
69
|
+
"$config": "backends.openai.baseURL"
|
|
70
|
+
},
|
|
71
|
+
"timeout": {
|
|
72
|
+
"$config": "backends.openai.timeoutMs"
|
|
73
|
+
},
|
|
74
|
+
"maxRetries": {
|
|
75
|
+
"$config": "backends.openai.maxRetries"
|
|
76
|
+
},
|
|
77
|
+
"maxToolIterations": {
|
|
78
|
+
"$config": "backends.openai.maxToolIterations",
|
|
79
|
+
"$default": 5
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "normalizer",
|
|
85
|
+
"type": "OpenAI 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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deft-bridge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Bridge: an ACP agent server, and (bridge mcp) an MCP server that drives ACP agents",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"acp",
|
|
8
|
+
"agent-client-protocol",
|
|
9
|
+
"mcp",
|
|
10
|
+
"model-context-protocol",
|
|
11
|
+
"claude",
|
|
12
|
+
"codex",
|
|
13
|
+
"grok",
|
|
14
|
+
"llm"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/deftai/bridge.git",
|
|
19
|
+
"directory": "packages/deft-bridge"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"bin": {
|
|
23
|
+
"bridge": "./dist/bridge.js",
|
|
24
|
+
"deft-bridge": "./dist/bridge.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22.19.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.322",
|
|
35
|
+
"@anthropic-ai/sdk": "^0.107.0",
|
|
36
|
+
"@earendil-works/pi-coding-agent": "^1.5.0",
|
|
37
|
+
"@modelcontextprotocol/client": "2.4.0",
|
|
38
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
39
|
+
"@opentelemetry/api": "~1.9.1",
|
|
40
|
+
"@opentelemetry/api-logs": "^0.223.0",
|
|
41
|
+
"@opentelemetry/exporter-logs-otlp-proto": "^0.223.0",
|
|
42
|
+
"@opentelemetry/exporter-metrics-otlp-proto": "^0.223.0",
|
|
43
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.223.0",
|
|
44
|
+
"@opentelemetry/instrumentation-http": "^0.223.0",
|
|
45
|
+
"@opentelemetry/instrumentation-pino": "^0.69.0",
|
|
46
|
+
"@opentelemetry/sdk-logs": "^0.223.0",
|
|
47
|
+
"@opentelemetry/sdk-metrics": "^2.12.0",
|
|
48
|
+
"@opentelemetry/sdk-node": "^0.223.0",
|
|
49
|
+
"@opentelemetry/sdk-trace-base": "^2.12.0",
|
|
50
|
+
"liquidjs": "^10.30.1",
|
|
51
|
+
"openai": "^6.49.0",
|
|
52
|
+
"pino": "^10.4.0",
|
|
53
|
+
"rete": "^2.0.6",
|
|
54
|
+
"rxjs": "^7.8.2",
|
|
55
|
+
"smol-toml": "^1.9.1",
|
|
56
|
+
"tokenjuice": "0.10.0",
|
|
57
|
+
"undici": "^8.12.3",
|
|
58
|
+
"zod": "^4.6.7"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"esbuild": "0.28.2",
|
|
62
|
+
"@bridge/cli": "0.2.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"bundle": "node scripts/bundle.mjs",
|
|
66
|
+
"clean": "rm -rf dist"
|
|
67
|
+
}
|
|
6
68
|
}
|