Commit Graph

59 Commits

Author SHA1 Message Date
duffyduck e26226f370 feat(proxy): Tool-Use durchreichen — eigene Adapter-Files ueberschreiben npm-Version
Der claude-max-api-proxy ignoriert das OpenAI-tools-Feld komplett:
openai-to-cli.js wandelt nur messages in einen String, manager.js
spawnt 'claude --print' ohne Tools. Claude Code nutzt dann ihre
internen Tools (Bash, etc.) — bei 'Timer in 2min' macht sie ein
'sleep 120' intern und meldet 'erledigt' ohne dass wir je einen
trigger_timer-Call sehen.

Fix: zwei eigene Adapter-Files unter proxy-patches/ die zur
Container-Startzeit ueber die npm-Version kopiert werden:

  openai-to-cli.js:
    - tools-Feld wird als <system>-Block mit Tool-Schemas + klarer
      Anweisung "Antworte <tool_call name=...>{json}</tool_call>"
      in den Prompt injiziert
    - role=tool messages werden als <tool_result>-Blocks eingewoben
      → Claude sieht den ganzen Tool-Use-Loop
    - assistant tool_calls werden als <tool_call>-Bloecke
      re-serialisiert, damit History-Roundtrips funktionieren
    - Multimodal-content (Array von text-Parts) unveraendert
      unterstuetzt (Original-sed-Patch eingebaut)

  cli-to-openai.js:
    - parsed <tool_call name="X">{json}</tool_call> aus result.result
    - liefert OpenAI-konforme tool_calls + finish_reason=tool_calls
    - Pre-Tool-Text bleibt im content erhalten
    - normalizeModelName null-safe (Original-sed-Patch eingebaut)

docker-compose.yml: zwei sed-Patches die jetzt in den Files leben
sind raus, dafuer ein /proxy-patches:ro-Mount + zwei cp-Kommandos.

Smoke-Tests mit Node lokal alle gruen (single + multi tool_calls,
mit/ohne Pre-Text, History-Replay mit tool_result).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:42:05 +02:00
duffyduck 70d1500096 feat(brain): Phase B — Vector-DB-Memory, Conversation-Loop, Skills, Tool-Use
OpenClaw (aria-core) ist raus, ARIA laeuft jetzt mit eigenem Agent-Framework
im aria-brain Container. Vector-DB-basiertes Gedaechtnis statt Sessions,
eigener Conversation-Loop mit Hot+Cold-Memory + Rolling Window, Tool-Use
fuer Skills, Memory-Destillat-Pipeline.

aria-brain/ (neuer Container)
  - main.py            FastAPI auf 8080, alle Endpoints
  - agent.py           Conversation-Loop mit Tool-Use (skill_create + run_<skill>)
  - conversation.py    Rolling Window, JSONL-Persistenz, Distill-Marker
  - proxy_client.py    httpx-Wrapper zum Claude-Proxy, OpenAI-Format
  - prompts.py         System-Prompt aus Hot+Cold+Skills
  - migration.py       Markdown-Parser fuer brain-import/ → atomare Memories
  - skills.py          Filesystem-Layer fuer /data/skills/<name>/ (Python-only,
                       venv pro Skill, tar.gz Export/Import, Run-Logs)
  - memory/            Embedder (sentence-transformers, multilingual MiniLM)
                       + VectorStore (Qdrant-Wrapper)

docker-compose.yml
  - aria-core (OpenClaw) raus, openclaw-config Volume raus
  - aria-brain Service (FastAPI + Memory)
  - aria-qdrant Service (Vector-DB) mit Bind-Mount aria-data/brain/qdrant/
  - Diagnostic teilt jetzt Netzwerk mit Bridge (vorher: aria-core)
  - Brain bekommt SSH-Mount fuer aria-wohnung + /import fuer brain-import/

bridge/aria_bridge.py
  - send_to_core → HTTP-Call an aria-brain:8080/chat (statt OpenClaw-WS)
  - aria-core-spezifische Handler raus: doctor_fix, aria_restart,
    aria_session_reset, Auto-Compact-Logik, OpenClaw-Handshake
  - Generischer container_restart-Handler (Whitelist Bridge/Brain/Qdrant)
  - Side-Channel-Events aus /chat-Response (z.B. skill_created) werden
    als RVS-Events forwarded
  - file_list_request / file_delete_request → an Diagnostic forwarded
  - Tote OpenClaw-Connection-Logik bleibt im Code als Referenz (nicht aktiv)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:23:17 +02:00
duffyduck 0b58feee1e chore(phase-a): aria.env + OpenClaw-specific configs raus, Brain-Backup angelegt
Vorbereitung fuer Bridge-als-Agent (OpenClaw raus). Phase-A-Cleanup:

- aria-data/brain-import/ angelegt — System-Prompt-Files BOOTSTRAP.md
  + AGENT.md + USER.md.example + TOOLING.md.example dort archiviert.
  Werden vom neuen Agent-Framework spaeter importiert.
- aria-data/config/aria.env + .example geloescht (alle Eintraege waren
  tot oder via runtime.json/Hardcode-Default abgedeckt)
- aria-data/config/openclaw.env + openclaw-auth.json geloescht
  (Provider-Config landet im Bridge-Code)
- docker-compose: AGENT/BOOTSTRAP/USER/openclaw.env-Mounts aus aria-core
  raus; aria.env-Mount aus bridge raus; COMPACT_AFTER_MESSAGES env raus
  (kommt jetzt aus runtime.json)
- bridge: CONFIG_PATH-Lesen aus /config/aria.env entfernt, load_config
  nutzt nur noch runtime.json; _compact_after liest compactAfterMessages
  aus runtime.json (Default 140)
- diagnostic: Eingabefeld "Compact nach Messages" in Runtime-Config-UI;
  load/save schreiben/lesen compactAfterMessages
- init.sh: nur noch .env-Bootstrap (Rest landet eh in runtime.json/DB)

ARIA antwortet im Phase-A-Status ohne ihre Persoenlichkeit
(System-Prompt nicht mehr gemountet, "raw Claude" durch Proxy) —
das ist Absicht und Uebergang bis das neue Gehirn live ist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 20:13:54 +02:00
duffyduck 4082a6bf2a feat: Auto-Compact nach N User-Messages — verhindert E2BIG bei langer Session
E2BIG (Argument list too long) tritt auf wenn aria-core's Subprocess-
Spawn das Linux argv-Limit (~128KB-2MB) sprengt. Bei >140 Messages
samt Memory + System-Prompt + Tools laeuft das voll, ARIA antwortet
nur noch leer auf jede Anfrage.

Bridge zaehlt jetzt User-Nachrichten in send_to_core; bei COMPACT_AFTER_MESSAGES
(env, default 140) wird automatisch:
- Sessions geleert (rm sessions/*.jsonl + sessions.json = {})
- aria-core neu gestartet
- User informiert "Konversation komprimiert, letzte Nachricht nochmal"

Plus manueller "🧹 Konversation komprimieren"-Button in App-Settings
und 🧹 Compact-Button in Diagnostic-Thinking-Indicator.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 02:24:30 +02:00
duffyduck 482cb6ace3 fix(compose): $(find ...) muss in compose-command zu $$(find ...) escaped werden
docker-compose interpretiert $( als Variable-Interpolation-Pattern und
warf "Invalid interpolation format". Die anderen $$DIST-Stellen waren
schon korrekt escaped, nur das command-substitution fehlte.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:24:31 +02:00
duffyduck f801d99748 feat: Piper komplett entfernt — nur noch XTTS v2 als TTS
Breaking Change: wenn XTTS-Bridge (Gaming-PC) offline ist, bleibt ARIA
stumm. Chat-Antworten kommen weiter an, aber kein Audio. Das ist
bewusst akzeptiert — XTTS klingt einfach grauenhaft viel besser.

Bridge (aria_bridge.py):
- from piper import ... raus
- VoiceEngine-Klasse komplett entfernt (synthesize, speak, select_voice)
- EPIC_TRIGGERS + load_epic_triggers raus (Highlight-Voice-Feature
  ohne Piper sinnlos)
- self.voice_engine, voice_name, requested_voice Aufrufe weg
- _process_core_response: immer XTTS, kein Fallback
- tts_request Handler: immer XTTS
- config Handler: nur ttsEnabled + xttsVoice + whisperModel
- import wave raus

bridge/requirements.txt: piper-tts raus
bridge/Dockerfile: Kommentar aktualisiert
docker-compose.yml: ./aria-data/voices Mount raus
aria-data/config/aria.env.example: PIPER_RAMONA/PIPER_THORSTEN raus
get-voices.sh: komplett geloescht (war nur Piper-Downloader)

Diagnostic UI (index.html):
- Piper Panel (Standard-Stimme / Highlight-Stimme / Speed-Sliders) weg
- TTS Engine Dropdown weg (immer XTTS)
- TTS Diagnose Tab zeigt nur noch XTTS-Status + Test-Button
- sendVoiceConfig sendet nur noch ttsEnabled/xttsVoice/whisperModel
- toggleXTTSPanel als no-op Legacy-Stub (JS-Calls bleiben safe)

Diagnostic Server (server.js):
- handleSendVoiceConfig: nur noch ttsEnabled + xttsVoice + whisperModel
- handleTestTTS: via xtts_request (nicht mehr Piper subprocess)
- handleCheckTTS: via xtts_list_voices ueber RVS
- handleGetVoiceConfig/Defaults bereinigt
- Highlight-Trigger UI bleibt, wird aber von Bridge nicht mehr
  ausgewertet (dead-code im UI, spaeter ggf. fuer XTTS-Voice-Switch)

README + issue.md aktualisiert.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 22:24:42 +02:00
duffyduck 50aa793910 fix: Proxy SSH volume read-write (ARIA can manage keys without -F workaround)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:34:35 +02:00
duffyduck adbb1fe80a changed docker file 2026-03-29 17:46:27 +02:00
duffyduck eb3692ef81 fixed arai proxy shared volume 2026-03-29 16:34:55 +02:00
duffyduck 457b469c96 added shared volume to diagnostic, added folder picker to android app, fixed bridge for attachment uploading, fixed hopefully chat history in android app 2026-03-29 13:20:58 +02:00
duffyduck db053c2dbd fixed sst to milliseconds and autoscroll the the third, attachments added shared volume, addes attachments at chats, updateded readme 2026-03-29 12:34:28 +02:00
duffyduck dbd97d3cf4 added audio workword, and recording, editied readme 2026-03-29 11:29:15 +02:00
duffyduck 54b4331e1e fixed, session selector at start and fixed load chat 2026-03-29 03:26:11 +02:00
duffyduck 8a6625b117 added curl to conatiner 2026-03-16 00:52:47 +01:00
duffyduck 4b4db6885b change from sh auf bash 2026-03-15 22:47:49 +01:00
duffyduck f0e7b04758 fixed claude credentials mount, to prevent container restarts 2026-03-15 22:39:45 +01:00
duffyduck a58b5073c6 add SHELL env var to proxy for Claude Code Bash tool
Alpine doesn't set SHELL by default — Claude Code's Bash tool
refuses to run without it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:05:52 +01:00
duffyduck e1bee1bcf6 add SSH access to proxy container for ARIA's Bash tool
Claude Code CLI runs in aria-proxy, so Bash commands execute there.
SSH keys and host.docker.internal were only in aria-core — ARIA
couldn't reach aria-wohnung. Now the proxy has SSH client, keys,
and host resolution too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:59:32 +01:00
duffyduck 1afb47c49c set env for claude no ki and reverted node user 2026-03-15 19:28:10 +01:00
duffyduck 483957b272 fixed docker-compose for claude volumes 2026-03-15 10:10:36 +01:00
duffyduck 5af0587d00 changed claud credentials path 2026-03-15 10:07:41 +01:00
duffyduck aaf97b7904 docker compose geändert mit su for claus credentials 2026-03-15 10:03:07 +01:00
duffyduck e11610985d zweiten volume mount für den node user 2026-03-15 09:57:44 +01:00
duffyduck 806bc57944 added symlink to docker credentials for login 2026-03-15 09:54:21 +01:00
duffyduck 7d74dd091b added non root user in docker compose for claud code 2026-03-15 09:46:36 +01:00
duffyduck 86d8489078 added bypass in docker-compose 2026-03-15 09:43:13 +01:00
duffyduck da52556c26 changed docker-sed to allowtools 2026-03-15 09:38:39 +01:00
duffyduck 47ed8de586 added sed pacth for permission to docker-compose 2026-03-15 09:32:17 +01:00
duffyduck 800a57d28a fixed permission withour create new session, only restarted session 2026-03-14 17:22:56 +01:00
duffyduck feba1ca13f added vm integration 2026-03-13 10:54:23 +01:00
duffyduck 6964fdcae1 home verzeichnis adjusted 2026-03-13 09:13:41 +01:00
duffyduck c7e509a04c claude.md erstellt 2026-03-13 09:09:55 +01:00
duffyduck 22d16dbdc7 cretate bootstrap.md 2026-03-13 09:05:25 +01:00
duffyduck 0868c3c59f fixex claude bridge, fix in docker-compose file 2026-03-13 09:00:35 +01:00
duffyduck 4893d5e2ba swicthed back to network mod and added helatcheck for diagnostic to restart 2026-03-13 08:26:02 +01:00
duffyduck 72fdebe50d fiexd networ mode at restart 2026-03-13 08:19:27 +01:00
duffyduck 571345ed0d added log for sending text and aria-setup.sh 2026-03-13 07:54:21 +01:00
duffyduck 087aee88d3 fixed handshake for model 2026-03-12 23:19:11 +01:00
duffyduck 882adb2dea fixed permiision 2026-03-12 19:30:36 +01:00
duffyduck 4dd9599c47 fix openclaw data volume 2026-03-12 19:24:16 +01:00
duffyduck 618248e8df added subscription for opencloud 2026-03-12 19:20:26 +01:00
duffyduck 364cf378b3 remove echo in chat and added openclae.env dummy file 2026-03-12 19:12:57 +01:00
duffyduck 5e2b31385f added claude login for credentials creation if credentials not exist 2026-03-12 02:13:11 +01:00
duffyduck c255a85ffb ost-Bind — Proxy hört auf 0.0.0.0:3456 statt 127.0.0.1:3456
Null-Guard — model undefined crasht nicht mehr, Fallback auf "claude-sonnet-4"
2026-03-12 01:51:09 +01:00
duffyduck 8853ec697d claude-max-api-proxy hat host hardcoded auf 127.0.0.1 in standalone.js — die startServer() Funktion unterstützt zwar einen host Parameter, aber der CLI-Einstiegspunkt übergibt ihn nie. 2026-03-12 01:47:01 +01:00
duffyduck 258f6e0629 fixed host in proxy docker compose 2026-03-12 01:40:18 +01:00
duffyduck 42d1cce567 fixed hostmode proxy 2026-03-12 01:36:55 +01:00
duffyduck 580141fa17 added docker logs to diagnostic 2026-03-12 01:34:16 +01:00
duffyduck 2e4a12c812 added claude cli log and test and optimize log windows through seperate tabs, update readme changelog 2026-03-12 01:25:35 +01:00
duffyduck b3a2fd7092 fixed openclaws 2026-03-12 00:32:12 +01:00