#!/usr/bin/env bash
# Run from each evidence checkout after vp i and starting its isolated dev server.
# Start with T3CODE_DEV_SEED=0 and the test Gemini gateway URL in GOOGLE_GEMINI_BASE_URL.
# In Settings > Providers add Antigravity, select Gemini API key, supply a nonempty
# placeholder key, Add instance, then Connect. This run used Antigravity 1.5.12.
set -euo pipefail
project_dir=${1:?Pass an empty scratch git repository path}
node apps/server/src/bin.ts project add --base-dir .t3 --title 'Compaction demo' "$project_dir"
reply=$(node apps/server/src/bin.ts thread start --base-dir .t3 \
  --title 'Advertised compaction' --provider antigravity --model gemini-3.8-flash \
  --wait --json "$project_dir" 'Remember the codeword BLUEFIN. Reply with just: ok.')
printf '%s\n' "$reply"
thread_id=$(printf '%s' "$reply" | python3 -c 'import json,sys; print(json.load(sys.stdin)["threadId"])')
node apps/server/src/bin.ts thread send --base-dir .t3 --wait --json "$thread_id" \
  'Also remember the number 42. Reply with just: ok.'
# Open this thread in the paired web client. Light theme, viewport 1280x800, DPR 2.
# Close the thread details panel to omit environment details from captures.
# Start recording. Type /compact in the composer and capture the advertised command.
# Click Submit message, wait for completion, then capture and stop recording.
# Base: Provider error + unsupported /compact banner.
# Head: Context compacted, no provider error.
