#!/usr/bin/env bash
set -euo pipefail
checkout=$1
project=$2
proof_tools=$(cd -- "$(dirname -- "$0")" && pwd)
mkdir -p "$project"
git init "$project"
cd "$checkout"
node apps/server/src/bin.ts project add --base-dir .t3 --title 'Session title proof' "$project"
node apps/server/src/bin.ts thread start --base-dir .t3 --provider claudeAgent --model claude-haiku-5-5 --wait --json "$project" 'Reply with the single word ok.'
# Copy title-watch.py into the synthetic project, then save the returned thread's
# nativeThreadRef.nativeId as session-id before opening the terminal observer.
cp "$proof_tools/title-watch.py" "$project/title-watch.py"
