@tokenoftrust/storefront-runner 2.4.87 → 2.4.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/apps/storefront/astro.config.mjs +1 -1
  2. package/apps/storefront/dev-plugins/tenant-hot-reload.mjs +1 -1
  3. package/apps/storefront/env.d.ts +1 -1
  4. package/apps/storefront/perf/README.md +7 -7
  5. package/apps/storefront/perf/assert-budgets.ts +2 -2
  6. package/apps/storefront/public/shared/commerce-chrome.css +1 -1
  7. package/apps/storefront/public/shared/commerce-marketing.css +1 -1
  8. package/apps/storefront/src/components/catalog/storefront/CollectionCard.astro +1 -1
  9. package/apps/storefront/src/components/catalog/storefront/ProductCard.astro +4 -4
  10. package/apps/storefront/src/components/catalog/storefront/commerce/BrandGrid.astro +1 -1
  11. package/apps/storefront/src/components/catalog/storefront/commerce/PriceDisplay.astro +2 -2
  12. package/apps/storefront/src/components/catalog/storefront/commerce/ProductCarousel.astro +2 -2
  13. package/apps/storefront/src/components/catalog/storefront/commerce/ProductGrid.astro +3 -3
  14. package/apps/storefront/src/components/catalog/storefront/commerce/ReviewList.astro +1 -1
  15. package/apps/storefront/src/components/catalog/storefront/islands/ImageGallery.tsx +1 -1
  16. package/apps/storefront/src/components/catalog/storefront/islands/QuickView.tsx +2 -2
  17. package/apps/storefront/src/components/catalog/storefront/islands/RecentlyViewed.tsx +2 -2
  18. package/apps/storefront/src/components/catalog/storefront/islands/SearchTypeahead.tsx +2 -2
  19. package/apps/storefront/src/components/catalog/storefront/islands/VariantSelector.tsx +1 -1
  20. package/apps/storefront/src/components/compliance/storefront/islands/AgeGate.tsx +2 -2
  21. package/apps/storefront/src/components/compliance/storefront/islands/IsolatedAgeGate.tsx +1 -1
  22. package/apps/storefront/src/components/{AsyncStylesheet.astro → content/storefront/AsyncStylesheet.astro} +2 -2
  23. package/apps/storefront/src/components/{Breadcrumbs.astro → content/storefront/Breadcrumbs.astro} +3 -3
  24. package/apps/storefront/src/components/{Seo.astro → content/storefront/Seo.astro} +5 -5
  25. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogIndexView.astro +6 -6
  26. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPaywall.astro +2 -2
  27. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPostArticle.astro +7 -7
  28. package/apps/storefront/src/components/{blog → content/storefront/blog}/PostAccessBadge.astro +1 -1
  29. package/apps/storefront/src/components/{blog → content/storefront/blog}/PostGrid.astro +3 -3
  30. package/apps/storefront/src/components/{blog → content/storefront/blog}/ReactionBar.astro +1 -1
  31. package/apps/storefront/src/components/{blog → content/storefront/blog}/ShareRow.astro +1 -1
  32. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/MegaMenu.astro +3 -3
  33. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/NavDropdown.astro +2 -2
  34. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteFooter.astro +5 -5
  35. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteHeader.astro +8 -8
  36. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/UtilityNav.astro +2 -2
  37. package/apps/storefront/src/components/content/{Callout.astro → storefront/content/Callout.astro} +1 -1
  38. package/apps/storefront/src/components/content/{PromoTiles.astro → storefront/content/PromoTiles.astro} +3 -3
  39. package/apps/storefront/src/components/content/{ProseSections.astro → storefront/content/ProseSections.astro} +3 -3
  40. package/apps/storefront/src/components/{home → content/storefront/home}/Hero.astro +4 -4
  41. package/apps/storefront/src/components/{islands → content/storefront/islands}/MobileNav.tsx +2 -2
  42. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CardGrid.astro +2 -2
  43. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CodeSample.astro +1 -1
  44. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CtaBand.astro +2 -2
  45. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Faq.astro +5 -5
  46. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Integrations.astro +3 -3
  47. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingBlocks.astro +11 -11
  48. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingCtas.astro +1 -1
  49. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingHero.astro +2 -2
  50. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/ProofStrip.astro +1 -1
  51. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/SplitCompare.astro +2 -2
  52. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Steps.astro +2 -2
  53. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Testimonials.astro +2 -2
  54. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/TrustBar.astro +1 -1
  55. package/apps/storefront/src/components/{style-guide → content/storefront/style-guide}/StyleGuideNav.astro +1 -1
  56. package/apps/storefront/src/components/{the-build → content/storefront/the-build}/TheBuildIndexView.astro +5 -5
  57. package/apps/storefront/src/components/customers/storefront/islands/SavedList.tsx +2 -2
  58. package/apps/storefront/src/config/adminTargetTenant.ts +1 -1
  59. package/apps/storefront/src/config/devTenants.ts +1 -1
  60. package/apps/storefront/src/config/resolver.ts +1 -1
  61. package/apps/storefront/src/layouts/Layout.astro +28 -28
  62. package/apps/storefront/src/lib/{admin → access/admin}/README.md +3 -3
  63. package/apps/storefront/src/lib/{admin → access/admin}/adminShell.ts +1 -1
  64. package/apps/storefront/src/lib/{admin → access/admin}/envelope.ts +2 -2
  65. package/apps/storefront/src/lib/{admin → access/admin}/viewmodels/settings.ts +2 -2
  66. package/apps/storefront/src/lib/{auth → access/auth}/adminApiGuard.ts +2 -2
  67. package/apps/storefront/src/lib/{auth → access/auth}/adminEntry.ts +2 -2
  68. package/apps/storefront/src/lib/{auth → access/auth}/adminLanding.ts +1 -1
  69. package/apps/storefront/src/lib/{auth → access/auth}/identityToken.ts +1 -1
  70. package/apps/storefront/src/lib/{auth → access/auth}/loginGate.ts +2 -2
  71. package/apps/storefront/src/lib/{auth → access/auth}/totAccessClient.ts +4 -4
  72. package/apps/storefront/src/lib/{dashboard → access/dashboard}/delegateGate.ts +2 -2
  73. package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffAdmission.ts +1 -1
  74. package/apps/storefront/src/lib/{dashboard → access/dashboard}/tenantSelection.ts +1 -1
  75. package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/settings.ts +4 -4
  76. package/apps/storefront/src/lib/{email → access/notifications}/magicLinkInviteEmail.ts +1 -1
  77. package/apps/storefront/src/lib/{shared → access/shared}/accessExplain.ts +1 -1
  78. package/apps/storefront/src/lib/{adminTenantEnvelope.ts → access/shared/adminTenantEnvelope.ts} +3 -3
  79. package/apps/storefront/src/lib/{shared → access/shared}/developerInvites.ts +4 -4
  80. package/apps/storefront/src/lib/{shared → access/shared}/invitePreflight.ts +1 -1
  81. package/apps/storefront/src/lib/{shared → access/shared}/principalGrants.ts +2 -2
  82. package/apps/storefront/src/lib/{shared → access/shared}/viewerGrant.ts +1 -1
  83. package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
  84. package/apps/storefront/src/lib/activity/uiActor.ts +4 -4
  85. package/apps/storefront/src/lib/activity/workerCommit.ts +1 -1
  86. package/apps/storefront/src/lib/admin/services/mock/index.ts +4 -4
  87. package/apps/storefront/src/lib/assets/shared/imageAttrs.ts +1 -1
  88. package/apps/storefront/src/lib/{admin → automation/admin}/viewmodels/aiWorkflows.ts +3 -3
  89. package/apps/storefront/src/lib/{admin → automation}/ai/askEnvelope.ts +1 -1
  90. package/apps/storefront/src/lib/{admin → automation}/ai/operationalRuns.ts +4 -4
  91. package/apps/storefront/src/lib/{admin/services/mock → automation/fixtures}/aiWorkflows.ts +4 -4
  92. package/apps/storefront/src/lib/basePath.ts +2 -2
  93. package/apps/storefront/src/lib/catalog/fixtures/products.ts +4 -4
  94. package/apps/storefront/src/lib/catalog/shared/featuredProductsPresentation.ts +1 -1
  95. package/apps/storefront/src/lib/catalog/tot/tenantCatalog.ts +1 -1
  96. package/apps/storefront/src/lib/checkout/admin/checkoutStyleTarget.ts +2 -2
  97. package/apps/storefront/src/lib/checkout/fixtures/checkoutSettings.ts +1 -1
  98. package/apps/storefront/src/lib/compliance/browser/checkoutVerificationFlow.ts +1 -1
  99. package/apps/storefront/src/lib/compliance/verification/totVerificationClient.ts +1 -1
  100. package/apps/storefront/src/lib/{blog → content/blog}/access.ts +1 -1
  101. package/apps/storefront/src/lib/{blog → content/blog}/collection.ts +9 -9
  102. package/apps/storefront/src/lib/{blog → content/blog}/postView.ts +5 -5
  103. package/apps/storefront/src/lib/{blog → content/blog}/provider.ts +7 -7
  104. package/apps/storefront/src/lib/{chrome → content/chrome}/footerLegal.ts +2 -2
  105. package/apps/storefront/src/lib/{chrome → content/chrome}/trackingPlacements.ts +1 -1
  106. package/apps/storefront/src/lib/{seo → content/seo}/faqItems.ts +1 -1
  107. package/apps/storefront/src/lib/{seo → content/seo}/structuredData.ts +1 -1
  108. package/apps/storefront/src/lib/{breadcrumbs.ts → content/shared/breadcrumbs.ts} +1 -1
  109. package/apps/storefront/src/lib/{heroSlideshow.ts → content/shared/heroSlideshow.ts} +1 -1
  110. package/apps/storefront/src/lib/{homeVisualParity.ts → content/shared/homeVisualParity.ts} +1 -1
  111. package/apps/storefront/src/lib/{jsonld.ts → content/shared/jsonld.ts} +1 -1
  112. package/apps/storefront/src/lib/{rawChrome.ts → content/shared/rawChrome.ts} +12 -12
  113. package/apps/storefront/src/lib/{rawMarketingHtml.ts → content/shared/rawMarketingHtml.ts} +3 -3
  114. package/apps/storefront/src/lib/{styleGuideThemes.ts → content/shared/styleGuideThemes.ts} +3 -3
  115. package/apps/storefront/src/lib/{storyblok → content/storyblok}/content-model.ts +1 -1
  116. package/apps/storefront/src/lib/{storyblok → content/storyblok}/provider.ts +27 -27
  117. package/apps/storefront/src/lib/{the-build → content/the-build}/provider.ts +1 -1
  118. package/apps/storefront/src/lib/{the-build → content/the-build}/toc.ts +1 -1
  119. package/apps/storefront/src/lib/customers/fixtures/customers.ts +3 -3
  120. package/apps/storefront/src/lib/d1/schema-apps.ts +2 -2
  121. package/apps/storefront/src/lib/{admin → developer-experience/admin}/memoizeByEnvelope.ts +1 -1
  122. package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityIngestToken.ts +2 -2
  123. package/apps/storefront/src/lib/{dev → developer-experience/dev}/cliSignInCode.ts +3 -3
  124. package/apps/storefront/src/lib/{dev → developer-experience/dev}/livePreview.ts +1 -1
  125. package/apps/storefront/src/lib/{dev → developer-experience/dev}/previewStatus.ts +2 -2
  126. package/apps/storefront/src/lib/{dev → developer-experience/dev}/rendezvousBroker.ts +2 -2
  127. package/apps/storefront/src/lib/{dev → developer-experience/dev}/subjectReissue.ts +2 -2
  128. package/apps/storefront/src/lib/email/candidateConflictEmail.ts +1 -1
  129. package/apps/storefront/src/lib/{messaging → engagement/messaging}/messagesClient.ts +1 -1
  130. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/digest.ts +2 -2
  131. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/resendClient.ts +1 -1
  132. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/send.ts +2 -2
  133. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/subscribers.ts +1 -1
  134. package/apps/storefront/src/lib/{social → engagement/social}/golive.ts +2 -2
  135. package/apps/storefront/src/lib/{social → engagement/social}/notify.ts +1 -1
  136. package/apps/storefront/src/lib/{social → engagement/social}/tokenStore.ts +3 -3
  137. package/apps/storefront/src/lib/fulfillment/fulfillmentService.ts +3 -3
  138. package/apps/storefront/src/lib/integrations/integration/browserEnvironment.ts +1 -1
  139. package/apps/storefront/src/lib/{apps → measurement/consent}/consentConfigRead.ts +1 -1
  140. package/apps/storefront/src/lib/{tracking → measurement/tracking}/d1Control.ts +2 -2
  141. package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionCollector.ts +2 -2
  142. package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionStore.ts +0 -0
  143. package/apps/storefront/src/lib/{tracking → measurement/tracking}/pruneRollup.ts +2 -2
  144. package/apps/storefront/src/lib/{tracking → measurement/tracking}/publishSafetyNet.ts +1 -1
  145. package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantD1Registry.ts +2 -2
  146. package/apps/storefront/src/lib/{monitoring → observability/monitoring}/manifest.ts +2 -2
  147. package/apps/storefront/src/lib/{analytics → observability/performance}/budgets.json +1 -1
  148. package/apps/storefront/src/lib/orders/fixtures/orders.ts +4 -4
  149. package/apps/storefront/src/lib/previewReload.ts +1 -1
  150. package/apps/storefront/src/lib/publication/contentProvider.ts +7 -7
  151. package/apps/storefront/src/lib/publication/mountedDiscovery.ts +1 -1
  152. package/apps/storefront/src/lib/publication/rootDiscovery.ts +4 -4
  153. package/apps/storefront/src/lib/reporting/fixtures/reporting.ts +3 -3
  154. package/apps/storefront/src/lib/runtimeEnv.ts +1 -1
  155. package/apps/storefront/src/lib/subscriptions/fixtures/subscriptions.ts +3 -3
  156. package/apps/storefront/src/middleware/controlPlane.ts +7 -7
  157. package/apps/storefront/src/middleware/index.ts +11 -11
  158. package/apps/storefront/src/middleware/renderChain.ts +6 -6
  159. package/apps/storefront/src/pages/[...slug].astro +13 -13
  160. package/apps/storefront/src/pages/api/admin/activity-alerts.ts +1 -1
  161. package/apps/storefront/src/pages/api/admin/commerce-readiness.ts +1 -1
  162. package/apps/storefront/src/pages/api/admin/fulfillment/batches.ts +1 -1
  163. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id]/address.ts +1 -1
  164. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id].ts +1 -1
  165. package/apps/storefront/src/pages/api/admin/interaction-insights.ts +4 -4
  166. package/apps/storefront/src/pages/api/admin/orders/[id].ts +1 -1
  167. package/apps/storefront/src/pages/api/admin/orders.ts +1 -1
  168. package/apps/storefront/src/pages/api/auth/logout.ts +2 -2
  169. package/apps/storefront/src/pages/api/auth/magic-exchange.ts +6 -6
  170. package/apps/storefront/src/pages/api/auth/send.ts +2 -2
  171. package/apps/storefront/src/pages/api/auth/step-up-send.ts +1 -1
  172. package/apps/storefront/src/pages/api/auth/step-up-verify.ts +3 -3
  173. package/apps/storefront/src/pages/api/auth/verify.ts +4 -4
  174. package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +2 -2
  175. package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +4 -4
  176. package/apps/storefront/src/pages/api/newsletter/confirm.ts +1 -1
  177. package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +1 -1
  178. package/apps/storefront/src/pages/api/rum/vitals.ts +2 -2
  179. package/apps/storefront/src/pages/api/tracking/interaction.ts +5 -5
  180. package/apps/storefront/src/pages/auth/login.astro +2 -2
  181. package/apps/storefront/src/pages/auth/magic.astro +1 -1
  182. package/apps/storefront/src/pages/blog/[slug].astro +2 -2
  183. package/apps/storefront/src/pages/blog/author/[author].astro +8 -8
  184. package/apps/storefront/src/pages/blog/category/[category].astro +8 -8
  185. package/apps/storefront/src/pages/blog/index.astro +4 -4
  186. package/apps/storefront/src/pages/blog/page/[n].astro +4 -4
  187. package/apps/storefront/src/pages/blog/tag/[tag].astro +8 -8
  188. package/apps/storefront/src/pages/cart.ts +1 -1
  189. package/apps/storefront/src/pages/collections/[handle].astro +7 -7
  190. package/apps/storefront/src/pages/collections/index.astro +4 -4
  191. package/apps/storefront/src/pages/index.astro +10 -10
  192. package/apps/storefront/src/pages/llms.txt.ts +2 -2
  193. package/apps/storefront/src/pages/products/[handle].astro +11 -11
  194. package/apps/storefront/src/pages/saved.astro +2 -2
  195. package/apps/storefront/src/pages/search.astro +5 -5
  196. package/apps/storefront/src/pages/sitemap.xml.ts +8 -8
  197. package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +24 -24
  198. package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +2 -2
  199. package/apps/storefront/src/pages/style-guide/[tenant]/guide/[theme].astro +3 -3
  200. package/apps/storefront/src/pages/style-guide/[tenant]/index.astro +3 -3
  201. package/apps/storefront/src/pages/style-guide/index.astro +1 -1
  202. package/apps/storefront/src/pages/the-build/[slug].astro +10 -10
  203. package/apps/storefront/src/pages/the-build/index.astro +5 -5
  204. package/apps/storefront/src/pages/the-build/page/[n].astro +5 -5
  205. package/apps/storefront/src/pages/the-build/rss.xml.ts +4 -4
  206. package/docs/widget-library-guide.md +36 -36
  207. package/package.json +1 -1
  208. package/packages/public-runtime/src/chrome.ts +4 -4
  209. package/packages/public-runtime/src/tracking-id-derivation.ts +1 -1
  210. package/scripts/dev/locate.mjs +1 -1
  211. package/apps/storefront/src/lib/admin/ai/index.ts +0 -6
  212. /package/apps/storefront/src/components/{auth → access/storefront/auth}/AuthBadge.astro +0 -0
  213. /package/apps/storefront/src/components/{Badge.astro → content/storefront/Badge.astro} +0 -0
  214. /package/apps/storefront/src/components/{EmptyState.astro → content/storefront/EmptyState.astro} +0 -0
  215. /package/apps/storefront/src/components/{Section.astro → content/storefront/Section.astro} +0 -0
  216. /package/apps/storefront/src/components/{chrome → content/storefront/chrome}/AnnouncementBar.astro +0 -0
  217. /package/apps/storefront/src/components/{commerce → content/storefront/commerce}/ArticleCard.astro +0 -0
  218. /package/apps/storefront/src/components/content/{NeedsReviewCallout.astro → storefront/content/NeedsReviewCallout.astro} +0 -0
  219. /package/apps/storefront/src/components/content/{ProseToc.astro → storefront/content/ProseToc.astro} +0 -0
  220. /package/apps/storefront/src/components/content/{RichText.astro → storefront/content/RichText.astro} +0 -0
  221. /package/apps/storefront/src/components/content/{TrustStrip.astro → storefront/content/TrustStrip.astro} +0 -0
  222. /package/apps/storefront/src/lib/{auth → access/auth}/brokerAssertion.ts +0 -0
  223. /package/apps/storefront/src/lib/{auth → access/auth}/devAuth.ts +0 -0
  224. /package/apps/storefront/src/lib/{auth → access/auth}/gatePage.ts +0 -0
  225. /package/apps/storefront/src/lib/{auth → access/auth}/internalContentAuthority.ts +0 -0
  226. /package/apps/storefront/src/lib/{auth → access/auth}/mcpClientAssertion.ts +0 -0
  227. /package/apps/storefront/src/lib/{auth → access/auth}/operatorSession.ts +0 -0
  228. /package/apps/storefront/src/lib/{auth → access/auth}/route.ts +0 -0
  229. /package/apps/storefront/src/lib/{auth → access/auth}/session.ts +0 -0
  230. /package/apps/storefront/src/lib/{auth → access/auth}/stepUpChallenge.ts +0 -0
  231. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffVendorAccess.ts +0 -0
  232. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/vendorQuery.ts +0 -0
  233. /package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/tenants.ts +0 -0
  234. /package/apps/storefront/src/lib/{privacy → access/privacy}/emailHint.ts +0 -0
  235. /package/apps/storefront/src/lib/{rate → access/rate}/kvWindow.ts +0 -0
  236. /package/apps/storefront/src/lib/{shared → access/shared}/capability.ts +0 -0
  237. /package/apps/storefront/src/lib/{cspStaticHashes.ts → access/shared/cspStaticHashes.ts} +0 -0
  238. /package/apps/storefront/src/lib/{demoGate.ts → access/shared/demoGate.ts} +0 -0
  239. /package/apps/storefront/src/lib/{maintenance.ts → access/shared/maintenance.ts} +0 -0
  240. /package/apps/storefront/src/lib/{securityHeaders.ts → access/shared/securityHeaders.ts} +0 -0
  241. /package/apps/storefront/src/lib/{tenantOrigins.ts → access/shared/tenantOrigins.ts} +0 -0
  242. /package/apps/storefront/src/lib/{tenantRouting.ts → access/shared/tenantRouting.ts} +0 -0
  243. /package/apps/storefront/src/lib/{admin → automation}/ai/approvalMode.ts +0 -0
  244. /package/apps/storefront/src/lib/{admin → automation}/ai/audit.ts +0 -0
  245. /package/apps/storefront/src/lib/{admin → automation}/ai/recommendation.ts +0 -0
  246. /package/apps/storefront/src/lib/{blog → content/blog}/collectionPaths.ts +0 -0
  247. /package/apps/storefront/src/lib/{blog → content/blog}/markdown.ts +0 -0
  248. /package/apps/storefront/src/lib/{blog → content/blog}/pagination.ts +0 -0
  249. /package/apps/storefront/src/lib/{blog → content/blog}/presentation.ts +0 -0
  250. /package/apps/storefront/src/lib/{blog → content/blog}/reactions.ts +0 -0
  251. /package/apps/storefront/src/lib/{blog → content/blog}/rss.ts +0 -0
  252. /package/apps/storefront/src/lib/{blog → content/blog}/teaser.ts +0 -0
  253. /package/apps/storefront/src/lib/{blog → content/blog}/types.ts +0 -0
  254. /package/apps/storefront/src/lib/{blog → content/blog}/viewCounts.ts +0 -0
  255. /package/apps/storefront/src/lib/{chrome → content/chrome}/ctaIdentity.ts +0 -0
  256. /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome-assignments.example.json +0 -0
  257. /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome.example.json +0 -0
  258. /package/apps/storefront/src/lib/{chrome → content/chrome}/managedCart.ts +0 -0
  259. /package/apps/storefront/src/lib/{chrome → content/chrome}/model.ts +0 -0
  260. /package/apps/storefront/src/lib/{chrome → content/chrome}/navCurrent.ts +0 -0
  261. /package/apps/storefront/src/lib/{chrome → content/chrome}/newsletterAgeAttestation.ts +0 -0
  262. /package/apps/storefront/src/lib/{chrome → content/chrome}/parseConfig.ts +0 -0
  263. /package/apps/storefront/src/lib/{chrome → content/chrome}/variant.ts +0 -0
  264. /package/apps/storefront/src/lib/{commerce → content/policies}/shippingPolicy.ts +0 -0
  265. /package/apps/storefront/src/lib/{seo → content/seo}/alternates.ts +0 -0
  266. /package/apps/storefront/src/lib/{seo → content/seo}/documentTitle.ts +0 -0
  267. /package/apps/storefront/src/lib/{seo → content/seo}/meta.ts +0 -0
  268. /package/apps/storefront/src/lib/{seo → content/seo}/urlForm.ts +0 -0
  269. /package/apps/storefront/src/lib/{asyncCss.ts → content/shared/asyncCss.ts} +0 -0
  270. /package/apps/storefront/src/lib/{colors.ts → content/shared/colors.ts} +0 -0
  271. /package/apps/storefront/src/lib/{format.ts → content/shared/format.ts} +0 -0
  272. /package/apps/storefront/src/lib/{i18n.ts → content/shared/i18n.ts} +0 -0
  273. /package/apps/storefront/src/lib/{jsonScript.ts → content/shared/jsonScript.ts} +0 -0
  274. /package/apps/storefront/src/lib/{placeholder.ts → content/shared/placeholder.ts} +0 -0
  275. /package/apps/storefront/src/lib/{sections.ts → content/shared/sections.ts} +0 -0
  276. /package/apps/storefront/src/lib/{styleGuidePaths.ts → content/shared/styleGuidePaths.ts} +0 -0
  277. /package/apps/storefront/src/lib/{the-build → content/the-build}/pagination.ts +0 -0
  278. /package/apps/storefront/src/lib/{the-build → content/the-build}/readingTime.ts +0 -0
  279. /package/apps/storefront/src/lib/{admin → developer-experience/admin}/seed.ts +0 -0
  280. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityStore.ts +0 -0
  281. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/ai-widget-client.js +0 -0
  282. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/apiBase.ts +0 -0
  283. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/ask.ts +0 -0
  284. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/clickToSource.ts +0 -0
  285. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/copyCommand.ts +0 -0
  286. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/files.ts +0 -0
  287. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/hostedActivity.ts +0 -0
  288. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/infoPopover.ts +0 -0
  289. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/mcpCopy.ts +0 -0
  290. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/monitor.ts +0 -0
  291. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/stepper.ts +0 -0
  292. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/themeToggle.ts +0 -0
  293. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/devDraft.ts +0 -0
  294. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/obstacleStore.ts +0 -0
  295. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/runtimeStore.ts +0 -0
  296. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/storeStatus.ts +0 -0
  297. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/regulated-commerce-truth/index.ts +0 -0
  298. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/ws3-readonly-clone-preflight/index.ts +0 -0
  299. /package/apps/storefront/src/lib/{http → developer-experience/http}/fetchTransport.ts +0 -0
  300. /package/apps/storefront/src/lib/{http → developer-experience/http}/mcpServiceCall.ts +0 -0
  301. /package/apps/storefront/src/lib/{memoryKv.ts → developer-experience/shared/memoryKv.ts} +0 -0
  302. /package/apps/storefront/src/lib/{cloudflare-workers.d.ts → developer-experience/types/cloudflare-workers.d.ts} +0 -0
  303. /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/confirmationEmail.ts +0 -0
  304. /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/consent.ts +0 -0
  305. /package/apps/storefront/src/lib/{admin → measurement/admin}/consentSettingsClient.ts +0 -0
  306. /package/apps/storefront/src/lib/{analytics → measurement/analytics}/index.ts +0 -0
  307. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/attributionService.ts +0 -0
  308. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/orderConversionD1.ts +0 -0
  309. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/verifiedProviderMeasurement.ts +0 -0
  310. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorAllowlist.ts +0 -0
  311. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorIngest.ts +0 -0
  312. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionHealth.ts +0 -0
  313. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionSchema.ts +0 -0
  314. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantReadAccess.ts +0 -0
  315. /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/rewriteTrackingIds.ts +0 -0
  316. /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/writebackCandidate.ts +0 -0
  317. /package/apps/storefront/src/lib/{diag → observability/diag}/capture.ts +0 -0
  318. /package/apps/storefront/src/lib/{diag → observability/diag}/consoleLine.ts +0 -0
  319. /package/apps/storefront/src/lib/{diag → observability/diag}/debugConsole.ts +0 -0
  320. /package/apps/storefront/src/lib/{diag → observability/diag}/debugMode.ts +0 -0
  321. /package/apps/storefront/src/lib/{diag → observability/diag}/debugWindow.ts +0 -0
  322. /package/apps/storefront/src/lib/{diag → observability/diag}/redact.ts +0 -0
  323. /package/apps/storefront/src/lib/{diag → observability/diag}/reference.ts +0 -0
  324. /package/apps/storefront/src/lib/{diag → observability/diag}/referenceStore.ts +0 -0
  325. /package/apps/storefront/src/lib/{diag → observability/diag}/report.ts +0 -0
  326. /package/apps/storefront/src/lib/{diag → observability/diag}/session.ts +0 -0
  327. /package/apps/storefront/src/lib/{analytics → observability/performance}/lighthouseReport.ts +0 -0
  328. /package/apps/storefront/src/lib/{analytics → observability/performance}/perfBudgets.ts +0 -0
  329. /package/apps/storefront/src/lib/{analytics → observability/performance}/rumAlert.ts +0 -0
  330. /package/apps/storefront/src/lib/{analytics → observability/performance}/webVitals.ts +0 -0
  331. /package/apps/storefront/src/lib/{health.ts → observability/shared/health.ts} +0 -0
@@ -33,10 +33,10 @@ import {
33
33
  tenantDirRelative,
34
34
  tenantDirSegment,
35
35
  } from "@tot/public-runtime";
36
- import { renderRawChrome } from "../rawChrome.js";
36
+ import { renderRawChrome } from "../shared/rawChrome.js";
37
37
  import { parseChromeConfig } from "../chrome/parseConfig.js";
38
38
  import { parseChromeAssignments } from "../chrome/model.js";
39
- import { stampTrackingIdsAtPublish } from "../tracking/publishSafetyNet.js";
39
+ import { stampTrackingIdsAtPublish } from "../../measurement/tracking/publishSafetyNet.js";
40
40
  import { readWithImagePreviewRewriteOverlay } from "@tot/public-runtime/image-preview-rewrite-overlay";
41
41
 
42
42
  /** Safe, always-valid fallback when neither the tenant's own chrome.json nor
@@ -67,7 +67,7 @@ export interface ContentProvider {
67
67
  /**
68
68
  * The tenant's shared-chrome WRAPPER document (raw HTML), or null. A full
69
69
  * document containing the CHROME_BODY_MARKER where a body-only page fragment is
70
- * spliced in (see lib/rawMarketingHtml.ts). Lets raw pages stop duplicating
70
+ * spliced in (see lib/content/shared/rawMarketingHtml.ts). Lets raw pages stop duplicating
71
71
  * chrome: chrome lives once here, pages become fragments. File:
72
72
  * `content/<tenant>/chrome.html`. Tenant-owned (no cross-tenant fallback).
73
73
  *
@@ -110,17 +110,17 @@ export interface DerivedArtifact {
110
110
  // Per-tenant local content lives under the colocated repo-root layout
111
111
  // tenants/<tenant_id>/content/. Vite globs bundle every tenant's JSON at build
112
112
  // time; a file missing for a tenant falls back to the default scope, so a
113
- // partially-adopted tenant still renders. Depth: from src/lib/storyblok/ the
114
- // repo root is five levels up (storyblok→lib→src→storefront→apps→root).
113
+ // partially-adopted tenant still renders. Depth: from src/lib/content/storyblok/ the
114
+ // repo root is six levels up (storyblok→content→lib→src→storefront→apps→root).
115
115
  const homeGlobs = import.meta.glob<HomeContent>([
116
- "../../../../../tenants/*/content/home.json",
117
- "../../../../../tenants/e2e/*/content/home.json",
116
+ "../../../../../../tenants/*/content/home.json",
117
+ "../../../../../../tenants/e2e/*/content/home.json",
118
118
  ], {
119
119
  import: "default",
120
120
  });
121
121
  const chromeGlobs = import.meta.glob<unknown>([
122
- "../../../../../tenants/*/content/chrome.json",
123
- "../../../../../tenants/e2e/*/content/chrome.json",
122
+ "../../../../../../tenants/*/content/chrome.json",
123
+ "../../../../../../tenants/e2e/*/content/chrome.json",
124
124
  ], {
125
125
  import: "default",
126
126
  });
@@ -129,22 +129,22 @@ const chromeGlobs = import.meta.glob<unknown>([
129
129
  // convention as chromeGlobs above.
130
130
  const chromeAssignmentGlobs = import.meta.glob<unknown>(
131
131
  [
132
- "../../../../../tenants/*/content/chrome-assignments.json",
133
- "../../../../../tenants/e2e/*/content/chrome-assignments.json",
132
+ "../../../../../../tenants/*/content/chrome-assignments.json",
133
+ "../../../../../../tenants/e2e/*/content/chrome-assignments.json",
134
134
  ],
135
135
  { import: "default" },
136
136
  );
137
137
  const pageGlobs = import.meta.glob<EditorialPage>([
138
- "../../../../../tenants/*/content/pages/*.json",
139
- "../../../../../tenants/e2e/*/content/pages/*.json",
138
+ "../../../../../../tenants/*/content/pages/*.json",
139
+ "../../../../../../tenants/e2e/*/content/pages/*.json",
140
140
  ], {
141
141
  import: "default",
142
142
  });
143
143
  // Raw self-authored home documents (marketing tenants). `?raw` bundles the file
144
144
  // as a string; a tenant with no home.html simply has no entry here.
145
145
  const homeHtmlGlobs = import.meta.glob<string>([
146
- "../../../../../tenants/*/content/home.html",
147
- "../../../../../tenants/e2e/*/content/home.html",
146
+ "../../../../../../tenants/*/content/home.html",
147
+ "../../../../../../tenants/e2e/*/content/home.html",
148
148
  ], {
149
149
  query: "?raw",
150
150
  import: "default",
@@ -152,8 +152,8 @@ const homeHtmlGlobs = import.meta.glob<string>([
152
152
  // Raw self-authored SUBPAGE documents: tenants/<tenant>/content/pages-html/<slug>.html
153
153
  // (e.g. pages-html/pricing.html -> /pricing/). `**` supports nested slugs.
154
154
  const pageHtmlGlobs = import.meta.glob<string>([
155
- "../../../../../tenants/*/content/pages-html/**/*.html",
156
- "../../../../../tenants/e2e/*/content/pages-html/**/*.html",
155
+ "../../../../../../tenants/*/content/pages-html/**/*.html",
156
+ "../../../../../../tenants/e2e/*/content/pages-html/**/*.html",
157
157
  ], {
158
158
  query: "?raw",
159
159
  import: "default",
@@ -161,15 +161,15 @@ const pageHtmlGlobs = import.meta.glob<string>([
161
161
  // Shared-chrome wrapper document (marketing tenants that author body-only page
162
162
  // fragments). One per tenant; a tenant without it keeps serving full documents.
163
163
  const chromeHtmlGlobs = import.meta.glob<string>([
164
- "../../../../../tenants/*/content/chrome.html",
165
- "../../../../../tenants/e2e/*/content/chrome.html",
164
+ "../../../../../../tenants/*/content/chrome.html",
165
+ "../../../../../../tenants/e2e/*/content/chrome.html",
166
166
  ], {
167
167
  query: "?raw",
168
168
  import: "default",
169
169
  });
170
170
  const artifactGlobs = import.meta.glob<string>([
171
- "../../../../../tenants/*/content/**/*",
172
- "../../../../../tenants/e2e/*/content/**/*",
171
+ "../../../../../../tenants/*/content/**/*",
172
+ "../../../../../../tenants/e2e/*/content/**/*",
173
173
  ], {
174
174
  query: "?raw",
175
175
  import: "default",
@@ -251,10 +251,10 @@ async function readRawDevFile(scope: string, relative: string): Promise<string |
251
251
  import("node:url"),
252
252
  import("node:path"),
253
253
  ]);
254
- // provider.ts lives at apps/storefront/src/lib/storyblok/ — the repo root is five
255
- // levels up, mirroring the import.meta.glob prefix ("../../../../../tenants/...").
254
+ // provider.ts lives at apps/storefront/src/lib/content/storyblok/ — the repo root is six
255
+ // levels up, mirroring the import.meta.glob prefix ("../../../../../../tenants/...").
256
256
  const here = dirname(fileURLToPath(import.meta.url));
257
- const abs = resolve(here, "../../../../..", ...tenantDirRelative(scope).split("/"), "content", relative);
257
+ const abs = resolve(here, "../../../../../..", ...tenantDirRelative(scope).split("/"), "content", relative);
258
258
  return await readFile(abs, "utf8");
259
259
  } catch {
260
260
  return null;
@@ -305,7 +305,7 @@ export class LocalContentProvider implements ContentProvider {
305
305
  if (loader) return loader();
306
306
  // (2) No chrome.html: render the CANONICAL shared chrome from the
307
307
  // tenant's chrome.json — but only when it validates whole against the
308
- // consolidated ChromeConfig schema (lib/chrome/parseConfig.ts). Tenant-
308
+ // consolidated ChromeConfig schema (lib/content/chrome/parseConfig.ts). Tenant-
309
309
  // owned only, like the raw HTML above (no cross-tenant fallback).
310
310
  const config = await this.loadChromeConfig();
311
311
  if (!config) return null;
@@ -708,7 +708,7 @@ export class PublishedContentProvider implements ContentProvider {
708
708
  }
709
709
  async getChrome(): Promise<ChromeConfig> {
710
710
  // Runs through the SAME fail-closed schema validator as getChromeHtml's
711
- // chrome.json branch (lib/chrome/parseConfig.ts) — a published artifact is
711
+ // chrome.json branch (lib/content/chrome/parseConfig.ts) — a published artifact is
712
712
  // no longer trusted blind (was: JSON.parse + a raw cast to SiteChrome).
713
713
  const config = parseChromeConfig(await this.published<unknown>("chrome.json"));
714
714
  return config ?? ((await this.usesVersionedContent()) ? EMPTY_CHROME_CONFIG : this.base.getChrome());
@@ -867,7 +867,7 @@ export class DevDraftContentProvider implements ContentProvider {
867
867
 
868
868
  /** Draft artifact for a tenant-repo-relative path, or null to fall back. */
869
869
  private draftRaw(path: string): Promise<string | null> {
870
- // Key shape mirrors lib/dev/devDraft.ts devDraftKey — duplicated as a plain
870
+ // Key shape mirrors lib/developer-experience/dev/devDraft.ts devDraftKey — duplicated as a plain
871
871
  // template to keep this module's imports renderer-safe (public-runtime only).
872
872
  return this.get(`dev-draft:${this.tenantId}:${this.draftId}:${path}`);
873
873
  }
@@ -1,5 +1,5 @@
1
1
  // Thin wrapper binding the generic blog engine to the "the-build" collection.
2
- // The engine (src/lib/blog/collection.ts) is the single implementation; this
2
+ // The engine (src/lib/content/blog/collection.ts) is the single implementation; this
3
3
  // module only fixes the collection id so existing/downstream callers can import
4
4
  // collection-bound helpers.
5
5
  import { getIndexSettings, getPost, listPosts, resolveRedirect, type Collection } from "../blog/collection.js";
@@ -5,7 +5,7 @@
5
5
  // (`annotate`), so a render path can feed `htmlWithHeadingIds(post.contentHtml)`
6
6
  // to `set:html` and `toc(post.contentHtml)` to the aside and the anchors line up.
7
7
  import { parseFragment, serialize } from "parse5";
8
- import { slugifyHeading } from "../content/prose.js";
8
+ import { slugifyHeading } from "../prose.js";
9
9
 
10
10
  /** Minimal structural view of a parse5 node (duck-typed, as scripts/dev/locate.mjs does). */
11
11
  interface P5Node {
@@ -1,6 +1,6 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
3
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
3
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../developer-experience/admin/seed";
4
4
  import type {
5
5
  BlockedReason,
6
6
  CustomerBlockedQueueRow,
@@ -151,7 +151,7 @@ export const activityEvents = sqliteTable(
151
151
 
152
152
  // --- Per-tenant raw-interaction store directory ------------------------------
153
153
  // The DIRECTORY of per-tenant D1 databases that hold raw declarative-tracking
154
- // interaction rows — one database per tenant (`lib/tracking/interactionSchema.ts`
154
+ // interaction rows — one database per tenant (`lib/measurement/tracking/interactionSchema.ts`
155
155
  // is that database's schema). This table holds NO interaction data: only the
156
156
  // `tenant_id → (database_name, database_uuid)` mapping the Worker needs to
157
157
  // address a tenant's own database over the D1 REST API, since Worker bindings
@@ -177,7 +177,7 @@ export const trackingTenantDatabases = sqliteTable(
177
177
  {
178
178
  tenantId: text("tenant_id").primaryKey(),
179
179
  // The Cloudflare D1 database name, derived deterministically from the tenant
180
- // id (`lib/tracking/tenantD1Registry.ts`) — recorded so an operator can find
180
+ // id (`lib/measurement/tracking/tenantD1Registry.ts`) — recorded so an operator can find
181
181
  // it in the dashboard without re-deriving.
182
182
  databaseName: text("database_name").notNull(),
183
183
  // The D1 UUID — what the REST data plane actually addresses.
@@ -1,4 +1,4 @@
1
- import type { AdminTenantEnvelope } from "./envelope";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
2
 
3
3
  /**
4
4
  * Per-request memoization for the pure mock view-model builders. Each builder is
@@ -4,12 +4,12 @@
4
4
  * local→hosted activity bridge.
5
5
  *
6
6
  * Minted alongside the existing cli-signin-code paste
7
- * (apps/storefront/src/lib/dev/cliSignInCode.ts) and cached by the CLI in
7
+ * (apps/storefront/src/lib/developer-experience/dev/cliSignInCode.ts) and cached by the CLI in
8
8
  * ~/.tot/credentials.json. Deliberately NOT a signed token: this reuses the
9
9
  * SESSION KV binding that already exists in every environment (dev/qa/prod),
10
10
  * so it needs no new secret to provision. Revoking is just deleting the KV
11
11
  * entry — the same posture as the browser's own tot_session cookie (see
12
- * lib/auth/session.ts).
12
+ * lib/access/auth/session.ts).
13
13
  */
14
14
 
15
15
  const KEY_PREFIX = "dev-activity-token:";
@@ -18,13 +18,13 @@
18
18
  * on prod the shortest form is emitted.
19
19
  *
20
20
  * `activityBridge` (optional) piggybacks the local→hosted activity-bridge credential
21
- * (see lib/dev/activityIngestToken.ts) onto the SAME pasted line as two extra `tot login`
21
+ * (see lib/developer-experience/dev/activityIngestToken.ts) onto the SAME pasted line as two extra `tot login`
22
22
  * flags — no second browser round-trip. Omitted entirely when the caller has no SESSION KV
23
23
  * to mint against — the local loop then simply runs with no hosted signal.
24
24
  */
25
25
  import { readEnv } from "@/lib/env";
26
- import { redactEmailForHint } from "@/lib/privacy/emailHint";
27
- import { createRendezvous, type RendezvousDeps } from "@/lib/dev/rendezvousBroker";
26
+ import { redactEmailForHint } from "@/lib/access/privacy/emailHint";
27
+ import { createRendezvous, type RendezvousDeps } from "@/lib/developer-experience/dev/rendezvousBroker";
28
28
 
29
29
  // The CLI's built-in default MCP (packages/cli login.mjs DEFAULT_MCP_URL). When the derived
30
30
  // MCP origin equals this, --mcp is redundant noise, so we omit it.
@@ -5,7 +5,7 @@
5
5
  * shape + the request host + a config flag, never a secret.
6
6
  *
7
7
  * WHY AN IFRAME WORKS (no screenshots, no new infra): tenant routing is host-first with a
8
- * `/<appDomain>/…` path-prefix fallback on the same worker (src/lib/tenantRouting.ts), so
8
+ * `/<appDomain>/…` path-prefix fallback on the same worker (src/lib/access/shared/tenantRouting.ts), so
9
9
  * the tenant's real site is reachable at a RELATIVE path from /dev. CSP already permits
10
10
  * same-origin framing both directions (`frame-ancestors 'self'` + `frame-src 'self'`,
11
11
  * packages/public-runtime/src/csp.ts) alongside `X-Frame-Options: SAMEORIGIN` — no header
@@ -20,8 +20,8 @@
20
20
  * transport / parse fault → { configured:true, ok:false } so a caller can distinguish
21
21
  * "definitely not provisioned" (ok + provisioned:false) from "couldn't tell". Never throws.
22
22
  */
23
- import { callMcpService } from "@/lib/http/mcpServiceCall";
24
- import { FetchHttpTransport, type HttpGetTransport } from "@/lib/http/fetchTransport";
23
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
24
+ import { FetchHttpTransport, type HttpGetTransport } from "@/lib/developer-experience/http/fetchTransport";
25
25
 
26
26
  export type { HttpGetTransport };
27
27
 
@@ -20,8 +20,8 @@
20
20
  * one minted assertion shape covers every call. SERVER-SIDE ONLY.
21
21
  */
22
22
  import { readEnv } from "@/lib/env";
23
- import { mintMcpClientAssertion, McpClientAssertionError } from "@/lib/auth/mcpClientAssertion";
24
- import { FetchHttpTransport, type HttpTransport } from "@/lib/http/fetchTransport";
23
+ import { mintMcpClientAssertion, McpClientAssertionError } from "@/lib/access/auth/mcpClientAssertion";
24
+ import { FetchHttpTransport, type HttpTransport } from "@/lib/developer-experience/http/fetchTransport";
25
25
 
26
26
  export type { HttpTransport };
27
27
 
@@ -20,8 +20,8 @@
20
20
  * MCP client_id, exactly what the MCP binds the subject_token audience to. This is the
21
21
  * same non-gated mint the MCP itself uses to power rendezvous creation.
22
22
  */
23
- import { getAccessClient } from "@/lib/auth/route";
24
- import type { TotAccessClient } from "@/lib/auth/totAccessClient";
23
+ import { getAccessClient } from "@/lib/access/auth/route";
24
+ import type { TotAccessClient } from "@/lib/access/auth/totAccessClient";
25
25
 
26
26
  /** Short — the proof is minted and used immediately at approve time. */
27
27
  const SUBJECT_TOKEN_TTL_SECONDS = 120;
@@ -6,7 +6,7 @@
6
6
  * notification for that case — the author is pinged the MOMENT their change actually
7
7
  * conflicts with someone else's merge, not at their own accept attempt.
8
8
  *
9
- * Rendered here (our brand), transmitted by tot20 (see lib/messaging/messagesClient.ts).
9
+ * Rendered here (our brand), transmitted by tot20 (see lib/engagement/messaging/messagesClient.ts).
10
10
  * Email HTML rules: inline styles only, table-free simple layout, a visible fallback URL
11
11
  * under the button.
12
12
  */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The storefront RENDERS its own branded email HTML and hands it to tot20 to TRANSMIT, so we
5
5
  * reuse tot20's Mandrill SPF/DKIM deliverability (the whole point) while owning the body/brand.
6
- * Used for the magic-link invite email (see lib/grants/magicLinkInvite.ts).
6
+ * Used for the magic-link invite email (see lib/access/grants/magicLinkInvite.ts).
7
7
  *
8
8
  * POST <core>/api/messages
9
9
  * { channel:"email", to, subject, html, totApiKey, totSecretKey } → 200 { sent:true, id? }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Hand-rolled newsletter digest HTML builder — the email analogue of
3
- * `renderRssFeed` (src/lib/blog/rss.ts): pure string concatenation, no
3
+ * `renderRssFeed` (src/lib/content/blog/rss.ts): pure string concatenation, no
4
4
  * templating dependency. Fed the engine's live-visible post list, so drafts /
5
5
  * unlisted / not-yet-scheduled posts can never reach an inbox.
6
6
  *
@@ -10,7 +10,7 @@
10
10
  * ESP (see send.ts). The RFC 8058 `List-Unsubscribe` headers are set on the
11
11
  * SEND call, not in this HTML body.
12
12
  */
13
- import type { BlogPostSummary } from "../blog/types.js";
13
+ import type { BlogPostSummary } from "../../content/blog/types.js";
14
14
 
15
15
  /** Replaced per-recipient with the subscriber's opaque token at send time. */
16
16
  export const UNSUBSCRIBE_TOKEN_PLACEHOLDER = "{{unsubscribe_token}}";
@@ -5,7 +5,7 @@
5
5
  * (`POST /emails/batch`, up to 100 messages/call); audience/consent/unsubscribe
6
6
  * state stays first-party in our D1, never in a vendor list.
7
7
  */
8
- import { readEnv } from "../env.js";
8
+ import { readEnv } from "../../env.js";
9
9
 
10
10
  /** Resend's batch limit: at most 100 messages per `/emails/batch` call. */
11
11
  export const RESEND_BATCH_LIMIT = 100;
@@ -18,8 +18,8 @@
18
18
  * per-subscriber diff. "New since last send" is computed once from the previous
19
19
  * ledger row's `sent_at`, not per-subscriber.
20
20
  */
21
- import type { Queryable } from "../catalog/d1/catalog.js";
22
- import type { BlogPostSummary } from "../blog/types.js";
21
+ import type { Queryable } from "../../catalog/d1/catalog.js";
22
+ import type { BlogPostSummary } from "../../content/blog/types.js";
23
23
  import {
24
24
  sendBatch as realSendBatch,
25
25
  RESEND_BATCH_LIMIT,
@@ -9,7 +9,7 @@
9
9
  * caller is responsible for resolving `tenantId` from the request host/session
10
10
  * (NEVER a client body) — that is the multi-tenant isolation boundary.
11
11
  */
12
- import type { Queryable } from "../catalog/d1/catalog.js";
12
+ import type { Queryable } from "../../catalog/d1/catalog.js";
13
13
 
14
14
  export type SubscriberStatus = "pending" | "confirmed" | "unsubscribed" | "bounced";
15
15
 
@@ -25,8 +25,8 @@
25
25
  * so the first ship after this hook deploys does NOT retro-announce the tenant's
26
26
  * whole back-catalog.
27
27
  */
28
- import { isVisibleOnLive } from "../blog/collection.js";
29
- import type { BlogPost, PostStatus } from "../blog/types.js";
28
+ import { isVisibleOnLive } from "../../content/blog/collection.js";
29
+ import type { BlogPost, PostStatus } from "../../content/blog/types.js";
30
30
  import { notifyPostPublished } from "./notify.js";
31
31
 
32
32
  /**
@@ -1,4 +1,4 @@
1
- import type { BlogPost } from "../blog/types.js";
1
+ import type { BlogPost } from "../../content/blog/types.js";
2
2
 
3
3
  /** Swallow-and-log a soft failure — logging itself must never throw (mirrors `webhooks/emit.ts`). */
4
4
  function logDiag(fields: Record<string, unknown>): void {
@@ -18,8 +18,8 @@
18
18
  * root that wires the real bindings (mirrors `getDispatcher()`); it returns
19
19
  * `null` when either binding is absent so callers degrade rather than throw.
20
20
  */
21
- import type { Queryable } from "../catalog/d1/catalog.js";
22
- import { readD1, readEnv } from "../env.js";
21
+ import type { Queryable } from "../../catalog/d1/catalog.js";
22
+ import { readD1, readEnv } from "../../env.js";
23
23
 
24
24
  /** The decrypted token material we persist as one JSON blob under AES-GCM. */
25
25
  export interface SocialTokenPayload {
@@ -162,7 +162,7 @@ export async function rotateSocialToken(
162
162
  */
163
163
  export async function resolveSocialTokenStore(): Promise<SocialTokenStoreDeps | null> {
164
164
  const [{ fromD1 }, d1, rawKek] = await Promise.all([
165
- import("../catalog/d1/catalog.js"),
165
+ import("../../catalog/d1/catalog.js"),
166
166
  readD1("STOREFRONT_APPS_DB"),
167
167
  readEnv("SOCIAL_TOKEN_KEK"),
168
168
  ]);
@@ -31,9 +31,9 @@ import {
31
31
  type StockState,
32
32
  } from "@tot/public-runtime";
33
33
  import { readD1 } from "@/lib/env";
34
- import { decideAdminApiAccess } from "@/lib/auth/adminApiGuard";
35
- import { readViewerSession } from "@/lib/auth/route";
36
- import type { SessionRecord } from "@/lib/auth/session";
34
+ import { decideAdminApiAccess } from "@/lib/access/auth/adminApiGuard";
35
+ import { readViewerSession } from "@/lib/access/auth/route";
36
+ import type { SessionRecord } from "@/lib/access/auth/session";
37
37
  import {
38
38
  canRelease,
39
39
  carrierPolicyForTenant,
@@ -19,7 +19,7 @@ import {
19
19
  type IntegrationSiteSurface,
20
20
  type ObligationTenant,
21
21
  } from "@tot/public-runtime";
22
- import { isAdminPath } from "@/lib/auth/loginGate";
22
+ import { isAdminPath } from "@/lib/access/auth/loginGate";
23
23
  import {
24
24
  resolveIntegrationRenderState,
25
25
  type IntegrationRenderState,
@@ -5,7 +5,7 @@
5
5
  * latest validated configuration and none of the authoring or history surface.
6
6
  */
7
7
  import type { TenantConsentConfig } from "@tot/public-runtime";
8
- import type { Queryable } from "../catalog/d1/catalog.js";
8
+ import type { Queryable } from "../../catalog/d1/catalog.js";
9
9
 
10
10
  interface CurrentConsentConfigRow {
11
11
  config: string;
@@ -21,8 +21,8 @@
21
21
  * stores use (`d1/catalog.ts`), so the insert code in `interactionStore.ts` is
22
22
  * transport-agnostic and unit-testable against an in-memory sqlite.
23
23
  */
24
- import { readEnv } from "../env.js";
25
- import type { Queryable, QueryStatement } from "../catalog/d1/catalog.js";
24
+ import { readEnv } from "../../env.js";
25
+ import type { Queryable, QueryStatement } from "../../catalog/d1/catalog.js";
26
26
 
27
27
  const CF_API_BASE = "https://api.cloudflare.com/client/v4";
28
28
 
@@ -9,7 +9,7 @@
9
9
  * e.g. `dt-consent-environment-gate`):
10
10
  *
11
11
  * import { onInteraction } from "@tot/public-runtime";
12
- * import { collectInteraction } from "@/lib/tracking/interactionCollector";
12
+ * import { collectInteraction } from "@/lib/measurement/tracking/interactionCollector";
13
13
  * onInteraction((interaction) => {
14
14
  * if (consentAndEnvironmentAllow()) collectInteraction(interaction);
15
15
  * });
@@ -38,7 +38,7 @@ export const MAX_QUEUE_SIZE = 20;
38
38
  /** The wire shape POSTed to `INTERACTION_BEACON_PATH` — `TotInteraction`'s five
39
39
  * fields plus this module's own synthesized correlation fields. Must stay in
40
40
  * lockstep with `INTERACTION_WIRE_ALLOWLIST`
41
- * (`apps/storefront/src/lib/tracking/collectorAllowlist.ts`). */
41
+ * (`apps/storefront/src/lib/measurement/tracking/collectorAllowlist.ts`). */
42
42
  export interface InteractionWireEvent {
43
43
  type: TotInteraction["type"];
44
44
  el: string;
@@ -44,8 +44,8 @@
44
44
  * transient D1 fault) is caught, logged, and recorded in that tenant's
45
45
  * outcome — it never aborts the rest of the batch.
46
46
  */
47
- import type { Queryable } from "../catalog/d1/catalog.js";
48
- import type { AnalyticsEngineLike } from "../activity/store.js";
47
+ import type { Queryable } from "../../catalog/d1/catalog.js";
48
+ import type { AnalyticsEngineLike } from "../../activity/store.js";
49
49
  import { fromD1Rest, type D1ControlConfig } from "./d1Control.js";
50
50
  import { aggregateInteractions, writeInteractionAnalytics } from "./interactionStore.js";
51
51
  import type { StampedInteractionEvent } from "./collectorIngest.js";
@@ -6,7 +6,7 @@
6
6
  * that proposes `data-tot-el` for git-tracked tenant content and writes it
7
7
  * back to source as a reviewable diff. This module exists for everything
8
8
  * that bypasses that review — AI-edit drafts materialized into
9
- * `dev-draft:` KV (see `DevDraftContentProvider`, lib/storyblok/provider.ts)
9
+ * `dev-draft:` KV (see `DevDraftContentProvider`, lib/content/storyblok/provider.ts)
10
10
  * and direct KV-published edits (`PublishedContentProvider`'s overlay over
11
11
  * the customization store). Content sourced from `LocalContentProvider`
12
12
  * (build-bundled from git-tracked `tenants/<id>/content/*`) is explicitly
@@ -31,8 +31,8 @@
31
31
  * never fail because storage is unconfigured.
32
32
  */
33
33
  import { sha256Hex } from "@tot/public-runtime";
34
- import { readEnv } from "../env.js";
35
- import type { Queryable } from "../catalog/d1/catalog.js";
34
+ import { readEnv } from "../../env.js";
35
+ import type { Queryable } from "../../catalog/d1/catalog.js";
36
36
  import {
37
37
  ensureDatabase,
38
38
  fromD1Rest,
@@ -10,7 +10,7 @@
10
10
  * `needs-external` / `needs-secret`.
11
11
  *
12
12
  * Signal sources are named against real code where it exists in this repo
13
- * (`/health` → lib/health.ts, CSP → pages/api/csp-report.ts + CSP_REPORT_PATH,
13
+ * (`/health` → lib/observability/shared/health.ts, CSP → pages/api/csp-report.ts + CSP_REPORT_PATH,
14
14
  * commerce events → lib/analytics). Signals owned by sibling units are referenced
15
15
  * by CONTRACT NAME, not imported — Core Web Vitals come from the RUM beacon,
16
16
  * and age-verification / restricted-state denials come from the compliance
@@ -99,7 +99,7 @@ export const MONITORS: readonly Monitor[] = [
99
99
  title: "Storefront uptime / liveness",
100
100
  category: "availability",
101
101
  signal: {
102
- source: "GET /health (lib/health.ts — answered before tenant/gate/cache)",
102
+ source: "GET /health (lib/observability/shared/health.ts — answered before tenant/gate/cache)",
103
103
  observe: "external synthetic probe hits /health across regions; expects 200 {status:'ok'}",
104
104
  },
105
105
  threshold: "2 consecutive probe failures (or >1% of probes failing over 5m)",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "F14 performance budgets manifest — the checked-in, tool-neutral source of truth for the storefront go-live framework's perf gate. Consumed by (1) the lab budget-assertion harness (perf/assert-budgets.ts), (2) the Lighthouse budgets exporter (toLighthouseBudgets), and (3) the field RUM regression-alert contract (rumAlert.ts). Edit HERE — everything else derives from it. Shape + validation: src/lib/analytics/perfBudgets.ts (parsePerfBudgets).",
2
+ "$comment": "F14 performance budgets manifest — the checked-in, tool-neutral source of truth for the storefront go-live framework's perf gate. Consumed by (1) the lab budget-assertion harness (perf/assert-budgets.ts), (2) the Lighthouse budgets exporter (toLighthouseBudgets), and (3) the field RUM regression-alert contract (rumAlert.ts). Edit HERE — everything else derives from it. Shape + validation: src/lib/observability/performance/perfBudgets.ts (parsePerfBudgets).",
3
3
  "version": 1,
4
4
  "webVitals": {
5
5
  "$comment": "Core Web Vitals thresholds, evaluated at the 75th percentile (p75) of the field distribution — the same percentile Google's CrUX / the RUM alert contract use.",
@@ -1,5 +1,5 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../developer-experience/admin/seed";
3
3
  import type {
4
4
  OrderDetail,
5
5
  OrderEvidenceEvent,
@@ -8,8 +8,8 @@ import type {
8
8
  OrderRow,
9
9
  OrdersViewModel,
10
10
  } from "../admin/viewmodels/orders";
11
- import { tenantProfile } from "../../admin/services/mock/tenants";
12
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
11
+ import { tenantProfile } from "../../access/fixtures/tenants";
12
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
13
13
 
14
14
  // Must stay index-aligned with customers.ts's NAMES: an order's customerId is
15
15
  // derived from the picked name's position here, and customers.ts assigns each
@@ -108,7 +108,7 @@ export function buildPreviewReloadScript(opts: {
108
108
  */
109
109
  export function buildCspViolationBannerScript(basePath = ""): string {
110
110
  // A style-guide surface is `/_style-guide/…` or `/style-guide/…`, under the tenant
111
- // prefix when path-routed (lib/styleGuidePaths.ts).
111
+ // prefix when path-routed (lib/content/shared/styleGuidePaths.ts).
112
112
  return `(() => {
113
113
  if (window.__totCspBanner) return; window.__totCspBanner = true;
114
114
  const seen = new Set();
@@ -2,13 +2,13 @@ import type {
2
2
  OpenPublicationArtifactV1,
3
3
  PublicationRouteRenderPlanV1,
4
4
  } from "@tot/public-runtime";
5
- import { hasHomeContentShape, type EditorialPage, type HomeContent } from "@/lib/storyblok/content-model.js";
6
- import type { ChromeConfig } from "@/lib/chrome/model.js";
7
- import { parseChromeConfig } from "@/lib/chrome/parseConfig.js";
8
- import { parseChromeAssignments } from "@/lib/chrome/model.js";
9
- import { renderRawChrome } from "@/lib/rawChrome.js";
10
- import { stampTrackingIdsAtPublish } from "@/lib/tracking/publishSafetyNet.js";
11
- import type { ContentProvider } from "@/lib/storyblok/provider.js";
5
+ import { hasHomeContentShape, type EditorialPage, type HomeContent } from "@/lib/content/storyblok/content-model.js";
6
+ import type { ChromeConfig } from "@/lib/content/chrome/model.js";
7
+ import { parseChromeConfig } from "@/lib/content/chrome/parseConfig.js";
8
+ import { parseChromeAssignments } from "@/lib/content/chrome/model.js";
9
+ import { renderRawChrome } from "@/lib/content/shared/rawChrome.js";
10
+ import { stampTrackingIdsAtPublish } from "@/lib/measurement/tracking/publishSafetyNet.js";
11
+ import type { ContentProvider } from "@/lib/content/storyblok/provider.js";
12
12
 
13
13
  const EMPTY_CHROME_CONFIG: ChromeConfig = {
14
14
  header: { variant: "primary", brand: { label: "" }, nav: [] },
@@ -29,7 +29,7 @@ import {
29
29
  type PublicationDiscoveryEntryKindV1,
30
30
  } from "@tot/public-runtime";
31
31
  import { publicationRecoveryActiveV1, publicationRecoveryKeyV1 } from "@tot/public-runtime/publication-recovery";
32
- import { rawPageCanonicalUrl } from "../rawMarketingHtml.js";
32
+ import { rawPageCanonicalUrl } from "../content/shared/rawMarketingHtml.js";
33
33
 
34
34
  export type DiscoverySurfaceV1 = "sitemap" | "feeds" | "publicSearch" | "llms";
35
35
 
@@ -5,10 +5,10 @@
5
5
  * Paths are spelled exactly as the root sitemap lists them.
6
6
  */
7
7
  import type { APIContext } from "astro";
8
- import { getBlogSettings, listBlogPosts } from "@/lib/blog/provider.js";
9
- import { listBuildPosts } from "@/lib/the-build/provider.js";
10
- import { isIndexableHtml, rawPageCanonicalUrl } from "@/lib/rawMarketingHtml.js";
11
- import { collectionPathsV1, blogPathOptsV1 } from "@/lib/blog/collectionPaths.js";
8
+ import { getBlogSettings, listBlogPosts } from "@/lib/content/blog/provider.js";
9
+ import { listBuildPosts } from "@/lib/content/the-build/provider.js";
10
+ import { isIndexableHtml, rawPageCanonicalUrl } from "@/lib/content/shared/rawMarketingHtml.js";
11
+ import { collectionPathsV1, blogPathOptsV1 } from "@/lib/content/blog/collectionPaths.js";
12
12
 
13
13
  export interface RootDiscoveryDocumentV1 {
14
14
  kind: "home" | "page" | "post";