mother: preflight numpy/Pillow imports, not just python3
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled

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 <noreply@anthropic.com>
This commit is contained in:
Sam & Claude 2026-06-24 19:30:16 +02:00 committed by Sam & Claude
parent 656e53baf1
commit 0021199077
2 changed files with 14 additions and 4 deletions

View file

@ -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

View file

@ -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 ───────────────────────────────────────────────