Skip to main content

Crate axon

Crate axon 

Source
Expand description

AXON runtime library — exposes the full AXON runtime: compiler frontend (re-exported from axon-frontend), handlers, runtime primitives, ESK, HTTP/WebSocket servers, persistence, OTS pipelines.

Used by the axon binary and by integration tests.

§Frontend vs runtime

v1.4.2 — the compiler frontend (lexer, parser, AST, type checker, IR generator, top-level checker, and the closed catalogs used by the type checker) lives in the sibling crate axon-frontend, which has zero runtime dependencies. This crate re-exports those modules transparently so every existing caller (76 call sites across 26 files) keeps compiling without changes. The crate axon-lsp consumes axon-frontend directly, skipping the runtime surface.

Modules§

advantage_witness
v2.23.0 — the Advantage Witness: a transversal law (axon://logic/no_unwitnessed_advantage). A primitive may not claim an advantage over a cheaper baseline without a machine-checkable witness on real data; the AdvantageWitness trait + closed metric catalog + verdict. v2.23.0 — The Advantage Witness: a transversal Axon law.
agora_refresh
v2.77.0 — the agora OAuth token-refresh orchestration (the OSS core the enterprise v2.4.0 daemon drives): enumerate → decide → exchange → atomically persist, closing the rotating-refresh-token trap. Clock injected; the vault is the SecretCustody port. v2.77.0 — the agora token-refresh orchestration.
agora_runtime
v2.77.0 — axon-agora governed social connectors (agora_linkedin / agora_facebook / agora_instagram / agora_tiktok): the first official library of axon-lang. Per-platform pluggable SocialConnector cores; every result born Untrusted. OSS default = typed refusal (no fabrication). v2.77.0 — axon-agora governed social connectors: the OSS dispatch arm for the agora_* tool providers, and the per-platform SocialConnector injection seam (the crate::scrape_tool::register_scrape_fetcher / crate::enrichment::register_provider shape).
anchor_checker
Anchor runtime checkers — validate LLM output against AXON anchor constraints.
api_keys
API Key Management — multi-tenant key registry for AxonServer.
ast
AXON AST node definitions — direct port of axon/compiler/ast_nodes.py.
audit_cli
CLI handlers for the ESK audit commands (dossier, sbom, audit, evidence-package). AXON CLI — ESK audit commands (v1.3.0 CLI parity).
audit_trail
Audit Trail — append-only log of administrative operations on AxonServer.
auth_middleware
Auth Middleware — role-based authentication gate for AxonServer.
auth_scope
v1.23.0 — Auth scope (capability subset matching) for first-class axonendpoint routes.
axonendpoint_replay
v1.23.0 — Replay-token binding for first-class axonendpoint routes.
backend
AXON Backend — Multi-provider LLM API clients.
backend_error
Backend Error Classification — structured error types for LLM API calls.
backend_resolution
v1.31.0 — the Backend Resolution Contract (D1): the pure, deterministic precedence ladder that resolves a flow’s execution backend (request → axonendpoint backend: → server default → environment-available auto → honest failure). v1.31.0 — the Backend Resolution Contract (D1).
backends
v1.18.0 — Native Rust LLM backends. Per-provider async clients behind a Backend trait + Registry. Per-provider modules (anthropic.rs / openai.rs / gemini.rs / kimi.rs / glm.rs / ollama.rs / openrouter.rs) land in 24.c–24.i; this module ships the shared infra (trait + types + error + retry + observability + locked_model
buffer
Zero-copy multimodal buffers — v1.4.0.
cache_runtime
v2.40.0 — the result-memoization cache core.
cancel_token
v1.24.0 — Cancellation primitives (D6 cancel-safety).
channel_semaphore
v2.69.0 — capacity becomes a real bound: a concurrency semaphore per channel.
checker
axon check native implementation.
circuit_breaker
Circuit Breaker — per-provider failure protection for LLM API calls.
cli_fmt
v2.0.0 — axon fmt subcommand (Rust binary parity).
cli_parse
v2.0.0 — axon parse subcommand (Rust binary parity).
cognitive_io_supervisor
v2.67.0 — the Cognitive-I/O supervisor: the loop that instantiates the declared λ-L-E dataflow graph (observe → {ensemble, immune} → {reflex, heal}, plus reconcile) and drives it. The language was complete and the kernels took the IR directly; nobody had ever built the loop. v2.67.0 — the Cognitive-I/O Supervisor: the loop that was never built.
compilation_cache
v2.76.0 — the EMS compilation cache: content-addressed, with GHC-style early cutoff. Nix model: a compile is a pure function of its inputs, so matching inputs ⇒ the recorded outcome is the outcome.
compiler
axon compile native implementation.
config_persistence
Config Persistence — save and restore AxonServer runtime configuration.
conversation
Conversation history — multi-turn message accumulation between steps.
cors
CORS Middleware — Cross-Origin Resource Sharing configuration for AxonServer.
cost_estimator
Execution Cost Estimator — estimate token usage and USD cost before running a flow.
credential_minter
v2.46.0 — the CredentialMinter port behind the mint flow verb (attenuated, TTL-bounded ephemeral credentials; fail-closed when absent). v2.46.0 — the CredentialMinter port: the runtime seam behind the mint <Credential> as <binding> flow verb (v2.46.0).
daemon
v2.4.0 — the single-node daemon runtime: cron scheduling + the handler-body executor.
dataspace_engine
v2.63.0 — the deterministic columnar engine behind dataspace (immutable record batches, validity bitmaps, zone maps, provenance). v2.63.0 — the deterministic columnar engine behind dataspace.
delivery
v2.60.0 — Governed CRM Delivery (deliver): the egress-dual of acquisition. Canonical, idempotent CRM operations delivered via a pluggable enterprise transducer; each field carries its epistemic provenance or the author vouched (T920). OSS default = typed refusal (no fabricated receipt). v2.60.0 — Governed CRM Delivery runtime: the OSS contract + the DeliveryProvider seam (the enterprise-engine injection point) + the provenance-carrying discipline + the idempotency law.
deployer
axon deploy — hot-deploy .axon source to a running AxonServer.
effects
v1.17.0 — Algebraic effects runtime. FSM dispatch loop + handler stack + Free-Monad interpretation of CPS-lowered IR (consumes the JSON IR emitted by the Python frontend in 23.b/c/d). AXON Algebraic Effects Runtime — v1.17.0
emcp
ℰMCP Transducer — Epistemic Model Context Protocol runtime bridge.
ems
v2.76.0 — the EMS driver: the one orchestration of Phases 0–4.
enrichment
v2.58.0 — Governed Contact Enrichment (scrape_enrich): structured contact lookup via a pluggable enterprise provider; results born Inferred (≤ believe-ceiling) + Untrusted. OSS default = typed refusal (no fabrication). v2.58.0 — Governed Contact Enrichment runtime: the OSS contract + the scrape_enrich provider dispatch, the enterprise-engine injection seam , and the born-Inferred epistemic discipline.
env_flags
v2.81.0 — cross-stack environment-flag parsing, dependency-free.
epistemic
AXON Epistemic Lattice — type subsumption, join, meet, uncertainty propagation.
epistemic_capture
v2.7.0 — capture the epistemic envelope from a tool’s effect row.
epistemic_compat
v2.76.0 — Phase 2 of the Epistemic Module System: the Epistemic Compatibility Check (ECC) — the novel contribution of the EMS paper.
esk
v1.2.0 — Epistemic Security Kernel. Port of axon/runtime/esk/. AXON Runtime — Epistemic Security Kernel (v1.2.0).
event_bus
Event Bus + Daemon Supervisor — reactive infrastructure for AxonServer.
event_outbox
v2.31.0 — the durable event outbox (the append-only log + processed cursor that makes emit survive the consumer being down). v2.31.0 — the durable event outbox.
exec_context
Execution context — runtime variables accessible between steps.
execution_result
v2.81.0 — the flow-execution RESULT, in a module that reaches nothing.
extraction
v2.54.0 — the Inferred-extraction contract: the ExtractionEngine trait, the born-Inferred span with measured confidence, and the confidence-floor quarantine gate. The producers v2.54.0 left the class without. v2.54.0 — the Inferred-extraction contract.
flow_dispatcher
v1.24.0 — Per-IRFlowNode async dispatcher skeleton. Closed- catalog, compiler-enforced exhaustive match over the 45-variant IRFlowNode enum. Subsequent steps 33.y.c–j replace the transitional legacy shim with real per-variant async handlers. 33.y.l retires the shim + the LegacyShimHandled outcome variant once every IR variant has its real handler. v1.24.0 — Per-IRFlowNode async dispatcher skeleton.
flow_execution_event
v1.24.0 — Flow execution event stream (Layer 1: data-flow integrity).
flow_inspect
Flow Inspector — runtime introspection for deployed AXON flows.
flow_plan
v1.24.0 — Streaming-shaped execution plan extractor. Builds StreamingExecutionPlan from .axon source for the production async SSE path; pre-resolves per-step BackpressurePolicy via stream_effect_dispatcher so the hot per-chunk loop in axon_server::server_execute_streaming_async does not re-walk the AST per chunk. Rejects flows that use 33.x.b-unsupported features (anchors / lambda apply / let bindings / mid-stream use_tool / hibernate / pix) with a closed-catalog PlanFallback so the SSE handler can route them to the legacy synchronous path. v1.24.0 — Streaming execution plan extraction + unified .axon source compilation pipeline.
flow_version
Flow Versioning — version tracking and rollback for deployed flows.
forge
v2.41.0 — the mathematical core of Directed Creative Synthesis (forge).
foveation
v2.54.0 — the active-inference foveation planner: spend the recognizer on the highest-information-scent regions until the answer resolves or the budget (v2.28.0) is exhausted; every foveation is a replayable ledger trail entry. v2.54.0 — the active-inference foveation planner.
fs_sandbox
v2.54.0 — the read-only filesystem capability + path sandbox. v2.54.0 — the filesystem capability + path sandbox: the read-only, agent-reachable disk surface, designed EXACTLY ONCE. Before v2.54.0 axon had no filesystem capability at all — fs::* existed only as host plumbing (never flow-invocable). v2.54.0 invents the agent-reachable read surface, and it is a capability, not an effect: a set of allowed roots a DocumentReader may read under, with every escape refused BEFORE any byte is read.
graceful_shutdown
Graceful Shutdown — signal handling and orderly server termination.
graph_export
Graph Export — render dependency graphs as DOT (Graphviz) or Mermaid.
handlers
v1.1.0 — Handler layer (Free Monad + CPS). Port of axon/runtime/handlers/. AXON Runtime — Handler layer (v1.1.0).
health_check
Health Check — structured health assessment for AxonServer subsystems.
hibernation
v2.83.0 — hibernate: the parking lot, the continuation id, and the lazy-expiry timeout. The flow HALTS; resume rides emit. v2.83.0 — hibernate: the flow HALTS, and that is the whole point.
holograph
v2.42.0 — the HolographBackend port + the OSS reference HRR codec.
hooks
Execution hooks — pre/post step callbacks for instrumentation.
http_tool
HTTP tool provider — executes tool calls as REST requests via reqwest.
idempotency
v1.23.0 — Idempotency-Key store for first-class axonendpoint routes.
idpe
v2.54.0 — the IDP-E recognizer kernel: the deterministic geometry+topology engine (Otsu → cubical β₀/β₁ → geometric discrimination → reading order → pix-navigable canonical tree). Reads a bounded PGM/PBM raster; real image decode is the sidecar (v2.54.0). Scoped to clean machine-print. v2.54.0 — the IDP-E recognizer kernel: the deterministic core of axon’s Epistemic Vision Engine.
idpe_frontend
v2.54.0 — the IDP-E image front-end: deterministic Perona-Malik anisotropic diffusion (Catté-regularised) + Gabor phase-tensor orientation energy that clean and analyse a raster before recognition. The CVE-prone image DECODE is isolated in the sidecar binary (src/bin/idpe_sidecar.rs), which feeds this front-end already-decoded grayscale — hostile bytes never reach the runtime. v2.54.0 — the IDP-E image front-end: the deterministic signal-processing that cleans and analyses a raster BEFORE the recognizer kernel (v2.54.0) reads it.
inference
v2.42.0 — the InferenceBackend port + the OSS reference active-inference engine (classical, honest).
ingest
Network ingest paths that deposit bytes directly into crate::buffer::ZeroCopyBuffers.
ingest_provenance
v2.81.0 — the provenance class of an ingested value, in a leaf module.
inspect
axon inspect native implementation — introspect the AXON standard library.
ir_generator
AXON IR Generator — AST → IR transformation.
ir_nodes
AXON IR node definitions — direct port of axon/compiler/ir_nodes.py.
jwt_verifier
JWT signature verification + JWKS client.
lambda_data
Lambda Data (ΛD) — Epistemic State Vector codec.
lambda_runtime
AXON Runtime — Lambda Data (ΛD) Apply (v1.10.0 — Rust mirror).
legal_basis
Legal-basis catalogue — v1.4.0.
lexer
AXON Lexer — direct port of axon/compiler/lexer.py.
logging
Logging — production-grade structured logging for AxonServer.
mandate_engine
v2.83.0 — the mandate enforcement engine: the closed loop that refuses to release any output its constraint set rejects. v2.83.0 — the mandate enforcement engine: the loop that makes the cage real.
mdn
v2.12.0 — Multi-Document Navigation (MDN).
mdn_memory
v2.12.0 — Memory-Augmented MDN (paper paper_memory_augmented_mdn.md).
mdn_provenance
v2.12.0 — MDN provenance logic (paper paper_multi_document.md section 3.2).
model_resolution
v2.22.0 — pure capability-aware model resolution: a step’s requires_context: + a backend’s v2.22.0 model catalog → the smallest model that fits, or honest fail-closed (never a too-small model). v2.22.0 — pure model resolution (the capability resolver).
module_interface
v2.76.0 — Phase 1 of the Epistemic Module System: .axi interfaces.
module_linker
v2.76.0 — Phase 4 of the Epistemic Module System: the LINKER.
module_resolver
v2.76.0 — Phase 0 of the Epistemic Module System: dependency discovery.
multiparty
Multiparty session types — the global view + projection.
notification
v2.66.0 — Governed Human Notification: the canonical contract (evidence labels, recipient custody, fail-closed provider port). v2.66.0 — Governed Human Notification: the canonical contract.
ots
Ontological Tool Synthesis — v1.4.0 binary pipeline synthesis.
ots_registry
v2.83.0 — the name-keyed ots transformer registry (shield_registry’s proven shape). An unregistered ots REFUSES at dispatch — a transformation that transforms nothing is the v2.67.0 F18 lie. v2.83.0 — the name-keyed ots transformer registry.
output
Execution output formats — structured report for programmatic integration.
parallel
Parallel step scheduler — depth-based wave execution with threads.
parser
AXON Parser — recursive descent, fail-fast.
pcc
v2.4.0 — Proof-Carrying Code. apx/axonendpoint carry a portable, machine-checkable proof object an INDEPENDENT verifier checks against the artifact WITHOUT trusting the compiler that produced it (the move from esk’s builder-signed attestation to a consumer- verifiable proof). v2.4.0 ships the kernel + the ComplianceCoverage property class. v2.4.0 — Proof-Carrying Code (PCC).
pcc_cli
v2.4.0 — CLI handlers for the PCC commands (axon pcc prove / axon pcc verify). Closes the Proof-Carrying Code loop at the command line: generate a proof bundle from source, then independently verify it against a recompile of that source. v2.4.0 — axon pcc CLI: prove + verify.
pem
Persistent Epistemic Modeling (PEM) — v1.4.0.
pinned_conn
v2.81.0 / the design decision — the pinned-connection PORT.
pix_mdn_pcc
v2.12.0 — papers-as-proofs for the PIX·MDN·Memory trilogy.
pix_navigator
v2.12.0 — the PIX retrieval navigator.
plan_diff
Plan Diff — compare two exported execution plans.
plan_export
Execution plan export — JSONB-compatible structured output.
quant
v2.4.0 — the quant cognitive primitive’s RUNTIME: the quant::QuantBackend port + a usable dense-statevector reference simulator capped at n ≤ 10 (the OSS half; enterprise mounts the QuIDD / VRAM / QPU engine behind the same trait in v2.4.0–i). v2.4.0 — the QuantBackend port + the OSS reference simulator.
quant_witness
v2.23.0 — quant as the first Advantage-Witness instance: the amplitude- fidelity ≡ cosine theorem made executable + the QuantKernelWitness that fails closed (no advantage over the classical baseline). v2.23.0 — quant as the FIRST Advantage-Witness instance.
rate_limiter
Rate Limiter — sliding window rate limiting for AxonServer.
refinement
Refinement types — Trusted<T> / Untrusted<T> + closed Trust Catalog.
repl
axon repl native implementation — interactive Read-Eval-Print Loop.
replay
Execution Replay — reconstruct and analyze recorded traces.
replay_token
Deterministic replay tokens — v1.4.0.
request_binding
v1.32.0 — The Request Binding Contract (runtime delivery).
request_log
Request Logger — structured audit log for AxonServer API requests.
request_middleware
Request Middleware — automatic request ID, timing, and logging for AxonServer.
resilient_backend
Resilient Backend — production-grade LLM call wrapper with retry, circuit breaker, and fallback.
resource_lease
v2.69.0 — lease over a vendor: the CT-2 Anchor Breach fires on a tool call, not just a store op.
resource_resolver
v2.67.0 — resolving a resource.endpoint config key to a real address.
retrieval_witness
v2.23.0 — the SECOND Advantage-Witness instance (transversality proof): retrieval / navigate via the ranking_lift metric over flat cosine retrieval. v2.23.0 — the SECOND Advantage-Witness instance: retrieval / navigate.
retry_policy
Retry Policy — exponential backoff with jitter for LLM API calls.
route_schema
v1.23.0 — Schema validation for first-class axonendpoint routes.
runner
axon run native implementation — stub + real execution.
runtime
v1.1.0 + 5 runtime primitives. Port of axon/runtime/ (lease kernel, reconcile loop, ensemble aggregator, immune kernels). AXON Runtime primitives (λ-L-E v1.1.0 + v1.1.0; v1.6.0 typed channels).
runtime_flags
v1.24.0 — Process-wide runtime opt-in flags. Today carries the tokenizer_fallback flag that gates BPE-tokenized chunking on the SSE LEGACY path (D9 — opt-in; defaults OFF for v1.24.0 wire byte-compat). v1.24.0 — Process-wide runtime opt-in flags.
runtime_warnings
v1.24.0 — Closed-catalog runtime warnings for the SSE production path. Surfaces axon-W002 streaming-not-supported when the async streaming path falls back to legacy synchronous delivery (D5 — no silent degradation). v1.24.0 — Closed-catalog runtime warnings for the streaming production path.
scrape_tool
v2.52.0 — Native Web Acquisition runtime (scrape_http / scrape_dom / scrape_crawl); born-Untrusted content, pluggable stealth fetcher. v2.52.0 — Native Web Acquisition runtime: the OSS sibling of crate::http_tool, the dispatch core for the three web-acquisition providers (scrape_http / scrape_dom / scrape_crawl).
secret_custody
v2.48.0 — the SecretCustody port behind the backend: secrets metadata store, the rotate verb and the tool { secret: } injection (rotation_without_revelation; fail-closed when absent). v2.48.0 — the SecretCustody port: the runtime seam behind the backend: secrets metadata store (v2.48.0), the rotate … with <Tool> flow verb (v2.48.0) and the tool { secret: } dispatch injection (v2.48.0).
server_config
Server Config API — runtime-adjustable configuration for AxonServer.
server_metrics
Server Metrics — Prometheus exposition format for live AxonServer metrics.
session
Session types — the algebra of typed bidirectional dialogue.
session_runtime
v2.3.0 — the runtime of a session-typed dialogue. The static algebra (axon_frontend::session: duality, regular-coinductive equality, credit-refined backpressure index !ⁿA.S) gets a dynamic counterpart here: an operational state machine (SessionRuntime) with one method per algebra rule, a wire envelope (Frame), and an RFC 6455 WebSocket carrier (ws::drive) that runs a session type against a peer. Carrier-agnostic core; the WS layer is one binding. v2.3.0 — the runtime of a session-typed dialogue.
session_scope
Session Scoping — namespaced session isolation for AxonServer.
session_store
Session state / memory persistence — file-backed key-value store.
shield_registry
v2.0.0 — Shield scanner extension point.
source_registry
v2.67.0 — the source adapter registry: what an observe actually looks at. Deny-by-default — an unregistered source is UNKNOWN, not healthy, and the observation refuses rather than fabricating a reading. v2.67.0 — the source adapter registry: what an observe actually looks at.
stdlib
AXON Standard Library — built-in personas, anchors, flows, and tools.
step_deps
Step dependency analysis — variable-based dependency graph between steps.
storage
Storage Backend — trait abstraction for persistent state in AxonServer.
store
v1.30.0 — the axonstore cognitive data plane runtime.
store_introspect
v1.31.0 (D10) — pure manifest-building logic for the axon store introspect <store> CLI.
store_schema
v1.31.0 (D1) — the closed axonstore column-schema catalog, Rust frontend side.
store_schema_manifest
v1.31.0 (D4, D6) — The .axon-schema.json manifest format + resolver.
stream_effect
Stream<T> — temporal algebraic effect with mandatory backpressure.
stream_effect_dispatcher
v1.24.0 — Stream-effect dispatcher (Layer 4).
stream_runtime
Runtime implementation of Stream<T> with the four closed backpressure policies from crate::stream_effect.
streaming_via_dispatcher
v1.24.0 — Streaming via the dispatcher. Lifts flow_dispatcher::dispatch_node into the production SSE hot path.
synth
v2.42.0 — the SynthBackend port + the OSS deny-by-default reference.
technician_dispatch
v2.39.0 — Remote Hands runtime: the pure, verifiable dispatch core for a target:-bound technician tool, plus the wire protocol exchanged with a local agent over the bound socket.
temporal_context
v2.46.0 — declared cognitive time: the runtime half of now: (one capture per run, deterministic prompt line, envelope record). v2.46.0 — declared cognitive time: the runtime half of now:.
tenant_context
v2.81.0 — tenant identity, dependency-free. See the module docs. v2.81.0 — tenant IDENTITY, separated from tenant EXTRACTION.
tenant_secrets
Per-tenant API key resolution via AWS Secrets Manager (M3).
tokens
AXON token types and keyword lookup table. Direct port of axon/compiler/tokens.py.
tool_dispatch_bridge
v1.29.0 — Bridge between ToolEntry (the registry shape) and Tool trait impls (the dispatcher’s streaming surface).
tool_executor
Native tool executors — Calculator and DateTimeTool.
tool_registry
Tool registry — extensible tool dispatch for AXON execution.
tool_trait
v1.29.0 — Tool trait + ToolChunk closed-catalog struct.
tool_validator
Tool result validation and effect tracking.
topology
v2.42.0 — the TopologyBackend port + the OSS reference TDA engine.
trace_export
Trace Export — export analytics as Prometheus exposition format or CSV.
trace_stats
Trace Analytics — aggregate statistics across multiple execution traces.
trace_store
Trace Store — in-memory execution trace buffer for AxonServer.
tracer
axon trace native implementation — pretty-print execution traces.
trust_verifiers
Runtime implementations of the closed crate::refinement::TrustProof catalogue.
type_checker
AXON Type Checker — Phase 1: symbol table, duplicates, references, field validation.
upstream_presets
v2.37.0 — the blessed upstream preset catalog + from Preset@vN expansion.
upstream_runtime
v2.37.0 — the upstream runtime: the CLIENT dual of the v2.3.0 carrier. Dials OUT to a third-party vendor (STT/TTS/realtime speech) over RFC 6455 + TLS, applies the declared auth handshake, transcodes wire↔session per the compiled map: projection (T849-total), applies the declared overflow: policy when the vendor is the slow side, and reconnects with witnessed, fail-closed exponential backoff. A new vendor is a new DECLARATION, never new Rust code. v2.37.0 — the upstream runtime: dial + auth + reconnect + transcode.
version
v2.81.0 — the version string, and nothing else.
version_diff
Version Diff — line-based source diff between flow versions.
voice_desugar
v2.37.0 — voice macro-expansion: the simplicity layer lowered to the primitives already in the language, as SOURCE TEXT.
warden
v2.43.0 — the WardenBackend port + the OSS reference static analyzer.
webhook_delivery
Webhook Delivery — async HTTP delivery with retry and exponential backoff.
webhooks
Webhooks — outgoing HTTP notification system for AxonServer events.
window
v2.27.0 — the runtime for the window temporal execution guard (timezone-aware is_in_window / next_window_open via chrono-tz). v2.27.0 — the runtime for the window temporal execution guard (v2.27.0).
wire_envelope
v2.0.0 — Pure Silicon Cognition: the canonical wire payload type for axonendpoint responses on transport: json.
wire_envelope_producers
v2.0.0 — Wire envelope producer helpers.