@gakim-digital/dexter-bridge 0.5.20 → 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 CHANGED
@@ -1,6 +1,108 @@
1
- # Dexter Bridge
1
+ # Local Agent Bridge
2
2
 
3
- Local Companion CLI for Dexter's Framer plugin.
3
+ Local bridge CLI for InstaWebAI and Dexter. It connects a user's existing
4
+ Codex, Claude Code, or OpenCode setup without sending those login credentials
5
+ to InstaWebAI.
6
+
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.
10
+
11
+ ## InstaWebAI App Builder
12
+
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:
15
+
16
+ ```bash
17
+ npx --yes @gakim-digital/dexter-bridge@latest connect 123456 \
18
+ --api https://api-insta.instawebai.com/iwm-api/0.0.1 \
19
+ --runtime codex
20
+ ```
21
+
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.
4
106
 
5
107
  ## Claude Code on macOS
6
108
 
@@ -78,11 +180,16 @@ DEXTER_BRIDGE_AGENT=claude-code npx @gakim-digital/dexter-bridge start
78
180
  DEXTER_BRIDGE_AGENT=codex npx @gakim-digital/dexter-bridge start
79
181
  ```
80
182
 
81
- Codex App Server runs as a model-only engine in a dedicated empty temporary
82
- workspace. Shell, app, hook, memory, multi-agent, MCP, plugin, image, and web
83
- tools are disabled; only a minimal non-secret environment is inherited. The
84
- CLI and desktop bridge keep one isolated app-server process alive across model
85
- turns.
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.
86
193
  The bridge retains at most 32 recent Codex threads by default; override this
87
194
  with `DEXTER_BRIDGE_CODEX_MAX_THREADS`.
88
195
 
@@ -95,11 +202,13 @@ for visibility.
95
202
  Production API endpoints must use HTTPS. Plain HTTP is accepted only for exact
96
203
  localhost loopback addresses during local development.
97
204
 
98
- Claude Code is launched as a model-only engine: local tools, slash commands,
99
- MCP integrations, browser access, and project-agent context are disabled. The
100
- bridge supplies a strict JSON schema and a system prompt that requires Dexter
101
- tool requests to be returned as structured output instead of being executed
102
- inside Claude Code.
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.
103
212
 
104
213
  Claude Code runs use streaming JSON and Codex runs use JSONL so the bridge can
105
214
  report input, output, cache, and reasoning tokens even when a turn is
@@ -135,9 +244,10 @@ desktop window to open that folder.
135
244
  Useful events in a stuck run:
136
245
 
137
246
  - `model_turn` / `agent_process_spawn` — Claude Code or Codex was invoked.
247
+ - `outcome` — a harness is implementing the complete bounded product outcome.
138
248
  - `agent_process_timeout` — the local agent did not return before the timeout.
139
249
  - `event_post_done` — the bridge returned a model completion to the shared server loop.
140
- - `run_done` — the local model turn completed.
250
+ - `run_done` — the local model turn or outcome completed.
141
251
 
142
252
  ## Desktop release
143
253
 
@@ -181,10 +291,10 @@ Recommended release env:
181
291
 
182
292
  ```bash
183
293
  FRAMER_COMPANION_DOWNLOAD_URL=https://instawebai.com/dexter-bridge
184
- NEXT_PUBLIC_DEXTER_BRIDGE_VERSION=0.2.0
294
+ NEXT_PUBLIC_DEXTER_BRIDGE_VERSION=0.11.0
185
295
  NEXT_PUBLIC_DEXTER_BRIDGE_DOWNLOAD_BASE_URL=https://instawebai.com/downloads/dexter-bridge
186
- NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ARM64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.2.0-mac-arm64.dmg
187
- NEXT_PUBLIC_DEXTER_BRIDGE_MAC_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.2.0-mac-x64.dmg
188
- NEXT_PUBLIC_DEXTER_BRIDGE_MAC_ZIP_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.2.0-mac-universal.zip
189
- NEXT_PUBLIC_DEXTER_BRIDGE_WIN_X64_URL=https://instawebai.com/downloads/dexter-bridge/Dexter-Bridge-0.2.0-win-x64.exe
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
190
300
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gakim-digital/dexter-bridge",
3
- "version": "0.5.20",
4
- "description": "Local Companion bridge for the Dexter Framer plugin — runs Codex or Claude Code on your machine.",
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": ">=18.17"
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
- "cross-spawn": "^7.0.6"
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
  }