Expand description
Suite-wide type substrate for FrankenSuite (bd-1usdh.1, bd-1usdh.2).
Canonical identifier, version, and context types used across all FrankenSuite projects for cross-project tracing, decision logging, capability management, and schema compatibility.
§Identifiers
All identifier types are 128-bit, Copy, Send + Sync, and
zero-cost abstractions over [u8; 16].
§Capability Context
Cx is the core context type threaded through all operations.
It carries a TraceId, a Budget (tropical semiring), and
a capability set generic parameter. Child contexts inherit the
parent’s trace and enforce budget monotonicity.
use franken_kernel::{Cx, Budget, NoCaps, TraceId};
let trace = TraceId::from_parts(1_700_000_000_000, 42);
let cx = Cx::new(trace, Budget::new(5000), NoCaps);
assert_eq!(cx.budget().remaining_ms(), 5000);
let child = cx.child(NoCaps, Budget::new(3000));
assert_eq!(child.budget().remaining_ms(), 3000);
assert_eq!(child.depth(), 1);Structs§
- Budget
- Time budget in the tropical semiring (min, +).
- Cx
- Capability context threaded through all FrankenSuite operations.
- Decision
Id - 128-bit identifier linking a runtime decision to its EvidenceLedger entry.
- NoCaps
- An empty capability set for contexts that carry no capabilities.
- Parse
IdError - Error returned when parsing a hex identifier string fails.
- Parse
Version Error - Error returned when parsing a semantic version string fails.
- Policy
Id - Identifies a decision policy (e.g. scheduler, cancellation, budget).
- Schema
Version - Semantic version (major.minor.patch) with compatibility checking.
- TraceId
- 128-bit unique trace identifier.
Traits§
- Capability
Set - Trait for capability sets carried by
Cx.