[package]
name = "provisioning-rag"
version.workspace = true
edition.workspace = true
authors.workspace = true
description = "RAG system for provisioning platform with Rig framework and SurrealDB"

[dependencies]
# ============================================================================
# WORKSPACE DEPENDENCIES - Core async runtime and traits
# ============================================================================
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "process", "io-util", "time", "fs"] }
futures = { workspace = true }
async-trait = { workspace = true }

# Serialization and data handling
serde = { workspace = true }
serde_json = { workspace = true }
toml = { workspace = true }
chrono = { workspace = true }
uuid = { workspace = true }

# Error handling
anyhow = { workspace = true }
thiserror = { workspace = true }

# Logging framework
tracing = { workspace = true }

# HTTP client for OpenAI API
reqwest = { workspace = true }

# ============================================================================
# REST API Framework (Phase 8)
# ============================================================================
axum = { workspace = true }
tower = { workspace = true}
tower-http = { workspace = true, features = ["cors", "trace"] }
hyper = { workspace = true, features = ["full"] }
http = "1"

# Database
surrealdb = { workspace = true }

# RAG Framework
rig-core = { workspace = true }
rig-surrealdb = { workspace = true }

# Filesystem and path operations
walkdir = { workspace = true }
dirs = { workspace = true }

# Configuration
config = { workspace = true }

# Platform configuration management
platform-config = { path = "../platform-config" }

# Regex for document parsing
regex = { workspace = true }

# Tokenization for chunking
tokenizers = { workspace = true }

# Caching support (Phase 7)
lru =  { workspace = true }
sha2 = { workspace = true }

# Metrics and monitoring (Phase 7)
parking_lot = { workspace = true }

# ============================================================================
# CLI AND TESTING
# ============================================================================
clap = { workspace = true, features = ["derive", "env"] }
tracing-subscriber = { workspace = true }

[dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
assert_matches = { workspace = true }
criterion = { workspace = true, features = ["html_reports", "async_tokio"] }

[[bench]]
name = "phase8_benchmarks"
harness = false

# Library target
[lib]
name = "provisioning_rag"
path = "src/lib.rs"

# Binary target (optional CLI tool)
[[bin]]
name = "provisioning-rag"
path = "src/main.rs"
required-features = ["cli"]

# Features
[features]
default = []
cli = []
