Eight auth hooks declare `rotating: true`: cline, codearts (and OfficeAce),
factory, minimax, nous, qoder, sensenova, workbuddy. Each package's own
code says the vendor refuses a spent refresh token. magpie then stops
carrying these sign-ins to another computer through Sync, a backup or a
Restore (internal/provider/signins_carry.go). Trae was dropped: its refresh
keeps the old token when the answer has none, and there is no evidence it
rotates. Each package's patch version is bumped (cline 0.1.15, codearts
0.3.13, factory 0.1.46, minimax 0.2.9, nous 0.1.3, qoder 0.2.66, sensenova
0.2.3, workbuddy 0.2.30). Each was checked against npm, or against
origin/dist for the dist-only packages, before the merge.
Fixes#884.
Run at cc2f9199 (a fast-forward of origin/main), on mica with a temp HOME:
bun test over the eight packages gave 1588 pass, 0 fail, and
scripts/check.mjs exited 0. CI's test and on-npm jobs pass. At 45c8fdb4,
mote gave 1834 pass with Trae included.
Not tried: a real refresh against each vendor.
Co-authored-by: yetihan <yetihan@users.noreply.github.com>
A Qoder CN / QwenWork phone account's card shows its masked phone
(phoneLabel / cardName, usage's `user`), a real email first, instead of its
uuid; accountId stays exactly what main computes. A renewal reads the name
outside the plugin-wide lock from the account's own site (a VPC token never
goes to the public hosts) and renames nothing. Rebased on a06512e, keeping
3c279f6's listing-renew change.
Reviewed at 6e39e8c (round 5). Run on mote (macOS, Bun 1.4.2) in a sandbox
HOME, at that head:
- bun test packages/qoder: 335 pass / 0 fail (listing-renew.test.mjs 5/0)
- bun scripts/check.mjs qoder: ok
Broken by hand: the device sign-in's cardName `realEmailOf(email) || label`
-> `label` (index.mjs:411) turns "qoder-cn: a device sign-in with an email
and a phone shows the email" red (334/1). Earlier rounds' breaks (renewal
cardName, own site, usage `who`) were red too.
CI (test, on-npm) green at 6e39e8c. Version 0.2.49 -> 0.2.50.
Not tried: a real Qoder CN or QwenWork phone account.
auth.refresh with refreshLead 10 minutes (in-fetch: 5) for qoder and
qoder-cn: the job token through refreshJob, or a qoder-cn device-token chat
through refreshDevice (both pairs given). Under the request path's lock; a
spent map lets a request holding the old pair use the new one. 401/403 is
signIn "expired" as on the request path; anything else is retried.
The check before each request stays for OpenCode, which doesn't call the
hook (magpie 0.1.684+ does). refresh.test.mjs fails without the change;
HOME=$(mktemp -d) bun test passes (396 across the repo).