Repository navigation
feat(antigravity): add ax-harness launcher with runtime install fallback - #8
Conversation
db89349 to
352eb1f
Compare
mayawang
left a comment
There was a problem hiding this comment.
Thanks Luke, the harness is clean and nothing secret reaches the logs. Before merge: the runtime fallback downloads agy@latest on every container start (and again on every resume, since it lands outside /workspace), and the sha512 comes from the same bucket as the binary. Could the fallback be opt-in with an exact version, and the version + sha512 pinned in the repo? Non-blocking: under the AX runner AX_GOAL_FILE isn't set today, so the harness exits, see #9.
…_CONFIG_FILE servers Aligns ax-harness with the launcher contract in google/ax#621: the goal comes from spec.goal.text, the answer is written to AX_OUTPUT_FILE (and still printed to stdout), and the Workspace's MCP servers are registered with agy mcp add before the task runs.
…l opt-in install-agy.sh now pins agy 1.5.10 with each platform's release URL and SHA-512 in the repo, so the only request is the tarball download and the checksum no longer comes from the same bucket. Unpinned versions, including latest, are rejected. ax-harness installs agy at runtime only when AGY_RUNTIME_INSTALL=true, into <workspace>/.ax/bin so a resumed sandbox reuses it.
|
Thanks @mayawang ! I addressed these issues:
AX_GOAL_FILE is covered by google/ax#621. I also updated the harness to that contract: it writes the answer to AX_OUTPUT_FILE and registers AX_MCP_CONFIG_FILE servers via Tested with the unit tests and a live Gemini run on KinD. Preinstall vs. runtime install is still open until the runner discussion settles. |
MushuEE
left a comment
There was a problem hiding this comment.
Thanks Luke. I checked the harness at 8f9f9aa against the launcher contract on google/ax main (runner/launcher.go): the goal, spec.config, MCP servers and AX_OUTPUT_FILE are all handled, and a bad spec.config fails the task instead of running agy without flags (I ran it locally with a fake agy). Two things, neither blocking this PR:
1. Interactive and long-lived sandboxes (google/ax#632). AX only starts ax-harness for a task that has spec.goal.text and no spec.commands. A task with no goal runs nothing, so that users can attach with ax ssh. The harness is currently the only thing that installs agy and puts .ax/bin on PATH, so:
- a user who attaches to a task with no goal has no
agyat all; - a user who attaches after a goal task ran has
agyin/workspace/.ax/bin, but not on theirPATH.
install-agy.sh is already a separate script, so this is mostly documentation: could the README say that for ax ssh use you run /usr/local/share/ax/install-agy.sh "" /workspace/.ax/bin once? The PATH part belongs in the image, see my comment on #9.
2. State across suspend. Only /workspace survives a suspend. A task that is suspended while agy is still running starts the harness again from scratch on resume, because AX only records that the launcher finished after it exits. Where does agy keep its conversation state? If it is under $HOME, it is lost on suspend, both for that restarted run and for interactive users. Could it be kept under /workspace/.ax, with the harness passing --conversation when a previous run exists? Fine as a follow-up, since the README already notes AX_SESSION_FILE isn't used yet.
…e output atomically (#25) Follow up on #8 to persist Antigravity CLI (agy) conversation state across suspend/resume and multi-turn sessions via AX_SESSION_FILE, and to write AX_OUTPUT_FILE atomically on exit: - When AX_SESSION_FILE is non-empty, validate the session ID (rejecting path traversal), isolate HOME under <workspace>/.ax/sessions/<id> (overridable via AX_SESSION_HOME), and pass --continue when conversation state already exists (unless spec.config sets continue or conversation). - Deduplicate AX_OUTPUT_FILE / spec.config.outputFile, tee to per-PID temp files, and rename into place on exit. - Wait on the Python arg-parser process substitution so config errors propagate under set -e. - Add unit tests in agents/antigravity/test_harness.sh and document AX_SESSION_FILE in agents/antigravity/README.md. Part of #15.
Adds
agents/antigravity/{ax-harness,install-agy.sh,test_harness.sh,README.md}and.github/workflows/antigravity.yamlfor running headless Antigravity CLI (agy) tasks under the AX in-container wrapper contract:$AX_GOAL_FILE(exits2when empty) and optional$AX_CONFIG_FILE(spec.configJSON), mappingcamelCasekeys to sortedagy--kebab-caseCLI flags.agy's answer to stdout/logs by default, and optionally also writesspec.config.outputFilewhile preservingagy's exit code.--dangerously-skip-permissions,--add-dir=<cwd>), Substrate HTTPS MITM CA trust (SSL_CERT_FILE/CURL_CA_BUNDLEwhen/run/ate/egress-trust-bundle/trust-bundle.pemis mounted), and authentication: automatically passes"modelProvider": "gemini"in--settingswhenGEMINI_API_KEYis set (with optionalGOOGLE_GEMINI_BASE_URLgateway override), or uses Vertex AI ADC whenAGY_ADC_AUTH=true.install-agy.sh(version-pinnable Linuxamd64/arm64installer with SHA-512 manifest verification) and runtime-install fallback whenagyis missing onPATH.agents/antigravity/test_harness.shtesting flag mapping, auth modes,outputFile, runtime-install fallback, CA trust-bundle wiring, and empty-goal handling.