#!/usr/bin/env bash
# Run in either installed checkout. Use a fresh T3 home and an empty git project.
# Configure Cursor in Settings > Providers using the existing environment credential.
# Set CURSOR_MODEL to the same selected model on both sides.
set -euo pipefail
: "${DEMO_PROJECT:?Path to an empty synthetic git project}"
: "${CURSOR_MODEL:?Selected Cursor model slug}"
T3CODE_DEV_SEED=0 vp run dev
# In a second terminal, from the same checkout:
# node apps/server/src/bin.ts project add --base-dir .t3 --title 'Shell streaming' "$DEMO_PROJECT"
# node apps/server/src/bin.ts thread start --base-dir .t3 --title 'Shell streaming proof' \
#   --provider cursor --model "$CURSOR_MODEL" "$DEMO_PROJECT" \
#   'run exactly `for i in 1 2 3 4 5 6 7 8 9 10; do echo "tick $i"; sleep 3; done`'
# Open the thread in the paired web client at 1280x800 in light theme.
# Record the conversation. Expand its activity group and shell command row while running.
# Compare output before completion: base stays empty; head receives lines progressively.
