File size: 445 Bytes
aa61824 afa4de7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from typing import Literal
from pydantic import BaseModel, Field
class IntentSimulation(BaseModel):
action: Literal[
"restart_service", "scale_out", "rollback", "alert_team"
] = Field(..., description="Proposed action")
target: str = Field(..., description="Target component")
class IntentSimulationResponse(BaseModel):
risk_score: float
recommendation: Literal["safe_to_execute", "requires_approval", "blocked"]
|