#!/usr/bin/env bash
set -euo pipefail
# Arguments: checkout root, synthetic sample directory, JSON output file.
# Run seed-desktop.mjs first to register Replay (dev) through the app's RPC.
checkout=$1
sample=$2
output=$3
mkdir -p "$sample"
git -C "$sample" init -q
cd "$checkout"
node apps/server/src/bin.ts project add --base-dir .desktop-evidence --title 'Selection evidence' "$sample"
node apps/server/src/bin.ts thread start --base-dir .desktop-evidence --provider devReplay --model showcase --title 'Selection evidence' "$sample" 'Show the sample reply' --json > "$output"
