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
//! LSP v2 - Clean layered architecture for Language Server Protocol communication
//!
//! This module provides a clean, testable, and extensible LSP client implementation
//! with proper separation of concerns:
//!
//! - **Framing**: LSP message framing (Content-Length headers)
//! - **Protocol**: JSON-RPC 2.0 protocol implementation
//! - **Client**: High-level typed LSP API using lsp-types
//! - **Testing**: Mock implementations for comprehensive testing
//!
//! This module uses the generic I/O layer (`crate::io`) for transport and process management.
//
// Example usage with direct component coordination:
//
// ```rust
// use mcp_cpp::io::{ChildProcessManager, StdioTransport};
// use mcp_cpp::lsp::LspClient;
//
// // Start process
// let mut process = ChildProcessManager::new("clangd".to_string(), args, Some(working_dir));
// process.start().await?;
//
// // Create transport and client
// let transport = process.create_stdio_transport()?;
// let mut client = LspClient::new(transport);
//
// // Initialize LSP
// client.initialize(Some("file:///path/to/project".to_string())).await?;
//
// // Make LSP requests...
//
// // Clean shutdown
// client.shutdown().await?;
// process.stop(StopMode::Graceful).await?;
// ```
// Re-export main types for convenience
pub use ;