Repository navigation
feat(vc-agent): VC会议监听bot自动配置完善 - #412
Merged
Merged
Conversation
- 选择监听bot时自动设置 meetingConsumer.enabled=true(保留已有嵌套配置) - 新增 lark-cli 版本检查(>=1.0.66 才支持 --as bot) - 开放平台自动化前置:先配 scope/事件再写 bots.json,失败不残留半配置 - lark brand bot 跳过开放平台自动化(feishu.cn only) - invalid_session/missing_csrf 纳入硬失败QR分支 - 事件订阅多格式 fallback(event/update -> event_callback/update) - 删除死代码 fetchGrantedScopesForBotConfig + larkHosts import - 前端展示 lark-cli 版本状态(合格/过低/未安装) - polling-source 改用 lark-cli vc +meeting-* --as bot 便捷命令
1. QR 码返回时还没生成:feishuLogin.start() 立即返回 starting 快照, 二维码在异步 onQrCode 回调里稍后才写入。新增 waitForFeishuLoginQr() 在 start() 后轮询等待 qrDataUrl 就绪(最多 8s),确保前端能拿到 可渲染的二维码图片而不是空值。 2. scope/event 自动配置失败仍保存:automateOpenPlatformSetup 失败时 非登录原因只 warn 不阻断,scope 导入失败变 scopeWarning 但仍 ok。 新增 validateVcMeetingScopesForBot() 在 automation 后用 Feishu API 读实际已授权 scope,缺 VC 权限则拒绝保存为 listener,避免会议事件 黑洞。lark brand bot 也走同样校验。 3. 事件订阅只发 VC 事件可能覆盖 IM/卡片:event/update payload 只有 VC_MEETING_BOT_EVENTS(4个),如果内部接口是替换式会清掉 im.message.receive_v1 和 card.action.trigger。新增 BOT_BASELINE_EVENTS 常量,事件订阅 payload 始终包含基础事件 (im.message.receive_v1 + card.action.trigger)+ VC 事件。
1. 事件订阅全失败时 hard fail:automateOpenPlatformSetup 返回 ok:true 但 eventWarning 存在且 subscribedEventCount===0 时(3个 endpoint 全失败), syncVcMeetingListenerBotConfig 拒绝保存为 listener,避免会议事件黑洞。 2. BOT_BASELINE_EVENTS 补全所有 botmux 已知事件: - im.message.receive_v1 (收消息) - card.action.trigger (卡片交互) - im.chat.member.bot.added_v1 (被拉群自动开工) - drive.file.comment_add_v1 (文档评论) - drive.notice.comment_add_v1 (文档评论通知) - im.message.reaction.created_v1 / deleted_v1 (表情回应) 确保 replacement-style /event/update 不会清掉非 VC 能力。
边缘路径:event update 全失败后,下游 safe_setting/contact_range/app_version 又失败时,automateOpenPlatformSetup 返回 ok:false reason:api_error,但丢失了 eventWarning/subscribedEventCount 信息。调用方非登录失败分支只校验 scope, scope OK 就继续保存 listener → 会议 invite 黑洞。 修复: 1. ok:false 返回类型增加 subscribedEventCount? + eventWarning? 字段 2. api_error catch 块带上 event 订阅状态 3. syncVcMeetingListenerBotConfig 非登录分支也检查 event 订阅失败, eventWarning 存在且 subscribedEventCount===0 时拒绝保存
deepcoldy
pushed a commit
that referenced
this pull request
Jul 10, 2026
将 dashboard 迁移到 React(esbuild 按页面分包),按统一 UI 规范重构工作台/会话/洞察/工作流/群组/定时/白板/角色/Bot配置/Skills/团队/Webhook/全局设置等页面,沉淀 UI 基准规范与通用组件。含 review 修复(locate 图标/team capability/timezone/DropdownMenu/floating-scrollbars/insights/bot-defaults/legacy-workflow/替身编辑等)+ 集成 master 新功能(#404 会话筛选列/#405 监控室/#409 运行监控页/#412 lark-cli状态+飞书QR/#401 替身/#420 agentbuddy 源)。build 绿、全量 unit 0 非环境失败。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动内容
VC 会议监听 bot 自动配置
选择监听 bot 时自动设置 meetingConsumer
meetingConsumer.enabled = truelark-cli 版本检查
checkLarkCliVersion()检测 lark-cli 版本vc +meeting-join --as bot)开放平台自动化前置 + lark brand 跳过
brand: 'lark'的 bot 跳过自动化(feishu.cn only),不阻塞保存事件订阅多格式 fallback
polling-source 改用便捷命令
lark-cli vc +meeting-* --as bot清理死代码
fetchGrantedScopesForBotConfig(50 行)larkHostsimport测试
pnpm test -- test/setup-open-platform-automation.test.ts✅ 13 passedpnpm test -- test/settings-write-applier.test.ts test/vc-agent.test.ts✅ 50 passedpnpm build✅git diff --check✅Review
CodeX (@ou_96a1a9afbaff68a3e64a818d30b9193c) 已 review 并确认通过。