1c9ade6c819da573df20b2d2f449eeee29774564
101
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
afe4c08643 |
agy-cli 0.1.87: agy's Individual quota reached ending fails the turn as a rate limit
@Airan_FS on X (11-17): when an Antigravity account's own quota is used up,
agy ends the turn with "⚠ Individual quota reached. Please upgrade your
subscription to increase your limits. Resets in 1h18m40s." The bridge only
knew fixed ending lines, so this one went to the client as the model's
reply and magpie never asked the next account.
The bridge now holds a line starting "⚠ Individual quota reached" that
nothing follows, and ends the turn with a rate_limit_error carrying agy's
words and the reset ("agy bridge: Antigravity quota reached: Individual
quota reached. ... Resets in 1h18m40s."; HTTP 429 without streaming).
Words the model wrote before it still reach the client. A quote of the line
with more text after it stays text. magpie rests the account until the
reset it reads from the error (magpie's routing.go change in the same fix).
The words are from a user's report on discuss.ai.google.dev (limit
membingungkan) and @Airan_FS's tweet; the agy binary carries "individual
quota reached".
Run (mote, HOME=$(mktemp -d)): bun test agy-cli.test.mjs 20 pass, 0 fail;
node --test repeat-batch.mjs smoke.mjs 72 pass, 0 fail; bun scripts/check.mjs
ok.
Broken by hand: 0.1.86's index.mjs with these tests: three of the four new
tests fail (the ending alone, after partial text, non-stream 429); the
quoted-line test passes on both.
Not tried: a real agy account with its quota used up.
|
||
|
|
38233a569c |
agy-cli 0.1.86: agy starts with telemetry off (#1236)
The bridge passes --disable-telemetry when `agy acp --help` lists it, so agy doesn't report the run to its vendor; AGY_BRIDGE_TELEMETRY=1 keeps agy's own default. The flag is part of the spare's launch key. By ump45nose (#896, PR #1236), landed on top of #1235 with only the version line's conflict resolved. The flag was checked in the agy binary on this Mac (strings: "disable-telemetry", "--disable_telemetry"). Run (mote, HOME=$(mktemp -d)): - At the PR head 0ead2594: bun test agy-cli.test.mjs 20 pass; node --test repeat-batch.mjs smoke.mjs 66 pass; check.mjs ok. - At this tree (with #1235): bun test agy-cli.test.mjs 20 pass, 0 fail; repeat-batch.mjs + smoke.mjs 68 pass; check.mjs agy-cli ok. Broken by hand: origin/main's index.mjs with the PR's tests: "#896: an agy whose acp --help lists --disable-telemetry starts with telemetry off" and smoke.mjs fail. Not tried: a real agy acp run with the flag (the local agy account answers 403). Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com> |
||
|
|
c52dd35bfa |
agy-cli 0.1.85: agy's output-cap notice never reaches the client (#1235)
agy's output-cap retry writes three lines of its own into the reply (the cut-off notice, its instruction to continue, "Retries remaining: N"); the bridge now drops them where they start a line, held across chunks, and keeps a mid-line quote of them. By ump45nose (#892). The three strings were checked against the agy binary on this Mac (strings: "Your previous response was cut off because it exceeded the output token limit", "Please continue from where you left off, keeping your response shorter", "Retries remaining: %d" and "%d."). Run at e95ee1d5 (mote, HOME=$(mktemp -d)): - bun test agy-cli.test.mjs: 20 pass, 0 fail. - node --test repeat-batch.mjs smoke.mjs: 66 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with this PR's tests: "#892: agy's output-cap notice never reaches the client" fails. Not tried: a real turn that hits agy's output cap (the local agy account answers 403). |
||
|
|
44bfefb7a7 |
agy-cli 0.1.84: an ended access token is renewed by the plugin for usage, so agy never opens a sign-in (#1234)
qiankun229 traced it in agy's own logs (#1234): at Windows startup the background usage read ran `agy -p /usage` with an ended access token and a refresh token. agy's silent renewal failed for a moment (a 10s keyring timeout, or "no such host" for oauth2.googleapis.com before the network was up) and agy fell back to an interactive Google sign-in, which opens the browser through ShellExecuteW past the BROWSER/PATH shims. The next read renewed the same token fine. The stored-sign-in precheck passes such a token, since it can be renewed. - createUsageReader: when the stored access token has ended or ends within two minutes and has a refresh token, fetchUsage reads with `direct`: it runs `agy --version` only (no sign-in) and reads the quota the way agy does (readQuotaDirect, loadCodeAssist then retrieveUserQuotaSummary, with agy's User-Agent), renewing the token in memory. agy's stored sign-in is never written. `agy -p` isn't run. - A failed renewal is a failed read: it backs off as before and keeps the sign-in. A network error says to check the network or proxy. - Google answering the refresh with invalid_grant (400/401) is kind "auth": the account reads as signed out ("Sign in again") and nothing runs for that sign-in again until another is stored. - A token with time left still goes through agy -p, as before. Tests: three tests that leaned on an ended token only to get agy to run now use a token whose end isn't said (as the existing "refreshing" test does); what they check is unchanged. Run (mote, HOME=$(mktemp -d)): - test/usage.mjs (AGY_BRIDGE_STORED_SIGNIN=skip node --test): 41 pass. - bun test agy-cli.test.mjs: 20 pass, 0 fail. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's usage.mjs with the new tests: the three new tests fail (agy -p ran for an ended token; no backoff/network message; invalid_grant not auth), 38 pass. Not tried: Windows with a real ended token and the network down at startup (no agy account here: the local one answers 403); the requests are the ones the region-refusal path has made since 0.1.7x. |
||
|
|
f10738917f |
agy-cli 0.1.83: a pending call Codex dropped is answered as cancelled, and the live session goes on (#1231)
Codex delivers a sub-agent message at a sampling boundary by keeping the interrupted reply's text, dropping its tool call, and sending the history on with the new message. Since 0.1.74 lineageVerdict called that a fork: the pending call was closed with SUPERSEDED_NOTE and the conversation was replayed in a new session, losing agy's cached prefix and, for a long history, the turns past the 112 KiB prompt budget. Now lineageVerdict returns "dropped" when the recorded history with the turn's unanswered calls taken out is exactly the client's history, and the reply that carried them kept some text. keepDroppedTurn answers those calls with "cancelled by the client, not executed" through the existing steerInSession (MCP commit wait, session/cancel, history set to the client's), and the new trailing message goes in as the next prompt in the same session. A changed reply text, a reply that was only the call, grown tools, another work dir or other instructions still replay as before; so does a steer that fails. Run (mote, HOME=$(mktemp -d)): - node --test test/dropped-call.mjs: 3 pass (kept session; changed text replays; call-only reply replays). - bun test (agy-cli): 38 pass, 0 fail. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new test: the kept- session case fails (a second agy session is started); the two replay cases pass on both. Not tried: a real Codex session with a sub-agent message arriving mid-sampling against a real agy; the fake reproduces the request shape the issue describes. Part 1 (history seed through systemPrompt.append, opt-in) is not in this change. |
||
|
|
75068043af |
agy-cli 0.1.82: each account lists the models agy offers it, not the last account's (#1229)
The cached `agy models` list and what agy acp offers a client were one set of module globals. With several accounts on different plans, the last session or probe of any account replaced them, so every account's models() listed that account's models and the catalog flipped as requests went by (#1229). - The catalog, the offered set and the refresh/probe state are now kept per account home (currentHome(), "" for agy's own). magpie asks each account's models() in that account and serves the union, and already sends a model only to an account that lists it. - A Proc remembers the account it was started for, and the offer probe remembers its account at the start, so what agy says later is noted for that account even outside its scope. - models.json keeps agy's own account under the executable's path as before; another account's entry is "<path>#<home id>". - provider.warming() waits on every account's listing and probe, and again for a probe a landing listing starts. - A new account's static start no longer replaces the usage reader's rows from another account's real list; a changed agy still does. Run (mote, HOME=$(mktemp -d)): - bun test in packages/agy-cli: 37 pass, 0 fail (test/catalog.mjs 34 of 34 under node --test too). - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new test: red ("#1229 每个账号列自己开放的型号,互不覆盖"). Not tried: two real agy accounts on different plans (none here); the test fakes them with a per-HOME offered list. |
||
|
|
83a677177b |
agy-cli 0.1.81: agy's "Verification Required" is a 403 that says how to verify
kidgpt on X (Windows 11, Claude Code in VS Code, gemini-3.8-flash) got the bare text "Verification Required" as the model's answer. agy 1.5.9 turns Google's 403 VALIDATION_REQUIRED into that line (utils.CustomUserErrorMessageFromHTTPError, read from the binary) and ends the turn with "\n⚠ Verification Required\n", which the bridge didn't know, so it went out as a successful reply. - The ending is a sixth agent-error marker. The turn fails as a no-retry 403 permission_error (stream error event and HTTP 403 with x-should-retry: false, as #1201's banned account), in the words magpie's gateway reads as Google verification ("this Google account needs to be verified: open <link> in a browser"), so magpie rests the account as needing verification and shows the link. - The link comes from agy's log for the turn (validation_link / validation_url, or the "in your browser to continue:" line) when there is one; otherwise the message says to open the Antigravity app or run agy signed in to the account. - Sibling: agy's eligibility refusal for the same cause ("Please verify your account in your browser to continue:\n<url>", "Verification required. Please complete verification…", from AuthStatus.EligibilityError / IneligibilityFromResult) got the region/VPN advice and lost the URL in agyRefusal (models, sign-in probe). It now gets the same verify message with agy's link. - A model quoting the line with more text after it keeps its text. Run (mote, temp HOME): node --test test/repeat-batch.mjs test/usage.mjs 95 pass; bun test packages/agy-cli 37 pass 0 fail (smoke.mjs included); bun scripts/check.mjs agy-cli ok. Windows (xiaomi-gpu, win-run): repeat-batch, usage, windows-nc, platform 120 pass 0 fail. Red on the old code: with origin/main's index.mjs and usage.mjs the two new ending tests fail (a 200 reply) and the agyRefusal test gets the VPN advice. Not tried: a real account Google wants verified; the exact log line agy writes for a VALIDATION_REQUIRED turn (the fixture follows Google's JSON error's validation_url). |
||
|
|
f6cf4512dd |
agy-cli 0.1.80: forked sessions and subagents are kept apart by x-magpie-session and x-magpie-subagent (#1217)
Derive a session scope from x-magpie-session (magpie's synthetic magpie-<24hex> id ignored, capped at 128) and x-magpie-subagent (capped at 64), from init.headers or a Request's headers, and key conversations, live-session reuse, clientSeen and tool-result matching by it. A forked session or a subagent carrying its parent's tool_use history no longer collides with the parent's convKey or toolCalls (409 conflicting duplicate result, lineage_fork superseding the parent's pending turn). A body given only on a Request is read from it. Contributed by @wjhauannn. Run at 46fce29f (mote, macOS, HOME=$(mktemp -d)): - node --test repeat-batch.mjs conversation-key.mjs: 97 pass, 0 fail. - bun test packages/agy-cli: 37 pass, 0 fail. check.mjs agy-cli: ok. - CI: test, bumped, on-npm green. Broken by hand: origin/main's index.mjs with the new tests: 5 fail (55, 56, 57, 59, 60). Checked against magpie main: the gateway sets x-magpie-session (sessionOf) and x-magpie-subagent (subOf) on plugin requests only. A spare takes the scope through #assign on adopt. Not tried: a real agy account with a forked Claude Code session. |
||
|
|
aafb20e6bf |
agy-cli 0.1.79: agy models runs with modelProvider cleared, so a gemini settings.json doesn't keep a stale list (#1218)
A turn runs agy acp on the bridge's folder and the Google sign-in, but the
listing, refusal and sign-in probes ran a bare `agy models`, which reads
the user's own settings.json. With "modelProvider": "gemini" there (an AI
Studio key), the listing failed without GEMINI_API_KEY in magpie's
environment and the old catalog stayed, or listed API-key mode's models.
- agy 1.5.9's global --settings takes a session-only settings.json object.
The three `agy models` calls run as
`agy --settings '{"modelProvider":""}' models` when agy's --help lists
--settings (asked once per binary, cached by path, mtime and size like
acpHelp); an agy that doesn't list it gets the bare command, as before.
The reporter checked that this command goes back to the Google backend.
- testkit's fake answers `agy --help` and records each models spawn's
args; its models behaviour sees them.
Run (mote, HOME=$(mktemp -d)):
- node --test on every node test file in packages/agy-cli/test: all pass
(catalog 33, repeat-batch 54, usage 36, usage-settlement 40, ...).
- bun test packages/agy-cli: 37 pass, 0 fail (cp-hook and smoke are
bun-only).
- bun scripts/check.mjs agy-cli: ok.
Broken by hand: origin/main's index.mjs with the new tests: the --settings
test fails (32 pass, 1 fail).
Not tried: a real agy with a gemini settings.json (the local agy account
answers 403); the flag's effect is the reporter's run. Not changed: with a
file sign-in, acp itself still reads the user's settings.json (no
--gemini-dir there).
|
||
|
|
9720caa468 |
agy-cli 0.1.78: a banned account's ending is a no-retry 403, not an answer (#1214)
agy 1.5.9 writes a banned account's "PERMISSION_DENIED (code 403): This service has been disabled in this account for violation of Terms of Service…" ending into the reply as text, and the bridge answered it as an end_turn 200 (#1201). The exact ending is now one of the end-of-turn markers (split across chunks too), agyRefusal names it, and it ends the turn as permission_error 403 with no retry: x-should-retry: false on a non-stream reply, status 403 + noRetry in a started stream's error event. A generic PERMISSION_DENIED, or the sentence quoted mid-answer, is not reclassified. By yetihan. Run at the reviewed head f4e82352 (mica, temp HOME): - node --test test/repeat-batch.mjs 54 pass; test/usage.mjs 36 pass. - bun test packages/agy-cli 37 pass; bun scripts/check.mjs agy-cli ok. Broken by hand: origin/main's index.mjs and usage.mjs with the new tests: the two #1201 bridge tests and the agyRefusal test fail. Not tried: a real banned account. |
||
|
|
2ac7af2a39 |
agy-cli 0.1.77: release 3781c50f's documents
|
||
|
|
3781c50f52 |
agy-cli 0.1.76: a URL or text document goes to agy as text, not a 400
daoche_wuzui on X (magpie 0.1.4264): URL context through agy-cli failed
with "a binary or URL document block in a user message (agy's ACP prompt
accepts text and images only) is not supported". The bridge turned away
every document that wasn't a text source.
agy 1.5.9's initialize says promptCapabilities {image, embeddedContext},
and its binary has only messages.EmbeddedResource.InlineText: an embedded
resource reaches the model as inline text, so a binary file can't be
carried. What can, now is (documents.mjs):
- a URL document (http/https): its URL, said to be unread, so the model
fetches it with the client's tools instead of guessing;
- a base64 document of a text type (text/*, JSON, XML): its decoded text,
when it is valid UTF-8;
- a PDF or other binary inside a tool_result (Claude Code's Read of a
PDF): a note that it couldn't be attached and to extract its text with
a tool, so the turn goes on instead of failing.
Still refused, with what to do: a PDF attached to the user message ("paste
the document's text, attach its pages as images, or let the agent read the
file with a tool"), a Files API file_id (send it inline), a non-http URL.
There is no PDF-to-text helper here or in magpie to extract it with.
Neither note names agy, the bridge or magpie.
Run at this tree (mica, HOME=$(mktemp -d)): packages/agy-cli bun test 37
pass 0 fail (new test/documents-unit.mjs, 15 checks); smoke ALL OK (381
checks); bun scripts/check.mjs agy-cli ok.
Broken by hand: smoke with 0.1.75's index.mjs: 3 FAILURES (the URL/text
document, the PDF 400's hint, the PDF in a tool_result).
Not tried: a real agy model. The owner's agy account answers "This
service has been disabled in this account for violation of Terms of
Service", so the fix was checked against the fake agy only. The
reporter's client isn't named in the tweet.
|
||
|
|
481ec997a5 |
agy-cli 0.1.76: a tool result buried under a client's own notice settles the round, not tool_state_conflict (#1208)
A client that answered the bridge's pending call and then wrote an assistant notice of its own and a new prompt (Hermes Agent's "This turn did not complete…" closer) carried the result in history, not the trailing. With no trailing results the request took the acquire path, lineageVerdict saw the carried tool_use and answered 400 tool_state_conflict on every resend until the 30-minute result timeout. Now, when every call of the pending turn that the request carries has a tool_result after it, the round is settled on the client's side: the turn is superseded (logged as lineage_answered) and the request replays as a new session, the buried result and the new prompt included. A carried call with no result is still a terminal conflict. Reported by 1468323775 with the exact request shape and a live repro. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli: bun test: 36 pass, 0 fail (smoke 382 checks). - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new smoke checks: 3 fail, with the reporter's 400 tool_state_conflict body. Not tried: a real agy account (the local one answers 403) or Hermes Agent itself. The live session's prompt cache is not kept on this path: it replays as a new session, as an interrupted round already does. |
||
|
|
6514f69e62 |
agy-cli 0.1.75: release #1202
Releases wjhauannn's #1202 (
|
||
|
|
37df65a3f1 |
agy-cli: a thinking+text assistant tail is accepted, the newest history turn outlasts an oversized first one, and a live drop logs its reason (#1202)
wjhauannn's PR, reviewed at 3b85727243488a64d90f25a2f28f5cc5c3b9b471:
- assistantTextOf skips thinking / redacted_thinking blocks, so a trailing
assistant prefill carrying thinking + text is no longer a 400; thinking
+ tool_use is still refused.
- renderInitialPromptParts: when an oversized history[0] leaves no room
for any later entry, history[0] is clipped so the newest history turn
before <current_turn> is kept (clipped to the room left if needed).
- A live tool-turn drop logs a drop_live event with its reason
(interrupted, image_result, history_mismatch, tools_grew, work_dir,
instructions), and session_new records that reason, not no_live.
Run at the reviewed head cherry-picked onto origin/main
|
||
|
|
3d9ac97f91 |
agy-cli 0.1.74: a turn the conversation went on without is replayed at once, not after two 409s (#1051)
NieiR's logs on #1051 (agy-cli 0.1.69, agy 1.5.9, OpenCode through a routing group of google, devin, neko and agy-cli): agy-cli left a turn detached with 5 pending calls at 13:51:47, the group served the next 16 requests on google and neko, and at 14:07:36 google's 429 failed back to agy-cli with google's own tool round at the tail. None of those ids were agy's, the held turn was neither stale nor expired, so the request got 409 "no active MCP call matches these tool results" twice and was replayed only at the third try (NO_PROGRESS_REPEAT_LIMIT). movedOnVerdict counts such a turn as stale ("moved_on") on the first request: its calls are pending, at least one of its calls is in the client's history, and after the last of them comes an assistant tool round whose ids don't have the bridge's shape (toolu_ + 24 hex). It is asked in the unmatched-results path and again under the lock in recoverStaleTurn, so the reclaim and replay are the existing ones. Left as before: a sibling request that only leaves the turn's calls out (a side request, a compaction fork) still gets 409 and needs three, as smoke.mjs's "unmatched results alone cannot supersede" and A7 check; a later round with ids of the bridge's shape is not taken as moving on. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli bun test (all suites, smoke included): 36 pass, 0 fail; repeat-batch.mjs alone: 48 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new tests: the moved-on request answers 409 (the first new test fails); the own-shape test passes on both. Not tried: a real routing group failing over to real agy. |
||
|
|
369643183f |
agy-cli 0.1.73: a batching call Hermes split into one call per entry is folded back (#1150)
NieiR traced a Hermes Agent turn (agy 1.5.9, chat/completions) that ended in 409 "some tool results do not belong to the active response" (#1150): agy called Hermes' batching tool once, tool_call({calls: [4]}), and Hermes wrote it into its history as four tool_calls of one entry each. The first kept the bridge's toolu_ id; the other three got call_<hex> ids of Hermes' own, each with a result. Only the first matched a bridge call, so the round was refused and Hermes gave up the turn. foldSplitCalls, run on the canonical body before anything reads it, folds such a round back into the one agy made: the calls' array field joined in order under the first (bridge) id, and their results joined in order as that call's one result (an error only if every part was). It folds only when a run of same-named calls opens with a bridge id (toolu_ + 24 hex), every other id is not one, every input is an object with the same single array field, and either every call has its result or none has (a round still waiting). Two calls the bridge made itself are never folded. README (zh, en) says so. Not in this change: NieiR's second finding, that #selfPollCapped stays off for a turn once any of its calls was seen by the client, so an orphaned turn keeps generating every 150s until the 30-minute result timeout. Left for its own commit. Run (mote, HOME=$(mktemp -d)): - packages/agy-cli bun test (all suites, smoke included): 36 pass, 0 fail; repeat-batch.mjs alone: 46 pass. - bun scripts/check.mjs agy-cli: ok. Broken by hand: origin/main's index.mjs with the new tests: the split round answers 409, as reported; the never-fold test passes on both. Not tried: real Hermes Agent against real agy. The test drives the bridge through its real entry points with a fake agy. |
||
|
|
9e86a2c7b7 |
proc: a Linux zombie no longer holds a lock (#1198)
yetihan (#1198): a lock whose owner is a Linux zombie was held for good. process.kill(pid, 0) succeeds on a zombie, so 15 packages' lock and liveness checks counted an exited, unreaped owner as alive. - scripts/proc.mjs: processStatus(pid) is dead on ESRCH, and on Linux also when /proc/<pid>/stat says Z or X; EPERM is "permission", any other error "unknown". processAlive / processExists keep each caller's old EPERM and unknown-error meaning. - scripts/sync-proc.mjs copies it into each package (--check in the tests); every package's own check keeps its old semantics, now with zombies dead. agent-console's daemon bundle and window-warmup's dist are rebuilt. - 15 packages bumped. Review run at 28ef6622 (mote, HOME=$(mktemp -d)): - node scripts/sync-proc.mjs --check: ok. - bun test (whole repo): 8934 pass, 0 fail. - bun scripts/check.mjs: every package ok. - window-warmup's build reproduces its dist/plugin.js byte for byte. agent-console's bundle diff read line by line: the proc module plus esbuild's renumbered imports, nothing else (esbuild isn't installed on mote, so it wasn't rebuilt there). - Real zombie on Linux (WSL, magpie-desktop): a bash child left unreaped by an exec'd sleep, /proc stat "Z": the old kill(0) check says alive, processStatus says dead; the running process says alive. Not tried: each package's lock contention end to end. |
||
|
|
0b0b180957 |
agy-cli 0.1.72: Orchestrator isn't listed, since through the bridge it is its planner alone
@jiangnan_ on X (magpie 0.1.4283, agy 1.5.9): "Orchestrator (Carbon)" through the bridge is single Carbon with no effort levels and no limits. Orchestrator pairs a planner (Carbon or Argon) with Gemini 4 Hydrogen, which applies edits and runs builds with agy's own tools (Antigravity's models page). The bridge's agent has tools: [] so the client's tools are the only ones, and the handoff can't happen. Making it work would mean agy editing the disk outside the client, which the bridge exists to avoid. So: - gemini-pro-orchestrator* rows (or names starting "Orchestrator") are left out of the listed and the routed catalog. - A request naming one gets a 400 (no retry) naming the model it would really run: gemini-4-carbon, or gemini-4-argon for -argon/-g1-pro, which have their effort levels and limits. - Limits for the families that had none, from sourced numbers: claude-sonnet-4-6 / claude-opus-4-6(-thinking) 250000/64000, gemini-3.5-flash 1048576/65536 and gemini-3.1-flash-lite 1048576/65535 (Antigravity's own model list, magpie's testdata/antigravity-models-2026-10-20.json); gemini-4-hydrogen 1048576/65536 (Google's own API listing in models.dev). Hydrogen's four efforts already grouped. gemini-3.6/3.7-flash and gemini-3-flash-preview stay without limits: no source names theirs. Run (mote, sandbox HOME): bun test packages/agy-cli/ 36 pass; bun scripts/check.mjs ok. Broken by hand: the new catalog test against origin/main's index.mjs is red (Orchestrator listed, no Hydrogen limit). Not tried: no Ultra or Pro account here (the owner's is free tier), so no real Orchestrator, Carbon or Hydrogen request was sent, and the planner-only behaviour is from the docs and the bridge's tools: [], not observed. |
||
|
|
d7265c17e4 |
agy-cli 0.1.71: a new conversation takes a spare agy that is already started
A new conversation spawned `agy acp` and waited for initialize before session/new. Now, after a conversation starts, the plugin warms one spare agy for the same account, binary, folder, flags and environment: spawned and initialised, with no session. The next new conversation for that key opens its session on the spare and skips agy's start. Then another spare is warmed. Only the process is warmed. On WSL with agy 1.5.9, measured through a logging HTTPS proxy, spawn + initialize + 45s idle made no connection to any host. session/new is where agy sends Code Assist calls (loadCodeAssist, fetchAvailableModels, quota, user info, experiments), plus telemetry. Closing an unused session writes its trajectory ACLs at Google. Sessions also carry the conversation's own instructions. So sessions are never opened ahead. agy reads its sign-in at session/new, so a spare picks up a sign-in that changed after it started. Spares are stopped when idle (IDLE_MS), first when the pool needs room, never warmed when the pool has one slot left, at most 2 at a time, and with the host (reapOnExit). agy also exits when its stdin closes. AGY_BRIDGE_SPARE=0 turns them off. TTFT of a second new conversation (test kit fake agy, initialize 1000ms, session/new 3000ms): first 4026ms, second 3008ms; before, both ~4s. Real agy start, measured on WSL: ~1s cold, ~0.25s warm. That is the saving. The ~3s session open (Google) and model latency remain. Run (mote): - test/spare.mjs on the old index.mjs (AGY_BRIDGE_TEST_INDEX): 6 of 7 red, only the AGY_BRIDGE_SPARE=0 case green. On the new index.mjs: 7 of 7 green. - `HOME=<sandbox> bun test packages/agy-cli/`: 36 pass, 0 fail. - `bun scripts/check.mjs` ok. The test kit defaults AGY_BRIDGE_SPARE=0 so suites that count spawns keep their counts. Not tried: a real signed-in account through the spare path, native Windows agy, macOS agy. |
||
|
|
175dfd2555 |
agy-cli 0.1.70: say when Google refuses the account (#3501) instead of a fallback list
Three X reports (16 Nov): "You do not have a valid license of this product (#3501)", "models can't be fetched", and "magpie's agy proxy stopped working". agy 1.5.9 gets Google's 403 #3501 on its eligibility check and fails every command with it (agy models, agy -p). The plugin hid it: models() fell back to the static catalog as if the account had those models, usage said only "not eligible", and a request got 400 "model ... is unavailable to this agy account" because the ACP session offers none. Now: - usage.mjs: agyRefusal() reads Google's refusal out of agy's output (#3501 first, else the eligibility line), never from agy's own log lines or a network failure; usage reports the #3501 text with what to do (update agy and sign in again, personal Gmail, unset AGY_ADC_AUTH, VPN/region). - index.mjs: a failed `agy models` records the refusal per agy home; models() throws it (magpie shows it as the list error) instead of the static catalog, and recovers when agy lists again. A request whose session offers no model, or whose turn ends on the refusal, answers 403 permission_error with the reason (stream and JSON), not 400. After a sign-in, magpie shows "agy signed in, but" and the refusal. - README (zh, en): a Troubleshooting entry for #3501. Run (mote, HOME=$(mktemp -d)): - bun test ./packages/agy-cli: 35 pass, 0 fail (110s); bun scripts/check.mjs ok. - test/usage.mjs with cp-hook preload 6 more times: 0 fail. One earlier run had "a direct read that fails leaves the region refusal standing" red with "agy usage could not start the CLI" at load ~28; the same red shows on the base tree ( |
||
|
|
b35d4b35b2 |
agy-cli README: the plugin calls Google itself only for a region-refused quota read
0.1.69 (
|
||
|
|
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
|
||
|
|
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). |
||
|
|
9907c187b2 |
agy-cli 0.1.68: bring in the retired Antigravity plugin's accounts
A user asked on X (@tongzhenbao) to move the accounts signed in on the
retired Antigravity plugin (provider "antigravity") into agy-cli in one
click. That plugin signed in with Antigravity's own Google OAuth client
(1071006060591-tmhssin2h21lcre235vtolojh4g403ep), and agy's own
`agy acp --login` link uses the same client id, so agy can take those
refresh tokens as its own: nothing is sent anywhere agy doesn't already
send its sign-in, and no other client is spoken for.
auth.import (magpie's "Import accounts from a file…") now takes:
- the old plugin's saved oauth entry, one, a list or plugin-auth.json's
map of them (refresh "<token>|<project>", accountId = email);
- agy's own token file / keyring value (go-keyring-base64: prefix too).
A bare refresh token or another tool's export is refused, since it may be
another client's. Each account gets its own agy home with the token file
agy writes (0600), and is added only once `agy models` runs there; one agy
refuses leaves no home. An account already signed in (same email) gives
its existing key back.
Run:
- mote: packages/agy-cli `HOME=$(mktemp -d) bun test`: smoke, signin,
cloak, install all pass; test/usage.mjs red (3 of 30, different each
run) and red the same way on pristine origin/main
|
||
|
|
e5cb9598c8 |
agy-cli 0.1.67: more than one Google account, each with its own usage
tongzhenbao on X wanted several accounts with their usage, as the old built-in had. agy keeps one sign-in where it looks for it (the system keyring's single "gemini"/"antigravity" entry), so the plugin was single: true and its second sign-in way replaced the account. Now the first account is agy's own, unchanged, and "Add another Google account" signs another one in to an agy whose home is the account's own (XDG_STATE_HOME/magpie-agy-bridge/accounts/<id>). Every agy run for that account (sign-in, models, usage, requests) gets HOME (USERPROFILE on Windows) there and SSH_CONNECTION set, which agy 1.5 reads as an SSH session and so keeps the sign-in in .gemini/antigravity-cli/ antigravity-oauth-token under that home rather than the keyring. The account's home is saved in its metadata (agyHome); the loader, usage and models run its work in an AsyncLocalStorage scope that childEnv and the stored sign-in read follow. Its conversations are keyed apart, and it gets no --gemini-dir (its token is under its own .gemini). single: true is gone, so each account has its own row and usage and rotates like any other. Checked by hand before writing it, with real agy and planted (expired) tokens in sandbox homes: agy read the file token from the sandbox HOME on macOS (mote) with SSH_CONNECTION set, on Windows (xiaomi-gpu) with USERPROFILE set, and in WSL. The live keyring was never touched. Run: - packages/agy-cli `HOME=$(mktemp -d) bun test` on mote: 35 pass, 0 fail. - bun scripts/check.mjs on mote: ok. - test/smoke.mjs on Windows (win-run): ALL OK (369 checks). - Broken by hand: the new smoke checks against the old index.mjs, signin.mjs and platform.mjs: 6 FAILURES (the method, single, the home, SSH_CONNECTION, the saved account, the failed home's cleanup). Not tried: a real Google sign-in of a second account, so agy writing the token file under SSH detection is known from file-mode users (plugins#1165) rather than seen here. Signing an added account in again makes a new home and leaves the old one (~800K). Every account shares one model catalog. |
||
|
|
0262214e67 |
agy-cli 0.1.66: a display name two families share names neither (#1180)
model-ids.mjs's nameIndex said "one name, two families: no match" but kept whichever family came first: the check in its first loop read the index before anything was in it. Names are now collected with every family that claims them, and a name claimed by more than one maps to nothing, so a usage window never names the wrong family's ids. Also drops the unused groupNoDesc helper from test/usage.mjs. Both were noted in #1180's review. Run on macOS (mote), CI-style with a temp HOME: bun test packages/agy-cli, 35 pass, 0 fail; bun scripts/check.mjs agy-cli passes. Broken by hand: with #1180's model-ids.mjs and the new test, the test fails (34 pass, 1 fail). Not tried: a real agy catalog with a shared name (none is known today). |
||
|
|
f4c2f2fb2b |
agy-cli 0.1.65: usage windows name the model ids they cover (#1180)
A usage window from `agy usage` now carries the model ids it covers, taken from the catalog `agy models` listed: each display name in the group's "Models within this group:" line (or the group's own name) maps to the family id and every effort variant the catalog serves. With no catalog yet, or a name the catalog doesn't have, a window has no ids. The windows stay aside, so routing is unchanged; agy-cli 0.1.65. Run at 8acf7ffb5 on macOS (mote), CI-style with a temp HOME: bun test packages/agy-cli, 35 pass, 0 fail; bun scripts/check.mjs agy-cli passes. Not tried: a real agy account (the local one answers 403). Co-authored-by: Ruining Yang <ArmedHelicopter@users.noreply.github.com> |
||
|
|
2ede7d53c1 | agy-cli 0.1.64: startup diagnostics aren't sign-in talk (#1177) | ||
|
|
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
|
||
|
|
74998a9232 |
agy-cli 0.1.63: run_command's toolSummary no longer collides with agy's own (#1174)
Releases
|
||
|
|
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> |
||
|
|
b840915abc |
agy-cli 0.1.62: magpie's sign-in installs agy where there is none, and the plugin keeps that copy current (niuniu_8964 on X)
In magpie's Docker image there is no agy, so Sign in failed with "agy CLI not found". The plugin now declares auth.cli (magpie 0.1.4246's hook, engines.magpie raised to it): when agy isn't found, magpie's sign-in shows "Installing Antigravity CLI…" and the plugin installs it the way Google's install.sh does: the same manifest, the download checked against its sha512, the antigravity binary taken out of the tarball, tried with --version, then renamed into place. It goes into the data folder ($XDG_DATA_HOME/magpie-agy-cli/agy, ~/.local/share without it, %LOCALAPPDATA% on Windows), which in the container is on /config, and is searched last, so an agy the user installed wins. That copy is kept current a minute after start and every 6 hours, only while it is the one in use and not when AGY_CLI_DISABLE_AUTO_UPDATE is set. Also: findAgy handed out a cached path to an agy removed since, so the sign-in tried to spawn it (ENOENT) instead of installing it; and a write loop left an error listener per wait (MaxListenersExceededWarning on the 260MB download). Account code is unchanged. Run, on mica: bun scripts/check.mjs ok; agy-cli bun test 34/34 under a temp HOME (install.test.mjs: 10, against a local server). A6b red on the old findAgy, green now. Real use in magpie's Docker image (xiaomi-gpu, linux amd64), with magpie 0.1.4246's tree: `magpie plugin login agy-cli 1` and the browser UI's POST /api/plugin-signin both installed agy 1.5.9 into /config/data/magpie-agy-cli and went on to agy's Google link; it survived a restart; agy.version set back to 1.5.0 was updated a minute after start. Not tried: finishing the Google sign-in in the container, a real install on macOS, Windows or musl. |
||
|
|
e4c825b554 |
agy-cli 0.1.61: picks stick, and a second Google account can be signed in
Archivemylife on X: "没法sign in第二个账号,点击sign in again后过一会就
恢复原状,没有任何报错" and "配置后报存提示成功,再打开还是全部都启用".
Picks: while agy's model list wasn't known yet (agy missing, signed out,
or the probe still running), the models hook served the static or
Gemini-only catalog as if it were the real list. magpie relisted on
that, dropped the user's picks that weren't in it, and the editor came
back with every model on. The hook now marks such a list with
Symbol.for("magpie.fellBack"), so the host keeps the last good list and
the picks.
Second account: "Sign in again" with agy already signed in succeeded at
once with the stored sign-in, so nothing changed and nothing said why.
agy holds one Google account in its keyring. A second method, "Switch to
another Google account (agy holds one)" / "换一个 Google 账号(agy 只能
登录一个)", always runs agy's Google login, which replaces the stored
account. The sign-in result carries the stored id_token_email, so the
account is named by its email instead of "API key", and a switch shows.
READMEs say agy keeps one account.
magpie needs no change: it already keeps the last good list for a list
marked fell back, and shows a method picker for two methods.
Run:
- packages/agy-cli bun test (HOME=mktemp -d): 24 pass, 0 fail.
- test/smoke.mjs (AGY_BRIDGE_STORED_SIGNIN=skip): all ok.
- Red on the old index.mjs/signin.mjs with the new tests: signin red
(emailOf missing), catalog 3 fail (the three new tests), smoke BAD on
the two-methods check.
- Plugins root bun test (HOME=mktemp -d) on Linux (wsl-run,
magpie-desktop) at this tree: 8754 pass, 19 skip, 0 fail.
- Real magpie GUI in a sandbox HOME with this plugin installed: picked
two models, deleted the plugin's models.json and killed the plugin
host, POST /api/provider/models: before, count 2 and the pick
dropped; after, count 5, the pick kept, nothing delisted. "重新登录"
shows both methods in en and zh, no page errors, and the account is
named by its gmail address.
Not tried: signing a real second Google account in (it would change the
live agy keyring), Windows and Linux agy.
|
||
|
|
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 (
|
||
|
|
baeb95a43e |
agy-cli 0.1.60: the client's system prompt goes in the first turn, not appended to agy's
bzs_1 on X (on 0.1.58): with an agent's system prompt the request is answered 429; with agy's own prompt alone it works. The bridge sent the client's system prompt as session _meta.antigravity.systemPrompt.append, which reaches Google inside the system instruction, and Antigravity turns away a growing set of identity lines there (#1151): reworded ones too ("You're an interactive agent ..."). The user-turn cloak's own record shows only Codex GPT-5 lines refused in a user turn. Now the prompt goes in the first user turn as <external_system_instructions>, through the same outgoing rewording and user cloak as the rest of that turn, and agy's system instruction stays its own. AGY_BRIDGE_SYSTEM_APPEND=1 brings the append back. A parked session records instructionsInSession, and one parked under the other route (or before this field) is not resumed, so a session never ends up with the prompt in both places or in neither. 0.1.59's 400 for a turned-away prompt ( |
||
|
|
84c2a47949 |
agy-cli 0.1.59: a turned-away system prompt fails as a 400, not a 429 the client retries (#1151)
KevinXC5's run on 0.1.58: the bridge called the refusal an invalid_request_error, but magpie logged it as a 429 and Claude Code answered with api_retry, rate_limit, every 60s up to 9 times. A stream's error event carried only type and message, and magpie's gateway takes a stream error's status from the error's own status field first and its words after (namedStatusOf); the message quotes Antigravity's "RESOURCE_EXHAUSTED (code 429)", so the words won. streamErrorOf now gives an invalid_request_error status 400, in the SSE error event and in a whole (stream: false) reply, which was a 502. A rate_limit_error and every other kind go as before. Run: bun test in packages/agy-cli on mote, 24 pass (the smoke test's new #1151 checks: the turned-away event has status 400, a whole reply is a 400, a plain quota 429 still has no status); bun scripts/check.mjs agy-cli ok. Broken by hand: without the status line both #1151 checks fail (the whole reply came back 502). Read: magpie origin/main's upstream.go and fallback.go take a numeric error.status before the words. Not tried: a real Antigravity request (the local agy account answers 403), nor a real Claude Code against the gateway. Kevin's 0.1.58 run also shows a second line of Claude Code's prompt still matched; that is not fixed here. |
||
|
|
f4498713fa |
agy-cli 0.1.58: Claude Code's identity line goes as "You're …" (#1151)
KevinXC5 bisected Claude Code 2.1.325's system prompt on a real
Antigravity account: "You are Claude Code, Anthropic's official CLI for
Claude." alone brings the bare 429 back, 3 of 3, while "You're Claude
Code, …" and "This agent is …" pass. It is now in TURNED_AWAY and
reworded with the same "You're" rule as the other agents' lines; the
prefix match covers the Agent SDK variant (", running within the Claude
Agent SDK.") too.
Left out: "You are an interactive agent that helps users with software
engineering tasks." It isn't in the Claude Code binary here (2.1.316) or,
by Kevin's reading, in 2.1.325, so it isn't the line Antigravity matches.
Run: bun test in packages/agy-cli on mica, 24 pass; bun
scripts/check.mjs agy-cli ok. Broken by hand: with the TURNED_AWAY line
removed, the new test fails (23 pass, 1 fail).
Not tried: a real Antigravity request. The local agy account answers 403
(disabled), so this rests on the reporter's bisect.
|
||
|
|
7e14fabef1 |
agy-cli 0.1.57: DeepSeek Harness's first line goes as "You're …" (#1171)
Antigravity answers a bare 429 to "You are an AI agent powered by DeepSeek Harness.", DeepSeek Harness's first system prompt line, whatever quota is left. The reporter (huangzhenhao90) bisected it on a real account through agy on gemini-4-hydrogen: the line failed, while "powered by DeepSeek." alone, "an agent" for "an AI agent" and "You're …" each went through. cloak.mjs now rewords it as "You're …" and hint() names DeepSeek Harness. Run: on mote, bun test in packages/agy-cli (23 pass) and bun scripts/check.mjs agy-cli (ok). Broken by hand: without the new TURNED_AWAY line, the new cloak test fails. Not tried: a real request myself. agy on this machine answers 403 (the account is disabled), so the evidence is the reporter's real-account table. |
||
|
|
f91552564e |
agy-cli 0.1.56: cloak.mjs says it is the only copy now (comments only)
|
||
|
|
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).
|
||
|
|
f7fc6641c5 |
agy-cli 0.1.55: with agy's sign-in in a file (no keyring, Docker), agy stays on its own folder (#1165)
0.1.54 (#1166) started agy acp with --gemini-dir pointing at a folder of the bridge's own, which keeps the machine's skills out. That assumed agy's Google sign-in lives in the system keyring. Where there is none (a Docker container, Linux with no D-Bus session), agy keeps it in ~/.gemini/antigravity-cli/antigravity-oauth-token instead. The bridge's folder had no sign-in, and every request failed "session/new failed: Authentication required". shawn8888 reported it on #1165 from ghcr.io/yetone/magpie with agy 1.5.9. Now, when that file exists and AGY_BRIDGE_GEMINI_DIR names no folder, no --gemini-dir is passed, and agy uses its own folder and sign-in. --include-default-customizations=false is still passed. A folder the user names is still used. Run (mica, node --test test/repeat-batch.mjs test/usage-settlement.mjs, temp HOME): 83 pass, 0 fail. bun scripts/check.mjs agy-cli: ok. Broken by hand: without the file check, the new "#1165 … stays on that folder" test fails (1 pass, 1 fail). Not tried: a real Docker container with agy. The token file's path is the one the reporter saw. |
||
|
|
3238ab8518 |
agy-cli 0.1.54: agy runs in the bridge's own --gemini-dir, so the machine's skills stay out (#1166)
0.1.52 passed --include-default-customizations=false, but on Windows
(agy 1.5.9) agy still loaded all 120 of the reporter's skills: a 56,790 B
<skills> block in its gen_metadata, and task, shell and four more client
tools dropped over the 20,000-token budget. The reporter (kanzaki-chiya)
found that --gemini-dir pointed at an empty folder of the bridge's own
leaves the skills and global MCP servers out, with every client tool
listed and shell/task calls working end to end.
So when `agy acp --help` lists --gemini-dir, a turn's agy gets
<XDG_STATE_HOME or ~/.local/state>/magpie-agy-bridge/agy-home, made
before agy starts and kept across restarts so session/resume finds the
conversation. agy's Google sign-in is in the system keyring, not that
folder. Step usage reads the conversation DB from the same folder.
AGY_BRIDGE_GEMINI_DIR names another folder; "default" leaves agy on its
own ~/.gemini. The model probe and `agy models` are unchanged. One
`acp --help` per binary answers both flags.
What happens to old data: a session parked before this update was in
~/.gemini, so its resume fails once and falls back to session/new, as a
resume that fails does today.
Run on mote: node --test test/repeat-batch.mjs test/usage-settlement.mjs
(81 pass), bun test in packages/agy-cli (22 pass), bun scripts/check.mjs
agy-cli ok. test/smoke.mjs prints the same 29 BADs and crash at
origin/main
|
||
|
|
fc941f6e1c |
agy-cli: Codex's GPT-5 lines go reworded in a user's turn too (0.1.53)
pocoxliu on X (tweet 2121731813270077946) gets 429s from agy-cli under Codex and Claude Code and put it down to unslimmed system and MCP prompts. It is content, not size (#1151: a neutral system prompt of the same 66,622 characters went through). Since 11-14 Antigravity also turns away Codex's two GPT-5 lines ("You are Codex, (a coding) agent based on GPT-5") in a user's turn; magpie's cloak and the antigravity plugin ( |
||
|
|
57d1cc6a9f |
agy-cli: start agy without the machine's own skills when it can (#1166)
On Windows with agy 1.5.9, a session loaded 120 local skills from ~/.gemini/skills, ~/.gemini/config/skills and ~/.agents/skills although the bridge agent says inheritCustomizations: false. Skills and the client's MCP tools share agy's 20,000-token customization budget, so agy dropped the six largest client tools (task, shell, …) and three skills. agy 1.5.9's acp takes --include-default-customizations (default true). The bridge now passes --include-default-customizations=false when `agy acp --help` lists the flag. An agy without it exits on an unknown flag, so it is never passed blind. The answer is kept per binary (path, mtime, size); a probe that errors or times out is asked again. The bare `agy acp` model probe is unchanged. 0.1.52. Run: - bun test packages/agy-cli on mote (temp HOME): 21 pass, 0 fail; bun scripts/check.mjs agy-cli ok. - the same on Windows (win-run, xiaomi-gpu): 21 pass, 0 fail. - test/smoke.mjs alone with bun on mote: ALL OK (348 checks). - real agy 1.5.9 on macOS: `agy acp --help` prints the flag on stderr (exit 0); a session started with the flag set to false runs. Broken by hand: without the args.push in Proc.start, repeat-batch's "#1166 … asked once" test and smoke's #1166 check go red. Not tried: the reporter's Windows machine with its 120 skills. On this Mac the default run sent no user skills to the model either, so it is not shown here that the flag keeps them out; the reporter is asked to confirm. |
||
|
|
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
|
||
|
|
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.
|
||
|
|
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. |
||
|
|
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.
|
||
|
|
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.
|