[package]
name = "cqs"
version = "0.19.0"
edition = "2021"
rust-version = "1.93"
description = "Code intelligence and RAG for AI agents. Semantic search, call graphs, impact analysis, type dependencies, and smart context assembly — in single tool calls. 20 languages, 90.9% Recall@1, 0.951 NDCG@10. Local ML, GPU-accelerated."
license = "MIT"
repository = "https://github.com/jamie8johnson/cqs"
homepage = "https://github.com/jamie8johnson/cqs"
readme = "README.md"
keywords = ["code-intelligence", "rag", "code-search", "call-graph", "embeddings"]
categories = ["command-line-utilities", "development-tools"]
exclude = [
    ".claude/",
    ".githooks/",
    "CLAUDE.md",
    "PROJECT_CONTINUITY.md",
    "ROADMAP.md",
    "docs/AUDIT_*",
    "docs/DESIGN_SPEC_*",
    "docs/notes.toml",
]

[dependencies]
# CLI
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"

# Parsing (tree-sitter) - core is required, grammars are optional
tree-sitter = "0.26"
tree-sitter-rust = { version = "0.24", optional = true }
tree-sitter-python = { version = "0.25", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-javascript = { version = "0.25", optional = true }
tree-sitter-go = { version = "0.25", optional = true }
tree-sitter-c = { version = "0.24", optional = true }
tree-sitter-cpp = { version = "0.23", optional = true }
tree-sitter-java = { version = "0.23", optional = true }
tree-sitter-c-sharp = { version = "0.23", optional = true }
tree-sitter-fsharp = { version = "0.1", optional = true }
tree-sitter-powershell = { version = "0.26", optional = true }
tree-sitter-scala = { version = "0.24", optional = true }
tree-sitter-ruby = { version = "0.23", optional = true }
tree-sitter-bash = { version = "0.23", optional = true }
tree-sitter-hcl = { version = "1.1", optional = true }
tree-sitter-kotlin = { version = "1.1", package = "tree-sitter-kotlin-ng", optional = true }
tree-sitter-swift = { version = "0.7", optional = true }
tree-sitter-objc = { version = "3.0", optional = true }
tree-sitter-sql = { version = "0.4", package = "tree-sitter-sequel-tsql", optional = true }

# ML
ort = { version = "2.0.0-rc.11", features = ["cuda", "tensorrt"] }
tokenizers = { version = "0.22", features = ["http"] }
hf-hub = "0.4.3"
ndarray = "0.17"
# cuVS requires ndarray 0.15, import separately for gpu-index
ndarray_015 = { package = "ndarray", version = "0.15", optional = true }

# Async
tokio = { version = "1", features = ["rt-multi-thread", "time"] }

# Storage (sqlx async SQLite)
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] }
keyring = { version = "3", optional = true }

# Vector search (HNSW default, cuVS optional)
hnsw_rs = "0.3"
simsimd = "6"
cuvs = { version = "26.2", optional = true }

# Text processing
regex = "1"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1.0"

# Path canonicalization (strips Windows UNC \\?\ prefixes)
dunce = "1"

# Utilities
blake3 = "1"
bytemuck = { version = "1", features = ["derive"] }
ignore = "0.4"
notify = { version = "8", features = ["serde"] }
ctrlc = "3"
rayon = "1"
crossbeam-channel = "0.5"
chrono = "0.4"
globset = "0.4"
colored = "3"
indicatif = "0.18"
shell-words = "1"
anyhow = "1"
thiserror = "2"
dirs = "6"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
rand = "0.10"
lru = "0.16"
once_cell = "1"
tempfile = "3"

# Document conversion (optional)
fast_html2md = { version = "0.0", optional = true }
walkdir = { version = "2", optional = true }
self_cell = "1"

[target.'cfg(unix)'.dependencies]
libc = "0.2"

[features]
default = ["lang-rust", "lang-python", "lang-typescript", "lang-javascript", "lang-go", "lang-c", "lang-cpp", "lang-java", "lang-csharp", "lang-fsharp", "lang-powershell", "lang-scala", "lang-ruby", "lang-bash", "lang-hcl", "lang-kotlin", "lang-swift", "lang-objc", "lang-sql", "lang-markdown", "convert"]

# Language support (opt-in, all enabled by default)
lang-rust = ["dep:tree-sitter-rust"]
lang-python = ["dep:tree-sitter-python"]
lang-typescript = ["dep:tree-sitter-typescript"]
lang-javascript = ["dep:tree-sitter-javascript"]
lang-go = ["dep:tree-sitter-go"]
lang-c = ["dep:tree-sitter-c"]
lang-cpp = ["dep:tree-sitter-cpp"]
lang-java = ["dep:tree-sitter-java"]
lang-csharp = ["dep:tree-sitter-c-sharp"]
lang-fsharp = ["dep:tree-sitter-fsharp"]
lang-powershell = ["dep:tree-sitter-powershell"]
lang-scala = ["dep:tree-sitter-scala"]
lang-ruby = ["dep:tree-sitter-ruby"]
lang-bash = ["dep:tree-sitter-bash"]
lang-hcl = ["dep:tree-sitter-hcl"]
lang-kotlin = ["dep:tree-sitter-kotlin"]
lang-swift = ["dep:tree-sitter-swift"]
lang-objc = ["dep:tree-sitter-objc"]
lang-sql = ["dep:tree-sitter-sql"]
lang-markdown = []  # No external deps — custom parser
lang-all = ["lang-rust", "lang-python", "lang-typescript", "lang-javascript", "lang-go", "lang-c", "lang-cpp", "lang-java", "lang-csharp", "lang-fsharp", "lang-powershell", "lang-scala", "lang-ruby", "lang-bash", "lang-hcl", "lang-kotlin", "lang-swift", "lang-objc", "lang-sql", "lang-markdown"]

# Document conversion
convert = ["dep:fast_html2md", "dep:walkdir"]

# Other features
# encrypt feature removed - sqlx doesn't support SQLCipher directly
# TODO: Re-evaluate encryption strategy with sqlx
encrypt = ["keyring"]
gpu-index = ["cuvs", "ndarray_015"]

[dev-dependencies]
insta = "1"
proptest = "1"
assert_cmd = "2"
predicates = "3"
serial_test = "3"

[profile.release]
lto = "thin"
codegen-units = 1
panic = "abort"
strip = true
