cqs 1.26.0

Code intelligence and RAG for AI agents. Semantic search, call graphs, impact analysis, type dependencies, and smart context assembly — in single tool calls. 54 languages + L5X/L5K PLC exports, 91.2% Recall@1 (BGE-large), 0.951 MRR (296 queries). Local ML, GPU-accelerated.
Documentation
//! Chunk CRUD operations
//!
//! Split into submodules by concern:
//! - `crud` - upsert, metadata, delete, summaries
//! - `staleness` - prune, stale checks
//! - `embeddings` - embedding retrieval by hash
//! - `query` - chunk retrieval, search, identity, stats
//! - `async_helpers` - async fetch, batch insert, EmbeddingBatchIterator

mod async_helpers;
mod crud;
mod embeddings;
mod query;
mod staleness;

pub use staleness::PruneAllResult;

// Free async functions in async_helpers are pub(super) — accessible
// to sibling modules (crud.rs) via `super::async_helpers::`.

#[cfg(test)]
pub(super) mod test_utils {
    use crate::parser::{Chunk, ChunkType, Language};
    use std::path::PathBuf;

    /// Creates a mock Rust function chunk with generated content and hash.
    pub(super) fn make_chunk(name: &str, file: &str) -> Chunk {
        let content = format!("fn {}() {{ /* body */ }}", name);
        let hash = blake3::hash(content.as_bytes()).to_hex().to_string();
        Chunk {
            id: format!("{}:1:{}", file, &hash[..8]),
            file: PathBuf::from(file),
            language: Language::Rust,
            chunk_type: ChunkType::Function,
            name: name.to_string(),
            signature: format!("fn {}()", name),
            content,
            doc: None,
            line_start: 1,
            line_end: 5,
            content_hash: hash,
            parent_id: None,
            window_idx: None,
            parent_type_name: None,
        }
    }
}