petter2025's picture
Create intent_models.py
aa61824 verified
raw
history blame contribute delete
444 Bytes
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"]