system-prompts-and-models-o.../dealix/auto_client_acquisition/customer_ops/incident_router.py
Sami Assiri b13cb389cc feat(dealix): sync full Dealix package to repo
- API routers, ACA modules, integrations (draft operators)
- Docs, landing pages, scripts (launch readiness, scorecard)
- Tests and CI workflow updates for Dealix

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-01 21:01:17 +03:00

26 lines
1016 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Incident routing stub (no paging, no secrets)."""
from __future__ import annotations
from typing import Any
def build_incident_playbook() -> dict[str, Any]:
return {
"steps_ar": [
"تصنيف الخطورة (P0P3) وفق وصف الحادث.",
"إيقاف أي إجراء live إن وُجد حتى التحقق.",
"توثيق الوقت، التأثير، والخطوات المتخذة (بدون أسرار أو PII خام).",
"إشعار العميل بلغة واضحة وخطة تعافي.",
"مراجعة لاحقة وتحديث السياسات/الاختبارات إن لزم.",
],
"contacts_placeholder_ar": "يُحدَّد في العقد: بريد دعم + قناة طوارئ للـ P0.",
}
def classify_incident(severity: str) -> dict[str, Any]:
s = (severity or "P3").upper()
if s not in {"P0", "P1", "P2", "P3"}:
s = "P3"
return {"severity": s, "escalate": s in {"P0", "P1"}}