[package]
name = "kebab-cli"
version       = { workspace = true }
edition       = { workspace = true }
rust-version  = { workspace = true }
license       = { workspace = true }
repository    = { workspace = true }
description   = "kb command-line interface"

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

[dependencies]
kebab-core = { path = "../kebab-core" }
kebab-config = { path = "../kebab-config" }
kebab-app = { path = "../kebab-app" }
# kb-eval re-exports `compute_aggregate` / `compare_runs` /
# `render_report_md` (P5-2). The DoD calls for these to be reached
# "via kb-app", but kb-eval already depends on kb-app (P5-1 runner
# uses the App facade) — routing the CLI through kb-app would
# require kb-app → kb-eval, forming a cycle. We therefore wire
# kb-cli → kb-eval directly; documented in
# `tasks/p5/p5-2-metrics-compare.md`.
kebab-eval = { path = "../kebab-eval" }
# P9-1: Ratatui shell. UI consumes `kebab-app` only — `kebab-tui`
# enforces the §8 boundary in its own Cargo.toml; kb-cli just
# launches it.
kebab-tui    = { path = "../kebab-tui" }
# p9-fb-30: MCP stdio server. `Cmd::Mcp` delegates entirely to this crate.
kebab-mcp    = { path = "../kebab-mcp" }
anyhow       = { workspace = true }
serde        = { workspace = true }
serde_json   = { workspace = true }
clap         = { version = "4", features = ["derive", "env"] }
# p9-fb-02: ingest progress UI.
# - TTY 사람 모드: indicatif spinner + bar (stderr).
# - --json 모드 / non-TTY: indicatif 끄고 raw line emit.
# - timestamp formatting (RFC 3339) 은 time crate.
indicatif    = "0.17"
time         = { workspace = true }
# p9-fb-04: SIGINT handler for `kebab ingest` cooperative cancel.
# `ctrlc` registers a single cross-platform handler; we count signal
# arrivals to implement spec §10's "second Ctrl-C is a hard exit".
ctrlc        = "3"

[dev-dependencies]
tempfile     = { workspace = true }
# p9-fb-32: backdate `documents.updated_at` in CLI integration tests
# to simulate stale docs. `time` is the formatter used by the helper.
rusqlite     = { workspace = true }
time         = { workspace = true }

[features]
# opt-in (macOS): build the `kebab` binary with candle on the Apple Silicon GPU.
#   cargo build --release --features embed_metal
embed_metal = ["kebab-app/embed_metal"]

[lints]
workspace = true
