#!/usr/bin/env bash
set -euo pipefail
# Run from either evidence checkout, which has fresh T3 state and the fixture provider installed.
scenario="${1:-one}"
message='Launch one asynchronous delegate, end the turn, then process its result when resumed.'
if [ "$scenario" = two ]; then message='TWO_DELEGATES: Launch two asynchronous delegates, end the turn, and process their results when resumed.'; fi
node apps/server/src/bin.ts thread start --base-dir .t3 --provider evidence --model handoff --title "Delegation handoff: ${2:-$scenario}" apps/server "$message" --json
