@cosmicdrift/kumiko-bundled-features 0.366.0 → 0.368.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 (365) hide show
  1. package/dist/audit/handlers/details.query.js +1 -1
  2. package/dist/audit/handlers/list.query.js +1 -1
  3. package/dist/audit/run-escape-hatch-retention.js +1 -1
  4. package/dist/auth-email-password/bootstrap.js +1 -1
  5. package/dist/auth-email-password/handlers/invite-accept-with-login.write.js +6 -3
  6. package/dist/auth-email-password/handlers/invite-accept.write.js +6 -3
  7. package/dist/auth-email-password/handlers/invite-info.query.js +1 -1
  8. package/dist/auth-email-password/handlers/invite-signup-complete.write.js +6 -3
  9. package/dist/auth-email-password/handlers/signup-confirm.write.js +1 -1
  10. package/dist/auth-email-password/seeding.js +2 -2
  11. package/dist/auth-foundation/feature.d.ts +4 -0
  12. package/dist/auth-foundation/feature.js +37 -33
  13. package/dist/auth-foundation/index.d.ts +1 -1
  14. package/dist/auth-foundation/index.js +1 -1
  15. package/dist/auth-mfa/db/queries.js +1 -2
  16. package/dist/auth-mfa/handlers/enable-confirm-preauth.write.js +1 -1
  17. package/dist/auth-mfa/handlers/enable-start-preauth.write.js +1 -1
  18. package/dist/auth-mfa/handlers/reencrypt.job.js +2 -3
  19. package/dist/auth-mfa/handlers/status.query.js +1 -1
  20. package/dist/auth-mfa/handlers/verify.write.js +1 -1
  21. package/dist/auth-mfa/mfa-code-verifier.js +1 -1
  22. package/dist/auth-mfa/mfa-status-checker.js +1 -1
  23. package/dist/auth-mfa-user-data/index.d.ts +4 -0
  24. package/dist/auth-mfa-user-data/index.js +13 -9
  25. package/dist/billing-foundation/billing-info-query.js +1 -1
  26. package/dist/billing-foundation/feature.d.ts +1 -0
  27. package/dist/billing-foundation/feature.js +5 -6
  28. package/dist/billing-foundation/handlers/create-portal-session.write.js +1 -1
  29. package/dist/billing-foundation/projection.js +1 -2
  30. package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +7 -0
  31. package/dist/cap-counter/calendar-cap-usage-reservation.js +28 -2
  32. package/dist/cap-counter/cap-reservation.d.ts +16 -0
  33. package/dist/cap-counter/cap-reservation.js +144 -14
  34. package/dist/cap-counter/feature.d.ts +4 -0
  35. package/dist/cap-counter/feature.js +74 -68
  36. package/dist/cap-counter/handlers/increment-rolling.write.js +3 -4
  37. package/dist/cap-counter/index.d.ts +3 -2
  38. package/dist/cap-counter/index.js +3 -2
  39. package/dist/cap-counter/tables.js +10 -3
  40. package/dist/cap-overview/handlers/caps-usage.query.js +1 -2
  41. package/dist/cap-overview/handlers/tenant-caps-list.query.js +1 -2
  42. package/dist/cap-overview/handlers/tenant-options.query.js +1 -1
  43. package/dist/channel-email/email-channel.d.ts +5 -1
  44. package/dist/channel-email/email-channel.js +8 -2
  45. package/dist/channel-email/feature.js +1 -1
  46. package/dist/channel-in-app/handlers/inbox.query.js +1 -1
  47. package/dist/channel-in-app/handlers/mark-all-read.write.js +1 -1
  48. package/dist/channel-in-app/handlers/mark-read.write.js +1 -1
  49. package/dist/channel-in-app/handlers/unread-count.query.js +1 -1
  50. package/dist/channel-in-app/tables.js +1 -2
  51. package/dist/compliance-profiles/handlers/for-tenant.query.js +1 -1
  52. package/dist/compliance-profiles/handlers/needs-profile.query.js +1 -1
  53. package/dist/compliance-profiles/handlers/set-profile.write.js +1 -2
  54. package/dist/compliance-profiles/resolve-for-tenant.js +1 -1
  55. package/dist/compliance-profiles/seeding.js +3 -5
  56. package/dist/compliance-profiles-ops/index.d.ts +8 -0
  57. package/dist/compliance-profiles-ops/index.js +19 -15
  58. package/dist/config/db/queries/resolver.js +1 -1
  59. package/dist/config/handlers/reencrypt.job.js +2 -2
  60. package/dist/config/resolver.js +1 -1
  61. package/dist/config/write-helpers.js +1 -1
  62. package/dist/crypto-shredding/handlers/forget-subject.write.js +6 -3
  63. package/dist/custom-fields/db/queries/field-access.js +1 -1
  64. package/dist/custom-fields/db/queries/projection.js +1 -1
  65. package/dist/custom-fields/db/queries/quota.js +1 -1
  66. package/dist/custom-fields/db/queries/retention.js +1 -2
  67. package/dist/custom-fields/db/queries/user-data-rights.js +1 -1
  68. package/dist/custom-fields/feature.d.ts +20 -2
  69. package/dist/custom-fields/feature.js +9 -13
  70. package/dist/custom-fields/handlers/clear-custom-field.write.js +2 -2
  71. package/dist/custom-fields/handlers/delete-system-field.write.js +2 -2
  72. package/dist/custom-fields/handlers/delete-tenant-field.write.js +2 -2
  73. package/dist/custom-fields/handlers/set-custom-field.write.js +2 -2
  74. package/dist/custom-fields/wire-for-entity.js +4 -4
  75. package/dist/data-retention/resolve-for-tenant.js +1 -1
  76. package/dist/data-retention/run-retention-cleanup.js +17 -13
  77. package/dist/delivery/address-opt-out.js +1 -2
  78. package/dist/delivery/attempt-log-retention.js +1 -1
  79. package/dist/delivery/channel-context.js +2 -1
  80. package/dist/delivery/db/queries/address-opt-outs.js +1 -1
  81. package/dist/delivery/db/queries/preferences.js +1 -1
  82. package/dist/delivery/delivery-service.d.ts +2 -0
  83. package/dist/delivery/delivery-service.js +46 -11
  84. package/dist/delivery/feature.js +2 -2
  85. package/dist/delivery/handlers/log.query.js +2 -3
  86. package/dist/delivery/handlers/preferences.query.js +1 -1
  87. package/dist/delivery/handlers/unsubscribe-address.write.d.ts +6 -0
  88. package/dist/delivery/handlers/unsubscribe-address.write.js +8 -5
  89. package/dist/delivery/index.d.ts +3 -0
  90. package/dist/delivery/index.js +2 -0
  91. package/dist/delivery/testing.d.ts +2 -0
  92. package/dist/delivery/types.d.ts +2 -1
  93. package/dist/delivery/unsubscribe-link.d.ts +25 -0
  94. package/dist/delivery/unsubscribe-link.js +40 -0
  95. package/dist/delivery/unsubscribe-page-strings.d.ts +11 -0
  96. package/dist/delivery/unsubscribe-page-strings.js +15 -0
  97. package/dist/delivery/unsubscribe.d.ts +3 -0
  98. package/dist/delivery/unsubscribe.js +65 -29
  99. package/dist/delivery/upsert-preference.js +1 -2
  100. package/dist/derivatives-sharp/feature.d.ts +4 -0
  101. package/dist/derivatives-sharp/feature.js +15 -11
  102. package/dist/derivatives-sharp/index.d.ts +1 -1
  103. package/dist/derivatives-sharp/index.js +1 -1
  104. package/dist/document-ingest-foundation/feature.d.ts +7 -0
  105. package/dist/document-ingest-foundation/feature.js +94 -90
  106. package/dist/document-ingest-foundation/forget-extract-with-file-ref.js +3 -3
  107. package/dist/document-ingest-foundation/index.d.ts +1 -1
  108. package/dist/document-ingest-foundation/index.js +1 -1
  109. package/dist/feature-toggles/global-feature-state-table.js +1 -2
  110. package/dist/feature-toggles/handlers/set.write.js +3 -5
  111. package/dist/feature-toggles/toggle-runtime.js +1 -1
  112. package/dist/file-derivatives/feature.d.ts +1 -0
  113. package/dist/file-derivatives/feature.js +2 -1
  114. package/dist/file-derivatives/handlers/public-variant-by-file-ref.query.js +1 -1
  115. package/dist/file-derivatives/handlers/public-variant.query.js +1 -1
  116. package/dist/file-foundation/feature.d.ts +6 -0
  117. package/dist/file-foundation/feature.js +29 -25
  118. package/dist/file-foundation/index.d.ts +1 -1
  119. package/dist/file-foundation/index.js +1 -1
  120. package/dist/file-foundation/read-file-ref-content.js +1 -1
  121. package/dist/file-provider-inmemory/feature.d.ts +4 -0
  122. package/dist/file-provider-inmemory/feature.js +24 -20
  123. package/dist/file-provider-inmemory/index.d.ts +1 -1
  124. package/dist/file-provider-inmemory/index.js +1 -1
  125. package/dist/file-provider-s3/env-feature.d.ts +3 -0
  126. package/dist/file-provider-s3/env-feature.js +46 -0
  127. package/dist/file-provider-s3/feature.d.ts +26 -0
  128. package/dist/file-provider-s3/feature.js +84 -72
  129. package/dist/file-provider-s3/index.d.ts +1 -1
  130. package/dist/file-provider-s3/index.js +1 -1
  131. package/dist/file-provider-s3/lib/index.d.ts +3 -0
  132. package/dist/file-provider-s3/lib/index.js +2 -0
  133. package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.js +19 -19
  134. package/dist/file-provider-s3-env/index.d.ts +8 -1
  135. package/dist/file-provider-s3-env/index.js +7 -2
  136. package/dist/files-provider-s3/index.d.ts +5 -3
  137. package/dist/files-provider-s3/index.js +5 -2
  138. package/dist/files-tenant-data/handlers/sweep-orphaned-derivatives.job.js +1 -1
  139. package/dist/files-tenant-data/hooks.js +1 -2
  140. package/dist/folders/feature.d.ts +6 -2
  141. package/dist/folders/feature.js +4 -2
  142. package/dist/folders-user-data/index.d.ts +4 -0
  143. package/dist/folders-user-data/index.js +21 -17
  144. package/dist/form-draft/db/queries/cleanup.js +1 -1
  145. package/dist/form-draft/db/queries/draft-count.js +1 -1
  146. package/dist/form-draft/db/queries/owned-file-refs.js +1 -2
  147. package/dist/form-draft/feature.d.ts +4 -0
  148. package/dist/form-draft/feature.js +5 -1
  149. package/dist/form-draft/handlers/cleanup.job.js +2 -2
  150. package/dist/form-draft/index.d.ts +1 -1
  151. package/dist/form-draft/index.js +1 -1
  152. package/dist/form-draft/lookup.js +1 -1
  153. package/dist/form-draft-user-data/index.d.ts +4 -0
  154. package/dist/form-draft-user-data/index.js +13 -9
  155. package/dist/inbound-mail-foundation/feature.d.ts +4 -0
  156. package/dist/inbound-mail-foundation/feature.js +151 -147
  157. package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +1 -2
  158. package/dist/inbound-mail-foundation/index.d.ts +1 -1
  159. package/dist/inbound-mail-foundation/index.js +1 -1
  160. package/dist/inbound-mail-foundation/oauth-access-token.js +1 -2
  161. package/dist/inbound-mail-foundation/projection.js +1 -2
  162. package/dist/inbound-mail-foundation/watch-supervisor.js +1 -1
  163. package/dist/inbound-provider-imap/feature.d.ts +4 -0
  164. package/dist/inbound-provider-imap/feature.js +16 -12
  165. package/dist/inbound-provider-imap/index.d.ts +1 -1
  166. package/dist/inbound-provider-imap/index.js +1 -1
  167. package/dist/inbound-provider-inmemory/feature.d.ts +4 -0
  168. package/dist/inbound-provider-inmemory/feature.js +14 -10
  169. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  170. package/dist/inbound-provider-inmemory/index.js +1 -1
  171. package/dist/jobs/db/queries/retention.js +1 -1
  172. package/dist/jobs/db/queries/stale-run-sweep.js +1 -1
  173. package/dist/jobs/handlers/detail.query.js +1 -1
  174. package/dist/jobs/handlers/list.query.js +1 -2
  175. package/dist/jobs/handlers/retry.write.js +1 -1
  176. package/dist/jobs/handlers/tenant-failures.query.js +1 -1
  177. package/dist/jobs/handlers/tenant-runs.query.js +1 -1
  178. package/dist/jobs/job-run-logger.js +1 -2
  179. package/dist/jobs/tenant-job-failure-table.js +1 -2
  180. package/dist/jobs/tenant-job-run-table.js +1 -2
  181. package/dist/ledger/feature.d.ts +6 -2
  182. package/dist/ledger/feature.js +4 -2
  183. package/dist/mail-foundation/feature.d.ts +23 -1
  184. package/dist/mail-foundation/feature.js +76 -49
  185. package/dist/mail-foundation/index.d.ts +1 -1
  186. package/dist/mail-foundation/index.js +1 -1
  187. package/dist/mail-transport-inmemory/feature.d.ts +4 -0
  188. package/dist/mail-transport-inmemory/feature.js +20 -16
  189. package/dist/mail-transport-inmemory/index.d.ts +1 -1
  190. package/dist/mail-transport-inmemory/index.js +1 -1
  191. package/dist/mail-transport-smtp/feature.d.ts +16 -0
  192. package/dist/mail-transport-smtp/feature.js +85 -79
  193. package/dist/mail-transport-smtp/index.d.ts +1 -1
  194. package/dist/mail-transport-smtp/index.js +1 -1
  195. package/dist/managed-pages/handlers/by-slug.query.js +1 -1
  196. package/dist/managed-pages/handlers/by-tenant-published.query.js +1 -2
  197. package/dist/managed-pages/handlers/set.write.js +1 -2
  198. package/dist/managed-pages/seeding.js +3 -5
  199. package/dist/metrics/compute.d.ts +1 -1
  200. package/dist/metrics/filters.d.ts +1 -1
  201. package/dist/metrics/filters.js +1 -1
  202. package/dist/metrics/validate.js +1 -1
  203. package/dist/notes-history/feature.d.ts +7 -2
  204. package/dist/notes-history/feature.js +4 -2
  205. package/dist/notes-history/handlers/add-note.write.js +1 -1
  206. package/dist/notes-history-user-data/hooks.js +1 -1
  207. package/dist/notes-history-user-data/index.d.ts +4 -0
  208. package/dist/notes-history-user-data/index.js +21 -17
  209. package/dist/personal-access-tokens/feature.d.ts +4 -1
  210. package/dist/personal-access-tokens/feature.js +10 -2
  211. package/dist/personal-access-tokens/handlers/create.write.js +1 -1
  212. package/dist/personal-access-tokens/handlers/list.query.js +2 -2
  213. package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
  214. package/dist/personal-access-tokens/resolver.js +1 -1
  215. package/dist/personal-access-tokens/revoke-for-user.js +1 -1
  216. package/dist/personal-access-tokens/roles.js +3 -5
  217. package/dist/personal-access-tokens/screens.js +2 -0
  218. package/dist/readiness/feature.d.ts +8 -0
  219. package/dist/readiness/feature.js +18 -14
  220. package/dist/readiness/index.d.ts +1 -1
  221. package/dist/readiness/index.js +1 -1
  222. package/dist/secrets/db/queries/read.js +1 -1
  223. package/dist/secrets/feature.d.ts +3 -0
  224. package/dist/secrets/feature.js +3 -2
  225. package/dist/secrets/handlers/rotate.job.js +2 -3
  226. package/dist/secrets/secrets-context.js +3 -4
  227. package/dist/sessions/db/queries/cleanup.js +1 -1
  228. package/dist/sessions/handlers/detail.query.js +1 -1
  229. package/dist/sessions/handlers/list.query.js +2 -2
  230. package/dist/sessions/handlers/mine.query.js +1 -1
  231. package/dist/sessions/handlers/revoke-all-for-user.write.js +1 -1
  232. package/dist/sessions/handlers/revoke-all-others.write.js +1 -1
  233. package/dist/sessions/handlers/revoke.write.js +1 -1
  234. package/dist/sessions/session-callbacks.js +4 -6
  235. package/dist/sessions/testing.d.ts +1 -1
  236. package/dist/tags/feature.d.ts +6 -2
  237. package/dist/tags/feature.js +4 -2
  238. package/dist/template-resolver/api.js +1 -1
  239. package/dist/template-resolver/compile-document-body.js +47 -11
  240. package/dist/template-resolver/document-sanitizer.d.ts +2 -0
  241. package/dist/template-resolver/document-sanitizer.js +16 -1
  242. package/dist/template-resolver/document-schema.d.ts +2 -0
  243. package/dist/template-resolver/document-schema.js +31 -0
  244. package/dist/template-resolver/handlers/bundle-import.js +4 -3
  245. package/dist/template-resolver/handlers/by-slug.query.js +1 -1
  246. package/dist/template-resolver/handlers/by-tenant.query.js +1 -2
  247. package/dist/template-resolver/handlers/collection-item.query.js +1 -1
  248. package/dist/template-resolver/handlers/collection-list.query.js +1 -2
  249. package/dist/template-resolver/handlers/collection-set.write.js +1 -1
  250. package/dist/template-resolver/handlers/copy-locale.write.js +4 -3
  251. package/dist/template-resolver/handlers/diff-to-system.query.js +1 -1
  252. package/dist/template-resolver/handlers/export-bundle.query.js +1 -1
  253. package/dist/template-resolver/handlers/find-by-id.query.js +6 -2
  254. package/dist/template-resolver/handlers/layout-source.query.js +1 -1
  255. package/dist/template-resolver/handlers/list.query.js +4 -2
  256. package/dist/template-resolver/handlers/overview.query.js +5 -3
  257. package/dist/template-resolver/handlers/reset-to-system.write.js +1 -1
  258. package/dist/template-resolver/handlers/resource-remove.write.js +1 -1
  259. package/dist/template-resolver/handlers/set.write.js +1 -1
  260. package/dist/template-resolver/handlers/template-write.d.ts +2 -1
  261. package/dist/template-resolver/handlers/template-write.js +13 -2
  262. package/dist/template-resolver/handlers/tenant-overrides.query.js +1 -1
  263. package/dist/template-resolver/handlers/toggle-status.write.js +1 -1
  264. package/dist/template-resolver/handlers/usage.query.js +1 -1
  265. package/dist/template-resolver/handlers/validate.query.js +1 -1
  266. package/dist/template-resolver/index.d.ts +3 -2
  267. package/dist/template-resolver/index.js +3 -2
  268. package/dist/template-resolver/qualified-names.d.ts +1 -0
  269. package/dist/template-resolver/qualified-names.js +1 -0
  270. package/dist/template-resolver/seeding.d.ts +4 -0
  271. package/dist/template-resolver/seeding.js +43 -9
  272. package/dist/template-resolver/store-template-resource.js +1 -1
  273. package/dist/template-resolver/template-preview.js +3 -1
  274. package/dist/template-resolver/template-resources.js +1 -1
  275. package/dist/template-resolver/template-system-only.d.ts +8 -0
  276. package/dist/template-resolver/template-system-only.js +11 -0
  277. package/dist/template-resolver/template-validation.js +42 -28
  278. package/dist/template-resolver/testing.js +1 -1
  279. package/dist/template-resolver/web/i18n.js +1 -0
  280. package/dist/template-resolver-user-data/index.d.ts +4 -0
  281. package/dist/template-resolver-user-data/index.js +17 -13
  282. package/dist/tenant/handlers/active-tenant-ids.query.js +1 -1
  283. package/dist/tenant/handlers/add-member.write.js +1 -2
  284. package/dist/tenant/handlers/cancel-invitation.write.js +1 -1
  285. package/dist/tenant/handlers/invitations.query.js +1 -1
  286. package/dist/tenant/handlers/me.query.js +1 -1
  287. package/dist/tenant/handlers/member-directory.query.js +1 -1
  288. package/dist/tenant/handlers/members.query.js +1 -1
  289. package/dist/tenant/handlers/memberships.query.js +1 -1
  290. package/dist/tenant/handlers/remove-member.write.js +1 -2
  291. package/dist/tenant/handlers/resolve-user-ids.query.js +1 -1
  292. package/dist/tenant/handlers/team-list.query.js +1 -1
  293. package/dist/tenant/handlers/tenant-directory.query.js +1 -1
  294. package/dist/tenant/handlers/update-member-roles.write.js +1 -2
  295. package/dist/tenant/invited-membership.js +2 -3
  296. package/dist/tenant/last-tenant-admin.js +1 -2
  297. package/dist/tenant/seeding.js +12 -6
  298. package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +1 -2
  299. package/dist/tenant-lifecycle/handlers/request-destruction.write.js +1 -2
  300. package/dist/tenant-lifecycle/lib/revoke-tenant-sessions.js +1 -1
  301. package/dist/tenant-lifecycle/lifecycle-gate.js +1 -1
  302. package/dist/tenant-lifecycle/run-tenant-destroy.js +3 -5
  303. package/dist/tenant-lifecycle/stages.js +10 -6
  304. package/dist/tenant-lifecycle/testing.d.ts +1 -1
  305. package/dist/tenant-lifecycle/testing.js +2 -2
  306. package/dist/tenant-settings/feature.d.ts +1 -0
  307. package/dist/tenant-settings/feature.js +2 -1
  308. package/dist/tier-engine/feature.d.ts +1 -8
  309. package/dist/tier-engine/feature.js +71 -78
  310. package/dist/tier-engine/handlers/get-tenant-tier.query.js +2 -3
  311. package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -2
  312. package/dist/user/db/queries/stream-tenant-backfill.js +1 -1
  313. package/dist/user/handlers/create.write.js +1 -2
  314. package/dist/user/handlers/find-for-auth.query.js +1 -1
  315. package/dist/user/handlers/list.query.js +1 -1
  316. package/dist/user/handlers/update-roles.js +1 -2
  317. package/dist/user/index.d.ts +1 -1
  318. package/dist/user/index.js +1 -1
  319. package/dist/user/invited-global-roles.js +2 -3
  320. package/dist/user/principal-status.d.ts +4 -0
  321. package/dist/user/principal-status.js +9 -3
  322. package/dist/user/resolve-display-names.js +1 -1
  323. package/dist/user/seeding.js +5 -6
  324. package/dist/user-data-rights/audit-download.js +2 -2
  325. package/dist/user-data-rights/db/queries/export-jobs.js +1 -1
  326. package/dist/user-data-rights/db/queries/forget-cleanup.js +1 -1
  327. package/dist/user-data-rights/handlers/download-by-job.query.js +1 -1
  328. package/dist/user-data-rights/handlers/download-by-token.query.js +1 -1
  329. package/dist/user-data-rights/handlers/export-status.query.js +1 -1
  330. package/dist/user-data-rights/handlers/list-download-attempts.query.js +1 -1
  331. package/dist/user-data-rights/handlers/my-audit-log.query.js +1 -1
  332. package/dist/user-data-rights/handlers/request-export.write.js +1 -2
  333. package/dist/user-data-rights/handlers/run-forget-cleanup.write.js +3 -3
  334. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.d.ts +1 -1
  335. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.js +1 -1
  336. package/dist/user-data-rights/lib/update-user-lifecycle.d.ts +1 -0
  337. package/dist/user-data-rights/lib/update-user-lifecycle.js +3 -3
  338. package/dist/user-data-rights/run-export-jobs.js +2 -3
  339. package/dist/user-data-rights/run-forget-cleanup.js +9 -5
  340. package/dist/user-data-rights/run-user-export.js +9 -5
  341. package/dist/waitlist/handlers/invite.write.js +1 -2
  342. package/dist/waitlist/handlers/reject.write.js +1 -1
  343. package/dist/waitlist/lib.js +1 -2
  344. package/dist/workflow-runner/event-subscriber.js +1 -1
  345. package/dist/workflow-runner/feature.d.ts +4 -0
  346. package/dist/workflow-runner/feature.js +44 -40
  347. package/dist/workflow-runner/handlers/resume-run.write.js +1 -1
  348. package/dist/workflow-runner/index.d.ts +1 -1
  349. package/dist/workflow-runner/index.js +1 -1
  350. package/dist/workflow-runner/pending-projection.js +1 -1
  351. package/package.json +28 -11
  352. package/src/cap-counter/changes.json +13 -0
  353. package/src/channel-email/changes.json +6 -0
  354. package/src/crypto-shredding/changes.json +6 -0
  355. package/src/delivery/changes.json +12 -0
  356. package/src/file-provider-s3/changes.json +10 -1
  357. package/src/personal-access-tokens/changes.json +6 -0
  358. package/src/template-resolver/changes.json +25 -0
  359. package/src/user/changes.json +6 -0
  360. package/src/user-data-rights/changes.json +6 -0
  361. package/dist/file-provider-s3-env/feature.d.ts +0 -3
  362. package/dist/file-provider-s3-env/feature.js +0 -46
  363. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.d.ts +0 -0
  364. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.js +0 -0
  365. /package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { AccessDeniedError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
3
3
  import { tenantMembershipsTable } from "../../tenant/index.js";
4
4
  import { isSystemAdminActor } from "./is-admin-actor.js";
@@ -3,6 +3,7 @@ import { type WritePurpose } from "@cosmicdrift/kumiko-framework/db";
3
3
  export type UpdateUserLifecycleOptions = {
4
4
  readonly expect?: Readonly<Record<string, string | number | boolean | null>>;
5
5
  readonly writePurpose?: WritePurpose;
6
+ readonly includeDeleted?: boolean;
6
7
  };
7
8
  export declare function updateUserLifecycle(conn: DbRunner, userId: string, changes: Record<string, unknown>, options?: UpdateUserLifecycleOptions): Promise<{
8
9
  readonly applied: boolean;
@@ -1,5 +1,4 @@
1
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
2
- import { createEventStoreExecutor, createTenantDb, } from "@cosmicdrift/kumiko-framework/db";
1
+ import { createEventStoreExecutor, createTenantDb, selectMany, } from "@cosmicdrift/kumiko-framework/db";
3
2
  import { createSystemUser, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
4
3
  import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
5
4
  import { USER_STATUS, userEntity, userTable } from "../../user/index.js";
@@ -38,11 +37,12 @@ export async function updateUserLifecycle(conn, userId, changes, options) {
38
37
  // (restrict/lift-restriction/grace-period/cancel/forget) that holds no row
39
38
  // version to pass as `payload.version`, which update() requires otherwise.
40
39
  // Callers needing a guard use `options.expect` instead.
41
- const tenantDb = createTenantDb(conn, SYSTEM_TENANT_ID, "system");
40
+ const tenantDb = createTenantDb({ db: conn, tenantId: SYSTEM_TENANT_ID, mode: "system" });
42
41
  const result = await userExecutor.update({ id: userId, changes }, createSystemUser(SYSTEM_TENANT_ID), tenantDb, {
43
42
  skipOptimisticLock: true,
44
43
  ...(options?.expect && { expect: options.expect }),
45
44
  ...(options?.writePurpose && { writePurpose: options.writePurpose }),
45
+ ...(options?.includeDeleted && { includeDeleted: true }),
46
46
  });
47
47
  if (result.isSuccess)
48
48
  return { applied: true };
@@ -43,10 +43,9 @@
43
43
  // **Storage-Cleanup:** dritter Pass loescht abgelaufene downloadStorageKeys
44
44
  // (`expiresAt + exportStorageCleanupGraceHours < now`) — abgelaufene ZIPs
45
45
  // auf S3 sollen nicht ewig liegen.
46
- import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
47
46
  import { addDurationSpec } from "@cosmicdrift/kumiko-framework/compliance";
48
47
  import { PII_ERASED_SENTINEL } from "@cosmicdrift/kumiko-framework/crypto";
49
- import { createEventStoreExecutor, createTenantDb } from "@cosmicdrift/kumiko-framework/db";
48
+ import { createEventStoreExecutor, createTenantDb, fetchOne, selectMany, } from "@cosmicdrift/kumiko-framework/db";
50
49
  import { createSystemUser } from "@cosmicdrift/kumiko-framework/engine";
51
50
  import { createZipStream, tenantExportPrefix, } from "@cosmicdrift/kumiko-framework/files";
52
51
  import { resolveProfileForTenant } from "../compliance-profiles/index.js";
@@ -547,7 +546,7 @@ function reportCleanupLastRun(metrics, now) {
547
546
  // Stream-Counter konsistent bleibt (Memory feedback_event_store_tenant_consistency).
548
547
  // @wrapper-known semantic-alias
549
548
  function systemTenantDb(db, tenantId) {
550
- return createTenantDb(db, tenantId, "system");
549
+ return createTenantDb({ db, tenantId, mode: "system" });
551
550
  }
552
551
  function buildExportStorageKey(job) {
553
552
  return `${tenantExportPrefix(job.requestedFromTenantId)}${job.id}.zip`;
@@ -34,9 +34,8 @@ import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
34
34
  // gesammelt + zurueckgegeben fuer Operator-Visibility. Ein User mit
35
35
  // gefailten Hooks bleibt im DeletionRequested-Status (next Lauf
36
36
  // retried automatisch).
37
- import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
38
37
  import { configuredPiiSubjectKms, subjectIdToKey, } from "@cosmicdrift/kumiko-framework/crypto";
39
- import { createTenantDb, entityEventName, executeRawQuery, nullBlindIndexesForSubject, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
38
+ import { createTenantDb, entityEventName, executeRawQuery, fetchOne, nullBlindIndexesForSubject, selectMany, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
40
39
  import { EXT_USER_DATA, EXT_USER_DATA_ORDER, extensionUsageEscapeHatchReason, } from "@cosmicdrift/kumiko-framework/engine";
41
40
  import { createEscapeHatchReporter, UNATTRIBUTED_ACTOR, } from "@cosmicdrift/kumiko-framework/pipeline";
42
41
  import { purgeSearchDocumentsForSubject, } from "@cosmicdrift/kumiko-framework/search";
@@ -54,9 +53,14 @@ function buildHookDb(db, tenantId, entry, args) {
54
53
  sink: args.escapeHatchAuditSink,
55
54
  log: args.escapeHatchAuditLog ?? createFallbackLogger("user-data-rights"),
56
55
  });
57
- return createTenantDb(db, tenantId, "tenant", undefined, undefined, undefined, {
58
- unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
59
- report,
56
+ return createTenantDb({
57
+ db,
58
+ tenantId,
59
+ mode: "tenant",
60
+ grants: {
61
+ unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
62
+ report,
63
+ },
60
64
  });
61
65
  }
62
66
  // EXT_USER_DATA delete-hooks default here; a hook that redacts data keyed on an
@@ -20,9 +20,8 @@ import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
20
20
  // **PII-Surface:** Hooks definieren selbst welche Felder ins Bundle
21
21
  // landen. user-data-rights-defaults/hooks/user.userdata-hook expose
22
22
  // expliziert KEIN passwordHash + KEINE roles (privileged columns).
23
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
24
23
  import { configuredPiiSubjectKms, decryptPiiFieldValues, isPiiCiphertext, } from "@cosmicdrift/kumiko-framework/crypto";
25
- import { collectEncryptedFieldNames, configuredEntityFieldEncryption, createTenantDb, decryptEntityFieldValues, } from "@cosmicdrift/kumiko-framework/db";
24
+ import { collectEncryptedFieldNames, configuredEntityFieldEncryption, createTenantDb, decryptEntityFieldValues, selectMany, } from "@cosmicdrift/kumiko-framework/db";
26
25
  import { EXT_USER_DATA, extensionUsageEscapeHatchReason, maskWriteOnlyFields, } from "@cosmicdrift/kumiko-framework/engine";
27
26
  import { createEscapeHatchReporter, UNATTRIBUTED_ACTOR, } from "@cosmicdrift/kumiko-framework/pipeline";
28
27
  import { tenantMembershipsTable } from "../tenant/index.js";
@@ -35,9 +34,14 @@ function buildHookDb(db, tenantId, entry, args) {
35
34
  sink: args.escapeHatchAuditSink,
36
35
  log: args.escapeHatchAuditLog ?? createFallbackLogger("user-data-rights"),
37
36
  });
38
- return createTenantDb(db, tenantId, "tenant", undefined, undefined, undefined, {
39
- unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
40
- report,
37
+ return createTenantDb({
38
+ db,
39
+ tenantId,
40
+ mode: "tenant",
41
+ grants: {
42
+ unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
43
+ report,
44
+ },
41
45
  });
42
46
  }
43
47
  /**
@@ -1,5 +1,4 @@
1
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
2
- import { acquireNamespacedAdvisoryLock } from "@cosmicdrift/kumiko-framework/db";
1
+ import { acquireNamespacedAdvisoryLock, fetchOne } from "@cosmicdrift/kumiko-framework/db";
3
2
  import { createSystemUser, defineWriteHandler, parseTenantId, } from "@cosmicdrift/kumiko-framework/engine";
4
3
  import { InternalError, NotFoundError, UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
5
4
  import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
@@ -1,4 +1,4 @@
1
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { selectMany } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { createSystemUser, defineWriteHandler, parseTenantId, } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { InternalError, NotFoundError, UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
4
4
  import { cancelPendingInvitation, INVITATION_STATUS, tenantInvitationsTable, } from "../../tenant/index.js";
@@ -1,5 +1,4 @@
1
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
2
- import { createEventStoreExecutor } from "@cosmicdrift/kumiko-framework/db";
1
+ import { createEventStoreExecutor, fetchOne, } from "@cosmicdrift/kumiko-framework/db";
3
2
  import { access, createSystemUser, SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
4
3
  import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
5
4
  import { tenantMembershipsTable } from "../tenant/index.js";
@@ -23,7 +23,7 @@
23
23
  // + triggerEventRef + wakeAt=now() onto the matching pending row(s); the
24
24
  // existing resume-due-runs job (Phase 2) picks the row up on its next
25
25
  // cron tick — the one resume path stays exactly the one Phase 2 built.
26
- import { selectMany, updateMany } from "@cosmicdrift/kumiko-framework/bun-db";
26
+ import { selectMany, updateMany } from "@cosmicdrift/kumiko-framework/db";
27
27
  import { evaluateEventMatch } from "@cosmicdrift/kumiko-framework/engine";
28
28
  import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
29
29
  import { getTemporal } from "@cosmicdrift/kumiko-framework/time";
@@ -1,3 +1,7 @@
1
+ export declare function createWorkflowRunnerFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
2
+ readonly exports: void;
3
+ };
4
+ /** @deprecated Use createWorkflowRunnerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
1
5
  export declare const workflowRunnerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
2
6
  readonly exports: void;
3
7
  };
@@ -32,45 +32,49 @@ import { workflowRunPendingTableMeta } from "./tables.js";
32
32
  // bundled feature's runtime name follows this convention, and
33
33
  // use-all-bundled's check-coverage matches exports to mounted features by it.
34
34
  const FEATURE_NAME = "workflow-runner";
35
- export const workflowRunnerFeature = defineFeature(FEATURE_NAME, (r) => {
36
- r.describe("Writes the run-envelope (`workflow.run-started` / `workflow.run-completed` / `workflow.run-failed`) for a workflow run onto its `workflow-run` aggregate stream. Provides `startAndRunWorkflow` and `registerEventTrigger` for consumer features to wire up `defineWorkflow`-based workflows against domain events. Registers no workflows itself. Runs the resume loop for suspended `wait`/`retry`/`waitForEvent` steps (`resume-due-runs` job + `resume-run` handler); `registerEventTrigger` wires an event-wakeup subscriber per workflow that declares `awaits` so a `waitForEvent` step resumes as soon as its awaited event arrives, not just on timeout.");
37
- r.uiHints({
38
- displayLabel: "Workflow Runner",
39
- category: "infrastructure",
40
- recommended: false,
41
- });
42
- // resume-run needs a full HandlerContext + ctx.systemDb (the pending-row
43
- // scan crosses whatever tenant the row belongs to relative to the job's
44
- // own tenant loop iteration) — same reasoning as tenant/feature.ts.
45
- r.systemScope();
46
- r.storeTable(workflowRunPendingTableMeta, {
47
- reason: "resume_loop.pending_suspended_steps",
48
- });
49
- registerWorkflowRunPendingProjection(r);
50
- r.writeHandler(resumeRunHandler);
51
- r.job("resume-due-runs", { trigger: { cron: "* * * * *" }, perTenant: true, concurrency: "skip" }, async (_payload, ctx) => {
52
- if (!ctx.systemDb) {
53
- throw new Error("resume-due-runs: ctx.systemDb required (r.systemScope() feature)");
54
- }
55
- const tenantId = ctx.systemUser?.tenantId ?? ctx._tenantId;
56
- if (tenantId === undefined) {
57
- // skip: cron fired without a perTenant fan-out tenant — nothing scoped
58
- return;
59
- }
60
- const dueRows = await selectDueWorkflowRunPending(ctx.systemDb.assertTenantMatch(tenantId));
61
- for (const row of dueRows) {
62
- try {
63
- await ctx.write("workflow-runner:write:resume-run", {
64
- runId: row.runId,
65
- stepIndex: row.stepIndex,
66
- });
35
+ export function createWorkflowRunnerFeature() {
36
+ return defineFeature(FEATURE_NAME, (r) => {
37
+ r.describe("Writes the run-envelope (`workflow.run-started` / `workflow.run-completed` / `workflow.run-failed`) for a workflow run onto its `workflow-run` aggregate stream. Provides `startAndRunWorkflow` and `registerEventTrigger` for consumer features to wire up `defineWorkflow`-based workflows against domain events. Registers no workflows itself. Runs the resume loop for suspended `wait`/`retry`/`waitForEvent` steps (`resume-due-runs` job + `resume-run` handler); `registerEventTrigger` wires an event-wakeup subscriber per workflow that declares `awaits` so a `waitForEvent` step resumes as soon as its awaited event arrives, not just on timeout.");
38
+ r.uiHints({
39
+ displayLabel: "Workflow Runner",
40
+ category: "infrastructure",
41
+ recommended: false,
42
+ });
43
+ // resume-run needs a full HandlerContext + ctx.systemDb (the pending-row
44
+ // scan crosses whatever tenant the row belongs to relative to the job's
45
+ // own tenant loop iteration) — same reasoning as tenant/feature.ts.
46
+ r.systemScope();
47
+ r.storeTable(workflowRunPendingTableMeta, {
48
+ reason: "resume_loop.pending_suspended_steps",
49
+ });
50
+ registerWorkflowRunPendingProjection(r);
51
+ r.writeHandler(resumeRunHandler);
52
+ r.job("resume-due-runs", { trigger: { cron: "* * * * *" }, perTenant: true, concurrency: "skip" }, async (_payload, ctx) => {
53
+ if (!ctx.systemDb) {
54
+ throw new Error("resume-due-runs: ctx.systemDb required (r.systemScope() feature)");
67
55
  }
68
- catch (error) {
69
- // skip: one row's dispatch failing (infra hiccup, not a business
70
- // outcome — resume-run itself never throws for expected cases)
71
- // must not stop the rest of this tenant's due rows from resuming.
72
- ctx.log.warn(`[workflow-runner:resume-due-runs] runId=${row.runId} stepIndex=${row.stepIndex} dispatch failed: ${String(error)}`);
56
+ const tenantId = ctx.systemUser?.tenantId ?? ctx._tenantId;
57
+ if (tenantId === undefined) {
58
+ // skip: cron fired without a perTenant fan-out tenant — nothing scoped
59
+ return;
73
60
  }
74
- }
75
- });
76
- });
61
+ const dueRows = await selectDueWorkflowRunPending(ctx.systemDb.assertTenantMatch(tenantId));
62
+ for (const row of dueRows) {
63
+ try {
64
+ await ctx.write("workflow-runner:write:resume-run", {
65
+ runId: row.runId,
66
+ stepIndex: row.stepIndex,
67
+ });
68
+ }
69
+ catch (error) {
70
+ // skip: one row's dispatch failing (infra hiccup, not a business
71
+ // outcome — resume-run itself never throws for expected cases)
72
+ // must not stop the rest of this tenant's due rows from resuming.
73
+ ctx.log.warn(`[workflow-runner:resume-due-runs] runId=${row.runId} stepIndex=${row.stepIndex} dispatch failed: ${String(error)}`);
74
+ }
75
+ }
76
+ });
77
+ }, { dedupeOptions: {} });
78
+ }
79
+ /** @deprecated Use createWorkflowRunnerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
80
+ export const workflowRunnerFeature = createWorkflowRunnerFeature();
@@ -29,7 +29,7 @@
29
29
  // pipeline's result for the skipped waitForEvent step itself (see
30
30
  // resultKey on steps/wait-for-event.ts) — pre-seeded into stepsAcc below so
31
31
  // a subsequent step's resolver can read `ctx.steps[awaits.someKey]`.
32
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
32
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
33
33
  import { buildPipelineSteps, computeDefinitionFingerprint, describeWorkflowStepError, getStep, runStepList, SYSTEM_ROLE, unwrapWorkflowStepError, WORKFLOW_AGGREGATE_TYPE, WORKFLOW_RESUMED_TYPE, WORKFLOW_RETRY_SCHEDULED_TYPE, WORKFLOW_RUN_COMPLETED_TYPE, WORKFLOW_RUN_FAILED_TYPE, WORKFLOW_RUN_STARTED_TYPE, WORKFLOW_WAITING_FOR_EVENT_TYPE, WorkflowStepError, } from "@cosmicdrift/kumiko-framework/engine";
34
34
  import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
35
35
  import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
@@ -1,4 +1,4 @@
1
1
  export { workflowRunAggregateId } from "./aggregate-id.js";
2
2
  export { registerEventTrigger } from "./event-trigger.js";
3
- export { workflowRunnerFeature } from "./feature.js";
3
+ export { createWorkflowRunnerFeature, workflowRunnerFeature } from "./feature.js";
4
4
  export { startAndRunWorkflow, type WorkflowRunCompletedPayload, type WorkflowRunFailedPayload, type WorkflowRunStartedPayload, WorkflowSuspensionUnsupportedError, } from "./runner.js";
@@ -1,5 +1,5 @@
1
1
  // Public API of the workflow-runner bundled-feature.
2
2
  export { workflowRunAggregateId } from "./aggregate-id.js";
3
3
  export { registerEventTrigger } from "./event-trigger.js";
4
- export { workflowRunnerFeature } from "./feature.js";
4
+ export { createWorkflowRunnerFeature, workflowRunnerFeature } from "./feature.js";
5
5
  export { startAndRunWorkflow, WorkflowSuspensionUnsupportedError, } from "./runner.js";
@@ -11,7 +11,7 @@
11
11
  // No resume logic here — framework#2513 Phase 2 owns the job that reads
12
12
  // this table and dispatches the actual resume. This projection only writes
13
13
  // the rows.
14
- import { deleteMany, fetchOne, upsertOnConflict } from "@cosmicdrift/kumiko-framework/bun-db";
14
+ import { deleteMany, fetchOne, upsertOnConflict } from "@cosmicdrift/kumiko-framework/db";
15
15
  import { WORKFLOW_RESUMED_TYPE, WORKFLOW_RETRY_SCHEDULED_TYPE, WORKFLOW_RUN_COMPLETED_TYPE, WORKFLOW_RUN_FAILED_TYPE, WORKFLOW_WAITING_FOR_EVENT_TYPE, WORKFLOW_WAITING_TYPE, } from "@cosmicdrift/kumiko-framework/engine";
16
16
  import { workflowRunPendingTable } from "./tables.js";
17
17
  async function upsertPending(tx, row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-bundled-features",
3
- "version": "0.366.0",
3
+ "version": "0.368.0",
4
4
  "description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -226,6 +226,10 @@
226
226
  "types": "./dist/file-provider-s3/index.d.ts",
227
227
  "default": "./dist/file-provider-s3/index.js"
228
228
  },
229
+ "./file-provider-s3/lib": {
230
+ "types": "./dist/file-provider-s3/lib/index.d.ts",
231
+ "default": "./dist/file-provider-s3/lib/index.js"
232
+ },
229
233
  "./document-ingest-foundation": {
230
234
  "types": "./dist/document-ingest-foundation/index.d.ts",
231
235
  "default": "./dist/document-ingest-foundation/index.js"
@@ -524,12 +528,12 @@
524
528
  }
525
529
  },
526
530
  "dependencies": {
527
- "@cosmicdrift/kumiko-dispatcher-live": "0.366.0",
528
- "@cosmicdrift/kumiko-framework": "0.366.0",
529
- "@cosmicdrift/kumiko-headless": "0.366.0",
530
- "@cosmicdrift/kumiko-renderer": "0.366.0",
531
- "@cosmicdrift/kumiko-renderer-web": "0.366.0",
532
- "@cosmicdrift/kumiko-types": "0.366.0",
531
+ "@cosmicdrift/kumiko-dispatcher-live": "0.368.0",
532
+ "@cosmicdrift/kumiko-framework": "0.368.0",
533
+ "@cosmicdrift/kumiko-headless": "0.368.0",
534
+ "@cosmicdrift/kumiko-renderer": "0.368.0",
535
+ "@cosmicdrift/kumiko-renderer-web": "0.368.0",
536
+ "@cosmicdrift/kumiko-types": "0.368.0",
533
537
  "@mollie/api-client": "^4.5.0",
534
538
  "@node-rs/argon2": "^2.0.2",
535
539
  "@tiptap/core": "3.31.3",
@@ -772,6 +776,10 @@
772
776
  "types": "./dist/file-provider-s3/index.d.ts",
773
777
  "default": "./dist/file-provider-s3/index.js"
774
778
  },
779
+ "./file-provider-s3/lib": {
780
+ "types": "./dist/file-provider-s3/lib/index.d.ts",
781
+ "default": "./dist/file-provider-s3/lib/index.js"
782
+ },
775
783
  "./document-ingest-foundation": {
776
784
  "types": "./dist/document-ingest-foundation/index.d.ts",
777
785
  "default": "./dist/document-ingest-foundation/index.js"
@@ -1078,10 +1086,19 @@
1078
1086
  ],
1079
1087
  "devDependencies": {
1080
1088
  "@testing-library/user-event": "^14.6.1",
1081
- "@cosmicdrift/kumiko-locale-de": "0.366.0",
1082
- "@cosmicdrift/kumiko-locale-es": "0.366.0",
1083
- "@cosmicdrift/kumiko-renderer-mail-html": "0.366.0",
1089
+ "@cosmicdrift/kumiko-locale-de": "0.368.0",
1090
+ "@cosmicdrift/kumiko-locale-es": "0.368.0",
1091
+ "@cosmicdrift/kumiko-renderer-mail-html": "0.368.0",
1084
1092
  "jsqr": "^1.4.0",
1085
- "unpdf": "^1.8.1"
1093
+ "unpdf": "^1.8.1",
1094
+ "@cosmicdrift/kumiko-testing": "0.368.0"
1095
+ },
1096
+ "peerDependencies": {
1097
+ "@cosmicdrift/kumiko-testing": ">=0.366.0 <1.0.0"
1098
+ },
1099
+ "peerDependenciesMeta": {
1100
+ "@cosmicdrift/kumiko-testing": {
1101
+ "optional": true
1102
+ }
1086
1103
  }
1087
1104
  }
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "version": "0.368.0",
4
+ "type": "improvement",
5
+ "title": "calendarCapReservationHandle consumes a reservation per unit",
6
+ "detail": "`reserveCalendarCapUsage` now returns `reservationId`. `calendarCapReservationHandle(ctx, reservationId, { capName, periodStartIso })` returns a handle with `consume(units)` (turns reserved units into booked ones, counter unchanged) and `release()` (gives back the unconsumed rest). A handler reserves the worst case before the job is dispatched, the job consumes per written unit, so parallel dispatches can no longer overshoot the hard cap and a retry only counts what was written.\n\n`consume` beyond the still-reserved rest throws `CapReservationOverConsumedError` (422, `cap_reservation_over_consumed`). `consume` against a settle tombstone throws `CapReservationSettledError` (422, `cap_reservation_settled`); `release` against it is a no-op. When the reservation outlived its TTL and was swept, `consume` books the units directly, the way settle does for a missing row, without a hard-cap check."
7
+ },
8
+ {
9
+ "version": "0.368.0",
10
+ "type": "fix",
11
+ "title": "Swept or released calendar reservations remember the units consume booked",
12
+ "detail": "The reservation row now stores `consumed_amount`. A release or the TTL sweep gives back only the unconsumed rest. If units were consumed, it keeps the row as a released tombstone (`released_at` set, `amount` 0) until the tombstone TTL passes, instead of deleting it. A later `settle` subtracts the consumed units from the booking, and a `consume` after the sweep books its units directly and is remembered the same way, so the counter ends at exactly the settled total. `settle` below the consumed units throws `CapSettleBelowConsumedError` (422, `cap_settle_below_consumed`) in every state. Expired released tombstones are deleted by the sweep.",
13
+ "migration": "Apps with cap-counter generate a migration for the new columns store_cap_reservations.consumed_amount (integer NOT NULL DEFAULT 0) and store_cap_reservations.released_at (kumiko migrate generate)."
14
+ },
2
15
  {
3
16
  "version": "0.366.0",
4
17
  "type": "fix",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.367.0",
4
+ "type": "improvement",
5
+ "title": "Email channel can send through the tenant's own mail provider",
6
+ "detail": "EmailChannelOptions gets tenantTransport, a resolver called per send with the delivery channel context. mail-foundation exports tenantMailTransport for it: a tenant with a provider configured sends through its own transport, a broken provider fails the send, a tenant without a provider uses the app transport. The transport is built per send and never cached, and the tenant comes from the server-side delivery context only. ChannelContext now carries the tenant's config accessor as config. Without tenantTransport nothing changes."
7
+ },
2
8
  {
3
9
  "version": "0.365.0",
4
10
  "type": "fix",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.368.0",
4
+ "type": "fix",
5
+ "title": "forget-subject closes the login door for users whose stream is already deleted",
6
+ "detail": "forget-subject returned 500 (\"user lifecycle update failed ... not_found\") when the user stream was deleted but the read_users status still read active, leaving sessions and PATs alive. The erasure now appends the status-deleted user.updated event to that stream too, so the login door closes, the handler returns 200 and a read_users rebuild keeps the state."
7
+ },
2
8
  {
3
9
  "version": "0.366.0",
4
10
  "type": "fix",
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "version": "0.367.0",
4
+ "type": "improvement",
5
+ "title": "Delivery signs unsubscribe links itself",
6
+ "detail": "r.notification(name, { unsubscribe: true }) makes delivery put a signed data.unsubscribeUrl into every email of that notification when the service has unsubscribeLinks. User recipients get a user token, route recipients an address token (only with a blind-index key, otherwise no link). The token is scoped to tenant, notification and channel; a link the caller passes in data.unsubscribeUrl wins. runProdApp option unsubscribe: { secret } mounts createUnsubscribeRoutes and wires the links; the base URL comes from auth.publicOrigin, auth.mail.baseUrl or APP_BASE_URL, and without one boot warns and no link is added."
7
+ },
8
+ {
9
+ "version": "0.367.0",
10
+ "type": "improvement",
11
+ "title": "Unsubscribe links use the tenant's host and the mail's language, apps learn about address opt-outs",
12
+ "detail": "unsubscribeLinks and the runProdApp option unsubscribe take tenantOrigin, an app callback that returns the sending tenant's own origin (subdomain or custom domain) per send; null, a throw or a non-https value fall back to the app origin and never fail the send. The signed token now carries the mail's locale (notify option locale), so the confirmation, result and undo pages render in that language; tokens without it keep working and show English. A form post to the resubscribe route now answers with an HTML page, JSON callers are unchanged. After a committed address opt-out an app job declared with trigger on DeliveryHandlers.unsubscribeAddress receives addressHash, notificationType and channel (unsubscribeAddressPayloadSchema) with the tenant in ctx.triggeredBy.tenantId; hashUnsubscribeAddress(email) matches it to the app's own subscriber. UNSUBSCRIBE_PAGE_EN exports the English page texts, German and Spanish come with the locale packages."
13
+ },
2
14
  {
3
15
  "version": "0.366.0",
4
16
  "type": "improvement",
@@ -1 +1,10 @@
1
- []
1
+ [
2
+ {
3
+ "version": "0.368.0",
4
+ "type": "breaking",
5
+ "title": "The S3 file providers merge into createFileProviderS3Feature({ fromEnv })",
6
+ "detail": "createFileProviderS3Feature() mounts the per-tenant config provider as before. createFileProviderS3Feature({ fromEnv: true }) mounts the env-configured provider (feature name, provider key \"s3-env\" and requires unchanged). The S3 client helpers (createS3Provider, createS3ProviderFromEnv, parseS3EnvConfig, resolveForcePathStyle, S3ProviderConfig) move to the new subpath @cosmicdrift/kumiko-bundled-features/file-provider-s3/lib.\n\nThe subpaths file-provider-s3-env and files-provider-s3 keep working as deprecated re-exports and are removed in the first release after 2026-10-29.\n\nold -> new:\n fileProviderS3EnvFeature from .../file-provider-s3-env -> createFileProviderS3Feature({ fromEnv: true }) from .../file-provider-s3\n fileProviderS3Feature -> createFileProviderS3Feature()\n @cosmicdrift/kumiko-bundled-features/files-provider-s3 -> @cosmicdrift/kumiko-bundled-features/file-provider-s3/lib",
7
+ "migration": "Run `bun kumiko-upgrade --apply`. It rewrites the imports and the env feature mount, and reports `typeof fileProviderS3EnvFeature` and re-exports of it with file and line.",
8
+ "codemod": "scripts/codemod/s3-imports.ts"
9
+ }
10
+ ]
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.368.0",
4
+ "type": "improvement",
5
+ "title": "The token list screen takes a description and slots via listScreen",
6
+ "detail": "createPersonalAccessTokensFeature({ listScreen: { description, slots } }) sets the i18n description and the slots (for example a header component) of the api-tokens list, so an app can show instructions above the list and use the bundled screen directly instead of embedding it in its own dashboard. Without the option nothing changes. Both bundled token screens are now marked agent: { expose: false }, since the mint screen reveals the token plaintext."
7
+ },
2
8
  {
3
9
  "version": "0.365.0",
4
10
  "type": "fix",
@@ -1,4 +1,29 @@
1
1
  [
2
+ {
3
+ "version": "0.367.0",
4
+ "type": "improvement",
5
+ "title": "Notifications can keep their mail template system-only",
6
+ "detail": "r.notification(name, { systemOnly: true }) marks the stored mail template as a platform text. Tenant admins no longer see it in the template overview, list or detail, and creating a tenant version (upsert-tenant, copy-locale, import-bundle, also a SystemAdmin writing for a tenant) is refused with access_denied and templateResolver.errors.systemOnlyTemplate. SystemAdmins edit the system template as before, and the mail renderer always uses it, even if a tenant row exists from before."
7
+ },
8
+ {
9
+ "version": "0.367.0",
10
+ "type": "fix",
11
+ "title": "Rich text placeholders no longer nest paragraphs",
12
+ "detail": "A richText placeholder alone in a paragraph compiles into a div that keeps the paragraph attributes, and one inside other text renders inline with line breaks instead of its own paragraphs. Mails and PDFs no longer contain <p><p>. richText and stepIs are now reserved template variable names, like the other renderer helpers.",
13
+ "migration": "A notification that declares a template variable called richText, stepIs or percent fails at boot; rename the variable."
14
+ },
15
+ {
16
+ "version": "0.367.0",
17
+ "type": "improvement",
18
+ "title": "Template bundles with a logo can be seeded",
19
+ "detail": "seedSystemTemplateBundle(db, bundle, { dispatcher }) now seeds bundles that carry resources such as a logo by running the import-bundle-system write on the given seed dispatcher. With ifExists \"skip\" (default) nothing is written when every locale row already exists; if only some exist, the whole bundle is imported again. Without a dispatcher such a bundle still fails with a message that names the missing option."
20
+ },
21
+ {
22
+ "version": "0.367.0",
23
+ "type": "improvement",
24
+ "title": "Template conditions with data-if and a percent variable type",
25
+ "detail": "A paragraph, heading or table row with data-if=\"name\" renders only when the variable has a value (0 counts as a value); inside a repeat row the name refers to the row field, on the repeat row itself to the root variable. The sanitizer keeps the attribute, and template validation reports a condition on an undeclared variable. New variable type percent (templateVariable.percent()) takes percentage points and renders locale-aware, 12 as \"12 %\" in German and \"12%\" in English; the preview uses its example value. The document designer has no toolbar control for conditions yet; the attribute survives editing."
26
+ },
2
27
  {
3
28
  "version": "0.365.0",
4
29
  "type": "breaking",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.368.0",
4
+ "type": "fix",
5
+ "title": "Soft-deleted users no longer count as active principals",
6
+ "detail": "A user deleted through the entity executor keeps its last status (usually active) with isDeleted set. principalStatusPlugin, the session checker and the PAT role resolver only looked at the status, so existing sessions and tokens of such a user stayed valid. They now treat isDeleted as blocked (session \"blocked\", PAT 401, principal_blocked for membership resolution) through the new isPrincipalRowBlocked predicate."
7
+ },
2
8
  {
3
9
  "version": "0.364.0",
4
10
  "type": "fix",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.367.0",
4
+ "type": "fix",
5
+ "title": "Tests seed tenant memberships and events through the framework",
6
+ "detail": "Test-only change. Integration tests create read_tenant_memberships from tenantMembershipEntity and seed rows with seedRow instead of hand-written DDL and raw INSERTs. Fake events go through the event-store append, and backdated audit events are written with runSeedWritesAt instead of an UPDATE on created_at. No runtime behavior changes."
7
+ },
2
8
  {
3
9
  "version": "0.365.0",
4
10
  "type": "improvement",
@@ -1,3 +0,0 @@
1
- export declare const fileProviderS3EnvFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
2
- readonly exports: void;
3
- };
@@ -1,46 +0,0 @@
1
- // kumiko-feature-version: 1
2
- //
3
- // file-provider-s3-env — S3 file provider configured entirely from
4
- // process.env. ONE shared bucket for ALL tenants: wire it by setting the
5
- // `S3_*` env vars + mounting — no per-tenant admin seeding and no
6
- // `secrets`-feature dependency.
7
- //
8
- // **vs file-provider-s3:** the config-based `"s3"` provider owns per-tenant
9
- // config keys + an encrypted `s3.secretAccessKey` secret (per-tenant
10
- // buckets, admin-seeded). This `"s3-env"` provider reads one credential set
11
- // from env and serves every tenant from one bucket — the
12
- // Hetzner-Object-Storage / single-bucket deploy case. Tenant isolation
13
- // still holds: file keys carry the tenant (export ZIPs:
14
- // `exports/<tenantId>/<jobId>.zip`) or are globally-unique UUIDs (fileRefs).
15
- //
16
- // **Pattern-Vorbild:** mirrors file-provider-inmemory (zero admin seeding,
17
- // only the file-foundation plugin-point required).
18
- //
19
- // **Env vars** (read by createS3ProviderFromEnv, prefix `S3_`):
20
- // required — S3_BUCKET, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY
21
- // optional — S3_ENDPOINT (S3-compat stores incl. Hetzner Object Storage),
22
- // S3_FORCE_PATH_STYLE
23
- // Missing required vars throw on the FIRST file op (inside the export cron).
24
- // The user-data-rights boot guard surfaces that at boot instead.
25
- import { createS3ProviderFromEnv } from "@cosmicdrift/kumiko-bundled-features/files-provider-s3";
26
- import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
27
- const FEATURE_NAME = "file-provider-s3-env";
28
- export const fileProviderS3EnvFeature = defineFeature(FEATURE_NAME, (r) => {
29
- r.describe('Registers an `"s3-env"` provider for `file-foundation` that reads one S3 credential set from `process.env` (`S3_BUCKET`/`S3_REGION`/`S3_ACCESS_KEY`/`S3_SECRET_KEY`, optional `S3_ENDPOINT`/`S3_FORCE_PATH_STYLE`) and serves every tenant from one shared bucket — no per-tenant config or secret seeding. Use this for single-bucket S3-compatible deploys (e.g. Hetzner Object Storage); use `file-provider-s3` instead when each tenant needs its own bucket/credentials.');
30
- r.uiHints({
31
- displayLabel: "File Provider · S3 (env)",
32
- category: "storage",
33
- recommended: false,
34
- });
35
- // No requires on "config" or "secrets" — credentials come from
36
- // env, not the per-tenant config + secrets store. Only the file-foundation
37
- // plugin-extension-point must be mounted.
38
- r.requires({ features: ["file-foundation"] });
39
- const plugin = {
40
- // tenantId ignored: one shared bucket serves all tenants (isolation via
41
- // tenant-prefixed / UUID keys). Built fresh per call like file-provider-s3;
42
- // the S3 client opens no connection at construction.
43
- build: async (_ctx, _tenantId) => createS3ProviderFromEnv(), // @wrapper-known semantic-alias
44
- };
45
- r.useExtension("fileProvider", "s3-env", plugin);
46
- });