@gakim-digital/dexter-bridge 0.5.21 → 0.11.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/README.md +116 -35
- package/package.json +19 -5
- package/src/agent.js +1351 -331
- package/src/agentOutput.js +209 -0
- package/src/api.js +48 -1
- package/src/cli.js +267 -39
- package/src/config.js +30 -7
- package/src/framerAgentTools.js +1108 -0
- package/src/harnessMcpServer.js +240 -0
- package/src/harnessTools.js +548 -0
- package/src/logger.js +1 -1
- package/src/nativeSkills.js +295 -0
- package/src/outcomeWorkspace.js +351 -0
- package/src/protocol.js +239 -0
- package/src/providers/acp.js +241 -0
- package/src/providers/codexAppServer.js +1050 -156
- package/src/providers/codexStructuredOutput.js +243 -16
- package/src/providers/directByok.js +197 -0
- package/src/providers/index.js +33 -7
- package/src/providers/openCode.js +607 -0
- package/src/runtimeProfiles.js +284 -0
- package/src/providers/claudeAgentSdk.js +0 -507
package/README.md
CHANGED
|
@@ -1,35 +1,108 @@
|
|
|
1
1
|
# Local Agent Bridge
|
|
2
2
|
|
|
3
3
|
Local bridge CLI for InstaWebAI and Dexter. It connects a user's existing
|
|
4
|
-
Claude Code or
|
|
5
|
-
InstaWebAI.
|
|
4
|
+
Codex, Claude Code, or OpenCode setup without sending those login credentials
|
|
5
|
+
to InstaWebAI.
|
|
6
6
|
|
|
7
|
-
The two products share the bridge package but not their pairing state
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`~/.dexter-bridge/app-builder-*` configuration directories.
|
|
11
|
-
- Dexter uses the `framer` connection scope and its standard bridge
|
|
12
|
-
configuration.
|
|
13
|
-
- The API assigns the product identity during pairing. The CLI does not accept
|
|
14
|
-
a flag that can change one product's connection into the other.
|
|
7
|
+
The two products share the bridge package but not their pairing state. The API
|
|
8
|
+
assigns the product identity during pairing; the CLI cannot turn one product's
|
|
9
|
+
pairing code into another product's connection.
|
|
15
10
|
|
|
16
11
|
## InstaWebAI App Builder
|
|
17
12
|
|
|
18
|
-
The
|
|
19
|
-
|
|
13
|
+
The Connections page offers separate Codex, Claude Code, and OpenCode cards.
|
|
14
|
+
Choose an agent, copy its command, and keep that terminal open while building:
|
|
20
15
|
|
|
21
16
|
```bash
|
|
22
17
|
npx --yes @gakim-digital/dexter-bridge@latest connect 123456 \
|
|
23
18
|
--api https://api-insta.instawebai.com/iwm-api/0.0.1 \
|
|
24
|
-
--
|
|
25
|
-
--model codex:gpt-5.5 \
|
|
26
|
-
--config-dir ~/.dexter-bridge/app-builder-codex
|
|
19
|
+
--runtime codex
|
|
27
20
|
```
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
Use `--runtime claude-code` or `--runtime opencode` for the other cards. The
|
|
23
|
+
CLI automatically stores each connection in an isolated directory under
|
|
24
|
+
`~/.dexter-bridge/app-builder/`, so any combination of the three agents can be
|
|
25
|
+
connected at the same time. The selected runtime must already be installed and
|
|
26
|
+
signed in or configured on the same computer.
|
|
27
|
+
|
|
28
|
+
The pairing session is scoped to the runtime selected in InstaWebAI. A modified
|
|
29
|
+
command cannot claim the pairing code for a different runtime.
|
|
30
|
+
|
|
31
|
+
## Dexter for Framer
|
|
32
|
+
|
|
33
|
+
Dexter Framer runs are harness-first. The API sends one scoped outcome
|
|
34
|
+
assignment to the connected Codex, Claude Code, or OpenCode runtime. That
|
|
35
|
+
harness inspects and edits the selected Framer project directly through the
|
|
36
|
+
official `@framer/agent` connection while the plugin remains the chat,
|
|
37
|
+
progress, cancellation, and result interface.
|
|
38
|
+
|
|
39
|
+
The Framer harness receives only these project-scoped tools:
|
|
40
|
+
|
|
41
|
+
- `framer_instructions` and `framer_context`
|
|
42
|
+
- `framer_read_project` and `framer_apply_changes`
|
|
43
|
+
- restricted `framer_read` and `framer_write`
|
|
44
|
+
- `progress_update`
|
|
45
|
+
|
|
46
|
+
Native shell, filesystem, web, and unrelated-project access are disabled for
|
|
47
|
+
Framer outcome runs. Publishing is denied unless a future assignment explicitly
|
|
48
|
+
authorizes it.
|
|
49
|
+
|
|
50
|
+
Project connection is automatic and completes before the model starts:
|
|
51
|
+
|
|
52
|
+
- The run carries the project ID that Dexter read from the open Framer project.
|
|
53
|
+
- The bridge first reuses an active Framer Agent session or locally authorized
|
|
54
|
+
project.
|
|
55
|
+
- If needed, the active paired device redeems the matching encrypted
|
|
56
|
+
per-project credential from the API and installs it through Framer’s official
|
|
57
|
+
CLI.
|
|
58
|
+
- If no credential exists, or Framer rejects a stale one, Dexter opens Framer’s
|
|
59
|
+
browser authorization and resumes the same run automatically after approval.
|
|
60
|
+
|
|
61
|
+
The user never runs `@framer/agent setup`, `project auth`, or `session new`.
|
|
62
|
+
The raw project credential is scoped to the matching active run and paired
|
|
63
|
+
device, is excluded from run payloads and logs, and is never sent to the Framer
|
|
64
|
+
plugin.
|
|
65
|
+
|
|
66
|
+
The bridge reports provider token usage on terminal events, including
|
|
67
|
+
interrupted and cancelled runs. Claude-reported
|
|
68
|
+
dollar cost is stored when available; Codex token-only runs are priced by the
|
|
69
|
+
API’s model cost catalog so they no longer appear as zero-cost runs.
|
|
70
|
+
|
|
71
|
+
On macOS, the bridge holds an idle-sleep assertion only while a claimed run is
|
|
72
|
+
active, then releases it immediately afterward. Closing a laptop lid can still
|
|
73
|
+
suspend local processes; uninterrupted lid-closed execution requires running
|
|
74
|
+
the bridge on an always-on machine or a hosted harness runner.
|
|
75
|
+
|
|
76
|
+
For App Builder runs, planning remains server-owned. Once the workflow
|
|
77
|
+
contract, data model, dependencies, and design direction are ready, the bridge
|
|
78
|
+
receives one bounded product outcome plus a disposable source snapshot. The
|
|
79
|
+
selected harness implements the complete functional outcome in that isolated
|
|
80
|
+
workspace. The API then validates and applies the changed files and runs its
|
|
81
|
+
own type, authorization, API-contract, browser-workflow, responsive, and visual
|
|
82
|
+
checks. A failed verification is returned as one grouped repair brief, with at
|
|
83
|
+
most three complete attempts before the saved workspace is paused for review.
|
|
84
|
+
|
|
85
|
+
Every supported coding harness receives the same seven tools:
|
|
86
|
+
|
|
87
|
+
- `workspace_inspect` and `workspace_sync` for the disposable source tree.
|
|
88
|
+
- `shell_run` for package installation, code generation, tests, builds, and
|
|
89
|
+
other project commands in the isolated build worker.
|
|
90
|
+
- `preview_control` and `browser_control` for the live application.
|
|
91
|
+
- `data_inspect` for owner-scoped, redacted development data.
|
|
92
|
+
- `verification_run` for deterministic and browser workflow checks.
|
|
93
|
+
|
|
94
|
+
Codex receives these as native dynamic tools. Claude Code and OpenCode receive
|
|
95
|
+
the same contract through a local, token-protected MCP bridge. Commands never
|
|
96
|
+
run through the bridge machine's shell. The API delegates them to a
|
|
97
|
+
project-confined build worker with an offline default; only script-disabled npm
|
|
98
|
+
dependency commands receive registry access. The API remains the authority for
|
|
99
|
+
project ownership, protected platform files, data access, command execution,
|
|
100
|
+
and final verification.
|
|
101
|
+
|
|
102
|
+
When a dependency requires a lifecycle build, the harness can run `npm rebuild`
|
|
103
|
+
as a separate offline command after installation. This allows package code to
|
|
104
|
+
prepare itself without combining arbitrary script execution with internet
|
|
105
|
+
access.
|
|
33
106
|
|
|
34
107
|
## Claude Code on macOS
|
|
35
108
|
|
|
@@ -107,11 +180,16 @@ DEXTER_BRIDGE_AGENT=claude-code npx @gakim-digital/dexter-bridge start
|
|
|
107
180
|
DEXTER_BRIDGE_AGENT=codex npx @gakim-digital/dexter-bridge start
|
|
108
181
|
```
|
|
109
182
|
|
|
110
|
-
Codex App Server runs as a model-only engine in a dedicated
|
|
111
|
-
workspace.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
183
|
+
Codex App Server runs planning turns as a model-only engine in a dedicated
|
|
184
|
+
empty temporary workspace. For an App Builder outcome, it receives a disposable
|
|
185
|
+
snapshot and workspace-write access only inside that snapshot; network, app,
|
|
186
|
+
hook, memory, multi-agent, MCP, plugin, image, and web access remain disabled.
|
|
187
|
+
The bridge reads the effective Codex provider configuration and forwards only
|
|
188
|
+
environment variables explicitly referenced by that provider, such as an
|
|
189
|
+
`env_key`; unrelated process secrets remain excluded. The configured provider
|
|
190
|
+
is preferred, with a cached OpenAI/ChatGPT account used as a fallback when its
|
|
191
|
+
required provider credentials are unavailable. Planning sessions may be reused;
|
|
192
|
+
each coding outcome uses a fresh isolated workspace.
|
|
115
193
|
The bridge retains at most 32 recent Codex threads by default; override this
|
|
116
194
|
with `DEXTER_BRIDGE_CODEX_MAX_THREADS`.
|
|
117
195
|
|
|
@@ -124,11 +202,13 @@ for visibility.
|
|
|
124
202
|
Production API endpoints must use HTTPS. Plain HTTP is accepted only for exact
|
|
125
203
|
localhost loopback addresses during local development.
|
|
126
204
|
|
|
127
|
-
Claude Code
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
205
|
+
Claude Code planning turns run as a model-only engine. App Builder outcome runs
|
|
206
|
+
enable local read/write/edit/search tools inside the disposable snapshot plus
|
|
207
|
+
the strict InstaWebAI MCP tool set. Shell checks, previews, browser actions,
|
|
208
|
+
redacted data inspection, and verification execute through the server-owned
|
|
209
|
+
workspace boundary; local shell, network, and external-directory access
|
|
210
|
+
stay disabled. The bridge supplies a strict JSON schema and a product-specific
|
|
211
|
+
system prompt.
|
|
132
212
|
|
|
133
213
|
Claude Code runs use streaming JSON and Codex runs use JSONL so the bridge can
|
|
134
214
|
report input, output, cache, and reasoning tokens even when a turn is
|
|
@@ -164,9 +244,10 @@ desktop window to open that folder.
|
|
|
164
244
|
Useful events in a stuck run:
|
|
165
245
|
|
|
166
246
|
- `model_turn` / `agent_process_spawn` — Claude Code or Codex was invoked.
|
|
247
|
+
- `outcome` — a harness is implementing the complete bounded product outcome.
|
|
167
248
|
- `agent_process_timeout` — the local agent did not return before the timeout.
|
|
168
249
|
- `event_post_done` — the bridge returned a model completion to the shared server loop.
|
|
169
|
-
- `run_done` — the local model turn completed.
|
|
250
|
+
- `run_done` — the local model turn or outcome completed.
|
|
170
251
|
|
|
171
252
|
## Desktop release
|
|
172
253
|
|
|
@@ -210,10 +291,10 @@ Recommended release env:
|
|
|
210
291
|
|
|
211
292
|
```bash
|
|
212
293
|
FRAMER_COMPANION_DOWNLOAD_URL=https://instawebai.com/dexter-bridge
|
|
213
|
-
NEXT_PUBLIC_DEXTER_BRIDGE_VERSION=0.
|
|
294
|
+
NEXT_PUBLIC_DEXTER_BRIDGE_VERSION=0.11.0
|
|
214
295
|
NEXT_PUBLIC_DEXTER_BRIDGE_DOWNLOAD_BASE_URL=https://instawebai.com/downloads/dexter-bridge
|
|
215
|
-
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ARM64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.
|
|
216
|
-
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.
|
|
217
|
-
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ZIP_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.
|
|
218
|
-
NEXT_PUBLIC_DEXTER_BRIDGE_WIN_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.
|
|
296
|
+
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ARM64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.11.0-mac-arm64.dmg
|
|
297
|
+
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.11.0-mac-x64.dmg
|
|
298
|
+
NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ZIP_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.11.0-mac-universal.zip
|
|
299
|
+
NEXT_PUBLIC_DEXTER_BRIDGE_WIN_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.11.0-win-x64.exe
|
|
219
300
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gakim-digital/dexter-bridge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Local bridge for InstaWebAI and Dexter — runs Codex
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"description": "Local bridge for InstaWebAI and Dexter — runs Codex, Claude Code, or OpenCode on your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dexter-bridge": "bin/dexter-bridge.js"
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
"test": "node --test"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=22"
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
22
|
"dexter",
|
|
23
23
|
"framer",
|
|
24
24
|
"instawebai",
|
|
25
25
|
"codex",
|
|
26
|
-
"claude-code"
|
|
26
|
+
"claude-code",
|
|
27
|
+
"opencode"
|
|
27
28
|
],
|
|
28
29
|
"homepage": "https://instawebai.com/dexter-bridge",
|
|
29
30
|
"publishConfig": {
|
|
@@ -31,6 +32,19 @@
|
|
|
31
32
|
},
|
|
32
33
|
"license": "SEE LICENSE IN LICENSE",
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
+
"@framer/agent": "0.0.44",
|
|
36
|
+
"@ai-sdk/anthropic": "^4.0.46",
|
|
37
|
+
"@ai-sdk/deepseek": "^3.0.37",
|
|
38
|
+
"@ai-sdk/google": "^4.0.58",
|
|
39
|
+
"@ai-sdk/openai": "^4.0.52",
|
|
40
|
+
"@ai-sdk/openai-compatible": "^3.0.41",
|
|
41
|
+
"@ai-sdk/xai": "^4.0.50",
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
43
|
+
"@opencode-ai/sdk": "^1.18.25",
|
|
44
|
+
"@openrouter/ai-sdk-provider": "^3.0.0",
|
|
45
|
+
"ai": "^7.0.85",
|
|
46
|
+
"cross-spawn": "^7.0.6",
|
|
47
|
+
"jsonrepair": "^3.15.0",
|
|
48
|
+
"zod": "^4.5.4"
|
|
35
49
|
}
|
|
36
50
|
}
|