Skip to main content

stormchaser_model/
lib.rs

1//! Core data models and domain types for the Stormchaser workflow engine.
2//!
3//! This crate provides the foundational types representing workflows, steps,
4//! executions, and other entities that make up the domain model.
5
6pub mod id;
7pub use id::*;
8
9/// Authentication and authorization models.
10pub mod auth;
11/// Cron scheduling definitions.
12pub mod cron;
13/// Domain-Specific Language (DSL) abstract syntax tree and types.
14pub mod dsl;
15/// System event and correlation models.
16pub mod event;
17/// Rule-based trigger definitions for events.
18pub mod event_rules;
19/// Event schemas for CloudEvents.
20pub mod events;
21/// HCL expression evaluation models.
22pub mod hcl_eval;
23/// Logging configuration and log streaming types.
24pub mod logging;
25/// NATS helpers.
26pub mod nats;
27/// Outbox pattern models for reliable message publishing.
28pub mod outbox;
29/// Execution runner definitions and status models.
30pub mod runner;
31/// Schema cache for OCI schemas.
32pub mod schema_cache;
33/// Schema generation functions.
34pub mod schema_gen;
35/// Workflow step execution models and state.
36pub mod step;
37/// Storage backend and artifact registry models.
38pub mod storage;
39/// Test reporting and summary models.
40pub mod test_report;
41/// Core workflow run and state management types.
42pub mod workflow;
43
44pub use auth::{ApiOpaContext, Claims, EngineOpaContext, OpaClient};
45pub use dsl::{ApprovalSpec, WaitEventSpec};
46pub use event::{ApprovalRegistry, EventCorrelation};
47pub use event_rules::{EventRule, WebhookConfig};
48pub use logging::LogBackend;
49pub use outbox::OutboxMessage;
50pub use runner::{Runner, RunnerStatus, StepDefinition};
51pub use step::{StepInstance, StepOutput, StepStatus};
52pub use storage::{BackendType, StorageBackend};
53pub use test_report::{TestCase, TestCaseStatus, TestReport, TestSummary};
54pub use workflow::{AuditLog, RunContext, RunQuotas, RunStatus, WorkflowRun};
55
56/// Engine trait for scheduling and managing workflow runs.
57pub trait WorkflowEngine {
58    /// Schedules a new workflow run by name.
59    fn schedule_run(&self, name: &str) -> anyhow::Result<WorkflowRun>;
60}