coderlib 0.1.0

A Rust library for AI-powered code assistance and agentic system
Documentation
//! # 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(())
//! }
//! ```

pub mod core;
pub mod llm;
pub mod tools;
pub mod storage;
pub mod integration;
pub mod utils;
pub mod lsp;
pub mod mcp;
pub mod commands;
pub mod summarization;
pub mod permission;

// Re-export main types for convenience
pub use core::{CoderLib, CoderLibConfig, CodeRequest, CodeResponse};
pub use llm::{Provider, ProviderEvent, ProviderResponse, Model};
pub use tools::{Tool, ToolResponse, ToolError};
pub use storage::{Storage, Message};
pub use core::session::Session;
pub use integration::{HostIntegration, CoderEvent};
pub use mcp::McpConfig;
pub use permission::{Permission, PermissionService, PermissionRequest, PermissionResponse};

/// Main error type for CoderLib operations
pub use core::CoderLibError;

/// Result type alias for CoderLib operations
pub type Result<T> = std::result::Result<T, CoderLibError>;