[package]
name = "mockforge-chaos"
version = "0.3.15"
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "Chaos engineering features for MockForge - fault injection and resilience testing"
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
publish = true  # Internal chaos testing component

[dependencies]
# Async runtime
tokio = { workspace = true }
futures = { workspace = true }
async-trait = "0.1"

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = "0.9"

# HTTP/web framework
axum = { workspace = true }
http = "1.0"
http-body-util = "0.1"

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

# Utilities
rand = { workspace = true }
chrono = { workspace = true }
tracing = { workspace = true }
uuid = { version = "1.0", features = ["v4", "serde"] }
once_cell = "1.19"
parking_lot = { workspace = true }

# Metrics (updated to 0.14+ to fix protobuf vulnerability RUSTSEC-2024-0437)
prometheus = { version = "0.14", features = ["process"] }

# Rate limiting
governor = "0.8"
nonzero_ext = "0.3"

# HTTP client for health checks
reqwest = { version = "0.12", features = ["json"] }

# Cryptography
sha2 = "0.10"

# State persistence
bincode = "1.3"

# Distributed state (Redis)
redis = { version = "0.25", features = ["tokio-comp", "connection-manager"], optional = true }

# Tracing
mockforge-tracing = { version = "0.3.15", path = "../mockforge-tracing" }

# Recorder
mockforge-recorder = { version = "0.3.15", path = "../mockforge-recorder" }

# Core (for MockAI integration)
mockforge-core = { version = "0.3.15", path = "../mockforge-core" }

# PDF generation
printpdf = "0.7"

# WebSocket support
tokio-tungstenite = "0.28"

[features]
default = []
distributed = ["redis"]

[dev-dependencies]
tokio = { version = "1.48", features = ["macros", "rt-multi-thread", "test-util"] }
tempfile = "3.8"
