← Commit history

antigravity-account skill: sign-in on local and remote boxes, quota and token usage, panel automation (0.1.10)

John Lauer ·cf64315691 ·6d ago ·parent 582ce8e
4 files changed +52−2
package.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Google Antigravity",   "brief": "Google Antigravity in Adom Hydrogen: the editor extension, the agy CLI and a dock dashboard that installs both into your container.",-  "version": "0.1.9",+  "version": "0.1.10",   "description": "Try Google Antigravity inside your Adom workspace. The dock dashboard installs the Google Antigravity VS Code extension into Hydrogen's editor and the agy command line into your WSL2 or Lima container, opens the panel, and reports what is installed and signed in.",   "org": "adom",   "needs_sudo": false,
page.json+1−1
@@ -4,7 +4,7 @@   "type": "app",   "title": "Google Antigravity",   "brief": "Google Antigravity in Adom Hydrogen: the editor extension, the agy CLI and a dock dashboard that installs both into your container.",-  "version": "0.1.9",+  "version": "0.1.10",   "hero": {     "type": "image",     "path": "screenshots/hero.png"
skills/antigravity-account/SKILL.mdadded+49
@@ -0,0 +1,49 @@+---+name: antigravity-account+description: >+  Sign Google Antigravity in and out inside Hydrogen, on this machine or a remote one; read its plan and quota (Models & Usage: weekly and five-hour limits) and per-call token usage; and drive the side-bar chat from scripts (find the hub frame, paste a prompt, send, approve permission prompts, unstick queued messages). Read before any sign-in, account switch, quota or cost question, or automation of the Antigravity panel. Trigger words: antigravity sign in, antigravity log in, antigravity login, sign out of antigravity, switch antigravity account, antigravity account, continue with google antigravity, antigravity quota, antigravity usage, weekly limit, five hour limit, antigravity cost, antigravity tokens, how much of my plan, drive antigravity chat, antigravity panel automation, antigravity queued message, send now.+---++# Antigravity account, quota and panel automation++The `antigravity` skill installs and opens Antigravity. This one covers who is signed in, what it costs, and how to drive the chat panel from a script. Everything was measured on Hydrogen 1.0.6xx with the `Google.google-antigravity` extension.++## Where things are++| thing | where |+|---|---|+| chat panel (the "hub") | an iframe whose URL contains `extensionView=true`: `http://<port>.localhost:<proxy>/c/<conversationId>?extensionView=true...` |+| settings | the panel's **Settings** link opens an editor tab whose frame URL contains `settings-standalone` |+| account | Settings, bottom left: name, email, **Sign Out** |+| plan and quota | Settings, **Models**: "Models & Usage": plan, AI-credit overage toggle, **Weekly Limit Remaining %** and **Five Hour Limit Remaining %**, per model family (Gemini; Claude and GPT) |+| conversations | `~/.gemini/antigravity/conversations/<conversationId>.db` (SQLite) |++Reach the frames with Hydrogen's control API: `POST /eval-in {target: "extensionView=true", js}` for the chat, `{target: "settings-standalone"}` for settings, `{target: "workbench"}` for the editor itself. `GET /targets` lists them.++## Sign out and sign in++1. Sign out: open Settings, click **Sign Out**. The panel returns to "Welcome to Antigravity" with **Continue with Google**.+2. Sign in: click **Continue with Google**. Antigravity opens Google's consent URL through Hydrogen, which hands it to the machine's browser picker (Hydrogen menu, **Browser Picker Manager**). The URL's `redirect_uri` is `http://localhost:<port>/auth/callback` inside the container.+3. Same machine, the right account already in that browser: pick the account, confirm **Sign in**, done; the callback reaches the container over WSL/Lima localhost forwarding.+4. **Remote or shared machine (someone else's desktop):** the picker may open that person's own browser profile, which lists their personal accounts and not the team account. Do not add an account to someone else's browser and do not film it. Instead:+   - read the live consent URL from the container: `grep -rhoa "https://accounts.google.com/o/oauth2/auth?[^\" ]*localhost%3A[0-9]*%2Fauth%2Fcallback[^\" ]*" ~/.local/share/code-server/logs ~/.gemini | tail -1` (check its `code_challenge` matches the tab that opened);+   - on YOUR desktop, start a one-shot localhost listener on that port (PowerShell `TcpListener` on `127.0.0.1:<port>` that writes the first request line to a file and answers 200);+   - open the URL in pup, pick the account, confirm **Sign in**; the redirect lands on your listener;+   - replay the captured path inside the remote container: `curl "http://localhost:<port><path>"`. A 302 to `https://antigravity.google/auth-success` means signed in; the panel reloads into the last conversation.+   - The callback is one-shot: never probe it with curl before delivering the real code. A new Google account may first demand a phone verification on its first Antigravity sign-in.++## Quota and cost++Antigravity on a Google AI plan (Pro, Ultra) is not billed per token: usage draws down **plan quota**, shown only as **Weekly Limit Remaining** and **Five Hour Limit Remaining** percentages in Settings, Models. There is no history: the page shows the value now, nothing about past runs. To know what a job costs, read both percentages right before and right after it (and every few hours on long jobs, since the five-hour window refills) and report the drop. "Included in the plan" is not a cost answer.++Per-call token usage IS recorded locally. Each conversation DB has a `gen_metadata` table, one protobuf row per model call. Field 1.4 is the usage record; as decoded on 2026-10-16 (undocumented, consistent across thousands of calls): 1.4.1 = model id, 1.4.2 = fresh input tokens, 1.4.3 = output tokens, 1.4.5 = cached input tokens. Field 1.19 is the model name (for example `gemini-4-argon`). Sum them per conversation for a job's token count.++## Drive the chat from a script++- **Send a prompt:** the input is a Lexical editor. Focus the last `[contenteditable=true]`, dispatch a `paste` `ClipboardEvent` with a `DataTransfer` holding the text, then a `keydown` Enter. Synthetic paste leaves the send button disabled, so Enter is the way.+- **Queued messages:** a message sent while the agent is working goes to "Queued Messages" and normally sends when the turn ends. After an editor reload or a Hydrogen restart it can stay stuck there forever: if the agent is idle and the queue is not empty, click the **Send Now** button.+- **Permission prompts:** "Waiting for user input" with options as `<p>` inside `<label>`s. Click the label of "Yes, and always allow in this project", then the button whose text starts with `Submit` (it carries a "↵" hint, so match the prefix). Or set Settings, General, Permission Preset to Auto.+- **The side bar loses Antigravity** when the agent opens or reveals a file (it switches to Explorer); click the activity-bar item labelled `Antigravity` to bring it back. Its width resets to about 170 px after reloads; drag the `.monaco-sash.vertical` at the side bar's right edge with mouse events to widen it.+- **Hydrogen auto-updates** restart the window, kill the agent's turn, and sometimes leave the hub down until an editor reload (`location.reload()` in the `workbench` frame, or `adom-antigravity open`). After it, reopen the conversation from the panel's list and tell the agent to continue.+- `POST /eval-in` returns after about 5 s; for anything longer, start it without awaiting (requestAnimationFrame or setTimeout) and poll a flag.+- Old messages are virtualised: scroll the conversation's scroll container up until the message you need is in the DOM.
skills/antigravity/SKILL.md+1
@@ -30,6 +30,7 @@ Dashboard routes: `GET /api/status`, `POST /api/install-extension`, `POST /api/i - The side-bar panel is an iframe of the hub (`agy --hub --hub-port=N`) through the editor's port proxy. It renders when the editor hands out `<port>.localhost:<proxy port>` URLs, served by Hydrogen's own reverse proxy (Hydrogen 1.0.224+; `adom-antigravity status` reports `proxy.mode: subdomain`, `panelWorks: true`). Under a PATH proxy (`/proxy/<port>/`: older Hydrogen, Web Hydrogen) the hub's absolute asset paths 404 and the panel is blank; then `POST /api/open` answers `{surface:"hub", url}` and the dashboard navigates its own tab to the hub. Never iframe the hub yourself: Google sign-in refuses to run inside a frame. - Antigravity is a SIDE BAR panel (its own activity-bar icon), not an editor tab. `antigravity.panel.focus` shows it; `antigravity.startNewConversation` (Ctrl+Shift+L) starts a chat; `antigravity.insertSnippet` (Ctrl+L) adds the selection. - A fresh extension install needs one editor reload before the panel exists.+- Sign-in, sign-out, the weekly and five-hour quota, per-call token usage, and driving the chat panel from scripts are in the companion skill `antigravity-account` (read it before any login, cost or panel-automation work). - The extension signs in with Google inside its panel. The CLI tries to open a browser; in a container it prints the link. Headless: `GEMINI_API_KEY` plus `"modelProvider": "gemini"` in `~/.gemini/antigravity-cli/settings.json`. - `agy` self-updates in the background; the installer refuses to overwrite an existing binary (delete it first for a clean reinstall). - Everything is the same on Windows (WSL2 Adom-Workspace) and macOS (Lima): Linux binaries and code-server either way.