Skip to main content

matrixcode_core/
lib.rs

1//! MatrixCode Core - Agent Logic, No UI
2//!
3//! This crate contains only Agent core logic, no UI handling.
4//! All outputs are structured AgentEvent, UI layer renders them.
5
6pub mod agent;
7pub mod approval;
8pub mod cancel;
9pub mod compress;
10pub mod config;
11pub mod debug;
12pub mod event;
13pub mod memory;
14pub mod models;
15pub mod overview;
16pub mod path_validator;
17pub mod prompt;
18pub mod providers;
19pub mod session;
20pub mod skills;
21pub mod tools;
22pub mod truncate;
23pub mod workspace;
24
25// Public exports
26pub use agent::{Agent, AgentBuilder};
27pub use approval::ApproveMode;
28pub use config::Config;
29pub use debug::{DebugLog, DebugStats, debug_log};
30pub use event::{AgentEvent, EventCollector, EventData, EventType};
31pub use providers::{
32    ChatRequest, ChatResponse, ContentBlock, Message, MessageContent, Provider, ProviderType, Role,
33    create_provider, create_provider_with_headers, infer_provider_type,
34};
35pub use session::{Session, SessionManager};
36pub use truncate::{find_boundary, truncate_bytes, truncate_chars, truncate_with_suffix};
37
38/// Core version
39pub const VERSION: &str = env!("CARGO_PKG_VERSION");