Refactoring + Dokumentation: api.js komprimiert (745→267 Zeilen), SseHelper extrahiert, DatabaseService in Partial Classes aufgeteilt, unbenutztes CSS entfernt, ARCHITECTURE.md/ARCHITECTURE_QUICK.md/README.md aktualisiert (neue Features: Embedding, Remote, API-Keys, 16 Tools)

This commit is contained in:
Meleki committed 2026-03-12 13:29:19 +01:00
1 parent 8dc52c1337
commit db1a7c7f64
18 files changed
+1701 -2007

No files matched your search

+15 -4
View File
@@ -16,7 +16,7 @@ Self-hosted AI-Coding-Agent mit **Anthropic Claude API** als Haupt-Provider sowi
- **Plan-Modus** – Read-only-Modus zum Analysieren und Planen ohne Änderungen (Toggle im Chat)
- **Web-Search** – Integrierte Web-Suche mit Quellenangaben (URLs + Titel) in Chat und geteilten Nachrichten
- **Multi-Provider** – Anthropic Claude (Haupt-Provider), Nvidia (g4f.space), Pollinations (kostenlos), Google Gemini (kostenloser Free Tier)
- **13 Tools** – `read_file`, `write_file`, `edit_file`, `list_files`, `delete_file`, `execute`, `glob`, `grep`, `todo_write`, `memory_read`, `memory_write`, `memory_list`, `ask_user_choice`
- **16 Tools** – `read_file`, `write_file`, `edit_file`, `list_files`, `delete_file`, `execute`, `background_execute`, `glob`, `grep`, `todo_write`, `memory_read`, `memory_write`, `memory_list`, `memory_search`, `remote_execute`, `send_to_session`, `ask_user_choice`
- **Streaming** – Echtzeit-Antworten via Server-Sent Events (SSE)
- **Stop-Button** – Laufende Requests zuverlässig abbrechen (inkl. laufender Shell-Befehle)
- **Skill-System** – Wiederverwendbare Prompt-Bausteine, zuordenbar pro Agent
@@ -25,6 +25,9 @@ Self-hosted AI-Coding-Agent mit **Anthropic Claude API** als Haupt-Provider sowi
- **Telegram-Integration** – Bots als eigenständige Entität, mehrere Sessions pro Bot, Public-Bots
- **Cronjobs** – Zeitgesteuerte Prompts mit Cron-Expressions
- **Bildgenerierung** – Krea AI Integration für Bildgenerierung
- **Semantische Suche** – Lokale Sentence-Embeddings (all-MiniLM-L6-v2 ONNX) für `memory_search` über vergangene Nachrichten und Memory-Dateien
- **Remote-Verbindungen** – WebSocket-basierte Remote-Clients (PowerShell), AI-Agent kann Befehle auf entfernten Rechnern ausführen
- **API-Key-Verwaltung** – Admin-UI zum Verwalten von API-Keys (Anthropic) inkl. Heartbeat-Check, DB-basiert statt Config-Datei
- **Nachrichten teilen** – Einzelne Nachrichten per öffentlichem Link teilen
- **Archivierung** – Chat-Verläufe archivieren und durchsuchen
- **OpenClaw Import** – Chatverlauf aus OpenClaw-Instanzen importieren
@@ -40,6 +43,7 @@ Self-hosted AI-Coding-Agent mit **Anthropic Claude API** als Haupt-Provider sowi
| **Backend** | .NET 10 Minimal API, C# |
| **Datenbank** | SQLite + Dapper |
| **AI** | Anthropic Claude API + OpenAI-kompatible APIs (Nvidia, Pollinations, Gemini) |
| **Embeddings** | Microsoft.ML.OnnxRuntime + all-MiniLM-L6-v2 (Sentence-Embeddings) |
| **Frontend** | Vanilla JS SPA (kein Framework), CSS Variables |
| **Mathe** | KaTeX (LaTeX-Rendering) |
| **Bilder** | SixLabors.ImageSharp |
@@ -51,8 +55,9 @@ Self-hosted AI-Coding-Agent mit **Anthropic Claude API** als Haupt-Provider sowi
## Voraussetzungen
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
- Anthropic API Key ([console.anthropic.com](https://console.anthropic.com/))
- Anthropic API Key ([console.anthropic.com](https://console.anthropic.com/)) – wird über Admin-UI verwaltet
- Optional: Gemini API Key ([aistudio.google.com](https://aistudio.google.com/apikey)) – kostenlos, kein Billing nötig
- Optional: ONNX-Modell `all-MiniLM-L6-v2` für semantische Suche (`data/models/all-MiniLM-L6-v2/`)
- Linux/macOS/Windows (Produktiv: Linux empfohlen)
## Konfiguration
@@ -62,8 +67,10 @@ Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eig
```json
{
"Port": 19000,
"AnthropicToken": "sk-ant-...",
"MaxIterations": 100,
"MaxHistory": 120,
"ReminderInterval": 30,
"ExecuteTimeout": 180,
"PayloadLogging": false,
"PayloadLoggingGzip": false,
"KreaToken": "",
@@ -75,14 +82,18 @@ Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eig
| Setting | Beschreibung | Default |
|---------|-------------|---------|
| `Port` | Server-Port (erfordert Neustart) | `19000` |
| `AnthropicToken` | Anthropic API Key (**erforderlich**) | – |
| `MaxIterations` | Max Tool-Loop Iterationen pro Chat | `100` |
| `MaxHistory` | Max Messages in Chat-History | `120` |
| `ReminderInterval` | System-Prompt-Reminder alle N Messages | `30` |
| `ExecuteTimeout` | Timeout für Shell-Befehle in Sekunden | `180` |
| `PayloadLogging` | API-Payloads in Konsole loggen | `false` |
| `PayloadLoggingGzip` | Payload-Logs als .gz komprimieren | `false` |
| `KreaToken` | Krea AI API Token (optional) | – |
| `KreaApiKey` | API-Key für Krea-Endpoints ohne User-Auth (optional) | – |
| `GeminiApiKey` | Google Gemini API Key (kostenlos via [aistudio.google.com](https://aistudio.google.com/apikey)) | – |
> **Hinweis:** `AnthropicToken` wird über die **API-Key-Verwaltung** im Admin-Bereich verwaltet (DB-Tabelle `api_keys`), nicht mehr über `appsettings.json`. Bestehende Tokens werden beim ersten Start automatisch migriert.
> **Hinweis:** Die `appsettings.Production.json` wird **nicht** beim `dotnet publish` mitkopiert. Sie lebt ausschließlich im `Build/Linux/publish/`-Verzeichnis und kann über die Admin-UI (`#/server-settings`) verwaltet werden.
## Starten