mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-27 04:30:59 +00:00
2c19974d5b80d3178b35e80a4bb0a1050588aab9
## Why Tool-use `content_block_start` events arrive before their JSON input. This leaves pending calls with generic labels such as `Read File` or `Terminal`; long-running and concurrent calls can remain indistinguishable in clients while they execute. Anthropic specifies `input_json_delta.partial_json` as arbitrary string fragments, so delta boundaries cannot be assumed to align with fields or JSON values. ## What changed - Buffer `input_json_delta` fragments per parent message and content-block index. - Recover completed top-level fields while the overall JSON is still incomplete. - Refine the existing ACP tool call immediately when distinguishing fields such as `file_path`, `command`, `query`, `pattern`, `url`, or `description` become available. - Continue refining as later fields arrive, while keeping the early pending lifecycle and cleaning incomplete buffers at block/message boundaries. - Avoid publishing ambiguous numeric suffixes (`10` may still become `100` or `10.5`) until a delimiter arrives. ## Test coverage Parameterized coverage now includes Agent/Task, Bash, Read/Write/Edit, Glob/Grep, WebFetch/WebSearch, ReportFindings, ExitPlanMode, AskUserQuestion, Other, custom MCP calls, TodoWrite plan updates, and intentionally suppressed TaskCreate/Update/List/Get calls. Edge cases cover arbitrary field splits, unfinished strings, escaped quotes and commas, numbers, booleans, null, arrays, nested objects, and all three tool block types (`tool_use`, `server_tool_use`, `mcp_tool_use`). ## Validation - `npm run build` - `npm run test:run` (535 passed, 20 skipped) - `npm run check` --------- Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
ACP adapter for the Claude Agent SDK
Use Claude Agent SDK from ACP-compatible clients!
This tool implements an ACP agent by using the official Claude Agent SDK, supporting:
- Context @-mentions
- Images
- Tool calls (with permission requests)
- Following
- Edit review
- TODO lists
- Interactive (and background) terminals
- Custom Slash commands
- Client MCP servers
Learn more about the Agent Client Protocol.
Contribution Policy
This project does not require a Contributor License Agreement (CLA). Instead, contributions are accepted under the following terms:
By contributing to this project, you agree that your contributions will be licensed under the Apache License, Version 2.0. You affirm that you have the legal right to submit your work, that you are not including code you do not have rights to, and that you understand contributions are made without requiring a Contributor License Agreement (CLA).
Description
Pull mirror of agentclientprotocol/claude-agent-acp (Apache-2.0): the ACP bridge that lets Buzz drive Claude Code
Languages
TypeScript
99.2%
JavaScript
0.6%
Shell
0.2%