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