from enum import Enum

from pydantic import BaseModel, Field

from ..typings import PydanticModelConfig


class AgenticActionWarningLevel(str, Enum):
    SAFE = "SAFE"
    MUTATION = "MUTATION"
    DESTRUCTION = "DESTRUCTION"


class AgenticActionPayload(BaseModel):
    model_config = PydanticModelConfig.default()
    message: str = Field(
        description="A simple, human-friendly message explaining why you want to do this action (used for confirmation). Don’t include IDs, keys, or technical terms due to most user may be complete out-of-context and non-developer."
    )
    warning_level: AgenticActionWarningLevel = Field(
        description="The level of warning associated with the action; When no data mutation/or descruction is involved, use SAFE; otherwise, use MUTATION or DESTRUCTION accordingly"
    )
