Skip to content

Add the Antigravity runtime (agy_acp_server ACP) - #35

Merged
xxchan merged 1 commit into
mainfrom
antigravity-runtime
Sep 29, 2026
Merged

xxchan merged 1 commit into
mainfrom
antigravity-runtime

Conversation

@xxchan

@xxchan xxchan commented Sep 29, 2026

Copy link
Copy Markdown
Member

Adds antigravity as an OAR runtime over Google Antigravity's ACP server, agy_acp_server 1.2.1.

What it does

  • Installation: OAR_ANTIGRAVITY_BIN or PATH agy_acp_server; on Linux the server is launched with --uid=, since without it startup drops to group nobody and aborts on hosts without that group.
  • Session: the shared ACP kernel with an Antigravity profile. No authenticate call: the server signs in from its own persisted login (under $GEMINI_HOME/antigravity-acp/) or GEMINI_API_KEY. yolo mode is applied on every open (a resumed session comes back in default). The model switches through session/set_config_option, because set_model answers {}. System prompt options are rejected. Startup unpacks a large archive, so requests get a 30s timeout.
  • Models: the server has no model list method, so listModels opens a throwaway session and reads its model config option (11 ids on a personal login). Effort is part of the model id; there is no thought_level option, so no entry carries effort levels.
  • Attribution: opaque. The start_subagent tool call completes at once and the child's tool calls and text arrive under the parent's session id, so everything lands on root.

Evidence

  • experiments/live-contract.ts antigravity on a real login (linux x64): 12/13. abort fails; see caveats.
  • Live listModels on the same login: ok, 11 models.
  • pnpm check: typecheck, lint, 389 tests, sea-trial mock 17/17.
  • Details and open gaps in docs/runtimes/antigravity.md.

Caveats

  • Abort gap: while a shell command is running, session/cancel waits for the command to finish (40.1s observed), so OAR's 10s fallback kills the process first. Cancelling during plain streaming ends the turn at once.
  • No usage is reported for any session, and there is no session/close.
  • Using a personal Google account from third party tools risks account suspension under Google's terms; an API key or Vertex is the safer login.

Antigravity is not added to the real-runtime CI matrix.

🤖 Generated with Claude Code

Adapter for Google Antigravity's ACP server (agy_acp_server 1.2.1):
installation via OAR_ANTIGRAVITY_BIN or PATH, Linux launch with --uid=,
yolo applied on every open, model switch through set_config_option,
opaque attribution, and a model lister that reads the model config
option of a throwaway session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit 7a11fff into main Sep 29, 2026
12 checks passed
@xxchan
xxchan deleted the antigravity-runtime branch October 3, 2026 07:50
stamp-build Bot added a commit that referenced this pull request Nov 19, 2026
…or (#1011)

<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg"
width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_6b3f52f367243307afe4b49035f93641"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Requested by `@⁠raft:Cindy` in `#inspection:#35` (`msg=0e5280bd`).

## Verified doc corrections

- **`docs/runtimes/qwen.md`:**
- Clarify that on resume, `usage().total` remains `null` for the entire
resumed session (even after new turns complete), matching
`qwen/projection.ts` (`usageKnown: !resume`) and
`docs/spec/runtime-matrix.md`.
- Clarify that `listModels(installation, { timeoutMs })` sets one
whole-query deadline (default 30 seconds across launch, `initialize`,
and `get_available_models`), aborting the query, terminating the owned
process tree, and closing stdin in cleanup without retries.
- Clarify that `system/task_notification` emits `task_ended` only for
terminal statuses (`completed`, `failed`, `stopped`); non-terminal
notifications (and notifications missing a nonempty `data.task_id`)
remain raw frames without emitting a task event (`qwen/tasks.ts`).
- Note: the `launchArgs` managed-flag updates on `qwen.md:54` and
`qoder.md:172` live in PR #1004 so the two PRs merge cleanly without
conflicts.
- **`docs/runtimes/qoder.md`:**
- Fix the manual compaction settlement order to match
`qoder/compaction.ts`: `started` gates recording subsequent `result` and
manual `compact_boundary` frames; on terminal `command_lifecycle`
(`completed` or `cancelled`), precedence is (1) post-`started` manual
`compact_boundary` -> `completed`, (2) `cancelled` -> `aborted`, (3)
`completed` with post-`started` error `result` -> `failed /
native_failed`, (4) otherwise -> `failed / not_compacted`.
- Clarify that `listModels()` opens a temporary daemon session
(`daemon.initialize`, `daemon.open_session`, and session `initialize`)
through `launchQoder` before issuing `daemon.get_models`, and that one
whole-query `withQueryDeadline` (default 30 seconds, configurable via
`timeoutMs`) bounds auth status, version probing, daemon handshake,
`initialize`, and `get_models`.
- Clarify effort context on startup failure: when `effort` is requested,
post-validation launch/daemon-handshake and `initialize` failures
include the requested effort as context (`qoderStartupError`), whereas
pre-launch option/version refusals, `ModelConfirmationError`, and
`get_settings` effort-confirmation failures keep their own specific
errors.
- **`docs/spec/goals.md`:**
- Expand the refusal-code contract beyond `runtime_refused` to include
`unsupported`, `error`, reachability refusals (`runtime_exited`,
`disposed`, `session_released`), and runtime-reported
`busy`/`no_active_turn`.
- Separate general goal rules from per-runtime wire details: move
Codex's `thread/goal/*` frames and `turn/started`/`turn/completed`
boundaries into `## Codex boundary`, and document DSH's `goal/read`
observation frame, `response.native` reply payload,
`session/event:goal/change`, and `turn/start`/`turn/end` boundaries in
`## DSH boundary`.
- List `blocked`, `usageLimited`, and `budgetLimited` as refused
`goal.set` statuses on DSH (`dsh/goal.ts`).

## Validation

- Verified every doc edit against current `main` (`35289294`) source
files (`qwen/{projection,list-models,tasks}.ts`,
`qoder/{compaction,launch,daemon,list-models,session,protocol}.ts`,
`codex/goal.ts`, `dsh/{goal,bridge-goal,projection,session}.ts`).
- Verified zero em or en dashes in the diff.

Co-authored-by: Lookout <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 19, 2026
…guards, and DSH goalSet refusal (#1004)

<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg"
width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_4d9cc3d5aab90d6543f8e1d1b5a51162"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Requested by `@⁠raft:Cindy` in `#inspection:#35` (`msg=0e5280bd`).

## Breaking change

- **`launchArgs` managed-flag enforcement (`claude`, `qoder`, `qwen`,
`codebuddy`, `factory`):** `SessionOptions.launchArgs` now rejects flags
owned by OAR (`--model`/`-m`, `--effort`/`--reasoning-effort`,
`--system-prompt`, `--system-prompt-file`, `--append-system-prompt`,
`--append-system-prompt-file`, `--name`/`-n`,
`--include-partial-messages`/`--no-include-partial-messages`,
`--replay-user-messages`/`--no-replay-user-messages`, and `--`,
including `--flag=value`, attached short flags such as `-pfoo`/`-rabc`,
and camelCase aliases where applicable) with
`UnsupportedOptionError("launchArgs", ...)` at session open. Hosts
passing those flags via `launchArgs` must migrate to the matching
`SessionOptions` fields (`model`, `effort`, `systemPrompt`,
`appendSystemPrompt`, `name`, etc.).

## Adversarial reproduction

1. **Unredacted inherited runtime credentials and Qoder daemon handshake
tokens (`qoder/launch.ts`, `qoder/daemon.ts`, `qoder/protocol.ts`,
`cursor/access.ts`, `factory/account-credential.ts`):**
- When `QODER_PERSONAL_ACCESS_TOKEN` or `QODER_SERVICE_ACCOUNT_KEY` was
inherited from `process.env`, `qoderDaemonAuth(env)` read and sent it in
`daemon.initialize` while neither `qoderSession` nor `qoderListModels`
registered the inherited value on the credential redactor; additionally,
`qoderDaemonSession` passed an empty `() => {}` callback to
`qoderControl` instead of `rememberQoderSecrets`, leaving handshake
tokens such as `sessionToken` unredacted in subsequent records and error
diagnostics.
- When `CURSOR_API_KEY` was inherited from `process.env` under Cursor's
`subprocess` (`inherit`) or `in_process` access modes, `callRedaction`
and `cursorSessionWith` only inspected explicit `options.env`, allowing
the inherited key to appear in `listModels` error causes and session
failures.
2. **`launchArgs` protocol and option bypasses (`qoder/options.ts`,
`qwen/options.ts`, `claude/launch-args.ts`, `codebuddy/options.ts`,
`factory/options.ts`):**
- `qoder/launch.ts` appended `options.launchArgs` after OAR's own flags
while `checkQoderLaunchArgs` did not reject
`--include-partial-messages`, `--no-include-partial-messages`,
`--model`, `-m`, `--system-prompt`, `--system-prompt-file`,
`--append-system-prompt`, `--append-system-prompt-file`, camelCase
aliases, or attached short flags such as `-phello`.
`checkQwenLaunchArgs`, `checkCodebuddyLaunchArgs`,
`checkFactoryLaunchArgs`, and `refuseManagedLaunchArgs` had analogous
gaps.
3. **DSH `goalSet` invoking status mutations on `undefined`
(`dsh/bridge-goal.ts`):**
- When `goals.create` or `goals.edit` returned `undefined`, `goalSet`
continued into `goals.resume(agent, current)` / `goals.pause(agent,
current)` / `goals.complete(agent, current)` with `current ===
undefined` instead of refusing immediately while truthfully recording
the observed native goal state (`goal/read`, including `null`).

## Fix by class

- **Single shared inherited-credential registration point
(`shared/credential-redactor.ts`):** Introduce
`readEnvironmentCredential` and `rememberEnvironmentCredentials` (using
`environmentValue` for Windows case-insensitivity plus the shared
length, path, and URL-password rules) and route Qoder
(`qoderDaemonAuth`, `launchQoder`, `qoderDaemonSession`, `qoderSession`,
`qoderListModels`), Cursor (`subprocessAccess`, `callRedaction`,
`cursorSessionWith`), and Factory (`factoryCredential`,
`factoryAccountUsage`) through it without scanning unrelated host
environment variables (`docs/spec/record-stream.md`).
- **Shared `launchArgs` guard (`shared/launch-args.ts`) and runtime
docs:** Centralize `normalizeLaunchFlag` (`--flag=value`, attached short
`-fvalue`, optional `--camelCase` normalization) and
`checkManagedLaunchArgs`, wire `claude`, `qoder`, `qwen`, `codebuddy`,
and `factory` onto it, migrate `sea-trial/harness/backends.ts` and
`sea-trial/harness/acp-terminal-priority.ts` from `launchArgs:
["--model", ...]` to `model`, and update
`docs/runtimes/{claude,codebuddy,qoder,qwen,factory}.md`.
- **DSH `goalSet` guard without suppressing native observations
(`dsh/bridge-goal.ts`):** If `goals.create`/`edit` returns
`undefined`/`null`, emit `observeGoal(agent, goals, "set")` so records
faithfully reflect native reality (including `goal: null`) and
immediately refuse with `runtime_refused` without calling
`resume`/`pause`/`complete` with `undefined`.

## Validation

- Rebased cleanly onto `main` (`35289294`).
- `OAR_TEST=codebuddy-aimock OAR_TEST_REQUIRE_AVAILABLE=1 pnpm run
sea-trial` passed locally against real CodeBuddy `2.173.0` (`17 passed,
3 skipped, 0 failed`, including `session.effort-never-substituted` and
`session.effort-listed-levels-apply-across-resume`).
- `CI=1 pnpm run check` passed locally (`567` test files / `5,330` tests
+ `19` mock behavior cases).

Co-authored-by: Lookout <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant