Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions kora_cli/alerts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
"""Alert aggregation — KR-ALERTS-PANEL-FLIP.
"""Alert aggregation + push-notification surface.

Aggregates operator-attention signals from the 5 existing data
sources (OperationalStateHolder + cost-ladder holder + HealthRollup
+ audit JSONL + heartbeat probe snapshots) into the FE's
``Alert`` shape from ``web/src/lib/api.ts``.
Aggregator (KR-ALERTS-PANEL-FLIP): operator-attention signals
from the 5 data sources (OperationalStateHolder + cost-ladder
holder + HealthRollup + audit JSONL + heartbeat probe snapshots)
projected to the FE's ``Alert`` shape from ``web/src/lib/api.ts``.

Notifier (KR-ALERT-NOTIFY): periodic task that diffs the active
alert set + pushes newly-firing alerts to Joshua via Slack DM
(critical / warning) or email (info).

Public surface:
* :class:`Alert` — wire-shape dataclass mirroring the TS interface
* :func:`compute_active_alerts` — single-call aggregator the
endpoint consumes
* :class:`AlertNotifier` + :class:`NotificationCycleResult` +
:class:`DispatchOutcome` — push-notification surface
"""

from kora_cli.alerts.aggregator import Alert, compute_active_alerts
from kora_cli.alerts.notifier import (
AlertNotifier,
DispatchOutcome,
NotificationCycleResult,
)

__all__ = ["Alert", "compute_active_alerts"]
__all__ = [
"Alert",
"AlertNotifier",
"DispatchOutcome",
"NotificationCycleResult",
"compute_active_alerts",
]
Loading