Tracks one agent run.
| 128 | |
| 129 | @dataclass |
| 130 | class RunState: |
| 131 | """Tracks one agent run.""" |
| 132 | run_id: str |
| 133 | domain: str |
| 134 | intent: str |
| 135 | task_name: str |
| 136 | yaml_path: str |
| 137 | process: Optional[subprocess.Popen] = None |
| 138 | event_log_path: Optional[str] = None |
| 139 | workspace_output_dir: Optional[str] = None |
| 140 | steps: List[Dict[str, Any]] = field(default_factory=list) |
| 141 | status: str = "starting" |
| 142 | error: Optional[str] = None |
| 143 | started_at: float = 0.0 |
| 144 | # Paths to downloadable artefacts (set after completion) |
| 145 | zip_path: Optional[str] = None |
| 146 | pdf_path: Optional[str] = None |
| 147 | |
| 148 | |
| 149 | RUNS: Dict[str, RunState] = {} |