From a34efb50e079ec54d7ed5123c9e4a4ac7d96a985 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 28 Mar 2026 23:13:35 +0100 Subject: [PATCH] Update notification service --- AppImage/scripts/notification_events.py | 2 +- AppImage/scripts/notification_templates.py | 39 ++++++++++++++++------ AppImage/scripts/startup_grace.py | 2 +- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/AppImage/scripts/notification_events.py b/AppImage/scripts/notification_events.py index 622589e4..fb84f5a6 100644 --- a/AppImage/scripts/notification_events.py +++ b/AppImage/scripts/notification_events.py @@ -28,7 +28,7 @@ from pathlib import Path # ─── Shared State for Cross-Watcher Coordination ────────────────── -# ─── Startup Grace Period ──────────────────────────────────────────────────── +# ─── Startup Grace Period ─────────────────���────────────────────────────────── # Import centralized startup grace management # This provides a single source of truth for all grace period logic import startup_grace diff --git a/AppImage/scripts/notification_templates.py b/AppImage/scripts/notification_templates.py index c289285d..6418a21c 100644 --- a/AppImage/scripts/notification_templates.py +++ b/AppImage/scripts/notification_templates.py @@ -1424,18 +1424,35 @@ HEALTH: Category + severity + what changed. Duration if resolved. VM/CT LIFECYCLE: Confirm event with key facts (1-2 lines). -═══ OUTPUT FORMAT (CRITICAL - parsers rely on exact structure) ═══ -[TITLE] -translated title here (NO [TITLE] text in actual title) -[BODY] -translated body here (NO [BODY] text in actual body) +═══ OUTPUT FORMAT (CRITICAL - MUST FOLLOW EXACTLY) ═══ + +Your response MUST have EXACTLY this structure: +[TITLE] +your translated title text +[BODY] +your translated body text + +ABSOLUTE RULES (violations break the parser): +1. [TITLE] and [BODY] are INVISIBLE PARSING MARKERS — they separate title from body +2. Your actual title/body content must NEVER contain the words "[TITLE]" or "[BODY]" +3. Your actual title/body content must NEVER contain "Title:" or "Body:" prefixes +4. Line 1: write exactly [TITLE] +5. Line 2: write your title text (emoji + hostname: description) +6. Line 3: write exactly [BODY] +7. Line 4+: write your body text + +WRONG (markers appear in content): +[TITLE] +🔵 server: [TITLE] Updates available +[BODY] +[BODY] 153 updates available + +CORRECT (markers are separators only): +[TITLE] +🔵 server: Updates available +[BODY] +153 updates available -CRITICAL RULES: -- [TITLE] and [BODY] are PARSING MARKERS ONLY — they must NOT appear in your actual content -- Write [TITLE] on line 1, title text on line 2 (no blank line between) -- Write [BODY] on line 3, body text starting line 4 (no blank line between) -- Do NOT write "Title:", "Body:", "[TITLE]", "[BODY]" inside the translated text -- Do NOT include markers in emojis line: WRONG "🔽[TITLE] server shutdown" → RIGHT "🔽 server shutdown" - Output ONLY the formatted result — no explanations, no "Original:", no commentary""" # Addon for experimental suggestions mode diff --git a/AppImage/scripts/startup_grace.py b/AppImage/scripts/startup_grace.py index 203be07b..33a92df8 100644 --- a/AppImage/scripts/startup_grace.py +++ b/AppImage/scripts/startup_grace.py @@ -291,7 +291,7 @@ def is_real_system_boot() -> bool: return _state.is_real_system_boot() -# ─── Startup Report Collection ─────────────────────────────────────────────��─ +# ─── Startup Report Collection ─────────────────────────────────────────────── def collect_startup_report() -> dict: """