added subscription for opencloud

This commit is contained in:
2026-03-12 19:20:26 +01:00
parent 364cf378b3
commit 618248e8df
4 changed files with 68 additions and 6 deletions
+36
View File
@@ -599,6 +599,37 @@ async function checkProxyAuth() {
}
}
// ── OpenClaw Agent-Auth pruefen ──────────────────────────
async function checkCoreAuth() {
try {
log("info", "gateway", "Pruefe OpenClaw Agent-Konfiguration...");
const info = await dockerExec("aria-core", `
echo '=== Agent-Verzeichnis ===' &&
ls -la /home/node/.openclaw/agents/main/agent/ 2>&1 &&
echo '' &&
echo '=== auth-profiles.json ===' &&
cat /home/node/.openclaw/agents/main/agent/auth-profiles.json 2>/dev/null || echo '(nicht vorhanden)' &&
echo '' &&
echo '=== Umgebungsvariablen ===' &&
echo "OPENAI_BASE_URL=$OPENAI_BASE_URL" &&
echo "OPENAI_API_KEY=$(echo $OPENAI_API_KEY | head -c 15)..." &&
echo "DEFAULT_MODEL=$DEFAULT_MODEL" &&
echo '' &&
echo '=== OpenClaw Version ===' &&
openclaw --version 2>/dev/null || echo '(openclaw CLI nicht gefunden)' &&
echo '' &&
echo '=== Agents Liste ===' &&
openclaw agents list 2>/dev/null || echo '(Befehl fehlgeschlagen)'
`.trim());
log("info", "gateway", `OpenClaw Config:\n${info}`);
broadcast({ type: "core_auth", info });
} catch (err) {
log("error", "gateway", `Core-Auth-Check fehlgeschlagen: ${err.message}`);
broadcast({ type: "core_auth", info: null, error: err.message });
}
}
// ── Docker Container Logs ────────────────────────────────
const CONTAINER_MAP = {
@@ -774,6 +805,11 @@ wss.on("connection", (ws) => {
checkProxyAuth();
} else if (msg.action === "proxy_login") {
attachTerminal(ws, "aria-proxy", "claude login");
} else if (msg.action === "core_terminal") {
// Interaktive Shell in aria-core (fuer openclaw agents, etc.)
attachTerminal(ws, "aria-core", msg.cmd || "sh");
} else if (msg.action === "check_core_auth") {
checkCoreAuth();
} else if (msg.action === "term_input") {
handleTermInput(ws, msg.data);
} else if (msg.action === "write_credentials") {