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
//! # CoderLib
//!
//! A Rust library for LLM-powered code generation, ported from OpenCode.
//!
//! CoderLib provides a comprehensive framework for integrating AI coding assistance
//! into text editors and development tools. It supports multiple LLM providers,
//! tool execution, session management, and seamless integration with host applications.
//!
//! ## Features
//!
//! - **Multiple LLM Providers**: OpenAI, Anthropic, Google Gemini, AWS Bedrock, and more
//! - **Tool System**: File operations, shell commands, code analysis
//! - **Session Management**: Persistent conversation sessions with context
//! - **Streaming Responses**: Real-time AI response streaming
//! - **Permission System**: Secure tool execution with user approval
//! - **Host Integration**: Clean API for editor integration
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use coderlib::{CoderLib, CoderLibConfig, CodeRequest};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = CoderLibConfig::default();
//! let coder_lib = CoderLib::new(config).await?;
//!
//! let request = CodeRequest {
//! session_id: "example".to_string(),
//! content: "Write a hello world function".to_string(),
//! ..Default::default()
//! };
//!
//! let mut response_stream = coder_lib.process_request(request).await?;
//! // Handle streaming response...
//!
//! Ok(())
//! }
//! ```
// Re-export main types for convenience
pub use ;
pub use ;
pub use ;
pub use ;
pub use Session;
pub use ;
pub use McpConfig;
pub use ;
/// Main error type for CoderLib operations
pub use CoderLibError;
/// Result type alias for CoderLib operations
pub type Result<T> = Result;