from __future__ import annotations

from abc import ABC, abstractmethod
from typing import Any, Generic, TypeVar


TContext = TypeVar("TContext")


class WorkflowStep(ABC, Generic[TContext]):
    step_id = ""
    title = ""

    @abstractmethod
    async def run(self, context: TContext) -> TContext:
        raise NotImplementedError

    def trace_input(self, context: TContext) -> dict[str, Any]:
        return {}

    def trace_output(self, context: TContext) -> dict[str, Any]:
        return {}
