What changed, for parity with magpie's built-in ZCode before it retires:
- Personal resets. The built-in's zcodeQuota read
/api/biz/customer-package-reset/list?targetType=PERSONAL with the plan's
key (zhipuPersonalResets, yetone/magpie#1191) and showed the count, by
window, and each reset's end. The plugin read only the team's list.
codingUsage now reads the personal list alongside the subscription list,
so a Coding Plan card (and a dual gift + Coding Plan card, built on it)
carries resets: {count, byWindow, fiveHour, weekly, until, each}.
- Team resets now carry team: true and each, as zhipuTeamResets set Team.
Both lists are read by one resetsOf: only available ones count, each
{until?, window} sorted soonest first with an endless one last
(sortResetCards), nothing on a failed read or none left.
- Start Plan refusal. A Start Plan answer that is a 405, the block page
("request has been blocked" / errors.aliyun.com) or code 3012 / "unusual
activity" now comes back, same status, as {type:"error", error:{message:
"<vendor's words, or the status for a block page> — <hint>"}}, the hint
word for word magpie's provider.ZCodeStartBlockedHint, as the built-in's
zcodeStartExplain / Provider.Explain put it. The block page's own words
are left out, so magpie's APIError no longer reads it as a network
firewall's (BlockedHint). Coding Plan and team answers are untouched.
- README: the resets and the Start Plan's hint.
What was run:
- usage.test.mjs: a new test with #1191's literal reset list (the
built-in's zhipuResetList) fails on 0.1.18 (no resets); the team test,
now expecting team and each, fails on 0.1.18 too.
- start.test.mjs: the new refusal test fails with the startBlocked line
disabled by hand (block page passed through), passes with it.
- Every packages/zcode test file under a scratch HOME: dual 25, gift 20,
models 1, moved 1, own 6, signin 3, start 11, usage 16 (83 pass).
- bun scripts/check.mjs zcode passes.
Not tried: a real account's reset list or a real Start Plan refusal.
`team` and `each` reach magpie's card from its next release; older magpie
ignores them.