@minhspark/codex-mcp-bridge 1.25.3 → 1.26.1
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/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +47 -0
- package/README.md +45 -20
- package/docs/new-macos-setup.md +47 -21
- package/docs/new-windows-setup.md +34 -9
- package/docs/project-onboarding.md +21 -8
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/scripts/background-relay-hidden.vbs +11 -0
- package/scripts/install-antigravity-bridge.mjs +26 -14
- package/scripts/install-background-relay.mjs +437 -0
- package/scripts/install-native-relay.mjs +1 -1
- package/scripts/setup-background-relay.mjs +58 -0
- package/scripts/worker-relay.mjs +41 -0
- package/src/antigravity-bridge.mjs +18 -3
- package/src/antigravity-cli.mjs +13 -2
- package/src/antigravity-outbound-bridge.mjs +27 -6
- package/src/antigravity-outbound-targets.mjs +59 -4
- package/src/background-antigravity-worker.mjs +192 -0
- package/src/background-claude-worker.mjs +240 -0
- package/src/background-codex-worker.mjs +344 -0
- package/src/background-relay-client.mjs +107 -0
- package/src/background-relay-config.mjs +98 -0
- package/src/background-relay-daemon.mjs +60 -0
- package/src/background-relay-mcp.mjs +45 -0
- package/src/background-relay-protocol.mjs +54 -0
- package/src/background-relay-registration.mjs +198 -0
- package/src/background-relay-service.mjs +311 -0
- package/src/background-relay-storage.mjs +203 -0
- package/src/background-relay-storage.ps1 +64 -0
- package/src/background-relay.mjs +373 -0
- package/src/claude-bridge.mjs +6 -3
- package/src/index.mjs +7 -2
- package/src/mcp-supervisor.mjs +17 -11
- package/src/native-relay-companion.mjs +1 -1
- package/src/reload-control.mjs +2 -2
- package/src/setup.mjs +26 -9
- package/src/windows-pipe-acl.ps1 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,53 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](ht
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.26.1] - 2026-11-01
|
|
8
|
+
|
|
9
|
+
### Upgrade
|
|
10
|
+
|
|
11
|
+
Update the package and reapply all managed client and background-service settings with the same command:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Use `npm.cmd` in Windows PowerShell. Setup does not open apps or chats.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Read-only background-service checks validate the installed runtime environment. A normal terminal no longer reports a healthy service as unconfigured merely because npm added temporary entries to `PATH` during installation. Package, startup ownership and running-runtime identity checks remain in place.
|
|
22
|
+
|
|
23
|
+
## [1.26.0] - 2026-11-01
|
|
24
|
+
|
|
25
|
+
### Upgrade
|
|
26
|
+
|
|
27
|
+
The same single command updates the package, reapplies managed client settings and configures the independent background service:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use `npm.cmd` in Windows PowerShell. Setup applies the managed client registrations, background startup and scoped worker communication settings, including Antigravity's four relay tool grants. CLI authentication and explicit project grants remain separate from installing configuration; no Desktop credentials are copied and no existing denials are removed. Setup supplies a missing Codex CLI; Claude Code and `agy` must be installed separately when those workers are needed.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- An independent per-user relay and separate Codex, Claude and Antigravity CLI workers, supporting all six worker-to-worker directions. Background jobs and cross-worker messages can continue without a responsive Desktop host. Native conversations retain their existing native routing and are never silently replaced by worker sessions.
|
|
38
|
+
- Durable job receipts, authenticated local transport, same-project delegation, bounded queues and delegation depth, and persistent diagnostic reports. Interrupted sends stay unknown; only proven queued work resumes after daemon restart.
|
|
39
|
+
- Background worker status, discovery, send and receipt tools plus the `worker-relay` command. Service readiness, CLI authentication and model execution evidence are reported separately.
|
|
40
|
+
- Managed background startup and recovery on Windows, macOS and Linux, with hidden Windows launches and idle adoption of updated service code. Setup preserves disabled services and reports pending activation honestly.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- Antigravity MCP registrations use managed supervisors so future package updates can replace idle workers without reconnecting the host. Live CLI sessions and unconfirmed deliveries defer reload; crashed operations are never replayed.
|
|
45
|
+
- Worker CLI launches isolate their session identity from native Desktop chats. Claude worker launches suppress optional user/plugin startup hooks without changing authentication or permission policy.
|
|
46
|
+
- Antigravity worker discovery accepts the CLI's native MCP dispatcher when initialization does not enumerate individual server tools. Dispatcher availability is reported separately from verified relay-tool discovery; missing relay tools and permission failures still produce typed diagnostics.
|
|
47
|
+
|
|
48
|
+
### Validation and limits
|
|
49
|
+
|
|
50
|
+
- Live Windows checks completed all six directions between Codex, Claude and Antigravity workers with Antigravity CLI 1.4.12. A saturated delegation returned `WORKER_DELEGATION_CAPACITY` with `not_sent` instead of queuing behind waiting workers.
|
|
51
|
+
- Closed or frozen Desktop apps do not host these workers. A frozen UI cannot accept new user input or display results until it responds; a terminal's `worker-relay` command or another responsive MCP client can submit authorized background work and read receipts.
|
|
52
|
+
- Execution still requires a running operating system and per-user service, installed and authenticated provider CLIs, an authorized project, network/provider availability, quota and effective tool permissions. Saved configuration is not a guarantee of readiness or a live verification result on another machine.
|
|
53
|
+
|
|
7
54
|
## [1.25.3] - 2026-11-01
|
|
8
55
|
|
|
9
56
|
### Upgrade
|
package/README.md
CHANGED
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/npm/l/@minhspark/codex-mcp-bridge" height="20" alt="license" /></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
Connect **Claude, Codex, and Antigravity** through MCP
|
|
18
|
+
Connect **Claude, Codex, and Antigravity** through MCP using native Desktop handoffs or independent CLI background workers. Native handoffs preserve each app's conversation identity and permission checks; workers have separate sessions and enforce provider permissions and project authorization. Supports Windows, macOS, and Linux; native Desktop integration supports Windows and macOS.
|
|
19
19
|
|
|
20
|
-
The
|
|
20
|
+
The **background worker relay** supports all six directions between Codex, Claude and Antigravity CLI workers, independently of Desktop responsiveness. The optional **native Antigravity bridge** connects existing Desktop conversations in the same project and offers separate bridge-owned CLI streaming sessions. Native App replies remain in the App. [Background workers](#independent-background-workers) · [Antigravity native and streaming-session limits](#antigravity-app-and-cli).
|
|
21
21
|
|
|
22
22
|
https://github.com/user-attachments/assets/98b23989-826f-4d7d-9dcb-ad7dd2739095
|
|
23
23
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
26
|
-
One global npm command installs the package
|
|
26
|
+
One global npm command installs the package, configures the local Claude, Codex and Antigravity bridges, and installs the independent worker relay. Native handoffs require the selected Desktop apps; background work requires the selected provider CLIs and their own authentication. Setup preserves existing project restrictions and custom settings; it does not sign in, grant workspace trust, change permission modes, or restart running apps.
|
|
27
27
|
|
|
28
28
|
### Package — npm
|
|
29
29
|
|
|
@@ -39,7 +39,27 @@ npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/cod
|
|
|
39
39
|
npm.cmd install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Requires **Node.js 22.13+**. Use `.cmd` for this package's commands in Windows PowerShell. **Every release uses this same single install/update command.** It updates the package, applies the managed bridge settings across Claude, Codex and Antigravity, and verifies
|
|
42
|
+
Requires **Node.js 22.13+**. Use `.cmd` for this package's commands in Windows PowerShell. **Every release uses this same single install/update command.** It updates the package, applies the managed bridge settings across Claude, Codex and Antigravity, configures the independent background worker relay, and verifies saved registrations and service activation separately. Comprehensive setup migrates historical automatic Codex navigation to `CODEX_BRIDGE_OPEN_IN_APP=0`, enables Claude's native background preference and updates Antigravity's existing Windows background preference where supported. Accounts, project grants, unrelated custom registrations and existing permission denials remain unchanged. Setup adds only the four worker-relay communication grants required by headless Antigravity; it does not enable broad permission bypasses. If a native Codex CLI is missing, setup installs a pinned official `@openai/codex` package in the current user's `~/.config/GptClaudeBridge/tools` (or the corresponding `XDG_CONFIG_HOME` path); no separate CLI install command is needed.
|
|
43
|
+
|
|
44
|
+
### Independent background workers
|
|
45
|
+
|
|
46
|
+
`worker_status`, `list_workers`, `send_to_worker` and `read_worker_delivery` address separate Codex, Claude and Antigravity CLI workers. The `worker-relay` command provides status, list, send and receipt-read operations from a terminal. All six worker directions are supported: Codex ↔ Claude, Codex ↔ Antigravity and Claude ↔ Antigravity. A native handoff still addresses its original native task; an uncertain native send is never silently replayed through a CLI worker.
|
|
47
|
+
|
|
48
|
+
The service and worker processes run independently of Desktop hosts. Submitted background jobs and worker-to-worker communication can continue while those apps are closed or frozen. A frozen window cannot accept new user input or display new results until it responds again. Submit authorized background work or inspect its receipts through `worker-relay` in a terminal or another responsive MCP client; this does not repair or reopen the frozen UI.
|
|
49
|
+
|
|
50
|
+
The operating system and per-user service must be running, the selected CLI must be installed and authenticated, and the project must be authorized. Provider access, network connectivity, quota and tool permissions still apply. Setup supplies a missing Codex CLI; install Claude Code and `agy` separately when those workers are needed. Sleep, shutdown, a disabled service or a provider failure can prevent execution.
|
|
51
|
+
|
|
52
|
+
`authentication-unverified` with `canAcceptWork: true` is an informational state for a CLI without a supported authentication probe. It is not an authentication failure. Actual failed jobs have a durable diagnostic receipt. Keep the original request ID when inspecting or retrying an uncertain submission; after a terminal `failed` receipt confirms `not_sent`, fix the reported cause before creating a new authorized request.
|
|
53
|
+
|
|
54
|
+
The package update configures per-user startup: Task Scheduler on Windows, a LaunchAgent on macOS and a systemd user service on Linux. It starts the service without opening apps or chats, preserves intentional disabled choices, and drains active jobs before adopting updated code. `worker-relay status` reports transport availability, provider authentication checks and recent errors separately. A saved configuration is not proof of live activation or model access.
|
|
55
|
+
|
|
56
|
+
CLI authentication is separate from Desktop sign-in. Workers use each provider's official credential handling; the bridge does not copy Desktop tokens. Codex and Claude use ephemeral CLI sessions. Antigravity starts a fresh CLI-owned conversation and never resumes a Desktop conversation; its CLI may retain history according to provider behavior and uses its shared MCP inventory. Setup preserves other MCP entries and effective provider permissions. No worker opens or navigates that history.
|
|
57
|
+
|
|
58
|
+
Background dispatch uses the existing shared project-policy file. Select a project explicitly with `bridge-projects allow-project <absolute-project-path>` if it is not already authorized; updates preserve grants and revocations. Each child delegation stays in the same canonical project. Existing provider permissions remain enforced, including denials that prevent unattended execution.
|
|
59
|
+
|
|
60
|
+
Keep the same request UUID for retries and read its durable receipt. Queued work can survive relay restarts; work that might already have reached a worker is marked unknown and is never replayed automatically. Failure reports remain readable after the original window closes, with error/cause codes, delivery certainty and report IDs. Errors from tool calls appear in their Claude/Codex/Antigravity tool results; this package does not create a separate Desktop popup or reopen a chat to show them.
|
|
61
|
+
|
|
62
|
+
Worker delegation is bounded. `WORKER_DELEGATION_CAPACITY` means the destination has no free execution slot and that delegation was not sent or queued behind waiting workers. Inspect or finish existing delegated work before retrying the same unsent request. Queue and delegation limits are reported explicitly.
|
|
43
63
|
|
|
44
64
|
`--allow-scripts=@minhspark/codex-mcp-bridge` authorizes only this package's setup hook. npm versions that block install scripts by default need this flag; a plain install works only when the hook is allowed. `--foreground-scripts` displays configuration progress and failures that npm otherwise hides. If npm prints `1 package had install scripts blocked`, rerun the recommended command or run `codex-bridge-setup` explicitly.
|
|
45
65
|
|
|
@@ -51,6 +71,7 @@ Requires **Node.js 22.13+**. Use `.cmd` for this package's commands in Windows P
|
|
|
51
71
|
| Codex Desktop, Windows/macOS | `codex-native-relay` | Native delivery, pipe forwarding, and relay executor bootstrap |
|
|
52
72
|
| Codex and Claude Code | `antigravity-bridge` | Send to Antigravity App or bridge-owned CLI sessions |
|
|
53
73
|
| Antigravity | `agent-bridge` and `codex-bridge` sidecar | Outbound agent messages and native App connectivity |
|
|
74
|
+
| Independent CLI workers | `worker-relay` | Authorized background jobs and all six worker-to-worker directions |
|
|
54
75
|
|
|
55
76
|
For native Claude-to-Codex handoffs, use an existing native Claude **Code** session and the same local project saved in Codex Desktop. The shared `codex-bridge-desktop` connector has its own legacy route; it does not establish a native Code sender identity. Setup applies saved configuration without opening or restarting apps. Saved configuration is not proof of a live connection; available supervisors reload compatible workers when idle. Complete [verification](#verify-the-installation) with the tools already available in the actual clients. If a native host is unloaded, report the diagnostic instead of opening chats to load a relay.
|
|
56
77
|
|
|
@@ -99,18 +120,19 @@ Run `codex-bridge-setup` after installing through Homebrew. The installers recor
|
|
|
99
120
|
| Codex → Claude Desktop Code | Automatic `claude-bridge` registration |
|
|
100
121
|
| Codex / Claude Desktop Code → Antigravity App or CLI | Automatic Antigravity registrations |
|
|
101
122
|
| Antigravity App → Codex / Claude Desktop Code | Automatic outbound registration and sidecar |
|
|
123
|
+
| Codex ↔ Claude ↔ Antigravity CLI workers | Automatic independent relay setup; provider CLIs, authentication and project grants required |
|
|
102
124
|
| Claude Code ↔ Codex inside VS Code | Separate Windows preview registrations below |
|
|
103
125
|
| ChatGPT → paired Codex Desktop | Hosted plugin plus `codex-sites-connector --pair` |
|
|
104
126
|
|
|
105
127
|
### Antigravity App and CLI
|
|
106
128
|
|
|
107
|
-
The global npm setup registers all Antigravity components. Install and sign in to the Antigravity App
|
|
129
|
+
The global npm setup registers all Antigravity components, including the independent `worker-relay` MCP entry and its four scoped CLI communication grants. Install and sign in to the Antigravity App for native conversations or the `agy` CLI for CLI work. The following commands configure only the native bridge and its legacy streaming-session tools; use the global setup above to configure the independent worker service as well:
|
|
108
130
|
|
|
109
131
|
```bash
|
|
110
132
|
antigravity-mcp-bridge-install --all
|
|
111
133
|
```
|
|
112
134
|
|
|
113
|
-
**Windows PowerShell — all components**
|
|
135
|
+
**Windows PowerShell — all native bridge components**
|
|
114
136
|
|
|
115
137
|
```powershell
|
|
116
138
|
antigravity-mcp-bridge-install.cmd --all
|
|
@@ -140,9 +162,9 @@ antigravity-mcp-bridge-install --desktop
|
|
|
140
162
|
antigravity-mcp-bridge-install --all --dry-run
|
|
141
163
|
```
|
|
142
164
|
|
|
143
|
-
Use `.cmd` for each command on Windows. `--all` includes
|
|
165
|
+
Use `.cmd` for each command on Windows. `--all` includes the Codex, Claude and Antigravity native bridge components; the individual commands are alternatives when only some clients are needed. The installer preserves unrelated configuration and native permissions. Managed MCP supervisors adopt compatible updates when idle; an old direct process remains on its loaded version until the host reconnects normally. No app or chat is opened to force readiness. Antigravity launches its own sidecar from `~/.gemini/config/sidecars/codex-bridge/sidecar.json`; do not run that sidecar manually or copy authentication environment variables between processes.
|
|
144
166
|
|
|
145
|
-
The `agy` CLI must be installed and signed in separately.
|
|
167
|
+
The `agy` CLI must be installed and signed in separately. The legacy `start_antigravity_cli_session` tool creates streaming sessions owned by the calling bridge process; independent background work instead uses `send_to_worker` with `agent: "antigravity"`. There is no separate `--cli` installer flag. Set `ANTIGRAVITY_CLI_BIN` to the absolute `agy` executable path in the MCP server environment if automatic discovery cannot find it.
|
|
146
168
|
|
|
147
169
|
| Tool | Behavior |
|
|
148
170
|
| --- | --- |
|
|
@@ -153,17 +175,17 @@ The `agy` CLI must be installed and signed in separately. CLI sessions are start
|
|
|
153
175
|
| `read_antigravity_delivery` | Reads the original receipt without resending. |
|
|
154
176
|
| `close_antigravity_cli_session` | Closes an idle CLI session owned by the sender. |
|
|
155
177
|
|
|
156
|
-
|
|
178
|
+
For these native bridge and legacy streaming-session tools, generate a new `requestId` UUID for each intentional delivery and reuse it only when inspecting or retrying that same delivery. A pending or unknown receipt must be inspected before further action. Receipts survive process restarts; live streaming CLI processes do not. A CLI timeout retains its conversation identity for inspection. No mode or permission-bypass flag is added; headless tool requests requiring interaction may be denied by Antigravity.
|
|
157
179
|
|
|
158
|
-
The App adapter uses the official [sidecar `agentapi`](https://antigravity.google/docs/sidecars), verifies native workspace metadata, and refuses busy or ambiguous destinations. An App `accepted` receipt confirms native acceptance, not a completed agent reply.
|
|
180
|
+
The App adapter uses the official [sidecar `agentapi`](https://antigravity.google/docs/sidecars), verifies native workspace metadata, and refuses busy or ambiguous destinations. An App `accepted` receipt confirms native acceptance, not a completed agent reply. Its response remains in the exact native App conversation and can be read when that UI is responsive. The CLI adapter uses the official [streaming JSON interface](https://antigravity.google/docs/cli/headless) and returns the agent's final result. It creates bridge-owned headless sessions; it does not attach to an already running interactive terminal. The two surfaces never substitute for one another.
|
|
159
181
|
|
|
160
|
-
The installer also registers **agent-bridge inside Antigravity Desktop** in `~/.gemini/config/mcp_config.json`.
|
|
182
|
+
The installer also registers **agent-bridge inside Antigravity Desktop** in `~/.gemini/config/mcp_config.json`. Once the host has loaded that registration, use the tools available in the intended Antigravity conversation: check `agent_bridge_status`, call `list_agent_tasks` for `codex` or `claude`, then use `send_to_agent_task` with the exact destination ID, project directory, prompt, and a fresh request UUID. Claude destinations also require their native `taskId`. Read `read_agent_delivery` without resending; `read_agent_task` reads the selected Codex task's response or Claude's native task metadata.
|
|
161
183
|
|
|
162
|
-
|
|
184
|
+
Native outbound calls verify Antigravity's per-call MCP metadata, Desktop process ancestry, native workspace/project, and effective permission settings. The sender is attributed as Antigravity. Codex keeps its native task settings; Claude's inbound policy and permission-class checks remain in effect. A socket write to Claude is `sent_unconfirmed`, not acceptance or completion. After MCP restart, a saved receipt remains available but live Claude reply tracking may be unavailable; inspect the exact native task before further action.
|
|
163
185
|
|
|
164
|
-
If a caller says the bridge only supports one-way messaging,
|
|
186
|
+
If a caller says the bridge only supports one-way messaging, compare its loaded version with the installed package: older initialization instructions incorrectly denied the separate native outbound route. A managed worker can reload when idle; an old direct MCP process requires a normal host reconnection. An unavailable inbound sidecar does not prove that the App is closed or that outbound messaging is unsupported. Use available `agent_bridge_status` diagnostics to verify the native outbound route independently, and `worker_status` for the independent workers.
|
|
165
187
|
|
|
166
|
-
|
|
188
|
+
Native outbound support targets existing local Codex tasks and live Claude Desktop Code sessions in the same project. That route rejects nested Antigravity callers and CLI callers claiming Desktop identity; App conversation creation and automatic App reply forwarding are not implemented. These native limits do not restrict the separately authorized CLI workers, which communicate through `worker-relay` in all six directions. Windows Desktop is the native live verification platform; macOS ancestry has unit coverage and Linux native outbound host verification fails closed. The existing Codex↔Claude native bridge remains separate. Use `antigravity-mcp-bridge-install --all --remove` to remove only the native bridge registrations; independent worker configuration and delivery receipts are retained.
|
|
167
189
|
|
|
168
190
|
### Windows (PowerShell)
|
|
169
191
|
|
|
@@ -307,7 +329,7 @@ On Windows and macOS, `codex-native-relay-install` adds this to the relay's entr
|
|
|
307
329
|
env_vars = ["CODEX_APP_TOOLS_PIPE_PATH"]
|
|
308
330
|
```
|
|
309
331
|
|
|
310
|
-
If you register the relay by hand, add the same line and append the variable name if `env_vars` already exists. Only the name is saved, never the temporary pipe path.
|
|
332
|
+
If you register the relay by hand, add the same line and append the variable name if `env_vars` already exists. Only the name is saved, never the temporary pipe path. The changed environment takes effect when the native host next reconnects that MCP process; setup does not restart the app or open a chat to force it.
|
|
311
333
|
|
|
312
334
|
### Linux / WSL (Bash)
|
|
313
335
|
|
|
@@ -455,6 +477,9 @@ Use the bridge tools already available in the actual clients. Configuration chec
|
|
|
455
477
|
| Codex Desktop | `native_relay_status` |
|
|
456
478
|
| Codex / Claude Desktop Code with Antigravity installed | `antigravity_bridge_status` |
|
|
457
479
|
| Antigravity App | `agent_bridge_status` |
|
|
480
|
+
| Any configured background relay client | `worker_status` |
|
|
481
|
+
|
|
482
|
+
For the independent service, `worker-relay status` (`worker-relay.cmd status` on Windows) works from a terminal without a responsive Desktop app. Inspect transport, CLI authentication and recent execution errors separately. A CLI with unverified authentication still needs a successful authorized job before model access is established.
|
|
458
483
|
|
|
459
484
|
To check CLI registrations without sending work:
|
|
460
485
|
|
|
@@ -465,7 +490,7 @@ claude mcp list
|
|
|
465
490
|
|
|
466
491
|
These optional CLI checks require the respective CLI on PATH; the complete setup check can also use its managed Codex CLI. On Windows use `codex.exe mcp list`. An installed skill is listed separately with `npx skills list` (add `-g` for user-wide skills); it is not an MCP registration.
|
|
467
492
|
|
|
468
|
-
|
|
493
|
+
For an authorized live check, send a short message and confirm its reply on each selected route. Check worker-to-worker routes separately from native conversations; registration alone does not prove delivery.
|
|
469
494
|
|
|
470
495
|
## Use
|
|
471
496
|
|
|
@@ -520,10 +545,10 @@ Node.js 22.13+ is required. If a command is missing, open a new terminal and che
|
|
|
520
545
|
If the package or registrations are missing, use the complete installation command:
|
|
521
546
|
|
|
522
547
|
```powershell
|
|
523
|
-
npm.cmd install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge
|
|
548
|
+
npm.cmd install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
524
549
|
```
|
|
525
550
|
|
|
526
|
-
On npm 12, `1 package had install scripts blocked` means the setup hook did not run. The scoped `--allow-scripts` flag authorizes this package's hook; it does not enable every package's scripts globally.
|
|
551
|
+
On npm 12, `1 package had install scripts blocked` means the setup hook did not run. The scoped `--allow-scripts` flag authorizes this package's hook; it does not enable every package's scripts globally. `--foreground-scripts` displays lifecycle progress. A local `npm install`/`npm ci`, `--ignore-scripts`, or `CODEX_BRIDGE_SKIP_SETUP=1` intentionally skips automatic setup.
|
|
527
552
|
|
|
528
553
|
For an already-installed package, preview and apply setup explicitly:
|
|
529
554
|
|
|
@@ -624,7 +649,7 @@ codex-bridge-setup.cmd --check
|
|
|
624
649
|
|
|
625
650
|
1. Save the original task/delivery IDs and let active work finish before replacing its connection. A pending or uncertain delivery can intentionally defer automatic worker reload.
|
|
626
651
|
2. In the affected Claude **Code** session, open `/mcp`, select `codex-bridge`, and reconnect. In ordinary Chat, inspect the separate `codex-bridge-desktop` connector. Reconnect the relevant Codex MCP entries in their actual task as needed.
|
|
627
|
-
3. If the client cannot reload that connection,
|
|
652
|
+
3. If the client cannot reload that connection, retain its diagnostic until the host reconnects normally. Do not open or create a chat to bootstrap a relay. A window's **Reload** action may refresh its UI while retaining the old Code process and MCP failure state. Separately authorized background work remains available through the independent service when its own prerequisites are satisfied.
|
|
628
653
|
4. Call the status tool from that client and compare its runtime version, registration and sender/relay state. A standalone process answering `initialize`, or printing `ready`, does not verify the app's connection.
|
|
629
654
|
|
|
630
655
|
An old worker cannot learn a newly written client environment from a disk update alone. Compatible source changes can reload through the supervisor when idle, but changed launchers/environment or a blocked old connection may still require reconnecting. Do not restart active work merely to clear a receipt or make a status indicator green.
|
|
@@ -675,7 +700,7 @@ Closing an application window and quitting its native host have different effect
|
|
|
675
700
|
|
|
676
701
|
**Symptoms:** `RELAY_UNAVAILABLE`, `connect ENOENT`, a missing native relay socket, or `thread ... already has an active writer`.
|
|
677
702
|
|
|
678
|
-
Native Desktop handoffs require Codex Desktop to be installed, signed in and
|
|
703
|
+
Native Desktop handoffs require Codex Desktop to be installed, signed in and running on Windows/macOS. The app runs `codex-native-relay` while a regular task has its MCP servers loaded. These native-host requirements do not apply to [independent background workers](#independent-background-workers). Recovery never navigates to a task, launches a window, or activates Codex. The Desktop-owned supervisor restarts crashed native relay workers with bounded exponential backoff; pending requests fail without replay, and later requests use the recovered worker. Inherited native pipe hints are rediscovered through the original Desktop process ancestry when they become stale. Requests that never reached the relay wait up to 20 seconds, within their original deadline, for its transport to recover. `CODEX_BRIDGE_RELAY_WAKE=0` disables that wait; the retired `CODEX_BRIDGE_RELAY_KEEPER` flag cannot enable UI navigation.
|
|
679
704
|
|
|
680
705
|
Use the available `native_relay_status` and `codex_bridge_status` tools without opening a chat to load them. Native status performs a read-only `list_projects` probe and reports native dispatch separately from socket availability. Recovery requires the original Desktop-owned supervisor to remain alive: it cannot cold-start an unloaded native MCP, and it stops when the MCP client closes. After five unsuccessful worker replacements, report the exact diagnostic. Never open an old, new, empty, failed or internal **Native Relay** chat to bootstrap readiness. Rerun setup if registration/executor configuration is missing, and verify [native relay pipe forwarding](#native-relay-pipe-forwarding). Never persist a pipe address copied from a different app process. Worker hot reload cannot replace a running supervisor from an older release; configuration success alone does not prove that process is upgraded.
|
|
681
706
|
|
package/docs/new-macos-setup.md
CHANGED
|
@@ -1,35 +1,58 @@
|
|
|
1
1
|
# New macOS setup
|
|
2
2
|
|
|
3
|
-
Connect
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Connect native Desktop conversations through local MCP processes and sockets,
|
|
4
|
+
or use independent Claude, Codex and Antigravity CLI workers. Both routes use
|
|
5
|
+
provider authentication and hosted models; local bridge transport does not mean
|
|
6
|
+
offline inference.
|
|
6
7
|
|
|
7
8
|
## One-command local installation
|
|
8
9
|
|
|
9
10
|
The [ChatGPT plugin setup](../README.md#chatgpt-plugin) uses a hosted Sites
|
|
10
|
-
connector.
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
connector. Install Node.js 22.13+ under the macOS account that will use the
|
|
12
|
+
bridges. Native handoffs require signed-in apps and the same local project saved
|
|
13
|
+
in Codex Desktop and Claude's Code tab. Independent background workers use
|
|
14
|
+
separately authenticated provider CLIs and do not require open Desktop apps.
|
|
15
|
+
Run:
|
|
13
16
|
|
|
14
17
|
```bash
|
|
15
|
-
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge
|
|
18
|
+
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
The script allowance applies only to this package's setup hook. npm versions
|
|
19
22
|
that block install scripts by default need it; a plain install is sufficient
|
|
20
|
-
only when the hook is allowed.
|
|
23
|
+
only when the hook is allowed. `--foreground-scripts` displays setup progress.
|
|
21
24
|
If npm reports `1 package had install scripts blocked`, rerun the command above
|
|
22
25
|
or run `codex-bridge-setup` explicitly.
|
|
23
26
|
|
|
24
27
|
Setup registers the local bridges, adds native pipe forwarding, and bootstraps
|
|
25
28
|
the relay executor. It reuses an available Codex CLI or installs a pinned
|
|
26
29
|
official package under `~/.config/GptClaudeBridge/tools` (or
|
|
27
|
-
`XDG_CONFIG_HOME/GptClaudeBridge/tools`). No separate CLI install command
|
|
28
|
-
required. Run the install under the account that uses the apps, without `sudo`.
|
|
30
|
+
`XDG_CONFIG_HOME/GptClaudeBridge/tools`). No separate Codex CLI install command
|
|
31
|
+
is required. Run the install under the account that uses the apps, without `sudo`.
|
|
29
32
|
The package remains installed if an app configuration step fails, preserving
|
|
30
33
|
the setup command for repair. A successful npm exit does not verify that every
|
|
31
34
|
component is configured.
|
|
32
35
|
|
|
36
|
+
The command also installs an independent per-user LaunchAgent for separate
|
|
37
|
+
Claude, Codex and Antigravity CLI workers and updates its managed settings on
|
|
38
|
+
each release. It registers worker communication and adds only Antigravity's four
|
|
39
|
+
relay tool grants, preserving existing denials, disabled choices and unrelated
|
|
40
|
+
settings. Install Claude Code and `agy` separately when those workers are needed;
|
|
41
|
+
CLI authentication is separate from Desktop sign-in.
|
|
42
|
+
|
|
43
|
+
With authenticated CLIs and an authorized project, `send_to_worker` supports
|
|
44
|
+
all six worker-to-worker directions independently of closed or frozen Desktop
|
|
45
|
+
apps. The operating system and user service must be running; network/provider
|
|
46
|
+
access, quota and tool permissions still apply. A frozen window cannot accept
|
|
47
|
+
new user input or show results until it responds. Use `worker-relay` in a terminal
|
|
48
|
+
or another responsive MCP client to submit authorized background work and read
|
|
49
|
+
receipts. These workers do not resume native chats or launch Desktop windows.
|
|
50
|
+
|
|
51
|
+
Use `worker-relay status` to inspect service and CLI readiness separately, and
|
|
52
|
+
`read_worker_delivery` for durable results. Authorize a selected project with
|
|
53
|
+
`bridge-projects allow-project <absolute-project-path>` before sending work if
|
|
54
|
+
it has no existing grant.
|
|
55
|
+
|
|
33
56
|
| Client | Entry | Route |
|
|
34
57
|
| --- | --- | --- |
|
|
35
58
|
| Claude Code | `codex-bridge` | Native Codex Desktop handoffs |
|
|
@@ -38,22 +61,25 @@ component is configured.
|
|
|
38
61
|
| Codex | `codex-native-relay` | Native Desktop transport |
|
|
39
62
|
| Codex and Claude Code | `antigravity-bridge` | Antigravity App and bridge-owned CLI sessions |
|
|
40
63
|
| Antigravity | `agent-bridge` and `codex-bridge` sidecar | Outbound messaging and native App connectivity |
|
|
64
|
+
| Independent CLI workers | `worker-relay` | Authorized background jobs and all six worker-to-worker directions |
|
|
41
65
|
|
|
42
66
|
The shared `codex-bridge-desktop` connector cannot establish a native Code
|
|
43
67
|
sender identity. The native route uses the actual Code session and the same
|
|
44
68
|
saved local Codex project. Setup does not pair the hosted ChatGPT connector.
|
|
45
69
|
|
|
46
|
-
The relay needs the trusted app-bundled Node runtime selected by
|
|
47
|
-
substitute an arbitrary Homebrew/nvm Node. Pipe forwarding saves
|
|
48
|
-
`CODEX_APP_TOOLS_PIPE_PATH` variable name, never its temporary value.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
apps
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
The native Codex relay needs the trusted app-bundled Node runtime selected by
|
|
71
|
+
setup; do not substitute an arbitrary Homebrew/nvm Node. Pipe forwarding saves
|
|
72
|
+
only the `CODEX_APP_TOOLS_PIPE_PATH` variable name, never its temporary value.
|
|
73
|
+
|
|
74
|
+
Managed MCP supervisors adopt compatible updates when idle. An old direct MCP
|
|
75
|
+
process remains stale until its host reconnects normally; setup does not open
|
|
76
|
+
or create chats, restart apps or interrupt active work to load a relay. When the
|
|
77
|
+
tools are available, check `codex_bridge_status` inside Claude Code,
|
|
78
|
+
`claude_bridge_status` and `native_relay_status` in Codex, and
|
|
79
|
+
`agent_bridge_status` in Antigravity. Follow
|
|
80
|
+
[installation verification](../README.md#verify-the-installation) for each
|
|
81
|
+
selected native or background route. Saved configuration is not a completed live
|
|
82
|
+
exchange or a claim of verification on another Mac.
|
|
57
83
|
|
|
58
84
|
## Checks, recovery, and manual alternatives
|
|
59
85
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# Windows setup and initial permissions
|
|
2
2
|
|
|
3
|
-
Install Node.js 22.13
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Install Node.js 22.13+. Native handoffs use signed-in Desktop apps and the same
|
|
4
|
+
local project saved in Codex Desktop and Claude Desktop's **Code tab**.
|
|
5
|
+
Independent background work uses separately authenticated provider CLIs and
|
|
6
|
+
does not require the Desktop apps to be open. Run one PowerShell command:
|
|
6
7
|
|
|
7
8
|
```powershell
|
|
8
|
-
npm.cmd install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge
|
|
9
|
+
npm.cmd install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
The `--allow-scripts` value permits only this package's setup hook. npm versions
|
|
12
13
|
that block install scripts by default need it; a plain install runs setup only
|
|
13
|
-
when scripts are allowed.
|
|
14
|
+
when scripts are allowed. `--foreground-scripts` displays setup progress. If
|
|
14
15
|
npm reports `1 package had install scripts blocked`, run the recommended command
|
|
15
16
|
again or run `codex-bridge-setup.cmd` explicitly.
|
|
16
17
|
|
|
@@ -22,6 +23,27 @@ executor. A failed component is reported as incomplete rather than ready. The
|
|
|
22
23
|
package stays installed when an app configuration step fails, so the setup
|
|
23
24
|
command remains available for repair. npm success alone does not verify setup.
|
|
24
25
|
|
|
26
|
+
The same command installs the independent worker relay as a hidden per-user
|
|
27
|
+
scheduled task and applies its managed settings on every update. It registers
|
|
28
|
+
worker communication and adds only the four Antigravity relay tool grants;
|
|
29
|
+
existing disabled settings, permission denials and unrelated settings remain.
|
|
30
|
+
Install Claude Code and `agy` separately when those workers are needed; setup
|
|
31
|
+
supplies a missing Codex CLI. CLI authentication is separate from Desktop sign-in.
|
|
32
|
+
|
|
33
|
+
Once the selected CLIs are authenticated and the project is authorized,
|
|
34
|
+
`send_to_worker` supports all six directions between Claude, Codex and
|
|
35
|
+
Antigravity workers, even while Desktop apps are closed or frozen. The operating
|
|
36
|
+
system and user service must be running; network/provider access, quota and tool
|
|
37
|
+
permissions still apply. A frozen window cannot accept new user input or show
|
|
38
|
+
results until it responds. Use `worker-relay.cmd` in a terminal or another
|
|
39
|
+
responsive MCP client to submit authorized work and read receipts. The relay
|
|
40
|
+
does not open apps or resume native chats.
|
|
41
|
+
|
|
42
|
+
Use `worker-relay.cmd status` to inspect service and CLI readiness separately,
|
|
43
|
+
and `read_worker_delivery` for durable results and diagnostic reports. Authorize
|
|
44
|
+
a selected project with `bridge-projects.cmd allow-project <absolute-project-path>`
|
|
45
|
+
before sending work if it has no existing grant.
|
|
46
|
+
|
|
25
47
|
## Installed entries
|
|
26
48
|
|
|
27
49
|
| Client | Entry | Purpose |
|
|
@@ -32,16 +54,19 @@ command remains available for repair. npm success alone does not verify setup.
|
|
|
32
54
|
| Claude Desktop shared connectors | `codex-bridge-desktop` | Connect ordinary chat to local Codex app-server sessions |
|
|
33
55
|
| Codex and Claude Code | `antigravity-bridge` | Send to Antigravity App or bridge-owned CLI sessions |
|
|
34
56
|
| Antigravity | `agent-bridge` and `codex-bridge` sidecar | Outbound agent messages and native App connectivity |
|
|
57
|
+
| Independent CLI workers | `worker-relay` | Authorized background jobs and all six worker-to-worker directions |
|
|
35
58
|
|
|
36
59
|
The shared `codex-bridge-desktop` connector does not establish a native Code
|
|
37
60
|
sender identity. Use the actual Code session for native Codex Desktop work.
|
|
38
61
|
Existing project restrictions, permission modes, and custom settings are
|
|
39
62
|
preserved. Setup does not sign in, grant workspace trust, or close applications.
|
|
40
63
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
Managed MCP supervisors adopt compatible updates when idle. An old direct MCP
|
|
65
|
+
process remains stale until its host reconnects normally; setup does not open
|
|
66
|
+
or create a chat to load it. A conversation refresh may leave the previous
|
|
67
|
+
process loaded. When the tools are available, check `codex_bridge_status` inside
|
|
68
|
+
the sending Claude Code task, `claude_bridge_status` and `native_relay_status`
|
|
69
|
+
in Codex, and
|
|
45
70
|
`agent_bridge_status` in Antigravity. Configuration verification is separate
|
|
46
71
|
from a completed live exchange.
|
|
47
72
|
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
# Project onboarding and shared authorization
|
|
2
2
|
|
|
3
|
-
The recommended global installation registers the bridges
|
|
3
|
+
The recommended global installation registers the bridges and configures the
|
|
4
|
+
independent worker relay automatically:
|
|
4
5
|
|
|
5
6
|
```sh
|
|
6
|
-
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge
|
|
7
|
+
npm install -g @minhspark/codex-mcp-bridge@latest --allow-scripts=@minhspark/codex-mcp-bridge --foreground-scripts
|
|
7
8
|
```
|
|
8
9
|
|
|
9
10
|
In Windows PowerShell use `npm.cmd`. The script allowance authorizes only this
|
|
10
11
|
package's setup hook; npm versions that block install scripts by default need
|
|
11
|
-
it. A plain install runs setup only when the hook is allowed.
|
|
12
|
-
`--foreground-scripts`
|
|
12
|
+
it. A plain install runs setup only when the hook is allowed.
|
|
13
|
+
`--foreground-scripts` displays progress. If npm prints
|
|
13
14
|
`1 package had install scripts blocked`, rerun the recommended command or run
|
|
14
15
|
`codex-bridge-setup` explicitly. The setup creates
|
|
15
16
|
`codex-bridge` for Claude Code and the separate `codex-bridge-desktop` shared
|
|
16
17
|
Claude connector, configures Codex and Antigravity, and initializes the native
|
|
17
|
-
relay on Windows/macOS.
|
|
18
|
+
relay on Windows/macOS. It also installs the per-user background service and
|
|
19
|
+
worker communication settings, including Antigravity's four scoped relay tool
|
|
20
|
+
grants. See [installation](../README.md#installation).
|
|
18
21
|
|
|
19
22
|
Setup preserves existing scope and permission choices. Registration does not
|
|
20
23
|
grant workspace trust, authorize cross-project work, or establish a live
|
|
21
24
|
connection. The shared Desktop connector uses local app-server sessions;
|
|
22
25
|
native Codex Desktop handoffs require a verified Claude Code sender in the
|
|
23
|
-
same saved project.
|
|
26
|
+
same saved project. Independent CLI workers require their own provider
|
|
27
|
+
authentication and project authorization; they can communicate while Desktop
|
|
28
|
+
apps are closed or frozen. A frozen UI still cannot accept new user input or
|
|
29
|
+
display results. Use a terminal or another responsive client, subject to the
|
|
30
|
+
[background worker prerequisites](../README.md#independent-background-workers).
|
|
24
31
|
|
|
25
32
|
`codex-bridge-setup --check` inspects all saved registrations. Use
|
|
26
33
|
`codex-bridge-setup --dry-run` to preview or rerun `codex-bridge-setup` to apply
|
|
@@ -31,15 +38,21 @@ If app configuration is incomplete, npm retains the package for repair; its
|
|
|
31
38
|
success exit alone does not verify setup. Explicit setup and `--check` return
|
|
32
39
|
a nonzero status until the saved configuration passes verification.
|
|
33
40
|
|
|
34
|
-
##
|
|
41
|
+
## Shared project policy
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
Native Codex/Claude handoffs can read the same optional policy file via
|
|
37
44
|
`CODEX_BRIDGE_PROJECT_POLICY`. `bridge-projects` defaults to
|
|
38
45
|
`~/.config/GptClaudeBridge/projects.json`. A shared home-directory path avoids
|
|
39
46
|
different AppData views in packaged Windows applications. The policy stores
|
|
40
47
|
canonical directory identities; do not copy it to a new machine as proof of
|
|
41
48
|
authorization there.
|
|
42
49
|
|
|
50
|
+
Independent background dispatch always requires a matching explicit project
|
|
51
|
+
or parent grant from the shared
|
|
52
|
+
policy; setup preserves grants and revocations rather than authorizing a new
|
|
53
|
+
project. Use `bridge-projects allow-project <absolute-project-path>` for a
|
|
54
|
+
selected project (`bridge-projects.cmd` on Windows), or the source commands below.
|
|
55
|
+
|
|
43
56
|
```sh
|
|
44
57
|
node scripts/bridge-projects.mjs allow-project /absolute/projects/example
|
|
45
58
|
node scripts/bridge-projects.mjs allow-parent /absolute/projects
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minhspark/codex-mcp-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"description": "Connect Claude, Codex, and Antigravity through MCP, with native Desktop handoffs and bridge-owned Antigravity CLI sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"codex-mcp-bridge-install": "scripts/install-claude-desktop.mjs",
|
|
31
31
|
"codex-bridge-code-install": "scripts/install-claude-code.mjs",
|
|
32
32
|
"codex-bridge-setup": "scripts/setup.mjs",
|
|
33
|
+
"worker-relay": "scripts/worker-relay.mjs",
|
|
33
34
|
"bridge-projects": "scripts/bridge-projects.mjs",
|
|
34
35
|
"claude-mcp-bridge-install": "scripts/install-codex-mcp.mjs",
|
|
35
36
|
"codex-native-relay": "src/native-relay-launcher.mjs",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "codex-mcp-bridge",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.26.1",
|
|
5
5
|
"description": "Connect ChatGPT to your own Codex Desktop projects and conversations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bui Dang Minh",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Option Explicit
|
|
2
|
+
If WScript.Arguments.Count <> 3 Then WScript.Quit 2
|
|
3
|
+
Dim relayShell, relayEnvironment, relayNode, relayService
|
|
4
|
+
Set relayShell = CreateObject("WScript.Shell")
|
|
5
|
+
Set relayEnvironment = relayShell.Environment("PROCESS")
|
|
6
|
+
relayNode = WScript.Arguments(0)
|
|
7
|
+
relayService = WScript.Arguments(1)
|
|
8
|
+
If InStr(relayNode, Chr(34)) > 0 Or InStr(relayNode, "%") > 0 Then WScript.Quit 2
|
|
9
|
+
If InStr(relayService, Chr(34)) > 0 Or InStr(relayService, "%") > 0 Then WScript.Quit 2
|
|
10
|
+
relayEnvironment("AGENT_RELAY_DIRECTORY") = WScript.Arguments(2)
|
|
11
|
+
WScript.Quit relayShell.Run(Chr(34) & relayNode & Chr(34) & " " & Chr(34) & relayService & Chr(34), 0, True)
|