Skip to content

feat(antigravity): enable native ACP on nightly - #1613

Merged
thepagent merged 4 commits into
openabdev:mainfrom
jacklau1993:feat/native-antigravity-acp
Nov 22, 2026
Merged

thepagent merged 4 commits into
openabdev:mainfrom
jacklau1993:feat/native-antigravity-acp

Conversation

@jacklau1993

@jacklau1993 jacklau1993 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this solve?

The legacy Antigravity adapter extracts text from ACP prompts, leaving Discord image attachments as URLs. Start Google's native agy acp server by default in nightly-antigravity so nightly users can try direct image input during the transition to native ACP.

Refs #1612

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1573731943286313142

Review Contract

Goal

Enable native ACP on the Antigravity nightly image. Keep the wrapper available as an opt-out for nightly users who need existing sessions.

Non-goals

Switching the default for release and pre-beta images and converting legacy session IDs are future work.

Accepted Residual Risks

Proposed for maintainer approval. Nightly deployments that inherit the image's command will start native ACP. A legacy wrapper session ID can pass native session/load and then fail with trajectory not found on the next prompt. Users can explicitly pin command = "agy-acp" with args = [] before updating a nightly deployment to keep using existing wrapper-backed sessions. They can start a new thread when switching to native ACP.

Acceptance Criteria

  • The nightly Antigravity build selects agy acp and agy acp --login. The package defaults and CLI pins for release and pre-beta remain at their previous values.
  • The nightly image retains the legacy agy-acp binary, and the guide documents the opt-out and session compatibility.
  • The nightly build checks native image capability before exporting that image's digest for tagging.
  • Discord image recognition, model switching, and native restart continuation work in the isolated E2E deployment.

Follow-ups

Decide how to migrate saved wrapper session IDs before changing the release default. Keep #1612 open for that follow-up.

At a Glance

nightly-antigravity -> agy acp -> native ACP image prompts
release and pre-beta -> agy-acp
nightly explicit [agent] override -> agy-acp

Prior Art & Industry Research

Proposed Solution

Set the native command and sign-in command in the Antigravity nightly build arguments. The shared package target keeps the wrapper command and auth program as its defaults. The nightly workflow checks the image's native command, auth command, available wrapper binary, and initialize image capability before passing the digest to the tagging job.

Why this approach?

Nightly users can exercise native image input while the project gathers migration feedback. Existing deployments can pin the adapter in OpenAB configuration, and release and pre-beta users continue to get the existing default.

Alternatives Considered

Switching all images together would activate native ACP in release deployments before the transition period. Adding an image shim to the wrapper would create an additional attachment path alongside the vendor's native implementation.

Validation

  • Workflow YAML, shell syntax, pin parity, and PR Review Contract validation.
  • Isolated Discord E2E using OpenAB 0.10.1 and Antigravity CLI 1.5.14. Direct attachment recognition, /models switching, and native session/load after restart passed.
  • Legacy compatibility probe. Native session/load accepted a wrapper session ID, but its next prompt failed with trajectory not found. A prompt addressed using the underlying Antigravity conversation ID ran successfully.
  • Built the release-default and nightly-override package runtime stages on Linux amd64. The release-default build retained agy-acp, agy auth, and Antigravity CLI 1.2.13. The nightly-override build passed the offline native ACP smoke check, including image capability and the legacy binary.

Discord E2E screenshots

Direct image recognition. The model reads Q6M-27X and identifies the three shapes and colors.

Discord attachment and the model's image recognition response

Model switch and restart continuation. /models switches to Gemini 4 Hydrogen, and the same thread recalls MAPLE-803 after restart.

Discord model switch and the control phrase recalled after restart

@jacklau1993 jacklau1993 changed the title feat(antigravity)!: use native ACP by default feat(antigravity): enable native ACP on nightly Nov 21, 2026
@chaodu-agent

This comment has been minimized.

@jacklau1993

Copy link
Copy Markdown
Contributor Author

I addressed F1–F3 from the first review in e7a4940.

  • F1 — The Helm example now uses configToml and inherits the Antigravity image's default command.
  • F2 — The guide documents the trajectory not found symptom and how to use /reset in the affected Discord thread to start a fresh native ACP session.
  • F3 — The guide groups the legacy adapter's behavior and settings under Legacy adapter. It documents [agent].working_dir in place of the unused AGY_WORKING_DIR.

helm lint and helm template passed with the example values. The rendered deployment selects nightly-antigravity and inherits the image command. The rollout is still scoped to nightly.

Ready for another review.

@chaodu-agent

This comment has been minimized.

@chaodu-agent

This comment has been minimized.

@chaodu-agent chaodu-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

LGTM ✅ - Round-1 findings are fixed in e7a4940, and the maintainer has accepted the nightly breaking change for native ACP.

Consolidated review: #1613 (comment)

chaodu-agent
chaodu-agent previously approved these changes Nov 21, 2026
thepagent
thepagent previously approved these changes Nov 21, 2026
thepagent pushed a commit that referenced this pull request Nov 22, 2026
…ke (#1614)

* ci(smoke-test): send integer ACP protocolVersion and poll for handshake

The non-codex smoke-test handshake sent protocolVersion "2025-03-26"
(an MCP-style string). ACP v1 requires an integer, so opencode, claude,
gemini, kimi, cursor, mimocode and pi all rejected initialize with
Invalid params and fell back to a bare --help check. For mimocode that
fallback is intermittently non-zero, which failed PR #1613 twice.

- send protocolVersion 1 to every agent
- poll docker logs for up to 30s instead of a fixed 5s sleep
- accept any initialize result with protocolVersion (agentInfo is
  optional in ACP), still printing the agent name when present
- run the workflow when the workflow file itself changes

* fix(review): match ACP reply by id, assert protocolVersion 1, fail on error, clean up attach

- Select the initialize reply with id 1 per line (fromjson?), skipping
  notifications, logs, and malformed lines.
- Require jsonrpc 2.0 and result.protocolVersion == 1; agentInfo stays optional.
- A matched reply that is a JSON-RPC error or a different version now fails
  the leg instead of falling back to --help. The --help fallback applies only
  when no reply arrives within 30 s.
- Track the background docker attach PID and clean up the container and
  attach client in an EXIT trap.

* fix(review): only accept JSON-RPC responses in the ACP probe and fix stale comment

- The selector now requires jsonrpc 2.0 and a result or error member, so an
  agent request or a JSON log line carrying id 1 no longer ends polling.
- A JSON-RPC error with id null (parse error) is also treated as a reply and
  fails the leg.
- Update the step comment: a rejected string version now fails the leg
  instead of falling through to --help.

---------

Co-authored-by: chaodu-agent <274062505+chaodu-agent@users.noreply.github.com>
…ty-acp

# Conflicts:
#	.github/workflows/docker-smoke-test.yml
@chaodu-agent
chaodu-agent dismissed stale reviews from thepagent and themself via c703e10 November 22, 2026 01:06
@chaodu-agent

Copy link
Copy Markdown
Collaborator

Note

LGTM ✅ - c703e10 merges main into the branch to resolve a one-line paths conflict with #1614. The PR diff against main is unchanged from the round-3 review, and every check passes, including the mimocode smoke-test leg that failed before.

What This PR Does

The agy-acp adapter turns ACP prompts into text, so Discord image attachments reach Antigravity as URLs. This PR makes only the nightly-antigravity image default to Google's native agy acp server (auth: agy acp --login). Release and pre-beta images keep agy-acp. Refs #1612.

How It Works

  • Dockerfile.package turns the hard-coded OPENAB_AGENT_COMMAND / OPENAB_AGENT_AUTH_COMMAND into ARG AGY_AGENT_COMMAND / ARG AGY_AGENT_AUTH_COMMAND. Their defaults keep the old values (agy-acp, agy auth).
  • The nightly Antigravity resolver passes AGY_AGENT_COMMAND=agy acp and AGY_AGENT_AUTH_COMMAND=agy acp --login as newline-separated build args. OpenAB splits the env value on whitespace into command agy and args ["acp"].
  • After each per-arch nightly build, before the digest is exported for tagging, .github/scripts/test-antigravity-acp.sh checks both env defaults and confirms the agy-acp binary is present. It then sends an ACP initialize request under --network none and requires agentCapabilities.promptCapabilities.image == true.
  • docs/antigravity.md documents the nightly default, the adapter opt-out, /reset recovery for legacy threads, a configToml Helm example that inherits the image command, and a separate "Legacy adapter" section.

Findings

# Severity Finding Location
1 🟢 Round-1 F1 fixed: the Helm example uses configToml, sets no agent command, and so inherits the image default docs/antigravity.md:43-59
2 🟢 Round-1 F2 fixed: the guide names the trajectory not found symptom and links /reset as in-thread recovery docs/antigravity.md:23-25
3 🟢 Round-1 F3 fixed: adapter-only behavior and settings moved under "Legacy adapter"; the unused AGY_WORKING_DIR row was replaced by [agent].working_dir docs/antigravity.md:61-130
4 🟢 The native default is limited to nightly through a build arg, and smoke-test assertions pin the release/pre-beta defaults Dockerfile.package:370-373
5 🟢 The native capability gate runs before digest export, so a broken native image never gets a nightly-* tag .github/workflows/nightly-build.yml:470
6 🟢 The merge from main keeps both new paths entries (nightly-build.yml from this PR, docker-smoke-test.yml from #1614) and changes nothing else in the PR diff .github/workflows/docker-smoke-test.yml:16-17
Finding Details

🟢 F1: Helm example

Verified against the chart: discord.botToken renders the DISCORD_BOT_TOKEN secret env, and configToml is mounted verbatim. Since chart v0.10.0, the old agent.command example would have failed rendering anyway, because Helm-rendered config was removed. Without an [agent] section, OpenAB falls back to OPENAB_AGENT_COMMAND, so the example follows whatever image tag is selected.

🟢 F2: Session recovery

/reset exists (docs/slash-commands.md#reset) and is the correct in-thread recovery. Automatic migration of wrapper session IDs stays as accepted residual risk, tracked in #1612.

🟢 F3: Legacy adapter section

AGY_WORKING_DIR has no references in the Rust sources, Dockerfiles, or chart, so removing its row corrects stale documentation. The auth example now uses sh -c 'exec $OPENAB_AGENT_AUTH_COMMAND', which works for both agy auth and agy acp --login.

🟢 F4 / F5

Unchanged from round 1. Release and pre-beta behavior does not change. The capability check runs on native per-arch runners and fails before Export digest.

🟢 F6: Merge from main

#1614 and this PR each added one line at the same place in the smoke-test paths filter. The merge commit keeps both lines. git diff origin/main...c703e10 still shows the same 5 files (+100 / -47) as round 3, and the only change between e7a4940 and c703e10 is #1614 arriving from main.

Round 4: Merge From main

The branch conflicted with main after #1614 merged. With the maintainer's approval, the conflict was resolved by merging main into the branch (maintainer edits are enabled on this PR). No contributor code was changed.

CI on c703e10 (Docker Smoke Test run 44969914757): all 15 smoke-test legs and validate-packaged-pins pass. The mimocode leg, which failed on e7a4940 because of the string protocolVersion bug fixed in #1614, now logs ACP handshake ok. The antigravity leg logs ACP handshake ok - agent=agy. The two kiro-cli legs still use the --help fallback, as on main.

The new commit dismissed the earlier approvals, so the PR needs a fresh approval before merge.

Maintainer Direction

The maintainer has confirmed that the project direction is to adopt native Antigravity ACP, and that the breaking change for nightly users is accepted. This approves the Review Contract's residual risk: nightly threads created by agy-acp may hit trajectory not found after upgrading, and /reset or a new thread recovers. The "Three Reasons" section below is kept as decision context only; it does not argue against this direction.

Addressing External Reviewer Feedback

@jacklau1993 (response to round 1)

I addressed F1-F3 from the first review in e7a4940.

✅ Addressed in e7a4940: verified each item above against the diff and the Helm chart templates.

Verification Notes
  • git diff 770b488..e7a4940 touches only docs/antigravity.md (+48 / -45). The workflow, script, and Dockerfile changes are byte-identical to round 1, which passed every smoke-test leg and validate-packaged-pins.
  • smoke-test on e7a4940 failed only on the mimocode leg; that flake is fixed on main by ci(smoke-test): send integer ACP protocolVersion and poll for handshake #1614 and passes on c703e10.
  • The new nightly step runs only on main. The first nightly after merge is the real gate for the native capability check (both amd64 and arm64).
Baseline Check
  • PR opened: 2026-11-21
  • Head: c703e108b06bae5387363d8d3d824be44f43b1b3 (merge of main into e7a4940); base: main; merge-base: 53e0c68d647b17cb2f8b11fa656ccabd8c52cec5
  • Main already has: the agy-acp adapter as the only Antigravity agent command, with a hard-coded image default
  • Net-new value: native ACP (image prompts, /models, native resume) on the nightly Antigravity image, a build-time gate on native image capability, and a corrected Antigravity guide
What's Good (🟢)
  • Small, reversible change: one ARG pair, with defaults equal to the old values.
  • Keeping the legacy binary in the nightly image gives users a working opt-out.
  • The contributor fixed every round-1 finding in one focused docs commit and also corrected the stale Helm example and AGY_WORKING_DIR row.

Three Reasons We Might Not Need This PR

  1. A separate opt-in tag may be safer. A dedicated nightly-antigravity-native image would avoid breaking existing nightly threads that inherit the image command.
  2. The core value is image input, not the default switch. A documented opt-in on the nightly image (command = "agy", args = ["acp"]) would deliver the same value without changing the default.
  3. Two backends increase maintenance. Shipping and testing both agy acp and agy-acp doubles the Antigravity support surface until feat(antigravity): use native ACP by default #1612 lands a migration.

None of these is decisive. Nightly exists for this kind of canary, and the opt-out and recovery path are now documented.

@thepagent
thepagent merged commit c93eb11 into openabdev:main Nov 22, 2026
24 checks passed
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.

3 participants