#!/usr/bin/env bash
set -euo pipefail
# Run separately in each tested checkout. HOME_DIR must be outside git.
: "${HOME_DIR:?}" "${DEMO_ROOT:?}"
mkdir -p "$DEMO_ROOT"
git init -q "$DEMO_ROOT"
node apps/server/src/bin.ts project add "$DEMO_ROOT" --title Demo --base-dir "$HOME_DIR"
# Remove the automatically created server project through project remove --force.
# Pair the dev client, label its connection Demo environment, select Demo,
# back to Chats, tap New thread, then tap Demo to open Choose project.
# Proxy the backend with delay-proxy.cjs to impose the same 20-second delay.
