#!/bin/sh
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
if [ -d "$ROOT/sdks/typescript" ]; then
echo "== TypeScript SDK suite (type drift + runtime drift + integration) =="
[ -d "$ROOT/sdks/typescript/node_modules" ] || npm --prefix "$ROOT/sdks/typescript" install --no-audit --no-fund
npm --prefix "$ROOT/sdks/typescript" test
fi
if [ -d "$ROOT/sdks/python" ]; then
echo "== Python SDK suite (signature drift + runtime drift + integration) =="
PY="$ROOT/sdks/python/.venv/bin/python"
[ -x "$PY" ] || { python3 -m venv "$ROOT/sdks/python/.venv" && "$ROOT/sdks/python/.venv/bin/pip" install -q pytest build; }
"$PY" -m pytest "$ROOT/sdks/python/tests"
fi
echo "SDK suites: ALL PASSED"