Skip to content

v1.20.0

Choose a tag to compare

@riba2534 riba2534 released this 14 Apr 09:26
· 754 commits to main since this release

✨ 新特性:原生读取 P2P 私聊

飞书 Open API 对 msg get 在 p2p 消息上有硬限制(230013 / 230001),过去 CLI 读不了私聊。v1.20.0 补上这条通路:

# 一条命令读和某人的私聊(自动搜用户 + 反查 p2p chat_id + 读消息)
feishu-cli msg history --user-email user@example.com --page-size 50 -o json

# 已知 open_id 时直接传
feishu-cli msg history --user-id ou_xxx -o json

底层把官方 lark-cli 用到但公开文档里没有的端点 POST /open-apis/im/v1/chat_p2p/batch_query 接了进来,读到 p2p chat_id 后复用标准的 GET /open-apis/im/v1/messages,和群聊走同一条路径。

🔧 user search 升级

  • 新增 --query:按姓名/邮箱/手机号模糊搜索(走 GET /open-apis/search/v1/user),返回 open_id、user_id、部门
  • --email / --mobile:有 User Token 时自动补 open_id 和姓名(之前只返回 email 或 user_id)

📝 需要的 scope

  • im:message.p2p_msg:get_as_user — 读私聊
  • contact:user:search — user search --query / --email 补 open_id、msg history --user-email 内部搜用户

🐛 Bug 修复

  • deleteContainerAutoEmptyBlock 不透传 user token 的问题 — 用户使用 --user-access-token 时 QuoteContainer/Callout 空块清理不会再退回 app token

📚 文档 / 技能

  • skills/feishu-cli-chat/SKILL.md 场景二重写(删掉 "搜索 + 筛选" 的绕路做法,改为 msg history --user-email 直给)
  • CLAUDE.md 命令速查补 msg history --user-email/--user-id 与 user search --query