codearts 0.3.14: a CodeArts Agent sign-in is kept (#998)
Signing in with "Sign in from CodeArts Agent" said ok, but the account was never stored. A host keeps an OAuth sign-in only when the result has a `refresh` field (OpenCode's CLI and magpie's host.js both test `"refresh" in result`), and the IDE method's success had none. It now has `refresh: ""`. This sign-in has no refresh token: it is renewed by reading the IDE's state file again, and every reader of the refresh token (firstOf) already skips an empty string. The IDE sign-in test now checks the field is there and empty. Ran on mica (Bun, HOME=$(mktemp -d)): bun test packages/codearts 203 pass 0 fail; bun scripts/check.mjs exit 0. Broken by hand: without the refresh line, "signing in from the CodeArts Agent: checked with its station…" goes red (202 pass, 1 fail). Not tried: a real CodeArts Agent sign-in (no account here). Reported-by: AyakaChen1 <AyakaChen1@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-codearts-auth",
|
||||
"version": "0.3.13",
|
||||
"version": "0.3.14",
|
||||
"description": "Huawei Cloud in OpenCode and magpie: CodeArts (码道) and OfficeAce (AgentArts), each from its own Huawei Cloud OAuth sign-in — models, credit rates, credit usage and the daily check-in (unofficial)",
|
||||
"type": "module",
|
||||
"main": "./opencode.mjs",
|
||||
|
||||
Reference in New Issue
Block a user