feat(system): stderr routing migration Phase 3 — 10 branches migrated (FPLAN-0033)

Migrated error()/warning() calls across 10 branches to use CLI display API
which routes to stderr. 48 files modified across ai_mail, api, backup, daemon,
flow, memory, prax, seedgo, spawn, trigger. Seedgo stderr_routing standard
created (24th standard) with full-file scanning. System average 49% → 69%.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AIOSAI
2026-03-14 00:41:38 -07:00
co-authored by Claude Opus 4.6
parent 154e92d13e
commit 97952124b5
48 changed files with 666 additions and 226 deletions
+2 -2
View File
@@ -185,7 +185,7 @@ def handle_command(command: str, args: list) -> bool:
Returns:
True if command was handled, False otherwise
"""
from aipass.cli.apps.modules import console
from aipass.cli.apps.modules import console, error
# Handle module-name routing (drone @trigger core <subcmd>)
if command == "core":
@@ -203,7 +203,7 @@ def handle_command(command: str, args: list) -> bool:
if command == "fire":
if not args:
console.print("[red]Usage: drone @trigger fire <event> [key=value ...][/red]")
error("Usage: drone @trigger fire <event> [key=value ...]")
return True
event_name = args[0]
# Parse key=value pairs from remaining args
+5 -7
View File
@@ -147,7 +147,7 @@ def handle_command(command: str, args: list) -> bool:
Returns:
True if command was handled, False otherwise
"""
from aipass.cli.apps.modules import console
from aipass.cli.apps.modules import console, error
if command != "errors":
return False
@@ -170,8 +170,7 @@ def handle_command(command: str, args: list) -> bool:
if sub in routes:
return routes[sub](console, rest)
console.print(f"[red]Unknown subcommand: {sub}[/red]")
console.print("Run [dim]drone @trigger errors help[/dim] for available commands")
error(f"Unknown subcommand: {sub}", suggestion="Run 'drone @trigger errors help' for available commands")
return True
@@ -229,16 +228,15 @@ def _cmd_list(console, args: list) -> bool:
def _cmd_detail(console, args: list) -> bool:
"""Show full error details for a fingerprint or ID."""
from rich.panel import Panel
from aipass.cli.apps.modules import error
if not args:
console.print("[red]Missing error ID or fingerprint[/red]")
console.print("Usage: drone @trigger errors detail <id_or_fingerprint>")
error("Missing error ID or fingerprint", suggestion="Usage: drone @trigger errors detail <id_or_fingerprint>")
return True
entry = _find_by_id_or_fp(args[0])
if not entry:
console.print(f"[red]Error not found:[/red] {args[0]}")
console.print(" [dim]Try a fingerprint prefix, full fingerprint, or short ID[/dim]")
error(f"Error not found: {args[0]}", suggestion="Try a fingerprint prefix, full fingerprint, or short ID")
return True
st = entry.get("status", "?")
+2 -4
View File
@@ -27,7 +27,7 @@ from typing import List, Any
from aipass.prax.apps.modules.logger import system_logger as logger
# CLI services for formatted output
from aipass.cli.apps.modules import console, header
from aipass.cli.apps.modules import console, header, error
# =============================================================================
# MODULE DISCOVERY
@@ -209,9 +209,7 @@ def main():
return 0
else:
console.print()
console.print(f"[red]Unknown command: {command}[/red]")
console.print()
console.print("Run [dim]python3 trigger.py --help[/dim] for available commands")
error(f"Unknown command: {command}", suggestion="Run 'python3 trigger.py --help' for available commands")
console.print()
return 1