-
Notifications
You must be signed in to change notification settings - Fork 483
Closed
Description
Problem
Lark (international version at open.larksuite.com) does not provide WebSocket long connection for event subscriptions. Only domestic Feishu (open.feishu.cn) supports it. This makes the Feishu bridge unusable for all Lark international users.
Reference: m1heng/clawdbot-feishu#277
Proposed Solution
Add an alternative webhook mode to the Feishu adapter:
- When
bridge_feishu_mode = 'webhook', start a local HTTP server on 127.0.0.1 to receive Lark event callbacks - Include a lightweight Cloudflare Worker relay (free tier) + Cloudflare Tunnel for public HTTPS
- 100% reuses existing message processing, auth, and send logic
- Default mode remains
websocket— zero impact on existing users
Implementation
PR incoming with:
- Webhook server in feishu-adapter.ts (Node.js
httpmodule, zero new dependencies) - New settings (mode, port, verification token) in API route
- Updated UI with mode selector + webhook-specific setup guide
- Cloudflare Worker relay project in
tools/lark-webhook-worker/ - Unit tests (7 test cases for event parsing and verification)
- Bilingual i18n (en + zh)
Architecture
Lark Message → Lark Platform (webhook) → Cloudflare Worker → Tunnel → localhost:9898 → CodePilot → Claude
Happy to discuss the approach!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels