antigravitycli

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package antigravitycli implements the Antigravity model adapter (experimental in v1). The CLI binary is `agy`. Lands in M7.

Status (S8b spike, 2026-05-22)

`agy --print` (alias `-p` / `--prompt`) is the non-interactive mode. Output is the raw model text with no envelope, so the adapter can pipe stdout directly to `model.ParseFindings` (unlike Gemini's `-o json` which wraps in `{"response": ...}`). Stdin is supported. There is no `--output-format json` flag, so JSON reliability is prompt-engineered — same risk profile as Codex without `--output-schema`.

However, `agy` is gated behind interactive browser OAuth on every invocation. Each call without a live session prints a Google login URL and listens on `https://antigravity.google/oauth-callback` with a 30-second timeout. The tokens do not persist across invocations and the CLI does not share auth with the installed Antigravity desktop app (both use the same OAuth client_id but different redirect URIs).

This makes `agy` unsuitable for non-interactive review in v1. The adapter therefore ships behind a Preflight error per the v1 plan (`model-adapters.md`, `implementation-plan.md` M7), and is excluded from the supported-models list in `--help` and the README until Antigravity provides a persistent-token or API-key auth path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements model.Reviewer against the Antigravity CLI (`agy`).

Per spike S8b (see doc.go) the adapter is a Preflight stub in v1: the `agy` CLI cannot authenticate non-interactively, so Review never reaches the runner. The struct still exposes the constructor signature shared by the other adapters so it can sit in defaultModels() and surface an actionable error when a user picks `--model antigravity`.

Unlike the codex/claude/gemini adapters, this one does NOT implement model.Synthesizer: there is no real CLI invocation to delegate to in v1, and a stub Synthesize would only mask the missing capability. The synthesis call site type-asserts model.Synthesizer and skips lead candidates that don't satisfy it.

func New

func New(_ provider.Runner) *Adapter

New constructs an Adapter. The provider.Runner argument is accepted for uniformity with the codex and claude adapters but unused in v1: the adapter is gated behind a Preflight error per S8b.

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the model identifier surfaced to users via --model.

func (*Adapter) Preflight

func (a *Adapter) Preflight(_ context.Context) error

Preflight always returns an error in v1. If `agy` is missing from PATH the error explains how to install it; if it is present the error explains the experimental gate (interactive-only OAuth per S8b).

func (*Adapter) Review

Review delegates to Preflight in v1. The runner is never invoked.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL