Commit Graph
15 Commits
Author SHA1 Message Date
yetone 9ec696258d agy-cli 0.1.18: turned-away system lines are broken up before agy sends them, and a 429 to one is not a quota (#980)
Antigravity answers 429 "Resource has been exhausted" to a few system
prompt lines whatever quota is left (Claude Code's billing line, the Claude
Agent SDK, Codex's and Hermes Agent's identities, oh-my-pi's RFC 2119
line). The antigravity provider breaks them up with zero-width spaces
(TURNED_AWAY / breakUp / cloak); agy-cli sent the client's system prompt
to agy as written, and called the 429 an exhausted quota
(rate_limit_error), so a client or routing group retried a prompt that
fails every time.

- cloak.mjs is a copy of antigravity's TURNED_AWAY, cloak and hint (the
  two-zero-width-space break-up of 11-11). Each package ships on its own,
  so cloak.test.mjs imports packages/antigravity's _internal and fails
  when the two give a different answer for any line or sample.
- Every route the system text reaches agy is cloaked: the session's
  systemPrompt.append (session/new and session/resume),
  <external_system_instructions> when agy can't append, a later system
  or developer message in the turn or the replayed history
  (renderTurnMessageParts), and a system/developer notice delivered
  beside a tool result (extractToolResults).
- What the bridge keys and hashes on is unchanged: proc.instructions,
  sameInstructions, instructionsIdentity, stripVolatileSystem and the
  session store keep the prompt as the client wrote it; cloak is applied
  only where the text is sent. User text is not touched.
- #formatAgentError: a "code 429 ... Resource has been exhausted" with a
  turned-away line in the session's instructions is an
  invalid_request_error, "Antigravity answered 429 to this system prompt:
  <detail> — <hint>", with the antigravity provider's hint. Any other 429
  stays rate_limit_error.
- READMEs (en, zh) say so under the minimal-agent section.

Run (wsl-run, magpie-desktop, HOME=$(mktemp -d), at f85f9ad0 + this change):
- bun test packages/agy-cli: 13 pass 0 fail (smoke ALL OK, 333 checks)
- bun scripts/check.mjs: exit 0
- root bun test: 8189 pass, 19 skip, 0 fail (580 files, 408s)
- rebased on 84ee9b88 (day-card, autoclaw, sap-aicore only): bun test packages/agy-cli
  13 pass 0 fail and bun scripts/check.mjs exit 0 again at this head

Broken by hand (each red, then restored):
- append: this.instructions uncloaked -> "#980 ... session instructions" BAD
- <external_system_instructions> uncloaked -> its #980 check BAD
- later system message uncloaked -> "#980 a later system message" BAD
- tool-result notice uncloaked -> "#980 ... system notice beside a tool
  result" BAD
- the turned-away branch of #formatAgentError off -> the 429 came back
  rate_limit_error, "#980 a 429 ... prompt rejection" BAD
- cloak.mjs back to one zero-width space after the first letter -> both
  cloak.test.mjs tests red

Not tried: against real Antigravity or a real agy (no vendor API was
reached; the fake agy in test/smoke.mjs stands in). Whether agy's own
request puts the appended instructions where Google matches them is
taken from the report and the antigravity provider, not measured here.
A turned-away line the user pastes into their own message is sent as
written, as the antigravity provider does.

Reported-by: shaohongwu
2026-11-11 17:54:13 +08:00
yetone 18ce00e4ce agy-cli 0.1.17: a steer keeps the live agy session, so its prompt cache holds (ChrisJ_AI on X)
Reported by ChrisJ_AI on X: after 0.1.12, most turns show a normal cache
ratio, but a steer / interrupt still reads 0% (303K input, 0% in his
screenshot; agy's own session rows for the replay read 193K and 65.8K at
0% too, then 99% again).

Cause: a user steer (text or an image beside a live tool_result, a rejected
tool, a hook line) stopped the live agy session and replayed the round in a
new session/new. A new session has no cache, so agy itself reported 0%.

Now the bridge answers the pending MCP calls with the real results, cancels
the step agy was starting, and sends only the steer as the next prompt of
the same session (the answered tool results are not sent a second time).
Falls back to the old replay when the session or history differs, tools
grew, a result carries an image, a call is still unanswered, or the cancel
does not settle.

Run (WSL2 Ubuntu 24.04, Bun 1.4.2): bun test packages/agy-cli 11 of 11,
smoke.mjs ALL OK; bun scripts/check.mjs agy-cli ok. smoke.mjs now asserts
no new session/new (same convId, same init count), the steer text in the
next prompt and the real result delivered to the MCP call, for the Esc,
queued_command, standalone follow-up, text before/after the result, image,
rejected tool, Skill and queued-suffix cases. Broken by hand: the same
smoke.mjs against origin/main's index.mjs: 12 failures, all of those.
Not tried: a real agy (signed out on this machine and in magpie's account
store), so Google's cache after a steer is not measured; Windows (smoke
is red there, #973); macOS.
2026-11-11 15:10:23 +08:00
Klarkxy 92e0417739 agy-cli 0.1.16: keep conversationKey stable across volatile openings (#947)
conversationKey stays stable when only agent-injected opening fields
change (Claude Code's billing header, known clock lines in the system
prompt or a <system-reminder>), so a continued chat keeps its agy session
and its prompt cache. It hashes the whole stripped first message. A
flattened, growing first message reuses the live session only when it
continues the whole previous opening plus that session's reply on a line
boundary, and then sends agy only the new tail. Closes #945.

Reviewed head 56c845720026819781e198bada948cce9b926806 (one commit on
main 9204c07; main 9e07c706 has no agy-cli change since).

Both points from the last review are fixed:
- A reused flattened session no longer gets the opening again. A probe of
  four flattened turns with empty history (200 İ, ß, ffi, Dž, ς, 𝐀😀 in the
  opening, a reminder date that changes every turn, replies with thinking)
  ran in one fake agy session; prompts 2-4 were 28, 16 and 16 bytes and
  held only the new step.
- The reminder scan folds only ASCII, so İ before a reminder no longer
  shifts indexes. An upper-case <SYSTEM-REMINDER> after İß keeps the key
  across a date change and reuses the session.

Broken by hand, each went red: the old slice(history.length) prompt (5
red), toLowerCase() (2), no user-id check (1), join("") in systemText (1),
compactIdentity in takeParked (1), no line-boundary check (2),
findLiveContinuedProc returning null (6).

Run at the head on main 9e07c706:
- Linux (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test packages/agy-cli
  11 pass, 0 fail; bun scripts/check.mjs exit 0.
- Windows 11 (temp HOME and USERPROFILE): 10 pass, 1 fail; the one red is
  the smoke check "no call to the loaded tool reaches agy's validator in
  the old prompt", the only red at origin/main 9e07c706 too (9 pass, 1
  fail), filed as #973. check.mjs exit 0 on both.
- #971's loose matchesHistory/takeParked and 0.1.12's cache estimate are
  unchanged; compat, smoke and usage-settlement pass.

Not blocking: if updateTools throws after a flattened reuse is picked,
pendingFlattenedTurn stays on the process. After an agy error on a reused
flattened turn, the same request again starts a new session with the full
opening, as a fresh retry does on main.
Not tried: a real agy or a real flattening client.
2026-11-11 14:54:37 +08:00
yetoneandklarkxy dbd082f6d1 agy-cli 0.1.15: an array tool schema whose items live only on a sibling gets an items schema Gemini accepts (klarkxy #963)
Gemini refuses an array schema with no `items`. array-items.mjs infers
the items from the schema around it, or adds a permissive items schema 8
levels deep, without narrowing what the client allowed; tuple `items`
lists are left as they are, with a hint. Closes #962.

Reviewed head c7d3e7b8 (on c27ba5f7), landed onto main 738fd501 with the
version moved to 0.1.15 and package.json `files` keeping both
re2-pattern.mjs (#946) and array-items.mjs.
Run at the reviewed head: WSL2 bun test packages/agy-cli 9 of 9,
check.mjs ok; Windows 8 pass, 1 fail, the same smoke red as main (#973).
Broken by hand: without the ensureGeminiArrayItems call in normalizeTools
smoke.mjs reports 2 failures; PERMISSIVE_ARRAY_DEPTH = 1 and removing
`if (openArray) return null` each turn a test red.
Run at this commit (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test
packages/agy-cli 10 of 10 pass; bun scripts/check.mjs agy-cli ok;
npm pack --dry-run lists 14 files, both new modules among them.
Not tried: macOS (mote refused ssh), a real agy.

Closes #963

Co-authored-by: klarkxy <klarkxy@users.noreply.github.com>
2026-11-11 13:35:07 +08:00
yetoneandklarkxy 738fd501d7 agy-cli 0.1.14: tool schema patterns are turned into RE2 or dropped, so an ECMA-262 pattern no longer aborts the turn (klarkxy #946)
Tool input schemas' `pattern` and `patternProperties` keys are translated
to RE2 (re2-pattern.mjs) before they reach agy; a pattern RE2 can't hold
is dropped with a hint, and `additionalProperties: false` is lifted when
every patternProperties key was dropped. Closes #944.

Reviewed head 99093088 (on c27ba5f7), landed onto main a0b1e491 with the
version moved to 0.1.14.
Run at the reviewed head: WSL2 bun test packages/agy-cli 9 of 9,
check.mjs ok; Windows 8 pass, 1 fail, the same smoke red as main (#973).
A fuzz of 1,033 kept patterns compiled every one with Go's regexp
(go1.26.8), against 222 failures before the `[:` fix. Broken by hand:
the `[:` reject, the sanitizePatternFields call, the propertyNames /
contains / if / then / else / unevaluated* recursion and the
additionalProperties lift each turn re2-pattern-unit.mjs red.
Run at this commit (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test
packages/agy-cli 9 of 9 pass; bun scripts/check.mjs agy-cli ok.
Not tried: macOS (mote refused ssh), a real agy.

Closes #946

Co-authored-by: klarkxy <klarkxy@users.noreply.github.com>
2026-11-11 13:34:04 +08:00
yetoneandklarkxy a0b1e49113 agy-cli 0.1.13: an image before a live tool_result counts as the user steering (klarkxy #965)
An image the user sends with no text before a live tool_result now marks
the turn as steered, so it is replayed and the image stays off the MCP
result.

Reviewed head 7852e288 (on c27ba5f7), landed onto main 7869318d with the
version moved to 0.1.13 (0.1.7 was taken by the time it landed).
Run at the reviewed head: WSL2 bun test packages/agy-cli 8 of 8, check.mjs
ok; Windows 7 pass, 1 fail, the same smoke red as main (#973). Broken by
hand: without `userSteered = true` in inspectToolTurn's image branch, the
new compat test goes red (11 pass, 1 fail) and smoke.mjs exits 1.
Run at this commit (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test
packages/agy-cli 8 of 8 pass; bun scripts/check.mjs agy-cli ok.
Not tried: macOS (mote refused ssh), a real agy.

Closes #965

Co-authored-by: klarkxy <klarkxy@users.noreply.github.com>
2026-11-11 13:32:59 +08:00
yetone 7869318d6a agy-cli 0.1.12: a tool step's estimated cache read stops at the step before it, so a new tool result is billed as input (#971 review)
0.1.11 (#971) estimated an uncalibrated first prompt's tool steps by
summing every earlier settled step's whole window as the cached prefix.
Each window already holds the steps before it, so the prefix was counted
once per step: from the third step on, the step's whole window, the tool
result just added included, came back as a cache read. In the review's
probe (four Read calls, ACP reporting cachedReadTokens 0), step 4 billed
0 input and 34,456 read, and the steps claimed 56,608 cache-read tokens
that ACP never reported.

The prefix is now the largest earlier settled window (the step before),
so each step reads that from the cache and bills what was added since.
The step test that pinned the 100% clamp now checks that step 3's
uncached input covers what was added after step 2, and that its read
does not exceed step 2's window. Still an estimate until ACP reports.

Run (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test packages/agy-cli
8 of 8 pass; bun scripts/check.mjs agy-cli passes.
Broken by hand: origin/main's index.mjs with the new test, node --test
test/usage-settlement.mjs: 25 pass, 1 fail ("第三步未缓存 input 0 应覆盖
第二步之后新增的 32"). Restored, green.
Not tried: Windows (main's smoke red there is #973), macOS (mote refused
ssh), a real agy.
2026-11-11 13:31:30 +08:00
Klarkxy 73d2006444 agy-cli 0.1.11: sessions survive canonicalized tool input; a first prompt's tool steps count the settled prefix as cached (ChrisJ_AI on X, klarkxy #971)
Reported by ChrisJ_AI on X: Claude Code on an agy-cli model showed 268K-input turns
at 0% cache hit, turn after turn.

Two places dropped cache reuse; both are klarkxy's #971 (closes #970):
- a follow-up turn after the client filled defaults into historical
  tool_use.input (Edit's replace_all) failed matchesHistory / takeParked, so
  the live agy session was retired and the whole prefix replayed;
- tool steps of a fresh process's first prompt reported every token as a
  cache miss until the prompt ended (no ratio learned yet).

Run at reviewed head 27245320 (win-run, xiaomi-gpu): node --test
test/usage-settlement.mjs 26/26 pass; the same file against c27ba5f7's
index.mjs fails tests 20, 21 and 24 (red on old code). bun test
packages/agy-cli: 7 of 8 pass, smoke.mjs 1 failure of 321 checks, the same
count on c27ba5f7.
Not tried: a real agy (signed out on every machine here, mote refused SSH),
so the 0% was not reproduced against Google's cache; the in-turn figure is
an estimate, not ACP usage.
2026-11-11 13:20:37 +08:00
yetone c27ba5f700 agy-cli 0.1.6: every prompt's own cache reads set the ratio the next tool steps report (baranwang on X)
Tool steps estimate their cache reads from the last ratio the proc learned,
and only a final, uncancelled response taught it, so a cancelled prompt left
the next one's tool steps reporting every token as a cache miss. agy reports
each prompt's cached reads, so recordPromptUsage now sets the ratio from them.
Test: a cancelled prompt (390k of 520k cached) then a tool step reports 0.75.
Red with the line off, green with it. Not captured from a real agy: the
owner's agy is signed out on this machine and mote was down. A fresh
conversation's first prompt still has no ratio until it ends.
Ran node --test packages/agy-cli/test (2 reds on base too: cp-hook,
version/report hangs), bun test packages/antigravity, scripts/check.mjs.
2026-11-11 11:55:10 +08:00
yetone 68e73c4797 agy-cli 0.1.5: release #951 (user text beside a live tool result)
9a96799e merged #951 without a version bump, so its fix would not reach
the dist branch. This bumps packages/agy-cli to 0.1.5, which publish.yml
packs to dist.

Run: bun scripts/check.mjs agy-cli on mote: ok. The package tests for the
code in this release (8 pass, 0 fail) were run at #951's head merged onto
d5f4214e, the parent of 9a96799e.
2026-11-11 04:33:58 +08:00
yetone 60acd62bee agy-cli: a tool loaded mid-turn starts a new prompt with the round replayed (#942)
agy checks each call against the tools it listed before the prompt began.
After ToolSearch loads a deferred tool, the client's next request declares
it, and the bridge sent tools/list_changed and then continued the same
session/prompt. agy's validator still answered `unknown tool: "<name>" —
check spelling` for the rest of that prompt.

When the tool-result request declares a tool the process has not listed
(Proc.toolsGrew), the bridge now takes the existing changed-context path:
it drops the process without resolving its calls and replays the history,
the ToolSearch tool_use and its tool_result included, in a new
session/prompt, where agy lists the full catalog first. The user's turn is
in the replayed history once. The new process starts with the grown
catalog, so the next result continues it live and nothing loops. A catalog
that only loses or changes tools still continues the live turn.

Tests (test/smoke.mjs, fake agy): TOOLSEARCHGROW checks calls against the
tools listed at prompt start, like agy 1.5.3. The new block checks that the
grown catalog starts a new session/prompt, that it replays the ToolSearch
round with the user's ask once, that the old prompt never reaches the
validator with the new tool, that the loaded tool's call reaches the client,
and that its result continues the new session with no second replay. The
"live tools change" case now removes a tool instead of adding one.

Run on mote (Bun 1.4.2), at this tree:
- packages/agy-cli `bun test`: 8 pass, 0 fail; smoke.mjs ALL OK (319 checks).
- `bun scripts/check.mjs agy-cli`: registry.json and agy-cli ok.
Broken by hand: sed removed `|| proc.toolsGrew(tools)` from the condition;
smoke.mjs went 5 FAILURES (319 checks), the five new checks; restored, ALL OK.

Not run: the root `bun test`. It waited behind about 20 queued suites on
mote's suite.lock for over an hour, and WSL answered E_UNEXPECTED.
Not tried: a real agy 1.5.3 run.

Version 0.1.4.

Reported-by: chrisjian <chrisjian@users.noreply.github.com>
2026-11-11 03:11:42 +08:00
Qtlz a5a63a109f agy-cli 0.1.3: an assistant prefill tail is continued, not refused (#904)
A request ending in a text-only assistant turn (SillyTavern prefill,
"continue"/"impersonate", bot frameworks) was refused with a 400. That
trailing run now stays in the tail, after the session ledger's newest
entry, so the agy session is reused across prefill turns, and it is
rendered as a continuation of the model's own reply. A prefill beside a
live tool_result, or with no user turn before it, is still a 400.
AGY_BRIDGE_PREFILL=0 brings the old refusal back.

Reviewed at f7b249cec9e827b7ef49197a207180f3f7085cfe, run on mote:
bun test ./agy-cli.test.mjs 8 pass / 0 fail; bun scripts/check.mjs ok.
Broken by hand: with main's index.mjs and these tests, test/prefill.mjs
and the smoke test fail (6 pass / 2 fail).
Checked: renderTurnMessagesParts only gets the current turn's tail, never
history, so a finished reply is never taken for a prefill.
Not tried: a real agy account.
2026-11-09 20:12:15 +08:00
yetoneandyulong-ge 03ab6d66f4 agy-cli 0.1.2: list what agy acp offers before the first request (#854)
Until a request had opened an ACP session, agy-cli listed Gemini only
(offeredFilter), so a user who hadn't sent a Gemini request yet saw no
Opus (chriskan666 on Discord). provider.models() now asks agy's ACP
server itself, as yulong-ge's antigravity-official-acp (#854) does:
a short `agy acp` with the plugin's own clientInfo, initialize and
session/new (no prompt), reading the session's model option and
models.availableModels into the same offered set a request's session
fills. The session is closed when agy says it can be, and the process
and its temp folder are removed.

- Only provider.models() probes; a request opens its own session.
- It runs once `agy models` has answered (agy is signed in), at most
  once a minute while the offer is unknown, and not at all once known.
- models() waits for it as briefly as for the listing (500ms) and
  never longer; a failed or timed-out probe (30s) keeps Gemini only.
- An agy older than 1.4.12 gets no session.

#854's own code reads session/new's availableModels, not `agy models`
(its body says `agy models`); agy-cli already parsed `agy models`, so
nothing of that parser changed.

Run at origin/main ae518836 plus this diff (this commit's tree) on mote (macOS), HOME=$(mktemp -d), under suite.lock:

- `bun test packages/agy-cli`: 6 of 7 suites pass; test/usage.mjs was red
  once ("version/report hangs time out", 1239ms), a timing test this
  change doesn't touch: filed as #856. It then passed 5 of 5 alone.
  catalog 17 pass, smoke ALL OK (314 checks).
- `bun scripts/check.mjs agy-cli`: registry.json and agy-cli ok.
- repo-root `bun test`: 6878 pass, 0 fail (6898 tests, 500 files).

Broken by hand: models() with the probe off. catalog.mjs went 2 red
(the probe lists Opus with no request; a failed probe is tried again
after a minute) and smoke.mjs 1 BAD ("listing models learns what agy's
ACP server offers, before any request").

Not tried: a real signed-in agy. This Mac's agy 1.5.3 (CLI 1.4.12) is
signed out: `agy models` says "Please sign in to view available
models", and its `agy acp` answers initialize and refuses session/new
with -32000 "Authentication required" (the fake's sign-in error is that
reply). mote has no agy. That the ACP session offers Claude and GPT-OSS
to a non-editor client rests on #854's author's run (agy 1.5.3 acp,
13 models incl. Claude and GPT-OSS).

Co-authored-by: yulong-ge <41790869+yulong-ge@users.noreply.github.com>
2026-11-08 13:17:47 +08:00
yetone ecab839688 agy-cli 0.1.1: sign in to Google from magpie, through agy's own agy acp --login
treeman_26897 (Discord #feedback, 11-08): Sign in on agy-cli opened no
browser, and asked for a field to paste the callback into.

Cause: the plugin had no sign-in of its own. Its one method only checked
whether `agy models` worked, and if not it said to run `agy` in a
terminal. magpie still showed "Finish signing in ... in your browser",
but nothing ever opened a page.

Now the method is oauth:
- Already signed in to agy (`agy models` lists models): done at once. No
  page opens and no agy login starts.
- Otherwise the plugin starts `agy acp --login` (agy 1.5 and later). That
  prints Google's link and reads the code from stdin. magpie opens the
  link on the user's machine and shows its code field (method "code").
  - The field takes the code antigravity.google/oauth-callback shows, or
    that page's whole address.
  - No loopback is involved, so it works with Remote magpie and in Docker.
- agy trades the code and keeps the token in its keyring. The plugin never
  sees the token.
- The account is saved only once `agy models` lists models afterwards. A
  wrong, empty or expired code fails, and nothing is saved. Google's
  invalid_grant is worded as "turned the code away".
- The link waits 15 minutes, then agy is stopped. A new sign-in stops the
  previous agy.
- agy 1.4.x has no --login. It gets "update with `agy update`, or run
  `agy` in a terminal".
- The login runs with auto-update off, like the plugin's other agy
  processes.

Import from a file is not added. agy keeps its credentials in the system
keyring, not in a file under ~/.gemini/antigravity-cli.

The empty account the report also describes was not reproduced on
current magpie. A failed sign-in saved nothing, in the GUI and the CLI.
This version also needs models listed before it saves anything.

Run:
- On mote (macOS, Bun 1.4.2) at this tree, `bun test` in packages/agy-cli:
  7 pass / 0 fail.
- `bun scripts/check.mjs` and `bun scripts/check.mjs agy-cli`: exit 0.
- New smoke checks, with the old index.mjs put back: red, at "signed in
  to agy already, the sign-in saves agy" (the old method has no callback).
- Real agy 1.5.3 on mote, sandbox HOME, current magpie `web`, through
  Playwright:
  - Providers > agy-cli opened Google's sign-in page, and the code field
    showed.
  - A bogus code gave "Sign-in didn't finish: Google turned the code
    away...". /api/providers had no agy row.
- `magpie plugin login agy-cli`:
  - With a bogus code, the same error.
  - With real agy 1.4.12, the update message.
- Real agy 1.5.3 on Windows 11 (win-run) and on Linux (WSL2 Ubuntu 24.04,
  wsl-run): authorize gave Google's link in about 2s, and a bogus code
  failed with the invalid_grant wording. No agy was left running.

Not tried:
- A real Google sign-in through to models. Only bogus codes were used, and
  no real account was touched.
- magpie inside a Docker container.

Reported-by: treeman_26897
2026-11-08 11:48:40 +08:00
gitxmandgitxm 0f0c4ec68f agy-cli: Antigravity on the local agy CLI over ACP (#785)
New package `@magpie-community/opencode-agy-cli-auth` (provider `agy-cli`, `packages/agy-cli`). It serves Antigravity models through the user's installed `agy` CLI over ACP (`agy acp`) and uses agy's own Google sign-in. The plugin reads and writes no Google tokens.

The bridge is gitxm's. On top of it, after review:

- **ACP identity.** The client names itself (`opencode-agy-cli-auth` and its package version) instead of `zed`.
- **Catalog.**
  - Only what agy offers this client is listed: Gemini until a session says more, then the session's model option and `availableModels`.
  - Requests are still routed by everything `agy models` lists.
- **Prompt.** agy keeps its own system prompt by default. The minimal agent is opt-in with `AGY_BRIDGE_MINIMAL_AGENT=1`, and the README says what turning it on sends upstream.
- **Version check.** agy older than 1.4.12 is refused at the handshake. 1.4.12 is the oldest version the `nc` MCP bridge was checked on, and the README documents the bridge.
- **Auto-update.**
  - `AGY_CLI_DISABLE_AUTO_UPDATE` defaults to `true` only for the plugin's own agy processes.
  - A value the user set is passed on as written.
- **Docs.** The READMEs and the registry summary say how this differs from antigravity-acp (#87).
- **Tests.** The author's tests came over under `test/` with a fake agy (an ACP stdio server). Each suite runs in its own `bun test`, and a `mock.module` preload stands in for `node:child_process`.
- **Cleanup.** A duplicate, unreachable image branch in validateBody is gone.

Run at ae5eafb0 on mote (macOS) with HOME=$(mktemp -d):

- `bun test packages/agy-cli`: 7 pass. Per suite:
  - platform 14, compat 9, usage 20;
  - catalog 15, usage-settlement 18, repeat-batch 14;
  - smoke ALL OK (301 checks).
- `bun scripts/check.mjs`: all ok.
- Repo-wide `bun test`: 6792 pass, 0 fail (6812 tests, 492 files).

Broken by hand, and each went red:

- clientInfo set back to zed;
- the version check turned off;
- routing limited to the listed models;
- auto-update forced to true;
- the minimal agent on by default.

Not tried: a real agy, since mote has none, or a real Antigravity account.

Co-authored-by: gitxm <21175063+gitxm@users.noreply.github.com>
2026-11-07 20:14:45 +08:00