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.
This commit is contained in:
yetone
2026-10-23 22:19:19 +08:00
parent ade2f06288
commit 3b10a403d1
+1 -1
View File
@@ -16,7 +16,7 @@ func init() {
for _, w := range []*wbSite{wbCN, wbAI} {
movers[w.id] = &mover{
pkg: "@magpie-community/opencode-workbuddy-auth",
min: "0.1.30", // a refused line the model quotes back into an assistant message is reworded there too, so a long DeepSeek Harness chat isn't refused for good (plugins #291); 0.1.29: a system prompt WorkBuddy refuses as an unapproved channel (11128) is sent once more as the first user message's instructions, with WorkBuddy's default system prompt, since WorkBuddy checks only system and assistant messages; the refusal still rests no account (Wing on Discord); 0.1.28: a refusal of words not reworded yet ends in a hint that names no one client (plugins #279); 0.1.27: DeepSeek Harness's opening identity line is reworded to a neutral one, which WorkBuddy otherwise refuses as an unapproved channel (11128) (plugins #279, #280); 0.1.26: a model that says only supportsReasoning and a default effort lists low, high, max and that default, not "doesn't reason" (plugins #255); 0.1.25: WorkBuddy AI's fast, balanced and primary models keep the credit rate its config gives as "x0.34 credits", not unknown (plugins #216); 0.1.24: a refused sign-in on a chat over 2 MiB says the 401 and to sign in again: WorkBuddy's front door resets such a request instead of answering, so it read as 502 ECONNRESET (wyp on Discord); 0.1.23: credits used up leave the free models counted out of the credits window, so an account is not ranked spent for them (plugins #138); 0.1.22: an MCP server's tool schemas reach Kimi and DeepSeek: an enum with no type, or of several types, is typed, and true or false where a schema goes is {} or {"not": {}}, so they aren't 400 11133 "Invalid request parameters" (plugins #122); 0.1.21: a model free only at night (Hy4 preview) is never said free, and a whole-day discount shows the price before it, from WorkBuddy's modelPromotions (plugins #121); 0.1.20: tool results followed by the user's message reach WorkBuddy AI's gemini-3.8-flash, not 400 "the conversation must end with a user message" (plugins #113); 0.1.19: an enterprise account's card shows its credits, from the enterprise meter WorkBuddy's usage page reads (#1904); 0.1.18: WorkBuddy 5.6+ keeps its desktop sign-in encrypted, and the plugin says so and points to the browser sign-in instead of a 502 (plugins #18); 0.1.17: a restricted account's 403 11140 ends in provider.WBRestrictedHint, so it rests 2h as restricted (#1849); 0.1.16: WorkBuddy AI's GLM models are text-only, so magpie's image-describing model reads their images (Yirasumi on Discord); 0.1.15: a system prompt sent as a developer message passes the channel check, an object tool_choice is sent as WorkBuddy takes it, and max_completion_tokens goes as max_tokens so the cap holds (plugins #96); 0.1.14: the Credits window says when the soonest credits left run out, for Smart routing to spend them first (cdredfox on X); an enterprise account names its enterprise, so it lists and uses the enterprise's models, not the personal plan's (plugins #75); 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); one user send is one request in the usage list: every step carries one X-Conversation-Request-ID, and both builds name the client (使用端) (plugins #48); credits used up (code 14018) say so, with the nested error message (plugins #25); Codex's and Claude Code's chats pass WorkBuddy's channel check (#182); a failure's status and its sign-in mark as the built-in's; each model's credit rate; the sign-in renewed ahead of time through auth.refresh; the credits' count beside their share (#659)
min: "0.1.31", // a 401 is renewed once, whatever the token's time, and sent once more; when the retry is refused too, the 401 says to sign in again (Providers → WorkBuddy → this account), and the account is marked expired only on WorkBuddy's word that the sign-in is gone (refresh token refused, or invalid_token with nothing to renew with) (wenchen855443 on X); 0.1.30: a refused line the model quotes back into an assistant message is reworded there too, so a long DeepSeek Harness chat isn't refused for good (plugins #291); 0.1.29: a system prompt WorkBuddy refuses as an unapproved channel (11128) is sent once more as the first user message's instructions, with WorkBuddy's default system prompt, since WorkBuddy checks only system and assistant messages; the refusal still rests no account (Wing on Discord); 0.1.28: a refusal of words not reworded yet ends in a hint that names no one client (plugins #279); 0.1.27: DeepSeek Harness's opening identity line is reworded to a neutral one, which WorkBuddy otherwise refuses as an unapproved channel (11128) (plugins #279, #280); 0.1.26: a model that says only supportsReasoning and a default effort lists low, high, max and that default, not "doesn't reason" (plugins #255); 0.1.25: WorkBuddy AI's fast, balanced and primary models keep the credit rate its config gives as "x0.34 credits", not unknown (plugins #216); 0.1.24: a refused sign-in on a chat over 2 MiB says the 401 and to sign in again: WorkBuddy's front door resets such a request instead of answering, so it read as 502 ECONNRESET (wyp on Discord); 0.1.23: credits used up leave the free models counted out of the credits window, so an account is not ranked spent for them (plugins #138); 0.1.22: an MCP server's tool schemas reach Kimi and DeepSeek: an enum with no type, or of several types, is typed, and true or false where a schema goes is {} or {"not": {}}, so they aren't 400 11133 "Invalid request parameters" (plugins #122); 0.1.21: a model free only at night (Hy4 preview) is never said free, and a whole-day discount shows the price before it, from WorkBuddy's modelPromotions (plugins #121); 0.1.20: tool results followed by the user's message reach WorkBuddy AI's gemini-3.8-flash, not 400 "the conversation must end with a user message" (plugins #113); 0.1.19: an enterprise account's card shows its credits, from the enterprise meter WorkBuddy's usage page reads (#1904); 0.1.18: WorkBuddy 5.6+ keeps its desktop sign-in encrypted, and the plugin says so and points to the browser sign-in instead of a 502 (plugins #18); 0.1.17: a restricted account's 403 11140 ends in provider.WBRestrictedHint, so it rests 2h as restricted (#1849); 0.1.16: WorkBuddy AI's GLM models are text-only, so magpie's image-describing model reads their images (Yirasumi on Discord); 0.1.15: a system prompt sent as a developer message passes the channel check, an object tool_choice is sent as WorkBuddy takes it, and max_completion_tokens goes as max_tokens so the cap holds (plugins #96); 0.1.14: the Credits window says when the soonest credits left run out, for Smart routing to spend them first (cdredfox on X); an enterprise account names its enterprise, so it lists and uses the enterprise's models, not the personal plan's (plugins #75); 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); one user send is one request in the usage list: every step carries one X-Conversation-Request-ID, and both builds name the client (使用端) (plugins #48); credits used up (code 14018) say so, with the nested error message (plugins #25); Codex's and Claude Code's chats pass WorkBuddy's channel check (#182); a failure's status and its sign-in mark as the built-in's; each model's credit rate; the sign-in renewed ahead of time through auth.refresh; the credits' count beside their share (#659)
agents: []string{w.id},
out: func() ([]Moving, error) {
var out []Moving