Skip to content

Commit eda8c5f

Browse files
committed
Update vendored codex-acp to upstream 0.11.1
1 parent 131bccd commit eda8c5f

9 files changed

Lines changed: 1324 additions & 829 deletions

File tree

apps/desktop/src-tauri/src/ai/ACP.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ All three communicate with the app over ACP / JSON-RPC on stdio.
1414

1515
| | Claude | Codex | Gemini |
1616
|---|---|---|---|
17-
| **Source** | TypeScript (`@zed-industries/claude-agent-acp` v0.23.1) | Rust (`codex-acp` v0.10.0) | External Gemini CLI binary (`gemini --acp`) |
17+
| **Source** | TypeScript (`@zed-industries/claude-agent-acp` v0.23.1) | Rust (`codex-acp` v0.11.1, upstream `c3e95ca` + bounded VaultAI delta) | External Gemini CLI binary (`gemini --acp`) |
1818
| **Release packaging** | Embedded Node runtime + embedded vendor JS | Cargo-built sidecar binary bundled into `binaries/` | Not bundled today; resolved from env/custom path/PATH |
1919
| **Auth methods** | `claude-login`, `gateway` | `chatgpt`, `openai-api-key`, `codex-api-key` | `login_with_google`, `use_gemini` |
2020
| **Descriptor capabilities** | attachments, permissions, plans, terminal_output | attachments, permissions, reasoning, terminal_output | attachments, permissions, plans |
2121
| **VaultAI adapter capabilities** | create, load, resume, fork, list, terminal_output, prompt_queueing | create, load, list, terminal_output, user_input | create, load, resume |
2222
| **Session RPC used by VaultAI** | new, load, resume, fork, list, prompt, cancel | new, load, list, authenticate, prompt, cancel, close | new, load, list, authenticate, prompt, cancel, close |
23-
| **ACP SDK version** | `@agentclientprotocol/sdk` 0.17.0 | `agent-client-protocol` 0.10.2 | Gemini CLI ACP implementation |
23+
| **ACP SDK version** | `@agentclientprotocol/sdk` 0.17.0 | `agent-client-protocol` 0.10.4 | Gemini CLI ACP implementation |
2424
| **Vendor dir** | `vendor/Claude-agent-acp-upstream/` | `vendor/codex-acp/` | N/A |
2525

2626
Notes:
@@ -29,6 +29,7 @@ Notes:
2929
- Gemini emits plans and available-command updates from the ACP stream, but VaultAI currently does **not** surface Gemini `user_input` as a supported adapter capability.
3030
- Codex and Gemini support `session/close` in the client/runtime handle path; Claude session removal is currently local-state cleanup only.
3131
- The current Claude vendor also pulls `@anthropic-ai/claude-agent-sdk` `0.2.83`.
32+
- Codex now tracks `zed-industries/codex-acp` `0.11.1` at upstream commit `c3e95ca414f57a3db8a5bf5714719a102b98e0b5`, with a small local delta to preserve VaultAI review, diff, mode and user-input behavior.
3233

3334
---
3435

@@ -219,7 +220,16 @@ Supported methods:
219220

220221
Auth detection is not based only on persisted `auth_method`. VaultAI also considers environment variables and available secrets when computing the effective ready/authenticated state.
221222

222-
VaultAI carries a local patch on `vendor/codex-acp` `v0.10.0` so `SessionModeState` / `Approval Preset` survives cases where upstream Codex expands a `workspace-write` sandbox with extra writable roots. Without this patch, Codex can stop emitting `modes` even though the session still has a valid approval+sandbox configuration.
223+
VaultAI still carries a bounded local delta on `vendor/codex-acp` `v0.11.1`.
224+
225+
That delta is intentional and currently lives mainly in `src/thread.rs` and `src/codex_agent.rs` to preserve product behavior that the desktop app already depends on:
226+
227+
- VaultAI-specific metadata for status, plan, diff hunks and `user_input_request`
228+
- reconstruction of `unified_diff` into `old_text` / `new_text` for inline review and the edited-files panel
229+
- resilient `modes` / approval-preset behavior when Codex expands writable roots under `workspace-write`
230+
- actor shutdown semantics that do not keep internal message channels alive after external senders are dropped
231+
232+
In other words, Codex is now aligned with upstream `0.11.1`, but it is not a raw upstream checkout. The remaining delta is product-facing, not incidental.
223233

224234
### Gemini
225235

@@ -406,7 +416,7 @@ vendor/
406416
│ ├── dist/index.js
407417
│ ├── node_modules/
408418
│ └── package.json
409-
└── codex-acp/ # codex-acp v0.10.0 + local VaultAI patch
419+
└── codex-acp/ # codex-acp v0.11.1 (upstream c3e95ca + bounded VaultAI delta)
410420
├── src/main.rs
411421
└── Cargo.toml
412422
```

vendor/README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,42 @@ What is vendored mainly for auditability and maintenance, not direct runtime use
3333

3434
That means the directory is intentionally reproducible, but not yet minimal.
3535

36+
## Current Baselines
37+
38+
- `codex-acp/`
39+
- upstream baseline: `zed-industries/codex-acp` `0.11.1`
40+
- synced against upstream commit `c3e95ca414f57a3db8a5bf5714719a102b98e0b5`
41+
- local VaultAI delta remains intentionally bounded and lives mainly in:
42+
- `vendor/codex-acp/src/thread.rs`
43+
- `vendor/codex-acp/src/codex_agent.rs`
44+
- `Claude-agent-acp-upstream/`
45+
- vendored snapshot remains based on `@zed-industries/claude-agent-acp` `0.23.1`
46+
47+
## Current Codex Delta
48+
49+
The Codex vendor is no longer a raw upstream checkout.
50+
51+
The remaining VaultAI-specific delta exists to preserve desktop product behavior:
52+
53+
- ACP metadata that VaultAI consumes for status, plan updates, diffs and `user_input_request`
54+
- reconstruction of `unified_diff` into `old_text`, `new_text` and hunk metadata for inline review and edited-files flows
55+
- mode and approval-preset stability when Codex expands writable roots under `workspace-write`
56+
- actor lifecycle behavior that does not keep the internal message channel alive after external senders disappear
57+
58+
When updating Codex again, treat `c3e95ca` as the comparison base and review those files intentionally instead of replacing the whole directory blindly.
59+
3660
## Updating Vendored Runtimes
3761

3862
When updating a vendored dependency:
3963

4064
1. Refresh the upstream snapshot to the exact release or commit you intend to ship.
4165
2. Keep `dist/` aligned with the vendored Claude source snapshot.
42-
3. Remove any local byproducts before committing.
43-
4. Re-run the relevant validation:
44-
- `cargo test -q`
45-
- `cd apps/desktop && npm run lint && npm test`
66+
3. Re-apply only the bounded local product delta that VaultAI still needs.
67+
4. Remove any local byproducts before committing.
68+
5. Re-run the relevant validation:
69+
- `cd vendor/codex-acp && cargo test -q`
70+
- `VAULTAI_CODEX_ACP_BUNDLE_BIN=/Users/jfg/Documents/DEVELOPMENT/VaultAI/vendor/codex-acp/target/debug/codex-acp cargo test -p vault-ai-desktop`
71+
- `cd apps/desktop && npm test -- src/features/ai/store/chatStore.test.ts src/features/ai/components/AIReviewView.test.tsx src/features/ai/components/EditedFilesBufferPanel.test.tsx src/features/ai/components/reviewMultiSessionIntegration.test.tsx src/features/ai/AIChatPanel.test.tsx src/features/ai/components/AIChatMessageItem.test.tsx src/features/editor/mergeViewSync.test.ts src/features/editor/extensions/mergeViewDiff.test.ts`
4672

4773
The repository keeps the Claude runtime snapshot broader than the minimum
4874
runtime surface on purpose. The desktop build depends directly on `dist/`, while

vendor/codex-acp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ target
22
node_modules
33
npm-packages
44
.DS_Store
5+
codex

0 commit comments

Comments
 (0)