Helper method to collect nodes in executable order
(graph: &WorkflowGraph)
| 2855 | |
| 2856 | /// Helper method to collect nodes in executable order |
| 2857 | fn collect_executable_nodes(graph: &WorkflowGraph) -> GraphBitResult<Vec<WorkflowNode>> { |
| 2858 | // Simple topological sort - can be enhanced for better parallelism |
| 2859 | let nodes: Vec<WorkflowNode> = graph.get_nodes().values().cloned().collect(); |
| 2860 | Ok(nodes) |
| 2861 | } |
| 2862 | |
| 2863 | /// Format LLM output for streaming lifecycle events. |
| 2864 | /// If tool calls are present, append them so function-call fragments are visible |