#![deny(clippy::unwrap_used)]
pub mod config;
pub mod error;
pub mod message;
pub mod tool;
pub mod trajectory;
pub mod usage;
pub use config::{ApiMode, DEFAULT_MODEL, OPENROUTER_BASE_URL, OriginChat, Platform};
pub use error::{AgentError, ToolError, ToolErrorRecord, ToolErrorResponse};
pub use message::{Content, ContentPart, ImageUrl, Message, Role};
pub use tool::{FunctionCall, ToolCall, ToolSchema};
pub use trajectory::Trajectory;
pub use usage::{Cost, Usage};
pub type Result<T> = std::result::Result<T, AgentError>;
pub fn is_termux() -> bool {
std::env::var("TERMUX_VERSION").is_ok()
|| std::env::var("PREFIX")
.map(|p| p.contains("com.termux/files/usr"))
.unwrap_or(false)
}
pub static IS_TERMUX: std::sync::LazyLock<bool> = std::sync::LazyLock::new(is_termux);