feat: expose interrupt contracts in run inspect

This commit is contained in:
lda
2026-07-01 05:58:02 +07:00 Verified
parent b16676665d
commit 00ea4daa5e
3 changed files with 32 additions and 1 deletions
+2
View File
@@ -387,6 +387,8 @@ def _interrupt_payload(run: RunState) -> dict[str, Any] | None:
"""Return a JSON-safe interrupt payload for the current run, if paused."""
if run.interrupt is None:
return None
# The interrupt contract is copied into RunState at pause time so clients
# can render/resume without reloading mutable workflow definitions.
payload = asdict(run.interrupt)
route = payload.get("route")
if isinstance(route, dict) and "workflow_ref" in route: