@cosmicdrift/kumiko-bundled-features 0.344.0 → 0.346.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 (43) hide show
  1. package/dist/audit/constants.d.ts +7 -0
  2. package/dist/audit/constants.js +3 -0
  3. package/dist/audit/feature.js +1 -1
  4. package/dist/audit/handlers/details.query.d.ts +4 -0
  5. package/dist/audit/handlers/details.query.js +14 -3
  6. package/dist/audit/handlers/list.query.d.ts +4 -0
  7. package/dist/audit/handlers/list.query.js +11 -2
  8. package/dist/audit/handlers/resolve-audit-tenant.d.ts +7 -0
  9. package/dist/audit/handlers/resolve-audit-tenant.js +14 -0
  10. package/dist/audit/i18n.js +3 -0
  11. package/dist/audit/run-escape-hatch-retention.js +25 -12
  12. package/dist/auth-email-password/constants.d.ts +1 -0
  13. package/dist/auth-email-password/constants.js +1 -0
  14. package/dist/auth-email-password/feature.js +6 -2
  15. package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +6 -2
  16. package/dist/auth-email-password/handlers/invite-signup-complete.write.js +14 -4
  17. package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +6 -2
  18. package/dist/auth-email-password/handlers/signup-confirm.write.js +8 -1
  19. package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +9 -0
  20. package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.js +39 -0
  21. package/dist/auth-email-password/handlers/token-request-handler.js +7 -1
  22. package/dist/auth-email-password/i18n.js +1 -0
  23. package/dist/auth-email-password/web/auth-client.d.ts +6 -1
  24. package/dist/auth-email-password/web/auth-client.js +6 -2
  25. package/dist/auth-email-password/web/signup-complete-screen.js +9 -1
  26. package/dist/billing-foundation/subscription-tier-sync.js +21 -10
  27. package/dist/step-dispatcher/dispatch-payload.d.ts +49 -0
  28. package/dist/step-dispatcher/dispatch-payload.js +115 -0
  29. package/dist/step-dispatcher/feature.js +23 -121
  30. package/dist/step-dispatcher/webhook-runner.d.ts +4 -0
  31. package/dist/step-dispatcher/webhook-runner.js +26 -3
  32. package/dist/tier-engine/constants.d.ts +5 -0
  33. package/dist/tier-engine/constants.js +6 -0
  34. package/dist/tier-engine/entity.js +2 -4
  35. package/dist/tier-engine/feature.js +2 -2
  36. package/dist/tier-engine/handlers/set-tenant-tier.write.js +10 -4
  37. package/dist/tier-engine/index.d.ts +1 -1
  38. package/dist/tier-engine/index.js +1 -1
  39. package/package.json +9 -9
  40. package/src/audit/changes.json +12 -0
  41. package/src/auth-email-password/changes.json +24 -0
  42. package/src/billing-foundation/changes.json +6 -0
  43. package/src/step-dispatcher/changes.json +31 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-bundled-features",
3
- "version": "0.344.0",
3
+ "version": "0.346.0",
4
4
  "description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -503,12 +503,12 @@
503
503
  }
504
504
  },
505
505
  "dependencies": {
506
- "@cosmicdrift/kumiko-dispatcher-live": "0.344.0",
507
- "@cosmicdrift/kumiko-framework": "0.344.0",
508
- "@cosmicdrift/kumiko-headless": "0.344.0",
509
- "@cosmicdrift/kumiko-renderer": "0.344.0",
510
- "@cosmicdrift/kumiko-renderer-web": "0.344.0",
511
- "@cosmicdrift/kumiko-types": "0.344.0",
506
+ "@cosmicdrift/kumiko-dispatcher-live": "0.346.0",
507
+ "@cosmicdrift/kumiko-framework": "0.346.0",
508
+ "@cosmicdrift/kumiko-headless": "0.346.0",
509
+ "@cosmicdrift/kumiko-renderer": "0.346.0",
510
+ "@cosmicdrift/kumiko-renderer-web": "0.346.0",
511
+ "@cosmicdrift/kumiko-types": "0.346.0",
512
512
  "@mollie/api-client": "^4.5.0",
513
513
  "@node-rs/argon2": "^2.0.2",
514
514
  "@types/mailparser": "^3.4.6",
@@ -1025,8 +1025,8 @@
1025
1025
  ],
1026
1026
  "devDependencies": {
1027
1027
  "@testing-library/user-event": "^14.6.1",
1028
- "@cosmicdrift/kumiko-locale-de": "0.344.0",
1029
- "@cosmicdrift/kumiko-locale-es": "0.344.0",
1028
+ "@cosmicdrift/kumiko-locale-de": "0.346.0",
1029
+ "@cosmicdrift/kumiko-locale-es": "0.346.0",
1030
1030
  "jsqr": "^1.4.0"
1031
1031
  }
1032
1032
  }
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "version": "0.346.0",
4
+ "type": "improvement",
5
+ "title": "Audit queries can read app-instance system events with scope \"system\" (SystemAdmin only)",
6
+ "detail": "Audit queries accept `scope: \"system\"` for SystemAdmin\n`audit:query:list` and `audit:query:details` take an optional `scope` (`\"tenant\"` or `\"system\"`). With `\"system\"` a SystemAdmin reads the app-instance system events, e.g. `kumiko:system:app.started`; other roles are denied. Without `scope` nothing changes."
7
+ },
8
+ {
9
+ "version": "0.345.0",
10
+ "type": "fix",
11
+ "title": "Escape-hatch retention loads only expirable rows",
12
+ "detail": "Escape-hatch audit retention loads only rows that can expire\nThe retention job used to load every escapeHatchUse event to decide which ones to prune. It now reads the storing tenants with one grouped query and loads only events older than each storing tenant's cutoff. The same rows are pruned as before."
13
+ },
2
14
  {
3
15
  "version": "0.343.0",
4
16
  "type": "improvement",
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "version": "0.345.0",
4
+ "type": "fix",
5
+ "title": "invite-signup-complete enforces the MFA gate before issuing a session",
6
+ "detail": "`invite-signup-complete` now applies the same MFA gate as `invite-accept-with-login`. The account is still created and the invitation accepted, but an invitee whose role requires MFA (for example an admin invitation under the `admins` policy) receives the MFA step instead of a session. Member invitations keep receiving a session directly."
7
+ },
8
+ {
9
+ "version": "0.345.0",
10
+ "type": "fix",
11
+ "title": "signup-confirm enforces the MFA gate before issuing a session",
12
+ "detail": "`POST /auth/signup-confirm` now runs the login's MFA gate before it issues the first session. Self-signup makes the new user TenantAdmin of a fresh tenant, so under an MFA policy that covers admins the route used to hand out an admin session without a second factor. The account, the tenant and a bound handover claim are still created, but when the gate applies the route answers with the login contract (`mfaSetupRequired` plus `preauthSetupToken`, or `mfaRequired` plus `challengeToken`) and sets no cookies. `SignupCompleteScreen` then tells the user the account is active and sends them to sign in, where they set up the second factor. Without `mfaStatusChecker` nothing changes. Two exported types change shape: `SignupConfirmData` gains the two MFA variants, and `confirmSignup` now resolves to `SignupConfirmResult` with `kind: \"signed-in\"` (the previous `SignupConfirmSuccess` fields) or `kind: \"mfa-pending\"`. The handler and `invite-signup-complete` also run the gate before they delete the token, so an error in the MFA check leaves the link usable for a retry."
13
+ },
14
+ {
15
+ "version": "0.345.0",
16
+ "type": "fix",
17
+ "title": "switch-tenant enforces the MFA gate before issuing a session",
18
+ "detail": "`POST /auth/switch-tenant` now runs the same MFA gate as login before it issues the new session. A user who is a plain member in one tenant and an admin in another can no longer reach an admin session without a second factor by switching. When the target tenant requires MFA the route answers with the login contract (`mfaRequired` plus `challengeToken`, or `mfaSetupRequired` plus `preauthSetupToken`) and sets no cookies. The gate runs in a new system-only handler, `auth-email-password:write:switch-tenant-mfa-gate`, which resolves the membership and roles itself; `runDevApp` and `runProdApp` wire it as `switchTenantMfaGateHandler` whenever auth-mfa is mounted."
19
+ },
20
+ {
21
+ "version": "0.345.0",
22
+ "type": "fix",
23
+ "title": "Token mail expiry uses the recipient's profile time zone",
24
+ "detail": "Token mails show the expiry in the recipient's own time zone\nPassword reset, email verification and account unlock are requested anonymously, so `ctx.tz.user` only held the tenant default or UTC. These mails now use the recipient's profile time zone when it is a valid IANA zone and fall back to the previous value otherwise. Signup and invite mails keep the fallback because the recipient has no profile yet."
25
+ },
2
26
  {
3
27
  "version": "0.343.0",
4
28
  "type": "improvement",
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.346.0",
4
+ "type": "fix",
5
+ "title": "Subscription webhooks no longer overwrite manual tier grants",
6
+ "detail": "Subscription tier sync keeps manual tier grants\nThe billing webhook sync now skips tier assignments with `source: \"manual\"`, so a `set-tenant-tier` grant is no longer overwritten by Stripe created/canceled events. Rows the sync writes are marked `source: \"billing\"`. `TierAssignmentSources` is exported from tier-engine."
7
+ },
2
8
  {
3
9
  "version": "0.344.0",
4
10
  "type": "breaking",
@@ -1,4 +1,35 @@
1
1
  [
2
+ {
3
+ "version": "0.346.0",
4
+ "type": "fix",
5
+ "title": "A failed key erase no longer causes a second delivery of the same dispatch request",
6
+ "detail": "step-dispatcher no longer re-sends after a failed key erase\nWhen erasing the per-dispatch key failed after the outcome was recorded, the redelivered request was sent again and produced a second `step.dispatched`. A redelivery now only repeats the erase."
7
+ },
8
+ {
9
+ "version": "0.346.0",
10
+ "type": "fix",
11
+ "title": "Webhook caller headers no longer merge with the default Content-Type or the auth header",
12
+ "detail": "Webhook headers merge case-insensitively\nA caller `Content-Type` replaces the default `application/json` instead of being joined with it. When a caller header collides with the auth header (any casing), the resolved secret value wins."
13
+ },
14
+ {
15
+ "version": "0.346.0",
16
+ "type": "fix",
17
+ "title": "Webhook requests time out after 10 seconds instead of blocking the dispatcher",
18
+ "detail": "Webhook requests time out after 10 seconds\nA hanging receiver now ends as `step.dispatch-failed` and no longer stalls the step-dispatcher for every tenant."
19
+ },
20
+ {
21
+ "version": "0.346.0",
22
+ "type": "breaking",
23
+ "title": "r.step.webhook.send drops the unused retry option",
24
+ "detail": "`r.step.webhook.send` no longer accepts `retry`\nThe option was never applied: every dispatch request is delivered once. Passing it is now a type error, and the dispatch-requested payload no longer carries it. Stored events that still contain `retry` are parsed and delivered as before.",
25
+ "migration": "Remove `retry` from `r.step.webhook.send` calls; it was never applied. Each dispatch request is delivered once; a delivery error ends as step.dispatch-failed."
26
+ },
27
+ {
28
+ "version": "0.345.0",
29
+ "type": "improvement",
30
+ "title": "Webhook sends carry an Idempotency-Key header that is stable across redeliveries",
31
+ "detail": "Webhook sends carry an Idempotency-Key header\nEvery `r.step.webhook.send` request now has `Idempotency-Key: <dispatch stream id>`. The value stays the same when the same dispatch request is delivered again, so receivers can deduplicate. An explicit `Idempotency-Key` in `headers` (any casing) takes precedence."
32
+ },
2
33
  {
3
34
  "version": "0.335.0",
4
35
  "type": "fix",