main
100
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
836f2e4e4c |
agy-cli 0.1.99: DSH's own notes beside a tool result no longer end the live session
seven_7cx on X (DSH + agy-cli on multi-step tool tasks): cache reads jumping between 10-20 and 0, drop_live (history_mismatch, interrupted) and session_new over and over, the history replayed each time, and the model looping on tool calls. Cause: DSH adds user-role notes of its own before a step (time-context's "Time sampled while preparing turn N, step M" clock, the runtime-context snapshot, the repeat-tool and plan-mode notes, tmux-context's location reading, a finished background job's notice, the model-changed note). Beside a live tool_result, inspectToolTurn took any such user text for the user steering, so the step was "interrupted": the live session was dropped and the whole history replayed in a new one, which put the cache at 0 and the model back at the start of its task. The same notes were already known as meta by isMetaOnlyUserText, but only for finding a prompt, not here. Fix: takeDshNotes lifts DSH's notes out of a user text in inspectToolTurn and hands them on as context notices with the result; isMetaOnlyUserText also knows the three newer ones. Test (repeat-batch.mjs): a 9-step tool turn with one DSH note per step, in the result's own message and in a message of its own. Red on 0.1.98 (the turn never ends; drop_live per step), green now; the session is opened once and no drop_live is logged. Run (mica/mote via mote-run, bun 1.4.2): repeat-batch.mjs 81 pass, steer-in-session, conversation-key, dropped-call 50 pass, compat 13 pass. Not tried: a real DSH session against a real agy account. history_mismatch was not reproduced from DSH's shape; it was seen after a replay, and the step notes were the only DSH-specific cause found by reading DSH's plugins (dsh-time-context, dsh-tmux-context, dsh-tool-jobs, dsh-agent). |
||
|
|
5f3202000c |
agy-cli 0.1.98: with Antigravity's app wired to magpie, the provider lists the Google account's models, not magpie's
@canlee886 on X: Antigravity was wired to magpie, and agy-cli as a
provider then listed magpie's own models (its routing groups, "GPT-6
Astra · routing group (Low…Max)"). That is a loop: magpie -> plugin ->
agy -> magpie.
Cause: magpie wires Antigravity's desktop app through the gateway block
in ~/.gemini/config/config.json, and agy 1.5.10 reads that same file. An
agy on ~/.gemini then lists and offers the gateway's models, whatever its
settings.json says. --settings '{"modelProvider":""}' doesn't help.
- The catalog's model probe ran `agy acp` with no --gemini-dir, so it was
offered magpie's models, and the catalog keeps to what a session offers.
- `agy models` (the listing, the sign-in check, refusalNow) can't be
given a --gemini-dir at all. It also answered from the gateway, and so
took magpie's listing for a Google sign-in.
- Turns already ran on the bridge's own folder, and agy reads no app
gateway there.
Fix:
- The probe runs on the folder a turn runs on (geminiDirArgs), so it is
offered what a turn is served.
- With the app's gateway on (appGatewayOn: gateway.enabled true, or a
file that isn't JSON), the listing and the sign-in check come from that
session instead of `agy models`. refusalNow doesn't read the gateway's
listing either.
- A gateway turned off, a missing file, an account home or no own
folder: `agy models` is used as before.
Run:
- Real agy 1.5.10 in a sandbox HOME, with the real Google sign-in and
the app's gateway pointing at a fake magpie on 127.0.0.1:
- old index.mjs listed rg/gpt-6-astra and rg/gpt-6-luna, with three
requests to the fake;
- new listed claude-sonnet-4-6, claude-opus-4-6-thinking, gemini-3.8-
flash and gpt-oss-120b, with no request to the fake.
- A real turn went to Google, with 0 requests to the fake. Google
answered 403: this test account is disabled for Antigravity.
- Four new tests in test/catalog.mjs. On the old index.mjs all 4 are red.
With only the probe's --gemini-dir taken out by hand, the two listing
tests are red ("magpie's own models were listed").
- On mote: bun scripts/check.mjs ok; agy-cli bun test 41 pass, 0 fail, in
a temp HOME.
Not tried: an agy with no keyring (fileSignIn) or AGY_BRIDGE_GEMINI_DIR=
default. Its turns run on ~/.gemini and still follow the app's gateway;
filed separately.
|
||
|
|
29547d4200 |
agy-cli 0.1.97: usage finds an agy installed since at once, and a sign-in is named by its Google account
@tmr11235 on X (magpie v0.1.4520):
1. "The model test works, but the account says there is no CLI."
Usage held its "agy CLI not found" error for the backoff, which grows
from 10 minutes to 6 hours. A read made before agy was installed kept
saying "not found" for hours after a sign-in installed agy, while
chats and model tests already ran through it. Now:
- no agy found is never held;
- a held failure belongs to the agy path it was held for, so an agy
found since is read on the next refresh;
- the message says how magpie gets agy (sign in again), in noAgy's
words.
2. "After removing it and signing out, 登录 restored the account with no
sign-in, shown as API key." magpie's remove/sign-out deletes only
magpie's record. agy on the computer stays signed in, so 登录 adopts
that sign-in again with no browser (method 0's "auto"). That part is
by design. The "API key" label came from a sign-in saved without an
email: agy's keyring value names its account in id_token_email, and
when it doesn't (or the read fails), the saved record had no
metadata.email. pluginLabels then falls back to the record's type,
"API key". signedInAs now asks Google's userinfo with agy's own
access token when the stored value names no account, so the account
is listed under its email. An account saved before this keeps its
label until its next sign-in (登录 on it), which saves the email.
Their later quota "as of 2026/11/15, couldn't be read just now" is not
this: "not found" isn't a passing error, so magpie shows it rather than
an old reading. The read behind it fails with a timeout, 429 or network
error that magpie stood an old reading in for; magpie now says which
beside the date (magpie, readError).
Run (at origin/main
|
||
|
|
62645eceb7 |
agy-cli 0.1.96: a resumed session runs in its own folder again, so agy's cache still hits
@chet030714 on X: Hermes through agy-cli started near 70% cache hits and
fell all day. agy's prompt cache follows the folder its process runs in.
Every agy the bridge started had a new mkdtemp folder, so a session
resumed after the 10-minute idle reclaim, an LRU eviction or a restart
replayed its whole history uncached, and the longer a conversation got,
the more each resume cost.
Measured with real agy 1.5.10 over ACP in a sandbox HOME (one session,
~24K tokens a turn): every turn in one process hit (cachedReadTokens
19,682 to 197,710). A resume in the same folder: 213,520 cached. In
another folder: 0 cached, 219,198 uncached. Only the process's folder
counts, not session/resume's cwd. The same folder after 13 minutes
idle, or removed and made again at the same path, still hits.
Now a parked session records its workspace, and a resume starts agy in
that folder (made again if it was removed), never in a spare's. Only a
magpie-agy-bridge-XXXXXX folder directly in the temp folder is taken
from the state file. A stopped agy leaves its folder when another
already runs there, and a resume waits for a removal in progress.
Run (at
|
||
|
|
c18d87f743 |
agy-cli 0.1.95: agy's high-traffic ending is a 503, and 1.5.10's ban wording a 403
When Google had no capacity for the model, agy ended the reply with "⚠ Our servers are experiencing high traffic right now, please try again in a minute. (UNAVAILABLE (code 503): No capacity available for model …)". The bridge passed it on as the whole reply, a 200, so nothing behind magpie tried again. ifccod found this and patched it in their fork (ifccod/opencode-agy-cli-auth, MIT, FORK.md "Busy ending"). Their code is ported here: the ending is held and matched by its start, the way the quota ending is, and it ends the turn as overloaded_error with status 503 (HTTP 503 without streaming). Retrying is allowed, and the account is not rested. agy 1.5.10 words a banned account's 403 without the "PERMISSION_DENIED (code 403):" that 1.5.9 put in front. A real banned account was probed over ACP on 11-18: the whole reply was that sentence, end_turn, a 200. The bare sentence is now a marker, answered with the same no-retry permission_error 403 as #1201. Not taken from the fork: its video path. That path has agy's server-side read_file open videos downloaded into a media folder added with --add-dir, and it lets any gateway caller have agy read paths on the host. It was not tried with a real account either, since the probe account is banned. Run (mica, HOME=$(mktemp -d), at 89df5a62+this diff): - packages/agy-cli/test repeat-batch.mjs: 79 pass, 0 fail. usage.mjs (cp-hook preload): 44 pass. - The new tests on the old index.mjs, by hand: 3 of the 4 fail (busy stream, busy non-stream 503, 1.5.10 ban). The quoting test passes on both, as it should. - Root bun test: 9070 tests, 0 fail, 20 skip (487s). Not tried: a real high-traffic ending; it is taken from ifccod's capture. Co-authored-by: ifccod <102718410+ifccod@users.noreply.github.com> |
||
|
|
e38f4f39fe |
agy-cli 0.1.94: an ending with only thinking is asked again in the session, then is an error
fnckerpoi on X (magpie 0.1.4402, agy-cli 0.1.91, DSH 0.2.2-rc.3 through billion-context, provider concurrency 1): "acp-proxy: the turn degenerated again after the continuation nudge". The words are billion-context's. Its plugin pipe calls a turn "degenerate" when it ends cleanly (end_turn) with no tool call and no answer text but did carry thinking; it then resends the request once with a nudge appended, and when that comes back the same it ends the stream with this error. agy-cli handed such turns over. When a model call returns neither text nor tool calls, agy writes "⚠ Model produced invalid output." (dropped since 0.1.42, #1124) and calls the model again; when that call is empty too, agy ends the prompt on end_turn with only thinking, and the bridge sent it as a finished reply that said nothing. billion-context's nudge then arrived as a new request whose history (no empty assistant turn) no longer matched the session, so the bridge stopped agy and replayed the whole conversation in a new session: the same context, cold, and with concurrency 1 queued behind the other requests. It came back empty again. Concurrency 1 adds the wait; it doesn't cause the empty reply. - Turn tracks, since the turn began or its last tool call, whether the model said any non-blank text, thought, or hit agy's invalid-output retry. An end_turn (or no stop reason) with thinking or that retry and no text is an empty ending. - #runTurn asks such an ending once more in the same session, as one more session/prompt of the same response, with neutral words that name nobody ("Your last reply was empty. Continue: …"). The client sees only the answer. - Still empty, the turn ends with an AgentTurnError: "the model ended its reply twice with no text and no tool call (agy: Model produced invalid output); send the request again, or try another model". It is an error before any content, so magpie's gateway asks the next account, and agy's session is kept, so the same request sent again continues in it instead of a replay. - A bare empty ending (no thinking either) and a max_tokens ending are passed through as before. One more ask per tool call, not per turn. - README (zh, en): what happens to such a reply. Run (mote, bun 1.4.2, HOME=$(mktemp -d)): - test/repeat-batch.mjs: 75 pass. The four new tests against origin/main 11e7afe5's index.mjs (AGY_BRIDGE_TEST_INDEX): the ask-again and the error-and-session-kept tests fail, the bare-empty and max_tokens ones pass on both. The #1124 case that expected a banner-only reply to end as an empty end_turn is removed: that was this bug. - bun test ./packages/agy-cli (every suite and smoke.mjs): 41 pass, 0 fail. bun scripts/check.mjs agy-cli: ok. Not tried: a real Antigravity account. The owner's Google account is refused (403, ToS) on agy turns and no other signed-in agy account was found here, on mote or on mica. The empty ending was built from agy's own banner bytes and its end_turn, not captured from a real empty reply, and whether the model's empty call is Gemini's MALFORMED_FUNCTION_CALL is not known. Not run under billion-context itself. |
||
|
|
50f1ec1882 |
agy-cli 0.1.93: a refused account with no project has its quota read under aicode-consumers
IcyLiqu1d on X: agy-cli's usage always failed with "this account is not
eligible for Antigravity" while the account's requests kept working.
agy -p /usage waits for agy's eligibility check; agy acp, which serves
requests, runs none, so a refused account keeps working and its usage
does not. 0.1.69's direct read covers a refusal where loadCodeAssist
names a project. Where it names none, agy itself asks
retrieveUserQuotaSummary with {} and Google answers 403 #3501, and the
plugin's direct read gave up with "names no project" and then showed
only the generic "not eligible" line, hiding why.
- readQuotaDirect: a personal (auth_method consumer, not gcpManaged)
account loadCodeAssist names no project for is asked under
aicode-consumers, the project Google serves every consumer account
under. A Workspace/Cloud account still fails, with Google's
ineligibleTiers reasonMessage when it gave one.
- fetchUsage: when the direct read fails too, the error keeps agy's
refusal and adds why the read failed.
Run (mica, bun 1.4.2, HOME=$(mktemp -d)):
- test/usage.mjs: 44 pass. With origin/main 207880e1's usage.mjs and
the new tests, 3 fail (the two new tests and the no-project case of
"a direct read that fails...").
- bun test ./packages/agy-cli: 41 pass, 0 fail. bun scripts/check.mjs:
exit 0, agy-cli ok.
- Real account (agy 1.5.10, CLOUD_CODE_URL through a recording proxy
that drops currentTier, paidTier and cloudaicompanionProject from
loadCodeAssist): agy's own retrieveUserQuotaSummary {} calls got 403,
onboardUser 403; the plugin's read with project aicode-consumers got
200 and fetchUsage returned both 7-day groups in 7.0s. On 0.1.92 the
same run returned the generic "not eligible" error.
Not tried: a real account Google refuses at the eligibility check (I
have none; the refusal was simulated), and Linux, where the stored
sign-in isn't read from a keyring, so the direct read can't run there.
|
||
|
|
207880e1d8 |
agy-cli 0.1.92: usage shows each group as a pool and lists its models again
tongzhenbao on X: since moving to agy-cli, the usage card shows only three
rings ("Gemini …", "Gemini …", "Claude …"), and they want each model's
usage as before.
Before: the retired antigravity plugin sent one window per model
(fetchAvailableModels' quotaInfo, with family and pool) and the pools
from retrieveUserQuotaSummary, so magpie's card showed the pools
("Gemini 5h", "Gemini 7d", two lines a ring) and "Every model (n)"
listed the models. agy-cli sent only "Gemini · 7 days"-named windows with
no pool and no model, so magpie drew plain rings with the name cut short
and had no models to list.
Google's per-model figure is the pool's: the owner's last antigravity
read (quotas.json, 2026-11-11) gave every Gemini model 1.58104% with the
Gemini pool's 7 days, and every Claude/GPT model 6.7575% with Claude &
GPT's, to the digit. So nothing new is asked of Google; from agy's own
/usage:
- each bucket goes as its pool's window: { pool: "Gemini", name: "7 days" }
(magpie's LineName is still "Gemini · 7 days", so quota history and a
cap the user set keep their names);
- each model family a group names (familiesInGroup, from the catalog agy
models listed) gets an aside window in that pool: its display name
without the effort word, model = the family id, models = every id of
it, family Gemini/Claude/GPT-OSS, reading the group's most used
measured bucket with that bucket's span and reset. A model two groups
name reads the one that stops it first. A group with no measured bucket
gives its models no window; no catalog yet gives no model windows.
Every window stays aside, so routing is as before (magpie's allowanceOf
skips aside windows, and a pool's window holds only members that aren't).
Run (mica, mote over 18 load): HOME=$(mktemp -d) bun test in
packages/agy-cli: 41 pass, 0 fail.
Broken by hand: a model reading its group's first bucket instead of the
most used one; "each model family a group names has its own window in
the pool, at the pool's most used bucket" went red (1 fail), green again
restored.
Not tried: a real agy /usage read (the parse is the captured live report
of 11-15 and its agy models rows); magpie's rendering is checked in
magpie's GUI tests with this shape.
|
||
|
|
677329db24 |
agy-cli: a saved or outdated model offer is asked again, so Ultra lists Gemini 4 (0.1.91)
shenggxhz (X, 11-17) moved from a Pro account to Ultra, and the agy
provider still listed no Gemini 4 Carbon. What agy acp offered the Pro
account was kept in models.json and loaded at start as the offer, and
probeOfferedOnce never asked agy again while an offer was known. Only a
request opening a session replaced it, so Ultra's fresh `agy models`
listing (Carbon in it) was filtered down to the Pro account's offer.
With main's index.mjs the new test lists exactly the reporter's
screenshot: claude-sonnet-4-6, gemini-3.8-flash, gpt-oss-120b.
Now an offer read from models.json, or one learnt before `agy models`
listed something else (the account or plan changed outside magpie), is
served while agy acp is asked again (offeredStale), and a session's
answer makes it current. Costs one short agy acp session per run after
a restart, and one per listing change.
Tests (test/catalog.mjs): a restart after the switch lists Carbon and
probes once; a listing change mid-run probes again, an unchanged one
doesn't; #1086's restart now also expects that one probe (its timeout
raised to 15s for the 1.5s slow session). With main's index.mjs the
three are red. Run on mica: root `HOME=$(mktemp -d) bun test` and
`bun scripts/check.mjs`, results below.
Not tried: a real Pro-to-Ultra switch (no Ultra account here).
mica, at this tree (parent
|
||
|
|
34edf938da |
agy-cli: a 429 to the reworded prompt in the user turn is a rate limit, not a 400 (0.1.90)
HadStash on X (11-17, Google AI Ultra trial, agy-cli) got "agy bridge: Antigravity answered 429 to this system prompt: RESOURCE_EXHAUSTED (code 429)" as an Anthropic invalid_request_error, while the same account works in the Antigravity client. #formatAgentError called any bare 429 a prompt rejection when the RAW client prompt has a line Antigravity turns away (turnsAway). Claude Code's identity line is always there, so every 429 in a Claude Code session was a 400 the client never retries and a gateway group doesn't treat as a limit, even though what was sent was reworded (cloak.mjs) and sits in the first user turn, the default since 11-15. Now that label is given only when the instructions went in agy's session instructions (AGY_BRIDGE_SYSTEM_APPEND=1), where the reworded prompt is still turned away; in the user turn the 429 is a rate_limit_error (with the existing "not a quota" note for the bare 429), so Claude Code retries it and a group asks the next member. The turn still ends at agy's first 429 banner (Lmohn39), so nothing waits. Real probes, account kumw95ya25, Code Assist direct (plug-raw), Claude Code 2.1.326's captured prompt (SDK and CLI identity), 2 tries each: - raw in system: refused 429 (gemini-3.8-flash) - outgoing() in system: 429 2/2 on gemini-3.8-flash and claude-sonnet-4-6 - outgoing() in the user turn: 200 2/2 on both models - user turn + Claude Code's 12 tools as function declarations: 200 2/2 Control prompt: 200 2/2. Tests: repeat-batch's Lmohn39 test now runs the session-instructions path (testkit's new `appendable`) for the 400 and the user-turn path for the rate limit, Claude Code's identity line included; smoke's #980 case sets AGY_BRIDGE_SYSTEM_APPEND=1 and a new HadStash case checks the user-turn 429. Broken by hand: against origin/main's index.mjs both are red (repeat-batch 1 fail, smoke "BAD - HadStash ..."). Run on mote at this tree (HOME=$(mktemp -d)): bun scripts/check.mjs ok; bun test 9040 pass, 1 fail: agy-cli test/usage.mjs "a hung sign-in with an ended token is never restarted ..." at its 6s deadline, which is #1191 (usage.mjs red on macOS under load, the failing tests change each run; alone it went 5 of 41 red, other tests). Not this change: usage.mjs doesn't reach #formatAgentError. Not tried: the reporter's own account or agent (they don't say which; the Anthropic-shaped error says a /v1/messages client). agy itself was not run end to end: the Mac's agy account is disabled by Google, so the probes went to Code Assist directly with agy-cli's cloak.mjs. |
||
|
|
4b3af4a565 |
agy-cli 0.1.89: a session whose agy never loads the client's tools fails and says why (#1239)
pi declared read, bash, edit and write through the gateway on Windows and the model saw only agy's own manage_task; `read` came back `unknown tool: "read"`. agy reads a client's tools from the bridge's ide-tools MCP server, which it starts by running `nc` from PATH. When that never answers, #waitForToolList gave up after 5s without a word and the turn ran with no client tool at all, for every client. On Windows agy 1.5 runs only nc.exe, never the nc.cmd the bridge falls back to. A failed nc.exe build was swallowed and cached for the whole host process, so every session after it had no tools until magpie restarted. - A session that declares tools and whose agy hasn't listed them after AGY_BRIDGE_TOOL_LIST_WAIT_MS (now 20s) fails with 502 tools_not_loaded, naming the cause: on Windows, the nc.exe build's own failure (not Bun, non-ASCII folder, bun build's exit code or "wrote no nc.exe" plus its last stderr lines); elsewhere, the `nc` MCP server that never answered. No session/prompt is sent. - A live agy that never listed the tools a follow-up declares (started with none) is replaced (session_new reason tools_unlisted), not reused. - On Windows a failed nc.exe build is tried again after 5 minutes, rather than never. Tests: test/tools-listed.mjs (new, in agy-cli.test.mjs). The testkit's fake agy can now not list tools (listTools), or not keep a watch (watchTools), and records each listing. Run at this tree: - mica-run, HOME=$(mktemp -d): cd packages/agy-cli && bun test: 41 pass 0 fail; bun scripts/check.mjs agy-cli: ok. (mote was at load 130.) An earlier run of the same suite had test/usage.mjs red twice on its 3s usage-query deadline at mica load 23; it passed 41/41 twice alone. That is #1191. - win-run on xiaomi-gpu (real Windows, Bun 1.4.2): tools-listed.mjs and windows-nc.mjs, 13 pass 0 fail. The first Windows run caught that the platform-neutral cases took the real win32 path; they now pin linux. Broken by hand: tools-listed.mjs against the old index.mjs (AGY_BRIDGE_TEST_INDEX = HEAD's copy): 3 of 5 red. The unlisted session ran its turn (200, end_turn after 5s), the follow-up ran on the agy that never listed Read, and the failed Windows build was never retried. The two cases that should hold either way pass. Earlier, on xiaomi-gpu: a real nc.exe built in ~335ms, and the shim answered tools/list in 137ms first and ~28ms after. Not tried: a real agy turn or a real Windows agy session. There is no usable account: the Mac one is banned, and Windows agy answers session/new with "Authentication required". So the reporter's exact trigger (which nc.exe build failure, or none) isn't confirmed. The error now names it on their machine. |
||
|
|
8c3397d3ff |
agy-cli 0.1.88, antigravity 0.2.2: DeepSeek Harness's browser sentence goes "gives"
LayFz (#1105, @baoshijie8848 on X) ran a controlled A/B on one Antigravity Ultra account, same model and endpoint, only the system prompt changed: "You are an AI agent powered by DeepSeek Harness." and, in the middle of DSH's Web GUI paragraph (@deepseek-ai/dsh-harness-dev-context), "The browser provides no implicit DOM, route, or screenshot context." each got 429 RESOURCE_EXHAUSTED; each paraphrased got 200. - agy-cli's cloak.mjs already had the first line (#1171, 0.1.57). It now has the browser sentence too, sent as "The browser gives no implicit DOM, route, or screenshot context.", and the DSH hint names both. - The antigravity plugin (0.2.1, serving existing users) had neither: both lines are added there, with a DSH hint. The rewording keeps every word but the verb. sub2api's PR 8878 drops "route", which changes what DSH tells the model, so it was not copied. Real account, 11-17, through the antigravity plugin, sandbox HOME, the owner's existing plugin sign-in (no credentials entered), 3 runs each: - 0.2.1 (old): opener 429 3/3 on gemini-4-hydrogen-sonar (gemini-3.8-flash gave three 502 cert errors upstream that round, 429 3/3 in the earlier round); the literal Web GUI paragraph 429 on both models; opener + paragraph 429 3/3 on both. - agy-cli 0.1.88's outgoing() text for opener + paragraph, sent through 0.2.1 (which leaves it as is): 200 3/3 on both models. - 0.2.2 (new): opener, paragraph, opener + paragraph raw from the client: 200 on both models (one upstream 502 cert error on flash). - Bisect (gemini-3.8-flash): the sentence lower-cased or wrapped over a newline 429; without its period, without the comma before "or", without "implicit", or "gives" for "provides" 200. So those variants stay as written and the tests check it. Tests use the paragraph word for word. Run (mote, HOME=$(mktemp -d)) at this tree: bun test packages/agy-cli packages/antigravity 173 pass, 0 fail; bun scripts/check.mjs ok. Broken by hand: 0.1.87's cloak.mjs and 0.2.1's index.mjs with the new tests: both new tests fail (2 of 40 in cloak.test.mjs + shape.test.mjs). Not changed: magpie's codeassist.go list and the antigravity-cloak middleware act only on the retired built-in Antigravity (Account.Agent "antigravity"), which serves no requests. |
||
|
|
afe4c08643 |
agy-cli 0.1.87: agy's Individual quota reached ending fails the turn as a rate limit
@Airan_FS on X (11-17): when an Antigravity account's own quota is used up,
agy ends the turn with "⚠ Individual quota reached. Please upgrade your
subscription to increase your limits. Resets in 1h18m40s." The bridge only
knew fixed ending lines, so this one went to the client as the model's
reply and magpie never asked the next account.
The bridge now holds a line starting "⚠ Individual quota reached" that
nothing follows, and ends the turn with a rate_limit_error carrying agy's
words and the reset ("agy bridge: Antigravity quota reached: Individual
quota reached. ... Resets in 1h18m40s."; HTTP 429 without streaming).
Words the model wrote before it still reach the client. A quote of the line
with more text after it stays text. magpie rests the account until the
reset it reads from the error (magpie's routing.go change in the same fix).
The words are from a user's report on discuss.ai.google.dev (limit
membingungkan) and @Airan_FS's tweet; the agy binary carries "individual
quota reached".
Run (mote, HOME=$(mktemp -d)): bun test agy-cli.test.mjs 20 pass, 0 fail;
node --test repeat-batch.mjs smoke.mjs 72 pass, 0 fail; bun scripts/check.mjs
ok.
Broken by hand: 0.1.86's index.mjs with these tests: three of the four new
tests fail (the ending alone, after partial text, non-stream 429); the
quoted-line test passes on both.
Not tried: a real agy account with its quota used up.
|
||
|
|
38233a569c |
agy-cli 0.1.86: agy starts with telemetry off (#1236)
The bridge passes --disable-telemetry when `agy acp --help` lists it, so agy doesn't report the run to its vendor; AGY_BRIDGE_TELEMETRY=1 keeps agy's own default. The flag is part of the spare's launch key. By ump45nose (#896, PR #1236), landed on top of #1235 with only the version line's conflict resolved. The flag was checked in the agy binary on this Mac (strings: "disable-telemetry", "--disable_telemetry"). Run (mote, HOME=$(mktemp -d)): - At the PR head 0ead2594: bun test agy-cli.test.mjs 20 pass; node --test repeat-batch.mjs smoke.mjs 66 pass; check.mjs ok. - At this tree (with #1235): bun test agy-cli.test.mjs 20 pass, 0 fail; repeat-batch.mjs + smoke.mjs 68 pass; check.mjs agy-cli ok. Broken by hand: origin/main's index.mjs with the PR's tests: "#896: an agy whose acp --help lists --disable-telemetry starts with telemetry off" and smoke.mjs fail. Not tried: a real agy acp run with the flag (the local agy account answers 403). Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com> |
||
|
|
c52dd35bfa |
agy-cli 0.1.85: agy's output-cap notice never reaches the client (#1235)
agy's output-cap retry writes three lines of its own into the reply (the cut-off notice, its instruction to continue, "Retries remaining: N"); the bridge now drops them where they start a line, held across chunks, and keeps a mid-line quote of them. By ump45nose (#892). The three strings were checked against the agy binary on this Mac (strings: "Your previous response was cut off because it exceeded the output token limit", "Please continue from where you left off, keeping your response shorter", "Retries remaining: %d" and "%d."). Run at e95ee1d5 (mote, HOME=$(mktemp -d)): - bun test agy-cli.test.mjs: 20 pass, 0 fail. - node --test repeat-batch.mjs smoke.mjs: 66 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with this PR's tests: "#892: agy's output-cap notice never reaches the client" fails. Not tried: a real turn that hits agy's output cap (the local agy account answers 403). |
||
|
|
44bfefb7a7 |
agy-cli 0.1.84: an ended access token is renewed by the plugin for usage, so agy never opens a sign-in (#1234)
qiankun229 traced it in agy's own logs (#1234): at Windows startup the background usage read ran `agy -p /usage` with an ended access token and a refresh token. agy's silent renewal failed for a moment (a 10s keyring timeout, or "no such host" for oauth2.googleapis.com before the network was up) and agy fell back to an interactive Google sign-in, which opens the browser through ShellExecuteW past the BROWSER/PATH shims. The next read renewed the same token fine. The stored-sign-in precheck passes such a token, since it can be renewed. - createUsageReader: when the stored access token has ended or ends within two minutes and has a refresh token, fetchUsage reads with `direct`: it runs `agy --version` only (no sign-in) and reads the quota the way agy does (readQuotaDirect, loadCodeAssist then retrieveUserQuotaSummary, with agy's User-Agent), renewing the token in memory. agy's stored sign-in is never written. `agy -p` isn't run. - A failed renewal is a failed read: it backs off as before and keeps the sign-in. A network error says to check the network or proxy. - Google answering the refresh with invalid_grant (400/401) is kind "auth": the account reads as signed out ("Sign in again") and nothing runs for that sign-in again until another is stored. - A token with time left still goes through agy -p, as before. Tests: three tests that leaned on an ended token only to get agy to run now use a token whose end isn't said (as the existing "refreshing" test does); what they check is unchanged. Run (mote, HOME=$(mktemp -d)): - test/usage.mjs (AGY_BRIDGE_STORED_SIGNIN=skip node --test): 41 pass. - bun test agy-cli.test.mjs: 20 pass, 0 fail. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's usage.mjs with the new tests: the three new tests fail (agy -p ran for an ended token; no backoff/network message; invalid_grant not auth), 38 pass. Not tried: Windows with a real ended token and the network down at startup (no agy account here: the local one answers 403); the requests are the ones the region-refusal path has made since 0.1.7x. |
||
|
|
f10738917f |
agy-cli 0.1.83: a pending call Codex dropped is answered as cancelled, and the live session goes on (#1231)
Codex delivers a sub-agent message at a sampling boundary by keeping the interrupted reply's text, dropping its tool call, and sending the history on with the new message. Since 0.1.74 lineageVerdict called that a fork: the pending call was closed with SUPERSEDED_NOTE and the conversation was replayed in a new session, losing agy's cached prefix and, for a long history, the turns past the 112 KiB prompt budget. Now lineageVerdict returns "dropped" when the recorded history with the turn's unanswered calls taken out is exactly the client's history, and the reply that carried them kept some text. keepDroppedTurn answers those calls with "cancelled by the client, not executed" through the existing steerInSession (MCP commit wait, session/cancel, history set to the client's), and the new trailing message goes in as the next prompt in the same session. A changed reply text, a reply that was only the call, grown tools, another work dir or other instructions still replay as before; so does a steer that fails. Run (mote, HOME=$(mktemp -d)): - node --test test/dropped-call.mjs: 3 pass (kept session; changed text replays; call-only reply replays). - bun test (agy-cli): 38 pass, 0 fail. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new test: the kept- session case fails (a second agy session is started); the two replay cases pass on both. Not tried: a real Codex session with a sub-agent message arriving mid-sampling against a real agy; the fake reproduces the request shape the issue describes. Part 1 (history seed through systemPrompt.append, opt-in) is not in this change. |
||
|
|
75068043af |
agy-cli 0.1.82: each account lists the models agy offers it, not the last account's (#1229)
The cached `agy models` list and what agy acp offers a client were one set of module globals. With several accounts on different plans, the last session or probe of any account replaced them, so every account's models() listed that account's models and the catalog flipped as requests went by (#1229). - The catalog, the offered set and the refresh/probe state are now kept per account home (currentHome(), "" for agy's own). magpie asks each account's models() in that account and serves the union, and already sends a model only to an account that lists it. - A Proc remembers the account it was started for, and the offer probe remembers its account at the start, so what agy says later is noted for that account even outside its scope. - models.json keeps agy's own account under the executable's path as before; another account's entry is "<path>#<home id>". - provider.warming() waits on every account's listing and probe, and again for a probe a landing listing starts. - A new account's static start no longer replaces the usage reader's rows from another account's real list; a changed agy still does. Run (mote, HOME=$(mktemp -d)): - bun test in packages/agy-cli: 37 pass, 0 fail (test/catalog.mjs 34 of 34 under node --test too). - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new test: red ("#1229 每个账号列自己开放的型号,互不覆盖"). Not tried: two real agy accounts on different plans (none here); the test fakes them with a per-HOME offered list. |
||
|
|
83a677177b |
agy-cli 0.1.81: agy's "Verification Required" is a 403 that says how to verify
kidgpt on X (Windows 11, Claude Code in VS Code, gemini-3.8-flash) got the bare text "Verification Required" as the model's answer. agy 1.5.9 turns Google's 403 VALIDATION_REQUIRED into that line (utils.CustomUserErrorMessageFromHTTPError, read from the binary) and ends the turn with "\n⚠ Verification Required\n", which the bridge didn't know, so it went out as a successful reply. - The ending is a sixth agent-error marker. The turn fails as a no-retry 403 permission_error (stream error event and HTTP 403 with x-should-retry: false, as #1201's banned account), in the words magpie's gateway reads as Google verification ("this Google account needs to be verified: open <link> in a browser"), so magpie rests the account as needing verification and shows the link. - The link comes from agy's log for the turn (validation_link / validation_url, or the "in your browser to continue:" line) when there is one; otherwise the message says to open the Antigravity app or run agy signed in to the account. - Sibling: agy's eligibility refusal for the same cause ("Please verify your account in your browser to continue:\n<url>", "Verification required. Please complete verification…", from AuthStatus.EligibilityError / IneligibilityFromResult) got the region/VPN advice and lost the URL in agyRefusal (models, sign-in probe). It now gets the same verify message with agy's link. - A model quoting the line with more text after it keeps its text. Run (mote, temp HOME): node --test test/repeat-batch.mjs test/usage.mjs 95 pass; bun test packages/agy-cli 37 pass 0 fail (smoke.mjs included); bun scripts/check.mjs agy-cli ok. Windows (xiaomi-gpu, win-run): repeat-batch, usage, windows-nc, platform 120 pass 0 fail. Red on the old code: with origin/main's index.mjs and usage.mjs the two new ending tests fail (a 200 reply) and the agyRefusal test gets the VPN advice. Not tried: a real account Google wants verified; the exact log line agy writes for a VALIDATION_REQUIRED turn (the fixture follows Google's JSON error's validation_url). |
||
|
|
f6cf4512dd |
agy-cli 0.1.80: forked sessions and subagents are kept apart by x-magpie-session and x-magpie-subagent (#1217)
Derive a session scope from x-magpie-session (magpie's synthetic magpie-<24hex> id ignored, capped at 128) and x-magpie-subagent (capped at 64), from init.headers or a Request's headers, and key conversations, live-session reuse, clientSeen and tool-result matching by it. A forked session or a subagent carrying its parent's tool_use history no longer collides with the parent's convKey or toolCalls (409 conflicting duplicate result, lineage_fork superseding the parent's pending turn). A body given only on a Request is read from it. Contributed by @wjhauannn. Run at 46fce29f (mote, macOS, HOME=$(mktemp -d)): - node --test repeat-batch.mjs conversation-key.mjs: 97 pass, 0 fail. - bun test packages/agy-cli: 37 pass, 0 fail. check.mjs agy-cli: ok. - CI: test, bumped, on-npm green. Broken by hand: origin/main's index.mjs with the new tests: 5 fail (55, 56, 57, 59, 60). Checked against magpie main: the gateway sets x-magpie-session (sessionOf) and x-magpie-subagent (subOf) on plugin requests only. A spare takes the scope through #assign on adopt. Not tried: a real agy account with a forked Claude Code session. |
||
|
|
aafb20e6bf |
agy-cli 0.1.79: agy models runs with modelProvider cleared, so a gemini settings.json doesn't keep a stale list (#1218)
A turn runs agy acp on the bridge's folder and the Google sign-in, but the
listing, refusal and sign-in probes ran a bare `agy models`, which reads
the user's own settings.json. With "modelProvider": "gemini" there (an AI
Studio key), the listing failed without GEMINI_API_KEY in magpie's
environment and the old catalog stayed, or listed API-key mode's models.
- agy 1.5.9's global --settings takes a session-only settings.json object.
The three `agy models` calls run as
`agy --settings '{"modelProvider":""}' models` when agy's --help lists
--settings (asked once per binary, cached by path, mtime and size like
acpHelp); an agy that doesn't list it gets the bare command, as before.
The reporter checked that this command goes back to the Google backend.
- testkit's fake answers `agy --help` and records each models spawn's
args; its models behaviour sees them.
Run (mote, HOME=$(mktemp -d)):
- node --test on every node test file in packages/agy-cli/test: all pass
(catalog 33, repeat-batch 54, usage 36, usage-settlement 40, ...).
- bun test packages/agy-cli: 37 pass, 0 fail (cp-hook and smoke are
bun-only).
- bun scripts/check.mjs agy-cli: ok.
Broken by hand: origin/main's index.mjs with the new tests: the --settings
test fails (32 pass, 1 fail).
Not tried: a real agy with a gemini settings.json (the local agy account
answers 403); the flag's effect is the reporter's run. Not changed: with a
file sign-in, acp itself still reads the user's settings.json (no
--gemini-dir there).
|
||
|
|
9720caa468 |
agy-cli 0.1.78: a banned account's ending is a no-retry 403, not an answer (#1214)
agy 1.5.9 writes a banned account's "PERMISSION_DENIED (code 403): This service has been disabled in this account for violation of Terms of Service…" ending into the reply as text, and the bridge answered it as an end_turn 200 (#1201). The exact ending is now one of the end-of-turn markers (split across chunks too), agyRefusal names it, and it ends the turn as permission_error 403 with no retry: x-should-retry: false on a non-stream reply, status 403 + noRetry in a started stream's error event. A generic PERMISSION_DENIED, or the sentence quoted mid-answer, is not reclassified. By yetihan. Run at the reviewed head f4e82352 (mica, temp HOME): - node --test test/repeat-batch.mjs 54 pass; test/usage.mjs 36 pass. - bun test packages/agy-cli 37 pass; bun scripts/check.mjs agy-cli ok. Broken by hand: origin/main's index.mjs and usage.mjs with the new tests: the two #1201 bridge tests and the agyRefusal test fail. Not tried: a real banned account. |
||
|
|
2ac7af2a39 |
agy-cli 0.1.77: release 3781c50f's documents
|
||
|
|
3781c50f52 |
agy-cli 0.1.76: a URL or text document goes to agy as text, not a 400
daoche_wuzui on X (magpie 0.1.4264): URL context through agy-cli failed
with "a binary or URL document block in a user message (agy's ACP prompt
accepts text and images only) is not supported". The bridge turned away
every document that wasn't a text source.
agy 1.5.9's initialize says promptCapabilities {image, embeddedContext},
and its binary has only messages.EmbeddedResource.InlineText: an embedded
resource reaches the model as inline text, so a binary file can't be
carried. What can, now is (documents.mjs):
- a URL document (http/https): its URL, said to be unread, so the model
fetches it with the client's tools instead of guessing;
- a base64 document of a text type (text/*, JSON, XML): its decoded text,
when it is valid UTF-8;
- a PDF or other binary inside a tool_result (Claude Code's Read of a
PDF): a note that it couldn't be attached and to extract its text with
a tool, so the turn goes on instead of failing.
Still refused, with what to do: a PDF attached to the user message ("paste
the document's text, attach its pages as images, or let the agent read the
file with a tool"), a Files API file_id (send it inline), a non-http URL.
There is no PDF-to-text helper here or in magpie to extract it with.
Neither note names agy, the bridge or magpie.
Run at this tree (mica, HOME=$(mktemp -d)): packages/agy-cli bun test 37
pass 0 fail (new test/documents-unit.mjs, 15 checks); smoke ALL OK (381
checks); bun scripts/check.mjs agy-cli ok.
Broken by hand: smoke with 0.1.75's index.mjs: 3 FAILURES (the URL/text
document, the PDF 400's hint, the PDF in a tool_result).
Not tried: a real agy model. The owner's agy account answers "This
service has been disabled in this account for violation of Terms of
Service", so the fix was checked against the fake agy only. The
reporter's client isn't named in the tweet.
|
||
|
|
481ec997a5 |
agy-cli 0.1.76: a tool result buried under a client's own notice settles the round, not tool_state_conflict (#1208)
A client that answered the bridge's pending call and then wrote an assistant notice of its own and a new prompt (Hermes Agent's "This turn did not complete…" closer) carried the result in history, not the trailing. With no trailing results the request took the acquire path, lineageVerdict saw the carried tool_use and answered 400 tool_state_conflict on every resend until the 30-minute result timeout. Now, when every call of the pending turn that the request carries has a tool_result after it, the round is settled on the client's side: the turn is superseded (logged as lineage_answered) and the request replays as a new session, the buried result and the new prompt included. A carried call with no result is still a terminal conflict. Reported by 1468323775 with the exact request shape and a live repro. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli: bun test: 36 pass, 0 fail (smoke 382 checks). - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new smoke checks: 3 fail, with the reporter's 400 tool_state_conflict body. Not tried: a real agy account (the local one answers 403) or Hermes Agent itself. The live session's prompt cache is not kept on this path: it replays as a new session, as an interrupted round already does. |
||
|
|
6514f69e62 |
agy-cli 0.1.75: release #1202
Releases wjhauannn's #1202 (
|
||
|
|
3d9ac97f91 |
agy-cli 0.1.74: a turn the conversation went on without is replayed at once, not after two 409s (#1051)
NieiR's logs on #1051 (agy-cli 0.1.69, agy 1.5.9, OpenCode through a routing group of google, devin, neko and agy-cli): agy-cli left a turn detached with 5 pending calls at 13:51:47, the group served the next 16 requests on google and neko, and at 14:07:36 google's 429 failed back to agy-cli with google's own tool round at the tail. None of those ids were agy's, the held turn was neither stale nor expired, so the request got 409 "no active MCP call matches these tool results" twice and was replayed only at the third try (NO_PROGRESS_REPEAT_LIMIT). movedOnVerdict counts such a turn as stale ("moved_on") on the first request: its calls are pending, at least one of its calls is in the client's history, and after the last of them comes an assistant tool round whose ids don't have the bridge's shape (toolu_ + 24 hex). It is asked in the unmatched-results path and again under the lock in recoverStaleTurn, so the reclaim and replay are the existing ones. Left as before: a sibling request that only leaves the turn's calls out (a side request, a compaction fork) still gets 409 and needs three, as smoke.mjs's "unmatched results alone cannot supersede" and A7 check; a later round with ids of the bridge's shape is not taken as moving on. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli bun test (all suites, smoke included): 36 pass, 0 fail; repeat-batch.mjs alone: 48 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new tests: the moved-on request answers 409 (the first new test fails); the own-shape test passes on both. Not tried: a real routing group failing over to real agy. |
||
|
|
369643183f |
agy-cli 0.1.73: a batching call Hermes split into one call per entry is folded back (#1150)
NieiR traced a Hermes Agent turn (agy 1.5.9, chat/completions) that ended in 409 "some tool results do not belong to the active response" (#1150): agy called Hermes' batching tool once, tool_call({calls: [4]}), and Hermes wrote it into its history as four tool_calls of one entry each. The first kept the bridge's toolu_ id; the other three got call_<hex> ids of Hermes' own, each with a result. Only the first matched a bridge call, so the round was refused and Hermes gave up the turn. foldSplitCalls, run on the canonical body before anything reads it, folds such a round back into the one agy made: the calls' array field joined in order under the first (bridge) id, and their results joined in order as that call's one result (an error only if every part was). It folds only when a run of same-named calls opens with a bridge id (toolu_ + 24 hex), every other id is not one, every input is an object with the same single array field, and either every call has its result or none has (a round still waiting). Two calls the bridge made itself are never folded. README (zh, en) says so. Not in this change: NieiR's second finding, that #selfPollCapped stays off for a turn once any of its calls was seen by the client, so an orphaned turn keeps generating every 150s until the 30-minute result timeout. Left for its own commit. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli bun test (all suites, smoke included): 36 pass, 0 fail; repeat-batch.mjs alone: 46 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new tests: the split round answers 409, as reported; the never-fold test passes on both. Not tried: real Hermes Agent against real agy. The test drives the bridge through its real entry points with a fake agy. |
||
|
|
9e86a2c7b7 |
proc: a Linux zombie no longer holds a lock (#1198)
yetihan (#1198): a lock whose owner is a Linux zombie was held for good. process.kill(pid, 0) succeeds on a zombie, so 15 packages' lock and liveness checks counted an exited, unreaped owner as alive. - scripts/proc.mjs: processStatus(pid) is dead on ESRCH, and on Linux also when /proc/<pid>/stat says Z or X; EPERM is "permission", any other error "unknown". processAlive / processExists keep each caller's old EPERM and unknown-error meaning. - scripts/sync-proc.mjs copies it into each package (--check in the tests); every package's own check keeps its old semantics, now with zombies dead. agent-console's daemon bundle and window-warmup's dist are rebuilt. - 15 packages bumped. Review run at 28ef6622 (mote, HOME=$(mktemp -d)): - node scripts/sync-proc.mjs --check: ok. - bun test (whole repo): 8934 pass, 0 fail. - bun scripts/check.mjs: every package ok. - window-warmup's build reproduces its dist/plugin.js byte for byte. agent-console's bundle diff read line by line: the proc module plus esbuild's renumbered imports, nothing else (esbuild isn't installed on mote, so it wasn't rebuilt there). - Real zombie on Linux (WSL, magpie-desktop): a bash child left unreaped by an exec'd sleep, /proc stat "Z": the old kill(0) check says alive, processStatus says dead; the running process says alive. Not tried: each package's lock contention end to end. |
||
|
|
0b0b180957 |
agy-cli 0.1.72: Orchestrator isn't listed, since through the bridge it is its planner alone
@jiangnan_ on X (magpie 0.1.4283, agy 1.5.9): "Orchestrator (Carbon)" through the bridge is single Carbon with no effort levels and no limits. Orchestrator pairs a planner (Carbon or Argon) with Gemini 4 Hydrogen, which applies edits and runs builds with agy's own tools (Antigravity's models page). The bridge's agent has tools: [] so the client's tools are the only ones, and the handoff can't happen. Making it work would mean agy editing the disk outside the client, which the bridge exists to avoid. So: - gemini-pro-orchestrator* rows (or names starting "Orchestrator") are left out of the listed and the routed catalog. - A request naming one gets a 400 (no retry) naming the model it would really run: gemini-4-carbon, or gemini-4-argon for -argon/-g1-pro, which have their effort levels and limits. - Limits for the families that had none, from sourced numbers: claude-sonnet-4-6 / claude-opus-4-6(-thinking) 250000/64000, gemini-3.5-flash 1048576/65536 and gemini-3.1-flash-lite 1048576/65535 (Antigravity's own model list, magpie's testdata/antigravity-models-2026-10-20.json); gemini-4-hydrogen 1048576/65536 (Google's own API listing in models.dev). Hydrogen's four efforts already grouped. gemini-3.6/3.7-flash and gemini-3-flash-preview stay without limits: no source names theirs. Run (mote, sandbox HOME): bun test packages/agy-cli/ 36 pass; bun scripts/check.mjs ok. Broken by hand: the new catalog test against origin/main's index.mjs is red (Orchestrator listed, no Hydrogen limit). Not tried: no Ultra or Pro account here (the owner's is free tier), so no real Orchestrator, Carbon or Hydrogen request was sent, and the planner-only behaviour is from the docs and the bridge's tools: [], not observed. |
||
|
|
d7265c17e4 |
agy-cli 0.1.71: a new conversation takes a spare agy that is already started
A new conversation spawned `agy acp` and waited for initialize before session/new. Now, after a conversation starts, the plugin warms one spare agy for the same account, binary, folder, flags and environment: spawned and initialised, with no session. The next new conversation for that key opens its session on the spare and skips agy's start. Then another spare is warmed. Only the process is warmed. On WSL with agy 1.5.9, measured through a logging HTTPS proxy, spawn + initialize + 45s idle made no connection to any host. session/new is where agy sends Code Assist calls (loadCodeAssist, fetchAvailableModels, quota, user info, experiments), plus telemetry. Closing an unused session writes its trajectory ACLs at Google. Sessions also carry the conversation's own instructions. So sessions are never opened ahead. agy reads its sign-in at session/new, so a spare picks up a sign-in that changed after it started. Spares are stopped when idle (IDLE_MS), first when the pool needs room, never warmed when the pool has one slot left, at most 2 at a time, and with the host (reapOnExit). agy also exits when its stdin closes. AGY_BRIDGE_SPARE=0 turns them off. TTFT of a second new conversation (test kit fake agy, initialize 1000ms, session/new 3000ms): first 4026ms, second 3008ms; before, both ~4s. Real agy start, measured on WSL: ~1s cold, ~0.25s warm. That is the saving. The ~3s session open (Google) and model latency remain. Run (mote): - test/spare.mjs on the old index.mjs (AGY_BRIDGE_TEST_INDEX): 6 of 7 red, only the AGY_BRIDGE_SPARE=0 case green. On the new index.mjs: 7 of 7 green. - `HOME=<sandbox> bun test packages/agy-cli/`: 36 pass, 0 fail. - `bun scripts/check.mjs` ok. The test kit defaults AGY_BRIDGE_SPARE=0 so suites that count spawns keep their counts. Not tried: a real signed-in account through the spare path, native Windows agy, macOS agy. |
||
|
|
175dfd2555 |
agy-cli 0.1.70: say when Google refuses the account (#3501) instead of a fallback list
Three X reports (16 Nov): "You do not have a valid license of this product (#3501)", "models can't be fetched", and "magpie's agy proxy stopped working". agy 1.5.9 gets Google's 403 #3501 on its eligibility check and fails every command with it (agy models, agy -p). The plugin hid it: models() fell back to the static catalog as if the account had those models, usage said only "not eligible", and a request got 400 "model ... is unavailable to this agy account" because the ACP session offers none. Now: - usage.mjs: agyRefusal() reads Google's refusal out of agy's output (#3501 first, else the eligibility line), never from agy's own log lines or a network failure; usage reports the #3501 text with what to do (update agy and sign in again, personal Gmail, unset AGY_ADC_AUTH, VPN/region). - index.mjs: a failed `agy models` records the refusal per agy home; models() throws it (magpie shows it as the list error) instead of the static catalog, and recovers when agy lists again. A request whose session offers no model, or whose turn ends on the refusal, answers 403 permission_error with the reason (stream and JSON), not 400. After a sign-in, magpie shows "agy signed in, but" and the refusal. - README (zh, en): a Troubleshooting entry for #3501. Run (mote, HOME=$(mktemp -d)): - bun test ./packages/agy-cli: 35 pass, 0 fail (110s); bun scripts/check.mjs ok. - test/usage.mjs with cp-hook preload 6 more times: 0 fail. One earlier run had "a direct read that fails leaves the region refusal standing" red with "agy usage could not start the CLI" at load ~28; the same red shows on the base tree ( |
||
|
|
99b042def4 |
agy-cli 0.1.69: a region agy refuses still has its quota read
01dadada on X: "额度读取有问题。绕过查额度前询问地区限制就可以查到". agy
1.5.9's print mode waits for its eligibility verdict before any command,
/usage too. Where loadCodeAssist names an ineligible tier
(UNSUPPORTED_LOCATION) and no current one, agy prints {"status":"ERROR",
"error":"Eligibility check failed: Your current account is not eligible
for Antigravity, because it is not currently available in your
location."} and exits 1, though its own retrieveUserQuotaSummary had
already answered 200. Recorded through CLOUD_CODE_URL and a proxy that
rewrote loadCodeAssist's reply that way.
When agy refuses /usage for eligibility (not "Eligibility check failed:
EOF", a network failure), usage.mjs now makes agy's two requests itself:
POST /v1internal:loadCodeAssist {"metadata":{"ideType":"ANTIGRAVITY"}},
then /v1internal:retrieveUserQuotaSummary {"project":<its
cloudaicompanionProject>}, with agy's stored sign-in (signin.mjs
storedToken, the keyring or the account's token file), agy's User-Agent
(antigravity/cli/<version> (aidev_client; os_type; arch; cl;
auth_method)), Content-Type and Accept-Encoding gzip, at CLOUD_CODE_URL or
daily-cloudcode-pa. An access token under two minutes from its end is
renewed in memory with agy's client and never written. Any failure of
that read leaves agy's refusal as the error, with no windows: unknown,
never 0 or full. Users whose check passes: unchanged path.
Run:
- packages/agy-cli test/usage.mjs on mica: 35 pass.
- the new tests on the old usage.mjs (stub exports added so it loads):
the region test is red (result.error set, no windows), as are the UA
and renewal tests; the two "stays unknown" tests pass on both.
- packages/agy-cli `HOME=$(mktemp -d) bun test` on mote: base 35/35,
this change 35/35 (both on base 1260b2ba; the rebase onto
|
||
|
|
9907c187b2 |
agy-cli 0.1.68: bring in the retired Antigravity plugin's accounts
A user asked on X (@tongzhenbao) to move the accounts signed in on the
retired Antigravity plugin (provider "antigravity") into agy-cli in one
click. That plugin signed in with Antigravity's own Google OAuth client
(1071006060591-tmhssin2h21lcre235vtolojh4g403ep), and agy's own
`agy acp --login` link uses the same client id, so agy can take those
refresh tokens as its own: nothing is sent anywhere agy doesn't already
send its sign-in, and no other client is spoken for.
auth.import (magpie's "Import accounts from a file…") now takes:
- the old plugin's saved oauth entry, one, a list or plugin-auth.json's
map of them (refresh "<token>|<project>", accountId = email);
- agy's own token file / keyring value (go-keyring-base64: prefix too).
A bare refresh token or another tool's export is refused, since it may be
another client's. Each account gets its own agy home with the token file
agy writes (0600), and is added only once `agy models` runs there; one agy
refuses leaves no home. An account already signed in (same email) gives
its existing key back.
Run:
- mote: packages/agy-cli `HOME=$(mktemp -d) bun test`: smoke, signin,
cloak, install all pass; test/usage.mjs red (3 of 30, different each
run) and red the same way on pristine origin/main
|
||
|
|
e5cb9598c8 |
agy-cli 0.1.67: more than one Google account, each with its own usage
tongzhenbao on X wanted several accounts with their usage, as the old built-in had. agy keeps one sign-in where it looks for it (the system keyring's single "gemini"/"antigravity" entry), so the plugin was single: true and its second sign-in way replaced the account. Now the first account is agy's own, unchanged, and "Add another Google account" signs another one in to an agy whose home is the account's own (XDG_STATE_HOME/magpie-agy-bridge/accounts/<id>). Every agy run for that account (sign-in, models, usage, requests) gets HOME (USERPROFILE on Windows) there and SSH_CONNECTION set, which agy 1.5 reads as an SSH session and so keeps the sign-in in .gemini/antigravity-cli/ antigravity-oauth-token under that home rather than the keyring. The account's home is saved in its metadata (agyHome); the loader, usage and models run its work in an AsyncLocalStorage scope that childEnv and the stored sign-in read follow. Its conversations are keyed apart, and it gets no --gemini-dir (its token is under its own .gemini). single: true is gone, so each account has its own row and usage and rotates like any other. Checked by hand before writing it, with real agy and planted (expired) tokens in sandbox homes: agy read the file token from the sandbox HOME on macOS (mote) with SSH_CONNECTION set, on Windows (xiaomi-gpu) with USERPROFILE set, and in WSL. The live keyring was never touched. Run: - packages/agy-cli `HOME=$(mktemp -d) bun test` on mote: 35 pass, 0 fail. - bun scripts/check.mjs on mote: ok. - test/smoke.mjs on Windows (win-run): ALL OK (369 checks). - Broken by hand: the new smoke checks against the old index.mjs, signin.mjs and platform.mjs: 6 FAILURES (the method, single, the home, SSH_CONNECTION, the saved account, the failed home's cleanup). Not tried: a real Google sign-in of a second account, so agy writing the token file under SSH detection is known from file-mode users (plugins#1165) rather than seen here. Signing an added account in again makes a new home and leaves the old one (~800K). Every account shares one model catalog. |
||
|
|
0262214e67 |
agy-cli 0.1.66: a display name two families share names neither (#1180)
model-ids.mjs's nameIndex said "one name, two families: no match" but kept whichever family came first: the check in its first loop read the index before anything was in it. Names are now collected with every family that claims them, and a name claimed by more than one maps to nothing, so a usage window never names the wrong family's ids. Also drops the unused groupNoDesc helper from test/usage.mjs. Both were noted in #1180's review. Run on macOS (mote), CI-style with a temp HOME: bun test packages/agy-cli, 35 pass, 0 fail; bun scripts/check.mjs agy-cli passes. Broken by hand: with #1180's model-ids.mjs and the new test, the test fails (34 pass, 1 fail). Not tried: a real agy catalog with a shared name (none is known today). |
||
|
|
f4c2f2fb2b |
agy-cli 0.1.65: usage windows name the model ids they cover (#1180)
A usage window from `agy usage` now carries the model ids it covers, taken from the catalog `agy models` listed: each display name in the group's "Models within this group:" line (or the group's own name) maps to the family id and every effort variant the catalog serves. With no catalog yet, or a name the catalog doesn't have, a window has no ids. The windows stay aside, so routing is unchanged; agy-cli 0.1.65. Run at 8acf7ffb5 on macOS (mote), CI-style with a temp HOME: bun test packages/agy-cli, 35 pass, 0 fail; bun scripts/check.mjs agy-cli passes. Not tried: a real agy account (the local one answers 403). Co-authored-by: Ruining Yang <ArmedHelicopter@users.noreply.github.com> |
||
|
|
2ede7d53c1 | agy-cli 0.1.64: startup diagnostics aren't sign-in talk (#1177) | ||
|
|
74998a9232 |
agy-cli 0.1.63: run_command's toolSummary no longer collides with agy's own (#1174)
Releases
|
||
|
|
b840915abc |
agy-cli 0.1.62: magpie's sign-in installs agy where there is none, and the plugin keeps that copy current (niuniu_8964 on X)
In magpie's Docker image there is no agy, so Sign in failed with "agy CLI not found". The plugin now declares auth.cli (magpie 0.1.4246's hook, engines.magpie raised to it): when agy isn't found, magpie's sign-in shows "Installing Antigravity CLI…" and the plugin installs it the way Google's install.sh does: the same manifest, the download checked against its sha512, the antigravity binary taken out of the tarball, tried with --version, then renamed into place. It goes into the data folder ($XDG_DATA_HOME/magpie-agy-cli/agy, ~/.local/share without it, %LOCALAPPDATA% on Windows), which in the container is on /config, and is searched last, so an agy the user installed wins. That copy is kept current a minute after start and every 6 hours, only while it is the one in use and not when AGY_CLI_DISABLE_AUTO_UPDATE is set. Also: findAgy handed out a cached path to an agy removed since, so the sign-in tried to spawn it (ENOENT) instead of installing it; and a write loop left an error listener per wait (MaxListenersExceededWarning on the 260MB download). Account code is unchanged. Run, on mica: bun scripts/check.mjs ok; agy-cli bun test 34/34 under a temp HOME (install.test.mjs: 10, against a local server). A6b red on the old findAgy, green now. Real use in magpie's Docker image (xiaomi-gpu, linux amd64), with magpie 0.1.4246's tree: `magpie plugin login agy-cli 1` and the browser UI's POST /api/plugin-signin both installed agy 1.5.9 into /config/data/magpie-agy-cli and went on to agy's Google link; it survived a restart; agy.version set back to 1.5.0 was updated a minute after start. Not tried: finishing the Google sign-in in the container, a real install on macOS, Windows or musl. |
||
|
|
e4c825b554 |
agy-cli 0.1.61: picks stick, and a second Google account can be signed in
Archivemylife on X: "没法sign in第二个账号,点击sign in again后过一会就
恢复原状,没有任何报错" and "配置后报存提示成功,再打开还是全部都启用".
Picks: while agy's model list wasn't known yet (agy missing, signed out,
or the probe still running), the models hook served the static or
Gemini-only catalog as if it were the real list. magpie relisted on
that, dropped the user's picks that weren't in it, and the editor came
back with every model on. The hook now marks such a list with
Symbol.for("magpie.fellBack"), so the host keeps the last good list and
the picks.
Second account: "Sign in again" with agy already signed in succeeded at
once with the stored sign-in, so nothing changed and nothing said why.
agy holds one Google account in its keyring. A second method, "Switch to
another Google account (agy holds one)" / "换一个 Google 账号(agy 只能
登录一个)", always runs agy's Google login, which replaces the stored
account. The sign-in result carries the stored id_token_email, so the
account is named by its email instead of "API key", and a switch shows.
READMEs say agy keeps one account.
magpie needs no change: it already keeps the last good list for a list
marked fell back, and shows a method picker for two methods.
Run:
- packages/agy-cli bun test (HOME=mktemp -d): 24 pass, 0 fail.
- test/smoke.mjs (AGY_BRIDGE_STORED_SIGNIN=skip): all ok.
- Red on the old index.mjs/signin.mjs with the new tests: signin red
(emailOf missing), catalog 3 fail (the three new tests), smoke BAD on
the two-methods check.
- Plugins root bun test (HOME=mktemp -d) on Linux (wsl-run,
magpie-desktop) at this tree: 8754 pass, 19 skip, 0 fail.
- Real magpie GUI in a sandbox HOME with this plugin installed: picked
two models, deleted the plugin's models.json and killed the plugin
host, POST /api/provider/models: before, count 2 and the pick
dropped; after, count 5, the pick kept, nothing delisted. "重新登录"
shows both methods in en and zh, no page errors, and the account is
named by its gmail address.
Not tried: signing a real second Google account in (it would change the
live agy keyring), Windows and Linux agy.
|
||
|
|
baeb95a43e |
agy-cli 0.1.60: the client's system prompt goes in the first turn, not appended to agy's
bzs_1 on X (on 0.1.58): with an agent's system prompt the request is answered 429; with agy's own prompt alone it works. The bridge sent the client's system prompt as session _meta.antigravity.systemPrompt.append, which reaches Google inside the system instruction, and Antigravity turns away a growing set of identity lines there (#1151): reworded ones too ("You're an interactive agent ..."). The user-turn cloak's own record shows only Codex GPT-5 lines refused in a user turn. Now the prompt goes in the first user turn as <external_system_instructions>, through the same outgoing rewording and user cloak as the rest of that turn, and agy's system instruction stays its own. AGY_BRIDGE_SYSTEM_APPEND=1 brings the append back. A parked session records instructionsInSession, and one parked under the other route (or before this field) is not resumed, so a session never ends up with the prompt in both places or in neither. 0.1.59's 400 for a turned-away prompt ( |
||
|
|
84c2a47949 |
agy-cli 0.1.59: a turned-away system prompt fails as a 400, not a 429 the client retries (#1151)
KevinXC5's run on 0.1.58: the bridge called the refusal an invalid_request_error, but magpie logged it as a 429 and Claude Code answered with api_retry, rate_limit, every 60s up to 9 times. A stream's error event carried only type and message, and magpie's gateway takes a stream error's status from the error's own status field first and its words after (namedStatusOf); the message quotes Antigravity's "RESOURCE_EXHAUSTED (code 429)", so the words won. streamErrorOf now gives an invalid_request_error status 400, in the SSE error event and in a whole (stream: false) reply, which was a 502. A rate_limit_error and every other kind go as before. Run: bun test in packages/agy-cli on mote, 24 pass (the smoke test's new #1151 checks: the turned-away event has status 400, a whole reply is a 400, a plain quota 429 still has no status); bun scripts/check.mjs agy-cli ok. Broken by hand: without the status line both #1151 checks fail (the whole reply came back 502). Read: magpie origin/main's upstream.go and fallback.go take a numeric error.status before the words. Not tried: a real Antigravity request (the local agy account answers 403), nor a real Claude Code against the gateway. Kevin's 0.1.58 run also shows a second line of Claude Code's prompt still matched; that is not fixed here. |
||
|
|
f4498713fa |
agy-cli 0.1.58: Claude Code's identity line goes as "You're …" (#1151)
KevinXC5 bisected Claude Code 2.1.325's system prompt on a real
Antigravity account: "You are Claude Code, Anthropic's official CLI for
Claude." alone brings the bare 429 back, 3 of 3, while "You're Claude
Code, …" and "This agent is …" pass. It is now in TURNED_AWAY and
reworded with the same "You're" rule as the other agents' lines; the
prefix match covers the Agent SDK variant (", running within the Claude
Agent SDK.") too.
Left out: "You are an interactive agent that helps users with software
engineering tasks." It isn't in the Claude Code binary here (2.1.316) or,
by Kevin's reading, in 2.1.325, so it isn't the line Antigravity matches.
Run: bun test in packages/agy-cli on mica, 24 pass; bun
scripts/check.mjs agy-cli ok. Broken by hand: with the TURNED_AWAY line
removed, the new test fails (23 pass, 1 fail).
Not tried: a real Antigravity request. The local agy account answers 403
(disabled), so this rests on the reporter's bisect.
|
||
|
|
7e14fabef1 |
agy-cli 0.1.57: DeepSeek Harness's first line goes as "You're …" (#1171)
Antigravity answers a bare 429 to "You are an AI agent powered by DeepSeek Harness.", DeepSeek Harness's first system prompt line, whatever quota is left. The reporter (huangzhenhao90) bisected it on a real account through agy on gemini-4-hydrogen: the line failed, while "powered by DeepSeek." alone, "an agent" for "an AI agent" and "You're …" each went through. cloak.mjs now rewords it as "You're …" and hint() names DeepSeek Harness. Run: on mote, bun test in packages/agy-cli (23 pass) and bun scripts/check.mjs agy-cli (ok). Broken by hand: without the new TURNED_AWAY line, the new cloak test fails. Not tried: a real request myself. agy on this machine answers 403 (the account is disabled), so the evidence is the reporter's real-account table. |
||
|
|
f91552564e |
agy-cli 0.1.56: cloak.mjs says it is the only copy now (comments only)
|
||
|
|
f7fc6641c5 |
agy-cli 0.1.55: with agy's sign-in in a file (no keyring, Docker), agy stays on its own folder (#1165)
0.1.54 (#1166) started agy acp with --gemini-dir pointing at a folder of the bridge's own, which keeps the machine's skills out. That assumed agy's Google sign-in lives in the system keyring. Where there is none (a Docker container, Linux with no D-Bus session), agy keeps it in ~/.gemini/antigravity-cli/antigravity-oauth-token instead. The bridge's folder had no sign-in, and every request failed "session/new failed: Authentication required". shawn8888 reported it on #1165 from ghcr.io/yetone/magpie with agy 1.5.9. Now, when that file exists and AGY_BRIDGE_GEMINI_DIR names no folder, no --gemini-dir is passed, and agy uses its own folder and sign-in. --include-default-customizations=false is still passed. A folder the user names is still used. Run (mica, node --test test/repeat-batch.mjs test/usage-settlement.mjs, temp HOME): 83 pass, 0 fail. bun scripts/check.mjs agy-cli: ok. Broken by hand: without the file check, the new "#1165 … stays on that folder" test fails (1 pass, 1 fail). Not tried: a real Docker container with agy. The token file's path is the one the reporter saw. |
||
|
|
3238ab8518 |
agy-cli 0.1.54: agy runs in the bridge's own --gemini-dir, so the machine's skills stay out (#1166)
0.1.52 passed --include-default-customizations=false, but on Windows
(agy 1.5.9) agy still loaded all 120 of the reporter's skills: a 56,790 B
<skills> block in its gen_metadata, and task, shell and four more client
tools dropped over the 20,000-token budget. The reporter (kanzaki-chiya)
found that --gemini-dir pointed at an empty folder of the bridge's own
leaves the skills and global MCP servers out, with every client tool
listed and shell/task calls working end to end.
So when `agy acp --help` lists --gemini-dir, a turn's agy gets
<XDG_STATE_HOME or ~/.local/state>/magpie-agy-bridge/agy-home, made
before agy starts and kept across restarts so session/resume finds the
conversation. agy's Google sign-in is in the system keyring, not that
folder. Step usage reads the conversation DB from the same folder.
AGY_BRIDGE_GEMINI_DIR names another folder; "default" leaves agy on its
own ~/.gemini. The model probe and `agy models` are unchanged. One
`acp --help` per binary answers both flags.
What happens to old data: a session parked before this update was in
~/.gemini, so its resume fails once and falls back to session/new, as a
resume that fails does today.
Run on mote: node --test test/repeat-batch.mjs test/usage-settlement.mjs
(81 pass), bun test in packages/agy-cli (22 pass), bun scripts/check.mjs
agy-cli ok. test/smoke.mjs prints the same 29 BADs and crash at
origin/main
|
||
|
|
fc941f6e1c |
agy-cli: Codex's GPT-5 lines go reworded in a user's turn too (0.1.53)
pocoxliu on X (tweet 2121731813270077946) gets 429s from agy-cli under Codex and Claude Code and put it down to unslimmed system and MCP prompts. It is content, not size (#1151: a neutral system prompt of the same 66,622 characters went through). Since 11-14 Antigravity also turns away Codex's two GPT-5 lines ("You are Codex, (a coding) agent based on GPT-5") in a user's turn; magpie's cloak and the antigravity plugin ( |
||
|
|
57d1cc6a9f |
agy-cli: start agy without the machine's own skills when it can (#1166)
On Windows with agy 1.5.9, a session loaded 120 local skills from ~/.gemini/skills, ~/.gemini/config/skills and ~/.agents/skills although the bridge agent says inheritCustomizations: false. Skills and the client's MCP tools share agy's 20,000-token customization budget, so agy dropped the six largest client tools (task, shell, …) and three skills. agy 1.5.9's acp takes --include-default-customizations (default true). The bridge now passes --include-default-customizations=false when `agy acp --help` lists the flag. An agy without it exits on an unknown flag, so it is never passed blind. The answer is kept per binary (path, mtime, size); a probe that errors or times out is asked again. The bare `agy acp` model probe is unchanged. 0.1.52. Run: - bun test packages/agy-cli on mote (temp HOME): 21 pass, 0 fail; bun scripts/check.mjs agy-cli ok. - the same on Windows (win-run, xiaomi-gpu): 21 pass, 0 fail. - test/smoke.mjs alone with bun on mote: ALL OK (348 checks). - real agy 1.5.9 on macOS: `agy acp --help` prints the flag on stderr (exit 0); a session started with the flag set to false runs. Broken by hand: without the args.push in Proc.start, repeat-batch's "#1166 … asked once" test and smoke's #1166 check go red. Not tried: the reporter's Windows machine with its 120 skills. On this Mac the default run sent no user skills to the model either, so it is not shown here that the flag keeps them out; the reporter is asked to confirm. |