fix(agent99): route lifecycle alerts through canonical gateway
This commit is contained in:
@@ -40,7 +40,9 @@ class Agent99CompletionCallbackRequest(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid", str_strip_whitespace=True)
|
||||
|
||||
schema_version: Literal["agent99_completion_callback_v1"]
|
||||
callback_id: str = Field(min_length=3, max_length=180, pattern=r"^[A-Za-z0-9_.:-]+$")
|
||||
callback_id: str = Field(
|
||||
min_length=3, max_length=180, pattern=r"^[A-Za-z0-9_.:-]+$"
|
||||
)
|
||||
project_id: str = Field(default="awoooi", min_length=1, max_length=64)
|
||||
run_id: str = Field(min_length=3, max_length=180)
|
||||
trace_id: str = Field(min_length=3, max_length=180)
|
||||
@@ -71,3 +73,50 @@ class Agent99CompletionCallbackRequest(BaseModel):
|
||||
telegram: Agent99TelegramReceipt = Field(default_factory=Agent99TelegramReceipt)
|
||||
problem: Agent99ProblemReceipt = Field(default_factory=Agent99ProblemReceipt)
|
||||
occurred_at: datetime
|
||||
|
||||
|
||||
class Agent99TelegramLifecycleRequest(BaseModel):
|
||||
"""Bounded Agent99 event card handed to the canonical Telegram gateway."""
|
||||
|
||||
model_config = ConfigDict(extra="forbid", str_strip_whitespace=True)
|
||||
|
||||
schema_version: Literal["agent99_telegram_lifecycle_v1"]
|
||||
delivery_id: str = Field(
|
||||
min_length=12,
|
||||
max_length=180,
|
||||
pattern=r"^[A-Za-z0-9_.:-]+$",
|
||||
)
|
||||
project_id: Literal["awoooi"] = "awoooi"
|
||||
incident_id: str = Field(
|
||||
min_length=3,
|
||||
max_length=180,
|
||||
pattern=r"^[A-Za-z0-9_.:-]+$",
|
||||
)
|
||||
fingerprint: str = Field(min_length=8, max_length=160)
|
||||
event_type: str = Field(
|
||||
min_length=2,
|
||||
max_length=96,
|
||||
pattern=r"^[A-Za-z0-9_.:-]+$",
|
||||
)
|
||||
severity: Literal["info", "warning", "critical"]
|
||||
lifecycle: Literal[
|
||||
"detected",
|
||||
"investigating",
|
||||
"remediating",
|
||||
"verifying",
|
||||
"recovered",
|
||||
"blocked",
|
||||
"unknown",
|
||||
]
|
||||
state_key: str = Field(min_length=3, max_length=96)
|
||||
run_id: str | None = Field(default=None, max_length=180)
|
||||
title: str = Field(min_length=1, max_length=120)
|
||||
target: str = Field(min_length=1, max_length=120)
|
||||
impact: str = Field(min_length=1, max_length=300)
|
||||
action: str = Field(min_length=1, max_length=360)
|
||||
verification: str = Field(min_length=1, max_length=300)
|
||||
duration_text: str = Field(min_length=1, max_length=80)
|
||||
occurrences: int = Field(default=1, ge=1, le=1_000_000)
|
||||
next_update: str = Field(min_length=1, max_length=300)
|
||||
reply_to_message_id: int | None = Field(default=None, ge=1)
|
||||
occurred_at: datetime
|
||||
|
||||
Reference in New Issue
Block a user