feat: Runtime-Config via Diagnostic UI — kein .env-Sync mehr

Framework fuer zentrale Runtime-Konfiguration:
- /api/runtime-config (GET/POST) persistiert in /shared/config/runtime.json
- Werte haben Vorrang ueber die ENV-Variablen aus aria.env
- Feldliste: RVS_HOST/PORT/TLS/TOKEN, ARIA_AUTH_TOKEN, WHISPER_MODEL/LANGUAGE
- Atomic write (tmp + rename) fuer Konsistenz

Bridge:
- load_config() liest nach aria.env noch runtime.json und ueberschreibt
  die Werte. Aenderungen werden beim Neustart der Bridge uebernommen.

Diagnostic UI:
- Neue Sektion "Runtime-Konfiguration" in Einstellungen
- Formular fuer RVS-Credentials + Aria-Auth-Token
- "Speichern" persistiert, triggert auch QR-Code-Regenerierung
- Hinweis: Diagnostic-Container selbst bleibt auf ENV (erstmal)

issue.md konsolidiert — 6 groessere Tasks dieser Session als erledigt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-19 16:18:37 +02:00
parent b203503fd8
commit fc3bee6d05
4 changed files with 166 additions and 1 deletions
+20 -1
View File
@@ -105,7 +105,14 @@ EPIC_TRIGGERS = load_epic_triggers()
def load_config() -> dict[str, str]:
"""Laedt Konfiguration aus /config/aria.env."""
"""Laedt Konfiguration.
Reihenfolge (hoechste Prioritaet zuletzt):
1. /config/aria.env (bind-mount)
2. /shared/config/runtime.json (zentral gepflegt ueber Diagnostic UI)
Werte aus runtime.json ueberschreiben die env-Datei.
"""
config: dict[str, str] = {}
if CONFIG_PATH.exists():
for line in CONFIG_PATH.read_text().splitlines():
@@ -118,6 +125,18 @@ def load_config() -> dict[str, str]:
logger.info("Konfiguration geladen aus %s", CONFIG_PATH)
else:
logger.warning("Keine Konfiguration gefunden: %s", CONFIG_PATH)
# Runtime-Overrides aus zentralem Shared-Volume (Diagnostic UI)
runtime_path = Path("/shared/config/runtime.json")
if runtime_path.exists():
try:
runtime = json.loads(runtime_path.read_text())
overrides = {k: str(v) for k, v in runtime.items() if v not in (None, "")}
if overrides:
config.update(overrides)
logger.info("Runtime-Overrides geladen: %s", sorted(overrides.keys()))
except Exception as e:
logger.warning("runtime.json konnte nicht gelesen werden: %s", e)
return config