Skip to content

feat(channels): integrate WeCom, Feishu, DingTalk and Telegram gateways#19

Open
lien0219 wants to merge 799 commits into
mainfrom
feature/channel-gateway
Open

feat(channels): integrate WeCom, Feishu, DingTalk and Telegram gateways#19
lien0219 wants to merge 799 commits into
mainfrom
feature/channel-gateway

Conversation

@lien0219

@lien0219 lien0219 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

概述

实现 OpenXFlow 多渠道消息网关,统一接入企业微信、飞书、钉钉和 Telegram,并按生产级目标完善共享访问、服务身份、上下文隔离、持久化队列、消息审计、文件安全、Provider 回调安全和管理体验。

当前开发状态

本 PR 的生产功能实现已进入最终自动化收口阶段,尚未开始人工验收;人工验收完成前不合并到 main

已完成

  • 四平台统一 Provider Adapter、事件模型、能力模型和运行时工厂
  • 渠道连接、外部身份、自动发现会话、账号绑定和自定义指令
  • shared / bound_only / hybrid 访问策略
  • 成员隔离、群共享上下文和 Telegram 主题/线程级上下文隔离
  • 自动创建不可登录、非管理员的独立 Channel Service Identity
  • 服务身份仅执行连接、会话或指令显式授予的工作流 UUID
  • 共享路由使用服务身份、个人路由使用绑定用户身份
  • 统一群聊响应模式:mention_only / all_messages / commands_only / disabled
  • 能力驱动的处理中占位消息、消息更新和跨渠道响应策略
  • 渠道执行状态、执行身份、消息记录和出站投递幂等
  • 数据库持久化 Webhook 任务、租约恢复、失败重试和严格 FIFO
  • 同上下文串行,不同成员与会话并行
  • 连接并发、单用户排队、频率限制、每日配额、排队超时和任务超时
  • HTTP Webhook 与钉钉 Stream 统一进入持久化任务链路
  • 四渠道文件下载、资产跟踪、知识库处理和服务身份知识库授权
  • 文件内容类型校验、恶意文件扫描、压缩包遍历/炸弹和可执行文件伪装防护
  • Token 缓存、刷新、失效恢复和连接级运行指标
  • 投递重试、配置审计和消息中心筛选
  • 渠道中心生产配置、会话覆盖、账号、指令和运行记录管理体验
  • Telegram Webhook Secret、飞书 Verification Token、企微 EncodingAESKey 等 Provider 凭据前后端校验
  • Telegram UTF-16 mention 解析、钉钉/企微回调时效验证和适配器 fail-closed 校验
  • 受影响的认证、会话清理和进度跟踪 Playwright 用例稳定性修复

已完成专项回归

  • 生产访问策略与上下文主链路:65 项回归测试通过
  • 持久化 FIFO 队列主链路:53 项回归测试通过
  • Provider 安全与渠道网关专项:Python 3.14、Ruff、编译、后端回归、前端 Biome 和生产 UI 契约测试通过
  • 五项失败工作流已通过独立修复工作流验证,并以单个 squash 提交合入 feature/channel-gateway

最终收口中

  • 执行 feature/channel-gateway 最新提交的仓库级自动化检查
  • Test Docker Images 若长期仅处于 queued、尚未实际执行,按项目负责人授权不阻塞后续阶段
  • 汇总最终自动化结果并准备人工验收清单

自动化要求

每个阶段执行:

  • Ruff 格式与静态检查
  • Python 编译检查
  • 渠道专项回归测试
  • 前端格式、单元测试和 TypeScript 检查
  • SQLite/PostgreSQL 迁移校验
  • 最终仓库级 CI(长期排队且未执行的 Docker 检查不作为阻塞项)

人工验收状态

  • 后端生产链路完整实现
  • 前端生产管理能力完整实现
  • 四渠道能力矩阵与实际适配器一致
  • 安全、队列、消息、文件和审计专项自动化检查通过
  • 已实际执行的仓库级关键 CI 全部通过
  • 进入人工验收
  • 人工验收完成后合并

@github-actions

Copy link
Copy Markdown
Contributor

Migration Validation Passed

All migrations follow the Expand-Contract pattern correctly.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 23, 2026
@autofix-troubleshooter

Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 24, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the enhancement New feature or request label Jul 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 41%
41.65% (58705/140922) 68.98% (7906/11461) 41.08% (1304/3174)

Unit Test Results

Tests Skipped Failures Errors Time
4991 0 💤 0 ❌ 0 🔥 13m 27s ⏱️

@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 41%
41.77% (58705/140525) 68.98% (7906/11461) 41.08% (1304/3174)

Unit Test Results

Tests Skipped Failures Errors Time
4991 0 💤 0 ❌ 0 🔥 14m 56s ⏱️

@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 41%
41.77% (58705/140525) 68.97% (7905/11460) 41.08% (1304/3174)

Unit Test Results

Tests Skipped Failures Errors Time
4991 0 💤 0 ❌ 0 🔥 14m 5s ⏱️

@github-actions

Copy link
Copy Markdown
Contributor

Build successful! ✅
Docs draft deployment skipped because this repository has no deployment credentials configured.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 41%
41.77% (58705/140525) 68.98% (7906/11461) 41.08% (1304/3174)

Unit Test Results

Tests Skipped Failures Errors Time
4991 0 💤 0 ❌ 0 🔥 12m 55s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants