"""TrustMem exception hierarchy.

Multi-inherits from both TrustMemError and the stdlib exception
so that existing ``except KeyError`` / ``except ValueError`` handlers
continue to work (backward compatible).
"""


class TrustMemError(Exception):
    """Base exception for all TrustMem errors."""


class NotFoundError(TrustMemError, KeyError):
    """Memory or entity not found."""


class ValidationError(TrustMemError, ValueError):
    """Invalid input data."""


class PermissionDeniedError(TrustMemError, PermissionError):
    """Agent permission denied."""


class ConfigurationError(TrustMemError, RuntimeError):
    """Invalid configuration (missing API key, bad provider, etc.)."""
