Files
agent-maxim/agent/planner/step_selector.py
T
Anton 052591281d Initial clean version - Agent Maxim
- Complete agent system with planning and execution
- Bridge API with FastAPI server
- WhatsApp-style mobile dashboard
- Enhanced web search with query improvement
- Security guards and policy checks
- Comprehensive documentation
2026-04-09 18:07:43 +03:00

15 lines
436 B
Python

"""Step selector — picks the next pending step from a plan."""
from __future__ import annotations
from typing import Optional
from core.state import Plan, PlanStep, StepStatus
def select_next_step(plan: Plan) -> Optional[PlanStep]:
"""Return the first step with PENDING status, or None if all steps are done."""
for step in plan.steps:
if step.status == StepStatus.PENDING:
return step
return None