feat: add account run history module and logging functionality
- Implemented `background/account-run-history.js` to persist account run results (success, failure, stop) in `chrome.storage.local` and log to a text file when the local Hotmail helper is enabled. - Enhanced `background/auto-run-controller.js` and `background/message-router.js` to utilize the new account run record functionality. - Updated steps in `background/steps/fetch-login-code.js`, `background/steps/fetch-signup-code.js`, and `background/steps/oauth-login.js` to handle retries and logging appropriately. - Introduced tests for account run history and step retry limits to ensure functionality and reliability. - Modified documentation to reflect new features and changes in behavior for specific providers (e.g., 2925).
This commit is contained in:
+19
-5
@@ -126,7 +126,7 @@
|
||||
|
||||
### 4.2 `chrome.storage.local`
|
||||
|
||||
保存持久配置:
|
||||
保存持久配置与账号运行历史:
|
||||
|
||||
- CPA / SUB2API 配置
|
||||
- 邮箱 provider 配置
|
||||
@@ -135,6 +135,9 @@
|
||||
- iCloud 相关偏好
|
||||
- LuckMail API 配置
|
||||
- 自动运行默认配置
|
||||
- 账号运行历史 `accountRunHistory`
|
||||
|
||||
当启用了本地 Hotmail helper 时,账号运行历史还会通过 [scripts/hotmail_helper.py](c:/Users/projectf/Downloads/codex注册扩展/scripts/hotmail_helper.py) 追加写入 `data/account-run-history.txt` 文本文件,便于离线留档。
|
||||
|
||||
### 4.3 状态广播
|
||||
|
||||
@@ -232,6 +235,11 @@
|
||||
5. 回填页面
|
||||
6. 若页面拒绝,则重试或回退
|
||||
|
||||
补充行为:
|
||||
|
||||
- `2925` provider 会拉长单轮轮询窗口,并关闭 Step 4 / 7 的自动重发间隔,减少因邮件延迟过早判负。
|
||||
- CPA 模式下,Step 7 在真正回填登录验证码前,会先刷新最新 OAuth 地址并快速重走一次 Step 6,降低验证码等待过久导致 OAuth 过期的概率。
|
||||
|
||||
### Step 5
|
||||
|
||||
文件:
|
||||
@@ -257,7 +265,7 @@
|
||||
3. 打开最新 OAuth 链接
|
||||
4. 登录
|
||||
5. 确保真正进入验证码页
|
||||
6. 如果未进入验证码页,则按可恢复逻辑重试
|
||||
6. 如果未进入验证码页,则按可恢复逻辑最多重试 3 次
|
||||
|
||||
### Step 8
|
||||
|
||||
@@ -285,7 +293,8 @@
|
||||
3. 打开相应后台
|
||||
4. 提交回调地址
|
||||
5. 完成平台侧验证
|
||||
6. 做成功后的清理与标记
|
||||
6. 追加账号运行历史成功记录
|
||||
7. 做成功后的清理与标记
|
||||
|
||||
## 7. 邮箱与 provider 链路
|
||||
|
||||
@@ -315,6 +324,10 @@
|
||||
- API 对接
|
||||
- 本地 helper
|
||||
|
||||
补充:
|
||||
|
||||
- 本地 helper 除了收信与验证码读取,还提供账号运行历史文本追加接口。
|
||||
|
||||
### 7.3 LuckMail
|
||||
|
||||
组成:
|
||||
@@ -345,8 +358,9 @@
|
||||
- 立即停止
|
||||
- 当前轮重试
|
||||
- 下一轮继续
|
||||
6. 如果配置了线程间隔,则挂计时计划
|
||||
7. 所有轮次结束后输出汇总
|
||||
6. 当前轮最终失败或被停止时,追加账号运行历史记录
|
||||
7. 如果配置了线程间隔,则挂计时计划
|
||||
8. 所有轮次结束后输出汇总
|
||||
|
||||
## 9. 新增功能时最容易漏掉的地方
|
||||
|
||||
|
||||
Reference in New Issue
Block a user