## Summary
Migrate codex-acp from ACP SDK 1.5 to 2.0 while preserving the adapter's
existing ACP v1, ACP v2, and AIR feature behavior.
- Opt into the full unstable v1 and v2 SDK entrypoints consistently
across implementation, tests, and examples; the SDK's default
entrypoints are now stable-feature-only.
- Replace removed legacy connection APIs in wire tests and the
spawned-agent fixture with app builders and peer-context request/notify
calls.
- Use the versioned v1 unstable JSON schema export for scenario
validation.
- Remove the v2 omitted-params stream workaround. Verify the SDK handles
omitted/null optional request params for both protocol versions while
rejecting malformed params and missing required fields, including v2
batches.
- Adapt v2 payload construction to the stricter discriminated-union
types without changing existing snapshot outputs.
- Keep newly added standard subagent/directed-message variants outside
the adapter's emitted-update type until their dedicated migration,
rather than adding unreachable runtime error cases. Existing AIR
subagent updates remain unchanged.
- Migrate the real-Codex test runner to the current
connection/auth/event APIs and point the npm command at its tracked
`.agents` path.
Most changed files contain only SDK import-path changes. No existing
snapshots were updated.
## Scope
This is the SDK migration only. Foreground-state/resume synchronization,
structured v2 failure reporting, initial slash commands, standard system
prompts, and standard subagent sessions remain separate work packages.
Existing AIR behavior is preserved; the bundled Codex runtime version is
unchanged.
## Validation
- `npm run typecheck` — passed, including examples.
- `npm test` — 1,790 passed; 36 skipped.
- `npm run build` — passed.
- `npm run test:integration` — 4 passed against the real Codex
app-server with a local mock model.
- Standalone TypeScript check of the real-Codex runner — passed.
- Real-Codex smoke test from an empty scratch directory — streamed
`sdk-upgrade-ok`, with no file/tool access requested.
- `git diff --check` — passed.
The full live-model E2E suite was not run. npm audit reports one
pre-existing high-severity advisory in the development-only MCP test
dependency; this PR does not change that dependency.