axon-lang 1.21.1

AXON v1.5.1 — first crates.io publication of the AXON language full-stack runtime. Lexer/parser/type-checker/IR generator (re-exported from axon-frontend) plus the native Rust runtime: typed channels (TypedEventBus with QoS×5, π-calculus mobility, capability extrusion via shield D8 — Fase 13.f.2), Free Monad CPS handlers (Fase 2), lease kernel + reconcile loop (Fase 3+5), Epistemic Security Kernel (ESK Fase 6), Trust Types + ReplayLog (Fase 11.a+11.c), Stateful PEM over WebSocket (Fase 11.d), Ontological Tool Synthesis (Fase 11.e), Mobile Typed Channels (Fase 13). Crate publishes as `axon-lang` to mirror the Python PyPI package; library import remains `use axon::*` so existing call sites keep working unchanged.
Documentation
//! Persistent Epistemic Modeling (PEM) — §λ-L-E Fase 11.d.
//!
//! When a WebSocket connection drops mid-conversation, the agent's
//! cognitive state (density matrix, belief state, short-term
//! memory) must survive the disconnect so a reconnecting client
//! picks up the exact same probabilistic thread. Without this, a
//! tab refresh forces the agent to restart from scratch — which is
//! both a UX cliff and, for long sessions, a hallucination risk
//! (the re-primed agent may re-derive answers inconsistent with
//! what the human saw 30 seconds earlier).
//!
//! This module provides the primitives. The persistence backend
//! itself is pluggable: [`backend::InMemoryBackend`] for dev/tests,
//! and a Postgres + envelope-encrypted backend in
//! `axon_enterprise::cognitive_states` for production.
//!
//! Composition notes
//! =================
//!
//! - 11.a `Stream<T>` / `Trusted<T>` — state snapshots carry
//!   already-trusted user inputs, so the checker's refinement
//!   tracking continues to hold across reconnects.
//! - 11.b `ZeroCopyBuffer` — short-term memory stores symbolic
//!   pointers to audio/video buffers rather than embedding bytes
//!   into the state snapshot.
//! - 11.c `ReplayToken` — every state rehydration emits a
//!   `pem:state_restored` audit event that anchors to the tenant's
//!   audit chain.

pub mod backend;
pub mod continuity_token;
pub mod state;

pub use self::backend::{
    InMemoryBackend, PersistenceBackend, PersistenceError,
};
pub use self::continuity_token::{
    ContinuityToken, ContinuityTokenError, ContinuityTokenSigner,
};
pub use self::state::{
    CognitiveState, FixedPoint, MemoryEntry, Q32_32_SCALE,
};