Skip to content

First-class Google Antigravity host (#62) - #102

Open
shhdwi wants to merge 1 commit into
mainfrom
feat/antigravity-host
Open

First-class Google Antigravity host (#62)#102
shhdwi wants to merge 1 commit into
mainfrom
feat/antigravity-host

Conversation

@shhdwi

@shhdwi shhdwi commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #62.

What

Antigravity already reads AGENTS.md, so graft partially worked, but its MCP registry and skills live in dedicated paths graft never wrote to. This adds a first-class antigravity host so graft init --agents antigravity lands every piece in the right spot.

  • registry.ts: the antigravity host writes the AGENTS.md instruction section. It detects on Antigravity-specific markers (~/.gemini/config, ~/.gemini/antigravity-cli, or a workspace .agents/), NOT bare ~/.gemini (which is Gemini CLI), so a plain Gemini-CLI user is not auto-selected.
  • mcp-config.ts: registers the graft MCP server in Antigravity's own global registry, ~/.gemini/config/mcp_config.json (standard {command, args} under mcpServers), separate from Gemini CLI's .gemini/settings.json. This is the gap Feature request: Add first-class support for Google Antigravity (AGY) #62 reported.
  • antigravity.ts: places the shared skill in ~/.gemini/skills/graft/SKILL.md.
  • init.ts / plan.ts: wire the skill into the install and the --dry-run plan. --no-global suppresses the two global writes (MCP + skill) while keeping AGENTS.md.

Verified

graft init --agents antigravity end to end: AGENTS.md written, MCP at the correct global path, skill placed, all idempotent. Detection keys off Antigravity markers only. 633 tests (+4 Antigravity; host-list and all-hosts convergence updated for the shared AGENTS.md).

Deliberately deferred: hooks

Antigravity exposes a Codex-style hook model (PreToolUse, PostToolUse, PreInvocation, PostInvocation, Stop via ~/.gemini/config/hooks.json), which could carry graft's retrieval / sync hooks. I am NOT shipping those yet, for two reasons:

  1. The injectSteps output format for PreInvocation context injection is not authoritatively documented.
  2. A malformed PreToolUse hook can deny every tool call and make Antigravity unusable (Antigravity (agy): injected PreToolUse hook denies every tool call (invalid_args) — agy unusable in cmux manaflow-ai/cmux#5358).

Writing an unverified hooks.json to a user's global config is worse than not writing it, so hooks are a fast-follow pending a check against a real Antigravity install.

Antigravity reads AGENTS.md (so graft partially worked) but its MCP registry and
skills live in dedicated paths graft never wrote to. This adds a first-class
`antigravity` host:

- registry.ts: `antigravity` host writes the AGENTS.md instruction section;
  detects on Antigravity-specific markers (~/.gemini/config, ~/.gemini/
  antigravity-cli, or a workspace .agents/), NOT bare ~/.gemini (which is Gemini
  CLI) so a plain Gemini user isn't dragged in.
- mcp-config.ts: registers the graft MCP server in Antigravity's own global
  registry, ~/.gemini/config/mcp_config.json ({command,args} under mcpServers),
  separate from Gemini CLI's .gemini/settings.json.
- antigravity.ts: places the shared skill in ~/.gemini/skills/graft/SKILL.md.
- init.ts/plan.ts: wire the skill into the install + dry-run plan; --no-global
  suppresses the two global writes (MCP + skill), keeping AGENTS.md.

`graft init --agents antigravity` now lands every piece in the right spot. 633
tests (+4; host-list and all-hosts convergence updated for the shared AGENTS.md).

Hooks (PreInvocation retrieval / PostToolUse sync) are a deliberate follow-up:
Antigravity's injectSteps output format isn't authoritatively documented and a
malformed PreToolUse can deny every tool call (manaflow-ai/cmux#5358), so writing
hooks.json to a user's global config needs a real-Antigravity check first.
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.

Feature request: Add first-class support for Google Antigravity (AGY)

1 participant