Skip to main content

telltale_runtime/effects/
mod.rs

1//! Effect handler system for choreographic programming
2//!
3//! This module provides the effect handler abstraction that decouples protocol
4//! logic from transport implementation, enabling testable and composable protocols.
5//!
6//! The system uses a free algebra approach where choreographic programs are
7//! represented as data structures that can be analyzed, transformed, and interpreted.
8
9pub mod algebra;
10pub mod contract;
11pub mod extension;
12pub mod handler;
13pub mod handlers;
14pub mod interpreter;
15pub mod middleware;
16pub mod registry;
17
18// Re-export core effect system types explicitly
19pub use algebra::{
20    Effect, InterpretResult, InterpreterState, Program, ProgramBuilder, ProgramError,
21    ProgramMessage,
22};
23pub use contract::{
24    validate_handler_contract_profile, validated_contract_profile, DeliveryModel,
25    DocumentedHandlerContract, ExtensionDispatchContract, ExtensionDispatchMode,
26    HandlerContractProfile, HandlerContractTier, HandlerContractViolation,
27    ProtocolSemanticContract, RetryPolicy, TimeoutPolicy, TransportPolicyContract,
28};
29pub use extension::{ExtensionEffect, ExtensionError};
30pub use handler::{
31    ChoreoHandler, ChoreoHandlerExt, ChoreoResult, ChoreographyError, ContextExt, Endpoint,
32    LabelId, MessageTag, NoOpHandler, RoleId,
33};
34pub use interpreter::{interpret, interpret_extensible};
35pub use registry::{ExtensibleHandler, ExtensionRegistry};
36
37// Re-export handler implementations for convenience
38pub use handlers::{InMemoryHandler, RecordedEvent, RecordingHandler};
39pub use handlers::{TelltaleEndpoint, TelltaleHandler, TelltaleSession};
40
41// Re-export middleware for convenience
42pub use middleware::{Metrics, Retry, Trace};
43
44#[cfg(feature = "test-utils")]
45pub use middleware::FaultInjection;