Commit Graph

  • 01aee5da28 all: a usage read says what it means for the sign-in, and a renewal clears the mark whatever follows, as the built-ins did (要保证插件跟内置的所有逻辑都要一模一样) — auth.usage returns signIn on every path: expired where the built-in's quota read marked the account (Zed's /users/me 401, Factory's and MiMo's refused renewals, Qoder's refused job refresh), renewed after a renewal, which took the mark off, kept everywhere else, so magpie no longer guesses from the words 'sign in again' (Kiro's, Devin's and ZCode's usage errors marked accounts their built-ins never did) nor clears on a clean read. A request after a renewal says renewed on any status; one without says kept, as the built-ins cleared only on renewal. Kiro, Cursor, Devin, Command Code, WorkBuddy, Grok and ZCode, whose built-ins never marked an account, say kept on every answer. New tests fail against 85d7dd0's index.mjs. yetone 2026-10-01 04:53:29 +08:00
  • 85d7dd0d0a all: each plugin fails with its built-in's status and marks the sign-in as it did, through X-Magpie-Sign-In (要保证插件跟内置的所有逻辑都要一模一样) — Factory's and MiMo's refused renewals are the built-ins' 502 marked expired, not 401s; Qoder's vendor 403 is the built-in's 401 kept, its model list's failure a 400, its job refresh refused marked expired; Zed's retried 401 is a 401 kept, not a 403; Kiro's unreachable refresh a 401 kept; Cursor's expired trial a 401 kept; a vendor 401 WorkBuddy, Grok, Devin, Command Code and ZCode passed on no longer marks the account, as their built-ins never did, and Grok and MiMo no longer retry what their built-ins sent once. Messages take the built-ins' words. New tests fail against the previous index.mjs. yetone 2026-10-01 04:47:03 +08:00
  • 53e0db6648 zed 0.1.4: a streamed reply is held until it says something, as the built-in's relayStatus holds it, and a failure before that is answered with its status rather than a 200 carrying it — Zed's failed status keeps the status its code names (upstream_http_401 a 401, http_403 a 403, billing a 402, where magpie read the old stream's chat and Responses errors as 502s), the provider's own error event is a 502 with its message, a reply ended with nothing said is a 502 "Zed ended without an answer" and one cut short a 502; a whole reply carrying the provider's error is that error (it was a 200 with nothing in it), and a code outside 400–599 is a 502. errors.test.mjs fails without the change. yetone 2026-10-01 03:45:56 +08:00
  • 8efe85163c kiro 0.1.4: an exception Kiro sends before any of the answer (a throttle, a quota, a server error) is a status, not a 200 stream holding an error event, as the built-in's relay answers it: a 429 when it reads as a quota or rate limit (magpie's quotaWords), else a 502, so magpie moves on to the next account exactly as it did; unstreamed, what was said before a later exception is the answer, as the built-in's collector gives it, where the plugin answered 502. errors.test.mjs fails without the change. yetone 2026-10-01 03:45:09 +08:00
  • f62d7d1057 commandcode 0.1.4: a Go account's failure reads as the built-in's cmdFailure says it — an empty reply is its status's name as Go's http.StatusText gives it (an empty 429 "Too Many Requests", which magpie's quotaWords know), where it was "HTTP 429"; credits run out are said as "out of credits: …" unless the message is already in quotaWords' words ("Monthly limit hit" is not, "余额不足" is), where a looser test of its own kept "limit" and prefixed Chinese; an error object without a message is its JSON. errors.test.mjs fails without the change. yetone 2026-10-01 03:44:03 +08:00
  • e39f4f4dc0 devin 0.1.4: errors no longer start with "Devin: ", which magpie adds (it read "Devin: Devin: usage limit reached: …"), a stream error before anything included; an error Devin gives no words for is worded as Go's status text ("Payment Required") as the built-in's devinFailure does, where it read "HTTP 402"; an empty reply is the built-in's 502 "the reply broke off: EOF". Statuses were already the built-in's (unauthenticated 401, resource_exhausted/quota/rate limit 429, too long 400, invalid_argument 400, unavailable 503); errors.test.mjs checks them yetone 2026-10-01 03:43:41 +08:00
  • 3d94a667f6 cursor 0.1.4: an error Cursor gives no words for is worded as magpie's built-in words it, Go's status text ("Payment Required", "Too Many Requests", "Unauthorized — sign in to Cursor again"), where it read "HTTP 402": a 402 now reads as the credit refusal it is to magpie's routing, as the built-in's did. Statuses were already the built-in's (resource_exhausted/quota/rate limit/usage limit 429 "usage limit reached: …", too long 400, invalid_argument 400, unavailable 503, permission_denied 403, other codes 502, pre-content stream errors answered with their status); errors.test.mjs checks them all yetone 2026-10-01 03:43:39 +08:00
  • 6ba28f67ae registry: list magpie's community's plugins alone — the OpenCode community's weren't written against magpie's sign-ins and fell short of them; they stay a search away in magpie yetone 2026-10-01 03:26:40 +08:00
  • 23a580b6aa factory 0.1.3: a refusal says what to do after an em dash ("<Factory's message> — Factory refused this account…"), as the built-in's Provider.Explain joins them, where it used ": "; an empty 403 reads "403 Forbidden", the status Go falls back to yetone 2026-10-01 03:21:02 +08:00
  • b9404c8f68 commandcode 0.1.3: on every plan but Go a model the Provider API serves on Responses and not chat completions is asked on Responses (@ai-sdk/openai at /provider/v1), the first of its APIs in magpie's order (chat, Responses, Messages) as the built-in picks it, where it was asked on chat completions and refused; errors no longer start with "Command Code: ", which magpie adds yetone 2026-10-01 03:19:57 +08:00
  • 96b3ad276b kiro 0.1.3: only a sign-in that is gone (a refresh Kiro refused, no refresh token, no sign-in, a refused API key) answers a request with the 401 magpie marks the account lapsed on; a refresh that timed out, failed to connect or met a 5xx is a 502; errors no longer start with "Kiro: ", which magpie adds yetone 2026-10-01 03:17:51 +08:00
  • eab92c33a0 qoder 0.1.2: a chat Qoder refuses with a 403 stays a 403, only its 401 (the job token refused) is the 401 magpie marks the account lapsed on; a model the listing marks free (is_free, or a price_factor of 0, snake or camel case, as internal/qoder/models.go reads it) is marked free; errors no longer start with "Qoder: ", which magpie adds yetone 2026-10-01 03:16:04 +08:00
  • aac52c9ce4 mimo 0.1.4: a chat body handed over as bytes is read, so mimo-auto is still asked as mimo-pro; a sign-in Xiaomi no longer takes answers the request with a 401 in the built-in's words (<user>: the Xiaomi MiMo sign-in has expired — sign in again) instead of a thrown fetch yetone 2026-10-01 03:13:34 +08:00
  • 3d3f3b7bf1 zed 0.1.3: an account reply that can't be read is the card's error, as zed.FetchMe says it (Zed: an unreadable account: <encoding/json's words>), not a plan-less card; a free account reads Free, as the built-in's row names it (zed.PlanName); a model token refused right after it was minted is a 403, not a 401 magpie would take for a lapsed sign-in; errors no longer start with "Zed: ", which magpie adds; a model Zed gives no limits has none made up (was 200000/32000) yetone 2026-10-01 03:12:11 +08:00
  • 0c7275a140 grok 0.1.2: a usage fetch that fails or a reply that isn't JSON is the card's error, as grok_usage.go says it (Go's Get "<url>": … with no such host / connection refused / timeout / EOF for magpie's keepLast, encoding/json's words); a status Go has no words for says "HTTP <n>"; a model list Grok couldn't give fails instead of falling back to the configured few; a request body handed over as bytes is reshaped as a string one yetone 2026-10-01 03:07:40 +08:00
  • 0b425bee69 workbuddy 0.1.4: every refused meter status is an error with words, Go's http.StatusText in full (a 409 was an empty error), "HTTP <n>" for one Go has none for; a refusal in WorkBuddy's own {code, msg} reads its msg before the hint, as wbExplain's; a chat body handed over as bytes is read, so it still gets WorkBuddy's system message yetone 2026-10-01 03:05:22 +08:00
  • d8739bcdbc devin 0.1.3: the card's quota windows are "1 day" and "7 days", shown only when Devin says what is left of them (one left out is no longer taken for used up); usage no longer overwrites the row's plan ("Devin Pro", as devin auth status names it) with planName's bare "Pro"; a refused key says "Devin's sign-in has expired — sign in again"; the efforts none and minimal go as given; a variant the user picked stays, as magpie's devinCollapse keeps it; only a model models.dev says takes images gets image input yetone 2026-10-01 03:03:01 +08:00
  • b70f871d97 zcode 0.1.3: every card starts from the saved plan, as magpie's built-in's did — a reply with no level, a team detail that failed or an error no longer drops it; a model ZCode's config gives no context or output keeps 0, as the built-in, instead of a made-up 200K/131072 yetone 2026-10-01 02:56:05 +08:00
  • befd071701 cursor 0.1.3: the card names the plan as cursor-agent about does (GetPlanInfo's planName, kept an hour); only a token or session run out is a 401, as magpie marks the account lapsed on one; errors no longer start with "Cursor: ", which magpie adds; a model list Cursor couldn't give fails instead of shrinking to the configured few yetone 2026-10-01 02:52:43 +08:00
  • fb82ecd4d2 mimo 0.1.3 yetone 2026-10-01 02:45:37 +08:00
  • d28f9dfa09 mimo 0.1.3: two accounts signing on at once each keep their own session — one renewal was shared by every account, so an account could get another's session and show its plan and allowance yetone 2026-10-01 02:45:10 +08:00
  • b3a3ae0887 kiro: a lost sign-in says what magpie's built-in says — add the subscription, sign in with kiro-cli or the IDE, or save an API key; a magpie-added account's is gone and is added again yetone 2026-10-01 01:23:23 +08:00
  • 894a376c48 zcode: README names the ZCode app's sign-in yetone 2026-10-01 01:21:20 +08:00
  • 826d487839 workbuddy: the refusal of Codex's and Claude Code's prompt carries magpie's hint, and a model of no credits is marked free; zcode: sign in as the ZCode app, following its own sign-in and team switches yetone 2026-10-01 01:21:06 +08:00
  • c8f4d448df Parity with magpie's built-ins: a failed sign-in says why, CLI-backed Command Code and Devin accounts follow the CLI's key, Factory's refused renewal is a 401 in the caller's API shape yetone 2026-10-01 00:55:50 +08:00
  • bd9c0780cc zed 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancezed yetone 2026-09-30 23:03:11 +08:00
  • 501bd238ed zcode 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balance, team resets yetone 2026-09-30 23:03:10 +08:00
  • 8c419105c0 workbuddy 0.1.2: usage shows as magpie's built-in did — plan, period, windows and what they count, balanceworkbuddy yetone 2026-09-30 23:03:10 +08:00
  • 4dd783a2c0 qoder 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balanceqoder yetone 2026-09-30 23:03:10 +08:00
  • 3d1f24219a mimo 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancemimo yetone 2026-09-30 23:03:09 +08:00
  • 84e5e853ee kiro 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancekiro yetone 2026-09-30 23:03:09 +08:00
  • 79ab574970 grok 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancegrok yetone 2026-09-30 23:03:09 +08:00
  • 40a495f321 factory 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancefactory yetone 2026-09-30 23:03:08 +08:00
  • 7d641b86c4 devin 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancedevin yetone 2026-09-30 23:03:08 +08:00
  • 0f61665ff8 cursor 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancecursor yetone 2026-09-30 23:03:08 +08:00
  • f86746cd6e commandcode 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancecommandcode yetone 2026-09-30 23:03:07 +08:00
  • e2301c37ed scripts/publish.sh: publishes every package whose version isn't on npm yet, with one OTP for the lot yetone 2026-09-30 21:23:08 +08:00
  • 8f19f2e132 workbuddy: desktop's sign-in is read where the app keeps it, not copied — a copied refresh token was the app's and the plugin's both, and the first to use it signed the other out. The sign-in keeps a marker ({source: "desktop"}); each request reads the app's .info, and a token the app let lapse is renewed in memory only, as magpie's built-in does. 0.1.1. yetone 2026-09-30 20:58:51 +08:00
  • 6b33587488 registry: drop Cognition's opencode-devin — its gateway answers 404 model_not_found for both the model list and chat with a valid Devin session, so it signs in and then can't serve a request yetone 2026-09-30 19:53:11 +08:00
  • 03c948b6bb registry.json: the list magpie's Plugins tab shows, and how to add to it yetone 2026-09-30 18:57:46 +08:00
  • d7385c87c4 cursor: Cursor — cursor-agent's browser sign-in (PKCE poll), its existing sign-in or an API key; agent.v1 Run over HTTP/2 as magpie's gateway does it, with tool calls; tried with real requests. README lists every package so far yetone 2026-09-30 17:17:06 +08:00
  • e08a374886 kiro: Kiro — the IDE's browser sign-in (social, Builder ID, Identity Center), kiro-cli's or the IDE's sign-in, or an API key; conversations and the event stream as magpie's gateway does them; tried with real requests yetone 2026-09-30 17:12:09 +08:00
  • 92d1af8df6 devin: Devin — the CLI's browser sign-in or its existing one, GetChatMessage over protobuf with tool descriptions moved into the prompt; tried with real requests yetone 2026-09-30 17:10:33 +08:00
  • c5af8f5dec qoder: Qoder — device sign-in, one-use refresh tokens saved at once, COSY-signed chat generation; tried with a real request yetone 2026-09-30 17:08:36 +08:00
  • 620cf1329f zed: Zed — browser sign-in with Zed's key pair, model tokens minted as Zed does, Anthropic/OpenAI/Google/xAI requests wrapped for Zed's /completions yetone 2026-09-30 17:08:36 +08:00
  • 5a18bbdac4 Name the scope @magpie-community (the org's name, spelled right) yetone 2026-09-30 17:04:47 +08:00
  • 631b29b1c0 README: the packages so far yetone 2026-09-30 17:01:55 +08:00
  • 710b75ee95 zcode: ZCode GLM Coding Plan (Z.ai / BigModel) — browser sign-in with team seats and Start Plan, or a key; tried with a real request (GLM-5.3) yetone 2026-09-30 17:01:55 +08:00
  • a59d9eb1ac commandcode: Command Code plans — Studio browser sign-in, the CLI's sign-in or a key; Go plan's /alpha/generate translated to chat completions yetone 2026-09-30 17:01:55 +08:00
  • 56e0f46896 factory: Factory (Droid) — WorkOS device-code sign-in with droid's client, org chosen and refreshed as droid does, EU and org hosts, droid's headers, 30 models each on its own API (Messages, Responses, chat completions) yetone 2026-09-30 17:00:35 +08:00
  • 7f0f20132d grok: Grok (SuperGrok / X Premium+) through the Grok Build CLI's sign-in — device-code sign-in or the CLI's current one, token refreshed by the CLI, Responses at cli-chat-proxy.grok.com with magpie's headers and body clean-up, the account's models yetone 2026-09-30 17:00:20 +08:00
  • fd05920836 mimo: Xiaomi MiMo (the MiMo app's Xiaomi account) — Xiaomi sign-in page or QR polled until done, regional servers, session cookies renewed every 24h and on a 401, MiMo Pro and Flash over chat completions yetone 2026-09-30 17:00:13 +08:00
  • 3e38d08125 workbuddy: WorkBuddy (China build) and WorkBuddy AI (www.workbuddy.ai) — browser sign-in polled as the app does, or the desktop app's sign-in; token refresh, WorkBuddy/<ver> User-Agent, chat completions at <endpoint>/v2, the account's model list yetone 2026-09-30 16:59:53 +08:00
  • 2578f471bb Scaffold: conventions for OpenCode provider plugins of coding-plan subscriptions, a hook checker and a sandboxed magpie runner yetone 2026-09-30 16:55:58 +08:00