An account with both the plan's credits and extra ones showed only one of them on magpie's Routing page: the window that stops the account was the plan's until its credits were spent, then the extra one's. So one account read "500 / 500 credits" with its extra credits untouched and left out, the next only its extra credits, and an account at 90% of its plan was kept for last with all its extra credits left. Now "Credits" and "Extra credits" are both set aside and a third window, "Total credits" (the two together), stops the account, for the summary's split (CreditGroups or package codes) and for extra credits only the detail lists carry. It takes the plan's cycle and the soonest lapse of the two (summed when they lapse together); each of the two keeps its own lapse. magpie already says "Total credits" in every language (Qoder uses it). magpie keeps a cap the user set on "Credits" holding (its own commit, with the mover min). Run (mote): bun test packages/workbuddy, 332 pass; whole repo bun test, 6159 pass 20 skip 0 fail; bun scripts/check.mjs ok. Broken by hand: the tests against origin/main's index.mjs, 6 fail (Total credits missing, the plan's window still stopping the account). Not tried: a real account with both kinds; ferock's bytes weren't seen, the fixtures are the real shapes already in the tests (China free summary, WorkBuddy AI Pro, CreditGroups) with a plan-untouched case added.
27 lines
669 B
JSON
27 lines
669 B
JSON
{
|
|
"name": "@magpie-community/opencode-workbuddy-auth",
|
|
"version": "0.2.24",
|
|
"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"
|
|
}
|
|
}
|