Kayphoon on Discord asked that routing spend the WorkBuddy CN account whose extra-credit packs expire first, before they lapse. magpie's smart routing already does that (Allowance.Renewal, Lapse and Pace read a window's runsOutAt/runsOut), and the plugin already put the soonest lapse of the summary's packages on the window that stops the account. But extra credits that only the detail lists have (listedExtra, the China free-account shape from jiabubu's report, 0.2.17) said their lapse only on their own "Extra credits" window, which is set aside, and routing reads no window set aside. So for those accounts routing knew no expiry at all. Now the soonest of them to lapse is also put on the Credits window, when it is sooner than what that window already says (summed when the same). Per-pack expiry isn't sent: routing only orders accounts by the soonest lapse and how much lapses then, so a list would change no choice. Run at this head (mote, HOME under TMPDIR): bun test packages/workbuddy, 318 pass 0 fail; bun scripts/check.mjs ok. Broken by hand: the same usage.test.mjs with the old index.mjs fails the jiabubu-shape test at the new assertion (Credits has no runsOutAt). Not tried: a real WorkBuddy CN account with expiring packs; the fixture is CN_FREE's shapes, not Kayphoon's bytes.
27 lines
669 B
JSON
27 lines
669 B
JSON
{
|
|
"name": "@magpie-community/opencode-workbuddy-auth",
|
|
"version": "0.2.20",
|
|
"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"
|
|
}
|
|
}
|