Repository navigation
feat(setup): bring the plugin and digest to Antigravity CLI - #51
Merged
Merged
Conversation
Antigravity CLI runs an agent's shell commands on a terminal and sets ANTIGRAVITY_AGENT=1, but none of the markers bilbo read. An agy agent that ran bilbo got the styled view meant for a person, and the steps that need a person at a terminal would have prompted it.
agy has no prompt hook, and the PreInvocation input it hands a hook carries no prompt. On a turn's first model call the conversation's transcript already ends with the user's input, so the digest reads the prompt from the transcript's last MiB and answers with the block as a system message, which is what agy passes to the model. Every later call of the turn, and a re-entry after background work, prints nothing and leaves no log line, since the hook runs before each model call.
agy loads a Claude Code plugin folder but copies its hooks.json as written, so the digest hook never fired there: agy has no UserPromptSubmit event. A .antigravity-plugin/plugin.json makes agy load the folder as its own plugin, with a root hooks.json in agy's format that runs bilbo digest --agy before each model call. Claude Code and Codex ignore both files, so one folder serves all three. setup gets an agy step after codex, and --agy and programs.bilbo.agy to name the program. agy copies a folder and cannot fetch one, so the step installs only from a folder source, which every package that carries share/bilbo is, and skips with a hint otherwise. agy's list carries no version, so a copy that differs from the source folder is installed again, and a disabled plugin is enabled. agy has no compaction event, so it gets no compaction reminder.
Merged
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.
Why
setup only knew Claude Code and Codex, so agy (Antigravity CLI) got no skills and no digest. Loading the plugin folder as it is does not fix that: agy imports a Claude plugin's
hooks/hooks.jsonverbatim, it has noUserPromptSubmitevent, and its hook input carries no prompt.What changed
plugins/bilbo/.antigravity-plugin/plugin.jsonmakes agy load the folder as its own plugin, and a rootplugins/bilbo/hooks.jsonin agy's format runsbilbo digest --agyonPreInvocation. Claude Code and Codex ignore both files.bilbo digest --agy: on a turn's first call (invocationNum0) it reads the prompt from the last MiB oftranscriptPath, the lastUSER_INPUTstep past anySYSTEM_MESSAGE, and prints{"injectSteps":[{"systemMessage":...}]}. Later calls and background re-entries print nothing and log nothing. The session isconversationId.agystep aftercodex,--agy <path>(also for--remove), and an Antigravity CLI entry in the wizard's plugin question. agy copies a folder and cannot fetch one, so a GitHub source skips it withneeds a plugin folder; pass --plugin-source <folder>. Its list has no version, so the step compares the installed copy withplugins/bilbofile by file and reinstalls when they differ; a disabled plugin getsagy plugin enable bilbo.apply:codex_installedis now OR-ed, since a third tool in the loop reset it.ANTIGRAVITY_AGENTjoins the agent markers. agy runs an agent's commands on a TTY and sets it, so recall and the rest printed the styled view to the agent.programs.bilbo.agyin the home-manager module.tests/fixtures/agents/agy-*.txtrecorded from agy 1.3.6 in a throwawayHOME, a builtin-only fakeagyintests/common/fakes.rs, docs and README.How to test
nix develop -c cargo test --lockedandnix flake check -Lbilbo setup --yes --no-timer --no-watch --plugin-source <checkout> --agy $(command -v agy)in a throwawayHOME:agy installed, thenagy kepton a second run, thenagy removedwith--remove..agents/plugins/bilbo, ask agy something a note answers:digest.jsonlgets one line for the turn and the model can name the note.Notes
claude,codexandagy(all three installed, kept and removed; Codex trusted only the twohooks/hooks.jsonhooks), and oneagy -pturn where the model named the note from the injected system message. agy's interactive TUI was not tried.