fabricatio_webui.executor

Workflow executor for the fabricatio-webui ComfyUI-style workflow editor.

Parses workflow JSON, instantiates Action nodes, topologically sorts them, and executes in order while streaming lifecycle events via a callback.

Classes

WorkflowExecutor

Executes a workflow graph described by JSON.

Module Contents

class fabricatio_webui.executor.WorkflowExecutor

Executes a workflow graph described by JSON.

Parameters:
  • workflow_json – the workflow descriptor ({"nodes": […], "edges": […]}").

  • event_callbackasync def(event_type: str, payload: dict) called on lifecycle events.

classmethod new(workflow_json: Dict[str, Any], event_callback: Callable[[str, Dict[str, Any]], Coroutine[Any, Any, None]]) WorkflowExecutor

Create a new executor from a workflow JSON descriptor.

async execute() Dict[str, Any]

Execute the workflow and return the final context dictionary.