from __future__ import annotations

from pydantic import BaseModel, Field

from ai_orchestrator.schemas.task_state import ArtifactRecord
from ai_orchestrator.schemas.task_status import TaskLifecycleStatus


class TaskResultResponse(BaseModel):
    task_id: str
    status: TaskLifecycleStatus
    summary: str | None = None
    artifacts: list[ArtifactRecord] = Field(default_factory=list)
    error_message: str | None = None
