#!/usr/bin/env bash
set -eu
# Run in each checkout after vp i. No live user database is used.
# Start recorder.mjs with RECORD_UPSTREAM (real configured provider URL),
# RECORD_FILE (new capture), and WS_MODULE (installed ws/wrapper.mjs path).
# Use a fresh CODEX_HOME containing your auth.json and this config:
# model = "gpt-6-astra"
# openai_base_url = "http://127.0.0.1:18981/v1"
# Start: T3CODE_DEV_SEED=0 CODEX_HOME="$RECORDING_HOME" vp run dev
project="$1"
node apps/server/src/bin.ts project add "$project" --title 'Source evidence' --base-dir .t3
node apps/server/src/bin.ts thread start "$project" \
 'Reply with just the word hello. Do not run any tools.' \
 --provider codex --model gpt-6-astra --generate-title --wait --json --base-dir .t3
# Inspect x-codex-turn-metadata in client_metadata for each generate=true frame.
# Open the returned thread in the paired web app to inspect the completed chat.
