Add 2925 account pool binding helper

This commit is contained in:
2026-05-11 16:07:33 +08:00
parent 26f42427be
commit 228d650ca8
3 changed files with 326 additions and 0 deletions
+36
View File
@@ -142,6 +142,32 @@ If login recovery hits `Incorrect email address or password`, `invalid_state`, s
If login recovery hits `Incorrect email address or password`, `invalid_state`, stale email verification, or tab ambiguity, stop before buying phone numbers; recover account/page first. For existing accounts with password failure, the login-page `使用一次性验证码登录` path may send an email code, but `mail-cli` output is not guaranteed newest-first: parse/sort the `date` field and submit the newest OpenAI login mail. Do not use passwordless signup (`使用一次性验证码注册`) for an existing account; it can return `passwordless_signup_disabled`. If a fresh email-code submission returns `account_deactivated`, stop the account immediately even if phone verification previously succeeded.
## 6A. 2925 mailbox provider option
Use this when ClawEmail accounts appear unstable and BOSS wants 2925 instead. The original extension treats 2925 as a class-level mail provider with two modes:
```text
mail2925Mode=provide # preferred for replacing ClawEmail: generate 2925 aliases for OpenAI signup
mail2925Mode=receive # registration email comes from elsewhere; 2925 only receives/polls mail
```
For `provide`, generate registration emails as `baseLocal + randomSuffix(6) + @2925.com`; **do not** use Gmail-style `+tag`. Example: `abc@2925.com -> abcxk39qz@2925.com`.
Recommended gates for Hermes runners:
1. Use an account pool; format can mirror original extension imports: `email@2925.com----password`.
2. Select an enabled, non-cooldown account with the oldest `lastUsedAt`; tie-break by email.
3. Open `https://2925.com/#/mailList` or login at `https://2925.com/login/`; on force relogin clear cookies for `2925.com`, `www.2925.com`, and `mail2.xiyouji.com`.
4. Verify the displayed mailbox email equals the selected 2925 account before polling. If mismatched, relogin to the selected account; do not poll the wrong mailbox.
5. Before requesting an OpenAI code, pre-clear the 2925 inbox where possible.
6. Poll 15 attempts x 15 seconds for signup/login codes; open candidate mail, extract a strict 6-digit code, delete after read, return to inbox.
7. Maintain `seenCodes` and `rejectedCodes`; if OpenAI rejects a code, request/resend and keep polling instead of reusing old mail.
8. Detect `子邮箱已达上限` / `已达上限邮箱` / `子邮箱上限` / `邮箱已达上限`; mark the current 2925 account cooldown for 24h and switch accounts. If no account pool/next account exists, stop the flow.
Reference: `references/2925-mail-provider-original-extension-rules-2026-05-11.md` and `references/mail2925-account-pool-integration-2026-05-11.md`.
BOSS-provided pool is stored locally at `~/.hermes/secrets/mail2925_accounts.txt` with mode `0600` (20 accounts, `chickliu2021@2925.com` through `chickliu2040@2925.com`). Never print or commit raw passwords. Use `scripts/mail2925_pool.py` for account rotation and alias generation. Hard invariant: generated alias local-part must start with the selected account local-part, and the displayed 2925 mailbox must equal the selected account before polling code. If mismatch, clear 2925 cookies and force-login the selected account; never read code from another account's mailbox.
## 7. 5sim SMS phone flow
Use SMS activation provider selected by `PHONE_SMS_PROVIDER`:
@@ -191,6 +217,16 @@ Observed OpenAI service lookup returns entries such as `OpenAI / ChatGpt` and `O
Verified 2026-05-11 with BOSS key: balance API OK, balance `2.000`; service list OK. Do not print the key. The helper script is at `scripts/luban_sms.py`.
Integration/verification policy:
- First validate Luban with `balance` and `resolve` only; do not buy a number while merely adding the provider.
- Luban `/List` output is not a fixed country matrix; resolve `service_id` dynamically from `service=OpenAI`/`OpenAI / ChatGpt`, then pick the cheapest usable match unless BOSS asks for a specific country/provider.
- Treat Luban `request_id` as the activation id. Poll `/getSms`; `msg=wait` means keep polling, `msg=success` plus `sms_code` means submit a strict 6-digit code, and `wrong_status` means the request expired/closed.
- Release failed/rejected Luban numbers with `/setStatus?...&status=reject`; Luban has no 5sim-style `finish`, so a successful code submission is a local no-op finish in the runner.
- Store the key only in `~/.hermes/env/codex_oauth_onboarding.env` as `LUBAN_SMS_API_KEY`; never echo it in command output, logs, or chat.
- Details: `references/luban-sms-provider-integration-2026-05-11.md`.
- Provider abstraction lessons: `references/sms-provider-abstraction-and-luban-2026-05-11.md`.
If using the long-running runner:
```bash