Skip to content

Add Antigravity CLI support#183

Open
aserper wants to merge 2 commits into
raine:mainfrom
aserper:fix/antigravity-cli-support
Open

Add Antigravity CLI support#183
aserper wants to merge 2 commits into
raine:mainfrom
aserper:fix/antigravity-cli-support

Conversation

@aserper

@aserper aserper commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #168

Summary

Adds first-class Antigravity CLI (agy) support:

  • adds an agy agent profile for prompt injection, auto mode, auto-naming, and continue/resume flags
  • classifies agy panes in the sidebar/dashboard with an Antigravity label/color and a reliable AG default icon
  • preserves useful pane metadata by rendering Antigravity hostname/framework titles as AG · <title> instead of suppressing them
  • resolves the Antigravity config directory as ~/.gemini/antigravity-cli
  • installs Antigravity status tracking via the official statusLine signal, with lifecycle hooks as a compatibility/working fallback
  • keeps set-window-status silent on success so Antigravity's fail-closed hook parser does not reject the hook output
  • refreshes persisted pane title/identity from live tmux data to avoid stale sidebar metadata after pane reuse
  • documents Antigravity support and status-tracking setup

Status tracking behavior

workmux setup --hooks now installs:

  • a silent statusLine wrapper at ~/.gemini/config/workmux-hooks/workmux-statusline
  • statusLine.command / statusLine.enabled = true in ~/.gemini/antigravity-cli/settings.json
  • no-argument hook wrapper scripts for fallback lifecycle hooks
  • hook groups in both ~/.gemini/config/hooks.json and ~/.gemini/antigravity-cli/hooks.json

The statusLine wrapper reads Antigravity's agent_state JSON payload and maps it to Workmux status. It prints nothing unless it is chaining a user-provided statusLine command, so it should not visibly change the Antigravity UI. If a user already had a custom statusLine command, Workmux stores and chains it so their visible statusLine output is preserved.

Existing running agy sessions may need /statusline on or a restart to reload the new settings.

Plan conformance

This follows the implementation plan saved in the Obsidian note "Workmux Antigravity CLI Implementation Plan":

  • implemented AntigravityProfile using canonical profile name agy
  • added known-agent detection and prompt-injection tests
  • added sidebar/dashboard identity via AgentKind::Antigravity
  • added config directory resolution for ~/.gemini/antigravity-cli
  • kept sandbox support deferred
  • updated docs for agents/configuration/add/status-tracking

The note originally recommended deferring status hooks until Antigravity's hook schema/location was verified. After that plan was written, the lifecycle hooks and the official statusLine payload were verified locally, so this PR includes the planned follow-up status tracking work as well.

Validation

  • cargo test — 1268 passed, 4 ignored
  • cargo test antigravity — 11 passed
  • cargo build --release
  • installed release binary to /opt/brew/bin/workmux and /home/amit/.pi/agent/bin/workmux
  • local agy tmux smoke test verified spinner starts while working and stops after /statusline on enabled the Workmux statusLine wrapper

@aserper aserper force-pushed the fix/antigravity-cli-support branch from 9412366 to cb0a14f Compare June 18, 2026 01:45
@aserper

aserper commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated after local sidebar testing: the Antigravity default icon is now , and hostname-only pane titles are filtered so they don't render as the task title for agy panes. Rebuilt successfully with cargo build --release; targeted sidebar identity tests and git diff --check pass.

@aserper

aserper commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated with the final Antigravity lifecycle fix: status tracking now uses agy's official statusLine agent_state payload as the source of truth, with silent hook wrappers as fallback.

Verified locally with a live agy tmux session after running /statusline on; spinner now clears to done. Full test suite: 1268 passed; 4 ignored.

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.

Update Gemini CLI support for Antigravity CLI (agy)

1 participant