feat: add graph workflow fallback and retry metadata

This commit is contained in:
2026-04-07 10:56:45 +02:00
parent c17b7d2e8f
commit f9d4da52b9
9 changed files with 473 additions and 39 deletions
@@ -17,6 +17,8 @@ _PRESET_TYPES = {
"custom",
}
_EXECUTION_MODES = {"legacy", "graph", "shadow"}
_NODE_TYPE_TO_STEP: dict[str, str] = {
"inputNode": StepName.RESOLVE_STEP_PATH.value,
"convertNode": StepName.STL_CACHE_GENERATE.value,
@@ -243,6 +245,15 @@ def get_workflow_preset_type(config: dict[str, Any]) -> str | None:
return None
def get_workflow_execution_mode(config: dict[str, Any], *, default: str = "legacy") -> str:
canonical = canonicalize_workflow_config(config)
ui = canonical.get("ui") or {}
mode = ui.get("execution_mode")
if mode in _EXECUTION_MODES:
return mode
return default
def extract_runtime_workflow(config: dict[str, Any]) -> tuple[str | None, dict[str, Any]]:
canonical = canonicalize_workflow_config(config)
preset = get_workflow_preset_type(canonical)