Repository navigation
Conversation
- Run Antigravity as an external harness: one `agy` process per turn with
stream-json input and output. The prompt goes to stdin as an
`{"event":"user"}` message, because `-p` does not read stdin and a full
replay exceeds the Windows command-line limit.
- The CLI has no system prompt flag, so a fresh native conversation carries
the runtime instructions in its first message; a resumed one does not
repeat them.
- Stream `agent_response` deltas for display and reconcile with
`result.response`, emitting only text the stream did not show. A non-SUCCESS
status fails the turn, and so does a SUCCESS result with an empty response:
headless mode reports denied tools that way, listed in `denied_actions`.
- Grant permissions for this run only through `--settings`: shell commands,
reads, and writes inside the turn's execution directory; browser URL
actions are denied and anything else needing approval is soft-denied by
headless mode. `--dangerously-skip-permissions` is not used.
- Resume with `--conversation` in the same execution directory. Native
conversations live in `~/.gemini/antigravity-cli/conversations`; a missing
file keeps the workspace and replays the full history.
- Discover `agy` on PATH, then in `~/.gemini/bin`, where the installer puts
it without adding it to PATH. Probe readiness by version and `agy models`;
a sign-in error maps to needs_login.
- Add the picker entry, Lobe Icons logo, bilingual setup hint and error
codes, a trace projection, runtime identifiers in the API contract, and
docs. Keep Antigravity out of the credential-free release visual gate.
Refs: ThinkFlowLab#585
- Antigravity CLI enables its terminal sandbox by default in auto mode. The sandbox blocked the local socket the opendirector CLI uses to reach the running app, so every project command failed with "Operation not permitted" and the agent could not change the project. - Pin the policy per run through --settings instead of inheriting the user's global mode: default agent mode, terminal sandbox on, and proceed-in-sandbox. Allow only command(opendirector) to run outside the sandbox, replacing command(*). Other requests to leave the sandbox are soft-denied in headless mode. - Tell the agent in its first message to run opendirector outside the sandbox. - Update the runtime docs, add a lesson, and assert the pinned policy in the runtime test. Verified with a real agy turn: a text node was created, and an image was generated and adopted through opendirector. Video submissions reached the providers but were rejected upstream (HTTP 400/402). Refs: ThinkFlowLab#585 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Include `antigravity` in the raw conversation trace archive allowlist so exported ZIP archives include `antigravity.jsonl` instead of marking the source unsupported, with a unit test. - Add Antigravity to `tests/browser/provider_settings.mjs` harness logo verification, matching the Pi runtime check. - Instruct Antigravity to invoke each `opendirector` command standalone (without shell chaining, pipes, or command substitution) so the `command(opendirector)` unsandboxed allow rule matches reliably. - Reuse `_logged_out()` for turn-result authentication failures, cover English localization of all five `antigravity_*` error codes, and drop redundant inline comments already documented in `agent-runtime.md`. Refs: ThinkFlowLab#585
…apter - Remove the multi-line docstrings and the trace JSDoc block; the sandbox policy, stream-json input and empty-SUCCESS handling are described in docs/architecture/agent-runtime.md. Refs: ThinkFlowLab#585
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 8db1b0b Refs #585
Dot,代表 @david6666666。
当前证据暂定 52/100(非批准分)。 范围 3/3,正确性 2/3,验证 2/3,主张证据 0/3,简洁性 2/3。
接入范围符合 #585,当前提交的 Release checks 是绿的。最想先确认的是:最后一帧改写了流式正文时,用户能否看到并保留最终版本。我把具体分支标在代码里了。真机和重启验证目前写的是旧提交,也还缺从选择 Antigravity 到重新打开项目的可播放录像。建议修完后在当前提交上补这一段。我没有调用真实账号或重跑测试。
English summary: 52/100 provisional. Handle a non-prefix final response without losing the authoritative text; attach a current-tip workflow recording and restart evidence.
| if not shown: | ||
| return [{'type': 'delta', 'text': response}] | ||
| for base in (last, shown): | ||
| if base and response.startswith(base): |
There was a problem hiding this comment.
这里如果 result.response 不是已有流式文本的前缀延续(比如 CLI 在结束时修订了最后一句),就直接返回空列表。用户会看到草稿,但这轮仍当作成功完成。能否让完成帧在这个分支替换可见正文,并加一个「流式内容和最终正文不一致」的回归,顺手验证刷新后保留下来的是最终版本?
- Antigravity's `result.response` is authoritative, but a response that did not extend the streamed text was dropped: the draft stayed visible and was persisted while the turn reported success. - Add a shared `replace` stream event. The adapter emits it with the final response in that case; the API turns it into the accumulated text that is persisted, and the assistant view swaps the visible text through `streamedText`, so a live view, a resumed stream and a reload agree. - Regression tests fail on the previous revision: the adapter emits one `replace` with the final text, the saved and reread message is the final text, and a replayed stream ends with the replaced text. Refs: ThinkFlowLab#585
- `checks / browser (isolated)` failed in `timeline_node_output.mjs` at the first output's `<video>` wait, on this branch and on an unrelated PR (run 46380611011, 2026-11-26 feat/midturn-composer-actions). The wait covers a browser MP4 render, asset import and `timeline.publishRender` under the page's 20 s default. - Under CPU contention the render finished and `timeline.publishRender` was applied after the 20 s wait expired; no revision conflict or stuck state was observed. - Give the render-bound waits the 60 s budget `timeline_workflow.mjs` already uses for its render, and wait for the first `publishRender` receipt before the `<video>`, so a slow render and a rejected publish fail with different messages. Refs: ThinkFlowLab#585
david6666666
left a comment
There was a problem hiding this comment.
Dot,代表 @david6666666。
当前证据暂定 60/100(非批准)。 范围、正确性、验证、证据、简洁性依次为 3/3、3/3、2/3、0/3、2/3。
之前卡的最终正文已修:遇到非前缀结果时发 replace,服务端保存和浏览器显示都用替换后的正文,新增用例也覆盖了刷新回读。当前 CI 是绿的,作者已补录像,但我未能读到录像内容,证据暂不补分;分支仍落后主线两个提交。建议同步主线后再核对从选择运行时到重新打开项目的录像。
English summary: 60/100. The replacement event addresses the prior finding. Exact-tip CI is green, but the branch is behind main and video content was not independently verifiable.
Summary
antigravity(Antigravity CLI,agy) as an external harness next to OpenCode, Codex, Claude Code, JiuwenSwarm, DeepSeek Harness and Pi: oneagy --input-format stream-json --output-format stream-json --disable-slash-commands -p=process per turn, reusing the existing terminate, stderr, trace, session and cancel handling.agysign-in, model catalog, global skills, plugins and MCP servers (modelSource: cli). OpenDirector model credentials are not passed to the child process.{"event":"user"}line:-pdoes not read stdin, and a full replay can exceed the Windows command-line limit.agyhas no system prompt flag, so runtime instructions travel in the first message of a fresh native conversation and are not repeated on resume.agent_responsetext_deltaupdates are display only;result.responseis authoritative. When it extends the streamed text, only the remainder is emitted; when it revises it, the adapter emits a new sharedreplacestream event with the final text. The API saves that text, and the assistant view swaps the visible text throughstreamedText, so a live view, a resumed stream and a reload show the final reply. Any non-SUCCESSstatus fails the turn (sign-in errors map toantigravity_login, 401). ASUCCESSwith an empty response also fails: headless mode reports denied tools that way (denied_actions→antigravity_denied, otherwiseantigravity_empty).--settingsinstead of inheriting the user's global mode: defaultagentMode, terminal sandbox on,toolPermission: proceed-in-sandbox. Onlycommand(opendirector)may leave the sandbox, because the sandbox blocks the local socket the CLI uses to reach the app;read_file(*)andwrite_file(<turn work dir>/)are allowed,execute_url(*)anddownload_url(*)are denied. Other requests are soft-denied by headless mode.--dangerously-skip-permissionsis not used.--conversationin the same execution directory. Native conversations live in~/.gemini/antigravity-cli/conversations/<id>.db(the CLI has no project-local override); a missing file keeps the workspace and replays the full history.agyis discovered onPATH, then in~/.gemini/bin, where the installer puts it without updatingPATH. Readiness isagy --version→agy models; a sign-in error maps toneeds_login.Known limitations, stated in
docs/architecture/agent-runtime.md:agyhistory; the CLI offers no per-run data directory.Linked issue
Fixes #NorRefs #Nis included, or no issue appliesRefs #585
Labels
type:feat,area:agent,area:harnessTest plan
Tip:
a3f09289.c9c4296eadds thereplacestream event requested in review on top of8db1b0b1;a3f09289only changestests/browser/timeline_node_output.mjs, so the product evidence below, recorded onc9c4296e, applies to the tip.c9c4296e:8db1b0b1and passing onc9c4296e:tests/test_antigravity_runtime.py::test_a_revised_final_response_replaces_the_streamed_draft: the adapter emits onereplacewith the final text.tests/test_assistant_conversations.py::test_a_replaced_reply_streams_and_persists_the_final_text: the streamed, reread and on-disk message is the final text.tests/assistantResume.test.ts: a replayed stream ends with the replaced text.python -m pytest tests/test_antigravity_runtime.py tests/test_assistant_conversations.py tests/test_runtime_readiness.py tests/test_assistant_conversation_trace.py tests/test_pi_runtime.py tests/test_localization.py tests/test_agent_visual_gate.py tests/test_native_runtime.py -q(170 passed, 22 skipped). The fakeagycovers argv and stdin stream-json, the pinned--settingspolicy, delta / remainder / replace reconciliation, sign-in / error / denied / empty failures, skill forwarding,--conversationresume, missing-conversation replay and readiness branches.python -m pytest tests -m ready -q(223 passed);scripts/generate_contracts.py --check;lint-imports(4 kept, 0 broken).npm test(1039 passed),npm run build,npm run check:i18n(3461 keys, 0 problems).tests/browser/timeline_node_output.mjsagainstcreation_server.py+ Vite: 3 of 3 runs passed (see CI below).agy 1.5.20account against an isolated local API, onc9c4296e(gemini-3.8-flash-medium), recorded in the video below:opendirector canvas text create. The asset hasprovenance.agentRuntime: antigravityandagentRunIdmatching the turn.uvicornprocess started (PID57589→57828). The project was reopened: the node, the conversation andruntime=antigravity/runtimeModel=gemini-3.8-flash-mediumwere kept.f90a11d7…) in the same work directory as turn 1. It read the node (canvas text show, revision 1), wrote it withcanvas text update --expected-version canvas_item:…:1, and read back revision 2 with both lines.9bdb16be(adapter unchanged since, except thereplacebranch): readinessreadywith 27 models; a user edit preserved across a restart; stop mid-run with no orphanagyprocess, then continuation; an unsandboxed non-opendirectorcommand soft-denied asantigravity_denied; a second project isolated; no sentinel OpenDirector API key inagent-runs/<turn>.antigravity.jsonl.checks / browser (isolated)failed onc9c4296eintests/browser/timeline_node_output.mjs, the same timeout seen on an unrelated PR on 2026-11-26. Three of its waits include a browser MP4 render and used the page's 20 s default; under CPU contention the first output'stimeline.publishRenderwas applied after that wait expired, with no conflict or stuck state.a3f09289gives those render-bound waits the 60 s budgettimeline_workflow.mjsuses and waits for the publish receipt before the<video>. Locally it passes 5/5 unthrottled and 3/3 at 8× CPU throttling; under a 4-instance, 4× throttled load the previous version failed 12/12. Release checks ona3f09289are pending. Native Windows and Linux runs with a signed-inagyare not covered and were not run.Evidence that it works
All artifacts below were captured on
c9c4296ewithagy 1.5.20signed in, against an isolated local API and Vite server with a fresh project. Yellow banners in the video are recording notes injected by the capture script; they are not product UI.en-US, 5 min 23 s, real time). New project → Chat with AI → pick Antigravity (setup card: Ready) → chooseGemini 3.8 Flash (Medium)→ turn 1 creates "Opening line, written by Antigravity." (1 min 35 s, 7 tool calls) → the API is stopped and restarted (the page shows the request errors while it is down) → the project is reopened with the node, the conversation and the selected model intact → turn 2 reads the node and appends "Second line, after the restart." (2 min 44 s, 12 tool calls).Run receipt: project
adf9e4ba-48bb-49e3-9b95-0a0c3fef80ea; native conversationf90a11d7-9bf9-423d-b694-55390f136110for both turns.antigravity-restart-en-US.mp4
en-US,zh-CN). Antigravity is Ready, with the bilingual hint and theagycommand.en-US,zh-CN). Antigravity row with the monochrome logo, and the model list read fromagy models.en-US,zh-CN). Antigravity is still selected withgemini-3.8-flash-medium.Observed but not changed here:
zh-CN. They are shared by every harness row and predate this PR.agy modelsloads (about 6 s), the model submenu briefly reads "CLI exposes no selectable models" before the list appears.Provider verification
Real-provider calls are described honestly, or none were made
Unit, contract and regression tests use a local fake
agyand synthetic fixtures; thereplacepath is covered by those doubles. No realagyrun in this pass happened to return a revised final response.The video run used a real signed-in
agy 1.5.20account withgemini-3.8-flash-mediumagainst isolated local services onc9c4296e: node creation, an API restart with a reopened project, and a resumed native conversation that read and updated the node.Image and video generation through Antigravity, other
agymodels, and Windows or Linux execution were not run.Bilingual UI
src/i18n/messages/{en-US,zh-CN}/assistant.ts(setup hint),apps/api/src/opendirector_api/localization.py(fiveantigravity_*error codes) anddocs/guides/user-guide{,.zh-CN}.md.npm run check:i18npassed, and the setup card, picker and model list were inspected in both locales.