//! Matrix bot — sub-modules for the Matrix chat bot implementation.
/// Bot context — shared state passed to Matrix bot command handlers.
pub mod context;
/// Matrix message formatter — converts markdown to Matrix HTML.
pub mod format;
/// Conversation history — loads and saves per-room chat history.
pub mod history;
/// Mention detection — identifies messages that mention the bot user.
pub mod mentions;
/// Message handlers — processes incoming Matrix room messages.
pub mod messages;
/// Permission listener — registers as a permission responder for the bot's
/// lifetime and forwards permission requests to the configured Matrix room.
pub mod permission_listener;
/// Bot run loop — the main async task that drives the Matrix sync loop.
pub mod run;
/// Device verification — handles Matrix cross-signing and emoji verification flows.
pub mod verification;

// Re-export all public types so existing import paths continue to work.
pub use format::markdown_to_html;
pub use history::{
    ConversationEntry, ConversationHistory, ConversationRole, RoomConversation, save_history,
};
pub use run::run_bot;
