Expand description
Graph building, compilation, and topology validation
This module provides the core graph construction API for Juncture. It includes:
StateGraph: Builder for constructing executable graphsCompiledGraph: Optimized, validated graph for execution- [
TopologyValidator]: Ensures graph structure is valid TopologyError: Validation failure details
§Examples
ⓘ
use juncture_core::{StateGraph, State, Node, IntoNode};
struct MyState;
impl State for MyState { type Update = MyStateUpdate; }
struct MyStateUpdate;
// Build a simple graph
let mut graph = StateGraph::<MyState>::new();
graph.add_node_simple("process", |state: MyState| async move {
Ok(MyStateUpdate)
});
graph.set_entry_point("process");
graph.set_finish_point("process");
// Compile and validate
let compiled = graph.compile()?;Structs§
- Circuit
Breaker Config - Circuit breaker configuration for node execution
- Circuit
Breaker State - Runtime state of a circuit breaker
- Compile
Config - Configuration for graph compilation
- Compiled
Graph - Compiled and validated graph ready for execution
- Drawable
Edge - Drawable edge for visualization
- Drawable
Graph - Drawable graph representation for export
- Drawable
Node - Drawable node for visualization
- Error
Handler Node - Node wrapper that adds error recovery handling
- Graph
Output - Output from graph execution
- Graph
Output Metadata - Metadata about graph execution
- Interrupt
Info - Information about a human-in-the-loop interrupt
- Node
Metadata - Metadata stored for each node during graph construction
- Retry
Policy - Retry policy for node execution
- Retrying
Node - Node wrapper that adds retry behavior
- State
Filter - Filter for state history queries
- State
Graph - Builder for constructing executable Juncture graphs
- State
Update - State update for manual checkpoint modifications
- Stream
Handle - Result of a streaming graph execution.
- Subgraph
Info - Information about a subgraph in a compiled graph
- Timeout
Node - Node wrapper that adds timeout enforcement
Enums§
- Circuit
State - Circuit breaker states
- Topology
Error - Topology validation errors
Functions§
- execute_
with_ retry - Execute an async operation with retry according to the given policy.
- execute_
with_ timeout - Execute an async operation with a timeout.