Files
plugins/packages/kimi-work/tests
Changtian Li 280d522830 kimi-work 0.1.15: renew membership tokens and keep existing accounts (#218)
Explicit sign-in now imports Kimi desktop's membership access/refresh pair
when the desktop has one, and magpie renews it through the host's
auth.refresh (conditional commit under the auth-store lock). Accounts saved
through 0.1.14 (reference-only, no pair) keep reading the desktop's web
token for usage, with no reconnect, no import and no refresh spent. The
usage card is one monthly meter, with Code's share as text. Request-body
reads follow the caller's abort signal.

Kept from main (0.1.11 to 0.1.14): callback errors split into no session /
Work 401 / HTTP-timeout-network (#425), per-uid account ids
`Kimi Work · <uid6>` (#440), share-folder-missing as kept (#444),
spent-quota 403 -> 429 (#465).

Reviewed head 96f7f52501082e4747ef649d836d955a8ece3f4c, merged onto
origin/main fdc5002 locally (clean), run on mote (macOS, Bun 1.4.2) with
HOME=$(mktemp -d):
- bun test packages/kimi-work: 99 pass, 0 fail
- bun test (whole repo): 3681 pass, 8 skip, 0 fail
- bun scripts/check.mjs: all packages pass

Broken by hand, each red in packages/kimi-work:
- legacy (no pair) usage throws expired: 7 fail
- callback 401 folded into the generic error: 3 fail
- callback network error folded into "no session": 3 fail
- accountId back to 'Kimi Work (local)': 2 fail
- AuthService 401 marked signIn expired: 2 fail
- refresh hook returning a pair for a legacy account: 2 fail

Version 0.1.15: main has 0.1.14; npm has no kimi-work package (served
from dist, highest 0.1.14), so 0.1.15 is free.

Not tried: a live Kimi sign-in or renewal at this head. The author's
live coexistence evidence is one cycle on 2026-10-24 at f67d742
(COMPATIBILITY.md). The rewritten COMPATIBILITY.md replaces main's 0.1.4
macOS record; that record stays in git history at fdc5002.
2026-10-30 01:34:05 +08:00
..