(
self,
phases_meta: Optional[list[dict]] = None,
*,
on_change: Callable[["WorkflowProgress"], None] | None = None,
)
| 65 | |
| 66 | class WorkflowProgress: |
| 67 | def __init__( |
| 68 | self, |
| 69 | phases_meta: Optional[list[dict]] = None, |
| 70 | *, |
| 71 | on_change: Callable[["WorkflowProgress"], None] | None = None, |
| 72 | ) -> None: |
| 73 | # Seed declared phases (from meta.phases) so the tree shows them before |
| 74 | # any agent runs; phase() started later by title reuses the same record. |
| 75 | self._phases: list[PhaseRecord] = [ |
| 76 | PhaseRecord(title=p.get("title", ""), detail=p.get("detail")) |
| 77 | for p in (phases_meta or []) |
| 78 | if isinstance(p, dict) and p.get("title") |
| 79 | ] |
| 80 | self._logs: list[str] = [] |
| 81 | self._current_phase: Optional[str] = None |
| 82 | self._on_change = on_change |
| 83 | |
| 84 | # ── mutations ────────────────────────────────────────────────────────── |
| 85 | def start_phase(self, title: str) -> None: |
nothing calls this directly
no test coverage detected