[package]
name = "axon-lang"
version = "2.32.0"
authors = ["AXON Project", "Bemarking AI S.A.S."]
edition = "2021"
rust-version = "1.95"
license = "AGPL-3.0-or-later"
repository = "https://github.com/Bemarking/axon-lang"
readme = "../README.md"
keywords = ["axon", "compiler", "runtime", "ai", "language"]
categories = ["compilers", "development-tools::ffi", "asynchronous"]
description = "AXON — the formal cognitive language: a deterministic, proof-carrying AI runtime. Native Rust lexer/parser/type-checker/IR generator (re-exported from axon-frontend) plus the runtime: typed channels (π-calculus mobility, capability extrusion), algebraic effects via Free Monad CPS handlers, lease kernel + reconcile loop, the Epistemic Security Kernel, Trust Types, Proof-Carrying Code (independently verifiable proof objects), and the closed-catalog extension mechanism. Crate publishes as `axon-lang`; library import is `use axon::*` so existing call sites keep working unchanged."

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

[[bin]]
name = "axon"
path = "src/main.rs"

[dependencies]
# §Fase 12.a — compiler frontend (lexer/parser/AST/type_checker/IR/checker +
# closed catalogs for Fase 11.a/11.c/11.e) lives in its own crate with
# zero runtime deps so tooling (axon-lsp, analyzers) can consume it
# without dragging tokio/axum/sqlx/aws. Path is used for in-tree builds;
# `version` makes the dep cargo-publishable (crates.io requires non-path
# deps to carry a version specifier).
axon-frontend = { path = "../axon-frontend", version = "=1.25.0" }
clap = { version = "4.5", features = ["derive", "env"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls", "stream"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
# §Fase 41.d — the `ws` feature exposes `axum::extract::ws::{WebSocketUpgrade,
# WebSocket, Message}`, the server-side half of RFC 6455 (handshake + frame
# loop) over `tokio-tungstenite`. This is the carrier for the session-typed
# dialogue runtime — its operational rules (send/recv/select/branch/credit)
# live in `src/session_runtime/` over the typed channel, transport-agnostic.
axum = { version = "0.8", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors"] }
http-body-util = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json", "fmt", "env-filter"] }
tracing-appender = "0.2"
uuid = { version = "1", features = ["v4"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "tls-rustls", "postgres", "json", "chrono", "migrate", "uuid", "bigdecimal"] }
chrono = { version = "0.4", features = ["serde"] }
# §Fase 71.b — IANA timezone database for the `window` temporal guard. The
# frontend format-checks a tz name (zero-dependency); the runtime does the
# authoritative IANA resolution + DST-correct local-time math here.
chrono-tz = "0.10"
base64 = "0.22"
aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-sdk-secretsmanager = "1"
# §λ-L-E Fase 5 — cognitive immune system needs SHA-256 + HMAC for signed traces.
sha2 = "0.10"
hmac = "0.12"
rand = "0.9"
# §ESK Fase 6.6 — deterministic ZIP bundle for the audit evidence packager.
zip = { version = "2", default-features = false, features = ["deflate"] }
# §Fase 10.e — JWT signature verification + JWKS client for the Rust
# tenant extractor. Closes the pre-10.e gap where `tenant.rs` extracted
# `tenant_id` from the JWT payload without checking the signature.
jsonwebtoken = "9"
# §Fase 11.a — Temporal Algebraic Effects + Trust Types.
# Ed25519 is the fourth member of the CLOSED trust catalog (alongside
# HMAC-SHA256, JWT signature, OAuth2 PKCE S256 code exchange). Any
# addition to the catalog requires a compiler PR + security review;
# writing your own `verify_signature` is rejected at compile time.
ed25519-dalek = { version = "2", features = ["rand_core"] }
subtle = "2"
urlencoding = "2"
# §Fase 11.c — ReplayLog trait needs async for the enterprise-adapter
# shape (Postgres writes) even though the in-memory impl is sync.
async-trait = "0.1"
# §Fase 24.b — Native Rust backends shared infra.
# `regex`: compile-time `LOCKED_PARAMETER_MODELS` patterns (port of
#   v1.16.2 — Kimi K2.x / OpenAI o1 / OpenAI o3 dispatch).
# `futures`: `Stream` trait + `StreamExt` for the streaming response
#   surface (`Backend::stream() -> Pin<Box<dyn Stream<...>>>`).
# `axon-csys`: §Fase 25.g — offline BPE tokenizer for OpenAI / Kimi /
#   GLM model families. Replaces the prior tiktoken-rs dep; the C23
#   merge engine + #embed-baked merges tables ship inside axon-csys.
#   Anthropic uses an HTTP-API tokenizer when needed; Gemini falls
#   back to HTTP `count_tokens` with an offline estimate cache for
#   the synchronous path.
regex = "1"
futures = "0.3"
# §Fase 33.d — Native backend streaming consumes reqwest's bytes_stream(),
# which surfaces `bytes::Bytes`. The crate is re-exported by reqwest but
# only via the `stream` feature; pinning a direct dep keeps the surface
# stable across reqwest minor bumps.
bytes = "1"
axon-csys = { path = "../axon-csys", version = "=0.2.0" }

[dev-dependencies]
# §Fase 41.d — client-side WebSocket for the session-typed runtime's E2E
# tests. `tokio-tungstenite` is the same library axum's `ws` feature pulls in
# server-side, so both peers share the RFC 6455 implementation exactly. Pinned
# to the version axum 0.8 carries transitively to keep one common WS dep.
# `rustls-tls-webpki-roots` would unlock `wss://`; the in-process tests use
# plain TCP so the default features are sufficient.
tokio-tungstenite = "0.24"
