added subscription for opencloud
This commit is contained in:
parent
364cf378b3
commit
618248e8df
|
|
@ -16,6 +16,9 @@ aria-data/config/*.env
|
|||
# ── ARIAs Gedächtnis (nur per tar gesichert) ────
|
||||
aria-data/brain/
|
||||
|
||||
# ── OpenClaw Runtime (Agent-Config, Sessions) ───
|
||||
aria-data/openclaw/
|
||||
|
||||
# ── Stimmen (große Binärdateien) ─────────────────
|
||||
aria-data/voices/
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,10 @@
|
|||
<span class="status-label" id="gw-status">-</span>
|
||||
</div>
|
||||
<div class="error-text" id="gw-error"></div>
|
||||
<div id="core-auth" style="margin-top:6px;display:none;background:#080810;border:1px solid #1E1E2E;border-radius:4px;padding:6px 8px;font-size:10px;line-height:1.5;max-height:220px;overflow-y:auto;white-space:pre-wrap;color:#8888AA"></div>
|
||||
<button class="btn secondary" onclick="send({action:'reconnect_gateway'})">Reconnect</button>
|
||||
<button class="btn secondary" onclick="send({action:'check_core_auth'})">Agent-Auth pruefen</button>
|
||||
<button class="btn secondary" id="btn-core-term" onclick="openCoreTerminal()">Core Terminal</button>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
|
|
@ -330,6 +333,12 @@
|
|||
el.textContent = msg.error ? `Fehler: ${msg.error}` : msg.info;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'core_auth') {
|
||||
const el = document.getElementById('core-auth');
|
||||
el.style.display = 'block';
|
||||
el.textContent = msg.error ? `Fehler: ${msg.error}` : msg.info;
|
||||
return;
|
||||
}
|
||||
if (msg.type === 'term_ready') {
|
||||
document.getElementById('term-status').textContent = 'Verbunden — interaktives Terminal';
|
||||
if (term) term.writeln('\x1b[32mVerbunden!\x1b[0m\r\n');
|
||||
|
|
@ -403,10 +412,12 @@
|
|||
|
||||
let term = null;
|
||||
let termFitAddon = null;
|
||||
let termAction = null; // Welche Aktion beim Terminal-Start gesendet wird
|
||||
|
||||
function startProxyLogin() {
|
||||
function openTermModal(title, action) {
|
||||
termAction = action;
|
||||
document.querySelector('#term-modal .modal-header h3').textContent = title;
|
||||
document.getElementById('term-modal').classList.add('open');
|
||||
document.getElementById('btn-proxy-login').disabled = true;
|
||||
document.getElementById('term-status').textContent = 'Starte Terminal...';
|
||||
|
||||
if (typeof Terminal === 'undefined') {
|
||||
|
|
@ -424,11 +435,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
function startProxyLogin() {
|
||||
document.getElementById('btn-proxy-login').disabled = true;
|
||||
openTermModal('Claude Login Terminal (aria-proxy)', { action: 'proxy_login' });
|
||||
}
|
||||
|
||||
function openCoreTerminal() {
|
||||
document.getElementById('btn-core-term').disabled = true;
|
||||
openTermModal('aria-core Shell', { action: 'core_terminal' });
|
||||
}
|
||||
|
||||
function closeTermModal() {
|
||||
document.getElementById('term-modal').classList.remove('open');
|
||||
document.getElementById('btn-proxy-login').disabled = false;
|
||||
document.getElementById('btn-proxy-login').textContent = 'Login starten';
|
||||
// Terminal aufräumen
|
||||
document.getElementById('btn-core-term').disabled = false;
|
||||
// Terminal aufraeumen
|
||||
if (term) { term.dispose(); term = null; }
|
||||
}
|
||||
|
||||
|
|
@ -461,8 +482,9 @@
|
|||
send({ action: 'term_input', data: btoa(b64) });
|
||||
});
|
||||
|
||||
term.writeln('\x1b[33mVerbinde mit Proxy-Container...\x1b[0m');
|
||||
send({ action: 'proxy_login' });
|
||||
const containerName = termAction?.action === 'core_terminal' ? 'aria-core' : 'aria-proxy';
|
||||
term.writeln('\x1b[33mVerbinde mit ' + containerName + '...\x1b[0m');
|
||||
send(termAction);
|
||||
}
|
||||
|
||||
// Resize bei Fensteraenderung
|
||||
|
|
|
|||
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ services:
|
|||
- ./aria-data/config/AGENT.md:/workspace/AGENT.md
|
||||
- ./aria-data/config/USER.md:/workspace/USER.md
|
||||
- ./aria-data/config/openclaw.env:/workspace/.env
|
||||
- ./aria-data/openclaw:/home/node/.openclaw # OpenClaw Agent-Config persistieren
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||
- /var/run/docker.sock:/var/run/docker.sock # VM von innen verwalten
|
||||
restart: unless-stopped
|
||||
|
|
|
|||
Loading…
Reference in New Issue