from pydantic import BaseModel, Field, field_validator


class AgentCardKeyUpdate(BaseModel):
    agent_remark: str | None = Field(default=None, max_length=255)

    @field_validator("agent_remark")
    @classmethod
    def normalize_agent_remark(cls, value: str | None) -> str | None:
        if value is None:
            return None
        stripped = value.strip()
        return stripped or None
