mimo 0.1.6: magpie renews the sign-in ahead of time through auth.refresh

auth.refresh with refreshLead 10 minutes before the day's session ends:
the account signs on again, once per account (the request path joins it),
and the new session (access, expires) is given. A passToken Xiaomi no
longer takes is signIn "expired"; any other failure throws and 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).
This commit is contained in:
yetone
2026-10-03 12:07:22 +08:00
parent ce009e60c6
commit 7dd0b4e0b4
4 changed files with 159 additions and 22 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-mimo-auth",
"version": "0.1.5",
"version": "0.1.6",
"description": "OpenCode provider plugin for Xiaomi MiMo: the MiMo app's Xiaomi-account sign-in, MiMo Pro and MiMo Flash",
"type": "module",
"main": "./index.mjs",