from pydantic import BaseModel, Field from datetime import datetime from typing import Literal, List, Dict, Optional import uuid class Repo(BaseModel): id: str = Field(default_factory=lambda: str(uuid.uuid4())) namespace: str repo: str class MetricPoint(BaseModel): timestamp: datetime cpu_usage_pct: float memory_used_bytes: int memory_total_bytes: int class RepoStatus(BaseModel): state: Literal["CONNECTED", "DISCONNECTED", "ERROR"] stage: str last_updated: datetime