from __future__ import annotations

from app.modules.agent.orchestration.context.execution_context import ExecutionContext


class ProcessRunner:
    async def run(self, context: ExecutionContext, steps: list) -> None:
        for step in steps:
            should_run = getattr(step, "should_run", None)
            if callable(should_run) and not should_run(context):
                continue
            await step.run(context)
