"""Auto-generated from LOOM_CONTRACT.md by contract_compiler.py vv1.1.0"""

from pydantic import BaseModel, Field
from datetime import datetime
from typing import List, Dict, Optional, Any

class GuardianReceipt(BaseModel):
    """Guardian constitutional vetting decision."""

    # Standard receipt fields
    receipt_id: str
    receipt_type: str = "guardian.verdict.v1"
    loomdip: str = "pending"
    signature: str = "unsigned"
    valid_time: datetime = Field(default_factory=datetime.utcnow)
    tier: str = "SIGNED"

    # Guardian-specific fields
    decision: Dict[str, bool]  # {"allow": False}
    dignity: float  # 0.0 - 1.0
    reasons: List[str]  # Why refused
    recourse: List[str]  # How to fix
    policy_ref: str  # PolicyFreezeReceipt ID
    inputs: List[str]  # Event IDs that triggered this
