feat: cloud adapters E2B/Modal and billing export (SAND-WP-0010)

Add credentialed E2B and Modal extensions, burst routing fallback,
fin-hub meter export hook, BYOK docs, and 77 tests.
This commit is contained in:
2026-06-24 12:50:19 +02:00
parent 6d0a1a8b1e
commit 15f031fd65
26 changed files with 859 additions and 75 deletions

32
scripts/smoke-cloud-adapter.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Operator smoke for cloud adapters — requires provider credentials.
set -euo pipefail
PROVIDER="${1:-e2b}"
case "$PROVIDER" in
e2b)
PROFILE="profile.e2b-burst"
if [[ -z "${E2B_API_KEY:-}" ]]; then
echo "E2B_API_KEY not set — skipping live smoke" >&2
exit 0
fi
;;
modal)
PROFILE="profile.modal-gpu"
if [[ -z "${MODAL_TOKEN_ID:-}" ]]; then
echo "MODAL_TOKEN_ID not set — skipping live smoke" >&2
exit 0
fi
;;
*)
echo "Usage: $0 [e2b|modal]" >&2
exit 1
;;
esac
echo "Smoke: sandboxer create --profile $PROFILE"
STATUS=$(sandboxer create --profile "$PROFILE" --project sand-boxer)
ID=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['sandbox_id'])")
echo "Created: $ID"
sandboxer destroy "$ID"
echo "Destroyed: $ID"