refactor(acp)!: give AcpAgent its own launch config#276
Merged
Conversation
Replace the reused MCP wire-schema type with an SDK-owned stdio process configuration. Update JSON parsing, Yopo, tests, changelog, and the 2.0 migration guide, and remove obsolete agent constructors. BREAKING CHANGE: AcpAgent::new now accepts AcpAgentConfig; server and into_server are replaced by config and into_config; JSON environment variables are a string map; zed_claude_code, zed_codex, and google_gemini are removed.
There was a problem hiding this comment.
Pull request overview
This PR refactors AcpAgent to use an SDK-owned process launch configuration (AcpAgentConfig) instead of reusing the MCP wire-schema types, updating parsing, example client behavior, tests, and 2.0 migration documentation to match the new API and JSON shape.
Changes:
- Introduces
AcpAgentConfigand updatesAcpAgentAPIs to useconfig()/into_config()and the new JSON format (env as a string map). - Updates YOPO argument handling to preserve shell argument boundaries while still supporting single-argument JSON configuration (and adds targeted tests).
- Updates changelog and the 2.0 migration guide to document the breaking changes and removals of obsolete constructors.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/yopo/src/main.rs | Updates CLI/docs and parsing logic for agent args (JSON vs argv), adds tests for new behavior. |
| src/agent-client-protocol/src/lib.rs | Re-exports AcpAgentConfig from the crate root. |
| src/agent-client-protocol/src/acp_agent.rs | Implements AcpAgentConfig, migrates AcpAgent internals/parsing/tests from schema types to SDK-local config. |
| src/agent-client-protocol/CHANGELOG.md | Documents the breaking API and configuration shape changes. |
| md/migration_v2.0.md | Extends the 2.0 migration guide with the new AcpAgentConfig API and JSON/env changes. |
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.
Replace the reused MCP wire-schema type with an SDK-owned stdio process configuration. Update JSON parsing, Yopo, tests, changelog, and the 2.0 migration guide, and remove obsolete agent constructors.
BREAKING CHANGE: AcpAgent::new now accepts AcpAgentConfig; server and into_server are replaced by config and into_config; JSON environment variables are a string map; zed_claude_code, zed_codex, and google_gemini are removed.