Repository navigation
v2.4.2
Codex App Transfer v2.4.2
中文
WorkBuddy 多账号池 + 配额守护自动切换 + 反应式失败转移
为 workbuddy-login provider 增加多账号池能力:单 provider 下登录多个账号,配额守护自动切换,每账号独立设备指纹隔离风控,对 Codex 透明。
- 多账号池:同一
workbuddy-loginprovider 下登录多个账号组成池,每账号独立X-Device-Id(避免网关风控关联多账号同设备);账号列表显示脱敏手机号(如183****5600)替代不可读 uid,可手动设为当前 / 移除。 - 配额守护:后台每 ≥60s 查各账号
get-user-resource剩余积分,某账号总剩余低于阈值(默认 20,设置项可调)即标记耗尽、自动 sticky 切到下一个有额度账号;独立于额度面板开关,面板关也跑;全耗尽兜底选最快解禁账号。 - 反应式失败转移:选中账号 refresh token 被网关拒或凭证丢失时,标记 5min 退避并重试池里下一个账号;配额守护遇 401/403 标记 1h 退避。两条路径闭环,单账号失效不再撞死整个池。
- 迁移:老单文件
workbuddy-oauth.json+ 全局workbuddy-device-id首次启动自动迁移为池首账号,无缝。
验证:cargo test gemini_oauth 147 + src-tauri 292 全绿;vue-tsc --noEmit 0 错;CI 全绿;3 轮 code review 意见全部 resolved。
English
WorkBuddy multi-account pool + quota-guard auto-switch + reactive failover
Adds multi-account pool support for workbuddy-login: multiple accounts under one provider, automatic quota-guard switching, per-account device-fingerprint isolation, transparent to Codex.
- Multi-account pool: log into multiple accounts under one
workbuddy-loginprovider, each with an independentX-Device-Id(avoids gateway risk-control correlating accounts on the same device); the account list shows masked phone numbers (e.g.183****5600) instead of unreadable uids, with manual set-active / remove. - Quota guard: a background task (≥60s throttle) queries each account's
get-user-resourceremaining credits; when an account's total remaining drops below the threshold (default 20, configurable) it is marked exhausted and the sticky selector auto-switches to the next account with quota; independent of the quota-panel toggle, runs even when the panel is off; when all are exhausted it falls back to the soonest-unblocking account. - Reactive failover: when the selected account's refresh token is rejected or its credential is lost, it is marked with a 5min backoff and the next pool account is tried; the quota guard marks 1h backoff on 401/403. Both paths close the loop so a single dead account no longer stalls the whole pool.
- Migration: the legacy single-file
workbuddy-oauth.json+ globalworkbuddy-device-idauto-migrate into the pool's first account on first launch, seamlessly.
Verification: cargo test gemini_oauth 147 + src-tauri 292 all green; vue-tsc --noEmit 0 errors; CI all green; 3 rounds of code review all resolved.