feat: "ARIA hart neu starten"-Button (docker restart aria-core)

Zweiter Eskalations-Button neben dem Reparieren-Button — fuer Faelle
wo doctor --fix nicht reicht (Run alive aber haengt im Tool-Call).
Mit Confirmation-Dialog damit's nicht versehentlich gedrueckt wird.

Wege:
- App-Settings: Reparatur-Sektion, zwei Buttons (Reparieren + Hart neu)
- App-Thinking-Bubble: 🔧 + 🚨 + Abbrechen
- Diagnostic-Thinking-Indicator: 🔧 + 🚨 + Abbrechen
- Diagnostic-Server: POST /api/aria-restart → child_process exec
  `docker restart aria-core`
- Bridge: rvs aria_restart → HTTP zu Diagnostic

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 01:58:44 +02:00
parent 7f862ce1f4
commit 2dd4d38dce
6 changed files with 104 additions and 1 deletions
+26
View File
@@ -1580,6 +1580,32 @@ class ARIABridge:
except Exception as e:
logger.warning("[rvs] file_saved konnte nicht an App gesendet werden: %s", e)
elif msg_type == "aria_restart":
# App-Button "ARIA hart neu starten" → docker restart aria-core
# via Diagnostic (der hat den Docker-Socket gemountet).
logger.warning("[rvs] aria_restart Request von App — harter Container-Restart")
try:
req = urllib.request.Request(
"http://localhost:3001/api/aria-restart",
data=b"{}",
method="POST",
headers={"Content-Type": "application/json"},
)
def _do_restart():
try:
with urllib.request.urlopen(req, timeout=45) as resp:
return resp.status, resp.read().decode("utf-8", errors="ignore")
except Exception as e:
return None, str(e)
status, body = await asyncio.get_event_loop().run_in_executor(None, _do_restart)
logger.info("[rvs] aria_restart Result: status=%s", status)
# Note: bei erfolgreichem Restart ist die RVS-Verbindung sehr
# wahrscheinlich kurz weg (aria-bridge ist im service:aria-Network).
# Die Antwort kommt evtl. nicht mehr durch — egal.
except Exception as e:
logger.warning("[rvs] aria_restart Weiterleitung fehlgeschlagen: %s", e)
return
elif msg_type == "doctor_fix":
# App-Button "ARIA reparieren" → openclaw doctor --fix anstossen.
# Bridge erreicht aria-core nicht via docker (kein docker-socket