[package]
name = "daedra"
version = "0.3.2"
edition = "2024"
authors = ["DIRMACS Global Services <build@dirmacs.com>"]
description = "Self-contained web search MCP server. 9 backends with automatic fallback. Works from any IP."
license = "MIT"
repository = "https://github.com/dirmacs/daedra"
homepage = "https://dirmacs.github.io/daedra"
documentation = "https://docs.rs/daedra"
readme = "README.md"
keywords = ["mcp", "duckduckgo", "search", "ai", "cli"]
categories = ["command-line-utilities", "web-programming", "development-tools"]
rust-version = "1.91"

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

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

[dependencies]
# Async runtime
tokio = { version = "1.48.0", features = ["full", "rt-multi-thread", "macros", "sync", "time", "signal"] }

# HTTP client for web fetching
reqwest = { version = "0.12.24", features = ["json", "gzip", "brotli", "rustls-tls"], default-features = false }

# HTML parsing and content extraction
scraper = "0.24.0"
html5ever = "0.36.1"

# URL parsing
url = "2.5.7"
urlencoding = "2.1.3"

# Serialization
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"

# CLI
clap = { version = "4.5.53", features = ["derive", "env", "color"] }
colored = "3.0.0"

# Logging
tracing = "0.1.43"
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }

# Error handling
thiserror = "2.0.17"
anyhow = "1.0.100"

# Caching
moka = { version = "0.12.11", features = ["future"] }

# Concurrency
rayon = "1.11.0"
futures = "0.3.31"
async-trait = "0.1.89"

# Time utilities
chrono = { version = "0.4.42", features = ["serde"] }

# Regex for content processing
regex = "1.12.2"
lazy_static = "1.5.0"

# UUID for request IDs
uuid = { version = "1.19.0", features = ["v4", "serde"] }

# Markdown conversion
htmd = "0.5.0"

# Readability-based article extraction
dom_smoothie = "0.17"

# MIME sniffing and PDF text extraction
infer = "0.19"
pdf-extract = "0.10"

# HTTP server for SSE transport
axum = { version = "0.8.7", features = ["macros"] }
tower = "0.5.2"
tower-http = { version = "0.6.7", features = ["cors", "trace"] }

# Rate limiting
governor = "0.10.2"

# Retry logic
backoff = { version = "0.4.0", features = ["tokio"] }
html-escape = "0.2.13"

[dev-dependencies]
tokio-test = "0.4.4"
wiremock = "0.6.5"
tempfile = "3.23.0"
assert_cmd = "2.1.1"
predicates = "3.1.3"
criterion = { version = "0.8.0", features = ["async_tokio"] }

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

[features]
default = ["stdio", "sse"]
stdio = []
sse = []

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true

[profile.dev]
opt-level = 0
debug = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
