[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-m1heng--clawdbot-feishu":3,"tool-m1heng--clawdbot-feishu":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",149489,2,"2026-04-10T11:32:46",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":65,"owner_avatar_url":73,"owner_bio":65,"owner_company":65,"owner_location":65,"owner_email":65,"owner_twitter":74,"owner_website":65,"owner_url":75,"languages":76,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":90,"env_deps":91,"category_tags":95,"github_topics":65,"view_count":32,"oss_zip_url":65,"oss_zip_packed_at":65,"status":17,"created_at":96,"updated_at":97,"faqs":98,"releases":134},6230,"m1heng\u002Fclawdbot-feishu","clawdbot-feishu",null,"clawdbot-feishu 是一款专为 OpenClaw 框架设计的飞书（Feishu\u002FLark）渠道插件，旨在打通人工智能助手与企业办公协作平台之间的连接。它解决了开发者在将 AI 能力集成到飞书环境时面临的配置复杂、权限管理繁琐等痛点，让用户能够直接在飞书聊天窗口中与 AI 进行流畅交互，实现消息的收发与自动化处理。\n\n该工具主要适合具备一定技术背景的开发者、运维人员以及希望构建企业内部 AI 助手的研发团队使用。通过简单的命令行安装和清晰的配置指引，用户可以快速在飞书开放平台创建应用并启用所需权限。其技术亮点在于提供了完善的 Windows 环境兼容性方案，针对常见的安装失败问题给出了多种手动部署策略，确保在不同操作系统下都能稳定运行。此外，项目拥有活跃的中文社区支持，提供详细的配置教程、常见问题解答及使用技巧，大大降低了上手门槛。无论是用于内部知识问答、代码辅助还是业务流程自动化，clawdbot-feishu 都能帮助团队高效地将大模型能力融入日常办公场景。","# clawd-feishu\n\nFeishu\u002FLark (飞书) channel plugin for [OpenClaw](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw).\n\n> **中文社区资料** - 配置教程、常见问题、使用技巧：[Wiki](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fwiki)\n>\n> **Contributing \u002F 贡献指南**: [CONTRIBUTING.md](.\u002FCONTRIBUTING.md)\n>\n> **Issue Reporting \u002F 问题反馈**: Please check [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) first for common solutions, then open a structured Issue Form if needed.  \n> 问题反馈前请先查看 [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) 是否已有常见解答；如仍未解决，再提交结构化 Issue 模板。\n>\n> **Questions \u002F 使用咨询**: Use `Question` issue for troubleshooting; use [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) for open-ended Q&A.  \n> 排查型咨询请提交 `Question` Issue；开放式交流请使用 [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions)。\n\n[English](#english) | [中文](#中文)\n\n---\n\n## Sponsor\n\n![YouYun Zhisuan](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fm1heng_clawdbot-feishu_readme_0d8af466c75a.png)\n\nThanks to our sponsors for supporting the project.\n\nIf you need an API key platform whose models can be used as an OpenClaw provider and work with Kimi, MiniMax, Claude Code, Codex, or direct API usage, YouYun Zhisuan is worth considering:\n\n> UCloud's YouYun Zhisuan is an AI cloud platform that provides stable and comprehensive domestic and international model APIs through a single API key. Its high-value Coding Plan offers both monthly and pay-as-you-go options, typically at 20% to 50% of official pricing. It supports Claude Code, Codex, and direct API integrations, as well as enterprise-grade high concurrency, 24\u002F7 technical support, and self-service invoicing. Register through [this link](https:\u002F\u002Fpassport.compshare.cn\u002Fregister?referral_code=5oWQU772rtSCeExpcLFxwy&ytag=GPU_YY_YX_git_clawdbot-feishu) to receive a free RMB 5 platform trial credit.\n\n感谢赞助方对本项目的支持。\n\n如果你需要一个可作为 OpenClaw 模型 provider，并适用于 Kimi、MiniMax、Claude Code、Codex 或直接 API 调用的稳定 API Key 平台，可以了解一下优云智算：\n\n> 优云智算是UCloud旗下AI云平台，提供稳定、全面的国内外模型API，仅一个key即可调用。主打包月、按量的高性价比 Coding Plan 套餐，基于官方2~5折优惠。支持接入 Claude Code、Codex 及 API 调用。支持企业高并发、7*24技术支持、自助开票。通过[此链接](https:\u002F\u002Fpassport.compshare.cn\u002Fregister?referral_code=5oWQU772rtSCeExpcLFxwy&ytag=GPU_YY_YX_git_clawdbot-feishu)注册的用户，可得免费5元平台体验金！\n\n## English\n\n### Installation\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```\n\n> [!IMPORTANT]\n> **Windows Troubleshooting (`spawn npm ENOENT`)**\n>\n> If `openclaw plugins install` fails, install manually with the latest tarball:\n>\n> ```bash\n> # Option A (recommended): download latest package tarball\n> npm pack @m1heng-clawd\u002Ffeishu\n> openclaw plugins install .\u002Fm1heng-clawd-feishu-\u003Cversion>.tgz\n> ```\n>\n> ```bash\n> # Option B (keep curl flow): resolve latest tarball URL, then download\u002Finstall\n> TARBALL_URL=\"$(npm view @m1heng-clawd\u002Ffeishu dist.tarball)\"\n> curl -L -o feishu-latest.tgz \"$TARBALL_URL\"\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n>\n> ```powershell\n> # Windows PowerShell (Option B)\n> $tarball = npm view @m1heng-clawd\u002Ffeishu dist.tarball\n> curl.exe -L $tarball -o feishu-latest.tgz\n> openclaw plugins install .\\feishu-latest.tgz\n> ```\n>\n> ```bash\n> # Option C (no npm command): use URL template with latest version from npm Versions tab\n> # https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@m1heng-clawd\u002Ffeishu?activeTab=versions\n> curl -L -o feishu-latest.tgz https:\u002F\u002Fregistry.npmjs.org\u002F@m1heng-clawd\u002Ffeishu\u002F-\u002Ffeishu-\u003Cversion>.tgz\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n\n### Upgrade\n\n```bash\nopenclaw plugins update feishu\n```\n\nCheck installed version:\n\n```bash\nopenclaw plugins list | rg -i feishu\n```\n\n### Configuration\n\n1. Create a self-built app on [Feishu Open Platform](https:\u002F\u002Fopen.feishu.cn)\n2. Get your App ID and App Secret from the Credentials page\n3. Enable required permissions (see below)\n4. **Configure event subscriptions** (see below) ⚠️ Important\n5. Configure the plugin:\n\n#### Required Permissions\n\n| Permission | Scope | Description |\n|------------|-------|-------------|\n| `im:message` | Messaging | Send and receive messages |\n| `im:message.p2p_msg:readonly` | DM | Read direct messages to bot |\n| `im:message.group_at_msg:readonly` | Group | Receive @mention messages in groups |\n| `im:message:send_as_bot` | Send | Send messages as the bot |\n| `im:resource` | Media | Upload and download images\u002Ffiles |\n\n#### Optional Permissions\n\n| Permission | Scope | Description |\n|------------|-------|-------------|\n| `contact:user.base:readonly` | User info | Get basic user info (required to resolve sender display names for speaker attribution) |\n| `im:message.group_msg` | Group | Read all group messages (sensitive). Required when you want `requireMention: false` to work for non-@ group messages |\n| `im:message:readonly` | Read | Get message history |\n| `im:message:update` | Edit | Update\u002Fedit sent messages |\n| `im:message:recall` | Recall | Recall sent messages |\n| `im:message.reactions:read` | Reactions | View message reactions |\n\n#### Tool Permissions\n\n**Read-only** (minimum required):\n\n| Permission | Tool | Description |\n|------------|------|-------------|\n| `docx:document:readonly` | `feishu_doc` | Read documents |\n| `drive:drive:readonly` | `feishu_drive` | List folders, get file info |\n| `wiki:wiki:readonly` | `feishu_wiki` | List spaces, list nodes, get node info, search |\n| `bitable:app:readonly` | `feishu_bitable` | Read bitable records and fields |\n| `task:task:read` | `feishu_task_get` | Get task details |\n| `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | Get\u002Flist tasklists |\n| `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | List\u002Fget task comments |\n| `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | List\u002Fget task attachments |\n| `im:chat.announcement:read` | `feishu_chat` | Read group announcement |\n| `im:chat:readonly` | `feishu_chat` | Get chat info, check bot membership |\n| `im:message` or `im:message:readonly` | `feishu_message` | Read single\u002FDM messages |\n| `im:message.group_at_msg:readonly` | `feishu_message` | Read all messages in group chats |\n| `im:message.reactions:read` | `feishu_reaction` | List reactions on messages |\n\n**Read-write** (optional, for create\u002Fedit\u002Fdelete operations):\n\n| Permission | Tool | Description |\n|------------|------|-------------|\n| `docx:document` | `feishu_doc` | Create\u002Fedit documents |\n| `docx:document.block:convert` | `feishu_doc` | Markdown to blocks conversion (required for write\u002Fappend\u002Fcreate_and_write; also used by `feishu_drive.import_document`) |\n| `drive:drive` | `feishu_doc`, `feishu_drive` | Upload images to documents, create folders, move\u002Fdelete files |\n| `wiki:wiki` | `feishu_wiki` | Create\u002Fmove\u002Frename wiki nodes |\n| `bitable:app` | `feishu_bitable` | Create\u002Fupdate\u002Fdelete bitable records and manage fields |\n| `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | Create\u002Fupdate\u002Fdelete tasks |\n| `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | Create\u002Fupdate\u002Fdelete tasklists and manage membership |\n| `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | Create\u002Fupdate\u002Fdelete task comments |\n| `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | Upload\u002Fdelete task attachments |\n| `im:message.urgent` | `feishu_urgent` | Send urgent (buzz) notifications via app (in-app). Use `sms` and `phone` variants (`im:message.urgent:sms`, `im:message.urgent:phone`) for SMS and voice call. |\n| `im:chat.announcement` | `feishu_chat` | Write\u002Fupdate group announcement |\n| `im:chat` | `feishu_chat` | Create and delete group chats |\n| `im:chat.members` | `feishu_chat` | Add members to group chats |\n| `im:message.reactions:write_only` | `feishu_reaction` | Add and remove reactions |\n\n> Task scope names may vary slightly in Feishu console UI. If needed, search for Task \u002F Tasklist \u002F Comment \u002F Attachment-related permissions and grant read\u002Fwrite accordingly.\n\n#### Task Comment Scopes ⚠️\n\nTask comments require dedicated scopes:\n1. Read comments: grant `task:comment:read`.\n2. Create\u002Fupdate\u002Fdelete comments: grant `task:comment:write`.\n\nIf these scopes are missing, comment APIs will return permission-denied errors.\n\n#### Task Attachment Upload ⚠️\n\nTask attachments support upload\u002Fget\u002Flist\u002Fdelete. Upload sources:\n1. Local files on the OpenClaw\u002FNode host (`file_path`)\n2. Remote links (`file_url`, public or presigned)\n\nFor `file_url`, OpenClaw runtime media loader is used with safety checks and size limit (`mediaMaxMb`), then the downloaded file is uploaded via a temporary local file.\n\n#### Tasklist Ownership ⚠️\n\n> **Important:** Keep tasklist owner as the bot. Add users as members instead.\n\nTasklist access is granted based on owner + member roles. If you change the owner to a user and the bot is not a member, the bot may lose permission to read\u002Fedit\u002Fmanage that tasklist (and subsequent operations will fail).\n\n#### Task Visibility & Subtasks ⚠️\n\n> **Important:** A user can only view a task when they are included as an assignee.\n>\n> **Limitation:** The bot can currently only create subtasks for tasks created by itself.\n\nTo avoid “task created but not visible” issues:\n1. When creating a task, set the requesting user as an assignee.\n2. If you need more flexible subtask organization\u002Fvisibility, consider using tasklists.\n\n#### Drive Access ⚠️\n\n> **Important:** Bots don't have their own \"My Space\" (root folder). Bots can only access files\u002Ffolders that have been **shared with them**.\n\nTo let the bot manage files:\n1. Create a folder in your Feishu Drive\n2. Right-click the folder → **Share** → search for your bot name\n3. Grant appropriate permission (view\u002Fedit)\n\nWithout this step, `feishu_drive` operations like `create_folder` will fail because the bot has no root folder to create in.\n\n#### Wiki Space Access ⚠️\n\n> **Important:** API permissions alone are not enough for wiki access. You must also add the bot to each wiki space.\n\n1. Open the wiki space you want the bot to access\n2. Click **Settings** (gear icon) → **Members**\n3. Click **Add Member** → search for your bot name\n4. Select appropriate permission level (view\u002Fedit)\n\nWithout this step, `feishu_wiki` will return empty results even with correct API permissions.\n\nReference: [Wiki FAQ - How to add app to wiki](https:\u002F\u002Fopen.feishu.cn\u002Fdocument\u002Fserver-docs\u002Fdocs\u002Fwiki-v2\u002Fwiki-qa#a40ad4ca)\n\n#### Bitable Access ⚠️\n\n> **Important:** Like other resources, the bot can only access bitables that have been **shared with it**.\n\nTo let the bot access a bitable:\n1. Open the bitable you want the bot to access\n2. Click **Share** button → search for your bot name\n3. Grant appropriate permission (view\u002Fedit)\n\nThe `feishu_bitable` tools support both URL formats:\n- `\u002Fbase\u002FXXX?table=YYY` - Standard bitable URL\n- `\u002Fwiki\u002FXXX?table=YYY` - Bitable embedded in wiki (auto-converts to app_token)\n\n#### Event Subscriptions ⚠️\n\n> **This is the most commonly missed configuration!** If the bot can send messages but cannot receive them, check this section.\n\nIn the Feishu Open Platform console, go to **Events & Callbacks**:\n\n1. **Event configuration**: Select the subscription mode matching your `connectionMode`:\n   - **Long connection** — for `connectionMode: \"websocket\"` (recommended, no public URL needed)\n   - **Request URL** — for `connectionMode: \"webhook\"` (requires a publicly accessible URL)\n2. **Add event subscriptions**:\n\n| Event | Description |\n|-------|-------------|\n| `im.message.receive_v1` | Receive messages (required) |\n| `im.message.message_read_v1` | Message read receipts |\n| `im.chat.member.bot.added_v1` | Bot added to group |\n| `im.chat.member.bot.deleted_v1` | Bot removed from group |\n\n3. Ensure the event permissions are approved\n\n```bash\nopenclaw config set channels.feishu.appId \"cli_xxxxx\"\nopenclaw config set channels.feishu.appSecret \"your_app_secret\"\nopenclaw config set channels.feishu.enabled true\n```\n\n### Configuration Options\n\n```yaml\nchannels:\n  feishu:\n    enabled: true\n    appId: \"cli_xxxxx\"\n    appSecret: \"secret\"\n    # Domain: \"feishu\" (China), \"lark\" (International), or custom URL\n    domain: \"feishu\"  # or \"https:\u002F\u002Fopen.xxx.cn\" for private deployment\n    # Connection mode: \"websocket\" (recommended) or \"webhook\"\n    connectionMode: \"websocket\"\n    # DM policy: \"pairing\" | \"open\" | \"allowlist\"\n    dmPolicy: \"pairing\"\n    # DM allowlist (open_id\u002Fuser_id). Include \"*\" when dmPolicy=\"open\"\n    allowFrom: []\n    # Group policy: \"open\" | \"allowlist\" | \"disabled\"\n    groupPolicy: \"allowlist\"\n    # Require @mention in groups\n    requireMention: true\n    # Safety default for mention-free mode (`requireMention: false`):\n    # only allow non-@ messages in groups with \u003C= 1 bot.\n    # Set true to also allow mention-free messages in multi-bot groups.\n    allowMentionlessInMultiBotGroup: false\n    # Group command mention bypass: \"never\" | \"single_bot\" | \"always\"\n    # Default \"single_bot\": allow authorized command-only messages without @\n    # only when the group has a single bot.\n    groupCommandMentionBypass: \"single_bot\"\n    # Max media size in MB (default: 30)\n    mediaMaxMb: 30\n    # Render mode for bot replies: \"auto\" | \"raw\" | \"card\"\n    renderMode: \"auto\"\n```\n\n#### DM Policy & Access Control\n\n`dmPolicy` controls who can interact with the bot in direct messages (DM).  \nIn multi-account mode, this is resolved per account (`channels.feishu.accounts.\u003CaccountId>`).\n\n| `dmPolicy` | Who can send DM | How to grant access to a user |\n|------------|------------------|--------------------------------|\n| `pairing` | Users in `allowFrom`, or users approved through pairing | User sends a DM and gets a pairing code; bot owner runs `openclaw pairing approve feishu \u003Ccode>`. |\n| `open` | Everyone | Set `allowFrom: [\"*\"]` so all users are treated as allowed. |\n| `allowlist` | Only users in `allowFrom` | Add the user's `open_id`\u002F`user_id` to `allowFrom`, then reload config. |\n\nNotes:\n- `allowFrom` accepts Feishu user IDs (`open_id` recommended, `user_id` also supported).\n- If `dmPolicy: \"open\"`, use `allowFrom: [\"*\"]`. This is required by top-level schema validation and keeps access behavior explicit.\n- `pairing` and `allowlist` can both pre-authorize users with `allowFrom`.\n\nPairing flow (owner approval):\n1. User sends any DM to the bot.\n2. Bot replies with a pairing code (for example `H9ZEHY8R`).\n3. Bot owner approves:\n\n```bash\nopenclaw pairing approve feishu H9ZEHY8R\n```\n\n4. The user is added to the allow store and can chat immediately.\n\nExample: open to everyone\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n```\n\nExample: controlled rollout (pairing + pre-approved users)\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"pairing\"\n    allowFrom:\n      - \"ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n```\n\nExample: strict allowlist\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"allowlist\"\n    allowFrom:\n      - \"ou_alice\"\n      - \"ou_bob\"\n```\n\nExample: account-level isolation\n\n```yaml\nchannels:\n  feishu:\n    accounts:\n      lobster-1:\n        dmPolicy: \"open\"\n        allowFrom: [\"*\"]\n      lobster-5:\n        dmPolicy: \"pairing\"\n```\n\nTop-level `channels.feishu.dmPolicy` \u002F `channels.feishu.allowFrom` are fallback defaults for accounts that do not override them.\n\n> `dmPolicy` only controls who can trigger the bot.  \n> To actually read\u002Fwrite docs or files, you still need: (1) correct Feishu app scopes, and (2) sharing the target resources (Drive\u002FWiki\u002FBitable) with the bot.\n\n#### Group Command Mention Bypass\n\nWhen `requireMention: true`, Feishu can still allow authorized control commands (such as `\u002Fnew`) without `@bot`.\n\n| `groupCommandMentionBypass` | Behavior |\n|----------------------------|----------|\n| `never` | Never bypass `@` requirement for group commands. |\n| `single_bot` | Bypass only when the group contains at most one bot (default). |\n| `always` | Always allow authorized control commands to bypass mention gating. |\n\nNotes:\n- Bypass only applies to authorized control commands in group chats.\n- If any user is explicitly `@`-mentioned in the same message, bypass is disabled.\n- In DMs, this setting does not apply.\n\n#### Group Mention-Free Behavior (`requireMention: false`)\n\nWhen `requireMention: false`, non-@ group messages are handled with a safety default:\n\n| `allowMentionlessInMultiBotGroup` | Behavior for non-@ group messages |\n|-----------------------------------|-----------------------------------|\n| `false` (default) | Only accepted when the group has at most one bot. In multi-bot groups, explicit `@bot` is still required. |\n| `true` | Accepted even in multi-bot groups (use only if you accept duplicate-trigger risk). |\n\nImportant:\n- `im:message.group_msg` is required for receiving non-@ group messages and this is a **sensitive permission** in Feishu.\n- If this scope is not approved, Feishu usually only delivers `@bot` group messages (`im:message.group_at_msg:readonly`).\n\n#### Connection Mode\n\nTwo connection modes are available for receiving events from Feishu:\n\n| Mode | Description |\n|------|-------------|\n| `websocket` | (Default, recommended) Long-polling WebSocket connection. No public URL required, works behind NAT\u002Ffirewall. Best for local development and most deployments. |\n| `webhook` | HTTP server that receives event callbacks. Requires a publicly accessible URL. Suitable for server deployments behind a reverse proxy (e.g. Nginx). |\n\n**WebSocket mode** (default, no extra config needed):\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"websocket\"  # or just omit this line\n```\n\nIn Feishu console: Events & Callbacks → select **Long connection**.\n\n**Webhook mode**:\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"webhook\"\n    webhookPort: 3000               # HTTP server port (default: 3000)\n    webhookPath: \"\u002Ffeishu\u002Fevents\"   # Event callback path (default: \"\u002Ffeishu\u002Fevents\")\n    encryptKey: \"your_encrypt_key\"           # From Feishu console → Events & Callbacks → Encrypt Key\n    verificationToken: \"your_verify_token\"   # From Feishu console → Events & Callbacks → Verification Token\n```\n\nIn Feishu console: Events & Callbacks → select **Request URL** → set the URL to:\n\n```\nhttps:\u002F\u002Fyour-domain.com\u002Ffeishu\u002Fevents\n```\n\n> **Note:** The Request URL must be HTTPS and publicly accessible. For local development, you can use tools like [ngrok](https:\u002F\u002Fngrok.com) to create a tunnel: `ngrok http 3000`, then use the generated URL.\n\n#### Render Mode\n\n| Mode | Description |\n|------|-------------|\n| `auto` | (Default) Automatically detect: use card for messages with code blocks or tables, plain text otherwise. |\n| `raw` | Always send replies as plain text. Markdown tables are converted to ASCII. |\n| `card` | Always send replies as interactive cards with full markdown rendering (syntax highlighting, tables, clickable links). |\n\n#### Dynamic Agent Creation (Multi-User Workspace Isolation)\n\nWhen enabled, each DM user automatically gets their own isolated agent instance with a dedicated workspace. This provides complete isolation including separate conversation history, memory (MEMORY.md), and workspace files.\n\n#### Chat Management Limitations ⚠️\n\n> **Important:** `delete_chat` requires the bot to be the **group owner**. If the bot was added to an existing chat as a member (not the owner), it cannot disband it.\n>\n> If you need to disband a chat that the bot does not own:\n> 1. The **group owner** transfers ownership to the bot first, or\n> 2. The group owner disbands the group directly in the Feishu app.\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n    dynamicAgentCreation:\n      enabled: true\n      # Template for workspace directory ({userId} = OpenID, {agentId} = generated agent ID)\n      workspaceTemplate: \"~\u002Fworkspaces\u002Ffeishu-{agentId}\"\n      # Template for agent config directory\n      agentDirTemplate: \"~\u002F.openclaw\u002Fagents\u002F{agentId}\u002Fagent\"\n      # Optional: limit total number of dynamic agents\n      maxAgents: 100\n\nsession:\n  # Also set dmScope for session isolation (conversation history)\n  dmScope: \"per-peer\"\n```\n\n| Option | Description |\n|--------|-------------|\n| `enabled` | Enable dynamic agent creation for DM users |\n| `workspaceTemplate` | Template for workspace path. Supports `{userId}` (OpenID) and `{agentId}` (= `feishu-{openId}`) |\n| `agentDirTemplate` | Template for agent directory path |\n| `maxAgents` | Optional limit on number of dynamic agents |\n\n**How it works:**\n1. When a new user sends a DM, the system creates a new agent entry in `openclaw.json`\n2. A binding is created to route that user's DM to their dedicated agent\n3. Workspace and agent directories are created automatically\n4. Subsequent messages from that user go to their isolated agent\n\n**Difference from `dmScope: \"per-peer\"`:**\n- `dmScope: \"per-peer\"` only isolates conversation history\n- `dynamicAgentCreation` provides full isolation (workspace, memory, identity, tools)\n\n### Features\n\n- WebSocket and Webhook connection modes\n- Direct messages and group chats\n- Message replies and quoted message context\n- **Inbound media support**: AI can see images, read files (PDF, Excel, etc.), and process rich text with embedded images\n- Image and file uploads (outbound)\n- Typing indicator (via emoji reactions)\n- Pairing flow for DM approval\n- User and group directory lookup\n- **Card render mode**: Optional markdown rendering with syntax highlighting\n- **Document tools**: Read, create, and write Feishu documents with markdown, including atomic `create_and_write` \u002F `import_document` flows for reliable create+content write\n- **Wiki tools**: Navigate knowledge bases, list spaces, get node details, search, create\u002Fmove\u002Frename nodes\n- **Drive tools**: List folders, get file info, create folders, move\u002Fdelete files\n- **Bitable tools**: Manage bitable (多维表格) fields and records (read\u002Fcreate\u002Fupdate\u002Fdelete), supports both `\u002Fbase\u002F` and `\u002Fwiki\u002F` URLs\n- **Task tools**: Create, get details, update, and delete tasks via Feishu Task v2 API\n- **Chat tools**: Read and write group announcements, create group chats, add members, check bot membership, delete chats (`feishu_chat`)\n- **Urgent notification tools**: Send buzz\u002Furgent notifications (app, SMS, voice call) via `feishu_urgent`\n- **Message tools**: Read single messages or list recent chat history with time range and pagination (`feishu_message`)\n- **Reaction tools**: Add, remove, and list emoji reactions on messages (`feishu_reaction`)\n- **@mention forwarding**: When you @mention someone in your message, the bot's reply will automatically @mention them too\n- **Permission error notification**: When the bot encounters a Feishu API permission error, it automatically notifies the user with the permission grant URL\n- **Dynamic agent creation**: Each DM user can have their own isolated agent instance with dedicated workspace (optional)\n\n#### @Mention Forwarding\n\nWhen you want the bot to @mention someone in its reply, simply @mention them in your message:\n\n- **In DM**: `@张三 say hello` → Bot replies with `@张三 Hello!`\n- **In Group**: `@bot @张三 say hello` → Bot replies with `@张三 Hello!`\n\nThe bot automatically detects @mentions in your message and includes them in its reply. No extra permissions required beyond the standard messaging permissions.\n\n### FAQ\n\n#### Bot cannot receive messages\n\nCheck the following:\n1. Have you configured **event subscriptions**? (See Event Subscriptions section)\n2. Does the event subscription mode match your `connectionMode`?\n   - `websocket` → **Long connection** in Feishu console\n   - `webhook` → **Request URL** in Feishu console (URL must be reachable)\n3. Did you add the `im.message.receive_v1` event?\n4. Are the permissions approved?\n5. For webhook mode: is your server running and the URL publicly accessible?\n\n#### `requireMention: false` but group still needs @\n\nCheck the following:\n1. Is `im:message.group_msg` approved? (sensitive permission, required for non-@ group messages)\n2. If the group has multiple bots, do you explicitly set `allowMentionlessInMultiBotGroup: true`?\n3. Is `requireMention: false` configured on the effective account\u002Fgroup?\n\n#### 403 error when sending messages\n\nEnsure `im:message:send_as_bot` permission is approved.\n\n#### How to clear history \u002F start new conversation\n\nSend `\u002Fnew` command in the chat.\n\n#### Why is the output not streaming\n\nFeishu API has rate limits. Streaming updates can easily trigger throttling. We use complete-then-send approach for stability.\n\n#### Cannot find the bot in Feishu\n\n1. Ensure the app is published (at least to test version)\n2. Search for the bot name in Feishu search box\n3. Check if your account is in the app's availability scope\n\n---\n\n## 中文\n\n### 安装\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```\n\n> [!IMPORTANT]\n> **Windows 排错（`spawn npm ENOENT`）**\n>\n> 如果 `openclaw plugins install` 失败，可通过最新 tarball 手动安装：\n>\n> ```bash\n> # 方案 A（推荐）：下载最新插件 tarball\n> npm pack @m1heng-clawd\u002Ffeishu\n> openclaw plugins install .\u002Fm1heng-clawd-feishu-\u003Cversion>.tgz\n> ```\n>\n> ```bash\n> # 方案 B（保留 curl 路径）：先解析最新 tarball 地址，再下载安装\n> TARBALL_URL=\"$(npm view @m1heng-clawd\u002Ffeishu dist.tarball)\"\n> curl -L -o feishu-latest.tgz \"$TARBALL_URL\"\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n>\n> ```powershell\n> # Windows PowerShell（方案 B）\n> $tarball = npm view @m1heng-clawd\u002Ffeishu dist.tarball\n> curl.exe -L $tarball -o feishu-latest.tgz\n> openclaw plugins install .\\feishu-latest.tgz\n> ```\n>\n> ```bash\n> # 方案 C（无 npm 命令）：先在 npm Versions 页查到最新版本号，再套用 URL 模板\n> # https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@m1heng-clawd\u002Ffeishu?activeTab=versions\n> curl -L -o feishu-latest.tgz https:\u002F\u002Fregistry.npmjs.org\u002F@m1heng-clawd\u002Ffeishu\u002F-\u002Ffeishu-\u003Cversion>.tgz\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n\n### 升级\n\n```bash\nopenclaw plugins update feishu\n```\n\n查看已安装版本：\n\n```bash\nopenclaw plugins list | rg -i feishu\n```\n\n### 配置\n\n1. 在 [飞书开放平台](https:\u002F\u002Fopen.feishu.cn) 创建自建应用\n2. 在凭证页面获取 App ID 和 App Secret\n3. 开启所需权限（见下方）\n4. **配置事件订阅**（见下方）⚠️ 重要\n5. 配置插件：\n\n#### 必需权限\n\n| 权限 | 范围 | 说明 |\n|------|------|------|\n| `im:message` | 消息 | 发送和接收消息 |\n| `im:message.p2p_msg:readonly` | 私聊 | 读取发给机器人的私聊消息 |\n| `im:message.group_at_msg:readonly` | 群聊 | 接收群内 @机器人 的消息 |\n| `im:message:send_as_bot` | 发送 | 以机器人身份发送消息 |\n| `im:resource` | 媒体 | 上传和下载图片\u002F文件 |\n\n#### 可选权限\n\n| 权限 | 范围 | 说明 |\n|------|------|------|\n| `contact:user.base:readonly` | 用户信息 | 获取用户基本信息（用于解析发送者姓名，避免群聊\u002F私聊把不同人当成同一说话者） |\n| `im:message.group_msg` | 群聊 | 读取所有群消息（敏感权限）。当你希望 `requireMention: false` 对“未 @ 的群消息”生效时必需 |\n| `im:message:readonly` | 读取 | 获取历史消息 |\n| `im:message:update` | 编辑 | 更新\u002F编辑已发送消息 |\n| `im:message:recall` | 撤回 | 撤回已发送消息 |\n| `im:message.reactions:read` | 表情 | 查看消息表情回复 |\n\n#### 工具权限\n\n**只读权限**（最低要求）：\n\n| 权限 | 工具 | 说明 |\n|------|------|------|\n| `docx:document:readonly` | `feishu_doc` | 读取文档 |\n| `drive:drive:readonly` | `feishu_drive` | 列出文件夹、获取文件信息 |\n| `wiki:wiki:readonly` | `feishu_wiki` | 列出空间、列出节点、获取节点详情、搜索 |\n| `bitable:app:readonly` | `feishu_bitable` | 读取多维表格记录和字段 |\n| `task:task:read` | `feishu_task_get` | 获取任务详情 |\n| `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | 获取\u002F列出任务清单（tasklists） |\n| `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | 列出\u002F获取任务评论 |\n| `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | 列出\u002F获取任务附件 |\n| `im:chat.announcement:read` | `feishu_chat` | 读取群公告 |\n| `im:chat:readonly` | `feishu_chat` | 获取群信息、检查机器人是否在群内 |\n| `im:message` 或 `im:message:readonly` | `feishu_message` | 读取单条\u002F私聊消息 |\n| `im:message.group_at_msg:readonly` | `feishu_message` | 读取群聊中所有消息 |\n| `im:message.reactions:read` | `feishu_reaction` | 查看消息表情回复 |\n\n**读写权限**（可选，用于创建\u002F编辑\u002F删除操作）：\n\n| 权限 | 工具 | 说明 |\n|------|------|------|\n| `docx:document` | `feishu_doc` | 创建\u002F编辑文档 |\n| `docx:document.block:convert` | `feishu_doc` | Markdown 转 blocks（write\u002Fappend\u002Fcreate_and_write 必需，`feishu_drive.import_document` 也会用到） |\n| `drive:drive` | `feishu_doc`, `feishu_drive` | 上传图片到文档、创建文件夹、移动\u002F删除文件 |\n| `wiki:wiki` | `feishu_wiki` | 创建\u002F移动\u002F重命名知识库节点 |\n| `bitable:app` | `feishu_bitable` | 创建\u002F更新\u002F删除多维表格记录并管理字段 |\n| `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | 创建\u002F更新\u002F删除任务 |\n| `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | 创建\u002F更新\u002F删除任务清单并管理成员\u002F关联任务 |\n| `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | 创建\u002F更新\u002F删除任务评论 |\n| `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | 上传\u002F删除任务附件 |\n| `im:message.urgent` | `feishu_urgent` | 发送应用内加急（buzz）通知。使用 `sms` 和 `phone` 变体（`im:message.urgent:sms`、`im:message.urgent:phone`）可发送短信和语音电话加急。 |\n| `im:chat.announcement` | `feishu_chat` | 写入\u002F更新群公告 |\n| `im:chat` | `feishu_chat` | 创建和删除群聊 |\n| `im:chat.members` | `feishu_chat` | 向群聊添加成员 |\n| `im:message.reactions:write_only` | `feishu_reaction` | 发送、删除消息表情回复 |\n\n> 飞书控制台中任务权限的显示名称可能略有差异，必要时可按关键字 `task` \u002F `tasklist` \u002F `comment` \u002F `attachment` 搜索并授予对应读写权限。\n\n#### 任务评论权限 ⚠️\n\n任务评论需要单独授权：\n1. 读取评论：授予 `task:comment:read`。\n2. 创建\u002F更新\u002F删除评论：授予 `task:comment:write`。\n\n缺少上述权限时，评论相关接口会返回权限不足错误。\n\n#### 任务附件上传 ⚠️\n\n任务附件支持上传\u002F获取\u002F列表\u002F删除。上传来源：\n1. OpenClaw\u002FNode 所在机器的本地文件路径（`file_path`）\n2. 可直接下载的远程链接（`file_url`，公开\u002F预签名 URL）\n\n`file_url` 上传路径会使用 OpenClaw 运行时的媒体下载安全校验与大小限制（`mediaMaxMb`），随后经临时本地文件上传到任务附件。\n\n#### 任务清单所有者限制 ⚠️\n\n> **重要：** 创建\u002F修改任务清单时，请保持清单所有者为机器人本身，只把用户作为协作人添加。\n\n任务清单权限基于“所有者 + 协作成员角色”授予。如果把清单所有者改成用户、且机器人不在协作成员中，机器人可能会失去对该清单的读取\u002F编辑\u002F管理权限，导致后续对清单的操作失败。\n\n#### 任务限制 ⚠️\n\n> **重要：** 只有当任务责任人包含用户时，用户才能查看到该任务。\n>\n> **限制：** 机器人目前只能给自己创建出来的任务创建子任务。\n\n为避免“任务创建了但用户看不到”的问题：\n1. 创建任务时，请把发起用户设为任务负责人（`assignee`）。\n2. 如需更灵活的子任务创建\u002F组织\u002F可见性管理，建议使用任务清单（tasklists）。\n\n#### 云空间访问权限 ⚠️\n\n> **重要：** 机器人没有自己的\"我的空间\"（根目录）。机器人只能访问**被分享给它的文件\u002F文件夹**。\n\n要让机器人管理文件：\n1. 在你的飞书云空间创建一个文件夹\n2. 右键文件夹 → **分享** → 搜索机器人名称\n3. 授予相应权限（查看\u002F编辑）\n\n如果不做这一步，`feishu_drive` 的 `create_folder` 等操作会失败，因为机器人没有根目录可以创建文件夹。\n\n#### 知识库空间权限 ⚠️\n\n> **重要：** 仅有 API 权限不够，还需要将机器人添加到知识库空间。\n\n1. 打开需要机器人访问的知识库空间\n2. 点击 **设置**（齿轮图标）→ **成员管理**\n3. 点击 **添加成员** → 搜索机器人名称\n4. 选择权限级别（查看\u002F编辑）\n\n如果不做这一步，即使 API 权限正确，`feishu_wiki` 也会返回空结果。\n\n参考文档：[知识库常见问题 - 如何将应用添加为知识库成员](https:\u002F\u002Fopen.feishu.cn\u002Fdocument\u002Fserver-docs\u002Fdocs\u002Fwiki-v2\u002Fwiki-qa#a40ad4ca)\n\n#### 多维表格访问权限 ⚠️\n\n> **重要：** 与其他资源一样，机器人只能访问**被分享给它的多维表格**。\n\n要让机器人访问多维表格：\n1. 打开需要机器人访问的多维表格\n2. 点击 **分享** 按钮 → 搜索机器人名称\n3. 授予相应权限（查看\u002F编辑）\n\n`feishu_bitable` 工具支持两种 URL 格式：\n- `\u002Fbase\u002FXXX?table=YYY` - 标准多维表格链接\n- `\u002Fwiki\u002FXXX?table=YYY` - 嵌入在知识库中的多维表格（自动转换为 app_token）\n\n#### 事件订阅 ⚠️\n\n> **这是最容易遗漏的配置！** 如果机器人能发消息但收不到消息，请检查此项。\n\n在飞书开放平台的应用后台，进入 **事件与回调** 页面：\n\n1. **事件配置方式**：根据你的 `connectionMode` 选择对应的订阅方式：\n   - **使用长连接接收事件** — 对应 `connectionMode: \"websocket\"`（推荐，无需公网地址）\n   - **使用请求地址接收事件** — 对应 `connectionMode: \"webhook\"`（需要公网可访问的 URL）\n2. **添加事件订阅**，勾选以下事件：\n\n| 事件 | 说明 |\n|------|------|\n| `im.message.receive_v1` | 接收消息（必需） |\n| `im.message.message_read_v1` | 消息已读回执 |\n| `im.chat.member.bot.added_v1` | 机器人进群 |\n| `im.chat.member.bot.deleted_v1` | 机器人被移出群 |\n\n3. 确保事件订阅的权限已申请并通过审核\n\n```bash\nopenclaw config set channels.feishu.appId \"cli_xxxxx\"\nopenclaw config set channels.feishu.appSecret \"your_app_secret\"\nopenclaw config set channels.feishu.enabled true\n```\n\n### 配置选项\n\n```yaml\nchannels:\n  feishu:\n    enabled: true\n    appId: \"cli_xxxxx\"\n    appSecret: \"secret\"\n    # 域名: \"feishu\" (国内)、\"lark\" (国际) 或自定义 URL\n    domain: \"feishu\"  # 私有化部署可用 \"https:\u002F\u002Fopen.xxx.cn\"\n    # 连接模式: \"websocket\" (推荐) 或 \"webhook\"\n    connectionMode: \"websocket\"\n    # 私聊策略: \"pairing\" | \"open\" | \"allowlist\"\n    dmPolicy: \"pairing\"\n    # 私聊白名单（open_id\u002Fuser_id）；当 dmPolicy=\"open\" 时请包含 \"*\"\n    allowFrom: []\n    # 群聊策略: \"open\" | \"allowlist\" | \"disabled\"\n    groupPolicy: \"allowlist\"\n    # 群聊是否需要 @机器人\n    requireMention: true\n    # 免 @ 安全默认策略（requireMention=false 时）：\n    # 仅在群内机器人数量 \u003C= 1 时处理未 @ 的群消息。\n    # 设为 true 可在多 bot 群也放开免 @（需自行承担重复触发风险）。\n    allowMentionlessInMultiBotGroup: false\n    # 群聊命令绕过 @ 策略: \"never\" | \"single_bot\" | \"always\"\n    # 默认 \"single_bot\"：仅当群内机器人数量 \u003C= 1 时，允许已授权命令免 @\n    groupCommandMentionBypass: \"single_bot\"\n    # 媒体文件最大大小 (MB, 默认 30)\n    mediaMaxMb: 30\n    # 回复渲染模式: \"auto\" | \"raw\" | \"card\"\n    renderMode: \"auto\"\n```\n\n#### 私聊策略（dmPolicy）与访问授权\n\n`dmPolicy` 控制的是“谁可以在私聊里触发机器人”。  \n在多账号模式下，它按账号生效（`channels.feishu.accounts.\u003CaccountId>`）。\n\n| `dmPolicy` | 谁能私聊触发机器人 | 如何给用户开通 |\n|------------|------------------|----------------|\n| `pairing` | `allowFrom` 中的用户，或已通过配对审批的用户 | 用户先私聊机器人拿到配对码；管理员执行 `openclaw pairing approve feishu \u003Ccode>`。 |\n| `open` | 所有人 | 配置 `allowFrom: [\"*\"]`，表示全部放开。 |\n| `allowlist` | 仅 `allowFrom` 中的用户 | 将用户 `open_id`\u002F`user_id` 加入 `allowFrom`，然后重载配置。 |\n\n说明：\n- `allowFrom` 支持飞书用户 ID（推荐 `open_id`，也支持 `user_id`）。\n- 当 `dmPolicy: \"open\"` 时，建议固定写 `allowFrom: [\"*\"]`，语义最清晰，也满足顶层配置校验要求。\n- `pairing` 和 `allowlist` 都可以先通过 `allowFrom` 预授权部分用户。\n\n配对审批流程（pairing）：\n1. 用户先给机器人发一条私聊消息。\n2. 机器人返回配对码（例如 `H9ZEHY8R`）。\n3. 管理员执行审批命令：\n\n```bash\nopenclaw pairing approve feishu H9ZEHY8R\n```\n\n4. 审批后该用户立即可用。\n\n示例：全部放开\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n```\n\n示例：灰度放开（pairing + 预授权）\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"pairing\"\n    allowFrom:\n      - \"ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n```\n\n示例：严格白名单\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"allowlist\"\n    allowFrom:\n      - \"ou_alice\"\n      - \"ou_bob\"\n```\n\n示例：按账号隔离配置\n\n```yaml\nchannels:\n  feishu:\n    accounts:\n      lobster-1:\n        dmPolicy: \"open\"\n        allowFrom: [\"*\"]\n      lobster-5:\n        dmPolicy: \"pairing\"\n```\n\n`channels.feishu.dmPolicy` \u002F `channels.feishu.allowFrom` 是“默认值”；账号下未覆盖时才会继承。\n\n> `dmPolicy` 只控制“是否允许触发机器人”。  \n> 真正执行文档\u002F云盘\u002F知识库\u002F多维表格操作，还需要两层权限：1）应用 API 权限（scopes）；2）把目标资源分享给机器人。\n\n#### 群聊命令免 @ 策略\n\n当 `requireMention: true` 时，Feishu 仍可让“已授权控制命令（如 `\u002Fnew`）”在不 `@bot` 的情况下通过。\n\n| `groupCommandMentionBypass` | 行为 |\n|----------------------------|------|\n| `never` | 群聊命令永不绕过 `@` 校验。 |\n| `single_bot` | 仅当群内机器人数量不超过 1 个时才允许绕过（默认）。 |\n| `always` | 已授权控制命令始终可绕过 `@` 校验。 |\n\n说明：\n- 仅对群聊中的“已授权控制命令”生效。\n- 同一条消息里如果显式 `@` 了任意用户，则不会触发命令免 `@`。\n- 私聊场景不受该配置影响。\n\n#### 群聊免 @ 行为（`requireMention: false`）\n\n当 `requireMention: false` 时，插件对“未 @ 的群消息”采用安全默认策略：\n\n| `allowMentionlessInMultiBotGroup` | 未 @ 群消息行为 |\n|-----------------------------------|----------------|\n| `false`（默认） | 仅当群里机器人数量不超过 1 个时处理；多 bot 群仍要求显式 `@bot`。 |\n| `true` | 即使在多 bot 群也处理未 @ 消息（仅建议在可接受重复触发风险时启用）。 |\n\n重要说明：\n- 要接收未 @ 的群消息，必须申请并通过 `im:message.group_msg`，且该权限是飞书**敏感权限**。\n- 若未通过该权限，飞书通常只会推送 `@bot` 群消息（`im:message.group_at_msg:readonly`）。\n\n#### 连接模式\n\n支持两种从飞书接收事件的连接模式：\n\n| 模式 | 说明 |\n|------|------|\n| `websocket` | （默认，推荐）长连接 WebSocket 模式。无需公网地址，可在 NAT\u002F防火墙后使用。适合本地开发和大部分部署场景。 |\n| `webhook` | HTTP 服务器接收事件回调。需要公网可访问的 URL。适合通过反向代理（如 Nginx）部署的服务器环境。 |\n\n**WebSocket 模式**（默认，无需额外配置）：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"websocket\"  # 或直接省略此行\n```\n\n飞书控制台：事件与回调 → 选择 **使用长连接接收事件**。\n\n**Webhook 模式**：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"webhook\"\n    webhookPort: 3000               # HTTP 服务端口（默认: 3000）\n    webhookPath: \"\u002Ffeishu\u002Fevents\"   # 事件回调路径（默认: \"\u002Ffeishu\u002Fevents\"）\n    encryptKey: \"your_encrypt_key\"           # 飞书控制台 → 事件与回调 → Encrypt Key\n    verificationToken: \"your_verify_token\"   # 飞书控制台 → 事件与回调 → Verification Token\n```\n\n飞书控制台：事件与回调 → 选择 **使用请求地址接收事件** → 填入请求地址：\n\n```\nhttps:\u002F\u002Fyour-domain.com\u002Ffeishu\u002Fevents\n```\n\n> **提示：** 请求地址必须是 HTTPS 且公网可访问。本地开发时，可使用 [ngrok](https:\u002F\u002Fngrok.com) 等工具创建隧道：`ngrok http 3000`，然后使用生成的地址。\n\n#### 渲染模式\n\n| 模式 | 说明 |\n|------|------|\n| `auto` | （默认）自动检测：有代码块或表格时用卡片，否则纯文本 |\n| `raw` | 始终纯文本，表格转为 ASCII |\n| `card` | 始终使用卡片，支持语法高亮、表格、链接等 |\n\n#### 群管理限制 ⚠️\n\n> **重要提示：** `delete_chat` 需要机器人是该群的**群主**。如果机器人是以成员身份加入现有群聊（非群主），则无法解散该群聊。\n>\n> 如需解散机器人不拥有的群聊：\n> 1. **群主**将群主权限转让给机器人，或\n> 2. 由群主直接在飞书客户端解散群聊。\n\n#### 动态 Agent 创建（多用户 Workspace 隔离）\n\n启用后，每个私聊用户会自动获得独立的 agent 实例和专属 workspace。这提供完整的隔离，包括独立的对话历史、记忆（MEMORY.md）和工作区文件。\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n    dynamicAgentCreation:\n      enabled: true\n      # workspace 目录模板 ({userId} = OpenID, {agentId} = 生成的 agent ID)\n      workspaceTemplate: \"~\u002Fworkspaces\u002Ffeishu-{agentId}\"\n      # agent 配置目录模板\n      agentDirTemplate: \"~\u002F.openclaw\u002Fagents\u002F{agentId}\u002Fagent\"\n      # 可选：限制动态 agent 总数\n      maxAgents: 100\n\nsession:\n  # 同时设置 dmScope 以隔离对话历史\n  dmScope: \"per-peer\"\n```\n\n| 选项 | 说明 |\n|------|------|\n| `enabled` | 是否为私聊用户启用动态 agent 创建 |\n| `workspaceTemplate` | workspace 路径模板，支持 `{userId}`（OpenID）和 `{agentId}`（= `feishu-{openId}`）|\n| `agentDirTemplate` | agent 目录路径模板 |\n| `maxAgents` | 可选，限制动态 agent 的最大数量 |\n\n**工作原理：**\n1. 当新用户发送私聊时，系统在 `openclaw.json` 中创建新的 agent 条目\n2. 创建 binding 将该用户的私聊路由到专属 agent\n3. 自动创建 workspace 和 agent 目录\n4. 该用户后续的消息都会路由到其隔离的 agent\n\n**与 `dmScope: \"per-peer\"` 的区别：**\n- `dmScope: \"per-peer\"` 仅隔离对话历史\n- `dynamicAgentCreation` 提供完整隔离（workspace、记忆、身份、工具）\n\n### 功能\n\n- WebSocket 和 Webhook 连接模式\n- 私聊和群聊\n- 消息回复和引用上下文\n- **入站媒体支持**：AI 可以看到图片、读取文件（PDF、Excel 等）、处理富文本中的嵌入图片\n- 图片和文件上传（出站）\n- 输入指示器（通过表情回复实现）\n- 私聊配对审批流程\n- 用户和群组目录查询\n- **卡片渲染模式**：支持语法高亮的 Markdown 渲染\n- **文档工具**：读取、创建、用 Markdown 写入飞书文档（表格因 API 限制不支持）\n- **知识库工具**：浏览知识库、列出空间、获取节点详情、搜索、创建\u002F移动\u002F重命名节点\n- **云空间工具**：列出文件夹、获取文件信息、创建文件夹、移动\u002F删除文件\n- **多维表格工具**：支持多维表格字段与记录的读取\u002F创建\u002F更新\u002F删除，支持 `\u002Fbase\u002F` 和 `\u002Fwiki\u002F` 两种链接格式\n- **任务工具**：基于 Task v2 API 支持任务创建、获取详情、更新和删除\n- **群聊工具**：读写群公告、创建群聊、添加成员、检查机器人是否在群内、删除群聊（`feishu_chat`）\n- **加急通知工具**：发送应用内加急（buzz）、短信、语音电话加急通知（`feishu_urgent`）\n- **消息工具**：读取单条消息或列出聊天历史记录，支持时间范围和分页（`feishu_message`）\n- **表情工具**：添加、删除、列出消息上的表情回复（`feishu_reaction`）\n- **@ 转发功能**：在消息中 @ 某人，机器人的回复会自动 @ 该用户\n- **权限错误提示**：当机器人遇到飞书 API 权限错误时，会自动通知用户并提供权限授权链接\n- **动态 Agent 创建**：每个私聊用户可拥有独立的 agent 实例和专属 workspace（可选）\n\n#### @ 转发功能\n\n如果你希望机器人的回复中 @ 某人，只需在你的消息中 @ 他们：\n\n- **私聊**：`@张三 跟他问好` → 机器人回复 `@张三 你好！`\n- **群聊**：`@机器人 @张三 跟他问好` → 机器人回复 `@张三 你好！`\n\n机器人会自动检测消息中的 @ 并在回复时带上。无需额外权限。\n\n### 常见问题\n\n#### 机器人收不到消息\n\n检查以下配置：\n1. 是否配置了 **事件订阅**？（见上方事件订阅章节）\n2. 事件订阅方式是否与 `connectionMode` 匹配？\n   - `websocket` → 飞书控制台选择 **使用长连接接收事件**\n   - `webhook` → 飞书控制台选择 **使用请求地址接收事件**（URL 必须可访问）\n3. 是否添加了 `im.message.receive_v1` 事件？\n4. 相关权限是否已申请并审核通过？\n5. 如果使用 webhook 模式：服务是否正在运行？URL 是否公网可访问？\n\n#### 已配置 `requireMention: false`，群里仍然必须 @\n\n请重点检查：\n1. 是否已申请并审核通过 `im:message.group_msg`（敏感权限，接收未 @ 群消息必需）\n2. 群里若有多个 bot，是否显式设置了 `allowMentionlessInMultiBotGroup: true`\n3. `requireMention: false` 是否配置在当前生效的账号\u002F群配置上\n\n#### 返回消息时 403 错误\n\n确保已申请 `im:message:send_as_bot` 权限，并且权限已审核通过。\n\n#### 如何清理历史会话 \u002F 开启新对话\n\n在聊天中发送 `\u002Fnew` 命令即可开启新对话。\n\n#### 消息为什么不是流式输出\n\n飞书 API 有请求频率限制，流式更新消息很容易触发限流。当前采用完整回复后一次性发送的方式，以保证稳定性。\n\n#### 在飞书里找不到机器人\n\n1. 确保应用已发布（至少发布到测试版本）\n2. 在飞书搜索框中搜索机器人名称\n3. 检查应用可用范围是否包含你的账号\n\n---\n\n## License\n\nMIT\n","# clawd-feishu\n\n飞书\u002FLark 频道插件，用于 [OpenClaw](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw)。\n\n> **中文社区资料** - 配置教程、常见问题、使用技巧：[Wiki](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fwiki)\n>\n> **Contributing \u002F 贡献指南**: [CONTRIBUTING.md](.\u002FCONTRIBUTING.md)\n>\n> **Issue Reporting \u002F 问题反馈**: Please check [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) first for common solutions, then open a structured Issue Form if needed.  \n> 问题反馈前请先查看 [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) 是否已有常见解答；如仍未解决，再提交结构化 Issue 模板。\n>\n> **Questions \u002F 使用咨询**: Use `Question` issue for troubleshooting; use [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions) for open-ended Q&A.  \n> 排查型咨询请提交 `Question` Issue；开放式交流请使用 [Discussions](https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fdiscussions)。\n\n[English](#english) | [中文](#中文)\n\n---\n\n## Sponsor\n\n![YouYun Zhisuan](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fm1heng_clawdbot-feishu_readme_0d8af466c75a.png)\n\nThanks to our sponsors for supporting the project.\n\nIf you need an API key platform whose models can be used as an OpenClaw provider and work with Kimi、MiniMax、Claude Code、Codex、or direct API usage, YouYun Zhisuan is worth considering:\n\n> UCloud's YouYun Zhisuan is an AI cloud platform that provides stable and comprehensive domestic and international model APIs through a single API key. Its high-value Coding Plan offers both monthly and pay-as-you-go options, typically at 20% to 50% of official pricing. It supports Claude Code、Codex、and direct API integrations, as well as enterprise-grade high concurrency、24\u002F7 technical support、and self-service invoicing. Register through [this link](https:\u002F\u002Fpassport.compshare.cn\u002Fregister?referral_code=5oWQU772rtSCeExpcLFxwy&ytag=GPU_YY_YX_git_clawdbot-feishu) to receive a free RMB 5 platform trial credit.\n\n感谢赞助方对本项目的支持。\n\n如果你需要一个可作为 OpenClaw 模型 provider，并适用于 Kimi、MiniMax、Claude Code、Codex 或直接 API 调用的稳定 API Key 平台，可以了解一下优云智算：\n\n> 优云智算是UCloud旗下AI云平台，提供稳定、全面的国内外模型API，仅一个key即可调用。主打包月、按量的高性价比 Coding Plan 套餐，基于官方2~5折优惠。支持接入 Claude Code、Codex 及 API 调用。支持企业高并发、7*24技术支持、自助开票。通过[此链接](https:\u002F\u002Fpassport.compshare.cn\u002Fregister?referral_code=5oWQU772rtSCeExpcLFxwy&ytag=GPU_YY_YX_git_clawdbot-feishu)注册的用户，可得免费5元平台体验金！\n\n## English\n\n### Installation\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```\n\n> [!IMPORTANT]\n> **Windows Troubleshooting (`spawn npm ENOENT`)**\n>\n> If `openclaw plugins install` fails, install manually with the latest tarball:\n>\n> ```bash\n> # Option A (recommended): download latest package tarball\n> npm pack @m1heng-clawd\u002Ffeishu\n> openclaw plugins install .\u002Fm1heng-clawd-feishu-\u003Cversion>.tgz\n> ```\n>\n> ```bash\n> # Option B (keep curl flow): resolve latest tarball URL, then download\u002Finstall\n> TARBALL_URL=\"$(npm view @m1heng-clawd\u002Ffeishu dist.tarball)\"\n> curl -L -o feishu-latest.tgz \"$TARBALL_URL\"\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n>\n> ```powershell\n> # Windows PowerShell (Option B)\n> $tarball = npm view @m1heng-clawd\u002Ffeishu dist.tarball\n> curl.exe -L $tarball -o feishu-latest.tgz\n> openclaw plugins install .\\feishu-latest.tgz\n> ```\n>\n> ```bash\n> # Option C (no npm command): use URL template with latest version from npm Versions tab\n> # https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@m1heng-clawd\u002Ffeishu?activeTab=versions\n> curl -L -o feishu-latest.tgz https:\u002F\u002Fregistry.npmjs.org\u002F@m1heng-clawd\u002Ffeishu\u002F-\u002Ffeishu-\u003Cversion>.tgz\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n\n### Upgrade\n\n```bash\nopenclaw plugins update feishu\n```\n\nCheck installed version:\n\n```bash\nopenclaw plugins list | rg -i feishu\n```\n\n### Configuration\n\n1. Create a self-built app on [Feishu Open Platform](https:\u002F\u002Fopen.feishu.cn)\n2. Get your App ID and App Secret from the Credentials page\n3. Enable required permissions (see below)\n4. **Configure event subscriptions** (see below) ⚠️ Important\n5. Configure the plugin:\n\n#### Required Permissions\n\n| Permission | Scope | Description |\n|------------|-------|-------------|\n| `im:message` | Messaging | Send and receive messages |\n| `im:message.p2p_msg:readonly` | DM | Read direct messages to bot |\n| `im:message.group_at_msg:readonly` | Group | Receive @mention messages in groups |\n| `im:message:send_as_bot` | Send | Send messages as the bot |\n| `im:resource` | Media | Upload and download images\u002Ffiles |\n\n#### Optional Permissions\n\n| Permission | Scope | Description |\n|------------|-------|-------------|\n| `contact:user.base:readonly` | User info | Get basic user info (required to resolve sender display names for speaker attribution) |\n| `im:message.group_msg` | Group | Read all group messages (sensitive). Required when you want `requireMention: false` to work for non-@ group messages |\n| `im:message:readonly` | Read | Get message history |\n| `im:message:update` | Edit | Update\u002Fedit sent messages |\n| `im:message:recall` | Recall | Recall sent messages |\n| `im:message.reactions:read` | Reactions | View message reactions |\n\n#### Tool Permissions\n\n**Read-only** (minimum required):\n\n| Permission | Tool | Description |\n|------------|------|-------------|\n| `docx:document:readonly` | `feishu_doc` | Read documents |\n| `drive:drive:readonly` | `feishu_drive` | List folders, get file info |\n| `wiki:wiki:readonly` | `feishu_wiki` | List spaces, list nodes, get node info, search |\n| `bitable:app:readonly` | `feishu_bitable` | Read bitable records and fields |\n| `task:task:read` | `feishu_task_get` | Get task details |\n| `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | Get\u002Flist tasklists |\n| `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | List\u002Fget task comments |\n| `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | List\u002Fget task attachments |\n| `im:chat.announcement:read` | `feishu_chat` | Read group announcement |\n| `im:chat:readonly` | `feishu_chat` | Get chat info, check bot membership |\n| `im:message` or `im:message:readonly` | `feishu_message` | Read single\u002FDM messages |\n| `im:message.group_at_msg:readonly` | `feishu_message` | Read all messages in group chats |\n| `im:message.reactions:read` | `feishu_reaction` | List reactions on messages |\n\n**Read-write** (optional, for create\u002Fedit\u002Fdelete operations):\n\n| 权限 | 工具 | 描述 |\n|------------|------|-------------|\n| `docx:document` | `feishu_doc` | 创建\u002F编辑文档 |\n| `docx:document.block:convert` | `feishu_doc` | Markdown 转块操作（用于写入\u002F追加\u002F创建并写入；也被 `feishu_drive.import_document` 使用） |\n| `drive:drive` | `feishu_doc`, `feishu_drive` | 向文档上传图片、创建文件夹、移动\u002F删除文件 |\n| `wiki:wiki` | `feishu_wiki` | 创建\u002F移动\u002F重命名维基节点 |\n| `bitable:app` | `feishu_bitable` | 创建\u002F更新\u002F删除多维表格记录及管理字段 |\n| `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | 创建\u002F更新\u002F删除任务 |\n| `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | 创建\u002F更新\u002F删除任务列表及管理成员 |\n| `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | 创建\u002F更新\u002F删除任务评论 |\n| `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | 上传\u002F删除任务附件 |\n| `im:message.urgent` | `feishu_urgent` | 通过应用内发送紧急通知（震动提醒）。如需短信或语音通话，请使用 `sms` 和 `phone` 变体（`im:message.urgent:sms`, `im:message.urgent:phone`）。 |\n| `im:chat.announcement` | `feishu_chat` | 发布\u002F更新群公告 |\n| `im:chat` | `feishu_chat` | 创建和删除群聊 |\n| `im:chat.members` | `feishu_chat` | 向群聊添加成员 |\n| `im:message.reactions:write_only` | `feishu_reaction` | 添加和移除表情反应 |\n\n> 在飞书控制台界面中，任务范围名称可能会略有不同。如有需要，请搜索与任务\u002F任务列表\u002F评论\u002F附件相关的权限，并相应授予读取\u002F写入权限。\n\n#### 任务评论范围 ⚠️\n\n任务评论需要专用的权限范围：\n1. 读取评论：授予 `task:comment:read`。\n2. 创建\u002F更新\u002F删除评论：授予 `task:comment:write`。\n\n如果缺少这些权限范围，评论相关 API 将返回权限拒绝错误。\n\n#### 任务附件上传 ⚠️\n\n任务附件支持上传\u002F获取\u002F列出\u002F删除。上传来源包括：\n1. OpenClaw\u002FNode 主机上的本地文件（`file_path`）\n2. 远程链接（`file_url`，公开或预签名）\n\n对于 `file_url`，OpenClaw 运行时会使用媒体加载器进行安全检查和大小限制（`mediaMaxMb`），然后将下载的文件通过临时本地文件上传。\n\n#### 任务列表所有权 ⚠️\n\n> **重要提示**：请始终将任务列表的所有者设置为机器人，用户则作为成员加入。\n\n任务列表的访问权限基于所有者和成员角色分配。如果将所有者更改为用户而机器人未被设为成员，则机器人可能失去对该任务列表的读取\u002F编辑\u002F管理权限，后续操作也将失败。\n\n#### 任务可见性与子任务 ⚠️\n\n> **重要提示**：只有当用户被指定为任务的指派人时，才能查看该任务。\n>\n> **限制**：目前机器人只能为其自身创建的的任务创建子任务。\n\n为避免“任务已创建但不可见”的问题：\n1. 创建任务时，将请求用户设置为指派人。\n2. 如果需要更灵活的子任务组织和可见性，建议使用任务列表。\n\n#### 驱动器访问 ⚠️\n\n> **重要提示**：机器人没有自己的“我的空间”（根目录）。机器人仅能访问已被**共享给它**的文件\u002F文件夹。\n\n要让机器人管理文件：\n1. 在您的飞书网盘中创建一个文件夹。\n2. 右键单击该文件夹 → **分享** → 搜索您的机器人名称。\n3. 授予适当的权限（查看\u002F编辑）。\n\n若未执行此步骤，`feishu_drive` 的操作（如 `create_folder`）将失败，因为机器人没有可创建的根目录。\n\n#### 维基空间访问 ⚠️\n\n> **重要提示**：仅凭 API 权限不足以访问维基空间。您还需将机器人添加到每个维基空间中。\n\n1. 打开您希望机器人访问的维基空间。\n2. 点击 **设置**（齿轮图标）→ **成员**。\n3. 点击 **添加成员** → 搜索您的机器人名称。\n4. 选择适当的权限级别（查看\u002F编辑）。\n\n若未执行此步骤，即使 API 权限正确，`feishu_wiki` 也会返回空结果。\n\n参考：[维基常见问题解答 - 如何将应用添加到维基](https:\u002F\u002Fopen.feishu.cn\u002Fdocument\u002Fserver-docs\u002Fdocs\u002Fwiki-v2\u002Fwiki-qa#a40ad4ca)\n\n#### 多维表格访问 ⚠️\n\n> **重要提示**：与其他资源一样，机器人仅能访问已被**共享给它**的多维表格。\n\n要让机器人访问多维表格：\n1. 打开您希望机器人访问的多维表格。\n2. 点击 **分享** 按钮 → 搜索您的机器人名称。\n3. 授予适当的权限（查看\u002F编辑）。\n\n`feishu_bitable` 工具支持两种 URL 格式：\n- `\u002Fbase\u002FXXX?table=YYY` — 标准多维表格 URL\n- `\u002Fwiki\u002FXXX?table=YYY` — 嵌入维基中的多维表格（自动转换为 app_token）\n\n#### 事件订阅 ⚠️\n\n> **这是最容易被忽略的配置！** 如果机器人可以发送消息但无法接收消息，请检查本节内容。\n\n在飞书开放平台控制台中，前往 **事件与回调**：\n\n1. **事件配置**：根据您的 `connectionMode` 选择相应的订阅模式：\n   - **长连接** — 适用于 `connectionMode: \"websocket\"`（推荐，无需公共 URL）\n   - **请求 URL** — 适用于 `connectionMode: \"webhook\"`（需要一个可公开访问的 URL）\n2. **添加事件订阅**：\n\n| 事件 | 描述 |\n|-------|-------------|\n| `im.message.receive_v1` | 接收消息（必选） |\n| `im.message.message_read_v1` | 消息已读回执 |\n| `im.chat.member.bot.added_v1` | 机器人被加入群聊 |\n| `im.chat.member.bot.deleted_v1` | 机器人从群聊中移除 |\n\n3. 确保事件权限已获批准\n\n```bash\nopenclaw config set channels.feishu.appId \"cli_xxxxx\"\nopenclaw config set channels.feishu.appSecret \"your_app_secret\"\nopenclaw config set channels.feishu.enabled true\n```\n\n\n\n### 配置选项\n\n```yaml\nchannels:\n  feishu:\n    enabled: true\n    appId: \"cli_xxxxx\"\n    appSecret: \"secret\"\n    # 域名：可选“feishu”（中国）、“lark”（国际）或自定义URL\n    domain: \"feishu\"  # 或者对于私有部署，使用 \"https:\u002F\u002Fopen.xxx.cn\"\n    # 连接模式：“websocket”（推荐）或“webhook”\n    connectionMode: \"websocket\"\n    # 私信策略：“pairing” | “open” | “allowlist”\n    dmPolicy: \"pairing\"\n    # 私信白名单（open_id\u002Fuser_id）。当dmPolicy=\"open\"时，包含\"*\"\n    allowFrom: []\n    # 群组策略：“open” | “allowlist” | “disabled”\n    groupPolicy: \"allowlist\"\n    # 要求在群组中@提及\n    requireMention: true\n    # 在无@提及模式下的安全默认值（`requireMention: false`）：\n    # 只允许在最多1个机器人的群组中发送非@消息。\n    # 设置为true则允许在多机器人群组中也发送无@消息。\n    allowMentionlessInMultiBotGroup: false\n    # 群组命令免提及机制：“never” | “single_bot” | “always”\n    # 默认为“single_bot”：仅当群组中只有一个机器人时，允许授权的纯命令消息无需@。\n    groupCommandMentionBypass: \"single_bot\"\n    # 最大媒体文件大小（单位：MB，默认30）\n    mediaMaxMb: 30\n    # 机器人回复的渲染模式：“auto” | “raw” | “card”\n    renderMode: \"auto\"\n```\n\n#### 私信策略与访问控制\n\n`dmPolicy` 控制哪些用户可以在私信中与机器人互动。  \n在多账号模式下，此设置按每个账号单独配置（`channels.feishu.accounts.\u003CaccountId>`）。\n\n| `dmPolicy` | 允许发送私信的人 | 如何授予用户访问权限 |\n|------------|------------------|--------------------------------|\n| `pairing` | `allowFrom`中的用户，或通过配对流程批准的用户 | 用户发送一条私信并获取配对码；机器人所有者运行 `openclaw pairing approve feishu \u003Ccode>`。 |\n| `open` | 所有用户 | 设置 `allowFrom: [\"*\"]`，这样所有用户都被视为允许。 |\n| `allowlist` | 仅限 `allowFrom` 中的用户 | 将用户的 `open_id`\u002F`user_id` 添加到 `allowFrom` 中，然后重新加载配置。 |\n\n注意事项：\n- `allowFrom` 接受飞书用户ID（推荐使用 `open_id`，也支持 `user_id`）。\n- 如果 `dmPolicy: \"open\"`，请使用 `allowFrom: [\"*\"]`。这是顶层架构验证所必需的，并且能明确访问行为。\n- `pairing` 和 `allowlist` 都可以通过 `allowFrom` 提前授权用户。\n\n配对流程（所有者批准）：\n1. 用户向机器人发送任意一条私信。\n2. 机器人回复一个配对码（例如 `H9ZEHY8R`）。\n3. 机器人所有者批准：\n\n```bash\nopenclaw pairing approve feishu H9ZEHY8R\n```\n\n4. 用户将被添加到允许列表中，并可立即开始聊天。\n\n示例：对所有人开放\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n```\n\n示例：受控上线（配对 + 预先批准用户）\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"pairing\"\n    allowFrom:\n      - \"ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n```\n\n示例：严格白名单\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"allowlist\"\n    allowFrom:\n      - \"ou_alice\"\n      - \"ou_bob\"\n```\n\n示例：账号级隔离\n\n```yaml\nchannels:\n  feishu:\n    accounts:\n      lobster-1:\n        dmPolicy: \"open\"\n        allowFrom: [\"*\"]\n      lobster-5:\n        dmPolicy: \"pairing\"\n```\n\n顶层的 `channels.feishu.dmPolicy` \u002F `channels.feishu.allowFrom` 是未覆盖该设置的账号的默认值。\n\n> `dmPolicy` 仅控制谁可以触发机器人。  \n> 要真正读取\u002F写入文档或文件，您仍然需要：(1) 正确的飞书应用权限范围，以及 (2) 将目标资源（云盘\u002F知识库\u002F多维表格）共享给机器人。\n\n#### 群组命令免提及机制\n\n当 `requireMention: true` 时，飞书仍允许授权的控制命令（如 `\u002Fnew`）无需 `@机器人` 即可执行。\n\n| `groupCommandMentionBypass` | 行为 |\n|----------------------------|------|\n| `never` | 永远不绕过群组命令的`@`要求。 |\n| `single_bot` | 仅当群组中至多有一个机器人时才绕过（默认）。 |\n| `always` | 总是允许授权的控制命令绕过提及限制。 |\n\n注意事项：\n- 绕过仅适用于群聊中的授权控制命令。\n- 如果同一消息中明确提到了任何用户，则会禁用绕过功能。\n- 在私信中，此设置不适用。\n\n#### 群组无@提及行为（`requireMention: false`）\n\n当 `requireMention: false` 时，非@群组消息会遵循一个安全默认值：\n\n| `allowMentionlessInMultiBotGroup` | 非@群组消息的行为 |\n|-----------------------------------|-----------------------------------|\n| `false`（默认） | 仅当群组中至多有一个机器人时才接受。在多机器人群组中，仍然需要明确的`@机器人`。 |\n| `true` | 即使在多机器人群组中也接受（仅在您能接受重复触发风险时使用）。 |\n\n重要提示：\n- `im:message.group_msg` 是接收非@群组消息所必需的权限，这在飞书中属于**敏感权限**。\n- 如果未批准此权限，飞书通常只会传递`@机器人`的群组消息（`im:message.group_at_msg:readonly`）。\n\n#### 连接模式\n\n有两种连接模式可用于从飞书接收事件：\n\n| 模式 | 描述 |\n|------|-------------|\n| `websocket` | （默认，推荐）长轮询WebSocket连接。无需公网URL，可在NAT\u002F防火墙后工作。最适合本地开发和大多数部署场景。 |\n| `webhook` | 接收事件回调的HTTP服务器。需要一个可公开访问的URL。适合部署在反向代理（如Nginx）后的服务器环境。 |\n\n**WebSocket模式**（默认，无需额外配置）：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"websocket\"  # 或者直接省略这一行\n```\n\n在飞书控制台：事件与回调 → 选择 **长连接**。\n\n**Webhook模式**：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"webhook\"\n    webhookPort: 3000               # HTTP服务器端口（默认3000）\n    webhookPath: \"\u002Ffeishu\u002Fevents\"   # 事件回调路径（默认\"\u002Ffeishu\u002Fevents\"）\n    encryptKey: \"your_encrypt_key\"           # 来自飞书控制台→事件与回调→加密密钥\n    verificationToken: \"your_verify_token\"   # 来自飞书控制台→事件与回调→验证令牌\n```\n\n在飞书控制台：事件与回调 → 选择 **请求URL** → 设置URL为：\n\n```\nhttps:\u002F\u002Fyour-domain.com\u002Ffeishu\u002Fevents\n```\n\n> **注意：** 请求URL必须是HTTPS且可公开访问。对于本地开发，可以使用 [ngrok](https:\u002F\u002Fngrok.com) 等工具创建隧道：`ngrok http 3000`，然后使用生成的URL。\n\n#### 渲染模式\n\n| 模式 | 描述 |\n|------|-------------|\n| `auto` | （默认）自动检测：带有代码块或表格的消息使用卡片格式，其他情况使用纯文本。 |\n| `raw` | 始终以纯文本形式发送回复。Markdown表格会被转换为ASCII格式。 |\n| `card` | 始终以交互式卡片形式发送回复，支持完整的Markdown渲染（语法高亮、表格、可点击链接）。 |\n\n#### 动态代理创建（多用户工作空间隔离）\n\n启用后，每位私信用户都会自动获得一个独立的代理实例，并配备专用的工作空间。这提供了完全的隔离，包括独立的对话历史、内存（MEMORY.md）和工作空间文件。\n\n#### 聊天管理限制 ⚠️\n\n> **重要提示：** `delete_chat` 需要机器人是**群组所有者**。如果机器人是以成员身份（非所有者）被加入到现有聊天中，则无法解散该聊天。\n>\n> 如果需要解散机器人不拥有的聊天：\n> 1. **群组所有者**应先将所有权转移给机器人，或\n> 2. 群组所有者直接在飞书应用中解散群组。\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n    dynamicAgentCreation:\n      enabled: true\n      # 工作空间目录模板 ({userId} = OpenID, {agentId} = 生成的代理ID)\n      workspaceTemplate: \"~\u002Fworkspaces\u002Ffeishu-{agentId}\"\n      # 代理配置目录模板\n      agentDirTemplate: \"~\u002F.openclaw\u002Fagents\u002F{agentId}\u002Fagent\"\n      # 可选：限制动态代理总数\n      maxAgents: 100\n\nsession:\n  # 同时设置会话隔离的 dmScope（对话历史）\n  dmScope: \"per-peer\"\n```\n\n| 选项 | 描述 |\n|--------|-------------|\n| `enabled` | 为 DM 用户启用动态代理创建 |\n| `workspaceTemplate` | 工作空间路径模板。支持 `{userId}`（OpenID）和 `{agentId}`（= `feishu-{openId}`） |\n| `agentDirTemplate` | 代理目录路径模板 |\n| `maxAgents` | 动态代理数量的可选上限 |\n\n**工作原理：**\n1. 当新用户发送私信时，系统会在 `openclaw.json` 中创建一个新的代理条目。\n2. 创建绑定以将该用户的私信路由到其专属代理。\n3. 自动创建工作空间和代理目录。\n4. 该用户后续的消息将发送到其隔离的代理。\n\n**与 `dmScope: \"per-peer\"` 的区别：**\n- `dmScope: \"per-peer\"` 仅隔离对话历史。\n- `dynamicAgentCreation` 提供全面隔离（工作空间、内存、身份、工具）。\n\n\n\n### 功能\n\n- WebSocket 和 Webhook 连接模式\n- 私信和群聊\n- 消息回复和引用消息上下文\n- **入站媒体支持**：AI 可以查看图片、读取文件（PDF、Excel 等），并处理包含嵌入式图片的富文本。\n- 图片和文件上传（出站）\n- 键入指示器（通过表情符号反应）\n- 私信批准的配对流程\n- 用户和群组目录查找\n- **卡片渲染模式**：可选的 Markdown 渲染，带有语法高亮。\n- **文档工具**：使用 Markdown 读取、创建和写入飞书文档，包括原子化的 `create_and_write` \u002F `import_document` 流程，以确保可靠地创建并写入内容。\n- **维基工具**：导航知识库、列出空间、获取节点详情、搜索、创建\u002F移动\u002F重命名节点。\n- **云盘工具**：列出文件夹、获取文件信息、创建文件夹、移动\u002F删除文件。\n- **多维表格工具**：管理多维表格字段和记录（读取\u002F创建\u002F更新\u002F删除），支持 `\u002Fbase\u002F` 和 `\u002Fwiki\u002F` URL。\n- **任务工具**：通过飞书任务 v2 API 创建、获取详细信息、更新和删除任务。\n- **聊天工具**：读取和写入群公告、创建群聊、添加成员、检查机器人是否为成员、删除聊天（`feishu_chat`）。\n- **紧急通知工具**：通过 `feishu_urgent` 发送震动\u002F紧急通知（应用、短信、语音通话）。\n- **消息工具**：读取单条消息或按时间范围和分页列出最近的聊天历史（`feishu_message`）。\n- **反应工具**：在消息上添加、移除和列出表情符号反应（`feishu_reaction`）。\n- **@提及转发**：当您在消息中提到某人时，机器人的回复也会自动提及他们。\n- **权限错误通知**：当机器人遇到飞书 API 权限错误时，会自动向用户发送权限授予链接。\n- **动态代理创建**：每个 DM 用户都可以拥有自己的独立代理实例，并配备专用的工作空间（可选）。\n\n#### @提及转发\n\n当您希望机器人在回复中提及某人时，只需在您的消息中提及他们即可：\n\n- **私信中**：`@张三 say hello` → 机器人回复 `@张三 Hello!`\n- **群聊中**：`@bot @张三 say hello` → 机器人回复 `@张三 Hello!`\n\n机器人会自动检测您消息中的 @提及，并将其包含在回复中。无需额外的权限，只需标准的消息权限即可。\n\n### 常见问题解答\n\n#### 机器人无法接收消息\n\n请检查以下事项：\n1. 您是否已配置**事件订阅**？（参见“事件订阅”部分）\n2. 事件订阅模式是否与您的 `connectionMode` 匹配？\n   - `websocket` → 飞书控制台中的**长连接**\n   - `webhook` → 飞书控制台中的**请求 URL**（URL 必须可访问）\n3. 您是否添加了 `im.message.receive_v1` 事件？\n4. 权限是否已批准？\n5. 对于 webhook 模式：您的服务器是否正在运行，且 URL 是否对外公开？\n\n#### `requireMention: false` 但群聊仍需 @提及\n\n请检查以下事项：\n1. `im:message.group_msg` 是否已批准？（敏感权限，用于非 @提及的群聊消息）\n2. 如果群聊中有多个机器人，您是否明确设置了 `allowMentionlessInMultiBotGroup: true`？\n3. 在有效账户\u002F群组上是否配置了 `requireMention: false`？\n\n#### 发送消息时出现 403 错误\n\n请确保 `im:message:send_as_bot` 权限已批准。\n\n#### 如何清除历史记录\u002F开始新对话\n\n在聊天中发送 `\u002Fnew` 命令即可。\n\n#### 为什么输出不是流式传输\n\n飞书 API 存在速率限制。流式更新很容易触发限流。为了稳定性，我们采用先完成再发送的方式。\n\n#### 在飞书中找不到机器人\n\n1. 确保应用已发布（至少为测试版本）。\n2. 在飞书搜索框中搜索机器人名称。\n3. 检查您的账号是否在应用的可用范围内。\n\n---\n\n## 中文\n\n### 安装\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```\n\n> [!IMPORTANT]\n> **Windows 排错（`spawn npm ENOENT`）**\n>\n> 如果 `openclaw plugins install` 失败，可通过最新 tarball 手动安装：\n>\n> ```bash\n> # 方案 A（推荐）：下载最新插件 tarball\n> npm pack @m1heng-clawd\u002Ffeishu\n> openclaw plugins install .\u002Fm1heng-clawd-feishu-\u003Cversion>.tgz\n> ```\n>\n> ```bash\n> # 方案 B（保留 curl 路径）：先解析最新 tarball 地址，再下载安装\n> TARBALL_URL=\"$(npm view @m1heng-clawd\u002Ffeishu dist.tarball)\"\n> curl -L -o feishu-latest.tgz \"$TARBALL_URL\"\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n>\n> ```powershell\n> # Windows PowerShell（方案 B）\n> $tarball = npm view @m1heng-clawd\u002Ffeishu dist.tarball\n> curl.exe -L $tarball -o feishu-latest.tgz\n> openclaw plugins install .\\feishu-latest.tgz\n> ```\n>\n> ```bash\n> # 方案 C（无 npm 命令）：先在 npm Versions 页查到最新版本号，再套用 URL 模板\n> # https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@m1heng-clawd\u002Ffeishu?activeTab=versions\n> curl -L -o feishu-latest.tgz https:\u002F\u002Fregistry.npmjs.org\u002F@m1heng-clawd\u002Ffeishu\u002F-\u002Ffeishu-\u003Cversion>.tgz\n> openclaw plugins install .\u002Ffeishu-latest.tgz\n> ```\n\n### 升级\n\n```bash\nopenclaw plugins update feishu\n```\n\n查看已安装版本：\n\n```bash\nopenclaw plugins list | rg -i feishu\n```\n\n### 配置\n\n1. 在 [飞书开放平台](https:\u002F\u002Fopen.feishu.cn) 创建自建应用\n2. 在凭证页面获取 App ID 和 App Secret\n3. 开启所需权限（见下方）\n4. **配置事件订阅**（见下方）⚠️ 重要\n5. 配置插件：\n\n#### 必需权限\n\n| 权限 | 范围 | 说明 |\n|------|------|------|\n| `im:message` | 消息 | 发送和接收消息 |\n| `im:message.p2p_msg:readonly` | 私聊 | 读取发给机器人的私聊消息 |\n| `im:message.group_at_msg:readonly` | 群聊 | 接收群内 @机器人 的消息 |\n| `im:message:send_as_bot` | 发送 | 以机器人身份发送消息 |\n| `im:resource` | 媒体 | 上传和下载图片\u002F文件 |\n\n#### 可选权限\n\n| 权限 | 范围 | 说明 |\n|------|------|------|\n| `contact:user.base:readonly` | 用户信息 | 获取用户基本信息（用于解析发送者姓名，避免群聊\u002F私聊把不同人当成同一说话者） |\n| `im:message.group_msg` | 群聊 | 读取所有群消息（敏感权限）。当你希望 `requireMention: false` 对“未 @ 的群消息”生效时必需 |\n| `im:message:readonly` | 读取 | 获取历史消息 |\n| `im:message:update` | 编辑 | 更新\u002F编辑已发送消息 |\n| `im:message:recall` | 撤回 | 撤回已发送消息 |\n| `im:message.reactions:read` | 表情 | 查看消息表情回复 |\n\n#### 工具权限\n\n**只读权限**（最低要求）：\n\n| 权限 | 工具 | 说明 |\n|------|------|------|\n| `docx:document:readonly` | `feishu_doc` | 读取文档 |\n| `drive:drive:readonly` | `feishu_drive` | 列出文件夹、获取文件信息 |\n| `wiki:wiki:readonly` | `feishu_wiki` | 列出空间、列出节点、获取节点详情、搜索 |\n| `bitable:app:readonly` | `feishu_bitable` | 读取多维表格记录和字段 |\n| `task:task:read` | `feishu_task_get` | 获取任务详情 |\n| `task:tasklist:read` | `feishu_tasklist_get`, `feishu_tasklist_list` | 获取\u002F列出任务清单（tasklists） |\n| `task:comment:read` | `feishu_task_comment_list`, `feishu_task_comment_get` | 列出\u002F获取任务评论 |\n| `task:attachment:read` | `feishu_task_attachment_list`, `feishu_task_attachment_get` | 列出\u002F获取任务附件 |\n| `im:chat.announcement:read` | `feishu_chat` | 读取群公告 |\n| `im:chat:readonly` | `feishu_chat` | 获取群信息、检查机器人是否在群内 |\n| `im:message` 或 `im:message:readonly` | `feishu_message` | 读取单条\u002F私聊消息 |\n| `im:message.group_at_msg:readonly` | `feishu_message` | 读取群聊中所有消息 |\n| `im:message.reactions:read` | `feishu_reaction` | 查看消息表情回复 |\n\n**读写权限**（可选，用于创建\u002F编辑\u002F删除操作）：\n\n| 权限 | 工具 | 说明 |\n|------|------|------|\n| `docx:document` | `feishu_doc` | 创建\u002F编辑文档 |\n| `docx:document.block:convert` | `feishu_doc` | Markdown 转 blocks（write\u002Fappend\u002Fcreate_and_write 必需，`feishu_drive.import_document` 也会用到） |\n| `drive:drive` | `feishu_doc`, `feishu_drive` | 上传图片到文档、创建文件夹、移动\u002F删除文件 |\n| `wiki:wiki` | `feishu_wiki` | 创建\u002F移动\u002F重命名知识库节点 |\n| `bitable:app` | `feishu_bitable` | 创建\u002F更新\u002F删除多维表格记录并管理字段 |\n| `task:task:write` | `feishu_task_create`, `feishu_task_subtask_create`, `feishu_task_update`, `feishu_task_delete` | 创建\u002F更新\u002F删除任务 |\n| `task:tasklist:write` | `feishu_tasklist_create`, `feishu_tasklist_update`, `feishu_tasklist_delete`, `feishu_tasklist_add_members`, `feishu_tasklist_remove_members`, `feishu_task_add_tasklist`, `feishu_task_remove_tasklist` | 创建\u002F更新\u002F删除任务清单并管理成员\u002F关联任务 |\n| `task:comment:write` | `feishu_task_comment_create`, `feishu_task_comment_update`, `feishu_task_comment_delete` | 创建\u002F更新\u002F删除任务评论 |\n| `task:attachment:write` | `feishu_task_attachment_upload`, `feishu_task_attachment_delete` | 上传\u002F删除任务附件 |\n| `im:message.urgent` | `feishu_urgent` | 发送应用内加急（buzz）通知。使用 `sms` 和 `phone` 变体（`im:message.urgent:sms`、`im:message.urgent:phone`）可发送短信和语音电话加急。 |\n| `im:chat.announcement` | `feishu_chat` | 写入\u002F更新群公告 |\n| `im:chat` | `feishu_chat` | 创建和删除群聊 |\n| `im:chat.members` | `feishu_chat` | 向群聊添加成员 |\n| `im:message.reactions:write_only` | `feishu_reaction` | 发送、删除消息表情回复 |\n\n> 飞书控制台中任务权限的显示名称可能略有差异，必要时可按关键字 `task` \u002F `tasklist` \u002F `comment` \u002F `attachment` 搜索并授予对应读写权限。\n\n#### 任务评论权限 ⚠️\n\n任务评论需要单独授权：\n1. 读取评论：授予 `task:comment:read`。\n2. 创建\u002F更新\u002F删除评论：授予 `task:comment:write`。\n\n缺少上述权限时，评论相关接口会返回权限不足错误。\n\n#### 任务附件上传 ⚠️\n\n任务附件支持上传\u002F获取\u002F列表\u002F删除。上传来源：\n1. OpenClaw\u002FNode 所在机器的本地文件路径（`file_path`）\n2. 可直接下载的远程链接（`file_url`，公开\u002F预签名 URL）\n\n`file_url` 上传路径会使用 OpenClaw 运行时的媒体下载安全校验与大小限制（`mediaMaxMb`），随后经临时本地文件上传到任务附件。\n\n#### 任务清单所有者限制 ⚠️\n\n> **重要：** 创建\u002F修改任务清单时，请保持清单所有者为机器人本身，只把用户作为协作人添加。\n\n任务清单权限基于“所有者 + 协作成员角色”授予。如果把清单所有者改成用户、且机器人不在协作成员中，机器人可能会失去对该清单的读取\u002F编辑\u002F管理权限，导致后续对清单的操作失败。\n\n#### 任务限制 ⚠️\n\n> **重要：** 只有当任务责任人包含用户时，用户才能查看到该任务。\n>\n> **限制：** 机器人目前只能给自己创建出来的任务创建子任务。\n\n为避免“任务创建了但用户看不到”的问题：\n1. 创建任务时，请把发起用户设为任务负责人（`assignee`）。\n2. 如需更灵活的子任务创建\u002F组织\u002F可见性管理，建议使用任务清单（tasklists）。\n\n#### 云空间访问权限 ⚠️\n\n> **重要：** 机器人没有自己的\"我的空间\"（根目录）。机器人只能访问**被分享给它的文件\u002F文件夹**。\n\n要让机器人管理文件：\n1. 在你的飞书云空间创建一个文件夹\n2. 右键文件夹 → **分享** → 搜索机器人名称\n3. 授予相应权限（查看\u002F编辑）\n\n如果不做这一步，`feishu_drive` 的 `create_folder` 等操作会失败，因为机器人没有根目录可以创建文件夹。\n\n#### 知识库空间权限 ⚠️\n\n> **重要：** 仅有 API 权限不够，还需要将机器人添加到知识库空间。\n\n1. 打开需要机器人访问的知识库空间\n2. 点击 **设置**（齿轮图标）→ **成员管理**\n3. 点击 **添加成员** → 搜索机器人名称\n4. 选择权限级别（查看\u002F编辑）\n\n如果不做这一步，即使 API 权限正确，`feishu_wiki` 也会返回空结果。\n\n参考文档：[知识库常见问题 - 如何将应用添加为知识库成员](https:\u002F\u002Fopen.feishu.cn\u002Fdocument\u002Fserver-docs\u002Fdocs\u002Fwiki-v2\u002Fwiki-qa#a40ad4ca)\n\n#### 多维表格访问权限 ⚠️\n\n> **重要：** 与其他资源一样，机器人只能访问**被分享给它的多维表格**。\n\n要让机器人访问多维表格：\n1. 打开需要机器人访问的多维表格\n2. 点击 **分享** 按钮 → 搜索机器人名称\n3. 授予相应权限（查看\u002F编辑）\n\n`feishu_bitable` 工具支持两种 URL 格式：\n- `\u002Fbase\u002FXXX?table=YYY` - 标准多维表格链接\n- `\u002Fwiki\u002FXXX?table=YYY` - 嵌入在知识库中的多维表格（自动转换为 app_token）\n\n#### 事件订阅 ⚠️\n\n> **这是最容易遗漏的配置！** 如果机器人能发消息但收不到消息，请检查此项。\n\n在飞书开放平台的应用后台，进入 **事件与回调** 页面：\n\n1. **事件配置方式**：根据你的 `connectionMode` 选择对应的订阅方式：\n   - **使用长连接接收事件** — 对应 `connectionMode: \"websocket\"`（推荐，无需公网地址）\n   - **使用请求地址接收事件** — 对应 `connectionMode: \"webhook\"`（需要公网可访问的 URL）\n2. **添加事件订阅**，勾选以下事件：\n\n| 事件 | 说明 |\n|------|------|\n| `im.message.receive_v1` | 接收消息（必需） |\n| `im.message.message_read_v1` | 消息已读回执 |\n| `im.chat.member.bot.added_v1` | 机器人进群 |\n| `im.chat.member.bot.deleted_v1` | 机器人被移出群 |\n\n3. 确保事件订阅的权限已申请并通过审核\n\n```bash\nopenclaw config set channels.feishu.appId \"cli_xxxxx\"\nopenclaw config set channels.feishu.appSecret \"your_app_secret\"\nopenclaw config set channels.feishu.enabled true\n```\n\n### 配置选项\n\n```yaml\nchannels:\n  feishu:\n    enabled: true\n    appId: \"cli_xxxxx\"\n    appSecret: \"secret\"\n    # 域名: \"feishu\" (国内)、\"lark\" (国际) 或自定义 URL\n    domain: \"feishu\"  # 私有化部署可用 \"https:\u002F\u002Fopen.xxx.cn\"\n    # 连接模式: \"websocket\" (推荐) 或 \"webhook\"\n    connectionMode: \"websocket\"\n    # 私聊策略: \"pairing\" | \"open\" | \"allowlist\"\n    dmPolicy: \"pairing\"\n    # 私聊白名单（open_id\u002Fuser_id）；当 dmPolicy=\"open\" 时请包含 \"*\"\n    allowFrom: []\n    # 群聊策略: \"open\" | \"allowlist\" | \"disabled\"\n    groupPolicy: \"allowlist\"\n    # 群聊是否需要 @机器人\n    requireMention: true\n    # 免 @ 安全默认策略（requireMention=false 时）：\n    # 仅在群内机器人数量 \u003C= 1 时处理未 @ 的群消息。\n    # 设为 true 可在多 bot 群也放开免 @（需自行承担重复触发风险）。\n    allowMentionlessInMultiBotGroup: false\n    # 群聊命令绕过 @ 策略: \"never\" | \"single_bot\" | \"always\"\n    # 默认 \"single_bot\"：仅当群内机器人数量 \u003C= 1 时，允许已授权命令免 @\n    groupCommandMentionBypass: \"single_bot\"\n    # 媒体文件最大大小 (MB, 默认 30)\n    mediaMaxMb: 30\n    # 回复渲染模式: \"auto\" | \"raw\" | \"card\"\n    renderMode: \"auto\"\n```\n\n#### 私聊策略（dmPolicy）与访问授权\n\n`dmPolicy` 控制的是“谁可以在私聊里触发机器人”。  \n在多账号模式下，它按账号生效（`channels.feishu.accounts.\u003CaccountId>`）。\n\n| `dmPolicy` | 谁能私聊触发机器人 | 如何给用户开通 |\n|------------|------------------|----------------|\n| `pairing` | `allowFrom` 中的用户，或已通过配对审批的用户 | 用户先私聊机器人拿到配对码；管理员执行 `openclaw pairing approve feishu \u003Ccode>`。 |\n| `open` | 所有人 | 配置 `allowFrom: [\"*\"]`，表示全部放开。 |\n| `allowlist` | 仅 `allowFrom` 中的用户 | 将用户 `open_id`\u002F`user_id` 加入 `allowFrom`，然后重载配置。 |\n\n说明：\n- `allowFrom` 支持飞书用户 ID（推荐 `open_id`，也支持 `user_id`）。\n- 当 `dmPolicy: \"open\"` 时，建议固定写 `allowFrom: [\"*\"]`，语义最清晰，也满足顶层配置校验要求。\n- `pairing` 和 `allowlist` 都可以先通过 `allowFrom` 预授权部分用户。\n\n配对审批流程（pairing）：\n1. 用户先给机器人发一条私聊消息。\n2. 机器人返回配对码（例如 `H9ZEHY8R`）。\n3. 管理员执行审批命令：\n\n```bash\nopenclaw pairing approve feishu H9ZEHY8R\n```\n\n4. 审批后该用户立即可用。\n\n示例：全部放开\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n```\n\n示例：灰度放开（pairing + 预授权）\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"pairing\"\n    allowFrom:\n      - \"ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n```\n\n示例：严格白名单\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"allowlist\"\n    allowFrom:\n      - \"ou_alice\"\n      - \"ou_bob\"\n```\n\n示例：按账号隔离配置\n\n```yaml\nchannels:\n  feishu:\n    accounts:\n      lobster-1:\n        dmPolicy: \"open\"\n        allowFrom: [\"*\"]\n      lobster-5:\n        dmPolicy: \"pairing\"\n```\n\n`channels.feishu.dmPolicy` \u002F `channels.feishu.allowFrom` 是“默认值”；账号下未覆盖时才会继承。\n\n> `dmPolicy` 只控制“是否允许触发机器人”。  \n> 真正执行文档\u002F云盘\u002F知识库\u002F多维表格操作，还需要两层权限：1）应用 API 权限（scopes）；2）把目标资源分享给机器人。\n\n#### 群聊命令免 @ 策略\n\n当 `requireMention: true` 时，Feishu 仍可让“已授权控制命令（如 `\u002Fnew`）”在不 `@bot` 的情况下通过。\n\n| `groupCommandMentionBypass` | 行为 |\n|----------------------------|------|\n| `never` | 群聊命令永不绕过 `@` 校验。 |\n| `single_bot` | 仅当群内机器人数量不超过 1 个时才允许绕过（默认）。 |\n| `always` | 已授权控制命令始终可绕过 `@` 校验。 |\n\n说明：\n- 仅对群聊中的“已授权控制命令”生效。\n- 同一条消息里如果显式 `@` 了任意用户，则不会触发命令免 `@`。\n- 私聊场景不受该配置影响。\n\n#### 群聊免 @ 行为（`requireMention: false`）\n\n当 `requireMention: false` 时，插件对“未 @ 的群消息”采用安全默认策略：\n\n| `allowMentionlessInMultiBotGroup` | 未 @ 群消息行为 |\n|-----------------------------------|----------------|\n| `false`（默认） | 仅当群里机器人数量不超过 1 个时处理；多 bot 群仍要求显式 `@bot`。 |\n| `true` | 即使在多 bot 群也处理未 @ 消息（仅建议在可接受重复触发风险时启用）。 |\n\n重要说明：\n- 要接收未 @ 的群消息，必须申请并通过 `im:message.group_msg`，且该权限是飞书**敏感权限**。\n- 若未通过该权限，飞书通常只会推送 `@bot` 群消息（`im:message.group_at_msg:readonly`）。\n\n#### 连接模式\n\n支持两种从飞书接收事件的连接模式：\n\n| 模式 | 说明 |\n|------|------|\n| `websocket` | （默认，推荐）长连接 WebSocket 模式。无需公网地址，可在 NAT\u002F防火墙后使用。适合本地开发和大部分部署场景。 |\n| `webhook` | HTTP 服务器接收事件回调。需要公网可访问的 URL。适合通过反向代理（如 Nginx）部署的服务器环境。 |\n\n**WebSocket 模式**（默认，无需额外配置）：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"websocket\"  # 或直接省略此行\n```\n\n飞书控制台：事件与回调 → 选择 **使用长连接接收事件**。\n\n**Webhook 模式**：\n\n```yaml\nchannels:\n  feishu:\n    connectionMode: \"webhook\"\n    webhookPort: 3000               # HTTP 服务端口（默认: 3000）\n    webhookPath: \"\u002Ffeishu\u002Fevents\"   # 事件回调路径（默认: \"\u002Ffeishu\u002Fevents\"）\n    encryptKey: \"your_encrypt_key\"           # 飞书控制台 → 事件与回调 → Encrypt Key\n    verificationToken: \"your_verify_token\"   # 飞书控制台 → 事件与回调 → Verification Token\n```\n\n飞书控制台：事件与回调 → 选择 **使用请求地址接收事件** → 填入请求地址：\n\n```\nhttps:\u002F\u002Fyour-domain.com\u002Ffeishu\u002Fevents\n```\n\n> **提示：** 请求地址必须是 HTTPS 且公网可访问。本地开发时，可使用 [ngrok](https:\u002F\u002Fngrok.com) 等工具创建隧道：`ngrok http 3000`，然后使用生成的地址。\n\n#### 渲染模式\n\n| 模式 | 说明 |\n|------|------|\n| `auto` | （默认）自动检测：有代码块或表格时用卡片，否则纯文本 |\n| `raw` | 始终纯文本，表格转为 ASCII |\n| `card` | 始终使用卡片，支持语法高亮、表格、链接等。\n\n#### 群管理限制 ⚠️\n\n> **重要提示：** `delete_chat` 需要机器人是该群的**群主**。如果机器人是以成员身份加入现有群聊（非群主），则无法解散该群聊。\n>\n> 如需解散机器人不拥有的群聊：\n> 1. **群主**将群主权限转让给机器人，或\n> 2. 由群主直接在飞书客户端解散群聊。\n\n#### 动态 Agent 创建（多用户 Workspace 隔离）\n\n启用后，每个私聊用户会自动获得独立的 agent 实例和专属 workspace。这提供完整的隔离，包括独立的对话历史、记忆（MEMORY.md）和工作区文件。\n\n```yaml\nchannels:\n  feishu:\n    dmPolicy: \"open\"\n    allowFrom: [\"*\"]\n    dynamicAgentCreation:\n      enabled: true\n      # workspace 目录模板 ({userId} = OpenID, {agentId} = 生成的 agent ID)\n      workspaceTemplate: \"~\u002Fworkspaces\u002Ffeishu-{agentId}\"\n      # agent 配置目录模板\n      agentDirTemplate: \"~\u002F.openclaw\u002Fagents\u002F{agentId}\u002Fagent\"\n      # 可选：限制动态 agent 总数\n      maxAgents: 100\n\nsession:\n  # 同时设置 dmScope 以隔离对话历史\n  dmScope: \"per-peer\"\n```\n\n| 选项 | 说明 |\n|------|------|\n| `enabled` | 是否为私聊用户启用动态 agent 创建 |\n| `workspaceTemplate` | workspace 路径模板，支持 `{userId}`（OpenID）和 `{agentId}`（= `feishu-{openId}`）|\n| `agentDirTemplate` | agent 目录路径模板 |\n| `maxAgents` | 可选，限制动态 agent 的最大数量 |\n\n**工作原理：**\n1. 当新用户发送私聊时，系统在 `openclaw.json` 中创建新的 agent 条目\n2. 创建 binding 将该用户的私聊路由到专属 agent\n3. 自动创建 workspace 和 agent 目录\n4. 该用户后续的消息都会路由到其隔离的 agent\n\n**与 `dmScope: \"per-peer\"` 的区别：**\n- `dmScope: \"per-peer\"` 仅隔离对话历史\n- `dynamicAgentCreation` 提供完整隔离（workspace、记忆、身份、工具）\n\n### 功能\n\n- WebSocket 和 Webhook 连接模式\n- 私聊和群聊\n- 消息回复和引用上下文\n- **入站媒体支持**：AI 可以看到图片、读取文件（PDF、Excel 等）、处理富文本中的嵌入图片\n- 图片和文件上传（出站）\n- 输入指示器（通过表情回复实现）\n- 私聊配对审批流程\n- 用户和群组目录查询\n- **卡片渲染模式**：支持语法高亮的 Markdown 渲染\n- **文档工具**：读取、创建、用 Markdown 写入飞书文档（表格因 API 限制不支持）\n- **知识库工具**：浏览知识库、列出空间、获取节点详情、搜索、创建\u002F移动\u002F重命名节点\n- **云空间工具**：列出文件夹、获取文件信息、创建文件夹、移动\u002F删除文件\n- **多维表格工具**：支持多维表格字段与记录的读取\u002F创建\u002F更新\u002F删除，支持 `\u002Fbase\u002F` 和 `\u002Fwiki\u002F` 两种链接格式\n- **任务工具**：基于 Task v2 API 支持任务创建、获取详情、更新和删除\n- **群聊工具**：读写群公告、创建群聊、添加成员、检查机器人是否在群内、删除群聊（`feishu_chat`）\n- **加急通知工具**：发送应用内加急（buzz）、短信、语音电话加急通知（`feishu_urgent`）\n- **消息工具**：读取单条消息或列出聊天历史记录，支持时间范围和分页（`feishu_message`）\n- **表情工具**：添加、删除、列出消息上的表情回复（`feishu_reaction`）\n- **@ 转发功能**：在消息中 @ 某人，机器人的回复会自动 @ 该用户\n- **权限错误提示**：当机器人遇到飞书 API 权限错误时，会自动通知用户并提供权限授权链接\n- **动态 Agent 创建**：每个私聊用户可拥有独立的 agent 实例和专属 workspace（可选）\n\n#### @ 转发功能\n\n如果你希望机器人的回复中 @ 某人，只需在你的消息中 @ 他们：\n\n- **私聊**：`@张三 跟他问好` → 机器人回复 `@张三 你好！`\n- **群聊**：`@机器人 @张三 跟他问好` → 机器人回复 `@张三 你好！`\n\n机器人会自动检测消息中的 @ 并在回复时带上。无需额外权限。\n\n### 常见问题\n\n#### 机器人收不到消息\n\n检查以下配置：\n1. 是否配置了 **事件订阅**？（见上方事件订阅章节）\n2. 事件订阅方式是否与 `connectionMode` 匹配？\n   - `websocket` → 飞书控制台选择 **使用长连接接收事件**\n   - `webhook` → 飞书控制台选择 **使用请求地址接收事件**（URL 必须可访问）\n3. 是否添加了 `im.message.receive_v1` 事件？\n4. 相关权限是否已申请并审核通过？\n5. 如果使用 webhook 模式：服务是否正在运行？URL 是否公网可访问？\n\n#### 已配置 `requireMention: false`，群里仍然必须 @\n\n请重点检查：\n1. 是否已申请并审核通过 `im:message.group_msg`（敏感权限，接收未 @ 群消息必需）\n2. 群里若有多个 bot，是否显式设置了 `allowMentionlessInMultiBotGroup: true`\n3. `requireMention: false` 是否配置在当前生效的账号\u002F群配置上\n\n#### 返回消息时 403 错误\n\n确保已申请 `im:message:send_as_bot` 权限，并且权限已审核通过。\n\n#### 如何清理历史会话 \u002F 开启新对话\n\n在聊天中发送 `\u002Fnew` 命令即可开启新对话。\n\n#### 消息为什么不是流式输出\n\n飞书 API 有请求频率限制，流式更新消息很容易触发限流。当前采用完整回复后一次性发送的方式，以保证稳定性。\n\n#### 在飞书里找不到机器人\n\n1. 确保应用已发布（至少发布到测试版本）\n2. 在飞书搜索框中搜索机器人名称\n3. 检查应用可用范围是否包含你的账号\n\n---\n\n## 许可证\n\nMIT","# clawdbot-feishu 快速上手指南\n\n本指南帮助开发者快速将 OpenClaw 机器人接入飞书（Feishu\u002FLark）平台。\n\n## 1. 环境准备\n\n- **运行环境**：已安装并配置好 [OpenClaw](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw) 的环境（Node.js）。\n- **飞书开放平台账号**：拥有飞书开发者权限，可创建自建应用。\n- **网络要求**：\n  - 若使用 `websocket` 模式（推荐），无需公网 IP。\n  - 若使用 `webhook` 模式，服务器需具备公网可访问的 URL。\n\n## 2. 安装步骤\n\n### 方式一：标准安装（推荐 Linux\u002FmacOS）\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```\n\n### 方式二：Windows 或安装失败时的手动安装\n\n若在 Windows 下遇到 `spawn npm ENOENT` 错误，或标准安装失败，请使用以下手动安装方式：\n\n**选项 A（推荐）：下载压缩包安装**\n```bash\nnpm pack @m1heng-clawd\u002Ffeishu\nopenclaw plugins install .\u002Fm1heng-clawd-feishu-\u003Cversion>.tgz\n```\n\n**选项 B：通过 curl 下载最新包**\n```bash\n# Linux\u002FmacOS\nTARBALL_URL=\"$(npm view @m1heng-clawd\u002Ffeishu dist.tarball)\"\ncurl -L -o feishu-latest.tgz \"$TARBALL_URL\"\nopenclaw plugins install .\u002Ffeishu-latest.tgz\n\n# Windows PowerShell\n$tarball = npm view @m1heng-clawd\u002Ffeishu dist.tarball\ncurl.exe -L $tarball -o feishu-latest.tgz\nopenclaw plugins install .\\feishu-latest.tgz\n```\n\n### 验证安装\n\n查看已安装的插件版本：\n```bash\nopenclaw plugins list | rg -i feishu\n```\n\n升级插件：\n```bash\nopenclaw plugins update feishu\n```\n\n## 3. 基本使用\n\n### 第一步：配置飞书自建应用\n\n1. 登录 [飞书开放平台](https:\u002F\u002Fopen.feishu.cn)，创建一个**自建应用**。\n2. 在“凭证与基础信息”页面获取 `App ID` 和 `App Secret`。\n3. **配置权限**：在“权限管理”中添加以下**必要权限**：\n   - `im:message` (收发消息)\n   - `im:message.p2p_msg:readonly` (读取私聊)\n   - `im:message.group_at_msg:readonly` (读取群内 @ 消息)\n   - `im:message:send_as_bot` (以机器人身份发送)\n   - `im:resource` (上传下载媒体文件)\n   \n   > *注：如需使用文档、云盘、任务等高级功能，请按需添加对应读写权限。*\n\n4. **配置事件订阅**（关键步骤）：\n   - 进入“事件订阅”页面。\n   - 订阅模式选择：\n     - **长连接**：对应配置项 `connectionMode: \"websocket\"`（推荐，无需公网）。\n     - **请求 URL**：对应配置项 `connectionMode: \"webhook\"`（需填写公网回调地址）。\n   - 添加以下事件：\n     - `im.message.receive_v1` (接收消息，必选)\n     - `im.chat.member.bot.added_v1` (机器人被拉入群)\n   - 发布版本并启用事件订阅。\n\n5. **共享资源**（重要）：\n   - **云盘\u002F多维表格**：机器人无法访问所有文件，必须手动将特定文件夹或多维表格**分享给机器人**并授予权限。\n   - **知识库**：必须在知识库设置中，将机器人添加为成员。\n\n### 第二步：配置 OpenClaw\n\n使用命令行将获取到的凭证写入配置文件：\n\n```bash\n# 替换为你的实际 App ID 和 App Secret\nopenclaw config set channels.feishu.appId \"cli_xxxxx\"\nopenclaw config set channels.feishu.appSecret \"xxxxxxxxxx\"\n\n# 可选：配置连接模式 (默认为 websocket)\nopenclaw config set channels.feishu.connectionMode \"websocket\"\n\n# 可选：配置是否仅响应 @ 消息 (默认 true)\nopenclaw config set channels.feishu.requireMention \"true\"\n```\n\n### 第三步：启动与测试\n\n1. 重启 OpenClaw 服务以加载插件。\n2. 在飞书中找到该机器人，发送一条消息（或在群中 @ 机器人）。\n3. 观察终端日志及飞书端的回复，确认交互正常。","某互联网公司的后端团队希望将自研的 AI 代码助手 OpenClaw 集成到日常沟通平台飞书中，以便开发者在群聊内直接获取代码建议和技术答疑。\n\n### 没有 clawdbot-feishu 时\n- 开发者需频繁切换窗口，复制代码片段到网页版 AI 工具，再将结果粘贴回飞书，打断心流且效率低下。\n- 团队无法在飞书群组内统一调用 AI 能力，导致知识沉淀分散，新人难以通过聊天记录快速检索历史解决方案。\n- 自行开发飞书机器人对接接口成本高，需处理复杂的事件订阅、权限配置及消息加解密，占用核心研发资源。\n- 缺乏标准化的插件管理，每次更新 AI 模型或调整配置都需手动修改代码并重新部署服务，维护风险大。\n\n### 使用 clawdbot-feishu 后\n- 开发者只需在飞书群中 @机器人 并发送代码或问题，OpenClaw 即刻返回分析结果，实现“对话即开发”的无缝体验。\n- 所有 AI 交互记录自动留存于飞书群组，形成可搜索的团队知识库，方便成员随时回顾和复用最佳实践。\n- 通过简单的命令行安装与可视化配置，无需编写一行对接代码即可启用消息收发、权限管理等全套功能。\n- 支持一键升级插件版本，团队可灵活切换底层大模型提供商（如优云智算），确保持续获得最新 AI 能力而无需停机维护。\n\nclawdbot-feishu 将复杂的 AI 集成工作简化为即插即用的飞书原生体验，显著提升了研发团队的协作效率与智能化水平。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fm1heng_clawdbot-feishu_b02bb8b2.png","m1heng","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fm1heng_299ec273.png","M1Heng","https:\u002F\u002Fgithub.com\u002Fm1heng",[77,81],{"name":78,"color":79,"percentage":80},"TypeScript","#3178c6",98.6,{"name":82,"color":83,"percentage":84},"Shell","#89e051",1.4,4311,459,"2026-04-09T23:07:55","MIT","Linux, macOS, Windows","未说明",{"notes":92,"python":90,"dependencies":93},"该工具是 OpenClaw 的飞书插件，通过 npm 包安装。需配置飞书开放平台应用（App ID\u002FSecret）、权限及事件订阅。支持 WebSocket 和 Webhook 连接模式。若使用文件上传功能，需注意机器人无独立云空间，必须共享文件夹给机器人；维空间和多维表格也需单独邀请机器人加入。Windows 用户若遇安装失败，建议手动下载 tarball 包安装。",[6,94],"@m1heng-clawd\u002Ffeishu (npm package)",[52,13],"2026-03-27T02:49:30.150509","2026-04-10T20:37:33.466506",[99,104,109,114,119,124,129],{"id":100,"question_zh":101,"answer_zh":102,"source_url":103},28186,"新版 OpenClaw 内置了飞书插件，导致与手动安装的插件冲突或报错，如何解决？","目前系统已自带该插件，通常不需要单独安装。如果因名称不匹配导致配置警告（如 plugin id mismatch），请按以下步骤修复：\n1. 修改 `.\u002Fextensions\u002Ffeishu-openclaw-plugin\u002Fopenclaw.plugin.json` 文件，将 `id` 改为 `openclaw-lark`。\n2. 在 `openclaw.json` 配置文件中，将所有 key 为 `feishu-openclaw-plugin` 的项改为 `openclaw-lark`。\n注意：配置文件中的 value（插件路径）若包含 `feishu-openclaw-plugin` 字样则不要修改，仅改 key 和 id。\n如果问题依旧，建议卸载所有相关插件后，直接使用系统自带的插件。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F171",{"id":105,"question_zh":106,"answer_zh":107,"source_url":108},28187,"飞书开放平台 API 调用次数即将耗尽（每分钟都有调用），有什么解决办法？","首先，飞书官方已将免费额度提升至更高水平（早期为 5 万，现可达 100 万），请确认您的额度情况。\n其次，频繁的每分钟调用通常源于心跳检测机制。如果重装后问题依旧，可能是插件版本未更新或配置未生效。建议检查是否安装了最新版本的插件，因为新版本可能优化了心跳频率或提供了配置选项来减少不必要的调用。如果官方版本尚未修复，可能需要手动修改源码（如 `probe.ts`）或等待后续更新支持配置化调整。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F170",{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},28188,"升级 OpenClaw 后，飞书私聊一直提示需要认证（pairing approve），但群聊正常，如何解决？","这是一个已知问题，通常在升级后出现。原因是旧版本中个人消息（DM）的策略配置缺失或与群聊策略不一致。\n解决方案是升级飞书插件至 **v0.1.14** 或更高版本，该版本已修复了私聊一直提示配对的问题。\n执行命令：`openclaw plugins install @m1heng-clawd\u002Ffeishu`（确保安装的是最新版）。\n如果升级后仍无效，请检查配置中的 `dmPolicy` 是否已正确设置（不应为空或与 `groupPolicy` 冲突）。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F334",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},28189,"如何让机器人在飞书中发送定时消息或进行消息加急操作？","可以通过创建隔离会话的子代理来实现稳定的定时任务。推荐使用 `cron` 工具配合特定参数。\n具体操作指令示例如下：\n`openclaw cron add --name \"提醒名称\" --at \"10m\" --session isolated --deliver --post-to-main none --message \"请使用 message 工具发送：主人，该开会啦！\" --channel feishu`\n关键参数说明：\n- `--session isolated`：使用隔离会话，防止干扰主进程。\n- `--deliver` 和 `--channel feishu`：确保消息直接推送到飞书。\n- `--post-to-main none`：防止在主频道产生重复的系统消息。\n- `message` 内容中需明确指示子代理使用 `message` 工具发送具体内容。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F81",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},28190,"Clawdbot 更名为 OpenClaw 后，插件无法安装或提示 'package.json missing openclaw.extensions' 怎么办？","这是因为旧版插件的 `package.json` 中仍使用 `clawdbot` 字段，而新版 OpenClaw 要求使用 `openclaw` 字段。\n解决方案有两种：\n1. **直接升级**：维护者已在 v0.1.3 版本修复此问题，直接运行 `openclaw plugins install @m1heng-clawd\u002Ffeishu` 安装最新版即可。\n2. **手动修复（针对旧版源码）**：\n   - 克隆仓库并进入目录。\n   - 打开 `package.json`，将 `\"clawdbot\": { ... }` 修改为 `\"openclaw\": { ... }`。\n   - 将 `clawdbot.plugin.json` 重命名为 `openclaw.plugin.json`。\n   - 运行 `pnpm install && pnpm pack` 打包，然后本地安装生成的 `.tgz` 文件。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F52",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},28191,"安装插件后，使用 GPT、Claude 等模型报错，但 MiniMax 模型正常，如何解决？","这是插件版本兼容性问题，旧版本（如 0.1.12）可能与某些模型提供商存在冲突。\n解决方案是升级飞书插件至 **v0.1.13** 或更高版本，该版本已修复了与其他模型的兼容性错误。\n请执行以下命令重新安装插件：\n`openclaw plugins install @m1heng-clawd\u002Ffeishu`\n安装完成后重启 OpenClaw 即可正常使用 GPT、Claude 等模型。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F331",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},28192,"配置飞书事件与回调时提示“应用未建立长连接”，且 Channels 状态为 stopped，如何排查？","该问题通常与 `tenant_access_token` 配置或网络连通性有关。\n1. 检查 OpenClaw 的健康状态（Health Check），确认 Gateway 是否可达（Detail 显示 reachable）。\n2. 验证飞书开放平台后台配置的回调 URL 是否正确，且服务器能够公网访问。\n3. 检查配置文件中的 `tenant_access_token` 是否有效且未过期。\n4. 确保防火墙或安全组未阻挡出站连接。\n如果 Clawdbot\u002FOpenClaw 侧提示配置成功但状态仍为 stopped，尝试重启服务或重新触发一次回调配置以刷新连接状态。","https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fissues\u002F23",[135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215],{"id":136,"version":137,"summary_zh":138,"released_at":139},189093,"v0.1.19","## Bug 修复\n\n- **OpenClaw 2026.3.24 兼容性** — 将运行时导入从顶级 `openclaw\u002Fplugin-sdk` 入口点迁移至稳定的子路径导出（`account-id`、`feishu`、`matrix`、`channel-inbound`）。用一个完整的 `ChannelSetupWizard` 实现替换不安全的 `as unknown as` setupWizard 类型断言，以保留多账号设置支持。(#438)","2026-03-29T15:07:52",{"id":141,"version":142,"summary_zh":143,"released_at":144},189094,"v0.1.18","## 变更内容\n\n### 功能特性\n\n* feat: 由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F414 中实现，丢弃网关重启后重放的过时消息。\n\n### Bug 修复\n\n* fix: 由 @Qmeasure 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F419 中修复，实现 `accountId` 的不区分大小写的查找功能，用于解析账户配置。\n* fix: 由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F425 中修复，将动态监控模块的导入方式改为静态导入。\n* fix: 由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F426 中修复，使用群组范围的 `From` 字段，以防止跨会话的私信路由问题。\n* fix(markdown): 由 @Yaohua-Leo 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F429 中修复，移除代码块分隔符前的多余空格。\n* fix(media): 由 @Yaohua-Leo 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F430 中修复，对 URL 编码的文件名进行解码，以正确处理中文字符。\n\n## 新贡献者\n\n* @Qmeasure 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F419 中完成了首次贡献。\n* @Yaohua-Leo 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F429 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.17...v0.1.18","2026-03-23T17:27:41",{"id":146,"version":147,"summary_zh":148,"released_at":149},189095,"v0.1.17","## 变更内容\n* 修复：澄清本地文件与飞书云盘的路由问题，解决 #394 问题，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F404 中完成。\n* 修复：使用 music-metadata 检测 MP3 音频时长，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F405 中完成。\n* 修复：解决流式卡片内容重复及第二个卡片残留的问题，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F411 中完成。\n* 新特性：添加 feishu_message 工具，用于读取聊天消息，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F412 中完成。\n* 新特性：添加 feishu_reaction 工具，用于表情反应，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F413 中完成。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.16...v0.1.17","2026-03-13T10:27:37",{"id":151,"version":152,"summary_zh":153,"released_at":154},189096,"v0.1.16","## 变更内容\n* 功能（任务）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F366 中实现任务评论工具链的端到端功能。\n* 修复（任务工具）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F367 中将 Type.Union 枚举替换为 stringEnum 辅助函数，以避免在工具 Schema 中出现 anyOf。\n* 修复：文档中记录权限问题——自动与当前用户共享，由 @swcbo 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F375 中完成。\n* 修复（媒体）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F380 中停止对文件上传中非 ASCII 文件名进行百分号编码。\n* 修复（媒体）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F381 中将代理工作区的 mediaLocalRoots 转发至 loadWebMedia。\n* 修复（Schema）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F383 中从飞书工具 Schema 中移除由联合类型生成的 anyOf\u002FoneOf。\n\n## 新贡献者\n* @swcbo 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F375 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.15...v0.1.16","2026-03-07T17:23:09",{"id":156,"version":157,"summary_zh":158,"released_at":159},189097,"v0.1.15","## 变更内容\n* 功能（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F343 中实现的多机器人群组安全无提及模式\n* 功能：由 @qhhonx 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F333 中通过功能标志支持 merge_forward 消息\n* 功能（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F346 中实现的带 MIME 回退的音频入站消息规范化\n* 杂项：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F348 中将 openclaw 升级至 2026.3.1，并移除 tsconfig 临时解决方案\n* 功能：由 @wmgx 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F345 中添加用于提醒\u002F紧急通知的 feishu_urgent 工具\n* 修复（媒体）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F350 中修正音频\u002F视频的 msg_type，并增加时长和封面支持\n* 功能：由 @kissingwolf 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F282 中添加飞书聊天工具及聊天管理功能\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F353 中实现群聊线程中回复话题根消息\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F354 中对文件上传中的非 ASCII 文件名进行编码\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F355 中强化打字指示器，防止速率限制和过时重播问题\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F356 中抑制推理\u002F思考区块负载的发送\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F357 中按聊天会话序列化消息处理，以避免消息遗漏\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F358 中实现 Lark 私信兼容性及配对回复路由\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F360 中回滚到每个群组的 systemPrompt 和流式卡片合并逻辑\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F361 中在最终负载缺失时保留区块流式文本\n* 修复（飞书）：由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F362 中为代理环境将代理客户端传递给 WSClient\n\n## 新贡献者\n* @qhhonx 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F333 中做出了首次贡献\n* @wmgx 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F345 中做出了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.14...v0.1.15","2026-03-04T15:28:44",{"id":161,"version":162,"summary_zh":163,"released_at":164},189098,"v0.1.14","## 变更内容\n* 修复：使飞书入站视频与媒体理解保持一致，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F332 中完成\n* 修复（feishu）：使私聊配对审批在 OpenClaw 的各个运行时中生效，由 @graydawnc 在 https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fpull\u002F337 中完成\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.13...v0.1.14\n","2026-02-27T11:25:47",{"id":166,"version":167,"summary_zh":168,"released_at":169},189099,"v0.1.13","家务事(发布): 切分 v0.1.13\n\n共同作者: 克劳德·奥普斯 4.6 \u003Cnoreply@anthropic.com>","2026-02-27T05:57:27",{"id":171,"version":172,"summary_zh":173,"released_at":174},189100,"v0.1.12","## 摘要\n本次发布扩展了飞书任务功能，提升了消息处理的可靠性，并强化了项目质量和发布自动化。\n\n## 亮点\n- 新增 `feishu_task` 功能：\n  - 子任务 (#318)\n  - 评论 (#319)\n  - 附件 (#320)\n  - 任务列表与成员管理 (#321)\n- 新增对飞书文档评论管理的支持 (#276)。\n- 提升消息及渲染可靠性：\n  - 修复音频 `msg_type` 处理问题 (#296)\n  - 改进引用富文本\u002F卡片内容的解析 (#275)\n  - Markdown 中 URL 渲染更加稳定 (#292)\n  - 减少因权限错误导致的 LLM 重复回答 (#288)\n- 严格了群组策略以及提及和认证行为 (#308, #309)。\n\n## 工程改进\n- 对飞书工具模块（文档\u002F维基\u002F网盘\u002F权限）进行了重构，使其结构更加模块化 (#278, #279, #280, #281)。\n- 扩展了核心单元测试和 CI 质量检查 (#312)。\n- 添加了 PR 模板和标题检查，并引入了自动化、受保护的 npm 发布流程 (#323)。\n\n## 破坏性变更\n- 无。\n\n## 发布安全须知\n- 标签版本必须与 `package.json` 版本一致。\n- 发布流水线会使用 `npm pack --dry-run --json` 验证包内容，并阻止测试文件被发布。\n- 稳定版发布到 `latest` 分支；预发布版本发布到 `next` 分支。\n\n## 完整变更日志\nhttps:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.11...v0.1.12\n","2026-02-26T07:41:44",{"id":176,"version":177,"summary_zh":178,"released_at":179},189101,"v0.1.11","## 摘要\n本次发布主要聚焦于飞书文档的编写体验优化以及多账号入驻策略的正确性。\n\n## 亮点\n- 为飞书文档新增了一个原子化的 `create_and_write` 流程。\n- 引入了共享的文档写入服务，并在驱动导入中复用了该服务。\n- 修复了入驻 DM 策略更新，确保其严格限定于所选账号范围内。\n- 同步上游调整，实现了机器人提及权限控制，并修复了回复上下文兼容性问题。\n\n## 包含的变更（自 v0.1.10 起）\n- `feat(feishu-doc): 添加原子化的 create_and_write 流程` (#268)\n- `fix(feishu): 将入驻 dmPolicy 的作用范围限定为所选账号` (#269)\n- `fix: 设置 ReplyToBody，以使 has_reply_context 正常工作` (#266)\n- `sync(feishu): 将 botOpenId 提及权限控制与 openclaw#16337 对齐` (#262)\n\n## 备注\n- 本次发布在入驻更新中继续保持账号级别的 DM 隔离行为明确。\n- `feishu_doc` 和 `feishu_drive` 现在共用一条写入路径，以减少行为偏差。","2026-02-16T02:00:55",{"id":181,"version":182,"summary_zh":183,"released_at":184},189102,"v0.1.10","## 摘要\n本次发布通过整合近期的本地改进和上游回退补丁，为将飞书插件合入官方 OpenClaw 仓库做好准备。\n\n## 亮点\n- 同步了上游飞书扩展中的关键修复（安全加固、私聊策略与授权、媒体行为、回复生命周期）。\n- 保留并验证了多账号机器人在账号范围内的去重行为。\n- 新增流式卡片支持，默认设置为安全模式：除非显式配置为 `true`，否则 `streaming` 功能默认关闭。\n- 将飞书 SDK 依赖升级至 `@larksuiteoapi\u002Fnode-sdk@^1.59.0`。\n\n## 包含的变更（自 v0.1.9 以来）\n- `sync: 回退上游 OpenClaw 飞书修复（安全、私聊策略、流式），默认关闭流式` (#260)\n- `chore: 将 OpenClaw 升级至 2026.2.13，并适配飞书插件 API 变更` (#258)\n- `fix(feishu): 按活动账号路由工具，并降低注册日志级别` (#249)\n- `fix: 相同群组内多个机器人时消息去重失效` (#251)\n- `fix(feishu): 支持按账号进行入驻更新` (#248)\n- `fix: 私聊路由应使用正确的对端类型 \"direct\"，而非 \"dm\"` (#241)\n- `fix(docx): 导入时保留 Markdown 表格单元格` (#245)\n- `feat: 添加 import_document 操作，以提升 Markdown 导入体验` (#240)\n- `feat: 为 probeFeishu 添加缓存，避免 API 调用频率限制` (#200)\n- `feat(feishu): 添加 task v2 工具及共享 API 辅助函数` (#231)\n- `feat: 扩展 bitable 工具，并实现模块化` (#226)\n\n## 上游对应变更（来自 OpenClaw）\n- 流式卡片支持：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fpull\u002F10379\n- 音频\u002F视频 `msg_type: media` 修复：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fpull\u002F14648\n- 私聊策略 + 命令授权：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fpull\u002F14876\n- NO_REPLY\u002F抑制路径上的打字状态清理：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fpull\u002F15508\n- 媒体 URL 获取加固：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fpull\u002F16285\n- Webhook 请求体大小限制处理：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fcommit\u002F3cbcba10cf30c2ffb898f0d8c7dfb929f15f8930\n- 去重提取模块：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fcommit\u002Fa750a195e5550339bd314b5eef6467c22d629bb1\n- SDK 对齐源码提交：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw\u002Fcommit\u002F722c010b9589f3effa00f30dc1530047a4259b0e\n\n## 上线说明\n为确保生产环境上线的安全性，建议保持 `streaming: false` 的默认配置，并分阶段按账号启用该功能。","2026-02-14T16:48:58",{"id":186,"version":187,"summary_zh":188,"released_at":189},189103,"v0.1.8","## Features\r\n\r\n- **Multi-account support** — Configure multiple Feishu bot accounts under a single OpenClaw instance. Each account can have independent credentials, policies, and connection modes. Backward compatible with existing single-account configs. (#137)\r\n- **Webhook connection mode** — Added `connectionMode: \"webhook\"` as an alternative to WebSocket. Each account can listen on a dedicated HTTP port\u002Fpath, with fire-and-forget message handling to meet Lark's \u003C3s response requirement. (#164)\r\n- **Topic session isolation** — New `topicSessionMode: \"enabled\"` option for group chats. Messages in different topic threads get separate conversation sessions (`chat:{chatId}:topic:{rootId}`), enabling isolated parallel conversations within a single group. (#191)\r\n- **Dynamic agent creation for DM users** — When `dynamicAgentCreation.enabled` is set, a new agent with its own workspace is automatically provisioned for each unique DM user, with configurable path templates and `maxAgents` limit.\r\n- **Private deployment domain support** — The `domain` field now accepts custom HTTPS URLs in addition to `\"feishu\"` \u002F `\"lark\"`, enabling use with private Feishu deployments. (#138)\r\n\r\n## Bug Fixes\r\n\r\n- **Fix card schema for markdown rendering** — Upgraded interactive card format to schema 2.0 (`body.elements` instead of top-level `elements`), fixing markdown rendering issues in cards. (#64)\r\n- **Fix message deduplication** — Added dedup mechanism to prevent duplicate message processing on WebSocket reconnection. Reduced dedup cache max size from 10k to 1k with throttled cleanup. (#143)\r\n- **Fix groupAllowFrom check** — Now correctly validates against group chat ID instead of sender ID. (#73 follow-up)\r\n\r\n## Internal\r\n\r\n- Refactored all modules to pass `accountId` through the call chain, enabling per-account client creation, logging (`feishu[{accountId}]`), and config resolution.\r\n- Per-account WebSocket clients, HTTP servers, and bot info are now tracked in separate maps instead of module-level singletons.","2026-02-09T12:49:40",{"id":191,"version":192,"summary_zh":193,"released_at":194},189104,"v0.1.7","## What's New\n\n### Features\n- **Bitable 多维表格支持** - 新增 6 个工具操作飞书多维表格 (#110)\n- **富文本消息渲染** - 默认使用 post 消息类型，支持 Markdown 渲染 (#48)\n\n### Bug Fixes\n- **修复 groupAllowFrom 检查逻辑** - 现在正确检查群组 ID 而非发送者 ID (#73)\n\n## Thanks\n\n感谢 @doodlewind 贡献 Bitable 支持!","2026-02-03T04:35:10",{"id":196,"version":197,"summary_zh":198,"released_at":199},189105,"v0.1.6","## Bug Fix\n\n- Fixed: skills directory was not included in npm package\n  - Added `skills` to `files` array in package.json\n  - Skills (feishu-doc, feishu-wiki, feishu-drive, feishu-perm) now properly bundled\n\nIf you installed v0.1.5, please upgrade to v0.1.6 for skills support.","2026-02-01T18:52:18",{"id":201,"version":202,"summary_zh":203,"released_at":204},189106,"v0.1.5","## What's New\n\n### New Tools\n- **feishu_wiki**: Knowledge base operations (spaces, nodes, get, create, move, rename)\n- **feishu_drive**: Cloud storage operations (list, info, create_folder, move, delete)\n- **feishu_perm**: Permission management (list, add, remove) - disabled by default\n\n### Improvements\n- Refactored `feishu_doc` to action-based pattern for consistency\n- Added permission error notification (#84) - bot now notifies users when encountering API permission errors\n- Added tools config system for enabling\u002Fdisabling individual tools\n- Added SKILL.md documentation for each tool\n\n### Developer Tools\n- Added **feishu-e2e-test** skill: Local E2E testing framework using agent-browser for automated Feishu Web UI testing\n\n### Documentation\n- Added Drive Access section (bots have no root folder)\n- Added Wiki Space Access section (must add bot to wiki members)\n- Separated read-only vs read-write permission documentation\n\n### Known Limitations\n- Bots cannot create folders in root directory (no \"My Space\" for bots)\n- `feishu_perm` is disabled by default as a sensitive operation","2026-02-01T18:05:07",{"id":206,"version":207,"summary_zh":208,"released_at":209},189107,"v0.1.4","## What's New\n\n### Feishu Document Tools 📄\n\nNew document read\u002Fwrite capabilities with 10 tools:\n\n| Tool | Description |\n|------|-------------|\n| `feishu_doc_read` | Read document content |\n| `feishu_doc_create` | Create new document |\n| `feishu_doc_write` | Replace content with markdown |\n| `feishu_doc_append` | Append markdown to end |\n| `feishu_doc_list_blocks` | Get block structure |\n| `feishu_doc_get_block` | Get single block |\n| `feishu_doc_update_block` | Update block text |\n| `feishu_doc_delete_block` | Delete block |\n| `feishu_folder_list` | List folder contents |\n| `feishu_app_scopes` | Check app permissions |\n\n**Features:**\n- Markdown to Feishu blocks conversion via Convert API\n- Auto image upload from `![](url)` syntax\n- Block-level operations for advanced editing\n\n**Note:** Tables are not supported due to Feishu API limitations.\n\n### New Permissions Required\n\nFor document tools, add these permissions to your Feishu app:\n- `docx:document` \u002F `docx:document:readonly`\n- `docx:document.block:convert`\n- `drive:drive` \u002F `drive:drive:readonly`\n\n---\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fm1heng\u002Fclawdbot-feishu\u002Fcompare\u002Fv0.1.3...v0.1.4","2026-01-31T12:00:04",{"id":211,"version":212,"summary_zh":213,"released_at":214},189108,"v0.1.3","## What's Changed\n\n**Migrate from Clawdbot to OpenClaw** - Fixes #58\n\n- Rename `clawdbot.plugin.json` to `openclaw.plugin.json`\n- Update package.json: `clawdbot` -> `openclaw` in extensions key, devDependencies, and peerDependencies\n- Update all imports from `clawdbot\u002Fplugin-sdk` to `openclaw\u002Fplugin-sdk`\n- Update documentation and CLI commands\n\n### Installation\n\n```bash\nopenclaw plugins install @m1heng-clawd\u002Ffeishu\n```","2026-01-30T09:54:51",{"id":216,"version":217,"summary_zh":218,"released_at":219},189109,"v0.1.2","## What's Changed\n\n### Features\n- 群聊和私聊消息现在包含发送者显示名称，增强多用户场景下的身份识别\n\n### Fixes\n- 修复群聊中每个发送者身份未正确保留的问题\n\n### Documentation\n- 添加双语 README（中英文）及 FAQ\n- 记录发送者名称解析所需的联系人权限配置","2026-01-29T17:20:58"]