Skip to content

Add Google Antigravity support to the WordPress Studio plugin - #6175

Open
ndiego wants to merge 6 commits into
trunkfrom
add-antigravity-plugin-support
Open

ndiego wants to merge 6 commits into
trunkfrom
add-antigravity-plugin-support

Conversation

@ndiego

@ndiego ndiego commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude Code read Google's plugin guide (https://antigravity.google/docs/build-plugins/, plus the MCP, MCP Apps and Marketplace pages), wrote the manifest, the MCP config, the launcher change and its tests, and drafted this description. It then tested the plugin with the Antigravity app (2.35.0) and CLI (agy 1.5.16) on Nick's Mac, with a test-only wrapper that logged what Antigravity sends the server; Nick ran the conversations. "What was and was not verified" below lists exactly what that covered.

Proposed Changes

Google lists a plugin in Antigravity's marketplace after its partner team QA-tests a public GitHub repository. This makes the WordPress Studio plugin installable in Antigravity, so Automattic/studio-plugins can be submitted. Nothing has been submitted to Google.

  • Antigravity gets its own manifest and MCP config for the plugin. It appears as WordPress Studio, with a description and starter prompts about building sites on the user's computer, to tell it apart from the WordPress plugin (WordPress.com) already listed.
  • Antigravity gives a plugin a data folder that outlives updates (PLUGIN_DATA), and replaces the plugin's own folder on each update. The plugin now unpacks (or downloads) the Studio CLI there when the app provides one, in a folder per plugin version, and removes the CLI an earlier version left. Codex, Claude Code, Cursor and Grok Build don't set PLUGIN_DATA, so they unpack inside the plugin as before.
  • Unpacking no longer fails when tar stops reading at the end of the archive before the last bytes are written, which the new tests hit once on Linux CI (ERR_STREAM_PREMATURE_CLOSE); tar's exit code still decides whether the unpack worked. This applies to every app. The failure was not reproduced on macOS, so the fix rests on the CI log.
  • Tool calls get an hour instead of Antigravity's default 180 seconds, as in Codex: the design picker's call stays open while the user chooses.
  • The Antigravity files ship with the next release in both published plugins: the one with the CLI inside (trunk), and the one that downloads it (claude-directory). Antigravity's marketplace downloads plugin zips of up to 64 MiB, and the plugin with the CLI inside is 71.7 MiB, so the marketplace listing has to be the one that downloads the CLI. That adds two small files to the branch Anthropic's directory and Grok Build read; the alternative is a branch of its own.
  • The READMEs get an Antigravity install section.

No change to client detection (describeClient). Antigravity identifies itself as antigravity-client and declares io.modelcontextprotocol/ui, which Studio already reads, so it gets the design picker and the library tools, and otherwise the defaults: bare paths for image links, Studio's generate_images, and wpcom_request.

What was and was not verified

Verified with agy 1.5.16:

  • agy plugin validate --strict passes with no findings on the plugin that downloads its CLI (the folder, and a 124 KB zip of it).
  • On plugins/wp-studio and on the plugin with the CLI inside, agy plugin validate reports one warning, so --strict fails: .mcp.json: never loaded: this is Claude Code's file name. That file is Codex's MCP config, and stays. Nothing else is flagged: 11 skills, 1 MCP server, 0 agents (agents/openai.yaml is ignored).
  • agy plugin validate on the zip with the CLI inside fails: it is larger than 64 MiB, "the largest plugin zip that the plugin marketplace in Antigravity downloads".
  • agy plugin install <folder> installs both plugins (the 72 MB one too), and installing again replaces the installation, which is how the README says to update.
  • The README's URL form works: agy plugin install https://github.com/Automattic/wordpress-antigravity-plugin/tree/main/wordpress clones the repository and installs that folder. Automattic/studio-plugins itself can't be tried until a release publishes these files.
  • agy plugin uninstall leaves the plugin's data folder, so the unpacked CLI (145 MB) stays after uninstalling.

Verified in the Antigravity app 2.35.0 on macOS:

  • The plugin shows as WordPress Studio with its description, and can be picked in a conversation.
  • Antigravity starts the server, as wp-studio_wordpress-studio, with the user's own Node.js and PATH (nvm's v24.22.1 here), and sets PLUGIN_DATA to a writable ~/.gemini/antigravity/plugin_data/wp-studio. The installed plugin folder is writable on disk, whatever the guide says about read-only.
  • It sends clientInfo.name antigravity-client and declares io.modelcontextprotocol/ui (and com.google.antigravity/ui).
  • With the checkout's plugin, served by the installed Studio 2.4.0-beta1: a "create a simple blog" request ran the build-site flow (studio_instructions, site_list, site_create, generate_images, pick_design, present_design_options, scaffold_theme, wp_cli), and the design picker rendered as an interactive panel.
  • With the built plugin with the CLI inside: on its first start it unpacked the CLI into PLUGIN_DATA/cli-2.4.0-beta1, left the plugin folder untouched, and "List my WordPress sites on this computer" was answered by that CLI. The unpack finished before Antigravity sent initialize, so the CLI answered the handshake itself.
  • With the built plugin that downloads its CLI, installed with agy plugin install (the download pointed at a local server, delayed by 20 seconds, as the release doesn't exist yet): it downloaded the CLI, checked it, unpacked it into PLUGIN_DATA/cli-2.4.0-beta1, and a new conversation's "list my sites" request called site_list on that CLI.
  • Antigravity sends a server/discover request before initialize, and waited for its answer both times. The launcher holds that request until the CLI is ready, so Antigravity sent initialize only then (21 seconds later with the delayed download) and got the CLI's own tool list, all 36 tools, rather than the recorded one.

Verified outside Antigravity:

  • .antigravity-plugin/plugin.json validates against Google's published schema (https://antigravity.google/schemas/v1/plugin.json), checked with Ajv.
  • npm run cli:bundle:plugin: both plugins carry the Antigravity manifest with the release version, and mcp_config.json.
  • The launcher, started as Antigravity starts it (PLUGIN_DATA set, client antigravity-client), from the plugin with the CLI inside in a read-only folder, and from the one that downloads it (from a local server, as the release doesn't exist yet): the CLI lands in PLUGIN_DATA, the session moves to it, and the launcher sends list_changed. New tests cover the launcher with and without PLUGIN_DATA.
  • npm run typecheck, npm run lint, npm run knip, and prettier on the changed files.

Not verified:

  • Whether Antigravity lists the tools again after notifications/tools/list_changed. It didn't come up: Antigravity waits for the CLI before the handshake (see above), so it never gets the recorded tool list. That also means a download slower than Antigravity's time to connect to a server (300 seconds by default, per its docs) would fail the first start rather than start with fewer tools; timeoutSeconds may raise that too, untested.
  • timeoutSeconds: the plugin ran with it, but no call lasted longer than the 180-second default.
  • Installing from Automattic/studio-plugins, and how the marketplace takes a plugin that sits at the root of a branch other than the default one.
  • Windows and Linux.

Open questions

  • Which branch Google reviews. claude-directory now holds a plugin that passes agy plugin validate --strict, at the root of the branch, but it is not the repository's default branch. If Google needs the default branch or a repository of its own, the publish workflow needs one more target.
  • The logo. The guide asks for about 10% transparent padding; the logo is the existing 512×512 tile, edge to edge. agy plugin validate doesn't flag it.
  • Node.js. The plugin needs Node.js 22 or later, and Antigravity ran the user's own. What happens on a machine without Node.js was not tried.

Testing Instructions

  • npm test -- scripts/plugin-bootstrap-mcp.test.mjs
  • With the Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash):
    • npm run cli:bundle:plugin, then agy plugin validate --strict standalone-bundles/wp-studio-directory passes.
    • Unzip standalone-bundles/wp-studio-<version>.zip to a folder named wp-studio, and agy plugin install that folder.
    • In the Antigravity app, start a conversation with WordPress Studio and ask "Build a WordPress site for my bakery on my computer." Check that a cli-<version> folder appears in ~/.gemini/antigravity/plugin_data/wp-studio, that the design picker renders, and that the site is built.
  • In Codex, Claude Code, Cursor or Grok Build, check the plugin still unpacks the CLI inside its own folder (cli/).

No screenshots: nothing Studio shows changes.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Auto-approved: ndiego is a trusted author.

@ndiego
ndiego marked this pull request as ready for review November 24, 2026 17:41
@ndiego
ndiego requested a review from a team as a code owner November 24, 2026 17:41
@youknowriad

Copy link
Copy Markdown
Contributor

Thanks, this looks good, and the testing notes are really useful. One fix before merging: removeOtherVersions matches by prefix, so updating from 2.4.0-beta1 to 2.4.0 keeps the beta's CLI (cli-2.4.0-beta1 starts with cli-2.4.0). Comparing exact names (the folder plus its .lock, .unpacking and .download) fixes it.

Smaller: the cleanup only runs after an unpack, so anyone whose desktop app has a recent enough CLI keeps the previous version's 145 MB folder. Running it at start would cover that.

@youknowriad youknowriad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding Antigravity to the agent apps in Settings can come in a follow-up: Connect would install the plugin with agy plugin install, as it does for Grok Build, and point mcp_config.json at Studio's own CLI.

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.

3 participants