Expand description
Execution runtime for Rite ceremonies.
rite-runtime defines the protocol that frontends use to drive a
ceremony to completion, the executor that walks the ceremony plan,
and the supporting machinery for transcripts and action handlers.
§Key types
Executor, channel-driven engine that walks a ceremony plan.Action/ActionRegistry, the handler trait and registry.BackendRegistry/BackendFactory, lazy backend store.Reporter, action-facing handle for facts, signals, and prompts.TranscriptSink, durable JSONL audit log with hash chaining.
§Stability
Internal crate. This is an implementation detail of the rite CLI, with no
stable API and no semver guarantees across releases. Build against the
public rite-sdk, rite-model, or rite-resolver crates instead.
Modules§
- test_
support - Test-only helpers for action implementors.
Structs§
- Action
Metadata - Metadata describing an action, used for validation and presentation.
- Action
Registry - Registry mapping action types to their handlers.
- Backend
Registry - Backend registry that owns all backend lifecycle state.
- Backend
Version - A linked cryptographic backend library and its runtime version.
- Build
Info - Identity of the running
ritebinary. A property of the artifact, set at compile time; the strongly verifiable end of the trust boundary (checkable against a release tag and build provenance). - Ceremony
Random - The per-ceremony entropy source.
- Disk
- A block device and its mount, as shown in the System tab.
- Draw
- A value drawn from the source, paired with the path that derives it.
- Entropy
Verified - Outcome of re-deriving a transcript’s entropy source.
- Environment
- Live inventory of the machine’s attached devices.
- Execution
State - Complete execution state, recreated after each step.
- Execution
Summary - Summary returned by
Executor::runon a successful completion. - Executor
- Channel-driven executor. One per ceremony run.
- Feature
Check - A single security-feature determination: a machine-comparable status plus
optional human context. Replaces the free-form status strings the
machine_infoaction used to emit. - Handler
Context - Read-only view of execution state for handlers.
- Hardening
- Snapshot of platform memory- and DMA-protection features.
- Host
Info - Identity of the host machine. A property of the environment, the weakly verifiable end of the trust boundary (an operator assertion that software can only partly corroborate).
- InMemory
Sink - In-memory sink that collects every recorded
StepFact. - Jsonl
File Sink - JSONL file sink with SHA-256 chain integrity.
- Loaded
Transcript - Verified transcript contents, chain-walked facts plus the final fingerprint and a flag for whether the run reached a terminal fact.
- Material
Overview - Overview of a declared material, carried by
UiSignal::CeremonyOverviewso the live UI can render the material list. In-flight only: the ceremony YAML is the source of truth for material metadata, so this never reaches the transcript. - Output
Config - Configuration for ceremony output directory structure.
- Prompt
Id - Identifier that pairs a prompt request with its matching response.
- Reporter
- Action-facing handle threaded into every action handler.
- Startup
Snapshot - The one-shot UI snapshots emitted at ceremony start: static system identity and the initial device environment.
- Step
Info - Information about a step needed by action handlers.
- Step
Result - Result of executing a step.
- System
Clock - The real clock: reads the host wall clock via
Utc::now. The default for every production run. - System
Info - Static build and host identity for the System tab and
rite version --verbose. - System
Info Parse Error - Failure to parse one of this module’s string-backed enums.
- Timed
Fact - A recorded fact paired with its envelope timestamp: the uniform event time,
which lives on the chain envelope rather than on individual facts. Returned
by
read_verified_transcriptso consumers read event time uniformly. - Transcript
Fingerprint - SHA-256 fingerprint produced by a
TranscriptSink::finalizecall. - Transcript
Verified - Outcome of verifying a transcript on disk.
Enums§
- Action
Category - Category of an action, determines how the frontend presents it.
- Action
Error - Errors that may surface from an
Actionhandler. - Artifact
Value - Runtime representation of an artifact.
- Exec
Event - Event emitted by the runtime to the frontend.
- Execution
Error - Errors during ceremony execution.
- Feature
Status - Status of a platform security feature.
- Icon
- Visual cue for UI lines. Mapped to a glyph by the frontend.
- KeyFormat
- Output format for public keys.
- Material
Overview Kind - Kind of material in
MaterialOverview. Mirrors the structural distinction of the IR’sMaterialKindwithout the load-time implementation detail (file sources). - Reporter
Error - Errors that can arise while emitting events or awaiting a response.
- Response
- In-process user response.
- UiCommand
- Command sent by the frontend to the runtime.
- UiSignal
- Transient UI-only signal. Never written to the transcript.
- Verify
Error - Verification failure modes.
Constants§
- DERIVATION_
V1 - Frozen-scheme tag recorded with the machine seed. It pins the entire
construction (Extract/Expand, the ratchet rule, the
info/path byte encodings), not merely the hash. A verifier treats it as a selector among known-good schemes it already trusts and rejects any value it does not recognise, it is never an instruction to trust an arbitrary algorithm. - MAX_
DRAW_ LEN - Longest value a single draw can produce: the
HKDF-Expandoutput limit of255 * HashLenbytes (RFC 5869), with SHA-256’s 32-byte output. [expand] panics beyond this, so anything replaying a recorded draw must bound the requested length by this value first.
Traits§
- Action
- Action trait, every ceremony step handler implements this.
- Clock
- Source of wall-clock time for a ceremony run.
- Transcript
Sink - Synchronous, durable observer of
StepFacts.
Functions§
- build_
path - Build a derivation path. The single place the path format lives, so the
draw side and the verify side cannot drift. A
purposeis drawn at most once per step, so(epoch, step, purpose)uniquely identifies a value. - compute_
file_ fingerprint - SHA-256 fingerprint of a file’s contents.
- compute_
fingerprint - SHA-256 fingerprint of an in-memory byte slice.
- derive_
value - Derive the value at
pathfrom the given epoch seed. - evaluate
- Evaluate an expression in the given context.
- evaluate_
expr_ value - Evaluate an
ExprValueto a JSON value. - evaluate_
expr_ value_ to_ string - Evaluate an
ExprValueto a string. - fact_
summary - One-line summary of a
StepFactfor live-frontend display. - fold_
seed - Advance the ratchet by one epoch, folding in a human contribution.
- initial_
seed - Compute
seed_0from the machine entropym. - parse_
params - Deserialize the per-step parameter blob into a typed handler-specific struct.
- read_
verified_ transcript - Verify a JSONL transcript and return its facts.
- resolve_
artifact_ bytes - Resolve an artifact reference to byte content.
- resolve_
backend_ key - Resolve an artifact to a backend-managed key reference.
- signal_
summary - One-line summary of a
UiSignalfor live-frontend display. - truncate_
for_ display - Truncate a string to at most
max_charsUnicode scalar values, appending"..."when truncation occurs. - value_
to_ json - Convert a Value to a JSON value for action parameters.
- verify_
entropy - Re-derive a transcript’s entropy source and confirm every drawn value.
- verify_
step_ fact_ transcript - Verify a JSONL transcript file produced by
JsonlFileSink.
Type Aliases§
- Backend
Factory - A closure that creates a concrete backend from its name and config.