Files
Rohit Ghumare c36aedf3a0 fix(website): bake meta at build time, stop falling back to v0.0.0
The landing page kept reverting to "V0.0.0" on every release. Root
cause: website/lib/meta.ts resolved repo files at runtime via
import.meta.url, and after Next.js compiles server components the URL
resolves inside .next/server/. `../..` from there lands in the build
cache, not at the repo root, so the package.json read fails silently
and `pkg?.version ?? "0.0.0"` kicks in.

- website/scripts/gen-meta.mjs: new build-time script. Runs from
  website/scripts/, walks one level up to find the real repo root,
  reads package.json + src/mcp/tools-registry.ts +
  src/triggers/api.ts + src/types.ts + test/ and writes
  website/lib/generated-meta.json. Fails loud if version is missing
  (no silent 0.0.0 ever again).
- website/package.json: `predev` and `prebuild` hooks run gen-meta.
- website/lib/meta.ts: collapsed from 117 lines of runtime file
  resolution to a static JSON import. Next.js bundles the values
  directly into the server component output.
- website/lib/generated-meta.json: seeded with current values so
  editors don't complain about the missing import target.

Verified locally: `.next/server/app/index.html` now contains
"ZERO EXTERNAL DATABASES · v0.9.1" instead of "v0.0.0".
2026-04-21 13:36:06 +01:00
..