1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Core primitives for the BoundGraph runtime.
//!
//! BoundGraph governs the span between a reasoning engine proposing an action and a
//! state change committing. This crate defines the immutable values that span
//! is made of, and nothing else: no execution, no policy, no I/O.
//!
//! # The primitives
//!
//! | Symbol | Type | Role |
//! |---|---|---|
//! | `ω` | [`WorkOrder`] | A typed declaration of intended effect. A *proposal*. |
//! | `Γ` | [`Context`] | The exact admitted token window, plus what was refused. |
//! | `κ` | [`Condensate`] | A size-capped, structure-preserving summary of a result. |
//! | `ε` | [`Evidence`] | A signed verdict from a model-free checker. |
//! | `λ` | [`LedgerEntry`] | One tamper-evident record in the audit chain. |
//!
//! # Two invariants everything else rests on
//!
//! **Immutability.** Every primitive is constructed complete and never mutated.
//! There are no setters. A "change" is a new value with a new [`Digest`].
//!
//! **Content addressing.** Identity is the `blake3` digest of the canonical
//! CBOR encoding ([`Canonical`]). Equal digests mean equal values, which is
//! what lets the ledger be verified by a third party and lets the content
//! addressed store deduplicate.
//!
//! # How the Foundation Laws show up here
//!
//! The laws are enforced by the compiler and the runtime, not by this crate.
//! What this crate does is make them *representable* — and make violating them
//! awkward:
//!
//! - **Law I (Authority).** [`GrantSet::EMPTY`] is the default and there is no
//! value meaning "unrestricted", so a step that declares nothing gets
//! nothing. [`GrantDelta`] records requested against granted, so attenuation
//! is auditable rather than inferred.
//! - **Law II (Context).** [`Context`] records what was *refused* as well as
//! what was admitted, and construction fails if admissions exceed the
//! ceiling. [`Condensate`] caps a result while keeping the original
//! addressable.
//! - **Law III (Evidence).** [`Verdict`] has no implicit pass, and
//! [`Evidence::covers`] means a verdict cannot be reattached to data it never
//! saw.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;