66c4f7f2d1
B1 (BLOCKER): pipx installiert hermes-agent jetzt zwingend mit --python python3.13.
- python3.13 wird via apt installiert falls nicht vorhanden
- Bestehende pipx-venv mit falscher Python-Version wird erkannt und neu installiert
- Verifikation prüft pipx-venv Python-Version auf exakt 3.13
B2 (BLOCKER): Alle Verifikations-Checks nutzen jetzt $VENV_PY (pipx-venv Python)
statt system-python3. YAML-Syntax-Check in write_config_yaml() nutzt die statt warn.
Alle Checks in verify_installation() setzen fail=1 und exit 1 bei Fehlern.
B3 (BLOCKER): set -euo pipefail war bereits vorhanden. Idempotenz durch
pipx-Reinstall bei falscher Python-Version ergänzt.
R5: INSTALL.md um 'Wichtige Hinweise' ergänzt — journalctl zeigt Secrets,
Logs nicht ungefiltert teilen.
R6: providers: {} → providers:\n ollama-cloud: {} in install.sh und
templates/config.yaml. Verhindert Auto-Discovery-Risiko beim ersten Modell-Aufruf.
108 lines
4.6 KiB
Markdown
108 lines
4.6 KiB
Markdown
# install.sh — Dokumentation
|
|
|
|
## Aufruf
|
|
|
|
```bash
|
|
# Interaktiv (mit Prompts für fehlende Werte)
|
|
./install.sh
|
|
|
|
# Vollständig nicht-interaktiv (alle Werte aus env)
|
|
./install.sh --non-interactive
|
|
|
|
# Nur anzeigen, was gemacht würde (nichts ändern)
|
|
./install.sh --dry-run
|
|
|
|
# Nur Voraussetzungen prüfen
|
|
./install.sh --check
|
|
|
|
# Notfall-Deploy: nur Plugin-Dateien + Gateway-Neustart
|
|
./install.sh --update-only
|
|
|
|
# Bestehende Dateien überschreiben (SOUL.md etc.)
|
|
./install.sh --force
|
|
|
|
# apt-Install überspringen (Container/CI)
|
|
./install.sh --skip-system-deps
|
|
```
|
|
|
|
## Erforderliche env-Variablen (Secrets)
|
|
|
|
| Variable | Beschreibung |
|
|
|----------|--------------|
|
|
| `OLLAMA_CLOUD_API_KEY` | API-Key für ollama-cloud |
|
|
| `ROCKETCHAT_PASSWORD` | Passwort des Bot-Accounts |
|
|
| `ROCKETCHAT_USER_ID` | User-ID des Bots auf dem RC-Server |
|
|
|
|
## Optionale env-Variablen (mit Defaults)
|
|
|
|
| Variable | Default | Beschreibung |
|
|
|----------|---------|--------------|
|
|
| `ROCKETCHAT_BASE_URL` | `https://rocketchat.thomander.de` | RC-Server-URL |
|
|
| `ROCKETCHAT_USER` | `mytestbot` | Bot-Username |
|
|
| `ARCHIVAR_LLM_BASE_URL` | `http://localhost:11434` | P8: lokal, NICHT cloud |
|
|
| `ARCHIVAR_EMBEDDING_BASE_URL` | `http://localhost:11434` | lokal für nomic-embed-text |
|
|
| `MODEL_NAME` | `nemotron-3-super` | P7: NICHT `nemotron-3-super-120b` |
|
|
| `CONTEXT_LENGTH` | `131072` | Kontextfenster |
|
|
| `COMPRESSION_THRESHOLD` | `0.85` | Schwellwert für Kontextkompression |
|
|
| `ROCKETCHAT_HOME_CHANNEL` | `""` (leer) | Home-Channel; Onboarding fragt nach |
|
|
| `RC_MULTIROOM` | `true` | Archivar aktiv (V8.5) |
|
|
| `ROCKETCHAT_ALLOW_ALL_USERS` | `true` | |
|
|
| `GATEWAY_ALLOW_ALL_USERS` | `true` | |
|
|
| `ROCKETCHAT_PING_SEC` | `8` | |
|
|
| `ROCKETCHAT_IDLE_SEC` | `900` | |
|
|
|
|
## Vollständiger Beispiel-Aufruf
|
|
|
|
```bash
|
|
export OLLAMA_CLOUD_API_KEY='sk-ollama-...'
|
|
export ROCKETCHAT_PASSWORD='geheimes-passwort'
|
|
export ROCKETCHAT_USER_ID='5f8a2b3c...'
|
|
export ROCKETCHAT_USER='mytestbot'
|
|
export ROCKETCHAT_BASE_URL='https://rocketchat.thomander.de'
|
|
export MODEL_NAME='nemotron-3-super'
|
|
export CONTEXT_LENGTH=131072
|
|
|
|
./install.sh --non-interactive
|
|
```
|
|
|
|
## Was install.sh macht (9 Punkte)
|
|
|
|
1. **System-Dependencies**: Python 3.13, pip, pipx, git, curl, Ollama (lokal)
|
|
2. **Hermes Agent**: `pipx install hermes-agent`, `snowballstemmer` in pipx-venv (P1), `requirements.txt`
|
|
3. **Plugin aus Gitea**: Kopiert nach `site-packages/plugins/platforms/rocketchat/` (P3)
|
|
4. **config.yaml**: model=nemotron-3-super, provider=ollama-cloud, auxiliary auf ollama-cloud (P2)
|
|
5. **.env**: Alle Secrets aus env-Variablen; maschinenspezifisch (P4)
|
|
6. **room-map.json**: Leere Version 5 — Onboarding füllt sie (P10)
|
|
7. **SOUL.md**: Standard, ohne 'Bestätigung vor Bearbeitung' (P9)
|
|
8. **Gateway Service**: systemd user service mit `enable` für Autostart (P5)
|
|
9. **Verifikation**: Alle Pitfalls werden am Ende geprüft
|
|
|
|
## Pitfalls (automatisch abgefangen)
|
|
|
|
- **P1**: `snowballstemmer` in pipx-venv, NICHT system-python
|
|
- **P2**: auxiliary=ollama-cloud, NICHT openrouter/Nous (payment errors)
|
|
- **P3**: Plugin-Pfad `site-packages/plugins/platforms/rocketchat/`, NICHT `~/.hermes/plugins/`
|
|
- **P4**: `.env` nicht zwischen Maschinen kopieren (Identitätskonflikt)
|
|
- **P5**: `systemctl --user enable hermes-gateway` für Autostart nach Reboot
|
|
- **P6**: `provider=ollama-cloud`, NICHT `custom` für Cloud
|
|
- **P7**: `model=nemotron-3-super`, NICHT `nemotron-3-super-120b`
|
|
- **P8**: `ARCHIVAR_LLM_BASE_URL=localhost:11434`, NICHT ollama-cloud
|
|
- **P9**: SOUL.md ohne 'Bestätigung vor Bearbeitung'
|
|
- **P10**: `room-map.json` leer starten — Onboarding füllt sie
|
|
|
|
## Pfade
|
|
|
|
- pipx-venv: `~/.local/share/pipx/venvs/hermes-agent/`
|
|
- Plugin: `<venv>/lib/python3.13/site-packages/plugins/platforms/rocketchat/`
|
|
- Hermes-Home: `~/.hermes/`
|
|
- config.yaml: `~/.hermes/config.yaml`
|
|
- .env: `~/.hermes/.env` + `~/.config/hermes/rocketchat.env` (für systemd)
|
|
- room-map.json: `~/.hermes/hermes-agent/data/room-map.json`
|
|
- SOUL.md: `~/.hermes/SOUL.md`
|
|
- systemd unit: `~/.config/systemd/user/hermes-gateway.service`
|
|
|
|
## Wichtige Hinweise
|
|
|
|
- **Secrets in Logs**: `journalctl --user -u hermes-gateway` zeigt Secrets (API-Keys, Passwörter) in der Prozess-Umgebung an. Logs niemals ungefiltert teilen oder in öffentliche Channels posten. Vor dem Teilen mit `grep -v` filtern oder nur relevante Ausschnitte weitergeben.
|
|
- **Idempotenz**: `install.sh` kann mehrfach ausgeführt werden. Bestehende Dateien werden gesichert (`.bak.<timestamp>`), `room-map.json` mit Inhalt wird nicht überschrieben.
|
|
- **Python 3.13**: pipx installiert hermes-agent zwingend mit Python 3.13 (`--python python3.13`). Ein abweichendes Python in der pipx-venv wird automatisch erkannt und korrigiert. |