Unified message protocol for channel adapters in the 3tears platform
Project description
3tears-channels
A unified message protocol for the 3tears framework, with adapters for Slack, Discord, and WebSocket clients. Write your agent logic once and deliver it across channels.
pip install 3tears-channels
What you get
- One message model --
ChannelMessage,ChannelResponse,ChannelDeliveryMessage, andAttachmentcarry a request and its reply regardless of channel. - Routing --
ChannelRouterandStreamingChannelRouterdispatch inbound messages and stream responses back. - Slack and Discord -- payload and rich-formatting builders (
build_slack_blocks,build_slack_payload,build_discord_embed,build_discord_payload) plus ashould_use_rich_formattinghelper. - WebSocket --
WebSocketHandler,WebSocketProtocol, aConnectionRegistry, and frame primitives for real-time clients. - Rooms and presence --
RoomFanout,RoomState,RoomIndexCollection, and a three-tier-backedPresenceCollectionwith aPresenceSweeperfor connection liveness.
Quickstart
from threetears.channels import ChannelRouter, ChannelMessage, build_slack_blocks
router = ChannelRouter(...)
response = await router.dispatch(ChannelMessage(text="hello", channel="slack", ...))
blocks = build_slack_blocks(response)
License
MIT. See LICENSE.
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
3tears_channels-0.14.0.tar.gz
(116.9 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 3tears_channels-0.14.0.tar.gz.
File metadata
- Download URL: 3tears_channels-0.14.0.tar.gz
- Upload date:
- Size: 116.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf26213753b8b5b4b4b173cba2c3276507c61e047e262d1193070b3ab93ed6d
|
|
| MD5 |
ab611fe434f8aac26dba9241e183572b
|
|
| BLAKE2b-256 |
c7e784b7fa149a29a19a75e4436bd665845e5d5e274e020c8eb429e94a6709e3
|
File details
Details for the file 3tears_channels-0.14.0-py3-none-any.whl.
File metadata
- Download URL: 3tears_channels-0.14.0-py3-none-any.whl
- Upload date:
- Size: 63.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a3d070ddfe30f854ceda67cff21476d6df0049846d8d59ded6efb91bbf9bd1
|
|
| MD5 |
5a20f4feba184bde6a6379de163f8e92
|
|
| BLAKE2b-256 |
b299603620a3afabd75e1542867b86fe590bd4853d52d7c94fc49f78f92f0e1f
|