"""Domain models for CleverAgents - auto-generated from Phase 0 stubs."""

from enum import StrEnum

from pydantic import Field

from ..base import DomainBaseModel


class AutoModeType(StrEnum):
    """Enum for auto mode types."""

    MANUAL = "manual"
    AUTO = "auto"
    GUIDED = "guided"


class PlanConfig(DomainBaseModel):
    """Data contract for PlanConfig."""

    auto_mode: AutoModeType = Field(..., alias="autoMode")
    editor: str = Field(...)
    editor_command: str = Field(..., alias="editorCommand")
    editor_args: list[str] = Field(alias="editorArgs", default_factory=list)
    editor_open_manually: bool = Field(..., alias="editorOpenManually")
    auto_continue: bool = Field(..., alias="autoContinue")
    auto_build: bool = Field(..., alias="autoBuild")
    auto_update_context: bool = Field(..., alias="autoUpdateContext")
    auto_context: bool = Field(..., alias="autoContext")
    smart_context: bool = Field(..., alias="smartContext")
    auto_apply: bool = Field(..., alias="autoApply")
    auto_commit: bool = Field(..., alias="autoCommit")
    skip_commit: bool = Field(..., alias="skipCommit")
    can_exec: bool = Field(..., alias="canExec")
    auto_exec: bool = Field(..., alias="autoExec")
    auto_debug: bool = Field(..., alias="autoDebug")
    auto_debug_tries: int = Field(..., alias="autoDebugTries")
    auto_revert_on_rewind: bool = Field(..., alias="autoRevertOnRewind")
    skip_changes_menu: bool = Field(..., alias="skipChangesMenu")


class ConfigSetting(DomainBaseModel):
    """Data contract for ConfigSetting."""

    name: str = Field(...)
    desc: str = Field(...)
    choices: list[str] | None = Field(default=None)
    hascustomchoice: bool = Field(...)
    sortkey: str = Field(...)
