[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CT4GQZT2N8YCK7RC79EYFH":3,"skill-same:01M7CT4GQZT2N8YCK7RC79EYFH":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CT4GQZT2N8YCK7RC79EYFH","antigravity-native-e2e-dev",null,"Spin up a live local Omnigent server + runner and exercise the native Antigravity (agy) TUI harness (antigravity-native) end-to-end — launch the real `agy` CLI via `omnigent antigravity`, drive turns through the web UI, smoke-test, and bug-bash. Load when developing, testing, or debugging the antigravity-native harness (omnigent\u002Finner\u002Fantigravity_native_executor.py, omnigent\u002Fantigravity_native.py, antigravity_native_bridge.py, antigravity_native_rpc.py, antigravity_native_reader.py, antigravity_native_launch.py) or its agy launch \u002F RPC mirror \u002F tmux delivery \u002F OAuth \u002F MCP-relay behavior. NOT the in-process `antigravity` Gemini SDK harness.","roland-id-au\u002Fomniagent","roland-id-au","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2590653?v=4","01M7CT4DEBVK4R185WFWCWN4JD","Buck Chancey","01M7CT4DFGWX49CGE347EF4V6T",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002F.claude\u002Fskills\u002Fantigravity-native-e2e-dev\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: antigravity-native-e2e-dev\ndescription: Spin up a live local Omnigent server + runner and exercise the native Antigravity (agy) TUI harness (antigravity-native) end-to-end — launch the real `agy` CLI via `omnigent antigravity`, drive turns through the web UI, smoke-test, and bug-bash. Load when developing, testing, or debugging the antigravity-native harness (omnigent\u002Finner\u002Fantigravity_native_executor.py, omnigent\u002Fantigravity_native.py, antigravity_native_bridge.py, antigravity_native_rpc.py, antigravity_native_reader.py, antigravity_native_launch.py) or its agy launch \u002F RPC mirror \u002F tmux delivery \u002F OAuth \u002F MCP-relay behavior. NOT the in-process `antigravity` Gemini SDK harness.\n---\n\n# Antigravity native harness: end-to-end dev & testing (local server\u002Frunner)\n\nThe `antigravity-native` harness wraps the **real Antigravity `agy` TUI** (the\n`agy` CLI, installed from `antigravity.google\u002Fcli\u002Finstall.sh`). `omnigent\nantigravity` ensures a host daemon, the daemon-spawned **runner** launches `agy`\nin a runner-owned **tmux** terminal, and your TTY attaches to it. This is **not**\nthe in-process `antigravity` Gemini-SDK harness — that one runs `google-antigravity`\nwith a Gemini *API key*; this one drives the OAuth-only `agy` CLI and mirrors it\nover **connect-RPC**. This skill is the proven recipe for running it **for real\nagainst a live local server + runner** — not just the unit tests.\n\n> Like the other native harnesses, the runner imports from your **current\n> checkout**, so testing here exercises exactly the code you're on. (CWD\u002Fvenv\n> selects the code, not `PYTHONPATH`.)\n\n## What actually runs where\n\n```\nyour TTY ── (attach \u002F pexpect) ──► omnigent antigravity (CLI, local)\n                                        │ ensures\n                                        ▼\n                                  host daemon ──► local Omnigent server (AP)\n                                        │ spawns                      ▲\n                                        ▼                  connect-RPC │ HTTP\n                                  runner ── launches ──► agy (TUI, in tmux)\n                                        │                              │\n                                        ├── write path: type web turns into the TUI\n                                        │   (tmux bracketed paste → real USER_INPUT step)\n                                        └── read path: RPC read driver mirrors agy's\n                                            trajectory steps back into the session\n```\n\nThree transports, easy to confuse:\n\n1. **Write path = typing into the TUI.** Every web\u002Fmobile turn is *typed* into the\n   agy pane via tmux (`inject_user_message_via_tui`), creating a real\n   `CORTEX_STEP_TYPE_USER_INPUT` step on the **same** cascade the TUI shows\n   (#1156\u002F#1158). It is **not** delivered over `SendUserCascadeMessage` (that\n   headless RPC path was retired; the `antigravity_native.py` module header still\n   says \"delivered via the RPC\" — that's stale doc-lag, the executor is authoritative).\n2. **Read path = RPC.** `antigravity_native_reader` polls\u002Fstreams agy's connect-RPC\n   trajectory steps and mirrors them into the Omnigent session.\n3. **Control = RPC.** Interrupt is `CancelCascadeSteps`; a tool\u002Fpermission prompt\n   is answered via `HandleCascadeUserInteraction` (surfaced as an Omnigent\n   elicitation).\n\n## Prerequisites (check these first)\n\n1. **You're on the branch you want to test**, running from that checkout\n   (`.venv\u002Fbin\u002Fomnigent` \u002F `.venv\u002Fbin\u002Fpython` from this repo).\n2. **The `agy` CLI is on PATH** (or at `~\u002F.local\u002Fbin\u002Fagy`) — the harness can't\n   launch without it:\n   ```bash\n   which agy || ls -l ~\u002F.local\u002Fbin\u002Fagy\n   agy --version\n   # install if missing (shell installer, NOT npm):\n   #   curl -fsSL https:\u002F\u002Fantigravity.google\u002Fcli\u002Finstall.sh | bash   # then restart shell\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.harness_readiness import harness_is_configured; print('antigravity-native ready:', harness_is_configured('antigravity-native'))\"\n   ```\n3. **`agy` is signed in (OAuth).** agy is **OAuth-only** — it has no `agy login`;\n   you authenticate by running bare `agy` once and completing the browser sign-in.\n   It **ignores `GEMINI_API_KEY`** (API-key auth belongs to the separate\n   `antigravity` SDK harness). Verify (no secrets printed):\n   ```bash\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.gemini_auth import gemini_login_detected; print('agy oauth token present:', gemini_login_detected())\"\n   agy models   # exits 0 and lists models only when signed in; else 'Please sign in'\n   ```\n   `False` \u002F non-zero → run `agy` once and sign in. agy's token lives under\n   `~\u002F.gemini` (`oauth_creds.json` on macOS through 1.0.10,\n   `antigravity-cli\u002Fantigravity-oauth-token` on Linux); agy 1.1.7+ on macOS\n   writes no token file and keeps the credential in the Keychain, which is why\n   `gemini_login_detected()` falls back to `agy models` there.\n4. **`tmux` is on PATH.** The agy terminal is a runner-owned tmux pane; the CLI\n   attaches to it and the executor drives it via `tmux send-keys`\n   (`_preflight_local_tools` hard-fails without tmux).\n5. **Network egress to Google's Antigravity backend.** A turn that hangs \u002F fails\n   to connect on a locked-down host is usually egress, not a harness bug.\n\n> No `node` and no provider\u002Fgateway config are needed here (unlike pi\u002Fcursor\n> native): agy is a self-hosted binary and auth is the inherited Google OAuth.\n\n## Step 1 — start a local server (real server + runner)\n\n```bash\ncd \u002Fpath\u002Fto\u002Fomnigent\n.venv\u002Fbin\u002Fomni server --background          # detached managed server on a free loopback port\n.venv\u002Fbin\u002Fomni server status         # prints the URL, e.g. http:\u002F\u002F127.0.0.1:6767\nSERVER=http:\u002F\u002F127.0.0.1:6767         # use the printed URL below\ncurl -s \"$SERVER\u002Fhealth\"             # {\"status\":\"ok\"}\n```\n\n(`omnigent antigravity --server \"\"` also auto-spawns a persistent local server and\nuses it — handy for a one-shot manual run, but a known `$SERVER` URL is better for\nscripted API observation below.)\n\n## Step 2 — launch the agy terminal against the local server\n\n`omnigent antigravity` **attaches an interactive TUI**, so run it where you can\nhold it open. Two patterns:\n\n**A. Background terminal (recommended for scripted drives).** Launch in one\nterminal, drive\u002Fobserve from another:\n\n```bash\n.venv\u002Fbin\u002Fomnigent antigravity --server \"$SERVER\" 2>&1   # attaches the agy TUI; leave it running\n# add a model:  --model gemini-2.5-pro   ;   pass-through agy args go at the end\n```\n\nIt prints `Web UI: \u003Curl>` and a resume hint to stderr — grab the conversation id\n(the `…\u002Fc\u002F\u003Cconv_…>` segment) for the API calls below:\n\n```bash\nCONV=conv_xxxxxxxx   # from the \"Web UI:\" line \u002F resume hint\n```\n\n**B. PTY driver (fully automated).** Drive it under `pexpect` like the\n`claude-native-e2e-test` skill's `cuj_driver.py`: spawn `omnigent antigravity\n--server \u003Curl>` in a PTY with `cwd=\u003Ccheckout>`, capture the conv id from the\nprinted URL, then drive\u002Fpoll the API, then **tear down the whole process tree**\n(see Teardown — a pexpect Ctrl-C only *detaches* tmux).\n\n> The runner **owns** the agy terminal: binding a runner auto-creates the\n> antigravity terminal for the session, and the CLI *reattaches* rather than\n> launching its own. Don't hand-launch a second `agy` against the same session —\n> a double launch 500s and clobbers the runner's bridge state (web-turn injection\n> then fails \"bridge state is missing\").\n\n## Step 3 — drive a turn (and smoke-test)\n\n**Via the web path (exercises `AntigravityNativeExecutor`).** Post a user message\nto the running session; the runner routes it to the harness, whose `_deliver`\ntypes it into the agy TUI (real `USER_INPUT` step):\n\n```bash\ncurl -s -X POST \"$SERVER\u002Fv1\u002Fsessions\u002F$CONV\u002Fevents\" \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\"type\":\"message\",\"data\":{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Reply with exactly the single word: PONG\"}]}}'\n```\n\nThen **observe** the mirrored transcript (the RPC read driver posts agy's steps\nback):\n\n```bash\nsleep 25\ncurl -s \"$SERVER\u002Fv1\u002Fsessions\u002F$CONV\u002Fitems\" | python -m json.tool | tail -40\n```\n\nA healthy run shows your `user` message **and** a non-empty `assistant` reply\n(`PONG`) mirrored into the session — proving the full stack: server → runner →\nexecutor → tmux paste → agy turn → connect-RPC read driver → transcript mirror.\nYou'll also see the prompt + reply render in the attached agy TUI (parity is the\nwhole point of the TUI-typing write path).\n\n- **Type-driven smoke:** instead of the POST, type a prompt directly in the\n  attached agy TUI and confirm it answers + mirrors to `…\u002Fitems`.\n- **Model:** select a model with agy's TUI `\u002Fmodel`; the next web turn echoes that\n  choice (the executor reads it from the latest `USER_INPUT` step).\n\n## Inspect the bridge (debugging)\n\nPer-session bridge state lives under a hashed dir (keyed by *bridge id*, which\ndefaults to the Omnigent conversation id):\n\n```bash\n.venv\u002Fbin\u002Fpython -c \"from omnigent.antigravity_native_bridge import bridge_dir_for_bridge_id as d; print(d('$CONV'))\"\n# ~\u002F.omnigent\u002Fantigravity-native\u002F\u003Csha256(bridge_id)[:32]>\u002F\n#   state.json     \u003C- {session_id, conversation_id (agy's real UUID once minted), active_turn_id}\n#   tmux.json      \u003C- {socket_path, tmux_target} the executor types into (send-keys)\n#   bridge.json    \u003C- token for the Omnigent MCP relay (sys_* tools)\n#   agy-home\u002F.gemini\u002F...  \u003C- per-session ISOLATED HOME: a COPY of your OAuth token\n#                            + onboarding markers + config\u002Fmcp_config.json (relay)\n```\n\nKey facts:\n- agy mints its **own** UUID cascade; a fresh launch seeds an `agy_conv_*`\n  **placeholder** until cold-start `StartCascade`s the real id and writes it to\n  `state.json` (and PATCHes it as `external_session_id`). RPC calls against a\n  placeholder are skipped — \"not ready yet\".\n- The **isolated HOME** (`agy-home\u002F`) is why your real `~\u002F.gemini` is never\n  touched: the relay's `mcp_config.json` and agy's per-session state live there.\n  agy's `\u002Fmcp` panel should show `✓ omnigent` with the `sys_*` tools.\n- Env vars: `HARNESS_ANTIGRAVITY_NATIVE_BRIDGE_DIR`,\n  `HARNESS_ANTIGRAVITY_NATIVE_REQUEST_SESSION_ID`.\n\n## Targeted scenarios\n\n| Goal | How |\n|------|-----|\n| Web→TUI delivery | POST a message (Step 3); confirm it renders in the agy TUI AND mirrors to `…\u002Fitems` |\n| Native tools (shell\u002Fedit\u002Fread) | prompt agy to create→read→edit a file + run a command; confirm it touches disk |\n| Omnigent MCP relay (`sys_*`) | in the agy TUI run `\u002Fmcp` → expect `✓ omnigent`; prompt agy to `sys_session_list` \u002F spawn a sub-agent |\n| Permission elicitation | with a tool that needs approval, agy's `request-review` surfaces as an **Omnigent elicitation** (interaction bridge); answer it in the web UI and confirm the tool runs |\n| Interrupt | mid-turn, hit stop in the UI → `CancelCascadeSteps` (RUNNING cascades only; a step WAITING on an interaction is unblocked by a DENY, not cancel) |\n| Model echo | `\u002Fmodel` in the TUI, then a web turn — confirm the new model is used (latest `USER_INPUT` step's `planModel`) |\n| Resume | stop, `omnigent antigravity --server \"$SERVER\" --resume \"$CONV\"`; `--resume` (no value) opens the antigravity-native picker |\n| Concurrency \u002F leaks | drive several sessions; sweep for orphaned `agy` \u002F tmux after teardown |\n\n## Gotchas (these cost real time)\n\n1. **It's a TUI, not `omni run`.** Use `omnigent antigravity`. The executor only\n   delivers into the live agy pane — agy must be running (attached) for a turn to\n   process.\n2. **`config.yaml`'s `server:` defaults to a remote server.** Always pass\n   `--server \"$SERVER\"` (or `--server \"\"` for local). If a *local* server rejects\n   `antigravity-native`, it's stale — restart it from your checkout\n   (allowlist: `omnigent\u002Fspec\u002F_omnigent_compat.py`).\n3. **OAuth-only.** agy ignores `GEMINI_API_KEY`; if `agy models` says \"sign in\",\n   no web turn will get a real answer. Run bare `agy` once first.\n4. **tmux must be reachable from the CLI process** for the direct attach; the\n   executor's send-keys run on the runner side against the advertised socket.\n5. **Isolated HOME.** Don't expect your real `~\u002F.gemini` to change — agy runs\n   under `\u003Cbridge_dir>\u002Fagy-home`. Look there (and `~\u002F.gemini\u002Fantigravity-cli` for\n   agy's own conversation store) when debugging.\n6. **Don't double-launch agy** for a session — the runner owns the terminal (see\n   Step 2). \n7. **Turns take ~20–120s** — wrap scripted waits\u002F`timeout` generously.\n8. **Never print\u002Fecho the OAuth token.** Use the boolean\u002F`agy models` probes.\n\n## Code & tests\n\n- **Executor (write path — types into the TUI):** `omnigent\u002Finner\u002Fantigravity_native_executor.py`\n- **Harness wrap (`harness: antigravity-native`):** `omnigent\u002Finner\u002Fantigravity_native_harness.py`\n- **CLI launch \u002F daemon-runner \u002F tmux attach:** `omnigent\u002Fantigravity_native.py`\n  (`run_antigravity_native`); CLI command `antigravity(...)` in `omnigent\u002Fcli.py`\n- **agy argv \u002F auth-mode \u002F permission flag:** `omnigent\u002Fantigravity_native_launch.py`\n- **Bridge (state, tmux delivery, isolated HOME, MCP relay):** `omnigent\u002Fantigravity_native_bridge.py`\n- **connect-RPC client (port discovery, send\u002Fcancel\u002Finteraction):** `omnigent\u002Fantigravity_native_rpc.py`\n- **RPC read driver (trajectory mirror):** `omnigent\u002Fantigravity_native_reader.py`\n- **Steps \u002F interactions \u002F audit:** `omnigent\u002Fantigravity_native_steps.py`,\n  `omnigent\u002Fantigravity_native_interactions.py`, `omnigent\u002Fantigravity_native_audit.py`\n- **OAuth detection:** `omnigent\u002Fonboarding\u002Fgemini_auth.py`\n- **Design\u002Fplan docs:** `docs\u002Fantigravity-native-rpc-core-design.md`,\n  `docs\u002Fantigravity-native-rpc-core-plan.md`\n\n```bash\n.venv\u002Fbin\u002Fpython -m pytest \\\n  tests\u002Ftest_antigravity_native.py \\\n  tests\u002Ftest_antigravity_native_bridge.py \\\n  tests\u002Ftest_antigravity_native_launch.py \\\n  tests\u002Ftest_antigravity_native_rpc.py \\\n  tests\u002Ftest_antigravity_native_reader.py \\\n  tests\u002Ftest_antigravity_native_steps.py \\\n  tests\u002Ftest_antigravity_native_interactions.py \\\n  tests\u002Ftest_antigravity_native_audit.py \\\n  tests\u002Finner\u002Ftest_antigravity_native_executor.py -q\n```\n\n## Bug-bash (fan out)\n\nStress the harness against the same `$SERVER`: the web→TUI delivery path (lost \u002F\nduplicated turns, the attended-TUI paste race), the RPC read mirror (does every\nagy step reach `…\u002Fitems`? duplicates after a reader restart?), the MCP relay\n(`sys_*` reachable + gated), permission elicitations, interrupt\n(`CancelCascadeSteps`) vs. a WAITING-on-interaction step, model echo, resume, and\norphaned `agy`\u002Ftmux after teardown. Cross-check the API — a start failure can\nleave the TUI empty while the session records an error.\n\n## Watch-outs from the code (verify live)\n\n- **Placeholder until cold-start.** Before agy mints its real cascade id, bridge\n  state holds an `agy_conv_*` placeholder and RPC is skipped; a turn fired too\n  early just queues into the TUI.\n- **Permission gating is all-or-nothing + post-hoc.** agy honors only\n  `--dangerously-skip-permissions` (no firing pre-tool hook), so a headless launch\n  auto-bypasses and the genuine Omnigent gate is the elicitation + post-hoc audit\n  (`antigravity_native_audit`), not a per-tool pre-empt.\n- **Stale module header.** `antigravity_native.py`'s top docstring says web turns\n  go over `SendUserCascadeMessage` RPC — the live executor types into the TUI\n  instead (#1156\u002F#1158). Trust `antigravity_native_executor.py`.\n\n## Teardown — non-negotiable\n\nA pexpect Ctrl-C **detaches** from tmux; the runner, tmux server, and `agy` keep\nrunning. Tear down the process tree from the child PID (`ps --ppid …` →\nSIGTERM\u002FSIGKILL) and separately `tmux -S \u003Csock> kill-server`. Then verify:\n\n```bash\n.venv\u002Fbin\u002Fomni server stop                 # stop the managed server + local daemon\npgrep -af \"(^|\u002F)agy( |$)|harnesses\\._runner|runner\\._entry|tmux\"   # confirm no orphans\n# clean a session's bridge dir (incl. its isolated agy HOME) if you want a reset:\n# rm -rf \"$(.venv\u002Fbin\u002Fpython -c \"from omnigent.antigravity_native_bridge import bridge_dir_for_bridge_id as d; print(d('$CONV'))\")\"\n```\n\n## Honesty\n\nIf you can't reach a ready agy TUI (missing `agy`, not signed in, no `tmux`,\nheadless limits, no egress), say so — don't claim a turn passed. The strongest\nevidence is the round trip observed over the API: your `user` message **and** a\nnon-empty `assistant` reply mirrored into `GET \u002Fv1\u002Fsessions\u002F$CONV\u002Fitems`, plus the\nturn rendering in the attached agy TUI.\n","# Antigravity native harness: end-to-end dev & testing (local server\u002Frunner)\n\nThe `antigravity-native` harness wraps the **real Antigravity `agy` TUI** (the\n`agy` CLI, installed from `antigravity.google\u002Fcli\u002Finstall.sh`). `omnigent\nantigravity` ensures a host daemon, the daemon-spawned **runner** launches `agy`\nin a runner-owned **tmux** terminal, and your TTY attaches to it. This is **not**\nthe in-process `antigravity` Gemini-SDK harness — that one runs `google-antigravity`\nwith a Gemini *API key*; this one drives the OAuth-only `agy` CLI and mirrors it\nover **connect-RPC**. This skill is the proven recipe for running it **for real\nagainst a live local server + runner** — not just the unit tests.\n\n> Like the other native harnesses, the runner imports from your **current\n> checkout**, so testing here exercises exactly the code you're on. (CWD\u002Fvenv\n> selects the code, not `PYTHONPATH`.)\n\n## What actually runs where\n\n```\nyour TTY ── (attach \u002F pexpect) ──► omnigent antigravity (CLI, local)\n                                        │ ensures\n                                        ▼\n                                  host daemon ──► local Omnigent server (AP)\n                                        │ spawns                      ▲\n                                        ▼                  connect-RPC │ HTTP\n                                  runner ── launches ──► agy (TUI, in tmux)\n                                        │                              │\n                                        ├── write path: type web turns into the TUI\n                                        │   (tmux bracketed paste → real USER_INPUT step)\n                                        └── read path: RPC read driver mirrors agy's\n                                            trajectory steps back into the session\n```\n\nThree transports, easy to confuse:\n\n1. **Write path = typing into the TUI.** Every web\u002Fmobile turn is *typed* into the\n   agy pane via tmux (`inject_user_message_via_tui`), creating a real\n   `CORTEX_STEP_TYPE_USER_INPUT` step on the **same** cascade the TUI shows\n   (#1156\u002F#1158). It is **not** delivered over `SendUserCascadeMessage` (that\n   headless RPC path was retired; the `antigravity_native.py` module header still\n   says \"delivered via the RPC\" — that's stale doc-lag, the executor is authoritative).\n2. **Read path = RPC.** `antigravity_native_reader` polls\u002Fstreams agy's connect-RPC\n   trajectory steps and mirrors them into the Omnigent session.\n3. **Control = RPC.** Interrupt is `CancelCascadeSteps`; a tool\u002Fpermission prompt\n   is answered via `HandleCascadeUserInteraction` (surfaced as an Omnigent\n   elicitation).\n\n## Prerequisites (check these first)\n\n1. **You're on the branch you want to test**, running from that checkout\n   (`.venv\u002Fbin\u002Fomnigent` \u002F `.venv\u002Fbin\u002Fpython` from this repo).\n2. **The `agy` CLI is on PATH** (or at `~\u002F.local\u002Fbin\u002Fagy`) — the harness can't\n   launch without it:\n   ```bash\n   which agy || ls -l ~\u002F.local\u002Fbin\u002Fagy\n   agy --version\n   # install if missing (shell installer, NOT npm):\n   #   curl -fsSL https:\u002F\u002Fantigravity.google\u002Fcli\u002Finstall.sh | bash   # then restart shell\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.harness_readiness import harness_is_configured; print('antigravity-native ready:', harness_is_configured('antigravity-native'))\"\n   ```\n3. **`agy` is signed in (OAuth).** agy is **OAuth-only** — it has no `agy login`;\n   you authenticate by running bare `agy` once and completing the browser sign-in.\n   It **ignores `GEMINI_API_KEY`** (API-key auth belongs to the separate\n   `antigravity` SDK harness). Verify (no secrets printed):\n   ```bash\n   .venv\u002Fbin\u002Fpython -c \"from omnigent.onboarding.gemini_auth import gemini_login_detected; print('agy oauth token present:', gemini_login_detected())\"\n   agy models   # exits 0 and lists models only when signed in; else 'Please sign in'\n   ```\n   `False` \u002F non-zero → run `agy` once and sign in. agy's token lives under\n   `~\u002F.gemini` (`oauth_creds.json` on macOS through 1.0.10,\n   `antigravity-cli\u002Fantigravity-oauth-token` on Linux); agy 1.1.7+ on macOS\n   writes no token file and keeps the credential in the Keychain, which is why\n   `gemini_login_detected()` falls back to `agy models` there.\n4. **`tmux` is on PATH.** The agy terminal is a runner-owned tmux pane; the CLI\n   attaches to it and the executor drives it via `tmux send-keys`\n   (`_preflight_local_tools` hard-fails without tmux).\n5. **Network egress to Google's Antigravity backend.** A turn that hangs \u002F fails\n   to connect on a locked-down host is usually egress, not a harness bug.\n\n> No `node` and no provider\u002Fgateway config are needed here (unlike pi\u002Fcursor\n> native): agy is a self-hosted binary and auth is the inherited Google OAuth.\n\n## Step 1 — start a local server (real server + runner)\n\n```bash\ncd \u002Fpath\u002Fto\u002Fomnigent\n.venv\u002Fbin\u002Fomni server --background          # detached managed server on a free loopback port\n.venv\u002Fbin\u002Fomni server status         # prints the URL, e.g. http:\u002F\u002F127.0.0.1:6767\nSERVER=http:\u002F\u002F127.0.0.1:6767         # use the printed URL below\ncurl -s \"$SERVER\u002Fhealth\"             # {\"status\":\"ok\"}\n```\n\n(`omnigent antigravity --server \"\"` also auto-spawns a persistent local server and\nuses it — handy for a one-shot manual run, but a known `$SERVER` URL is better for\nscripted API observation below.)\n\n## Step 2 — launch the agy terminal against the local server\n\n`omnigent antigravity` **attaches an interactive TUI**, so run it where you can\nhold it open. Two patterns:\n\n**A. Background terminal (recommended for scripted drives).** Launch in one\nterminal, drive\u002Fobserve from another:\n\n```bash\n.venv\u002Fbin\u002Fomnigent antigravity --server \"$SERVER\" 2>&1   # attaches the agy TUI; leave it running\n# add a model:  --model gemini-2.5-pro   ;   pass-through agy args go at the end\n```\n\nIt prints `Web UI: \u003Curl>` and a resume hint to stderr — grab the conversation id\n(the `…\u002Fc\u002F\u003Cconv_…>` segment) for the API calls below:\n\n```bash\nCONV=conv_xxxxxxxx   # from the \"Web UI:\" line \u002F resume hint\n```\n\n**B. PTY driver (fully automated).** Drive it under `pexpect` like the\n`claude-native-e2e-test` skill's `cuj_driver.py`: spawn `omnigent antigravity\n--server \u003Curl>` in a PTY with `cwd=\u003Ccheckout>`, capture the conv id from the\nprinted URL, then drive\u002Fpoll the API, then **tear down the whole process tree**\n(see Teardown — a pexpect Ctrl-C only *detaches* tmux).\n\n> The runner **owns** the agy terminal: binding a runner auto-creates the\n> antigravity terminal for the session, and the CLI *reattaches* rather than\n> launching its own. Don't hand-launch a second `agy` against the same session —\n> a double launch 500s and clobbers the runner's bridge state (web-turn injection\n> then fails \"bridge state is missing\").\n\n## Step 3 — drive a turn (and smoke-test)\n\n**Via the web path (exercises `AntigravityNativeExecutor`).** Post a user message\nto the running session; the runner routes it to the harness, whose `_deliver`\ntypes it into the agy TUI (real `USER_INPUT` step):\n\n```bash\ncurl -s -X POST \"$SERVER\u002Fv1\u002Fsessions\u002F$CONV\u002Fevents\" \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\"type\":\"message\",\"data\":{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Reply with exactly the single word: PONG\"}]}}'\n```\n\nThen **observe** the mirrored transcript (the RPC read driver posts agy's steps\nback):\n\n```bash\nsleep 25\ncurl -s \"$SERVER\u002Fv1\u002Fsessions\u002F$CONV\u002Fitems\" | python -m json.tool | tail -40\n```\n\nA healthy run shows your `user` message **and** a non-empty `assistant` reply\n(`PONG`) mirrored into the session — proving the full stack: server → runner →\nexecutor → tmux paste → agy turn → connect-RPC read driver → transcript mirror.\nYou'll also see the prompt + reply render in the attached agy TUI (parity is the\nwhole point of the TUI-typing write path).\n\n- **Type-driven smoke:** instead of the POST, type a prompt directly in the\n  attached agy TUI and confirm it answers + mirrors to `…\u002Fitems`.\n- **Model:** select a model with agy's TUI `\u002Fmodel`; the next web turn echoes that\n  choice (the executor reads it from the latest `USER_INPUT` step).\n\n## Inspect the bridge (debugging)\n\nPer-session bridge state lives under a hashed dir (keyed by *bridge id*, which\ndefaults to the Omnigent conversation id):\n\n```bash\n.venv\u002Fbin\u002Fpython -c \"from omnigent.antigravity_native_bridge import bridge_dir_for_bridge_id as d; print(d('$CONV'))\"\n# ~\u002F.omnigent\u002Fantigravity-native\u002F\u003Csha256(bridge_id)[:32]>\u002F\n#   state.json     \u003C- {session_id, conversation_id (agy's real UUID once minted), active_turn_id}\n#   tmux.json      \u003C- {socket_path, tmux_target} the executor types into (send-keys)\n#   bridge.json    \u003C- token for the Omnigent MCP relay (sys_* tools)\n#   agy-home\u002F.gemini\u002F...  \u003C- per-session ISOLATED HOME: a COPY of your OAuth token\n#                            + onboarding markers + config\u002Fmcp_config.json (relay)\n```\n\nKey facts:\n- agy mints its **own** UUID cascade; a fresh launch seeds an `agy_conv_*`\n  **placeholder** until cold-start `StartCascade`s the real id and writes it to\n  `state.json` (and PATCHes it as `external_session_id`). RPC calls against a\n  placeholder are skipped — \"not ready yet\".\n- The **isolated HOME** (`agy-home\u002F`) is why your real `~\u002F.gemini` is never\n  touched: the relay's `mcp_config.json` and agy's per-session state live there.\n  agy's `\u002Fmcp` panel should show `✓ omnigent` with the `sys_*` tools.\n- Env vars: `HARNESS_ANTIGRAVITY_NATIVE_BRIDGE_DIR`,\n  `HARNESS_ANTIGRAVITY_NATIVE_REQUEST_SESSION_ID`.\n\n## Targeted scenarios\n\n| Goal | How |\n|------|-----|\n| Web→TUI delivery | POST a message (Step 3); confirm it renders in the agy TUI AND mirrors to `…\u002Fitems` |\n| Native tools (shell\u002Fedit\u002Fread) | prompt agy to create→read→edit a file + run a command; confirm it touches disk |\n| Omnigent MCP relay (`sys_*`) | in the agy TUI run `\u002Fmcp` → expect `✓ omnigent`; prompt agy to `sys_session_list` \u002F spawn a sub-agent |\n| Permission elicitation | with a tool that needs approval, agy's `request-review` surfaces as an **Omnigent elicitation** (interaction bridge); answer it in the web UI and confirm the tool runs |\n| Interrupt | mid-turn, hit stop in the UI → `CancelCascadeSteps` (RUNNING cascades only; a step WAITING on an interaction is unblocked by a DENY, not cancel) |\n| Model echo | `\u002Fmodel` in the TUI, then a web turn — confirm the new model is used (latest `USER_INPUT` step's `planModel`) |\n| Resume | stop, `omnigent antigravity --server \"$SERVER\" --resume \"$CONV\"`; `--resume` (no value) opens the antigravity-native picker |\n| Concurrency \u002F leaks | drive several sessions; sweep for orphaned `agy` \u002F tmux after teardown |\n\n## Gotchas (these cost real time)\n\n1. **It's a TUI, not `omni run`.** Use `omnigent antigravity`. The executor only\n   delivers into the live agy pane — agy must be running (attached) for a turn to\n   process.\n2. **`config.yaml`'s `server:` defaults to a remote server.** Always pass\n   `--server \"$SERVER\"` (or `--server \"\"` for local). If a *local* server rejects\n   `antigravity-native`, it's stale — restart it from your checkout\n   (allowlist: `omnigent\u002Fspec\u002F_omnigent_compat.py`).\n3. **OAuth-only.** agy ignores `GEMINI_API_KEY`; if `agy models` says \"sign in\",\n   no web turn will get a real answer. Run bare `agy` once first.\n4. **tmux must be reachable from the CLI process** for the direct attach; the\n   executor's send-keys run on the runner side against the advertised socket.\n5. **Isolated HOME.** Don't expect your real `~\u002F.gemini` to change — agy runs\n   under `\u003Cbridge_dir>\u002Fagy-home`. Look there (and `~\u002F.gemini\u002Fantigravity-cli` for\n   agy's own conversation store) when debugging.\n6. **Don't double-launch agy** for a session — the runner owns the terminal (see\n   Step 2). \n7. **Turns take ~20–120s** — wrap scripted waits\u002F`timeout` generously.\n8. **Never print\u002Fecho the OAuth token.** Use the boolean\u002F`agy models` probes.\n\n## Code & tests\n\n- **Executor (write path — types into the TUI):** `omnigent\u002Finner\u002Fantigravity_native_executor.py`\n- **Harness wrap (`harness: antigravity-native`):** `omnigent\u002Finner\u002Fantigravity_native_harness.py`\n- **CLI launch \u002F daemon-runner \u002F tmux attach:** `omnigent\u002Fantigravity_native.py`\n  (`run_antigravity_native`); CLI command `antigravity(...)` in `omnigent\u002Fcli.py`\n- **agy argv \u002F auth-mode \u002F permission flag:** `omnigent\u002Fantigravity_native_launch.py`\n- **Bridge (state, tmux delivery, isolated HOME, MCP relay):** `omnigent\u002Fantigravity_native_bridge.py`\n- **connect-RPC client (port discovery, send\u002Fcancel\u002Finteraction):** `omnigent\u002Fantigravity_native_rpc.py`\n- **RPC read driver (trajectory mirror):** `omnigent\u002Fantigravity_native_reader.py`\n- **Steps \u002F interactions \u002F audit:** `omnigent\u002Fantigravity_native_steps.py`,\n  `omnigent\u002Fantigravity_native_interactions.py`, `omnigent\u002Fantigravity_native_audit.py`\n- **OAuth detection:** `omnigent\u002Fonboarding\u002Fgemini_auth.py`\n- **Design\u002Fplan docs:** `docs\u002Fantigravity-native-rpc-core-design.md`,\n  `docs\u002Fantigravity-native-rpc-core-plan.md`\n\n```bash\n.venv\u002Fbin\u002Fpython -m pytest \\\n  tests\u002Ftest_antigravity_native.py \\\n  tests\u002Ftest_antigravity_native_bridge.py \\\n  tests\u002Ftest_antigravity_native_launch.py \\\n  tests\u002Ftest_antigravity_native_rpc.py \\\n  tests\u002Ftest_antigravity_native_reader.py \\\n  tests\u002Ftest_antigravity_native_steps.py \\\n  tests\u002Ftest_antigravity_native_interactions.py \\\n  tests\u002Ftest_antigravity_native_audit.py \\\n  tests\u002Finner\u002Ftest_antigravity_native_executor.py -q\n```\n\n## Bug-bash (fan out)\n\nStress the harness against the same `$SERVER`: the web→TUI delivery path (lost \u002F\nduplicated turns, the attended-TUI paste race), the RPC read mirror (does every\nagy step reach `…\u002Fitems`? duplicates after a reader restart?), the MCP relay\n(`sys_*` reachable + gated), permission elicitations, interrupt\n(`CancelCascadeSteps`) vs. a WAITING-on-interaction step, model echo, resume, and\norphaned `agy`\u002Ftmux after teardown. Cross-check the API — a start failure can\nleave the TUI empty while the session records an error.\n\n## Watch-outs from the code (verify live)\n\n- **Placeholder until cold-start.** Before agy mints its real cascade id, bridge\n  state holds an `agy_conv_*` placeholder and RPC is skipped; a turn fired too\n  early just queues into the TUI.\n- **Permission gating is all-or-nothing + post-hoc.** agy honors only\n  `--dangerously-skip-permissions` (no firing pre-tool hook), so a headless launch\n  auto-bypasses and the genuine Omnigent gate is the elicitation + post-hoc audit\n  (`antigravity_native_audit`), not a per-tool pre-empt.\n- **Stale module header.** `antigravity_native.py`'s top docstring says web turns\n  go over `SendUserCascadeMessage` RPC — the live executor types into the TUI\n  instead (#1156\u002F#1158). Trust `antigravity_native_executor.py`.\n\n## Teardown — non-negotiable\n\nA pexpect Ctrl-C **detaches** from tmux; the runner, tmux server, and `agy` keep\nrunning. Tear down the process tree from the child PID (`ps --ppid …` →\nSIGTERM\u002FSIGKILL) and separately `tmux -S \u003Csock> kill-server`. Then verify:\n\n```bash\n.venv\u002Fbin\u002Fomni server stop                 # stop the managed server + local daemon\npgrep -af \"(^|\u002F)agy( |$)|harnesses\\._runner|runner\\._entry|tmux\"   # confirm no orphans\n# clean a session's bridge dir (incl. its isolated agy HOME) if you want a reset:\n# rm -rf \"$(.venv\u002Fbin\u002Fpython -c \"from omnigent.antigravity_native_bridge import bridge_dir_for_bridge_id as d; print(d('$CONV'))\")\"\n```\n\n## Honesty\n\nIf you can't reach a ready agy TUI (missing `agy`, not signed in, no `tmux`,\nheadless limits, no egress), say so — don't claim a turn passed. The strongest\nevidence is the round trip observed over the API: your `user` message **and** a\nnon-empty `assistant` reply mirrored into `GET \u002Fv1\u002Fsessions\u002F$CONV\u002Fitems`, plus the\nturn rendering in the attached agy TUI.\n",{"name":5,"description":7},"deploy\u002Froland-id-au-omniagent","83ee3dcd78468bbe3baf4bb264a0c99a53aa0fec",".claude\u002Fskills\u002Fantigravity-native-e2e-dev","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent","https:\u002F\u002Fgithub.com\u002Froland-id-au","2026-09-16 03:15:34",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add roland-id-au\u002Fomniagent --skill antigravity-native-e2e-dev",{"tool":36,"command":37},"bunx","bunx skills add roland-id-au\u002Fomniagent --skill antigravity-native-e2e-dev",{"tool":39,"command":40},"pnpm","pnpm dlx skills add roland-id-au\u002Fomniagent --skill antigravity-native-e2e-dev","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002F.claude\u002Fskills\u002Fantigravity-native-e2e-dev\u002FSKILL.md",true,[],[45,52,59,66,71,76],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7CTDVNPM78AJ051GVDB44X5","deep-research","Research checklist and source-quality guidance for the archer e2e fixture.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fexamples\u002Farcher\u002Fskills\u002Fdeep-research\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7CTDS8SPN8P5GK1Q4SCSY7K","pi-e2e-xyz-greet-c4a8d5","Test greeter — pi skills e2e. The unique suffix c4a8d5 appears in the skill name so a string match in the agent's output proves Pi loaded this skill.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_none\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7CTDP4R9F06966W78WNZS2Y","pi-e2e-xyz-count-d2f6e1","Test counter — pi skills e2e. The unique suffix d2f6e1 appears in the skill name so a string match in the agent's output proves Pi loaded this skill.","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_none\u002Fskills\u002Fpi-e2e-xyz-count-d2f6e1\u002FSKILL.md",[],[],{"skillNo":67,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CTDKP4W1Q18ZCY0XANDSEG","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_list\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[],{"skillNo":72,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTDFBMA3EBZNV7J380THGP","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_list\u002Fskills\u002Fpi-e2e-xyz-count-d2f6e1\u002FSKILL.md",[],[],{"skillNo":77,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7CTDCVTXTG72BKEV2HY7M6W","https:\u002F\u002Fgithub.com\u002Froland-id-au\u002Fomniagent\u002Fblob\u002Fdeploy\u002Froland-id-au-omniagent\u002Fwork\u002Fomnigent-main\u002Ftests\u002Fresources\u002Fagents\u002Fpi_skills_all\u002Fskills\u002Fpi-e2e-xyz-greet-c4a8d5\u002FSKILL.md",[],[]]