Feat/lark chat rename skill - #643
Open
ammend wants to merge 2 commits into
Open
Conversation
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.
背景
botmux 在飞书群内持续运行时,群名称无法随任务目标和阶段变化自动更新。用户需要手工改名,群名容易与当前工作状态脱节。
本 PR 新增受控的群改名能力,让用户明确要求时,或 AI 判断任务进入关键阶段时,可以由当前群内的 bot 修改当前飞书群名称。
改动内容
botmux-chat-renamebotmux skill show渐进披露机制提供完整说明/api/sessions/:sessionId/chat-renamechatId或切换其他 bot 身份im.v1.chat.update--proactive请求按 bot + chat 应用 10 分钟冷却rate_limited和剩余等待时间not_group_chatbot_not_in_chatinvalid_chat_namepermission_deniedrate_limitedlark_api_errorchatDisplayName缓存,并记录结构化审计日志。docs/design/2026-07-28-lark-chat-rename-skill-requirement.md为什么这样设计
群改名是有外部副作用的写操作,因此能力被限制在当前会话和当前 bot 身份内。AI 无法传入任意群 ID,也不能借用其他 bot 的凭据,从而避免跨群或跨身份越权。
用户明确要求的改名可直接执行;AI 主动改名则需要显式传入
--proactive,并受防抖限制,避免群名随细小进度频繁变化。影响范围
not_group_chat测试验证
执行过:
结果:
/proc/<pid>/comm返回MainThread,既有用例预期node飞书实测
使用真实飞书群完成写入、读取确认和恢复:
4栋2034栋203|botmux改名实测4栋203两次
chat.update均返回ok=true, changed=true。已知边界
--proactive冷却状态保存在 daemon 进程内,daemon 重启后不会保留。