#!/usr/bin/env bash
# Run from apps/server in an isolated checkout whose dev server was started
# with T3CODE_DEV_SEED=0. Pass its T3 home and an empty scratch git repo.
set -euo pipefail
proof_home="$1"
proof_project="$2"
node src/bin.ts project add --base-dir "$proof_home" --title 'Protocol log proof' "$proof_project"
node src/bin.ts thread start --base-dir "$proof_home" --provider codex --model gpt-6-luna --title 'Thread A' --json "$proof_project" 'Reply with the word alpha only.'
sleep 5
node src/bin.ts thread start --base-dir "$proof_home" --provider codex --model gpt-6.1-sol --title 'Thread B' --wait --json "$proof_project" 'Reply with the word alpha only.'
# capture.py CHECKOUT OUTPUT_DIRECTORY before|after COMMIT
# reports the actual per-file native thread references from the server's logs.
