1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Partial-update node results, commands, and interrupts.
//!
//! In the durable execution model a node no longer returns whole state. It
//! returns a [`NodeResult`], which is one of:
//!
//! - [`NodeResult::Update`]: a partial update merged through the graph reducer
//! at the superstep boundary.
//! - [`NodeResult::Command`]: a [`Command`] combining an optional update with
//! explicit routing (`goto`) and/or an interrupt resume value.
//! - [`NodeResult::Interrupt`]: an [`Interrupt`] that pauses the run for
//! human-in-the-loop input.
use crateNodeId;
/// The outcome of running a durable graph node.
/// A routing/update/resume directive returned from a node.
///
/// Commands combine three orthogonal effects:
///
/// - `update`: a partial state update applied through the reducer.
/// - `goto`: explicit next-node targets, overriding static/conditional edges.
/// - `resume`: a value paired with an interrupt resume (set on the caller side).
/// A human-in-the-loop pause point.
///
/// Interrupts require a checkpointer. When a node returns an interrupt the
/// executor persists a checkpoint at the boundary and returns control to the
/// caller; `CompiledGraph::resume` re-runs the interrupted node.