axon-lang 1.38.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
//! Deterministic replay tokens — §λ-L-E Fase 11.c.
//!
//! A [`ReplayToken`] is a compact receipt emitted at every effect
//! invocation (`call_tool`, `llm_infer`, `db_read`, `http_post`,
//! `ws_send`). It carries the minimum information needed to re-run
//! that effect and confirm the output is bit-identical: effect name,
//! canonical-JSON hash of inputs, canonical-JSON hash of outputs,
//! model version, sampling parameters (temperature, top_p, seed),
//! timestamp, and a 128-bit nonce.
//!
//! Regulated verticals (banking, fintech, legaltech, medicaltech)
//! use the token stream as an independently verifiable replay log —
//! an auditor loads the tokens, re-runs each effect under the
//! original model + parameters, and confirms the outputs match. If
//! they diverge, the divergence point is the exact token where the
//! system behaved differently.
//!
//! The on-the-wire format is canonical JSON with the Record
//! Separator (`\x1e`) separator so the hash computation is
//! byte-identical to the 10.g audit chain. Keeping the canonicaliser
//! in lockstep with enterprise audit means tokens emitted here can
//! be anchored to the enterprise hash chain with zero reformatting.
//!
//! This module hosts:
//!
//! - [`token`] — the canonical struct + hash derivation.
//! - [`log`] — the [`ReplayLog`] trait + two impls (in-memory,
//!   enterprise-audit-chain adapter shape).
//! - [`executor`] — [`ReplayExecutor`] that re-runs from a token and
//!   reports divergence.

pub mod executor;
pub mod log;
pub mod token;

pub use self::executor::{
    ReplayDivergence, ReplayExecutor, ReplayExecutorError, ReplayOutcome,
};
pub use self::log::{InMemoryReplayLog, ReplayLog, ReplayLogError};
pub use self::token::{
    canonical_hash, ReplayToken, ReplayTokenBuilder, SamplingParams,
};