#!/usr/bin/env bash
# 简要诊断 :9002 / gz-launch（GzWeb 使用 wss://同域/gzbridge/）
set -euo pipefail

echo "========== GzWeb / gzbridge (:9002) =========="
echo "[1] port 9002"
ss -ltnp 2>/dev/null | grep ':9002 ' || echo "  (not listening)"

echo
echo "[2] processes"
ps aux | grep -E 'gz sim|gz-launch|gz launch.*websocket|warehouse_gzweb' | grep -v grep || echo "  (none)"

echo
echo "GzWeb panel: wss://{your-space}.spaces.databall.tech/gzbridge/"
