aion_package/structure/mod.rs
1//! Workflow structure projection: a graph model derived from the typed source.
2//!
3//! A workflow is a typed function over a small, known vocabulary
4//! (`run` / `all` / `race` / `map` / `spawn` / `receive` / `sleep` / timers), so
5//! its primitive structure can be projected from the entry-module Gleam source
6//! into an ordered node/edge graph automatically (C21, C23). Each node carries a
7//! [`CorrelationKey`] so a consumer (the dashboard canvas, RM-007) can overlay a
8//! run's recorded events onto the graph (C22). A bounded structural delta
9//! regenerates Gleam that still type-checks (C24).
10//!
11//! The graph model is a projection, never the authoritative artifact: the typed
12//! Gleam module remains the single source of truth (ADR-014, CN6). This module
13//! delivers the data model and the regeneration only — the rendered canvas UI
14//! and the live overlay are deferred to RM-007.
15
16mod arms;
17mod control_flow;
18mod determinism;
19mod error;
20mod extract;
21mod facts;
22mod ident;
23mod model;
24mod reader;
25mod regen;
26mod scan;
27
28#[cfg(test)]
29mod tests;
30
31pub use determinism::{DeterminismError, Violation, ViolationKind, analyze_determinism};
32pub use error::StructureError;
33pub use extract::extract_structure;
34pub use facts::{FactsError, WorkflowFacts, extract_workflow_facts};
35pub use model::{
36 ArmLabel, CorrelationKey, EdgeKind, GraphEdge, GraphNode, NodeId, NodePrimitive, WorkflowGraph,
37};
38pub use regen::{StructuralDelta, regenerate_gleam};