Spaces:
Paused
Paused
Commit History
-
fix(oauth): handle account-chooser page in stage-2 consent loop (click own account to continue to Codex) - final piece for fresh oauth account token
Verified signature829ffd2 -
fix(oauth): complete about-you (name/age + Finish creating account) in stage-2 fresh re-login so fresh accounts finish creation before consent
Verified signaturee97978a -
fix(oauth): warm chatgpt.com session (cf wait + nextauth refresh) before personal workspace getOrCreate in stage-2, so fresh OAuth accounts populate workspaces[] and obtain a token
Verified signature4ce7ddd -
fix(entrypoint): normalize to LF line endings (CRLF broke shebang exec)
Verified signature8ee19d1 -
fix(entrypoint): FUSE-safe chmod/mkdir so /app/data bucket mount cannot crash boot
Verified signaturee7e5a85 -
feat: /api/tasks/oauth-fill endpoint + auto-check oauth_first wiring
Verified signaturea66b0f1 -
feat: cmd_oauth_fill + team-independent oauth-fill trigger
Verified signature23e6307 -
feat: oauth_first mode accepted in setup api
Verified signature2f502eb -
feat: oauth_first mode validation
Verified signature0488a47 -
feat: oauth_first mode - create personal free accounts via codex OAuth (skip chatgpt signup + team invite)
Verified signature1bc9e21
-
fix(web): drop client-side /api requirement for cf_temp_email base_url (worker-direct uses root); let backend probe validate
Verified signature4864427 -
docs(setup): clarify CLOUDMAIL_BASE_URL /api rule (worker-direct vs Pages frontend)
Verified signature5978acc -
fix(probe): add limit/offset params to /admin/address (cf_temp_email returns 400 Invalid limit without them)
Verified signature18ae909
-
chore(hf): add Space front-matter on top of github 25aa943
Looknicemmcbaa2a4 -
fix: align protected seat rotation semantics
25aa943
-
docs: record registration credential readiness contract
c31d32e -
fix: require credential readiness for registration success
c5810eb
-
test: lock grace account sync exclusion
27e213d -
fix: align provider auth seat semantics
c73b0b0
-
fix: reduce rotation probe interference
be34853 -
fix: sync rotation account creation strategy
120638a -
fix: complete autoteam-1 parity migration
ceeba19 -
fix: absorb autoteam-1 auth and CPA quota parity
e49e827
-
chore: record journal
efad4b5 -
chore(task): archive 05-19-autoteam1-seat-rotation-hardening-migration
d8f55d5 -
fix: harden seat rotation and direct signup race
05bf6da
-
feat: add multi-master Team fill scheduler
ead7e93 -
fix: 对齐注册轮转链路和 CloudMail 配置提示
5aff1af
-
求赞QAQ
方寒Unverified signature1060eb4 -
docs: 更新 README 的免费号主路径与上游差异表
4d4ad05 -
feat: AutoTeam 大版本升级:安全轮换、并行、IPv6、指纹加固与前端重构
- 安全轮换逻辑:先踢人再换人,降低轮转冲突和失败回弹 - 并行能力:同步、注册与目标分发链路并发化,整体吞吐更高 - IPv6 支持:接入 IPv6 代理池与状态面,扩展可用出口 - 更安全的指纹:统一浏览器上下文与启动/会话参数,减少特征暴露 - 轮转增强:速度与安全性双提升,轮转后凭证即时同步到配置目标 - 更好的前端:Dashboard / Settings / Sync / Task 视图全面重构,实时性、信息密度和可读性提升 - 同步与诊断:统一 sync_targets 分发层,增强主号、注册和轮转后的诊断与目标同步1f4cfcb -
docs: record ipv6 proxy migration evidence
3add1eb -
feat: add ipv6 proxy pool and status surface
8543971
-
docs: sync 0515 hardening spec and audit artifacts
82bb57d -
fix: harden Playwright and HTTP transport cleanup
a011d67 -
Harden AutoTeam runtime and free registration
90694b4
-
fix(round-12): wire up dead helpers + integration fixes (per audit reports)
Audit (research/review-integration.md + review-deep.md) found that round-12 landed helpers but never wired them into the production call path. This commit closes the loop: Critical - C1: _record_auth_repair_failure + _auth_repair_skip_reason + _auth_repair_reset now fire from reinvite_account 4 failure paths (no_bundle / plan_drift / plan_unsupported / oauth_phone_blocked), the success path resets state, and _reuse_one_standby skips accounts in auth_repair cooldown / paused. - C2: apply_pool_health_signal now fires from master_health.py:733 (_apply_master_degraded_classification) and api.py master-health endpoint, so 3 consecutive unhealthy probes trigger pool failover. - C3: cmd_rotate auto-downgrades ROTATE_CONCURRENCY>1 to serial (Playwright sync_api is not thread-safe across BrowserContexts). Comment corrected. Opt-out via ROTATE_CONCURRENCY_ALLOW_BROWSER_RACE=1 for mocked tests. Major - M1: sync_account_states 9 direct status writes routed through update_account …70a6b78 -
feat(round-12 S7): multi team workspace pool + auto failover
新增 src/autoteam/workspace_pool.py — WorkspacePool 持久化 K 个 team workspace 互为冷备(active=1, warm/cold N-1)。主 workspace 连续探测失败 ≥ MASTER_HEALTH_FAIL_THRESHOLD (默认 3)秒切到 warm。register / set_active / mark_unhealthy / mark_healthy 全部 追加 transition_log,与 S1 default_machine 风格一致(原子写 + .bak 回滚 + lock-外 事件总线)。 admin_state.get_admin_email / get_chatgpt_account_id 改为路由 active workspace 的 admin_email / account_id;pool 空时回退原 state.json 读路径,单 workspace 模 式向后兼容。master_health 新增 apply_pool_health_signal helper:probe healthy → mark_healthy 重置 fail_count;subscription_cancelled / auth_invalid / workspace_missing / role_not_owner → mark_unhealthy 累计触发故障切换; network_error 视为瞬时不计入。cpa_sync 新增 get_active_sync_target helper + sync_main_codex_to_cpa 上报当前 active workspace identity。 测试 35 case 覆盖:基础注册/激活/idempotent/重复 id 拒绝、set_active 切换/降级、 mark_unhealthy 阈值前不切换 + 阈值触发 failover + 无候选 → active=None + force_failover、failover 候选选最旧 warm、mark_healthy 重置、transition_log 完整、原子写 .bak 回滚(模拟 os.replace 失败)、admin_state 路由 + …60afec4 -
feat(round-12 S5+S6): predictive preempt + concurrent rotate
S5 - 预测式抢先替换: - 新增 src/autoteam/quota_predictor.py: QuotaPredictor 累积配额历史 到 quota_history.jsonl, 最小二乘线性拟合预测耗尽时刻; - record() / load_history(max_points) / predict_exhaust_time() / should_preempt(lead_minutes) - < 3 数据点 / slope >= 0 / 数值异常 → None (永不导致误触发) - cmd_rotate 加 [2.5/5] 预测分支(PREDICTIVE_ENABLED 默认 false 安全): 遍历 ACTIVE 子号, record 当前 last_quota → should_preempt 命中 则 remove_from_team + update_account(STANDBY, _reason="predictive_preempt"), 让 S3 既有 vacancy 兜底自动接管替换流程. - 新增 config: PREDICTIVE_ENABLED / PREDICTIVE_LEAD_MIN(默认 15) / PREDICTIVE_HISTORY_FILE. S6 - 并发批量替换: - 抽出模块级 _reuse_one_standby(acc, threshold, *, chatgpt_provider, mail_provider, reinvite_fn, quota_fn, now) — 单席位完整复用流程, 失败收敛成 result={"reused"|"skipped_quota"|"skipped_auto"|"failed"}, 绝不向上抛(并发模式下不能让单席位毒化兄弟). - cmd_rotate standby 复用循环改造: ROTATE_CONCURRENCY<=1 走串行 (完全等同改造前老行为, 测试可复现); >=2 走 ThreadPoolExecutor 动态 submit(达到 vacancies 即停止派发, 等剩余 in-flight 收尾). - accounts.py 新增 _accounts_io_lock (R…8577b73 -
feat(round-12 S4): register dual-path with mail provider fallback
- mail/register_dual_path.py: RegisterPathRotator + classify_register_failure (OTP_TIMEOUT / INVITE_LINK_MISSING / DOMAIN_REJECTED 触发切换;OTHER 不切), 复用 S2 _FailureTracker 状态文件;聚合 RegisterPathExhausted + provider_chain_history. - mail/alias_reader_pair.py: AliasWithReaderProvider 把 alias(addy_io/simplelogin)写 + reader(maillab/cf)读组合成单 MailProvider,覆盖 alias forwarding 无 inbox 留白. - manager.py: 模块级 _get_mail_client_for_account / _resolve_mail_client_or_default, 让 _complete_registration / create_account_direct / create_new_account 三入口 接受 mail_client=None + acc= 路由,完全向后兼容. - register_failures.py: 新增 MAIL_OTP_TIMEOUT / MAIL_INVITE_LINK_MISSING / MAIL_DOMAIN_REJECTED category 常量;**extra 透传 provider_chain_history(旧记录 无该字段照样能读).schema 不动. - tests/unit/test_round12_s4_register_dual_path.py: 34 case 覆盖分类器 / rotator 7+ 分支 / alias-reader 分发 / register_failures 兼容 / manager 入口 mail_client=None.19162c0 -
feat(round-12 S3): cherry-pick upstream team rotate (per S0 diff report)
Per .trellis/tasks/05-11-s0-upstream-team-rotate-diff/research/upstream-diff.md, 回贴上游 9 team-rotate 函数中标 ✓ 应回贴 / ⚠ 需 S1 适配 的部分。 A. 应回贴 (独立, 无 S1 依赖): - invite_to_team(chatgpt_api, email, seat_type) — 模块级 helper, 上游 .upstream/manager.py:1209 直接回贴 (本地 invite_member 已自带 fallback, 此 helper 提供 bool 语义 + 不必走完整 OAuth 即可邀请). - signup_profile.py 新模块 + register_with_invite(signup_profile=) 可选参, 让注册 about-you 与 Codex OAuth about-you 拿到一致姓名/生日/年龄, 降低 OpenAI 风控触发率 (向后兼容, 默认 None 保持原 random 行为). B. cmd_rotate 部分回贴 (无 S1 依赖): - _pool_active_target / _count_pool_active_accounts / _count_local_team_seat_accounts / _estimate_local_team_member_count — 纯计数 helper. - vacancy 兜底改用 _estimate_local_team_member_count (含 ACTIVE + EXHAUSTED + AUTH_INVALID + 主号), 替代旧 STATUS_ACTIVE 单字段统计. - 终止条件追加双指标 pool_active >= ACTIVE_TARGET (避免 "Team 满 5 但本地全是 standby/auth_invalid → 实际可用 0" 假满足). - ensure_account_mail(acc) 按 acc.mail_provider / mail_account_id / cloudmail_account_id 路由 mail client + 缓存复用 (…c44b475 -
feat(round-12 F2+F3): rotate progress SSE + refresh polish + settings cleanup
后端: - /api/rotate/stream FastAPI StreamingResponse SSE 端点,订阅 S1 default_machine.subscribe 事件总线,把 transition 序列化为 data: {email, from, to, reason, ts, extra}\n\n - _build_sse_event_stream(machine, heartbeat_seconds=15) 抽出可单测的 sync generator;queue.SimpleQueue 中转 callback → generator,线程安全; try/finally 确保 generator 关闭时 unsubscribe (无订阅泄漏) - 心跳:queue.get(timeout=15) 触发 ': heartbeat\n\n' 注释行 - response headers: Cache-Control: no-cache + X-Accel-Buffering: no - 5 个单测覆盖:retry/connected 头、data event payload、heartbeat、 generator close → unsubscribe、extra 字段透传 前端: - web/src/composables/useRotateStream.js 新建,EventSource 包装, 暴露 events (max 50, 倒序) + isConnected + connect/disconnect + onTransition(cb);连续 5 次重连失败后 stop - useStatus.js 新增 useStatusQuery (vue-query 30s polling + refetchOnWindowFocus + keepPreviousData) + useStatusInvalidator (SSE event → invalidateQueries(['status']));原 21 套 utility 函数全保留,21 个组件 import 不破 - TaskPanel.vue 集成实时进度折叠面板:Activity/Check/AlertTriangle Luci…5db48a2 -
feat(round-12 S2): mail provider fallback chain + addy.io + simplelogin
- 新增 FallbackMailProvider:按优先级尝试一组 provider,失败计数 / cooldown / blocked / 全失败聚合异常,可被 MAIL_PROVIDER_CHAIN env 直接驱动 - 新增 AddyIoClient (Tier 2 主推) — 自托管 alias forwarding,自定义域名 绕过 OpenAI disposable 黑名单;Bearer token + REST API 完整覆盖 ABC - 新增 SimpleLoginClient (Tier 2 备选 SaaS) — Authentication header + 翻页 - 配置缺失统一抛 MailProviderUnavailable,fallback 链跳过不计入失败 - mail/__init__.py 工厂支持 chain 模式;无 chain 环境变量时保持单 provider 向后兼容(零回归) - 失败状态文件 mail_provider_state.json(.gitignore 已加),不污染 既有 register_failures.json schema - 52 个新单元测试(全 mock,无真实 HTTP/部署依赖) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>5041525 -
feat(round-12 F1): bright theme + lucide + vue-query
- tailwind.config.js 重写为 AutoTeam Bright v1: ink palette → 中性灰阶, 新增 canvas/surface/hairline 语义 token,boxShadow glow-* → 轻盈 elevation - style.css 翻转: body bg → #fafafa,.glass/.glass-soft → 白卡 1px hairline, .shimmer-bg/.row-hoverable/scrollbar/focus-ring 全部明亮化 - 加 §Compat 兼容层 (style.css @layer utilities) 一次性翻转旧深色 utility (text-white/text-gray-X/bg-white|black/[X]/bg-gray-700~900/border-white/[X]/ text-{tone}-200~300),避免逐文件改 21 套类名 - main.js 接入 @tanstack/vue-query: refetchOnWindowFocus + staleTime 30s - App.vue 主区域包 <Transition mode="out-in" name="page"> 120-180ms ease-out - emoji → lucide-vue-next: Sidebar (8 nav + RefreshCw + LogOut) / TaskPanel (9 actions: RotateCw/ChartPie/Plus/Coins/UserPlus/Brush/ RefreshCw/Download/Users) / UsabilityCell (CircleCheck/TriangleAlert/ Hourglass/CircleX) - AtButton primary/danger 渐变改用 .text-on-accent 绕过 §Compat 翻转, 保留白前景;secondary/ghost 改用 ink-* 灰阶 - TaskPanel actionColorClass 改 Bright v1 浅 tone (bg-{tone}-50) - HealthDonut 背景圈 stroke 改…2204456 -
feat(round-12 S1): account state machine + transition log + event bus
Round 12 S1 — `src/autoteam/account_state.py` 收敛了散落在 manager/api/master_health 的 17+ 处 `update_account(email, status=...)` 写入,引入显式状态机做合法性校验、原子追加写 `state_log.jsonl` 并向订阅者广播 `Transition`。 - AccountState Enum 8 个成员,字符串 value 与现有 STATUS_* 字面量 1:1 对齐 → accounts.json 无需 schema 迁移 - IllegalTransitionError 拦截所有越级转移(如 ARCHIVED → EXHAUSTED) - StateMachine 提供 transition / get_legal_transitions / subscribe / unsubscribe - _write_state_log 走「snapshot .bak → write .tmp → os.replace → unlink .bak」原子追加;rollback 路径有单测覆盖 - 事件总线 threading.Lock + 列表,subscriber 抛异常不影响其他订阅者,并发 20 线程订阅/发布无死锁 - accounts.add_account/update_account 内部走 default_machine.transition,公共 API 签名不变 - migrate_legacy_status 一次性迁移工具,None status → "pending",未知字面量进 unknown 列表 - 64 个新单测 + 现有 524 测试全过,ruff 全绿 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ef1637c
-
feat(round-11): codex smoke v2 schema + 双失效预筛 + ⚠️ 子号注册新双路径
P1-3 — cheap_codex_smoke v2 schema 升级(实测 OpenAI codex backend 全字段): - gpt-5 已废弃 → 默认 gpt-5.5(team-only),fallback gpt-5.4(通用) - instructions 必填 / input 改 list / store=false 必填 / 移除 max_output_tokens - 4xx body 含 "not supported" 自动触发 fallback chain - 兼容 24h cache + alive dict 返回结构(含 response_text) V7 — 双失效预筛(cmd_check): - access_token + refresh_token 同时被 server-side invalidate 时直接标 AUTH_INVALID - 跳过昂贵的 Playwright 重登(子号被踢出后无法救活) V8 — personal_workspace_id 透传: - accounts.py 加字段持久化 OAuth 时 fetch 的 personal workspace UUID - 下次 OAuth 复用,避免重复 fetch spec / tests: - prompts/0426/spec/shared/quota-classification.md v1.4 → v1.5(v2 schema 实证) - tests/unit/test_round11_cheap_codex_smoke_v2.py(18 case 覆盖 v2 schema + fallback + error matrix) - tests/unit/test_round11_v7_token_pair_invalidated.py(双失效预筛) - tests/unit/test_round11_v12_nextauth_fallback.py(NextAuth fast-path) ⚠️ AC7 实测未完成 + 子号注册新双路径(spike-only,生产代码未升级): - 母号 team 订阅本月失效 + 子号通过 invite 共享母号 plan(配额满 429) - 新发现两条 free 号注册路径: 1. Phase B…cf83da4
-
feat(round-11): master grace healthy + 子号实时探活 + smoke model + ⚠️ 免费号注册路径被 OpenAI 阻断
后端核心: - master_health._classify_l1 加 id_token 参数,从 codex-main-*.json 读 admin id_token, eligible_for_auto_reactivation=true 时分 grace_until 两支:grace 期内 → (True, "subscription_grace"), 否则 → (False, "subscription_cancelled"). M-I3 守卫扩 healthy_reasons=("active","subscription_grace"), 撤回路径触发条件同步扩展. - cheap_codex_smoke 加 model + max_output_tokens 参数,读完整 SSE 流到 response.completed, 返回 dict 含 response_text + raw_event + tokens 替代旧 str. - api.py 新增 POST /api/accounts/{email}/probe(并行 quota+smoke 不动 status, RT-I1) + GET /api/accounts/{email}/models. - chatgpt_api._api_fetch header sanitize: ISO-8859-1 round-trip + None skip + bytes decode + warning 诊断 (实测过程中发现的 admin 重登路径 P0 阻塞修复). 前端: useStatus.masterHealthSeverity grace→warning;MasterHealthBanner/PoolHealthCard grace 黄色 + 倒计时;Dashboard 每行"立即探活"按钮 + toast 三态. 测试: Round 11 新增 26 cases(8 grace + 6 smoke + 8 probe + 4 header sanitize), pytest tests/unit -q → 256 passed,ruff check → All checks passed. Spec: master-subscription-health v…090976a
-
fix(round-10): 主号 Codex OAuth via session_token 落登录页修复
Approach A:把 login_codex_via_session() 1003-1177 行的遗留 inline Playwright 实现替换为 thin wrapper,委托给 SessionCodexAuthFlow(对齐 upstream cnitlrt/AutoTeam:1017-1043)。 根因:旧实现在 email-input 页 fallback 跳 chatgpt.com/auth/login 重试 — 这条 fallback upstream 没有且实际无效(只刷新 chatgpt.com 域,不影响 auth.openai.com session)。SessionCodexAuthFlow 内 _advance → _auto_fill_email 在 email-input 页自动填 admin email 然后继续 OAuth consent — upstream 已实证可用。 变更: - src/autoteam/codex_auth.py: -169/+38 (净 -131 行,login_codex_via_session 175 → 37 行) - tests/unit/test_round10_master_codex_session.py: 新增 7 个 case · wrapper happy path / fail path / exception 传播 + finally · refresh_main_auth_file 双路(success/None) · SessionCodexAuthFlow 必含方法的前置条件检查 · _inject_auth_cookies if self.account_id 守卫静态扫描 - tests/manual/test_round10_dryrun.py: AC6 dry-run 端到端验证脚本 - tests/unit/test_round{6,7}_patches.py: ruff baseline self-fix 9 处 import 排序 - prompts/0426/spec/shared/master-auth-file.md: 新增 SPEC-Shared v1.0 描述 admin session → SessionCodexA…2525f56 -
feat(round-9): GRACE 状态机 + retroactive helper 5 触发点 + 前端 UI/UX 美化整套
修复 Round 8 留下的 retroactive 触发点空洞 + grace period 配额损失问题: 研究证实母号 b328bd37 处于 cancel_at_period_end 状态(grace 期至 2026-05-25T12:06:23Z), 4 个 xsuuhfn wham=200 plan=team 仍可用,Round 8 spec "立刻标 standby" 会损失配额。 状态错误根因:_reconcile_master_degraded_subaccounts 只挂 cmd_reconcile,server 重启 / sync / 巡检都不触发 retroactive 重分类。 Approach B — STATUS_DEGRADED_GRACE 状态机 + 5 触发点 helper + 前端 UI/UX 重做: 后端(B1~B5) - accounts.py 新增 STATUS_DEGRADED_GRACE 状态 + grace_until 字段持久化 - master_health.py 新增 extract_grace_until_from_jwt() 解析 subscription_active_until - master_health.py 新增 _apply_master_degraded_classification helper(永不抛、永不被 KICK) - 5 retroactive 触发点接入(RT-1 lifespan / RT-2 _auto_check_loop / RT-3 reconcile_team / RT-4 sync_account_states / RT-5 cmd_rotate)+ 现有 cmd_reconcile RT-6 - api.py /api/admin/master-health 三层 try/except 兜底,任何场景永不 5xx(M-I1 守恒) - api.py:fill_*_task Team 分支补 master probe 503 fail-fast(对称 personal,Round 8 P1-1) 前端(F1~F6)— 9 新组件 + 11 重写 - F1 实际可用列(UsabilityCell.vue):基于 status + last_quota + …395e9dc -
feat(round-8): master 订阅探针 + OAuth Personal Workspace 显式选 + 5 次重试
修复两层耦合根因(母号 ChatGPT Team 订阅过期 + OAuth sticky default_workspace_id): 研究证实根因不是 OpenAI sticky-rejoin,而是 auth.openai.com 的 default_workspace_id 不随 ChatGPT DELETE user 联动,导致 personal OAuth 默认仍颁 plan_type=team token。 sleep(8) 等再久也无意义。28 条 register_failures plan_drift 来源于此。 Approach A 全栈三层 + 边缘清理: L1 — master subscription 探针(src/autoteam/master_health.py 新模块) - is_master_subscription_healthy() 三层探针:eligible_for_auto_reactivation(主) + plan_type 反推(corroborating) + /settings.plan(safety net) - 5min cache schema_version=1,落 accounts/.master_health_cache.json - 7 类返回(healthy / degraded / cancelled / network_error / ...) - /api/admin/diagnose 嵌入 master_subscription_state + 新增 /api/admin/master-health L2 — OAuth Personal Workspace 显式选号(src/autoteam/oauth_workspace.py 新模块) - decode/select/UI fallback/ensure 四件套:HTTP POST workspace/select 主路径 + Playwright UI fallback(401 自动降级),覆盖 oai-oauth-session 解码场景 - codex_auth.py login_codex_via_browser(use_personal=True) consent loop 后调 ensure_personal…e6cc775