Commit Graph
18 Commits
Author SHA1 Message Date
yetone ab5191f8d7 provider: Zed's mover min is 0.1.18, which names each request's thread (plugins#731)
zed 0.1.18 (magpie-community/plugins@3920b745, on npm) sends thread_id
and prompt_id in CompletionBody as Zed's editor does, so a conversation
is one thread to Zed's cloud, not a new one per request. Yezike-yyy's
Gemini 4 Argon conversation read no cache on 11 requests of 180k-230k
input tokens. keepMovedCurrent brings every moved Zed user up to it.

Run (mote): go test -timeout 30m ./internal/provider/ ok; gofmt -l clean.
`npm view --prefer-online --registry https://registry.npmjs.org
@magpie-community/opencode-zed-auth version` said 0.1.18 before this.
Not tried: no Zed account, so whether Zed's cloud caches Argon on
thread_id is not known; the reporter is asked to retest.
2026-11-05 01:00:28 +08:00
yetone 07f02d0d96 provider: moved Zed users get opencode-zed-auth 0.1.17, which drops a thinking display Zed refuses (plugins#708)
Claude Code sends thinking.display "updates" for its newest models, and
Zed's cloud accepts only "omitted" or "summarized", so it answered 400.
@magpie-community/opencode-zed-auth 0.1.17 (plugins commit aa44cc3e)
sends "highlights" as summarized and drops any value Zed doesn't know.
Raising the Zed mover's min from 0.1.15 to 0.1.17 lets keepMovedCurrent
update every moved user's plugin.

Run:
- npm view --prefer-online --registry https://registry.npmjs.org
  @magpie-community/opencode-zed-auth@0.1.17 version: 0.1.17.
- mote-run -C <worktree> go test -count=1 -timeout 45m ./internal/provider/
  at f0b99745e plus this change: ok (132.9s).
- gofmt -l internal/provider/: prints nothing.
- grep: no test pins Zed's min, and no other "0.1.15" sits next to zed.

Not run: the full suite, the cross-OS vet/build (a string-literal change
in one file), and a real Zed account through the new plugin version; the
plugin's own fix was tested in the plugins repo.
2026-11-04 14:56:16 +08:00
yetone 5daba8337b provider: zed's mover min is 0.1.15, which sends Zed compaction edits only (nllay, plugins#636)
Claude Code's clear_thinking_20251015 context edit was answered 400 by
Zed's cloud ("unknown variant ..., expected `compact_20260112`"). zed
0.1.15 (plugins 48d0cec) keeps only compact_20260112 edits and leaves
context_management out when none remain. npm has 0.1.15
(npm view --prefer-online). keepMovedCurrent brings every moved Zed
user up to it.

Run on mote at b0174e761 plus this change: gofmt -l internal/provider
(clean), go vet ./internal/provider (darwin and GOOS=windows), go test
-timeout 45m ./internal/provider ok (108s).
Not tried: a real Zed account.
2026-11-02 20:19:22 +08:00
yetone ff65ebd142 provider: Zed's plugin is 0.1.14 at least: a Gemini model's efforts are keyed lowercase and its thinking level goes to Zed uppercase (plugins#215)
Zed's /models now lists a Gemini model's supported_effort_levels
uppercase (LOW/MEDIUM/HIGH), so the plugin keyed its variants LOW and
magpie's pi profile, which maps efforts by key, marked every thinking
level unsupported for zed/gemini-* (Yezike-yyy on plugins#215). And a
thinking level reached Zed lowercase, which its serde enum refuses:
400 "unknown variant `low`, expected one of `MINIMAL`, `LOW`,
`MEDIUM`, `HIGH`" (iron-water, plugins#215). zed 0.1.14
(magpie-community/plugins 3618bf9, from ump45nose's #587) keys the
variants lowercase whatever case /models uses and uppercases the level
only on the wire. The mover's min is raised to it, so keepMovedCurrent
updates every moved user.

npm view @magpie-community/opencode-zed-auth version --prefer-online:
0.1.14 at landing.

Run on mote at 59fdab0af (origin/main after rebase) plus this change: go test ./internal/provider/
-timeout 45m ok (104s); go vet ./... on darwin and GOOS=windows ok;
GOOS=linux go vet -tags nogui ./... ok (without nogui, Wails' cgo
Linux files don't build from macOS); gofmt -l clean.
Broken by hand: nothing here (a one-value change); the plugin's own
tests were broken by hand in 3618bf9.
Not tried: a real Zed account (none here) and a real move to 0.1.14.
2026-11-01 23:55:43 +08:00
yetone df03aeb351 provider: Zed's plugin is 0.1.13 at least: a Gemini request's tool-calling mode goes in lowercase (#4657)
Zed's cloud refused every tool-bearing Gemini turn of the Zed plugin with
400 "unknown variant `AUTO`, expected one of `auto`, `any`, `none`"
(atticuskk). magpie-community/plugins f4e2ac3 (zed 0.1.13, co-authored
with ggbdpq, who found the cause) lowercases the mode in the plugin,
where the request is fitted to Zed's wire; the mover's min makes every
moved user's plugin that version.

Checked: npm view @magpie-community/opencode-zed-auth@0.1.13 version
--prefer-online -> 0.1.13. Plugin run (mote): bun test in packages/zed
54 pass; the lowercase line off -> 3 red. gofmt -l clean.
Not tried: a live request to cloud.zed.dev.
2026-11-01 22:32:41 +08:00
yetone 8e9da4e832 provider: Zed's plugin is 0.1.12 at least: a string message content goes as a text block (Been on Discord)
npm view @magpie-community/opencode-zed-auth version --prefer-online: 0.1.12
at landing. The plugin's change: magpie-community/plugins 3e940bc, bun test
49 pass on mote, its new test red 2 of 2 with the change reverted.
2026-10-31 22:21:44 +08:00
yetone 4a87c4476d provider: Zed's mover min is 0.1.11, where a system message inside an Anthropic request reaches Zed as user text
Roy on Discord: Claude Code through a Zed subscription failed with "400
Zed: failed to parse Anthropic request: unknown variant system, expected
user or assistant". Claude Code puts {role: "system"} messages inside
messages[] (a turn's effort, hook notices after tool results); Zed's
cloud takes only user and assistant there. Plugin 0.1.11
(magpie-community/plugins 3d355d3) sends their text in a user turn
where it was said, and leaves an effort-only one out. Raising the min
lets keepMovedCurrent bring every moved Zed user up to it.

npm: `npm view @magpie-community/opencode-zed-auth version
--prefer-online --registry https://registry.npmjs.org` answered 0.1.11
before this change.

Run at 7dd965ed2 (origin/main, just fetched) + this change: gofmt -l
internal/provider (nothing); go vet ./internal/provider/ on darwin,
GOOS=linux -tags nogui and GOOS=windows: ok; `set -o pipefail; go test
-timeout 45m ./internal/provider/...`: ok (88.7s), 0 FAIL. The mover
guard tests (TestMovedBuiltinsSayTheirPlugin and the migrate_*_test.go
files) are in internal/provider; no test outside it names movers.
Not run: the full suite (a one-line min change).
2026-10-22 10:05:26 +08:00
yetone 41f5107b91 provider: the zed mover's min is 0.1.10, which picks the organization with a plan (plugins#232)
Zed 0.1.10 (plugins 5a83674) no longer always uses the default
organization. It picks the saved org, then the default, then a personal
org, as long as that org has a paid plan and models on, and it moves the
account once when an org answers 402. ReneXiong's default org has no plan
and the personal one has zed_student, so every request got a 402.
Raising the min lets keepMovedCurrent update every moved user.

Run at 1a3b92688 (origin/main) plus this change:
- npm view @magpie-community/opencode-zed-auth version --prefer-online: 0.1.10
- gofmt -l: clean. go vet darwin, GOOS=linux -tags nogui, GOOS=windows: clean.
- go test -timeout 45m ./...: 56 ok. The machine was at load ~500 from
  other sessions' test runs, and internal/agent, cli, davsync, gateway,
  library and provider hit the 45m timeout (#2108 is gateway's). Six named
  fails were timing under that load: TestIntentClassifierGroup,
  TestPluginPageReadsWhatItDeclared, TestSetAnswersWhileDevinAndProvidersHang,
  TestHostOnBunLackingLibsSaysWhich, TestGatewayHookMixedPiPackage and
  TestAllowancesCountFromTheReading. Each passes alone at the same head
  (gateway, gui, plugin, and provider with -run
  'TestAllowancesCountFromTheReading|Moved|Migrat|Mover|Zed').
- Not run: the timed-out packages again in full, since the load hadn't
  dropped. This change is one version string in internal/provider.
2026-10-19 07:07:33 +08:00
yetone ccb2eea159 provider: moved Zed users get plugin 0.1.9, which says why a never-read model list failed (plugins#229)
plugins 779388b published @magpie-community/opencode-zed-auth 0.1.9 at
13:45 (npm view --prefer-online: 0.1.9), but the zed mover's min stayed
0.1.8. keepMovedCurrent installs mv.min, so moved users, ReneXiong
among them, kept 0.1.8 and its six pre-sign-in models shown as the
account's own. Every other mover's min equals its npm latest (checked
all eleven).

Run at this tree: go test -timeout 30m ./internal/provider/ ok
(1022s, sandbox HOME); gofmt -l clean; GOOS=linux and GOOS=windows go
vet ./internal/provider/ clean. Not tried: a real Zed account, as the
plugin commit says.
2026-10-18 22:53:08 +08:00
yetone 53009f81a4 provider: every mover's min is the plugin that closes its gap with the built-in
Moved users are kept on these versions by keepMovedCurrent, each on npm
(npm view --prefer-online):
- devin 0.1.20: JSON output when asked; tool result images on the tool message
- commandcode 0.1.13: Credits reset at the subscription's end (#2454)
- cursor 0.2.18: a failed tool result read as isError; keychain backoff
- zed 0.1.8: "No plan" for a free account
- zcode 0.1.19: personal and team resets; Start Plan hint
- kiro 0.1.12: JSON output (output_config.format)

Run at 63be47717 with this batch: go test -tags nogui ./... -count=1 -timeout 90m, 66 packages ok, no FAIL (load ~250). gofmt -l clean; GOOS=linux and GOOS=windows go vet of provider, gateway and plugin pass. (devin's min rose after the run: go test ./internal/provider -run 'Mover|Moved' ok.)
2026-10-16 19:38: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 77c2ad12fa migrate: a move that fails leaves nothing behind and says why, and a move only goes through on an account the plugin proved works (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样 / 记得把整套迁移逻辑做得丝滑优雅精致优美简单方便易用) — a failed move left the plugin it had installed (a Plugins row saying signed out) and hidden plugin:<id> rows in logins.json, and a move checked only that the plugin loaded, so an account the vendor refused or couldn't be reached through moved as if it worked. The plugin a move installed now goes with a failed move, and with a move back when it serves nothing else; the stray rows go; the check reads each account's usage as well as its models, and an account the vendor refuses is marked and moves untried, as a lapsed one does, while one whose vendor can't be reached at all fails the move with nothing changed. A move with every account lapsed says so before installing anything. Failures carry a code (offline, install, lapsed, unserved, account) for the page to say in its language, with the models named, not their ids. A moved provider shows the built-in's API host (magpie providers showed the plugin's id), and Zed's accounts take their model list with them, so the plugin can serve it until it reads its own. TestMoveNeedsAWorkingAccount, TestMoveTidiesItsPlugin, TestMoveProvesEachAccount, TestMovedShowsBuiltinHost and TestZedMoveCarriesItsModels fail without the change. go vet, go build -tags nogui, go test -tags nogui ./... pass. 2026-10-01 11:15:23 +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 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