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 ¶
- type Adapter
- func (a *Adapter) Name() string
- func (a *Adapter) Preflight(_ context.Context) error
- func (a *Adapter) Review(ctx context.Context, _ *review.ReviewInput) (*review.ModelReviewResult, error)
- func (a *Adapter) Synthesize(ctx context.Context, input *review.ReviewInput, ...) (*review.ModelReviewResult, error)
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.Model 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`.
func New ¶
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) Preflight ¶
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 ¶
func (a *Adapter) Review(ctx context.Context, _ *review.ReviewInput) (*review.ModelReviewResult, error)
Review delegates to Preflight in v1. The runner is never invoked.
func (*Adapter) Synthesize ¶
func (a *Adapter) Synthesize(ctx context.Context, input *review.ReviewInput, results []*review.ModelReviewResult) (*review.ModelReviewResult, error)
Synthesize is unavailable for the same reason Review is: agy has no non-interactive auth path in v1 (spike S8b). Surface Preflight's experimental-gate error directly. When agy gains a non-interactive auth path the whole body must be rewritten with a real synthesis call — there is no fallback here, since a silent fallback would mask the missing implementation.