[package]
name = "brokk-bifrost"
version = "0.4.2"
edition = "2024"
description = "Tree-sitter-backed multi-language code analyzer with bundled LSP and MCP search-tool servers. Powers Brokk's `bifrost` binary."
license = "LGPL-3.0-or-later"
repository = "https://github.com/BrokkAi/bifrost"
homepage = "https://github.com/BrokkAi/bifrost"
readme = "README.md"
keywords = ["analyzer", "tree-sitter", "lsp", "mcp", "code-analysis"]
categories = ["development-tools", "parser-implementations", "command-line-utilities"]

[lib]
name = "brokk_bifrost"
crate-type = ["rlib", "cdylib"]

[dependencies]
bincode = "1.3.3"
chrono = { version = "0.4.44", default-features = false, features = ["clock", "std"] }
git2 = { version = "0.20.2", default-features = false }
glob = "0.3.3"
ignore = "0.4.24"
indicatif = "0.18.0"
lsp-server = "0.7"
lsp-types = "0.97"
moka = { version = "0.12.11", features = ["sync"] }
notify = "6.1.1"
once_cell = "1.21.3"
pyo3 = { version = "0.23.5", features = ["abi3-py312", "extension-module"], optional = true }
rayon = "1.10.0"
regex = "1.12.2"
rusqlite = { version = "0.32.1", features = ["bundled"] }
rustc-hash = "2"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
sha2 = "0.10.8"

# Tree-sitter policy:
# - keep one shared runtime version
# - pin each grammar crate to a known-compatible upstream release
# - grammar crate versions are intentionally not forced to match numerically,
#   because the upstream language crates are released independently
tree-sitter = "0.25.10"

# Grammars already on the current 0.25 line.
tree-sitter-go = "0.25.0"
tree-sitter-javascript = "0.25.0"
tree-sitter-python = "0.25.0"
tree-sitter-scala = "0.25.0"

# Grammars that still need older published releases for this port.
tree-sitter-c-sharp = "0.23.1"
tree-sitter-cpp = "0.23.4"
tree-sitter-java = "0.23.5"
tree-sitter-php = "0.23.11"
tree-sitter-rust = "0.24.0"
tree-sitter-typescript = "0.23.2"
walkdir = "2.5.0"
quick-xml = "0.40"
jaq-core = "3.0"
jaq-std = "3.0"
jaq-json = "2.0"
xee-xpath = "0.1.5"
xot = "0.31"

[features]
default = []
# Enables the pyo3-backed Python extension module (`bifrost_searchtools._native`).
# Maturin turns this on automatically via pyproject.toml; the `bifrost` CLI
# binary builds without it on every platform.
python = ["dep:pyo3"]

[dev-dependencies]
filetime = "0.2"
pretty_assertions = "1.4.1"
rusqlite = { version = "0.32.1", features = ["bundled"] }
tempfile = "3.23.0"
