openvibers/openvibe.link Commits

Install: --ai installs the ai plugin it turns on (#165)

OP OpenVibers committed 20 h ago · af2537cb07 · 2 files, +18 −0

The ai plugin was written into the config but its package was never pip-installed, so the Link
restarted it forever ("No module named openvibe_ai"; found setting up a desk host on 2026-11-12).
A new installer test (scripts/test-install-plugins-installed.sh) checks that every option installs
the bundled plugin it turns on. It joins CI with the next workflow change (the token here cannot
edit workflow files).

Changes

ddiff --git a/install/install.sh b/install/install.sh
iindex d1a0f03..6723cb3 100755
---- a/install/install.sh
++++ b/install/install.sh
@@@ -1108,6 +1108,8 @@ fi
# ---- your own models (--ai): the ai plugin, and which model server answers now ----
if [ "$AI" = 1 ]; then
++ # The plugin's own package (it was configured but never installed: "No module named openvibe_ai", 2026-11-12).
++ $SUDO "$PIP" install --quiet "$STATE/plugins/ai" || die "the ai plugin did not install into $STATE/venv"
write_ai_config "$CONF/config.json" ${AI_ENDPOINT:+"$AI_ENDPOINT"}
found="$(ai_found ${AI_ENDPOINT:+"$AI_ENDPOINT"})"
if [ -n "$found" ]; then
ddiff --git a/scripts/test-install-plugins-installed.sh b/scripts/test-install-plugins-installed.sh
nnew file mode 100644
iindex 0000000..fee0137
---- /dev/null
++++ b/scripts/test-install-plugins-installed.sh
@@@ -0,0 +1,16 @@
++#!/bin/sh
++# Tests that install.sh pip-installs the bundled plugin behind every option that turns one on, so the Link never starts
++# a plugin whose package is missing ("No module named openvibe_ai": --ai configured the ai plugin and never installed
++# it, 2026-11-12). Community drivers (looi) come from their own registry and are not in this list.
++set -eu
++
++here="$(cd "$(dirname "$0")" && pwd)"
++installer="$here/../install/install.sh"
++fail() { printf 'FAIL: %s\n' "$*" >&2; exit 1; }
++
++# option → the bundled plugin it needs
++for pair in "--ai:ai" "--computer:computer" "--desk-host:computer" "--driver adeept:adeept_adr036" "--driver cozmo:cozmo" "--driver ros2:ros2" "base:sdk" "base:dryrun" "base:relay"; do
++ plugin="${pair##*:}"
++ grep -Eq "PIP\"? install [^#]*plugins/$plugin([\"\[ ]|$)" "$installer" || fail "${pair%%:*} needs plugins/$plugin, which the installer never pip-installs"
++done
++printf 'ok: every option installs the bundled plugin it turns on\n'