zapmyco_core/lib.rs
1//! # zapmyco-core
2//!
3//! AI Agent 运行时的核心抽象层。
4//!
5//! ## 设计原则
6//!
7//! - **零环境依赖**:不读文件、不写终端、不碰环境变量
8//! - **依赖注入**:所有外部依赖通过 `AgentConfig` 传入
9//! - **事件驱动**:所有输出通过 `AgentEvent` 流发送
10//! - **工具即 Trait**:通过 `AgentTool` trait 注册,不通过枚举硬编码
11
12mod agent_config;
13mod agent_error;
14mod agent_event;
15mod agent_loop;
16mod agent_tool;
17mod types;
18
19// ── 重新导出所有公共类型 ──
20
21pub use agent_config::AgentConfig;
22pub use agent_error::AgentError;
23pub use agent_event::AgentEvent;
24pub use agent_loop::agent_loop;
25pub use agent_tool::AgentTool;
26pub use types::{ConversationMessage, MessageBlock, Role};