Work in progress.
argus-kernel is the zero-runtime-dependency, pure-functional Rust implementation of the
TzimtzumV4 authorization protocol. It enforces confidentiality,
integrity, capability, inspection, quarantine, and bounded crossing rules at tool and
agent boundaries.
Each transition consumes an immutable KernelState and returns a new state plus its exact
KernelAction, or a closed KernelError:
fn(KernelState, &BackgroundTheory, ...) -> Result<(KernelState, KernelAction), KernelError>The complete V4 action surface is:
register_toolunregister_tooldelegategrant_capabilitygrant_crossingrevokecascade_revokeingestbegin_invocationauthorize_inspectedsettle_invocationcross_output
The immutable background contains enforcement mode, exact confidentiality allow/inspect ceilings for four egress kinds, and the root identity. Invocation policy and evidence are frozen transition inputs. Mutable state contains the agent tree and capabilities, dual labels, pending invocations and challenges, consumed-id histories, crossing grants, and registered tools.
The kernel deliberately uses extraction-compatible VecMap/VecSet collections,
explicit index loops, owned collection accessors, and no runtime dependencies. Serde and
JSON are development-only dependencies for the shared V4 conformance corpus.
TzimtzumV4 proves all 32 invariants over its complete 12-action abstract system. Charon
and Aeneas mechanically extract this Rust kernel to Lean. The refinement in
formal-lean/ proves that every successful extracted action maps to its
single abstract counterpart and that every reachable extracted state relates to a
TzimtzumV4 state satisfying the full invariant bundle.
The extracted V4 kernel covers exactly 12 actions and yields all 32 invariants modulo
trusted Aeneas/Charon extraction, CapacityOK, and narrowed OracleFidelity. This does
not verify the handwritten Rust itself. CapacityOK supplies governed-root coherence,
exact successful-branch collection bounds, begin-time snapshot prediction, and
grant_crossing n < 2^32. OracleFidelity is limited to begin-time authorizer verdict
and attested-egress agreement.
Handwritten Rust, ExArgus and telemetry, authentication/identity/evidence truth,
serialization and persistence, the native digest-chain adapter and trusted rollback
anchor, and host one-owner/persist-before-effect ordering are outside formal
verification. The adapter is conformance-tested. See
formal-lean/README.md for the theorem closure and exact
hypotheses.
From argus/:
cargo fmt --check
cargo test --workspace --locked
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo build --workspace --locked --releaseThe shared conformance runner covers the public transition surface in addition to unit, safety-property, and external-consumer tests.
To build the extracted model and refinement:
cd formal-lean
lake build
lake build ArgusChecksTo regenerate the extracted Lean model with the frozen, locally reconstructed Aeneas/Charon stack:
./scripts/charon-aeneas-extract.shThe extraction script validates all tool pins and patches before replacing generated Lean output. Generated Lean is never hand-edited.