Skip to content

feat: Add Feishu (Lark) adapter #106

@m1heng

Description

@m1heng

Motivation

The chat SDK currently supports Slack, Google Chat, and Microsoft Teams. Feishu (飞书) / Lark is the dominant enterprise communication platform in China and growing internationally — it's used by ByteDance, and many companies in APAC rely on it as their primary workspace.

Adding Feishu support would significantly expand the SDK's reach into the Chinese enterprise market, where Slack/Teams adoption is limited.

Scope

A new @chat-adapter/feishu package implementing the full Adapter interface:

  • Webhook handling — Feishu Event v2.0 schema, URL verification challenge, AES-256-CBC encrypted event decryption
  • Message operations — send, reply, edit, delete, fetch via Feishu Open API v1
  • Rich text — markdown ↔ Feishu post (富文本) format conversion via mdast
  • Interactive cards — card message support with Feishu card template mapping
  • Reactions — emoji mapping verified against official Feishu emoji docs (Feishu uses a proprietary naming system with inconsistent casing)
  • Auth — auto-refreshing tenant_access_token with concurrent-safe refresh
  • Thread IDsfeishu:{chatId}[:{rootId}][:{dm}] format, consistent with existing adapter conventions

Minor upstream changes

  • chat package: add "feishu" to convertEmojiPlaceholders platform union
  • @chat-adapter/shared: add "feishu" to PlatformName type and button style mappings

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions