From 410a6019482d2e51ff8fe60fb9842d8db93436dd Mon Sep 17 00:00:00 2001 From: gitadmin Date: Sun, 27 Sep 2026 03:07:21 +0000 Subject: [PATCH] Add the run loop skeleton --- runner.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 runner.py diff --git a/runner.py b/runner.py new file mode 100644 index 0000000..964dfb6 --- /dev/null +++ b/runner.py @@ -0,0 +1,26 @@ +"""Entry point for a single scenario run.""" + +from dataclasses import dataclass + + +@dataclass +class Step: + action: str + target: str + note: str = "" + + +def run(scenario: str, site: str, max_steps: int = 40) -> list[Step]: + """Walk one scenario against one site and return the steps that were taken.""" + steps: list[Step] = [] + for _ in range(max_steps): + step = decide(site, steps) + if step is None: + break + steps.append(step) + return steps + + +def decide(site: str, history: list[Step]) -> Step | None: + """Pick the next action, or None when the journey is finished.""" + raise NotImplementedError