#!/usr/bin/env bash
set -Eeuo pipefail
B="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
python3 "$B/tests/test_registry.py"
SHIRE_ROOT="$B/payload" SHIRE_AGENT_REGISTRY="$B/payload/config/agents-registry.json" SHIRE_AGENTS_ROOT="$B/payload/agents/definitions" SHIRE_AGENT_DATA="$(mktemp -d)" SHIRE_VAULT="$(mktemp -d)" python3 "$B/payload/runtime/agent_hub.py" --check
node --check "$B/payload/apps/marketing-boss/server.js"
node --check "$B/payload/apps/marketing-boss/marketing-boss-worker.js"
(cd "$B/payload/apps/marketing-boss" && npm test)
(cd "$B/payload/apps/limbforge" && npm run viewport-safety)
python3 -m compileall -q "$B/payload/apps/flexiforge/backend"
node --check "$B/payload/apps/store-doctor-foundation/server/index.mjs"
echo "PASS: deployment bundle static and packaged tests"
