create-ailk 0.21.0 → 0.23.0

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 (342) hide show
  1. package/component-catalog.json +186 -8
  2. package/component-catalog.md +9 -7
  3. package/dist/add-module.js +20 -14
  4. package/dist/add-route.d.ts +55 -1
  5. package/dist/add-route.js +294 -12
  6. package/dist/cli.js +27 -10
  7. package/dist/derive-architecture.d.ts +12 -3
  8. package/dist/derive-architecture.js +20 -8
  9. package/dist/design-package.js +7 -2
  10. package/dist/lib/design-checks.js +4 -2
  11. package/dist/lib/env-catalog.js +5 -5
  12. package/dist/lib/npm-auth.d.ts +9 -0
  13. package/dist/lib/npm-auth.js +48 -0
  14. package/dist/lib/scaffold-render-sweep.d.ts +3 -2
  15. package/dist/lib/scaffold-render-sweep.js +5 -8
  16. package/dist/module-architecture.js +99 -9
  17. package/dist/paid-sections.d.ts +21 -2
  18. package/dist/paid-sections.js +69 -7
  19. package/dist/programmatic.js +19 -5
  20. package/dist/seed-flows.d.ts +4 -1
  21. package/dist/seed-flows.js +50 -4
  22. package/dist/site-chrome.d.ts +8 -0
  23. package/dist/site-chrome.js +17 -1
  24. package/dist/spoke-checkout.d.ts +65 -41
  25. package/dist/spoke-checkout.js +208 -430
  26. package/dist/starter-grid.d.ts +0 -3
  27. package/dist/starter-grid.js +24 -14
  28. package/dist/surfaces.js +52 -26
  29. package/dist/sync-routes.d.ts +38 -1
  30. package/dist/sync-routes.js +187 -13
  31. package/dist/template-record.d.ts +4 -3
  32. package/dist/template-record.js +8 -4
  33. package/dist/topology.js +25 -1
  34. package/dist/update.js +15 -0
  35. package/package.json +3 -3
  36. package/site-templates/_base/content/en/NewsletterSignup/newsletter.mdx +4 -49
  37. package/site-templates/_base/content/en/Pricing/pricing.mdx +3 -21
  38. package/site-templates/designs/minimalism/DESIGN.md +1 -1
  39. package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +23 -20
  40. package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +28 -14
  41. package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +15 -39
  42. package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +38 -34
  43. package/site-templates/marketing-site-free/content/en/NewsletterSignup/newsletter.mdx +6 -43
  44. package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.json +14 -31
  45. package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +26 -25
  46. package/site-templates/shapes/local-business-service/content/en/NewsletterSignup/newsletter.mdx +6 -43
  47. package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +14 -31
  48. package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +26 -25
  49. package/site-templates/shapes/organization-service/content/en/NewsletterSignup/newsletter.mdx +6 -43
  50. package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.json +14 -31
  51. package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.md +26 -25
  52. package/site-templates/shapes/person-service/content/en/NewsletterSignup/newsletter.mdx +6 -43
  53. package/templates/.env.example +9 -7
  54. package/templates/.github/workflows/ci.yml +13 -0
  55. package/templates/README.md +1 -0
  56. package/templates/_gitignore +4 -0
  57. package/templates/apps/api/.env.example +27 -0
  58. package/templates/apps/api/CLAUDE.md +87 -17
  59. package/templates/apps/api/package.json +1 -0
  60. package/templates/apps/api/src/__tests__/factories/in-memory-prisma.ts +2 -0
  61. package/templates/apps/api/src/bin/stripe-connections-rekey.ts +45 -0
  62. package/templates/apps/api/src/config/__tests__/stripe-connection-key.test.ts +185 -0
  63. package/templates/apps/api/src/config/index.ts +109 -0
  64. package/templates/apps/api/src/lib/__mocks__/prisma.ts +3 -0
  65. package/templates/apps/api/src/lib/__tests__/consent-store.test.ts +19 -0
  66. package/templates/apps/api/src/lib/__tests__/flow-completion-store.test.ts +149 -0
  67. package/templates/apps/api/src/lib/__tests__/flow-rename-race.db.test.ts +116 -0
  68. package/templates/apps/api/src/lib/consent-store.ts +28 -0
  69. package/templates/apps/api/src/lib/error-serializer.ts +74 -7
  70. package/templates/apps/api/src/lib/flow-completion-store.ts +136 -0
  71. package/templates/apps/api/src/lib/hub-sign-in-store.ts +38 -2
  72. package/templates/apps/api/src/lib/proposal-paid-store.ts +21 -4
  73. package/templates/apps/api/src/lib/stripe.ts +74 -4
  74. package/templates/apps/api/src/lib/webhook-idempotency.ts +66 -2
  75. package/templates/apps/api/src/middleware/__tests__/auth.hub-session-path.test.ts +14 -3
  76. package/templates/apps/api/src/middleware/__tests__/rate-limit.test.ts +218 -0
  77. package/templates/apps/api/src/middleware/__tests__/write-budget.test.ts +174 -0
  78. package/templates/apps/api/src/middleware/auth.ts +13 -6
  79. package/templates/apps/api/src/middleware/rate-limit.ts +226 -4
  80. package/templates/apps/api/src/openapi/spec.ts +33 -3
  81. package/templates/apps/api/src/routes/auth/__tests__/hub-sign-in.test.ts +49 -0
  82. package/templates/apps/api/src/routes/auth/hub-sign-in.ts +41 -0
  83. package/templates/apps/api/src/routes/billing/plan-checkout.ts +325 -0
  84. package/templates/apps/api/src/routes/checkout/__tests__/live-key.test.ts +11 -0
  85. package/templates/apps/api/src/routes/checkout/__tests__/offerings-authorization.test.ts +1300 -0
  86. package/templates/apps/api/src/routes/checkout/__tests__/session.test.ts +11 -0
  87. package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +49 -0
  88. package/templates/apps/api/src/routes/checkout/session.ts +57 -25
  89. package/templates/apps/api/src/routes/checkout/sessions.ts +232 -82
  90. package/templates/apps/api/src/routes/consent/__tests__/account.test.ts +386 -0
  91. package/templates/apps/api/src/routes/consent/__tests__/sign-up-rate-limit.test.ts +160 -0
  92. package/templates/apps/api/src/routes/consent/account.ts +268 -0
  93. package/templates/apps/api/src/routes/consent/index.ts +15 -7
  94. package/templates/apps/api/src/routes/content/__tests__/get-page.test.ts +36 -0
  95. package/templates/apps/api/src/routes/content/__tests__/offerings.test.ts +731 -0
  96. package/templates/apps/api/src/routes/content/__tests__/pricing.test.ts +753 -0
  97. package/templates/apps/api/src/routes/content/__tests__/shown-offerings.test.ts +762 -0
  98. package/templates/apps/api/src/routes/content/get-page.ts +4 -0
  99. package/templates/apps/api/src/routes/content/index.ts +16 -2
  100. package/templates/apps/api/src/routes/content/offerings.ts +184 -0
  101. package/templates/apps/api/src/routes/content/pricing.ts +176 -0
  102. package/templates/apps/api/src/routes/content/shown-offerings.ts +229 -0
  103. package/templates/apps/api/src/routes/leads/__tests__/magnet-completion.test.ts +515 -0
  104. package/templates/apps/api/src/routes/leads/index.ts +164 -7
  105. package/templates/apps/api/src/routes/webhooks/README.md +66 -0
  106. package/templates/apps/api/src/routes/webhooks/__tests__/stripe-checkout-consent.test.ts +649 -0
  107. package/templates/apps/api/src/routes/webhooks/__tests__/stripe-offerings.test.ts +814 -0
  108. package/templates/apps/api/src/routes/webhooks/__tests__/stripe-org-billing.test.ts +80 -68
  109. package/templates/apps/api/src/routes/webhooks/__tests__/stripe-site-filter.test.ts +5 -5
  110. package/templates/apps/api/src/routes/webhooks/__tests__/stripe.test.ts +8 -2
  111. package/templates/apps/api/src/routes/webhooks/index.ts +23 -0
  112. package/templates/apps/api/src/routes/webhooks/stripe-offerings.ts +384 -0
  113. package/templates/apps/api/src/routes/webhooks/stripe.ts +245 -36
  114. package/templates/apps/api/src/server.ts +163 -46
  115. package/templates/apps/api/src/services/__tests__/checkout-plan.test.ts +313 -0
  116. package/templates/apps/api/src/services/__tests__/deliverable-fulfillment.test.ts +51 -2
  117. package/templates/apps/api/src/services/__tests__/keyless-workspace-predicate.test.ts +234 -0
  118. package/templates/apps/api/src/services/__tests__/lead-routing.test.ts +1383 -133
  119. package/templates/apps/api/src/services/__tests__/magnet-completion.test.ts +389 -0
  120. package/templates/apps/api/src/services/__tests__/person.test.ts +232 -1
  121. package/templates/apps/api/src/services/__tests__/plan-offerings.test.ts +444 -0
  122. package/templates/apps/api/src/services/checkout-buyer.ts +100 -4
  123. package/templates/apps/api/src/services/consent.ts +95 -0
  124. package/templates/apps/api/src/services/deliverable-fulfillment.ts +13 -5
  125. package/templates/apps/api/src/services/entitlements.ts +157 -1
  126. package/templates/apps/api/src/services/lead-routing.ts +431 -47
  127. package/templates/apps/api/src/services/magnet-completion.ts +242 -0
  128. package/templates/apps/api/src/services/offerings/__tests__/catalog.test.ts +295 -0
  129. package/templates/apps/api/src/services/offerings/__tests__/checkout-session-record.test.ts +268 -0
  130. package/templates/apps/api/src/services/offerings/__tests__/connection.test.ts +868 -0
  131. package/templates/apps/api/src/services/offerings/__tests__/fixtures.ts +416 -0
  132. package/templates/apps/api/src/services/offerings/__tests__/org-products.test.ts +396 -0
  133. package/templates/apps/api/src/services/offerings/__tests__/readers.test.ts +681 -0
  134. package/templates/apps/api/src/services/offerings/__tests__/source.test.ts +231 -0
  135. package/templates/apps/api/src/services/offerings/catalog.ts +308 -0
  136. package/templates/apps/api/src/services/offerings/checkout-authorization.ts +385 -0
  137. package/templates/apps/api/src/services/offerings/checkout-session-record.ts +192 -0
  138. package/templates/apps/api/src/services/offerings/connection.ts +1003 -0
  139. package/templates/apps/api/src/services/offerings/index.ts +614 -0
  140. package/templates/apps/api/src/services/offerings/source.ts +140 -0
  141. package/templates/apps/api/src/services/offerings/store.ts +150 -0
  142. package/templates/apps/api/src/services/person.ts +164 -17
  143. package/templates/apps/api/src/services/plan-offerings.ts +125 -0
  144. package/templates/apps/api/src/services/public-site-resolver.ts +27 -15
  145. package/templates/apps/mcp/CLAUDE.md +22 -14
  146. package/templates/apps/mcp/__tests__/catalog-drift.test.ts +9 -4
  147. package/templates/apps/mcp/__tests__/get_offerings.test.ts +358 -0
  148. package/templates/apps/mcp/__tests__/get_pricing.test.ts +364 -0
  149. package/templates/apps/mcp/__tests__/http-transport.test.ts +4 -4
  150. package/templates/apps/mcp/__tests__/module-exclusion.test.ts +2 -2
  151. package/templates/apps/mcp/__tests__/server.test.ts +13 -11
  152. package/templates/apps/mcp/__tests__/start_purchase.test.ts +208 -12
  153. package/templates/apps/mcp/__tests__/tools/purchase.test.ts +11 -11
  154. package/templates/apps/mcp/src/lib/shown-offerings.ts +105 -0
  155. package/templates/apps/mcp/src/server.ts +5 -0
  156. package/templates/apps/mcp/src/tools/get_offerings.ts +47 -30
  157. package/templates/apps/mcp/src/tools/get_pricing.ts +40 -40
  158. package/templates/apps/mcp/src/tools/purchase.ts +30 -2
  159. package/templates/apps/mcp/src/workspace-server.ts +15 -0
  160. package/templates/apps/web/.env.example +24 -31
  161. package/templates/apps/web/CLAUDE.md +393 -9
  162. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +6 -2
  163. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +5 -4
  164. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +5 -1
  165. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +2 -0
  166. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +3 -14
  167. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +2 -0
  168. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +5 -1
  169. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +160 -8
  170. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +12 -9
  171. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +105 -2
  172. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +36 -3
  173. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +47 -1
  174. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +60 -22
  175. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +16 -8
  176. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +85 -31
  177. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +18 -4
  178. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +3 -1
  179. package/templates/apps/web/app/[locale]/(authed)/__tests__/gate.test.tsx +7 -4
  180. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/agreements-prompt.test.tsx +227 -207
  181. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout-sign-out.test.tsx +17 -1
  182. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +143 -1
  183. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +4 -0
  184. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +385 -89
  185. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/popups.test.tsx +5 -0
  186. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/privacy.test.tsx +44 -5
  187. package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +68 -34
  188. package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +0 -8
  189. package/templates/apps/web/app/[locale]/(authed)/account/agreements-actions.ts +39 -151
  190. package/templates/apps/web/app/[locale]/(authed)/account/agreements-gate.ts +61 -0
  191. package/templates/apps/web/app/[locale]/(authed)/account/agreements-prompt.tsx +143 -140
  192. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +40 -6
  193. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +68 -54
  194. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +5 -1
  195. package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +189 -0
  196. package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +295 -0
  197. package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +120 -0
  198. package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +23 -0
  199. package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +319 -0
  200. package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +172 -0
  201. package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +149 -0
  202. package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +141 -0
  203. package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +424 -0
  204. package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +72 -11
  205. package/templates/apps/web/app/[locale]/careers/page.tsx +129 -5
  206. package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +2 -2
  207. package/templates/apps/web/app/[locale]/checkout/__tests__/pages.test.tsx +139 -0
  208. package/templates/apps/web/app/[locale]/checkout/__tests__/thank-you-account.test.tsx +136 -0
  209. package/templates/apps/web/app/[locale]/checkout/thank-you/page.tsx +114 -0
  210. package/templates/apps/web/app/[locale]/checkout/unavailable/page.tsx +51 -0
  211. package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +1 -1
  212. package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +17 -1
  213. package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +79 -4
  214. package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +160 -13
  215. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +466 -36
  216. package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +7 -0
  217. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +172 -57
  218. package/templates/apps/web/app/[locale]/contact/intake-script.ts +26 -0
  219. package/templates/apps/web/app/[locale]/contact/page.tsx +99 -60
  220. package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +2 -2
  221. package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +2 -2
  222. package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +341 -4
  223. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.count.test.tsx +43 -0
  224. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.deliverable.test.tsx +200 -0
  225. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.ending.test.tsx +197 -0
  226. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +257 -0
  227. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/account-invite.actions.test.ts +69 -0
  228. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +430 -0
  229. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/two-route-tool.test.tsx +21 -9
  230. package/templates/apps/web/app/[locale]/flows/[slug]/account-invite.actions.ts +35 -0
  231. package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +352 -0
  232. package/templates/apps/web/app/[locale]/flows/[slug]/page.tsx +12 -73
  233. package/templates/apps/web/app/[locale]/flows/[slug]/start/page.tsx +10 -31
  234. package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +1 -1
  235. package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +1 -1
  236. package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +2 -2
  237. package/templates/apps/web/app/[locale]/layout.tsx +55 -4
  238. package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +174 -104
  239. package/templates/apps/web/app/[locale]/newsletter/page.tsx +95 -58
  240. package/templates/apps/web/app/[locale]/page.tsx +13 -1
  241. package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +2 -2
  242. package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +7 -0
  243. package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +599 -0
  244. package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +216 -0
  245. package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +236 -0
  246. package/templates/apps/web/app/[locale]/pricing/page.tsx +367 -6
  247. package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +2 -2
  248. package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +2 -2
  249. package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +2 -2
  250. package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +1 -1
  251. package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +4 -1
  252. package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +1 -1
  253. package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +1 -1
  254. package/templates/apps/web/app/[locale]/thanks/[slug]/AccountInviteLink.tsx +89 -0
  255. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/AccountInviteLink.test.tsx +104 -0
  256. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +38 -0
  257. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +9 -0
  258. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +17 -0
  259. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +62 -3
  260. package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +70 -18
  261. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +30 -9
  262. package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +1 -1
  263. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +114 -0
  264. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +20 -3
  265. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +44 -1
  266. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +22 -3
  267. package/templates/apps/web/app/api/offerings/checkout/[lookupKey]/route.ts +316 -0
  268. package/templates/apps/web/app/api/offerings/checkout/__tests__/route.test.ts +810 -0
  269. package/templates/apps/web/auth.ts +28 -2
  270. package/templates/apps/web/lib/__tests__/account-invite.test.ts +63 -0
  271. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +27 -1
  272. package/templates/apps/web/lib/__tests__/consent-policies.test.ts +23 -0
  273. package/templates/apps/web/lib/__tests__/deck-page.test.ts +7 -1
  274. package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +265 -0
  275. package/templates/apps/web/lib/__tests__/magnet-routes.test.ts +57 -0
  276. package/templates/apps/web/lib/__tests__/newsletter.actions.test.ts +293 -0
  277. package/templates/apps/web/lib/__tests__/offerings-pricing.test.ts +601 -0
  278. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +101 -25
  279. package/templates/apps/web/lib/account-invite.ts +37 -0
  280. package/templates/apps/web/lib/auth-routes.ts +36 -2
  281. package/templates/apps/web/lib/checkout-config.ts +16 -0
  282. package/templates/apps/web/lib/consent-policies.ts +22 -0
  283. package/templates/apps/web/lib/deck-page.ts +7 -0
  284. package/templates/apps/web/lib/deliverable-grant.ts +18 -0
  285. package/templates/apps/web/lib/hub-session/__tests__/sign-in-gate.test.tsx +111 -0
  286. package/templates/apps/web/lib/hub-session/sign-in-gate.tsx +88 -32
  287. package/templates/apps/web/lib/in-page-magnet.ts +416 -0
  288. package/templates/apps/web/lib/magnet-routes.ts +42 -0
  289. package/templates/apps/web/lib/modules.generated.ts +9 -0
  290. package/templates/apps/web/lib/newsletter.actions.ts +202 -0
  291. package/templates/apps/web/lib/offerings-pricing.ts +326 -0
  292. package/templates/apps/web/lib/posting-title.ts +17 -0
  293. package/templates/apps/web/lib/prisma-for-auth.ts +8 -0
  294. package/templates/apps/web/lib/sign-up-agreements.ts +449 -0
  295. package/templates/apps/web/lib/site-chrome.ts +2 -0
  296. package/templates/apps/web/lib/telemetry-scrub.ts +5 -1
  297. package/templates/apps/web/messages/en.json +71 -20
  298. package/templates/apps/web/middleware.ts +12 -2
  299. package/templates/apps/web/package.json +1 -0
  300. package/templates/apps/web/security-headers.config.ts +17 -0
  301. package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +187 -0
  302. package/templates/apps/web/src/lib/__tests__/rate-limit.test.ts +67 -0
  303. package/templates/apps/web/src/lib/lead-write.ts +90 -0
  304. package/templates/apps/web/src/lib/rate-limit.ts +79 -0
  305. package/templates/content/en/BlogList/blog.mdx +4 -71
  306. package/templates/content/en/BookCall/book-a-call.mdx +1 -41
  307. package/templates/content/en/BookCall/onsite-estimate.mdx +1 -17
  308. package/templates/content/en/BookCall/onsite-service.mdx +1 -17
  309. package/templates/content/en/BookCall/start-project.mdx +1 -17
  310. package/templates/content/en/ContactPage/contact.mdx +6 -63
  311. package/templates/content/en/HomePage/home.mdx +3 -21
  312. package/templates/database/CHANGELOG.md +69 -0
  313. package/templates/database/__tests__/consent-source-checkout-migration.test.ts +79 -0
  314. package/templates/database/__tests__/flow-completion-migration.test.ts +115 -0
  315. package/templates/database/__tests__/flow-completion.db.test.ts +136 -0
  316. package/templates/database/__tests__/in-page-magnets-migration.test.ts +161 -0
  317. package/templates/database/__tests__/offerings-checkout-session.db.test.ts +270 -0
  318. package/templates/database/__tests__/offerings-migration.test.ts +197 -0
  319. package/templates/database/__tests__/offerings-shown-price-ids-migration.test.ts +86 -0
  320. package/templates/database/__tests__/offerings.db.test.ts +303 -0
  321. package/templates/database/__tests__/seed.test.ts +64 -1
  322. package/templates/database/auth/schema.prisma +4 -0
  323. package/templates/database/config/schema.prisma +91 -0
  324. package/templates/database/inbox/schema.prisma +17 -2
  325. package/templates/database/migrations/20261018120000_flow_completion/migration.sql +52 -0
  326. package/templates/database/migrations/20261019120000_consent_source_checkout/migration.sql +27 -0
  327. package/templates/database/migrations/20261020120000_offerings_data_model/migration.sql +146 -0
  328. package/templates/database/migrations/20261021120000_offerings_checkout_session/migration.sql +77 -0
  329. package/templates/database/migrations/20261022120000_in_page_magnets/migration.sql +45 -0
  330. package/templates/database/migrations/20261023120000_offerings_shown_price_ids/migration.sql +47 -0
  331. package/templates/database/migrations/20261024120000_organization_plan_checkout_session/migration.sql +16 -0
  332. package/templates/database/package.json +1 -1
  333. package/templates/database/seed.ts +62 -3
  334. package/versions.json +35 -35
  335. package/site-templates/marketing-site-free/content/en/Pricing/pricing.mdx +0 -199
  336. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up.actions.ts +0 -125
  337. package/templates/apps/web/app/[locale]/downloads/__tests__/page-renderer-migration.test.tsx +0 -93
  338. package/templates/apps/web/app/[locale]/downloads/page.tsx +0 -37
  339. package/templates/apps/web/app/[locale]/newsletter/__tests__/newsletter.actions.test.ts +0 -139
  340. package/templates/apps/web/app/[locale]/newsletter/newsletter.actions.ts +0 -93
  341. package/templates/apps/web/lib/__tests__/meeting-slugs.test.ts +0 -120
  342. package/templates/apps/web/lib/meeting-slugs.ts +0 -63
@@ -0,0 +1,52 @@
1
+ -- #8757 — a per-magnet completion setting (spec
2
+ -- docs/specs/8757-a-per-magnet-completion-setting-spec.md D1, D2).
3
+ --
4
+ -- flow_definitions (2 columns) — what happens after someone submits the
5
+ -- magnet (`completion`: `lead`, `invite` or `checkout`),
6
+ -- and, for `checkout` only, the offering key it continues
7
+ -- to. The vocabulary is `FLOW_COMPLETIONS` and
8
+ -- `flowCheckoutOfferingSchema` in
9
+ -- packages/validation/src/schemas/flow-completion.ts.
10
+ --
11
+ -- Every existing row reads `completion = 'lead'` from the constant default —
12
+ -- Postgres stores the default in the catalog and rewrites no row for it, so
13
+ -- `contact` and every waitlist get `lead` with no statement. Each CHECK below
14
+ -- is added NOT VALID and then VALIDATEd; every existing row passes each one
15
+ -- (`lead` with a NULL offering).
16
+ --
17
+ -- The one UPDATE is the standard-defaults backfill BY SLUG (the issue's D2,
18
+ -- D7): `onboarding`, `request-quote` and `job-application` → `invite`
19
+ -- (`STANDARD_MAGNET_COMPLETIONS`). A test re-reads the block between the
20
+ -- markers. `updated_at` is Prisma-managed, so the backfill leaves it alone.
21
+ -- A magnet created after this migration takes the column default until the
22
+ -- seed constants carry `completion` (#8759).
23
+ --
24
+ -- Rollout: deploy this migration BEFORE the API code that reads and writes the
25
+ -- columns; code without them fails every magnet read.
26
+ --
27
+ -- Rollback: ALTER TABLE "flow_definitions" DROP COLUMN "completion", DROP
28
+ -- COLUMN "checkout_offering"; (the CHECKs go with them).
29
+
30
+ -- AlterTable
31
+ ALTER TABLE "flow_definitions" ADD COLUMN "completion" VARCHAR(16) NOT NULL DEFAULT 'lead',
32
+ ADD COLUMN "checkout_offering" VARCHAR(40);
33
+
34
+ -- A magnet completes as a lead, an invite or a checkout, nothing else.
35
+ ALTER TABLE "flow_definitions" ADD CONSTRAINT "flow_definitions_completion_domain"
36
+ CHECK ("completion" IN ('lead', 'invite', 'checkout')) NOT VALID;
37
+ ALTER TABLE "flow_definitions" VALIDATE CONSTRAINT "flow_definitions_completion_domain";
38
+
39
+ -- An offering is named exactly when the magnet continues to checkout.
40
+ ALTER TABLE "flow_definitions" ADD CONSTRAINT "flow_definitions_checkout_offering_pair"
41
+ CHECK (("completion" = 'checkout') = ("checkout_offering" IS NOT NULL)) NOT VALID;
42
+ ALTER TABLE "flow_definitions" VALIDATE CONSTRAINT "flow_definitions_checkout_offering_pair";
43
+
44
+ -- An offering key the spoke checkout route can serve.
45
+ ALTER TABLE "flow_definitions" ADD CONSTRAINT "flow_definitions_checkout_offering_format"
46
+ CHECK ("checkout_offering" IS NULL OR "checkout_offering" ~ '^[a-z0-9][a-z0-9-]{0,39}$') NOT VALID;
47
+ ALTER TABLE "flow_definitions" VALIDATE CONSTRAINT "flow_definitions_checkout_offering_format";
48
+
49
+ -- BEGIN completion backfill
50
+ UPDATE "flow_definitions" SET "completion" = 'invite'
51
+ WHERE "slug" IN ('onboarding', 'request-quote', 'job-application');
52
+ -- END completion backfill
@@ -0,0 +1,27 @@
1
+ -- #8765 — a `checkout` consent source (spec
2
+ -- docs/specs/8765-sign-up-refuses-without-the-spec.md D13).
3
+ --
4
+ -- consent_grants — the source vocabulary gains `checkout`: the buyer's
5
+ -- terms box on a Stripe Checkout session, recorded by the
6
+ -- hub webhook against the buyer's Person (D14).
7
+ --
8
+ -- DDL only. The CHECK is replaced, never relaxed: the old one is dropped and
9
+ -- the new one, the seven existing values plus `checkout`, is added NOT VALID
10
+ -- and then VALIDATEd, so every existing row is checked against it. No row is
11
+ -- written, and the append-only triggers do not fire on DDL.
12
+ --
13
+ -- The source vocabulary is packages/validation CONSENT_SOURCES.
14
+ --
15
+ -- Rollout: deploy this migration BEFORE the API code that writes a
16
+ -- `checkout` row; the webhook's insert otherwise fails the CHECK (it never
17
+ -- throws, so the order still completes, but no grant is recorded).
18
+ --
19
+ -- Rollback: ALTER TABLE "consent_grants" DROP CONSTRAINT
20
+ -- "consent_grants_source_known"; then re-add it with the seven values of
21
+ -- 20261014120000_consent_ledger — which fails while any `checkout` row
22
+ -- exists, and the ledger is append-only.
23
+
24
+ ALTER TABLE "consent_grants" DROP CONSTRAINT "consent_grants_source_known";
25
+ ALTER TABLE "consent_grants" ADD CONSTRAINT "consent_grants_source_known"
26
+ CHECK ("source" IN ('cookie_banner', 'sign_up', 'magnet', 'account_settings', 'email_unsubscribe', 'api', 'legacy', 'checkout')) NOT VALID;
27
+ ALTER TABLE "consent_grants" VALIDATE CONSTRAINT "consent_grants_source_known";
@@ -0,0 +1,146 @@
1
+ -- #8876 — the Offerings data model (spec
2
+ -- docs/specs/8876-the-offerings-data-model-typed-spec.md D1, D2; contract
3
+ -- docs/specs/8879-the-offerings-security-contract-key-spec.md C1):
4
+ --
5
+ -- stripe_connections (config) — an Organization's own Stripe account by a
6
+ -- restricted key: the mode, the key's last four, the key and webhook
7
+ -- secret as AES-256-GCM ciphertext written only by apps/api's
8
+ -- services/offerings/connection.ts, and a per-connection webhook token.
9
+ -- organization_offerings (config) — the Products an Organization has
10
+ -- switched on (the org-enabled set). Kept when a connection is deleted.
11
+ -- workspace_offerings (config) — the Products one workspace shows, its
12
+ -- Recommended plan and add-on, and the last-good Stripe snapshot.
13
+ --
14
+ -- Three new tables in the house style of 20261003130000_scheduling_connection
15
+ -- (CreateTable + CreateIndex as `prisma migrate diff` emits them, then the
16
+ -- ADR-0031 rule-3 id-format completion, in ONE migration since the tables are
17
+ -- new), plus a format CHECK on each reference column (the
18
+ -- workspace_piece_stages style) and the integrity CHECKs spec D1 names. Plain
19
+ -- scalar keys, no foreign key (ADR 0009 invariant 1).
20
+ --
21
+ -- The two ciphertext envelope CHECKs are the `v1.<iv>.<tag>.<ciphertext>`
22
+ -- base64url shape the cipher writes — a 12-byte IV (16 characters) and a
23
+ -- 16-byte tag (22) — and refuse a Stripe key or signing-secret prefix
24
+ -- anywhere in the value, so a writer bug that stored a key or a secret in
25
+ -- clear, bare or wrapped in the envelope's dots, is refused here
26
+ -- (SEC-8876-3, SEC-PR8955-2).
27
+ --
28
+ -- No backfill, no constraint relaxed, no existing table touched.
29
+ --
30
+ -- Rollback: DROP TABLE "stripe_connections", "organization_offerings",
31
+ -- "workspace_offerings". Every stored connection and selection is lost and
32
+ -- every site returns to its page content.
33
+
34
+ -- CreateTable
35
+ CREATE TABLE "stripe_connections" (
36
+ "id" TEXT NOT NULL DEFAULT ('stripecon_'::text || (uuidv7())::text),
37
+ "organization_id" TEXT NOT NULL,
38
+ "mode" VARCHAR(8) NOT NULL,
39
+ "key_last4" VARCHAR(4) NOT NULL,
40
+ "credential_ciphertext" TEXT NOT NULL,
41
+ "webhook_token" VARCHAR(64) NOT NULL,
42
+ "webhook_secret_ciphertext" TEXT,
43
+ "live_at" TIMESTAMPTZ,
44
+ "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
45
+ "updated_at" TIMESTAMPTZ NOT NULL,
46
+
47
+ CONSTRAINT "stripe_connections_pkey" PRIMARY KEY ("id")
48
+ );
49
+
50
+ -- CreateTable
51
+ CREATE TABLE "organization_offerings" (
52
+ "id" TEXT NOT NULL DEFAULT ('orgoffer_'::text || (uuidv7())::text),
53
+ "organization_id" TEXT NOT NULL,
54
+ "enabled_product_ids" TEXT[] DEFAULT ARRAY[]::TEXT[],
55
+ "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
56
+ "updated_at" TIMESTAMPTZ NOT NULL,
57
+
58
+ CONSTRAINT "organization_offerings_pkey" PRIMARY KEY ("id")
59
+ );
60
+
61
+ -- CreateTable
62
+ CREATE TABLE "workspace_offerings" (
63
+ "id" TEXT NOT NULL DEFAULT ('wsoffer_'::text || (uuidv7())::text),
64
+ "workspace_id" TEXT NOT NULL,
65
+ "shown_product_ids" TEXT[] DEFAULT ARRAY[]::TEXT[],
66
+ "recommended_plan_product_id" TEXT,
67
+ "recommended_addon_product_id" TEXT,
68
+ "snapshot" JSONB,
69
+ "snapshot_at" TIMESTAMPTZ,
70
+ "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
71
+ "updated_at" TIMESTAMPTZ NOT NULL,
72
+
73
+ CONSTRAINT "workspace_offerings_pkey" PRIMARY KEY ("id")
74
+ );
75
+
76
+ -- CreateIndex
77
+ CREATE UNIQUE INDEX "stripe_connections_organization_id_key" ON "stripe_connections"("organization_id");
78
+
79
+ -- CreateIndex
80
+ CREATE UNIQUE INDEX "stripe_connections_webhook_token_key" ON "stripe_connections"("webhook_token");
81
+
82
+ -- CreateIndex
83
+ CREATE UNIQUE INDEX "organization_offerings_organization_id_key" ON "organization_offerings"("organization_id");
84
+
85
+ -- CreateIndex
86
+ CREATE UNIQUE INDEX "workspace_offerings_workspace_id_key" ON "workspace_offerings"("workspace_id");
87
+
88
+ -- ADR-0031 rule 3 — stripe_connections: stripecon_, organization_offerings:
89
+ -- orgoffer_, workspace_offerings: wsoffer_ (registered in
90
+ -- packages/ids/src/registry.ts ENTITY_PREFIX; this migration's path is added
91
+ -- to migration-sync.test.ts's PK_CHECK_MIGRATIONS).
92
+ ALTER TABLE "stripe_connections" ALTER COLUMN "id" TYPE text COLLATE "C";
93
+ ALTER TABLE "stripe_connections" ALTER COLUMN "id" SET DEFAULT ('stripecon_'::text || (uuidv7())::text);
94
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_id_format" CHECK ("id" ~ '^stripecon_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
95
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_organization_id_format" CHECK ("organization_id" ~ '^org_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
96
+ ALTER TABLE "organization_offerings" ALTER COLUMN "id" TYPE text COLLATE "C";
97
+ ALTER TABLE "organization_offerings" ALTER COLUMN "id" SET DEFAULT ('orgoffer_'::text || (uuidv7())::text);
98
+ ALTER TABLE "organization_offerings" ADD CONSTRAINT "organization_offerings_id_format" CHECK ("id" ~ '^orgoffer_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
99
+ ALTER TABLE "organization_offerings" ADD CONSTRAINT "organization_offerings_organization_id_format" CHECK ("organization_id" ~ '^org_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
100
+ ALTER TABLE "workspace_offerings" ALTER COLUMN "id" TYPE text COLLATE "C";
101
+ ALTER TABLE "workspace_offerings" ALTER COLUMN "id" SET DEFAULT ('wsoffer_'::text || (uuidv7())::text);
102
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_id_format" CHECK ("id" ~ '^wsoffer_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
103
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_workspace_id_format" CHECK ("workspace_id" ~ '^wksp_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
104
+
105
+ -- A connection is in test or live mode, and only a live one has a go-live
106
+ -- time (a replace that returns a row to test clears it, contract C9).
107
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_mode_domain"
108
+ CHECK ("mode" IN ('test', 'live'));
109
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_live_at_pair"
110
+ CHECK (("mode" = 'live') = ("live_at" IS NOT NULL));
111
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_key_last4_shape"
112
+ CHECK ("key_last4" ~ '^[A-Za-z0-9]{4}$');
113
+ -- 32 random bytes, base64url.
114
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_webhook_token_shape"
115
+ CHECK ("webhook_token" ~ '^[A-Za-z0-9_-]{43}$');
116
+ -- Ciphertext only: never a key or a signing secret in clear.
117
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_credential_envelope"
118
+ CHECK ("credential_ciphertext" ~ '^v1\.[A-Za-z0-9_-]{16}\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]+$'
119
+ AND "credential_ciphertext" !~ '(rk|sk|pk)_(test|live)_|whsec_');
120
+ ALTER TABLE "stripe_connections" ADD CONSTRAINT "stripe_connections_webhook_secret_envelope"
121
+ CHECK ("webhook_secret_ciphertext" IS NULL
122
+ OR ("webhook_secret_ciphertext" ~ '^v1\.[A-Za-z0-9_-]{16}\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]+$'
123
+ AND "webhook_secret_ciphertext" !~ '(rk|sk|pk)_(test|live)_|whsec_'));
124
+
125
+ -- Each id set is never NULL, holds no NULL element, and has at most 100 ids.
126
+ -- Duplicates and the id shape are refused by the writers' schema parse.
127
+ ALTER TABLE "organization_offerings" ADD CONSTRAINT "organization_offerings_enabled_product_ids_bound"
128
+ CHECK ("enabled_product_ids" IS NOT NULL
129
+ AND cardinality("enabled_product_ids") <= 100
130
+ AND array_position("enabled_product_ids", NULL) IS NULL);
131
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_shown_product_ids_bound"
132
+ CHECK ("shown_product_ids" IS NOT NULL
133
+ AND cardinality("shown_product_ids") <= 100
134
+ AND array_position("shown_product_ids", NULL) IS NULL);
135
+
136
+ -- A Recommended product is one the workspace shows.
137
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_recommended_plan_shown"
138
+ CHECK ("recommended_plan_product_id" IS NULL
139
+ OR "recommended_plan_product_id" = ANY ("shown_product_ids"));
140
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_recommended_addon_shown"
141
+ CHECK ("recommended_addon_product_id" IS NULL
142
+ OR "recommended_addon_product_id" = ANY ("shown_product_ids"));
143
+
144
+ -- The snapshot and its time are set together.
145
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_snapshot_pair"
146
+ CHECK (("snapshot" IS NULL) = ("snapshot_at" IS NULL));
@@ -0,0 +1,77 @@
1
+ -- #8930 — the Offerings Checkout session record (spec
2
+ -- docs/specs/8930-the-offerings-checkout-session-record-spec.md D1, D2;
3
+ -- contract docs/specs/8879-the-offerings-security-contract-key-spec.md A11,
4
+ -- W5, A13):
5
+ --
6
+ -- offerings_checkout_sessions (config) — one row per Checkout Session the
7
+ -- hub created: its id, the workspace and Organization it was created for,
8
+ -- the Price and lookup key it sells, and the key's mode. Written once by
9
+ -- apps/api's services/offerings/checkout-session-record.ts before the
10
+ -- checkout route answers; the per-Organization webhook fulfils, and the
11
+ -- session read answers, only a session recorded here.
12
+ --
13
+ -- One new table in the house style of 20261003130000_scheduling_connection
14
+ -- (CreateTable + CreateIndex as `prisma migrate diff` emits them, then the
15
+ -- ADR-0031 rule-3 id-format completion), plus a CHECK on every column. Plain
16
+ -- scalar keys, no foreign key (ADR 0009 invariant 1). The table is new, so no
17
+ -- CHECK needs NOT VALID.
18
+ --
19
+ -- One new table, no backfill, no existing table touched.
20
+ --
21
+ -- Rollout: deploy the migration before the API code that writes the record,
22
+ -- so the checkout route never runs on a database without the table.
23
+ --
24
+ -- Rollback: DROP TABLE "offerings_checkout_sessions". While the table is
25
+ -- absent every read rejects, so the webhook answers non-2xx and Stripe keeps
26
+ -- retrying. Re-creating it empty loses every earlier record: each such session
27
+ -- then reads as unrecorded and a purchase completed after that is never
28
+ -- fulfilled. So roll back only before the checkout route that writes it is
29
+ -- live, and never re-create the table without its old rows unless the seller
30
+ -- is told.
31
+
32
+ -- CreateTable
33
+ CREATE TABLE "offerings_checkout_sessions" (
34
+ "id" TEXT NOT NULL DEFAULT ('ocsess_'::text || (uuidv7())::text),
35
+ "session_id" TEXT NOT NULL,
36
+ "workspace_id" TEXT NOT NULL,
37
+ "organization_id" TEXT NOT NULL,
38
+ "price_id" VARCHAR(255) NOT NULL,
39
+ "lookup_key" VARCHAR(48) NOT NULL,
40
+ "mode" VARCHAR(8) NOT NULL,
41
+ "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
42
+
43
+ CONSTRAINT "offerings_checkout_sessions_pkey" PRIMARY KEY ("id")
44
+ );
45
+
46
+ -- CreateIndex
47
+ CREATE UNIQUE INDEX "offerings_checkout_sessions_session_id_key" ON "offerings_checkout_sessions"("session_id");
48
+
49
+ -- ADR-0031 rule 3 — offerings_checkout_sessions: ocsess_ (registered in
50
+ -- packages/ids/src/registry.ts ENTITY_PREFIX; this migration's path is added
51
+ -- to migration-sync.test.ts's PK_CHECK_MIGRATIONS).
52
+ ALTER TABLE "offerings_checkout_sessions" ALTER COLUMN "id" TYPE text COLLATE "C";
53
+ ALTER TABLE "offerings_checkout_sessions" ALTER COLUMN "id" SET DEFAULT ('ocsess_'::text || (uuidv7())::text);
54
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_id_format" CHECK ("id" ~ '^ocsess_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
55
+
56
+ -- A Checkout Session id: the pieces_checkout_session_format body.
57
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_session_id_format"
58
+ CHECK ("session_id" ~ '^cs_(test|live)_[A-Za-z0-9]{1,250}$');
59
+ -- The workspace the session was created for.
60
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_workspace_id_format"
61
+ CHECK ("workspace_id" ~ '^wksp_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
62
+ -- That workspace's own Organization.
63
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_organization_id_format"
64
+ CHECK ("organization_id" ~ '^org_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$');
65
+ -- A Stripe id: the one bound #8876 D4 puts on every Stripe id.
66
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_price_id_format"
67
+ CHECK ("price_id" ~ '^[A-Za-z0-9_-]{1,255}$');
68
+ -- The contract §3.7 whole-key grammar, <plan>_<period>. A backstop, never a
69
+ -- parser: the store calls parseLookupKey, and the db test proves the two agree.
70
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_lookup_key_format"
71
+ CHECK ("lookup_key" ~ '^[a-z0-9][a-z0-9-]{0,39}_(monthly|yearly|once)$');
72
+ -- The key's mode.
73
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_mode_domain"
74
+ CHECK ("mode" IN ('test', 'live'));
75
+ -- A test key makes a cs_test_ session and a live key a cs_live_ one.
76
+ ALTER TABLE "offerings_checkout_sessions" ADD CONSTRAINT "offerings_checkout_sessions_session_mode_agree"
77
+ CHECK (("mode" = 'live') = ("session_id" ~ '^cs_live_'));
@@ -0,0 +1,45 @@
1
+ -- #8847 — the in-page form shape (spec
2
+ -- docs/specs/8847-the-in-page-form-shape-spec.md D5, C5).
3
+ --
4
+ -- Two marked blocks, each re-runnable and each held to its TypeScript
5
+ -- constant by database/__tests__/in-page-magnets-migration.test.ts, on the
6
+ -- request-quote backfill's footing (20261012120000_member_contract):
7
+ --
8
+ -- newsletter backfill — every existing workspace gets the standard
9
+ -- newsletter magnet (`newsletterFlowConfig`,
10
+ -- `live`, landing page /newsletter, completion
11
+ -- `lead`). Insert-only on `(site_id, slug)`: a row
12
+ -- already at `newsletter` (an owner's own
13
+ -- wizard-built newsletter included) is never
14
+ -- changed. A workspace created after this runs is
15
+ -- seeded by `POST /v1/workspaces`, and the
16
+ -- seed-presets CLI covers one created between this
17
+ -- migration and the route code's deploy.
18
+ --
19
+ -- contact-form upgrade — a stored Contact form whose config is EXACTLY
20
+ -- #8661's shipped default moves to the new default
21
+ -- (`contactFormFlowConfig`). `config` is jsonb, so
22
+ -- `=` compares values, not key order or whitespace:
23
+ -- a row an owner edited in any way, or a
24
+ -- wizard-built Contact form, is not equal and is
25
+ -- left as is. Only `config` and `updated_at` are
26
+ -- written — never title, status, landing page or
27
+ -- completion. A re-run matches nothing.
28
+ --
29
+ -- Rollback: DELETE FROM "flow_definitions" WHERE "slug" = 'newsletter' AND
30
+ -- "config" = <the backfill literal>::jsonb; and the upgrade's UPDATE with its
31
+ -- two literals swapped.
32
+
33
+ -- BEGIN newsletter backfill
34
+ INSERT INTO "flow_definitions" ("site_id", "workspace_id", "slug", "config", "kind", "title", "status", "customers_enabled", "completion", "landing_page", "updated_at")
35
+ SELECT w."id", w."id", 'newsletter',
36
+ '{"slug":"newsletter","defaultLocale":"en","steps":[{"key":"subscribe","type":"field","copy":{"title":{"en":"Get the newsletter"},"body":{"en":"One email when there is something new."},"cta":{"en":"Subscribe"}},"fields":[{"name":"email","inputType":"email","required":true,"mapsTo":"email","copy":{"label":{"en":"Email"},"placeholder":{"en":"you@example.com"}}},{"name":"terms","inputType":"consent","required":true,"purposes":["newsletter"],"copy":{"label":{"en":"I accept the [Terms](terms) and [Privacy Policy](privacy)."},"help":{"en":"No spam. Unsubscribe any time."}}}]}],"ending":{"default":{"kind":"screen","headline":{"en":"Check your inbox"},"body":{"en":"Your welcome email is on its way."}}},"completionEmail":{"subject":{"en":"You''re subscribed"},"body":{"en":"Thanks for subscribing. You''ll get one email when there is something new."}},"unsubscribe":{"title":{"en":"Unsubscribe"},"body":{"en":"Stop getting the newsletter by email?"},"cta":{"en":"Unsubscribe"},"done":{"headline":{"en":"You''re unsubscribed."},"body":{"en":"You won''t get the newsletter any more."}}}}'::jsonb,
37
+ 'newsletter', 'Newsletter', 'live', false, 'lead', '/newsletter', CURRENT_TIMESTAMP
38
+ FROM "workspaces" w
39
+ ON CONFLICT ("site_id", "slug") DO NOTHING;
40
+ -- END newsletter backfill
41
+
42
+ -- BEGIN contact-form upgrade
43
+ UPDATE "flow_definitions" SET "config" = '{"slug":"contact","defaultLocale":"en","steps":[{"key":"contact","type":"field","copy":{"title":{"en":"Get in touch"},"body":{"en":"I reply within one business day."},"cta":{"en":"Send message"}},"fields":[{"name":"name","inputType":"text","required":true,"mapsTo":"name","copy":{"label":{"en":"Name"}}},{"name":"email","inputType":"email","required":true,"mapsTo":"email","copy":{"label":{"en":"Email"}}},{"name":"subject","inputType":"select","required":false,"options":[{"value":"General question","label":{"en":"General question"}},{"value":"Working together","label":{"en":"Working together"}},{"value":"Support","label":{"en":"Support"}},{"value":"Press and partnerships","label":{"en":"Press and partnerships"}},{"value":"Other","label":{"en":"Other"}}],"copy":{"label":{"en":"Subject"},"placeholder":{"en":"Choose a subject"}}},{"name":"message","inputType":"textarea","required":false,"copy":{"label":{"en":"Message"}}},{"name":"terms","inputType":"consent","required":true,"purposes":["service_terms"],"copy":{"label":{"en":"I accept the [Terms](terms) and [Privacy Policy](privacy)."}}}]}],"ending":{"default":{"kind":"screen","headline":{"en":"Message sent."},"body":{"en":"Thanks for getting in touch. I reply within one business day."}}}}'::jsonb, "updated_at" = CURRENT_TIMESTAMP
44
+ WHERE "slug" = 'contact' AND "config" = '{"slug":"contact","defaultLocale":"en","steps":[{"key":"contact","type":"field","copy":{"title":{"en":"Contact form"},"cta":{"en":"Send message"}},"fields":[{"name":"name","inputType":"text","required":true,"mapsTo":"name","copy":{"label":{"en":"Name"}}},{"name":"email","inputType":"email","required":true,"mapsTo":"email","copy":{"label":{"en":"Email"}}},{"name":"subject","inputType":"select","required":false,"options":[{"value":"General question","label":{"en":"General question"}},{"value":"Working together","label":{"en":"Working together"}},{"value":"Support","label":{"en":"Support"}},{"value":"Press and partnerships","label":{"en":"Press and partnerships"}},{"value":"Other","label":{"en":"Other"}}],"copy":{"label":{"en":"Subject"},"placeholder":{"en":"Choose a subject"}}},{"name":"message","inputType":"textarea","required":false,"copy":{"label":{"en":"Message"}}},{"name":"terms","inputType":"consent","required":true,"purposes":["service_terms"],"copy":{"label":{"en":"I accept the [Terms](terms), [Privacy Policy](privacy), and [Working Agreement](working_agreement)."}}}]}]}'::jsonb;
45
+ -- END contact-form upgrade
@@ -0,0 +1,47 @@
1
+ -- #9070 — the workspace shown set becomes per Stripe Price (spec
2
+ -- docs/specs/9070-the-workspace-offerings-page-becomes-spec.md D1, AC-6).
3
+ --
4
+ -- workspace_offerings.shown_price_ids (config) — the Stripe Price ids one
5
+ -- workspace shows on its pricing page. Written only by
6
+ -- apps/api's services/offerings/store.ts
7
+ -- (writeWorkspaceSelection, the PUT
8
+ -- /v1/workspaces/:workspaceId/offerings route), beside
9
+ -- shown_product_ids, which every write sets to the Products
10
+ -- with at least one shown Price. Read through
11
+ -- shownPriceIdsFor (services/offerings/index.ts) by
12
+ -- /pricing, the agent pricing tools, the plan picker and
13
+ -- checkout.
14
+ --
15
+ -- An EMPTY array means "every Price of each shown Product" — the grain every
16
+ -- row had before this migration — so every existing row reads `{}` from the
17
+ -- constant default and shows exactly what it showed before. Postgres stores
18
+ -- the default in the catalog and rewrites no row for it. The store's parse
19
+ -- refuses a new write of Products without Prices, so a row saved after this
20
+ -- migration always carries its Price ids. Each CHECK is added NOT VALID and
21
+ -- then VALIDATEd; every existing row passes both (an empty array).
22
+ --
23
+ -- The migration timestamp follows 20261022120000_in_page_magnets, which took
24
+ -- the spec's named slot first (spec §5.3).
25
+ --
26
+ -- Rollout: deploy this migration BEFORE the API code that reads and writes the
27
+ -- column, and the API before the Admin.
28
+ --
29
+ -- Rollback: roll the API back, then
30
+ -- UPDATE "workspace_offerings" SET "shown_price_ids" = '{}';
31
+ -- so every row reads at the Product grain again and the old route's saves
32
+ -- pass workspace_offerings_shown_prices_need_products, and tell each owner who
33
+ -- saved per Price that every Price of their shown Products is on sale again.
34
+ -- Never drop the column while a per-Price row exists without that notice.
35
+
36
+ -- AlterTable
37
+ ALTER TABLE "workspace_offerings" ADD COLUMN "shown_price_ids" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[];
38
+
39
+ -- At most 100 Products × three periods, and no NULL element.
40
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_shown_price_ids_bound"
41
+ CHECK (cardinality("shown_price_ids") <= 300 AND array_position("shown_price_ids", NULL) IS NULL) NOT VALID;
42
+ ALTER TABLE "workspace_offerings" VALIDATE CONSTRAINT "workspace_offerings_shown_price_ids_bound";
43
+
44
+ -- A shown Price needs a shown Product.
45
+ ALTER TABLE "workspace_offerings" ADD CONSTRAINT "workspace_offerings_shown_prices_need_products"
46
+ CHECK (cardinality("shown_price_ids") = 0 OR cardinality("shown_product_ids") > 0) NOT VALID;
47
+ ALTER TABLE "workspace_offerings" VALIDATE CONSTRAINT "workspace_offerings_shown_prices_need_products";
@@ -0,0 +1,16 @@
1
+ -- #9067 D13 — the Organization binds only the plan Checkout it recorded (spec
2
+ -- docs/specs/9067-the-billing-tab-s-plan-spec.md D13, SEC-9067-1 to -3).
3
+ --
4
+ -- `plan_checkout_session_id` is the one plan Checkout this Organization has
5
+ -- open, written by POST /v1/billing/plan-checkout through a compare-and-set
6
+ -- and cleared by the Stripe webhook when it binds that session's customer.
7
+ -- Nullable, no default and no backfill: every existing row reads "no open
8
+ -- plan session". Unique, so one session id can name at most one
9
+ -- Organization.
10
+ --
11
+ -- Rollback: DROP INDEX "organizations_plan_checkout_session_id_key";
12
+ -- ALTER TABLE "organizations" DROP COLUMN "plan_checkout_session_id";
13
+
14
+ ALTER TABLE "organizations" ADD COLUMN "plan_checkout_session_id" TEXT;
15
+
16
+ CREATE UNIQUE INDEX "organizations_plan_checkout_session_id_key" ON "organizations"("plan_checkout_session_id");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@working-theory/database",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,6 +30,14 @@ import {
30
30
  CONTACT_FORM_FLOW_TITLE,
31
31
  CONTACT_FORM_LANDING_PAGE,
32
32
  contactFormFlowConfig,
33
+ JOB_APPLICATION_FLOW_SLUG,
34
+ JOB_APPLICATION_FLOW_TITLE,
35
+ JOB_APPLICATION_LANDING_PAGE,
36
+ jobApplicationFlowConfig,
37
+ NEWSLETTER_FLOW_SLUG,
38
+ NEWSLETTER_FLOW_TITLE,
39
+ NEWSLETTER_LANDING_PAGE,
40
+ newsletterFlowConfig,
33
41
  REQUEST_QUOTE_FLOW_SLUG,
34
42
  REQUEST_QUOTE_FLOW_TITLE,
35
43
  requestQuoteFlowConfig,
@@ -79,9 +87,13 @@ export type DefaultWorkspacePrismaClient = Pick<
79
87
  * workspace's magnet comes from. Insert-if-absent: an `upsert` with an empty
80
88
  * `update`, so an existing `(site_id, slug)` row is never overwritten.
81
89
  *
82
- * #8661 D3 — and its live Contact form magnet, the same way. An existing
83
- * deployment (a workspace already present) gets its row from the seed-presets
84
- * CLI instead.
90
+ * #8661 D3 — and its live Contact form magnet, the same way, and (#8746 D3)
91
+ * its live Job application magnet, and (#8847 D4) its live newsletter magnet.
92
+ * An existing deployment (a workspace already present) gets its rows from the
93
+ * seed-presets CLI instead.
94
+ *
95
+ * #8759 — each names its #8757 D2 completion: the migration's backfill ran
96
+ * before this seed and found no rows, so the seed writes the value itself.
85
97
  */
86
98
  export async function provisionDefaultWorkspace(
87
99
  prisma: DefaultWorkspacePrismaClient,
@@ -133,6 +145,7 @@ export async function provisionDefaultWorkspace(
133
145
  title: REQUEST_QUOTE_FLOW_TITLE,
134
146
  status: "draft",
135
147
  customersEnabled: true,
148
+ completion: "invite",
136
149
  },
137
150
  update: {},
138
151
  });
@@ -153,11 +166,57 @@ export async function provisionDefaultWorkspace(
153
166
  title: CONTACT_FORM_FLOW_TITLE,
154
167
  status: "live",
155
168
  customersEnabled: false,
169
+ completion: "lead",
156
170
  landingPage: CONTACT_FORM_LANDING_PAGE,
157
171
  },
158
172
  update: {},
159
173
  });
160
174
 
175
+ await prisma.flowDefinition.upsert({
176
+ where: {
177
+ siteId_slug: {
178
+ siteId: DEFAULT_WORKSPACE_ID,
179
+ slug: JOB_APPLICATION_FLOW_SLUG,
180
+ },
181
+ },
182
+ create: {
183
+ siteId: DEFAULT_WORKSPACE_ID,
184
+ workspaceId: DEFAULT_WORKSPACE_ID,
185
+ slug: JOB_APPLICATION_FLOW_SLUG,
186
+ config: jobApplicationFlowConfig,
187
+ kind: "diagnostic",
188
+ title: JOB_APPLICATION_FLOW_TITLE,
189
+ status: "live",
190
+ customersEnabled: false,
191
+ completion: "invite",
192
+ landingPage: JOB_APPLICATION_LANDING_PAGE,
193
+ },
194
+ update: {},
195
+ });
196
+
197
+ // #8847 D4 — the standard newsletter magnet, the same way.
198
+ await prisma.flowDefinition.upsert({
199
+ where: {
200
+ siteId_slug: {
201
+ siteId: DEFAULT_WORKSPACE_ID,
202
+ slug: NEWSLETTER_FLOW_SLUG,
203
+ },
204
+ },
205
+ create: {
206
+ siteId: DEFAULT_WORKSPACE_ID,
207
+ workspaceId: DEFAULT_WORKSPACE_ID,
208
+ slug: NEWSLETTER_FLOW_SLUG,
209
+ config: newsletterFlowConfig,
210
+ kind: "newsletter",
211
+ title: NEWSLETTER_FLOW_TITLE,
212
+ status: "live",
213
+ customersEnabled: false,
214
+ completion: "lead",
215
+ landingPage: NEWSLETTER_LANDING_PAGE,
216
+ },
217
+ update: {},
218
+ });
219
+
161
220
  return { created: true };
162
221
  }
163
222
 
package/versions.json CHANGED
@@ -1,53 +1,53 @@
1
1
  {
2
- "@working-theory/admin-ui": "0.42.0",
3
- "@working-theory/aeo": "0.42.0",
4
- "@working-theory/agent-context": "0.42.0",
2
+ "@working-theory/admin-ui": "0.44.0",
3
+ "@working-theory/aeo": "0.44.0",
4
+ "@working-theory/agent-context": "0.44.0",
5
5
  "@working-theory/agent-contract": "0.1.0",
6
6
  "@working-theory/agent-memory": "0.0.0",
7
7
  "@working-theory/ai": "0.1.0",
8
- "@working-theory/analytics": "0.42.0",
9
- "@working-theory/api-client": "0.42.0",
8
+ "@working-theory/analytics": "0.44.0",
9
+ "@working-theory/api-client": "0.44.0",
10
10
  "@working-theory/cda-filesystem": "0.0.0",
11
- "@working-theory/cli": "0.42.0",
12
- "@working-theory/common": "0.42.0",
11
+ "@working-theory/cli": "0.44.0",
12
+ "@working-theory/common": "0.44.0",
13
13
  "@working-theory/consent": "0.1.0",
14
- "@working-theory/content-adapters": "0.42.0",
15
- "@working-theory/content-projection": "0.42.0",
16
- "@working-theory/email": "0.42.0",
14
+ "@working-theory/content-adapters": "0.44.0",
15
+ "@working-theory/content-projection": "0.44.0",
16
+ "@working-theory/email": "0.44.0",
17
17
  "@working-theory/env": "0.0.0",
18
- "@working-theory/eslint-config": "0.42.0",
19
- "@working-theory/fumadocs-schema": "0.42.0",
20
- "@working-theory/ids": "0.14.0",
21
- "@working-theory/jsonld": "0.42.0",
22
- "@working-theory/license": "0.42.0",
23
- "@working-theory/metadata": "0.42.0",
24
- "@working-theory/observability": "0.42.0",
25
- "@working-theory/page-renderer": "0.42.0",
18
+ "@working-theory/eslint-config": "0.44.0",
19
+ "@working-theory/fumadocs-schema": "0.44.0",
20
+ "@working-theory/ids": "0.15.0",
21
+ "@working-theory/jsonld": "0.44.0",
22
+ "@working-theory/license": "0.44.0",
23
+ "@working-theory/metadata": "0.44.0",
24
+ "@working-theory/observability": "0.44.0",
25
+ "@working-theory/page-renderer": "0.44.0",
26
26
  "@working-theory/plugin-mcp": "0.1.3",
27
- "@working-theory/schema": "0.42.0",
28
- "@working-theory/schema-pack-registry": "0.42.0",
29
- "@working-theory/schema-validator": "0.42.0",
30
- "@working-theory/sections-registry": "0.42.0",
31
- "@working-theory/site-config": "0.42.0",
32
- "@working-theory/spoke-checkout": "0.5.3",
33
- "@working-theory/stripe-client": "0.42.0",
34
- "@working-theory/templates": "0.42.0",
35
- "@working-theory/theme": "0.42.0",
36
- "@working-theory/ui": "0.42.0",
37
- "@working-theory/validation": "0.42.0",
38
- "@working-theory/web-i18n": "0.42.0",
27
+ "@working-theory/schema": "0.44.0",
28
+ "@working-theory/schema-pack-registry": "0.44.0",
29
+ "@working-theory/schema-validator": "0.44.0",
30
+ "@working-theory/sections-registry": "0.44.0",
31
+ "@working-theory/site-config": "0.44.0",
32
+ "@working-theory/spoke-checkout": "0.7.0",
33
+ "@working-theory/stripe-client": "0.44.0",
34
+ "@working-theory/templates": "0.44.0",
35
+ "@working-theory/theme": "0.44.0",
36
+ "@working-theory/ui": "0.44.0",
37
+ "@working-theory/validation": "0.44.0",
38
+ "@working-theory/web-i18n": "0.44.0",
39
39
  "@working-theory/billing-client": "0.0.0",
40
40
  "@working-theory/branding": "0.0.0",
41
41
  "@working-theory/license-client": "0.0.0",
42
42
  "@working-theory/license-manifest": "0.0.0",
43
43
  "@working-theory/partner-session": "0.0.0",
44
44
  "@working-theory/preview-protocol": "0.0.0",
45
- "@working-theory/ui-commerce": "0.23.20",
46
- "@working-theory/ui-docs-blog": "0.23.20",
47
- "@working-theory/ui-scheduling": "0.24.0",
48
- "@working-theory/ui-signal-collectors": "0.25.9",
45
+ "@working-theory/ui-commerce": "0.23.22",
46
+ "@working-theory/ui-docs-blog": "0.23.22",
47
+ "@working-theory/ui-scheduling": "0.24.2",
48
+ "@working-theory/ui-signal-collectors": "0.27.0",
49
49
  "@working-theory/web": "0.0.0",
50
50
  "@working-theory/api": "1.0.0",
51
51
  "@working-theory/mcp": "0.0.0",
52
- "@working-theory/database": "0.42.0"
52
+ "@working-theory/database": "0.44.0"
53
53
  }