Feishu channel adapter for bub.
- Channel implementation:
FeishuChannel(name = "feishu") - Inbound message adaptation from Feishu to Bub
ChannelMessage - Packaged Feishu skill resources under
skills/feishu feishu_send.pysupports both text and card sending via--format text|cardfeishu_edit.pyupdates an existing bot message
uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-feishu"You can also install it with Bub:
bub install bub-feishu@mainFeishuChannel reads settings from environment variables with the BUB_FEISHU_ prefix.
BUB_FEISHU_APP_ID(required): Feishu app IDBUB_FEISHU_APP_SECRET(required): Feishu app secretBUB_FEISHU_VERIFICATION_TOKEN(optional): webhook verification tokenBUB_FEISHU_ENCRYPT_KEY(optional): webhook encrypt keyBUB_FEISHU_ALLOW_USERS(optional): JSON array or comma-separated allowlist of sender user identifiersBUB_FEISHU_ALLOW_CHATS(optional): JSON array or comma-separated allowlist of chat IDsBUB_FEISHU_BOT_OPEN_ID(optional): implementation-specific bot open ID used for exact mention matching in group chats; this is not the Feishu app IDBUB_FEISHU_LOG_LEVEL(optional, default:INFO)
- Session ID format:
feishu:<chat_id> - Inbound messages:
- ignores messages missing
chat_idormessage_id - applies allowlist filters when configured
- treats messages starting with
,as Bub commands
- ignores messages missing
- Message activation (
is_active = true) when any of these is true:- message is from
p2p - content contains
bub - content starts with
, - message mentions the bot
- message replies to a previous bot message
- message is from
Inbound non-command messages are encoded as JSON string content, including fields like:
messagemessage_idtypesender_idsender_namesender_is_botdatemediareply_to_message
- Inbound non-command messages set
output_channel="null"to disable channel outbound routing. - The channel is inbound-only; Feishu send/edit/reaction actions are handled through the packaged scripts or direct OpenAPI calls.
- Reaction support is available through the Feishu message reaction API.
- Evaluate Feishu bot menu / chat menu tree as a Telegram-like command entrypoint for common actions and submenus.
- Evaluate a Feishu-native processing feedback mechanism comparable to Telegram typing updates.
- Evaluate whether voice-message handling is feasible and worth supporting in the Feishu skill/runtime.