Rapports et gestion des erreurs

- skills/reporting.py : REPORT: / REPORT_ERRORS: avec historique SQLite
- skills/delegate.py : log des exécutions + détection erreurs + notification MQTT
- skills/schedule_tasks.py : log des tâches planifiées
- agent1.py : abonnement agents/errors + agents/scheduler/notifications → alerte XMPP
- cli.py : commandes /report et /errors
- system_prompt.txt : REPORT: et REPORT_ERRORS: ajoutés

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 13:20:32 +00:00
parent 305999d8bf
commit 144f481320
6 changed files with 245 additions and 23 deletions
+13 -1
View File
@@ -115,7 +115,7 @@ def main_loop(agent: str):
connect_mqtt()
console.print(Rule("[bold blue]Agent CLI[/bold blue]"))
console.print("[dim]Agent cible : [bold]{}[/bold] | /reset | /plans | /quit[/dim]\n".format(agent))
console.print("[dim]Agent cible : [bold]{}[/bold] | /reset | /plans | /report | /errors | /agent <nom> | /quit[/dim]\n".format(agent))
while True:
try:
@@ -142,6 +142,18 @@ def main_loop(agent: str):
print_response("plans", result)
continue
if user_input == "/report":
with console.status("[bold yellow]Génération rapport...[/bold yellow]"):
result = send_and_wait("agent1", "REPORT:", timeout=30)
print_response("rapport", result)
continue
if user_input == "/errors":
with console.status("[bold yellow]Récupération erreurs...[/bold yellow]"):
result = send_and_wait("agent1", "REPORT_ERRORS:", timeout=30)
print_response("erreurs", result)
continue
if user_input.startswith("/agent "):
agent = user_input.split(" ", 1)[1].strip()
console.print("[dim]Agent changé : [bold]{}[/bold][/dim]".format(agent))