Skip to main content

agent_types/
lib.rs

1//! Pure type definitions for the agent-base runtime.
2//!
3//! This crate contains data structures and enums with **zero runtime
4//! dependencies** — no async, no I/O, no trait objects. It exists so that
5//! downstream crates (SDKs, protocol layers, tool definitions) can depend on
6//! just the types without pulling in the full agent-base runtime.
7//!
8//! agent-base re-exports everything from this crate, so existing
9//! `use agent_base::Content` continues to work.
10
11mod approval;
12mod checkpoint;
13mod execution;
14mod guard;
15mod message;
16mod notify;
17mod plan;
18mod session;
19mod tool;
20
21pub use approval::{ApprovalDecision, ApprovalRequest, RiskLevel};
22pub use checkpoint::{CheckpointData, CheckpointStep, ToolResultData};
23pub use execution::{FinishReason, RunOutcome};
24pub use guard::{GuardCtx, GuardDecision};
25pub use message::MessageRole;
26pub use notify::{Notice, NoticeKind};
27pub use plan::{PlanItem, PlanStepStatus, UpdatePlanArgs};
28pub use session::SessionId;
29pub use tool::{
30    ActivationContext, Content, ToolExposure, ToolMetadata, content_details, content_text,
31};