Spaces:
Sleeping
Sleeping
File size: 1,852 Bytes
cce8120 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | #!/usr/bin/env bash
set -euo pipefail
ROOT=/root/projects/website-builder-backend-clean
cd "$ROOT"
echo "========================================"
echo "Dolor3V Runtime Validation Repair"
echo "========================================"
echo
echo "[1/8] Compile"
python3 -m compileall backend >/dev/null
echo
echo "[2/8] Start FastAPI"
uvicorn backend.main:app \
--host 127.0.0.1 \
--port 8000 \
>/tmp/dolor3v_runtime.log 2>&1 &
PID=$!
cleanup() {
kill $PID >/dev/null 2>&1 || true
}
trap cleanup EXIT
echo
echo "[3/8] Wait"
for i in $(seq 1 30); do
if curl -fs http://127.0.0.1:8000/health >/dev/null 2>&1; then
break
fi
sleep 1
done
curl -fs http://127.0.0.1:8000/health >/dev/null
echo "[OK] Runtime ready."
echo
echo "[4/8] Create workspace session"
SESSION_JSON=$(
curl -fs \
-X POST \
http://127.0.0.1:8000/api/workspace/session
)
echo "$SESSION_JSON"
SESSION_ID=$(
python3 - <<PY
import json
print(json.loads("""$SESSION_JSON""")["session_id"])
PY
)
echo
echo "[5/8] IDE search"
curl -fsG \
http://127.0.0.1:8000/api/ide/search \
--data-urlencode "query=backend"
echo
echo
echo "[6/8] Chat endpoint"
curl -fsG \
-X POST \
http://127.0.0.1:8000/api/workspace/chat/message \
--data-urlencode "session_id=${SESSION_ID}" \
--data-urlencode "role=user" \
--data-urlencode "content=Hello Dolor3V"
echo
echo
echo "[7/8] MCP"
curl -fs \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"ping"}' \
http://127.0.0.1:8000/mcp
echo
echo
echo "[8/8] Health"
curl -fs http://127.0.0.1:8000/health
echo
echo
echo "========================================"
echo "Runtime Validation Passed"
echo "========================================"
echo
echo "[CLEANUP]"
kill $PID >/dev/null 2>&1 || true
wait $PID 2>/dev/null || true
|