[package]
name = "kodex"
version = "0.6.2"
edition = "2021"
description = "AI knowledge graph with persistent memory across sessions"
license = "MIT"
repository = "https://github.com/physwkim/kodex"
homepage = "https://github.com/physwkim/kodex"
documentation = "https://github.com/physwkim/kodex"

[[bin]]
name = "kodex"
path = "src/main.rs"

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
regex = "1"
sha2 = "0.10"
thiserror = "2"
anyhow = "1"
petgraph = "0.6"
clap = { version = "4", features = ["derive"] }
walkdir = "2"
dirs = "6"
globset = "0.4"
uuid = { version = "1", features = ["v4"] }
rusqlite = { version = "0.34", features = ["bundled"] }
nucleo-matcher = "0.3"

# Optional dependencies
tree-sitter = { version = "0.24", optional = true }
tree-sitter-python = { version = "0.23", optional = true }
tree-sitter-javascript = { version = "0.23", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-go = { version = "0.23", optional = true }
tree-sitter-rust = { version = "0.23", optional = true }
tree-sitter-java = { version = "0.23", optional = true }
tree-sitter-c = { version = "0.23", optional = true }
tree-sitter-cpp = { version = "0.23", optional = true }
tree-sitter-ruby = { version = "0.23", optional = true }
tree-sitter-c-sharp = { version = "0.23", optional = true }
# tree-sitter-kotlin uses tree-sitter 0.20 (ABI mismatch with 0.24)
# tree-sitter-kotlin = { version = "0.3", optional = true }
tree-sitter-scala = { version = "0.23", optional = true }
tree-sitter-php = { version = "0.23", optional = true }
tree-sitter-swift = { version = "0.7", optional = true }
tree-sitter-lua = { version = "0.5", optional = true }

rayon = { version = "1", optional = true }
reqwest = { version = "0.12", features = ["blocking"], optional = true }
notify = { version = "7", optional = true }
tokio = { version = "1", features = ["full"], optional = true }
plotters = { version = "0.3", optional = true }
whisper-rs = { version = "0.16", optional = true }
hound = { version = "3", optional = true }

[dev-dependencies]
tempfile = "3"
insta = "1"

[features]
default = ["extract", "all-languages"]
extract = ["tree-sitter"]
lang-python = ["extract", "tree-sitter-python"]
lang-javascript = ["extract", "tree-sitter-javascript"]
lang-typescript = ["extract", "tree-sitter-typescript"]
lang-go = ["extract", "tree-sitter-go"]
lang-rust = ["extract", "tree-sitter-rust"]
lang-java = ["extract", "tree-sitter-java"]
lang-c = ["extract", "tree-sitter-c"]
lang-cpp = ["extract", "tree-sitter-cpp"]
lang-ruby = ["extract", "tree-sitter-ruby"]
lang-csharp = ["extract", "tree-sitter-c-sharp"]
# lang-kotlin disabled: tree-sitter-kotlin uses tree-sitter 0.20 ABI
# lang-kotlin = ["extract", "tree-sitter-kotlin"]
lang-scala = ["extract", "tree-sitter-scala"]
lang-php = ["extract", "tree-sitter-php"]
lang-swift = ["extract", "tree-sitter-swift"]
lang-lua = ["extract", "tree-sitter-lua"]
all-languages = [
    "lang-python", "lang-javascript", "lang-typescript",
    "lang-go", "lang-rust", "lang-java", "lang-c", "lang-cpp",
    "lang-ruby", "lang-csharp", "lang-scala",
    "lang-php", "lang-swift", "lang-lua",
]
fetch = ["reqwest"]
watch = ["notify"]
mcp = ["tokio"]
svg = ["plotters"]
parallel = ["rayon"]
video = ["whisper-rs", "hound"]
all = ["all-languages", "fetch", "watch", "mcp", "svg", "parallel"]
