"""Durable turn statuses shared by the application and its stores.""" from enum import StrEnum class TurnStatus(StrEnum): QUEUED = "queued" RUNNING = "running" WAITING_INPUT = "waiting_input" COMPLETED = "completed" FAILED = "failed" CANCELLED = "cancelled" ACTIVE_TURN_STATUSES = frozenset({TurnStatus.QUEUED, TurnStatus.RUNNING, TurnStatus.WAITING_INPUT}) TERMINAL_TURN_STATUSES = frozenset({TurnStatus.COMPLETED, TurnStatus.FAILED, TurnStatus.CANCELLED}) ALL_TURN_STATUSES = ACTIVE_TURN_STATUSES | TERMINAL_TURN_STATUSES