[package]
name = "helexa-upstream"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[[bin]]
name = "helexa-upstream"
path = "src/main.rs"

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

[dependencies]
tokio = { workspace = true }
axum = { workspace = true }
tower-http = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
figment = { workspace = true }
anyhow = { workspace = true }
thiserror = { workspace = true }
clap = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
chrono = { workspace = true }

# PostgreSQL — the mesh authority's system of record. Runtime query API
# (not the compile-time `query!` macros) so the crate builds in CI without a
# live database or a committed `.sqlx` offline cache; correctness is covered
# by the gated integration tests. (Macro adoption is a later refinement once
# a dev DB + offline cache exist.)
sqlx = { version = "0.8", default-features = false, features = [
    "runtime-tokio",
    "tls-rustls",
    "postgres",
    "macros",
    "migrate",
    "chrono",
    "uuid",
] }
uuid = { version = "1", features = ["v4", "serde"] }
sha2 = "0.10"
subtle = "2.6"
# Web auth (B4): argon2id password hashing, JWT sessions, CSPRNG secrets,
# transactional email.
argon2 = "0.5"
jsonwebtoken = "9"
rand = "0.8"
lettre = { version = "0.11", default-features = false, features = [
    "tokio1-rustls-tls",
    "smtp-transport",
    "builder",
] }

# cortex-core for the shared #63 OpenAiError envelope on the authz surface.
cortex-core = { workspace = true }

[dev-dependencies]
figment = { workspace = true, features = ["test"] }
reqwest = { workspace = true }
