Skip to content

feat(setup): bring the plugin and digest to Antigravity CLI - #51

Merged
delucca merged 3 commits into
mainfrom
add-agy-setup
Oct 18, 2026
Merged

delucca merged 3 commits into
mainfrom
add-agy-setup

Conversation

@delucca

@delucca delucca commented Oct 18, 2026

Copy link
Copy Markdown
Owner

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.json verbatim, it has no UserPromptSubmit event, and its hook input carries no prompt.

What changed

  • plugins/bilbo/.antigravity-plugin/plugin.json makes agy load the folder as its own plugin, and a root plugins/bilbo/hooks.json in agy's format runs bilbo digest --agy on PreInvocation. Claude Code and Codex ignore both files.
  • bilbo digest --agy: on a turn's first call (invocationNum 0) it reads the prompt from the last MiB of transcriptPath, the last USER_INPUT step past any SYSTEM_MESSAGE, and prints {"injectSteps":[{"systemMessage":...}]}. Later calls and background re-entries print nothing and log nothing. The session is conversationId.
  • setup: an agy step after codex, --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 with needs a plugin folder; pass --plugin-source <folder>. Its list has no version, so the step compares the installed copy with plugins/bilbo file by file and reinstalls when they differ; a disabled plugin gets agy plugin enable bilbo.
  • apply: codex_installed is now OR-ed, since a third tool in the loop reset it.
  • ANTIGRAVITY_AGENT joins 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.agy in the home-manager module.
  • Fixtures tests/fixtures/agents/agy-*.txt recorded from agy 1.3.6 in a throwaway HOME, a builtin-only fake agy in tests/common/fakes.rs, docs and README.

How to test

  1. nix develop -c cargo test --locked and nix flake check -L
  2. bilbo setup --yes --no-timer --no-watch --plugin-source <checkout> --agy $(command -v agy) in a throwaway HOME: agy installed, then agy kept on a second run, then agy removed with --remove.
  3. In a workspace with the plugin under .agents/plugins/bilbo, ask agy something a note answers: digest.jsonl gets one line for the turn and the model can name the note.

Notes

  • Run by hand: steps 2 and 3 above against real claude, codex and agy (all three installed, kept and removed; Codex trusted only the two hooks/hooks.json hooks), and one agy -p turn where the model named the note from the injected system message. agy's interactive TUI was not tried.
  • The prompt comes from agy's transcript, whose format agy does not document. If it changes, the digest prints nothing; it never blocks a prompt.
  • agy has no compaction event, so it gets no compaction reminder.
  • About 1,200 changed lines, roughly half of them tests.

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.
@delucca
delucca merged commit 3a93171 into main Oct 18, 2026
8 checks passed
@delucca
delucca deleted the add-agy-setup branch October 18, 2026 01:52
@delucca delucca mentioned this pull request Oct 18, 2026
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.

1 participant