from dataclasses import dataclass
from datetime import datetime
from typing import Any


@dataclass(frozen=True)
class AgentThread:
    id: str
    owner_type: str
    owner_id: str
    persona: str
    title: str
    status: str
    created_at: datetime
    updated_at: datetime


@dataclass(frozen=True)
class AgentMessage:
    id: str
    thread_id: str
    role: str
    content: str
    metadata: dict[str, Any]
    created_at: datetime


@dataclass(frozen=True)
class AgentRun:
    id: str
    request_id: str
    thread_id: str
    trace_id: str | None
    persona: str
    status: str
    input: dict[str, Any]
    output: dict[str, Any] | None
    error_code: str | None
    created_at: datetime
    completed_at: datetime | None
