#!/usr/bin/env bash
# From each revision's checkout, after starting its isolated dev server with
# T3CODE_DEV_SEED=0 and the T3 Connect test-stage environment loaded.
# Usage: bash seed.sh <isolated-t3-home> <synthetic-workspace>
set -euo pipefail
proof_home=$1
proof_workspace=$2
mkdir -p "$proof_workspace"
git init --quiet --initial-branch=main "$proof_workspace"
node apps/server/src/bin.ts project add "$proof_workspace" --title 'Reconnect demonstration' --base-dir "$proof_home"
node apps/server/src/bin.ts thread start "$proof_workspace" 'Explain how to resume work after a network interruption.' --title 'Returning to work' --provider devReplay --model multi-turn --wait --json --base-dir "$proof_home"
# Add this environment through Settings > Environments after signing in to
# the test-stage account. Pass the returned threadId to driver.mjs.
