Skip to main content

brainwires_channels/
lib.rs

1#![deny(missing_docs)]
2//! # Brainwires Channels
3//!
4//! Universal messaging channel contract for the Brainwires Agent Framework.
5//!
6//! This crate defines the traits and types that every messaging channel adapter
7//! (Discord, Telegram, Slack, etc.) must implement. It is used by the gateway
8//! daemon and all channel adapters to ensure a consistent interface.
9
10/// Channel capability flags.
11pub mod capabilities;
12/// Conversion between `ChannelMessage` and agent-network `MessageEnvelope`.
13#[cfg(feature = "agent-network")]
14pub mod conversion;
15/// Channel events (message received, edited, deleted, reactions, etc.).
16pub mod events;
17/// Gateway handshake protocol types.
18pub mod handshake;
19/// User and session identity types.
20pub mod identity;
21/// Core message types for channel communication.
22pub mod message;
23/// The `Channel` trait that all adapters must implement.
24pub mod traits;
25
26// Re-export core types at crate root
27pub use capabilities::ChannelCapabilities;
28pub use events::{ChannelEvent, PresenceStatus};
29pub use handshake::{ChannelHandshake, ChannelHandshakeResponse};
30pub use identity::{ChannelSession, ChannelUser, ConversationId};
31pub use message::{
32    Attachment, ChannelMessage, EmbedField, EmbedPayload, MediaPayload, MediaType, MessageContent,
33    MessageId, ThreadId,
34};
35pub use traits::Channel;