fix: strip Claude-schema tools frontmatter so cavecrew agents load on Gemini/Antigravity#709
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
… Gemini/Antigravity
3 tasks
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.
What
Fixes #497 - caveman fails to load on Google Antigravity / Gemini CLI.
Why
Installing the extension with
gemini extensions install https://github.com/JuliusBrussee/cavemanmakes Gemini's ExtensionManager reject all three cavecrew agents:The
agents/cavecrew-*.mdfiles carry Claude Code schema frontmatter (tools: [Read, Edit, Write, Grep, Glob]). Gemini validates each entry against its own tool vocabulary and refuses the Claude names, so the cavecrew subagents never load and the extension is broken on Antigravity. This is the same class of schema mismatch already fixed for opencode in #386 viastripOpencodeAgentTools().How
Mirror the opencode #386 fix on the Gemini/Antigravity distribution path, reusing the proven transform:
bin/lib/opencode-agent.js: generalize the existing helper into a schema-agnosticstripAgentTools()that removes the frontmattertools:key (and its wrapped continuation lines), keepingstripOpencodeAgentToolsas a thin alias so the existing opencode call site and test stay unchanged.bin/install.js: aftergemini extensions installlands the extension at~/.gemini/extensions/caveman/agents/, rewrite the three installed cavecrew agent files in place with thetools:line stripped (Gemini then falls back to its default tool set; the subagent prompts already self-restrict scope in their bodies). The same strip is applied to the Antigravitynpx skillsagent copies. Missing files are skipped silently, honoring the installer's fail-soft-on-filesystem-error invariant.Top-level source-of-truth agents are untouched, so the Claude plugin mirror still ships the full
tools:schema via CI. Only the Gemini/Antigravity on-disk copies are rewritten.Tests
Adds
tests/installer/gemini-agents.test.mjs(5 cases): only the frontmattertools:key is stripped (inline body prose preserved), opencode-alias equivalence and idempotency, end-to-end Gemini install strips every distributed agent,--forcere-run idempotency + missing-file skip, and the Antigravity path. The existingtests/installer/opencode-agent.test.mjscontinues to pass unchanged.AI was used for assistance.