feat(acp): Agent Client Protocol integration — Phase 1 MVP#774
Merged
Conversation
Implement Phase 1 MVP of ACP integration enabling Zeph to run as a coding agent inside ACP-compatible IDEs (Zed, JetBrains, Neovim). - Scaffold zeph-acp crate with feature gate (#763) - stdio JSON-RPC transport via agent-client-protocol SDK (#764) - Session lifecycle: initialize, new, load, prompt (#765) - Streaming session/update notifications via bridge_loop (#766) - LoopbackChannel bridge pattern (consistent with A2A) - Security hardening: MAX_PROMPT_BYTES, MAX_SESSIONS, error sanitization - Launch with: cargo run --features acp -- --acp
d79ac48 to
31e4531
Compare
bridge_loop was started sequentially after the agent spawner future, which never completes. Use tokio::join! to run both concurrently so streaming updates reach the IDE client.
…erns Replace custom bridge/session architecture with the official SDK pattern: - prompt() blocks and streams notifications via mpsc+oneshot backpressure - AgentSideConnection handles JSON-RPC dispatch and transport framing - AgentSpawner closure constructs Agent per session with LoopbackChannel - Remove bridge.rs and session.rs, consolidate into agent.rs - Fix agent wiring: spawner now receives session's channel directly Closes #763
- SessionId as HashMap key instead of String - acp::Result/acp::Error in Agent trait methods instead of AcpError - ContentBlock::from() via .into() instead of ContentBlock::Text(TextContent::new()) - Remove unused next_id counter and AcpError::Other variant
Skip empty text in loopback_event_to_update to avoid flooding the client with no-op agent_message_chunk notifications during the LLM thinking phase. Add conn.subscribe() stream monitor for JSON-RPC traffic debugging.
Extract build_acp_deps and spawn_acp_agent helper functions from the monolithic run_acp_server to keep each function under 100 lines.
Destructure WatcherBundle explicitly and return watcher handles via keepalive box to prevent them from being dropped prematurely.
Remove underscore prefix from watcher bindings used in keepalive box. Box::pin spawn_acp_agent to satisfy large_futures lint (16KB future).
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial ACP (Agent Client Protocol) integration so Zeph can run as an IDE-embedded ACP stdio server (feature-gated).
Changes:
- Introduces new
zeph-acpcrate implementing an ACP agent and stdio transport using theagent-client-protocolSDK. - Adds
--acpCLI mode and a rootacpfeature (included infull) to launch the ACP server from the main binary. - Updates changelog and lockfile for the new crate/dependencies.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/main.rs |
Adds --acp flag and ACP server runner + agent dependency bootstrap/spawner. |
crates/zeph-acp/src/transport.rs |
Implements stdio transport using AgentSideConnection and a LocalSet for !Send agent trait. |
crates/zeph-acp/src/agent.rs |
Implements ACP agent lifecycle, session map, prompt streaming via LoopbackChannel events. |
crates/zeph-acp/src/error.rs |
Adds AcpError error type. |
crates/zeph-acp/src/lib.rs |
Exposes ACP public API surface (serve_stdio, errors, spawner type). |
crates/zeph-acp/Cargo.toml |
New crate manifest and dependencies. |
Cargo.toml |
Adds zeph-acp to workspace deps and introduces acp feature flag. |
Cargo.lock |
Locks new transitive dependencies for ACP SDK. |
CHANGELOG.md |
Documents ACP addition and related CLI/feature entries. |
- Move agent-client-protocol and async-trait to workspace dependencies - Set MAX_SESSIONS=1 to match Phase 1 single-session spawner - Gate stream monitor message body behind ZEPH_ACP_LOG_MESSAGES env var - Update CHANGELOG to reflect actual types and functions
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zeph-acpcrate implementing ACP (Agent Client Protocol) server over stdio for IDE embeddingagent-client-protocolSDK v0.9 primitives (SessionId,acp::Result,ContentBlock::from,AgentSideConnection)LoopbackChannel), cancel, load_sessionconn.subscribe()for JSON-RPC traffic debuggingTest plan
cargo clippy -p zeph-acp -- -D warningspassescargo nextest run -p zeph-acp— 8 tests pass