Skip to content

feat: add AgyRunner for Google Antigravity CLI - #102

Closed
5uck1ess wants to merge 2 commits into
mainfrom
feat/agy-runner
Closed

feat: add AgyRunner for Google Antigravity CLI#102
5uck1ess wants to merge 2 commits into
mainfrom
feat/agy-runner

Conversation

@5uck1ess

Copy link
Copy Markdown
Owner

Summary

  • Adds src/runners/agy.go — wraps Google's new agy CLI (Antigravity CLI), the official successor to Gemini CLI launched 2026-05-19 at Google I/O 2026.
  • Registers &AgyRunner{} in DetectRunners() before &GeminiRunner{} so agy wins runner detection when both binaries are present.
  • Keeps GeminiRunner alongside for boxes that still have the legacy gemini binary (consumer Gemini CLI access sunsets 2026-06-18; enterprise continues).

Why

Gemini CLI is being retired for consumer tiers on 2026-06-18. Adding agy now keeps the general tier of tri-review working through the cutover and after.

Shape

agy --print --dangerously-skip-permissions reads the prompt from stdin and emits the response on stdout — same contract as gemini -y --output-format text. The runner is a ~55-LOC clone of gemini.go with two intentional differences:

  • Flag set is --print --dangerously-skip-permissions (no --output-format — agy emits plain text by default).
  • agy --print exits 0 even on internal errors (e.g. print-timeout) and prints Error: ... 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. TestDetectRunners and TestFindRunner auto-discover the new runner; no test changes needed.
  • Smoke-tested against the locally installed agy v1.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).
    • stdin + argv → stdin wins; argv ignored.

Test plan

  • CI passes
  • On a box with both gemini and agy installed, confirm tri-review general tier picks agy.
  • On a box with only gemini, confirm fallback still works.
  • Confirm agy-emitted Error: lines are surfaced as runner errors, not as model responses.

5uck1ess added 2 commits May 20, 2026 19:45
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.
@5uck1ess

Copy link
Copy Markdown
Owner Author

Closing in favor of the plugin-route integration.

The Go Runner interface in src/runners/ is exposed via devkit --agent <name> for direct-CLI invocations of a runner; it isn't traversed by tri-review or any other tri-* workflow. Those workflows dispatch to subagents from sibling plugins (codex:codex-rescue, abiswas97-gemini-backed reviewer, etc.) via Claude Code's Agent tool, not via Go subprocess runners.

To replace Gemini in tri-review with AGY, the correct surface is a separate Claude Code plugin shipping an agy:agy-review subagent. That plugin is now live: https://github.com/5uck1ess/agy-plugin-cc

A follow-up PR will update workflows/tri-review.yml (and tri-debug, tri-dispatch, tri-security) to name agy:agy-review as the preferred general-tier reviewer.

This PR's findings (the Error: heuristic, the comment fixes, the smoke-test results) carry over to the plugin's agent definition.

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