leindex 2.1.1

LeIndex MCP and semantic code search engine for AI tools and large codebases
// ONNX Runtime-based neural embeddings
//
// This module provides the main-daemon side of the ONNX embedding architecture.
// Actual ONNX inference is delegated to the leindex-embed worker process.
// VAL-CPHASE-002: The main crate no longer owns ONNX runtime deps directly.

/// Cross-language semantic chunking for code
///
/// Provides intelligent code chunking that handles language markers,
/// cross-language references, and semantic boundaries for better
/// neural embedding generation.
///
/// This module does not depend on ONNX Runtime directly — it prepares
/// text for embedding but does not run inference.
#[cfg(feature = "onnx")]
pub mod chunking;

/// Worker client for delegating ONNX inference to the leindex-embed process.
///
/// The client manages the worker lifecycle (spawn, reuse, idle teardown)
/// and communicates using the protocol types from the leindex-embed crate.
#[cfg(feature = "onnx")]
pub mod client;

/// Client-side global embedding cache access (probe hits locally, dispatch
/// only misses to the worker, store fresh vectors under the same keys).
#[cfg(feature = "onnx")]
pub(crate) mod embed_cache_frontend;

/// Remote embedding providers (OpenAI, Cohere, etc.)
///
/// Provides integration with cloud-based embedding services as an
/// alternative to local ONNX models.
#[cfg(feature = "remote-embeddings")]
pub mod remote;

#[cfg(feature = "onnx")]
pub use chunking::{ChunkConfig, CrossLanguageChunker, SemanticChunk};

#[cfg(feature = "onnx")]
pub use client::{
    ClientError, EmbedResult, EmbeddingClient, WorkerAvailability, daemon_active_provider,
    migraphx_cache_path, prune_stale_migraphx_profiles,
};

#[cfg(feature = "remote-embeddings")]
pub use remote::{
    CohereEmbeddingProvider, GenericRemoteProvider, OpenAIEmbeddingProvider, RemoteEmbeddingConfig,
    RemoteEmbeddingError, RemoteProvider,
};