main
14
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
397da020de |
opendesign 0.1.13: each model says the two other APIs amr-link serves it on
gaubeebangeel on X: OpenDesign's Anthropic request to an Open Design Cloud model went upstream as chat completions. Each model is declared on one wire (the thinking choice of plugins#141), and magpie translated any other API's request to it, though amr-link serves every model on chat completions, Responses and Anthropic's messages (plugins#888). Each model (the config seed, a kept copy, the models hook's) now lists the other two packages as `also`. magpie from the matching release reads it (plugin.Model.Also) and relays a client's request on any of the three as it was sent; the declared wire stays the model's own, which a request on another API is translated to. signFor already signs by the request's path. An older magpie ignores the field. Run: bun test packages/opendesign (32 pass) with a temp HOME on mote; root bun test with a temp HOME on mote: 8704 pass, 20 skip, 0 fail. |
||
|
|
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
|
||
|
|
929eb2c0b1 |
opendesign 0.1.12: a model asked on another of amr-link's APIs is signed for that API (#888)
amr-link serves every model on chat completions, Responses and Anthropic's messages (keyblues measured all fourteen). The plugin declares one API per model (MODEL_WIRE, kept: it is where each model thinks, plugins#141), and magpie's host signs a request with the declared package's header. So a model asked on another API (magpie's per-model API choice; the OpenDesign provider has all three URLs) went with the wrong header: a chat model on /messages with a Bearer, glm-5.3-flash on /chat/completions with x-api-key. The loader now returns a fetch that signs by the request's path: x-api-key (and anthropic-version when missing) on /messages and /messages/count_tokens, Bearer on everything else. A request on the declared API goes as before. Zero-config native protocol per agent needs magpie: its plugin contract has one API per model (provider.pluginAPIs returns pluginProtocol's one), so the gateway translates every other agent's protocol to it. Reported, not changed. Run on mote under lockf ~/suite.lock: - bun test packages/opendesign: 31 pass, 0 fail (at |
||
|
|
e68748a78e |
opendesign 0.1.11: cap glm-5.3-flash and gemini-3.8-flash output at what amr-link takes (#827)
amr-link's /v1/models publishes context_budget 232000 for glm-5.3-flash and 264000 for gemini-3.8-flash. Its API refuses anything over 131072 and 65536 with a 400, "Open Design: The request could not be completed.", which names no field. Gitleonan measured this on 2026-11-09 with two accounts (one of them took 232000 for GLM). A client that sends no limit, such as Codex, gets the published number from magpie (forwardTranslated's askedOutput), so every turn on those models failed. modelOf now caps limit.output for those two models (CAP). It applies to the seed and to every live catalog entry. A copy an earlier version kept in the provider's config is capped too: config hands kept models back as they were. models.mjs is left alone because refresh-models.mjs writes the vendor's number back into it, and the live catalog's number overrides the seed's anyway. A catalog number under the cap is used as it is. This does not fix the red test dot through a Remote magpie. That comes from the stream glm-5.3-flash sends when it reaches max_tokens: it ends after content_block_stop with no message_delta or message_stop. magpie's test asks for 16 tokens, and the model always thinks first, so it always reaches the limit. On the issue I point to the magpie code for that path. Run (on mote): bun test packages/opendesign gives 30 pass, 0 fail. Broken by hand: with origin/main's index.mjs, the new test fails, and with the config cap removed (the modelOf cap kept), it fails on the kept gemini copy's 264000. Not tried: a real amr-link request. There's no Open Design account here, so the caps are the reporter's measurements, not ours. Reported-by: Gitleonan |
||
|
|
087c36123d |
inkstone 0.1.3: image-caps preflight, a zero-prompt browser sign-in, key calls on the session cookie (#832)
inkstone 0.1.3 (#832, yunwang2442-creator): - Image requests are prechecked before they leave: 8 images, 10MB each, 40MB in all. - A request over a cap gets a local 400 shape refusal, so magpie asks the next account and rests none. - The plan's invalid_media / media_fetch_failed / unsupported_media_type errors become the same kind of refusal. - The body rewrite strips the reasoning fields and sets image detail to auto. - A zero-prompt browser sign-in comes first, and a second browser method reuses a pasted key. - Neither browser method is offered when no Chromium-family browser is found (#825). - The /keys calls ride the session cookie, without the pagination query. Key creation retries the console's -15100 "refresh page and retry". - The #826 metadata token read is kept, and its test is back. - The fake browser is built once per user and source hash (#824), and the title wait reads only on Windows. - maxConcurrency is 4. - The doubled comment line is dropped from every opencode2.mjs copy, agy-cli's included. Reviewed at 88e66bde, on mote (macOS, Bun 1.4.2) with a temp HOME: - full bun test: 6853 pass / 0 fail; both checks exit 0 - bun scripts/check.mjs and bun scripts/check.mjs inkstone: exit 0 - 21 hand breaks: 20 red, 1 not caught (the /keys pagination test calls protocol.listKeys directly; follow-up filed) Not tried: a real InkStone account or sign-in, Windows and Linux runs. |
||
|
|
32bf0e68f9 |
opendesign 0.1.10: a model keeps the seed's input kinds and limits the live catalog leaves out (#829)
modelsOf() built each signed-in model from amr-link's catalog entry alone (facts(m)). When the entry for deepseek-v4.1-flash-eco didn't list image, the seed's input: ["image"] was lost, magpie listed it text-only and described the image with another vision model (claude-haiku-5.5), while amr-link takes the image itself (the reporter's direct POST). Limits and the cost/capability words had the same loss: an entry without them fell to 200K/32K and no word, not the seed's. withSeed() now fills what the entry leaves out from models.mjs. Input is the seed's kinds and the catalog's together, also when the catalog lists text only: the seed's kinds are what the catalog itself listed at the last refresh, and a kind wrongly dropped is silent (the image is swapped for a description on another account's allowance), while a kind wrongly kept is the vendor's visible error. A model or kind the seed doesn't declare is the catalog's alone. refresh-models.mjs does the same merge and prints each kind it kept, so removing one is an edit to models.mjs. Siblings: astudio, cline and sensenova read input_modalities too. cline leaves an absent list unsaid, sensenova already unions its curated list with the live one, astudio has no seed kinds to lose. No change there. Run on mote: - bun test packages/opendesign: 29 pass. - Broken by hand: the old index.mjs and refresh-models.mjs fail both new tests (image false; no "kept image" line, eco written without input); only the context fallback reverted fails the modelsOf test. - bun scripts/check.mjs opendesign: ok. - HOME=$(mktemp -d) bun test (whole repo): 6766 pass, 20 skip, 1 fail: reasonix-desktop "normal host exit flushes a disconnect and leaves an active connection configured" (1162ms), untouched here; it passes 3 of 3 run alone. Its output was lost to a tail; not filed. Not tried: a signed-in opendesign account (we have none), so whether the live entry lists ["text"] or omits the modalities is not seen; the fix covers both. refresh-models.mjs against the real catalog. Reported-by: exposir |
||
|
|
e7004d9354 |
inkstone 0.1.0: Intern InkStone (书生·端砚) Token Plan, browser sign-in, credit card and ink-* key chat (#775)
New package @magpie-community/opencode-inkstone-auth 0.1.0 for Intern InkStone (书生·端砚, Shanghai AI Lab) Token Plan, provider id `intern-inkstone`. Community package by yunwang2442-creator. What it does: - Browser sign-in (Edge/Chrome, its own profile under $XDG_CONFIG_HOME or ~/.config/magpie/inkstone-browser, or %LOCALAPPDATA%\magpie\inkstone-browser). The login window has no debugging port. A headless CDP read takes the uaa-token cookie, and the same read renews it silently later. - Usage card: ink-credit balance, 5-hour and 7-day windows, credit packs. - Chat: a pasted ink-* API key, or one the sign-in creates, named ink-<host4>-<acct4>-<rand4> (18 of the console's 20 characters). An idempotency clash (-15109) retries with a fresh name, up to three times. Pruning is on by default. It only touches this machine's and account's prefix, keeps the newest two and the key this sign-in created, and never deletes manual keys or keys of unknown age. - Closing on Unix: SIGTERM, then SIGKILL only after a 15s grace. Leftover browsers are matched by --user-data-dir=<escaped profile>, and Windows uses .Contains(). - The login wait comes from an injected waitForLogin in tests. No env hook is left in production code. - Hosts: discovery.intern-ai.org.cn, discovery-api.intern-ai.org.cn, 127.0.0.1 (CDP). Outside the package: scripts/opencode2.mjs lets a prompt with `required: false` stay optional (`p.required !== false`). Every package's copy is synced byte for byte, so all 39 copies in the merged tree are blob |
||
|
|
6549b6335d |
opendesign 0.1.9: the plan's own credit multipliers, and V4.1 Flash Eco (#794)
A model's rate is now the Design Plan's own deduction multiplier from open-design.ai/zh/model-credits/ (rates.mjs), not amr-link's catalog cost word, which disagreed for seven models (Claude Haiku 5.5 2x, GPT-6 Luna 4x, DeepSeek V4 Pro 1x, ...). A model the table doesn't name keeps its catalog word. deepseek-v4.1-flash-eco joins the seed with V4.1 Flash's limits and levels at 0.27x. Reviewed at 0335afb86a9afb53a576813445c0b6cb4705cfeb: - rates.mjs checked row by row against the vendor page, fetched 2026-11-06; the 0.25x row is the 10-20..10-27 promo, over. - mote, HOME=$(mktemp -d), Bun 1.4.2: bun test packages/opendesign 27 pass; bun scripts/check.mjs opendesign ok; npm pack has rates.mjs and the packed plugin imports. - Broken by hand: rateOf ignoring the table (2 red), config hook not re-declaring rate (1 red), eco seed line removed (3 red). - magpie's host builds config models without rate and never writes a hook's result back, so the re-declared rate overrides nothing a user set. - npm had 0.1.8; 0.1.9 is next. Not tried: a real Open Design account; the live ids of hy4-preview and minimax-m3.1-flash (not in the seed). |
||
|
|
17e5ef7457 |
all: load on OpenCode 2.x through a default {id, setup} (#657)
nbczw8750 (#657): trae 0.2.26 on OpenCode 2.2.5 fails with "Plugin must export a default definition with an id and an effect or setup function. (cause: SchemaError(Missing key at ["default"]))". 2.x imports a package's exports["."] (a plugin dir and an npm install alike) and has no V1 path at all, so every package here that serves models failed the same way, not only trae. Every one of the 32 model packages now has: - opencode2.mjs, exports["."]: a copy of scripts/opencode2.mjs, an adapter that runs the package's V1 plugins inside 2.x's promise API. Config providers become 2.x providers (package pinned so the aisdk sdk hook runs), V1 auth methods become integration methods (oauth auto/code with forms; api without authorize as a key method), V1 credentials are kept in metadata.v1, the loader's baseURL, apiKey, headers and fetch are applied through the sdk hook, an auth.set renewal is stored per credential, and credential.switched /updated reload the account's own model list. - opencode.mjs, main: re-exports the V1 plugin functions only. OpenCode 1.x and magpie's host.js take main. On 1.x, trae 0.2.26's main exported a non-plugin (_internal) and 1.19.5 refused it ("Plugin export is not a function"); the new main fixes that too. - both files in "files"; patch version bumped. devin already had 2.x and is unchanged. scripts/check.mjs fails a model package whose 2.x entry has no default {id, setup}, whose opencode2.mjs differs from the canonical one, whose entry is missing from files, or whose main exports a non-plugin. Run at this head (mote): - HOME=$(mktemp -d) bun test, as CI runs it: 4900 pass, 0 fail (4914 tests, 374 files). A first run set globalThis.fetch for the whole process from opencode2.test and failed 528 tests in other packages; the block is now set and put back around that file's tests. - bun scripts/check.mjs: every package passes. With the network blocked cloudflare-workers-ai fails on its fetched catalog, the same on origin/main. - Real OpenCode 2.2.5 (npm opencode-ai), sandbox HOME, packed trae 0.2.27: loads with no error; /api/integration lists trae-cn "Trae CN" and trae-global "Trae Global" with their browser sign-ins; `auth login` starts the trae.cn authorization and waits (cancelled there); with a fake credential POSTed to /api/credential, `opencode models` lists trae-cn's six models. - Real 2.2.5 with a fake V1 key plugin through the same adapter against a local fake server: `auth login` with a key, `models`, `opencode run` reached /real/v1/chat/completions with the loader's "Bearer loader-sk-fake" and header, and printed the fake's reply; with @ai-sdk/anthropic it reached /real/v1/messages with x-api-key from the loader. This run found the key method missing after 2.x's second integration transform (a once-only flag outside the transform); fixed, and opencode2.test checks a rebuild. - Real OpenCode 1.19.5, sandbox HOME, trae 0.2.27: `opencode models` lists trae-cn and trae-global models; 0.2.26 failed there. Broken by hand (scratch copy, bun test scripts/ and check.mjs): - trae's exports back to "./index.mjs": the trae 2.x test fails (default.id undefined), check fails trae with "OpenCode 2.x: ./index.mjs has no default {id, setup} (plugins#657)". - zed's opencode2.mjs changed: the copies test fails, check fails zed "differs from scripts/opencode2.mjs". - the key flag back outside the transform: the 1.x plugin test fails on the rebuilt sign-ins (key missing). Not tried: a real sign-in with a real account on 2.x; Windows (the reporter's OS); chat.headers, chat.params, usage and tool hooks, which the adapter doesn't carry to 2.x; the tools/pages packages (calc, goanyapi, layerfs, search1api, aelios, agent-console, chat, fingerprint, nowledge-mem, kimi-desktop), which still load only on 1.x. |
||
|
|
c9a52b3baf |
opendesign 0.1.7: the sign-in names this computer, never "magpie" (#357)
The device authorization sent `host: hostname() || "magpie"`. The Open
Design CLI, `vela login` (@powerformer/vela-cli 0.1.7, darwin-arm64
binary), sends `{"cliVersion","host","profile":"prod"}` with host from
os.Hostname(), and when the name can't be read it stops with "resolve
hostname: %w" instead of sending a name of its own. The plugin now does
the same: this computer's name, or a sign-in that stops and says why,
with nothing sent.
Run:
- vela 0.1.7 `login` in a sandbox HOME/AMR_HOME with VELA_API_URL at a
local recorder: body {"cliVersion":"0.1.7","host":"yetone-mac-mini.local",
"profile":"prod"}
- bun test (packages/opendesign): 24 pass, 0 fail
- bun scripts/check.mjs: ok
- no-magpie.test.mjs against HEAD's index.mjs: 2 of 2 red
Not changed: cliVersion stays "0.1.4" and the User-Agent stays the
package's own name; neither names magpie.
Not tried: a live sign-in. There is no Open Design account to approve it.
|
||
|
|
ffc06aca49 |
opendesign 0.1.6: each model is asked on the API amr-link thinks on, and reasons at max too (#141, sryimnoob123)
sryimnoob123 measured a streaming request to every model on each of amr-link's three APIs: chat completions carries the thinking of most, claude-haiku-5.5 and deepseek-v4-pro think longer on Responses, and glm-5.3-flash thinks only on Anthropic's messages. The vendor also names max beside low and high. #141 was written against 0.1.4 and conflicted with 0.1.5 (#137's levels), so it is ported onto main here: - WIRE/MODEL_WIRE/wireOf as the PR had them; the provider default is chat completions, and a live list's and the seed's models each carry api.npm/provider.npm, which magpie's host reads per model. - The config hook sets every model's wire again over a kept copy, so a model 0.1.5 left on the Responses API moves to its own. - max joins every measured level list. Run: bun test in packages/opendesign, 22 pass (a new test holds a kept 0.1.5 model moving to its wire; the old Responses-only expectations were changed to the measured ones). Not tried against a real amr-link account. Co-authored-by: sryimnoob <314134180+sryimnoob123@users.noreply.github.com> |
||
|
|
b549b40b14 |
opendesign 0.1.5: a signed-in account's models reason in magpie, at the low and high levels amr-link took (#137, sryimnoob123)
sryimnoob123 measured amr-link with reasoning_effort high and low on all 11 models (magpie 0.1.1254, Windows): every one answered 200, and all but gpt-6-luna streamed reasoning, four the catalog calls "standard" too. Their install showed all 11 with reasoning false and no levels. Two causes: - provider.models gave the live list in the config's shape (reasoning: true, modalities: [...]). magpie's plugin host reads a listed model's thinking from capabilities.reasoning and its kinds from capabilities.input, so for a signed-in account every model read as not reasoning, with no image input. It now gives OpenCode's model shape (servedOf: api, capabilities, variants), as minimax/workbuddy do. - No model had levels: nothing declared variants, and magpie shows a model's levels only from them. models.mjs now records the measured levels (efforts): ["low", "high"] on the 10 that thought, [] on gpt-6-luna (took it, never thought). Only the two levels the table shows were given. A model with levels reasons whatever its capability word; one the seed doesn't know keeps the old rule (advanced reasons) with no levels. refresh-models.mjs keeps efforts like names. Run: - bun test packages/opendesign: 21 pass, 0 fail. New: "a signed-in account's models reason at the levels amr-link took (#137)", "the seed's models carry the measured levels as the config's variants"; the live-list test now pins the OpenCode shape. - Broken by hand: modelsOf back on modelOf (config shape) -> 2 fail; efforts not passed from the seed to the live list -> 1 fail. - magpie origin/main internal/plugin/host.js run under bun with a preloaded fetch stub serving a 3-model catalog (init + providers, a stored oauth account): with 0.1.4 gpt-6-luna, deepseek-v4-pro and claude-haiku-5.5 all list reasoning=false variants=[] image=false; with this change luna false/[]/image true, v4-pro true/[low high], haiku true/[low high]/image true, url the amr-link base. - refresh-models.mjs against the same stub: efforts kept per model. - bun scripts/check.mjs: every package ok. - TMPDIR/HOME isolated bun test (whole repo): 1526 pass, 0 fail. A first run had 1 fail, packages/grok/login.test.mjs "a login's link is still handed on" timing out at 5s with load average ~100; alone 3/3 pass and the rerun of the whole repo passed. Untouched package; not filed. Not tried: a real Open Design account (none here) or magpie's `model efforts` command end to end; the levels rest on the reporter's table. Full suite: bun test (whole repo, with factory 0.1.30 below it): 1527 pass, 0 fail |
||
|
|
8a28086bf1 |
opendesign tests: the real fetch is put back after each test, so every package's tests after it pass again (publish red since #84)
bun test runs every package's files in one process. opendesign's tests
set globalThis.fetch directly, and mock.restore() doesn't undo that, so
every file after it (minimax, trae, zcode, zen-free: 148 tests) got
opendesign's stub and failed. The publish run at
|
||
|
|
3db704a677 |
opendesign 0.1.4: Open Design Cloud (Design Plan) as a provider (#84, dbydd)
New package @magpie-community/opencode-opendesign-auth 0.1.4, provider id `opendesign`: an Open Design Cloud account's Design Plan as a magpie provider (dbydd, #84). Reviewed at this head (37ef688), as in the PR's last review: `HOME=<temp> bun test` for packages/opendesign, 19 pass; `bun scripts/check.mjs opendesign` ✓; the package loads under Node and Bun; `npm pack --dry-run` packs 5 files; a stubbed usage call sent its User-Agent to amr-api.open-design.ai only. The only hosts in it are amr-api.open-design.ai and amr-link.open-design.ai, with no install script, child process, or write outside OpenCode's auth store. It no longer waits on its first npm publish: the publish workflow packs it onto the dist branch, and magpie 0.1.1243 and later install it from there until npm has it. |