#!/usr/bin/env bash
set -euo pipefail
: "${T3_HOME:?Set an isolated home for this checkout}"
: "${DEMO_ROOT:?Set a new synthetic workspace directory}"
# Run separately in each checkout after vp i. Start its backend with:
# T3CODE_DEV_SEED=0 vp run dev --host 0.0.0.0
mkdir -p "$DEMO_ROOT"
node apps/server/src/bin.ts project add "$DEMO_ROOT" --title 'TalkBack demo' --base-dir "$T3_HOME"
node apps/server/src/bin.ts thread start "$DEMO_ROOT" 'Hello' --title 'Dictation focus' --provider devReplay --model multi-turn --wait --json --base-dir "$T3_HOME"
# On the pooled Pixel 9 (Android API 36), install this checkout's cached dev client
# using vp run mobile:install android --session "$SESSION" --metro "$METRO_ORIGIN".
# Pair to this checkout's isolated server. Open the synthetic Dictation focus thread.
# In Settings > Voice choose this environment, Local model, Whisper Tiny English;
# download it and grant microphone permission. Enable Android Settings > Accessibility > TalkBack.
# Return to the thread, select its Metro CDP target, then run drive.sh.
