24 lines
649 B
Python
24 lines
649 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 | None = None, **kwargs: Any) -> 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: ...
|