feat(acp): add ACP external agent support#2507
feat(acp): add ACP external agent support#2507YingchaoX wants to merge 3 commits intoagentscope-ai:mainfrom
Conversation
|
Hi @YingchaoX, this is your 6th Pull Request. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official CoPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
There was a problem hiding this comment.
Code Review
This pull request implements the Agent Client Protocol (ACP), allowing CoPaw to integrate with external coding agents like OpenCode and Qwen-code. The changes include a comprehensive management UI, backend runtime services using JSON-RPC over stdio, and security enhancements for handling dangerous operations via user approvals. Feedback was provided regarding the argument parsing logic in the harness configuration, which fails to correctly handle quoted strings containing spaces.
Description
Add ACP (Agent Communication Protocol) external agent support across backend, console, runtime policy, tests, and docs.
This PR introduces ACP harness configuration and execution flow, adds approval-aware external agent handling, supports session reuse / restore behavior, exposes ACP settings in the Console, and adds the related tests and documentation updates. It also includes follow-up fixes from local verification so
pre-commitandpytestpass cleanly before review.Related Issue: Fixes #1059; Relates to #2291
Security Considerations: Adds approval-aware ACP execution controls, path / tool safety checks, unverified harness restrictions for dangerous actions, and new harness configuration fields that affect runtime permission behavior.
Type of Change
Component(s) Affected
Checklist
pre-commit run --all-fileslocally and it passespytestor as relevant) and they passTesting
Local Verification Evidence
uv run pre-commit run --all-files Passed check python ast.........................................................Passed sort simple yaml files...............................(no files to check)Skipped check yaml...............................................................Passed check xml................................................................Passed check toml...............................................................Passed check docstring is first.................................................Passed check json...............................................................Passed fix python encoding pragma...............................................Passed detect private key.......................................................Passed trim trailing whitespace.................................................Passed Add trailing commas......................................................Passed mypy.....................................................................Passed black....................................................................Passed flake8...................................................................Passed pylint...................................................................Passed prettier.................................................................Passed uv run pytest ============================= 412 passed in 26.87s =============================Additional Notes