feat(adapter-lark): add Lark (Feishu) adapter#420
Closed
mazhe-nerd wants to merge 1 commit into
Closed
Conversation
Contributor
|
@mazhe-nerd is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
802de9e to
1764dae
Compare
1764dae to
ed9c54f
Compare
Contributor
|
Hey there! Thanks for submitting this PR. However at this time, we will have to decline it. But you are more than welcome to submit it as a community adapter. |
Author
|
Thanks for the review and for clarifying the path! Totally fair — I'll move the package to a standalone repo, publish to npm, and follow up with a small PR adding the Lark entry to adapters.json (similar to the Webex / Matrix / Resend community adapters). Appreciate the time you took to look at it. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@chat-adapter/lark, a new Chat SDK adapter for Lark / Feishu, built on@larksuiteoapi/node-sdk'sLarkChannel.Capabilities
Inbound (WebSocket long-connection):
onNewMention/onDirectMessage/onSubscribedMessage/onReaction/onActionmentionedBotfield (works even when Lark strips@botfrom the text)Outbound:
postMessage— markdown → Lark post with code-fence-aware chunking and auto-retrystream— native cardkit typewriter (progressive rendering, not PATCH polling)editMessage/deleteMessage— via the SDK'schannel.editMessage/channel.recallMessage(handles post-vs-text format matching)addReaction/removeReaction— with chat-SDK emoji name ↔ Larkemoji_typemappingHistory / lookup:
fetchMessages— paged listing, direction-aware (ByCreateTimeDesc/Asc)fetchMessage,fetchThread,fetchChannelInfolistThreads— derived client-side by grouping messages byroot_idapp_id → open_id)DM:
openDMreturns a placeholder thread ID; routing toou_*recipients handled transparently by the SDK'schannel.sendisDMuses a p2p-chat cache populated from inbound eventsOnboarding:
registerLarkAppre-exported from the SDK — scan a QR with the Lark mobile app to create the app and get credentials backDocs:
/adapters/lark, Lark SVG logo, README auto-rendered as the detail pageThread ID format:
lark:{chatId}:{rootId}, whererootIdisroot_id ?? message_id.Test plan
thread-id,emoji, andLarkAdapter—pnpm --filter @chat-adapter/lark testpnpm --filter @chat-adapter/lark typecheck / build— cleansmokes/:smoke:echo— mention / DM / subscribed-thread routingsmoke:stream— cardkit typewriter replysmoke:edit— post → edit → deletesmoke:reactions— add/remove reactions + inbound reaction eventssmoke:long— multi-chunk markdown with code blockssmoke:history—fetchMessages/listThreads/fetchMessage