pub struct WorkflowDef {
pub name: String,
pub title: Option<String>,
pub description: String,
pub trigger: WorkflowTrigger,
pub targets: Vec<String>,
pub group: Option<String>,
pub inputs: Vec<InputDecl>,
pub body: Vec<WorkflowNode>,
pub always: Vec<WorkflowNode>,
pub source_path: String,
}Expand description
A complete workflow definition parsed from a .wf file.
Fields§
§name: String§title: Option<String>§description: String§trigger: WorkflowTrigger§targets: Vec<String>§group: Option<String>§inputs: Vec<InputDecl>§body: Vec<WorkflowNode>§always: Vec<WorkflowNode>§source_path: StringImplementations§
Source§impl WorkflowDef
impl WorkflowDef
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Returns the human-readable display name for this workflow.
Falls back to name if no title is set.
Sourcepub fn total_nodes(&self) -> usize
pub fn total_nodes(&self) -> usize
Total number of nodes across body and always blocks.
Sourcepub fn top_level_steps(&self) -> usize
pub fn top_level_steps(&self) -> usize
Number of top-level steps (body + always, non-recursive).
Better for user-facing progress display than total_nodes().
Sourcepub fn max_iterations_for_step(&self, step_name: &str) -> Option<u32>
pub fn max_iterations_for_step(&self, step_name: &str) -> Option<u32>
Find the max_iterations of the do-while or while loop that owns
the step with the given name. Returns None if the step is not
inside a loop or the step name is not found.
Sourcepub fn collect_all_snippet_refs(&self) -> Vec<String>
pub fn collect_all_snippet_refs(&self) -> Vec<String>
Collect all prompt snippet references across body and always blocks, sorted and deduplicated.
Sourcepub fn collect_all_schema_refs(&self) -> Vec<String>
pub fn collect_all_schema_refs(&self) -> Vec<String>
Collect all output schema references across body and always blocks, sorted and deduplicated.
Sourcepub fn collect_all_agent_refs(&self) -> Vec<AgentRef>
pub fn collect_all_agent_refs(&self) -> Vec<AgentRef>
Collect all agent references across body and always blocks, sorted and deduplicated.
Sourcepub fn collect_all_as_identities(&self) -> Vec<String>
pub fn collect_all_as_identities(&self) -> Vec<String>
Collect all as_identity values referenced across body and always blocks, sorted and deduplicated.
Sourcepub fn collect_all_plugin_dirs(&self) -> Vec<String>
pub fn collect_all_plugin_dirs(&self) -> Vec<String>
Collect all plugin_dirs from call nodes across body and always blocks, sorted and deduplicated.
Trait Implementations§
Source§impl Clone for WorkflowDef
impl Clone for WorkflowDef
Source§fn clone(&self) -> WorkflowDef
fn clone(&self) -> WorkflowDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more