Skip to content

feat(antigravity): Add skills and MCP support - #220

Closed
TheBous wants to merge 1 commit into
getsentry:mainfrom
TheBous:feat/antigravity-target
Closed

TheBous wants to merge 1 commit into
getsentry:mainfrom
TheBous:feat/antigravity-target

Conversation

@TheBous

@TheBous TheBous commented Nov 22, 2026

Copy link
Copy Markdown

Adds a antigravity agent target for Google Antigravity, covering skills and MCP. Hooks, subagents, and plugins are left for later.

What it does

Surface Project scope Global scope
Skills Native: Antigravity reads .agents/skills/ ~/.gemini/config/skills → ~/.agents/skills symlink
MCP .agents/mcp_config.json ~/.gemini/config/mcp_config.json
Hooks UnsupportedFeature —

Sources: Skills, MCP.

Design choices

  • No ${VAR} expansion. Antigravity passes ${VAR} to the server literally (confirmed by a probe, see below). The serializer rejects ${ in URLs and headers with a clear error, the way Pi rejects it in URLs. mcp add fails before agents.toml changes. Stdio env names are not written because the server inherits Antigravity's environment.
  • Remote servers use url. The docs bundled with Antigravity call url canonical and serverUrl a legacy alias.
  • Opt-in for fresh global setups. A new AgentDefinition.optIn flag keeps antigravity out of the auto-bootstrapped ~/.agents/agents.toml. Otherwise users who never chose Antigravity would have ${TOKEN} headers rejected and would get a ~/.gemini/config/ they don't need.
  • Client-managed settings survive sync. Antigravity users toggle disabled, tool filters, timeouts, and OAuth on server entries. A new McpConfigSpec.clientFields list keeps those fields from the existing entry during drift comparison and writes, but only while the command or URL is unchanged. A changed endpoint drops them so credentials don't follow a server to a new URL. Targets without clientFields behave exactly as before.
  • JSONC. The file is parsed and edited as JSONC so hand-written comments are kept.
  • Server names are limited to letters, digits, _, and -, like Pi.

Verification

  • pnpm check passes (lint, typecheck, 868 + 329 tests). The new tests cover project and global output, sync repair, clientFields preservation including the endpoint-change case, commented files, the ${VAR} rejections, and the opt-in bootstrap. Each new behavior test was checked to fail with its fix reverted.
  • Docker QA (skills/dotagents-qa, non-root, isolated homes):
    • pnpm qa:example passes.
    • Project lifecycle: init, add, mcp add, install, list --json, doctor, sync after deleting mcp_config.json, disabled and comments kept, mcp remove, remove.
    • Claude + Pi + Antigravity in one project: Claude and Pi output is unchanged.
    • Global: skills symlink, MCP file, --user sync repair, --global mcp remove.
    • A fresh bootstrap leaves antigravity out, and ${VAR} headers still work there.
    • pnpm qa:plugins fails the same way on main (spawnSync claude ENOBUFS: current Claude Code prints the whole plugin directory). This failure predates this change.
  • Runtime probe: a stub stdio MCP server against an Antigravity 1.5.12 build (the ACP agentapi binary):
    • The global mcp_config.json was loaded.
    • ${HOME} in args and env reached the server unexpanded.
    • The server inherited the parent environment.

Known limitations

  • Project MCP is not runtime-verified. The 1.5.12 ACP build did not load the workspace .agents/mcp_config.json. Google documents that path for the CLI, IDE, and SDK, so this PR follows the docs. I could not check a non-ACP client.
  • mcp remove leaves the generated entry in client files. All targets already behave this way; this PR doesn't change it.
  • Hand-written stdio env/cwd on a same-name entry are replaced by the declaration, the same as for other targets. Comments inside a managed server entry are lost when dotagents repairs that entry; the JSONC writer already behaves this way for OpenCode.
  • Antigravity natively scans .agents/agents/ and .agents/plugins/. Canonical dotagents content there may be visible to Antigravity even when it isn't a selected target. That was already true before this change.

Council review

Rounds: 2

Delegate Round 1 Round 2
GPT Sol 6.2 (high) 6/10 7/10

Round 2 findings were addressed: the endpoint-scoped clientFields and the docs nit. The two remaining items are the inherited behaviors listed under known limitations.

🤖 Generated with Claude Code

Add a Google Antigravity target. Antigravity reads project
.agents/skills natively; global skills are linked from
~/.gemini/config/skills. MCP servers are written to
.agents/mcp_config.json and ~/.gemini/config/mcp_config.json.

Antigravity does not expand ${VAR}, so URLs and headers must be
literal and stdio env names are omitted (servers inherit the
environment). The file is parsed as JSONC, and per-server settings
Antigravity manages (disabled, oauth, tool filters, timeouts) survive
sync while the endpoint is unchanged.

The target is opt-in for fresh global setups so users who never
choose Antigravity keep ${VAR} headers working. Hooks, subagents, and
plugins are not generated for Antigravity yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 22, 2026
@sentry-junior

sentry-junior Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Thanks @TheBous! #221 merged a trimmed version of this, and its description credits you. It keeps your target definition, paths, ${VAR} rejection, env handling, and optIn. Your runtime probe helped confirm the env and ${VAR} behavior. Closing this PR in favor of #221. Antigravity support goes out in the next dotagents release.

@sentry-junior sentry-junior Bot closed this Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant