That took more digging than expected — the first two deploys reported "healthy" but were actually crash-looping on every real page load with Cannot find package 'valibot'. Root cause: Agentuity's build tooling generates a pruned package.json for the deployed container by statically scanning known SvelteKit file conventions (+server.ts, hooks.server.ts, $lib/server/**), and it doesn't yet scan *.remote.ts files — so valibot, only imported from those, never made it into the deployment manifest despite being correctly declared in the repo's package.json. Fixed by relocating the shared valibot schemas from auth.remote.ts into src/lib/server/auth.ts (which hooks.server.ts already imports) — a legitimate, sensible home for them regardless, and it puts the valibot import somewhere Agentuity's tracer actually sees.
That took more digging than expected — the first two deploys reported "healthy" but were actually crash-looping on every real page load with
Cannot find package 'valibot'. Root cause: Agentuity's build tooling generates a prunedpackage.jsonfor the deployed container by statically scanning known SvelteKit file conventions (+server.ts,hooks.server.ts,$lib/server/**), and it doesn't yet scan*.remote.tsfiles — sovalibot, only imported from those, never made it into the deployment manifest despite being correctly declared in the repo'spackage.json. Fixed by relocating the shared valibot schemas fromauth.remote.tsintosrc/lib/server/auth.ts(whichhooks.server.tsalready imports) — a legitimate, sensible home for them regardless, and it puts thevalibotimport somewhere Agentuity's tracer actually sees.