Commit Graph
45 Commits
Author SHA1 Message Date
yetone a069f224c0 provider: moved Grok users get grok-auth 0.1.14, which asks for a window offered without a k as that window (#1679)
#1679's fix (df4ea0ff6) reaches only the built-in. A moved Grok user's
requests go through @magpie-community/opencode-grok-auth, whose modelOf
read only <id>@<N>k, so grok-4.7@131072 went to Grok as a model of that
name. plugins f980265 (grok 0.1.14) reads the bare-digit window as the
built-in now does; this raises the mover's min so keepMovedCurrent
updates every moved user to it.

Run: plugin bun test 41 pass, the new modelOf test FAILs with modelOf
put back; scripts/check.mjs grok ok; npm view
@magpie-community/opencode-grok-auth@0.1.14 version on
registry.npmjs.org gives 0.1.14. Here: gofmt -l clean; go test
-tags nogui -count=1 ./internal/provider -run
'Mover|Moved|Migrat|Grok|Adopt|HandOver|KeepMoved' ok.
2026-10-13 10:40:36 +08:00
yetone 751e05d824 provider: moved Cursor users get plugin 0.2.10, which counts a Team's org-wide on-demand pool as the limit (#1868)
@magpie-community/opencode-cursor-auth 0.2.10 (magpie-community/plugins
a885a16) gives a team member with no limit of their own a fixed
On-demand window on the team's pool (pooledUsed / pooledLimit, the
member's own spend beside it) instead of unlimited, the same change as
the built-in's in the previous commit. keepMovedCurrent updates every
moved user's plugin to it.

Run: 0.2.10 checked on registry.npmjs.org (latest, its tarball holds the
fix); go test -tags nogui ./internal/provider/ under a sandbox HOME (ok,
TestMovedBuiltinsSayTheirPlugin included); gofmt -l and go vet on darwin,
linux (nogui) and windows clean.
2026-10-13 06:07:06 +08:00
yetone aa1b04c324 provider: moved Cursor users get plugin 0.2.9 and WorkBuddy users 0.1.18 (magpie-community/plugins#55, #18)
Cursor 0.2.9: a default model whose own branch stops short of the asked
effort goes to its nearest effort, so the id and its parameters agree.
WorkBuddy 0.1.18: WorkBuddy 5.6+ keeps its desktop sign-in encrypted; the
plugin now says so and points to the browser sign-in, instead of
"isn't signed in" and a 502.

Both versions checked on registry.npmjs.org (dist-tags latest).
Run: gofmt -l, go vet (darwin, linux -tags nogui, windows) and
go test ./internal/provider -run 'Mov|Plugin|Migrat|Hand'.
2026-10-13 04:54:51 +08:00
yetone d9bb0fbc84 provider: moved Command Code users get plugin 0.1.12, whose model list follows the account's plan (01huadalang on Discord)
Command Code 0.1.12 (magpie-community/plugins 49e9d89): Command Code's model
list is the same for every plan, and the plugin filtered only Go's, by the
CLI 1.73.0 table, which lacked Claude Haiku 5.5. So a Go account was shown a
model only GOAT and above may use, and GOAT, Pro and Provider accounts every
model, those their plan refuses included. Each plan's list now leaves out
what the CLI 1.79.2's table refuses it; a plan that can't be read, or an
account with bought or free credits, keeps the whole list, and a refused
model still reaches the agent as Command Code's MODEL_NOT_IN_PLAN.

Only the mover's min string and its note change. 0.1.12 was checked on npm
with npm view.

Ran: gofmt -l internal/provider, go vet ./internal/provider on darwin, linux
and windows, and go test ./internal/provider -run 'Mov|Migrat' (ok, 8.6s).
The full suite was not run, as this is a one-string change.
2026-10-13 00:50:17 +08:00
yetone d56da7e896 provider: moved WorkBuddy users get plugin 0.1.15 and Command Code users 0.1.11 (magpie-community/plugins#96, #91)
WorkBuddy 0.1.15 (wowyuarm's plugins#96): a system prompt sent as a developer message no longer fails the channel check with 400, an object tool_choice is sent the way WorkBuddy takes it, and max_completion_tokens goes as max_tokens so the output cap holds. Command Code 0.1.11 (plugins#91): a streamed Go reply the upstream cuts off after it has said something ends cut short with a note instead of losing the turn.

Only the movers' min strings and their notes change. Both versions were checked on npm with npm view. The plugins session ran #96 against the real WorkBuddy AI endpoint before and after the change.

Ran: gofmt -l, and go vet ./internal/provider on darwin and windows. go test ./internal/provider -run 'Mov|Migrat|Plugin|HandOver|Adopt' passed in 129s. The full suite was not run, because this is a two-string change.
2026-10-12 20:39:45 +08:00
yetone 17c12621bb provider: moved Cursor users get plugin 0.2.8, whose empty-reply error says what Cursor's Run sent before it (magpie-community/plugins#60, congee949)
Raises the cursor mover's min from 0.2.7 to 0.2.8 (published, npm view shows 0.2.8), so keepMovedCurrent updates moved users. 0.2.8 adds the thinking length, tokens, refused built-in tools, unknown messages and last frame to the empty-reply 502, for the next report on plugins #60. Ran gofmt -l, go vet (darwin, windows) and go test ./internal/provider (ok, 525s).
2026-10-12 18:43:22 +08:00
yetone 3f6db48f50 provider: moving Cursor onto its plugin no longer fails "unserved" on the built-in's model ids the plugin still runs (#1656, delete-cloud)
The Cursor plugin lists Cursor's picker since 0.2.0 (plugins #51): a model
once per context size (grok-4.7@256k), effort and fast as the request's
parameters. The built-in ticks 0.1.x-style ids (grok-4.7-fast,
claude-opus-5-thinking, cursor-grok-4.5, a stale grok-4.7-low), which the
plugin's named() runs as the variants they stood for, but move() only
counted an id served when the plugin's list had it literally, and the
cursor mover had no served hook. A move failed for most ticked models.

The cursor mover now has served (cursorServed): an id is served when its
family, taken apart by splitCursorID and without -thinking/-fast, is a
model the plugin lists (its id before "@"), with or without Cursor's
"cursor-" prefix; default/auto when the plugin lists Auto. A family the
picker hasn't got (claude-fable-5-thinking-no-zdr, codex-5.3-fast) is
still refused. Known limit, as the report says: the list is flat, so a
-fast id of a listed family counts as served though the account may lack
fast; the plugin runs it as the nearest variant.

Siblings checked: Devin already has served, ZCode builtin; Grok's plugin
keeps the plain id for the default window (grok-4.7, grok-4.7@500k
beside it); the other plugins list the vendor's ids as the built-in did.

Run:
- TestCursorMoverServesBuiltinIDs, with the ids plugin 0.2.7 lists for
  its own context.test.mjs PICKER (got by running the plugin under bun;
  request() resolves each id the test calls served to a Cursor variant).
  Failed with the hook removed ("the Cursor mover has no served hook")
  and with the "@" cut removed (claude-opus-5-5 ... not served).
- go test -tags nogui ./internal/provider/ in a sandbox HOME: ok.
- gofmt -l; GOOS=linux and GOOS=windows go vet -tags nogui
  ./internal/provider/: clean.
Not run: a real move with a real Cursor account (the reporter ran the same
approach end to end on their account: 17 unserved down to the 2 above).
2026-10-12 01:15:46 +08:00
yetone c763d4fe1d provider: a moved ZCode or Command Code account is brought to plugin 0.1.15 / 0.1.10, which say the agent's folder (plugins #86, Hipple)
Raises the movers' min so keepMovedCurrent updates every moved user:
- @magpie-community/opencode-zcode-auth 0.1.15 (plugins baa788b): the
  Start Plan's environment section says the folder and git repository
  magpie tells it, never magpie's own folder, and leaves out what it
  isn't told and the shell.
- @magpie-community/opencode-commandcode-auth 0.1.10 (plugins 7e67b98): a
  Go request's workingDir and isGitRepo are the agent's.
Both were published by the plugins repo's publish workflow and are the
registry's latest. Run: go test internal/provider.
2026-10-11 21:51:34 +08:00
yetone 3bc9ab152d provider: moved Cursor users get cursor plugin 0.2.7, which keeps an assistant turn's reasoning across a tool continuation (plugins #82, nicegui)
The cursor mover's min goes from 0.2.6 to 0.2.7 so keepMovedCurrent
updates every moved user's plugin. 0.2.7 (magpie-community/plugins
126b105, bump 379ec96) sends an assistant turn's reasoning_content back
to Cursor as a reasoning part, the shape cursor-agent 2026.10.01 sends,
when a tool result continues the turn. npm view shows 0.2.7.

Run: go test ./internal/provider -run 'Moved|Mover|Migrat|KeepMoved|HandOver'
(TestMovedBuiltinsSayTheirPlugin included), then the whole package and
the full suite.
2026-10-11 20:56:21 +08:00
yetone f716bdba99 provider: moved Grok accounts update to grok plugin 0.1.12, which offers each context window Grok lists (plugins#83, guoqchen1001)
The grok mover's min goes from 0.1.11 to 0.1.12, so keepMovedCurrent
updates every moved Grok user's @magpie-community/opencode-grok-auth.

0.1.12 (magpie-community/plugins#83, merged as 8260d979) offers a model
Grok's /v1/models lists at two context windows at each one: grok-4.7 at
the default 256k and grok-4.7@500k. The plugin's fetch sends the plain
model with x-grok-context-window: 500000, as the Grok Build CLI 1.0.50
does with /context-window 500k. The model's api.id is the offered id,
since magpie's modelAPIID/withModel put api.id in the body.

Run:
- npm view @magpie-community/opencode-grok-auth@0.1.12: published.
- HOME=<temp> go test -tags nogui ./internal/provider/: ok.
- gofmt -l internal/provider: clean. GOOS=linux and GOOS=windows
  go vet -tags nogui ./internal/provider: clean.
- The plugin at 0.1.12 was tried on a real Grok account (in the PR's
  record): grok-4.7 and grok-4.7@500k each answered 200.
Not tried: a moved user's plugin actually updating through
keepMovedCurrent on a real install.
2026-10-11 19:55:50 +08:00
yetone 3d2daf0598 provider: moved Devin accounts update to plugin 0.1.14, whose week used up shows at 100% and holds the account (面条)
Raises the Devin mover's min from 0.1.13 to 0.1.14, so keepMovedCurrent
brings every moved user onto the plugin release where a weekly quota at
0% left (left out of GetUserStatus's JSON) is a 7 days window at 100%
beside the day, and routing holds the account until the week resets.

0.1.14 is on the npm registry (dist-tags latest 0.1.14, tarball 200).
go test -tags nogui ./internal/provider ok; GOOS=linux and GOOS=windows
go vet -tags nogui ./internal/provider ok.
2026-10-10 20:49:58 +08:00
yetone e821d8c642 provider: moved Cursor users get plugin 0.2.6: an account that may spend on-demand is not used up when its included usage is (#1476, PaSSw0rds; fottencity on Discord)
A Cursor team or enterprise that pays past the included usage keeps being
served once Cursor Models / Other Models reach 100%. Plugin 0.2.6 reads
GetHardLimit and the period's spendLimitUsage, derives the On-demand state
as cursor-agent 2026.10.01's usage view does, and when on-demand is fixed
or unlimited shows the pools aside with an On-demand window as the
allowance. It was published to npm at 07:11Z, but the cursor mover's min
stayed at 0.2.5, so keepMovedCurrent never updated moved users to it.
The min goes to 0.2.6.

Run: npm's 0.2.6 tarball index.mjs is byte-identical to plugins main
a298e54; bun test in packages/cursor: 77 pass, 0 fail.
go test -tags nogui ./internal/provider passes (temp HOME, pinned caches);
go vet -tags nogui ./internal/provider passes for darwin, linux, windows;
gofmt -l clean. No test pins a mover's min. Not tried with a real
enterprise account.
2026-10-10 17:41:52 +08:00
yetone 338ea97909 provider: moved Cursor users get plugin 0.2.5: an account with a Grok Bot allowance shows it on its Usage card, and a model asked for by its bare name counts in its sized ids' pool (magpie-community/plugins#64, Morganwan90; Will on Discord)
Cursor's Grok Bot has an allowance apart from Cursor's monthly usage that
only cursor.com's dashboard showed. Plugin 0.2.5 reads it from
cursor.com/api/dashboard/get-sand-usage-status (the sign-in sent as the
dashboard's WorkosCursorSessionToken cookie, as CodexBar does) and adds a
"Grok Bot" window, or "Grok Bot (trial)": aside, so a spent Bot never stops
Cursor requests, placed before Total so it is among the card's three rings.
A missing or failed reading leaves Cursor's own windows as they were.
0.2.4 (not shipped to moved users until now) counts a model asked for by
its bare name (grok-4.7) in the pool its sized ids (grok-4.7@256k) are in.

The cursor mover's min goes from 0.2.3 to 0.2.5, so keepMovedCurrent
updates every moved Cursor user.

0.2.5 on npm (registry.npmjs.org, latest) has an index.mjs byte-identical
to plugins main 6bed2c1. The plugin PR was reviewed at 40d4df6 and merged:
- bun test in packages/cursor: 73 pass, 0 fail; whole repo 1033 pass,
  0 fail; bun scripts/check.mjs all 15 pass
- botUsage broken 16 ways: 12 turn usage.test.mjs red; no timeout, no
  Origin, no res.ok check (the catch covers it) and an added bearer stay
  green
- the request and parsing match CodexBar's CursorSandUsage.swift
- not tried with a real Cursor account on the review side (the author saw
  the Bot ring on a Free account linked to SuperGrok)

go test -tags nogui ./internal/provider passes (temp HOME, pinned caches).
go vet -tags nogui ./internal/provider passes for darwin, linux and windows.
gofmt -l is clean. No test pins a mover's min, as for 0.2.3.
2026-10-10 11:52:49 +08:00
yetone 0d5fdbb2de provider: moved Cursor users get plugin 0.2.3: where a proxy or network blocks HTTP/2 ("h2 is not supported"), a Cursor chat goes over HTTP/1.1 as RunSSE + BidiAppend on api2 instead of failing (magpie-community/plugins#59, kazecreator)
Behind TLS inspection or a network that drops HTTP/2, every moved Cursor
chat failed with 502 "Cursor: h2 is not supported" or never answered, while
sign-in, models and usage worked. 0.2.3 falls back to Cursor's own HTTP/1.1
transport; a failure that says HTTP/2 itself can't be had keeps later Runs
on HTTP/1.1 for 10 minutes. The cursor mover's min goes from 0.2.2 to
0.2.3, so keepMovedCurrent updates every moved Cursor user.

0.2.3 on npm (registry.npmjs.org) has an index.mjs byte-identical to
plugins main 5b67ff4. The plugin PR was reviewed at f5c11b7 and merged:
- bun test in packages/cursor: 66 pass, 0 fail, three runs
- whole repo: 1026 pass, 0 fail; bun scripts/check.mjs all 15 pass
- each guarded piece broken by hand turns http1.test.mjs red
- not tried with a real Cursor account on the review side

go test -tags nogui ./internal/provider passes (temp HOME, pinned caches).
go vet -tags nogui ./internal/provider passes for darwin, linux and windows.
gofmt -l is clean.
2026-10-10 09:38:24 +08:00
yetone d7f3c20be3 grok: a Codex subagent's plain agent_message goes to Grok as the user's message, not refused with 422 "unknown item type" (plugins#61, opencode-grok-auth 0.1.11)
Grok's Responses backend refuses a request carrying Codex MultiAgentV2's
agent_message item (a subagent's task, or its reply kept in the lead's
history) with 422 unknown item type "agent_message". plugins#61 counted
512 such 422s on a moved Grok subscription from 10-03 to 10-09, and fixed
it in @magpie-community/opencode-grok-auth 0.1.11 (on npm).

What changed:
- the grok mover's min goes from 0.1.10 to 0.1.11, so keepMovedCurrent
  updates moved users' plugin, and its comment says the fix.
- grokBody (the built-in's request shaper, which also runs for the Grok
  plugin's provider, plugins.go) does what the plugin does: an
  agent_message whose content is a non-empty list of input_text /
  input_image parts goes as {"type":"message","role":"user"}, with
  "From <author> to <recipient>\n\n" (or From / To alone, or nothing)
  as its first part, in its place among the input. One with
  encrypted_content on the item or a part, an empty or null content, or a
  part of another kind is left byte for byte, so magpie reads no sealed
  task and the gateway's sealed-task guard still sees it. A body with no
  agent_message is returned as it came.

Tests:
- provider: TestGrokBodyAgentMessageGoesAsUser (the plugin's task, reply
  with an image between a call and its output, sender alone / recipient
  alone / none) and TestGrokBodyLeavesSealedAgentMessage (the plugin's
  seven sealed or malformed items, and an ordinary history byte for byte).
- gateway: TestGrokGetsAgentMessageAsUser (built-in, streamed and not,
  through the handler) and its parity TestGrokPluginGetsAgentMessageAsUser
  (the Grok plugin's provider, streamed, relayed).
- With origin/main's grok.go back, TestGrokBodyAgentMessageGoesAsUser,
  TestGrokGetsAgentMessageAsUser and TestGrokPluginGetsAgentMessageAsUser
  FAIL ("the agent_message went as" the untouched item); with the change
  they pass.

Run: gofmt -l (nothing); go vet, GOOS=linux and GOOS=windows go vet
-tags nogui on ./internal/provider ./internal/gateway (clean);
go test -tags nogui ./internal/provider ./internal/gateway under a temp
HOME with pinned caches (ok). Not tried against the real Grok backend:
no live Grok request was made.
2026-10-09 22:48:55 +08:00
yetone baecbb1be0 provider, gateway: Cursor moved onto its 0.2.x plugin gets Fast back, in the agent picker (#954) and for a Routing group's member, on the models Cursor has a fast variant of (#1360, loosheng: 插件 0.2.x 后 Cursor 的快速模式不见了,保存 cursor/<model>:fast 报 "has no fast mode magpie can ask for")
Plugin 0.2.x lists Cursor's picker once per context size (claude-opus-5-5@300k, @1m) and no -fast model, so CanFast, which looked for a -fast sibling, said no for every model: FastFor in route.go, canFast in the group editor, SetFastPick and cleanFast all go through it. The plugin itself still ran service_tier priority as the fast variant. opencode-cursor-auth 0.2.2 (magpie-community/plugins fb253f9) now says fast on a model listed at a size Cursor has a fast variant at; host.js passes it on as plugin.Model.Fast, CanFast takes it, and a plugin before 0.2.2 is still read by its -fast sibling. The Cursor mover asks for 0.2.2. On the way a fast request translated for a moved Cursor (Anthropic, Responses, chat not streamed) lost its service_tier: buildChat sets it only for host "cursor", and a moved provider's host is empty; buildHost names it.

Tested: the fake plugin lists sized models with fast on one (FAKE_FAST=tier); TestCursorPluginGroupFast (CanFast per size, @1m:fast refused, a group's @300k:fast sends priority), TestCursorPluginGroupFastSibling (the old -fast list), TestCursorPluginFastPick (moved: picker fast on chat, chat streamed, Responses and Anthropic sends priority, codex's doesn't). Without groupfast.go, host.js's fast or buildHost they fail. go test -race -tags nogui on gateway, provider, plugin, agent, gui; go vet, GOOS=linux/windows vet and build. With the built binary under a temp HOME, the real npm 0.2.2 plugin and Cursor's API answered by a preload (a picker fixture, the agent API's Run caught): /api/state offers fastFor on @300k and composer-2.5, not @1m or grok; /api/groups canFast the same; saving @1m:fast is refused, @300k:fast saved; opencode's picked @300k reaches Cursor's Run with fast=true on chat, Anthropic and Responses, codex's with fast=false. origin/main's binary in the same HOME offers none and refuses @300k. Not tried with a real Cursor account.
2026-10-09 05:32:36 +08:00
yetone 84c3eb0362 provider: moved Cursor users get plugin 0.2.1: an id 0.1.x listed, at an effort only its other branch has, goes as that branch's nearest effort, not as the default's id with parameters that contradict it (magpie-community/plugins#54, geoqiao)
On 0.2.0, cursor/claude-opus-5 at xhigh went as claude-opus-5-thinking-high
with thinking=false, effort=xhigh, because Opus 5 without thinking stops at
high. 0.2.1 sends claude-opus-5-high with effort=high, as 0.1.11 did. The
cursor mover's min goes from 0.2.0 to 0.2.1, so keepMovedCurrent updates
every moved Cursor user.

0.2.1 on npm (registry.npmjs.org) has an index.mjs byte-identical to plugins
main cf0de01e. The plugin PR was reviewed at ea00bd9 and merged:
- bun test in packages/cursor: 49 pass, 0 fail
- whole repo: 987 pass, 0 fail
- bun scripts/check.mjs passes for all 15 packages
- the new test fails on 0.2.0's index.mjs
- not tried with a real Cursor account on the review side (the stored token
  answers 401)
The case where the default's own branch stops short is still open:
magpie-community/plugins#55.

go test -tags nogui ./internal/provider passes (temp HOME, pinned caches).
go vet -tags nogui ./internal/provider passes for darwin, linux and windows.
gofmt -l is clean.
2026-10-09 00:36:27 +08:00
yetone 3856a9a6d8 provider: moved Cursor users get plugin 0.2.0: the list is Cursor's model picker, a model once per context size with that window (claude-opus-5-5@300k, @1m), effort and fast sent as the variant's parameters, and an id 0.1.x listed still runs as the variant it stood for (magpie-community/plugins#51, geoqiao)
The cursor mover's min goes from 0.1.11 to 0.2.0, so keepMovedCurrent updates every moved Cursor user. The ids picks were saved under before (claude-opus-5-5, claude-opus-5-5-fast, cursor-grok-4.6, a variant's own slug) keep working. magpie still sends an id the plugin no longer lists to the plugin unchanged: provider.Resolve accepts any cursor/<model> while the provider is on, and pluginFetch builds a stub model. The plugin's named() then resolves the id to its variant.

0.2.0 on npm was checked against registry.npmjs.org: its index.mjs is byte-identical to plugins main 8cd5a0f. The plugin PR was reviewed at c64bc3d and merged onto main:
- bun test in packages/cursor: 48 pass, 0 fail
- bun scripts/check.mjs cursor passes
- seven deliberate breaks, each caught
- not tried with a real Cursor account on the review side

go test -tags nogui ./internal/provider passes in Docker (golang:1.26.8, temp HOME, module cache read-only). go vet -tags nogui ./internal/provider passes for linux, windows and darwin. gofmt -l is clean.
2026-10-08 22:07:41 +08:00
yetone 02ecc4ccf6 provider: moved Devin users get plugin 0.1.13, whose call ids Claude Code takes, going back to Devin as Devin gave them (#1304, StarMoonCity)
SWE-2's call ids ("Bash:0#a65b…") went to the agent as Devin gave them, and Claude Code dropped each call: "The model's tool call could not be parsed". Plugin 0.1.13 (magpie-community/plugins d33df7e) sends such an id as "dv_" and its base64url and turns it back for Devin. Raising the mover's min makes keepMovedCurrent update every moved user's plugin.

npm view @magpie-community/opencode-devin-auth version prints 0.1.13; the plugin's publish run had 973 pass, 0 fail. go vet for darwin, GOOS=linux and GOOS=windows pass; go test -tags nogui ./internal/provider passes on Linux (Docker; this Mac can't exec new test binaries right now).
2026-10-08 19:57:21 +08:00
yetone 6030fe88ca provider: moved Devin users get plugin 0.1.12, where a temperature or top_p of 0 reaches Devin as 1e-6 instead of a 400 "an internal error occurred" (magpie-community/plugins#50, versun)
Devin answers every request whose temperature or top_p is exactly 0 with
400 "an internal error occurred (trace ID …)". Callers asking for greedy
output (Hermes Agent's command approvals send temperature 0) failed on
every devin/* model. Plugin 0.1.12 sends a 0 as 1e-6; the mover's min
raises moved users to it through keepMovedCurrent.

Verified: against a real Devin account, the plugin's complete() on 0.1.11
gives 400 for temperature 0 and top_p 0 on swe-2 and claude-sonnet-5-5,
and 200 for 1e-6; 0.1.12 gives 200 for all of them. 0.1.12 is on
registry.npmjs.org. go vet (darwin, linux, windows) and
go test -tags nogui ./internal/provider pass in a sandbox HOME.
2026-10-08 18:08:55 +08:00
yetone 8bbc03ac78 provider: moved Cursor and Devin users get plugin 0.1.11, whose split parallel tool calls keep their results (#1275)
cursor 0.1.11 and devin 0.1.11 (magpie-community/plugins 78780b8, 994d580)
join an assistant message onto an assistant message before it that made
tool calls, as joinSplitCalls does in the built-ins since 7067fce5: a
turn's calls split over two assistant messages were answered as
interrupted and their real results dropped. Both are on npm (npm view,
2026-10-08). Kiro's plugin already joined them; a test in f35c189 keeps
it so.

HOME=$(mktemp -d) go test -tags nogui ./internal/provider ok; go vet
-tags nogui ./internal/provider on darwin, GOOS=linux and GOOS=windows
clean.
2026-10-08 17:05:00 +08:00
yetone 716c8c9544 provider: moved Grok and Devin users get plugin 0.1.10, whose tool schemas with a root union go folded with nested branches kept (#1271)
grok 0.1.10 (magpie-community/plugins a6910fd) folds a function's root-union parameters, which it sent as they came; devin 0.1.10 (fbee8a0) keeps the fields of branches that are unions themselves. Both are on npm (npm view, 2026-10-08).
2026-10-08 17:01:22 +08:00
yetone b916f1b547 provider: moved Devin users get the plugin's 0.1.9, which sends a tool whose parameters have a root anyOf, oneOf or allOf as a plain object, so Devin's Claude models no longer answer 502 to Codex desktop's automation_update (#1196) 2026-10-08 05:26:34 +08:00
yetone 35485f2d93 providers: Cursor's mover asks for opencode-cursor-auth 0.1.10, which far from Cursor counts a tool step whose usage event shows late in the conversation's next steps instead of guessing it uncached (#1053, plugins#33) 2026-10-07 03:24:32 +08:00
yetone daeb108b4e commandcode: the mover's min is 0.1.9 (#969, pan17) — @magpie-community/opencode-commandcode-auth 0.1.9 takes a key the Provider API refuses with "Your Go plan doesn't include API access" as a Go plan's (kept in memory and saved with the key) and sends its chat completion again to /alpha/generate, where Go is served; before, a Go key whose plan wasn't known yet (billing/subscriptions slow or failing, nothing saved yet) got that refusal. keepMovedCurrent brings every moved account's plugin up to it. The plugin's go-refused.test.mjs (4 of 5 fail on 0.1.8) and check.mjs pass; 0.1.9 resolves on npm. Not tried with a real Command Code Go account (none here). 2026-10-06 12:44:17 +08:00
yetone bc00ee1df2 plugin, provider: a program a plugin starts has magpie's proxy, and a CLI login with no link says why (𝕏 on Discord)
The Grok plugin's sign-in said only "grok login gave no link to open".
The plugin host has magpie's proxy only as MAGPIE_*_PROXY, so the
`grok login` the plugin runs went out with none, where the built-in's had
it (netproxy.Env); where x.ai is reached only through a proxy, it failed.
host.js's spawn wrapper now gives a started program HTTPS_PROXY and
HTTP_PROXY (the account's own proxy, none for direct, else magpie's) when
the plugin set none.

grok 1.0.46, unable to reach x.ai, prints "Error: error sending request
for url (https://auth.x.ai/oauth2/device/code): …", whose URL the
built-in's runCLISignIn took for the page to open; a line saying error
gives no link, and a login with none ends with the CLI's last line. The
plugin does the same from 0.1.8, which the grok mover now asks for.

plugin_cliproxy_test.go and TestCLISignInSaysWhyNoLink fail before this.
Checked with grok 1.0.46 itself through the plugin host and the published
plugin's code, given a proxy that refuses: the CLI goes through it and the
error names what it said.
2026-10-05 22:25:33 +08:00
yetone e9262f7ea8 provider, gui: a Grok account answered 429 shows a spent Rate limit window on its card until the limit lifts (H20 on Discord) — a free Grok account read 100 left while its requests came back 429 after a short while: Grok's billing (/v1/billing?format=credits, all the CLI's /usage reads too) says nothing of a plan's rate limit, and a period's credits unused read 0% used. @magpie-community/opencode-grok-auth 0.1.7 keeps the account's last 429 and its usage puts a "Rate limit" window at 100%, aside (the gateway already rests the account), before the period's, until the reset the 429 named (Retry-After, or a *ratelimit*reset* header), or with none until a request goes through or 5 minutes pass; grok's mover min is raised to it. The built-in, which only accounts that haven't moved use, is left as it was. "Rate limit" in zh/ja/de. The plugin's new usage test fails on 0.1.6; its 20 tests pass, and against the owner's real Grok account (read-only) the plugin's usage gave the week at 0% before and the Rate limit window first after a 429 through its fetch. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass. 2026-10-05 20:59:01 +08:00
yetone c058ee1d87 devin: a moved Devin gets plugin 0.1.8, whose models take images as Devin tells its CLI (面条 on Discord: swe-2 takes images) — @magpie-community/opencode-devin-auth 0.1.7 listed swe-2, swe-1.7 and the like as text-only (models.dev doesn't know Devin's ids), so agents dropped their images; 0.1.8 asks GetCliModelConfigs, as the built-in already does (devin_images.go), and its declared list says what Devin said on 2026-10-05. The mover's min is 0.1.8, so keepMovedCurrent updates every moved user's plugin. With the owner's real Devin account, through the plugin: swe-2 and swe-1.7 described an inline image's colours, and provider.models listed them with image input, with the devin CLI and without it. go vet ./internal/..., builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-05 13:25:15 +08:00
yetone e673d50aea devin: moved accounts get @magpie-community/opencode-devin-auth 0.1.7 (plugins#17, NieiR on Windows: "Add another Devin account" named account B's key after the devin CLI's own account A and replaced A's key with it) — the plugin named a key's account by running devin auth status in a data folder of its own, which the Windows devin CLI ignores (it reads %APPDATA%\devin\credentials.toml whatever APPDATA it is given), so every sign-in was named after the CLI's account. 0.1.7 asks Devin's GetUserStatus with the key itself, takes the CLI's word only when it read the key's own folder, and lists models from the CLI only when it answers for the key's account. The mover's min goes from 0.1.5 to 0.1.7, so keepMovedCurrent updates every moved user. Checked with the owner's real Devin key: GetUserStatus names it as the account it is labelled (plan Devin Teams, as the CLI words it). go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-04 17:12:21 +08:00
yetone 1594544041 provider: moved Command Code takes commandcode-auth 0.1.8, whose models take pictures as models.dev says, not none of them (ARNO on v0.1.810, Discord: command code provider 的所有模型都没有自动勾上支持图片输入) — Command Code's /provider/v1/models gives no modalities, and the plugin (0.1.7 and before) answered every model's capabilities.input.image with false, which the plugin host reads as said (host.js imageSaid) and pluginCatalog keeps as the model's ImageInput, over catalog.SeesImages. So every model of a moved plan showed no image input; the built-in, whose list says nothing either, answered from models.dev and still does (not-moved users were not affected). Plugin 0.1.8 (magpie-community/plugins 42e762b) says image only when it knows: the list's modalities, its default list, the CLI's Go table, or a Claude model; of any other it says nothing, and entryFor answers from models.dev as it does for the built-in. The mover's min is 0.1.8, so keepMovedCurrent updates moved users. TestMoveCommandCode checks the min and fails on 0.1.6. Tried through the plugin host with the real Command Code account under a temp HOME (a copy of the models.dev cache, the key read from migrations.json, nothing live written): 0.1.7 gave 0 of the shown models image input, 0.1.8 gave 22 of 24 — Claude, GPT, DeepSeek V4 Flash Vision — with DeepSeek V4 Pro and Flash, text-only on models.dev, left without. go vet, builds (darwin, GOOS=linux) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-04 12:06:30 +08:00
yetone 730a163f47 cursor: a step that calls tools records what it used, the cache included (#676) — Cursor tells a turn's usage (TurnEndedUpdate) only once the client has run the tools and sent their results in the same Run, and the caller runs them after the Run is closed, so every tool step was recorded as an estimated input with no cache (2395 / 0 where Cursor counted 4265, 4224 of them cached), while text turns showed ~99% cache. After the calls Cursor sends only the checkpoint (no token details) and heartbeats; a cancelled Run ends with an error and no usage. Every Run is counted in the dashboard's usage events (DashboardService/GetFilteredUsageEvents) by its conversation_id, input apart from the cache read and written; one shows about 2.5 s after the Run closes. So a tool step with no TurnEnded now closes the Run and looks for its event (after 1.5 s, every 0.5 s, up to 6 s): its conversation's, no older than the Run, not already counted; else the estimate as before. A Run with no conversation id gets one, to be found by. The estimate is also no longer added to a turn read wholly from the cache (input 0, cache read > 0). The mover's min for cursor is 0.1.9, which does the same in the plugin (magpie-community/plugins: cursor 0.1.9). TestCursorToolStepReadsItsUsageEvent fails on the old code (5008 estimated, 0 cached) and passes. Tried with the real Cursor account: the built-in (grok-4.7-medium-fast) reports 6153 in, 6144 cached on a tool call, streamed or not; and through a sandbox magpie's plugin host with plugin 0.1.9, 6186 in, 6144 cached, 121 out, where 0.1.8 recorded 5057 estimated, 0 cached. A tool step now takes about 2.5 s longer to finish. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-03 21:14:13 +08:00
yetone 3e024957a5 provider: moved Factory, Grok, Kiro, MiMo, Qoder and WorkBuddy take the plugin versions that renew their sign-ins ahead of time through auth.refresh (owner: 把社区插件都迁移到 auth.refresh) — factory 0.1.11, grok 0.1.6, kiro 0.1.6, mimo 0.1.6, qoder 0.2.3, workbuddy 0.1.7 (plugins c64f555..319eee2, published): each gives auth.refresh with a refreshLead above its own check before a request, under the same one-refresh-at-a-time as that check, so magpie renews an account once before its requests, models and usage ask, and a refresh token is never spent twice. Kiro and WorkBuddy throw every failure plainly, as their built-ins never marked an account; the others mark a refusal signIn "expired" as their request paths already did. keepMovedCurrent updates moved users to them. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build pass; go test -tags nogui -count=1 ./... under a temp HOME passes but TestProvidersAnswerWhileListsComeIn, TestUserPath and TestClaudeSignedOut, timing tests that failed under load 11 and pass alone. 2026-10-03 12:13:18 +08:00
yetone 05bc2ffb92 provider: Cursor's plugin is kept at 0.1.8 or newer (plugins #11) — catalog entries are written as CallDynamicTool calls the model answers in, and a thinking-only turn is retried as an empty reply instead of ending the session. keepMovedCurrent updates moved users. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-03 08:45:55 +08:00
yetone e194f97731 plugins: moving a subscription onto its plugin installs the plugin's newest fixes — cursor 0.1.7 (a model Cursor runs only in Max Mode is asked again in Max Mode, glm-5.3 and glm-5.3-flash listed), qoder 0.2.2 and workbuddy 0.1.6 (each model's credit rate, which magpie shows by it since v0.1.667), zcode 0.1.7, factory 0.1.8 (Claude 5's system-role metadata in the form Factory takes) — all on npm now. go test -tags nogui ./internal/provider ./internal/plugin under a temp HOME pass. 2026-10-02 23:21:58 +08:00
yetone 64922e1810 provider: moving Devin to its plugin no longer fails over the effort variants picked before Devin's families were one model — the move's check named every pick the plugin doesn't list as one it doesn't serve, and a Devin account picked from before the fold (swe-2-high, claude-opus-5-5-medium, claude-opus-5-5-low-fast…, which the editor shows folded into SWE-2 and Claude Opus 5.5) failed with nineteen of them, "Adaptive" twice. The plugin serves those as the built-in does: the plugin host sends a model it doesn't list under its own id, and the Devin plugin passes a variant's id to Devin as it is (variantFor), as it keeps a picked variant in its list. A mover may now say the plugin serves a pick it doesn't list (served): Devin's is a variant of a model the plugin lists (devinBase strips the tier and effort words: claude-opus-5-5-low-fast → claude-opus-5-5), and Adaptive and Fusion, which the built-in never served either (Devin's API doesn't take them). A variant of a model the plugin doesn't list still stops the move. The names an unserved move gives are each named once. TestDevinMoveKeepsVariants and TestMoveToPlugin's served-variant case fail without the change. No real move was run (it would move the live Devin account). go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider/ ./internal/gui/ ./internal/plugin/ pass (provider flaked once under load, passes again). 2026-10-02 15:29:24 +08:00
yetone 618e51a447 grok: moving Grok to its plugin takes the plugin at 0.1.5 or later (goal: 插件订阅 provider 跟内置的所有逻辑都要一模一样) — a token Grok refuses before its time now reads as an expired sign-in, as one past its time does and as the built-in read it, so a move takes such an account along untried instead of failing on "Grok models: 401". @magpie-community/opencode-grok-auth 0.1.5 is on npm and installs and loads in a sandbox. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 14:14:06 +08:00
yetone 51834ba937 migrate: a move installs the plugin versions that match their built-ins (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — Command Code 0.1.6 (a Go account lists Go's models), Grok 0.1.4 (grok-4.7's reasoning levels), Qoder 0.1.4 (a refused refresh marks the sign-in), ZCode 0.1.5 (the MCP quota set aside) and Zed 0.1.6 (a model token refused while listing marks the account), all published and installed from npm in a sandbox before this. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 12:05:06 +08:00
yetone 813fdcb2e5 migrate: a moved built-in keeps its models' reasoning levels, its own account's plan and one own row, and the move checks each account through its proxy (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — Command Code's, Grok's and WorkBuddy's models their vendor gives no levels for lost the ones the built-in borrowed from their maker; moved, they borrow them again. Devin's own account moved without the plan the Devin CLI says, which the built-in showed. The agent signing in to another account while moved wrote a new own row for the built-in, which came back beside the one set aside as a second own account; nothing is written while moved, and going back keeps the one. And the move's check of an account asked the vendor directly, not through the proxy its requests take. Found walking Command Code, Grok, Devin, ZCode and WorkBuddy through sandbox moves. TestMovedKeepsEfforts, TestMovedOwnRowNotWritten, TestDevinOwnMovesWithPlan and TestPluginProxy fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 07:04:40 +08:00
yetone 475a55a702 migrate: built-ins move onto plugins that fail and mark the sign-in as they did — each mover now asks the plugin version that answers with its built-in's status and words and says through X-Magpie-Sign-In when the account's sign-in expired, stayed or renewed, in requests and usage reads alike: Command Code, Cursor, Devin, Kiro, MiMo, WorkBuddy and Zed 0.1.5, Factory and ZCode 0.1.4, Grok and Qoder 0.1.3, each published and installed from npm before this. go vet, go build -tags nogui (GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/gateway ./internal/plugin pass. 2026-10-01 06:04:01 +08:00
yetone b2bcbdc91a plugins: a moved Cursor, Devin, Command Code, Kiro or Zed fails as its built-in did — their plugins' 0.1.4 answer each error with the built-in's status and words (Zed's and Kiro's failures before the answer as a 429/401/403/402/502 rather than a 200 stream, Command Code's and Cursor's bare errors in Go's status text, Devin's without a doubled prefix), so the gateway fails over, rests and marks lapsed as it did for the built-in. A move now needs 0.1.4 of them, and a magpie serving the gateway updates one moved before. Each version was installed from npm in a sandbox. 2026-10-01 04:28:04 +08:00
yetone a170b909c9 plugins: a moved built-in's plugin comes up to date with magpie, as the built-in did — the fixes that bring each plugin in line with its built-in (plans, windows, lapsed sign-ins, refusals, bodies in bytes) are in @magpie-community's new releases, but a plugin was updated only by a click in Plugins, so an account moved before kept the old one. The magpie serving the gateway now updates, a little after it starts and every hour, the plugin of each built-in moved onto one to the version its move needs, and a move needs those versions: mimo 0.1.4, workbuddy 0.1.4, grok and qoder 0.1.2, the rest 0.1.3. One turned off, run from a folder or moved back is left alone. TestKeepMovedCurrent fails without the change. 2026-10-01 03:34:22 +08:00
yetone 566ae09db1 plugins: a moved provider's accounts keep what the built-in's had (你确保插件版的订阅 provider 和内置的一模一样了吗) — each account of a plugin provider has its own plan's models, not the first account's; a move carries each account's plan and a lapsed mark; a usage read that finds the sign-in gone marks the account and a clean one clears it, a network failure shows the last reading; a plugin that fails to load keeps its providers rather than taking them away; Kiro's API key is named and an OAuth account beside it stays off as in the built-in; Command Code Plan keeps its name. TestUnloadedPluginKeepsProviders, TestPluginUsageLapse, TestPluginAccountModels, TestMovedProviderName, TestKiroMover and the move test fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/plugin ./internal/gateway pass. 2026-10-01 03:27:47 +08:00
yetone 94ba560257 plugins: a move installs the plugin as it now matches its built-in (插件版…保持一模一样) — each mover asks for the version published with the parity fixes (WorkBuddy 0.1.3; Command Code, Cursor, Devin, Factory, Kiro, MiMo, Zed, ZCode 0.1.2), updating an older one first, so a failed sign-in says why, a CLI's own account follows its key, refusals read as the built-in's. ZCode's own sign-in on its session alone (the Start Plan) no longer stops the move: zcode-auth 0.1.2 reads ZCode's credentials anew for each request, the session ZCode renews included, so the account goes marked as ZCode's and with no expiry of its own. TestCursorPluginContext and TestMoveDevin no longer lean on the machine: the first seeds its catalog (it failed wherever models.dev's cache wasn't there), the second waits for the fake CLI however loaded the machine. TestZCodeMover fails without the change. Each package installed from npm in an empty HOME comes at the version asked. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass but for TestUserPath and TestClaudeSignedOut, 5s timeouts under the whole run's load that pass alone. 2026-10-01 02:12:43 +08:00
yetone ee5b1b7d44 plugins: a plugin's account behaves as its built-in's (the user: 插件版的订阅 provider 和内置的…保持一模一样了吗) — a plugin's failed sign-in now says why ("the sign-in failed: the sign-in page expired") instead of a bare failure; a plugin account the provider refuses with 401 is marked lapsed, "<user>'s <provider> sign-in has expired — sign in again", beside the account and on its usage card as a built-in's is, and the mark goes when it answers again or is signed in anew; a Devin or Command Code account taken from the agent's CLI moves to the plugin marked as the CLI's and back as the agent's own, so the one it follows stays the one the CLI is signed in to. TestPluginProvider (lapsed), TestMoveSideState (cli) and TestPluginSignIn (reason) fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 01:00:07 +08:00
yetone 3bec6c0e40 providers: a built-in subscription moves onto its community plugin and back, its accounts with it (the user: 慢慢下掉内置的那些 Subscription Provider…不要让用户一升级完之后,突然发现他的所有服务都不可用了) — eleven built-ins (Zed, Qoder, Factory, MiMo, Devin, Grok, Command Code Plan, Cursor, Kiro, WorkBuddy, ZCode) each get a mover to their @magpie-community package. A move installs the plugin (updated when older than the mover needs), hands it every account in the plugin's shape, checks the plugin lists models for them, and only then lets the plugin serve the same provider id, so agents' model ids don't change; any failure rolls back and the built-in keeps serving. The built-in's accounts are kept as a backup, and "Run built-in again" (magpie plugin move-back <id>) takes the plugin's current sign-ins back, never copying a rotating token: they are taken out of the plugin in one step, and an account the built-in renewed meanwhile keeps its newer token. An account only the plugin can hold (Cursor's browser sign-in) stays with it. The provider editor shows "Runs on" with the button, a failed move's reason, and the CLI has magpie plugin move / move-back. Automatic moves (Retiring) are wired in but the list stays empty until the packages are on npm. Checked with real accounts in a sandbox HOME: Command Code Plan and Devin moved, answered a chat through the gateway on the plugin, moved back and answered again on the built-in. TestMove*, TestPutBackKeepsNewer, the movers' round-trip tests and plugin-move.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit pass. 2026-09-30 21:21:58 +08:00