Skip to content

feat: add mixtape-acp crate for ACP support#7

Merged
adlio merged 1 commit intomainfrom
feat/mixtape-acp
Feb 26, 2026
Merged

feat: add mixtape-acp crate for ACP support#7
adlio merged 1 commit intomainfrom
feat/mixtape-acp

Conversation

@adlio
Copy link
Owner

@adlio adlio commented Feb 25, 2026

Summary

  • Adds the mixtape-acp crate, bridging mixtape agents to the Agent Client Protocol so editors and IDEs (VS Code, Zed, Neovim, JetBrains, Emacs) can use them as coding agents
  • Handles the !Send bridge between the ACP SDK and mixtape-core's Send + Sync Agent using LocalSet + tokio::spawn(), with mpsc channels for event relay
  • Implements the full ACP agent lifecycle: initialize, authenticate, new_session, prompt, cancel
  • Routes IDE permission dialogs back to the agent's request_authorization() channel via Arc<Agent>
  • Includes two examples: echo_agent (mock provider, no credentials) and echo_agent_bedrock (Claude Haiku 4.5 via Bedrock)

Test plan

  • 76 unit tests + 2 doc tests pass (cargo test -p mixtape-acp)
  • Zero clippy warnings (cargo clippy -p mixtape-acp --examples)
  • Both examples compile (cargo build -p mixtape-acp --examples)
  • Manual: run echo_agent example and verify ACP handshake over stdio
  • Manual: run echo_agent_bedrock example with AWS credentials and verify real model responses

Bridge mixtape agents to the Agent Client Protocol so editors and IDEs
(VS Code, Zed, Neovim, JetBrains, Emacs) can use them as coding agents.

The crate handles the !Send bridge between the ACP SDK (which returns
!Send futures) and mixtape-core's Send + Sync Agent by running the ACP
protocol loop on a LocalSet while dispatching Agent::run() via
tokio::spawn(). Events flow back through mpsc channels to a spawn_local
relay task that drives notifications and permission dialogs.

Key components:
- MixtapeAcpBuilder: configure agent factory, name, and version
- MixtapeAcpAgent: implements acp::Agent trait (initialize, authenticate,
  new_session, prompt, cancel)
- SessionManager: maps ACP sessions to dedicated Agent instances
- Event conversion: AgentEvent → ACP SessionUpdate notifications
- Permission bridge: routes IDE permission dialogs back to the agent's
  request_authorization() channel via Arc<Agent>
- serve_stdio(): main entry point for stdio-based ACP servers

Includes 76 unit tests, 2 doc tests, and two examples (mock and Bedrock).
@adlio adlio self-assigned this Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 82.66033% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.51%. Comparing base (8fb9f91) to head (317b7bd).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
mixtape-acp/src/lib.rs 0.00% 49 Missing ⚠️
mixtape-acp/src/adapter.rs 91.41% 20 Missing ⚠️
mixtape-acp/src/permission.rs 93.33% 3 Missing ⚠️
mixtape-acp/src/convert.rs 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
- Coverage   88.61%   88.51%   -0.11%     
==========================================
  Files         101      108       +7     
  Lines       23022    23440     +418     
==========================================
+ Hits        20401    20747     +346     
- Misses       2621     2693      +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adlio adlio merged commit f4c5b99 into main Feb 26, 2026
14 checks passed
@adlio adlio deleted the feat/mixtape-acp branch February 26, 2026 06:23
@adlio adlio restored the feat/mixtape-acp branch February 26, 2026 07:41
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