#!/usr/bin/env bash
set -euo pipefail
# Run from each installed checkout, with its fresh isolated dev server running.
# Supply MODEL_ID through the environment; do not publish operational metadata.
: "${MODEL_ID:?Set an available Codex model}"
: "${DEMO_DIR:?Set a synthetic workspace directory}"
mkdir -p "$DEMO_DIR"
convert -size 640x360 xc:'#e6f2ff' -fill '#153653' -draw 'roundrectangle 80,90 560,270 24,24' -fill white -gravity center -pointsize 36 -annotate 0 'Image inspection demo' "$DEMO_DIR/screenshot.png"
git -C "$DEMO_DIR" init -q
node apps/server/src/bin.ts project add "$DEMO_DIR" --title 'Image inspection demo' --base-dir .t3
node apps/server/src/bin.ts thread start "$DEMO_DIR" 'Inspect screenshot.png using view_image with the relative path argument screenshot.png exactly once. Then reply only: Image inspection complete. Do not use shell tools or read other files.' --title 'Inspect screenshot.png' --provider codex --model "$MODEL_ID" --base-dir .t3 --wait --json
# Open the returned thread in the signed-in web client at 1280x800, light theme.
# Hide sidebar and details panel. Expand Worked for, then the eye/Read row.
# Base has neither control; head shows the row and the synthetic image.
