Repository navigation
Add experimental Antigravity CLI (agy) host - #147
Saksham Uboweja (SakshamUboweja) merged 5 commits into
Conversation
Adapter for agy 1.5.1's hook contract: SessionStart, PreInvocation and Stop are translated into the controller's events (tool results are read from the transcript at the next PreInvocation; invocationNum 0 opens a prompt-turn), and answers go back as injectSteps. Micro-skills, the loop guard and the session ledger are supported; tool pruning is not. Side calls run through `agy -p`. Refs microsoft#114 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, this looks solid overall. A few things before we can merge: agy_call doesn’t turn off agy’s tools. The other agents’ side calls all run with no tools, since the prompt includes text from the repository. Could you pass agy’s no-tools option if it has one? If it doesn’t, let’s skip side calls for Antigravity for now. Please take a look at the failing CI checks. On SessionStart with no saved cursor, reading starts at the top of the transcript, so a resumed conversation replays its old tool calls. Starting at the file’s current size, like the PreInvocation path does, fixes it. Please rebase on main. README.md conflicts with #149. |
…nto feat/antigravity-host # Conflicts: # README.md
- agy has no option that runs a prompt with every tool off, so the plugin makes no model call through it: `sidecall.NO_SIDE_CALLS` gives Antigravity no runner, and the loop guard never starts a judge for it. Docs now say micro-skills' LLM-free facts only. - SessionStart with no saved cursor starts reading at the transcript's current end, as PreInvocation already did, so a resumed conversation does not replay its old tool calls. - The cursor-file permission test is POSIX-only, like the other permission-bit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review! Addressed in 8fbbab0:
|
Both hosts kept everywhere. The Antigravity adapter's `render` now takes grok's `(payload, out, ctx)` signature, so `hook.run` merges the expanded events' answers and renders once, for either host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the fixes. All four earlier points are addressed, and the tests pass on main. #148 (Grok) is merging first, so this needs one more rebase. It touches the same places this PR does. When you rebase: In the hook entry point, keep Antigravity's own handling first, ahead of Grok's. Both PRs add a render step that works differently, so the order matters. Your Antigravity tests will fail if it's wrong. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
508c587
into
microsoft:main
Closes #114.
Adds an
antigravityhost for agy 1.5.1: micro-skills, the loop guard and the session ledger. Tool pruning is not supported (same status as Hermes). macOS and Linux only, like Cursor.How agy's hooks are mapped (verified live on agy 1.5.1)
agy's hook contract differs from the shared one in ways its own docs don't all state:
UserPromptSubmit, noSessionEnd, and payloads name no event. The hook file passes--event.PreInvocationfires before every model call, and itsinvocationNumresets to 0 at each prompt. OnePreInvocationis expanded (Host.expand) into the tool results the transcript gained since the last call (asPostToolUseevents), then the new prompt'sUserPromptSubmit. A conversation is folded at the next session start once its transcript is quiet (the existingfold.pending_sessionspath).PostToolUsecarries no tool result, its"*"matcher never matches, and the result is not yet in the transcript when it fires. By the nextPreInvocationit is, so results are read there fromtranscript_full.jsonl.PreToolUsehook that prints{}makes agy deny the tool, so none is registered.injectSteps. AsystemMessagestep atSessionStartpersists. AnephemeralMessageatPreInvocationcarries the loop guard's redirect. Both were verified to reach the model.PLANNER_RESPONSErow (input_tokensexcludes cached reads;cache_read_tokens,output_tokens). Gemini ids aren't inpricing.py, so the ledger uses its labelled fallback (priced_by: "fallback"). I did not add rates.Side calls
agy --output-format json --disable-slash-commands --print=<prompt>runs in a throwaway directory withTE_SIDECALL=1(verified to reach agy's hook processes). agy's headless mode denies any tool that needs permission (verified: a prompt asking for a file write and a shell command left the directory empty, withdenied_actions: write_file). The person's ownpermissions.allowrules in agy's settings still apply to it.Verification
python -m pytest tests experiments/tests: 1117 passed, 18 skipped (26 new tests intests/test_antigravity.py, fixtures built in code).TOKENECONOMIZER_HOME: hooks ran without errors, the turn was recorded (1 tool call, ended green),te foldwrote a ledger row (2 requests, 23,636 input and 853 output tokens), andte statusreports it.hook.mainin the tests.agy plugin validate pluginpasses.--strictflags Claude Code'shooks/hooks.jsonas not loaded by agy, which is expected.Note for review
This PR and the grok host PR each add a small
renderseam tohook.runwith different signatures. Whichever lands second needs a small rebase.🤖 Generated with Claude Code