qoder 0.2.43: the check-in says when to ask again, as the 10:00 (UTC+8) campaign opens

sdytman on Discord: Qoder's daily credits start at 10:00, can the plugin's
check-in follow it? Qoder's /me/campaigns lists each day's CLAIM_BENEFIT
campaign with startAt 10:00 and endAt 09:59 the next day, both UTC+8
("Daily reset: 10:00 (UTC+8)"), read with a real account at 09:27 CST on
10-28. Qoder.app 0.4.3 polls that list every 5 minutes and treats
startAt <= now < endAt as active; there is no next-time field. A check-in
before 10:00 met yesterday's campaign, and magpie settled for the Beijing
day, so today's campaign waited until tomorrow, or was lost.

checkin now returns until: the next campaign's opening (the later of
endAt and startAt + 1 day, or the next startAt in the gap) plus a minute,
on done, claimed and "not offered yet". All in epoch time, so the
machine's zone doesn't matter; qoder and qoder-cn share the code. magpie
asks again at until once it reads it (yetone/magpie, next release).

Run (mote): checkin-window, native-checkin and checkin tests under
TZ=UTC, Etc/GMT+8 and Asia/Shanghai, 66 pass each; HOME=$(mktemp -d)
bun test, 2938 pass 0 fail 8 skip; bun scripts/check.mjs. A real qoder
account at 09:35 CST: claimed 100, until 2026-10-28T02:01:00Z.
Broken by hand: nextOpens returning endAt only, 11 of 13 checkin-window
tests red; askAgain returning {}, 12 of 13 red.
Not tried: a real Qoder CN account (none here); the server's list in the
09:59-10:00 gap.
This commit is contained in:
yetone
2026-10-28 19:16:54 +08:00
parent f2b0dacdb7
commit b7bbc9dc06
4 changed files with 137 additions and 3 deletions
+13
View File
@@ -472,6 +472,19 @@ the plugin factory and its pieces, for another service on this same
protocol (QwenWork ships here; a future one can too). Its shape is not a
stable API — it changes as the packages on it need.
## Free models when the credits run out
Qoder serves its free models after the credits are used up: "When Credits
run out, you can continue using free basic models, subject to daily and
monthly limits" ([docs.qoder.com/Credits](https://docs.qoder.com/Credits);
the zh page says the same). So the credit windows the usage hook gives
(Qoder and Qoder CN, since 0.2.46) name the account's free models in
`notModels`: a model listed at 0× (not a discount's 0 for a while), from the
account's own model list. magpie then doesn't count those models as spent
on a used-up account, or on a free account's "0 credits left". A list that
can't be read leaves every model counted. QwenWork reads its usage
elsewhere and is not changed.
## Not here
- Qoder's usage and quota display.