#!/usr/bin/env bash
# Run brain bridge + bot together for local development.
# The bridge expects the VNC desktop on DISPLAY :1 for screen capture.
set -euo pipefail
cd "$(dirname "$0")/.."

./scripts/start_bridge.sh &
BRIDGE_PID=$!
trap 'kill $BRIDGE_PID 2>/dev/null || true' EXIT

# Give the bridge a moment to bind its port before the bot queries /health.
sleep 2
./scripts/start_bot.sh
