Skip to main content

rite_model/
lib.rs

1//! Core domain model and IR for the Rite ceremony DSL.
2//!
3//! `rite-model` defines the Intermediate Representation (IR): the fully resolved
4//! ceremony data consumed by the executor. The YAML schema (parser input) lives in
5//! `rite-resolver`; this crate contains only the runtime-facing types.
6//!
7//! # Module structure
8//!
9//! - [`ir`]: IR types: [`Ceremony`], [`Step`], [`Role`], etc. and typed ID newtypes
10//! - [`expression`]: Expression parsing for `${artifact.name | sha256 | hex}` syntax
11//! - [`transcript`]: Persisted transcript schema (`StepFact` + friends)
12//! - [`safe_path`]: Confine untrusted, ceremony-derived names/paths to a directory
13//! - `types` (private): Shared semantic enums: [`ActionType`], [`DutyType`], etc.
14//!
15//! # `BackendConfig`
16//!
17//! Re-exported from `rite-sdk` for convenience. The canonical definition lives there.
18
19#![warn(missing_docs)]
20
21pub mod expression;
22pub mod ir;
23mod material;
24pub mod params;
25pub mod safe_path;
26pub mod transcript;
27mod types;
28
29pub use rite_sdk::BackendConfig;
30
31pub use material::MaterialSource;
32
33pub use safe_path::{PathSafetyError, confine, is_safe_component, safe_join, validate_component};
34
35pub use types::{
36    ActionType, BackendUsage, CertProfile, DutyType, Metadata, OutputType, ParameterType,
37    ReadsContract, UnknownCertProfile, derive_role_name, derive_step_name, role_type,
38};
39
40pub use ir::{
41    Act, ActId, ArtifactId, ArtifactRef, Ceremony, Material, MaterialId, MaterialKind, Output,
42    OutputId, ParamId, Parameter, PostCeremonyDuty, RetryPolicy, Role, RoleId, Section, SectionId,
43    Step, StepId, StepInputs, SymbolTable,
44};
45
46pub use transcript::{
47    ErrorClass, ErrorRecord, Prompt, ResponseRecord, StepFact, StepOutcome, ValidatorSpec,
48};