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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//! Step execution types and logic for workflow runs.
//!
//! This module defines the types used to represent step execution results,
//! pause conditions, and execution options during workflow processing.
use crateBarrierOutcome;
use crateNodePartial;
use crate;
use crateNodeKind;
/// Result of executing one superstep in a session.
///
/// The embedded [`BarrierOutcome`] carries the canonical ordering of
/// updates/errors so callers can persist and resume without drift.
///
/// # Examples
///
/// ```rust,no_run
/// use weavegraph::runtimes::StepReport;
///
/// fn analyze_step(report: &StepReport) {
/// println!("Step {} completed", report.step);
/// println!("Ran {} nodes, skipped {}",
/// report.ran_nodes.len(),
/// report.skipped_nodes.len());
/// if report.completed {
/// println!("Workflow finished!");
/// }
/// }
/// ```
/// Options for controlling step execution behavior.
///
/// Use these options to implement human-in-the-loop workflows, debugging,
/// or step-by-step execution patterns.
///
/// # Examples
///
/// ```rust
/// use weavegraph::runtimes::StepOptions;
/// use weavegraph::types::NodeKind;
///
/// // Pause before a specific node
/// let options = StepOptions {
/// interrupt_before: vec![NodeKind::Custom("approval".into())],
/// interrupt_after: vec![],
/// interrupt_each_step: false,
/// };
/// ```
/// The reason why execution was paused.
///
/// When a workflow is paused (not completed), this enum indicates
/// why the pause occurred, enabling appropriate handling.
/// Extended step report when execution is paused.
///
/// Contains the full session state at the point of pause, allowing
/// inspection, modification, or later resumption.
/// Result of attempting to run a step.
///
/// Either the step completed normally, or execution was paused
/// for one of several reasons (human-in-the-loop, debugging, etc.).
/// Internal outcome from scheduler after normalization.
///
/// Contains ordered partials ready for barrier application.
pub