用途:监听飞书群消息,识别自然语言意图,按当前项目 profile 执行项目操作(如编译、预览、部署、查询),并把结果回复到群里;通过 .cc-bot/profiles/active.json 适配具体项目(群 ID、项目根目录、成员、意图映射等)。
主要能力:Monitor 托管 poll.js 每 10 秒拉取最近群消息,经 state.last_processed_time 与 poll.emitted 去重后推送主会话;意图由语义匹配到 intent key,通用 intent 包括 hud、help、query_progress、query_todo、visual_bug_report、bot_switch、unknown,项目 intent 在 profile.intents 中自定义,占位符替换由 runtime/intent.js 处理;支持文字、富文本(含截图)、文件消息,图片和文件可下载后读取。adapter 层支持扩展其他 IM 平台。
使用方式:默认关闭(paused: true),需在 Claude Code 主会话用 /cc-bot:start 启动或 /cc-bot:stop 停止,群消息不接受开关指令;弱 agentic 端点可配 profile.polling_mode = 'self-poll',改用 /loop 配合 /cc-bot:poll-once。启动示例:Monitor(node ${CLAUDE_PLUGIN_ROOT}/runtime/poll.js --project <project.root>, persistent, timeout_ms=3600000);回复示例:LARK_CLI_NO_PROXY=1 lark-cli im +messages-reply --as bot --message-id om_xxx --msg-type text --content '{"text":"..."}'。
限制:开关仅接受主会话指令,群消息内开关一律拒绝;bot 运行时禁用 AskUserQuestion 等阻塞操作;未配 im.bot_open_id 时群里任何 @ 一律不响应;self-poll 模式轮询驱动,空闲也耗 token。