[package]
license = "Apache-2.0"
edition.workspace = true
name = "kigi-tools"
version.workspace = true
description = "Kigi tools library"

[dependencies]
anyhow = { workspace = true }
arc-swap = { workspace = true }
dirs = { workspace = true }
derive_more = { workspace = true, features = ["from", "try_into"] }
dunce = { workspace = true }
fs2 = { workspace = true }
educe = { workspace = true, features = ["Debug"] }
async-openai = { workspace = true }
kigi-tty-utils = { workspace = true }
kigi-config = { path = "../kigi-config" }
kigi-tools-api = { path = "../kigi-tools-api" }
kigi-workspace-types = { path = "../kigi-workspace-types" }
kigi-version = { workspace = true }
kigi-interjection-core = { workspace = true }
kigi-token-estimation = { workspace = true }
async-lsp = { workspace = true }
async-stream = { workspace = true }
async-trait = { workspace = true }
base64 = { workspace = true }
crc32fast = { workspace = true }
ignore = { workspace = true }
infer = { workspace = true }
globset = { workspace = true }
image = { workspace = true, features = ["png", "jpeg", "gif", "webp", "bmp", "tiff", "ico"] }
pdf_oxide = { workspace = true }
# PPTX text extraction (implementations/read_file/pptx.rs). Deliberately NOT
# `workspace = true`: the workspace `zip` pin has default features on, which
# drag aes/bzip2/lzma/zstd into the shipped pager binary. PPTX entries are
# only ever stored or deflated.
zip = { version = "3", default-features = false, features = ["deflate-flate2"] }
quick-xml = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
minijinja = { version = "2", features = ["custom_syntax"] }
parking_lot = { workspace = true }
htmd = { workspace = true }
scraper = { workspace = true }
reqwest = { workspace = true, features = ["rustls-tls", "json", "gzip", "brotli", "deflate"] }
pulldown-cmark = { workspace = true }
regex = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_path_to_error = { workspace = true }
kigi-tool-runtime = { workspace = true }
kigi-tool-types = { workspace = true }
kigi-tool-protocol = { workspace = true }
futures = { workspace = true }
similar = { workspace = true }
strum = { version = "0.26", features = ["derive"] }
strip-ansi-escapes = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = [
    "io-std",
    "process",
    "rt",
    "macros",
    "rt-multi-thread",
    "net",
    "sync",
] }
tokio-util = { workspace = true, features = ["compat"] }
tonic = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
uuid = { workspace = true, features = ["v7"] }
kigi-env = { workspace = true }
serde_yaml = { workspace = true }
shellexpand = "3.1"
tempfile = { workspace = true }
which = { workspace = true }

chrono = { workspace = true }
futures-util = { workspace = true }
kigi-sandbox = { path = "../kigi-sandbox", default-features = false }
kigi-file-utils = { path = "../kigi-file-utils" }

[target.'cfg(unix)'.dependencies]
command-fds = { version = "0.3", features = ["tokio"] }
nix = { workspace = true, features = ["signal", "process", "fs"] }

[target.'cfg(target_os = "linux")'.dependencies]
libc = { workspace = true }

# windows: util::spawn uses Win32 Job Objects (CreateJobObjectW,
# AssignProcessToJobObject, TerminateJobObject) and process creation flags
# (CREATE_NO_WINDOW, DETACHED_PROCESS, CREATE_NEW_PROCESS_GROUP).
[target.'cfg(windows)'.dependencies]
windows = { workspace = true }

[dev-dependencies]
dirs = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
wiremock = { workspace = true }
kigi-test-utils = { workspace = true }

[build-dependencies]
reqwest = { workspace = true, features = ["blocking", "rustls-tls"] }
flate2 = { workspace = true }
tar = { workspace = true }

[lints]
workspace = true

[features]
default-bazel = [
    "serde",
    ]
default = ["serde"]
serde = []
