Repository navigation
fix(llm-sync): correct Antigravity plugin hooks.json schema and registration - #53
Merged
Merged
Conversation
…tration
Antigravity's plugin loader (jsonhook.JSONHookSpec) expects each lifecycle
event to be a single {matcher, hooks} object, but AntigravityPluginInstaller
wrote Claude Code's array-of-groups schema verbatim — every synced plugin
with hooks (core-hooks, ponytail, prompt-injection-defender, sdd) failed to
parse on every agy session start. Confirmed live against agy 1.2.14.
Also fixed install_plugins()'s post-write `agy plugin install <path>` call,
which always passed the path it had just written to as the copy source —
agy refuses that (source == its own plugin store when target_dir is the
default), so plugins were on disk but never registered in agy's ledger.
Now stages a throwaway copy for the install call.
tstapler
marked this pull request as ready for review
September 30, 2026 08:24
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.
Summary
jsonhook.JSONHookSpec) expects each lifecycle event to be a single{matcher, hooks}object, not Claude Code's array-of-groups schema.AntigravityPluginInstallerwas writing the Claude schema verbatim, so every synced plugin with hooks (core-hooks,ponytail,prompt-injection-defender,sdd) failed to parse on everyagysession start. Confirmed live against a realagy1.2.14 session.install_plugins()'s post-writeagy plugin install <path>registration call always passed the exact path it had just written the plugin to as the copy source.agyrefuses to copy when source and destination are the same directory (the default case), so plugins were on disk but never actually registered inagy's plugin ledger. Now stages a throwaway copy before callingagy plugin install._install_plugininto_install_manifest/_install_skills/_install_commands/_install_hookswhile in there (kibitzer flagged the original as too long).Test plan
uv run python src/targets/test_antigravity_plugin_installer.py— 5 new regression tests, all passing~/.gemini/{antigravity-cli,config}/plugins/*to match the new schema and re-registered viaagy plugin install— confirmed 6/6 plugin hooks.json files now parse with 0 errors onagysession start (previously 12+ parse errors per session)Note: this does not make Antigravity actually suppress permission prompts via hooks — confirmed live via probe instrumentation that
agy1.2.14 never consults PreToolUse/PostToolUse hooks for its tool-confirmation gate at all, regardless of schema/registration correctness. That's a product gap in Antigravity itself. This PR just fixes the two real, independent bugs in our own sync tooling found along the way.