Skip to content

feat: add agy-acp adapter for Google Antigravity CLI#896

Merged
thepagent merged 1 commit into
mainfrom
feat/agy-acp-adapter
May 22, 2026
Merged

feat: add agy-acp adapter for Google Antigravity CLI#896
thepagent merged 1 commit into
mainfrom
feat/agy-acp-adapter

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent commented May 22, 2026

Summary

Add a thin Rust ACP stdio adapter (agy-acp) that bridges openab to Google's Antigravity CLI (agy) via agy -p invocations.

Inspired by #863 (@Joseph19820124) — this implementation takes a different approach: a standalone Rust binary instead of a Node.js wrapper, with proper stdin/stdout pipe handling for reliable subprocess communication.

Changes

  • agy-acp/: standalone Rust crate (same pattern as gateway/, xai-proxy/)
    • Reads ACP JSON-RPC on stdin from openab
    • Filters <sender_context> blocks, extracts user text
    • Spawns agy -p "prompt" with stdin=null, stdout=piped
    • Uses --continue for multi-turn session continuity
    • Sends response as agent_message_chunk notification
  • Dockerfile.antigravity: multi-stage build (openab + agy-acp + agy binary)
  • docs/antigravity.md: configuration and usage guide

Config

[agent]
command = "agy-acp"
args = []
working_dir = "/home/agent"

Test plan

  • Tested end-to-end locally: openab + agy-acp + agy (周嘟嘟 bot on Discord)
  • ~5s response time per prompt
  • Multi-turn via --continue verified

Limitations

  • No streaming (agy -p returns full response at once)
  • Cancel is a no-op (agy -p runs to completion)
  • Session continuity uses --continue (resumes most recent conversation)

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365150664560881/1507210905862017227

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner May 22, 2026 02:52
@chaodu-agent chaodu-agent force-pushed the feat/agy-acp-adapter branch from d4906a8 to c197492 Compare May 22, 2026 02:54
@chaodu-agent
Copy link
Copy Markdown
Collaborator Author

Fixes pushed (2 commits)

4534a6c — fix(agy-acp): add --dangerously-skip-permissions, stderr capture, timeout

  • --dangerously-skip-permissions now passed to agy (matches docs)
  • stderr captured and logged via eprintln! for debugging
  • Subprocess timeout: 120s default, configurable via AGY_TIMEOUT_SECS
  • README.md updated: Antigravity added to intro, features, ASCII diagram, agents table

a4f96f0 — fix(agy-acp): check exit code before marking session history

  • Non-zero exit → JSON-RPC error with exit code + stderr message
  • has_history only set on success → prevents broken --continue chains after failures

All issues from @普渡法師 review addressed. CI running.

Add a thin Rust ACP stdio adapter (agy-acp) that translates openab's
JSON-RPC protocol into `agy -p` invocations, enabling Antigravity CLI
as an agent backend.

- agy-acp/: standalone Rust crate, reads ACP JSON-RPC on stdin, spawns
  `agy -p "prompt"` for each session/prompt, uses --continue for
  multi-turn session continuity
- Dockerfile.antigravity: multi-stage build bundling openab + agy-acp +
  agy binary from Google Storage
- docs/antigravity.md: configuration and usage guide

Tested end-to-end locally with Discord (周嘟嘟 bot) — ~5s response time.

Closes #863
@chaodu-agent chaodu-agent force-pushed the feat/agy-acp-adapter branch from 146d2f4 to eba5deb Compare May 22, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants