Skip to content

feat: add Feishu (Lark) adapter#105

Open
m1heng wants to merge 1 commit intovercel:mainfrom
m1heng:feat/adapter-feishu
Open

feat: add Feishu (Lark) adapter#105
m1heng wants to merge 1 commit intovercel:mainfrom
m1heng:feat/adapter-feishu

Conversation

@m1heng
Copy link

@m1heng m1heng commented Feb 25, 2026

Closes #106

Summary

  • Add @chat-adapter/feishu package — a full Feishu/Lark adapter for the chat SDK
  • Webhook handling: event v2.0 schema, URL verification challenge, AES-256-CBC encrypted event decryption
  • Message operations: send, reply, edit (PUT for text/post, PATCH for cards), delete, fetch
  • Rich text support: markdown ↔ Feishu post format conversion via mdast, interactive card mapping
  • Reaction emoji mapping verified against official Feishu emoji docs (mixed-case emoji_type values like ThumbsDown, Fire, GoGoGo)
  • Thread ID format: feishu:{chatId}[:{rootId}][:{dm}]
  • Auto-refreshing tenant_access_token management with concurrent-safe refresh
  • Minor touches to packages/chat (emoji platform support) and packages/adapter-shared (card-utils platform type)

Test plan

  • pnpm build — all packages build (except pre-existing example-nextjs-chat issue)
  • pnpm typecheck — passes
  • pnpm check — lint/format clean
  • pnpm knip — no unused exports
  • pnpm --filter @chat-adapter/feishu test — 18 tests pass (thread-utils 100% coverage)
  • Manual testing against a Feishu bot with real webhook events

🤖 Generated with Claude Code

@vercel
Copy link
Contributor

vercel bot commented Feb 25, 2026

@m1heng is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@m1heng m1heng force-pushed the feat/adapter-feishu branch from 50b91bd to f7d892a Compare February 25, 2026 06:09
Implements a full Feishu/Lark adapter (`@chat-adapter/feishu`) with:
- Webhook handling (event v2.0, URL verification, AES-256-CBC decryption)
- Message send/reply/edit/delete using Feishu Open API v1
- Rich text (post) and interactive card support (PATCH for cards, PUT for text)
- Reaction emoji mapping verified against official Feishu emoji docs
- Thread ID encoding (feishu:{chatId}:{rootId}:{dm})
- Markdown ↔ Feishu post format conversion via mdast
- Auto-refreshing tenant_access_token management

Also updates README, CLAUDE.md, example app, and configs to include Feishu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@m1heng m1heng force-pushed the feat/adapter-feishu branch from f7d892a to 11cbe30 Compare February 25, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Feishu (Lark) adapter

1 participant