Commit Graph
47 Commits
Author SHA1 Message Date
yetone df31059d6e provider: WorkBuddy's mover min is 0.2.3 (a refused opening tries a comma first)
workbuddy 0.2.3 (plugins #513, MYCF711; merged as 3968cdd) sends a chat
refused as an unapproved channel (11128) once more with one more comma in
its opening, in system and assistant messages only, before the system
prompt is moved into the user message. A system prompt whose comma passed
goes with it from the next chat on, so a tool loop isn't refused on every
step. A refusal that stands names REFUSED.md before the hint.

Run: go test -timeout 45m ./internal/provider on mote, ok (142s).
0.2.3 is on registry.npmjs.org (dist-tags latest 0.2.3). The plugin was
reviewed at cb8a026: bun test in packages/workbuddy 271/271 and the root
suite merged with plugins main 3777/3777 on mote with outbound network
denied; removing the comma memory, its pre-send use, or the role filter
by hand each turned its test red.
Not tried: a live 11128 refusal against copilot.tencent.com.
2026-10-30 18:23:36 +08:00
yetone 14b004c820 provider: WorkBuddy's mover min is 0.2.2 (DeepSeek Harness's opener keeps its name)
workbuddy 0.2.2 (plugins #511, MYCF711) sends DeepSeek Harness's opener
as "You are an AI agent, powered by DeepSeek Harness.". That line passes
WorkBuddy's whole-line 11128 check and keeps the harness's name. Since
0.1.27 the plugin had put a neutral line in its place, which took the
name out.

Run: go test -timeout 45m ./internal/provider on mote, ok (168s).
0.2.2 is on registry.npmjs.org (dist-tags latest 0.2.2). The plugin was
reviewed at 4830b16: bun test 257/257 on mote, and with the old
rewording put back by hand the unflag tests went red. A live request to
workbuddy-ai/deepseek-v4.1-flash with the comma line came back 200.
Not tried: the China WorkBuddy site, because the review account's
sign-in answers 401 there.
2026-10-30 14:37:30 +08:00
yetone d19afb4c9b provider: WorkBuddy's plugin min is 0.2.1, an enterprise (教育公益版) sign-in kept beside the personal one
0.2.1 (plugins b9cbb9d) names an enterprise account's sign-in
"nickname · enterprise", so signing in to 「WorkBuddy 教育公益版」 or a team
no longer replaces the same person's personal account (jwaitq on Discord).
npm view --prefer-online: 0.2.1.

Run at 4a4a90c23 + this change (mote): go test -timeout 45m
./internal/provider/ ok (124s); gofmt -l clean.
Not tried: a real education account.
2026-10-30 11:09:23 +08:00
yetone 17114b505d provider: WorkBuddy's mover min is 0.2.0, the China build's daily check-in (plugins #177, #299)
workbuddy 0.2.0 claims a WorkBuddy (China) account's daily check-in
through the billing meter; an API-key account reports itself ineligible
instead of failing and being tried again every 30 minutes (magpie's
CheckinIneligible). 0.1.48 shows WorkBuddy AI's free model daily token
window on its card, read from magpie's usage ledger. keepMovedCurrent
updates every moved user's plugin from 0.1.47 to 0.2.0.

Saved accounts: read packages/workbuddy from 0.1.27 to 0.2.0 in a fresh
clone of magpie-community/plugins. The provider ids stay workbuddy and
workbuddy-ai, and an oauth account is still read from access, refresh,
expires, uid, domain and enterpriseId. API-key accounts ({type: "api"},
0.1.37) are an addition. Nothing a moved user saved is renamed.

npm view @magpie-community/opencode-workbuddy-auth version --prefer-online
says 0.2.0 at landing (the publish run is red only for think-tags,
plugins#180; the registry has 0.2.0 as latest).

Run (mote-run, at this tree): gofmt -l internal/provider (clean);
go vet ./... on darwin, GOOS=linux -tags nogui, GOOS=windows (ok);
go test -tags nogui ./internal/provider -timeout 45m (ok, 87.8s).
Not tried: a real WorkBuddy account's check-in through magpie.
2026-10-29 21:57:21 +08:00
yetone 96e8730e99 provider: WorkBuddy's mover min is 0.1.47, a conversation's ids one account's own
leaves5760 on Discord: every account in a group of WorkBuddy AI accounts gets
403 "request illegal" and is restricted for abnormal behaviour. The plugin
derived X-Conversation-ID and X-Conversation-Request-ID from the session
and turn alone, so one session spread over the group's accounts sent the
same ids under every account's X-User-Id. WorkBuddy's own client (5.9.3,
CLI 2.165.0) is signed in as one account and never does that. 0.1.47
(plugins 1e7122e) hashes the account into both ids, and re-derives them
when a 401's retry goes as another account. A divergence from the
official client, not shown to be the cause of the restrictions.

npm view @magpie-community/opencode-workbuddy-auth version --prefer-online:
0.1.47.
Run at this head (parent c201fe226): go test -timeout 45m ./internal/provider
on mote: ok; gofmt -l clean. The plugin's record (209 pass, the two new
tests red with the account left out) is in plugins 1e7122e.
Not tried: a real WorkBuddy chat through the plugin host.
2026-10-29 16:16:27 +08:00
yetone c1660481ce provider: WorkBuddy's mover min is 0.1.46, WorkBuddy AI's current client headers
Two Discord users report WorkBuddy AI accounts answering 403 11140 (the
vendor's "account restricted due to unusual activity"). The plugin was
sending WorkBuddy AI's chats as WorkBuddy AI 5.8.4 (CLI 2.161.0, no
X-Agent-Runtime) while its update feed has served 5.9.3.42398134 (CLI
2.165.0, the China build's CLI byte for byte) since 10-27. 0.1.46
(plugins b08a6c1) sends WorkBuddy/5.9.3 workbuddy-ai/5.9.3 CLI/2.165.0,
X-IDE-Version 5.9.3 and X-Agent-Runtime local-agent. Not shown to be the
cause of the restrictions; it is a header that no longer matched.

npm view @magpie-community/opencode-workbuddy-auth version --prefer-online:
0.1.46.
Run at this head (parent e61e10535): go test -timeout 45m ./internal/provider
on mote: ok; gofmt -l clean. The plugin's record (207 pass, 2 red on
0.1.45's index.mjs) is in plugins b08a6c1.
Not tried: a real WorkBuddy AI chat through the plugin host.
2026-10-29 13:54:50 +08:00
yetone b692de9c89 provider: WorkBuddy's mover min is 0.1.45, so magpie's drawings through WorkBuddy work again
iwinux on Discord (10-28 ~22:30 UTC+8, magpie v0.1.1812): the Magpie Image
MCP through WorkBuddy AI answered
  400 Bad Request: Unmarshal create image params failed with error:
  invalid character '\x1f' looking for beginning of value (11101)
from the minute plugin 0.1.43 was published (14:30Z). 0.1.43 gzipped every
non-Messages body its fetch sent, and drawWorkBuddy's JSON to
/v2/images/generations and /v2/images/edits goes through that fetch; the
images API reads plain JSON only ('\x1f' is gzip's first byte). magpie
passes the JSON through unchanged. 0.1.45 (plugins 880cd93) gzips only a
chat completion, and gives only a chat the model's default effort.

npm view @magpie-community/opencode-workbuddy-auth version --prefer-online:
0.1.45.
Run at this head (parent 87a983423): go test -timeout 45m ./internal/provider
on mote: ok; gofmt -l clean. The plugin's own record (red on 0.1.44 with
the reporter's message, 207 pass on 0.1.45) is in plugins 880cd93.
Not tried: a real WorkBuddy drawing through the plugin host.
2026-10-29 00:41:49 +08:00
yetone 5bfd76cd83 provider: WorkBuddy's mover min is 0.1.44 (plugins #461)
0.1.44 (plugins 95fa761) hashes a huge chat's conversation and turn ids
from its pieces instead of joining the whole user message into new
strings, and reads the one parse for "Free models only" and for a model
that wants a reply after tools. On the issue's 45 MiB repro on mote (4
requests, Bun 1.4.2) the peak goes from 717-760 MiB (0.1.43) to 583 MiB,
one request 390 to 275 MiB; every byte sent is held to 0.1.43's by the
plugin's sent.test.mjs.

npm view @magpie-community/opencode-workbuddy-auth version
--prefer-online: 0.1.44.
Run at this head (parent 89f3865ef): go test -timeout 45m
./internal/provider on mote: ok; gofmt -l clean.
Not tried: a live WorkBuddy request through the plugin host.
2026-10-28 23:35:48 +08:00
yetone 36d1541c6e provider: WorkBuddy's mover min is 0.1.43, the default effort and gzipped chats
troilus1011 on X: WorkBuddy's DeepSeek in OpenCode thought only at low or
high. OpenCode's default names no reasoning_effort and WorkBuddy doesn't
think without one (0 reasoning tokens, measured on www.workbuddy.ai);
WorkBuddy's client sends the model's reasoning.defaultEffort ("high").
workbuddy 0.1.43 (plugins f4d48ac) sends that default when a chat names
none; a named effort, none too, goes as it came.

runmiNeverstop on X: 2.89 GB up to copilot.tencent.com. WorkBuddy's client
gzips model-request bodies (RequestBodyGzip in both builds' product.json);
the plugin sent plain JSON. 0.1.43 gzips chat-completions bodies on both
builds.

keepMovedCurrent brings every moved user to 0.1.43.

Run (on mote, at this tree): go vet ./internal/provider, go test
-timeout 45m ./internal/provider: ok. npm view
@magpie-community/opencode-workbuddy-auth@0.1.43 --prefer-online: 0.1.43
(latest). The plugin's own record (197 pass, broken by hand, live runs on
www.workbuddy.ai) is in plugins f4d48ac.
Not tried: a live chat on the China build (401 to every token here), the
reporters' own OpenCode sessions, a moved account updated end to end.
2026-10-28 22:34:02 +08:00
yetone 48ae0884b6 provider: WorkBuddy's mover min is 0.1.42, a chat parsed once (plugins#461)
workbuddy 0.1.42 parses a chat once on its way to WorkBuddy instead of
once a step (system, tools, tool_choice, headers, model, system key),
and sends the bytes it got when nothing changed them. On jihuayu's
45 MiB chat that is 7 parses down to 2 and the plugin host's peak RSS
from about 1 GB to about 680 MiB, with the bytes sent the same
(plugins f2b0dac, its oneparse.test.mjs). keepMovedCurrent brings every
moved user up to it.

Run at this head (efb55b5c9 + this), on mote:
  go vet ./internal/provider/ (darwin, linux, windows): ok
  go test -timeout 45m ./internal/provider/ -run 'Moved|Mover|WorkBuddy|Plugin': ok 14.7s
npm view --prefer-online: 0.1.42 before the push.
Real account: the plugin's loader on a WorkBuddy AI account returned
200 with 0.1.42's code (plugins f2b0dac's record).

Reported-by: jihuayu (plugins#461, #4004)
2026-10-28 18:48:10 +08:00
yetone 014bac1596 workbuddy: the mover's min is 0.1.41, a prepaid wallet as a balance (plugins #450)
workbuddy 0.1.41 (plugins #450, MYCF711) sends a package with no cycle
total as a "Prepaid credits" balance window (#3950). npm view
--prefer-online showed 0.1.41 before this change.

Run on mote at this tree: gofmt -l internal/provider (clean), go vet
./internal/provider, go test -tags nogui -run 'Mover|Moved|Migrat|
WorkBuddy|Min' ./internal/provider ok. Not run: the full suite (a
one-line version string).
2026-10-28 10:32:55 +08:00
yetone 74dcf40aac provider: WorkBuddy's mover asks plugin 0.1.40, which sends the current desktop client's headers
WorkBuddy accounts used through magpie are being restricted, and a report
on X says WorkBuddy changed how it checks request-header fingerprints.
The plugin sent WorkBuddy/5.5.6 as its User-Agent and IDE version. Each
build's current desktop app (China 5.9.3 with CLI 2.165.0, WorkBuddy AI
5.8.4 with CLI 2.161.0, read from their update feeds, never run) sends
"WorkBuddy/<app> <appName>/<app> CLI/<cli>", the app's version as
X-IDE-Version, X-Agent-Type on both builds, X-Agent-Runtime: local-agent
on 5.9, and the OpenAI SDK's X-Stainless-* headers. Plugin 0.1.40
(magpie-community/plugins b2fe48e) sends them; npm view --prefer-online
gives 0.1.40. keepMovedCurrent brings every moved user up to it.

Run at a42d90d7d plus this change, on mote:
go test ./internal/provider/ -count=1 -timeout 45m: crashes in
TestUnreadLoginsWriteErrorsKeepCredentials (filememo synctest close,
#3632, open). With that test skipped, three fetch tests fail
(TestFetchAsksOneListOnceForTwoBasesOfIt,
TestFetchUnionsProtocolListsWithoutChat, TestFetchAsksASharedBaseOnce);
they fail the same with this change stashed at a42d90d7d (#3854, open).
gofmt -l clean; GOOS=linux go vet ./internal/provider clean.
Not tried: a real WorkBuddy account's chat with plugin 0.1.40, and the
full go test ./... suite.
2026-10-28 03:31:14 +08:00
yetone b103ed0582 provider: WorkBuddy's plugin min is 0.1.39, whose history keeps an earlier turn's thinking
uk.jent on Discord: through WorkBuddy, Grok Build's chat.completions
history lost its thinking. magpie's gateway and the plugin pass an
assistant message's reasoning_content on byte for byte (checked with a
scratch gateway test posting Grok Build 1.0.67's literal second request
to a fake plugin upstream); WorkBuddy itself drops reasoning_content,
and its own client sends `reasoning`. Plugin 0.1.39
(magpie-community/plugins 7f99447) sends it that way.
keepMovedCurrent brings every moved WorkBuddy user up to it.

Run: npm view --prefer-online shows 0.1.39. internal/provider:
gofmt -l clean; go vet for darwin, windows and linux; the mover tests
(-run 'Mover|Moved|Migrat|Plugin|WorkBuddy|Min') ok; the whole package
with -skip TestUnreadLoginsWriteErrorsKeepCredentials (crashes, #3632)
red only on TestFetchAsksASharedBaseOnce and its two siblings, #3854,
red on main before this change.
Broken by hand: the plugin's new test, red on its old index.mjs (see
the plugins commit). Nothing here to break: a one-line min.
Not tried: the China build (copilot.tencent.com) live; Grok Build end
to end through WorkBuddy.
2026-10-27 23:41:57 +08:00
yetone 9bfe680481 plugin: a changed plugin option lists the providers again (plugins#430)
WorkBuddy's plugin 0.1.38 adds a "Free models only" switch (a plugin option)
that lists only WorkBuddy's free models and refuses any other before it is
sent. Its list goes by the switch, but SetProviderOptions only handed the
values over: the host cleared its infos while Go kept provCache, so the
Providers page and /v1/models showed the old list until something else
re-read it. SetProviderOptions now forgets the kept providers (whether the
host runs or not), so the next Cached() lists them again. Nothing else runs
on a change. The workbuddy mover's min is 0.1.38 (npm view --prefer-online
at landing: 0.1.38).

Run:
- go test ./internal/plugin ./internal/provider -count=1 -timeout 45m at
  this head (5a3292354 + this): internal/plugin ok (389s); internal/provider
  FAIL on TestUnreadLoginsWriteErrorsKeepCredentials, "close of synctest
  channel from outside bubble" in filememo.Forget, which is #3632 (open, on
  main since 091153bf, nothing here touches it). TestPluginOptions now lists
  a model only while its option is on, and only base-model after it is off.
- Rebased onto 3aead9c62 after the run; its new commits touch only
  internal/provider/codex_daemon*.go and codex_app_server_test.go. go vet
  ./internal/plugin ./internal/provider ok there; a rebuild to test again
  failed to link for a full disk (291MB free).
- gofmt -l clean; GOOS=linux and GOOS=windows go vet ./internal/plugin
  ./internal/provider ok.
- Real accounts, sandbox HOME, dev build of this tree on 3516/3517 with the
  plugin added by path: POST /api/settings/plugin-option free_only on for
  workbuddy-ai took its list from 26 to 2 (hy3, deepseek-v4.1-flash) within
  2s with no restart; workbuddy kept 19. gpt-5.4 got the plugin's 404 and
  was not sent; hy3 and deepseek-v4.1-flash answered. Off: 26 again, and
  gpt-6-luna and gpt-5.4 answered.
Broken by hand: without forgetProviders in SetProviderOptions,
TestPluginOptions fails ("with beta on, optco lists "base-model"").
Not tried: the switch clicked in the GUI window (the API it calls was);
Windows and Linux apps.
2026-10-27 17:44:02 +08:00
yetone 1c91478b04 provider: WorkBuddy's plugin is at least 0.1.37, it signs in with an API key (plugins #407)
opencode-workbuddy-auth 0.1.37 (plugins 4bde462) adds an API-key sign-in
for both builds: the key from the site's profile/keys page is sent as
X-API-Key and Bearer, as CodeBuddy Code 2.177.0 sends CODEBUDDY_API_KEY.
npm view --prefer-online: 0.1.37. Raising the mover's min makes
keepMovedCurrent update every moved user.

Run at this head: go test ./internal/provider/ with -skip
TestUnreadLoginsWriteErrorsKeepCredentials ok (that test crashes on main,
#3632); gofmt clean.
Not tried: a real WorkBuddy API key.
2026-10-27 04:50:06 +08:00
yetone 68294c2dbb provider: WorkBuddy's mover min is 0.1.35, its used credits saying when the plan's cycle starts again (windy on Discord)
opencode-workbuddy-auth 0.1.35 (magpie-community/plugins 9da5cd3) gives
the Credits window the reset and span of the plan's current cycle, from
the package SubscriptionPackageCode names, as WorkBuddy 5.5.6's client
does. Without it the card showed 46% used beside "Not used yet".
keepMovedCurrent brings every moved user up to it.

Run (macOS, sandbox HOME, at ef0a03e13 + cabef3a4c + this):
- npm view @magpie-community/opencode-workbuddy-auth@0.1.35 version
  --prefer-online: 0.1.35.
- go test ./internal/provider -run 'Mov|Migrat|WorkBuddy|Workbuddy|Plugin|
  Retir|Adopt|HandOver': ok, 130 tests pass. gofmt -l: clean.
- go test ./internal/provider (whole package): crashes in
  TestUnreadLoginsWriteErrorsKeepCredentials with "close of synctest
  channel from outside bubble"; it crashes the same without this change
  (#3632).
- The plugin itself, against the real WorkBuddy AI account read-only:
  Credits 89.2 / 2000, resetsAt 2026-10-28T16:40:52Z, span 2591999.

Not tried: a China-site (copilot.tencent.com) account, whose desktop
token here answers 401; a real move in magpie.
2026-10-26 15:28:10 +08:00
yetone a30aed0162 provider: the WorkBuddy mover tells two accounts of one nickname apart by uid
wakkana on Discord: WorkBuddy accounts with one display name collapse
into one, deduped by name (wbWho's nickname, addSideLogin's EqualFold).

Where that runs today: WorkBuddy's built-in sign-in is gone, so
addSideLogin no longer writes WorkBuddy accounts. A sign-in through the
plugin goes to the plugin host, whose settle already keeps two accounts
of one name with different uids apart and lets the same uid replace
itself (#413, TestPluginSameNameOtherUID, passes at this head). What was
left by name is the mover, for accounts not moved yet:
- wbLogins dropped WorkBuddy desktop's account when an account magpie
  signed in had the same nickname, whatever its uid (the generic "one of
  magpie's stands for the agent's own" rule). Now it stands for it only
  when the uid matches; one removed in magpie stays out.
- renewedSince matched by name, so the desktop's marker read as the
  other "Me" renewed and the move would never commit. Moving and
  movedAccount carry the vendor's id (WorkBuddy's uid), matched by it
  where both have one; the agent's own is never compared; putBack skips
  by plugin key, not name.
Other movers have no id set, so they match by name as before; their
built-ins name accounts by email or login. The live addSideLogin callers
(Copilot, Google, ChatGPT API) name accounts by login or email too.
Sibling plugin: zcode 0.1.29 (plugins 5c9b7a4) now gives a uid, its
min is raised in a separate commit.

Run on origin/main 1dfa28484 plus this change; rebased onto 180cfb565,
whose two commits touch only internal/redact and the GUI:
go test -timeout 45m -count=1 ./internal/provider ./internal/plugin: ok.
GOOS=linux and GOOS=windows go vet ./internal/provider, gofmt -l: clean.
Broken by hand: TestWorkBuddyMoverSameNameOtherUID is red with
workbuddy.go from HEAD (one account moved) and, separately, with
same() by name only (the other account read as renewed).
Not tried: a real move with two same-name WorkBuddy accounts. Accounts
the old built-in already collapsed are gone; nothing brings them back.
Not run: the whole suite.
2026-10-25 17:42:37 +08:00
yetone 492847818b provider: moved ZCode, Cursor, WorkBuddy and Qoder users get the plugins' latest fixes
Mover mins raised to the versions npm has at landing (npm view
--prefer-online): zcode 0.1.28 (plugins #369, #379), cursor 0.2.22
(#377), workbuddy/workbuddy-ai 0.1.34 (#337, #378, #346), qoder/qoder-cn
0.2.36 (#323, #378, QwenWork #319). keepMovedCurrent updates every moved
user's plugin to them.

Run: go test ./internal/provider/ ok (152s); gofmt -l clean.
Not tried: a real move or upgrade on a real account; the plugin fixes
themselves were reviewed and tested in the plugins repo, not against
the vendors' APIs.
2026-10-25 15:47:26 +08:00
yetone 3b10a403d1 provider: WorkBuddy's mover asks for plugin 0.1.31, which renews a 401 once and says to sign in again
wenchen855443 on X reported that WorkBuddy requests return 401.
Plugin 0.1.31 (magpie-community/plugins f658842) handles a 401 on a
chat or a usage read like this:
- It renews the sign-in once, whatever the token's time, and sends the
  request once more. A token another process saved since is used
  first; a desktop sign-in re-reads the app's file instead of renewing.
- If there is no new token, or the retry is refused too, it answers 401
  with a message to sign in again: Providers → WorkBuddy → this
  account's Sign in again.
- It sends X-Magpie-Sign-In: expired only on WorkBuddy's word that the
  sign-in is gone: the refresh token was refused, or the token got
  invalid_token with nothing to renew it with.

Only the min changes. keepMovedCurrent brings every moved user's plugin
up to it.

The min is the version npm has at landing: npm view
@magpie-community/opencode-workbuddy-auth version --prefer-online gives
0.1.31. The publish run (39967751526) is red only for think-tags' known
E404 (plugins#180); its log shows + ...workbuddy-auth@0.1.31.

Run (rebased on origin/main, run again after the rebase):
- go test ./internal/provider/ -run
  'Mover|Moved|Min|Migrat|Move|WorkBuddy|Retir|Plugin' -count=1, with
  a scratch HOME: ok.
- gofmt -l internal/provider: clean.
- GOOS=linux and GOOS=windows go vet ./internal/provider/: ok.

Not tried: the full suite. The change is one string on the min line,
and the mover and plugin guards above cover it.
2026-10-23 22:19:19 +08:00
yetone c4a5e61530 provider: WorkBuddy's mover min is 0.1.30 (plugins #291)
0.1.30 rewords the line tearslee measured WorkBuddy refusing (11128)
in an assistant message, which the 0.1.29 move of the system prompt
can't reach, so a long DeepSeek Harness chat isn't refused for good.
npm view --prefer-online --registry https://registry.npmjs.org says
0.1.30 at landing.

Run at f81913994 plus this change: gofmt; go vet (darwin, linux, windows,
-tags nogui) ./internal/provider; go test -tags nogui ./internal/provider ok.
Not run: the full suite; a one-line min with no code path change.
2026-10-23 09:38:51 +08:00
yetone d771138c41 provider: WorkBuddy's mover min is 0.1.29, which sends a refused system prompt again as the user's instructions
Wing on Discord (10-21) got 400 11128 "Illegal API invocation from an
unapproved channel" from WorkBuddy with an agent whose lines the plugin
didn't reword. WorkBuddy checks only system and assistant messages, against
lines it knows. Since 0.1.29 (magpie-community/plugins af360a5), a chat it
refuses that way is sent once more with its system prompt moved into the
first user message, inside <instructions> tags, and WorkBuddy's default
system prompt in its place. The refusal still rests no account, as since
2033df0f. The comment also records 0.1.28, which wasn't noted when it was
published.

npm view @magpie-community/opencode-workbuddy-auth version --prefer-online
--registry https://registry.npmjs.org: 0.1.29 (dist-tags latest 0.1.29).
publish.yml run 39584806291 published it ("+ ...workbuddy-auth@0.1.29").
The run is red only for think-tags' known E404 (plugins#180).

Run at e68a0b1db plus this change:
- gofmt -l internal/provider: empty. go vet ./internal/provider on darwin,
  GOOS=linux -tags nogui and GOOS=windows: ok. go build ./...: ok.
- go test -timeout 45m -count=1 ./internal/provider: ok (207s). The first
  try failed on "no space left on device" while another session's
  `go test ./...` and four other suites ran at load ~145. After space came
  back (42G), it passed.
- The full suite wasn't run: another session's `go test ./... -timeout
  100m` was running, and only one suite runs on a machine at a time. The
  change is the min string and its comment.

The plugin's real runs (both builds, OpenCode 2.0.25 and omp 18.9.1 with
tool calls) are in af360a5's body.
2026-10-21 18:47:24 +08:00
yetone 59d2815f38 workbuddy: moved users get plugin 0.1.27: efforts for a model that says only supportsReasoning, and DeepSeek Harness not refused as 11128
0.1.26 (plugins 68170b3): a model whose config gives supportsReasoning
and a default effort but no effort list lists low, high, max and that
default, instead of being marked as not reasoning (8 models in #255).
0.1.27 (plugins 6fd976a): DeepSeek Harness opens its system prompt with
"You are an AI agent powered by DeepSeek Harness.", which WorkBuddy
refuses as "Illegal API invocation from an unapproved channel" (11128);
the plugin rewords that one line to a neutral one (plugins #279, #280).
npm view @magpie-community/opencode-workbuddy-auth@0.1.27 version
--prefer-online printed 0.1.27 before the raise.

Run: gofmt -l (none); go vet ./... on darwin, GOOS=linux -tags nogui and
GOOS=windows: clean. `set -o pipefail; go test -timeout 45m ./...` at
1ebda9026 (this batch on 318697dce, movers then at qoder 0.2.21,
workbuddy 0.1.26, no devin raise): 65 packages ok, exit 0. Rebased onto
a9304efe0 (codex images, codex list tag, sessions decoders): gofmt, the
three vets and go test of internal/gateway, internal/provider,
internal/plugin and internal/sessions ok. Then the mover mins were raised
to qoder 0.2.23, workbuddy 0.1.27 and devin 0.1.21 (the only change
since, three strings): gofmt, the three vets of internal/provider and
go test ./internal/provider/ ok at the head of this batch.
2026-10-21 01:11:05 +08:00
yetone 47eb42f1a1 workbuddy: moved users get plugin 0.1.25, where WorkBuddy AI's "x0.34 credits" rates are read, not unknown (magpie-community/plugins#216)
WorkBuddy AI's /v3/config gives fast-model, balanced-model and
primary-model their credits as "x0.34 credits", "x0.59 credits" and
"x3.31 credits" (read live from the owner's account on 2026-10-19). Plugin
0.1.24 read those as unknown, so the three showed no rate. 0.1.25
(plugins c89cee5, bump ab38da6) strips a trailing "credits" unit only;
empty, negative, non-finite or other trailing text stays unknown. npm view
@magpie-community/opencode-workbuddy-auth version --prefer-online: 0.1.25.
The retired built-in has no wbCredits any more, so there is nothing to
mirror here.

Run on origin/main 1a3b92688 + this change, go1.26.8, load average ~420
from other sessions throughout:
- gofmt -l: nothing. go vet ./... ok; GOOS=linux go vet -tags nogui ./...
  ok; GOOS=windows go vet ./... ok. go build, GOOS=linux go build -tags
  nogui, GOOS=windows go build ok.
- set -o pipefail; go test -timeout 45m ./...: 60 packages ok, 4 FAIL, all
  load and all in packages this doesn't touch. internal/provider, the one
  it does, ok (1841s).
  - internal/agent: 45m timeout, TestClaudeTierPickedAsTheMainModelStays
    23s in (#2544, #2723).
  - internal/gateway: 45m timeout, TestReplyNamesMember 1m7s in (#2870,
    filed now).
  - internal/library: 45m timeout (#2853).
  - internal/gui: TestSetAnswersWhileDevinAndProvidersHang, a set took
    18.2s (#1375). Rerun alone -count=3: ok.
2026-10-19 07:53:47 +08:00
yetone afa5a50dce workbuddy: moved users get plugin 0.1.24, where a refused sign-in on a chat over 2 MiB says the 401 and to sign in again instead of 502 ECONNRESET (wyp on Discord)
wyp's WorkBuddy AI chats worked for a while, then every turn failed with
"502 WorkBuddy AI: ECONNRESET: The socket connection was closed
unexpectedly". Measured against the real endpoint from a sandbox HOME:
WorkBuddy's front door (www.workbuddy.ai and copilot.tencent.com) answers
a token it refuses with 401 only for a body up to 2097152 bytes. From
2097153 bytes on, it resets the connection without replying. So once a long
session is past 2 MiB and the sign-in is refused, every turn is a reset,
and Claude Code's "server-side issue, usually temporary" is wrong here.
Keep-alive reuse was ruled out: the server closes an idle connection with a
FIN at 60s, and Bun opens a new connection at 59.99s and 59.995s.

The fix is in the plugin (magpie-community/plugins 9a4ec86, npm 0.1.24).
When a chat over 2 MiB fails with no reply, it asks the meter once. On a
401 it returns that 401 with the remedy, kept as the plugin's other 401s
are. The chat is never sent again. This commit raises the mover's min so
keepMovedCurrent brings moved users to 0.1.24. The note also records
0.1.23 (plugins #138), which the min had skipped.

Run: gofmt -l on the file: clean. Plugin: bun test packages/workbuddy, 97
pass. Broken by hand (the new path rethrows at once), 3 of the 5 new
socket-fake tests go red. npm view --prefer-online shows 0.1.24.
Not run: go vet (darwin/linux/windows, -tags nogui) and go test, because
the disk had 0-1 GB free (df -g /), below the 3 GB floor. The change is
the one min string and its comment. Not run either: magpie's gateway end
to end with 0.1.24.

Full suite: SUITE_LINE
2026-10-15 23:08:03 +08:00
yetone fb159a503a provider: moved WorkBuddy users get plugin 0.1.23, where used-up credits leave the free models routable (plugins #138, hheei)
hheei's WorkBuddy account reached 560 / 560 credits. The plugin's credits
window covered every model, so magpie ranked the account spent, and last,
for deepseek-v4.1-flash too, which costs nothing. Plugin 0.1.23
(magpie-community/plugins ec8ae09) gives that window notModels = the
models the account's own config lists as free (x0.00, or free at night).
magpie already scopes a window by models/notModels (quotaOfPlugin ->
Limit.matches). This raises the mover's min, so keepMovedCurrent updates
moved users to 0.1.23.

Ran in the plugin repo: bun test (92 pass), and the 2 new usage tests
went red with spareFree taken out by hand. `npm view
@magpie-community/opencode-workbuddy-auth version --prefer-online` shows
0.1.23. Not tried against a real account at 100% credits.
Ran (on origin/main 01c41e8ba): go test -p 1 -tags nogui ./internal/provider ok; go vet -tags nogui GOOS=darwin/linux/windows ok.
Full suite: SUITE_LINE
2026-10-15 23:08:02 +08:00
yetone 2c18c697c2 provider: moved WorkBuddy users get plugin 0.1.22, so an MCP server's tools reach Kimi, not 400 11133 (magpie-community/plugins#122, clearmann)
The mover's min, so keepMovedCurrent updates every moved user's plugin.
workbuddy 0.1.22 (plugins a6bed5e): Kimi (kimi-k3-1, kimi-k2.7) and
DeepSeek turn away tool schemas MCP servers commonly send (an enum with
no type or of several types, an empty enum, true/false where a schema
goes, a required that isn't a list, an unknown type) with 400 11133 /
11129. It is the request's content, not the account. The plugin now
gives each the shape these models take, meaning the same. Tried on the
owner's real account: each refused shape 400 before, 200 after.

On npm: npm view @magpie-community/opencode-workbuddy-auth version is
0.1.22 (tarball holds fitShape).

Run: gofmt -l, go vet ./internal/provider for darwin, GOOS=linux -tags
nogui and GOOS=windows, go test ./internal/provider (ok, 439s). Not
tried: a moved user's update in a running magpie.
2026-10-14 21:47:24 +08:00
yetone bd4cb7a260 provider: moved Kiro, WorkBuddy and Factory users get plugins 0.1.11, 0.1.21 and 0.1.27 (magpie-community/plugins#120, #121, #119)
The movers' min, so keepMovedCurrent updates every moved user's plugin:
- kiro 0.1.11: a thinking model offers xhigh as its own level (50k
  budget), so Claude Code's xhigh isn't routed as max (plugins#120).
- workbuddy 0.1.21: a model free only at night (Hy4 preview, 23:00-08:00)
  is never said free, and a whole-day discount shows the price before it,
  from WorkBuddy's modelPromotions (plugins#121).
- factory 0.1.27: droid's Fast Mode models (Opus 5.5/5/4.8, GPT-5.5/5.4/
  5.3-Codex), and fast asked of a base model sent to its Fast Mode model
  (plugins#119).

All three are on npm (npm view: 0.1.11, 0.1.21, 0.1.27).

Run: gofmt -l, go vet ./internal/provider for darwin, GOOS=linux -tags
nogui and GOOS=windows, go test ./internal/provider (ok, 449s under load
~280). Not tried: a moved user's update in a running magpie.
2026-10-14 18:18:57 +08:00
yetone d4a9cb5cb0 provider: moved WorkBuddy users get plugin 0.1.20, so Claude Code's tool results reach WorkBuddy AI's gemini-3.8-flash (magpie-community/plugins#113)
0.1.20 (plugins a4f8178) resends a chat that gemini-3.8-flash refused
with 11153 "the conversation must end with a user message". The resend
puts an empty assistant message between the tool results and the
user's message. a4f8178's body records the test on the owner's real
WorkBuddy AI account. npm view shows 0.1.20 published.

Ran: gofmt -l; go vet on darwin, GOOS=linux (nogui) and GOOS=windows
for internal/provider; go test -tags nogui -run
'Mov|Migrat|Plugin|Keep|WorkBuddy|WB' ./internal/provider, ok.
Not tried: a moved user's live update to 0.1.20 through keepMovedCurrent.
2026-10-14 15:37:31 +08:00
yetone 7565d93c8b provider: an enterprise WorkBuddy account's card shows its credits, from the enterprise meter WorkBuddy's usage page reads (#1904, CnsMaple)
An enterprise seat's /billing/meter/get-user-resource-summary answers with
no packages, so the card showed no quota. WorkBuddy's own usage page reads
/billing/meter/get-enterprise-user-usage (credit / limitNum, with the cycle's
start and reset in Beijing time). When the summary gives no credits, wbQuota
now asks that meter and shows a Credits window ("196.13 / 2000", resetting at
cycleResetTime). A personal account's refusal there (400 10001 "uid or
enterpriseID is empty", seen on a real WorkBuddy AI Pro account on
2026-10-13) is ignored and the card stays as before. A paid account with
packages never asks it.

Moved users get the same from @magpie-community/opencode-workbuddy-auth
0.1.19 (plugins 169e4e6, on npm); the mover's min is raised to 0.1.19.

Run: workbuddy_enterprise_test.go, built from the reporter's literal
response bytes. TestWorkBuddyEnterpriseCredits and
TestWorkBuddyPersonalNotEnterprise pass, and both fail with the fallback
taken out. go test -run TestWorkBuddy ./internal/provider passes. Not tried
with a real enterprise account; "credit" is read as used, which the
reporter is asked to confirm.

Also run, rebased on e1b70c13d: go test -tags nogui ./internal/provider
(the whole package, 430s) and go test ./internal/gateway -run WorkBuddy
pass under a sandbox HOME; gofmt clean; go vet for darwin, linux and
windows (-tags nogui) pass. The reporter's follow-up (04:27Z) saw
"Credits 218.67 / 2000" on the same enterprise account after reinstalling,
while get-user-resource-summary still answered empty Packages: the
reinstall installed the plugin's 0.1.19, which carries this fallback.
2026-10-13 13:00:04 +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 091593f7d3 gateway, gui: a WorkBuddy account the vendor restricted (403 11140) rests 2 hours as restricted, and Routing names the appeal as the way back (#1849)
WorkBuddy answers an account it restricted for unusual activity with
403 {"code":11140,"msg":"request illegal","displayMsg":{"en":"Your
account has been restricted due to unusual activity",...}}. failure()
read it as an unknown failure, so the account rested 1-10 minutes and
was asked again, refused, all day.

What changed:
- provider: WBRestricted knows the refusal by code 11140 (top level,
  data or error; number or string; whole, so 111400 isn't it) or by its
  displayMsg words. wbExplain ends the built-in's error with
  WBRestrictedHint.
- gateway: a new failRestricted ("restricted") rests restrictedRest, 2h:
  one refused request per account per 2h, and a lifted restriction (or a
  misread refusal) comes back the same afternoon; Unrest lifts it at
  once. It is read from the hint in the error (restrictedSaid; both the
  built-in and the plugin translate the vendor's body before failure()
  sees it, so the raw JSON never reaches it in a chat try), or from the
  raw body only for a WorkBuddy candidate (restrictedRefused,
  isWorkBuddy), since another vendor's 11140 is its own. Bare "request
  illegal" is not matched. 11128 stays promptRefused and rests nobody.
  The stale-allowance shortcut skips it, as it does model refusals.
  drawsWorkBuddy now uses isWorkBuddy.
- plugin: @magpie-community/opencode-workbuddy-auth 0.1.17 (plugins
  caf3908) ends the error with the same hint; the mover's min is 0.1.17
  so keepMovedCurrent brings moved users to it.
- gui: Routing labels the try "account restricted by the vendor", says it
  rests because only the vendor lifting it brings it back and to appeal,
  shows the hint translated, and the account's row has "The restriction
  is lifted — try it again" (POST /api/gateway/unrest). en, zh, zh-TW, ja,
  de.
- docs/subsystems/gateway-routing.md says the above.

Run: gofmt -l (clean); go vet darwin, GOOS=linux -tags nogui, GOOS=windows
on gateway, provider, gui; go test ./internal/gateway ./internal/provider
./internal/gui (ok). New Go tests use the reporter's literal body through
the vendor's shape, the built-in's and the plugin's, a string code and the
words alone; another vendor's 11140, a non-WorkBuddy account with the same
body, 11128/14018/111400 not restricted; an e2e through the fake plugin
host where the restricted account is skipped by the next request.
Broken by hand, each went red: rest case removed, restrictedSaid removed,
the match unscoped, the raw match removed, the provider hint removed.
GUI: routing-wb-restricted (chromium and webkit x en/zh/zh-TW/ja/de x
1100/420px, 20 pass), routing-wb-refused, i18n-keys; after the rebase
every GUI test of the Routing page (107 files, both engines): 103 green.
The 4 red ones fail the same in WebKit on origin/main 689edbd6b run
alone and are filed: group-member-info (#1745), routing-sessions
(#1307, #1672), routing-steady (#1804, passed on this head on a rerun),
routing-group-fold's group-of-eight (#1672).
Rebased onto 2c30e5cee (with #1672's test fixes) and run again: vet x3,
go test ./internal/gateway ./internal/provider ok. On the final base
5756651e3 (only GUI assets and READMEs changed since): routing-wb-restricted
20/20, routing-wb-refused, i18n-keys, routing-held-dot, mono-icon-redraw,
routing-sessions 38/38, routing-group-fold 40/40; routing-steady's WebKit
case red again, the flake filed as #1804.
 Not tried against a real restricted account;
plugin users on <0.1.17 rest by minutes until their plugin updates.
2026-10-13 04:32:09 +08:00
yetone fd03592331 provider: WorkBuddy AI's GLM models are text-only, so magpie's image-describing model reads their images; the plugin to 0.1.16 (Yirasumi on Discord)
What: for workbuddy-ai alone, a model whose id starts with glm- is listed
with ImageInput false (wbSite.textOnly), whatever /v3/config's
supportsImages says: in the list fetched, in the built-in list shown
before it, and in a list saved before this change (Provider.available).
The workbuddy movers' min goes to 0.1.16, where the plugin does the same
(magpie-community/plugins cb90931).

Why: checked on 2026-10-13 with the owner's real WorkBuddy AI account.
www.workbuddy.ai/v3/config marks every model supportsImages: true, but
its server takes the image out of a chat to glm-5.3-flash, glm-5.3 or
glm-5.2 and puts "[System reminder: the current model does not support
images. Content filtered. ...]" in its place. Its other models read
images, and WorkBuddy (China)'s glm-5.3-flash does too, so China and the
other families are left as the config says. A user's own answer in
Settings (ModelImages) still wins: entryFor applies it over the list.

Run:
- go test ./internal/provider (full, ok); go test ./internal/gateway
  -run 'WorkBuddy|WB|Vision|Describ|Image' (ok).
- TestWorkBuddyAIGLMIsTextOnly fails with textOnly turned off by hand;
  TestWorkBuddyAISavedGLMIsTextOnly fails without the models.go case.
- gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows.
- Sandbox gateway (own HOME, port 3486, built-in WorkBuddy AI login from
  the owner's migration backup, nothing live written): /v1/models lists
  glm-5.3-flash, glm-5.3, glm-5.2 as text, deepseek, kimi, gemini, gpt,
  grok with image. A blue|yellow split PNG sent to glm-5.3-flash was
  described by workbuddy-ai/deepseek-v4.1-flash (Routing kind "vision"),
  and glm-5.3-flash answered "left: blue, right: yellow". With
  modelImages {"workbuddy-ai/glm-5.3": true} in the sandbox settings,
  glm-5.3 listed image again and glm-5.3-flash stayed text.

Not run: the moved (plugin) path through a sandbox app; the plugin's own
bun tests cover its list, and magpie maps its input.image as ImageInput.
2026-10-13 02:03:25 +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 6f1b432759 provider, gui: smart routing spends WorkBuddy credits that expire soonest first (cdredfox on X)
WorkBuddy's Credits window had no reset, so in a Smart group every
WorkBuddy account ranked alike. workbuddy plugin 0.1.14 (plugins f0274d6)
reads WorkBuddy's own package lists (billing/meter/get-user-resource-paid-
packages and -free-packages, the calls WorkBuddy's client makes) and reports
on the Credits window when the soonest-ending package that still has credits
ends (runsOutAt) and how many credits it holds (runsOut). The daily Free
Plan slice (CapacityType 4) and code 001 aren't counted: they renew daily.

magpie carries runsOutAt from the plugin's usage window into QuotaWindow and
the routing Limit. Allowance.Renewal, which only Smart ranks on, treats it
as the window's reset when it is sooner than the real one. Pace, the tiers,
For, Full and resting are unchanged. The mover's min is raised to 0.1.14 so
moved users get the plugin. The usage card and account meter say "232.4
expire in 5h" in every language.

Run:
- plugin: bun test, 63 pass; 2 of the 3 new tests fail on 0.1.13's
  index.mjs. Verified live on a workbuddy-ai account in a sandbox HOME:
  Bonus Pack 232.4 left ending 10-12T16:39Z ranked before Pro (10-28).
- TestWorkBuddyCreditsRunOutForRouting and
  TestSmartSpendsWorkBuddyCreditsRunningOutFirst: both fail with the
  Renewal change removed by hand.
- GUI: credits-run-out.test.cjs in webkit and chromium, 5 languages, at
  360/440/1000px, red on the old app.js; with i18n-keys, quota-*,
  panel-usage, reset-each-title, usage-fold: 117 pass.
- go test ./... green (agent and gateway rerun with -timeout 30m after the
  default 10m ran out under load from other sessions; 378s and 492s).
- gofmt -l clean; GOOS=linux and windows go vet of provider, plugin,
  gateway clean.

Not tried: the CN workbuddy site (its token was stale, 401), so the CN
package list is assumed to have the same shape. The built-in WorkBuddy
(not moved users) doesn't get this. The account-line tooltip has no GUI
test of its own.
2026-10-11 20:07:19 +08:00
yetone 7618f3dee2 provider: moved WorkBuddy users get plugin 0.1.13, where an enterprise account lists and uses the enterprise's models (plugins#75, seavenlin)
Plugin 0.1.13 sends X-Enterprise-Id and X-Tenant-Id for an enterprise
account, as WorkBuddy's own client does, so /v3/config gives the
enterprise's models rather than the personal plan's. The mover's min
makes keepMovedCurrent update moved users to it.

Run: go test -tags nogui ./internal/provider under a temp HOME; gofmt
-l; GOOS=linux and GOOS=windows go vet -tags nogui ./internal/provider.
npm view @magpie-community/opencode-workbuddy-auth version: 0.1.13.
2026-10-10 18:19:22 +08:00
yetone 21a5cf0894 provider: moved WorkBuddy users get plugin 0.1.12, where a chat's tools get shapes WorkBuddy AI's models take, so ZCode's and DeepSeek Harness's chats on deepseek-v4.1-flash aren't 400 "Invalid request parameters" (wyh on Discord)
WorkBuddy AI answers 11133 "Invalid request parameters" to a tool whose
parameters have no type, are empty or a root union, hold a pattern's \0
or a tuple's items, or whose name holds . : / a space or CJK; DeepSeek's
models refuse each, others some. Plugin 0.1.12 (magpie-community/plugins
17e7532) mends them and names the model's calls back.

Run: through a sandbox gateway (temp HOME, port 3486) with the plugin and
the owner's WorkBuddy AI account, deepseek-v4.1-flash, -sg, glm-5.3,
gpt-5.4, gemini-3.5-flash and kimi-k3 answer 200 to each shape (400
before), on Chat; a fs.read tool called over Messages comes back as
fs.read, streamed and not. go test -tags nogui ./internal/provider/ ok;
GOOS=linux/windows go vet ./internal/provider/ ok; npm view (npmjs) shows
0.1.12. Not done: the built-in WorkBuddy path, for users who haven't
moved; wyh's own ZCode/DeepSeek Harness tools were not seen.
2026-10-08 17:51:28 +08:00
yetone b5c83420d0 provider: moved WorkBuddy users get plugin 0.1.11, where one user send is one request in WorkBuddy's usage list and both builds name the client (使用端) (magpie-community/plugins#48)
Every step of one send (a tool result sent back, a retry) carries one
X-Conversation-Request-ID, the user's next message another, under one
X-Conversation-ID, as WorkBuddy 5.5.6's own client does (read in its
codebuddy.js). The China build now sends the client's attribution headers.

Verified: 0.1.11 resolves with npm view (latest). go test -tags nogui
./internal/provider under a temp HOME passes; go vet passes for darwin,
linux and windows. The plugin was tried at review against the real China
build and WorkBuddy AI, using credential copies in a sandbox HOME: 200
on every request, the same turn id across one send's steps and a new one
for the next message.
2026-10-08 16:51:58 +08:00
yetone 92e4fc32fa provider: moved ZCode users get plugin 0.1.12 and moved WorkBuddy users 0.1.10 — ZCode's counted windows carry their amount and limit so the card's count follows used/left (#659, magpie-community/plugins#35); WorkBuddy's credits-used-up error (code 14018, matched as the whole code) says so with the nested message (plugins#25). Both versions resolve with npm view. go test -tags nogui ./internal/provider under a temp HOME passes; the plugins' own bun tests passed at merge. Not tried with a real ZCode or WorkBuddy account here. 2026-10-07 18:52:23 +08:00
yetone 5ecb1dc365 provider: moved WorkBuddy subscriptions update to the plugin's 0.1.9, whose chats from Codex and Claude Code pass WorkBuddy's channel check (#182, snzkYuurei on X)
WorkBuddy answered "Illegal API invocation from an unapproved channel" to
Cindy's Codex and Claude Code modes. It matches a few exact phrases anywhere
in a chat (Claude Code's billing header, identity line and gitStatus main
branch line; Codex 0.159.2's first paragraph); workbuddy 0.1.9 rewrites them
to words that pass. Verified with real accounts through Cindy's bundled
Codex 0.159.2 and Claude Code 2.1.280 on workbuddy/glm-5.3-flash and
workbuddy-ai/deepseek-v4.1-flash.
2026-10-06 03:13:02 +08:00
yetone 37809ac722 usage: WorkBuddy's credits are said beside their share — on the Routing page, the Usage page and the menu bar, used or left as the share is (#659)
Moody-Sin: the Routing page showed a WorkBuddy account as "已用 71%" only, which for a plan counted in credits says little. A quota window now carries its own count when the vendor counts in amounts — amount of limit, in unit (QuotaWindow, QuotaSpan for quota --json and /v1/magpie/quotas, and the routing trace's Weighed, from the window its share is of: Allowance.Count). WorkBuddy's built-in fills it from the resource summary, and @magpie-community/opencode-workbuddy-auth 0.1.8 tells it from auth.usage (amount / limit / unit, passed through host.js); the workbuddy mover's min is 0.1.8. The Routing page's stage and its list of what each account did, the Usage page's meter, the menu bar's tooltip and the TUI say "3,550 / 5,000 credits · 71% used", or "1,450 / 5,000 credits · 29% left" with Left on (积分 in Chinese); a window counted in shares alone reads as before.

quota-credits.test.cjs (WebKit, en/zh, used/left, Routing and Usage pages) fails on the old assets and passes; TestQuotaWindowCount, TestAllowanceCount, TestTraceTellsTheCount, TestPluginUsage (the count through the host) and TestWorkBuddyAccounts cover the Go side. Tried with the real WorkBuddy and WorkBuddy AI accounts in a sandbox magpie: moved onto the local plugin, /api/usage/quotas gives 33.29 / 3900 and 13.47 / 2250 credits and the Usage page reads "33.29 / 3,900 积分 · 已用 0.9%", "3,866.71 / 3,900 积分 · 剩余 99.1%" after a click on the count; not moved, the built-in gives the same for WorkBuddy. The Routing page with two real accounts of one provider wasn't tried (one account each). go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass.
2026-10-03 16:45:48 +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 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 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 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