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.