[package]
name = "koda-core"
version = "0.1.11"
edition = "2024"
description = "Core engine for the Koda AI coding agent"
license = "MIT"
repository = "https://github.com/lijunzh/koda"
authors = ["Lijun Zhu"]

[lib]
name = "koda_core"
path = "src/lib.rs"

[dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }

# Database
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite", "macros"] }

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

# Logging
tracing = "0.1"

# File system (respects .gitignore)
ignore = "0.4"

# Path normalization
path-clean = "1"

# Text search
regex = "1"

# File globbing
glob = "0.3"

# URL parsing (for SSRF protection)
url = "2"

# Unique IDs
uuid = { version = "1", features = ["v4"] }

# Base64 encoding (for image support)
base64 = "0.22"

# HTTP client (for LLM API)
reqwest = { version = "0.13", features = ["json", "stream"] }

# Streaming support
futures-util = "0.3"

# Error handling
anyhow = "1"

# First-party workspace libraries (direct calls)
koda-ast = { path = "../koda-ast", version = "0.1.11" }
koda-email = { path = "../koda-email", version = "0.1.11" }

# Async trait support
async-trait = "0.1"

# Cancellation tokens
tokio-util = { version = "0.7", features = ["rt"] }

[features]
test-support = []

[dev-dependencies]
tempfile = "3"
tokio = { version = "1", features = ["full", "test-util"] }
regex = "1"
ignore = "0.4"
anyhow = "1"
async-trait = "0.1"

# Integration tests that need mock infrastructure.
# Run with: cargo test -p koda-core --features test-support
[[test]]
name = "e2e_test"
required-features = ["test-support"]

[[test]]
name = "cancel_test"
required-features = ["test-support"]

[[test]]
name = "inference_recovery_test"
required-features = ["test-support"]

[[test]]
name = "session_test"
required-features = ["test-support"]
