[package]
name = "cqs"
version = "0.9.4"
edition = "2021"
rust-version = "1.88"
description = "Semantic code search and code intelligence for AI agents. Find functions by concept, trace call chains, assess impact — in single tool calls. Local ML, MCP server."
license = "MIT"
repository = "https://github.com/jamie8johnson/cqs"
homepage = "https://github.com/jamie8johnson/cqs"
readme = "README.md"
keywords = ["code-search", "semantic-search", "mcp-server", "embeddings", "vector-search"]
categories = ["command-line-utilities", "development-tools"]
exclude = [
    ".claude/",
    ".mcp.json",
    ".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-java = { version = "0.23", 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"
ndarray = "0.17"
# cuVS requires ndarray 0.15, import separately for gpu-search
ndarray_015 = { package = "ndarray", version = "0.15", optional = true }

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

# HTTP (for SSE transport)
axum = "0.8"
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "limit"] }
futures = "0.3"
tokio-stream = "0.1"

# 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 = "25.12", optional = true }

# Text processing
regex = "1"

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

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

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

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

[features]
default = ["lang-rust", "lang-python", "lang-typescript", "lang-javascript", "lang-go", "lang-c", "lang-java", "lang-sql"]

# 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-java = ["dep:tree-sitter-java"]
lang-sql = ["dep:tree-sitter-sql"]
lang-all = ["lang-rust", "lang-python", "lang-typescript", "lang-javascript", "lang-go", "lang-c", "lang-java", "lang-sql"]

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

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

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