Files
plugins/packages/workbuddy/package.json
T
yetone da94c2768a workbuddy 0.2.17: extra credits only the detail lists have are their own window
jiabubu on Discord (magpie 0.1.2774, workbuddy 0.2.16, a China-site free
account): magpie's card read "Free plan · 0 / 500" and nothing else, with no
Extra credits row. 0.2.16 splits the credits only by the resource summary
(CreditGroups, else its Packages). WorkBuddy's own usage panel (5.5.6,
buildCreditGroups) groups the packages of the paid and free detail lists, so
extra credits only those lists carry were nowhere in magpie.

The usage hook now adds, when the summary has the plan's credits alone, an
"Extra credits" window from the detail lists' packages that:
- are an extra kind as the client's resolveCreditGroup has it (bonus 028/037,
  top-ups 009/038/036, rewards 007/029/030; on WorkBuddy AI also 008 and 006;
  the China build puts gift 006 in no group);
- the summary doesn't list (never counted twice);
- haven't ended, and have a total (a slice package counts the day's slice).
It is set aside, and says the soonest-lapsing credits (runsOutAt/runsOut).
The plan's window still stops the account. Lists that can't be read, or a
summary that already splits, keep the card as it was.

Run at this head on mote: `HOME=$(mktemp -d) bun test` 4892 pass, 14 skip,
0 fail; `bun scripts/check.mjs` ok. Broken by hand: not adding the window
turns the new test red (1 fail).

Not tried: a real account with extra credits; the China meter answered 401
for the account I could read. The fixtures are CN_FREE's shapes with a
total, not jiabubu's own bytes (not seen).
2026-11-03 11:02:26 +08:00

25 lines
612 B
JSON

{
"name": "@magpie-community/opencode-workbuddy-auth",
"version": "0.2.17",
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
"type": "module",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": [
"index.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"
}
}