#!/bin/sh
# vnext shim — ALL boot logic lives in `conveyor-agent boot`
# (packages/conveyor-agent/src/boot/). Keep this file dumb: env floor,
# best-effort self-update preflight, exec. The preflight runs baked code and
# only installs; the exec picks up whichever global bin is now current.
set -eu
export HOME=/home/conveyor
export PATH="/home/conveyor/.bun/bin:${PATH}"
export NO_UPDATE_NOTIFIER=1
conveyor-agent boot --preflight-update || echo "[shim] preflight failed; booting baked agent"
exec conveyor-agent boot
