[package]
name = "codelens-mcp"
version.workspace = true
edition.workspace = true
license.workspace = true
description.workspace = true
repository.workspace = true
readme = "README.md"
keywords.workspace = true
categories.workspace = true
homepage.workspace = true
# Test-only sources live under src/ for `cfg(test)` access to private
# modules, but they should not bloat the published crates.io tarball.
exclude = [
    "src/integration_tests/**",
    "src/server/http_tests/**",
    "src/server/http_tests.rs",
    "src/cli/startup_tests.rs",
]

[[bin]]
name = "codelens-mcp"
path = "src/main.rs"

[dependencies]
anyhow.workspace = true
axum = { workspace = true, optional = true }
axum-server = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
tokio-stream = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
url.workspace = true
rusqlite.workspace = true
toml = "0.8"
rustls = { workspace = true, optional = true }
codelens-engine = { path = "../codelens-engine", version = "=1.12.1", default-features = false }
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
opentelemetry = { workspace = true, optional = true }
opentelemetry_sdk = { workspace = true, optional = true }
opentelemetry-otlp = { workspace = true, optional = true }
tracing-opentelemetry = { workspace = true, optional = true }
jsonwebtoken = { workspace = true, optional = true }
ureq = { workspace = true, optional = true }
rayon.workspace = true

[dev-dependencies]
tower = { workspace = true }
tokio = { workspace = true }
http-body-util = { workspace = true }
base64 = { workspace = true }
native-tls = { workspace = true }
rcgen = { workspace = true }
tempfile = "3"
filetime = "0.2"

[features]
# Default is empty — `cargo install codelens-mcp` ships a BM25 + AST +
# call-graph build that boots without an external model directory. Opt
# into hybrid retrieval with `--features semantic` and supply the model
# via `CODELENS_MODEL_DIR`, or use the GitHub Release tarball which
# bundles the model. See ADR-0012.
default = []
semantic = ["codelens-engine/semantic"]
coreml = ["semantic", "codelens-engine/coreml"]
model-bakeoff = ["semantic", "codelens-engine/model-bakeoff"]
http = ["dep:axum", "dep:axum-server", "dep:tokio", "dep:uuid", "dep:tokio-stream", "dep:jsonwebtoken", "dep:ureq", "dep:rustls"]
otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-opentelemetry", "dep:tokio"]
scip-backend = ["codelens-engine/scip-backend"]
