Skip to content

feat: add Feishu (Lark) WASM channel plugin - #1104

Closed
lowmiaq-gmail wants to merge 1 commit into
nearai:stagingfrom
lowmiaq-gmail:feat/feishu-channel
Closed

lowmiaq-gmail wants to merge 1 commit into
nearai:stagingfrom
lowmiaq-gmail:feat/feishu-channel

Conversation

@lowmiaq-gmail

Copy link
Copy Markdown

Summary

  • Adds a new WASM channel plugin for Feishu (Lark) messaging platform, following the same component model pattern as existing Telegram/Slack/Discord/WhatsApp channels
  • Supports webhook-based event subscription, P2P & group chats, @mention triggering, reply threading, image/file attachments, DM pairing, and proactive messaging
  • Auth uses OAuth2-style tenant_access_token with host-managed auto-refresh via app_id + app_secret

Details

Feature Status
URL verification challenge ✅
im.message.receive_v1 events ✅
P2P (DM) chat ✅
Group chat with @mention ✅
Reply threading (root_id) ✅
Text / image / file messages ✅
Attachment upload & download ✅
DM pairing (pairing/allowlist/open) ✅
Owner restriction ✅
Event deduplication ✅
Status notifications ✅
Broadcast (proactive messages) ✅

Files

  • channels-src/feishu/Cargo.toml — crate config
  • channels-src/feishu/build.sh — WASM build script
  • channels-src/feishu/feishu.capabilities.json — capability declaration
  • channels-src/feishu/src/lib.rs — full channel implementation (~1500 lines)

Test plan

  • Compiles cleanly with cargo build --release --target wasm32-wasip2 (0 warnings)
  • Integration test with Feishu bot (app_id + app_secret + event subscription)
  • Verify URL verification challenge flow
  • Verify P2P and group message handling
  • Verify attachment upload/download
  • Verify DM pairing flow

🤖 Generated with Claude Code

Adds a new channel plugin for Feishu/Lark messaging platform, following
the same WASM component model pattern as existing Telegram/Slack/Discord
channels.

Features:
- Webhook-based event subscription (im.message.receive_v1)
- URL verification challenge handling
- P2P (DM) and group chat support with @mention triggering
- Reply threading via root_id
- Text, image, and file message type support
- Attachment upload (images via /im/v1/images, files via /im/v1/files)
- DM pairing flow (pairing/allowlist/open policies)
- Owner restriction via owner_open_id
- Event deduplication
- Status notifications as text messages
- Proactive messaging (broadcast)

Auth: Uses OAuth2-style tenant_access_token with auto-refresh managed
by the host runtime (app_id + app_secret → token exchange).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added size: XL 500+ changed lines risk: low Changes to docs, tests, or low-risk modules contributor: new First-time contributor labels Mar 13, 2026

@zmanian zmanian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a competing implementation of #1110 (reidliu41's Feishu/Lark channel). Key differences:

  • This PR is larger (+2090 vs +1084) with more features (attachments, deduplication) but is missing critical host-side integration: no registry manifest, no bundled channel entry, no setup.rs credential injection.
  • Includes Cargo.lock (shouldn't be committed for WASM library crates).
  • No real CI has run (fork PR -- classify/scope only).
  • Commit author metadata looks unusual.

Recommend closing in favor of #1110, which has full host-side integration. Specific features from this PR (attachment handling, event deduplication) could be cherry-picked into #1110 as follow-ups.

@ilblackdragon

Copy link
Copy Markdown
Member

We merged #1110. Can you please do attachment handling, event deduplication as follow up separate PR? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: new First-time contributor risk: low Changes to docs, tests, or low-risk modules size: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants