// ── The client-side module registry ──────────────────────────────────────── // // Phase 2, PR 7 of docs/website/MODULE_SYSTEM.md §2.7. The normative contract is // docs/website/MODULE_API.md §3.3; where the two disagree, the contract wins. // // A module's prebuilt chunk registers its routes, its nav entries and its feature // provider here, and core reads them back. This is the client twin of the // server's modules/loader.js — with one structural difference worth stating, // because it is what makes the file this short: core *hands* the registry to the // module (on `window.__rg`, see shared.js) rather than discovering it. There is // nothing to scan, nothing to validate a manifest against, and no failure mode // where half a module is registered. // // **Timing is the whole design.** Module chunks are `