Commit Graph
5 Commits
Author SHA1 Message Date
yetone 47a8bb40d2 zed 0.1.8: a free account's card says "No plan", as the built-in's did, and the README says what the plugin and magpie now do
What changed:
- usage: magpie's built-in zedLoginQuota showed a free account's card
  (plan_v3 zed_free, or none) as "No plan", unless an overdue invoice was
  its error, while the account row kept zed.PlanName's "Free". magpie's
  card knows "No plan" (app.js noPlan) and translates it. The plugin's card
  said "Free". It now says "No plan" in the same case; the sign-in still
  saves planName "Free", and an overdue free card keeps "Free" with its
  error, as the built-in's switch did.
- README: "Not included" listed the plan display, which the usage hook has
  shown since 0.1.x, and several accounts and the web-search stand-in,
  which magpie gives a plugin provider itself (plugin_accounts.go, the
  gateway's generic searchReply path). It is now a "Usage" section and an
  "In magpie, not the plugin" section.

What was run:
- usage.test.mjs: the free-account test (zed_free, "" and an overdue free
  account) fails on 0.1.7's index.mjs ("Free" for "No plan"), passes now.
- packages/zed under a scratch HOME: 31 pass, 0 fail (4 files).
- bun scripts/check.mjs zed passes.

Not tried: a real free Zed account.
2026-10-16 17:36:24 +08:00
yetone 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. 2026-10-01 04:53:29 +08:00
yetone 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. 2026-10-01 04:47:03 +08:00
yetone 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) 2026-10-01 03:12:11 +08:00
yetone bd9c0780cc zed 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancezed 2026-09-30 23:03:11 +08:00