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
//! Curated Rust SDK surface for embedding imp in other hosts.
//!
//! This module is the first stable-shaped entry point for using imp as a
//! reusable runtime instead of only through the CLI or TUI. It intentionally
//! wraps the existing `imp_session`, `agent`, and `ui` pieces in one place so
//! host applications can depend on a small public surface.
//!
//! Current SDK v1 focus:
//! - create and manage an [`ImpSession`]
//! - prompt, steer, follow up, cancel, and wait for completion
//! - consume the runtime [`AgentEvent`] stream
//! - provide a host-side [`UserInterface`] bridge
//! - switch models and thinking levels for later prompts
//!
//! Explicitly out of scope for this first slice:
//! - extension/runtime loading
//! - packaged customization discovery
//! - a higher-level runtime/session-replacement wrapper above [`ImpSession`]
//! - CLI/TUI-specific orchestration helpers
//! - provider registration and broader host lifecycle policy
//!
//! # Example
//! ```no_run
//! use imp_core::sdk::{AgentEvent, ImpSession, Result, SessionOptions};
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! let mut session = ImpSession::create(SessionOptions {
//! cwd: std::env::current_dir()?,
//! ..Default::default()
//! })
//! .await?;
//!
//! session.prompt("Summarize the project in this directory.").await?;
//!
//! while let Some(event) = session.recv_event().await {
//! match event {
//! AgentEvent::MessageDelta { .. } => {}
//! AgentEvent::AgentEnd { .. } => break,
//! _ => {}
//! }
//! }
//!
//! session.wait().await
//! }
//! ```
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use ;