This commit is contained in:
2026-03-26 04:24:32 -03:00
parent 08b67f2bb7
commit 08c58a6a9d
43 changed files with 2627 additions and 252 deletions

View File

@@ -149,6 +149,64 @@ class JobComplete:
report: Optional[DetectionReportSummary] = None
@dataclass
class RunContext:
"""Run context injected into all SSE events for grouping."""
run_id: str
parent_job_id: str
run_type: str = "initial" # initial | replay | retry
# --- Checkpoint API types ---
@dataclass
class CheckpointInfo:
"""Available checkpoint for a stage."""
stage: str
@dataclass
class ReplayRequest:
"""Request to replay pipeline from a specific stage."""
job_id: str
start_stage: str
config_overrides: Optional[dict] = None
@dataclass
class ReplayResponse:
"""Result of a replay invocation."""
status: str
job_id: str
start_stage: str
detections: int = 0
brands_found: int = 0
@dataclass
class RetryRequest:
"""Request to queue async retry with different config."""
job_id: str
config_overrides: Optional[dict] = None
start_stage: str = "escalate_vlm"
schedule_seconds: Optional[float] = None
@dataclass
class RetryResponse:
"""Result of queueing a retry task."""
status: str
task_id: str
job_id: str
# --- Export lists for modelgen ---
DETECT_VIEWS = [
@@ -163,4 +221,10 @@ DETECT_VIEWS = [
LogEvent,
DetectionReportSummary,
JobComplete,
RunContext,
CheckpointInfo,
ReplayRequest,
ReplayResponse,
RetryRequest,
RetryResponse,
]