feat: add AgyRunner for Google Antigravity CLI - #102
Conversation
Wraps `agy --print` from Google's Antigravity CLI (announced 2026-05-19 at I/O 2026), the official successor to Gemini CLI. - `agy --print --dangerously-skip-permissions` with stdin pipe returns the model response on stdout, mirroring the gemini.go shape. - Inserted before GeminiRunner in DetectRunners() so agy wins detection when both binaries are installed. - Treats stdout starting with "Error:" as failure since `agy --print` exits 0 even on internal errors (e.g. print-timeout). Verified against the installed agy v1.0.0: stdin is the prompt input channel; argv after --print is ignored. Build + full test suite pass.
Review surfaced that the previous HasPrefix(TrimSpace, "Error:") would swallow legitimate model output starting with "Error:" — tri-review routinely asks models to discuss error handling, so a review beginning with "Error: NullPointerException..." would be silently discarded. - Extract detection into pure helper agyOutputIsError(output) so the predicate has one home and can be tested in isolation. - Narrow the heuristic: still requires "Error:" prefix on the trimmed output, but additionally requires it to be SHORT (< 300 chars) and SINGLE-PARAGRAPH (no blank line). Real agy print-mode errors are short single-line messages; model responses discussing errors are longer or multi-paragraph. - Tighten the two existing comments per comment-analyzer feedback — the stdin-vs-argv quirk now reads cleanly, and the exit-0-on-error comment is anchored to agy v1.0.0 and points at the helper. - Add agy_test.go with table-driven coverage of the helper (12 cases: observed errors, hypothetical errors, false-positive shapes, edge cases) and a TestAgyRunnerName matching the sibling pattern. Full test suite passes.
|
Closing in favor of the plugin-route integration. The Go To replace Gemini in tri-review with AGY, the correct surface is a separate Claude Code plugin shipping an A follow-up PR will update This PR's findings (the |
Summary
src/runners/agy.go— wraps Google's newagyCLI (Antigravity CLI), the official successor to Gemini CLI launched 2026-05-19 at Google I/O 2026.&AgyRunner{}inDetectRunners()before&GeminiRunner{}so agy wins runner detection when both binaries are present.GeminiRunneralongside for boxes that still have the legacygeminibinary (consumer Gemini CLI access sunsets 2026-06-18; enterprise continues).Why
Gemini CLI is being retired for consumer tiers on 2026-06-18. Adding
agynow keeps the general tier oftri-reviewworking through the cutover and after.Shape
agy --print --dangerously-skip-permissionsreads the prompt from stdin and emits the response on stdout — same contract asgemini -y --output-format text. The runner is a ~55-LOC clone ofgemini.gowith two intentional differences:--print --dangerously-skip-permissions(no--output-format— agy emits plain text by default).agy --printexits 0 even on internal errors (e.g. print-timeout) and printsError: ...on stdout. The runner detects that pattern and surfaces it as a real error so tri-review doesn't consume an error string as a successful review.Verification
make build— clean.make test— full suite passes.TestDetectRunnersandTestFindRunnerauto-discover the new runner; no test changes needed.agyv1.0.0:echo "..." | agy --print --dangerously-skip-permissions→ clean text on stdout, exit 0.agy --print --dangerously-skip-permissions "prompt-as-argv"→Error: timed out waiting for response(argv is not used as the prompt; stdin is required).Test plan
geminiandagyinstalled, confirm tri-review general tier picksagy.gemini, confirm fallback still works.agy-emittedError:lines are surfaced as runner errors, not as model responses.