pub fn validate_workflow(ir: &WorkflowIr) -> IrResult<()>Expand description
Validate a WorkflowIr. Returns Ok(()) if valid, Err with the first violation found otherwise.
Validation rules:
- workflow_id and version are non-empty; version is valid semver
- No duplicate node ids
- start_node exists in nodes
- All edge targets exist
- All nodes are reachable from start_node
- All paths from start lead to a terminal node (“end” or a terminal kind)
- All tool_ref, model_ref, agent_ref resolve to known definitions
- All MCP servers referenced by mcp_tool nodes are configured
- All remote agents referenced by a2a_task nodes are configured