#!/usr/bin/env bash
set -euo pipefail
# Run inside the checkout under test, after T3CODE_DEV_SEED=0 vp run dev --host 0.0.0.0.
# Supply the server port and isolated base directory printed by the dev runner.
: "${T3CODE_PORT:?}" "${PROOF_BASE_DIR:?}"
node apps/server/src/bin.ts project add "$PWD" --title 'Archive proof' --base-dir "$PROOF_BASE_DIR"
node apps/server/src/bin.ts thread start "$PWD" Hello --title 'Archive proof' --provider devReplay --model multi-turn --base-dir "$PROOF_BASE_DIR"
