from __future__ import annotations


class SecurityBlockError(RuntimeError):
    """
    Raised when AgentID guard blocks the request.
    """

    def __init__(self, reason: str | None = None):
        self.reason = reason
        super().__init__(reason or "AgentID: Security Blocked")


class SecurityViolationException(RuntimeError):
    """
    Raised when local capability enforcement blocks or redacts by policy.
    """

    def __init__(self, reason: str | None = None):
        self.reason = reason
        super().__init__(reason or "AgentID: Security policy violation")
