2025-07-31 11:43:05 -04:00
|
|
|
import typing as t
|
2025-07-28 10:23:02 -04:00
|
|
|
from datetime import datetime
|
|
|
|
|
|
2025-07-29 09:32:52 -04:00
|
|
|
from pydantic import BaseModel, ConfigDict
|
2025-07-28 10:23:02 -04:00
|
|
|
|
2025-07-31 11:43:05 -04:00
|
|
|
DebugSessionStatus = t.Literal["created", "completed"]
|
|
|
|
|
|
2025-07-28 10:23:02 -04:00
|
|
|
|
2025-08-28 20:05:24 -04:00
|
|
|
class BlockRun(BaseModel):
|
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
|
|
|
|
block_label: str
|
|
|
|
|
output_parameter_id: str
|
|
|
|
|
workflow_run_id: str
|
|
|
|
|
created_at: datetime
|
|
|
|
|
|
|
|
|
|
|
2025-07-28 10:23:02 -04:00
|
|
|
class DebugSession(BaseModel):
|
2025-07-29 09:32:52 -04:00
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
2025-07-28 10:23:02 -04:00
|
|
|
debug_session_id: str
|
|
|
|
|
browser_session_id: str
|
2025-09-12 21:16:48 +08:00
|
|
|
vnc_streaming_supported: bool | None = None
|
2025-07-29 09:32:52 -04:00
|
|
|
workflow_permanent_id: str | None = None
|
2025-07-28 10:23:02 -04:00
|
|
|
created_at: datetime
|
|
|
|
|
modified_at: datetime
|
2025-07-31 11:43:05 -04:00
|
|
|
deleted_at: datetime | None = None
|
|
|
|
|
status: DebugSessionStatus
|
2025-10-16 08:24:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class DebugSessionRun(BaseModel):
|
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
|
|
|
|
ai_fallback: bool | None = None
|
|
|
|
|
block_label: str
|
|
|
|
|
browser_session_id: str
|
|
|
|
|
code_gen: bool | None = None
|
|
|
|
|
debug_session_id: str
|
|
|
|
|
failure_reason: str | None = None
|
|
|
|
|
output_parameter_id: str
|
|
|
|
|
run_with: str | None = None
|
|
|
|
|
script_run_id: str | None = None
|
|
|
|
|
status: str
|
|
|
|
|
workflow_id: str
|
|
|
|
|
workflow_permanent_id: str
|
|
|
|
|
workflow_run_id: str
|
|
|
|
|
# --
|
|
|
|
|
created_at: datetime
|
|
|
|
|
queued_at: datetime | None = None
|
|
|
|
|
started_at: datetime | None = None
|
|
|
|
|
finished_at: datetime | None = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DebugSessionRuns(BaseModel):
|
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
|
|
|
|
debug_session: DebugSession
|
|
|
|
|
runs: list[DebugSessionRun]
|