Skip to main content

atomr_agents_channel_core/
lib.rs

1//! Channel + thread domain layer.
2//!
3//! A **channel** is a provider-specific messaging transport — WhatsApp,
4//! Signal, Discord, or the in-process [`memory::InMemoryProvider`] used
5//! for tests. A **thread** is a long-lived conversation between a
6//! channel peer and a bound [`ThreadTarget`]; the target can be any
7//! [`Callable`](atomr_agents_callable::Callable) (so agents, harnesses,
8//! teams, workflows, or plain closures all qualify) or a [`HarnessRef`]
9//! routed through a [`HarnessInputAdapter`].
10//!
11//! Channels are an **optional, additive** layer over existing agent
12//! conversation interactions: nothing in [`AgentRef::turn`](atomr_agents_core)
13//! or [`HarnessRef::run`](atomr_agents_callable) changes — channels
14//! just expose the same callables behind a messaging surface.
15
16#![forbid(unsafe_code)]
17
18mod content;
19mod error;
20mod events;
21mod ids;
22pub mod memory;
23mod provider;
24mod spec;
25mod store;
26mod target;
27mod thread;
28
29pub use atomr_agents_callable::{Callable, CallableHandle};
30
31pub use content::{
32    ChannelMessageRecord, Direction, InboundMessage, MessageContent, OutboundMessage, ProviderAck,
33};
34pub use error::{ChannelError, Result};
35pub use events::{ChannelEvent, ChannelEventStream};
36pub use ids::{ChannelId, PeerId, ThreadId};
37pub use provider::{ChannelProvider, ProviderHandle};
38pub use spec::{Capabilities, ChannelSpec, ProviderKind};
39pub use store::{ChannelStore, InMemoryChannelStore, ThreadSummary};
40pub use target::{HarnessInputAdapter, ThreadTarget};
41pub use thread::{Thread, ThreadPolicy, ThreadRef};