Skip to main content

agent_engine/
lib.rs

1//! `agent-engine` — streaming runtime, tools, MCP, skills, extensions, sidecar, events.
2//! Depends on `agent-core` + external crates only. Never depends on tui or bin.
3
4pub mod runtime;
5pub mod tools;
6pub mod mcp;
7pub mod skills;
8pub mod events;
9pub mod extensions;
10pub mod sidecar;
11pub mod engine;
12pub mod help;
13
14// ── agent-core facade ──────────────────────────────────────────────────────────
15// Re-export core so that internal `crate::core::X`, `crate::config`, etc.
16// resolve inside agent-engine (mirrors root lib.rs approach).
17pub use agent_core::{core, memory, pricing};
18pub use agent_core::{config, session, auth, logging, protocol, error, watcher_types, models, chain};
19pub use agent_core::{epoch_millis, truncate_str};
20
21// ── engine-internal top-level re-exports ──────────────────────────────────────
22// These mirror what root lib.rs was exporting; they let intra-engine code use
23// `crate::Runtime`, `crate::StreamEvent`, etc. (45 uses of StreamEvent alone).
24pub use runtime::{Runtime, StreamEvent, LlmEvent, SessionEvent, AgentEvent};
25pub use tools::{Tool, ToolContext, ToolRegistry};
26pub use session::{Session, SessionInfo, find_session, latest_session, list_sessions, list_recent_sessions,
27                  resolve_session, find_session_by_name, validate_name};
28pub use error::{RuntimeError, Result};
29pub use config::{SynapsConfig, load_config, resolve_system_prompt};
30pub use watcher_types::{
31    AgentConfig, SessionLimits, HandoffState, ExitReason, SessionStats,
32    WatcherCommand, WatcherResponse, AgentStatusInfo,
33};
34pub use serde_json::Value;
35pub use tokio_util::sync::CancellationToken;