[package]
name = "stygian-browser"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
documentation = "https://greysquirr3l.github.io/stygian"
readme = "README.md"
description = "Anti-detection browser automation library for Rust with CDP stealth features"
keywords = ["browser", "automation", "scraping", "anti-detection", "cdp"]
categories = ["web-programming", "development-tools"]

[features]
default = ["stealth"]
stealth = []
tls-config = ["stealth", "dep:rustls", "dep:webpki-roots", "dep:reqwest"]
full = ["stealth", "mcp", "metrics", "tls-config", "extract", "similarity", "browserbase"]
mcp = ["dep:base64"]
mcp-attach = ["mcp"]
metrics = ["dep:prometheus-client"]
extract = ["dep:stygian-extract-derive"]
similarity = []
browserbase = ["dep:reqwest"]

[dependencies]
# Browser automation
chromiumoxide = { workspace = true }

# Async runtime
tokio = { workspace = true, features = ["full"] }

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

# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }

# Unique IDs
ulid = { workspace = true }

# Concurrency
parking_lot = { workspace = true }

# Async utilities
futures = { workspace = true }

# Logging & tracing
tracing = { workspace = true }

# TLS configuration: build custom rustls ClientConfig from TLS profiles
rustls = { workspace = true, optional = true }
webpki-roots = { workspace = true, optional = true }

# HTTP client: build TLS-profiled reqwest clients
reqwest = { workspace = true, optional = true }

# Async trait support for ProxySource
async-trait = { workspace = true }

# MCP feature: base64 encoding for screenshot data
base64 = { workspace = true, optional = true }

# Metrics feature: Prometheus exporter
prometheus-client = { workspace = true, optional = true }

# Extract feature: proc-macro for #[derive(Extract)]
stygian-extract-derive = { path = "../stygian-extract-derive", version = "0.12.0", optional = true }

[dev-dependencies]
proptest = { workspace = true }
toml = { workspace = true }
tracing-subscriber = { workspace = true }
trybuild = "1"
stygian-extract-derive = { path = "../stygian-extract-derive", version = "0.12.0" }
