axon-lang 4.5.1

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.
Documentation
//! v2.81.0 — the `axonstore` ROW SHAPE and pool sizing, driver-free.
//!
//! The fifth instance of the v2.81.0 smell was not one type but a CLUSTER, all
//! parked in `store/postgres_backend.rs` because it was the first module that
//! needed them:
//!
//!   * [`StoreError`](super::error::StoreError) — the error catalog (see
//! `store/error.rs`), including v2.67.0's `LeaseExpired` anchor breach.
//!   * [`StoreRow`] — JSON-safe column/value pairs. `store::epistemic`, which
//!     links no driver, is built on it.
//!   * [`MAX_POOL_CONNECTIONS`] — a number. Its own doc comment records that it
//!     was made `pub` so the registry would use THIS constant "rather than a copy
//!     of the number — a second copy of a fact is how the islands happened".
//!     Gating the driver would have forced that copy back into existence.
//!
//! **This module must never acquire a dependency.**

use serde_json::Value as JsonValue;

/// The legacy pool size — what EVERY `postgresql` axonstore got before v2.67.0,
/// with no environment variable, no config and no source-level knob.
///
/// It survives as the default for a store that names no `resource:` (the soft
/// migration: the live deployment runs on that form). `pub` since v2.67.0 so the
/// registry uses THIS constant rather than a copy of the number — a second copy
/// of a fact is how the islands happened.
pub const MAX_POOL_CONNECTIONS: u32 = 10;

/// A single retrieved row, as JSON-safe column → value pairs in column
/// order. Every value is `serde_json`-representable — UUID, TIMESTAMPTZ
/// and NUMERIC are pre-mapped to strings, so an adopter never has to
/// monkey-patch a JSON encoder (the kivi-reported Python pain).
#[derive(Debug, Clone, PartialEq)]
pub struct StoreRow {
    /// Column name → JSON value, in `SELECT` column order.
    pub columns: Vec<(String, JsonValue)>,
}

impl StoreRow {
    /// Look up a column's value by name.
    pub fn get(&self, column: &str) -> Option<&JsonValue> {
        self.columns
            .iter()
            .find(|(name, _)| name == column)
            .map(|(_, value)| value)
    }

    /// Render the row as a JSON object.
    pub fn to_json(&self) -> JsonValue {
        JsonValue::Object(self.columns.iter().cloned().collect())
    }
}