#!/usr/bin/env bash
set -euo pipefail
# Run from either checkout after starting its dev server with fresh state,
# T3CODE_DEV_SEED=0, and GOOGLE_GEMINI_BASE_URL pointing to the test hub.
# In Settings > Providers add Antigravity, choose Gemini API key, and enter
# a non-empty dummy key in the instance API key field. agy 1.5.12 is on PATH.
# Pass the absolute path of the accompanying socket.cjs as the first argument.
probe=$(realpath "$1")
node apps/server/src/bin.ts project add --base-dir .t3 .
node apps/server/src/bin.ts thread start --base-dir .t3 \
  --provider antigravity --model gemini-3.8-flash \
  --title 'Unix socket proof' --wait . \
  "Run exactly this shell command once, do not modify any files or retry: node $probe . Report its output verbatim. Do not include paths or machine names in your reply."
