@cosmicdrift/kumiko-bundled-features 0.369.0 → 0.370.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 (606) hide show
  1. package/dist/account-security/constants.d.ts +4 -0
  2. package/dist/account-security/constants.js +5 -0
  3. package/dist/account-security/feature.d.ts +14 -0
  4. package/dist/account-security/feature.js +62 -0
  5. package/dist/account-security/i18n.d.ts +6 -0
  6. package/dist/account-security/i18n.js +6 -0
  7. package/dist/account-security/index.d.ts +3 -0
  8. package/dist/account-security/index.js +3 -0
  9. package/dist/admin-shell/feature.d.ts +1 -1
  10. package/dist/admin-shell/index.d.ts +4 -4
  11. package/dist/admin-shell/overview-panels.d.ts +1 -1
  12. package/dist/admin-shell/web/index.d.ts +1 -1
  13. package/dist/agent-tools/agent-manifest.d.ts +1 -1
  14. package/dist/agent-tools/index.d.ts +8 -8
  15. package/dist/agent-tools/manifest-deny-qns.d.ts +1 -1
  16. package/dist/agent-tools/tool-catalog.d.ts +1 -1
  17. package/dist/agent-tools/tool-dispatch.d.ts +1 -1
  18. package/dist/audit/handlers/resolve-audit-tenant.d.ts +1 -1
  19. package/dist/audit/index.d.ts +3 -3
  20. package/dist/audit/web/index.d.ts +1 -1
  21. package/dist/auth-email-password/bootstrap.d.ts +1 -1
  22. package/dist/auth-email-password/feature.d.ts +7 -6
  23. package/dist/auth-email-password/feature.js +3 -1
  24. package/dist/auth-email-password/handlers/confirm-token-flow.d.ts +1 -1
  25. package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
  26. package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
  27. package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
  28. package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
  29. package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
  30. package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
  31. package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
  32. package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
  33. package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
  34. package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
  35. package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -2
  36. package/dist/auth-email-password/index.d.ts +13 -13
  37. package/dist/auth-email-password/lockout-store.d.ts +1 -1
  38. package/dist/auth-email-password/magic-link-mail.d.ts +1 -1
  39. package/dist/auth-email-password/seeding.d.ts +3 -3
  40. package/dist/auth-email-password/signed-token.d.ts +1 -1
  41. package/dist/auth-email-password/signup-token-store.d.ts +1 -1
  42. package/dist/auth-email-password/testing.d.ts +1 -1
  43. package/dist/auth-email-password/web/auth-gate.d.ts +1 -1
  44. package/dist/auth-email-password/web/client-plugin.d.ts +2 -2
  45. package/dist/auth-email-password/web/index.d.ts +42 -42
  46. package/dist/auth-email-password/web/session-bootstrap-error.d.ts +1 -1
  47. package/dist/auth-email-password/web/session.d.ts +1 -1
  48. package/dist/auth-email-password/web/signup-complete-screen.d.ts +1 -1
  49. package/dist/auth-foundation/feature.d.ts +2 -6
  50. package/dist/auth-foundation/feature.js +0 -2
  51. package/dist/auth-foundation/index.d.ts +3 -3
  52. package/dist/auth-foundation/index.js +1 -1
  53. package/dist/auth-foundation/resolve-anonymous-access.d.ts +1 -1
  54. package/dist/auth-mfa/env.d.ts +13 -0
  55. package/dist/auth-mfa/env.js +24 -0
  56. package/dist/auth-mfa/errors.d.ts +1 -1
  57. package/dist/auth-mfa/feature-exports.d.ts +12 -0
  58. package/dist/auth-mfa/feature-exports.js +72 -0
  59. package/dist/auth-mfa/feature.d.ts +6 -12
  60. package/dist/auth-mfa/feature.js +53 -70
  61. package/dist/auth-mfa/handlers/reencrypt.job.d.ts +1 -1
  62. package/dist/auth-mfa/index.d.ts +12 -9
  63. package/dist/auth-mfa/index.js +4 -2
  64. package/dist/auth-mfa/mfa-challenge-token.d.ts +1 -1
  65. package/dist/auth-mfa/mfa-preauth-setup-token.d.ts +1 -1
  66. package/dist/auth-mfa/mfa-status-checker.d.ts +1 -1
  67. package/dist/auth-mfa/mfa-verify-attempts.d.ts +1 -1
  68. package/dist/auth-mfa/testing.d.ts +1 -1
  69. package/dist/auth-mfa/token-secrets.d.ts +7 -0
  70. package/dist/auth-mfa/token-secrets.js +13 -0
  71. package/dist/auth-mfa/verify-factor.d.ts +1 -1
  72. package/dist/auth-mfa/web/index.d.ts +15 -15
  73. package/dist/auth-mfa/web/mfa-client.d.ts +1 -1
  74. package/dist/auth-mfa-user-data/index.d.ts +0 -4
  75. package/dist/auth-mfa-user-data/index.js +0 -2
  76. package/dist/billing-foundation/checkout-core.d.ts +2 -2
  77. package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +2 -2
  78. package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +1 -1
  79. package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
  80. package/dist/billing-foundation/consumer-protection/issue-confirmation.d.ts +1 -1
  81. package/dist/billing-foundation/consumer-protection/register-consent.d.ts +1 -1
  82. package/dist/billing-foundation/consumer-protection/register-termination.d.ts +1 -1
  83. package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +3 -3
  84. package/dist/billing-foundation/consumer-protection/termination-notify.d.ts +5 -5
  85. package/dist/billing-foundation/consumer-protection/termination-pages.d.ts +2 -2
  86. package/dist/billing-foundation/consumer-protection/termination-record.d.ts +3 -3
  87. package/dist/billing-foundation/consumer-protection/termination-request.d.ts +2 -2
  88. package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +2 -2
  89. package/dist/billing-foundation/feature.d.ts +1 -3
  90. package/dist/billing-foundation/feature.js +0 -2
  91. package/dist/billing-foundation/handlers/billing-plans.query.d.ts +1 -1
  92. package/dist/billing-foundation/handlers/create-checkout-session.write.d.ts +1 -1
  93. package/dist/billing-foundation/handlers/create-portal-session.write.d.ts +1 -1
  94. package/dist/billing-foundation/handlers/start-plan-checkout.write.d.ts +1 -1
  95. package/dist/billing-foundation/handlers/switch-plan.write.d.ts +1 -1
  96. package/dist/billing-foundation/index.d.ts +16 -16
  97. package/dist/billing-foundation/index.js +1 -1
  98. package/dist/billing-foundation/plan-catalog.d.ts +1 -1
  99. package/dist/billing-foundation/subscription-tier-sync.d.ts +3 -1
  100. package/dist/billing-foundation/subscription-tier-sync.js +3 -2
  101. package/dist/billing-foundation/types.d.ts +3 -3
  102. package/dist/billing-foundation/validate-options.d.ts +1 -1
  103. package/dist/billing-foundation/web/checkout-consent-dialog.d.ts +1 -1
  104. package/dist/billing-foundation/web/index.d.ts +6 -6
  105. package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +4 -4
  106. package/dist/cap-counter/cap-reservation.d.ts +1 -1
  107. package/dist/cap-counter/enforce-cap.d.ts +1 -1
  108. package/dist/cap-counter/feature.d.ts +0 -4
  109. package/dist/cap-counter/feature.js +0 -2
  110. package/dist/cap-counter/index.d.ts +13 -13
  111. package/dist/cap-counter/index.js +1 -1
  112. package/dist/cap-counter/value-cap-guard.d.ts +1 -1
  113. package/dist/cap-counter/with-cap-enforcement.d.ts +1 -1
  114. package/dist/cap-overview/feature.d.ts +1 -1
  115. package/dist/cap-overview/handlers/caps-usage.query.d.ts +1 -1
  116. package/dist/cap-overview/handlers/tenant-caps-list.query.d.ts +1 -1
  117. package/dist/cap-overview/index.d.ts +6 -6
  118. package/dist/cap-overview/screens.d.ts +1 -1
  119. package/dist/cap-overview/types.d.ts +1 -1
  120. package/dist/cap-overview/usage-math.d.ts +1 -1
  121. package/dist/cap-overview/web/cap-usage-bar.d.ts +1 -1
  122. package/dist/cap-overview/web/index.d.ts +4 -4
  123. package/dist/channel-discord/discord-channel.d.ts +1 -1
  124. package/dist/channel-discord/feature.d.ts +1 -1
  125. package/dist/channel-discord/index.d.ts +2 -2
  126. package/dist/channel-email/email-channel.d.ts +2 -2
  127. package/dist/channel-email/env.d.ts +14 -0
  128. package/dist/channel-email/env.js +27 -0
  129. package/dist/channel-email/feature.d.ts +14 -3
  130. package/dist/channel-email/feature.js +5 -1
  131. package/dist/channel-email/index.d.ts +6 -5
  132. package/dist/channel-email/index.js +1 -0
  133. package/dist/channel-email/pii-guard.d.ts +1 -1
  134. package/dist/channel-email/smtp-transport.d.ts +1 -1
  135. package/dist/channel-email/types.d.ts +1 -1
  136. package/dist/channel-in-app/in-app-channel.d.ts +1 -1
  137. package/dist/channel-in-app/index.d.ts +4 -4
  138. package/dist/channel-push/feature.d.ts +1 -1
  139. package/dist/channel-push/index.d.ts +3 -3
  140. package/dist/channel-push/push-channel.d.ts +2 -2
  141. package/dist/channel-slack/feature.d.ts +1 -1
  142. package/dist/channel-slack/index.d.ts +2 -2
  143. package/dist/channel-slack/slack-channel.d.ts +1 -1
  144. package/dist/channel-teams/feature.d.ts +1 -1
  145. package/dist/channel-teams/index.d.ts +2 -2
  146. package/dist/channel-teams/teams-channel.d.ts +1 -1
  147. package/dist/channel-telegram/feature.d.ts +1 -1
  148. package/dist/channel-telegram/index.d.ts +2 -2
  149. package/dist/channel-telegram/telegram-channel.d.ts +1 -1
  150. package/dist/compliance-profiles/feature.d.ts +1 -1
  151. package/dist/compliance-profiles/index.d.ts +3 -3
  152. package/dist/compliance-profiles/web/index.d.ts +2 -2
  153. package/dist/compliance-profiles-ops/index.d.ts +0 -8
  154. package/dist/compliance-profiles-ops/index.js +0 -2
  155. package/dist/config/feature.d.ts +1 -1
  156. package/dist/config/handlers/reencrypt.job.d.ts +1 -1
  157. package/dist/config/index.d.ts +8 -8
  158. package/dist/config/web/client-plugin.d.ts +1 -1
  159. package/dist/config/web/index.d.ts +2 -2
  160. package/dist/crypto-shredding/env/index.d.ts +21 -0
  161. package/dist/crypto-shredding/env/index.js +78 -0
  162. package/dist/crypto-shredding/feature.d.ts +17 -2
  163. package/dist/crypto-shredding/feature.js +5 -1
  164. package/dist/crypto-shredding/index.d.ts +4 -3
  165. package/dist/crypto-shredding/index.js +1 -0
  166. package/dist/custom-fields/feature.d.ts +0 -17
  167. package/dist/custom-fields/feature.js +0 -2
  168. package/dist/custom-fields/index.d.ts +10 -10
  169. package/dist/custom-fields/index.js +1 -1
  170. package/dist/custom-fields/lib/define-or-resurrect.d.ts +2 -2
  171. package/dist/custom-fields/lib/field-access.d.ts +1 -1
  172. package/dist/custom-fields/lib/field-definition-row.d.ts +1 -1
  173. package/dist/custom-fields/lib/quota.d.ts +1 -1
  174. package/dist/custom-fields/web/index.d.ts +3 -3
  175. package/dist/data-retention/_internal/parse-override.d.ts +1 -1
  176. package/dist/data-retention/feature.d.ts +7 -7
  177. package/dist/data-retention/handlers/policy-for.query.d.ts +1 -1
  178. package/dist/data-retention/index.d.ts +3 -3
  179. package/dist/data-retention/resolve-for-tenant.d.ts +2 -2
  180. package/dist/data-retention/resolve-tenant-preset.d.ts +1 -1
  181. package/dist/data-retention/resolver.d.ts +1 -1
  182. package/dist/data-retention/run-retention-cleanup.d.ts +2 -2
  183. package/dist/delivery/attachment-ref.d.ts +1 -1
  184. package/dist/delivery/attempt-log.d.ts +1 -1
  185. package/dist/delivery/channel-context.d.ts +2 -2
  186. package/dist/delivery/chat-webhook-channel.d.ts +2 -2
  187. package/dist/delivery/constants.d.ts +1 -1
  188. package/dist/delivery/delivery-service.d.ts +2 -2
  189. package/dist/delivery/feature.js +2 -0
  190. package/dist/delivery/handlers/log.query.d.ts +1 -1
  191. package/dist/delivery/handlers/unsubscribe-page-chrome.query.d.ts +5 -0
  192. package/dist/delivery/handlers/unsubscribe-page-chrome.query.js +44 -0
  193. package/dist/delivery/index.d.ts +20 -20
  194. package/dist/delivery/notify-factory.d.ts +1 -1
  195. package/dist/delivery/public-names.d.ts +1 -0
  196. package/dist/delivery/public-names.js +1 -0
  197. package/dist/delivery/testing.d.ts +3 -3
  198. package/dist/delivery/types.d.ts +3 -3
  199. package/dist/delivery/unsubscribe-link.d.ts +1 -1
  200. package/dist/delivery/unsubscribe-page-strings.d.ts +4 -0
  201. package/dist/delivery/unsubscribe-page-strings.js +4 -0
  202. package/dist/delivery/unsubscribe-page.d.ts +27 -0
  203. package/dist/delivery/unsubscribe-page.js +192 -0
  204. package/dist/delivery/unsubscribe.d.ts +11 -3
  205. package/dist/delivery/unsubscribe.js +146 -64
  206. package/dist/delivery/web/index.d.ts +2 -2
  207. package/dist/derivatives-sharp/feature.d.ts +0 -4
  208. package/dist/derivatives-sharp/feature.js +0 -2
  209. package/dist/derivatives-sharp/index.d.ts +2 -2
  210. package/dist/derivatives-sharp/index.js +1 -1
  211. package/dist/document-ingest-foundation/feature.d.ts +0 -7
  212. package/dist/document-ingest-foundation/feature.js +0 -2
  213. package/dist/document-ingest-foundation/index.d.ts +7 -7
  214. package/dist/document-ingest-foundation/index.js +1 -1
  215. package/dist/document-ingest-foundation/pages.d.ts +1 -1
  216. package/dist/document-ingest-foundation/providers.d.ts +1 -1
  217. package/dist/document-ingest-foundation/write-document-extract.d.ts +1 -1
  218. package/dist/feature-toggles/compose-tier-resolver.d.ts +1 -1
  219. package/dist/feature-toggles/feature.d.ts +5 -5
  220. package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
  221. package/dist/feature-toggles/index.d.ts +3 -3
  222. package/dist/feature-toggles/toggle-sync-signal.d.ts +1 -1
  223. package/dist/feature-toggles/web/index.d.ts +1 -1
  224. package/dist/file-derivatives/feature.d.ts +0 -2
  225. package/dist/file-derivatives/feature.js +0 -2
  226. package/dist/file-derivatives/index.d.ts +4 -4
  227. package/dist/file-derivatives/index.js +1 -1
  228. package/dist/file-foundation/feature.d.ts +0 -6
  229. package/dist/file-foundation/feature.js +0 -2
  230. package/dist/file-foundation/index.d.ts +2 -2
  231. package/dist/file-foundation/index.js +1 -1
  232. package/dist/file-provider-inmemory/feature.d.ts +0 -4
  233. package/dist/file-provider-inmemory/feature.js +0 -2
  234. package/dist/file-provider-inmemory/index.d.ts +1 -1
  235. package/dist/file-provider-inmemory/index.js +1 -1
  236. package/dist/file-provider-s3/env-feature.d.ts +12 -2
  237. package/dist/file-provider-s3/env-feature.js +9 -6
  238. package/dist/file-provider-s3/env-schema.d.ts +38 -0
  239. package/dist/file-provider-s3/env-schema.js +51 -0
  240. package/dist/file-provider-s3/feature.d.ts +1 -14
  241. package/dist/file-provider-s3/feature.js +0 -2
  242. package/dist/file-provider-s3/index.d.ts +2 -1
  243. package/dist/file-provider-s3/index.js +2 -1
  244. package/dist/file-provider-s3/lib/env-helper.d.ts +1 -1
  245. package/dist/file-provider-s3/lib/index.d.ts +3 -3
  246. package/dist/files/index.d.ts +1 -1
  247. package/dist/files-tenant-data/index.d.ts +2 -2
  248. package/dist/folders/feature.d.ts +0 -4
  249. package/dist/folders/feature.js +0 -2
  250. package/dist/folders/index.d.ts +7 -7
  251. package/dist/folders/index.js +1 -1
  252. package/dist/folders/web/folder-manager.d.ts +1 -1
  253. package/dist/folders/web/index.d.ts +5 -5
  254. package/dist/folders-user-data/index.d.ts +0 -4
  255. package/dist/folders-user-data/index.js +0 -2
  256. package/dist/form-draft/db/queries/cleanup.d.ts +1 -1
  257. package/dist/form-draft/feature.d.ts +0 -4
  258. package/dist/form-draft/feature.js +0 -2
  259. package/dist/form-draft/handlers/cleanup.job.d.ts +1 -1
  260. package/dist/form-draft/handlers/get.query.d.ts +1 -1
  261. package/dist/form-draft/index.d.ts +10 -10
  262. package/dist/form-draft/index.js +1 -1
  263. package/dist/form-draft/lookup.d.ts +1 -1
  264. package/dist/form-draft/release-file-refs.d.ts +1 -1
  265. package/dist/form-draft-user-data/index.d.ts +0 -4
  266. package/dist/form-draft-user-data/index.js +0 -2
  267. package/dist/foundation-shared/build-info-env.d.ts +7 -0
  268. package/dist/foundation-shared/build-info-env.js +15 -0
  269. package/dist/foundation-shared/demo-admin-env.d.ts +12 -0
  270. package/dist/foundation-shared/demo-admin-env.js +21 -0
  271. package/dist/foundation-shared/index.d.ts +5 -3
  272. package/dist/foundation-shared/index.js +2 -0
  273. package/dist/host-routing/constants.d.ts +8 -0
  274. package/dist/host-routing/constants.js +19 -0
  275. package/dist/host-routing/dispatch.d.ts +24 -0
  276. package/dist/host-routing/dispatch.js +102 -0
  277. package/dist/host-routing/feature.d.ts +3 -0
  278. package/dist/host-routing/feature.js +102 -0
  279. package/dist/host-routing/host.d.ts +14 -0
  280. package/dist/host-routing/host.js +37 -0
  281. package/dist/host-routing/index.d.ts +5 -0
  282. package/dist/host-routing/index.js +4 -0
  283. package/dist/host-routing/options.d.ts +27 -0
  284. package/dist/host-routing/options.js +1 -0
  285. package/dist/host-routing/validate-options.d.ts +2 -0
  286. package/dist/host-routing/validate-options.js +29 -0
  287. package/dist/inbound-mail-foundation/connect-routes.d.ts +2 -2
  288. package/dist/inbound-mail-foundation/feature.d.ts +0 -4
  289. package/dist/inbound-mail-foundation/feature.js +0 -2
  290. package/dist/inbound-mail-foundation/handlers/account-state.d.ts +1 -1
  291. package/dist/inbound-mail-foundation/index.d.ts +12 -12
  292. package/dist/inbound-mail-foundation/index.js +1 -1
  293. package/dist/inbound-mail-foundation/oauth-access-token.d.ts +1 -1
  294. package/dist/inbound-mail-foundation/provider-factory.d.ts +1 -1
  295. package/dist/inbound-mail-foundation/types.d.ts +1 -1
  296. package/dist/inbound-mail-foundation/watch-supervisor.d.ts +2 -2
  297. package/dist/inbound-provider-imap/feature.d.ts +1 -5
  298. package/dist/inbound-provider-imap/feature.js +0 -2
  299. package/dist/inbound-provider-imap/imap-client.d.ts +1 -1
  300. package/dist/inbound-provider-imap/index.d.ts +3 -3
  301. package/dist/inbound-provider-imap/index.js +1 -1
  302. package/dist/inbound-provider-inmemory/feature.d.ts +0 -4
  303. package/dist/inbound-provider-inmemory/feature.js +0 -2
  304. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  305. package/dist/inbound-provider-inmemory/index.js +1 -1
  306. package/dist/jobs/handlers/tenant-runs.query.d.ts +1 -1
  307. package/dist/jobs/index.d.ts +9 -9
  308. package/dist/jobs/web/index.d.ts +1 -1
  309. package/dist/ledger/feature.d.ts +0 -4
  310. package/dist/ledger/feature.js +0 -2
  311. package/dist/ledger/index.d.ts +10 -10
  312. package/dist/ledger/index.js +1 -1
  313. package/dist/ledger/recurring.d.ts +2 -2
  314. package/dist/ledger/reports.d.ts +2 -2
  315. package/dist/ledger/web/index.d.ts +3 -3
  316. package/dist/legal-pages/constants.d.ts +12 -0
  317. package/dist/legal-pages/constants.js +16 -0
  318. package/dist/legal-pages/feature.d.ts +6 -3
  319. package/dist/legal-pages/feature.js +5 -2
  320. package/dist/legal-pages/index.d.ts +5 -3
  321. package/dist/legal-pages/index.js +3 -1
  322. package/dist/legal-pages/layout.d.ts +10 -0
  323. package/dist/legal-pages/layout.js +32 -0
  324. package/dist/legal-pages/lib/boot-check.d.ts +1 -1
  325. package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
  326. package/dist/legal-pages/markdown.d.ts +2 -2
  327. package/dist/legal-pages/seed.d.ts +12 -0
  328. package/dist/legal-pages/seed.js +38 -0
  329. package/dist/legal-pages/web/index.d.ts +1 -1
  330. package/dist/mail-foundation/feature.d.ts +0 -7
  331. package/dist/mail-foundation/feature.js +0 -2
  332. package/dist/mail-foundation/index.d.ts +1 -1
  333. package/dist/mail-foundation/index.js +1 -1
  334. package/dist/mail-transport-inmemory/feature.d.ts +0 -4
  335. package/dist/mail-transport-inmemory/feature.js +0 -2
  336. package/dist/mail-transport-inmemory/index.d.ts +1 -1
  337. package/dist/mail-transport-inmemory/index.js +1 -1
  338. package/dist/mail-transport-smtp/feature.d.ts +0 -16
  339. package/dist/mail-transport-smtp/feature.js +0 -2
  340. package/dist/mail-transport-smtp/index.d.ts +1 -1
  341. package/dist/mail-transport-smtp/index.js +1 -1
  342. package/dist/managed-pages/branding.d.ts +1 -1
  343. package/dist/managed-pages/feature.d.ts +1 -1
  344. package/dist/managed-pages/handlers/branding.query.d.ts +1 -1
  345. package/dist/managed-pages/index.d.ts +5 -5
  346. package/dist/managed-pages/web/index.d.ts +2 -2
  347. package/dist/metrics/compute.d.ts +2 -2
  348. package/dist/metrics/default-metrics.d.ts +9 -9
  349. package/dist/metrics/feature.d.ts +1 -1
  350. package/dist/metrics/filters.d.ts +1 -1
  351. package/dist/metrics/index.d.ts +5 -5
  352. package/dist/metrics/types.d.ts +1 -1
  353. package/dist/metrics/validate.d.ts +1 -1
  354. package/dist/metrics/window.d.ts +2 -2
  355. package/dist/notes-history/feature.d.ts +0 -4
  356. package/dist/notes-history/feature.js +0 -2
  357. package/dist/notes-history/handlers/add-note.write.d.ts +1 -1
  358. package/dist/notes-history/index.d.ts +6 -6
  359. package/dist/notes-history/index.js +1 -1
  360. package/dist/notes-history/web/index.d.ts +3 -3
  361. package/dist/notes-history-user-data/index.d.ts +1 -5
  362. package/dist/notes-history-user-data/index.js +0 -2
  363. package/dist/page-render/index.d.ts +7 -7
  364. package/dist/page-render/layout.d.ts +1 -1
  365. package/dist/page-render/web.d.ts +5 -5
  366. package/dist/personal-access-tokens/feature.d.ts +3 -3
  367. package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
  368. package/dist/personal-access-tokens/i18n.d.ts +1 -1
  369. package/dist/personal-access-tokens/index.d.ts +13 -13
  370. package/dist/personal-access-tokens/resolver.d.ts +1 -1
  371. package/dist/personal-access-tokens/screens.d.ts +1 -1
  372. package/dist/presets/dsgvo-self-service.d.ts +3 -1
  373. package/dist/presets/dsgvo-self-service.js +2 -0
  374. package/dist/presets/index.d.ts +2 -2
  375. package/dist/presets/security-baseline.d.ts +2 -0
  376. package/dist/presets/security-baseline.js +2 -0
  377. package/dist/rate-limiting/index.d.ts +2 -2
  378. package/dist/readiness/feature.d.ts +0 -8
  379. package/dist/readiness/feature.js +0 -2
  380. package/dist/readiness/index.d.ts +3 -3
  381. package/dist/readiness/index.js +1 -1
  382. package/dist/renderer-foundation/api.d.ts +2 -2
  383. package/dist/renderer-foundation/constants.d.ts +2 -2
  384. package/dist/renderer-foundation/feature.d.ts +1 -1
  385. package/dist/renderer-foundation/index.d.ts +5 -5
  386. package/dist/renderer-foundation/types.d.ts +24 -2
  387. package/dist/renderer-pdf/feature.d.ts +1 -1
  388. package/dist/renderer-pdf/index.d.ts +2 -2
  389. package/dist/renderer-pdf/render-table-pdf.d.ts +1 -1
  390. package/dist/secrets/constants.d.ts +7 -0
  391. package/dist/secrets/constants.js +7 -0
  392. package/dist/secrets/db/queries/read.d.ts +1 -1
  393. package/dist/secrets/feature.d.ts +4 -3
  394. package/dist/secrets/feature.js +4 -2
  395. package/dist/secrets/handlers/delete.write.js +2 -2
  396. package/dist/secrets/handlers/rotate.job.d.ts +1 -1
  397. package/dist/secrets/handlers/set.write.js +2 -2
  398. package/dist/secrets/index.d.ts +7 -7
  399. package/dist/secrets/index.js +1 -1
  400. package/dist/secrets/secrets-context.d.ts +1 -1
  401. package/dist/seo/feature.d.ts +3 -3
  402. package/dist/seo/index.d.ts +6 -6
  403. package/dist/sessions/feature.d.ts +1 -1
  404. package/dist/sessions/index.d.ts +8 -8
  405. package/dist/sessions/session-callbacks.d.ts +1 -1
  406. package/dist/sessions/testing.d.ts +1 -1
  407. package/dist/shared/index.d.ts +31 -31
  408. package/dist/step-dispatcher/dispatch-payload.d.ts +2 -2
  409. package/dist/step-dispatcher/index.d.ts +3 -3
  410. package/dist/subscription-mollie/feature.d.ts +2 -2
  411. package/dist/subscription-mollie/index.d.ts +3 -3
  412. package/dist/subscription-mollie/verify-webhook.d.ts +1 -1
  413. package/dist/subscription-stripe/feature.d.ts +17 -1
  414. package/dist/subscription-stripe/feature.js +19 -1
  415. package/dist/subscription-stripe/index.d.ts +2 -2
  416. package/dist/subscription-stripe/index.js +1 -1
  417. package/dist/subscription-stripe/plugin-methods.d.ts +1 -1
  418. package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
  419. package/dist/tags/feature.d.ts +0 -4
  420. package/dist/tags/feature.js +0 -2
  421. package/dist/tags/handlers/assign-tag.write.d.ts +1 -1
  422. package/dist/tags/handlers/remove-tag.write.d.ts +1 -1
  423. package/dist/tags/index.d.ts +11 -11
  424. package/dist/tags/index.js +1 -1
  425. package/dist/tags/web/index.d.ts +9 -9
  426. package/dist/template-resolver/api.d.ts +4 -4
  427. package/dist/template-resolver/constants.d.ts +1 -1
  428. package/dist/template-resolver/document-sanitizer.d.ts +1 -1
  429. package/dist/template-resolver/handlers/bundle-import.d.ts +3 -3
  430. package/dist/template-resolver/handlers/collection-shared.d.ts +2 -2
  431. package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
  432. package/dist/template-resolver/handlers/diff-to-system.query.d.ts +1 -1
  433. package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -1
  434. package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
  435. package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
  436. package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
  437. package/dist/template-resolver/handlers/override-diff.d.ts +2 -2
  438. package/dist/template-resolver/handlers/overview.query.d.ts +3 -3
  439. package/dist/template-resolver/handlers/preview.query.d.ts +1 -1
  440. package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
  441. package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
  442. package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
  443. package/dist/template-resolver/handlers/shared.d.ts +1 -1
  444. package/dist/template-resolver/handlers/template-gates.d.ts +4 -4
  445. package/dist/template-resolver/handlers/template-write.d.ts +4 -4
  446. package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +1 -1
  447. package/dist/template-resolver/handlers/toggle-status.write.d.ts +1 -1
  448. package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
  449. package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
  450. package/dist/template-resolver/handlers/usage.query.d.ts +1 -1
  451. package/dist/template-resolver/handlers/validate.query.d.ts +3 -3
  452. package/dist/template-resolver/index.d.ts +25 -25
  453. package/dist/template-resolver/layout-appearance.d.ts +1 -1
  454. package/dist/template-resolver/layout-regions.d.ts +2 -2
  455. package/dist/template-resolver/linked-resources.d.ts +1 -1
  456. package/dist/template-resolver/preview-display-html.d.ts +1 -1
  457. package/dist/template-resolver/resource-image.d.ts +1 -1
  458. package/dist/template-resolver/seeding.d.ts +2 -2
  459. package/dist/template-resolver/store-template-resource.d.ts +1 -1
  460. package/dist/template-resolver/template-draft.d.ts +2 -2
  461. package/dist/template-resolver/template-meta.d.ts +2 -2
  462. package/dist/template-resolver/template-preview.d.ts +7 -6
  463. package/dist/template-resolver/template-preview.js +19 -12
  464. package/dist/template-resolver/template-resources.d.ts +1 -1
  465. package/dist/template-resolver/template-usage.d.ts +3 -1
  466. package/dist/template-resolver/template-usage.js +1 -0
  467. package/dist/template-resolver/template-validation.d.ts +1 -1
  468. package/dist/template-resolver/testing.d.ts +1 -1
  469. package/dist/template-resolver/user-content-table.d.ts +1 -1
  470. package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -1
  471. package/dist/template-resolver/web/document-editor-extensions.js +6 -2
  472. package/dist/template-resolver/web/document-editor.d.ts +1 -1
  473. package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
  474. package/dist/template-resolver/web/document-tiptap-editor.js +13 -10
  475. package/dist/template-resolver/web/editor-handle.d.ts +1 -1
  476. package/dist/template-resolver/web/index.d.ts +7 -7
  477. package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +2 -2
  478. package/dist/template-resolver/web/placeholder-line-editor.d.ts +1 -1
  479. package/dist/template-resolver-user-data/index.d.ts +0 -4
  480. package/dist/template-resolver-user-data/index.js +0 -2
  481. package/dist/tenant/feature.d.ts +1 -1
  482. package/dist/tenant/index.d.ts +10 -10
  483. package/dist/tenant/is-tenant-serving-public-content.d.ts +1 -1
  484. package/dist/tenant/testing.d.ts +1 -1
  485. package/dist/tenant/web/index.d.ts +3 -3
  486. package/dist/tenant-handover/feature.d.ts +1 -1
  487. package/dist/tenant-handover/index.d.ts +3 -3
  488. package/dist/tenant-handover/signup-handover-provider.d.ts +1 -1
  489. package/dist/tenant-lifecycle/feature.d.ts +2 -2
  490. package/dist/tenant-lifecycle/index.d.ts +3 -3
  491. package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +1 -1
  492. package/dist/tenant-lifecycle/stages.d.ts +1 -1
  493. package/dist/tenant-lifecycle/testing.d.ts +1 -1
  494. package/dist/tenant-settings/feature.d.ts +1 -3
  495. package/dist/tenant-settings/feature.js +0 -2
  496. package/dist/tenant-settings/index.d.ts +4 -4
  497. package/dist/tenant-settings/index.js +1 -1
  498. package/dist/tier-engine/entity.d.ts +1 -1
  499. package/dist/tier-engine/feature.d.ts +2 -4
  500. package/dist/tier-engine/feature.js +0 -2
  501. package/dist/tier-engine/handlers/get-tenant-tier.query.d.ts +1 -1
  502. package/dist/tier-engine/i18n.d.ts +0 -2
  503. package/dist/tier-engine/i18n.js +4 -4
  504. package/dist/tier-engine/index.d.ts +8 -8
  505. package/dist/tier-engine/index.js +1 -1
  506. package/dist/tier-engine/tier-option-gate.d.ts +1 -1
  507. package/dist/tier-engine/tier-resolver.d.ts +1 -1
  508. package/dist/tier-engine/web/client-plugin.js +3 -2
  509. package/dist/tier-engine/web/index.d.ts +1 -1
  510. package/dist/user/index.d.ts +8 -8
  511. package/dist/user/invited-global-roles.d.ts +1 -1
  512. package/dist/user/principal-status.d.ts +1 -1
  513. package/dist/user/seeding.d.ts +1 -1
  514. package/dist/user/testing.d.ts +1 -1
  515. package/dist/user-data-rights/deletion-token.d.ts +1 -1
  516. package/dist/user-data-rights/feature.d.ts +5 -5
  517. package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
  518. package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +3 -3
  519. package/dist/user-data-rights/index.d.ts +13 -13
  520. package/dist/user-data-rights/lib/default-mailers.d.ts +4 -4
  521. package/dist/user-data-rights/web/client-plugin.d.ts +1 -1
  522. package/dist/user-data-rights/web/index.d.ts +8 -8
  523. package/dist/user-data-rights-defaults/index.d.ts +11 -11
  524. package/dist/user-profile/index.d.ts +2 -2
  525. package/dist/user-profile/web/index.d.ts +2 -2
  526. package/dist/waitlist/constants.d.ts +9 -0
  527. package/dist/waitlist/constants.js +11 -0
  528. package/dist/waitlist/entity.d.ts +38 -6
  529. package/dist/waitlist/entity.js +4 -2
  530. package/dist/waitlist/entries-admin.d.ts +4 -0
  531. package/dist/waitlist/entries-admin.js +42 -0
  532. package/dist/waitlist/feature.d.ts +1 -1
  533. package/dist/waitlist/feature.js +16 -1
  534. package/dist/waitlist/handlers/export-purge.write.d.ts +12 -0
  535. package/dist/waitlist/handlers/export-purge.write.js +61 -0
  536. package/dist/waitlist/handlers/invite.write.d.ts +1 -1
  537. package/dist/waitlist/handlers/submit.write.d.ts +1 -1
  538. package/dist/waitlist/i18n.js +4 -0
  539. package/dist/waitlist/import.d.ts +24 -0
  540. package/dist/waitlist/import.js +51 -0
  541. package/dist/waitlist/index.d.ts +7 -5
  542. package/dist/waitlist/index.js +2 -0
  543. package/dist/waitlist/legacy-migrate.d.ts +27 -0
  544. package/dist/waitlist/legacy-migrate.js +173 -0
  545. package/dist/waitlist/lib.d.ts +2 -2
  546. package/dist/waitlist/link-on-signup.d.ts +3 -0
  547. package/dist/waitlist/link-on-signup.js +83 -0
  548. package/dist/waitlist/options.d.ts +11 -3
  549. package/dist/waitlist/payloads.d.ts +3 -0
  550. package/dist/waitlist/payloads.js +1 -0
  551. package/dist/workflow-runner/feature.d.ts +0 -4
  552. package/dist/workflow-runner/feature.js +0 -2
  553. package/dist/workflow-runner/index.d.ts +4 -4
  554. package/dist/workflow-runner/index.js +1 -1
  555. package/package.json +43 -27
  556. package/src/account-security/changes.json +8 -0
  557. package/src/auth-email-password/changes.json +6 -0
  558. package/src/auth-foundation/changes.json +8 -0
  559. package/src/auth-mfa/changes.json +6 -0
  560. package/src/auth-mfa-user-data/changes.json +10 -1
  561. package/src/billing-foundation/changes.json +8 -0
  562. package/src/cap-counter/changes.json +8 -0
  563. package/src/channel-email/changes.json +6 -0
  564. package/src/compliance-profiles-ops/changes.json +10 -0
  565. package/src/crypto-shredding/changes.json +6 -0
  566. package/src/custom-fields/changes.json +8 -0
  567. package/src/delivery/changes.json +6 -0
  568. package/src/derivatives-sharp/changes.json +8 -0
  569. package/src/document-ingest-foundation/changes.json +8 -0
  570. package/src/file-derivatives/changes.json +8 -0
  571. package/src/file-foundation/changes.json +8 -0
  572. package/src/file-provider-inmemory/changes.json +10 -1
  573. package/src/file-provider-s3/changes.json +22 -0
  574. package/src/folders/changes.json +8 -0
  575. package/src/folders-user-data/changes.json +10 -1
  576. package/src/form-draft/changes.json +8 -0
  577. package/src/form-draft-user-data/changes.json +10 -1
  578. package/src/foundation-shared/changes.json +8 -1
  579. package/src/host-routing/changes.json +8 -0
  580. package/src/inbound-mail-foundation/changes.json +8 -0
  581. package/src/inbound-provider-imap/changes.json +8 -0
  582. package/src/inbound-provider-inmemory/changes.json +10 -1
  583. package/src/ledger/changes.json +8 -0
  584. package/src/legal-pages/changes.json +6 -0
  585. package/src/mail-foundation/changes.json +10 -1
  586. package/src/mail-transport-inmemory/changes.json +10 -1
  587. package/src/mail-transport-smtp/changes.json +8 -0
  588. package/src/notes-history/changes.json +8 -0
  589. package/src/notes-history-user-data/changes.json +8 -0
  590. package/src/presets/changes.json +6 -0
  591. package/src/readiness/changes.json +10 -1
  592. package/src/secrets/changes.json +12 -0
  593. package/src/subscription-stripe/changes.json +6 -0
  594. package/src/tags/changes.json +8 -0
  595. package/src/template-resolver/changes.json +6 -0
  596. package/src/template-resolver-user-data/changes.json +10 -0
  597. package/src/tenant-settings/changes.json +10 -1
  598. package/src/tier-engine/changes.json +8 -0
  599. package/src/waitlist/changes.json +7 -0
  600. package/src/workflow-runner/changes.json +8 -0
  601. package/dist/file-provider-s3-env/index.d.ts +0 -8
  602. package/dist/file-provider-s3-env/index.js +0 -7
  603. package/dist/files-provider-s3/index.d.ts +0 -5
  604. package/dist/files-provider-s3/index.js +0 -5
  605. package/src/file-provider-s3-env/changes.json +0 -1
  606. package/src/files-provider-s3/changes.json +0 -1
@@ -0,0 +1,102 @@
1
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
2
+ import { defineFeature, defineQueryHandler, isSystemTenant, } from "@cosmicdrift/kumiko-framework/engine";
3
+ import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
4
+ import * as z from "zod";
5
+ import { EXT_TENANT_EXISTENCE, EXT_TENANT_RESOLVER, } from "../auth-foundation/index.js";
6
+ import { isTenantServingPublicContent, tenantTable, } from "../tenant/index.js";
7
+ import { HOST_ROUTING_FEATURE, TENANT_KEY_MAX_LENGTH } from "./constants.js";
8
+ import { classifyHost } from "./host.js";
9
+ import { validateHostRoutingOptions } from "./validate-options.js";
10
+ // Disabled tenants and tenants in any destroy phase are not routable, the same
11
+ // rule public files and pages follow.
12
+ async function servingTenantIdByKey(db, key) {
13
+ const row = await fetchOne(db, tenantTable, { key });
14
+ return row !== undefined && isTenantServingPublicContent(row) ? row.id : null;
15
+ }
16
+ async function isTenantServing(db, id) {
17
+ const row = await fetchOne(db, tenantTable, { id });
18
+ return row !== undefined && isTenantServingPublicContent(row);
19
+ }
20
+ // auth-foundation types the Hono context as unknown to stay free of a hono dep.
21
+ function isHostHeaderReader(c) {
22
+ return (typeof c === "object" &&
23
+ c !== null &&
24
+ "req" in c &&
25
+ typeof c.req === "object" &&
26
+ c.req !== null &&
27
+ "header" in c.req &&
28
+ typeof c.req.header === "function");
29
+ }
30
+ // Returns only { exists }: the same fact the tenant 404 page already makes
31
+ // public, never other tenant fields. Rate-limited so it is no cheap oracle.
32
+ const tenantKeyExistsQuery = defineQueryHandler({
33
+ name: "tenant-key-exists",
34
+ schema: z.object({ key: z.string().min(1).max(TENANT_KEY_MAX_LENGTH) }),
35
+ access: { roles: ["anonymous"] },
36
+ rateLimit: { per: "ip+handler", limit: 120, windowSeconds: 60 },
37
+ // Page-routing plumbing, not a task an agent performs.
38
+ agent: { expose: false },
39
+ description: "Anonymous existence check for a tenant key, backing the unknown-tenant 404 of the host-routing hostDispatch. Returns only { exists }.",
40
+ handler: async (query, ctx) => {
41
+ if (!ctx.systemDb) {
42
+ throw new InternalError({
43
+ message: "host-routing:query:tenant-key-exists requires ctx.systemDb (r.systemScope())",
44
+ });
45
+ }
46
+ const db = ctx.systemDb.acknowledgeCrossTenant("tenant-key existence check for the host-routing 404 — publicly observable via the 404 itself");
47
+ return { exists: (await servingTenantIdByKey(db, query.payload.key)) !== null };
48
+ },
49
+ });
50
+ function tenantResolverFor(options) {
51
+ const apexTenantId = options.apexAnonymousTenantId ?? null;
52
+ if (options.tenantBy === "host") {
53
+ return {
54
+ trust: "authoritative",
55
+ build: ({ db }) => async (c) => {
56
+ if (!isHostHeaderReader(c))
57
+ return null;
58
+ const host = classifyHost(c.req.header("Host") ?? "", options);
59
+ if (host.kind === "subdomain")
60
+ return servingTenantIdByKey(db, host.key);
61
+ // Fixed and unknown hosts have no anonymous tenant: an authoritative
62
+ // null answers tenant_required, whatever X-Tenant says.
63
+ return host.kind === "apex" ? apexTenantId : null;
64
+ },
65
+ };
66
+ }
67
+ if (apexTenantId === null)
68
+ return undefined;
69
+ // Path mode: the client names its tenant; the apex default only fills in
70
+ // when it does not.
71
+ return {
72
+ trust: "fallback-only",
73
+ build: () => async (c) => {
74
+ if (!isHostHeaderReader(c))
75
+ return null;
76
+ return classifyHost(c.req.header("Host") ?? "", options).kind === "apex"
77
+ ? apexTenantId
78
+ : null;
79
+ },
80
+ };
81
+ }
82
+ // Server half of host routing: the tenant for anonymous API requests comes
83
+ // from the Host header only (never from X-Tenant), and a client-named tenant
84
+ // must exist, be enabled and be active. The page half is createHostDispatch.
85
+ export function createHostRoutingFeature(options) {
86
+ validateHostRoutingOptions(options);
87
+ return defineFeature(HOST_ROUTING_FEATURE, (r) => {
88
+ r.describe("Host- and path-based tenant routing: an authoritative tenant resolver from the subdomain (tenantBy host), a tenant existence check against enabled, active tenants, and the tenant-key query behind createHostDispatch, which picks the HTML file, CSP, locale redirect or 404 per host for runProdApp's hostDispatch.");
89
+ r.requires({ features: ["auth-foundation", "tenant"] });
90
+ r.systemScope();
91
+ r.queryHandler(tenantKeyExistsQuery);
92
+ const resolver = tenantResolverFor(options);
93
+ if (resolver !== undefined) {
94
+ // biome-ignore lint/correctness/useHookAtTopLevel: r.useExtension is a registrar method, not a React hook; path mode without an apex tenant must leave the resolver slot free.
95
+ r.useExtension(EXT_TENANT_RESOLVER, "host", resolver);
96
+ }
97
+ const existence = {
98
+ build: ({ db }) => (tenantId) => isSystemTenant(tenantId) ? true : isTenantServing(db, tenantId),
99
+ };
100
+ r.useExtension(EXT_TENANT_EXISTENCE, "active-tenant", existence);
101
+ });
102
+ }
@@ -0,0 +1,14 @@
1
+ import type { HostRoutingOptions, HostRoutingSurface } from "./options.ts";
2
+ export declare function normalizeHostname(host: string): string | null;
3
+ export type HostClass = {
4
+ readonly kind: "fixed";
5
+ readonly surface: HostRoutingSurface;
6
+ } | {
7
+ readonly kind: "apex";
8
+ } | {
9
+ readonly kind: "subdomain";
10
+ readonly key: string;
11
+ } | {
12
+ readonly kind: "unknown";
13
+ };
14
+ export declare function classifyHost(host: string, options: HostRoutingOptions): HostClass;
@@ -0,0 +1,37 @@
1
+ import { isTenantKeyCandidate } from "./constants.js";
2
+ // Only plain DNS names (plus an optional port) are routable. Anything else,
3
+ // e.g. userinfo ("a@b"), IPv6 literals or stray characters, never matches a
4
+ // configured domain and must not reach URL parsing or a DB lookup.
5
+ const HOST_HEADER_PATTERN = /^[a-z0-9.-]+(?::[0-9]{1,5})?$/;
6
+ export function normalizeHostname(host) {
7
+ const lower = host.trim().toLowerCase();
8
+ if (!HOST_HEADER_PATTERN.test(lower))
9
+ return null;
10
+ const colon = lower.indexOf(":");
11
+ const hostname = colon === -1 ? lower : lower.slice(0, colon);
12
+ const withoutTrailingDot = hostname.endsWith(".") ? hostname.slice(0, -1) : hostname;
13
+ return withoutTrailingDot === "" ? null : withoutTrailingDot;
14
+ }
15
+ export function classifyHost(host, options) {
16
+ const hostname = normalizeHostname(host);
17
+ if (hostname === null)
18
+ return { kind: "unknown" };
19
+ // Own-property check: the Host header is attacker-controlled, and a plain
20
+ // "constructor" would otherwise resolve through Object.prototype.
21
+ const fixed = options.hosts !== undefined && Object.hasOwn(options.hosts, hostname)
22
+ ? options.hosts[hostname]
23
+ : undefined;
24
+ if (fixed !== undefined)
25
+ return { kind: "fixed", surface: fixed };
26
+ const baseDomain = options.baseDomain.toLowerCase();
27
+ if (hostname === baseDomain || hostname === `www.${baseDomain}`)
28
+ return { kind: "apex" };
29
+ const suffix = `.${baseDomain}`;
30
+ if (!hostname.endsWith(suffix))
31
+ return { kind: "unknown" };
32
+ const label = hostname.slice(0, -suffix.length);
33
+ // Exactly one label: "a.b.<baseDomain>" is not a tenant host.
34
+ if (!isTenantKeyCandidate(label))
35
+ return { kind: "unknown" };
36
+ return { kind: "subdomain", key: label };
37
+ }
@@ -0,0 +1,5 @@
1
+ export { HOST_ROUTING_FEATURE, HostRoutingQueries, isTenantKeyCandidate, TENANT_KEY_MAX_LENGTH, } from "./constants.ts";
2
+ export { createHostDispatch, type HostRoutingDispatchFn, type HostRoutingDispatchResult, type HostRoutingRequest, } from "./dispatch.ts";
3
+ export { createHostRoutingFeature } from "./feature.ts";
4
+ export { normalizeHostname } from "./host.ts";
5
+ export type { HostRoutingApexSurface, HostRoutingLocales, HostRoutingOptions, HostRoutingSurface, HostRoutingTenantMode, } from "./options.ts";
@@ -0,0 +1,4 @@
1
+ export { HOST_ROUTING_FEATURE, HostRoutingQueries, isTenantKeyCandidate, TENANT_KEY_MAX_LENGTH, } from "./constants.js";
2
+ export { createHostDispatch, } from "./dispatch.js";
3
+ export { createHostRoutingFeature } from "./feature.js";
4
+ export { normalizeHostname } from "./host.js";
@@ -0,0 +1,27 @@
1
+ import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
2
+ export type HostRoutingSurface = {
3
+ readonly file: string;
4
+ readonly csp?: string;
5
+ };
6
+ export type HostRoutingApexSurface = HostRoutingSurface & {
7
+ readonly localeFiles?: Readonly<Record<string, string>>;
8
+ };
9
+ export type HostRoutingLocales = {
10
+ readonly default: string;
11
+ readonly prefixed: readonly string[];
12
+ };
13
+ export type HostRoutingTenantMode = {
14
+ readonly tenantBy: "host";
15
+ } | {
16
+ readonly tenantBy: "path";
17
+ readonly tenantPathPrefix: string;
18
+ };
19
+ export type HostRoutingOptions = HostRoutingTenantMode & {
20
+ readonly baseDomain: string;
21
+ readonly apex: HostRoutingApexSurface;
22
+ readonly tenant: HostRoutingSurface;
23
+ readonly unknownTenant?: HostRoutingSurface;
24
+ readonly hosts?: Readonly<Record<string, HostRoutingSurface>>;
25
+ readonly locales?: HostRoutingLocales;
26
+ readonly apexAnonymousTenantId?: TenantId;
27
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { HostRoutingOptions } from "./options.ts";
2
+ export declare function validateHostRoutingOptions(options: HostRoutingOptions): void;
@@ -0,0 +1,29 @@
1
+ const DOMAIN_PATTERN = /^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/;
2
+ const PATH_PREFIX_PATTERN = /^\/[a-z0-9-]+(?:\/[a-z0-9-]+)*$/;
3
+ const LOCALE_PATTERN = /^[a-z]{2}(?:-[a-z]{2})?$/;
4
+ // Checked once when the app composes its features, so a config typo fails
5
+ // the boot instead of routing every request to a 404.
6
+ export function validateHostRoutingOptions(options) {
7
+ if (!DOMAIN_PATTERN.test(options.baseDomain)) {
8
+ throw new Error(`host-routing: baseDomain must be a lowercase hostname without port, got "${options.baseDomain}"`);
9
+ }
10
+ for (const host of Object.keys(options.hosts ?? {})) {
11
+ if (!DOMAIN_PATTERN.test(host)) {
12
+ throw new Error(`host-routing: hosts key must be a lowercase hostname, got "${host}"`);
13
+ }
14
+ }
15
+ if (options.tenantBy === "path" && !PATH_PREFIX_PATTERN.test(options.tenantPathPrefix)) {
16
+ throw new Error(`host-routing: tenantPathPrefix must look like "/app" (leading slash, no trailing slash), got "${options.tenantPathPrefix}"`);
17
+ }
18
+ const { locales } = options;
19
+ if (locales !== undefined) {
20
+ for (const locale of [locales.default, ...locales.prefixed]) {
21
+ if (!LOCALE_PATTERN.test(locale)) {
22
+ throw new Error(`host-routing: locale must look like "de" or "de-at", got "${locale}"`);
23
+ }
24
+ }
25
+ if (locales.prefixed.includes(locales.default)) {
26
+ throw new Error(`host-routing: default locale "${locales.default}" is served unprefixed and must not be in prefixed`);
27
+ }
28
+ }
29
+ }
@@ -1,6 +1,6 @@
1
1
  import type { ExtraRouteDefinition } from "@cosmicdrift/kumiko-framework/api";
2
- import { type OAuthAccessTokenManager } from "./oauth-access-token.js";
3
- import type { InboundMailContext } from "./types.js";
2
+ import { type OAuthAccessTokenManager } from "./oauth-access-token.ts";
3
+ import type { InboundMailContext } from "./types.ts";
4
4
  export type InboundMailConnectRoutesOptions = {
5
5
  /** HMAC-secret for the state param (deploy-time env — `scope:"system"`
6
6
  * secrets don't exist in secrets-v1). */
@@ -1,7 +1,3 @@
1
1
  export declare function createInboundMailFoundationFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
2
2
  readonly exports: void;
3
3
  };
4
- /** @deprecated Use createInboundMailFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
5
- export declare const inboundMailFoundationFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
6
- readonly exports: void;
7
- };
@@ -204,5 +204,3 @@ export function createInboundMailFoundationFeature() {
204
204
  });
205
205
  }, { dedupeOptions: {} });
206
206
  }
207
- /** @deprecated Use createInboundMailFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
208
- export const inboundMailFoundationFeature = createInboundMailFoundationFeature();
@@ -1,3 +1,3 @@
1
1
  import type { HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
2
- import type { MailAccountEventPayload } from "../events.js";
2
+ import type { MailAccountEventPayload } from "../events.ts";
3
3
  export declare function loadCurrentMailAccountPayload(ctx: Pick<HandlerContext, "loadAggregate">, accountId: string): Promise<MailAccountEventPayload | undefined>;
@@ -1,12 +1,12 @@
1
- export { inboundMessageAggregateId, mailThreadAggregateId, } from "./aggregate-id.js";
2
- export { createInboundMailConnectRoutes, type InboundMailConnectRoutesOptions, } from "./connect-routes.js";
3
- export { INBOUND_MAIL_FOUNDATION_FEATURE, INBOUND_MAIL_PROVIDER_EXTENSION, type InboundMailAccountStatus, InboundMailAccountStatuses, type InboundMailAuthMethod, InboundMailAuthMethods, InboundMailFoundationHandlers, InboundMailFoundationQueries, inboundCredentialSecretKey, } from "./constants.js";
4
- export { INBOUND_MESSAGE_PII_FIELDS, inboundMessageEntity, MAIL_ACCOUNT_PII_FIELDS, MAIL_THREAD_PII_FIELDS, mailAccountEntity, mailThreadEntity, seenMessageEntity, seenMessageTable, syncCursorEntity, syncCursorTable, } from "./entities.js";
5
- export { INBOUND_MESSAGE_AGGREGATE_TYPE, INBOUND_MESSAGE_RECEIVED_EVENT_QN, INBOUND_MESSAGE_RECEIVED_EVENT_SHORT, type InboundMessageEventHeaders, type InboundMessageEventPayload, inboundMessageEventPayloadSchema, MAIL_ACCOUNT_AGGREGATE_TYPE, MAIL_ACCOUNT_CONNECTED_EVENT_QN, MAIL_ACCOUNT_CONNECTED_EVENT_SHORT, MAIL_ACCOUNT_DISCONNECTED_EVENT_QN, MAIL_ACCOUNT_DISCONNECTED_EVENT_SHORT, MAIL_ACCOUNT_UPDATED_EVENT_QN, MAIL_ACCOUNT_UPDATED_EVENT_SHORT, MAIL_THREAD_AGGREGATE_TYPE, MAIL_THREAD_UPDATED_EVENT_QN, MAIL_THREAD_UPDATED_EVENT_SHORT, type MailAccountEventHeaders, type MailAccountEventPayload, type MailThreadEventPayload, mailAccountEventPayloadSchema, mailThreadEventPayloadSchema, } from "./events.js";
6
- export { createInboundMailFoundationFeature, inboundMailFoundationFeature } from "./feature.js";
7
- export { createOAuthAccessTokenManager, inboundRefreshTokenSecretOptions, type OAuthAccessTokenManager, type OAuthAccessTokenManagerDeps, usesFoundationManagedOAuth, } from "./oauth-access-token.js";
8
- export { type OAuthStatePayload, signOAuthState, type VerifyOAuthStateResult, verifyOAuthState, } from "./oauth-state.js";
9
- export { inboundMessagesProjectionTable, mailAccountsProjectionTable, mailThreadsProjectionTable, } from "./projection.js";
10
- export { resolveInboundProviderForAccount, resolveInboundProviderForKey, } from "./provider-factory.js";
11
- export { InboundAuthError, InboundCursorInvalidError, type InboundFetchResult, type InboundMailContext, type InboundMailProviderPlugin, type InboundOAuthFlow, InboundRateLimitError, InboundTransientError, isInboundAuthError, isInboundCursorInvalidError, isInboundMailProviderPlugin, isInboundRateLimitError, isInboundTransientError, type MailAccountRecord, type OAuthTokenSet, type RawInboundMessage, type SyncCursorPayload, } from "./types.js";
12
- export { createInboundMailSupervisor, type InboundMailSupervisor, type InboundMailSupervisorDeps, } from "./watch-supervisor.js";
1
+ export { inboundMessageAggregateId, mailThreadAggregateId, } from "./aggregate-id.ts";
2
+ export { createInboundMailConnectRoutes, type InboundMailConnectRoutesOptions, } from "./connect-routes.ts";
3
+ export { INBOUND_MAIL_FOUNDATION_FEATURE, INBOUND_MAIL_PROVIDER_EXTENSION, type InboundMailAccountStatus, InboundMailAccountStatuses, type InboundMailAuthMethod, InboundMailAuthMethods, InboundMailFoundationHandlers, InboundMailFoundationQueries, inboundCredentialSecretKey, } from "./constants.ts";
4
+ export { INBOUND_MESSAGE_PII_FIELDS, inboundMessageEntity, MAIL_ACCOUNT_PII_FIELDS, MAIL_THREAD_PII_FIELDS, mailAccountEntity, mailThreadEntity, seenMessageEntity, seenMessageTable, syncCursorEntity, syncCursorTable, } from "./entities.ts";
5
+ export { INBOUND_MESSAGE_AGGREGATE_TYPE, INBOUND_MESSAGE_RECEIVED_EVENT_QN, INBOUND_MESSAGE_RECEIVED_EVENT_SHORT, type InboundMessageEventHeaders, type InboundMessageEventPayload, inboundMessageEventPayloadSchema, MAIL_ACCOUNT_AGGREGATE_TYPE, MAIL_ACCOUNT_CONNECTED_EVENT_QN, MAIL_ACCOUNT_CONNECTED_EVENT_SHORT, MAIL_ACCOUNT_DISCONNECTED_EVENT_QN, MAIL_ACCOUNT_DISCONNECTED_EVENT_SHORT, MAIL_ACCOUNT_UPDATED_EVENT_QN, MAIL_ACCOUNT_UPDATED_EVENT_SHORT, MAIL_THREAD_AGGREGATE_TYPE, MAIL_THREAD_UPDATED_EVENT_QN, MAIL_THREAD_UPDATED_EVENT_SHORT, type MailAccountEventHeaders, type MailAccountEventPayload, type MailThreadEventPayload, mailAccountEventPayloadSchema, mailThreadEventPayloadSchema, } from "./events.ts";
6
+ export { createInboundMailFoundationFeature } from "./feature.ts";
7
+ export { createOAuthAccessTokenManager, inboundRefreshTokenSecretOptions, type OAuthAccessTokenManager, type OAuthAccessTokenManagerDeps, usesFoundationManagedOAuth, } from "./oauth-access-token.ts";
8
+ export { type OAuthStatePayload, signOAuthState, type VerifyOAuthStateResult, verifyOAuthState, } from "./oauth-state.ts";
9
+ export { inboundMessagesProjectionTable, mailAccountsProjectionTable, mailThreadsProjectionTable, } from "./projection.ts";
10
+ export { resolveInboundProviderForAccount, resolveInboundProviderForKey, } from "./provider-factory.ts";
11
+ export { InboundAuthError, InboundCursorInvalidError, type InboundFetchResult, type InboundMailContext, type InboundMailProviderPlugin, type InboundOAuthFlow, InboundRateLimitError, InboundTransientError, isInboundAuthError, isInboundCursorInvalidError, isInboundMailProviderPlugin, isInboundRateLimitError, isInboundTransientError, type MailAccountRecord, type OAuthTokenSet, type RawInboundMessage, type SyncCursorPayload, } from "./types.ts";
12
+ export { createInboundMailSupervisor, type InboundMailSupervisor, type InboundMailSupervisorDeps, } from "./watch-supervisor.ts";
@@ -4,7 +4,7 @@ export { createInboundMailConnectRoutes, } from "./connect-routes.js";
4
4
  export { INBOUND_MAIL_FOUNDATION_FEATURE, INBOUND_MAIL_PROVIDER_EXTENSION, InboundMailAccountStatuses, InboundMailAuthMethods, InboundMailFoundationHandlers, InboundMailFoundationQueries, inboundCredentialSecretKey, } from "./constants.js";
5
5
  export { INBOUND_MESSAGE_PII_FIELDS, inboundMessageEntity, MAIL_ACCOUNT_PII_FIELDS, MAIL_THREAD_PII_FIELDS, mailAccountEntity, mailThreadEntity, seenMessageEntity, seenMessageTable, syncCursorEntity, syncCursorTable, } from "./entities.js";
6
6
  export { INBOUND_MESSAGE_AGGREGATE_TYPE, INBOUND_MESSAGE_RECEIVED_EVENT_QN, INBOUND_MESSAGE_RECEIVED_EVENT_SHORT, inboundMessageEventPayloadSchema, MAIL_ACCOUNT_AGGREGATE_TYPE, MAIL_ACCOUNT_CONNECTED_EVENT_QN, MAIL_ACCOUNT_CONNECTED_EVENT_SHORT, MAIL_ACCOUNT_DISCONNECTED_EVENT_QN, MAIL_ACCOUNT_DISCONNECTED_EVENT_SHORT, MAIL_ACCOUNT_UPDATED_EVENT_QN, MAIL_ACCOUNT_UPDATED_EVENT_SHORT, MAIL_THREAD_AGGREGATE_TYPE, MAIL_THREAD_UPDATED_EVENT_QN, MAIL_THREAD_UPDATED_EVENT_SHORT, mailAccountEventPayloadSchema, mailThreadEventPayloadSchema, } from "./events.js";
7
- export { createInboundMailFoundationFeature, inboundMailFoundationFeature } from "./feature.js";
7
+ export { createInboundMailFoundationFeature } from "./feature.js";
8
8
  export { createOAuthAccessTokenManager, inboundRefreshTokenSecretOptions, usesFoundationManagedOAuth, } from "./oauth-access-token.js";
9
9
  export { signOAuthState, verifyOAuthState, } from "./oauth-state.js";
10
10
  export { inboundMessagesProjectionTable, mailAccountsProjectionTable, mailThreadsProjectionTable, } from "./projection.js";
@@ -1,7 +1,7 @@
1
1
  import { type DbConnection } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { SecretsContext } from "@cosmicdrift/kumiko-framework/secrets";
3
3
  import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
4
- import { type InboundMailContext, type InboundMailProviderPlugin, type MailAccountRecord, type OAuthTokenSet } from "./types.js";
4
+ import { type InboundMailContext, type InboundMailProviderPlugin, type MailAccountRecord, type OAuthTokenSet } from "./types.ts";
5
5
  /** Shared by the OAuth callback and the refresh path so both write the slot identically. */
6
6
  export declare function inboundRefreshTokenSecretOptions(accountId: string): {
7
7
  redact: (plaintext: string) => string;
@@ -1,4 +1,4 @@
1
- import { type InboundMailContext, type InboundMailProviderPlugin, type MailAccountRecord } from "./types.js";
1
+ import { type InboundMailContext, type InboundMailProviderPlugin, type MailAccountRecord } from "./types.ts";
2
2
  /** Lookup per Provider-Key ("imap", "m365-graph", ...) — genutzt von den
3
3
  * OAuth-Connect-Routen, wo noch kein Account existiert. */
4
4
  export declare function resolveInboundProviderForKey(ctx: InboundMailContext, providerKey: string, handlerName?: string): InboundMailProviderPlugin;
@@ -1,6 +1,6 @@
1
1
  import type { ConfigAccessor, Registry } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import type { MetricsHandle } from "@cosmicdrift/kumiko-framework/observability";
3
- import { INBOUND_MAIL_PROVIDER_EXTENSION, type InboundMailAccountStatus } from "./constants.js";
3
+ import { INBOUND_MAIL_PROVIDER_EXTENSION, type InboundMailAccountStatus } from "./constants.ts";
4
4
  /**
5
5
  * Slim context for provider plugins.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { DistributedLock } from "@cosmicdrift/kumiko-framework/pipeline";
3
- import { type OAuthAccessTokenManager } from "./oauth-access-token.js";
4
- import { type InboundMailContext, type MailAccountRecord, type RawInboundMessage } from "./types.js";
3
+ import { type OAuthAccessTokenManager } from "./oauth-access-token.ts";
4
+ import { type InboundMailContext, type MailAccountRecord, type RawInboundMessage } from "./types.ts";
5
5
  export type InboundMailSupervisorDeps = {
6
6
  /** Slim-Context für Provider-Calls (registry Pflicht, secrets für
7
7
  * Credential-Reads der Provider). */
@@ -1,13 +1,9 @@
1
1
  import { type InboundMailProviderPlugin } from "@cosmicdrift/kumiko-bundled-features/inbound-mail-foundation";
2
2
  export declare const IMAP_PROVIDER_KEY = "imap";
3
- export { setImapMailHostLookup } from "./imap-client.js";
3
+ export { setImapMailHostLookup } from "./imap-client.ts";
4
4
  /** Exportiert für den Live-Test (imap-live.integration.test.ts) —
5
5
  * Apps nutzen das Feature, nie das Plugin direkt. */
6
6
  export declare const imapInboundMailPlugin: InboundMailProviderPlugin;
7
7
  export declare function createInboundProviderImapFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
8
8
  readonly exports: void;
9
9
  };
10
- /** @deprecated Use createInboundProviderImapFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
11
- export declare const inboundProviderImapFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
12
- readonly exports: void;
13
- };
@@ -231,5 +231,3 @@ export function createInboundProviderImapFeature() {
231
231
  r.useExtension(INBOUND_MAIL_PROVIDER_EXTENSION, IMAP_PROVIDER_KEY, imapInboundMailPlugin);
232
232
  }, { dedupeOptions: {} });
233
233
  }
234
- /** @deprecated Use createInboundProviderImapFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
235
- export const inboundProviderImapFeature = createInboundProviderImapFeature();
@@ -1,7 +1,7 @@
1
1
  import { type MailHostGuardOptions } from "@cosmicdrift/kumiko-bundled-features/foundation-shared";
2
2
  import { type RawInboundMessage, type SyncCursorPayload } from "@cosmicdrift/kumiko-bundled-features/inbound-mail-foundation";
3
3
  import { ImapFlow } from "imapflow";
4
- import type { ImapCredentialDocument } from "./credential-document.js";
4
+ import type { ImapCredentialDocument } from "./credential-document.ts";
5
5
  export declare const IMAP_MAILBOX = "INBOX";
6
6
  export declare function setImapMailHostLookup(fn: MailHostGuardOptions["lookupFn"]): void;
7
7
  export declare function imapMailHostGuard(): MailHostGuardOptions;
@@ -1,3 +1,3 @@
1
- export { type ImapCredentialDocument, imapCredentialDocumentSchema, type ParseCredentialResult, parseImapCredentialDocument, } from "./credential-document.js";
2
- export { createInboundProviderImapFeature, IMAP_PROVIDER_KEY, inboundProviderImapFeature, setImapMailHostLookup, } from "./feature.js";
3
- export { assertUidValidity, buildProviderMessageId, type ImapCursor, mapImapError, normalizeReferences, parseImapCursor, } from "./imap-client.js";
1
+ export { type ImapCredentialDocument, imapCredentialDocumentSchema, type ParseCredentialResult, parseImapCredentialDocument, } from "./credential-document.ts";
2
+ export { createInboundProviderImapFeature, IMAP_PROVIDER_KEY, setImapMailHostLookup, } from "./feature.ts";
3
+ export { assertUidValidity, buildProviderMessageId, type ImapCursor, mapImapError, normalizeReferences, parseImapCursor, } from "./imap-client.ts";
@@ -1,4 +1,4 @@
1
1
  // Public API of the inbound-provider-imap bundled-feature.
2
2
  export { imapCredentialDocumentSchema, parseImapCredentialDocument, } from "./credential-document.js";
3
- export { createInboundProviderImapFeature, IMAP_PROVIDER_KEY, inboundProviderImapFeature, setImapMailHostLookup, } from "./feature.js";
3
+ export { createInboundProviderImapFeature, IMAP_PROVIDER_KEY, setImapMailHostLookup, } from "./feature.js";
4
4
  export { assertUidValidity, buildProviderMessageId, mapImapError, normalizeReferences, parseImapCursor, } from "./imap-client.js";
@@ -21,7 +21,3 @@ export declare const inMemoryInboundMailPlugin: InboundMailProviderPlugin;
21
21
  export declare function createInboundProviderInMemoryFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
22
22
  readonly exports: void;
23
23
  };
24
- /** @deprecated Use createInboundProviderInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
25
- export declare const inboundProviderInMemoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
26
- readonly exports: void;
27
- };
@@ -115,5 +115,3 @@ export function createInboundProviderInMemoryFeature() {
115
115
  r.useExtension("inboundMailProvider", INMEMORY_PROVIDER_KEY, inMemoryInboundMailPlugin);
116
116
  }, { dedupeOptions: {} });
117
117
  }
118
- /** @deprecated Use createInboundProviderInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
119
- export const inboundProviderInMemoryFeature = createInboundProviderInMemoryFeature();
@@ -1 +1 @@
1
- export { createInboundProviderInMemoryFeature, emitWatchError, failNextFetchWith, failNextVerifyWith, INMEMORY_PROVIDER_KEY, inboundProviderInMemoryFeature, isWatching, resetInboundInMemory, seedInboundMessage, } from "./feature.js";
1
+ export { createInboundProviderInMemoryFeature, emitWatchError, failNextFetchWith, failNextVerifyWith, INMEMORY_PROVIDER_KEY, isWatching, resetInboundInMemory, seedInboundMessage, } from "./feature.ts";
@@ -1,2 +1,2 @@
1
1
  // Public API of the inbound-provider-inmemory bundled-feature.
2
- export { createInboundProviderInMemoryFeature, emitWatchError, failNextFetchWith, failNextVerifyWith, INMEMORY_PROVIDER_KEY, inboundProviderInMemoryFeature, isWatching, resetInboundInMemory, seedInboundMessage, } from "./feature.js";
2
+ export { createInboundProviderInMemoryFeature, emitWatchError, failNextFetchWith, failNextVerifyWith, INMEMORY_PROVIDER_KEY, isWatching, resetInboundInMemory, seedInboundMessage, } from "./feature.js";
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import { type TenantJobRunStatus } from "../tenant-job-run-table.js";
2
+ import { type TenantJobRunStatus } from "../tenant-job-run-table.ts";
3
3
  export declare const tenantRunsQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"tenant-runs", z.ZodObject<{
4
4
  jobName: z.ZodOptional<z.ZodString>;
5
5
  subject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
@@ -1,9 +1,9 @@
1
- export { JOBS_FEATURE, JobErrors, JobHandlers, JobQueries } from "./constants.js";
2
- export { createJobsFeature, type JobsFeatureOptions } from "./feature.js";
3
- export type { JobRunLoggerCallbacks } from "./job-run-logger.js";
4
- export { createJobRunLogger } from "./job-run-logger.js";
5
- export type { JobLogLevel, JobRunStatus } from "./job-run-table.js";
6
- export { jobRunLogsTable, jobRunsTable } from "./job-run-table.js";
7
- export { tenantJobFailuresTable } from "./tenant-job-failure-table.js";
8
- export type { TenantJobRunStatus } from "./tenant-job-run-table.js";
9
- export { tenantJobRunsTable } from "./tenant-job-run-table.js";
1
+ export { JOBS_FEATURE, JobErrors, JobHandlers, JobQueries } from "./constants.ts";
2
+ export { createJobsFeature, type JobsFeatureOptions } from "./feature.ts";
3
+ export type { JobRunLoggerCallbacks } from "./job-run-logger.ts";
4
+ export { createJobRunLogger } from "./job-run-logger.ts";
5
+ export type { JobLogLevel, JobRunStatus } from "./job-run-table.ts";
6
+ export { jobRunLogsTable, jobRunsTable } from "./job-run-table.ts";
7
+ export { tenantJobFailuresTable } from "./tenant-job-failure-table.ts";
8
+ export type { TenantJobRunStatus } from "./tenant-job-run-table.ts";
9
+ export { tenantJobRunsTable } from "./tenant-job-run-table.ts";
@@ -1 +1 @@
1
- export { type JobsClientOptions, jobsClient } from "./client-plugin.js";
1
+ export { type JobsClientOptions, jobsClient } from "./client-plugin.tsx";
@@ -16,8 +16,4 @@ export type LedgerFeatureOptions = {
16
16
  readonly toggleable?: LedgerToggleable;
17
17
  };
18
18
  export declare function createLedgerFeature(opts?: LedgerFeatureOptions): typeof defaultLedgerFeature;
19
- /** @deprecated Use createLedgerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
20
- export declare const ledgerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
21
- readonly exports: void;
22
- };
23
19
  export {};
@@ -107,5 +107,3 @@ export function createLedgerFeature(opts = {}) {
107
107
  const access = resolveAccess(opts);
108
108
  return defineFeature(LEDGER_FEATURE_NAME, (r) => registerLedger(r, access, opts.toggleable));
109
109
  }
110
- /** @deprecated Use createLedgerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
111
- export const ledgerFeature = createLedgerFeature();
@@ -1,10 +1,10 @@
1
- export { ACCOUNT_TYPES, type AccountType, DEFAULT_LEDGER_ACCESS, DEFAULT_LEDGER_ROLES, LEDGER_FEATURE_NAME, LedgerHandlers, LedgerQueries, SCHEDULE_INTERVALS, type ScheduleInterval, TRANSACTION_STATUS, type TransactionStatus, } from "./constants.js";
2
- export { accountEntity, scheduleEntity, transactionEntity } from "./entity.js";
3
- export { createLedgerFeature, type LedgerFeatureOptions, ledgerFeature, } from "./feature.js";
4
- export { confirmSchedulePeriodHandler, createConfirmSchedulePeriodHandler, } from "./handlers/confirm-schedule-period.write.js";
5
- export { createCreateTransactionHandler, createTransactionHandler, } from "./handlers/create-transaction.write.js";
6
- export { createBalanceSheetHandler, createBalancesReportHandler, createIncomeStatementHandler, } from "./handlers/reports.query.js";
7
- export { createReverseTransactionHandler, reverseTransactionHandler, } from "./handlers/reverse-transaction.write.js";
8
- export { findReversedIds, type LedgerTxRow, mergeScheduleActuals, type ProjectedPeriod, projectSchedule, type ScheduleDef, type ScheduleMonth, type ScheduleMonthStatus, scheduleReference, } from "./recurring.js";
9
- export { type AccountBalance, accountBalances, type BalanceSheet, type BalancesReport, balanceSheet, type IncomeStatement, incomeStatement, type LedgerAccount, type LedgerEntry, type Period, rawBalances, } from "./reports.js";
10
- export { accountTypeSchema, type ConfirmSchedulePeriodPayload, type CreateTransactionPayload, confirmSchedulePeriodPayloadSchema, createTransactionPayloadSchema, type Posting, postingSchema, type ReverseTransactionPayload, reverseTransactionPayloadSchema, } from "./schemas.js";
1
+ export { ACCOUNT_TYPES, type AccountType, DEFAULT_LEDGER_ACCESS, DEFAULT_LEDGER_ROLES, LEDGER_FEATURE_NAME, LedgerHandlers, LedgerQueries, SCHEDULE_INTERVALS, type ScheduleInterval, TRANSACTION_STATUS, type TransactionStatus, } from "./constants.ts";
2
+ export { accountEntity, scheduleEntity, transactionEntity } from "./entity.ts";
3
+ export { createLedgerFeature, type LedgerFeatureOptions, } from "./feature.ts";
4
+ export { confirmSchedulePeriodHandler, createConfirmSchedulePeriodHandler, } from "./handlers/confirm-schedule-period.write.ts";
5
+ export { createCreateTransactionHandler, createTransactionHandler, } from "./handlers/create-transaction.write.ts";
6
+ export { createBalanceSheetHandler, createBalancesReportHandler, createIncomeStatementHandler, } from "./handlers/reports.query.ts";
7
+ export { createReverseTransactionHandler, reverseTransactionHandler, } from "./handlers/reverse-transaction.write.ts";
8
+ export { findReversedIds, type LedgerTxRow, mergeScheduleActuals, type ProjectedPeriod, projectSchedule, type ScheduleDef, type ScheduleMonth, type ScheduleMonthStatus, scheduleReference, } from "./recurring.ts";
9
+ export { type AccountBalance, accountBalances, type BalanceSheet, type BalancesReport, balanceSheet, type IncomeStatement, incomeStatement, type LedgerAccount, type LedgerEntry, type Period, rawBalances, } from "./reports.ts";
10
+ export { accountTypeSchema, type ConfirmSchedulePeriodPayload, type CreateTransactionPayload, confirmSchedulePeriodPayloadSchema, createTransactionPayloadSchema, type Posting, postingSchema, type ReverseTransactionPayload, reverseTransactionPayloadSchema, } from "./schemas.ts";
@@ -1,6 +1,6 @@
1
1
  export { ACCOUNT_TYPES, DEFAULT_LEDGER_ACCESS, DEFAULT_LEDGER_ROLES, LEDGER_FEATURE_NAME, LedgerHandlers, LedgerQueries, SCHEDULE_INTERVALS, TRANSACTION_STATUS, } from "./constants.js";
2
2
  export { accountEntity, scheduleEntity, transactionEntity } from "./entity.js";
3
- export { createLedgerFeature, ledgerFeature, } from "./feature.js";
3
+ export { createLedgerFeature, } from "./feature.js";
4
4
  export { confirmSchedulePeriodHandler, createConfirmSchedulePeriodHandler, } from "./handlers/confirm-schedule-period.write.js";
5
5
  export { createCreateTransactionHandler, createTransactionHandler, } from "./handlers/create-transaction.write.js";
6
6
  export { createBalanceSheetHandler, createBalancesReportHandler, createIncomeStatementHandler, } from "./handlers/reports.query.js";
@@ -1,5 +1,5 @@
1
- import type { ScheduleInterval } from "./constants.js";
2
- import type { Posting } from "./schemas.js";
1
+ import type { ScheduleInterval } from "./constants.ts";
2
+ import type { Posting } from "./schemas.ts";
3
3
  export type ScheduleDef = {
4
4
  readonly startDate: string;
5
5
  readonly endDate?: string | null;
@@ -1,5 +1,5 @@
1
- import type { AccountType } from "./constants.js";
2
- import type { Posting } from "./schemas.js";
1
+ import type { AccountType } from "./constants.ts";
2
+ import type { Posting } from "./schemas.ts";
3
3
  export type LedgerAccount = {
4
4
  readonly id: string;
5
5
  readonly name: string;
@@ -1,3 +1,3 @@
1
- export { ACCOUNT_TYPES, type AccountType, LEDGER_FEATURE_NAME, LedgerHandlers, LedgerQueries, SCHEDULE_INTERVALS, type ScheduleInterval, TRANSACTION_STATUS, type TransactionStatus, } from "../constants.js";
2
- export { type LedgerTxRow, mergeScheduleActuals, type ProjectedPeriod, projectSchedule, type ScheduleDef, type ScheduleMonth, type ScheduleMonthStatus, scheduleReference, } from "../recurring.js";
3
- export { type ConfirmSchedulePeriodPayload, confirmSchedulePeriodPayloadSchema, type Posting, postingSchema, } from "../schemas.js";
1
+ export { ACCOUNT_TYPES, type AccountType, LEDGER_FEATURE_NAME, LedgerHandlers, LedgerQueries, SCHEDULE_INTERVALS, type ScheduleInterval, TRANSACTION_STATUS, type TransactionStatus, } from "../constants.ts";
2
+ export { type LedgerTxRow, mergeScheduleActuals, type ProjectedPeriod, projectSchedule, type ScheduleDef, type ScheduleMonth, type ScheduleMonthStatus, scheduleReference, } from "../recurring.ts";
3
+ export { type ConfirmSchedulePeriodPayload, confirmSchedulePeriodPayloadSchema, type Posting, postingSchema, } from "../schemas.ts";
@@ -46,6 +46,18 @@ export declare const LEGAL_ROUTES: readonly [{
46
46
  readonly lang: "en";
47
47
  readonly titleFallback: "Privacy Policy";
48
48
  }];
49
+ export declare const LEGAL_TERMS_ROUTES: readonly [{
50
+ readonly path: "/legal/nutzungsbedingungen";
51
+ readonly slug: "terms";
52
+ readonly lang: "de";
53
+ readonly titleFallback: "Nutzungsbedingungen";
54
+ }, {
55
+ readonly path: "/legal/terms";
56
+ readonly slug: "terms";
57
+ readonly lang: "en";
58
+ readonly titleFallback: "Terms of Service";
59
+ }];
60
+ export declare function legalPagePath(routes: readonly LegalPageRoute[], slug: string, lang: string): string | undefined;
49
61
  export declare const LegalPagesErrors: {
50
62
  readonly bootMissingBlock: "legal_pages_boot_missing_block";
51
63
  };
@@ -28,6 +28,22 @@ export const LEGAL_ROUTES = [
28
28
  { path: "/legal/imprint", slug: "imprint", lang: "en", titleFallback: "Imprint" },
29
29
  { path: "/legal/privacy", slug: "privacy", lang: "en", titleFallback: "Privacy Policy" },
30
30
  ];
31
+ // Terms of service are opt-in (`terms: true`) and never boot-required: not every
32
+ // app needs them, and DACH law does not mandate them the way it does imprint.
33
+ export const LEGAL_TERMS_ROUTES = [
34
+ {
35
+ path: "/legal/nutzungsbedingungen",
36
+ slug: "terms",
37
+ lang: "de",
38
+ titleFallback: "Nutzungsbedingungen",
39
+ },
40
+ { path: "/legal/terms", slug: "terms", lang: "en", titleFallback: "Terms of Service" },
41
+ ];
42
+ // Client-safe path lookup so apps that render their own legal pages (e.g. a
43
+ // static marketing site) link to the same paths the feature serves.
44
+ export function legalPagePath(routes, slug, lang) {
45
+ return routes.find((route) => route.slug === slug && route.lang === lang)?.path;
46
+ }
31
47
  export const LegalPagesErrors = {
32
48
  bootMissingBlock: "legal_pages_boot_missing_block",
33
49
  };
@@ -1,7 +1,7 @@
1
1
  import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
- import { type PublicPageWrapLayout } from "../page-render/index.js";
3
- import { type LegalPageRoute, type LegalRequiredBlock } from "./constants.js";
4
- export { type LegalPagesBootCheckCtx, runLegalPagesBootCheck } from "./lib/boot-check.js";
2
+ import { type PublicPageWrapLayout } from "../page-render/index.ts";
3
+ import { type LegalPageRoute, type LegalRequiredBlock } from "./constants.ts";
4
+ export { type LegalPagesBootCheckCtx, runLegalPagesBootCheck } from "./lib/boot-check.ts";
5
5
  export type LegalPagesWrapLayout = PublicPageWrapLayout;
6
6
  export type LegalPagesOptions = {
7
7
  /** Custom Layout-Wrapper für die /legal/*-Routes. Default: minimaler
@@ -21,5 +21,8 @@ export type LegalPagesOptions = {
21
21
  * `privacy/de`). Apps whose routes use a different slug/lang set
22
22
  * (e.g. Spanish-default) pass their own list here. */
23
23
  readonly requiredBlocks?: readonly LegalRequiredBlock[];
24
+ /** Also serve LEGAL_TERMS_ROUTES (`/legal/nutzungsbedingungen`,
25
+ * `/legal/terms`, slug `terms`). Appended to `routes`; never boot-required. */
26
+ readonly terms?: boolean;
24
27
  };
25
28
  export declare function createLegalPagesFeature(opts?: LegalPagesOptions): FeatureDefinition;