Pi-Desktop (the desktop app) as a connect-only agent, id pi-desktop-app:
magpie keeps a Pi-Desktop local-plugin folder whose manifest.json declares
the gateway as a provider with magpie's models and their thinking levels,
split into cards of at most 64 models. Pi-Desktop's database is never
written. Ships scripts/doctor.mjs, a read-only check of both sides.
By unisong (#1206).
Run at 4ded8795d (macOS via mica-run, temp HOME): bun test in
packages/pi-desktop 18 pass; bun scripts/check.mjs pi-desktop ok. The
author ran it against Pi-Desktop 0.22.0 on Windows 11.
Not tried here: a real Pi-Desktop. First npm publish waits for the owner;
dist serves it meanwhile.
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.
unisong reported in #1206 that tests under scripts/ fail on Windows on
main. Reproduced on the Windows box at origin/main (bun test scripts):
23 pass, 8 fail.
- opencode2.test.mjs took the packages folder from a file URL's
pathname, "/C:/…", and join made it "\C:\…", so seven imports
failed ("Cannot find module"). It is fileURLToPath now.
- scripts/sync-proc.mjs had the same pathname root. proc.test.mjs
imports it, so the whole file failed to load (the eighth red).
- With it loading, proc.test.mjs showed five more on Windows: its fake
readFile matched "/fake-proc/123/stat" while proc.mjs joins with the
system's separator, and the kill(pid, 0) walk's skip list (written
with "/") skipped nothing, so it walked test folders and passed its
5s bound. The fake now matches join()'s path, and the walk compares
"/" paths. proc.mjs itself is unchanged: it reads /proc on Linux only.
Only scripts/ changes; no package's files, so no version.
Run:
- win-run (Windows 11) bun test scripts: 39 pass, 0 fail
(origin/main: 23 pass, 8 fail).
- mica-run (macOS) bun test scripts: 39 pass; node scripts/sync-proc.mjs
ok, and on Windows too.
Not tried: Linux (CI runs it).
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.
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.
wsyfree on X: one of four WorkBuddy (China) accounts on the Routing page
read "deepseek-v4.1-flash token(估算) 200,000,000 / 200,000,000 · 已用
100%", and routing kept it for last. That is the card a WorkBuddy refusal
makes. A 429 whose named reset is still ahead, read from the ledger or a
routing trace (0.2.29), fills the window: card(win.cap, …) gave it the cap
as its count, under the "(est.)" name. The account is refused for the
model until the reset, and routing is right to keep it for last. But the
card showed a number nothing measured and called it an estimate, so it
read as magpie's estimate gone wrong.
The refused card now has no count. It shows used 100, the vendor's reset,
no amount, limit or display, and a name without "(est.)"
("deepseek-v4.1-flash tokens"; WorkBuddy AI keeps "Free model tokens").
The ledger estimate card is unchanged and still set aside, so routing
never stops an account on an estimate. Only the refusal stops one, as
before.
Run (on mote, HOME=$(mktemp -d)): packages/workbuddy bun test 383 pass,
0 fail; bun scripts/check.mjs exit 0, 59 ok.
Broken by hand: with index.mjs at 6514f69e, the four refused-card tests in
freewindow.test.mjs fail (China under the cap, the routing trace's reset,
accounts/models/builds apart, refused under the cap), 55 pass.
Not tried: the reporter's own ledger and routing trace, or a real refused
account. magpie needs i18n entries for the new name, and the mover's min
raised.
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.
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.
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.
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.
SuperWheel bisected DSH 0.2.2-rc.3's 37-tool request against Zen on
2026-11-16 (#632): with 0.1.27 it still drew 429 FreeUsageLimitError.
Alone, only edit, read and skill were refused. Each of those three
descriptions was refused under a neutral name; edit and read were
refused by name together with their own parameters (neutral
description), while the same parameters under `foo` were served.
- REFUSED_DESCRIPTIONS: the three descriptions, matched whole after
trimming, go reworded with the same meaning.
- REFUSED_WITH_PARAMETERS: edit (file_path, old_string, new_string)
goes as text_replace, read (file_path, offset, limit) as file_view;
a call of either comes back under DSH's name through the existing
renamed map. A read or edit without those parameters (OpenCode's own
read takes filePath) keeps its name.
- normalizeTools now renames before it adds the core stand-ins, so a
renamed edit or read still has Zen's stand-in of that name beside it;
`declared` is taken before the rename, as before.
- README says so.
Run (mote, HOME=$(mktemp -d)):
- bun test in packages/zen-free: 228 pass, 0 fail.
- bun scripts/check.mjs zen-free: ok.
Broken by hand: origin/main's provider.mjs with the new tests: the DSH
test fails on all three protocols.
Not tried: Zen itself. This machine's address is over Zen's free
allowance, so the reworded descriptions and the new names are not known
to be served; they are a guess built on the reporter's table (shorter
wordings and other names were served there). SuperWheel is asked to
replay the same 37 tools through 0.1.28.
shex816's Trae CN enterprise account (#1143) shows in /v1/magpie/quotas
as {plan: "Enterprise", user: "Signed in", windows: []}: no error, no
window. That is ent.read when the console's seat pool is 0 (not
unlimited) and the credits page gives no row, so the card stood empty
with no word of why.
- Trae CN: with no window and no balance, the read is an error naming
the pool and what the credits page did ("could not be read", "shows
no allowance", "says unlimited").
- Trae Global: a pool of nothing is an error naming the pool.
- A pool of nothing beside a credits page with an allowance still shows
the credits row, as before.
Run (mote, HOME=$(mktemp -d)):
- bun test in packages/trae: 277 pass, 0 fail.
- bun scripts/check.mjs trae: ok.
Broken by hand: 0.2.39's index.mjs with the new tests: 3 fail (the two
CN errors, the Global error); the credits-row test passes on both.
Not tried: shex816's real account (the pool of 0 is inferred from the
empty card's shape; their console answer is not in hand).
0.2.36 (09c05dfa, #1127) sent every Trae CN enterprise seat's models
and chats to the consumer gateway, because shadow1606's console answered
every llm_utils_chat with 4245. The gateway takes the same login but
bills the login's own credits: kenanor (#1155) chats fine on 0.2.38,
but points are spent and the enterprise console records nothing, while
0.2.35 (the console route) chatted and billed the seat pool.
- SITES["trae-cn"].apiOf gives the console host for a sign-in naming
console.enterprise.trae.cn again, and the gateway only for an account
marked consoleChat: false.
- A console llm_utils_chat answering 4245 (in a 200's JSON, as a non-ok
status, or as a stream's error event) stops asking the console's
functions, marks the account, saves the mark with the sign-in
(client.auth.set; toAuth/fromAuth carry it), drops the cached model
list, and asks the same request once more on the gateway. The mark is
also held in memory for the run, should the save fail.
- The model lists and the loader's baseURL go through the same host, so
a marked seat's list is the gateway's (whose names the gateway takes).
- A 4245 from the gateway itself is the error it was.
- README: the enterprise section says which host chats and who pays.
Run (mote, HOME=$(mktemp -d)):
- bun test in packages/trae: 273 pass, 0 fail.
- bun scripts/check.mjs trae: ok.
Broken by hand: origin/main's index.mjs with the new enterprise tests:
4 fail (console host, console chats, 4245 in a 200, 4245 as a 400);
the gateway-4245 test passes on both, as it should.
Not tried: a real enterprise seat (none here). Whether the console
bills the seat pool comes from kenanor's report of 0.2.35; whether
shadow1606's seat still answers 4245 is not known, and if it does the
first chat after updating takes one extra round trip.
#1198 (yetihan) moved 15 packages' liveness checks onto scripts/proc.mjs,
so a Linux zombie no longer holds a lock. Two were left on a bare
kill(pid, 0), which answers for a zombie as for a live process:
- deepzora's bridge lock (bridge.mjs lock(), the same code as
reasonix-desktop's, which #1198 fixed): a zombie owner left "Another
bridge operation is running" until the zombie was reaped.
- gumloop's ledger lock peers (gumloop.mjs isAlive): a zombie peer was
counted live, so its ticket was waited on.
Both now import a synced proc.mjs (scripts/sync-proc.mjs lists 17
copies; both package.json files ship it). gumloop's crash-window test
writes its instrumented copy into a temp dir, so proc.mjs is copied
beside it. A new guard in scripts/proc.test.mjs fails when any package
file outside tests and proc.mjs calls kill(pid, 0).
deepzora 0.2.1, gumloop 0.1.2.
Run (mote, HOME=$(mktemp -d)):
- bun test scripts/proc.test.mjs packages/deepzora packages/gumloop:
111 pass, 0 fail. node --test scripts/proc.test.mjs: 9 pass.
- deepzora node --test deepzora.test.mjs: 13 pass.
- node scripts/sync-proc.mjs --check: ok. bun scripts/check.mjs: ok.
Broken by hand: main's bridge.mjs and gumloop.mjs with the new tests:
the guard names both files, and the copies test fails on deepzora.
Not tried: a real zombie owner for these two (#1198's fork-based
zombie check covers proc.mjs itself); a real Gumloop or DeepZora
account. gumloop under node --test fails 3 of 3 on bun:test imports,
the same on origin/main.
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.
@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.
yukinomon measured it (#1199): Tabbit's international site answered the
daily check-in with a 403 whose body was a "Service Unavailable" HTML
page, with no server or cf-ray header (every JSON answer there carries
server: uvicorn). 0.1.4 took every 403 but the 492 paywall as a refused
sign-in, so magpie marked the account for a new sign-in; the same token
answered every route half an hour later.
- refusalOf calls a 403 whose non-empty body isn't JSON a page; call()
throws it as a plain TabbitError with the page's <title>, with no
signIn and no "refused the sign-in" text.
- It settles nothing about the token's site: an unsettled token isn't
sent to the other site for it, and such a page from the other site
leaves the site unsettled too.
- A 401, and a 403 with Tabbit's own JSON, are refused sign-ins as
before.
Run (mote, HOME=$(mktemp -d)):
- bun test packages/tabbit: 91 pass, 0 fail.
- bun scripts/check.mjs tabbit: ok.
Broken by hand: origin/main's api.mjs with the new tests: 2 fail (the
chat path and the check-in path).
Not tried: a real Tabbit account behind such a page; the page's bytes
are the reporter's.
kingchen95272025 (#1200): scripts/tagged.mjs only read magpie.agent
when a package had no main or exports, so an agent plugin that keeps a
host module (cursor-bridge-enhanced 0.2.17, magpie-agent-deva,
magpie-kiki) had no kind in dist/tagged.json and Discover showed it
under Providers, while magpie's own readTagged (internal/plugin/
github.go, since plugins#737) calls it an agent. tagged.mjs also had no
hooks branch.
- scripts/tagged-kind.mjs holds kindOf and entryOf, mirroring
readTagged: middleware, page and hooks only without a module of their
own; magpie.agent always. The file checked is the package's module
when it has one, else the file its kind declares, as readTagged does.
- tagged.json carries read: 2. A file read the old way is read again
whole on the next run, so entries not pushed to since are corrected
too, not only new pushes. version stays 1, which the site's worker
checks.
Run (mote):
- bun test scripts/: 30 pass, 0 fail.
- node scripts/tagged.mjs on a copy of dist's tagged.json, against
GitHub (no token): 442 plugins, 0 unread, read 2. The three repos
#1200 names, and 30 more, went from no kind to agent; 8 hooks
repositories got hooks. No entry changed kind any other way. Which
repositories the topic search returns differed from dist's file
(16 gone, 10 new); that comes from the search, not this change.
Broken by hand: kindOf with the old nesting: 2 of 3 tests fail.
Not tried: the tagged workflow itself; it runs on its half-hourly
schedule after this lands.
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.
hupeak (#1196): ZCode 3.18 writes credentials.json's values as
"enc:v2:os:<…>:<…>". decrypt reads enc:v1 alone, so the jwt read as
null and the card said "this sign-in has no ZCode session: sign in
again", which signing in again can't fix: ZCode writes enc:v2 again.
The new form looks bound to the system's own key store (the "os"
part); this change doesn't try to read it.
- A ZCode app sign-in that finds values in an enc: form other than v1
fails with "ZCode 3.18 keeps its sign-in in a new form this plugin
can't read yet: add the account with a Z.ai or BigModel sign-in",
instead of "ZCode isn't signed in on this computer".
- An account signed in "as ZCode" before has the same words on its
card's gift line. A browser sign-in, or enc:v1, keeps the old words.
Run (mote, HOME=$(mktemp -d)):
- bun test packages/zcode: 272 pass, 0 fail.
- bun scripts/check.mjs zcode: ok.
Broken by hand: origin/main's index.mjs (with giftSignIn exported) and
the new test: 1 fail, the sign-in says "ZCode isn't signed in on this
computer".
Not tried: ZCode 3.18 itself (not installed here); the stored values
are the shape the reporter showed. Reading enc:v2 is not done; #1196
stays open for it.
yukinomon measured it (#1197): when the billable list's first read after
a start failed, the listing fell back to OA_FALLBACK_MODELS, and 7 of its
10 ids are no longer in OfficeAce's catalog while 6 of the 9 callable ids
were missing from it. The in-process cache holds no table at start, so
one blip put the old list in front of the user until the next listing.
- fetchOfficeAceTokenRates reads once more (after 400ms) when it has no
table to keep; a network error, a non-2xx, an unparseable or an empty
answer each count as a failed read. With a table held it reads once,
as before.
- OA_FALLBACK_MODELS is the 9 ids the reporter measured as callable
(catalog ∩ rates on 2026-11-16).
- With no rates table at all, the listing is the account's catalog cut
to those known ids, so an id the catalog has dropped is not listed;
the static table only when that leaves nothing.
Run (mote, HOME=$(mktemp -d)):
- bun test packages/codearts/index.test.mjs: 215 pass, 0 fail.
- bun scripts/check.mjs codearts: ok.
Broken by hand: origin/main's index.mjs with the new tests: 3 fail (the
retry, the dropped ids, the catalog-cut fallback).
Not tried: a real OfficeAce account (none here); the ids come from the
reporter's measurement.
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).
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.
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).
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).
The owner (11-15): "正在使用的继续正常,加个提示,新用户不让下载".
0.2.0 answered every request with a 410. 0.2.1 restores the plugin as
0.1.18 had it (git checkout df7d7ae0 -- packages/antigravity), so a user
who has it keeps working. It stays out of registry.json, and magpie's
plugin.Add turns it away for anyone who doesn't have it listed, with a
line on the Providers page telling its users that Google suspends accounts
it sees used this way and pointing to agy-cli. The READMEs say so.
Run on mote at this tree, HOME a temp dir: bun scripts/check.mjs all, and
bun test packages/antigravity packages/agy-cli scripts: 195 pass, 0 fail.
a1pha1nthefog on X: a long session through Devin got "There is an issue
with this request, please try a different model" on every turn, quota
left, while a new session worked. On a real Devin account
(claude-haiku-5-5 and others), Devin answers invalid_argument with that
text to each of these, and each stays in the conversation:
- a picture whose bytes aren't the type it is said to be (a PNG labelled
image/jpeg or image/webp): now sent as the type its bytes are;
- a user prompt of white space alone: no longer sent (both wires);
- a thinking signature Devin didn't give (a fake one, or one from another
Claude provider): the request goes again once without signatures;
- a conversation past the window (2400KB of Go, ~1.01M tokens on a 1M
window; 2350KB passed at 991,278): past half the window by a bytes/4
estimate, the refusal is a 400 "input is too long for the model's
context", which magpie's gateway turns into prompt-too-long so the
agent compacts.
Not changed: up to 150 images, empty and image-only tool results,
documents, redacted_thinking and Devin's own signatures across six Claude
models all passed on the old code.
Run at 7a3d33c7 on mote: HOME=$(mktemp -d) bun test, 8818 pass, 20 skip,
0 fail; bun scripts/check.mjs ok. long-session.test.mjs on origin/main's
index.mjs: 5 of 7 red (the 2 green are the unchanged cases). Real account
on the new code: mislabelled JPEG and WebP, a fake signature, one in a
tool loop and a white-space user prompt all 200; 2400KB is 400
invalid_request_error "input is too long ... about 602459 tokens or
more, for claude-haiku-5-5-low's window of 1000000".
Not tried: the chat-completions path against the real account, models
other than Claude, and which of the four the reporter hit.
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).
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.
What changes:
- Custom rules: you can manage your own masking rules (aliases, checks for duplicates and limits, warnings before discarding edits) on their own subpage.
- History: rule-version and authorization history, up to 100 entries.
- Masking: tool schemas' enum, const, default and examples values are now masked.
- Receipts: a damaged receipt keeps the stages that are still valid.
- Dist check: `npm test` first checks that dist matches its source.
Version 0.4.3 to 0.4.6.
Run at 13ad10a8 on mica, which merges cleanly over 13a6f4c2:
- `bun test packages/company-guard`: 33 pass, 0 fail.
- `node --test`: 33 pass, 0 fail.
- `bun scripts/check.mjs company-guard`: ok.
What was read:
- The dist diff, line by line against src/protocols.js and src/session-authorization.js.
- The new rules.js fetch: it only calls the page's own receipt routes, the same as authorization.js.
Not run: `build.mjs --check`. esbuild isn't installed on the test box.
Co-authored-by: cyanask <44457432+cyanask@users.noreply.github.com>
AtomCode's glm5.3-flash group answers 403 "access disabled by request policy" when a request has no x-atomcode-session-id (#1186). The plugin now sends one:
- chat.headers fills it with the session id of the conversation the agent is in;
- the loader falls back to one random UUID per signed-in account when the hook didn't run or the session is empty.
Version 0.3.1.
Run at bbdbcc7a, with no atomcode changes on main since its base:
- `bun test packages/atomcode` on mote: 164 pass, 0 fail.
- `bun scripts/check.mjs atomcode`: ok.
Broken by hand: with main's index.mjs and the PR's tests, run on mica, 3 tests fail (header and signature, per-account stability, chat.headers). The other 161 pass.
Not tried: the live AtomCode gateway. The author's probes compare the same request with and without the header (200 against 403).
Co-authored-by: aqiu817 <19250671+aqiu817@users.noreply.github.com>
The raccoon card shows the daily pool (`daily_points`: 300 credits a day, each lasting 7 days) as its own "Daily pool" window, read as used / limit with a limit of max(2,100, daily_points, the unexpired daily grants in bills), along with its next expiry. When the pool is shown, routing weighs it and the aggregate Credits window becomes display-only (`aside`). The `setting_info` fallback and accounts with a daily pool of 0 keep Credits as the only weighted window. Version 0.1.13.
Run at 7d2bbf94 on mote (rebased on d123d540):
- `bun test packages/raccoon`: 58 pass, 0 fail.
- `bun scripts/check.mjs raccoon`: ok.
Broken by hand: with main's index.mjs under the PR's tests, 3 fail (the daily pool's used / limit, a daily_points over 2,100, and Credits when the bills cover every grant). The other 47 pass.
Not tried: a real Raccoon account. The window values come from the author's account data.
Co-authored-by: R227BOUT <235274933+R227BOUT@users.noreply.github.com>
After a gateway web search, one Claude assistant turn can hold two adjacent
signed thinking blocks before the answer. On replay the first went out as an
assistant prompt with no text and no call, and Devin answered the next
request 400 (yetone/magpie#6742). The last block of each adjacent run now
goes on the prompt that follows, with its own text and signature; the
earlier ones are dropped, as the API drops earlier thinking anyway.
Reviewed at 163f08fe0, merged onto main 0262214e6, on macOS (mote) with a
temp HOME: bun test packages/devin, 221 pass, 0 fail; bun scripts/check.mjs
devin passes. Broken by hand: with main's index.mjs the new test fails. The
author reports a live replay going from 400 to 200; not tried here against
a real Devin account.
Co-authored-by: bluesmilery <bluesmilery@users.noreply.github.com>
When the balance is a little over every grant the bills list (#936,
#1030), the Credits window counts what was spent down from the highest
balance seen. That top was kept in memory only, so after every magpie
restart the card read 0 used again (#1182). It is now also kept in
~/.config/magpie/raccoon-top-balance.json (MAGPIE_CONFIG_DIR when set),
one entry per account with a hash of its grant set: a new or expired grant
still starts the count again. Written through a temp file and a rename;
an unreadable file starts from the balance read, as before.
Not taken from #1182: rebuilding the window from expense bills (FIFO
against each grant). That needs the whole expense history on every poll
(a busy account has thousands of bills), and #1178 is reworking the
windows around daily_points at the same time.
Run on macOS (mote), with a temp HOME: bun test packages/raccoon, 55 pass,
0 fail; nothing was written under the test HOME's .config. bun
scripts/check.mjs raccoon passes. Broken by hand: with main's index.mjs
the new restart test fails (54 pass, 1 fail). Not tried: a real Raccoon
account across a real restart.
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).
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>
Cursor labels a refusal of the request's content as unauthenticated ("The provider refused to serve this request based on the content"). The plugin turned that into a 401 and asked the user to sign in again, though the account serves other requests. statusOf now matches that exact wording before the sign-in rule and answers 400 with Cursor's own message; the sign-in is kept. Every other unauthenticated error still asks for a sign-in. cursor 0.2.48.
Run at the reviewed head e43311357 merged onto origin/main 2ede7d53, on a Mac:
- HOME=$(mktemp -d) bun test packages/cursor: 431 pass, 0 fail.
- bun scripts/check.mjs cursor: ok.
Broken by hand: with the new line taken out, 5 tests go red (the content-refusal cases at 200/unauthenticated, 401 and 403/permission_denied, and RunSSE with stream off and on).
Not tried: a real Cursor refusal; the cases are fixtures of the reported wording.
Co-authored-by: Xulin Wu <wuxulin@bytedance.com>
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>
xxhhlk found that the growth event alone (0.2.31+) didn't earn the daily
credit: the same day, the account that chatted in WorkBuddy AI's own client
got it and three accounts chatting through the plugin didn't. Their capture
of WorkBuddy AI 5.9.4 shows three POST /v2/report calls around one user
send (chat_message_send; chat_request_send, chat_message_response,
chat_message_status, chat_request_response; agent_task_completed,
chat_response_complete), each answered {"code":0,"msg":"OK"}.
The plugin now sends the same three reports for the user's own chats, built
from the redacted field list in the issue, once the reply has been read to
its end: token counts and finish reason come from the reply's last usage
chunk. A step ending in tool calls reports its message only; the request's
events go with the step that ends the turn; chat_request_send with the step
the user's message opened. Not for a reply cut off, a refusal, a key
account or the China build. Fire and forget: a failed report is dropped and
the answer never waits on it. No message of the plugin's own is sent.
Run (mote, HOME=$(mktemp -d)): bun test in packages/workbuddy, 383 pass;
bun scripts/check.mjs workbuddy ok. New report.test.mjs (5 tests): the
three bodies in order with ids, tokens and headers, tool-call steps, the
cases that send nothing, and the reply passing through byte for byte.
sent.test.mjs's recorder answers /v2/report itself, so 0.1.43's chat bytes
are still held.
Broken by hand: no send at the stream's end -> report.test.mjs 2 fail.
Not tried: a real WorkBuddy AI account (whether the credit follows needs a
day's comparison; asked the reporter). Not sent: the client's
POST /console/as/conversations/<id> activity update and /v1/traces; the
conversation may not exist on the console side for a plugin chat.
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>
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.
discovery.forDisplay marks the kept list, but the (Paid) renaming rebuilt it with Object.fromEntries and lost the mark.
Archivemylife on X (agy-cli): "配置后报存提示成功,再打开还是全部都启用".
The same class as agy-cli 0.1.61: a list that isn't the account's own,
handed back as if it were, makes magpie relist on it and drop the models
the user picked that aren't in it. Marked with
Symbol.for("magpie.fellBack"), magpie's plugin host keeps the last good
list (keepListed) and the picks.
Run (mote-run, HOME=mktemp -d): node --test 24 pass on this change: all pass.
Red on the old code with the new test: "provider.models after a failed read keeps the fell-back mark" fails.
Not tried: a real account.
Plugins root bun test (HOME=mktemp -d) at this head, rebased on 13a6f4c2,
on Linux (wsl-run, magpie-desktop), covering the five commits above
and agy-cli 0.1.61: 8775 pass, 0 fail.
A non-OK business code in a 200 answer (the host saw an OK fetch) returned the static table unmarked; so did a throw. fake.mjs can now answer the models read with a code.
Archivemylife on X (agy-cli): "配置后报存提示成功,再打开还是全部都启用".
The same class as agy-cli 0.1.61: a list that isn't the account's own,
handed back as if it were, makes magpie relist on it and drop the models
the user picked that aren't in it. Marked with
Symbol.for("magpie.fellBack"), magpie's plugin host keeps the last good
list (keepListed) and the picks.
Run (mote-run, HOME=mktemp -d): index.test.mjs 34 pass on this change: all pass.
Red on the old code with the new test: "a refusal in a 200 gives the static table marked" fails.
Not tried: a real account.
A failed /v1/models read returned the declared set; marked on a copy (non-enumerable, so the list itself is unchanged).
Archivemylife on X (agy-cli): "配置后报存提示成功,再打开还是全部都启用".
The same class as agy-cli 0.1.61: a list that isn't the account's own,
handed back as if it were, makes magpie relist on it and drop the models
the user picked that aren't in it. Marked with
Symbol.for("magpie.fellBack"), magpie's plugin host keeps the last good
list (keepListed) and the picks.
Run (mote-run, HOME=mktemp -d): api.test.mjs 15 pass on this change: all pass.
Red on the old code with the new test: "a catalogue read that fails keeps the declared models" fails.
Not tried: a real account.
With Doubao closed or the menu read failed, models() served the built-in three (or an older cache) unmarked.
Archivemylife on X (agy-cli): "配置后报存提示成功,再打开还是全部都启用".
The same class as agy-cli 0.1.61: a list that isn't the account's own,
handed back as if it were, makes magpie relist on it and drop the models
the user picked that aren't in it. Marked with
Symbol.for("magpie.fellBack"), magpie's plugin host keeps the last good
list (keepListed) and the picks.
Run (mote-run, HOME=mktemp -d): doubao-work.test.mjs 59 pass on this change: all pass.
Red on the old code with the new test: "models() and usage never start Doubao" fails.
Not tried: a real account.
When neither GetCliModelConfigs nor the devin CLI named the account's models, the models hook served the snapshot list (with images) unmarked.
Archivemylife on X (agy-cli): "配置后报存提示成功,再打开还是全部都启用".
The same class as agy-cli 0.1.61: a list that isn't the account's own,
handed back as if it were, makes magpie relist on it and drop the models
the user picked that aren't in it. Marked with
Symbol.for("magpie.fellBack"), magpie's plugin host keeps the last good
list (keepListed) and the picks.
Run (mote-run, HOME=mktemp -d): images.test.mjs 5 pass on this change: all pass.
Red on the old code with the new test: "when Devin can't be asked" fails (fellBack undefined).
Not tried: a real account.
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.
Accounts signed in to Kiro elsewhere (Kiro Account Manager lists and
exports, kiro2api, the Kiro IDE's kiro-auth-token.json with its
<clientIdHash>.json client, kiro-cli's tokens) are imported in magpie's
"Import accounts from a file…" by their refresh token. Each is renewed
where its kind is renewed (Google/GitHub at prod.us-east-1.auth.desktop.kiro.dev,
Builder ID / Identity Center at oidc.<region>.amazonaws.com with its client)
and named by the email Kiro has for it. Other providers' entries in a
sign-in store are skipped, duplicates are renewed once, at most 100 a time.
A region or profile ARN read from a file can't pick a host any more, on
every route (import, the IDE's file, kiro-cli's DB, a saved sign-in):
regionOf takes only Kiro's API regions (us-east-1, eu-central-1) from a
profile, arnOf keeps only arn:aws:codewhisperer:<region>:<12 digits>:profile/<id>
(else Kiro is asked for it), and oidc/runtime/management/refreshURL refuse
a region that isn't an AWS region's shape.
Version 0.1.40: #1156 published 0.1.39 first, so main was merged into the
branch and the version raised (f8af341f). With arnOf, #1156's test fixture
ARN (account "1") was dropped and its reasoning-replay test went red on
the merge; every test fixture ARN now has a 12-digit account (0b899428).
What was run, on mote with HOME=$(mktemp -d) as CI:
- PR head 41938ff0, packages/kiro: bun test, 202 pass, 0 fail.
- The earlier review's repro (imported Google sign-in, fresh access
token, profileArn arn:aws:codewhisperer:attacker.example/#:1:profile/X):
at 41938ff0 every request goes to *.kiro.dev, nothing saved with the
crafted ARN. With 5dd9e682's index.mjs put back it and all five
profile-host.test.mjs tests are red (hosts [management.attacker.example]).
- Merged head f8af341f (main at baeb95a4): root bun test, 8771 pass,
1 fail (reasoning-replay's fixture, above).
- Reviewed head 0b899428: root bun test, 8772 pass, 0 fail, 613 files.
Main since gained only 2523b43a (packages/agy-cli/test/smoke.mjs).
Read for credential safety: no logging; errors carry no token; refresh
tokens and client secrets go only to Kiro's auth service and AWS OIDC;
an imported sign-in has no dbKey/idePath, so renewing it writes back to
no kiro-cli or IDE file. No .github, dependency or new host.
Not tried: a real Kiro account imported from a real export.