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 safe_path;
25pub mod transcript;
26mod types;
27
28pub use rite_sdk::BackendConfig;
29
30pub use material::MaterialSource;
31
32pub use safe_path::{PathSafetyError, confine, is_safe_component, safe_join, validate_component};
33
34pub use types::{
35 ActionType, BackendUsage, DutyType, Metadata, OutputType, ParameterType, derive_role_name,
36 derive_step_name, role_type,
37};
38
39pub use ir::{
40 Act, ActId, ArtifactId, ArtifactRef, Ceremony, Material, MaterialId, MaterialKind, Output,
41 OutputId, ParamId, Parameter, PostCeremonyDuty, RetryPolicy, Role, RoleId, Section, SectionId,
42 Step, StepId, StepInputs, SymbolTable,
43};
44
45pub use transcript::{
46 ErrorClass, ErrorRecord, Prompt, ResponseRecord, StepFact, StepOutcome, ValidatorSpec,
47};