71fc90fcb8
Multi-Tool-Sessions chronisch gekappt
Live-Diagnose auf der VM: drei verkettete 5-Min-Timeouts feuern bei
jedem laengeren Brain-Call exakt gleichzeitig:
06:16:02 Brain → Proxy /v1/chat/completions
06:20:53 Bridge kappt (4m51s, urlopen timeout=300)
06:21:02 Brain bekommt HTTP 500 vom Proxy ('timed out after 300000ms')
Stefan's Karten-Rekonstruktion (curl gegen Nominatim/OSRM + viele Bash-
Tool-Calls + DB-Inserts) braucht locker 8–15 Min — alle Brain-Calls
ueber 5 Min sind reihenweise mit 'Brain-Fehler: timed out' verreckt,
auch wenn die Arbeit zu 80% durch war.
Drei Stellen patchen:
- bridge/aria_bridge.py: urlopen 300 → 1200 (20 Min)
- aria-brain/proxy_client.py: PROXY_TIMEOUT_SEC default 300 → 1200
- docker-compose.yml: dritter sed-Patch im proxy-Service
setzt DEFAULT_TIMEOUT im claude-max-api-proxy von 300000 auf 1200000
Plus App-Watchdog: 180s → 1260s (21 Min, knapp ueber Brain-Timeout)
damit der lokale Stuck-Watchdog nicht waehrend legitimer langer
Sessions feuert. Echte Verbindungsabbrueche kappen vorher per WS-
Disconnect.
UX-Tradeoff bewusst akzeptiert: User sieht jetzt bis zu 20 Min nur
'ARIA denkt...' ohne Zwischen-Updates. Echte Loesung waere Streaming
oder async-Job-API (siehe Etappe B/C im Vorschlag) — das ist groesseres
Refactoring, hier reicht erst mal der Quick-Fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
137 lines
6.0 KiB
YAML
137 lines
6.0 KiB
YAML
services:
|
|
|
|
# ─── Claude Max API Proxy ───────────────────────────────
|
|
proxy:
|
|
image: node:22-alpine
|
|
container_name: aria-proxy
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway" # Zugriff auf die VM via SSH
|
|
command: >-
|
|
sh -c "apk add --no-cache openssh-client bash curl &&
|
|
npm install -g @anthropic-ai/claude-code claude-max-api-proxy &&
|
|
DIST=$$(find /usr/local/lib -path '*/claude-max-api-proxy/dist' -type d | head -1) &&
|
|
sed -i 's/startServer({ port })/startServer({ port, host: process.env.HOST || \"127.0.0.1\" })/' $$DIST/server/standalone.js &&
|
|
sed -i 's/\"--no-session-persistence\",/\"--no-session-persistence\",\"--dangerously-skip-permissions\",/' $$DIST/subprocess/manager.js &&
|
|
sed -i 's/const DEFAULT_TIMEOUT = 300000;/const DEFAULT_TIMEOUT = 1200000;/' $$DIST/subprocess/manager.js &&
|
|
cp /proxy-patches/openai-to-cli.js $$DIST/adapter/openai-to-cli.js &&
|
|
cp /proxy-patches/cli-to-openai.js $$DIST/adapter/cli-to-openai.js &&
|
|
claude-max-api"
|
|
volumes:
|
|
- ~/.claude:/root/.claude # Claude CLI Auth (Credentials in /root/.claude/.credentials.json)
|
|
- ./aria-data/ssh:/root/.ssh # SSH Keys fuer VM-Zugriff (aria-wohnung, rw fuer ARIA)
|
|
- aria-shared:/shared # Shared Volume fuer Datei-Austausch (Uploads von App)
|
|
- ./proxy-patches:/proxy-patches:ro # Tool-Use-Adapter (ueberschreibt npm-Version, read-only)
|
|
# Claude Code's eingebautes Auto-Memory liegt in ~/.claude/projects/.
|
|
# Wir ueberlagern das mit tmpfs damit ARIA nicht parallel zu ARIAs eigener
|
|
# Qdrant-DB ein File-Memory aufbaut (war Auslöser fuer doppelte Truth-Source).
|
|
# Tmpfs ist beim Container-Start leer und wird beim Container-Recreate
|
|
# weggeworfen — Claude Code sieht keine alten Files mehr und das was sie
|
|
# ggf. neu schreibt landet nicht auf dem VM-Host.
|
|
tmpfs:
|
|
- /root/.claude/projects
|
|
environment:
|
|
- HOST=0.0.0.0
|
|
- SHELL=/bin/bash # Claude Code Bash-Tool braucht bash (nicht nur sh/ash)
|
|
- CLAUDE_CODE_BUBBLEWRAP=1 # Erlaubt --dangerously-skip-permissions als root
|
|
restart: unless-stopped
|
|
networks:
|
|
- aria-net
|
|
|
|
# ─── Qdrant (Vector-DB fuer ARIAs Gedaechtnis) ────────
|
|
# Storage liegt im Repo-Bind-Mount aria-data/brain/qdrant.
|
|
# Damit Backup/Export/Import komplett ueber das Filesystem gehen.
|
|
qdrant:
|
|
image: qdrant/qdrant:latest
|
|
container_name: aria-qdrant
|
|
volumes:
|
|
- ./aria-data/brain/qdrant:/qdrant/storage
|
|
restart: unless-stopped
|
|
networks:
|
|
- aria-net
|
|
|
|
# ─── ARIA Brain (Agent + Memory) ─────────────────────────
|
|
# Loest das alte aria-core (OpenClaw) ab. Vector-DB-basiertes
|
|
# Memory, eigener Agent-Loop, SSH zur aria-wohnung-VM.
|
|
brain:
|
|
build: ./aria-brain
|
|
container_name: aria-brain
|
|
hostname: aria-wohnung-brain # damit ssh known_hosts stabil bleibt
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway" # Zugriff auf die VM via SSH
|
|
depends_on:
|
|
- qdrant
|
|
- proxy
|
|
environment:
|
|
- QDRANT_HOST=aria-qdrant
|
|
- QDRANT_PORT=6333
|
|
- PROXY_URL=http://proxy:3456
|
|
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
|
|
volumes:
|
|
- ./aria-data/brain/data:/data # Memory-Cache + Skills + Models (bind-mount fuer Export)
|
|
- ./aria-data/brain-import:/import:ro # Quell-MDs fuer den initialen Memory-Import (read-only)
|
|
- ./aria-data/ssh:/root/.ssh # SSH-Keys fuer aria-wohnung (geteilt mit Proxy)
|
|
- aria-shared:/shared # gleicher Austausch-Speicher wie Bridge
|
|
restart: unless-stopped
|
|
networks:
|
|
- aria-net
|
|
|
|
# ─── ARIA Voice Bridge ──────────────────────────────────
|
|
bridge:
|
|
build: ./bridge
|
|
container_name: aria-bridge
|
|
depends_on:
|
|
- brain
|
|
networks:
|
|
- aria-net
|
|
ports:
|
|
- "3001:3001" # Diagnostic Web-UI (Diagnostic teilt Netzwerk mit Bridge)
|
|
volumes:
|
|
- aria-shared:/shared # Shared Volume fuer Datei-Austausch
|
|
# Audio-Zugriff
|
|
- /run/user/1000/pulse:/run/user/1000/pulse
|
|
- /dev/snd:/dev/snd
|
|
devices:
|
|
- /dev/snd
|
|
environment:
|
|
- PULSE_SERVER=unix:/run/user/1000/pulse/native
|
|
- BRAIN_URL=http://aria-brain:8080
|
|
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
|
|
- RVS_HOST=${RVS_HOST:-}
|
|
- RVS_PORT=${RVS_PORT:-443}
|
|
- RVS_TLS=${RVS_TLS:-true}
|
|
- RVS_TLS_FALLBACK=${RVS_TLS_FALLBACK:-true}
|
|
- RVS_TOKEN=${RVS_TOKEN:-}
|
|
restart: unless-stopped
|
|
|
|
# ─── Diagnostic (Selbstcheck-UI und Einstellungen) ────
|
|
# Teilt Netzwerk mit Bridge, damit der Diagnostic-Server die
|
|
# Bridge auf localhost erreichen kann.
|
|
diagnostic:
|
|
build: ./diagnostic
|
|
container_name: aria-diagnostic
|
|
depends_on:
|
|
- bridge
|
|
network_mode: "service:bridge"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock # Container Restart + Brain-Export/Import
|
|
- ./aria-data/config/diag-state:/data # Persistenter State (aktive Session etc.)
|
|
- aria-shared:/shared # Shared Volume (Uploads + Config + Voices)
|
|
- ./aria-data/brain:/brain # Brain-Export/Import (tar.gz aus Bind-Mount)
|
|
environment:
|
|
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
|
|
- PROXY_URL=http://proxy:3456
|
|
- BRAIN_URL=http://aria-brain:8080
|
|
- RVS_HOST=${RVS_HOST:-}
|
|
- RVS_PORT=${RVS_PORT:-443}
|
|
- RVS_TLS=${RVS_TLS:-true}
|
|
- RVS_TLS_FALLBACK=${RVS_TLS_FALLBACK:-true}
|
|
- RVS_TOKEN=${RVS_TOKEN:-}
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
aria-shared: # Datei-Austausch zwischen Bridge / Brain / Diagnostic
|
|
|
|
networks:
|
|
aria-net:
|
|
driver: bridge
|