1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Agent session for interactive conversations with Claude Code CLI
//!
//! Provides the public API for executing queries, registering hooks and permissions,
//! and controlling the agent session at runtime.
//!
//! # Module Organization
//!
//! The session module is organized into focused sub-modules:
//!
//! - [`state`] - Session state management and conversation history
//! - [`core`] - Core AgentSession struct and lifecycle methods (new, close, fork)
//! - [`query`] - Query execution and message streaming
//! - [`control`] - Runtime control (interrupts, model changes, permissions, hooks)
//!
//! # Examples
//!
//! Basic usage:
//! ```no_run
//! # use turboclaudeagent::ClaudeAgentClient;
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let config = ClaudeAgentClient::builder()
//! .api_key("your-api-key")
//! .build()?;
//! let client = ClaudeAgentClient::new(config);
//! let session = client.create_session().await?;
//!
//! // Simple query
//! let response = session.query_str("What is 2+2?").await?;
//!
//! // Fork session to explore alternative path
//! let forked = session.fork().await?;
//! # Ok(())
//! # }
//! ```
// Re-export public types
pub use AgentSession;
pub use QueryBuilder;
pub use SessionState;