from pydantic import BaseModel, Field, model_validator, PrivateAttr from typing import Literal, TypeAlias, get_args, List, Generator, Iterator, AsyncGenerator, TYPE_CHECKING, Optional, ClassVar from typing_extensions import Annotated from abc import ABC, abstractmethod from typing_extensions import Annotated import logging from .base import Agent, registry from .. conversation import Conversation from .. message import Message class Resume(Agent): agent_type: Literal["resume"] = "resume" _agent_type: ClassVar[str] = agent_type # Add this for registration resume: str = "" @model_validator(mode="after") def validate_resume(self): if not self.resume.strip(): raise ValueError("Resume content cannot be empty") return self def get_resume(self) -> str: """Get the resume content.""" return self.resume def set_resume(self, resume: str) -> None: """Set the resume content.""" self.resume = resume # Register the base agent registry.register(Resume._agent_type, Resume)