app
Google Antigravity
Public Made by Adomby adom
Google Antigravity in Adom Hydrogen: the editor extension, the agy CLI and a dock dashboard that installs both into your container.
← Commit history
antigravity 0.1.2: the side-bar panel is the primary surface again (Hydrogen 1.0.223 serves ports as <port>.localhost); the hub-as-tab stays the fallback under a path proxy
5 files changed
+42−15
README.md+3−1@@ -26,7 +26,9 @@ adom-antigravity serve --print-url # the dashboard (what a dock click runs) ## Where Antigravity shows up -The extension starts Antigravity's own web UI (a local "hub") inside the container. Under Hydrogen's code-server the extension's side-bar panel renders empty, so the dashboard's **Open Antigravity** turns the dashboard tab into that UI instead; click the dock card again to return. The CLI `agy` works in a terminal tab as usual.+The extension starts Antigravity's own web UI (a local "hub") inside the container and frames it in the editor's side bar. That frame needs the editor to hand out forwarded ports as `http://<port>.localhost:7380/` (Hydrogen 1.0.223 and later do: code-server's subdomain proxy plus a `Host: localhost` rewrite, because the hub's page uses absolute asset paths and refuses non-localhost hosts). On an older Hydrogen or on Web Hydrogen, which path-proxy ports as `/proxy/<port>/`, the panel is blank; there the dashboard's **Open Antigravity** turns the dashboard tab into that UI instead. The CLI `agy` works in a terminal tab everywhere.++For Google: a `<base href>` on the hub page, or relative asset paths, would make the panel work behind any path proxy. 
adom_antigravity.py+31−7@@ -21,7 +21,7 @@ from pathlib import Path from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer ROOT = Path(__file__).resolve().parent-VERSION = '0.1.1'+VERSION = '0.1.2' EXT_ID = 'Google.google-antigravity' CLI_INSTALL = 'https://antigravity.google/cli/install.sh' EXT_DIRS = [Path.home() / '.local/share/code-server/extensions', Path.home() / '.vscode-server/extensions']@@ -105,6 +105,30 @@ def hub_state(): return {'port': port, 'url': f'http://127.0.0.1:{port}/' if port else None, 'up': up} +def proxy_mode():+ """How code-server hands ports to webviews: 'subdomain' (http://<port>.localhost:7380/,+ Hydrogen 1.0.223+, the side-bar panel renders) or 'path' (/proxy/<port>/, the panel is+ blank because the hub's assets sit at absolute paths). Read from the extension host env."""+ try:+ for d in Path('/proc').iterdir():+ if not d.name.isdigit():+ continue+ try:+ cmd = (d / 'cmdline').read_bytes()+ except Exception:+ continue+ if b'extensionHost' not in cmd:+ continue+ env = (d / 'environ').read_bytes().split(b'\0')+ for e in env:+ if e.startswith(b'VSCODE_PROXY_URI='):+ v = e.split(b'=', 1)[1].decode()+ return {'uri': v, 'mode': 'subdomain' if '{{port}}.' in v else 'path'}+ except Exception:+ pass+ return {'uri': None, 'mode': 'unknown'}++ def editor_state(): for port in (8821, 8822, 8823): try:@@ -117,11 +141,11 @@ def editor_state(): def context():- ext, cli, ed, hub = extension_state(), cli_state(), editor_state(), hub_state()+ ext, cli, ed, hub, pm = extension_state(), cli_state(), editor_state(), hub_state(), proxy_mode() ready = ext['installed'] and cli['installed'] return {'app': 'adom/antigravity', 'version': VERSION, 'runtime': runtime(), 'container': {'system': platform.system(), 'kernel': platform.release(), 'hostname': platform.node(), 'arch': platform.machine()},- 'extension': ext, 'cli': cli, 'editor': ed, 'hub': hub, 'ready': ready,+ 'extension': ext, 'cli': cli, 'editor': ed, 'hub': hub, 'proxy': pm, 'panelWorks': pm['mode'] == 'subdomain', 'ready': ready, 'tools': {n: shutil.which(n) for n in ['code-server', 'adom-vscode', 'adom-wiki', 'adom-bridge', 'agy']}, '_hint': 'extension.installed = the Google Antigravity VS Code extension is in code-server (reload the editor after a fresh install); cli.installed = agy is on PATH. POST /api/install-extension, /api/install-cli, /api/open, /api/reload-editor drive the same steps the dashboard buttons do.'} @@ -160,11 +184,11 @@ def open_panel(new_conversation=False): if not extension_state()['installed']: return {'ok': False, 'error': 'the Antigravity extension is not installed yet', 'next': 'POST /api/install-extension, then reload the editor'} hub = hub_state()- if hub['up']:- # The hub is Antigravity's real UI; the dashboard tab navigates to it (top-level, so- # Google sign-in works; it refuses to run inside a frame).+ if hub['up'] and proxy_mode()['mode'] != 'subdomain':+ # code-server is still path-proxying ports (Hydrogen before 1.0.223, or Web Hydrogen):+ # the side-bar panel is blank there, so the dashboard tab navigates to the hub itself. return {'ok': True, 'surface': 'hub', 'url': hub['url'], 'hub': hub,- 'note': 'Antigravity\'s own web UI, served by the extension\'s hub inside the container. Open it as a Hydrogen tab (the dashboard navigates there); the extension\'s side-bar panel renders empty under code-server.'}+ 'note': 'Antigravity\'s own web UI, served by the extension\'s hub inside the container, opened as a Hydrogen tab because this editor path-proxies ports and the side-bar panel is blank there.'} r = vscode_command('antigravity.startNewConversation' if new_conversation else 'antigravity.panel.focus') if not r.get('ok') and new_conversation: r = vscode_command('antigravity.panel.focus')
dashboard/index.html+6−5@@ -27,9 +27,9 @@ dialog{width:min(900px,95vw);background:var(--surface);color:var(--text);border: <section class="card"><h2>2. The command line</h2><p>The <code>agy</code> CLI runs Antigravity's agent in a terminal, the way Claude and Codex have their TUIs.</p> <div class="row"><button class="primary" id="install-cli">Install the CLI</button><button id="tui">Open an Antigravity terminal</button></div> <div class="hint" id="cli-hint">Official installer into ~/.local/bin/agy. First run: <code>agy</code> prints a Google sign-in link when it cannot open a browser. Headless: set <code>GEMINI_API_KEY</code> and <code>modelProvider: gemini</code> in ~/.gemini/antigravity-cli/settings.json.</div></section>- <section class="card"><h2>3. Use it</h2><p>Open Antigravity right here: this tab becomes Antigravity's own UI (sign in with Google the first time). Click the dock card again to come back to this dashboard.</p>- <div class="row"><button class="primary" id="open">Open Antigravity</button><button id="open-new">Side-bar panel</button></div>- <div class="hint" id="open-hint">The editor's side-bar panel for Antigravity renders empty under Hydrogen's code-server today, so the dashboard opens the same UI as a tab instead. The launch bar's Antigravity icon focuses the panel; its TUI entry runs agy.</div></section>+ <section class="card"><h2>3. Use it</h2><p>Open the Antigravity side bar in your editor (its own icon on the activity bar) and sign in with Google the first time. The AI launch bar's Antigravity icon does the same; its TUI entry runs <code>agy</code>.</p>+ <div class="row"><button class="primary" id="open">Open Antigravity</button><button id="open-new">New conversation</button></div>+ <div class="hint" id="open-hint">Needs Hydrogen 1.0.223 or later, which serves forwarded ports the way this panel expects. On an older Hydrogen or on Web Hydrogen the panel is blank, and this button opens Antigravity's UI as a tab instead.</div></section> <section class="card"><h2>What it is</h2><p>An agent that plans, writes and verifies across your files and a browser, with its own workflows and artifacts. Free tier from Google; the extension and CLI both need a Google sign-in.</p> <div class="row"><a href="https://antigravity.google/docs" target="_blank">Antigravity docs</a><a href="https://antigravity.google/docs/cli/install/" target="_blank">CLI install and auth</a><a href="https://open-vsx.org/extension/Google/google-antigravity" target="_blank">The extension on Open VSX</a></div></section> </div>@@ -46,7 +46,8 @@ function render(s){$('#machine').textContent=(s.runtime==='wsl2'?'WSL2':s.runtim led('#led-cli',s.cli.installed?'ok':'bad',s.cli.installed?(s.cli.version||'installed'):'not installed'); led('#led-editor',s.editor.reachable?'ok':'busy',s.editor.reachable?('adom-vscode '+s.editor.adomVscode):'editor not reachable'); led('#led-rt','ok',s.runtime==='wsl2'?'WSL2 container':s.runtime==='lima'?'Lima container':'Linux container');- $('#open').disabled=!(s.hub&&s.hub.up);$('#open').title=(s.hub&&s.hub.up)?('Antigravity UI at '+s.hub.url):'The hub is not up yet: install the extension and reload the editor';+ $('#open').disabled=!s.extension.installed;$('#open').title=s.panelWorks?'Opens the Antigravity side bar in the editor':(s.hub&&s.hub.up?'This editor path-proxies ports (panel blank): opens Antigravity\'s UI as a tab':'Install the extension and reload the editor first');+ $('#open-hint').textContent=s.panelWorks?'The side bar renders here (Hydrogen serves forwarded ports as <port>.localhost). Ctrl+Shift+L starts a new conversation; Ctrl+L adds a selection.':'This editor still path-proxies ports, so the side-bar panel is blank; Open Antigravity shows the same UI as a tab. Hydrogen 1.0.223+ fixes the panel.'; $('#install-ext').textContent=s.extension.installed?'Reinstall / update the extension':'Install the extension'; $('#install-cli').textContent=s.cli.installed?'Reinstall the CLI':'Install the CLI';window.__ag=s} async function refresh(){try{const r=await fetch('/api/status');render(await r.json())}catch(e){toast('Status unavailable: '+e.message,'err')}}@@ -55,7 +56,7 @@ $('#install-ext').onclick=e=>post('/api/install-extension',{},e.currentTarget,'I $('#install-cli').onclick=e=>post('/api/install-cli',{},e.currentTarget,'Installing agy…'); $('#reload').onclick=e=>post('/api/reload-editor',{},e.currentTarget,'Reloading…'); $('#open').onclick=async e=>{const j=await post('/api/open',{},e.currentTarget,'Opening…');if(j&&j.ok&&j.url){toast('Opening Antigravity in this tab…','ok');setTimeout(()=>{location.href=j.url},400)}};-$('#open-new').onclick=e=>post('/api/open',{panel:true},e.currentTarget,'Opening…');+$('#open-new').onclick=e=>post('/api/open',{new:true},e.currentTarget,'Opening…'); $('#tui').onclick=e=>post('/api/tui',{},e.currentTarget,'Opening a terminal…'); async function inspect(){try{const r=await fetch('/api/status');$('#context').textContent=JSON.stringify(await r.json(),null,2);$('#details').showModal()}catch(e){toast(e.message,'err')}} $('#settings').onclick=inspect;$('#close-details').onclick=()=>$('#details').close();
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.1",+ "version": "0.1.2", "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,
skills/antigravity/SKILL.md+1−1@@ -27,7 +27,7 @@ Dashboard routes: `GET /api/status`, `POST /api/install-extension`, `POST /api/i ## Facts that save time -- Under Hydrogen's code-server the extension's side-bar webview renders EMPTY (2026-09-06, extension 1.2.0). The extension still starts the hub (`agy --hub --hub-port=N`, Antigravity's real web UI); `adom-antigravity status` reports it under `hub`, `POST /api/open` answers `{surface:"hub", url}` and the dashboard navigates its own tab there. Google sign-in refuses to run inside a frame, so never iframe the hub; open it top-level.+- The side-bar panel is an iframe of the hub (`agy --hub --hub-port=N`) through the editor's port proxy. It renders when code-server hands out `<port>.localhost:7380` URLs (Hydrogen 1.0.223+; `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. - 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`.