Artifex/graph/runtime.py

25 lines
649 B
Python
Raw Normal View History

2026-08-15 13:50:24 +07:00
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 | None = None, **kwargs: Any) -> str: ...
2026-08-15 13:50:24 +07:00
@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: ...