//! # motosan-agent-loop
//!
//! Standalone ReAct agent loop — [`LlmClient`] + [`AgentLoop`] with no
//! platform dependencies.
//!
//! This crate provides the core loop that drives an LLM through iterative
//! reasoning and tool execution, producing a final answer.

pub mod context;
pub mod error;
pub mod llm;
pub mod loop_;
pub mod message;
pub mod session;
pub mod session_store;

#[cfg(feature = "motosan-ai")]
mod motosan_ai_impl;

#[cfg(feature = "mcp-client")]
pub mod mcp;

// Re-export primary public types at crate root for convenience.
pub use context::ContextProvider;
pub use error::{AgentError, Result};
pub use llm::{ChatOutput, LlmClient, LlmResponse, StreamChunk, TokenUsage, ToolCallItem};
pub use loop_::{
    AgentEvent, AgentLoop, AgentLoopBuilder, AgentOp, AgentResult, BackpressurePolicy,
    ChannelConfig,
};
pub use message::{Message, Role, ToolCallRef};
pub use session::AgentSession;
pub use session_store::{FileSessionStore, MemorySessionStore, SessionMeta, SessionStore};
