"""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 CouncilDecisionReceipt(BaseModel):
    """Council authorization decision."""

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

    # Council-specific fields
    decision_type: str  # "authorization"
    subject_id: str  # Actor ID being authorized
    decision: str  # "approved", "denied", "constrained"
    confidence: float  # [0.0, 1.0] decision confidence
    reasoning: str  # Human-readable reasoning
    reputation_delta: float  # [-1.0, +1.0] proposed adjustment
    constraint_proposal: Optional[Dict[str, Any]] = None    # Constraints if "constrained"
