Parity with magpie's built-ins: a failed sign-in says why, CLI-backed Command Code and Devin accounts follow the CLI's key, Factory's refused renewal is a 401 in the caller's API shape
- every {type:"failed"} carries an error reason magpie shows
- commandcode/devin: accounts taken from the CLI are marked metadata.cli and re-read its credentials on each request, usage and models
- factory: a refused refresh answers 401 authentication_error (Anthropic shape on /llm/a/, OpenAI's elsewhere) instead of throwing; the whoami back-off is per account; 403 hints name the account to sign in again
- versions: factory/devin/commandcode/cursor/kiro/mimo/zed/zcode 0.1.2, workbuddy 0.1.3
This commit is contained in:
@@ -493,8 +493,8 @@ export const MimoAuthPlugin = async ({ client }) => {
|
||||
const p = await waitPoll(t)
|
||||
const { creds, cookies } = await signedInWith(p, t.device)
|
||||
return { ...toAuth(creds, cookies, Date.now()), type: "success" }
|
||||
} catch {
|
||||
return { type: "failed" }
|
||||
} catch (e) {
|
||||
return { type: "failed", error: e.message }
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-mimo-auth",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user