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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! iFlow CLI SDK for Rust
//!
//! A powerful SDK for interacting with iFlow using the [Agent Client Protocol (ACP)](https://github.com/agentclientprotocol/agent-client-protocol).
//! Built on top of the official agent-client-protocol crate.
//!
//! # Examples
//!
//! ## Basic usage with automatic process management
//! ```no_run
//! use iflow_cli_sdk_rust::IFlowClient;
//! use futures::stream::StreamExt;
//! use std::io::Write;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let mut client = IFlowClient::new(None);
//! client.connect().await?;
//!
//! client.send_message("Hello, iFlow!", None).await?;
//!
//! // Listen for messages
//! let mut message_stream = client.messages();
//! while let Some(message) = message_stream.next().await {
//! match message {
//! iflow_cli_sdk_rust::Message::Assistant { content } => {
//! print!("{}", content);
//! std::io::stdout().flush()?;
//! }
//! iflow_cli_sdk_rust::Message::TaskFinish { .. } => {
//! break;
//! }
//! _ => {
//! // Handle other message types
//! }
//! }
//! }
//!
//! client.disconnect().await?;
//! Ok(())
//! }
//! ```
//!
//! ## Simple query
//! ```no_run
//! use iflow_cli_sdk_rust::query;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let response = query("What is 2 + 2?").await?;
//! println!("{}", response);
//! Ok(())
//! }
//! ```
// Re-export main types
pub use IFlowClient;
pub use ;
pub use ;
pub use IFlowProcessManager;
pub use ;
pub use ;
// Re-export types from agent-client-protocol that we actually use
pub use ;
// Version info
pub const VERSION: &str = env!;
pub const PROTOCOL_VERSION: u32 = 1;