Spaces:
Runtime error
Runtime error
Download src/backend/models/escalation.py from HAK-Tech/ciro-backend: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/spaces/HAK-Tech/ciro-backend/resolve/main/src/backend/models/escalation.py
- Command line
-
hf download hf://spaces/HAK-Tech/ciro-backend/src/backend/models/escalation.py
-
curl -L -o escalation.py https://huggingface.co/spaces/HAK-Tech/ciro-backend/resolve/main/src/backend/models/escalation.py
1.21 kB
| """ | |
| EscalationResult — output contract for Phase 11's NGO escalation service. | |
| Consumed by: | |
| Phase 12 for simulation context | |
| Phase 13 agent trace log (ngos_alerted field) | |
| Mobile agent-trace timeline (escalation step) | |
| """ | |
| from __future__ import annotations | |
| from pydantic import BaseModel, ConfigDict | |
| class EscalationResult(BaseModel): | |
| """Outcome of the NGO escalation evaluation for a confirmed crisis. | |
| Attributes: | |
| escalated: True iff at least one NGO FCM notification was sent. | |
| reason: One sentence explaining why escalation did or did not | |
| fire. Rendered in the agent-trace UI. | |
| ngos_alerted: Names of NGOs that received a push notification. | |
| Empty when escalated=False. | |
| severity_score: The SituationReport.severity value evaluated against | |
| the threshold. | |
| threshold_used: The NGO_ESCALATION_THRESHOLD constant in effect when | |
| this result was produced. | |
| """ | |
| model_config = ConfigDict(frozen=True, extra="forbid") | |
| escalated: bool | |
| reason: str | |
| ngos_alerted: list[str] | |
| severity_score: int | |
| threshold_used: int | |