From 00211990779567e435b2bc3d5161601f4053068a Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Wed, 24 Jun 2026 19:30:16 +0200 Subject: [PATCH] mother: preflight numpy/Pillow imports, not just python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit geodesic-dome-mcp imports numpy + PIL at module load (not stdlib-only, as #178 incorrectly stated). A present python3 therefore proves nothing — the preflight would pass on a host missing numpy/Pillow and the tool would fail only when the MCP host first invokes it. - setup-mother.sh: add a 'python3 -c "import numpy, PIL"' check after the python3-exists check, with a pkg install py311-numpy py311-pillow hint. - MOTHER-SETUP.md: correct the prereq from 'stdlib only, no pip' to 'python3 + numpy + Pillow'. Co-Authored-By: Claude Opus 4.8 --- packaging/mother/MOTHER-SETUP.md | 7 ++++--- packaging/mother/setup-mother.sh | 11 ++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packaging/mother/MOTHER-SETUP.md b/packaging/mother/MOTHER-SETUP.md index e2bc9c4..630a4a4 100644 --- a/packaging/mother/MOTHER-SETUP.md +++ b/packaging/mother/MOTHER-SETUP.md @@ -20,9 +20,10 @@ infrastructure. ## Prerequisites -- **`python3` on PATH** — `geodesic-dome-mcp` is a python3 script (standard - library only, no `pip install`). `setup-mother.sh` preflights this and aborts - if it is missing. Install with `pkg install python3`. +- **`python3` with `numpy` + `Pillow`** — `geodesic-dome-mcp` imports both at + module load (not stdlib-only). `setup-mother.sh` preflights that python3 exists + *and* that `numpy`/`PIL` actually import, aborting if either is missing. Install + with `pkg install python3 py311-numpy py311-pillow`. - **`COLIBRI_AUTOSPAWN_RPC_PROMPT` (a decision, not a dependency)** — the daemon reads this on boot (`crates/colibri-daemon/src/socket.rs`). Set it to have the daemon auto-spawn an agent with that opening prompt on boot; leave it unset for diff --git a/packaging/mother/setup-mother.sh b/packaging/mother/setup-mother.sh index 98c8c34..05f427c 100755 --- a/packaging/mother/setup-mother.sh +++ b/packaging/mother/setup-mother.sh @@ -74,7 +74,16 @@ if ! command -v python3 >/dev/null 2>&1; then echo " Install it first: pkg install python3" exit 1 fi -echo " python3: $(command -v python3) OK" +# geodesic-dome-mcp imports numpy + PIL at module load, so a present python3 +# is not enough — verify the modules actually import, or the tool fails only +# when the MCP host first calls it. +if ! python3 -c "import numpy, PIL" >/dev/null 2>&1; then + echo " ERROR: python3 present but numpy/Pillow are not importable." + echo " geodesic-dome-mcp needs both (imported at module load)." + echo " Install them: pkg install py311-numpy py311-pillow" + exit 1 +fi +echo " python3: $(command -v python3) (numpy + PIL OK)" echo "" # ── 1. colibri binaries ─────────────────────────────────────────────── -- 2.45.3