You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415
  1. import uuid
  2. from dataclasses import dataclass, field
  3. from core.workflow.enums import NodeState
  4. @dataclass
  5. class Edge:
  6. """Edge connecting two nodes in a workflow graph."""
  7. id: str = field(default_factory=lambda: str(uuid.uuid4()))
  8. tail: str = "" # tail node id (source)
  9. head: str = "" # head node id (target)
  10. source_handle: str = "source" # source handle for conditional branching
  11. state: NodeState = field(default=NodeState.UNKNOWN) # edge execution state