@cosmicdrift/kumiko-bundled-features 0.367.0 → 0.369.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 (359) 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 +13 -5
  44. package/dist/channel-email/email-channel.js +17 -3
  45. package/dist/channel-email/feature.js +1 -1
  46. package/dist/channel-email/index.d.ts +1 -1
  47. package/dist/channel-email/index.js +1 -1
  48. package/dist/channel-in-app/handlers/inbox.query.js +1 -1
  49. package/dist/channel-in-app/handlers/mark-all-read.write.js +1 -1
  50. package/dist/channel-in-app/handlers/mark-read.write.js +1 -1
  51. package/dist/channel-in-app/handlers/unread-count.query.js +1 -1
  52. package/dist/channel-in-app/tables.js +1 -2
  53. package/dist/compliance-profiles/handlers/for-tenant.query.js +1 -1
  54. package/dist/compliance-profiles/handlers/needs-profile.query.js +1 -1
  55. package/dist/compliance-profiles/handlers/set-profile.write.js +1 -2
  56. package/dist/compliance-profiles/resolve-for-tenant.js +1 -1
  57. package/dist/compliance-profiles/seeding.js +3 -5
  58. package/dist/compliance-profiles-ops/index.d.ts +8 -0
  59. package/dist/compliance-profiles-ops/index.js +19 -15
  60. package/dist/config/db/queries/resolver.js +1 -1
  61. package/dist/config/handlers/reencrypt.job.js +2 -2
  62. package/dist/config/resolver.js +1 -1
  63. package/dist/config/web/i18n.js +1 -2
  64. package/dist/config/write-helpers.js +1 -1
  65. package/dist/crypto-shredding/handlers/forget-subject.write.js +6 -3
  66. package/dist/custom-fields/db/queries/field-access.js +1 -1
  67. package/dist/custom-fields/db/queries/projection.js +1 -1
  68. package/dist/custom-fields/db/queries/quota.js +1 -1
  69. package/dist/custom-fields/db/queries/retention.js +1 -2
  70. package/dist/custom-fields/db/queries/user-data-rights.js +1 -1
  71. package/dist/custom-fields/feature.d.ts +20 -2
  72. package/dist/custom-fields/feature.js +9 -13
  73. package/dist/custom-fields/handlers/clear-custom-field.write.js +2 -2
  74. package/dist/custom-fields/handlers/delete-system-field.write.js +2 -2
  75. package/dist/custom-fields/handlers/delete-tenant-field.write.js +2 -2
  76. package/dist/custom-fields/handlers/set-custom-field.write.js +2 -2
  77. package/dist/custom-fields/wire-for-entity.js +4 -4
  78. package/dist/data-retention/resolve-for-tenant.js +1 -1
  79. package/dist/data-retention/run-retention-cleanup.js +17 -13
  80. package/dist/delivery/address-opt-out.js +1 -2
  81. package/dist/delivery/attempt-log-retention.js +1 -1
  82. package/dist/delivery/channel-context.js +1 -1
  83. package/dist/delivery/db/queries/address-opt-outs.js +1 -1
  84. package/dist/delivery/db/queries/preferences.js +1 -1
  85. package/dist/delivery/delivery-service.js +16 -7
  86. package/dist/delivery/feature.js +2 -2
  87. package/dist/delivery/handlers/log.query.js +2 -3
  88. package/dist/delivery/handlers/preferences.query.js +1 -1
  89. package/dist/delivery/index.d.ts +3 -2
  90. package/dist/delivery/index.js +3 -2
  91. package/dist/delivery/unsubscribe.d.ts +13 -0
  92. package/dist/delivery/unsubscribe.js +32 -27
  93. package/dist/delivery/upsert-preference.js +1 -2
  94. package/dist/derivatives-sharp/feature.d.ts +4 -0
  95. package/dist/derivatives-sharp/feature.js +15 -11
  96. package/dist/derivatives-sharp/index.d.ts +1 -1
  97. package/dist/derivatives-sharp/index.js +1 -1
  98. package/dist/document-ingest-foundation/feature.d.ts +7 -0
  99. package/dist/document-ingest-foundation/feature.js +94 -90
  100. package/dist/document-ingest-foundation/forget-extract-with-file-ref.js +3 -3
  101. package/dist/document-ingest-foundation/index.d.ts +1 -1
  102. package/dist/document-ingest-foundation/index.js +1 -1
  103. package/dist/feature-toggles/global-feature-state-table.js +1 -2
  104. package/dist/feature-toggles/handlers/set.write.js +3 -5
  105. package/dist/feature-toggles/toggle-runtime.js +1 -1
  106. package/dist/file-derivatives/feature.d.ts +1 -0
  107. package/dist/file-derivatives/feature.js +2 -1
  108. package/dist/file-derivatives/handlers/public-variant-by-file-ref.query.js +1 -1
  109. package/dist/file-derivatives/handlers/public-variant.query.js +1 -1
  110. package/dist/file-foundation/feature.d.ts +6 -0
  111. package/dist/file-foundation/feature.js +29 -25
  112. package/dist/file-foundation/index.d.ts +1 -1
  113. package/dist/file-foundation/index.js +1 -1
  114. package/dist/file-foundation/read-file-ref-content.js +1 -1
  115. package/dist/file-provider-inmemory/feature.d.ts +4 -0
  116. package/dist/file-provider-inmemory/feature.js +24 -20
  117. package/dist/file-provider-inmemory/index.d.ts +1 -1
  118. package/dist/file-provider-inmemory/index.js +1 -1
  119. package/dist/file-provider-s3/env-feature.d.ts +3 -0
  120. package/dist/file-provider-s3/env-feature.js +46 -0
  121. package/dist/file-provider-s3/feature.d.ts +26 -0
  122. package/dist/file-provider-s3/feature.js +84 -72
  123. package/dist/file-provider-s3/index.d.ts +1 -1
  124. package/dist/file-provider-s3/index.js +1 -1
  125. package/dist/file-provider-s3/lib/index.d.ts +3 -0
  126. package/dist/file-provider-s3/lib/index.js +2 -0
  127. package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.js +19 -19
  128. package/dist/file-provider-s3-env/index.d.ts +8 -1
  129. package/dist/file-provider-s3-env/index.js +7 -2
  130. package/dist/files-provider-s3/index.d.ts +5 -3
  131. package/dist/files-provider-s3/index.js +5 -2
  132. package/dist/files-tenant-data/handlers/sweep-orphaned-derivatives.job.js +1 -1
  133. package/dist/files-tenant-data/hooks.js +1 -2
  134. package/dist/folders/feature.d.ts +6 -2
  135. package/dist/folders/feature.js +4 -2
  136. package/dist/folders-user-data/index.d.ts +4 -0
  137. package/dist/folders-user-data/index.js +21 -17
  138. package/dist/form-draft/db/queries/cleanup.js +1 -1
  139. package/dist/form-draft/db/queries/draft-count.js +1 -1
  140. package/dist/form-draft/db/queries/owned-file-refs.js +1 -2
  141. package/dist/form-draft/feature.d.ts +4 -0
  142. package/dist/form-draft/feature.js +5 -1
  143. package/dist/form-draft/handlers/cleanup.job.js +2 -2
  144. package/dist/form-draft/index.d.ts +1 -1
  145. package/dist/form-draft/index.js +1 -1
  146. package/dist/form-draft/lookup.js +1 -1
  147. package/dist/form-draft-user-data/index.d.ts +4 -0
  148. package/dist/form-draft-user-data/index.js +13 -9
  149. package/dist/inbound-mail-foundation/feature.d.ts +4 -0
  150. package/dist/inbound-mail-foundation/feature.js +151 -147
  151. package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +1 -2
  152. package/dist/inbound-mail-foundation/index.d.ts +1 -1
  153. package/dist/inbound-mail-foundation/index.js +1 -1
  154. package/dist/inbound-mail-foundation/oauth-access-token.js +1 -2
  155. package/dist/inbound-mail-foundation/projection.js +1 -2
  156. package/dist/inbound-mail-foundation/watch-supervisor.js +1 -1
  157. package/dist/inbound-provider-imap/feature.d.ts +4 -0
  158. package/dist/inbound-provider-imap/feature.js +16 -12
  159. package/dist/inbound-provider-imap/index.d.ts +1 -1
  160. package/dist/inbound-provider-imap/index.js +1 -1
  161. package/dist/inbound-provider-inmemory/feature.d.ts +4 -0
  162. package/dist/inbound-provider-inmemory/feature.js +14 -10
  163. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  164. package/dist/inbound-provider-inmemory/index.js +1 -1
  165. package/dist/jobs/db/queries/retention.js +1 -1
  166. package/dist/jobs/db/queries/stale-run-sweep.js +1 -1
  167. package/dist/jobs/handlers/detail.query.js +1 -1
  168. package/dist/jobs/handlers/list.query.js +1 -2
  169. package/dist/jobs/handlers/retry.write.js +1 -1
  170. package/dist/jobs/handlers/tenant-failures.query.js +1 -1
  171. package/dist/jobs/handlers/tenant-runs.query.js +1 -1
  172. package/dist/jobs/job-run-logger.js +1 -2
  173. package/dist/jobs/tenant-job-failure-table.js +1 -2
  174. package/dist/jobs/tenant-job-run-table.js +1 -2
  175. package/dist/ledger/feature.d.ts +6 -2
  176. package/dist/ledger/feature.js +4 -2
  177. package/dist/mail-foundation/feature.d.ts +11 -0
  178. package/dist/mail-foundation/feature.js +52 -42
  179. package/dist/mail-foundation/i18n.d.ts +14 -0
  180. package/dist/mail-foundation/i18n.js +8 -0
  181. package/dist/mail-foundation/index.d.ts +1 -1
  182. package/dist/mail-foundation/index.js +1 -1
  183. package/dist/mail-transport-inmemory/feature.d.ts +4 -0
  184. package/dist/mail-transport-inmemory/feature.js +26 -16
  185. package/dist/mail-transport-inmemory/index.d.ts +1 -1
  186. package/dist/mail-transport-inmemory/index.js +1 -1
  187. package/dist/mail-transport-smtp/config-keys.d.ts +7 -0
  188. package/dist/mail-transport-smtp/config-keys.js +65 -0
  189. package/dist/mail-transport-smtp/feature.d.ts +17 -1
  190. package/dist/mail-transport-smtp/feature.js +58 -80
  191. package/dist/mail-transport-smtp/i18n.d.ts +41 -0
  192. package/dist/mail-transport-smtp/i18n.js +28 -0
  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 +4 -0
  224. package/dist/secrets/feature.js +19 -6
  225. package/dist/secrets/handlers/delete.write.js +3 -2
  226. package/dist/secrets/handlers/rotate.job.js +2 -3
  227. package/dist/secrets/handlers/set.write.js +3 -2
  228. package/dist/secrets/secrets-context.js +3 -4
  229. package/dist/sessions/db/queries/cleanup.js +1 -1
  230. package/dist/sessions/handlers/detail.query.js +1 -1
  231. package/dist/sessions/handlers/list.query.js +2 -2
  232. package/dist/sessions/handlers/mine.query.js +1 -1
  233. package/dist/sessions/handlers/revoke-all-for-user.write.js +1 -1
  234. package/dist/sessions/handlers/revoke-all-others.write.js +1 -1
  235. package/dist/sessions/handlers/revoke.write.js +1 -1
  236. package/dist/sessions/session-callbacks.js +4 -6
  237. package/dist/sessions/testing.d.ts +1 -1
  238. package/dist/tags/feature.d.ts +6 -2
  239. package/dist/tags/feature.js +4 -2
  240. package/dist/template-resolver/api.js +1 -1
  241. package/dist/template-resolver/constants.d.ts +0 -1
  242. package/dist/template-resolver/constants.js +0 -1
  243. package/dist/template-resolver/handlers/bundle-import.js +1 -1
  244. package/dist/template-resolver/handlers/by-slug.query.js +1 -1
  245. package/dist/template-resolver/handlers/by-tenant.query.js +1 -2
  246. package/dist/template-resolver/handlers/collection-item.query.js +1 -1
  247. package/dist/template-resolver/handlers/collection-list.query.js +1 -2
  248. package/dist/template-resolver/handlers/collection-set.write.js +1 -1
  249. package/dist/template-resolver/handlers/copy-locale.write.js +1 -1
  250. package/dist/template-resolver/handlers/diff-to-system.query.js +1 -1
  251. package/dist/template-resolver/handlers/export-bundle.query.js +1 -1
  252. package/dist/template-resolver/handlers/find-by-id.query.js +1 -1
  253. package/dist/template-resolver/handlers/layout-source.query.js +1 -1
  254. package/dist/template-resolver/handlers/list.query.js +1 -1
  255. package/dist/template-resolver/handlers/overview.query.js +1 -1
  256. package/dist/template-resolver/handlers/reset-to-system.write.js +1 -1
  257. package/dist/template-resolver/handlers/resource-remove.write.js +1 -1
  258. package/dist/template-resolver/handlers/send-test.write.js +4 -2
  259. package/dist/template-resolver/handlers/set.write.js +1 -1
  260. package/dist/template-resolver/handlers/template-write.js +1 -1
  261. package/dist/template-resolver/handlers/tenant-overrides.query.js +1 -1
  262. package/dist/template-resolver/handlers/toggle-status.write.js +1 -1
  263. package/dist/template-resolver/handlers/usage.query.js +1 -1
  264. package/dist/template-resolver/handlers/validate.query.js +1 -1
  265. package/dist/template-resolver/seeding.js +3 -4
  266. package/dist/template-resolver/store-template-resource.js +1 -1
  267. package/dist/template-resolver/template-preview.js +1 -1
  268. package/dist/template-resolver/template-resources.js +1 -1
  269. package/dist/template-resolver/testing.js +1 -1
  270. package/dist/template-resolver-user-data/index.d.ts +4 -0
  271. package/dist/template-resolver-user-data/index.js +17 -13
  272. package/dist/tenant/handlers/active-tenant-ids.query.js +1 -1
  273. package/dist/tenant/handlers/add-member.write.js +1 -2
  274. package/dist/tenant/handlers/cancel-invitation.write.js +1 -1
  275. package/dist/tenant/handlers/invitations.query.js +1 -1
  276. package/dist/tenant/handlers/me.query.js +1 -1
  277. package/dist/tenant/handlers/member-directory.query.js +1 -1
  278. package/dist/tenant/handlers/members.query.js +1 -1
  279. package/dist/tenant/handlers/memberships.query.js +1 -1
  280. package/dist/tenant/handlers/remove-member.write.js +1 -2
  281. package/dist/tenant/handlers/resolve-user-ids.query.js +1 -1
  282. package/dist/tenant/handlers/team-list.query.js +1 -1
  283. package/dist/tenant/handlers/tenant-directory.query.js +1 -1
  284. package/dist/tenant/handlers/update-member-roles.write.js +1 -2
  285. package/dist/tenant/invited-membership.js +2 -3
  286. package/dist/tenant/last-tenant-admin.js +1 -2
  287. package/dist/tenant/seeding.js +12 -6
  288. package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +1 -2
  289. package/dist/tenant-lifecycle/handlers/request-destruction.write.js +1 -2
  290. package/dist/tenant-lifecycle/lib/revoke-tenant-sessions.js +1 -1
  291. package/dist/tenant-lifecycle/lifecycle-gate.js +1 -1
  292. package/dist/tenant-lifecycle/run-tenant-destroy.js +3 -5
  293. package/dist/tenant-lifecycle/stages.js +10 -6
  294. package/dist/tenant-lifecycle/testing.d.ts +1 -1
  295. package/dist/tenant-lifecycle/testing.js +2 -2
  296. package/dist/tenant-settings/feature.d.ts +1 -0
  297. package/dist/tenant-settings/feature.js +2 -1
  298. package/dist/tier-engine/feature.d.ts +1 -8
  299. package/dist/tier-engine/feature.js +71 -78
  300. package/dist/tier-engine/handlers/get-tenant-tier.query.js +2 -3
  301. package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -2
  302. package/dist/user/db/queries/stream-tenant-backfill.js +1 -1
  303. package/dist/user/handlers/create.write.js +1 -2
  304. package/dist/user/handlers/find-for-auth.query.js +1 -1
  305. package/dist/user/handlers/list.query.js +1 -1
  306. package/dist/user/handlers/update-roles.js +1 -2
  307. package/dist/user/index.d.ts +1 -1
  308. package/dist/user/index.js +1 -1
  309. package/dist/user/invited-global-roles.js +2 -3
  310. package/dist/user/principal-status.d.ts +4 -0
  311. package/dist/user/principal-status.js +9 -3
  312. package/dist/user/resolve-display-names.js +1 -1
  313. package/dist/user/seeding.js +5 -6
  314. package/dist/user-data-rights/audit-download.js +2 -2
  315. package/dist/user-data-rights/db/queries/export-jobs.js +1 -1
  316. package/dist/user-data-rights/db/queries/forget-cleanup.js +1 -1
  317. package/dist/user-data-rights/feature.js +7 -4
  318. package/dist/user-data-rights/handlers/download-by-job.query.js +1 -1
  319. package/dist/user-data-rights/handlers/download-by-token.query.js +1 -1
  320. package/dist/user-data-rights/handlers/export-status.query.js +1 -1
  321. package/dist/user-data-rights/handlers/list-download-attempts.query.js +1 -1
  322. package/dist/user-data-rights/handlers/my-audit-log.query.js +1 -1
  323. package/dist/user-data-rights/handlers/request-export.write.js +1 -2
  324. package/dist/user-data-rights/handlers/run-forget-cleanup.write.js +3 -3
  325. package/dist/user-data-rights/lib/default-mailers.d.ts +3 -0
  326. package/dist/user-data-rights/lib/default-mailers.js +25 -3
  327. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.d.ts +1 -1
  328. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.js +1 -1
  329. package/dist/user-data-rights/lib/update-user-lifecycle.d.ts +1 -0
  330. package/dist/user-data-rights/lib/update-user-lifecycle.js +3 -3
  331. package/dist/user-data-rights/run-export-jobs.js +2 -3
  332. package/dist/user-data-rights/run-forget-cleanup.js +9 -5
  333. package/dist/user-data-rights/run-user-export.js +9 -5
  334. package/dist/waitlist/handlers/invite.write.js +1 -2
  335. package/dist/waitlist/handlers/reject.write.js +1 -1
  336. package/dist/waitlist/lib.js +1 -2
  337. package/dist/workflow-runner/event-subscriber.js +1 -1
  338. package/dist/workflow-runner/feature.d.ts +4 -0
  339. package/dist/workflow-runner/feature.js +44 -40
  340. package/dist/workflow-runner/handlers/resume-run.write.js +1 -1
  341. package/dist/workflow-runner/index.d.ts +1 -1
  342. package/dist/workflow-runner/index.js +1 -1
  343. package/dist/workflow-runner/pending-projection.js +1 -1
  344. package/package.json +28 -11
  345. package/src/cap-counter/changes.json +13 -0
  346. package/src/channel-email/changes.json +7 -0
  347. package/src/crypto-shredding/changes.json +6 -0
  348. package/src/delivery/changes.json +6 -0
  349. package/src/file-provider-s3/changes.json +10 -1
  350. package/src/mail-transport-smtp/changes.json +7 -0
  351. package/src/personal-access-tokens/changes.json +6 -0
  352. package/src/secrets/changes.json +6 -0
  353. package/src/user/changes.json +6 -0
  354. package/src/user-data-rights/changes.json +6 -0
  355. package/dist/file-provider-s3-env/feature.d.ts +0 -3
  356. package/dist/file-provider-s3-env/feature.js +0 -46
  357. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.d.ts +0 -0
  358. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.js +0 -0
  359. /package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.d.ts +0 -0
@@ -3,7 +3,7 @@ export declare const mailTransportSmtpEnvSchema: import("zod").ZodObject<{
3
3
  KUMIKO_MAIL_ALLOWED_PRIVATE_HOSTS: import("zod").ZodOptional<import("zod").ZodString>;
4
4
  }, import("zod/v4/core").$strip>;
5
5
  export declare function setSmtpMailHostLookup(fn: typeof lookup | undefined): void;
6
- export declare const mailTransportSmtpFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
6
+ export declare function createMailTransportSmtpFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
7
7
  readonly exports: {
8
8
  /** Config-key-handles — typed reads via `ctx.config(...)` in
9
9
  * consumer handlers. */
@@ -11,8 +11,24 @@ export declare const mailTransportSmtpFeature: import("@cosmicdrift/kumiko-types
11
11
  readonly host: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
12
12
  readonly port: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"number">;
13
13
  readonly secure: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"boolean">;
14
+ readonly authUser: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
14
15
  readonly from: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
16
+ };
17
+ /** Secret-handle for the SMTP password. */
18
+ password: import("@cosmicdrift/kumiko-types/feature").SecretKeyHandle;
19
+ };
20
+ };
21
+ /** @deprecated Use createMailTransportSmtpFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
22
+ export declare const mailTransportSmtpFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
23
+ readonly exports: {
24
+ /** Config-key-handles — typed reads via `ctx.config(...)` in
25
+ * consumer handlers. */
26
+ configKeys: {
27
+ readonly host: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
28
+ readonly port: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"number">;
29
+ readonly secure: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"boolean">;
15
30
  readonly authUser: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
31
+ readonly from: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
16
32
  };
17
33
  /** Secret-handle for the SMTP password. */
18
34
  password: import("@cosmicdrift/kumiko-types/feature").SecretKeyHandle;
@@ -28,9 +28,11 @@ import { createSmtpTransport, } from "@cosmicdrift/kumiko-bundled-features/chann
28
28
  import { BlockedHostError, HostResolutionError, mailAllowedPrivateHostsEnvSchema, readAllowedPrivateMailHostsFromEnv, requireDefined, requireNonEmpty, requireSecretSet, resolveMailConnectTarget, } from "@cosmicdrift/kumiko-bundled-features/foundation-shared";
29
29
  import { MAIL_TRANSPORT_EXTENSION, } from "@cosmicdrift/kumiko-bundled-features/mail-foundation";
30
30
  import { requireSecretsContext } from "@cosmicdrift/kumiko-bundled-features/secrets";
31
- import { access, createTenantConfig, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
31
+ import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
32
32
  import { UnconfiguredError } from "@cosmicdrift/kumiko-framework/errors";
33
33
  import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
34
+ import { SMTP_CONFIG_KEYS } from "./config-keys.js";
35
+ import { MAIL_TRANSPORT_SMTP_I18N } from "./i18n.js";
34
36
  const FEATURE_NAME = "mail-transport-smtp";
35
37
  const log = createFallbackLogger(FEATURE_NAME);
36
38
  // Operator escape hatch for an internal relay or a dev/test SMTP server
@@ -50,82 +52,58 @@ export function setSmtpMailHostLookup(fn) {
50
52
  // =============================================================================
51
53
  // Feature-definition
52
54
  // =============================================================================
53
- export const mailTransportSmtpFeature = defineFeature(FEATURE_NAME, (r) => {
54
- r.describe('Registers itself as the `"smtp"` provider for `mail-foundation` and owns the per-tenant config keys (`host`, `port`, `secure`, `from`, `authUser`) and the encrypted `smtp.password` secret. Tenants set `mail-foundation`\'s `provider` config key to `"smtp"` to activate it; set the SMTP credentials via the admin UI or a seed handler before sending the first mail.');
55
- r.uiHints({
56
- displayLabel: "Mail Transport · SMTP",
57
- category: "notifications",
58
- recommended: false,
59
- });
60
- r.requires({ features: ["config"] });
61
- r.requires({ features: ["secrets"] });
62
- r.requires({ features: ["mail-foundation"] });
63
- r.envSchema(mailTransportSmtpEnvSchema);
64
- // Provider-secret. Sensitive: redact-helper for admin-UI display.
65
- const password = r.secret("smtp.password", {
66
- label: { en: "SMTP password" },
67
- hint: {
68
- en: "Login password at the SMTP server. Brevo/Postmark/SES call it 'API key' or 'SMTP credentials'.",
69
- },
70
- redact: (plaintext) => {
71
- if (plaintext.length < 8)
72
- return "•".repeat(plaintext.length);
73
- return `${plaintext.slice(0, 3)}...${plaintext.slice(-2)}`;
74
- },
75
- scope: "tenant",
76
- // required: true ↔ the missing-secret throw in readPassword — keep in sync.
77
- required: true,
78
- });
79
- // required: true ↔ the requireNonEmpty calls in buildSmtpTransport — keep in sync.
80
- const configKeys = r.config({
81
- keys: {
82
- host: createTenantConfig("text", {
83
- required: true,
84
- default: "",
85
- write: access.roles("TenantAdmin", "SystemAdmin"),
86
- read: access.roles("TenantAdmin", "SystemAdmin"),
87
- }),
88
- port: createTenantConfig("number", {
89
- default: 587,
90
- bounds: { min: 1, max: 65535 },
91
- write: access.roles("TenantAdmin", "SystemAdmin"),
92
- }),
93
- secure: createTenantConfig("boolean", {
94
- default: false,
95
- write: access.roles("TenantAdmin", "SystemAdmin"),
96
- }),
97
- from: createTenantConfig("text", {
98
- required: true,
99
- default: "",
100
- write: access.roles("TenantAdmin", "SystemAdmin"),
101
- read: access.roles("TenantAdmin", "SystemAdmin"),
102
- }),
103
- authUser: createTenantConfig("text", {
104
- required: true,
105
- default: "",
106
- write: access.roles("TenantAdmin", "SystemAdmin"),
107
- read: access.roles("TenantAdmin", "SystemAdmin"),
108
- }),
109
- },
110
- });
111
- // Plugin: register against mail-foundation's "mailTransport" extension.
112
- // `entityName` "smtp" is what tenants set in mail-foundation's
113
- // `provider` config-key to pick this transport.
114
- const plugin = {
115
- build: async (ctx, tenantId) => buildSmtpTransport(ctx, tenantId), // @wrapper-known semantic-alias
116
- };
117
- r.useExtension(MAIL_TRANSPORT_EXTENSION, "smtp", plugin);
118
- return {
119
- /** Config-key-handles — typed reads via `ctx.config(...)` in
120
- * consumer handlers. */
121
- configKeys,
122
- /** Secret-handle for the SMTP password. */
123
- password,
124
- };
125
- });
55
+ export function createMailTransportSmtpFeature() {
56
+ return defineFeature(FEATURE_NAME, (r) => {
57
+ r.describe('Registers itself as the `"smtp"` provider for `mail-foundation` and owns the per-tenant config keys (`host`, `port`, `secure`, `from`, `authUser`) and the encrypted `smtp.password` secret. Tenants set `mail-foundation`\'s `provider` config key to `"smtp"` to activate it; set the SMTP credentials via the admin UI or a seed handler before sending the first mail.');
58
+ r.uiHints({
59
+ displayLabel: "Mail Transport · SMTP",
60
+ category: "notifications",
61
+ recommended: false,
62
+ });
63
+ r.requires({ features: ["config"] });
64
+ r.requires({ features: ["secrets"] });
65
+ r.requires({ features: ["mail-foundation"] });
66
+ r.envSchema(mailTransportSmtpEnvSchema);
67
+ // Provider-secret. Sensitive: redact-helper for admin-UI display.
68
+ const password = r.secret("smtp.password", {
69
+ label: { en: "SMTP password" },
70
+ hint: {
71
+ en: "Login password at the SMTP server. Brevo/Postmark/SES call it 'API key' or 'SMTP credentials'.",
72
+ },
73
+ redact: (plaintext) => {
74
+ if (plaintext.length < 8)
75
+ return "•".repeat(plaintext.length);
76
+ return `${plaintext.slice(0, 3)}...${plaintext.slice(-2)}`;
77
+ },
78
+ scope: "tenant",
79
+ // required: true ↔ the missing-secret throw in readPassword — keep in sync.
80
+ required: true,
81
+ });
82
+ const configKeys = r.config({ keys: SMTP_CONFIG_KEYS });
83
+ r.translations({ keys: MAIL_TRANSPORT_SMTP_I18N });
84
+ // Plugin: register against mail-foundation's "mailTransport" extension.
85
+ // `entityName` "smtp" is what tenants set in mail-foundation's
86
+ // `provider` config-key to pick this transport.
87
+ const plugin = {
88
+ build: async (ctx, tenantId) => buildSmtpTransport(ctx, tenantId), // @wrapper-known semantic-alias
89
+ };
90
+ r.useExtension(MAIL_TRANSPORT_EXTENSION, "smtp", plugin);
91
+ return {
92
+ /** Config-key-handles — typed reads via `ctx.config(...)` in
93
+ * consumer handlers. */
94
+ configKeys,
95
+ /** Secret-handle for the SMTP password. */
96
+ password,
97
+ };
98
+ }, { dedupeOptions: {} });
99
+ }
100
+ // The typed handles below come from one shared instance; each factory call builds its own handle objects.
101
+ const sharedMailTransportSmtpFeature = createMailTransportSmtpFeature();
102
+ /** @deprecated Use createMailTransportSmtpFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
103
+ export const mailTransportSmtpFeature = sharedMailTransportSmtpFeature;
126
104
  /** Typed handle for the SMTP password — exported so seeds + tests can
127
105
  * set it via `secrets:write:set` with the full qualified-name. */
128
- export const SMTP_PASSWORD = mailTransportSmtpFeature.exports.password;
106
+ export const SMTP_PASSWORD = sharedMailTransportSmtpFeature.exports.password;
129
107
  // =============================================================================
130
108
  // Internal: build the EmailTransport from tenant config + secret
131
109
  // =============================================================================
@@ -146,11 +124,11 @@ async function buildSmtpTransport(ctx, tenantId) {
146
124
  throw new Error(`${FEATURE_NAME}: ctx.config is missing — feature requires the config-feature mounted in the registry`);
147
125
  }
148
126
  const SMTP_HINT = "Set via tenant-admin UI or seed-handler before sending mail.";
149
- const host = requireNonEmpty(await ctxConfig(mailTransportSmtpFeature.exports.configKeys.host), FEATURE_NAME, "host", SMTP_HINT);
150
- const port = requireDefined(await ctxConfig(mailTransportSmtpFeature.exports.configKeys.port), FEATURE_NAME, "port"); // @cast-boundary engine-payload
151
- const secure = requireDefined(await ctxConfig(mailTransportSmtpFeature.exports.configKeys.secure), FEATURE_NAME, "secure"); // @cast-boundary engine-payload
152
- const from = requireNonEmpty(await ctxConfig(mailTransportSmtpFeature.exports.configKeys.from), FEATURE_NAME, "from", SMTP_HINT);
153
- const authUser = requireNonEmpty(await ctxConfig(mailTransportSmtpFeature.exports.configKeys.authUser), FEATURE_NAME, "authUser", SMTP_HINT);
127
+ const host = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.host), FEATURE_NAME, "host", SMTP_HINT);
128
+ const port = requireDefined(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.port), FEATURE_NAME, "port"); // @cast-boundary engine-payload
129
+ const secure = requireDefined(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.secure), FEATURE_NAME, "secure"); // @cast-boundary engine-payload
130
+ const from = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.from), FEATURE_NAME, "from", SMTP_HINT);
131
+ const authUser = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.authUser), FEATURE_NAME, "authUser", SMTP_HINT);
154
132
  const password = await readPassword(ctx, tenantId);
155
133
  let target;
156
134
  try {
@@ -0,0 +1,41 @@
1
+ export declare const MAIL_TRANSPORT_SMTP_I18N: {
2
+ readonly "mail-transport-smtp.settings": {
3
+ readonly en: "SMTP server";
4
+ };
5
+ readonly "mail-transport-smtp.settings.secrets": {
6
+ readonly en: "SMTP sign-in";
7
+ };
8
+ readonly "mail-transport-smtp.settings.description": {
9
+ readonly en: "The connection details come from your mail provider, for example Brevo, Postmark, Amazon SES or your own server.";
10
+ };
11
+ readonly "mail-transport-smtp.host": {
12
+ readonly en: "Server address";
13
+ };
14
+ readonly "mail-transport-smtp.host.description": {
15
+ readonly en: "Host name of the SMTP server, for example smtp.example.com.";
16
+ };
17
+ readonly "mail-transport-smtp.port": {
18
+ readonly en: "Port number";
19
+ };
20
+ readonly "mail-transport-smtp.port.description": {
21
+ readonly en: "Usually 587. Use 465 when your provider asks for SSL/TLS.";
22
+ };
23
+ readonly "mail-transport-smtp.secure": {
24
+ readonly en: "SSL/TLS from the start";
25
+ };
26
+ readonly "mail-transport-smtp.secure.description": {
27
+ readonly en: "Turn on for port 465. Leave off for 587, which switches to encryption by itself.";
28
+ };
29
+ readonly "mail-transport-smtp.authUser": {
30
+ readonly en: "User name";
31
+ };
32
+ readonly "mail-transport-smtp.authUser.description": {
33
+ readonly en: "Login name at the SMTP server, often an email address.";
34
+ };
35
+ readonly "mail-transport-smtp.from": {
36
+ readonly en: "Sender address";
37
+ };
38
+ readonly "mail-transport-smtp.from.description": {
39
+ readonly en: "The address mails are sent from, for example status@example.com. Your provider must allow it.";
40
+ };
41
+ };
@@ -0,0 +1,28 @@
1
+ export const MAIL_TRANSPORT_SMTP_I18N = {
2
+ // Also the option label of mail-foundation's provider select.
3
+ "mail-transport-smtp.settings": { en: "SMTP server" },
4
+ "mail-transport-smtp.settings.secrets": { en: "SMTP sign-in" },
5
+ "mail-transport-smtp.settings.description": {
6
+ en: "The connection details come from your mail provider, for example Brevo, Postmark, Amazon SES or your own server.",
7
+ },
8
+ "mail-transport-smtp.host": { en: "Server address" },
9
+ "mail-transport-smtp.host.description": {
10
+ en: "Host name of the SMTP server, for example smtp.example.com.",
11
+ },
12
+ "mail-transport-smtp.port": { en: "Port number" },
13
+ "mail-transport-smtp.port.description": {
14
+ en: "Usually 587. Use 465 when your provider asks for SSL/TLS.",
15
+ },
16
+ "mail-transport-smtp.secure": { en: "SSL/TLS from the start" },
17
+ "mail-transport-smtp.secure.description": {
18
+ en: "Turn on for port 465. Leave off for 587, which switches to encryption by itself.",
19
+ },
20
+ "mail-transport-smtp.authUser": { en: "User name" },
21
+ "mail-transport-smtp.authUser.description": {
22
+ en: "Login name at the SMTP server, often an email address.",
23
+ },
24
+ "mail-transport-smtp.from": { en: "Sender address" },
25
+ "mail-transport-smtp.from.description": {
26
+ en: "The address mails are sent from, for example status@example.com. Your provider must allow it.",
27
+ },
28
+ };
@@ -1 +1 @@
1
- export { mailTransportSmtpEnvSchema, mailTransportSmtpFeature, SMTP_PASSWORD, setSmtpMailHostLookup, } from "./feature.js";
1
+ export { createMailTransportSmtpFeature, mailTransportSmtpEnvSchema, mailTransportSmtpFeature, SMTP_PASSWORD, setSmtpMailHostLookup, } from "./feature.js";
@@ -1,2 +1,2 @@
1
1
  // Public API of the mail-transport-smtp bundled-feature.
2
- export { mailTransportSmtpEnvSchema, mailTransportSmtpFeature, SMTP_PASSWORD, setSmtpMailHostLookup, } from "./feature.js";
2
+ export { createMailTransportSmtpFeature, mailTransportSmtpEnvSchema, mailTransportSmtpFeature, SMTP_PASSWORD, setSmtpMailHostLookup, } from "./feature.js";
@@ -1,4 +1,4 @@
1
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import * as z from "zod";
4
4
  import { pagesTable } from "../table.js";
@@ -1,5 +1,4 @@
1
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
2
- import { castTenantRows } from "@cosmicdrift/kumiko-framework/db";
1
+ import { castTenantRows, selectMany } from "@cosmicdrift/kumiko-framework/db";
3
2
  import { defineQueryHandler } from "@cosmicdrift/kumiko-framework/engine";
4
3
  import * as z from "zod";
5
4
  import { pagesTable } from "../table.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 { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
4
3
  import * as z from "zod";
5
4
  import { requireForTenant } from "../../shared/index.js";
@@ -1,10 +1,8 @@
1
1
  // Test-/Seed-Helper für managed-pages. Legt eine Page direkt über den
2
2
  // Event-Store-Executor an — gleicher Pfad wie der echte set-Handler, aber
3
3
  // ohne Access-Check. Default ifExists="skip".
4
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
5
- import { createEventStoreExecutor, createTenantDb, } from "@cosmicdrift/kumiko-framework/db";
6
- import { runEventStoreSeed } from "@cosmicdrift/kumiko-framework/seeding";
7
- import { TestUsers } from "@cosmicdrift/kumiko-framework/stack";
4
+ import { createEventStoreExecutor, createTenantDb, fetchOne, } from "@cosmicdrift/kumiko-framework/db";
5
+ import { runEventStoreSeed, TestUsers, } from "@cosmicdrift/kumiko-framework/seeding";
8
6
  import { pageEntity, pagesTable } from "./table.js";
9
7
  const executor = createEventStoreExecutor(pagesTable, pageEntity, { entityName: "page" });
10
8
  export async function seedPage(db, opts) {
@@ -12,7 +10,7 @@ export async function seedPage(db, opts) {
12
10
  // der event-store-stream im falschen tenant-bucket → version_conflict
13
11
  // bei späteren echten writes). TestUsers.systemAdmin ist testTenantId(1).
14
12
  const by = opts.by ?? { ...TestUsers.systemAdmin, tenantId: opts.tenantId };
15
- const tdb = createTenantDb(db, opts.tenantId, "system");
13
+ const tdb = createTenantDb({ db, tenantId: opts.tenantId, mode: "system" });
16
14
  const existing = await fetchOne(db, pagesTable, {
17
15
  tenantId: opts.tenantId,
18
16
  slug: opts.slug,
@@ -1,4 +1,4 @@
1
- import type { WhereObject } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import type { WhereObject } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { Temporal } from "@cosmicdrift/kumiko-types/temporal";
3
3
  import type { TenantDb } from "@cosmicdrift/kumiko-types/tenant-db-types";
4
4
  import { type MetricRange } from "./constants.js";
@@ -1,4 +1,4 @@
1
- import { type WhereObject } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { type WhereObject } from "@cosmicdrift/kumiko-framework/db";
2
2
  import type { HandlerContext } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import * as z from "zod";
4
4
  import type { MetricDefinition, MetricFilterResolver } from "./types.js";
@@ -1,4 +1,4 @@
1
- import { extractTableInfo } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { extractTableInfo } from "@cosmicdrift/kumiko-framework/db";
2
2
  import * as z from "zod";
3
3
  export const RESERVED_PAYLOAD_KEYS = ["range", "timeZone", "tenantId"];
4
4
  // Dashboard select options always send strings.
@@ -1,4 +1,4 @@
1
- import { extractTableInfo, isTimestamptzType } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { extractTableInfo, isTimestamptzType } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { METRIC_RANGES } from "./constants.js";
3
3
  import { filterValueKindOf, metricFilterEntries, RESERVED_PAYLOAD_KEYS } from "./filters.js";
4
4
  const KEBAB_ID = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
@@ -1,5 +1,5 @@
1
1
  import { type AccessRule, type EntityDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
- export declare const notesHistoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
2
+ declare const defaultNotesHistoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
3
3
  readonly exports: void;
4
4
  };
5
5
  export type NotesHistoryFeatureOptions = {
@@ -38,4 +38,9 @@ export type NotesHistoryFeatureOptions = {
38
38
  * consider every registered entity as a candidate host. */
39
39
  readonly parents?: readonly string[];
40
40
  };
41
- export declare function createNotesHistoryFeature(opts?: NotesHistoryFeatureOptions): typeof notesHistoryFeature;
41
+ export declare function createNotesHistoryFeature(opts?: NotesHistoryFeatureOptions): typeof defaultNotesHistoryFeature;
42
+ /** @deprecated Use createNotesHistoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
43
+ export declare const notesHistoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
44
+ readonly exports: void;
45
+ };
46
+ export {};
@@ -41,7 +41,7 @@ function registerNotesHistory(r, access, ownership, parents) {
41
41
  }));
42
42
  r.translations({ keys: NOTES_HISTORY_FEATURE_I18N });
43
43
  }
44
- export const notesHistoryFeature = defineFeature(NOTES_HISTORY_FEATURE_NAME, (r) => registerNotesHistory(r, DEFAULT_NOTES_HISTORY_ACCESS, undefined, undefined));
44
+ const defaultNotesHistoryFeature = defineFeature(NOTES_HISTORY_FEATURE_NAME, (r) => registerNotesHistory(r, DEFAULT_NOTES_HISTORY_ACCESS, undefined, undefined));
45
45
  function resolveAccess(opts) {
46
46
  if (opts.access !== undefined)
47
47
  return opts.access;
@@ -56,7 +56,7 @@ export function createNotesHistoryFeature(opts = {}) {
56
56
  opts.roles === undefined &&
57
57
  opts.ownership === undefined &&
58
58
  opts.parents === undefined) {
59
- return notesHistoryFeature;
59
+ return defaultNotesHistoryFeature;
60
60
  }
61
61
  assertNoWhereRuleInOwnershipWrite("createNotesHistoryFeature", opts.ownership?.write);
62
62
  // A mount that accepts no parents at all can never take a note write —
@@ -69,3 +69,5 @@ export function createNotesHistoryFeature(opts = {}) {
69
69
  }
70
70
  return defineFeature(NOTES_HISTORY_FEATURE_NAME, (r) => registerNotesHistory(r, resolveAccess(opts), opts.ownership, opts.parents));
71
71
  }
72
+ /** @deprecated Use createNotesHistoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
73
+ export const notesHistoryFeature = createNotesHistoryFeature();
@@ -1,4 +1,4 @@
1
- import { fetchOne, runInSavepointIfSupported } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { fetchOne, runInSavepointIfSupported } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { ValidationError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
3
3
  import { decryptStoredPii, denyUnlessJoinRowParentVisible } from "../../shared/index.js";
4
4
  import { tenantMembershipsTable } from "../../tenant/index.js";
@@ -3,8 +3,8 @@
3
3
  // notes consumers without the user-data-rights pipeline don't pull a hard
4
4
  // dependency. Mirrors job-run/delivery-attempt (user-data-rights-defaults):
5
5
  // export-only, erasure via crypto-shredding.
6
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
7
6
  import { configuredPiiSubjectKms } from "@cosmicdrift/kumiko-framework/crypto";
7
+ import { selectMany } from "@cosmicdrift/kumiko-framework/db";
8
8
  import { noteEntryTable, noteMentionTable } from "../notes-history/index.js";
9
9
  // note-entry has no per-tenant scope quirk (unlike folders) — it's genuinely
10
10
  // per-user content, so the export filters by authorId directly.
@@ -1,4 +1,8 @@
1
1
  export { eraseNoteBodiesReachingSubject } from "./hooks.js";
2
+ export declare function createNotesHistoryUserDataFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
3
+ readonly exports: void;
4
+ };
5
+ /** @deprecated Use createNotesHistoryUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
2
6
  export declare const notesHistoryUserDataFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
3
7
  readonly exports: void;
4
8
  };
@@ -7,20 +7,24 @@
7
7
  import { defineFeature, EXT_USER_DATA } from "@cosmicdrift/kumiko-framework/engine";
8
8
  import { noteEntryDeleteHook, noteEntryExportHook, noteMentionDeleteHook, noteMentionExportHook, } from "./hooks.js";
9
9
  export { eraseNoteBodiesReachingSubject } from "./hooks.js";
10
- export const notesHistoryUserDataFeature = defineFeature("notes-history-user-data", (r) => {
11
- r.describe("GDPR (Art. 20 export / Art. 17 erasure) coverage for the `notes-history` feature's `note-entry` and `note-mention` entities. Mounts the export hook so a user's authored notes are included in the user-data export bundle; the note-entry delete hook crypto-shreds the row-subject key of each note that structurally @-mentions the forgotten user (`note-mention`) or hangs on the user as host entity (regardless of the host entity's retention strategy: the note text is free PII, the host's anonymize/blockDelete protects the row, not the content), keeping the append-only history intact for all other notes. The manual `crypto-shredding` forget-subject command reaches the same notes for user and record subjects through the exported `eraseNoteBodiesReachingSubject`, and the export lists them under `note-mention`. `note-mention`'s own hooks are a no-op — it is a plain FK pointer, not separately exportable content. Kept separate from `notes-history` so notes consumers without the user-data-rights pipeline don't pull a hard dependency — requires `user-data-rights`, optionalRequires `notes-history`.");
12
- // user-data-rights is the hard dependency (EXT_USER_DATA host). notes-history
13
- // is OPTIONAL: if it's mounted toggleable(default=false), a hard r.requires
14
- // would throw an "effectively disabled" boot warning even though the
15
- // note-entry entity exists and the hooks work fine.
16
- r.requires({ features: ["user-data-rights"] });
17
- r.optionalRequires("notes-history");
18
- r.useExtension(EXT_USER_DATA, "note-entry", {
19
- export: noteEntryExportHook,
20
- delete: noteEntryDeleteHook,
21
- });
22
- r.useExtension(EXT_USER_DATA, "note-mention", {
23
- export: noteMentionExportHook,
24
- delete: noteMentionDeleteHook,
25
- });
26
- });
10
+ export function createNotesHistoryUserDataFeature() {
11
+ return defineFeature("notes-history-user-data", (r) => {
12
+ r.describe("GDPR (Art. 20 export / Art. 17 erasure) coverage for the `notes-history` feature's `note-entry` and `note-mention` entities. Mounts the export hook so a user's authored notes are included in the user-data export bundle; the note-entry delete hook crypto-shreds the row-subject key of each note that structurally @-mentions the forgotten user (`note-mention`) or hangs on the user as host entity (regardless of the host entity's retention strategy: the note text is free PII, the host's anonymize/blockDelete protects the row, not the content), keeping the append-only history intact for all other notes. The manual `crypto-shredding` forget-subject command reaches the same notes for user and record subjects through the exported `eraseNoteBodiesReachingSubject`, and the export lists them under `note-mention`. `note-mention`'s own hooks are a no-op — it is a plain FK pointer, not separately exportable content. Kept separate from `notes-history` so notes consumers without the user-data-rights pipeline don't pull a hard dependency — requires `user-data-rights`, optionalRequires `notes-history`.");
13
+ // user-data-rights is the hard dependency (EXT_USER_DATA host). notes-history
14
+ // is OPTIONAL: if it's mounted toggleable(default=false), a hard r.requires
15
+ // would throw an "effectively disabled" boot warning even though the
16
+ // note-entry entity exists and the hooks work fine.
17
+ r.requires({ features: ["user-data-rights"] });
18
+ r.optionalRequires("notes-history");
19
+ r.useExtension(EXT_USER_DATA, "note-entry", {
20
+ export: noteEntryExportHook,
21
+ delete: noteEntryDeleteHook,
22
+ });
23
+ r.useExtension(EXT_USER_DATA, "note-mention", {
24
+ export: noteMentionExportHook,
25
+ delete: noteMentionDeleteHook,
26
+ });
27
+ }, { dedupeOptions: {} });
28
+ }
29
+ /** @deprecated Use createNotesHistoryUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
30
+ export const notesHistoryUserDataFeature = createNotesHistoryUserDataFeature();
@@ -1,4 +1,4 @@
1
- import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
1
+ import { type FeatureDefinition, type ProjectionListScreenDefinition } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import { type PatRateLimit } from "./constants.js";
3
3
  import { type CreatePatOptions } from "./handlers/create.write.js";
4
4
  import type { PatScopeConfig } from "./scopes.js";
@@ -17,6 +17,9 @@ export type PersonalAccessTokensOptions = {
17
17
  * shown in place of the token screens when the tenant's tier excludes the
18
18
  * feature, e.g. an upgrade notice. Default: the standard "unavailable" notice. */
19
19
  readonly lockedFallbackScreen?: string;
20
+ /** Description (i18n key) and slots rendered on the token list screen, e.g. an
21
+ * explanatory text or a header component above the list. Default: neither. */
22
+ readonly listScreen?: Pick<ProjectionListScreenDefinition, "description" | "slots">;
20
23
  readonly mfaVerifier?: CreatePatOptions["mfaVerifier"];
21
24
  readonly autoRevokeOnPasswordChange?: (userId: string) => Promise<number>;
22
25
  };
@@ -1,7 +1,7 @@
1
1
  import { EXT_TOKEN_VERIFIER, } from "@cosmicdrift/kumiko-bundled-features/auth-foundation";
2
2
  import { PAT_TOKEN_PREFIX } from "@cosmicdrift/kumiko-framework/api";
3
3
  import { deriveEntityTableMeta } from "@cosmicdrift/kumiko-framework/db";
4
- import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
4
+ import { defineFeature, } from "@cosmicdrift/kumiko-framework/engine";
5
5
  import { API_TOKEN_ENTITY_NAME, PAT_DEFAULT_RATE_LIMIT, PAT_FEATURE, } from "./constants.js";
6
6
  import { availabilityQuery } from "./handlers/availability.query.js";
7
7
  import { buildAvailableScopesQuery } from "./handlers/available-scopes.query.js";
@@ -116,7 +116,15 @@ export function createPersonalAccessTokensFeature(options) {
116
116
  // Declarative screens — list-with-revoke + mint-with-reveal. The app
117
117
  // places `patListScreen` via r.nav in its logged-in settings area.
118
118
  const lockedFallback = options.lockedFallbackScreen === undefined ? {} : { fallback: options.lockedFallbackScreen };
119
- r.screen({ ...patListScreen, ...lockedFallback });
119
+ // Copy the two fields explicitly: a wider object passed as a variable
120
+ // escapes the Pick check and would override agent/access otherwise.
121
+ const { description, slots } = options.listScreen ?? {};
122
+ r.screen({
123
+ ...patListScreen,
124
+ ...(description === undefined ? {} : { description }),
125
+ ...(slots === undefined ? {} : { slots }),
126
+ ...lockedFallback,
127
+ });
120
128
  r.screen({ ...createPatMintScreen(scopes), ...lockedFallback });
121
129
  r.translations({ keys: { ...PAT_FEATURE_I18N, ...patScopeOptionTranslations(scopes) } });
122
130
  // rateLimit flows into feature.exports so run-prod-app builds the
@@ -1,4 +1,4 @@
1
- import { insertOne } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { insertOne } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { createSystemUser, defineWriteHandler, } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
4
4
  import { generateId } from "@cosmicdrift/kumiko-framework/utils";
@@ -1,4 +1,4 @@
1
- import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { selectMany } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { definePagedQueryHandler, MAX_LIST_LIMIT } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
4
4
  import * as z from "zod";
@@ -7,7 +7,7 @@ import { isExpiredAt } from "../expiry.js";
7
7
  import { apiTokenTable } from "../schema/api-token.js";
8
8
  // `sort` arrives raw from the client's query string. selectMany's orderBy has
9
9
  // no column-existence check — an unrecognised field just gets snake_cased and
10
- // quoted as-is (bun-db/query.ts columnOf) — so this allowlist is what stops a
10
+ // quoted as-is (db/query.ts columnOf) — so this allowlist is what stops a
11
11
  // client sorting by tokenHash or any other non-exposed column.
12
12
  const SORTABLE_COLUMNS = ["id", "name", "createdAt", "expiresAt", "revokedAt"];
13
13
  function isSortableColumn(value) {
@@ -1,4 +1,4 @@
1
- import { updateMany } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { updateMany } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { defineWriteHandler } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { UnprocessableError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
4
4
  import { generateId } from "@cosmicdrift/kumiko-framework/utils";
@@ -1,4 +1,4 @@
1
- import { fetchOne } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { isExpiredAt } from "./expiry.js";
3
3
  import { hashPatToken } from "./hash.js";
4
4
  import { resolvePatRoles } from "./roles.js";
@@ -1,4 +1,4 @@
1
- import { runnerCanBeginTransaction, transaction, updateMany, } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { runnerCanBeginTransaction, transaction, updateMany, } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { append } from "@cosmicdrift/kumiko-framework/event-store";
4
4
  import { generateId } from "@cosmicdrift/kumiko-framework/utils";
@@ -1,10 +1,8 @@
1
- import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
1
+ import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { buildSessionRoles } from "@cosmicdrift/kumiko-framework/engine";
3
3
  import { parseRoles } from "@cosmicdrift/kumiko-framework/utils";
4
- // kumiko-lint-ignore cross-feature-import shared lifecycle-status gate with session auth
5
- import { isPrincipalBlocked } from "../sessions/index.js";
6
4
  import { tenantMembershipsTable } from "../tenant/index.js";
7
- import { userTable } from "../user/index.js";
5
+ import { isPrincipalRowBlocked, userTable } from "../user/index.js";
8
6
  // Live role resolution for a (userId, tenantId), mirroring login.write.ts:
9
7
  // global roles (users.roles) ∪ tenant-membership roles (forbidden roles
10
8
  // stripped via stripForbiddenMembershipRoles, see engine/membership-roles).
@@ -26,7 +24,7 @@ export async function resolvePatRoles(db, userId, tenantId) {
26
24
  const userRow = await fetchOne(db, userTable, {
27
25
  id: userId,
28
26
  });
29
- if (userRow && isPrincipalBlocked(userRow.status))
27
+ if (userRow && isPrincipalRowBlocked(userRow))
30
28
  return null;
31
29
  const globalRoles = parseRoles(userRow?.roles ?? null);
32
30
  return buildSessionRoles(globalRoles, parseRoles(membership.roles));
@@ -16,6 +16,7 @@ const PAT_SCREEN_VISIBLE_WHEN = {
16
16
  export const patListScreen = {
17
17
  id: PAT_SCREEN_ID,
18
18
  type: "projectionList",
19
+ agent: { expose: false },
19
20
  visibleWhen: PAT_SCREEN_VISIBLE_WHEN,
20
21
  query: PatQueries.mine,
21
22
  // The `mine` handler honours `limit` only (no offset/total), so a pager would
@@ -97,6 +98,7 @@ export function createPatMintScreen(scopes) {
97
98
  return {
98
99
  id: PAT_MINT_SCREEN_ID,
99
100
  type: "secretMint",
101
+ agent: { expose: false },
100
102
  visibleWhen: PAT_SCREEN_VISIBLE_WHEN,
101
103
  handler: PatHandlers.create,
102
104
  fields: {