Skip to content

feat: add agy (Antigravity CLI) as a supported --cli provider#231

Merged
steipete merged 9 commits into
steipete:mainfrom
yetmike:main
Jun 1, 2026
Merged

feat: add agy (Antigravity CLI) as a supported --cli provider#231
steipete merged 9 commits into
steipete:mainfrom
yetmike:main

Conversation

@yetmike
Copy link
Copy Markdown
Contributor

@yetmike yetmike commented May 31, 2026

Adds agy alongside claude, gemini, codex, agent, openclaw, opencode, and copilot. Uses a plain-text path (--print + stdin) since agy does not support --output-format json. Default model is null - agy uses its own session default (Gemini 3.5 Flash) when no model is specified. Binary resolved via AGY_PATH env var or agy on PATH.

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

Codex review: needs maintainer review before merge. Reviewed May 31, 2026, 12:28 PM ET / 16:28 UTC.

Summary
Adds explicit Antigravity agy CLI provider support across CLI/model parsing, config, daemon env/model discovery, extension settings, README docs, and tests.

Reproducibility: not applicable. as a feature PR rather than a bug report. The contributor did provide terminal proof of the new summarize --cli agy path producing a real summary.

Review metrics: 2 noteworthy metrics.

  • Changed surface: 26 files changed, +324/-22. Provider registration crosses CLI execution, config parsing, daemon discovery, extension settings, docs, and tests.
  • Provider test coverage: 1 added test file, 4 updated test files. The diff adds focused agy provider tests and updates config/daemon tests for the new provider path.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] This adds a new authenticated provider path plus daemon snapshot handling for ANTIGRAVITY_API_KEY, so maintainers should explicitly accept that provider/auth surface before merge.
  • [P1] I did not run pnpm -s check because this review is read-only; contributor-reported targeted tests and the passing secret scan are useful, but the full repository gate remains the final integration check.

Maintainer options:

  1. Accept explicit Antigravity support
    Maintainers can accept the new AGY_PATH and ANTIGRAVITY_API_KEY surface because the PR keeps agy opt-in and includes focused provider/config/daemon coverage.
  2. Require full gate proof first
    Before merge, ask for or run pnpm -s check on the latest head to cover the cross-package provider, daemon, and extension surface.
  3. Pause provider adoption
    If Antigravity is not a desired core provider, pause or close this PR rather than carrying a new authenticated CLI surface in core.

Next step before merge

  • No automated repair is needed; the remaining action is maintainer acceptance of the new provider/auth surface and normal gate validation.

Security
Cleared: No concrete supply-chain issue was found; the new credential/env handling follows existing daemon snapshot patterns and the dangerous tool flag is gated by the existing allowTools path.

Review details

Best possible solution:

Merge the explicit-only agy provider if maintainers want Antigravity support in core, keeping it opt-in and covered by provider, config, daemon, extension, and docs tests.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature PR rather than a bug report. The contributor did provide terminal proof of the new summarize --cli agy path producing a real summary.

Is this the best way to solve the issue?

Yes, if maintainers want this provider in core: the PR follows the existing CLI-provider pattern, keeps agy out of default auto fallback, and covers the daemon/config paths. The remaining decision is provider/auth acceptance, not a code repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 6d43d3427296.

Label changes

Label justifications:

  • P2: This is a scoped provider feature with daemon/auth plumbing and limited blast radius, not an urgent production regression.
  • merge-risk: 🚨 auth-provider: The diff adds a new authenticated CLI provider plus AGY_PATH and ANTIGRAVITY_API_KEY handling that normal CI cannot fully validate without a real installed/authenticated agy setup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR discussion includes terminal output from a real summarize --cli agy run that produced an after-change summary.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR discussion includes terminal output from a real summarize --cli agy run that produced an after-change summary.
Evidence reviewed

Acceptance criteria:

  • [P1] pnpm -s check.
  • [P1] pnpm -s test -- tests/llm.cli.agy.test.ts tests/config.test.ts tests/daemon.agent.test.ts tests/daemon.chat.test.ts tests/daemon.config.test.ts.

What I checked:

  • Repository policy read: AGENTS.md was read in full; its read-only, monorepo, and pnpm -s check guidance shaped this review. (AGENTS.md:1, 6d43d3427296)
  • PR head diff reviewed: The PR patch for head 172a3d2 changes 26 files with 324 additions and 22 deletions, spanning CLI provider registration, daemon paths, extension settings, docs, and tests. (172a3d2e532a)
  • Provider execution path: The PR adds an agy execution branch that invokes the resolved binary with --print, optional --model, optional tool-permission flag, stdin prompt input, and plain-text stdout handling. (src/llm/cli.ts:374, 172a3d2e532a)
  • Explicit-only default behavior: The PR adds agy to parsing/default-model support while documenting that it remains excluded from the default auto-fallback order unless explicitly requested or configured. (src/llm/provider-profile.ts:117, 172a3d2e532a)
  • Config and daemon auth surface: The PR adds cli.agy, AGY_PATH, and ANTIGRAVITY_API_KEY daemon env snapshot support, which is the main maintainer-facing provider/auth decision before merge. (src/daemon/env-snapshot.ts:41, 172a3d2e532a)
  • Earlier diagnostic gap fixed: The latest head maps CLI_AGY to agy, maps CLI_OPENCODE explicitly, falls back to unknown, and adds a regression test for unavailable cli/agy diagnostics. (src/daemon/agent-model.ts:206, 172a3d2e532a)

Likely related people:

  • steipete: Current-main blame and log history for the CLI provider registry, provider defaults, daemon model paths, extension settings, and README provider docs trace to Peter Steinberger's v0.16.3 release/import commit. (role: current-main area owner; confidence: medium; commits: fcf8c8e5e98d; files: src/llm/cli.ts, src/llm/provider-profile.ts, src/run/env.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels May 31, 2026
@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Proof

Tested on Linux x64 with agy 1.0.3 and summarize 0.11.3 (fork build):

$ summarize --cli agy --length short "https://youtu.be/uWdIgftpvBI"

When starting a business, the most effective strategy is to avoid the
middle ground: either sell extremely expensive stuff to a select few or
sell something super cheap to everyone. The middle is where people die.

Cached · 18m 25s YouTube · 4.2k words · cli/agy/gemini-2.5-flash

Also fixed the three correctness gaps flagged by ClawSweeper:

  • src/run/run-models.ts — added agy config model lookup
  • src/model-auto-cli.ts — added agy to auto-fallback model chain
  • src/config/parse-helpers.ts — added agy to config provider parser

Commit updated: 3d55f5c

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 31, 2026
@yetmike yetmike force-pushed the main branch 2 times, most recently from 422e6dd to 3bce124 Compare May 31, 2026 15:33
@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Addressed all P2 findings:

src/config/sections.tsparseCliConfig now parses and returns the cli.agy block (binary, model, extraArgs). Config like cli: { agy: { binary: "/usr/local/bin/agy", model: "Gemini 3.5 Flash (Medium)" } } is fully round-tripped. Test added in tests/config.test.ts.

src/daemon/env-snapshot.tsAGY_PATH added to ENV_KEYS so daemon env snapshots preserve custom binary paths across restarts. Test updated in tests/daemon.config.test.ts.

DEFAULT_AUTO_CLI_ORDERagy included with justification comment: it uses the same plain-text --print interface as copilot and is gated by binary availability (AGY_PATH / PATH check), so it fails gracefully when not installed.

19 files, 232 additions total. All tests pass.

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Added README documentation following the existing pattern for other CLI providers:

  • Section heading updated to include Antigravity
  • Entry added: agy (Antigravity CLI) → --cli agy / --model cli/agy/<model>
  • AGY_PATH added to the PATH env var list
  • ANTIGRAVITY_API_KEY added to the auth requirements
  • Smoke test line added
  • Explicit allowlist and autoFallback order examples updated

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Completed all remaining provider registry updates:

src/run/run-config.ts:64 — added agy to the bare --cli default enable list

apps/chrome-extension/src/lib/settings.ts:147 — added agy to extension auto CLI order normalizer and default autoCliOrder string

src/run/cli-fallback-state.ts:13 — added agy to last-successful CLI provider state parser so remembered agy successes are read back for prioritization

Policy: agy is in DEFAULT_AUTO_CLI_ORDER (default-auto). Rationale in provider-profile.ts comment: same plain-text --print interface as copilot, fails gracefully when not installed via binary availability check.

23 files, 246 additions. All tests pass.

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Switched to explicit-only for implicit auto fallback:

  • Removed agy from DEFAULT_AUTO_CLI_ORDER in src/llm/provider-profile.ts — bare --cli and auto-fallback will not try agy unless explicitly configured
  • Removed from bare --cli default enable list in src/run/run-config.ts
  • Removed from extension default autoCliOrder in apps/chrome-extension/src/lib/settings.ts
  • README autoFallback order example no longer includes agy

Full explicit support remains intact: --cli agy, --model cli/agy/<model>, AGY_PATH, cli.agy config block, fallback state, daemon picker, and extension normalizer all work when opted in. A comment in provider-profile.ts documents the exclusion.

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. and removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels May 31, 2026
@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Fixed both P1 daemon gaps:

src/daemon/env-snapshot.ts — added ANTIGRAVITY_API_KEY to ENV_KEYS so the credential survives daemon install/restart. Test updated in tests/daemon.config.test.ts.

src/daemon/chat.tsresolveConfiguredCliModel — the fallthrough chain now explicitly handles opencode, agy, and copilot as separate branches instead of falling through to cli.opencode.model. cli/agy now correctly reads cli.agy.model from config. Test added in tests/daemon.chat.test.ts mirroring the existing opencode pattern.

All 27 tests across daemon.chat, daemon.config, and llm.cli.agy pass.

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 31, 2026
Adds agy alongside claude, gemini, codex, agent, openclaw, opencode,
and copilot. Uses a plain-text path (--print + stdin) since agy does
not support --output-format json. Default model is null — agy uses its
own session default (Gemini 3.5 Flash) when no model is specified.
Binary resolved via AGY_PATH env var or agy on PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yetmike
Copy link
Copy Markdown
Contributor Author

yetmike commented May 31, 2026

Fixed the P2 diagnostic gap:

src/daemon/agent-model.tsCLI_AGY now maps to "agy" in the unavailable-provider diagnostic. Also fixed a pre-existing latent bug: CLI_OPENCODE now explicitly maps to "opencode" instead of falling through, and the final fallback returns "unknown" rather than silently misidentifying unknown providers as "opencode".

tests/daemon.agent.test.ts — regression test added: asserts that when CLI_AGY is in the attempt list and agy is not on PATH, the error message contains CLI unavailable: agy.

26 files, 324 additions total. All tests pass.

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@steipete steipete merged commit 821e766 into steipete:main Jun 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants