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>
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>
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.
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>