#!/usr/bin/env bash
set -e
cd /home/claude/repos/exult-agent
WT=/tmp/curo-main-wt
rm -rf "$WT"
echo "=== create worktree at origin/main ==="
git worktree add --detach "$WT" origin/main
cd "$WT"
echo "=== worktree HEAD ==="
git log -1 --format="%H | %s"
echo "=== confirm auth.ts exists here ==="
git ls-files tools/curogram-mcp/curogram-auth.ts
echo "=== cherry-pick the fix ==="
git cherry-pick 9537e5362853590739a4ee43f985e07203032bf1
echo "=== new HEAD ==="
git log -1 --format="%H | %an <%ae> | %s"
echo "=== diff stat vs origin/main ==="
git diff --stat origin/main HEAD
