feat(agy): add Antigravity (agy) as third LLM provider#277
Merged
Conversation
…-mode keep-alive rules and E2E timeout settings
- Add --output-format stream-json to agy PM invocations (setup + sprint) so raw-setup.txt and raw-sprint.txt are populated instead of empty. Previously agy wrote nothing to stdout when output was redirected to a file because no JSON streaming flag was set. - Fix Seed PM permissions to write agy settings to ~/.gemini/antigravity-cli/ (home dir) instead of \/.gemini/antigravity-cli/. agy resolves settings from the home directory, not the working directory, so the seeded allow-list was silently ignored on every s8.x run. - Replace extract-results.mjs agy stub (which hardcoded tokens=0 and returned the raw file as opaque text) with proper JSONL parsing matching the gemini schema. agy emits the same stream-json event types (type:message, type:result with stats), so CHECKPOINTs and token telemetry are now correctly extracted. - Fix session ID grep to also match type:init (emitted by gemini/agy) in addition to type:system (emitted by claude), so session IDs are captured for all providers. - Improve error-diagnosis greps in both phases: fall back to tail -1 when no type:result/type:final line exists (happens for agy in plain-text fallback mode), and pipe jq through || echo so non-JSON last lines are still surfaced in the log.
…rsing" This reverts commit c42f6fe.
…t-mode early exit
…sation when resuming
… planning on resume
…json via tool call, never exits on text
Bundles 10 fixes from the agy-support code review (severity-ordered): - B1 (blocker): escape sessionId in Windows prompt wrapper (agy.ts:213) - B2 (blocker): use ANTIGRAVITY_API_KEY instead of shared GEMINI_API_KEY (auth.ts:11) - H1 (high): list AGY.md as distinct context file in SKILL.md (skills/fleet/SKILL.md:250) - H2 (high): preserve user's custom defaultModel on reinstall (install.ts:284-287) - M2 (medium): warn when transcript parsing falls back to raw output (agy.ts:89-118) - M3 (medium): deduplicate requiredPerms entries (install.ts:220-230) - M4 (medium): write agy hooks.json with 0o600 permissions (install.ts:209) - L2 (low): mention agy in llms.txt subtitle - L3 (low): add agy setup note covering OAuth + ANTIGRAVITY_API_KEY (docs/install.md) - L4 (low): label agy-safety-rationalization.md as internal Test results: 1298 passed, 6 skipped, 0 failures. Typecheck clean. Deferred to follow-up beads issues: H3, H4, M1, M5, M6, N1.
NODE_TRANSCRIPT_SCRIPT is embedded in a shell command as `node -e '<script>'`. The embedded `||''` terminated the outer single-quoted shell string, mangling the JS that reached Node and causing SyntaxError on every agy execute_prompt invocation. Switch to `||""` so the empty-string literal survives shell quoting.
…aces (cyp) Local agy members share the user's ~/.gemini/antigravity-cli/ directory with the PM and other tools, so the apra-fleet MCP and PM/fleet skills load unnecessarily inside member workspaces. Use Antigravity's per-workspace .ignore overlay mechanism: dropping empty .ignore files at .gemini/antigravity-cli/mcp/<name>/.ignore (or skills/<name>/.ignore) blocks that global entry in the workspace only. Closes apra-fleet-projects-cyp.
agy has no --model CLI flag in -p mode, so fleet previously silently ignored cheap/standard/premium tier hints. Antigravity supports a workspace-level settings.json that overrides the global default model; fleet now writes this file (merge-preserving the user's other fields) on each dispatch with a mapped display name. Mapping: cheap -> Gemini 3.5 Flash (Medium) standard -> Gemini 3.1 Pro (Low) premium -> Claude Opus 4.6 (Thinking) Updates the M2 raw-fallback warning if it referenced ignored tiers. Closes apra-fleet-projects-1st.
…55c, M1) Stop embedding the agy transcript-reader and per-dispatch settings-merge scripts inline via `node -e '<literal>'`. PowerShell + Windows CreateProcess mangle the inner quote characters in transit, causing SyntaxError on every agy execute_prompt on Windows. Move both script bodies to scripts/agy-*.js, ship to ~/.apra-fleet/scripts/ at install time, and invoke via `node "<path>"`. No shell quoting involved; scripts now readable, debuggable, and testable independently. Closes apra-fleet-projects-55c. Closes apra-fleet-projects-i73 (M1).
The Windows code path (wrapWindowsPrompt) was missing the call to agy-settings-merge.js that buildPromptCommand makes, so per-workspace settings.json never got the `model` field on Windows. Verified via e2e run 26512080867 on fleet-e2e-win where doer/reviewer settings.json had compose_permissions output but no `model` key. Thread `model` through ProviderAdapter.wrapWindowsPrompt signature (all 5 provider implementations updated; only agy uses it) and invoke agy-settings-merge.js after Set-Location and before the agy launch.
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
node -e '<script>'invocations.Notable changes
src/providers/agy.ts) with ANTIGRAVITY_API_KEY auth, AGY.md instruction file, and tier mapping (cheap=Gemini 3.5 Flash Medium, standard=Gemini 3.1 Pro Low, premium=Claude Opus 4.6 Thinking).scripts/agy-transcript-reader.js,scripts/agy-settings-merge.js) bundled viagen-sea-config.mjsand installed to~/.apra-fleet/scripts/-- no more inlinenode -ewith quoted JS literals.buildPromptCommandand WindowswrapWindowsPromptpaths) to honor tier hints without mutating global config.writeAgyWorkspaceOverlayswrites empty .ignore files for apra-fleet MCP + pm/fleet skills) -- see Known Limitations below..github/workflows/fleet-e2e.yml.Known limitations (tracked in beads)
--mcp-config PATHor per-workspace mcp_config.json overrides.plan.mdbefore sprint execution -- reviewer only sees the plan bundled in the final code review. May be a pm-skill spec gap or an agy PM behavior gap; needs investigation.tests/install-multi-provider.test.ts.fleet-e2e.ymllines 310 and 383 -- separate chore PR.Test plan
npm test-- 1298 passing, 6 skipped, 0 failuresnpm run build(tsc) cleannpm run build:binaryproduces working SEA installer on Windows<workspace>/.gemini/antigravity-cli/settings.jsoncontains the mapped model display name per dispatch (doer =Gemini 3.1 Pro (Low), reviewer =Claude Opus 4.6 (Thinking))