#!/usr/bin/env bash
# Run from either checkout after vp i and starting its dev server with
# T3CODE_DEV_SEED=0 and GOOGLE_GEMINI_BASE_URL supplied in the environment.
# Copy antigravity-proof.ts to scripts/ in that checkout. Copy the wrapper to
# the evidence directory as an executable named agy. Use the same directory
# and synthetic project on both sides, with each checkout's own fresh .t3.
set -eu
origin=$1
home=$2
evidence=$3
side=$4
reported_version=$5 # actual or 1.5.0
printf '%s' "$side" > "$evidence/side"
printf '%s' "$reported_version" > "$evidence/reported-version"
node scripts/antigravity-proof.ts "$home" "$origin" "$evidence/agy" configure
node scripts/antigravity-proof.ts "$home" "$origin" "$evidence/agy" connect
# Connect runs asynchronously. Check provider status in Settings before the turn.
mkdir -p "$evidence/project"
git init -q "$evidence/project"
node apps/server/src/bin.ts project add "$evidence/project" --title 'Antigravity proof' --base-dir "$home"
node apps/server/src/bin.ts thread start "$evidence/project" 'Reply with just the word PONG.' --base-dir "$home" --provider antigravity --model gemini-3.8-flash --title "Antigravity $reported_version proof" --wait --json
# Open the returned thread in the browser. Collapse sidebar and thread details,
# dismiss the error toast, blur the composer, and compare two stills 500 ms apart.
# The interaction recordings type the same prompt in this thread and click Submit.
