Feishu channel for Bub
Project description
bub-feishu
Feishu channel adapter for bub.
What It Provides
- 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
Installation
uv pip install bub-feishu
You can also install it with Bub:
bub install bub-feishu@main
Configuration
FeishuChannel 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)
Runtime Behavior
- 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
Payload Shape
Inbound non-command messages are encoded as JSON string content, including fields like:
messagemessage_idtypesender_idsender_namesender_is_botdatemediareply_to_message
Outbound Notes
- 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.
TODO
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bub_feishu-0.0.1.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bub_feishu-0.0.1.tar.gz.
File metadata
- Download URL: bub_feishu-0.0.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88c2892b2aa27551cda7afb0f604912464f61c83be202fd3a71d7cc6336b33a8
|
|
| MD5 |
7d5a52684c6b61814f8f0114beda34fa
|
|
| BLAKE2b-256 |
7a03da6170eef1b9d995bb13f3f83120933c82dda19374212ea5dd5bde758061
|
File details
Details for the file bub_feishu-0.0.1-py3-none-any.whl.
File metadata
- Download URL: bub_feishu-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0207f9be1a015b423d6b0477ec9126ffcd90ec99e99cc68707990aa927847c93
|
|
| MD5 |
95f2098c4f4f0c8bcc69de92f7c1be2d
|
|
| BLAKE2b-256 |
ebde15d8c4afbf805f83c37132539287e93a8afba8316df155e246c3294d7e88
|