Repository navigation
feat(antigravity): Antigravity runs Google's CLI, with Gemini 4 models, live updates, subagents and usage - #1064
Merged
Merged
Conversation
Threadlines pinned Google's Antigravity agent at 1.3.0, which only knows Gemini 3.x models. Pin 1.5.2 (the ACP registry's current entry) on all six platforms. The saved model list now records the agent version that listed it, so an update lists models afresh instead of showing the old list.
…t just the built-in one The update checker compared the installed Antigravity against a version written into Threadlines, so a new Google release (and its models) never showed until someone edited the code. Antigravity now reads Google's antigravity-acp entry from the ACP registry (through the shared community-agent catalog, which now keeps built-in agents' recipes apart) at most once an hour, and offers it as Install or Update when it is newer than the built-in release. Nothing installs on its own. Install checks stay as strict as for the built-in release: only Google's download host on every redirect hop, the listed sha256, exact archive and file sizes read from the zip's index with small range requests, the usual start-up check, nothing offered while the registry's quarantine list is unknown, and no action ever installs an older version than the one in place.
…endor Dependabot covers package.json but not versions written into code. A weekly workflow (free on standard runners, since the repo is public) compares the Antigravity built-in release, the managed Node.js release, the ACP schema and the Codex app-server protocol against what their vendors publish. It opens one issue per pin that is behind, keeps its body current, and closes it once the pin catches up. Issues are found by a hidden marker in the body, so a renamed issue is still found and one filed by hand is never touched. For Antigravity it also flags builds whose listing Threadlines' live update would refuse.
Google does its ACP work in the Antigravity CLI (agy acp), which is at 1.5.14 while the registry package we install is at 1.5.2. The plan covers the runtime switch, sign-in, models and modes, turn handling, the user's own rules and skills, usage, and the swarm work from Google's open T3 PR, in four stages. Reviewed once by an outside model; its eight findings are in.
… a session offers, check an agent after initialize - `initialize` now sends Threadlines' own name, title and version (`THREADLINES_ACP_CLIENT_INFO`) instead of a 0.0.0 placeholder. - `agentModeFor` gets the modes the session offers, so a descriptor can pick a mode only when it exists. - A descriptor's `verifyAgent` sees the `initialize` answer before a session opens and can refuse an agent too old to run. - The stand-in agent can report an `agentInfo` and refuse to reopen a saved session; a test shows a refused reopen starts a fresh session marked `resumeFailed`, which makes the next message carry the thread's history.
…feed It reads every build's manifest, takes the newest version any build has (a release can reach one platform first), and notes builds whose manifest Threadlines would refuse.
…the old ACP server Google moved its ACP work into the Antigravity CLI; the agy_acp_server package from the ACP registry was stuck at 1.5.2 while the CLI is at 1.5.14. Install and update - Releases come from Google's CLI update feed (sha512, no sizes) with a built-in 1.5.14 fallback whose download and executable sizes were measured. Hosts are allowlisted on every redirect hop, feed releases are capped, the tarball must hold exactly one regular file named `antigravity` (shared archive extractor: no links, no escapes), Windows gets the bare agy.exe, and Linux musl systems get Google's musl build. - The installed file is read-only on macOS and Linux (the version folder stays writable for leases), and AGY_CLI_DISABLE_AUTO_UPDATE stops the CLI updating itself. - Sessions need 1.5.14 or newer, managed or custom (checked on `initialize`; a refused custom agy is shown on the row until it changes). - An install of the old server shows Update, keeps its leases, and is pruned once nothing runs on it. A custom path to the old server says to point it at agy or clear it. - The registry hook added for the old route is removed. Sign-in - Google account and Gemini Enterprise sign in with `agy acp --login`: the Google page opens on the device that started it, the code from the Antigravity page is asked for in the panel and handed only to the waiting process, and a session must open before the sign-in counts. - Each profile keeps its sign-in in its own file; sign-out deletes that file only, so the user's terminal agy and the OS keyring are untouched. - Failures say what happened: didn't start, couldn't reach Google (IPv6 hint), Google refused, plan needed, or account verification with Google's page offered to open. An old-server sign-in asks once to sign in again. Models and modes - The reasoning level is its own option (`thought_level`); each model's levels are remembered as sessions report them, and name folding stays as a fallback. A custom binary's saved model list is tied to the file. - Supervised runs `default`, Auto-accept edits `accept-edits`, Auto the CLI's `auto` where offered (else `accept-edits`), Full access `default` with Threadlines approving each request.
…nd skills Each Antigravity instance runs with a private GEMINI_HOME, so the agent never saw the user's global rules and skills in ~/.gemini. Before every start, Threadlines now links AGENTS.md and GEMINI.md (top level and config/), config/rules, config/rules.json, config/skills.json and the two global skill folders into the profile. Windows gets junctions for folders and copies for files, refreshed when the source changes. A record of what Threadlines made means a link or copy is only replaced or removed when it is ours; a real file or a non-empty folder the agent wrote stays. Sign-in files, hooks, plugins, agents.json and the MCP config stay out.
A new reader finds the skills Google's CLI loads, in its own order: the global and project skill folders, then folders declared by skills.json (project manifests up to the repository root, confined to it, then the global one), then plugins in the instance's profile. It follows inherits, literal include_only and exclude (lists may be null), nested include_only names, and no ~ expansion, and it reads front matter only within a size and entry budget. The ACP core gets an optional listSkills hook so a status check can carry the list into the snapshot's skills.
Antigravity meters groups of models apart (Gemini, each Gemini 4 model with its own pool, Claude and GPT together), so a spent group stops only its own models. A scoped usage window can now name the models it holds (scopeModels) and the ones it leaves out (scopeExcludes); without them a scoped window matches its label as before (Claude's per-model limits). - contracts: the antigravity-quota usage source and the two fields - shared: usageScopeHoldsModel, the one matching rule, and usageLimitForModel, the limit a model is stopped on, for Continue at reset - web: model rows use the shared rule; two compact lines that share a short label keep their period; a provider other than Claude can show its own usage notice (auth.capabilities.usage.detail)
… them The allowlisted fetch only did GETs. It now takes a method and a text body, sets its length, and refuses to follow a redirect of a request with a body, so a POST carrying a sign-in can't be sent on to another address. GETs behave as before.
For an instance signed in with Google (Google account or Gemini Enterprise), Threadlines reads the plan's limits from Google's unpublished Cloud Code API (retrieveUserQuotaSummary, with fetchAvailableModels to fill in), with the access token the CLI saved in the instance's own profile, and shows a 5-hour and a weekly window per model family wherever other plans show theirs. The account email comes from the same sign-in. - One module, AntigravityUsage.ts, so it comes out in one piece. - Never renews, rewrites or removes the token and never reads the keyring; an expired token keeps the last numbers with "start a chat to refresh". - Only for Google sign-in methods; readings are keyed by the sign-in fingerprint and Google account. - Threadlines' own User-Agent; only the two Cloud Code hosts and userinfo, no redirects; 10 s per request, 30 s per read, one read at a time in the background so a status check never waits; sign-in and sign-out cancel it.
…i-model-visibility # Conflicts: # apps/server/src/guide/topics.ts # apps/server/src/provider/Drivers/AntigravityDriver.ts # apps/server/src/provider/acp/AntigravityAcpSupport.ts
Antigravity turns go to the usage ledger like fx's, so the contract, the ledger and the web page learn a new provider kind together (older clients still never receive one they can't decode). Gemini 4 Carbon, Argon, Neon and Hydrogen get built-in Standard-tier rates from Google's price list; Carbon and Argon double on December 1, 2026, so a built-in rate can now change on a known day and records are priced at the rate of their own day. A model id with an effort or role suffix (gemini-4-argon-high) is priced as its family. Antigravity takes a teal that passes the color-blind and normal-vision separation checks against every provider in both themes.
…eer, and fail with Google's real error agy acp 1.5 answers a prompt while a command it awaits, a timer or a subagent goes on, then wakes and replies by itself. The ACP core gains three descriptor hooks, unused by every other agent: - heldTurns: the turn stays open (working, with Stop) while such work runs, and the reply the agent starts when it ends lands in the same turn. A reply ends with its usage_update. Commands and subagents release the turn after 30 silent minutes; a timer holds it until it fires. Stop cancels the work and settles the turn once. Output or a permission request with no turn open starts one of its own. - steerWithPrompt: a message sent mid-turn goes as another session/prompt; the newest prompt's answer settles the turn and an older one's is ignored. The session runtime now counts prompts in flight instead of one flag. - promptOutcome: reads how a prompt really ended. Antigravity's reads the JSON-RPC error (1.5.9+) and, for a normal end, the turn's last step in the CLI's own session log (one module, marked as a private format). 5xx and 429 fail the turn; an exhausted quota carries its reset time to the usage-limit notice; a lost thinking signature stops the session so the next message starts a new one seeded with the thread's history. turnUsageTotals lets Antigravity count input as input plus cached reads, and its turns go to the usage ledger. A stand-in agy (scripts/antigravity-mock- agent.ts) drives the real descriptor in tests.
…emini-model-visibility # Conflicts: # docs/providers/antigravity.md
The activity projection cut every long string to its last 4,000 characters, so a long command lost the program and target it starts with. Command-line fields now keep their start, and a cut never splits a character in half.
…until each reports
Each invoke_subagent launch now shows as a subagent with its role, prompt,
report and recent steps, in the same view other agents' subagents use. ACP
says only that a launch happened, so the child, its state and its transcript
are read from the CLI's own records under the profile's brain folder
(AntigravityChildRecords: read-only, no links, bounded). When the records
don't name a child, the view says so and the turn falls back to the old rule.
The turn's hold on subagents now lasts until every child reported or was
killed, checked at the prompt's end and at the end of each reply the agent
starts by itself, keeping the 30-minute limit and Stop. A child killed with
manage_subagents no longer keeps the turn running. The auto-approved title
agy 1.5 uses ("Run invoke_subagent") now counts as a launch.
Tool rows: every tool update is bounded to 8,000 characters per field before
the core reads it (a command line keeps its start, output its end, no split
characters), inline images are left out, and an MCP call through
call_mcp_tool shows as that MCP tool instead of a command.
The generic ACP core gains descriptor hooks for this (normalizeSessionUpdate,
normalizeToolCall, subagents, and a row type on tool calls); agents that set
none behave as before.
…les as text Antigravity used to get every non-image file as a note naming its saved path. Now, where its initialize answer says it reads them, images (PNG, JPEG, WebP, BMP) and audio go inline, PDFs as a resource_link to the saved file, and text files as an embedded text resource, decoded as UTF-8 or as UTF-16 when the file starts with its byte order mark. MIME parameters are dropped before deciding. Text over 100 KB, audio over 20 MB, more than 50 MB inline per message, text that doesn't decode, and anything else still go as the path note. The core gets an attachmentDelivery descriptor hook and the delivery code (AcpPromptAttachments); agents without the hook send what they sent before.
…ts can read them Review fixes for the Antigravity plan meter. - An older client rejects an unknown usage source, and with it the whole server config. The reading now reports as grok-billing, which clients handle by label alone, and names itself in limitName. The contract says the source list is closed. - Accounts with no email to compare could inherit each other's numbers through the provider registry. Snapshots now carry an opaque auth.accountId; the registry never carries usage across two different ones, and the reader drops another account's numbers and email. - A read that timed out published without checking that the sign-in on disk was still the one it read for. Every read now lands through one path that checks it. - Enterprise and per-model answers folded every model of a family into its fullest, so an unused model showed another's usage. Each model now has its own row, its thinking levels folded together. - A host or the per-model fallback failing dropped the rows only it gave. Those rows now stay from the last read, with their age, and the read counts as failed. - 99.6% used rounded to 100 and read as "limit reached". Only an empty quota is 100 now. - usageLimitFor takes a picker slug and finds the model's name.
…ts model families - A quota failure the agent gave no reset time for now takes the reset the meter knows for the turn's model, so Continue at reset can arm. The ACP core passes the turn's model to promptOutcome.watch. - An early continue was vetoed by any spent window. A spent window that covers another family of models than every limit that stopped the thread (Antigravity's scopeModels) no longer vetoes it. Windows without a family, which is every Claude and Codex window, veto as before.
…rofile or takes what it didn't make Review fixes for the profile linker: - A profile folder that is a link (say to the real ~/.gemini/config) is never written through: every folder on the way must be a real folder inside the profile, and missing ones are made one level at a time. - A source may be a link (dotfiles), but not one leading to a sign-in or token file, hooks, MCP or plugin settings, anywhere else in ~/.gemini, or Threadlines' data folder. - The ownership record moved beside the profile, out of the agent's home, and is read without following links or blocking on a FIFO, with a size cap. Source reads are bounded the same way, and the whole step has a time bound so it can't hold a chat. - Only what the record names is replaced or removed. A matching link Threadlines didn't make is used but never removed. Removal moves the entry aside and checks it first; new links and copies never overwrite. - A copy's record is written before the copy moves and holds both digests while a refresh is in flight, so a crash can't orphan it, and overlapping starts for one profile take turns.
…rd limits Review fixes for the skills lister: - Global skills are read through the instance's profile after it is prepared, so the list matches what the agent loads (its own profile skills, and on Windows the copied skills.json resolving beside the copy). - Every directory entry is read one at a time and charged, as is every lookup, the plugin pass and its settings file; the scan stops at a deadline, and the lister keeps the last complete list when one is cut short. - Project roots and manifest folders are checked against the repository boundary before they are listed or opened, so a linked project skill from outside is never read. - Manifest filters apply to a skill folder named directly, as to its SKILL.md. - Descriptions are cut to 1,024 characters without splitting a character, and names over 256 characters are left out.
…and the skill list's limits
… exits and restarts Fixes from an outside review of the turn lifecycle: - A prompt settles under the turn lock when steering sends prompts, so a steer lands before the settle (and supersedes it) or after (and finds the turn over or held); each prompt has its own event barrier, released at once when superseded, so a newer prompt's permission request is never stuck. - A send no longer holds the turn lock while it waits for the running prompt, and Stop arms its recycle deadline before it takes the lock: a stuck agent is restarted even with a message waiting. - Tool updates the runtime holds back (a timer's call that never changes) still reach the held-turn count, so a scheduled wake holds its turn. - An agent that exits while a turn is held fails that turn and stops the session, instead of leaving it working. - Each prompt's tokens are written to the ledger as it answers (a steered prompt under an id of its own), so a hold, a stop or a restart loses none, and they are dated when spent. - Each subagent's report frees one subagent, a reply a finished command woke frees none, and a report without its usage update counts after the reply quiet limit. - The CLI's cancellation notice is dropped in the session runtime, before it can start a message (and with it a turn of its own). - Sessions the agent can't continue are kept on disk per instance, so a restart before the next message still starts fresh. - Each prompt reads its outcome from where the session log stood when it went out, so a steer never inherits an older prompt's error. - Before a known Gemini price change, the built-in price history beats the fetched table's current rate.
…mini-model-visibility
…avity-gemini-model-visibility
…tifications requestInOrder returns once the request is queued for the wire and hands its answer to a callback on the reader, before any message read after it. A connection that ends first gives the callback that failure.
- One ordered path in: a prompt's answer is queued where the wire reader read it (promptInOrder), and a written prompt is marked there too. Child-record readings carry the generation that asked; older ones drop. - One ordered path out: a single sender writes the machine's prompts in order, each turn's mode and model setup first. - A step and its commands run as one unit. Stopping a session is an event the reader takes after what is queued, so a turn's end and an answered prompt's usage are never lost; the turn's end precedes the recycle. - Stop on held work ends the turn at once but keeps the commands and subagents (stopping) under the cancel deadline until the agent shows they ended; a send waits for it. - Launches match child records by call id, not by count. - No outcome rebase: an error step counts for the newest prompt when it is the log's last, which never hides that prompt's failure. - Quiet timers count from the agent's last activity. - A lost session's exit names the session; the binding forgets it only while it still points there. - A send whose setup fails reports undelivered and leaves its context pending; the reactor keeps the history owed. - turnMachine.steer switches steering; off, a mid-turn message queues. - Explorer widened (restarted work, readings out of order, stacked requests, stale timers, delivery, liveness) and run with steering on and off; a seam harness forces each driver ordering against the stand-in.
…urn-lifecycle Takes the base's contracts for the two meeting points and drops this branch's stand-ins for them: - turnDispatched: machine agents answer it from the driver's delivery report. True once the turn's first prompt was written after its setup; false when the setup failed, the session or turn stopped first, or the turn is unknown. A session's stop settles every open answer, and a false one leaves the context preamble pending. sendTurn returns on acceptance again; the undelivered result field is gone. - conversationLost names the session by ProviderSession.createdAt; this branch's session-id and cursor matching in ProviderService is dropped.
… depths on request ACP_EXPLORER_FULL=1 runs depth 9 with steering and 10 without (about 2.6 and 2.8 million states, two and a half minutes, 2.5 GB). The default, 8 and 8, covers about 720,000 and 290,000 states in 22 seconds and 0.55 GB.
…result A machine agent's send returns once its prompt is written, or its setup failed or the session stopped first; the result then says undelivered. The reactor keeps every debt (the history, a fork's summarized source, the binding's historyOwed mark) when a send is undelivered or went as the agent's own command. turnDispatched is gone from the adapter and service contracts; other agents' sends already return after the write. Also tested: an approval asked again during a held turn keeps it open until answered, a real call_mcp_tool call holds nothing once normalized, and a lost-session exit still forgets after the runtime's cursor moved on.
…i-model-visibility # Conflicts: # apps/server/src/guide/topics.ts # apps/web/src/lib/providerUsage.ts
…e changes An approval was re-asked only when its words or title changed. An edit whose replacement text changed under the same title and path read the same, so the original request id stayed answerable for the changed edit. The session runtime could also drop such an update before the approval saw it, since it showed nothing new on the row. An approval is now tied to the call's substance (toolCallSubstance: kind, row type, command, the paths it names, its input, and each diff's old and new text). The adapter asks the runtime for ToolCallRevised, an unseen event for an update that changes only that substance, and an open approval whose substance changed is withdrawn and asked again as before. This is the shared ACP path and reaches every ACP agent; the runtime emits the event only when asked, so its own event stream is unchanged.
… own plan.md The exemption accepted a plan.md in any session folder under the profile's brain, so one session could write another's plan without asking, and it trimmed paths before comparing, so "plan.md " passed on POSIX. isPlanFile now gets the asking session (the adapter passes its own session id only when the request comes from that session) and compares every path the call names, as given, with exactly brain/<session>/plan.md.
…ntime writes can't touch a replacement - A revert on an agent that starts over now waits until the agent's process is gone (new adapter hook whenStopped), not just until hasSession stops reporting it. A wait past 20 seconds ends the runtime and waits once more; if it still won't go, the revert fails without restoring files. A capability lookup that fails also fails the revert without restoring. - History acknowledgements and lost-session forgets check the runtime and write in one statement (ProviderSessionDirectory.patchIfSession), so a replacement persisted between the check and the write keeps its debt and its resume cursor. - A send that had to reopen its runtime, where the conversation couldn't be resumed, marks the binding historyOwed and returns historyOwed on its result; the reactor records the debt, so the next message carries the history. The message already prepared still goes out.
… is no longer registered A provider instance that was removed or turned off has no runtime left, so nothing of it can write over a restored file. Refusing the revert there would have blocked file restores on every thread of a removed account.
…avity-gemini-model-visibility
…nt's stdin took it requestInOrder used to return once the frame entered the writer's queue. It now returns when the sink asks for the next frame, after write() took this one with no error it reports at once. When the writer stops, every frame not handed over fails, along with the requests it carried (never answered) and those written but unanswered, so none is stranded.
- A send whose prompt the agent's stdin never took (it closed its end) returns undelivered, with its history pending again. - Steering ships off (ANTIGRAVITY_STEERS): a mid-turn message waits for the turn, as for other agents; the docs and the app guide say so. - A prompt's record (parts, setup, outcome watch, answer) is dropped once its answer is stepped, a late answer to a steered prompt included. - Noting the log's position before a prompt waits at most 2 seconds; past it the prompt goes with no baseline and its own answer stands. - sessionStopped(threadId) on the adapter contract resolves once a stop under way has closed the session's process scope, for a revert to wait on.
…emini-model-visibility # Conflicts: # apps/server/src/provider/Services/ProviderAdapter.ts
…d a stalled stop can't hang a revert - effect-acp: when the agent's output ends or the writer fails, every frame its stdin has not taken fails, the in-order requests they carried are not reported as answered, and a request made afterwards fails at once instead of queueing behind a pipe that is gone. - Antigravity's plan-file exemption never takes a path with `.` or `..` steps: through a link in the session's folder such a path reads as the session's plan and opens another file. - A revert's fallback stop is bounded, so a stop that already stalled can't keep the revert waiting on its lock.
…i-model-visibility
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Antigravity in Threadlines ran Google's old
agy_acp_serverpackage, pinned at 1.3.0, so it showed no Gemini 4 models and missed everything Google has since built into its CLI. Nothing told us the pin was stale.Threadlines now runs Google's Antigravity CLI in ACP mode (
agy acp), kept current from Google's update feed with a user-clicked Update, and its turns, sign-in, usage and tools are handled to the level of T3 Code's integration.What changed
agyor the OS keychain.automode when offered. Threadlines identifies itself by name.AcpTurnMachine) keeps a turn open while the agent's commands, timers and subagents run, lands the agent's own follow-up reply in the same turn, and ends every turn exactly once on Stop, process exit or session stop. A test explores every event order to a fixed depth. Upstream failures become failed turns with Retry; a quota failure carries its reset time.~/.geminireach each private profile; skills and the agent's own commands show in the composer's/list.For every provider: a failed resume now records that the thread's history is owed across a restart; a revert on an agent that starts over never restores files under a running process; a long command line keeps its start in the timeline; an open ACP approval is asked again when what it would authorize changes.
Not in this PR
ANTIGRAVITY_STEERS): a message sent mid-turn waits for the turn. The code is in and tested; a steer is still recorded as accepted before it is written to the agent, and it is the behaviour least verified against the real CLI.agyrelease that advertises it.Checks
vp fmt,vp lint,vp run typecheck.resumeandclosesupport, and its signed-out error all match what this code expects. It reads images and embedded text, not audio.Follow-ups
sourceenum tolerant of new values (Antigravity's limits travel asgrok-billingwith their ownlimitName).