小八 (Discord, 2026-10-23): a banned AutoClaw account answers
HTTP 403 {"code":410004,"message":"The account has been banned"}.
The plugin read every 401/403 as an expired sign-in, so magpie dropped
the token from plugin-auth.json and the user never saw why. Signing in
again gets the same account and the same refusal.
A body whose code field is 410004, or whose code/message field (message,
msg, error.message) names a ban or account restriction (banned, 封禁,
封号, 账号异常, account suspended/frozen/disabled/blocked/restricted,
账号被冻结/停用/禁用), is now the account's refusal, not the sign-in.
Only those fields are read, never the whole body. A true token expiry
(401/403 with any other code or message) is still expired.
Every route that mapped 401/403 to expired:
- overseas loader: 403 permission_error with the vendor's words and
X-Magpie-Sign-In: kept; the second host isn't asked (a ban is the
account's on every host, as a spent quota already was).
- CN managed loader: the same.
- refresh: an envelope ban throws "AutoClaw: <message>" with signIn
"kept"; a non-envelope 401/403 naming a ban does too, every other one
stays expired.
- usage: the wallets read said "积分接口无数据" for a ban; it now returns
the vendor's words with signIn "kept".
- check-in: taskList threw 登录已失效 for any 403; a ban now says the ban
and stops the host rotation.
- models: provider.models makes no request, nothing to change.
Siblings with "every 401/403 is expired" and no vendor-shaped ban
evidence, listed and left alone: qoder (refreshJob, patSignIn),
codearts (withSignInMark, 403 on chat), cline (clineApi default lapsed),
minimax (accountCall), kiro (refresh 400/401/403), opendesign (usage
preflight, models), trae (refresh 400/401/403).
Run at this head (worktree from origin/main 929a8b3):
- packages/autoclaw: bun test (sandbox TMPDIR/HOME) 34 pass, 0 fail.
- repo root: bun test 2157 pass, 0 fail across 188 files.
- bun scripts/check.mjs: exit 0.
- Broken by hand, each red: overseas loader back to quotaRefusal only,
CN loader back to quotaRefusal only, refresh envelope ban check off,
refresh non-envelope back to "expired", usage wallets ban throw off,
check-in break-on-ban off, 410004 dropped from the codes. The new tests
against origin/main's index.mjs: 6 of 6 red.
Not tried: a real banned account (none at hand); the bytes are the
reporter's.
35 lines
1.0 KiB
JSON
35 lines
1.0 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-autoclaw-auth",
|
|
"version": "0.2.5",
|
|
"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
|
|
}
|
|
}
|
|
}
|