coro_core/
lib.rs

1//! # coro-code Core
2//!
3//! Core library for coro-code - a high-performance AI coding agent.
4//!
5//! This library provides the fundamental building blocks for creating AI agents
6//! that can interact with codebases, execute tools, and perform complex software
7//! engineering tasks.
8
9// Core modules
10pub mod agent;
11pub mod config;
12pub mod error;
13pub mod llm;
14pub mod output;
15pub mod tools;
16pub mod trajectory;
17
18// Re-export commonly used types
19pub use agent::{Agent, AgentBuilder, AgentConfig, OutputMode};
20pub use config::{ModelParams, Protocol, ResolvedLlmConfig};
21pub use trajectory::TrajectoryRecorder;
22
23/// Current version of the coro-core library
24pub const VERSION: &str = env!("CARGO_PKG_VERSION");
25
26/// Initialize tracing for the library
27pub fn init_tracing() {
28    tracing_subscriber::fmt()
29        .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
30        .init();
31}
32
33/// Initialize tracing with a specific debug mode
34pub fn init_tracing_with_debug(debug: bool) {
35    let filter = if debug { "debug" } else { "info" };
36
37    tracing_subscriber::fmt()
38        .with_env_filter(tracing_subscriber::EnvFilter::new(filter))
39        .init();
40}