Documentation
¶
Overview ¶
Package antigravity is the Antigravity CLI (`agy`) adapter. Flags, the stream format and the permission rules come from the spike on agy 1.4.2 (docs/claude-code-runner.md, "Spike findings: Antigravity CLI, subscription"); the recorded streams are in testdata/.
Index ¶
- Constants
- func ConversationID(s string) bool
- func Permissions(t aa.Task, home string) (allow, deny []string)
- func Settings(t aa.Task, home string) ([]byte, error)
- func SettingsPath(t aa.Task) string
- type Adapter
- func (a *Adapter) Bin() string
- func (a *Adapter) Command(t aa.Task) (aa.Command, error)
- func (a *Adapter) CredentialEnv() []string
- func (a *Adapter) Denied(events [][]byte, end aa.End) (string, bool)
- func (a *Adapter) FilterStderr(line string) string
- func (a *Adapter) HostUnsupported() string
- func (a *Adapter) LogSource() string
- func (a *Adapter) MinVersion() string
- func (a *Adapter) Name() aa.Name
- func (a *Adapter) NewDecoder() aa.Decoder
- func (a *Adapter) Prepare(t aa.Task) error
- func (a *Adapter) Ready(ctx context.Context, t aa.Task) error
- func (a *Adapter) ResumeID(_, stored string) (string, bool)
- func (a *Adapter) ResumesByID() bool
- func (a *Adapter) ReviewEvidence(events [][]byte, worktrees []string) bool
- func (a *Adapter) SupportsSimulator() bool
- func (a *Adapter) VersionArgs() []string
- type Config
- type Decoder
Constants ¶
const MinVersion = "1.5.9"
MinVersion is the first agy release DD verified with session --settings (2026-11-14). The stream fixtures in testdata were recorded on 1.4.2; the event format did not change in the 1.5.9 probe.
Variables ¶
This section is empty.
Functions ¶
func ConversationID ¶
ConversationID reports a UUID-shaped conversation id.
func Permissions ¶
Permissions is the permissions block DD writes for t.
- allow: command(git) plus the first word of each verify command; wildcards (command(*)) are refused by the CLI's own guidance.
- deny: the agy home's .gemini dir for the file tools (the OAuth token is readable without it: probe 5), every unneeded tool, and for the reviewer writes to the handoff and the worktrees.
func Settings ¶
Settings is the --settings document for t. agy 1.5.x starts headless runs with no saved mode in Auto, which approves edits and sandboxed commands, so the reviewer pins Default (agentMode ""), where a headless edit is auto-denied; the implementer passes --mode accept-edits.
func SettingsPath ¶
SettingsPath is the session settings file for t, in DD's per-job state dir (beside the handoff, never in it). agy 1.5.x reads it with --settings and never saves it, so DD writes nothing into the agy home.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter is the Antigravity CLI.
func (*Adapter) Command ¶
Command builds `agy -p`. Always --sandbox and --settings; never --dangerously-skip-permissions. The implementer runs --mode accept-edits; the reviewer runs Default mode (pinned in its settings file), where headless edits are auto-denied.
func (*Adapter) CredentialEnv ¶
func (*Adapter) Denied ¶
Denied blocks a reviewer lens on result.denied_actions, or on a tool step that failed its permission check (a deny rule refuses without listing a denied action).
func (*Adapter) FilterStderr ¶
FilterStderr never forwards agy's stderr raw: signed out it prints a sign-in URL and an interactive prompt, and a headless denial suggests --dangerously-skip-permissions, which DD never uses.
func (*Adapter) HostUnsupported ¶
HostUnsupported names why this host cannot run agy jobs. On macOS agy 1.5.x keeps its sign-in in the login Keychain, which a separate HOME cannot reach: the CLI then shows the owner a Keychain dialog. The adapter targets Linux workers (the maintainers, 2026-11-14); on the Mac use claude.
func (*Adapter) MinVersion ¶
func (*Adapter) NewDecoder ¶
NewDecoder returns a fresh decoder (it remembers whether prose streamed).
func (*Adapter) Prepare ¶
Prepare writes the session settings file before every spawn, so the file is always DD's.
func (*Adapter) Ready ¶
Ready runs `agy models` under the job env. Signed out it prints "Please sign in to view available models".
func (*Adapter) ResumesByID ¶
func (*Adapter) ReviewEvidence ¶
ReviewEvidence wants a run_command step whose command line is a git diff of a worktree, finished DONE (not ERROR).
func (*Adapter) SupportsSimulator ¶
func (*Adapter) VersionArgs ¶
type Config ¶
type Config struct {
// Bin is the resolved agy binary ("" when not installed).
Bin string
// Home is the DD-only HOME the owner signed in under. agy has no
// config-dir variable: its config, conversations and OAuth token live in
// $HOME/.gemini/antigravity-cli/, so the child's HOME is the only lever.
Home string
// Model is passed as --model when set.
Model string
// GOOS is the host OS; "" is runtime.GOOS. Tests set it.
GOOS string
}
Config is what the caller resolved.