4e0cdabbbae17eaab9d62b2995f90033362b92b9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0135b7b0ea |
agy-cli 0.1.32: the first model list after warming has agy's Claude and GPT models (#1064)
On a signed-in agy, `agy models` takes about 4.4s and `agy acp`'s
session/new about 3s. provider.models() needed three calls before
claude-opus-5-5, claude-sonnet-5-5 and gpt-oss-120b showed up, and
OpenCode 2.x calls it once.
What changed:
- packages/agy-cli/index.mjs:
- The offered-model probe now starts in listAgyModels' .then, as soon as
a non-empty list arrives and a caller asked for probeOffered. It no
longer waits for the next models() call. A hung or failed `agy models`
still never spawns the probe.
- probeSignedIn reuses the `agy models` stdout it already has. The same
parser (parseAgyModels, split out of listAgyModels) fills
cachedModelCatalog, and the probe starts. Sign-in waits for the probe
for at most 3s.
- The offer (acpOfferedModels, acpOfferedKey, offeredProbeAt and any
in-flight probe) is forgotten when agyPath changes and after a new
sign-in finishes. A generation counter drops the answer of a probe
that started before the reset.
- provider.warming() returns a promise while a list or probe is still
running, and null when nothing is.
- scripts/opencode2.mjs, copied byte for byte to every
packages/*/opencode2.mjs: after the first background refresh, the
adapter awaits hooks.provider.warming() once, for at most 60s, and then
refreshes once more. It does not loop. Plugins without warming() behave
as before.
- Not done: the issue's on-disk catalog cache (point 3), skipped as asked.
Known gap: agy-cli has no `config` hook, so under OpenCode 2.x the adapter
lists no provider for it. refresh() returns before it calls
provider.models(), so the follow-up refresh can't add agy's models on 2.x
until agy-cli gets a config hook.
Tests: test/testkit.mjs's fake agy takes a sessionNewDelayMs. The new
tests in test/catalog.mjs set 1.5s on both `agy models` and session/new
and wait for state through warming(), with no fixed sleeps:
- On a slow cold start, the first models() after warming lists Claude and
GPT, from one probe spawn.
- authorize() on a signed-in agy fills the catalog, and the next models()
runs no second `agy models`.
- The sign-in wait is bounded: with a 6s session/new, sign-in returns in
about 4.5s.
- Changing agyPath probes again.
The hang test now awaits warming() before it counts acp spawns.
scripts/opencode2.test.mjs: the warming list is read a second time when
warming ends, and only once when nothing is warming.
Run on Linux (a separate test Mac was over its load limit):
- packages/agy-cli bun test: 17 pass, 0 fail.
- bun scripts/check.mjs agy-cli: ok.
- bun scripts/check.mjs (all packages): ok.
- Root bun test in a temp HOME: 8530 pass, 19 skip, 0 fail.
Broken by hand on Linux, each red, then restored green:
- No probe in the .then: the slow cold-start test.
- probeSignedIn drops the list: the authorize and bounded-wait tests.
- agyPath change keeps the old offer: the agyPath test.
- Unbounded sign-in wait: the bounded-wait test (7514ms).
- Probe also on a failed listing: the hang test.
- origin/main's index.mjs with the new tests: all four #1064 tests.
- Adapter reads the list once: the warming adapter test, and the
copy-identity check.
Not tried: a real agy (no Google sign-in, no network). The reset after
login.finish has no unit test of its own.
Reported-by: hiee3
|
||
|
|
e35aa928ad |
antigravity 0.1.0: Antigravity with a Google account, ported from magpie's built-in
Signs in with Google (Antigravity's client, PKCE, loopback) or imports a
refresh token / account-manager export, sets up the Code Assist project
(loadCodeAssist, onboardUser on the default tier), lists the account's
models with level variants, and sends every request through
v1internal:streamGenerateContent in the app's envelope, with the
built-in's request shaping (system-prompt cloak, tool ids and results,
schema flattening, Claude and Gemini rules), its error mapping (turned-away
429 -> 400 unapproved channel, 404 model, refused refresh -> 401 expired)
and its usage windows and pools.
A stream's last chunk is an empty text part; sent back in the next turn,
Claude refuses it ("text: Field required"). Both the whole-reply reader and
the request shaper drop it.
Run:
- bun test packages/antigravity on mote: 78 pass, 0 fail.
- bun scripts/check.mjs antigravity: registry.json ok, antigravity ok.
- Real account (the built-in's saved Google account, read only, sandbox
HOME): model list; stream and generateContent on gemini-3.8-flash; the
effort header picking -low; claude-sonnet-4-6, claude-opus-4-6-thinking,
gpt-oss-120b-medium all answer; a Claude Code system prompt to Gemini
answers 200 (cloak); an unknown model 404; usage gives plan, model
windows and the Gemini and Claude & GPT 7-day pools; a tool call round
trip on Claude Sonnet, Opus thinking, Gemini and GPT-OSS.
- Broken by hand: without the empty-text drop the new shape test and the
generateContent test go red, and the real Claude round trip answered 400.
Not carried over (README): the 6h rest of a turned-away account, Google
Search grounding and image models, countTokens (404, magpie estimates),
sending the system prompt uncloaked, multi-account import, models.dev
names. Not tried: the browser sign-in end to end (the import path was).
|