Install
openclaw skills install @qiushibang/feishu-room-booking面向飞书用户的会议室查询、预订与配置技能,支持首次使用时识别公司、从飞书日程自动导入企业会议室 room_id、查询忙闲、按楼栋/楼层/容量筛选、创建或补订会议室、偏好管理、候补轮询与工区时间线。当用户提到“查会议室”“订会议室”“配置会议室”“导入会议室”“会议室偏好”“补订会议室”或首次安装配置时使用。
openclaw skills install @qiushibang/feishu-room-booking管理飞书会议室的忙闲查询、自动匹配、日程预订、偏好管理和候补轮询。
lark-cli,并以当前飞书用户身份完成授权--as userpython3 scripts/room_setup.py --status --json;未配置时必须先询问用户所在公司references/room-mapping.json、自定义目录 references/custom-room-mapping.json、租户配置 references/tenant-profile.json,以及偏好/候补/工区文件scripts/所有会议室操作必须通过脚本,不要手写 bash 循环。
每次查询配置状态:
python3 scripts/room_setup.py --status --json
返回 configured: false 时,先询问:“你所在的公司/组织名称是什么?”
python3 scripts/room_setup.py --set-company "字节跳动",启用随技能提供的会议室目录。python3 scripts/room_setup.py --set-company "公司名称",然后按下面步骤引导。不要要求用户编辑脚本或 JSON。非字节租户配置步骤(逐步完成,不要一次抛出全部操作):
lark-cli calendar +search-event --as user 或 +agenda 找到 calendar_id 和 event_id。python3 scripts/room_setup.py \
--calendar-id "<calendar_id>" --event-id "<event_id>" \
--building "总部A座" --aliases "总部,A座" --default-capacity 0
python3 scripts/query_rooms.py --list-rooms -b "总部A座",把导入数量和样例会议室展示给用户核对。名称中的 (8) / (8人) 会自动识别为容量;无法识别时容量为 --default-capacity,可按楼栋分批导入并指定默认容量。若读取参与人返回权限错误,保留错误码、scope、console URL 和 hint,提示管理员开通日程参与人读取权限;不要让用户手工维护 room_id。
# 列出所有楼栋
python3 scripts/query_rooms.py --list-buildings
# 列出指定楼栋的会议室
python3 scripts/query_rooms.py --list-rooms -b "丽金"
# 查询空闲会议室(表格输出,自动并行查询)
python3 scripts/query_rooms.py -b "丽金" \
-s "2026-04-20T14:00:00+08:00" \
-e "2026-04-20T15:00:00+08:00" -o table
# 按容量筛选
python3 scripts/query_rooms.py -b "丽金" \
-s "2026-04-20T14:00:00+08:00" \
-e "2026-04-20T15:00:00+08:00" \
--capacity-gte 8 -o table
# 调整并行度(默认 10 线程)
python3 scripts/query_rooms.py -b "丽金" \
-s "2026-04-20T14:00:00+08:00" \
-e "2026-04-20T15:00:00+08:00" \
--max-workers 20 -o table
# 设置偏好
python3 scripts/manage_preferences.py --set \
--user "ou_xxx" --building "丽金" --capacity-gte 8 \
--preferred-rooms "F11-07,F11-15" --note "偏好靠近电梯"
# 读取偏好
python3 scripts/manage_preferences.py --get --user "ou_xxx"
# 记录用户选择(自动学习)
python3 scripts/manage_preferences.py --learn \
--user "ou_xxx" --room "F11-15(8)" --building "丽金智地中心 B座"
# 列出所有偏好
python3 scripts/manage_preferences.py --list
# 查看候补状态
python3 scripts/watch_waitlist.py --status
# 执行一轮轮询
python3 scripts/watch_waitlist.py --poll
# 添加候补
python3 scripts/watch_waitlist.py --add \
--event-id "xxx" --summary "周会" \
--start "2026-04-20T14:00:00+08:00" --end "2026-04-20T15:00:00+08:00" \
--building "丽金" --capacity-gte 8
# 移除候补
python3 scripts/watch_waitlist.py --remove --event-id "xxx"
# 清理过期候补
python3 scripts/watch_waitlist.py --clean
# 查看当前工区和下周工区
python3 scripts/workspace_manager.py --get
# 设置当前工区(默认从今天到本周日)
python3 scripts/workspace_manager.py --set --workspace "丽金智地中心 B座"
# 设置指定日期范围的工区
python3 scripts/workspace_manager.py --set --workspace "紫金数码园4号楼" \
--from "2026-04-30" --to "2026-05-02"
# 设置下周工区
python3 scripts/workspace_manager.py --set-next --workspace "紫金数码园4号楼"
# 推荐下周工区 / 周五提醒检查 / 查看时间线
python3 scripts/workspace_manager.py --recommend
python3 scripts/workspace_manager.py --check-friday-reminder
python3 scripts/workspace_manager.py --timeline
| 文件 | 用途 |
|---|---|
references/tenant-profile.json | 公司与当前会议室目录选择 |
references/room-mapping.json | 随技能提供的会议室目录 |
references/custom-room-mapping.json | 非内置租户通过配置日程自动生成的目录 |
references/user-preferences.json | 用户个人偏好 |
references/room-waitlist.json | 候补预订队列 |
references/weekly-workspace.json | 当前工区 / 下周工区时间线 |
用户只想看哪些会议室有空。
manage_preferences.py --get)workspace_manager.py --get)作为默认楼栋python3 scripts/query_rooms.py -u "ou_xxx" -s ... -e ... -o table
-b用户要开会,需要创建日程 + 匹配会议室。
python3 scripts/manage_preferences.py --get --user "ou_xxx"python3 scripts/workspace_manager.py --getlark-cli calendar +create --as user(或 events create)lark-cli calendar event.attendees create --as user
"resource",会议室 ID 传 omm_xxx--as user,不要用 bot 身份lark-cli calendar event.attendees list --as user 查 RSVP
confirmed:resource 已 accept,才能对用户说"预订成功"pending:resource 已出现但状态未定,只能说"已提交,等待确认"failed:resource decline / 缺失,不能宣告成功failed 时自动换下一个空闲会议室confirmed 后调用 python3 scripts/manage_preferences.py --learn --user "ou_xxx" --room "F11-15(8)" --building "..."用户设置或修改会议室偏好,后续自动应用。
设置偏好:
--set 写入偏好自动学习:
--learn 记录选择应用偏好:
自动检测用户日程中缺少会议室的会议并补订。
触发方式:
扫描步骤:
lark-cli calendar +agenda --as user 或 events search_event --as user 获取用户近期日程(未来 24 小时),再用 events get --need-attendee --as user 补齐参与人详情,保存为 JSON 传给 scan_events.py --events-file
194001 no permission to list event attendees 等权限错误,在该事件中写入 "attendee_details_complete": false;扫描器会将其标为待确认并跳过,避免因看不到已有资源而重复预订self_rsvp_status,没有时再看 attendees 中当前用户的 rsvp_status / status / response_statusconfirmed:已有已确认会议室,直接跳过pending:会议室状态待确认,先进入二次确认队列,不立即补订failed / missing:视为当前没有成功会议室,可继续补订confirmed 缺会议室的日程:
判断是否需要会议室的逻辑:
confirmed 会议室、日期型全天事件confirmed 会议室会议室满了时的自动候补机制。
添加候补:
watch_waitlist.py --add 加入队列轮询检查:
watch_waitlist.py --pollready,通知 agent 执行预订verification_pending,等待 5 秒后二次校验预订成功后:
confirmed → 从候补移除pending → 保持 verification_pendingfailed / decline → 回到 waiting,允许继续候补或 fallback清理:
--clean 清理已过期的候补(开始时间超过 1 小时)用户需要声明当前工区、设置下周工区,或让系统给出默认工区建议。
支持动作:
python3 scripts/workspace_manager.py --get 查看当前工区 / 下周工区python3 scripts/workspace_manager.py --set --workspace "丽金智地中心 B座" 设置当前工区python3 scripts/workspace_manager.py --set-next --workspace "紫金数码园4号楼" 设置下周工区python3 scripts/workspace_manager.py --recommend 基于近期会议室选择推荐工区python3 scripts/workspace_manager.py --check-friday-reminder 检查是否需要周五提醒python3 scripts/workspace_manager.py --timeline 查看完整时间线默认楼栋决策优先级:
default_building| 用户说 | 解析 |
|---|---|
| "明天下午3点开会" | 明天 15:00,默认 1 小时。未指定楼栋时先查偏好,再查工区 |
| "找个会议室" | 读取偏好 → 用默认楼栋和容量。无偏好则读当前工区;仍无结果再问城市/楼栋 |
| "查一下丽金B座明天下午" | Flow A,匹配 "丽金B座" → 丽金智地中心 B座 |
| "帮我找丽金B座11楼的会议室" | Flow A,先匹配楼栋,再用楼层 11 缩小房间范围 |
| "查一下 F11-15 明天下午是否空闲" | Flow A,优先按房间号匹配楼栋,再按房间号缩小到单个候选 |
| "我这周在丽金B座" | 流程 F,设置当前工区时间线 |
| "下周回紫金" | 流程 F,设置下周工区 |
| "帮我设个偏好,丽金B座8人以上" | 流程 C,设置偏好 |
| "查一下我有没有缺会议室的会" | 流程 D,扫描日程 |
| "候补状态怎么样了" | 流程 E,查看候补 |
| "北京有哪些工区" | --list-buildings 筛选含"北京"的行 |
会议室目录支持随技能提供的内置数据,也支持用户所在飞书租户的自定义数据。agent 匹配楼栋时:
--list-buildings 再 grep "北京"--max-workers 20"resource",会议室 ID 传 omm_xxx--as userAsia/Shanghai(+08:00),ISO 8601--learn 记录