First-class Google Antigravity host (#62) - #102
Open
shhdwi wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-classantigravityhost sograft init --agents antigravitylands every piece in the right spot.antigravityhost writes theAGENTS.mdinstruction 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.~/.gemini/config/mcp_config.json(standard{command, args}undermcpServers), separate from Gemini CLI's.gemini/settings.json. This is the gap Feature request: Add first-class support for Google Antigravity (AGY) #62 reported.~/.gemini/skills/graft/SKILL.md.--dry-runplan.--no-globalsuppresses the two global writes (MCP + skill) while keepingAGENTS.md.Verified
graft init --agents antigravityend 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,Stopvia~/.gemini/config/hooks.json), which could carry graft's retrieval / sync hooks. I am NOT shipping those yet, for two reasons:injectStepsoutput format forPreInvocationcontext injection is not authoritatively documented.PreToolUsehook 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.jsonto 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.