[package]
authors.workspace = true
description = "AI-powered configuration assistant backend and microservice for TypeDialog"
edition.workspace = true
license.workspace = true
name = "typedialog-ai"
repository.workspace = true
version.workspace = true

[dependencies]
# Internal
typedialog-core = { path = "../typedialog-core", features = ["ai_backend"] }

# Workspace dependencies (shared with other crates)
anyhow = { workspace = true }
async-trait = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
colored = { workspace = true }
dialoguer = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
surrealdb = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
uuid = { workspace = true }

# Web and HTTP dependencies (now aligned with workspace versions)
# Code migrated to support workspace versions:
# - axum: Upgraded from 0.7 to 0.8.8 (WebSocket Message::Text now uses Utf8Bytes)
# - reqwest: Using workspace 0.12 (streaming API compatible)
# - tower/tower-http: Aligned with axum 0.8.8
axum = { workspace = true, features = ["ws"] }
reqwest = { workspace = true, features = ["json", "stream"] }
tower = { workspace = true }
tower-http = { workspace = true, features = ["cors", "trace"] }

[features]
all-providers = ["openai", "anthropic", "ollama"]
anthropic = []
default = ["openai"]
ollama = []
openai = []

[lib]
name = "typedialog_ai"
path = "src/lib.rs"

[[bin]]
name = "typedialog-ai"
path = "src/main.rs"

  [package.metadata.binstall]
  bin-dir = "bin/{ bin }"
  pkg-fmt = "tgz"
  pkg-url = "{ repo }/releases/download/v{ version }/typedialog-{ target }.tar.gz"
