diff --git a/tools/responder.py b/tools/responder.py index decfd5e..2aa53b4 100644 --- a/tools/responder.py +++ b/tools/responder.py @@ -250,6 +250,22 @@ async def queue_notifications(limit=50): console.print(f"[green]Queued {count} new notifications.[/green]") console.print(f"Edit {DRAFTS_FILE} to draft responses.") + + # Wake Central for high-priority items if not already active + if count > 0: + high_items = [e for e in queue[:count] if e.get("priority") in ("CRITICAL", "HIGH")] + if high_items: + active_file = Path(__file__).parent.parent / ".central-active" + if not active_file.exists(): + try: + from tools.wake_central import wake_central + authors = ", ".join(set(e["author"] for e in high_items)) + wake_central( + f"{len(high_items)} high-priority mention(s) from: {authors}", + priority="HIGH" + ) + except Exception as e: + console.print(f"[dim]Wake failed: {e}[/dim]") def _load_sent_uris() -> set: """Load the set of URIs we've already replied to.""" diff --git a/tools/wake_central.py b/tools/wake_central.py index 1b4c897..77fbd34 100644 --- a/tools/wake_central.py +++ b/tools/wake_central.py @@ -82,9 +82,9 @@ Review the situation and take appropriate action. If this is a false alarm, ackn # Run the CLI in headless mode with -p try: - log(f"Invoking Letta Code CLI in headless mode") + log(f"Invoking Letta Code CLI in headless mode (yolo)") result = subprocess.run( - [cli, "-p", prompt, "--output-format", "text"], + [cli, "-p", prompt, "--yolo", "--max-turns", "10", "--output-format", "text"], capture_output=True, text=True, timeout=300, # 5 minute timeout