Skip to content

refactor(agent): migrate ACP adapter to agent-client-protocol 1.2#84

Merged
Tryanks merged 1 commit into
mainfrom
deps/acp-1.2
Jul 18, 2026
Merged

refactor(agent): migrate ACP adapter to agent-client-protocol 1.2#84
Tryanks merged 1 commit into
mainfrom
deps/acp-1.2

Conversation

@Tryanks

@Tryanks Tryanks commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Supersedes #63. The 0.10 → 1.2 jump crosses ACP's protocol-v2/schema redesign; this is a structural migration of the ~2800-line adapter, not a rename pass.

Key decisions:

  • Stays on the stable schema::v1 wire surface (ACP's stable protocol is still v1; v2 requires an explicit unstable feature). Dropped the broad unstable feature; retained only unstable_auth_methods and unstable_end_turn_token_usage.
  • ClientSideConnection/async Client trait → 1.2 Client.builder() + typed handlers + ByteStreams; dedicated LocalExecutor thread preserved; handler state moved to Arc<Mutex<_>> for the new Send callback requirements; permissions/fs/terminal handlers spawned off the dispatch loop.
  • Model selection migrated to categorized session config options (session/set_config_option).
  • Semantics preserved: JSONL-authoritative resume (ACP replay swallowed; failed load → new session + warning), approval mapping, interruption, stop-reason/usage, MCP capability gating, path validation, terminal output.
  • All 25 ACP tests retained (one SessionModelState fixture adapted to schema 1.4's config-option equivalent, assertions kept + one added). Known edge: legacy agents exposing only the removed unstable models extension (without categorized config) lose model selection — no stable RPC exists for that in 1.2.

Gates: fmt / clippy -D warnings / workspace tests (agent: 116 passed incl. full ACP suite) green locally.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Tryanks
Tryanks merged commit 2d150a8 into main Jul 18, 2026
3 checks passed
@Tryanks
Tryanks deleted the deps/acp-1.2 branch July 18, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant