Skip to main content

Crate rite_model

Crate rite_model 

Source
Expand description

Core domain model and IR for the Rite ceremony DSL.

rite-model defines the Intermediate Representation (IR): the fully resolved ceremony data consumed by the executor. The YAML schema (parser input) lives in rite-resolver; this crate contains only the runtime-facing types.

§Module structure

  • ir: IR types: Ceremony, Step, Role, etc. and typed ID newtypes
  • expression: Expression parsing for ${artifact.name | sha256 | hex} syntax
  • transcript: Persisted transcript schema (StepFact + friends)
  • safe_path: Confine untrusted, ceremony-derived names/paths to a directory
  • types (private): Shared semantic enums: ActionType, DutyType, etc.

§BackendConfig

Re-exported from rite-sdk for convenience. The canonical definition lives there.

Re-exports§

pub use safe_path::PathSafetyError;
pub use safe_path::confine;
pub use safe_path::is_safe_component;
pub use safe_path::safe_join;
pub use safe_path::validate_component;
pub use ir::Act;
pub use ir::ActId;
pub use ir::ArtifactId;
pub use ir::ArtifactRef;
pub use ir::Ceremony;
pub use ir::Material;
pub use ir::MaterialId;
pub use ir::MaterialKind;
pub use ir::NamedInput;
pub use ir::Output;
pub use ir::OutputId;
pub use ir::ParamId;
pub use ir::Parameter;
pub use ir::PostCeremonyDuty;
pub use ir::RetryPolicy;
pub use ir::Role;
pub use ir::RoleId;
pub use ir::Section;
pub use ir::SectionId;
pub use ir::Step;
pub use ir::StepId;
pub use ir::StepInputs;
pub use ir::SymbolTable;
pub use display::Layout;
pub use display::RevealFormat;
pub use display::TypedRow;
pub use display::TypedValue;
pub use display::UnknownRevealFormat;
pub use transcript::ErrorClass;
pub use transcript::ErrorRecord;
pub use transcript::FACT_TYPES;
pub use transcript::FACT_VOCABULARY;
pub use transcript::Format;
pub use transcript::Level;
pub use transcript::PLACEHOLDER_LIMIT;
pub use transcript::Prompt;
pub use transcript::ResponseRecord;
pub use transcript::Shown;
pub use transcript::StepFact;
pub use transcript::StepOutcome;
pub use transcript::TRANSCRIPT_FORMAT;
pub use transcript::TRANSCRIPT_SCHEMA;
pub use transcript::TranscriptHeader;
pub use transcript::ValidatorSpec;
pub use transcript::compile_pattern;

Modules§

bip39
BIP-39: bytes as words from the English list, as a hardware wallet shows its recovery phrase and takes it back.
bundle
The evidence bundle: a ceremony run packaged with its definition.
commitment
The commitment chain: how a transcript’s lines fold into its fingerprint.
display
How a value is written out for a person: the encodings reveal shows, and the shape each gives a sheet of paper.
expression
Expression parsing for computed values in ceremony DSL.
ir
Intermediate Representation (IR) for resolved ceremonies.
paper32
Paper32: bytes as rows of base-32 characters a person writes down and types back, with parity that repairs a slip and refuses a row it cannot repair.
params
Rules over a step’s with: values that hold in every build.
safe_path
Path-safety helpers for confining ceremony-derived names and paths.
transcript
Persisted transcript schema.

Structs§

BackendConfig
Backend configuration entry from a ceremony file.
DigestFormatError
A string that is not a sha256:<64 lowercase hex> digest.
ListInput
A reads: input that holds a list of references.
Metadata
Ceremony metadata (name and optional description).
ReadsContract
What an action requires of its step’s reads: map.
Sha256Digest
A SHA-256 digest written as sha256: followed by 64 lowercase hex digits.
UnknownCertProfile
A profile: value naming no certificate shape.
UnknownSharingScheme
A scheme: value naming no sharing scheme this build implements.

Enums§

ActionType
Action types available in ceremony steps.
BackendUsage
Whether an action needs the backend: field on its step.
CanonicalJsonError
A value outside the subset the transcript’s canonical form covers.
CertProfile
The certificate shape an issue_certificate step asks for.
DutyType
Typed preset for common post-ceremony duty categories.
MaterialSource
Source for a ceremony material.
OutputType
Type of output produced by a ceremony.
ParameterType
Type of a ceremony parameter.
SharingScheme
The secret sharing scheme a split_secret step names.

Functions§

canonical_json
The RFC 8785 canonical form of value.
check_numbers
Checks that every number in value is one the canonical form writes.
derive_role_name
Derive a display name from a role ID.
derive_step_name
Derive a display name from a step or section ID.
role_type
Extract the role type from a role ID.