mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 09:24:44 +02:00
Phase 2.4: LLM-summarized digest with master toggle filter
- Remove severity-based fork; tee pattern sends all events to both dispatcher and accumulator - Add ToggleFilter before tee; drops events for disabled toggles - Rework DigestAccumulator: event log instead of active/resolved tracking - render_digest now async, calls LLM once per toggle with severity-ordered events - Fallback to count-based summary when LLM unavailable - Add TogglesConfig to config.py for master toggle settings - Update scheduler to await async render_digest - 75 tests passing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d6bc6b2b89
commit
9674e94efb
9 changed files with 858 additions and 1023 deletions
|
|
@ -484,6 +484,14 @@ class NotificationRuleConfig:
|
|||
channel_ids: list = field(default_factory=list)
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class TogglesConfig:
|
||||
"""Master toggle filter settings."""
|
||||
|
||||
enabled: list[str] = field(default_factory=list) # Toggle names that are enabled (empty = all)
|
||||
|
||||
|
||||
@dataclass
|
||||
class DigestConfig:
|
||||
"""Digest scheduler settings."""
|
||||
|
|
@ -500,6 +508,7 @@ class NotificationsConfig:
|
|||
quiet_hours_enabled: bool = True # Master toggle for quiet hours
|
||||
quiet_hours_start: str = "22:00"
|
||||
quiet_hours_end: str = "06:00"
|
||||
toggles: TogglesConfig = field(default_factory=TogglesConfig)
|
||||
digest: DigestConfig = field(default_factory=DigestConfig)
|
||||
rules: list = field(default_factory=list) # List of NotificationRuleConfig
|
||||
|
||||
|
|
@ -672,6 +681,8 @@ def _dict_to_dataclass(cls, data: dict):
|
|||
kwargs[key] = _dict_to_dataclass(FIRMSConfig, value)
|
||||
elif key == "dashboard" and isinstance(value, dict):
|
||||
kwargs[key] = _dict_to_dataclass(DashboardConfig, value)
|
||||
elif key == "toggles" and isinstance(value, dict):
|
||||
kwargs[key] = _dict_to_dataclass(TogglesConfig, value)
|
||||
elif key == "digest" and isinstance(value, dict):
|
||||
kwargs[key] = _dict_to_dataclass(DigestConfig, value)
|
||||
elif key == "notifications" and isinstance(value, dict):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue