@cosmicdrift/kumiko-bundled-features 0.367.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 (330) 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-in-app/handlers/inbox.query.js +1 -1
  44. package/dist/channel-in-app/handlers/mark-all-read.write.js +1 -1
  45. package/dist/channel-in-app/handlers/mark-read.write.js +1 -1
  46. package/dist/channel-in-app/handlers/unread-count.query.js +1 -1
  47. package/dist/channel-in-app/tables.js +1 -2
  48. package/dist/compliance-profiles/handlers/for-tenant.query.js +1 -1
  49. package/dist/compliance-profiles/handlers/needs-profile.query.js +1 -1
  50. package/dist/compliance-profiles/handlers/set-profile.write.js +1 -2
  51. package/dist/compliance-profiles/resolve-for-tenant.js +1 -1
  52. package/dist/compliance-profiles/seeding.js +3 -5
  53. package/dist/compliance-profiles-ops/index.d.ts +8 -0
  54. package/dist/compliance-profiles-ops/index.js +19 -15
  55. package/dist/config/db/queries/resolver.js +1 -1
  56. package/dist/config/handlers/reencrypt.job.js +2 -2
  57. package/dist/config/resolver.js +1 -1
  58. package/dist/config/write-helpers.js +1 -1
  59. package/dist/crypto-shredding/handlers/forget-subject.write.js +6 -3
  60. package/dist/custom-fields/db/queries/field-access.js +1 -1
  61. package/dist/custom-fields/db/queries/projection.js +1 -1
  62. package/dist/custom-fields/db/queries/quota.js +1 -1
  63. package/dist/custom-fields/db/queries/retention.js +1 -2
  64. package/dist/custom-fields/db/queries/user-data-rights.js +1 -1
  65. package/dist/custom-fields/feature.d.ts +20 -2
  66. package/dist/custom-fields/feature.js +9 -13
  67. package/dist/custom-fields/handlers/clear-custom-field.write.js +2 -2
  68. package/dist/custom-fields/handlers/delete-system-field.write.js +2 -2
  69. package/dist/custom-fields/handlers/delete-tenant-field.write.js +2 -2
  70. package/dist/custom-fields/handlers/set-custom-field.write.js +2 -2
  71. package/dist/custom-fields/wire-for-entity.js +4 -4
  72. package/dist/data-retention/resolve-for-tenant.js +1 -1
  73. package/dist/data-retention/run-retention-cleanup.js +17 -13
  74. package/dist/delivery/address-opt-out.js +1 -2
  75. package/dist/delivery/attempt-log-retention.js +1 -1
  76. package/dist/delivery/channel-context.js +1 -1
  77. package/dist/delivery/db/queries/address-opt-outs.js +1 -1
  78. package/dist/delivery/db/queries/preferences.js +1 -1
  79. package/dist/delivery/delivery-service.js +16 -7
  80. package/dist/delivery/feature.js +1 -1
  81. package/dist/delivery/handlers/log.query.js +2 -3
  82. package/dist/delivery/handlers/preferences.query.js +1 -1
  83. package/dist/delivery/upsert-preference.js +1 -2
  84. package/dist/derivatives-sharp/feature.d.ts +4 -0
  85. package/dist/derivatives-sharp/feature.js +15 -11
  86. package/dist/derivatives-sharp/index.d.ts +1 -1
  87. package/dist/derivatives-sharp/index.js +1 -1
  88. package/dist/document-ingest-foundation/feature.d.ts +7 -0
  89. package/dist/document-ingest-foundation/feature.js +94 -90
  90. package/dist/document-ingest-foundation/forget-extract-with-file-ref.js +3 -3
  91. package/dist/document-ingest-foundation/index.d.ts +1 -1
  92. package/dist/document-ingest-foundation/index.js +1 -1
  93. package/dist/feature-toggles/global-feature-state-table.js +1 -2
  94. package/dist/feature-toggles/handlers/set.write.js +3 -5
  95. package/dist/feature-toggles/toggle-runtime.js +1 -1
  96. package/dist/file-derivatives/feature.d.ts +1 -0
  97. package/dist/file-derivatives/feature.js +2 -1
  98. package/dist/file-derivatives/handlers/public-variant-by-file-ref.query.js +1 -1
  99. package/dist/file-derivatives/handlers/public-variant.query.js +1 -1
  100. package/dist/file-foundation/feature.d.ts +6 -0
  101. package/dist/file-foundation/feature.js +29 -25
  102. package/dist/file-foundation/index.d.ts +1 -1
  103. package/dist/file-foundation/index.js +1 -1
  104. package/dist/file-foundation/read-file-ref-content.js +1 -1
  105. package/dist/file-provider-inmemory/feature.d.ts +4 -0
  106. package/dist/file-provider-inmemory/feature.js +24 -20
  107. package/dist/file-provider-inmemory/index.d.ts +1 -1
  108. package/dist/file-provider-inmemory/index.js +1 -1
  109. package/dist/file-provider-s3/env-feature.d.ts +3 -0
  110. package/dist/file-provider-s3/env-feature.js +46 -0
  111. package/dist/file-provider-s3/feature.d.ts +26 -0
  112. package/dist/file-provider-s3/feature.js +84 -72
  113. package/dist/file-provider-s3/index.d.ts +1 -1
  114. package/dist/file-provider-s3/index.js +1 -1
  115. package/dist/file-provider-s3/lib/index.d.ts +3 -0
  116. package/dist/file-provider-s3/lib/index.js +2 -0
  117. package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.js +19 -19
  118. package/dist/file-provider-s3-env/index.d.ts +8 -1
  119. package/dist/file-provider-s3-env/index.js +7 -2
  120. package/dist/files-provider-s3/index.d.ts +5 -3
  121. package/dist/files-provider-s3/index.js +5 -2
  122. package/dist/files-tenant-data/handlers/sweep-orphaned-derivatives.job.js +1 -1
  123. package/dist/files-tenant-data/hooks.js +1 -2
  124. package/dist/folders/feature.d.ts +6 -2
  125. package/dist/folders/feature.js +4 -2
  126. package/dist/folders-user-data/index.d.ts +4 -0
  127. package/dist/folders-user-data/index.js +21 -17
  128. package/dist/form-draft/db/queries/cleanup.js +1 -1
  129. package/dist/form-draft/db/queries/draft-count.js +1 -1
  130. package/dist/form-draft/db/queries/owned-file-refs.js +1 -2
  131. package/dist/form-draft/feature.d.ts +4 -0
  132. package/dist/form-draft/feature.js +5 -1
  133. package/dist/form-draft/handlers/cleanup.job.js +2 -2
  134. package/dist/form-draft/index.d.ts +1 -1
  135. package/dist/form-draft/index.js +1 -1
  136. package/dist/form-draft/lookup.js +1 -1
  137. package/dist/form-draft-user-data/index.d.ts +4 -0
  138. package/dist/form-draft-user-data/index.js +13 -9
  139. package/dist/inbound-mail-foundation/feature.d.ts +4 -0
  140. package/dist/inbound-mail-foundation/feature.js +151 -147
  141. package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +1 -2
  142. package/dist/inbound-mail-foundation/index.d.ts +1 -1
  143. package/dist/inbound-mail-foundation/index.js +1 -1
  144. package/dist/inbound-mail-foundation/oauth-access-token.js +1 -2
  145. package/dist/inbound-mail-foundation/projection.js +1 -2
  146. package/dist/inbound-mail-foundation/watch-supervisor.js +1 -1
  147. package/dist/inbound-provider-imap/feature.d.ts +4 -0
  148. package/dist/inbound-provider-imap/feature.js +16 -12
  149. package/dist/inbound-provider-imap/index.d.ts +1 -1
  150. package/dist/inbound-provider-imap/index.js +1 -1
  151. package/dist/inbound-provider-inmemory/feature.d.ts +4 -0
  152. package/dist/inbound-provider-inmemory/feature.js +14 -10
  153. package/dist/inbound-provider-inmemory/index.d.ts +1 -1
  154. package/dist/inbound-provider-inmemory/index.js +1 -1
  155. package/dist/jobs/db/queries/retention.js +1 -1
  156. package/dist/jobs/db/queries/stale-run-sweep.js +1 -1
  157. package/dist/jobs/handlers/detail.query.js +1 -1
  158. package/dist/jobs/handlers/list.query.js +1 -2
  159. package/dist/jobs/handlers/retry.write.js +1 -1
  160. package/dist/jobs/handlers/tenant-failures.query.js +1 -1
  161. package/dist/jobs/handlers/tenant-runs.query.js +1 -1
  162. package/dist/jobs/job-run-logger.js +1 -2
  163. package/dist/jobs/tenant-job-failure-table.js +1 -2
  164. package/dist/jobs/tenant-job-run-table.js +1 -2
  165. package/dist/ledger/feature.d.ts +6 -2
  166. package/dist/ledger/feature.js +4 -2
  167. package/dist/mail-foundation/feature.d.ts +7 -0
  168. package/dist/mail-foundation/feature.js +48 -42
  169. package/dist/mail-foundation/index.d.ts +1 -1
  170. package/dist/mail-foundation/index.js +1 -1
  171. package/dist/mail-transport-inmemory/feature.d.ts +4 -0
  172. package/dist/mail-transport-inmemory/feature.js +20 -16
  173. package/dist/mail-transport-inmemory/index.d.ts +1 -1
  174. package/dist/mail-transport-inmemory/index.js +1 -1
  175. package/dist/mail-transport-smtp/feature.d.ts +16 -0
  176. package/dist/mail-transport-smtp/feature.js +85 -79
  177. package/dist/mail-transport-smtp/index.d.ts +1 -1
  178. package/dist/mail-transport-smtp/index.js +1 -1
  179. package/dist/managed-pages/handlers/by-slug.query.js +1 -1
  180. package/dist/managed-pages/handlers/by-tenant-published.query.js +1 -2
  181. package/dist/managed-pages/handlers/set.write.js +1 -2
  182. package/dist/managed-pages/seeding.js +3 -5
  183. package/dist/metrics/compute.d.ts +1 -1
  184. package/dist/metrics/filters.d.ts +1 -1
  185. package/dist/metrics/filters.js +1 -1
  186. package/dist/metrics/validate.js +1 -1
  187. package/dist/notes-history/feature.d.ts +7 -2
  188. package/dist/notes-history/feature.js +4 -2
  189. package/dist/notes-history/handlers/add-note.write.js +1 -1
  190. package/dist/notes-history-user-data/hooks.js +1 -1
  191. package/dist/notes-history-user-data/index.d.ts +4 -0
  192. package/dist/notes-history-user-data/index.js +21 -17
  193. package/dist/personal-access-tokens/feature.d.ts +4 -1
  194. package/dist/personal-access-tokens/feature.js +10 -2
  195. package/dist/personal-access-tokens/handlers/create.write.js +1 -1
  196. package/dist/personal-access-tokens/handlers/list.query.js +2 -2
  197. package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
  198. package/dist/personal-access-tokens/resolver.js +1 -1
  199. package/dist/personal-access-tokens/revoke-for-user.js +1 -1
  200. package/dist/personal-access-tokens/roles.js +3 -5
  201. package/dist/personal-access-tokens/screens.js +2 -0
  202. package/dist/readiness/feature.d.ts +8 -0
  203. package/dist/readiness/feature.js +18 -14
  204. package/dist/readiness/index.d.ts +1 -1
  205. package/dist/readiness/index.js +1 -1
  206. package/dist/secrets/db/queries/read.js +1 -1
  207. package/dist/secrets/feature.d.ts +3 -0
  208. package/dist/secrets/feature.js +3 -2
  209. package/dist/secrets/handlers/rotate.job.js +2 -3
  210. package/dist/secrets/secrets-context.js +3 -4
  211. package/dist/sessions/db/queries/cleanup.js +1 -1
  212. package/dist/sessions/handlers/detail.query.js +1 -1
  213. package/dist/sessions/handlers/list.query.js +2 -2
  214. package/dist/sessions/handlers/mine.query.js +1 -1
  215. package/dist/sessions/handlers/revoke-all-for-user.write.js +1 -1
  216. package/dist/sessions/handlers/revoke-all-others.write.js +1 -1
  217. package/dist/sessions/handlers/revoke.write.js +1 -1
  218. package/dist/sessions/session-callbacks.js +4 -6
  219. package/dist/sessions/testing.d.ts +1 -1
  220. package/dist/tags/feature.d.ts +6 -2
  221. package/dist/tags/feature.js +4 -2
  222. package/dist/template-resolver/api.js +1 -1
  223. package/dist/template-resolver/handlers/bundle-import.js +1 -1
  224. package/dist/template-resolver/handlers/by-slug.query.js +1 -1
  225. package/dist/template-resolver/handlers/by-tenant.query.js +1 -2
  226. package/dist/template-resolver/handlers/collection-item.query.js +1 -1
  227. package/dist/template-resolver/handlers/collection-list.query.js +1 -2
  228. package/dist/template-resolver/handlers/collection-set.write.js +1 -1
  229. package/dist/template-resolver/handlers/copy-locale.write.js +1 -1
  230. package/dist/template-resolver/handlers/diff-to-system.query.js +1 -1
  231. package/dist/template-resolver/handlers/export-bundle.query.js +1 -1
  232. package/dist/template-resolver/handlers/find-by-id.query.js +1 -1
  233. package/dist/template-resolver/handlers/layout-source.query.js +1 -1
  234. package/dist/template-resolver/handlers/list.query.js +1 -1
  235. package/dist/template-resolver/handlers/overview.query.js +1 -1
  236. package/dist/template-resolver/handlers/reset-to-system.write.js +1 -1
  237. package/dist/template-resolver/handlers/resource-remove.write.js +1 -1
  238. package/dist/template-resolver/handlers/set.write.js +1 -1
  239. package/dist/template-resolver/handlers/template-write.js +1 -1
  240. package/dist/template-resolver/handlers/tenant-overrides.query.js +1 -1
  241. package/dist/template-resolver/handlers/toggle-status.write.js +1 -1
  242. package/dist/template-resolver/handlers/usage.query.js +1 -1
  243. package/dist/template-resolver/handlers/validate.query.js +1 -1
  244. package/dist/template-resolver/seeding.js +3 -4
  245. package/dist/template-resolver/store-template-resource.js +1 -1
  246. package/dist/template-resolver/template-preview.js +1 -1
  247. package/dist/template-resolver/template-resources.js +1 -1
  248. package/dist/template-resolver/testing.js +1 -1
  249. package/dist/template-resolver-user-data/index.d.ts +4 -0
  250. package/dist/template-resolver-user-data/index.js +17 -13
  251. package/dist/tenant/handlers/active-tenant-ids.query.js +1 -1
  252. package/dist/tenant/handlers/add-member.write.js +1 -2
  253. package/dist/tenant/handlers/cancel-invitation.write.js +1 -1
  254. package/dist/tenant/handlers/invitations.query.js +1 -1
  255. package/dist/tenant/handlers/me.query.js +1 -1
  256. package/dist/tenant/handlers/member-directory.query.js +1 -1
  257. package/dist/tenant/handlers/members.query.js +1 -1
  258. package/dist/tenant/handlers/memberships.query.js +1 -1
  259. package/dist/tenant/handlers/remove-member.write.js +1 -2
  260. package/dist/tenant/handlers/resolve-user-ids.query.js +1 -1
  261. package/dist/tenant/handlers/team-list.query.js +1 -1
  262. package/dist/tenant/handlers/tenant-directory.query.js +1 -1
  263. package/dist/tenant/handlers/update-member-roles.write.js +1 -2
  264. package/dist/tenant/invited-membership.js +2 -3
  265. package/dist/tenant/last-tenant-admin.js +1 -2
  266. package/dist/tenant/seeding.js +12 -6
  267. package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +1 -2
  268. package/dist/tenant-lifecycle/handlers/request-destruction.write.js +1 -2
  269. package/dist/tenant-lifecycle/lib/revoke-tenant-sessions.js +1 -1
  270. package/dist/tenant-lifecycle/lifecycle-gate.js +1 -1
  271. package/dist/tenant-lifecycle/run-tenant-destroy.js +3 -5
  272. package/dist/tenant-lifecycle/stages.js +10 -6
  273. package/dist/tenant-lifecycle/testing.d.ts +1 -1
  274. package/dist/tenant-lifecycle/testing.js +2 -2
  275. package/dist/tenant-settings/feature.d.ts +1 -0
  276. package/dist/tenant-settings/feature.js +2 -1
  277. package/dist/tier-engine/feature.d.ts +1 -8
  278. package/dist/tier-engine/feature.js +71 -78
  279. package/dist/tier-engine/handlers/get-tenant-tier.query.js +2 -3
  280. package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -2
  281. package/dist/user/db/queries/stream-tenant-backfill.js +1 -1
  282. package/dist/user/handlers/create.write.js +1 -2
  283. package/dist/user/handlers/find-for-auth.query.js +1 -1
  284. package/dist/user/handlers/list.query.js +1 -1
  285. package/dist/user/handlers/update-roles.js +1 -2
  286. package/dist/user/index.d.ts +1 -1
  287. package/dist/user/index.js +1 -1
  288. package/dist/user/invited-global-roles.js +2 -3
  289. package/dist/user/principal-status.d.ts +4 -0
  290. package/dist/user/principal-status.js +9 -3
  291. package/dist/user/resolve-display-names.js +1 -1
  292. package/dist/user/seeding.js +5 -6
  293. package/dist/user-data-rights/audit-download.js +2 -2
  294. package/dist/user-data-rights/db/queries/export-jobs.js +1 -1
  295. package/dist/user-data-rights/db/queries/forget-cleanup.js +1 -1
  296. package/dist/user-data-rights/handlers/download-by-job.query.js +1 -1
  297. package/dist/user-data-rights/handlers/download-by-token.query.js +1 -1
  298. package/dist/user-data-rights/handlers/export-status.query.js +1 -1
  299. package/dist/user-data-rights/handlers/list-download-attempts.query.js +1 -1
  300. package/dist/user-data-rights/handlers/my-audit-log.query.js +1 -1
  301. package/dist/user-data-rights/handlers/request-export.write.js +1 -2
  302. package/dist/user-data-rights/handlers/run-forget-cleanup.write.js +3 -3
  303. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.d.ts +1 -1
  304. package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.js +1 -1
  305. package/dist/user-data-rights/lib/update-user-lifecycle.d.ts +1 -0
  306. package/dist/user-data-rights/lib/update-user-lifecycle.js +3 -3
  307. package/dist/user-data-rights/run-export-jobs.js +2 -3
  308. package/dist/user-data-rights/run-forget-cleanup.js +9 -5
  309. package/dist/user-data-rights/run-user-export.js +9 -5
  310. package/dist/waitlist/handlers/invite.write.js +1 -2
  311. package/dist/waitlist/handlers/reject.write.js +1 -1
  312. package/dist/waitlist/lib.js +1 -2
  313. package/dist/workflow-runner/event-subscriber.js +1 -1
  314. package/dist/workflow-runner/feature.d.ts +4 -0
  315. package/dist/workflow-runner/feature.js +44 -40
  316. package/dist/workflow-runner/handlers/resume-run.write.js +1 -1
  317. package/dist/workflow-runner/index.d.ts +1 -1
  318. package/dist/workflow-runner/index.js +1 -1
  319. package/dist/workflow-runner/pending-projection.js +1 -1
  320. package/package.json +28 -11
  321. package/src/cap-counter/changes.json +13 -0
  322. package/src/crypto-shredding/changes.json +6 -0
  323. package/src/file-provider-s3/changes.json +10 -1
  324. package/src/personal-access-tokens/changes.json +6 -0
  325. package/src/user/changes.json +6 -0
  326. package/dist/file-provider-s3-env/feature.d.ts +0 -3
  327. package/dist/file-provider-s3-env/feature.js +0 -46
  328. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.d.ts +0 -0
  329. /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.js +0 -0
  330. /package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.d.ts +0 -0
@@ -2,7 +2,7 @@ import { type AccessRule } from "@cosmicdrift/kumiko-framework/engine";
2
2
  type LedgerToggleable = {
3
3
  readonly default: boolean;
4
4
  };
5
- export declare const ledgerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
5
+ declare const defaultLedgerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
6
6
  readonly exports: void;
7
7
  };
8
8
  export type LedgerFeatureOptions = {
@@ -15,5 +15,9 @@ export type LedgerFeatureOptions = {
15
15
  * for fail-closed gating. Omit to keep the ledger always-on (default). */
16
16
  readonly toggleable?: LedgerToggleable;
17
17
  };
18
- export declare function createLedgerFeature(opts?: LedgerFeatureOptions): typeof ledgerFeature;
18
+ export declare function createLedgerFeature(opts?: LedgerFeatureOptions): typeof defaultLedgerFeature;
19
+ /** @deprecated Use createLedgerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
20
+ export declare const ledgerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
21
+ readonly exports: void;
22
+ };
19
23
  export {};
@@ -90,7 +90,7 @@ function registerLedger(r, access, toggleable) {
90
90
  r.queryHandler(createIncomeStatementHandler(access));
91
91
  r.queryHandler(createBalanceSheetHandler(access));
92
92
  }
93
- export const ledgerFeature = defineFeature(LEDGER_FEATURE_NAME, (r) => registerLedger(r, DEFAULT_LEDGER_ACCESS, undefined));
93
+ const defaultLedgerFeature = defineFeature(LEDGER_FEATURE_NAME, (r) => registerLedger(r, DEFAULT_LEDGER_ACCESS, undefined));
94
94
  function resolveAccess(opts) {
95
95
  if (opts.access !== undefined)
96
96
  return opts.access;
@@ -102,8 +102,10 @@ function resolveAccess(opts) {
102
102
  // rebuild). access/roles/toggleable build a fresh feature-definition.
103
103
  export function createLedgerFeature(opts = {}) {
104
104
  if (opts.access === undefined && opts.roles === undefined && opts.toggleable === undefined) {
105
- return ledgerFeature;
105
+ return defaultLedgerFeature;
106
106
  }
107
107
  const access = resolveAccess(opts);
108
108
  return defineFeature(LEDGER_FEATURE_NAME, (r) => registerLedger(r, access, opts.toggleable));
109
109
  }
110
+ /** @deprecated Use createLedgerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
111
+ export const ledgerFeature = createLedgerFeature();
@@ -53,6 +53,13 @@ declare module "@cosmicdrift/kumiko-framework/engine" {
53
53
  [MAIL_TRANSPORT_EXTENSION]: MailTransportPlugin;
54
54
  }
55
55
  }
56
+ export declare function createMailFoundationFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
57
+ readonly exports: {
58
+ /** Config-key-handle for the provider-selector. */
59
+ providerConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
60
+ };
61
+ };
62
+ /** @deprecated Use createMailFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
56
63
  export declare const mailFoundationFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
57
64
  readonly exports: {
58
65
  /** Config-key-handle for the provider-selector. */
@@ -45,47 +45,53 @@ export function isMailTransportPlugin(o) {
45
45
  // =============================================================================
46
46
  // Feature-definition
47
47
  // =============================================================================
48
- export const mailFoundationFeature = defineFeature(FEATURE_NAME, (r) => {
49
- r.describe("Defines the `mailTransport` extension point and a per-tenant `provider` config key that selects which registered transport plugin to use at runtime. Call `createTransportForTenant(ctx, tenantId)` to get an `EmailTransport` ready for sending \u2014 use this feature together with at least one `mail-transport-*` feature; use `delivery` + `channel-email` instead when you need the full notification pipeline with delivery attempts and user preferences. Pass `tenantMailTransport` as `tenantTransport` to `createChannelEmailFeature` so a tenant with a provider configured sends delivery mails through its own transport and other tenants through the app transport.");
50
- r.uiHints({
51
- displayLabel: "Mail Transport Foundation",
52
- category: "notifications",
53
- recommended: false,
54
- });
55
- r.requires({ features: ["config"] });
56
- // Plugin extension-point. Provider-features register here. The
57
- // entityName at registration time becomes the value tenants pick in
58
- // `provider` config-key (e.g. "smtp", "brevo-api").
59
- r.extendsRegistrar(MAIL_TRANSPORT_EXTENSION, {
60
- onRegister: () => {
61
- // No side-effects at register-time — the registry stores the
62
- // usage, factory looks it up at request-time. Same shape as
63
- // delivery's extendsRegistrar.
64
- },
65
- });
66
- // Provider-selector. Default empty so the boot-validator throws if a
67
- // tenant tries to send mail without first picking + setting up a
68
- // provider — better than a silent fallback. The actual list of valid
69
- // values lives in the registered plugins, not here — Designer-UI can
70
- // render `getExtensionUsages("mailTransport").map(u => u.entityName)`
71
- // as the option-list.
72
- const providerConfigKey = r.config("provider", createTenantConfig("text", {
73
- default: "",
74
- // required: ohne gewählten Provider wirft createTransportForTenant —
75
- // readiness meldete vorher ready:true und der erste Mail-Send
76
- // lieferte den UnconfiguredError (280/1).
77
- required: true,
78
- write: access.roles("TenantAdmin", "SystemAdmin"),
79
- read: access.roles("TenantAdmin", "SystemAdmin", "User"),
80
- }));
81
- // Readiness gating: transport-plugins' required keys/secrets count only
82
- // while their plugin is the one this key selects.
83
- r.extensionSelector(MAIL_TRANSPORT_EXTENSION, providerConfigKey);
84
- return {
85
- /** Config-key-handle for the provider-selector. */
86
- providerConfigKey,
87
- };
88
- });
48
+ export function createMailFoundationFeature() {
49
+ return defineFeature(FEATURE_NAME, (r) => {
50
+ r.describe("Defines the `mailTransport` extension point and a per-tenant `provider` config key that selects which registered transport plugin to use at runtime. Call `createTransportForTenant(ctx, tenantId)` to get an `EmailTransport` ready for sending \u2014 use this feature together with at least one `mail-transport-*` feature; use `delivery` + `channel-email` instead when you need the full notification pipeline with delivery attempts and user preferences. Pass `tenantMailTransport` as `tenantTransport` to `createChannelEmailFeature` so a tenant with a provider configured sends delivery mails through its own transport and other tenants through the app transport.");
51
+ r.uiHints({
52
+ displayLabel: "Mail Transport Foundation",
53
+ category: "notifications",
54
+ recommended: false,
55
+ });
56
+ r.requires({ features: ["config"] });
57
+ // Plugin extension-point. Provider-features register here. The
58
+ // entityName at registration time becomes the value tenants pick in
59
+ // `provider` config-key (e.g. "smtp", "brevo-api").
60
+ r.extendsRegistrar(MAIL_TRANSPORT_EXTENSION, {
61
+ onRegister: () => {
62
+ // No side-effects at register-time — the registry stores the
63
+ // usage, factory looks it up at request-time. Same shape as
64
+ // delivery's extendsRegistrar.
65
+ },
66
+ });
67
+ // Provider-selector. Default empty so the boot-validator throws if a
68
+ // tenant tries to send mail without first picking + setting up a
69
+ // provider — better than a silent fallback. The actual list of valid
70
+ // values lives in the registered plugins, not here — Designer-UI can
71
+ // render `getExtensionUsages("mailTransport").map(u => u.entityName)`
72
+ // as the option-list.
73
+ const providerConfigKey = r.config("provider", createTenantConfig("text", {
74
+ default: "",
75
+ // required: without a chosen provider createTransportForTenant throws —
76
+ // readiness used to report ready:true and the first mail send
77
+ // surfaced the UnconfiguredError (280/1).
78
+ required: true,
79
+ write: access.roles("TenantAdmin", "SystemAdmin"),
80
+ read: access.roles("TenantAdmin", "SystemAdmin", "User"),
81
+ }));
82
+ // Readiness gating: transport-plugins' required keys/secrets count only
83
+ // while their plugin is the one this key selects.
84
+ r.extensionSelector(MAIL_TRANSPORT_EXTENSION, providerConfigKey);
85
+ return {
86
+ /** Config-key-handle for the provider-selector. */
87
+ providerConfigKey,
88
+ };
89
+ }, { dedupeOptions: {} });
90
+ }
91
+ // The typed handles below come from one shared instance; each factory call builds its own handle objects.
92
+ const sharedMailFoundationFeature = createMailFoundationFeature();
93
+ /** @deprecated Use createMailFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
94
+ export const mailFoundationFeature = sharedMailFoundationFeature;
89
95
  // =============================================================================
90
96
  // Transport-factory — looks up the registered plugin + delegates
91
97
  // =============================================================================
@@ -121,7 +127,7 @@ export async function createTransportForTenantIfConfigured(ctx, tenantId, handle
121
127
  if (!ctx.registry) {
122
128
  throw new Error(`${handlerName}: ctx.registry is missing — required to look up registered mail-transport plugins`);
123
129
  }
124
- const provider = requireDefined(await ctxConfig(mailFoundationFeature.exports.providerConfigKey), FEATURE_NAME, "provider"); // @cast-boundary engine-payload
130
+ const provider = requireDefined(await ctxConfig(sharedMailFoundationFeature.exports.providerConfigKey), FEATURE_NAME, "provider"); // @cast-boundary engine-payload
125
131
  if (provider.length === 0)
126
132
  return null;
127
133
  const usages = ctx.registry.getExtensionUsages(MAIL_TRANSPORT_EXTENSION);
@@ -1 +1 @@
1
- export { createTransportForTenant, createTransportForTenantIfConfigured, isMailTransportPlugin, MAIL_TRANSPORT_EXTENSION, type MailTransportContext, type MailTransportPlugin, mailFoundationFeature, type TenantMailTransportScope, tenantMailTransport, } from "./feature.js";
1
+ export { createMailFoundationFeature, createTransportForTenant, createTransportForTenantIfConfigured, isMailTransportPlugin, MAIL_TRANSPORT_EXTENSION, type MailTransportContext, type MailTransportPlugin, mailFoundationFeature, type TenantMailTransportScope, tenantMailTransport, } from "./feature.js";
@@ -6,4 +6,4 @@
6
6
  // up the registered transport-plugin, returns its EmailTransport
7
7
  // - `MailTransportPlugin` — type that provider-features implement
8
8
  // when registering via `r.useExtension("mailTransport", ...)`
9
- export { createTransportForTenant, createTransportForTenantIfConfigured, isMailTransportPlugin, MAIL_TRANSPORT_EXTENSION, mailFoundationFeature, tenantMailTransport, } from "./feature.js";
9
+ export { createMailFoundationFeature, createTransportForTenant, createTransportForTenantIfConfigured, isMailTransportPlugin, MAIL_TRANSPORT_EXTENSION, mailFoundationFeature, tenantMailTransport, } from "./feature.js";
@@ -9,6 +9,10 @@ export declare function getInbox(tenantId: string): readonly EmailMessage[];
9
9
  * Szenarien).
10
10
  */
11
11
  export declare function clearInbox(tenantId: string): void;
12
+ export declare function createMailTransportInMemoryFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
13
+ readonly exports: void;
14
+ };
15
+ /** @deprecated Use createMailTransportInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
12
16
  export declare const mailTransportInMemoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
13
17
  readonly exports: void;
14
18
  };
@@ -60,19 +60,23 @@ export function clearInbox(tenantId) {
60
60
  // =============================================================================
61
61
  // Feature-definition
62
62
  // =============================================================================
63
- export const mailTransportInMemoryFeature = defineFeature(FEATURE_NAME, (r) => {
64
- r.describe('Registers an in-process `"inmemory"` provider for `mail-foundation` that buffers sent mails per tenant instead of contacting an SMTP server. Use `getInbox(tenantId)` and `clearInbox(tenantId)` in demo apps and tests; not for production (buffer is process-memory, lost on restart).');
65
- // Kein requires auf "config" oder "secrets" — der
66
- // In-Memory-Transport hat keine Config (nichts zu konfigurieren) und
67
- // kein Secret. Der einzige hard-require ist mail-foundation, das den
68
- // extension-point "mailTransport" definiert.
69
- r.requires({ features: ["mail-foundation"] });
70
- const plugin = {
71
- build: async (_ctx, tenantId) => {
72
- // Returnt den per-tenant Buffer. Identitätsstabil zwischen calls
73
- // damit die Demo-Inbox accumulated bleibt.
74
- return getOrCreateTransportForTenant(tenantId);
75
- }, // @wrapper-known semantic-alias
76
- };
77
- r.useExtension(MAIL_TRANSPORT_EXTENSION, "inmemory", plugin);
78
- });
63
+ export function createMailTransportInMemoryFeature() {
64
+ return defineFeature(FEATURE_NAME, (r) => {
65
+ r.describe('Registers an in-process `"inmemory"` provider for `mail-foundation` that buffers sent mails per tenant instead of contacting an SMTP server. Use `getInbox(tenantId)` and `clearInbox(tenantId)` in demo apps and tests; not for production (buffer is process-memory, lost on restart).');
66
+ // Kein requires auf "config" oder "secrets" — der
67
+ // In-Memory-Transport hat keine Config (nichts zu konfigurieren) und
68
+ // kein Secret. Der einzige hard-require ist mail-foundation, das den
69
+ // extension-point "mailTransport" definiert.
70
+ r.requires({ features: ["mail-foundation"] });
71
+ const plugin = {
72
+ build: async (_ctx, tenantId) => {
73
+ // Returns the per-tenant buffer. Identity-stable across calls so the
74
+ // demo inbox keeps accumulating.
75
+ return getOrCreateTransportForTenant(tenantId);
76
+ }, // @wrapper-known semantic-alias
77
+ };
78
+ r.useExtension(MAIL_TRANSPORT_EXTENSION, "inmemory", plugin);
79
+ }, { dedupeOptions: {} });
80
+ }
81
+ /** @deprecated Use createMailTransportInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
82
+ export const mailTransportInMemoryFeature = createMailTransportInMemoryFeature();
@@ -1 +1 @@
1
- export { clearInbox, getInbox, mailTransportInMemoryFeature } from "./feature.js";
1
+ export { clearInbox, createMailTransportInMemoryFeature, getInbox, mailTransportInMemoryFeature, } from "./feature.js";
@@ -1,2 +1,2 @@
1
1
  // Public API of the mail-transport-inmemory bundled-feature.
2
- export { clearInbox, getInbox, mailTransportInMemoryFeature } from "./feature.js";
2
+ export { clearInbox, createMailTransportInMemoryFeature, getInbox, mailTransportInMemoryFeature, } from "./feature.js";
@@ -3,6 +3,22 @@ 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 function createMailTransportSmtpFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
7
+ readonly exports: {
8
+ /** Config-key-handles — typed reads via `ctx.config(...)` in
9
+ * consumer handlers. */
10
+ configKeys: {
11
+ readonly host: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
12
+ readonly port: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"number">;
13
+ readonly secure: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"boolean">;
14
+ readonly from: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
15
+ readonly authUser: 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. */
6
22
  export declare const mailTransportSmtpFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
7
23
  readonly exports: {
8
24
  /** Config-key-handles — typed reads via `ctx.config(...)` in
@@ -50,82 +50,88 @@ export function setSmtpMailHostLookup(fn) {
50
50
  // =============================================================================
51
51
  // Feature-definition
52
52
  // =============================================================================
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
- });
53
+ export function createMailTransportSmtpFeature() {
54
+ return defineFeature(FEATURE_NAME, (r) => {
55
+ 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.');
56
+ r.uiHints({
57
+ displayLabel: "Mail Transport · SMTP",
58
+ category: "notifications",
59
+ recommended: false,
60
+ });
61
+ r.requires({ features: ["config"] });
62
+ r.requires({ features: ["secrets"] });
63
+ r.requires({ features: ["mail-foundation"] });
64
+ r.envSchema(mailTransportSmtpEnvSchema);
65
+ // Provider-secret. Sensitive: redact-helper for admin-UI display.
66
+ const password = r.secret("smtp.password", {
67
+ label: { en: "SMTP password" },
68
+ hint: {
69
+ en: "Login password at the SMTP server. Brevo/Postmark/SES call it 'API key' or 'SMTP credentials'.",
70
+ },
71
+ redact: (plaintext) => {
72
+ if (plaintext.length < 8)
73
+ return "•".repeat(plaintext.length);
74
+ return `${plaintext.slice(0, 3)}...${plaintext.slice(-2)}`;
75
+ },
76
+ scope: "tenant",
77
+ // required: true ↔ the missing-secret throw in readPassword — keep in sync.
78
+ required: true,
79
+ });
80
+ // required: true ↔ the requireNonEmpty calls in buildSmtpTransport — keep in sync.
81
+ const configKeys = r.config({
82
+ keys: {
83
+ host: createTenantConfig("text", {
84
+ required: true,
85
+ default: "",
86
+ write: access.roles("TenantAdmin", "SystemAdmin"),
87
+ read: access.roles("TenantAdmin", "SystemAdmin"),
88
+ }),
89
+ port: createTenantConfig("number", {
90
+ default: 587,
91
+ bounds: { min: 1, max: 65535 },
92
+ write: access.roles("TenantAdmin", "SystemAdmin"),
93
+ }),
94
+ secure: createTenantConfig("boolean", {
95
+ default: false,
96
+ write: access.roles("TenantAdmin", "SystemAdmin"),
97
+ }),
98
+ from: createTenantConfig("text", {
99
+ required: true,
100
+ default: "",
101
+ write: access.roles("TenantAdmin", "SystemAdmin"),
102
+ read: access.roles("TenantAdmin", "SystemAdmin"),
103
+ }),
104
+ authUser: createTenantConfig("text", {
105
+ required: true,
106
+ default: "",
107
+ write: access.roles("TenantAdmin", "SystemAdmin"),
108
+ read: access.roles("TenantAdmin", "SystemAdmin"),
109
+ }),
110
+ },
111
+ });
112
+ // Plugin: register against mail-foundation's "mailTransport" extension.
113
+ // `entityName` "smtp" is what tenants set in mail-foundation's
114
+ // `provider` config-key to pick this transport.
115
+ const plugin = {
116
+ build: async (ctx, tenantId) => buildSmtpTransport(ctx, tenantId), // @wrapper-known semantic-alias
117
+ };
118
+ r.useExtension(MAIL_TRANSPORT_EXTENSION, "smtp", plugin);
119
+ return {
120
+ /** Config-key-handles — typed reads via `ctx.config(...)` in
121
+ * consumer handlers. */
122
+ configKeys,
123
+ /** Secret-handle for the SMTP password. */
124
+ password,
125
+ };
126
+ }, { dedupeOptions: {} });
127
+ }
128
+ // The typed handles below come from one shared instance; each factory call builds its own handle objects.
129
+ const sharedMailTransportSmtpFeature = createMailTransportSmtpFeature();
130
+ /** @deprecated Use createMailTransportSmtpFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
131
+ export const mailTransportSmtpFeature = sharedMailTransportSmtpFeature;
126
132
  /** Typed handle for the SMTP password — exported so seeds + tests can
127
133
  * set it via `secrets:write:set` with the full qualified-name. */
128
- export const SMTP_PASSWORD = mailTransportSmtpFeature.exports.password;
134
+ export const SMTP_PASSWORD = sharedMailTransportSmtpFeature.exports.password;
129
135
  // =============================================================================
130
136
  // Internal: build the EmailTransport from tenant config + secret
131
137
  // =============================================================================
@@ -146,11 +152,11 @@ async function buildSmtpTransport(ctx, tenantId) {
146
152
  throw new Error(`${FEATURE_NAME}: ctx.config is missing — feature requires the config-feature mounted in the registry`);
147
153
  }
148
154
  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);
155
+ const host = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.host), FEATURE_NAME, "host", SMTP_HINT);
156
+ const port = requireDefined(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.port), FEATURE_NAME, "port"); // @cast-boundary engine-payload
157
+ const secure = requireDefined(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.secure), FEATURE_NAME, "secure"); // @cast-boundary engine-payload
158
+ const from = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.from), FEATURE_NAME, "from", SMTP_HINT);
159
+ const authUser = requireNonEmpty(await ctxConfig(sharedMailTransportSmtpFeature.exports.configKeys.authUser), FEATURE_NAME, "authUser", SMTP_HINT);
154
160
  const password = await readPassword(ctx, tenantId);
155
161
  let target;
156
162
  try {
@@ -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.