@cosmicdrift/kumiko-bundled-features 0.341.0 → 0.343.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 (117) hide show
  1. package/dist/audit/constants.d.ts +7 -0
  2. package/dist/audit/constants.js +7 -0
  3. package/dist/audit/escape-hatch-audit-sink.d.ts +1 -0
  4. package/dist/audit/escape-hatch-audit-sink.js +1 -0
  5. package/dist/audit/feature.js +34 -7
  6. package/dist/audit/run-escape-hatch-retention.d.ts +11 -0
  7. package/dist/audit/run-escape-hatch-retention.js +91 -0
  8. package/dist/auth-email-password/bootstrap.d.ts +8 -2
  9. package/dist/auth-email-password/bootstrap.js +7 -2
  10. package/dist/auth-email-password/email-templates.d.ts +4 -0
  11. package/dist/auth-email-password/email-templates.js +69 -16
  12. package/dist/auth-email-password/handlers/invite-create.write.js +4 -1
  13. package/dist/auth-email-password/handlers/signup-request.write.js +4 -1
  14. package/dist/auth-email-password/handlers/token-request-handler.js +3 -0
  15. package/dist/auth-email-password/magic-link-mail.d.ts +2 -0
  16. package/dist/auth-email-password/magic-link-mail.js +2 -0
  17. package/dist/auth-email-password/web/auth-form-primitives.d.ts +7 -1
  18. package/dist/auth-email-password/web/auth-form-primitives.js +5 -5
  19. package/dist/auth-email-password/web/confirm-account-unlock-screen.js +3 -3
  20. package/dist/auth-email-password/web/forgot-password-screen.js +2 -2
  21. package/dist/auth-email-password/web/invite-accept-screen.js +9 -9
  22. package/dist/auth-email-password/web/login-screen.js +8 -8
  23. package/dist/auth-email-password/web/request-account-unlock-screen.js +2 -2
  24. package/dist/auth-email-password/web/reset-password-screen.js +3 -3
  25. package/dist/auth-email-password/web/session-bootstrap-error.js +3 -3
  26. package/dist/auth-email-password/web/signup-complete-screen.js +3 -3
  27. package/dist/auth-email-password/web/signup-screen.js +2 -2
  28. package/dist/auth-email-password/web/verify-email-screen.js +3 -3
  29. package/dist/auth-mfa/web/mfa-setup-preauth-screen.js +5 -5
  30. package/dist/auth-mfa/web/mfa-verify-screen.js +3 -3
  31. package/dist/channel-discord/feature.js +1 -0
  32. package/dist/channel-email/email-channel.js +7 -1
  33. package/dist/channel-email/feature.js +1 -0
  34. package/dist/channel-email/pii-guard.js +6 -5
  35. package/dist/channel-email/smtp-transport.js +22 -1
  36. package/dist/channel-email/types.d.ts +1 -0
  37. package/dist/channel-in-app/feature.js +1 -0
  38. package/dist/channel-push/feature.js +1 -0
  39. package/dist/channel-slack/feature.js +1 -0
  40. package/dist/channel-teams/feature.js +1 -0
  41. package/dist/channel-teams/teams-channel.d.ts +2 -1
  42. package/dist/channel-teams/teams-channel.js +12 -0
  43. package/dist/channel-telegram/feature.js +1 -0
  44. package/dist/delivery/chat-webhook-channel.d.ts +2 -1
  45. package/dist/delivery/chat-webhook-channel.js +5 -2
  46. package/dist/delivery/chat-webhook-sender.d.ts +8 -1
  47. package/dist/delivery/chat-webhook-sender.js +45 -4
  48. package/dist/delivery/constants.d.ts +1 -1
  49. package/dist/delivery/constants.js +1 -1
  50. package/dist/delivery/delivery-service.d.ts +2 -1
  51. package/dist/delivery/delivery-service.js +55 -4
  52. package/dist/delivery/events.d.ts +19 -1
  53. package/dist/delivery/events.js +11 -1
  54. package/dist/delivery/feature.js +29 -5
  55. package/dist/delivery/handlers/log.query.d.ts +4 -2
  56. package/dist/delivery/handlers/log.query.js +46 -18
  57. package/dist/delivery/i18n.js +36 -0
  58. package/dist/delivery/index.d.ts +2 -1
  59. package/dist/delivery/index.js +1 -0
  60. package/dist/delivery/jobs.js +24 -10
  61. package/dist/delivery/notify-factory.d.ts +5 -0
  62. package/dist/delivery/notify-factory.js +6 -0
  63. package/dist/delivery/public-names.d.ts +4 -0
  64. package/dist/delivery/public-names.js +4 -0
  65. package/dist/delivery/tables.js +3 -0
  66. package/dist/delivery/testing.d.ts +2 -0
  67. package/dist/delivery/testing.js +2 -1
  68. package/dist/delivery/types.d.ts +5 -3
  69. package/dist/delivery/web/client-plugin.js +9 -1
  70. package/dist/delivery/web/delivery-channel-cell.d.ts +3 -0
  71. package/dist/delivery/web/delivery-channel-cell.js +10 -0
  72. package/dist/delivery/web/delivery-error-cell.d.ts +3 -0
  73. package/dist/delivery/web/delivery-error-cell.js +16 -0
  74. package/dist/delivery/web/delivery-status-cell.d.ts +1 -1
  75. package/dist/delivery/web/delivery-status-cell.js +11 -1
  76. package/dist/delivery/web/delivery-time-cell.d.ts +3 -0
  77. package/dist/delivery/web/delivery-time-cell.js +6 -0
  78. package/dist/delivery/web/delivery-type-cell.d.ts +3 -0
  79. package/dist/delivery/web/delivery-type-cell.js +17 -0
  80. package/dist/secrets/constants.d.ts +6 -0
  81. package/dist/secrets/constants.js +8 -0
  82. package/dist/secrets/feature.d.ts +3 -0
  83. package/dist/secrets/feature.js +3 -0
  84. package/dist/secrets/i18n.js +4 -3
  85. package/dist/secrets/index.d.ts +3 -2
  86. package/dist/secrets/index.js +3 -2
  87. package/dist/secrets/write-gate.d.ts +1 -0
  88. package/dist/secrets/write-gate.js +14 -6
  89. package/dist/shared/index.d.ts +1 -0
  90. package/dist/shared/index.js +1 -0
  91. package/dist/shared/redact.d.ts +4 -0
  92. package/dist/shared/redact.js +21 -0
  93. package/dist/step-dispatcher/feature.js +2 -1
  94. package/dist/step-dispatcher/mail-runner.d.ts +0 -1
  95. package/dist/step-dispatcher/mail-runner.js +0 -5
  96. package/dist/tenant/web/member-roles-cell.js +1 -1
  97. package/dist/tenant/web/member-status-cell.js +1 -1
  98. package/dist/tenant-lifecycle/feature.js +8 -2
  99. package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +2 -1
  100. package/dist/tenant-lifecycle/run-tenant-destroy.js +16 -7
  101. package/dist/user/index.d.ts +1 -0
  102. package/dist/user/index.js +1 -0
  103. package/dist/user/resolve-display-names.d.ts +2 -0
  104. package/dist/user/resolve-display-names.js +24 -0
  105. package/dist/waitlist/handlers/submit.write.js +1 -1
  106. package/dist/waitlist/options.d.ts +3 -2
  107. package/package.json +9 -9
  108. package/src/audit/changes.json +6 -0
  109. package/src/auth-email-password/changes.json +19 -0
  110. package/src/channel-email/changes.json +6 -0
  111. package/src/channel-teams/changes.json +8 -0
  112. package/src/delivery/changes.json +32 -0
  113. package/src/jobs/changes.json +6 -0
  114. package/src/secrets/changes.json +6 -0
  115. package/src/waitlist/changes.json +6 -0
  116. /package/dist/{tenant → shared}/web/translate-or-raw.d.ts +0 -0
  117. /package/dist/{tenant → shared}/web/translate-or-raw.js +0 -0
@@ -0,0 +1,8 @@
1
+ [
2
+ {
3
+ "version": "0.343.0",
4
+ "type": "fix",
5
+ "title": "Teams no longer reports any 2xx as delivered",
6
+ "detail": "`channel-teams` no longer reports every 2xx answer as sent. A 200 with the body `1` (classic Office connector) is a confirmed send. A 202 (Power Automate / Workflows endpoints) means the message was accepted but not confirmed: the attempt is `sent` and `NotifyResult.deliveries[].confirmed` is `false`. Any other 2xx, including an empty 200 as a made-up URL returns, fails with `unexpected_response`.\n`NotifyDelivery.confirmed` and `ChannelResult.confirmed` are new and only ever `false`. `createChatWebhookChannel` takes an optional `classifyResponse`, which `postChatWebhook` calls for 2xx answers with a status and a lazy `readBodyPrefix()` (at most 64 bytes; the body is always cancelled afterwards). `ChatSendResult` success now carries `confirmed`. `confirmed` is returned for inline delivery only; jobs do not carry it yet."
7
+ }
8
+ ]
@@ -1,4 +1,36 @@
1
1
  [
2
+ {
3
+ "version": "0.343.0",
4
+ "type": "improvement",
5
+ "title": "Delivery log marks sends the provider did not confirm",
6
+ "detail": "The delivery log now records when a provider accepted a send without confirming delivery (for example a Teams webhook answering 202). `store_delivery_attempts` gets a nullable boolean column `confirmed`: `false` means accepted but unconfirmed, `null` means confirmed or not applicable. The `deliveryAttempt` event carries `confirmed: false` on both the inline and the job path, `delivery:query:log` returns `confirmed` per row, and the status cell shows \"Sent (unconfirmed)\" for such rows.",
7
+ "migration": "New nullable column store_delivery_attempts.confirmed. Consumers generate the migration with the generator (kumiko-schema generate) and apply it; existing rows stay null."
8
+ },
9
+ {
10
+ "version": "0.343.0",
11
+ "type": "breaking",
12
+ "title": "Delivery errors are fixed codes instead of raw messages",
13
+ "detail": "Delivery stores and returns only fixed error codes, never raw error messages. `delivery_attempts.error`, the `deliveryAttempt` event, `NotifyResult.deliveries[].error` and the job failure now hold one of `DELIVERY_FAILURE_CODES` (`timeout`, `network_error`, `redirect_blocked`, `host_not_allowed`, `missing_credentials`, `invalid_address`, `unexpected_response`, `render_failed`, `send_failed`, `channel_error`), one of `DELIVERY_SKIP_REASONS`, or `http_<status>`. A throwing channel ends as `send_failed` or `render_failed`; a failure around resolve or dispatch ends as `channel_error`. The full error goes to the log with URLs and email addresses redacted. `redactUrls` and `redactErrorText` are new next to `redactEmailAddresses`, which moved out of the step dispatcher.\n`@cosmicdrift/kumiko-framework/engine` exports `DELIVERY_FAILURE_CODES`, `DELIVERY_SKIP_REASONS`, `isDeliveryErrorCode` and the types `DeliveryErrorCode`, `DeliveryFailureCode`, `DeliverySkipReason` and `ChatSendFailureCode`. `NotifyDelivery.error`, `ChannelResult.error` and `DeliveryLogEntry.error` are now `DeliveryErrorCode`. `delivery:query:log` returns `channel_error` for stored rows that still hold free text.",
14
+ "migration": "NotifyDelivery.error is now a DeliveryErrorCode. Code that matches on error text must match the code instead (for example send_failed). Custom channels must return a DeliveryErrorCode in ChannelResult.error. Existing attempt events keep their free text; reading them through delivery:query:log masks it as channel_error."
15
+ },
16
+ {
17
+ "version": "0.343.0",
18
+ "type": "improvement",
19
+ "title": "Delivery log shows time and error and translates its values",
20
+ "detail": "The delivery log screen shows the time and the error of each attempt and translates type, channel, status and error. Error codes map to `delivery.error.<code>` (`http_<status>` to `delivery.error.http` with a `status` parameter), statuses to `delivery.status.<status>`, channels to `delivery.channel.<name>`. Every bundled channel feature registers its own channel label. Notification types are shown through `<scope>.notification.<name>` for a type `<scope>:notify:<name>`; apps register those labels, and the short name is shown when none exists. English, German and Spanish texts are included for the bundled keys.\n`translateOrRaw` moved from the tenant web folder to `shared/web`; it is internal."
21
+ },
22
+ {
23
+ "version": "0.343.0",
24
+ "type": "improvement",
25
+ "title": "Delivery log shows the recipient name",
26
+ "detail": "`delivery:query:log` returns a `recipientLabel` per row and the delivery log screen shows it in the recipient column: the user's display name, else the decrypted address, else the recipient id. Names are resolved with one batched lookup per page, and only when the user feature is mounted. The new `resolveUserDisplayNames(db, userIds)` is exported from the user feature. The recipient column is not sortable."
27
+ },
28
+ {
29
+ "version": "0.343.0",
30
+ "type": "improvement",
31
+ "title": "createDeliveryTestContext matches production notify",
32
+ "detail": "`createDeliveryTestContext` now behaves like the production `ctx.notify`. It takes a `secrets` option for inline-delivered chat channels and passes the calling context's job dispatcher to `notify()` on every call. Queued channels now go through the delivery jobs when the stack has a job consumer (`jobs: { consumerLane: \"worker\" }`); call `stack.drainJobs()` before asserting on the result. With `jobs: {}` and no `consumerLane` the attempts stay queued and `drainJobs()` never finishes. Without `jobs` they still deliver inline.\nNew export `createDeliveryNotifyFactory(deliveryService, { deliverQueuedInline? })` builds this `NotifyFactory` for custom setups."
33
+ },
2
34
  {
3
35
  "version": "0.341.0",
4
36
  "type": "breaking",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.343.0",
4
+ "type": "improvement",
5
+ "title": "ctx.crossTenantReads for read-only cross-tenant job reads",
6
+ "detail": "Jobs whose `escapeHatch` grants `unsafeRaw` get `ctx.crossTenantReads` with `selectMany`, `fetchOne` and `count` across all tenants, read-only. Each call is reported as the new escape-hatch kind `cross-tenant-read`; system crons audit it once per process and the metric `kumiko_escape_hatch_uses_total` counts every call. `EscapeHatchKind` and the `escape-hatch-used` audit schema gain `cross-tenant-read`.\n`tenant-lifecycle:job:run-tenant-destruction` checks through `ctx.crossTenantReads` whether a tenant is due and only then calls `ctx.db.unsafeRaw()`, so idle minutes no longer write an `unsafe-raw` audit event."
7
+ },
2
8
  {
3
9
  "version": "0.336.0",
4
10
  "type": "improvement",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.343.0",
4
+ "type": "improvement",
5
+ "title": "Recognise the invalid-secret-value error",
6
+ "detail": "`secrets` exports `isInvalidSecretValueError`, which recognises the validation error that `secrets:write:set` and `ctx.secrets.set` raise when a value fails the key's `valueSchema`. It also exports `SECRETS_ERROR_KEYS` (the i18n keys of the secrets write errors) and `INVALID_SECRET_VALUE_CODE` (the field error code), so callers can map the failure to their own message instead of matching strings."
7
+ },
2
8
  {
3
9
  "version": "0.341.0",
4
10
  "type": "improvement",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.342.0",
4
+ "type": "improvement",
5
+ "title": "Waitlist notifyRecipient may return a promise",
6
+ "detail": "Waitlist `notifyRecipient` may return a promise, so apps can read the admin address from config"
7
+ },
2
8
  {
3
9
  "version": "0.341.0",
4
10
  "type": "improvement",
File without changes