[package]
name = "mockforge-cli"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "CLI interface for MockForge"
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true

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

[dependencies]
clap = { version = "4", features = ["derive", "std", "env"] }
clap_complete = "4"
anyhow = "1.0"
tokio = { workspace = true, features = ["signal"] }
tokio-util = "0.7"
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-opentelemetry = "0.22"
mockforge-core = { version = "0.3.70", path = "../mockforge-core", features = ["schema"] }
mockforge-http = { version = "0.3.70", path = "../mockforge-http", optional = true }
mockforge-ws = { version = "0.3.70", path = "../mockforge-ws", optional = true }
mockforge-grpc = { version = "0.3.70", path = "../mockforge-grpc", optional = true }
mockforge-graphql = { version = "0.3.70", path = "../mockforge-graphql", optional = true }
mockforge-smtp = { version = "0.3.70", path = "../mockforge-smtp", optional = true }
mockforge-mqtt = { version = "0.3.70", path = "../mockforge-mqtt", optional = true }
mockforge-data = { version = "0.3.70", path = "../mockforge-data" }
mockforge-ui = { version = "0.3.70", path = "../mockforge-ui", optional = true }
mockforge-observability = { version = "0.3.70", path = "../mockforge-observability" }
mockforge-tracing = { version = "0.3.70", path = "../mockforge-tracing", optional = true }
mockforge-recorder = { version = "0.3.70", path = "../mockforge-recorder", optional = true }
mockforge-federation = { version = "0.3.70", path = "../mockforge-federation", optional = true }
mockforge-bench = { version = "0.3.70", path = "../mockforge-bench", optional = true }
mockforge-ftp = { version = "0.3.70", path = "../mockforge-ftp", optional = true }
mockforge-kafka = { version = "0.3.70", path = "../mockforge-kafka", optional = true }
mockforge-amqp = { version = "0.3.70", path = "../mockforge-amqp", optional = true }
mockforge-tcp = { version = "0.3.70", path = "../mockforge-tcp", optional = true }
mockforge-tunnel = { version = "0.3.70", path = "../mockforge-tunnel", optional = true }
mockforge-tui = { version = "0.3.70", path = "../mockforge-tui", optional = true }
mockforge-vbr = { version = "0.3.70", path = "../mockforge-vbr", optional = true }
mockforge-plugin-core = { version = "0.3.70", path = "../mockforge-plugin-core" }
mockforge-plugin-loader = { version = "0.3.70", path = "../mockforge-plugin-loader" }
mockforge-scenarios = { version = "0.3.70", path = "../mockforge-scenarios", features = ["studio-packs"], optional = true }
mockforge-chaos = { version = "0.3.70", path = "../mockforge-chaos", optional = true }
schemars = { version = "0.8", features = ["derive"] }
jsonschema = { workspace = true }
mockforge-pipelines = { version = "0.3.70", path = "../mockforge-pipelines", optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = "0.9"
url = { workspace = true }
regex = "1.10"
base64 = { workspace = true }
axum = { workspace = true }
hyper = { workspace = true }
reqwest = { workspace = true, features = ["multipart"] }
tempfile = "3.8"
rumqttc = { version = "0.25", optional = true }
hex = { workspace = true }
zip = "2.2"
ring = "0.17"
urlencoding = "2.1"
colored = "2.2"
indicatif = "0.17"
console = "0.15"
dialoguer = "0.11"
dirs = "5.0"
chrono = { version = "0.4", features = ["serde"] }
uuid = { workspace = true }
openapiv3 = "2.0"
async-trait = "0.1"
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "chrono", "uuid"] }
lapin = { version = "2.3", optional = true }
rdkafka = { version = "0.38", optional = true }
futures-lite = { version = "2.0", optional = true }
# Speech-to-text dependencies
vosk = { version = "0.3", optional = true }
cpal = { version = "0.15", optional = true }
hound = { version = "3.5", optional = true }

[features]
default = ["http", "admin", "bench", "chaos", "recorder", "scenarios", "tracing", "federation", "tunnel", "vbr"]
full = ["default", "all-protocols", "pipelines", "tui", "stt-all", "studio-packs"]
all-protocols = ["http", "mqtt", "ws", "grpc", "graphql", "ftp", "amqp", "kafka", "smtp", "tcp"]
# Feature-gated CLI subsystems
admin = ["dep:mockforge-ui"]
bench = ["dep:mockforge-bench"]
chaos = ["dep:mockforge-chaos"]
recorder = ["dep:mockforge-recorder"]
scenarios = ["dep:mockforge-scenarios"]
tracing = ["dep:mockforge-tracing"]
federation = ["dep:mockforge-federation"]
tunnel = ["dep:mockforge-tunnel"]
vbr = ["dep:mockforge-vbr"]
# Speech-to-text features
stt-cloud = []  # Cloud API backends (OpenAI Whisper, Google Speech-to-Text)
stt-vosk = ["vosk", "cpal", "hound"]  # Offline STT using vosk-rs
stt-all = ["stt-cloud", "stt-vosk"]
# Studio packs feature (requires mockforge-scenarios with studio-packs feature)
studio-packs = ["mockforge-scenarios/studio-packs"]
http = ["mockforge-http", "mockforge-http/conformance"]
mqtt = ["mockforge-mqtt", "mockforge-http/mqtt", "rumqttc"]
ws = ["mockforge-ws"]
grpc = ["mockforge-grpc"]
graphql = ["mockforge-graphql"]
ftp = ["mockforge-ftp"]
kafka = ["mockforge-kafka", "rdkafka"]
amqp = ["mockforge-amqp", "lapin", "futures-lite"]
smtp = ["mockforge-smtp", "mockforge-http/smtp"]
tcp = ["mockforge-tcp"]
pipelines = ["dep:mockforge-pipelines"]
tui = ["dep:mockforge-tui"]
vue = []

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
tempfile = "3.8"
