feat: add the Antigravity agent driver (@agentry/antigravity) - #5
Merged
Conversation
…r it in the workspace New workspace package mirroring @agentry/claude; adds the tsconfig path, vitest alias, and CLI dependency so the driver resolves across typecheck, tests, and the CLI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…entry event model parseAntigravityEvents is a pure whole-stream mapper over agy's event-discriminated stream (init, step_update, result). agent_response text streams as deltas and is coalesced per step_index; tool steps map ACTIVE/DONE to tool_use/tool_result; usage and run.end come from the authoritative terminal result event. Schema captured live from agy 1.1.11. Constraint: agy discriminates on `event` (not `type`) and streams agent_response text as deltas coalesced by step_index Rejected: Rely on cwd for file side-effects | agy writes to its own project/scratch dir, so sandbox fs-diff is best-effort even with --add-dir Confidence: high Scope-risk: narrow Directive: Event schema captured from agy 1.1.11; re-verify the stream if bumping Antigravity Not-tested: sandbox fs capture when agy uses its scratch dir; MCP transports unverified (declared []) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixtures are the live-captured agy 1.1.11 stream; asserts delta coalescing by step_index, tool calls, terminal usage, and run.end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
selectDriver(config.use.agent) routes 'antigravity' to AntigravityDriver and defaults to Claude; doctor probes the agy CLI and prints its capabilities. Constraint: Parallel driver branches each extend this switch; kept minimal for clean union merges Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dortort
force-pushed
the
feat/antigravity-driver
branch
from
August 8, 2026 21:05
ddce684 to
aef9bcb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@agentry/antigravity, a driver that drives Google's Antigravity CLI (agy) headlessly viaagy -p --output-format stream-jsonand normalizes its native stream into the shared AgentryAgentEventmodel — the same contract@agentry/claudeimplements. Wires it into the CLI soagentry test/recordcan target Antigravity withuse: { agent: 'antigravity' }.Antigravity supersedes the Gemini CLI for personal use; its
agyCLI is a genuine headless, structured-output agent runner, so it earns a first-class driver.How it works
The event schema was captured live from agy 1.1.11 (a fresh feasibility spike). Antigravity's stream is discriminated on
event(nottype).parseAntigravityEventsis a pure whole-stream mapper:agy --output-format stream-json)init{init:{cwd,tools}}run.startstep_update{step_type:'tool', state:'ACTIVE'/'DONE'}tool_use/tool_resultstep_update{step_type:'agent_response', text_delta}message(coalesced bystep_index)result{status,usage}usage+run.endKey details:
agent_responsetext streams as deltas, coalesced perstep_indexinto one message. Usage andrun.endcome from the authoritative terminalresultevent (input_tokens/output_tokens/cache_read_tokens). Spawns with stdin ignored.Capabilities
Model ids are
agy's own pinned names, e.g.claude-sonnet-4-6orgemini-3.5-flash-medium.Known limitations (MVP)
agywrites to its own project/scratch dir by default rather than the process cwd;buildArgspasses--add-dir <sandbox>, but the agent may still use its scratch dir, so file side-effect assertions on the sandbox may miss writes. Event-stream normalization (tools, messages, usage) is fully faithful.'none'(routed through Antigravity's backend; not interceptable via env base-URL). Transcript record/replay works; wire cassettes do not apply.[]rather than overclaiming.allowedTools/disallowedTools/mcpConfig/maxBudgetUSD/appendSystemPromptare ignored in MVP.Testing
pnpm typecheckclean; new-package tests green (parser incl. per-step delta coalescing +buildArgs); full suite 93 tests, 0 failures, no regressions.agentry doctorprobes theagyCLI (found v1.1.11) and prints the driver's capabilities.Merge notes
main. Additively touches three files the sibling Codex/Gemini PRs also touch — theselectDriverswitch inpackages/cli/src/commands/run.ts,doctor.ts, and thetsconfig.json/vitest.config.tsaliases. Whichever PR merges later needs a trivial union-merge.chore/release-workflow. When that lands, add@agentry/antigravityto the fixed-version group and a changeset entry.🤖 Generated with Claude Code