//! 类型系统模块：定义基于 AI-Protocol 规范的核心数据类型。
//!
//! # Types Module
//!
//! This module defines the core type system based on the AI-Protocol standard schema,
//! providing strongly-typed representations for all AI interaction primitives.
//!
//! ## Overview
//!
//! The type system ensures:
//! - Type-safe message construction and handling
//! - Consistent event representation across providers
//! - Standardized tool/function calling interfaces
//! - Serialization compatibility with AI-Protocol specification
//!
//! ## Key Types
//!
//! | Type | Description |
//! |------|-------------|
//! | [`Message`] | Chat message with role and content |
//! | [`MessageRole`] | Message role (user, assistant, system, tool) |
//! | [`StreamingEvent`] | Unified streaming event representation |
//! | [`ToolCall`] | Function/tool call from model response |
//! | [`ToolDefinition`] | Tool definition for model context |
//!
//! ## Submodules
//!
//! | Module | Description |
//! |--------|-------------|
//! | [`events`] | Streaming event types and variants |
//! | [`message`] | Message types with multi-modal content support |
//! | [`tool`] | Tool/function calling types |
//!
//! ## Example
//!
//! ```rust
//! use ai_lib_core::types::{Message, MessageRole, ToolDefinition};
//!
//! // Create messages
//! let system = Message::system("You are a helpful assistant");
//! let user = Message::user("What's the weather?");
//!
//! // Define a tool
//! let tool = ToolDefinition {
//!     tool_type: "function".to_string(),
//!     function: ai_lib_core::types::tool::FunctionDefinition {
//!         name: "get_weather".to_string(),
//!         description: Some("Get current weather for a location".to_string()),
//!         parameters: Some(serde_json::json!({
//!             "type": "object",
//!             "properties": {
//!                 "location": {"type": "string"}
//!             }
//!         })),
//!     },
//! };
//! ```

pub mod content_encode;
pub mod events;
pub mod execution_result;
pub mod manifest_encode;
pub mod message;
pub mod text_tool;
pub mod tool;

pub use content_encode::{encode_blocks_for_anthropic, encode_blocks_for_gemini};
pub use events::StreamingEvent;
pub use execution_result::{ExecutionMetadata, ExecutionResult, ExecutionUsage};
pub use message::{Message, MessageRole};
pub use text_tool::{PromptLevel, StandardTextToolParser, TextToolConfig, TextToolParser};
pub use tool::{ToolCall, ToolDefinition};
