Skip to main content

Crate punch_channels

Crate punch_channels 

Source
Expand description

§punch-channels

Channel adapters for messaging platforms in the Punch Agent Combat System.

Provides a unified ChannelAdapter trait that abstracts over different messaging platforms (Telegram, Discord, Slack, etc.), a [ChannelRouter] that maps platform users to fighters, and a ChannelBridge that manages adapters and dispatches messages through the Ring.

Modules§

adapters
bridge
Channel bridge — connects channel adapters to the Ring via webhook handlers.
onboarding
Channel onboarding guides – step-by-step setup instructions for each platform.
router
Channel router — maps channel+user combinations to fighter IDs.
security
Channel security gateway — signature verification, allowlisting, rate limiting.

Structs§

ChannelBridge
Manages multiple ChannelAdapters and routes messages between them.
ChannelStatus
Status of a channel adapter.
IncomingMessage
A message received from an external messaging platform.

Enums§

ChannelPlatform
Identifies the messaging platform an adapter connects to.

Traits§

ChannelAdapter
Abstraction over a messaging platform connection.

Functions§

split_message
Split a message into chunks of at most max_len characters, preferring to split at newline boundaries.