Commit Graph
81 Commits
Author SHA1 Message Date
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
yetone 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 (fb7bbebd) reword
them there, and fb7bbebd noted agy-cli as not tried. agy-cli reworded only
system text, so AGENTS.md text, a <system-reminder> and replayed history
in a user's turn went to agy as written.

- cloak.mjs: USER_TURNED_AWAY (the two Codex lines) and cloakUser().
- index.mjs: every text part of the prompt goes through cloakUser before
  agy gets it. Parked sessions carry userCloak: 1; one parked before this
  version (whose agy copy may hold the line as written) is not resumed.
- READMEs (zh, en) say so.

Run: HOME=$(mktemp -d) bun test packages/agy-cli on mica: 22 pass, 0 fail
(cloak.test 6, agy-cli.test 16 incl. conversation-key 36 cases);
bun scripts/check.mjs agy-cli: ok.
Broken by hand (on mote): the userTurnParts call and the userCloak check
removed, the two new conversation-key tests fail (34 pass, 2 fail);
restored, all pass.
Not tried: a real request. The one probe on the owner's account got
"This service has been disabled in this account for violation of Terms of
Service" as a 200 (#1163), so no 429 could be reproduced or cleared on a
real agy. The reporter's exact agent and prompt are not known.
2026-11-15 07:20:36 +08:00
yetone 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.
2026-11-15 06:43:07 +08:00
yetone 4a64252bd7 agy-cli 0.1.51: one opening sent to several models at once gets an agy each
swang20201 on X: Test models on an agy-cli account gave a check for the
first model and a cross for the other three. magpie's Test sends the same
"hi" opening to up to four models at once. agy-cli keys its agy process by
user, system and first message, not the model, so all four shared one key.
The first started a turn; the others found it unfinished and got 503
"agy bridge: this conversation still has an unfinished response". Not the
account's limits, and not the model ids.

Two changes:
- A fresh opening that finds the key's process busy with a turn for
  another model gets a process of its own (key + request id). The same
  model sent twice while the first runs is still refused as a resend, so
  smoke's "simultaneous startup allows only one live response" holds.
- acquireProc starts the turn (begin) inside the same locks, so a request
  waiting on them sees the earlier turn and is never handed a process
  about to be busy. The turn records its model.

Run:
- New test in test/repeat-batch.mjs, magpie's exact probe body to four
  models at once: red on origin/main 9126c46f (1 x 200, 3 x 503), green
  after.
- Broken by hand: with begin moved back outside the lock the new test is
  red again.
- packages/agy-cli bun test under a temp HOME on mote: 21/21, smoke
  included.
- Whole repo, HOME=$(mktemp -d) bun test and bun scripts/check.mjs on
  mica at this tree: 8849 pass, 0 fail (8869 tests, 617 files), check.mjs ok.
- Real agy 1.5.9 (agy acp), four models at once through the plugin:
  old code 1 x 200 + 3 x 503; this code 4 x 200 at 3.7, 6.0, 9.1 and
  11.2s, inside magpie's 20s test wait.

Not tried: the reporter's models (Gemini 4 Argon/Hydrogen, Claude 5.5).
The account used offers Gemini 3.8 Flash, Claude 4.6 and GPT-OSS only, so
the model id mapping wasn't checked against a list holding those ids.
2026-11-15 04:31:05 +08:00
yetone 9126c46f97 agy-cli: no stub descriptions; a low level's room goes to tools and contracts (#1140)
tungloong's real run of agy-cli 0.1.49 with 131 tools: the schemas alone
took ~37 KB, the level stopped at 10, and 373 of 382 property texts went
as 9-10 byte stubs ("The fil…") that spent ~10 KB on their keys, while
the tools' own descriptions got 25 bytes and show_view's contract 110.
With more tools the level stopped at 1-6 and never reached the bare
branch, which would have zeroed the contracts too.

A cut description now goes whole or, cut, with at least MIN_TEXT (24)
bytes; anything shorter is dropped. When the highest level leaves an
ordinary property under that, ordinary properties keep only texts short
enough to go whole, and a second search gives the room to the tools'
own descriptions and the contracts' (the old bare(top) branch is gone).

Run (mote): packages/agy-cli bun test 21 pass (each test file in its
own bun process); bun scripts/check.mjs agy-cli ok. On a 131-tool
fixture shaped like the report (~285 B of schema per tool), 0.1.49
gave field "field…", tool "tool_0 does the t…"; now no field stubs, tool
"tool_0 does the thing it says.…" and a longer contract. Broken by
hand: the new tests on 0.1.49's tool-budget.mjs go red (field_0:
"field…" at 131 tools, stubs at 180).
Not tried: real agy with the reporter's 131 tools.
2026-11-15 03:26:52 +08:00
yetone 1c3c58be56 agy-cli 0.1.49: a session opened before a line was reworded is not resumed (#1151)
A parked session was keyed on the client's instructions as written. agy
keeps the instructions a session was opened with, so a Codex conversation
parked under 0.1.47 (whose "You are a coding agent running in the Codex
CLI" line went to agy as written, and was turned away) was resumed after
0.1.48 began rewording that line, and every turn on it went on getting
429 for up to the 6h resume window. jx407 found this on #1151.

The parked hash is now taken over the instructions as agy is sent them
(outgoing: the turned-away lines reworded), with the same clock and billing
stripping as before. When the rewording changes, the parked session is not
taken and a new one is opened; when it doesn't, it resumes as before.

Run (WSL magpie-desktop, from the repo root, HOME a temp dir):
- packages/agy-cli `bun test`: 21 pass, 0 fail.
- node --test test/conversation-key.mjs: 34 pass, including the new
  "#1151: a parked session is keyed on the instructions as agy was sent
  them".
Broken by hand: with park/takeParked hashing instructionsIdentity again,
the new test fails (33 pass, 1 fail).
Not tried: a real agy session parked under 0.1.47 and resumed under this
version.
2026-11-14 22:15:14 +08:00
yetone a617ecfd42 antigravity 0.1.16, agy-cli 0.1.48, cloak 0.1.9: cloak the system prompts Google refuses since 11-14 evening; agy-cli fails a refused turn at once
Since about 18:43 on 11-14 Google's Antigravity backend answers 429
RESOURCE_EXHAUSTED to requests whose system instruction holds certain
agents' identity lines, though the account has quota and the same
request with another prompt passes. Tried on a real account
(gemini-3-flash), each line alone in the system instruction:

- refused now: "You are Hermes Agent", Hermes' earlier persona
  "…an intelligent AI assistant created by Nous Research" (also as
  "You're …"), "You are OpenCode" / "You are opencode", Codex CLI's
  "You are a coding agent running in the Codex CLI", and pi's "You are
  a coding assistant running inside pi".
- pass as written: Codex GPT-6's prompt, Claude Code, Gemini CLI, Qwen
  Code, Cline, Kilo, goose, Amp, Droid, Kimi, Aider, Cursor.

The cloak in antigravity and agy-cli (and the antigravity-cloak
middleware) now rewords each refused line the smallest way that passes:
"You are" -> "You're" for Hermes, OpenCode and Codex CLI, "created by"
-> "built by" for Hermes' earlier persona, "running inside pi" ->
"running within pi". The hint shown with a refusal names the agent
(new pi, OpenCode and Codex CLI hints; Hermes' hint covers both
personas).

agy-cli (@Lmohn39, pi 1.5.0 via agy 1.5.9, hydrogen): when agy prints
its retry banner for a refused 429, agy-cli waited while agy retried
the same refused prompt without end, so pi hung. The turn now fails at
once with the 429 and the existing "this is not a quota" explanation,
the agy process is stopped and dropped from the pool. A 503 banner
still waits as before.

Run:
- root `bun test` with HOME=$(mktemp -d) on mica (mote was over its 18
  cores): 8820 pass, 20 skip, 0 fail, exit 0.
- real account through the patched loader, gemini-3-flash 5/5 each:
  pi 1.5.0's full default prompt (built from its dist/core/system-prompt.js),
  Hermes current and earlier personas, both OpenCode first lines, Codex
  CLI's prompt, Codex GPT-6's prompt. claude-sonnet-4-6: pi 5/5.

Broken by hand:
- the old agy-cli index.mjs makes the new Lmohn39 test red ("still
  waiting after 5s").
- dropping the pi line from TURNED_AWAY turns 6 cloak tests red.

Not tried: a real agy 1.5.9 turn on hydrogen showing the banner (the
banner's wording is the one agy-cli already matched); pi itself end to
end through agy-cli.
2026-11-14 21:40:22 +08:00
yetone 3db6dcfa85 agy-cli 0.1.47: agy 1.5.9's bare 429 ending fails the turn (#1151)
agy 1.5.9 ends a turn whose every retry got 429 with the upstream status
itself, "⚠ RESOURCE_EXHAUSTED (code 429): Resource has been exhausted
(e.g. check quota).", instead of "⚠ Agent execution terminated due to
error.". That line was not one of AGENT_ERROR_MARKERS, so the bridge sent
it to the client as the model's answer and ended the turn as a success
(jx407's Codex turns showed the error text as the reply).

It is now a marker like the others: held while it could still be one,
dropped when it ends the prompt, and the turn fails through #agentError
-> #formatAgentError as rate_limit_error ("Antigravity quota or rate limit
reached: RESOURCE_EXHAUSTED (code 429): ..."), or as the system-prompt
case when the cloak says the prompt turns away. Text after it, the model
quoting the line, keeps it as text, as for the other markers.

This fixes how the 429 is reported, not why Antigravity answered 429 to
the reporter's Codex requests; that is still open on #1151.

Run (WSL magpie-desktop, Node 22, Bun 1.4.2, HOME=$(mktemp -d)):
- packages/agy-cli `bun test`: 21 pass, 0 fail (agy-cli.test.mjs runs
  repeat-batch.mjs and the rest).
- node --test --test-name-pattern="1151|1136" test/repeat-batch.mjs:
  4/4 ok. With the new marker line deleted from index.mjs: the endings
  test goes red (1 fail), the quoting test stays green.
- bun scripts/check.mjs agy-cli, scripts/bumped.mjs origin/main: ok.
Not tried: a real agy 1.5.9 turn that ends in 429.
2026-11-14 20:56:03 +08:00
yetone 6646797e15 agy-cli 0.1.46: a catalog over agy's tool budget keeps every tool (#1140)
Since #989 every client tool is listed always-loaded, so all of them go
into agy's customization budget: 20,000 tokens counted as
ceil(UTF-8 bytes / 3). Past it, agy drops whole tools, the largest first,
and with tools: [] the model has no other way to reach them. tungloong's
131-tool catalog (~25,000 tokens) lost bash and 12 Paper tools.

Proc.listTools() now hands agy the catalog through fitTools
(tool-budget.mjs), aiming at 18,000 tokens to leave agy room for its name
prefix and serialization:
- within the budget, the catalog goes as it is (the same array);
- else $schema, title and examples come out where they are keywords (a
  property named "title" is the client's and stays);
- else every description is capped at the highest level L that fits,
  found by binary search: a property's at L bytes, a tool's own at 2.5L,
  a contract property's (an object with no properties, or tool-schema's
  Variants/Accepts anyOf text) at 11L. A cut drops a trailing Examples
  block first, ends on a sentence or a whole code point, and adds "…";
- at L = 0 the properties' descriptions go and the room left goes to the
  tools' own.
Names, property names, types, enum, const, required, items, anyOf and
bounds are never touched, and this.tools / toolsSignature stay as the
client sent them. The trimmed list is kept per catalog.

Run (WSL magpie-desktop, temp HOME; mote was at load 178 and mica's disk
is full): bun test 21 pass; node --test conversation-key, step-usage,
usage-settlement, repeat-batch, compat, tool-schema, catalog,
tool-budget, steer-in-session, windows-nc: 198 pass, 0 fail;
bun scripts/check.mjs agy-cli ok; npm pack --dry-run ships
tool-budget.mjs. With main's index.mjs the new bridge test fails (31,690
tokens reach agy). Not tried with a real agy: the budget and its
counting are the reporter's reading of agy 1.5.8, not checked here.
2026-11-14 18:34:29 +08:00
yetone 6e0cecb2a0 agy-cli 0.1.45: a tool result's image goes to agy as a prompt image, not an offloaded file (distinceeeee on X)
Report: on agy-cli 0.1.43 with agy 1.5.8, when OpenCode's read tool
returns a screenshot, agy writes the image to
.system_generated/steps/N/media_0.jpg. The model never sees the image and
keeps re-reading files.

Cause: the bridge answered agy's MCP tools/call with the image as MCP
image content. agy offloads MCP images to a file, and its model only gets
"Image read successfully [Resource offloaded to file://…]". There are no
image tokens, so it loops trying to get the image back.

Fix: when agy supports prompt images and a tool result carries an image,
the result takes the steer-in-session path. The MCP call is answered with
its text plus a line saying the image follows. The image goes in the next
session/prompt as an ACP image block, in the same session, so it reaches
the model as an image. withoutAnswered keeps an answered result's images
in the prompt and drops the rest. If steering fails, the existing replay
fallback already sends tool_result images as prompt images. An agy
without image support keeps the old MCP path.

Run:
- Real agy 1.5.8 (macOS), sandbox HOME and sandbox keychain,
  gemini-3.8-flash-high, through a harness that drives the plugin's fetch
  with an OpenCode-style read tool:
  - origin/main: shot.jpg and term.png each looped through 8 reads
    without an answer.
  - This change: 1 read each. shot.jpg was answered correctly
    ("PLUM-7342 ORBIT", red circle, blue square, green triangle).
    term.png was answered correctly twice (all five terminal lines,
    including "TOKEN: ZEBRA-5519", and the yellow rectangle).
- WSL magpie-desktop (Ubuntu 24.04), bun 1.4.2, temp HOME:
  - packages/agy-cli `bun test`: 21 pass, 0 fail.
  - `node test/smoke.mjs`: ALL OK (347 checks).
  - `bun scripts/check.mjs agy-cli`: ok.
- Broken by hand: smoke.mjs with origin/main's index.mjs fails exactly
  the two image checks this change adds or rewrites (2 FAILURES of 347).

Not tried:
- Gemini 4 Carbon: not offered to the test account.
- Real agy on Linux, and a real OpenCode front end.
- stream:true against real agy (the harness is non-streaming; smoke
  covers SSE).
2026-11-14 18:20:54 +08:00
yetone dac9726736 agy-cli 0.1.44: a turn keeps only its current request body, and tool-result images are hashed in the history key (#1137)
A Codex tool loop with view_image screenshots grew the plugin host to
0.5-1.5 GiB after GC, so magpie recycled it every ~10 minutes and the
mid-turn conversation restarted without its tool outputs (tungloong's
report).

- Turn.registerResponse drops the previous step's body and
  contentSnapshot. Only the current step's are read again (a late
  prompt's estimate); the usage reducer reads settled/usage only.
- historyKey keys a tool_result image by mimeType + sha256, as it
  already keys a user's image, instead of copying its base64 into the
  key on every comparison.

Old data: a conversation parked before the update with an image inside
a tool result has a history hash taken over the raw bytes, so it starts
a new agy session once instead of resuming. Others are unchanged.

Run (mote, sandbox HOME): node --test conversation-key, step-usage,
usage-settlement, repeat-batch, compat: 128 pass. bun test: 21 pass.
scripts/check.mjs ok. Broken by hand: with origin/main's index.mjs both
new tests in conversation-key.mjs fail (2 of 33).
Not tried: a real Codex Desktop screenshot loop; heap size not measured.
2026-11-14 17:11:03 +08:00
yetone 5613a1259a agy-cli 0.1.43: agy 1.5.8's attempt lines are dropped, and its network and credit endings fail the turn (#1136)
agy 1.5.8 writes each failed attempt of a model call into the reply
("\n⚠ API error (attempt N): request failed: … EOF"), then tries again in
the same turn, and when it gives up it ends with "⚠ There was a network
issue connecting to the server, please try again." or "⚠ Your AI credits
balance is too low to continue." instead of "Agent execution terminated
due to error.". The bridge passed all three through as the model's text,
and the endings as a 200 end_turn, so the gateway neither retried nor
switched accounts.

- dropRetryBanner drops an attempt line where it starts a line, with its
  leading and one trailing newline, the way #1124 drops "Model produced
  invalid output."; a line not ended yet is held (openBanner) until its
  newline, a tool call or the end of the turn. A mid-line quote is kept.
- The error markers are a list; the network and credit endings fail the
  turn like the old marker. The credit ending is a rate_limit_error.
- The error's detail falls back to the last attempt line's text, then the
  ending's own words, when agy's log has no executor error.
  lastAgentError also reads "Run: attempt N failed (…), retrying in",
  "CallWithRetry: …" and "inference connection failed…: …" lines.

Fixtures are the reporter's exact strings from their Codex rollout.

Run (mica): node --test test/repeat-batch.mjs 33 pass; agy-cli bun test
21 pass; scripts/check.mjs agy-cli ok. Broken by hand: with main's
index.mjs the attempt-banner and ending tests fail (2 of 3; the third is
the mid-line quote guard, green on both).
Not tried: a real agy 1.5.8 with a dropped connection; the log-line
patterns are from the issue's log excerpt, not a test.
2026-11-14 16:32:54 +08:00
yetone e0f2a4c2e9 agy-cli 0.1.42: agy's "Model produced invalid output." retry banner is dropped (#1124)
When the model's first call returns neither text nor tool calls, agy writes
"\n⚠ Model produced invalid output." into the reply and calls the model
again in the same turn. The bridge passed that banner on as the reply's
text, so Claude Code's prompt_suggestion took it as the suggestion.

Turn.pushText now drops the banner, with its leading newline and one
trailing newline, wherever it starts a line. A banner that ends a chunk is
held, so a newline in the next chunk goes with it, and it is dropped for
good when the text is flushed. The turn goes on: unlike agy's error
marker, it does not fail the prompt. The model quoting it mid-line keeps it.

Run on WSL (Bun, temp HOME):
- packages/agy-cli: bun test, 21 pass / 0 fail (repeat-batch 30 pass).
- bun scripts/check.mjs agy-cli: ok.
- Broken by hand: on the old index.mjs the new #1124 banner test is red.

Not tried: a real agy 1.5.8 empty-output retry; the banner bytes come from
the reporter's gateway log, and both with and without a trailing newline
are covered.
2026-11-14 13:30:22 +08:00
yetone 5bb4194140 antigravity 0.1.12, agy-cli 0.1.41, antigravity-cloak 0.1.7: turned-away lines go reworded (#1118)
Since 11-14 Google's check reads past invisible characters: a system
prompt with Claude Code's billing line and Agent SDK line, broken up with
two U+200B in every word as the cloak sent them, was turned away 5 of 5
with the bare 429 "Resource has been exhausted". Claude Desktop's Code
tab through magpie to Antigravity failed every turn (hc295971796 and
daoche_wuzui on X, 11-14).

Each line Google turns away now goes reworded instead, as plain words:
- the x-anthropic-billing-header line is left out (to its line's end);
  a system part or message holding only it is dropped;
- "built on Anthropic's Claude Agent SDK" -> "built on the Claude Agent
  SDK by Anthropic";
- Codex's "based on GPT-5" -> "built on GPT-5";
- Hermes' "created by Nous Research" -> "built by Nous Research";
- omp's RFC "keywords" -> "key words" (as before).
A copy an older magpie or cloak broke up (U+200B, U+2060, soft hyphen,
in or between words) is matched and reworded as the line. The Code tab's
main line ("You are Claude Code, Anthropic's official CLI for Claude,
running within the Claude Agent SDK.") passes as written and is kept.
antigravity-cloak gains a saidAs {phrase: replacement} option; extraWords
still breaks words up and the README says it no longer gets past
Google.

Run:
- real Antigravity account, sandbox HOME, gemini-3.8-flash, 10
  sequential requests each through packages/antigravity at this head:
  Code tab main prompt as Claude Desktop sends it (billing + main line +
  rest) 10/10 200; Agent SDK subagent line 10/10; an old two-U+200B
  copy 10/10; Codex GPT-5 10/10; Hermes' earlier persona 10/10; omp's
  RFC line 10/10. Each rewording alone was first tried 5/5 against the
  zero-width break, which went 0/5.
- wsl-run, HOME=$(mktemp -d) bun test (whole repo) before the last test
  fixes: 8735 pass, 19 skip, 3 fail, all three in these packages' own
  tests still expecting zero-width; after fixing them,
  bun test packages/antigravity packages/agy-cli packages/antigravity-cloak:
  133 pass, 0 fail.
Broken by hand: the three packages' source files from origin/main with
these tests: 19 fail (shape, cloak parity, smoke, every cases.json case).
Not tried: agy-cli against the real agy binary (smoke runs a fake agy);
models other than gemini-3.8-flash.
2026-11-14 11:04:28 +08:00
yetone 4170d0e816 antigravity 0.1.11, agy-cli 0.1.40, antigravity-cloak 0.1.6: omp's RFC 2119 line goes as "key words", in any white space
eric_li8983 (X, 11-14): oh-my-pi on Windows with an Antigravity account got
"Antigravity answered 429 to this system prompt" for omp's first line,
"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL."

Two causes, both seen on a real account on 11-14:

- Google's check reads the line in any case with any white space between
  its words: wrapped with LF or CRLF, indented, a tab, two spaces or a
  no-break space were all turned away, while the cloak matched only the
  literal line, so those copies went out whole. Each turned-away line is
  now matched with any run of white space (JavaScript's \s) between its
  words, the same in antigravity, agy-cli's cloak.mjs and the
  antigravity-cloak middleware; Codex's and Hermes' lines too.
- A zero-width-broken copy of omp's line was itself turned away now and
  then (10 sequential requests each: two U+200B a word 3 bare 429s, one
  after every character 3, U+2060 2, soft hyphen 1). omp's line now goes
  as "RFC 2119 key words: …", RFC 2119's own term, with its white space
  as it was. The hint says so.

Real account (sandbox HOME, copy of the live Antigravity account,
gemini-3.8-flash, sequential): the reworded plugin answered omp 18.20.0's
literal prompt 10/10, the full template 10/10, and the line wrapped after
"REQUIRED," 10/10. The zero-width version before it: lit 3, tmpl 1, w1 5
bare 429s in 12 each.

Run at 24c75a16's tree (rebased on 76cfb7fe): the whole bun test (temp
HOME) on WSL magpie-desktop, 8720 pass, 0 fail, 19 skip. Broken by hand: the new tests against the old index.mjs,
cloak.mjs and middleware: 6 fail.

Not tried: omp itself end to end on Windows. Also seen in the same probe:
Claude Code's, Codex's and Hermes' broken-up lines were each refused 1-2
times in 10; filed as #1118.
2026-11-14 09:03:51 +08:00
yetone 4f5d4138ad agy-cli 0.1.39: a new nc.exe build drops this runtime's older ones (#1097)
Each nc dir holds a whole Bun runtime (~115MB) and its key changes with
mcp-server.mjs, so every plugin update left one in %TEMP% for the 7-day
sweep (Hy1an measured it). Each dir now holds a `runtime` file naming the
runtime that built it; a build removes the same runtime's other nc dirs at
once. Another runtime's dirs (another install) and dirs from before the
marker keep the week. A running nc.exe is locked, so its dir stays.

Run: test/windows-nc.mjs 8/8 on WSL and on Windows 11 (xiaomi-gpu);
bun test in packages/agy-cli 20/20 (WSL); check.mjs agy-cli ok.
Broken by hand: 0.1.38's index.mjs fails the new test (and the two that
now expect the marker).
Not tried: a real update on Windows. Dirs 0.1.38 left have no marker, so
they still go after a week.

Reported-by: Hy1an
2026-11-13 21:15:11 +08:00
yetone 67a5baaa1f agy-cli test: the sign-in check's upper bound has room on both sides (#1089)
"#1064 登录检查不为探测等太久" bounded authorize() at SLOW_MS + 3s + 1s, so
a busy Windows box used up the 1s and went red 1 in 12. The fake session
now answers after 60s, and the test asks that the probe session was started
and that authorize() returned before half of that. The lower bound stays: a
timer is only ever late.

Run: WSL, node --test test/catalog.mjs 24/24; Windows 11 (xiaomi-gpu,
Node 22), the #1064 tests 12 times, 0 red.
Broken by hand: OFFERED_SIGNIN_WAIT_MS at 120s (authorize waits for the
session) makes the test red, "登录检查等了会话(31524ms)".
No package code changed, so no version bump.
2026-11-13 20:43:46 +08:00
yetone 035a11cf88 agy-cli 0.1.38: a runtime under a non-ASCII folder still builds nc.exe (#1097)
On Windows, Bun's `build --compile` widens its own path byte by byte
into UTF-16 before CopyFileW, so a magpie-bun.exe under a non-ASCII
folder (a Chinese user name) fails with "failed to copy bun executable
into temporary file: ENOENT". windowsNcDir then fell back to nc.cmd,
which agy 1.5.x never runs, and no client tool reached the model.

When process.execPath isn't ASCII, the build now runs a copy of the
runtime in an ASCII-only folder (the temp dir, else %PUBLIC%, else
%ProgramData%) and removes it after. nc.exe's cache key is still the
real runtime's path.

Run (mote, temp HOME, Bun 1.4.2): node --test test/windows-nc.mjs
7 pass; bun test in packages/agy-cli 20 pass; scripts/check.mjs
agy-cli ok. Broken by hand: with main's index.mjs the new test fails.

Windows 11 (xiaomi-gpu, Bun 1.4.2, real binaries): bun under a folder
named with Chinese characters fails `build --compile` with the
reporter's ENOENT. A non-ASCII cwd, server path or output path is fine,
and the compiled exe runs from a non-ASCII folder; an 8.3 short path
doesn't help. The plugin's own ensureShimDir, run by that bun: main
gives nc.cmd, this change gives nc.exe in 614ms, which starts, and
leaves no build dir or runtime copy behind.

Not tried: agy itself against the new nc.exe on Windows, and Bun 1.4.4
(the reporter's); the code path read is the same in Bun's main source.

Reported-by: Hy1an
2026-11-13 19:58:09 +08:00
tungloong 592b716ac3 agy-cli 0.1.37: DeepSeek Harness's notes are not the loop's task; a trimmed loop keeps its whole user turn (#1093)
Reviewed at 56248465f. WSL (Bun 1.4.2, temp HOME): bun test in packages/agy-cli 20 pass (repeat-batch.mjs inside agy-cli.test.mjs), scripts/check.mjs agy-cli ok. With main's index.mjs, node --test test/repeat-batch.mjs fails 6 (19, 20, 21, 22, 24, 26). Open question, not blocking: a string-content message holding a runtime snapshot and the user's words reads as meta-only (affects only prompts trimmed past 112 KiB).
2026-11-13 19:49:31 +08:00
yetone 2e77e646c8 agy-cli 0.1.36: the last model list agy gave is served after a restart (#1086)
After a restart, models() handed out the static Gemini-only fallback until
agy answered again. offeredFilter also hid every non-Gemini model until a
session or probe told it what agy offers. So the first requests after a
restart saw no Claude models.

The bridge now keeps the last list agy gave, and the set it offered, in
models.json beside the session state file. The file has one entry per agy
path, is written under the state lock through temp-and-rename (mode 0600),
and is trusted for 14 days. A half-written or invalid file, another agy
path, or a stale entry all give the static fallback, as before. A saved
list is not treated as an answer from this agy: the offered probe still
waits for a real listing.

Run (WSL magpie-desktop, Bun 1.4.2, Node 22):
- bun test in packages/agy-cli: 20 pass.
- node --test test/catalog.mjs: 24 pass.
- bun scripts/check.mjs agy-cli: ok.
Windows (xiaomi-gpu): node --test test/catalog.mjs 12 times, 11 green.
The one red is the existing wall-clock test "#1064 登录检查不为探测等太久",
filed as #1089. I haven't shown whether it is red on origin/main too.

Broken by hand: readSavedCatalog returning null turns the new #1086 test
red; skipping the offered restore turns it red too.

Not tried: real agy on any OS; a restart with a real signed-in agy.

Reported-by: yinbing-666
2026-11-13 17:29:06 +08:00
yetone 7bccaae910 agy-cli 0.1.35: a client tool's ide-tools permission request is allowed once (#1082)
Newer agy asks before an MCP call, and the bridge refused every
session/request_permission, so each client tool failed with "user
denied permission for mcp(ide-tools/exec_command)". A request whose
title (or name) is exactly mcp(ide-tools/<tool>), mcp "ide-tools/<tool>",
ide-tools/<tool> or mcp_ide-tools_<tool>, with <tool> among the tools
the client declared, now gets allow_once. Those tools run in the client
under its own permissions. agy's own tools (shell, edits, browser) are
still denied, as is a title that only contains such a name somewhere
(a shell command's text can be in its title), an undeclared tool and
another server's tool. rawInput is never read.

Run (WSL magpie-desktop, HOME=$(mktemp -d)): bun test in
packages/agy-cli, 20 pass; bun scripts/check.mjs agy-cli ok. Broken by
hand: with the allow branch off, smoke.mjs has 2 failures, the two
#1082 allow checks.

Not tried: a real agy that asks for MCP permission. The title agy
sends for an MCP call isn't known from its strings, so the forms above
come from its rule and error text; the reporter is asked to confirm.

Reported-by: Saramanda9988
2026-11-13 16:08:40 +08:00
zhou.han 58221e6faa agy-cli: the smoke fake stops a turn whose ToolSearch failed (#1069)
The fake agy in smoke.mjs now returns when its old prompt's ToolSearch
call comes back isError, instead of going on to its loaded-tool validator.
Under a slow shutdown (Windows) that path logged unknownTool and failed
"no call to the loaded tool reaches agy's validator in the old prompt".
Fixture only; the bridge is unchanged.

Run at 6946b93c: smoke.mjs ALL OK (337) 3 of 3 on Windows 11. With an
800ms pause injected before the bridge's process stop (WSL), the parent
fails that check and this head passes it. CI test job green.

Fixes #973.
2026-11-13 14:20:17 +08:00
yetone b40a853c20 agy-cli 0.1.34: agy isn't run in the background without a sign-in, so it stops opening the browser (JZGiVvkSOA75376 on X)
On Windows 11, a signed-out agy opened Google's sign-in page 235 times
in one day. The usage refresh ran `agy` about every 3 minutes, and agy
opens the browser through ShellExecuteW, so the BROWSER=open.cmd guard
can't stop it.

New signin.mjs reads agy's stored sign-in without running agy. agy keeps
it through go-keyring, service "gemini" and user "antigravity":
- macOS: `security find-generic-password`;
- Windows: CredReadW from PowerShell, on the credential
  "gemini:antigravity".
It reads only whether a sign-in is stored, whether it has a refresh
token, and when the access token ends. The token itself never leaves
the function; a hash tells one sign-in from the next. Setting
GEMINI_API_KEY, GOOGLE_API_KEY, AGY_ADC_AUTH or GOOGLE_GENAI_USE_VERTEXAI
means agy signs in some other way, so nothing is concluded from the
keyring. AGY_BRIDGE_STORED_SIGNIN=skip turns the read off.

An access token that has ended is not "needs sign-in". The owner's
working agy has one that ended 11 hours ago and is renewed from its
refresh token. agy counts as unable to sign in when:
- no sign-in is stored;
- the access token has ended and there is no refresh token;
- or agy already failed on this stored sign-in: it said it needs a
  sign-in, or it hung with an ended token and printed nothing or
  sign-in talk, the way an agy waiting on its browser does. This holds
  until another sign-in is stored.

What changes:
- Usage: in those cases agy isn't run. The read says signIn "expired",
  and magpie shows the account's sign-in as expired. After the next good
  read it says "renewed", and magpie clears that.
- Other usage failures wait 10 minutes before the next run, doubling up
  to 6 hours. Before, they ran again on every refresh.
- The model listing (`agy models`) isn't run in the background in those
  cases either. The catalog it has stays.
- Signing in from magpie skips the `agy models` probe and goes straight
  to magpie's own sign-in link. A finished sign-in clears what was
  marked dead.
- A request answers 401 with X-Magpie-Sign-In: expired when no sign-in
  is stored. This uses the last read, so a request never waits for
  PowerShell.
- `agy --version` hanging is never read as a sign-in wait.

Run:
- mote, rebased on a02d5912: `bun scripts/check.mjs` ok and
  `bun test` in packages/agy-cli (20 pass, 0 fail).
- mote, root `HOME=<temp> bun test` at the pre-rebase head (e90d6f01
  base): 7588 pass, 427 fail, none in agy-cli. The reds named in the
  kept tail are OAuth callback-port and loopback page-service tests
  (mote at load ~35-40); main's own CI test job passes them, so this
  push's CI test job is the record for the whole suite.
- win-run on xiaomi-gpu: test/signin.mjs and test/usage.mjs (21 pass,
  3 skip on Windows), plus the PowerShell script for real. Over SSH,
  CredReadW answers 1312 (no logon session), which the script turns into
  "unknown". So the struct read was tried on a CREDENTIALW built in
  memory with a UTF-8 blob: the bytes round-trip and the sign-in parses.
Broken by hand:
- with the usage gate, the backoff hold and the dead mark removed, 5
  usage tests go red;
- with listAgyModels' gate and the request gate removed, the new catalog
  test goes red;
- with the request gate alone removed, it goes red too.
Not tried:
- a real signed-out agy, by the rule against running a real agy sign-in
  or a browser;
- CredReadW in an interactive Windows session (none was logged on);
- agy on Windows at all (xiaomi-gpu has no agy).
On Linux the keyring isn't read ("unknown"): agy runs as before, with
the backoff, and the xdg-open shim already stops the browser there.
2026-11-13 13:45:25 +08:00
yetone 00892c80e3 agy-cli 0.1.33: DSH's @-path paragraph goes reworded, as antigravity sends it (#1028) (LeeTengLong on X)
agy-cli's cloak.mjs copied only antigravity's TURNED_AWAY break-up (#980),
not the REWORDED rewrite antigravity 0.1.7 added for #1028, so DeepSeek
Harness's "Tokens prefixed with @ are paths…" paragraph reached agy word
for word, the text that got gemini-4-argon answering fast, without thinking
and shallow.

cloak.mjs now carries REWORDED, reword and outgoing (reword after cloak),
a copy of antigravity/index.mjs's, and every place agy-cli hands system text
to agy uses outgoing: the session's systemPrompt.append,
<external_system_instructions>, a later system/developer message and the
notices beside a tool result. Only that exact paragraph changes; a prompt
that merely mentions @ paths, and what the user wrote, go as written.
instructionsIdentity still keys on the prompt as the client wrote it. The
packages ship on their own, so the code is a copy; cloak.test.mjs holds it to
antigravity's shape() output for each REWORDED entry and the samples.

Run on mote (Bun 1.4.2, temp HOME): bun test packages/agy-cli
packages/antigravity 118 pass 0 fail; bun scripts/check.mjs exit 0.
Broken by hand: outgoing without reword turns 3 tests red (cloak.test.mjs
2, and smoke.mjs's #1028 session, external_system_instructions and later
system message checks).
Not tried: a real agy with a real Antigravity account and DSH; the
rewording's effect rests on #1028's replays. No magpie min names agy-cli.

Reported-by: LeeTengLong
2026-11-13 13:14:51 +08:00
yetone 0135b7b0ea agy-cli 0.1.32: the first model list after warming has agy's Claude and GPT models (#1064)
On a signed-in agy, `agy models` takes about 4.4s and `agy acp`'s
session/new about 3s. provider.models() needed three calls before
claude-opus-5-5, claude-sonnet-5-5 and gpt-oss-120b showed up, and
OpenCode 2.x calls it once.

What changed:
- packages/agy-cli/index.mjs:
  - The offered-model probe now starts in listAgyModels' .then, as soon as
    a non-empty list arrives and a caller asked for probeOffered. It no
    longer waits for the next models() call. A hung or failed `agy models`
    still never spawns the probe.
  - probeSignedIn reuses the `agy models` stdout it already has. The same
    parser (parseAgyModels, split out of listAgyModels) fills
    cachedModelCatalog, and the probe starts. Sign-in waits for the probe
    for at most 3s.
  - The offer (acpOfferedModels, acpOfferedKey, offeredProbeAt and any
    in-flight probe) is forgotten when agyPath changes and after a new
    sign-in finishes. A generation counter drops the answer of a probe
    that started before the reset.
  - provider.warming() returns a promise while a list or probe is still
    running, and null when nothing is.
- scripts/opencode2.mjs, copied byte for byte to every
  packages/*/opencode2.mjs: after the first background refresh, the
  adapter awaits hooks.provider.warming() once, for at most 60s, and then
  refreshes once more. It does not loop. Plugins without warming() behave
  as before.
- Not done: the issue's on-disk catalog cache (point 3), skipped as asked.

Known gap: agy-cli has no `config` hook, so under OpenCode 2.x the adapter
lists no provider for it. refresh() returns before it calls
provider.models(), so the follow-up refresh can't add agy's models on 2.x
until agy-cli gets a config hook.

Tests: test/testkit.mjs's fake agy takes a sessionNewDelayMs. The new
tests in test/catalog.mjs set 1.5s on both `agy models` and session/new
and wait for state through warming(), with no fixed sleeps:
- On a slow cold start, the first models() after warming lists Claude and
  GPT, from one probe spawn.
- authorize() on a signed-in agy fills the catalog, and the next models()
  runs no second `agy models`.
- The sign-in wait is bounded: with a 6s session/new, sign-in returns in
  about 4.5s.
- Changing agyPath probes again.
The hang test now awaits warming() before it counts acp spawns.
scripts/opencode2.test.mjs: the warming list is read a second time when
warming ends, and only once when nothing is warming.

Run on Linux (a separate test Mac was over its load limit):
- packages/agy-cli bun test: 17 pass, 0 fail.
- bun scripts/check.mjs agy-cli: ok.
- bun scripts/check.mjs (all packages): ok.
- Root bun test in a temp HOME: 8530 pass, 19 skip, 0 fail.

Broken by hand on Linux, each red, then restored green:
- No probe in the .then: the slow cold-start test.
- probeSignedIn drops the list: the authorize and bounded-wait tests.
- agyPath change keeps the old offer: the agyPath test.
- Unbounded sign-in wait: the bounded-wait test (7514ms).
- Probe also on a failed listing: the hang test.
- origin/main's index.mjs with the new tests: all four #1064 tests.
- Adapter reads the list once: the warming adapter test, and the
  copy-identity check.

Not tried: a real agy (no Google sign-in, no network). The reset after
login.finish has no unit test of its own.

Reported-by: hiee3
2026-11-13 10:59:13 +08:00
tungloongandtungloong 753a61f85c agy-cli 0.1.31: wait for MCP commit before cancelling steered tool turns (#1061)
When a client steers a live tool turn, agy-cli now waits for agy to commit the MCP responses (a tool_call_update, the next generation, or the prompt ending; AGY_BRIDGE_MCP_COMMIT_WAIT_MS, default 5s) before sending session/cancel. Before, the cancel could beat the response, and agy recorded "Tool execution was canceled". A clean steer keeps SQLite step usage trusted, and an unpolled LONGTOOL result stays in the steered prompt. A steer in progress is not evicted or reclaimed, and a second steer gets 503.

Reviewed at 01de2cc. Run on a separate test Mac (Bun 1.4.2, temp HOME): bun scripts/check.mjs agy-cli ok; bun test ./packages/agy-cli 17 pass. Broken by hand: with no commit wait, the smoke steer case, six steer-in-session groups and usage-settlement go red. Not tried by the reviewer: a real agy (the author's live run on agy 1.5.6 is in the PR).

Co-authored-by: tungloong <tungloong@users.noreply.github.com>
2026-11-13 08:21:35 +08:00
yetone 1a08f08817 agy-cli 0.1.30: a new agy session logs why the live one was not reused (#1058)
#1058: in one Claude Code conversation every request started a new agy
conversation, so Gemini 4 Carbon's cache read stayed at 0. The bridge
reuses a live session only when the conversation key, work dir,
instructions and history all match, and nothing said which one failed.

acquireProcLocked now writes one content-free stderr row per new
session ("[agy-bridge] {event: agy_bridge_session, action: session_new,
reason, conv, fresh, resumed, parked, history}"). reason is no_live (no
session under this conversation key), or for a live one that was
dropped: forced, dead, retiring, work_dir, instructions, history or
fresh_after_first. conv is the key's 12-char digest, so a key that
changes per request shows as a new conv each time. The rows have their
own 30/min budget, so they never crowd out the tool-state rows.
magpie writes plugin stderr into its log, so the reporter can send them.

Run (on a separate test Mac, temp HOME): bun scripts/check.mjs agy-cli
ok; packages/agy-cli bun test ./agy-cli.test.mjs 14 pass 0 fail;
test/repeat-batch.mjs 20 pass, test/conversation-key.mjs 31 pass.
Broken by hand: with the logSessionEvent call disabled, the new #1058
test fails.
Not tried: a real agy, or the reporter's Claude Code requests. This
does not fix the cache miss; it finds which check misses.

Reported-by: chrisjian
2026-11-13 02:40:04 +08:00
yetone 16b487fa8e agy-cli 0.1.29: release the Gemini 4 Carbon limits (jinzheio on X) 2026-11-13 00:56:28 +08:00