Expand description
§ObzenFlow Core
This crate is an internal implementation detail of the ObzenFlow project. Most users should depend on the top-level obzenflow crate instead.
Layer: Core (innermost). No dependencies on other ObzenFlow workspace crates.
The business-domain nucleus of the framework, defining the types and traits the rest of the system speaks:
- Event model (
ChainEvent,SystemEvent, payloads, context blocks) - Journaling contracts (
Journal<T>,JournalReader<T>,EventEnvelope<T>) - Verification contracts between stages (
Contract+ built-in contracts) - Metrics and observability interfaces (wide-events DTOs, observer/exporter traits)
- Ports for outer layers (HTTP client and web server abstractions, control-middleware ports)
- Strong identifiers and time primitives (typed IDs,
MetricsDuration) - Typed payloads (
TypedPayload) for compile-time event type resolution and schema versioning
This crate intentionally avoids infrastructure concerns (storage, networking, async runtimes, logging). Outer layers implement these interfaces and inject them into runtime services.
§License
Dual-licensed under MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.
Re-exports§
pub use error::Result;pub use event::chain_event::ChainEvent;pub use event::context::runtime_context;pub use event::event_envelope::EventEnvelope;pub use event::EventId;pub use event::JournalWriterId;pub use event::WriterId;pub use journal::journal_error::JournalError;pub use journal::journal_owner::JournalOwner;pub use journal::Journal;pub use event::schema::TypedPayload;pub use id::CycleDepth;pub use id::FlowId;pub use id::JournalId;pub use id::SccId;pub use id::StageId;pub use id::SystemId;pub use contracts::Contract;pub use contracts::ContractContext;pub use contracts::ContractEvidence;pub use contracts::ContractReadContext;pub use contracts::ContractResult;pub use contracts::ContractState;pub use contracts::ContractViolation;pub use contracts::ContractWriteContext;pub use contracts::DeliveryContract;pub use contracts::DivergenceContract;pub use contracts::DivergenceThresholds;pub use contracts::HashMismatch;pub use contracts::SourceContract;pub use contracts::TransportContract;pub use contracts::ViolationCause;pub use control_middleware::CircuitBreakerContractInfo;pub use control_middleware::CircuitBreakerContractMode;pub use control_middleware::CircuitBreakerMetrics;pub use control_middleware::ControlMiddlewareProvider;pub use control_middleware::NoControlMiddleware;pub use control_middleware::RateLimiterMetrics;pub use chrono;
Modules§
- ai
- Provider-agnostic AI contracts and utilities.
- build_
info - Build and version information.
- contracts
- control_
middleware - Traits and DTOs for control middleware (circuit breaker, rate limiter).
- error
- Common error handling types for ObzenFlow
- event
- Core event types
- http_
client - Core outbound HTTP client abstractions.
- id
- Strongly typed identifiers for core domain entities
- journal
- Core journal abstractions
- metrics
- Metrics traits and types for the core domain
- time
- Time-related types for consistent duration handling
- web
- Core web server abstractions
Structs§
- Ulid
- A Ulid is a unique 128-bit lexicographically sortable identifier