@clisbot/channels-feishu

中文文档
2.2.3发布于 2026/11/05TypeScriptES Module近 30 天下载 3384

In-repo Feishu/Lark channel vertical (goal ledger slice 15). Ported from extensions/feishu/src@5d8067a4483: the Lark SDK client + tenant-token plumbing, the six feishu_* agent tool families, the WS long-connection / webhook transports, the send + card clo

原始使用文档
文档目录5 节
  1. What the package does
  2. Channel tools
  3. Tests
  4. Live testing
  5. Hub wiring

@clisbot/channels-feishu

The in-repo Feishu/Lark channel vertical (goal ledger slice 15), ported from extensions/feishu/src at OpenClaw 5d8067a4483. 69 files are byte-verbatim; upstream-sync.json is the machine-checked map (npm run channels:sync:check).

Third-party SDK: @larksuiteoapi/node-sdk 1.73.0 — the same package and the same version upstream pins.

What the package does

LayerWhere
Drive surfacesrc/plugin.ts (feishuPlugin), src/entry.ts
Account lifecyclesrc/lifecycle/start-account.ts
Inbound (long conn.)src/fusion/ws-session.ts → ported monitor.transport.ts
Inbound (webhook)src/fusion/webhook-session.ts → ported monitor.transport.ts
Normalizersrc/fusion/inbound-adapter.ts
Admissionsrc/fusion/admission.ts (durable before ACK / 200)
Outboundsrc/outbound.ts → ported send.ts
Message actionssrc/channel-actions.ts
Channel toolssrc/fusion/tools.ts → ported docx/chat/wiki/drive/perm/bitable.ts

Both inbound modes are wired. The long connection (connectionMode: "websocket", the default) needs no public URL; the webhook mode does, and is unexercised in production — it is unit-tested against a real node:http listener and nothing else.

Channel tools

Six families, registered through upstream's own register*Tools(api) entry points over a Fusion registrar (registerFeishuTools). Tool names come from extensions/feishu/openclaw.plugin.json:

feishu_doc, feishu_chat, feishu_wiki, feishu_drive, feishu_perm, feishu_app_scopes, and eight feishu_bitable_* names. perm is off by default (upstream tools-config.ts); every other family is on.

Tests

npx vitest run packages/channels/feishu/src/fusion/tools.test.ts --maxWorkers=1 --no-file-parallelism

src/fusion/tools.test.ts and src/channel-actions.test.ts drive the real tool factories and the real send path against a faked Lark SDK client (the client cache is the seam, so no code path is stubbed).

Live testing

Not run yet — no Feishu credentials are configured. A live run needs, by environment variable name (do not commit values; .env is gitignored):

VariableWhat it is
FEISHU_APP_IDLark custom-app id (cli_…)
FEISHU_APP_SECRETLark custom-app secret
FEISHU_VERIFICATION_TOKENEvent-subscription verification token (webhook mode)
FEISHU_ENCRYPT_KEYEvent-subscription encrypt key (webhook mode; signs requests)
FEISHU_TEST_CHAT_IDoc_… group chat the bot is a member of
FEISHU_TEST_DM_OPEN_IDou_… open id for a DM round trip
FEISHU_DOMAINfeishu (open.feishu.cn) or lark (open.larksuite.com)

App scopes the bot needs for the ported surface: im:message, im:message.group_at_msg, im:message:send_as_bot, im:chat:readonly, im:resource, plus docx:document, drive:drive, wiki:wiki and bitable:app for the corresponding tool families. The long connection also needs "Event subscription → Use long connection" enabled in the app console.

Hub wiring

Landed in a follow-up slice. HUB-WIRING.md is the handoff document it was built from and stays the record of what the Hub side owns — including the one thing it got wrong: the tools reach the agent through the loaded plugin.agentTools, not through a Hub-side registerFeishuTools import. ../../../docs/features/channels/README.md describes the platform as built.

版本与发布记录

@clisbot/channels-feishu 共发布 18 个版本,首次发布于 2026/10/10;过去 12 个月发布了 18 个版本。

版本发布日期距今
2.2.3latest2026/11/055 天前
2.2.22026/11/037 天前
2.2.12026/11/019 天前
2.2.02026/10/2714 天前
2.1.82026/10/2218 天前
2.1.72026/10/2219 天前

关于 @clisbot/channels-feishu 的常见问题

@clisbot/channels-feishu 是什么?

In-repo Feishu/Lark channel vertical (goal ledger slice 15). Ported from extensions/feishu/src@5d8067a4483: the Lark SDK client + tenant-token plumbing, the six feishu_* agent tool families, the WS long-connection / webhook transports, the send + card clo

如何安装 @clisbot/channels-feishu?

在项目目录运行 npm install @clisbot/channels-feishu,或使用 pnpm add / yarn add / bun add。

@clisbot/channels-feishu 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@clisbot/channels-feishu 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@clisbot/channels-feishu 可以商用吗?

@clisbot/channels-feishu 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@clisbot/channels-feishu 的下载量有多少?

根据 npm 官方下载统计,@clisbot/channels-feishu 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,384 次,日均约 113 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clisbot/channels-feishu 还在维护吗?

最新版本 2.2.3 发布于 2026/11/05(5 天前);至今共发布 18 个版本,其中过去 12 个月发布了 18 个;首次发布于 2026/10/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。