Artifex/graph/runtime.py
2026-08-15 13:50:24 +07:00

24 lines
620 B
Python

from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
from uuid import UUID
class GraphRuntime(ABC):
"""Execution runtime boundary. LangGraph must stay behind this interface."""
@abstractmethod
async def start(self, project_id: UUID) -> str: ...
@abstractmethod
async def pause(self, run_id: str) -> None: ...
@abstractmethod
async def resume(self, run_id: str) -> None: ...
@abstractmethod
async def cancel(self, run_id: str) -> None: ...
@abstractmethod
async def signal(self, run_id: str, event: dict[str, Any]) -> None: ...