[package]
name = "lspz"
version = "0.10.7"
edition = "2024"
license = "MIT"
repository = "https://github.com/straydragon/lspz"
description = "AI-friendly LSP compression proxy"
readme = "README.md"
keywords = ["lsp", "proxy", "compression", "ai", "agent"]
categories = ["development-tools"]
resolver = "2"

[features]
default = ["cli"]
cli = ["dep:clap", "dep:tracing-subscriber"]
mcp = ["dep:rmcp", "dep:anyhow"]
agent-sdk = ["mcp"]
transport-tcp = []
transport-websocket = ["dep:tokio-tungstenite", "dep:futures-util"]

[dependencies]
tokio = { version = "1.35", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
async-trait = "0.1"
thiserror = "2"
tracing = "0.1"
toml = "1"
notify = "8"

# CLI (optional)
clap = { version = "4", optional = true, features = ["derive", "env"] }
tracing-subscriber = { version = "0.3", optional = true, features = ["env-filter"] }
shell-words = "1.1"
dirs = "6"
tempfile = "3"

# MCP / Agent SDK (optional)
rmcp = { version = "1", optional = true, features = ["server", "transport-io"] }
anyhow = { version = "1.0", optional = true }

# WebSocket transport (optional)
tokio-tungstenite = { version = "0.26", optional = true, default-features = false, features = ["connect"] }
futures-util = { version = "0.3", optional = true, default-features = false, features = ["sink", "std"] }

[[bin]]
name = "lspz"
path = "src/main.rs"
required-features = ["cli"]

[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
tiktoken-rs = "0.11"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[[bench]]
name = "compression"
harness = false
path = "benches/compression.rs"
