[package]
name = "kei-buddy"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
description = "KeiBuddy personal-assistant Telegram bot — onboarding state-machine + skeleton driver. Concept-level scaffold."
authors.workspace = true
license.workspace = true

[[bin]]
name = "kei-buddy"
path = "src/bin/kei-buddy.rs"

[[bin]]
name = "kei-buddy-tick"
path = "src/bin/kei-buddy-tick.rs"

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

[dependencies]
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "net"] }
tracing = "0.1"
clap = { workspace = true, features = ["derive"] }
async-trait = { workspace = true }
rusqlite = { workspace = true }
reqwest = { workspace = true }
anyhow = { workspace = true }
kei-memory-sqlite = { path = "../kei-memory-sqlite" }
kei-chat-store = { path = "../kei-chat-store" }
kei-social-store = { path = "../kei-social-store" }
kei-sage = { path = "../kei-sage" }
kei-contacts-google = { path = "../kei-contacts-google" }
kei-contacts-apple = { path = "../kei-contacts-apple" }
chrono = { workspace = true }

# provision-crypto: x25519 ECDH + HKDF-SHA256 + XChaCha20-Poly1305
# Mirrors marketplace/src/lib/crypto-box.ts so VPS can decrypt the
# bot-token blob emitted by the browser.
x25519-dalek = { version = "2", features = ["static_secrets", "zeroize"] }
chacha20poly1305 = { version = "0.10", features = ["alloc"] }
hkdf = "0.12"
sha2 = "0.10"
base64 = "0.22"
rand_core = "0.6"
zeroize = "1"

# serve feature deps
axum = { version = "0.7", features = ["json", "http1", "tokio"], optional = true }
kei-telegram-webhook = { path = "../kei-telegram-webhook", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
kei-stt = { path = "../kei-stt", default-features = false, features = ["whisper-local"], optional = true }

[dev-dependencies]
wiremock = { workspace = true }
tokio = { workspace = true }

[features]
default = ["serve"]
# HTTP server — axum router + webhook handler + Telegram send_message.
serve = ["axum", "kei-telegram-webhook", "tracing-subscriber", "kei-stt"]
# Enables OpenAiExtractor — real HTTP to LiteLLM proxy using reqwest.
# Off by default; tests use MockExtractor which has no extra deps.
extractor-openai = []
# future: pulls in kei-notify-telegram for real Telegram transport
telegram = []

[package.metadata.keisei]
maturity = "concept"
description = "KeiBuddy personal-assistant: onboarding FSM + bot driver scaffold"
authors = ["Denis Parfionovich <parfionovich@keilab.io>"]
