try { const port = process.env.PORT || '3000'; const [health, ready] = await Promise.all([ fetch(`http://127.0.0.1:${port}/api/health`, { signal: AbortSignal.timeout(5000) }), fetch(`http://127.0.0.1:${port}/api/ready`, { signal: AbortSignal.timeout(5000) }), ]); const data = await health.json(); if (!health.ok || !ready.ok || data.service !== 'prompt' || data.release !== (process.env.RELEASE_SHA || 'development')) process.exit(1); } catch { process.exit(1); }