fix(install.sh): numpy, circular import, room-map.json, archivar symlink in hermes root
FIX 1: numpy/faiss-cpu pip install in venv nach Plugin-Deployment
in allen drei Pfaden (perform_update, perform_update_only,
main interactive). Archivar braucht diese Packages für
FAISS Phase-1 RoomIndex — ohne sie crasht der Import.
FIX 2: Zirkelimport adapter.py ↔ archivar/adapter_integration.py
gebrochen. _room_context/_room_context_lock werden jetzt
lazy innerhalb handle_feedback_response() importiert.
FIX 3: Minimale room-map.json (version=1, rooms={}) wird als
Template bereitgestellt und bei Clean-Install ins
Datenverzeichnis kopiert. RC-Skill-Onboarding erstellt
die vollständige, maschinen-spezifische Version.
FIX 4: Archivar-Symlink liegt bereits korrekt im HERMES_DIR
(Commit 5c8026c). Keine Änderung nötig.
This commit is contained in:
+38
@@ -377,6 +377,15 @@ perform_update() {
|
||||
# by the installer. It is created by the RC-Skill onboarding
|
||||
# flow after gateway start. See RC-Skill: "Room Topic Discipline"
|
||||
fi
|
||||
|
||||
# ── FIX: numpy/faiss im venv installieren ──────────────────────
|
||||
# Archivar braucht numpy + faiss für FAISS Phase-1 RoomIndex.
|
||||
# Ohne diese Packages crasht der Import beim Gateway-Start.
|
||||
if [ -f "$hermes_dir/venv/bin/pip" ]; then
|
||||
"$hermes_dir/venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
elif [ -f "$hermes_dir/.venv/bin/pip" ]; then
|
||||
"$hermes_dir/.venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
fi
|
||||
|
||||
# Execute backend checks directly (Ollama check from lines 429-446)
|
||||
msg ollama_check
|
||||
@@ -543,6 +552,15 @@ perform_update_only() {
|
||||
find "$PLUGIN_DST" -name '*.pyc' -delete 2>/dev/null || true
|
||||
msg cache_cleared
|
||||
|
||||
# ── FIX: numpy/faiss im venv installieren ──────────────────────
|
||||
# Archivar braucht numpy + faiss für FAISS Phase-1 RoomIndex.
|
||||
# Ohne diese Packages crasht der Import beim Gateway-Start.
|
||||
if [ -f "$hermes_dir/venv/bin/pip" ]; then
|
||||
"$hermes_dir/venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
elif [ -f "$hermes_dir/.venv/bin/pip" ]; then
|
||||
"$hermes_dir/.venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
fi
|
||||
|
||||
# NOTE: room-map.json is MACHINE-SPECIFIC — never deployed
|
||||
# by --update-only. It is created by the RC-Skill onboarding
|
||||
# flow after gateway start. See RC-Skill: "Room Topic Discipline"
|
||||
@@ -842,6 +860,26 @@ find "$PLUGIN_DST" -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null ||
|
||||
find "$PLUGIN_DST" -name '*.pyc' -delete 2>/dev/null || true
|
||||
msg cache_cleared
|
||||
|
||||
# ── FIX: numpy/faiss im venv installieren ──────────────────────
|
||||
# Archivar braucht numpy + faiss für FAISS Phase-1 RoomIndex.
|
||||
# Ohne diese Packages crasht der Import beim Gateway-Start.
|
||||
if [ -f "$HERMES_DIR/venv/bin/pip" ]; then
|
||||
"$HERMES_DIR/venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
elif [ -f "$HERMES_DIR/.venv/bin/pip" ]; then
|
||||
"$HERMES_DIR/.venv/bin/pip" install numpy faiss-cpu 2>&1 | tail -1
|
||||
fi
|
||||
|
||||
# ─── FIX: room-map.json bereitstellen ────────────────────────
|
||||
# Der Installer stellt eine minimale room-map.json ins Datenverzeichnis.
|
||||
# Die vollständige, maschinen-spezifische Version wird vom RC-Skill-
|
||||
# Onboarding-Flow nach dem Gateway-Start erstellt.
|
||||
ROOM_MAP_DATA_DIR="$HOME/.hermes/hermes-agent/data"
|
||||
mkdir -p "$ROOM_MAP_DATA_DIR"
|
||||
if [ ! -f "$ROOM_MAP_DATA_DIR/room-map.json" ] && [ -f "$SCRIPT_DIR/templates/room-map.json" ]; then
|
||||
cp "$SCRIPT_DIR/templates/room-map.json" "$ROOM_MAP_DATA_DIR/room-map.json"
|
||||
msg room_map_deployed "$ROOM_MAP_DATA_DIR/room-map.json"
|
||||
fi
|
||||
|
||||
# ─── Fix #9: Provision minimal config.yaml + .env ──────────
|
||||
# Only when hermes has NO config yet (fresh install, no setup run)
|
||||
HERMES_HOME="$HOME/.hermes"
|
||||
|
||||
Reference in New Issue
Block a user