Skip to main content

aidaemon_channels/
lib.rs

1//! # aidaemon-channels (experimental)
2//!
3//! Chat channels (Telegram, Slack, Discord, or your own) connected to
4//! `aidaemon_core` agents. This crate defines the [`Channel`] contract and
5//! the runner that turns channel events into agent runs: one session per
6//! conversation, one run at a time per session, streamed progress, and
7//! approvals as buttons that resume interrupted runs.
8//!
9//! Adapters live in their own crates (`aidaemon-channel-telegram`,
10//! `aidaemon-channel-slack`, `aidaemon-channel-discord`) and depend only on
11//! the types in [`channel`].
12//!
13//! The runner is [`ChannelRunner`]; see [`runner`] for how to wire an agent,
14//! an [`EventRouter`] and channels together.
15
16// Feature unification only (cargo-hakari); keeps the unused-dependency lint quiet.
17use workspace_hack as _;
18
19pub mod admin_commands;
20#[cfg(feature = "conformance")]
21pub mod approval_conformance;
22pub mod approval_render;
23mod approvals;
24pub mod attachments;
25pub mod bot;
26pub mod channel;
27pub mod claim;
28pub mod commands;
29#[cfg(feature = "conformance")]
30pub mod conformance;
31pub mod context;
32#[cfg(feature = "http")]
33pub mod download;
34pub mod hub;
35mod inbound_files;
36pub use aidaemon_tools::text::truncate_ellipsis;
37/// TLS for the sockets reqwest does not open (a bot's websocket), trusting
38/// what the daemon's HTTPS client trusts.
39pub use aidaemon_tools::tls;
40pub use inbound_files::write_private_file;
41pub mod latex;
42pub mod live_status;
43pub mod markdown;
44pub mod mid_run;
45pub mod names;
46pub mod outbound;
47pub mod owner_wait;
48pub mod policy;
49pub mod ports;
50pub mod presentation;
51pub mod prompts;
52pub mod queue;
53#[cfg(feature = "http")]
54pub mod rate_limit;
55mod render;
56pub mod restored;
57pub mod router;
58pub mod runner;
59pub mod send_file;
60pub mod session;
61pub mod slash;
62pub mod split;
63pub mod stop;
64pub mod tasks;
65pub mod terminal_lite;
66pub mod turns;
67
68#[cfg(feature = "testing")]
69pub mod testing;
70
71pub use approvals::{ApprovalStore, MemoryApprovalStore, StoredApproval};
72pub use channel::{
73    ApprovalAnswer, ApprovalChoice, ApprovalDetails, ApprovalPrompt, Attachment, AttachmentKind,
74    Channel, ChannelCapabilities, ChannelError, ChannelEvent, CommandInvocation, CommandSpec,
75    Conversation, ConversationKind, DEFAULT_MAX_DOWNLOAD_BYTES, InboundMessage, MessageRef,
76    OutboundFile, OutboundMessage, ProgressPhase, RunEnding, RunProgress, Sender, ToolProgress,
77    ToolState,
78};
79pub use commands::{CommandContext, CommandHandler, CommandReply, builtin_commands};
80pub use names::DisplayNameCache;
81pub use policy::{AccessPolicy, Admission, DEFAULT_REFUSAL, SenderRole};
82pub use router::EventRouter;
83pub use runner::{
84    APPROVE_CHOICE, AttachmentConfig, ChannelRunner, ChannelRunnerBuilder, DENY_CHOICE,
85    RunnerBuildError, RunnerConfig,
86};
87pub use session::{MemorySessionIndex, SessionIndex, session_id};
88pub use split::split_message;