Commit Graph
108 Commits
Author SHA1 Message Date
yetone 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.
2026-11-18 09:30:40 +08:00
yetone 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.
2026-11-18 08:22:40 +08:00
yetone 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 34edf938): root bun test 9041 pass, 0 fail
(9061 tests, 634 files); bun scripts/check.mjs exit 0.
2026-11-17 23:59:29 +08:00
yetone 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.
2026-11-17 23:38:34 +08:00
yetone 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.
2026-11-17 19:25:36 +08:00
yetone 324acd6007 agy-cli: test DeepSeek Harness 0.2.2-rc.3's whole Web GUI prompt (fnckerpoi on X)
fnckerpoi on X still saw Antigravity's 429 with DSH 0.2.2-rc.3 at 16:58,
about an hour after agy-cli 0.1.88 / antigravity 0.2.2 cloaked its
browser sentence. test/dsh-0.2.2-rc.3-web-system.txt is that release's
Web GUI system prompt, captured from the real @deepseek-ai/dsh@0.2.2-rc.3
on mote (dsh web, Playwright typing "say hi", model "m1"). The new test
holds that outgoing() leaves no turned-away line in it, rewords only the
identity line, the browser sentence and the @-path paragraph, and keeps
every other line as written. No code change: the cloak on main already
passes it.

Real account (sandbox HOME, kumw95ya25), 11-17:
- raw prompt: 429 2/2 or 3/3 on gemini-3.8-flash, gemini-3.8-flash-high,
  claude-sonnet-4-6, claude-opus-4-6-thinking (direct Code Assist).
- outgoing(prompt): 200 on each of them; with DSH's 31 tools and its
  user messages too (gemini-3.8-flash, -high, claude-sonnet-4-6).
- through agy 1.5.10 and the agy-cli plugin, DSH's full request (system,
  31 tools, user turns): 200 "pong" 2/2 on gemini-3.8-flash and
  claude-sonnet-4-6, with 0.1.88 and with 0.1.87 alike.
- every string literal in DSH 0.2.2-rc.3's runtime packages (13,956,
  1.7MB, 43 chunks, bisected when refused) as the system instruction
  through antigravity 0.2.3's outgoing: no refusal; raw, only the Web
  GUI paragraph. The same strings as the user turn agy-cli sends, with
  no cloak: no refusal.

Run on mote, HOME=$(mktemp -d): bun test packages/agy-cli (40 pass),
bun scripts/check.mjs (ok). Broken by hand: with "provides" left as
written the new test goes red with the three it sits beside.
Not tried: DSH's TUI profile; a reporter's own AGENTS.md, skills or a
long history.
2026-11-17 17:46:07 +08:00
yetone 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.
2026-11-17 15:44:38 +08:00
yetone 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.
2026-11-17 03:56:04 +08:00
ump45nose 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>
2026-11-17 03:36:00 +08:00
ump45nose 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).
2026-11-17 03:33:14 +08:00
yetone 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.
2026-11-17 02:50:13 +08:00
yetone 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.
2026-11-17 01:49:29 +08:00
yetone 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.
2026-11-17 00:29:32 +08:00
yetone 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).
2026-11-16 23:04:00 +08:00
wjhauannn 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.
2026-11-16 21:11:27 +08:00
yetone 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).
2026-11-16 18:27:09 +08:00
zhou.han 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.
2026-11-16 17:27:10 +08:00
yetone 2ac7af2a39 agy-cli 0.1.77: release 3781c50f's documents
3781c50f (a URL or text document goes to agy as text, not a 400;
daoche_wuzui on X) landed on 481ec997, which had bumped agy-cli to
0.1.76 for #1208 a minute before, so the two rebased onto one version
and bumped.mjs refused 3781c50f. This releases it as 0.1.77, with
#1208's change.

Run at this tree (mica, HOME=$(mktemp -d)): packages/agy-cli bun test 37
pass 0 fail (smoke and documents-unit included); bun scripts/check.mjs
agy-cli ok.
2026-11-16 15:12:06 +08:00
yetone 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.
2026-11-16 15:04:02 +08:00
yetone 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.
2026-11-16 15:02:22 +08:00
yetone 6514f69e62 agy-cli 0.1.75: release #1202
Releases wjhauannn's #1202 (37df65a3): a thinking+text assistant tail is
accepted, the newest history turn outlasts an oversized first one, and a
live tool-turn drop logs its reason. Its own bump named 0.1.74, which
#1051 had already released.

Run at this tree (mica, HOME=$(mktemp -d)): packages/agy-cli bun test 36
pass 0 fail; bun scripts/check.mjs agy-cli ok.
2026-11-16 14:17:08 +08:00
wjhauannn 37df65a3f1 agy-cli: a thinking+text assistant tail is accepted, the newest history turn outlasts an oversized first one, and a live drop logs its reason (#1202)
wjhauannn's PR, reviewed at 3b85727243488a64d90f25a2f28f5cc5c3b9b471:

- assistantTextOf skips thinking / redacted_thinking blocks, so a trailing
  assistant prefill carrying thinking + text is no longer a 400; thinking
  + tool_use is still refused.
- renderInitialPromptParts: when an oversized history[0] leaves no room
  for any later entry, history[0] is clipped so the newest history turn
  before <current_turn> is kept (clipped to the room left if needed).
- A live tool-turn drop logs a drop_live event with its reason
  (interrupted, image_result, history_mismatch, tools_grew, work_dir,
  instructions), and session_new records that reason, not no_live.

Run at the reviewed head cherry-picked onto origin/main 3d9ac97f (agy-cli
0.1.74, #1051), HOME=$(mktemp -d), mote: packages/agy-cli bun test 36
pass 0 fail; test/repeat-batch.mjs 51 pass 0 fail; bun scripts/check.mjs
agy-cli ok.

Broken by hand (mica): origin/main's index.mjs with the PR's tests: the
three new tests fail (A16 newest history turn, thinking+text tail,
drop_live reason), 48 pass.

The PR's version bump (0.1.74) is already on main; the release is the
next commit's 0.1.75.
2026-11-16 14:14:49 +08:00
yetone 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.
2026-11-16 13:37:11 +08:00
yetone 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.
2026-11-16 12:57:58 +08:00
zhou.han 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.
2026-11-16 12:19:09 +08:00
yetone 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.
2026-11-16 12:11:35 +08:00
yetone 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.
2026-11-16 11:27:36 +08:00
yetone 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 (b35d4b35) in the same run, so it is not this
  change.
- Red on the old code (mica, base b35d4b35 with the new tests): catalog's
  two #3501 tests fail, usage.mjs fails to import agyRefusal.
- Real agy 1.5.9 on WSL (magpie-desktop) against a fake Code Assist that
  answers 403 #3501: before, models() gave the fallback list, chat gave 400
  "unavailable"; after, models() throws the #3501 reason, usage carries
  it, chat answers 403 permission_error with it.

Not tried: a real Google account that gets #3501; macOS and Windows with
real agy; a live ACP turn whose agent error carries #3501 (covered by the
fake agy in catalog.mjs only).
2026-11-16 10:57:34 +08:00
yetone b35d4b35b2 agy-cli README: the plugin calls Google itself only for a region-refused quota read
0.1.69 (99b042de) reads the quota directly when agy refuses /usage for
eligibility, so "the plugin does not call Google's internal endpoints
directly" no longer held. README only; no code changed, nothing run.
2026-11-16 03:29:57 +08:00
yetone 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 22529504
  brought in only a README line and the antigravity package).
- root `HOME=$(mktemp -d) bun test` on mote (load 20 to 50, mica 100):
  7831 pass, 436 fail, across kimi-desktop, zen-free, inkstone, qoder,
  zcode, kiro and others this change doesn't touch; agy-cli's
  install.test.mjs 6 red there ("no network in tests") but 35/35 in the
  package run at base and head. Not filed per test: a run under that
  load isn't a record of main.
- bun scripts/check.mjs: ok.
- real: my agy 1.5.9 sign-in, fetchUsage with CLOUD_CODE_URL at a
  local proxy that made loadCodeAssist say UNSUPPORTED_LOCATION with no
  tiers: agy refused, the direct read returned Gemini and Claude & GPT
  7-day windows. Its two requests matched agy's in path, body, UA,
  Authorization, Content-Type and Accept-Encoding; fetch also adds
  Accept, Accept-Language and Sec-Fetch-Mode.

Not tried: a real region-restricted account; Windows and Linux; agy
versions other than 1.5.9 (cl= is known for 1.5.9 only, others send it).
2026-11-16 02:57:56 +08:00
yetone 2252950463 agy-cli README: agy runs a model's parallel tool calls one at a time (#1193)
agy checks each bridged tool call with its own sir_flash_lite monitor
(about 1.3-2.6 s) and sends the next call only after the previous result
is back, so N calls reach the client as N replies with one tool_use each.
The plugin has no switch for it and won't rename tools to agy's own
names to get past the check; the README now says so.

Run: none; README only (bumped.mjs leaves README.md out).
2026-11-16 02:51:10 +08:00
yetone 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 e5cb9598 (8 and 9
  of 30, two runs on mote), green on ubuntu CI; filed separately.
- the new smoke checks are red on the old index.mjs ("plugin.auth.import
  is not a function").
- bun scripts/check.mjs: ok.
- real account, sandbox HOME: the owner's live old-plugin entry copied
  into a sandbox .gemini/antigravity-cli/antigravity-oauth-token;
  `SSH_CONNECTION=… agy models` listed the models and agy refreshed the
  file in the same shape (refresh token not rotated).

Not tried: the import through a running magpie with a real account
(magpie's Providers-page Move comes in a magpie release).
2026-11-16 01:29:08 +08:00
yetone 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.
2026-11-15 23:51:00 +08:00
yetone 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).
2026-11-15 20:35:40 +08:00
Ruining YangandRuining Yang 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>
2026-11-15 20:31:27 +08:00
yetone 2ede7d53c1 agy-cli 0.1.64: startup diagnostics aren't sign-in talk (#1177) 2026-11-15 16:50:10 +08:00
niceguiandnicegui d49ad432f4 agy-cli: startup diagnostics aren't sign-in talk; a hung ended sign-in still stops (#1177)
agy-cli's usage reader keeps the hung sign-in guard and stops reading agy's startup diagnostics as sign-in talk.

agy logs unauthenticated cache lookups (glog lines, "I1115 12:00:00.000 ...]") before it loads its keyring, so a timeout whose only output was those lines was marked as a dead sign-in. The reader now takes those lines out before testing for sign-in talk. A timeout with an ended token that prints nothing, or real sign-in talk (accounts.google.com, "Waiting for browser authentication"), still marks that stored sign-in dead, so a signed-out agy is never restarted in the background until the credential changes (the 235 browser opens a day that b40a853c stopped). A diagnostics-only timeout backs off and retries with the same sign-in.

Run at the reviewed head 9311076c merged onto origin/main, on mote:
- HOME=$(mktemp -d) bun test packages/agy-cli: 35 pass, 0 fail (test/usage.mjs runs with its mocks inside).
- bun scripts/check.mjs agy-cli: ok.

Broken by hand, each red on test/usage.mjs:
- the timeout branch removed (auth only on kind "auth"): "a hung sign-in with an ended token is never restarted until the credential changes" fails.
- SIGN_IN_TALK tested on the raw output: "a timeout with only OAuth diagnostics backs off and recovers with the same sign-in" fails.

Not tried: a real agy whose token has ended; the cases are the fake agy's.

Co-authored-by: nicegui <luolingpeng@lovart.ai>
2026-11-15 16:49:58 +08:00
yetone 74998a9232 agy-cli 0.1.63: run_command's toolSummary no longer collides with agy's own (#1174)
Releases 491cea35 (andrew-zyf). Ran: bun scripts/check.mjs packages/agy-cli ok; the package's bun test was run at the PR head on mote (25/25).
2026-11-15 15:42:57 +08:00
𝘼𝙣𝙙𝙧𝙚𝙬 𝙕𝙮𝙛andandrew-zyf 491cea357d agy-cli: run_command's toolSummary no longer collides with agy's own (#1174)
agy-cli forwards a run_command tool that declares toolSummary when agy adds its own.

agy adds a required toolSummary to the MCP tools it loads. When the client's own run_command already lists toolSummary as required, the duplicate makes the schema invalid and the toolbox fails to start. The bridge now drops toolSummary from run_command's required list when it lists the tool. On the way back it fills in "Run command" when agy kept the summary to itself and the client's schema declares the property. A summary the model sent is kept, and a schema without the property is left alone.

Run at 52b77b78 on mote: packages/agy-cli `bun test` 25/25. Broken by hand: with main's index.mjs, the new tool-summary test goes red. The author checked a live agy client: run_command is the only tool that requires toolSummary, and an agy-to-magpie-to-agy session ran `pwd`. Not tried here: a live agy session, since the local agy account is disabled.

Co-authored-by: andrew-zyf <andrew-zyf@users.noreply.github.com>
2026-11-15 15:42:32 +08:00
yetone 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.
2026-11-15 14:55:10 +08:00
yetone 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.
2026-11-15 14:03:54 +08:00
yetone 2523b43a59 agy-cli: a test that Claude Code's prompt reaches agy with no turned-away line (#1151)
niyezaimenglima on X (Windows, Claude Code through agy-cli): a 429
RESOURCE_EXHAUSTED with quota left, while Grok Build on the same models
works. Same case as KevinXC5's #1151 run, which still matched Claude
Code's "You are an interactive agent ..." line in agy's system
instruction on 0.1.58. 0.1.60 (baeb95a4) moves the client's prompt into
the first turn; this pins Claude Code's own head, the CLI's and the Agent
SDK's identity line with the billing line and the interactive-agent line:
nothing in agy's system instruction, and nothing turnsAway() matches in
the turn ("You're Claude Code, ...", billing line dropped).

Run on mica, HOME=$(mktemp -d), AGY_BRIDGE_STORED_SIGNIN=skip:
packages/agy-cli smoke ALL OK (357 checks). Broken by hand: systemAppend
forced on (0.1.59's route) makes all four new checks BAD.

Not tried: a real Antigravity request from Claude Code (no usable agy
account here), nor Windows.
2026-11-15 13:44:43 +08:00
yetone 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 (84c2a479) still applies when one gets through.

Cost, in both READMEs: the prompt now shares the 112 KiB first-prompt
budget, and agy's compaction can summarise it.

Run at this head (rebased on 84c2a479), on mica,
HOME=$(mktemp -d):
- packages/agy-cli smoke (AGY_BRIDGE_STORED_SIGNIN=skip): ALL OK (353 checks)
- packages/agy-cli bun test: 24 pass, 0 fail
- root bun test: 8753 pass, 0 fail (8773 tests, 611 files)
Red on the old code: origin/main's index.mjs with the new smoke.mjs,
8 FAILURES of 351 (the prompt appended, not in the turn; the four
"where client tools run" checks and the trailing-message cwd check, which
now read the first turn; a session parked with appended instructions
resumed).
Broken by hand: park() without instructionsInSession made three
conversation-key tests fail (the field must survive JSON).

Also asked on X (MndiLysses): agy compacting at ~256K for 1M models.
Not changed: agy 1.5.9 clamps the auto-compact threshold at 256,000 in
utils.GetCheckpointConfig (min(x, 0x3E800)), so
AGY_CLI_AUTO_COMPACT_OVERRIDE can't go above it, and the larger tiers are
held to Gemini 4 Argon. Waits on upstream #1432 (dup of #878, #1245).

Not tried: a real Antigravity request (the owner's agy account is
disabled for ToS; mote, mica and xiaomi-gpu have no agy), so neither
whether Google accepts the prompt in the user turn for every agent nor
whether compaction keeps it.
2026-11-15 13:33:22 +08:00
yetone 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.
2026-11-15 12:53:29 +08:00
yetone 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.
2026-11-15 12:10:56 +08:00
yetone 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.
2026-11-15 11:42:30 +08:00
yetone f91552564e agy-cli 0.1.56: cloak.mjs says it is the only copy now (comments only)
003a38ff changed cloak.mjs's header comment when antigravity 0.2.0 stopped
carrying the same lists; bumped.yml refuses a changed file with no version
raise. No code changed.
2026-11-15 11:11:11 +08:00
yetone 003a38ff44 antigravity 0.2.0: retired, sends nothing and points to Antigravity (local agy CLI)
Google bans accounts it sees calling Code Assist the way this plugin did
(Antigravity's own OAuth client, straight to cloudcode-pa), and as the
plugin magpie offered for Antigravity it was the one everyone installed
(the owner, 11-15: 全部下线,改推 agy-cli). Antigravity is served by
@magpie-community/opencode-agy-cli-auth now, which drives the user's own
agy over ACP.

From 0.2.0 the package makes no request at all. Every request gets a 410
{"error":{"status":"ModelDeprecated","message":"Antigravity: this model
has been retired. …"}} naming Antigravity (local agy CLI) and its magpie
plugin add command; magpie's modelRetired reads that as a retired model,
so a routing group asks its next member. Signing in throws the same
words; there are no models, usage, options or web search. The provider id
stays, so magpie's mover (raised to 0.2.0 there) lands moved users here
and their account rows show the message.

registry.json drops the antigravity entry, so Discover no longer offers
it. agy-cli's cloak.mjs was a copy kept equal to antigravity's by
cloak.test.mjs; it is the only copy now, and the parity tests become
tests of cloak.mjs alone (the invisible-character and REWORDED cases are
kept). agy-cli's version is unchanged (comments and tests only).

What users lose: multi-account rotation, the in-plugin Google sign-in and
account import, AI-credit spending, Antigravity web search, and a
provider that works without agy installed.

Run (mote, temp HOME): bun scripts/check.mjs all ✓; bun test
packages/antigravity packages/agy-cli scripts: 79 pass, 0 fail.
retired.test.mjs replaces fetch with one that throws and checks nothing
was asked on any path. Not tried: a magpie with a moved account on 0.2.0
(done on the magpie side's commit).
2026-11-15 11:10:03 +08:00
yetone 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.
2026-11-15 09:46:03 +08:00
yetone 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 df7d7ae0 as with this change (plugins#1070).
Real agy 1.5.9 on macOS, with the user's account: `agy acp --gemini-dir
<empty folder>` initialised, session/new listed the account's six
models, and the session's .db was written under
<folder>/antigravity-cli/conversations, not ~/.gemini.
Broken by hand: with step usage left on ~/.gemini, the new usage test
reads the machine folder's count (9999 != 1800).
Not tried: a real turn on Windows or Linux with this build; the
Windows result is the reporter's, with their own patch of 0.1.52.
2026-11-15 07:45:56 +08:00