Skip to content

接入 MaDao 统一接码并收敛 provider 换号链路#288

Open
netcookies wants to merge 7 commits into
QLHazyCoder:devfrom
netcookies:feature/madao-unified-sms
Open

接入 MaDao 统一接码并收敛 provider 换号链路#288
netcookies wants to merge 7 commits into
QLHazyCoder:devfrom
netcookies:feature/madao-unified-sms

Conversation

@netcookies
Copy link
Copy Markdown
Contributor

背景

本次改动把 FlowPilot 的手机接码能力进一步收敛到 MaDao 统一后端,同时保留原有分散式 provider 能力,避免一次性切断现有链路。

除了接入 MaDao direct / routing_plan 两种模式,这次也把 provider registry 的契约补齐,并修正了第 9 步在 MaDao routing replace 场景下的换号状态处理问题。

主要改动

  1. 接入 MaDao 统一接码后端
  • 新增 MaDao provider 适配层,支持 acquire / poll / release
  • 支持 directrouting_plan 两种模式
  • routing_plan 模式下,换号改为优先走 /api/routing/replace
  1. 收敛接码 provider registry
  • 补齐 PhoneSmsProviderRegistry.createProvider('madao')
  • 新增 NexSMS 独立 provider 模块并接入 background.jssidepanel 加载入口
  • 删除 background/phone-verification-flow.js 中对 provider adapter 的 fallback,统一通过 registry 构造
  1. 收敛侧边栏 MaDao 配置与显隐
  • routing_plandirect 参数按模式互斥显示
  • 选中 MaDao 时显示仓库入口按钮
  • 隐藏在 MaDao 模式下无效的共享复用与价格查询项
  • 调整文案,明确哪些参数在 MaDao 模式下真实生效
  1. 修正第 9 步换号状态流
  • 修复 MaDao routing_plan 下,某些分支先拿到 nextActivation 后,又把新号码继续当旧号码做清理/封禁的问题
  • 主流程中拆分失败号码与替换后的新号码,避免双重换号和误清理

验证

已执行:

  • node --test tests/phone-verification-flow.test.js tests/phone-sms-provider-registry.test.js
  • node --check background/phone-verification-flow.js
  • node --check phone-sms/providers/nexsms.js
  • git diff --check

影响说明

  • 保留 HeroSMS / 5sim / NexSMS 原有能力
  • MaDao 模式下,第 9 步换号会优先复用 MaDao 路由替换能力,而不是简单 release + reacquire
  • 未提交 .workflow/ 目录内容

netcookies and others added 7 commits May 25, 2026 01:10
新增 MaDao 接码 provider,并将 acquire/poll/release 接入手机号验证链路。
侧边栏新增 MaDao 互斥配置模型,支持路由方案与直连参数两种模式,
同时保留 HeroSMS、5sim、NexSMS 的原有分散式直连能力。

同步适配 MaDao 最新国家 canonical 规则:
- madaoCountry 改为保留 ISO alpha-2 与 any/local sentinel
- 运行态国家展示按 canonical 值还原可读国家名
- 更新持久化、测试夹具与文档说明
为 MaDao provider 增加 createProvider 导出,和统一 provider registry 契约保持一致。
补充真实模块回归测试,避免假桩掩盖 registry 与模块导出不一致的问题。
收敛 MaDao 模式下的接码设置显隐规则,隐藏未对接或无效的共享接码项。
补充 direct 与 routing_plan 模式文案及回归测试,避免不同服务商下的价格区文案混淆。
在 MaDao 模式下隐藏冗余的路由方案说明行,避免与已收敛后的参数显隐重复表达。
同步更新侧边栏回归测试断言。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants