Skip to main content

a3s_code_core/state_graph/
mod.rs

1//! Event-sourced reactive state graph for auditable agent workflows.
2//!
3//! The append-only [`GraphEventRecord`] stream is the source of truth. The
4//! in-memory [`StateGraph`] is only a projection and can always be rebuilt with
5//! [`GraphRuntime::strict_replay`].
6
7mod behavior;
8mod event;
9mod graph;
10mod runtime;
11mod store;
12mod types;
13
14pub use behavior::{Behavior, BehaviorContext, BehaviorError, EventFilter, FnBehavior};
15pub use event::{GraphEvent, GraphEventRecord, GRAPH_EVENT_SCHEMA_VERSION};
16pub use graph::{GraphDiff, ReplayError, StateGraph};
17pub use runtime::{
18    ExternalEvent, ExternalProjectionOutcome, GraphRuntime, RuntimeError, RuntimeLimits,
19};
20pub use store::{
21    graph_event_head, FileGraphEventStore, GraphEventStore, GraphSaveOutcome, MemoryGraphEventStore,
22};
23pub use types::{GraphObject, GraphPatch, GraphRelation, ObjectId, PatchOperation, RelationId};
24
25#[cfg(test)]
26mod tests;