lark-event
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for
价格
免费
- 安装:免费
在组织开通时一次性收取;再次读取清单或下载不重复收费。
以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。
如何使用
为组织安装
开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。
创建凭证
客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:
Authorization: Bearer $ZGI_MARKET_KEY读取清单与安装包
清单列出版本、文件和校验值;安装包是一个 zip 文件。
读取清单 curl "https://market-api.zgi.im/v1/market/skills/lark-event/manifest" \ -H "Authorization: Bearer $ZGI_MARKET_KEY"下载安装包 curl "https://market-api.zgi.im/v1/market/skills/lark-event/package" \ -H "Authorization: Bearer $ZGI_MARKET_KEY" \ -o lark-event.zip读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。
技能说明
- 名称
- lark-event
- 说明
- Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
技能包内没有脚本文件:这个技能是供模型阅读的文本。
SKILL.md 节选
# Lark Events > **Prerequisite:** Read [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md) first for authentication, `--as user/bot` switching, `Permission denied` handling, and safety rules. ## Core commands | Command | Purpose | |------|------| | `lark-cli event list [--json]` | List all subscribable EventKeys | | `lark-cli event schema <EventKey> [--json]` | Show an EventKey's params and output schema | | `lark-cli event consume <EventKey> [flags]` | Blocking consume; events → stdout NDJSON | | `lark-cli event status [--json] [--fail-on-orphan]` | Inspect the local bus daemon status | | `lark-cli event stop [--all] [--force]` | Stop the bus daemon | ## Common flags | Flag | Description | |---|---| | `--param key=value` / `-p` | Business params (repeatable; comma-separated for multi-value). Unknown keys fail with valid names listed inline | | `--jq <expr>` | jq expression to filter / transform each event; empty output skips the event | | `--max-events N` | Exit after N events. Default 0 = unlimited | | `--timeout D` | Exit after duration D (e.g. `30s`, `2m`). Default 0 = no timeout. Whichever of `--max-events` / `--timeout` fires first wins | | `--output-dir <dir>` | Write each event as a file (relative paths only; prevents traversal) | | `--quiet` | Suppress ready/exit markers and per-event stderr diagnostics, including drop warnings. This can hide event loss. **AI should not use this** — it removes readiness and integrity signals | | `--as user\|bot\|auto` | Identity for the session (see lark-shared) | ## Examples ```bash # Default: stream every event for the key (no filter, no projection) lark-cli event consume im.message.receive_v1 --as bot # List every EventKey of one domain (the authoritative, always-current catalog) lark-cli event list --domain vc --json # Grab one sample event to inspect payload shape lark-cli event consume im.message.receive_v1 --max-events 1 --timeout 30s --as bot # Run for 10 minutes then auto-exit lark-cli event consume im.message.receive_v1 --timeout 10m --as bot # Consume multiple EventKeys concurrently (one shape per process, no dispatcher) lark-cli event consume im.message.receive_v1 --as bot > receive.ndjson & lark-cli event consume im.message.reaction.created_v1 --as bot > reaction.ndjson & wait ``` ## Call flow 1. `lark-cli event list --json` → pick a legal key. `--domain <d>` narrows to one domain; the domains are `application`, `approval`, `board`, `card`, `im`, `minutes`, `task`, `vc`. An unknown domain fails with the valid set listed in the hint. 2. `lark-cli event schema <key> --json` → read `resolved_output_schema` + `jq_root_path` to determine field paths 3. `lark-cli event consume <key> [--jq '<expr>']` → consume ## Subprocess contract ### Ready marker `event consume`'s stderr emits a fixed line `[event] ready event_key=<key>`. **Parent processes should block on stderr until this line appears, then start reading stdout.** Do not fall back to `sleep`. ### stdin EOF = graceful exit `event consume` treats stdin close as a shutdown signal (wired for AI subprocess callers). **Bounded runs are exempt: when `--max-events` or `--timeout` is set (> 0), stdin EOF is ignored and the run exits only via its own bound, timeout, or SIGTERM.** For unbounded runs, `< /dev/null` / `nohup` / systemd's default `StandardInput=null` will cause an immediate graceful exit (stderr `reason: signal`). To keep an unbounded run alive: - Feed stdin a source that never EOFs: `< <(tail -f /dev/null)` - Or run bounded: `--max-events N` / `--timeout D` ### Exit codes & reason On exit, the last stderr line is `[event] exited — received N event(s) in Xs (reason: ...)`. | exit code | reason | Trigger | |---|---|---| | 0 | `reason: limit` | `--max-events` reached | | 0 | `reason: timeout` | `--timeout` reached | | 0 | `reason: signal` | Ctrl+C / SIGTERM / stdin EOF (stdin EOF applies to unbounded runs only) | | 1 | JSON error envelope on stderr | Lark API business failure during pre-consume setup (for example subscription create/delete) |
SKILL.md 不止这些内容,安装后可阅读全文。
技能包内容
共 8 个文件,合计 39.2 KiB
- SKILL.md11.2 KiB
- references/lark-event-application.md1.3 KiB
- references/lark-event-approval.md8.8 KiB
- references/lark-event-im.md4.5 KiB
- references/lark-event-minutes.md2.3 KiB
- references/lark-event-task.md2.6 KiB
- references/lark-event-vc.md5.0 KiB
- references/lark-event-whiteboard.md3.6 KiB
来源与审核
- 审核状态
- 尚未审核,内容来自上游来源
- 许可证
- 未说明
审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。
相关商品
- MCP办公协同
Notion 官方 MCP
转发到 Notion 官方托管的 MCP 服务,搜索和读取页面与数据库,创建和修改页面,发表评论。需要先用“Notion 官方 MCP 授权”连接器完成授权。
- notion
- docs
免费需要连接:Notion 官方 MCP 授权 - MCP办公协同
Notion 工具
把 Notion API 的搜索、读取页面、查询数据库与追加内容块包装成四个 MCP 工具。工具使用调用方组织自己的 Notion 连接,平台不持有 Notion 密钥;按底层接口的请求次数计量。
- notion
- docs
- customer-connection
免费需要连接:Notion 连接器 - 技能办公协同
腾讯文档 TENCENT DOCS
腾讯文档(docs.qq.com)-在线云文档平台,是创建、编辑、管理文档的首选 skill。涉及"新建/创建/编辑/读取/查看/搜索文档"、"保存文件"、"云文档"、"腾讯文档"、"docs.qq.com"等操作,请优先使用本 skill。支持能力:(1) 创建各类在线文档(文档/Word/Excel/幻灯片/思维导图/流程图/智能表格/收集表)(2) 管理知识库空间(创建空间、查询空间列表)(3) 管理空间节点、文件夹结构 (4) 读取/搜索文档内容 (5) 编辑操作智能表 (6) 编辑操作在线文档 (7) 文件管理(重命名、移动、删除、复制、导入导出)(8) 网页剪藏、本地文件/html/文档上云。
- office-doc
- office-spreadsheet
- office-pdf
- +1
免费