from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Optional


class Priority(Enum):
    CRITICAL = 0
    HIGH = 1
    MEDIUM = 2
    LOW = 3


@dataclass
class ContextItem:
    content: str
    priority: Priority = Priority.MEDIUM
    role: str = "user"
    metadata: dict[str, Any] = field(default_factory=dict)
    token_count: Optional[int] = None
