"""Pydantic models for project management."""

from pydantic import BaseModel


class ProjectInfo(BaseModel):
    """Current project information."""

    name: str
    path: str


class OpenProjectRequest(BaseModel):
    """Request to open/switch to a different project."""

    path: str
    force: bool = False


class InitCheck(BaseModel):
    """Status of a single init prerequisite."""

    name: str
    ok: bool
    detail: str
    will_do: str | None = None


class InitStatusResponse(BaseModel):
    """Full init status for a directory."""

    path: str
    checks: list[InitCheck]
    ready: bool
    plan: list[str]


class InitRequest(BaseModel):
    """Request to initialize a project directory."""

    path: str


class InitStepResult(BaseModel):
    """Result of a single init step."""

    name: str
    action: str
    ok: bool


class InitResponse(BaseModel):
    """Result of project initialization."""

    status: str
    steps: list[InitStepResult]
    project: ProjectInfo

