Skip to content

Add agent-bridge - #598

Open
xiaohuzai wants to merge 1 commit into
agentclientprotocol:mainfrom
xiaohuzai:add-agent-bridge
Open

Add agent-bridge#598
xiaohuzai wants to merge 1 commit into
agentclientprotocol:mainfrom
xiaohuzai:add-agent-bridge

Conversation

@xiaohuzai

Copy link
Copy Markdown

agent-bridge

One bridge for many CLI coding agents — spawns one config entry as a stdio ACP v1 agent for editors and other spawn-style clients:

npx @xiaohuzai/agent-bridge@0.3.0 acp claude

Zero config needed: with no --config, the registry's built-in default command for the name is spawned (acp codex and acp pi work the same way; editors can override args, e.g. acp codex --config /abs/agents.json).

What it is

  • Speaks ACP v1 on stdio (initializesession/newsession/prompt; the prompt RPC response is the turn terminator), accepting clients that propose newer protocol versions by answering with the version it speaks.
  • Behind the ACP door it drives the real agents: codex via a native app-server adapter (no shim), Claude Code and pi via their official/community ACP shims, and any ACP agent by adding one registry line.
  • Approval-flow mapping done by kind (allow_once/allow_always/reject_once/reject_always → the agent's own optionId), sessions resume across bridge restarts (session/resume with session/load fallback), images ride through as data URLs gated on the advertised promptCapabilities.image. Zero npm dependencies, Node ≥ 18.

Verification: every adapter fact was captured live against the real CLIs/shims (codex app-server, official @agentclientprotocol/codex-acp and claude-agent-acp, pi-acp); the test suite drives the real adapter and real server against scripted fake agents (77 tests, runs in CI).

The entry pins @xiaohuzai/agent-bridge@0.3.0 (current npm latest); version bumps will track releases.

One bridge for many CLI coding agents — spawns one entry as a stdio ACP
v1 agent for editors and other spawn-style clients (npx
@xiaohuzai/agent-bridge acp claude works with zero config; codex runs on
a native app-server adapter). Correct approval-flow mapping
(once/always/deny by kind), session resume across restarts, image
passthrough, zero npm dependencies.

https://github.com/xiaohuzai/agent-bridge
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