
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
飞书 × AI 助手 独立桥接器 — 无需公网服务器
Feishu × AI Assistant standalone bridge — no public server required
建议:先用插件跑通,再按需求升级到桥接;或者直接用桥接(更稳,但需要你自己维护一个进程/服务)。
这次更新解决了“能聊天但媒体不通”的所有相关痛点:
image_key 下载并以图片附件喂给模型)file://... 路径传给 AI;大文件受大小限制)mediaUrl(s) + MEDIA: 文本行 + 临时目录文件)- 1 拆成 -\n1 的情况,会自动合并回 - 1~/.clawdbot/media、系统临时目录、/tmpFEISHU_BRIDGE_DEBUG=1 可打印下载/转发细节假设你之前已经按本 README 跑通过,并且现在桥接是“开机自启(launchd)”在后台运行。
打开“终端 Terminal”
进入你之前克隆本项目的目录
feishu-openclaw 文件夹如果你当初没有做“开机自启(launchd)”,而是手动在终端运行的
node bridge.mjs: 你可以跳过这一步(或者直接在旧终端窗口按Ctrl + C停止)。
launchctl unload ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist 2>/dev/null || true
cd /path/to/feishu-openclaw
git pull
npm install
launchctl load ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
FEISHU_APP_ID=cli_xxxxxxxxx node bridge.mjs
如果不工作,先开调试模式运行一次(见下方“调试”章节)。
| 方式 | 说明 | 链接 |
|---|---|---|
| ① 一键安装 | 让 Clawdbot 帮你安装插件 | openclaw-feishu |
| ② npm 命令 | clawdbot plugins install feishu-openclaw | npm |
| ③ 独立桥接 ⬅️ | 本项目,独立进程 | 见下方 |
| 插件 (①②) | 桥接 (③) | |
|---|---|---|
| 进程 | 1 个(内置 Gateway) | 2 个(独立) |
| 崩溃 | 影响 Gateway | 互不影响 |
| 适合 | 日常使用 | 生产/隔离部署 |
想象三个角色:
飞书用户 ←→ 飞书云端 ←→ 桥接脚本(你的电脑上) ←→ Clawdbot 智能体
飞书那边:你在飞书开发者后台创建一个"自建应用"(机器人),飞书会给你一个 App ID 和 App Secret——这就像是机器人的"身份证"。
桥接脚本:一个运行在你电脑上的小程序。它用飞书提供的 WebSocket 长连接(而不是传统的 Webhook)来接收消息——这意味着:
Clawdbot:桥接脚本收到飞书消息后,通过本地 WebSocket 转发给 Clawdbot Gateway。Clawdbot 调用 AI 模型生成回复,桥接脚本再把回复发回飞书。
脚本通过 macOS 的 launchd(系统服务管理器)运行:
就像把一个程序设成了"开机启动项",但更可靠。
clawdbot gateway status 检查)127.0.0.1)im:message — 获取与发送消息im:message:send_as_bot — 以机器人身份发消息(避免 403)im:message.group_at_msg — 接收群聊中 @ 机器人的消息im:message.p2p_msg — 接收机器人单聊消息im:resource — 上传/下载图片与文件(收图/收视频必须)接收消息 im.message.receive_v1cd /path/to/feishu-openclaw
npm install
把你的飞书 App Secret 保存到安全位置:
# 创建 secrets 目录
mkdir -p ~/.clawdbot/secrets
# 写入 secret(替换成你自己的)
echo "你的AppSecret" > ~/.clawdbot/secrets/feishu_app_secret
# 设置权限,只有自己能读
chmod 600 ~/.clawdbot/secrets/feishu_app_secret
如需自定义路径,可设置
FEISHU_APP_SECRET_PATH指向该文件。
# 替换成你的 App ID
FEISHU_APP_ID=cli_xxxxxxxxx node bridge.mjs
在飞书里给机器人发一条消息,看到回复就说明成功了 🎉
# 生成 launchd 服务配置(自动检测路径)
node setup-service.mjs
# 加载服务
launchctl load ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
# 查看状态
launchctl list | grep feishu
之后电脑重启也会自动连上。
feishu-openclaw/
├── bridge.mjs # 核心桥接脚本
├── setup-service.mjs # 自动生成 launchd 保活配置
├── package.json # 依赖声明
└── README.md # 你正在读的这个
在群聊中,桥接器默认"低打扰"模式——只在以下情况回复:
? / ? 结尾)其他闲聊不会回复,避免刷屏。
如果 AI 回复超过 2.5 秒,会先发一条"正在思考…",等回复生成后自动替换成完整内容。
~/.clawdbot/logs/feishu-bridge.out.log # 正常输出
~/.clawdbot/logs/feishu-bridge.err.log # 错误日志
如果你遇到“图片发不过来 / 生图发不出来 / 只看到 key / 只收到文字”等问题:
.env(注意:.env 不会上传到 GitHub,很安全)FEISHU_BRIDGE_DEBUG=1
launchctl unload ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
launchctl load ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
tail -n 200 ~/.clawdbot/logs/feishu-bridge.err.log
im.message.receive_v1?im:resource(媒体资源权限)?.env 里设 FEISHU_BRIDGE_DEBUG=1,然后看日志:
~/.clawdbot/logs/feishu-bridge.err.log通常是两类原因:
~/.clawdbot/media、系统临时目录、/tmp)也建议先开调试,看日志定位。
file://... 路径传给 AI。如果你希望自动解析 PDF/Word/Excel 并把内容转成文本喂给 AI,需要额外扩展(欢迎提 issue)。
默认读取:~/.clawdbot/clawdbot.json
如果你把 Clawdbot 安装在其他目录,需手动指定:
CLAWDBOT_CONFIG_PATH=/your/path/clawdbot.json FEISHU_APP_ID=cli_xxx node bridge.mjs
默认使用 main,如需切换:
CLAWDBOT_AGENT_ID=你的AgentID FEISHU_APP_ID=cli_xxx node bridge.mjs
桥接器固定连接 127.0.0.1,所以桥接脚本必须与 Gateway 在同一台机器。
如果你想跨机器部署,需要自行改代码或加一层转发。
launchctl unload ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
git clone 安装的:升级基本就是 git pull + npm install + 重启服务。Q: 需要服务器吗? 不需要。飞书的 WebSocket 长连接模式让你的电脑直接连到飞书云端,不需要公网暴露。
Q: 电脑关机了怎么办? 机器人会离线。重新开机后 launchd 会自动重启桥接服务。如需 24/7 在线,可以部署到一台常开的机器(比如 NAS、云服务器、甚至树莓派)。
Q: 飞书免费版能用吗? 可以。自建应用和机器人能力对所有飞书版本开放。
MIT
FAQs
一键安装飞书/Lark 与 OpenClaw 的桥接服务,支持图片/文件等媒体消息
The npm package openclawfs receives a total of 3 weekly downloads. As such, openclawfs popularity was classified as not popular.
We found that openclawfs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.