fetchUserProfile sent `device_id: "magpie-plugin"`. AutoClaw 1.18.5's own client (app.asar, getUserInfoWithAccessToken -> withWebInfo) sends the device id the account signed in with (getAuthState().deviceId), a 64-hex id. The plugin already generates such an id per login (newDeviceId) and sends it with the login; the server writes it into the tokens' device_id claim. user-profile now sends that id: the login's own at sign-in, the refresh token's claim on refresh (old accounts included), "" only when no token carries one, as refreshTokens already does. Found by the new test: the global chat path forwarded magpie's x-magpie-* hint headers to the vendor. They are now dropped there (the CN path builds its own headers). Run: - bun test (packages/autoclaw): 36 pass, 0 fail - bun scripts/check.mjs: ok - no-magpie.test.mjs against HEAD's index.mjs: 2 of 2 red (device_id "magpie-plugin", then the hint headers) Not tried: a live run. There is no AutoClaw account to sign in with.
35 lines
1.0 KiB
JSON
35 lines
1.0 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-autoclaw-auth",
|
|
"version": "0.2.6",
|
|
"description": "OpenCode provider plugin for AutoClaw (Zhipu OpenClaw): oversea web sign-in (Google/z.ai) and CN phone SMS, multi-account pool, credit balance and daily check-in",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": [
|
|
"index.mjs",
|
|
"README.md"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"autoclaw",
|
|
"zhipu",
|
|
"glm"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/autoclaw"
|
|
},
|
|
"magpie": {
|
|
"icon": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%234f6ef7'/%3E%3Ctext x='32' y='42' font-size='28' text-anchor='middle' fill='white' font-family='sans-serif'%3E%E8%9F%B9%3C/text%3E%3C/svg%3E",
|
|
"options": {
|
|
"signin": true,
|
|
"signinHour": null,
|
|
"signinOnUsage": false
|
|
}
|
|
}
|
|
}
|