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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// lepasserelle - Integration & API Layer
//
// *La Passerelle* (The Bridge) - Pure Rust orchestration, CLI, and MCP server
//
// This crate provides the integration and API layer for LeIndex, offering:
//
// - **LeIndex Orchestration**: Unified API for parsing, indexing, searching, and analysis
// - **CLI Interface**: Command-line tool for project indexing, search, and diagnostics
// - **MCP Server**: Model Context Protocol server for LLM tool integration
// - **Memory Management**: Automatic cache spilling and restoration with LRU eviction
//
// ## Features
//
// - `mcp-server` (default): MCP JSON-RPC server functionality
//
// ## Example
//
// ```no_run
// use leindex::cli::LeIndex;
//
// let leindex = LeIndex::new("/path/to/project")?;
// let stats = leindex.index_project()?;
// println!("Indexed {} files", stats.files_parsed);
//
// let results = leindex.search("authentication", 10)?;
// ```
//!
//! # LePasserelle - Integration & API Layer
//!
//! This crate provides the integration and API layer for LeIndex, offering:
//!
//! - **LeIndex Orchestration**: Unified API for parsing, indexing, searching, and analysis
//! - **CLI Interface**: Command-line tool for project indexing, search, and diagnostics
//! - **MCP Server**: Model Context Protocol server for LLM tool integration
//! - **Memory Management**: Automatic cache spilling and restoration with LRU eviction
//!
//! ## Features
//!
//! - `mcp-server` (default): MCP JSON-RPC server functionality
//!
//! ## Quick Start
//!
//! ```text
//! use leindex::cli::LeIndex;
//!
//! // Create a LeIndex instance for a project
//! let leindex = LeIndex::new("/path/to/project")?;
//!
//! // Index the project
//! let stats = leindex.index_project()?;
//! println!("Indexed {} files", stats.files_parsed);
//!
//! // Search for code
//! let results = leindex.search("authentication", 10)?;
//! for result in results {
//! println!("{}: {}", result.symbol_name, result.file_path);
//! }
//! ```
//!
//! ## CLI Usage
//!
//! ```bash
//! # Index a project
//! leindex index /path/to/project
//!
//! # Search for code
//! leindex search "authentication"
//!
//! # Deep analysis
//! leindex analyze "How does authentication work?"
//!
//! # System diagnostics
//! leindex diagnostics
//! ```
/// Command-line interface definitions and handling.
/// Configuration for projects, languages, and storage.
/// Error types and error handling logic.
/// Indexing pipeline: project parsing, PDG building, search indexing.
/// Cache subsystem: CacheSpiller, project scan, file stats cache.
/// Staleness detection: is_stale_fast, check_freshness, check_manifest_stale.
/// Core orchestration logic for indexing and search.
/// Memory management and cache orchestration.
/// Multi-project registry with per-project concurrency.
/// Shared directory exclusion constants.
/// File watcher for auto-reindex.
/// Model Context Protocol (MCP) server implementation.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ProjectRegistry;
/// Library initialization