The CN managed gateway answers a ~200k-token request 401 "AutoClaw 登录状态失效" while the same token gets 200 seconds before and after (hj01857655: 401 at 207k and 218k tokens, every 200 that day at most 129k). The plugin read it as expired, so magpie marked the account signed out and stopped. Now each provider remembers the largest chat body its gateway answered. A 401/403 (not quota, not ban) for a larger body has its sign-in checked on the wallets route; a sign-in that holds there turns it into 413 request_too_large with X-Magpie-Sign-In: kept, so magpie's gateway asks another member (a byte cap rests nobody) or tells the agent to compact. No threshold is guessed. A body no larger than one answered, nothing answered yet, a sign-in refused on wallets, or a check that fails stays the sign-in, as before. Same rule on the overseas path (both hosts refusing) since both providers share the fetch. Run: lockf ~/suite.lock mote-run bun test packages/autoclaw, 109 pass 0 fail. Broken by hand (sizeRefusal returns null at once), wsl-run bun test packages/autoclaw: the CN and overseas 413 tests red, 107 pass 2 fail; restored. Not run: the full bun test (left at the coordinator's call, lock queue long). Not tried: a real ~200k request on the CN gateway; the fixture is the reporter's 401 body. Reported-by: hj01857655
38 lines
1.1 KiB
JSON
38 lines
1.1 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-autoclaw-auth",
|
|
"version": "0.2.20",
|
|
"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": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md",
|
|
"README.en.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
|
|
}
|
|
}
|
|
}
|