ferock on Discord (2026-11-05, WorkBuddy China): extra credits weren't counted, so once an account's base credits were used up magpie moved to another account, though WorkBuddy would go on serving it on the extra ones. The card read "17.37 / 500" and "500 / 500" on the plan's window. Since 0.2.17 extra credits that only the paid/free detail lists carry (the summary lists the plan's base alone, a China-site free account's shape) were an "Extra credits" window that was always set aside, so the plan's window was the one that stopped the account, at 100% with the extra ones left. The summary's own split (usageOf) already flips that: WorkBuddy serves the account while any credits are left. Now the detail-list window follows the same rule: once the plan's credits are spent with extra ones left, "Credits" is set aside and "Extra credits" stops the account, carrying the soonest lapse (runsOutAt/runsOut) since routing reads no window set aside. Both spent, the plan's stops it again. README says so. Run at this head on mote (HOME under mktemp): bun test packages/workbuddy 322 pass 0 fail; whole repo bun test 5933 pass, 19 skip, 0 fail; bun scripts/check.mjs ok. Broken by hand: the new usage test against the old index.mjs fails (1 fail, Credits not aside / Extra credits aside). Not tried: ferock's own bytes, or any real account with extra credits. The desktop's China sign-in on this Mac is refused (401) by the billing meter, and I didn't renew it (that would spend the app's refresh token). The fixture is CN_FREE's real shapes (2026-10-26) with the plan spent. Whether ferock's extras are a kind the summary lists (already split since 0.2.11) or only the detail lists carry isn't known; this fixes the latter.
27 lines
669 B
JSON
27 lines
669 B
JSON
{
|
|
"name": "@magpie-community/opencode-workbuddy-auth",
|
|
"version": "0.2.22",
|
|
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"workbuddy",
|
|
"codebuddy"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/workbuddy"
|
|
}
|
|
}
|