@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.
- package/dist/audit/handlers/details.query.js +1 -1
- package/dist/audit/handlers/list.query.js +1 -1
- package/dist/audit/run-escape-hatch-retention.js +1 -1
- package/dist/auth-email-password/bootstrap.js +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.js +6 -3
- package/dist/auth-email-password/handlers/invite-accept.write.js +6 -3
- package/dist/auth-email-password/handlers/invite-info.query.js +1 -1
- package/dist/auth-email-password/handlers/invite-signup-complete.write.js +6 -3
- package/dist/auth-email-password/handlers/signup-confirm.write.js +1 -1
- package/dist/auth-email-password/seeding.js +2 -2
- package/dist/auth-foundation/feature.d.ts +4 -0
- package/dist/auth-foundation/feature.js +37 -33
- package/dist/auth-foundation/index.d.ts +1 -1
- package/dist/auth-foundation/index.js +1 -1
- package/dist/auth-mfa/db/queries.js +1 -2
- package/dist/auth-mfa/handlers/enable-confirm-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/reencrypt.job.js +2 -3
- package/dist/auth-mfa/handlers/status.query.js +1 -1
- package/dist/auth-mfa/handlers/verify.write.js +1 -1
- package/dist/auth-mfa/mfa-code-verifier.js +1 -1
- package/dist/auth-mfa/mfa-status-checker.js +1 -1
- package/dist/auth-mfa-user-data/index.d.ts +4 -0
- package/dist/auth-mfa-user-data/index.js +13 -9
- package/dist/billing-foundation/billing-info-query.js +1 -1
- package/dist/billing-foundation/feature.d.ts +1 -0
- package/dist/billing-foundation/feature.js +5 -6
- package/dist/billing-foundation/handlers/create-portal-session.write.js +1 -1
- package/dist/billing-foundation/projection.js +1 -2
- package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +7 -0
- package/dist/cap-counter/calendar-cap-usage-reservation.js +28 -2
- package/dist/cap-counter/cap-reservation.d.ts +16 -0
- package/dist/cap-counter/cap-reservation.js +144 -14
- package/dist/cap-counter/feature.d.ts +4 -0
- package/dist/cap-counter/feature.js +74 -68
- package/dist/cap-counter/handlers/increment-rolling.write.js +3 -4
- package/dist/cap-counter/index.d.ts +3 -2
- package/dist/cap-counter/index.js +3 -2
- package/dist/cap-counter/tables.js +10 -3
- package/dist/cap-overview/handlers/caps-usage.query.js +1 -2
- package/dist/cap-overview/handlers/tenant-caps-list.query.js +1 -2
- package/dist/cap-overview/handlers/tenant-options.query.js +1 -1
- package/dist/channel-in-app/handlers/inbox.query.js +1 -1
- package/dist/channel-in-app/handlers/mark-all-read.write.js +1 -1
- package/dist/channel-in-app/handlers/mark-read.write.js +1 -1
- package/dist/channel-in-app/handlers/unread-count.query.js +1 -1
- package/dist/channel-in-app/tables.js +1 -2
- package/dist/compliance-profiles/handlers/for-tenant.query.js +1 -1
- package/dist/compliance-profiles/handlers/needs-profile.query.js +1 -1
- package/dist/compliance-profiles/handlers/set-profile.write.js +1 -2
- package/dist/compliance-profiles/resolve-for-tenant.js +1 -1
- package/dist/compliance-profiles/seeding.js +3 -5
- package/dist/compliance-profiles-ops/index.d.ts +8 -0
- package/dist/compliance-profiles-ops/index.js +19 -15
- package/dist/config/db/queries/resolver.js +1 -1
- package/dist/config/handlers/reencrypt.job.js +2 -2
- package/dist/config/resolver.js +1 -1
- package/dist/config/write-helpers.js +1 -1
- package/dist/crypto-shredding/handlers/forget-subject.write.js +6 -3
- package/dist/custom-fields/db/queries/field-access.js +1 -1
- package/dist/custom-fields/db/queries/projection.js +1 -1
- package/dist/custom-fields/db/queries/quota.js +1 -1
- package/dist/custom-fields/db/queries/retention.js +1 -2
- package/dist/custom-fields/db/queries/user-data-rights.js +1 -1
- package/dist/custom-fields/feature.d.ts +20 -2
- package/dist/custom-fields/feature.js +9 -13
- package/dist/custom-fields/handlers/clear-custom-field.write.js +2 -2
- package/dist/custom-fields/handlers/delete-system-field.write.js +2 -2
- package/dist/custom-fields/handlers/delete-tenant-field.write.js +2 -2
- package/dist/custom-fields/handlers/set-custom-field.write.js +2 -2
- package/dist/custom-fields/wire-for-entity.js +4 -4
- package/dist/data-retention/resolve-for-tenant.js +1 -1
- package/dist/data-retention/run-retention-cleanup.js +17 -13
- package/dist/delivery/address-opt-out.js +1 -2
- package/dist/delivery/attempt-log-retention.js +1 -1
- package/dist/delivery/channel-context.js +1 -1
- package/dist/delivery/db/queries/address-opt-outs.js +1 -1
- package/dist/delivery/db/queries/preferences.js +1 -1
- package/dist/delivery/delivery-service.js +16 -7
- package/dist/delivery/feature.js +1 -1
- package/dist/delivery/handlers/log.query.js +2 -3
- package/dist/delivery/handlers/preferences.query.js +1 -1
- package/dist/delivery/upsert-preference.js +1 -2
- package/dist/derivatives-sharp/feature.d.ts +4 -0
- package/dist/derivatives-sharp/feature.js +15 -11
- package/dist/derivatives-sharp/index.d.ts +1 -1
- package/dist/derivatives-sharp/index.js +1 -1
- package/dist/document-ingest-foundation/feature.d.ts +7 -0
- package/dist/document-ingest-foundation/feature.js +94 -90
- package/dist/document-ingest-foundation/forget-extract-with-file-ref.js +3 -3
- package/dist/document-ingest-foundation/index.d.ts +1 -1
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/feature-toggles/global-feature-state-table.js +1 -2
- package/dist/feature-toggles/handlers/set.write.js +3 -5
- package/dist/feature-toggles/toggle-runtime.js +1 -1
- package/dist/file-derivatives/feature.d.ts +1 -0
- package/dist/file-derivatives/feature.js +2 -1
- package/dist/file-derivatives/handlers/public-variant-by-file-ref.query.js +1 -1
- package/dist/file-derivatives/handlers/public-variant.query.js +1 -1
- package/dist/file-foundation/feature.d.ts +6 -0
- package/dist/file-foundation/feature.js +29 -25
- package/dist/file-foundation/index.d.ts +1 -1
- package/dist/file-foundation/index.js +1 -1
- package/dist/file-foundation/read-file-ref-content.js +1 -1
- package/dist/file-provider-inmemory/feature.d.ts +4 -0
- package/dist/file-provider-inmemory/feature.js +24 -20
- package/dist/file-provider-inmemory/index.d.ts +1 -1
- package/dist/file-provider-inmemory/index.js +1 -1
- package/dist/file-provider-s3/env-feature.d.ts +3 -0
- package/dist/file-provider-s3/env-feature.js +46 -0
- package/dist/file-provider-s3/feature.d.ts +26 -0
- package/dist/file-provider-s3/feature.js +84 -72
- package/dist/file-provider-s3/index.d.ts +1 -1
- package/dist/file-provider-s3/index.js +1 -1
- package/dist/file-provider-s3/lib/index.d.ts +3 -0
- package/dist/file-provider-s3/lib/index.js +2 -0
- package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.js +19 -19
- package/dist/file-provider-s3-env/index.d.ts +8 -1
- package/dist/file-provider-s3-env/index.js +7 -2
- package/dist/files-provider-s3/index.d.ts +5 -3
- package/dist/files-provider-s3/index.js +5 -2
- package/dist/files-tenant-data/handlers/sweep-orphaned-derivatives.job.js +1 -1
- package/dist/files-tenant-data/hooks.js +1 -2
- package/dist/folders/feature.d.ts +6 -2
- package/dist/folders/feature.js +4 -2
- package/dist/folders-user-data/index.d.ts +4 -0
- package/dist/folders-user-data/index.js +21 -17
- package/dist/form-draft/db/queries/cleanup.js +1 -1
- package/dist/form-draft/db/queries/draft-count.js +1 -1
- package/dist/form-draft/db/queries/owned-file-refs.js +1 -2
- package/dist/form-draft/feature.d.ts +4 -0
- package/dist/form-draft/feature.js +5 -1
- package/dist/form-draft/handlers/cleanup.job.js +2 -2
- package/dist/form-draft/index.d.ts +1 -1
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.js +1 -1
- package/dist/form-draft-user-data/index.d.ts +4 -0
- package/dist/form-draft-user-data/index.js +13 -9
- package/dist/inbound-mail-foundation/feature.d.ts +4 -0
- package/dist/inbound-mail-foundation/feature.js +151 -147
- package/dist/inbound-mail-foundation/handlers/ingest-message.write.js +1 -2
- package/dist/inbound-mail-foundation/index.d.ts +1 -1
- package/dist/inbound-mail-foundation/index.js +1 -1
- package/dist/inbound-mail-foundation/oauth-access-token.js +1 -2
- package/dist/inbound-mail-foundation/projection.js +1 -2
- package/dist/inbound-mail-foundation/watch-supervisor.js +1 -1
- package/dist/inbound-provider-imap/feature.d.ts +4 -0
- package/dist/inbound-provider-imap/feature.js +16 -12
- package/dist/inbound-provider-imap/index.d.ts +1 -1
- package/dist/inbound-provider-imap/index.js +1 -1
- package/dist/inbound-provider-inmemory/feature.d.ts +4 -0
- package/dist/inbound-provider-inmemory/feature.js +14 -10
- package/dist/inbound-provider-inmemory/index.d.ts +1 -1
- package/dist/inbound-provider-inmemory/index.js +1 -1
- package/dist/jobs/db/queries/retention.js +1 -1
- package/dist/jobs/db/queries/stale-run-sweep.js +1 -1
- package/dist/jobs/handlers/detail.query.js +1 -1
- package/dist/jobs/handlers/list.query.js +1 -2
- package/dist/jobs/handlers/retry.write.js +1 -1
- package/dist/jobs/handlers/tenant-failures.query.js +1 -1
- package/dist/jobs/handlers/tenant-runs.query.js +1 -1
- package/dist/jobs/job-run-logger.js +1 -2
- package/dist/jobs/tenant-job-failure-table.js +1 -2
- package/dist/jobs/tenant-job-run-table.js +1 -2
- package/dist/ledger/feature.d.ts +6 -2
- package/dist/ledger/feature.js +4 -2
- package/dist/mail-foundation/feature.d.ts +7 -0
- package/dist/mail-foundation/feature.js +48 -42
- package/dist/mail-foundation/index.d.ts +1 -1
- package/dist/mail-foundation/index.js +1 -1
- package/dist/mail-transport-inmemory/feature.d.ts +4 -0
- package/dist/mail-transport-inmemory/feature.js +20 -16
- package/dist/mail-transport-inmemory/index.d.ts +1 -1
- package/dist/mail-transport-inmemory/index.js +1 -1
- package/dist/mail-transport-smtp/feature.d.ts +16 -0
- package/dist/mail-transport-smtp/feature.js +85 -79
- package/dist/mail-transport-smtp/index.d.ts +1 -1
- package/dist/mail-transport-smtp/index.js +1 -1
- package/dist/managed-pages/handlers/by-slug.query.js +1 -1
- package/dist/managed-pages/handlers/by-tenant-published.query.js +1 -2
- package/dist/managed-pages/handlers/set.write.js +1 -2
- package/dist/managed-pages/seeding.js +3 -5
- package/dist/metrics/compute.d.ts +1 -1
- package/dist/metrics/filters.d.ts +1 -1
- package/dist/metrics/filters.js +1 -1
- package/dist/metrics/validate.js +1 -1
- package/dist/notes-history/feature.d.ts +7 -2
- package/dist/notes-history/feature.js +4 -2
- package/dist/notes-history/handlers/add-note.write.js +1 -1
- package/dist/notes-history-user-data/hooks.js +1 -1
- package/dist/notes-history-user-data/index.d.ts +4 -0
- package/dist/notes-history-user-data/index.js +21 -17
- package/dist/personal-access-tokens/feature.d.ts +4 -1
- package/dist/personal-access-tokens/feature.js +10 -2
- package/dist/personal-access-tokens/handlers/create.write.js +1 -1
- package/dist/personal-access-tokens/handlers/list.query.js +2 -2
- package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
- package/dist/personal-access-tokens/resolver.js +1 -1
- package/dist/personal-access-tokens/revoke-for-user.js +1 -1
- package/dist/personal-access-tokens/roles.js +3 -5
- package/dist/personal-access-tokens/screens.js +2 -0
- package/dist/readiness/feature.d.ts +8 -0
- package/dist/readiness/feature.js +18 -14
- package/dist/readiness/index.d.ts +1 -1
- package/dist/readiness/index.js +1 -1
- package/dist/secrets/db/queries/read.js +1 -1
- package/dist/secrets/feature.d.ts +3 -0
- package/dist/secrets/feature.js +3 -2
- package/dist/secrets/handlers/rotate.job.js +2 -3
- package/dist/secrets/secrets-context.js +3 -4
- package/dist/sessions/db/queries/cleanup.js +1 -1
- package/dist/sessions/handlers/detail.query.js +1 -1
- package/dist/sessions/handlers/list.query.js +2 -2
- package/dist/sessions/handlers/mine.query.js +1 -1
- package/dist/sessions/handlers/revoke-all-for-user.write.js +1 -1
- package/dist/sessions/handlers/revoke-all-others.write.js +1 -1
- package/dist/sessions/handlers/revoke.write.js +1 -1
- package/dist/sessions/session-callbacks.js +4 -6
- package/dist/sessions/testing.d.ts +1 -1
- package/dist/tags/feature.d.ts +6 -2
- package/dist/tags/feature.js +4 -2
- package/dist/template-resolver/api.js +1 -1
- package/dist/template-resolver/handlers/bundle-import.js +1 -1
- package/dist/template-resolver/handlers/by-slug.query.js +1 -1
- package/dist/template-resolver/handlers/by-tenant.query.js +1 -2
- package/dist/template-resolver/handlers/collection-item.query.js +1 -1
- package/dist/template-resolver/handlers/collection-list.query.js +1 -2
- package/dist/template-resolver/handlers/collection-set.write.js +1 -1
- package/dist/template-resolver/handlers/copy-locale.write.js +1 -1
- package/dist/template-resolver/handlers/diff-to-system.query.js +1 -1
- package/dist/template-resolver/handlers/export-bundle.query.js +1 -1
- package/dist/template-resolver/handlers/find-by-id.query.js +1 -1
- package/dist/template-resolver/handlers/layout-source.query.js +1 -1
- package/dist/template-resolver/handlers/list.query.js +1 -1
- package/dist/template-resolver/handlers/overview.query.js +1 -1
- package/dist/template-resolver/handlers/reset-to-system.write.js +1 -1
- package/dist/template-resolver/handlers/resource-remove.write.js +1 -1
- package/dist/template-resolver/handlers/set.write.js +1 -1
- package/dist/template-resolver/handlers/template-write.js +1 -1
- package/dist/template-resolver/handlers/tenant-overrides.query.js +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.js +1 -1
- package/dist/template-resolver/handlers/usage.query.js +1 -1
- package/dist/template-resolver/handlers/validate.query.js +1 -1
- package/dist/template-resolver/seeding.js +3 -4
- package/dist/template-resolver/store-template-resource.js +1 -1
- package/dist/template-resolver/template-preview.js +1 -1
- package/dist/template-resolver/template-resources.js +1 -1
- package/dist/template-resolver/testing.js +1 -1
- package/dist/template-resolver-user-data/index.d.ts +4 -0
- package/dist/template-resolver-user-data/index.js +17 -13
- package/dist/tenant/handlers/active-tenant-ids.query.js +1 -1
- package/dist/tenant/handlers/add-member.write.js +1 -2
- package/dist/tenant/handlers/cancel-invitation.write.js +1 -1
- package/dist/tenant/handlers/invitations.query.js +1 -1
- package/dist/tenant/handlers/me.query.js +1 -1
- package/dist/tenant/handlers/member-directory.query.js +1 -1
- package/dist/tenant/handlers/members.query.js +1 -1
- package/dist/tenant/handlers/memberships.query.js +1 -1
- package/dist/tenant/handlers/remove-member.write.js +1 -2
- package/dist/tenant/handlers/resolve-user-ids.query.js +1 -1
- package/dist/tenant/handlers/team-list.query.js +1 -1
- package/dist/tenant/handlers/tenant-directory.query.js +1 -1
- package/dist/tenant/handlers/update-member-roles.write.js +1 -2
- package/dist/tenant/invited-membership.js +2 -3
- package/dist/tenant/last-tenant-admin.js +1 -2
- package/dist/tenant/seeding.js +12 -6
- package/dist/tenant-lifecycle/handlers/cancel-destruction.write.js +1 -2
- package/dist/tenant-lifecycle/handlers/request-destruction.write.js +1 -2
- package/dist/tenant-lifecycle/lib/revoke-tenant-sessions.js +1 -1
- package/dist/tenant-lifecycle/lifecycle-gate.js +1 -1
- package/dist/tenant-lifecycle/run-tenant-destroy.js +3 -5
- package/dist/tenant-lifecycle/stages.js +10 -6
- package/dist/tenant-lifecycle/testing.d.ts +1 -1
- package/dist/tenant-lifecycle/testing.js +2 -2
- package/dist/tenant-settings/feature.d.ts +1 -0
- package/dist/tenant-settings/feature.js +2 -1
- package/dist/tier-engine/feature.d.ts +1 -8
- package/dist/tier-engine/feature.js +71 -78
- package/dist/tier-engine/handlers/get-tenant-tier.query.js +2 -3
- package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -2
- package/dist/user/db/queries/stream-tenant-backfill.js +1 -1
- package/dist/user/handlers/create.write.js +1 -2
- package/dist/user/handlers/find-for-auth.query.js +1 -1
- package/dist/user/handlers/list.query.js +1 -1
- package/dist/user/handlers/update-roles.js +1 -2
- package/dist/user/index.d.ts +1 -1
- package/dist/user/index.js +1 -1
- package/dist/user/invited-global-roles.js +2 -3
- package/dist/user/principal-status.d.ts +4 -0
- package/dist/user/principal-status.js +9 -3
- package/dist/user/resolve-display-names.js +1 -1
- package/dist/user/seeding.js +5 -6
- package/dist/user-data-rights/audit-download.js +2 -2
- package/dist/user-data-rights/db/queries/export-jobs.js +1 -1
- package/dist/user-data-rights/db/queries/forget-cleanup.js +1 -1
- package/dist/user-data-rights/handlers/download-by-job.query.js +1 -1
- package/dist/user-data-rights/handlers/download-by-token.query.js +1 -1
- package/dist/user-data-rights/handlers/export-status.query.js +1 -1
- package/dist/user-data-rights/handlers/list-download-attempts.query.js +1 -1
- package/dist/user-data-rights/handlers/my-audit-log.query.js +1 -1
- package/dist/user-data-rights/handlers/request-export.write.js +1 -2
- package/dist/user-data-rights/handlers/run-forget-cleanup.write.js +3 -3
- package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.d.ts +1 -1
- package/dist/user-data-rights/lib/deny-if-target-outside-admin-tenant.js +1 -1
- package/dist/user-data-rights/lib/update-user-lifecycle.d.ts +1 -0
- package/dist/user-data-rights/lib/update-user-lifecycle.js +3 -3
- package/dist/user-data-rights/run-export-jobs.js +2 -3
- package/dist/user-data-rights/run-forget-cleanup.js +9 -5
- package/dist/user-data-rights/run-user-export.js +9 -5
- package/dist/waitlist/handlers/invite.write.js +1 -2
- package/dist/waitlist/handlers/reject.write.js +1 -1
- package/dist/waitlist/lib.js +1 -2
- package/dist/workflow-runner/event-subscriber.js +1 -1
- package/dist/workflow-runner/feature.d.ts +4 -0
- package/dist/workflow-runner/feature.js +44 -40
- package/dist/workflow-runner/handlers/resume-run.write.js +1 -1
- package/dist/workflow-runner/index.d.ts +1 -1
- package/dist/workflow-runner/index.js +1 -1
- package/dist/workflow-runner/pending-projection.js +1 -1
- package/package.json +28 -11
- package/src/cap-counter/changes.json +13 -0
- package/src/crypto-shredding/changes.json +6 -0
- package/src/file-provider-s3/changes.json +10 -1
- package/src/personal-access-tokens/changes.json +6 -0
- package/src/user/changes.json +6 -0
- package/dist/file-provider-s3-env/feature.d.ts +0 -3
- package/dist/file-provider-s3-env/feature.js +0 -46
- /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.d.ts +0 -0
- /package/dist/{files-provider-s3 → file-provider-s3/lib}/env-helper.js +0 -0
- /package/dist/{files-provider-s3 → file-provider-s3/lib}/s3-provider.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { selectMany } from "@cosmicdrift/kumiko-framework/
|
|
2
|
-
import { createEventStoreExecutor, createTenantDb, } from "@cosmicdrift/kumiko-framework/db";
|
|
1
|
+
import { createEventStoreExecutor, createTenantDb, selectMany, } from "@cosmicdrift/kumiko-framework/db";
|
|
3
2
|
import { createSystemUser, SYSTEM_TENANT_ID } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
3
|
import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
5
4
|
import { USER_STATUS, userEntity, userTable } from "../../user/index.js";
|
|
@@ -38,11 +37,12 @@ export async function updateUserLifecycle(conn, userId, changes, options) {
|
|
|
38
37
|
// (restrict/lift-restriction/grace-period/cancel/forget) that holds no row
|
|
39
38
|
// version to pass as `payload.version`, which update() requires otherwise.
|
|
40
39
|
// Callers needing a guard use `options.expect` instead.
|
|
41
|
-
const tenantDb = createTenantDb(conn, SYSTEM_TENANT_ID, "system");
|
|
40
|
+
const tenantDb = createTenantDb({ db: conn, tenantId: SYSTEM_TENANT_ID, mode: "system" });
|
|
42
41
|
const result = await userExecutor.update({ id: userId, changes }, createSystemUser(SYSTEM_TENANT_ID), tenantDb, {
|
|
43
42
|
skipOptimisticLock: true,
|
|
44
43
|
...(options?.expect && { expect: options.expect }),
|
|
45
44
|
...(options?.writePurpose && { writePurpose: options.writePurpose }),
|
|
45
|
+
...(options?.includeDeleted && { includeDeleted: true }),
|
|
46
46
|
});
|
|
47
47
|
if (result.isSuccess)
|
|
48
48
|
return { applied: true };
|
|
@@ -43,10 +43,9 @@
|
|
|
43
43
|
// **Storage-Cleanup:** dritter Pass loescht abgelaufene downloadStorageKeys
|
|
44
44
|
// (`expiresAt + exportStorageCleanupGraceHours < now`) — abgelaufene ZIPs
|
|
45
45
|
// auf S3 sollen nicht ewig liegen.
|
|
46
|
-
import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
47
46
|
import { addDurationSpec } from "@cosmicdrift/kumiko-framework/compliance";
|
|
48
47
|
import { PII_ERASED_SENTINEL } from "@cosmicdrift/kumiko-framework/crypto";
|
|
49
|
-
import { createEventStoreExecutor, createTenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
48
|
+
import { createEventStoreExecutor, createTenantDb, fetchOne, selectMany, } from "@cosmicdrift/kumiko-framework/db";
|
|
50
49
|
import { createSystemUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
51
50
|
import { createZipStream, tenantExportPrefix, } from "@cosmicdrift/kumiko-framework/files";
|
|
52
51
|
import { resolveProfileForTenant } from "../compliance-profiles/index.js";
|
|
@@ -547,7 +546,7 @@ function reportCleanupLastRun(metrics, now) {
|
|
|
547
546
|
// Stream-Counter konsistent bleibt (Memory feedback_event_store_tenant_consistency).
|
|
548
547
|
// @wrapper-known semantic-alias
|
|
549
548
|
function systemTenantDb(db, tenantId) {
|
|
550
|
-
return createTenantDb(db, tenantId, "system");
|
|
549
|
+
return createTenantDb({ db, tenantId, mode: "system" });
|
|
551
550
|
}
|
|
552
551
|
function buildExportStorageKey(job) {
|
|
553
552
|
return `${tenantExportPrefix(job.requestedFromTenantId)}${job.id}.zip`;
|
|
@@ -34,9 +34,8 @@ import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
|
|
|
34
34
|
// gesammelt + zurueckgegeben fuer Operator-Visibility. Ein User mit
|
|
35
35
|
// gefailten Hooks bleibt im DeletionRequested-Status (next Lauf
|
|
36
36
|
// retried automatisch).
|
|
37
|
-
import { fetchOne, selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
38
37
|
import { configuredPiiSubjectKms, subjectIdToKey, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
39
|
-
import { createTenantDb, entityEventName, executeRawQuery, nullBlindIndexesForSubject, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
|
|
38
|
+
import { createTenantDb, entityEventName, executeRawQuery, fetchOne, nullBlindIndexesForSubject, selectMany, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
|
|
40
39
|
import { EXT_USER_DATA, EXT_USER_DATA_ORDER, extensionUsageEscapeHatchReason, } from "@cosmicdrift/kumiko-framework/engine";
|
|
41
40
|
import { createEscapeHatchReporter, UNATTRIBUTED_ACTOR, } from "@cosmicdrift/kumiko-framework/pipeline";
|
|
42
41
|
import { purgeSearchDocumentsForSubject, } from "@cosmicdrift/kumiko-framework/search";
|
|
@@ -54,9 +53,14 @@ function buildHookDb(db, tenantId, entry, args) {
|
|
|
54
53
|
sink: args.escapeHatchAuditSink,
|
|
55
54
|
log: args.escapeHatchAuditLog ?? createFallbackLogger("user-data-rights"),
|
|
56
55
|
});
|
|
57
|
-
return createTenantDb(
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
return createTenantDb({
|
|
57
|
+
db,
|
|
58
|
+
tenantId,
|
|
59
|
+
mode: "tenant",
|
|
60
|
+
grants: {
|
|
61
|
+
unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
|
|
62
|
+
report,
|
|
63
|
+
},
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
// EXT_USER_DATA delete-hooks default here; a hook that redacts data keyed on an
|
|
@@ -20,9 +20,8 @@ import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
|
|
|
20
20
|
// **PII-Surface:** Hooks definieren selbst welche Felder ins Bundle
|
|
21
21
|
// landen. user-data-rights-defaults/hooks/user.userdata-hook expose
|
|
22
22
|
// expliziert KEIN passwordHash + KEINE roles (privileged columns).
|
|
23
|
-
import { selectMany } from "@cosmicdrift/kumiko-framework/bun-db";
|
|
24
23
|
import { configuredPiiSubjectKms, decryptPiiFieldValues, isPiiCiphertext, } from "@cosmicdrift/kumiko-framework/crypto";
|
|
25
|
-
import { collectEncryptedFieldNames, configuredEntityFieldEncryption, createTenantDb, decryptEntityFieldValues, } from "@cosmicdrift/kumiko-framework/db";
|
|
24
|
+
import { collectEncryptedFieldNames, configuredEntityFieldEncryption, createTenantDb, decryptEntityFieldValues, selectMany, } from "@cosmicdrift/kumiko-framework/db";
|
|
26
25
|
import { EXT_USER_DATA, extensionUsageEscapeHatchReason, maskWriteOnlyFields, } from "@cosmicdrift/kumiko-framework/engine";
|
|
27
26
|
import { createEscapeHatchReporter, UNATTRIBUTED_ACTOR, } from "@cosmicdrift/kumiko-framework/pipeline";
|
|
28
27
|
import { tenantMembershipsTable } from "../tenant/index.js";
|
|
@@ -35,9 +34,14 @@ function buildHookDb(db, tenantId, entry, args) {
|
|
|
35
34
|
sink: args.escapeHatchAuditSink,
|
|
36
35
|
log: args.escapeHatchAuditLog ?? createFallbackLogger("user-data-rights"),
|
|
37
36
|
});
|
|
38
|
-
return createTenantDb(
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
return createTenantDb({
|
|
38
|
+
db,
|
|
39
|
+
tenantId,
|
|
40
|
+
mode: "tenant",
|
|
41
|
+
grants: {
|
|
42
|
+
unsafeRaw: entry.escapeHatchReason !== undefined ? { reason: entry.escapeHatchReason } : undefined,
|
|
43
|
+
report,
|
|
44
|
+
},
|
|
41
45
|
});
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { fetchOne } from "@cosmicdrift/kumiko-framework/
|
|
2
|
-
import { acquireNamespacedAdvisoryLock } from "@cosmicdrift/kumiko-framework/db";
|
|
1
|
+
import { acquireNamespacedAdvisoryLock, fetchOne } from "@cosmicdrift/kumiko-framework/db";
|
|
3
2
|
import { createSystemUser, defineWriteHandler, parseTenantId, } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
3
|
import { InternalError, NotFoundError, UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
5
4
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { selectMany } from "@cosmicdrift/kumiko-framework/
|
|
1
|
+
import { selectMany } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { createSystemUser, defineWriteHandler, parseTenantId, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { InternalError, NotFoundError, UnprocessableError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import { cancelPendingInvitation, INVITATION_STATUS, tenantInvitationsTable, } from "../../tenant/index.js";
|
package/dist/waitlist/lib.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { fetchOne } from "@cosmicdrift/kumiko-framework/
|
|
2
|
-
import { createEventStoreExecutor } from "@cosmicdrift/kumiko-framework/db";
|
|
1
|
+
import { createEventStoreExecutor, fetchOne, } from "@cosmicdrift/kumiko-framework/db";
|
|
3
2
|
import { access, createSystemUser, SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
4
3
|
import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
5
4
|
import { tenantMembershipsTable } from "../tenant/index.js";
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// + triggerEventRef + wakeAt=now() onto the matching pending row(s); the
|
|
24
24
|
// existing resume-due-runs job (Phase 2) picks the row up on its next
|
|
25
25
|
// cron tick — the one resume path stays exactly the one Phase 2 built.
|
|
26
|
-
import { selectMany, updateMany } from "@cosmicdrift/kumiko-framework/
|
|
26
|
+
import { selectMany, updateMany } from "@cosmicdrift/kumiko-framework/db";
|
|
27
27
|
import { evaluateEventMatch } from "@cosmicdrift/kumiko-framework/engine";
|
|
28
28
|
import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
|
|
29
29
|
import { getTemporal } from "@cosmicdrift/kumiko-framework/time";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare function createWorkflowRunnerFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
|
+
readonly exports: void;
|
|
3
|
+
};
|
|
4
|
+
/** @deprecated Use createWorkflowRunnerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
1
5
|
export declare const workflowRunnerFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
6
|
readonly exports: void;
|
|
3
7
|
};
|
|
@@ -32,45 +32,49 @@ import { workflowRunPendingTableMeta } from "./tables.js";
|
|
|
32
32
|
// bundled feature's runtime name follows this convention, and
|
|
33
33
|
// use-all-bundled's check-coverage matches exports to mounted features by it.
|
|
34
34
|
const FEATURE_NAME = "workflow-runner";
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const tenantId = ctx.systemUser?.tenantId ?? ctx._tenantId;
|
|
56
|
-
if (tenantId === undefined) {
|
|
57
|
-
// skip: cron fired without a perTenant fan-out tenant — nothing scoped
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const dueRows = await selectDueWorkflowRunPending(ctx.systemDb.assertTenantMatch(tenantId));
|
|
61
|
-
for (const row of dueRows) {
|
|
62
|
-
try {
|
|
63
|
-
await ctx.write("workflow-runner:write:resume-run", {
|
|
64
|
-
runId: row.runId,
|
|
65
|
-
stepIndex: row.stepIndex,
|
|
66
|
-
});
|
|
35
|
+
export function createWorkflowRunnerFeature() {
|
|
36
|
+
return defineFeature(FEATURE_NAME, (r) => {
|
|
37
|
+
r.describe("Writes the run-envelope (`workflow.run-started` / `workflow.run-completed` / `workflow.run-failed`) for a workflow run onto its `workflow-run` aggregate stream. Provides `startAndRunWorkflow` and `registerEventTrigger` for consumer features to wire up `defineWorkflow`-based workflows against domain events. Registers no workflows itself. Runs the resume loop for suspended `wait`/`retry`/`waitForEvent` steps (`resume-due-runs` job + `resume-run` handler); `registerEventTrigger` wires an event-wakeup subscriber per workflow that declares `awaits` so a `waitForEvent` step resumes as soon as its awaited event arrives, not just on timeout.");
|
|
38
|
+
r.uiHints({
|
|
39
|
+
displayLabel: "Workflow Runner",
|
|
40
|
+
category: "infrastructure",
|
|
41
|
+
recommended: false,
|
|
42
|
+
});
|
|
43
|
+
// resume-run needs a full HandlerContext + ctx.systemDb (the pending-row
|
|
44
|
+
// scan crosses whatever tenant the row belongs to relative to the job's
|
|
45
|
+
// own tenant loop iteration) — same reasoning as tenant/feature.ts.
|
|
46
|
+
r.systemScope();
|
|
47
|
+
r.storeTable(workflowRunPendingTableMeta, {
|
|
48
|
+
reason: "resume_loop.pending_suspended_steps",
|
|
49
|
+
});
|
|
50
|
+
registerWorkflowRunPendingProjection(r);
|
|
51
|
+
r.writeHandler(resumeRunHandler);
|
|
52
|
+
r.job("resume-due-runs", { trigger: { cron: "* * * * *" }, perTenant: true, concurrency: "skip" }, async (_payload, ctx) => {
|
|
53
|
+
if (!ctx.systemDb) {
|
|
54
|
+
throw new Error("resume-due-runs: ctx.systemDb required (r.systemScope() feature)");
|
|
67
55
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
ctx.log.warn(`[workflow-runner:resume-due-runs] runId=${row.runId} stepIndex=${row.stepIndex} dispatch failed: ${String(error)}`);
|
|
56
|
+
const tenantId = ctx.systemUser?.tenantId ?? ctx._tenantId;
|
|
57
|
+
if (tenantId === undefined) {
|
|
58
|
+
// skip: cron fired without a perTenant fan-out tenant — nothing scoped
|
|
59
|
+
return;
|
|
73
60
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
const dueRows = await selectDueWorkflowRunPending(ctx.systemDb.assertTenantMatch(tenantId));
|
|
62
|
+
for (const row of dueRows) {
|
|
63
|
+
try {
|
|
64
|
+
await ctx.write("workflow-runner:write:resume-run", {
|
|
65
|
+
runId: row.runId,
|
|
66
|
+
stepIndex: row.stepIndex,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// skip: one row's dispatch failing (infra hiccup, not a business
|
|
71
|
+
// outcome — resume-run itself never throws for expected cases)
|
|
72
|
+
// must not stop the rest of this tenant's due rows from resuming.
|
|
73
|
+
ctx.log.warn(`[workflow-runner:resume-due-runs] runId=${row.runId} stepIndex=${row.stepIndex} dispatch failed: ${String(error)}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, { dedupeOptions: {} });
|
|
78
|
+
}
|
|
79
|
+
/** @deprecated Use createWorkflowRunnerFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
80
|
+
export const workflowRunnerFeature = createWorkflowRunnerFeature();
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
// pipeline's result for the skipped waitForEvent step itself (see
|
|
30
30
|
// resultKey on steps/wait-for-event.ts) — pre-seeded into stepsAcc below so
|
|
31
31
|
// a subsequent step's resolver can read `ctx.steps[awaits.someKey]`.
|
|
32
|
-
import { fetchOne } from "@cosmicdrift/kumiko-framework/
|
|
32
|
+
import { fetchOne } from "@cosmicdrift/kumiko-framework/db";
|
|
33
33
|
import { buildPipelineSteps, computeDefinitionFingerprint, describeWorkflowStepError, getStep, runStepList, SYSTEM_ROLE, unwrapWorkflowStepError, WORKFLOW_AGGREGATE_TYPE, WORKFLOW_RESUMED_TYPE, WORKFLOW_RETRY_SCHEDULED_TYPE, WORKFLOW_RUN_COMPLETED_TYPE, WORKFLOW_RUN_FAILED_TYPE, WORKFLOW_RUN_STARTED_TYPE, WORKFLOW_WAITING_FOR_EVENT_TYPE, WorkflowStepError, } from "@cosmicdrift/kumiko-framework/engine";
|
|
34
34
|
import { InternalError } from "@cosmicdrift/kumiko-framework/errors";
|
|
35
35
|
import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { workflowRunAggregateId } from "./aggregate-id.js";
|
|
2
2
|
export { registerEventTrigger } from "./event-trigger.js";
|
|
3
|
-
export { workflowRunnerFeature } from "./feature.js";
|
|
3
|
+
export { createWorkflowRunnerFeature, workflowRunnerFeature } from "./feature.js";
|
|
4
4
|
export { startAndRunWorkflow, type WorkflowRunCompletedPayload, type WorkflowRunFailedPayload, type WorkflowRunStartedPayload, WorkflowSuspensionUnsupportedError, } from "./runner.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Public API of the workflow-runner bundled-feature.
|
|
2
2
|
export { workflowRunAggregateId } from "./aggregate-id.js";
|
|
3
3
|
export { registerEventTrigger } from "./event-trigger.js";
|
|
4
|
-
export { workflowRunnerFeature } from "./feature.js";
|
|
4
|
+
export { createWorkflowRunnerFeature, workflowRunnerFeature } from "./feature.js";
|
|
5
5
|
export { startAndRunWorkflow, WorkflowSuspensionUnsupportedError, } from "./runner.js";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// No resume logic here — framework#2513 Phase 2 owns the job that reads
|
|
12
12
|
// this table and dispatches the actual resume. This projection only writes
|
|
13
13
|
// the rows.
|
|
14
|
-
import { deleteMany, fetchOne, upsertOnConflict } from "@cosmicdrift/kumiko-framework/
|
|
14
|
+
import { deleteMany, fetchOne, upsertOnConflict } from "@cosmicdrift/kumiko-framework/db";
|
|
15
15
|
import { WORKFLOW_RESUMED_TYPE, WORKFLOW_RETRY_SCHEDULED_TYPE, WORKFLOW_RUN_COMPLETED_TYPE, WORKFLOW_RUN_FAILED_TYPE, WORKFLOW_WAITING_FOR_EVENT_TYPE, WORKFLOW_WAITING_TYPE, } from "@cosmicdrift/kumiko-framework/engine";
|
|
16
16
|
import { workflowRunPendingTable } from "./tables.js";
|
|
17
17
|
async function upsertPending(tx, row) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.368.0",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -226,6 +226,10 @@
|
|
|
226
226
|
"types": "./dist/file-provider-s3/index.d.ts",
|
|
227
227
|
"default": "./dist/file-provider-s3/index.js"
|
|
228
228
|
},
|
|
229
|
+
"./file-provider-s3/lib": {
|
|
230
|
+
"types": "./dist/file-provider-s3/lib/index.d.ts",
|
|
231
|
+
"default": "./dist/file-provider-s3/lib/index.js"
|
|
232
|
+
},
|
|
229
233
|
"./document-ingest-foundation": {
|
|
230
234
|
"types": "./dist/document-ingest-foundation/index.d.ts",
|
|
231
235
|
"default": "./dist/document-ingest-foundation/index.js"
|
|
@@ -524,12 +528,12 @@
|
|
|
524
528
|
}
|
|
525
529
|
},
|
|
526
530
|
"dependencies": {
|
|
527
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
528
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
529
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
530
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
531
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
532
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
531
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.368.0",
|
|
532
|
+
"@cosmicdrift/kumiko-framework": "0.368.0",
|
|
533
|
+
"@cosmicdrift/kumiko-headless": "0.368.0",
|
|
534
|
+
"@cosmicdrift/kumiko-renderer": "0.368.0",
|
|
535
|
+
"@cosmicdrift/kumiko-renderer-web": "0.368.0",
|
|
536
|
+
"@cosmicdrift/kumiko-types": "0.368.0",
|
|
533
537
|
"@mollie/api-client": "^4.5.0",
|
|
534
538
|
"@node-rs/argon2": "^2.0.2",
|
|
535
539
|
"@tiptap/core": "3.31.3",
|
|
@@ -772,6 +776,10 @@
|
|
|
772
776
|
"types": "./dist/file-provider-s3/index.d.ts",
|
|
773
777
|
"default": "./dist/file-provider-s3/index.js"
|
|
774
778
|
},
|
|
779
|
+
"./file-provider-s3/lib": {
|
|
780
|
+
"types": "./dist/file-provider-s3/lib/index.d.ts",
|
|
781
|
+
"default": "./dist/file-provider-s3/lib/index.js"
|
|
782
|
+
},
|
|
775
783
|
"./document-ingest-foundation": {
|
|
776
784
|
"types": "./dist/document-ingest-foundation/index.d.ts",
|
|
777
785
|
"default": "./dist/document-ingest-foundation/index.js"
|
|
@@ -1078,10 +1086,19 @@
|
|
|
1078
1086
|
],
|
|
1079
1087
|
"devDependencies": {
|
|
1080
1088
|
"@testing-library/user-event": "^14.6.1",
|
|
1081
|
-
"@cosmicdrift/kumiko-locale-de": "0.
|
|
1082
|
-
"@cosmicdrift/kumiko-locale-es": "0.
|
|
1083
|
-
"@cosmicdrift/kumiko-renderer-mail-html": "0.
|
|
1089
|
+
"@cosmicdrift/kumiko-locale-de": "0.368.0",
|
|
1090
|
+
"@cosmicdrift/kumiko-locale-es": "0.368.0",
|
|
1091
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.368.0",
|
|
1084
1092
|
"jsqr": "^1.4.0",
|
|
1085
|
-
"unpdf": "^1.8.1"
|
|
1093
|
+
"unpdf": "^1.8.1",
|
|
1094
|
+
"@cosmicdrift/kumiko-testing": "0.368.0"
|
|
1095
|
+
},
|
|
1096
|
+
"peerDependencies": {
|
|
1097
|
+
"@cosmicdrift/kumiko-testing": ">=0.366.0 <1.0.0"
|
|
1098
|
+
},
|
|
1099
|
+
"peerDependenciesMeta": {
|
|
1100
|
+
"@cosmicdrift/kumiko-testing": {
|
|
1101
|
+
"optional": true
|
|
1102
|
+
}
|
|
1086
1103
|
}
|
|
1087
1104
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.368.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "calendarCapReservationHandle consumes a reservation per unit",
|
|
6
|
+
"detail": "`reserveCalendarCapUsage` now returns `reservationId`. `calendarCapReservationHandle(ctx, reservationId, { capName, periodStartIso })` returns a handle with `consume(units)` (turns reserved units into booked ones, counter unchanged) and `release()` (gives back the unconsumed rest). A handler reserves the worst case before the job is dispatched, the job consumes per written unit, so parallel dispatches can no longer overshoot the hard cap and a retry only counts what was written.\n\n`consume` beyond the still-reserved rest throws `CapReservationOverConsumedError` (422, `cap_reservation_over_consumed`). `consume` against a settle tombstone throws `CapReservationSettledError` (422, `cap_reservation_settled`); `release` against it is a no-op. When the reservation outlived its TTL and was swept, `consume` books the units directly, the way settle does for a missing row, without a hard-cap check."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"version": "0.368.0",
|
|
10
|
+
"type": "fix",
|
|
11
|
+
"title": "Swept or released calendar reservations remember the units consume booked",
|
|
12
|
+
"detail": "The reservation row now stores `consumed_amount`. A release or the TTL sweep gives back only the unconsumed rest. If units were consumed, it keeps the row as a released tombstone (`released_at` set, `amount` 0) until the tombstone TTL passes, instead of deleting it. A later `settle` subtracts the consumed units from the booking, and a `consume` after the sweep books its units directly and is remembered the same way, so the counter ends at exactly the settled total. `settle` below the consumed units throws `CapSettleBelowConsumedError` (422, `cap_settle_below_consumed`) in every state. Expired released tombstones are deleted by the sweep.",
|
|
13
|
+
"migration": "Apps with cap-counter generate a migration for the new columns store_cap_reservations.consumed_amount (integer NOT NULL DEFAULT 0) and store_cap_reservations.released_at (kumiko migrate generate)."
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"version": "0.366.0",
|
|
4
17
|
"type": "fix",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.368.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "forget-subject closes the login door for users whose stream is already deleted",
|
|
6
|
+
"detail": "forget-subject returned 500 (\"user lifecycle update failed ... not_found\") when the user stream was deleted but the read_users status still read active, leaving sessions and PATs alive. The erasure now appends the status-deleted user.updated event to that stream too, so the login door closes, the handler returns 200 and a read_users rebuild keeps the state."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.366.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
[
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.368.0",
|
|
4
|
+
"type": "breaking",
|
|
5
|
+
"title": "The S3 file providers merge into createFileProviderS3Feature({ fromEnv })",
|
|
6
|
+
"detail": "createFileProviderS3Feature() mounts the per-tenant config provider as before. createFileProviderS3Feature({ fromEnv: true }) mounts the env-configured provider (feature name, provider key \"s3-env\" and requires unchanged). The S3 client helpers (createS3Provider, createS3ProviderFromEnv, parseS3EnvConfig, resolveForcePathStyle, S3ProviderConfig) move to the new subpath @cosmicdrift/kumiko-bundled-features/file-provider-s3/lib.\n\nThe subpaths file-provider-s3-env and files-provider-s3 keep working as deprecated re-exports and are removed in the first release after 2026-10-29.\n\nold -> new:\n fileProviderS3EnvFeature from .../file-provider-s3-env -> createFileProviderS3Feature({ fromEnv: true }) from .../file-provider-s3\n fileProviderS3Feature -> createFileProviderS3Feature()\n @cosmicdrift/kumiko-bundled-features/files-provider-s3 -> @cosmicdrift/kumiko-bundled-features/file-provider-s3/lib",
|
|
7
|
+
"migration": "Run `bun kumiko-upgrade --apply`. It rewrites the imports and the env feature mount, and reports `typeof fileProviderS3EnvFeature` and re-exports of it with file and line.",
|
|
8
|
+
"codemod": "scripts/codemod/s3-imports.ts"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.368.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "The token list screen takes a description and slots via listScreen",
|
|
6
|
+
"detail": "createPersonalAccessTokensFeature({ listScreen: { description, slots } }) sets the i18n description and the slots (for example a header component) of the api-tokens list, so an app can show instructions above the list and use the bundled screen directly instead of embedding it in its own dashboard. Without the option nothing changes. Both bundled token screens are now marked agent: { expose: false }, since the mint screen reveals the token plaintext."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.365.0",
|
|
4
10
|
"type": "fix",
|
package/src/user/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.368.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "Soft-deleted users no longer count as active principals",
|
|
6
|
+
"detail": "A user deleted through the entity executor keeps its last status (usually active) with isDeleted set. principalStatusPlugin, the session checker and the PAT role resolver only looked at the status, so existing sessions and tokens of such a user stayed valid. They now treat isDeleted as blocked (session \"blocked\", PAT 401, principal_blocked for membership resolution) through the new isPrincipalRowBlocked predicate."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.364.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// kumiko-feature-version: 1
|
|
2
|
-
//
|
|
3
|
-
// file-provider-s3-env — S3 file provider configured entirely from
|
|
4
|
-
// process.env. ONE shared bucket for ALL tenants: wire it by setting the
|
|
5
|
-
// `S3_*` env vars + mounting — no per-tenant admin seeding and no
|
|
6
|
-
// `secrets`-feature dependency.
|
|
7
|
-
//
|
|
8
|
-
// **vs file-provider-s3:** the config-based `"s3"` provider owns per-tenant
|
|
9
|
-
// config keys + an encrypted `s3.secretAccessKey` secret (per-tenant
|
|
10
|
-
// buckets, admin-seeded). This `"s3-env"` provider reads one credential set
|
|
11
|
-
// from env and serves every tenant from one bucket — the
|
|
12
|
-
// Hetzner-Object-Storage / single-bucket deploy case. Tenant isolation
|
|
13
|
-
// still holds: file keys carry the tenant (export ZIPs:
|
|
14
|
-
// `exports/<tenantId>/<jobId>.zip`) or are globally-unique UUIDs (fileRefs).
|
|
15
|
-
//
|
|
16
|
-
// **Pattern-Vorbild:** mirrors file-provider-inmemory (zero admin seeding,
|
|
17
|
-
// only the file-foundation plugin-point required).
|
|
18
|
-
//
|
|
19
|
-
// **Env vars** (read by createS3ProviderFromEnv, prefix `S3_`):
|
|
20
|
-
// required — S3_BUCKET, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY
|
|
21
|
-
// optional — S3_ENDPOINT (S3-compat stores incl. Hetzner Object Storage),
|
|
22
|
-
// S3_FORCE_PATH_STYLE
|
|
23
|
-
// Missing required vars throw on the FIRST file op (inside the export cron).
|
|
24
|
-
// The user-data-rights boot guard surfaces that at boot instead.
|
|
25
|
-
import { createS3ProviderFromEnv } from "@cosmicdrift/kumiko-bundled-features/files-provider-s3";
|
|
26
|
-
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
27
|
-
const FEATURE_NAME = "file-provider-s3-env";
|
|
28
|
-
export const fileProviderS3EnvFeature = defineFeature(FEATURE_NAME, (r) => {
|
|
29
|
-
r.describe('Registers an `"s3-env"` provider for `file-foundation` that reads one S3 credential set from `process.env` (`S3_BUCKET`/`S3_REGION`/`S3_ACCESS_KEY`/`S3_SECRET_KEY`, optional `S3_ENDPOINT`/`S3_FORCE_PATH_STYLE`) and serves every tenant from one shared bucket — no per-tenant config or secret seeding. Use this for single-bucket S3-compatible deploys (e.g. Hetzner Object Storage); use `file-provider-s3` instead when each tenant needs its own bucket/credentials.');
|
|
30
|
-
r.uiHints({
|
|
31
|
-
displayLabel: "File Provider · S3 (env)",
|
|
32
|
-
category: "storage",
|
|
33
|
-
recommended: false,
|
|
34
|
-
});
|
|
35
|
-
// No requires on "config" or "secrets" — credentials come from
|
|
36
|
-
// env, not the per-tenant config + secrets store. Only the file-foundation
|
|
37
|
-
// plugin-extension-point must be mounted.
|
|
38
|
-
r.requires({ features: ["file-foundation"] });
|
|
39
|
-
const plugin = {
|
|
40
|
-
// tenantId ignored: one shared bucket serves all tenants (isolation via
|
|
41
|
-
// tenant-prefixed / UUID keys). Built fresh per call like file-provider-s3;
|
|
42
|
-
// the S3 client opens no connection at construction.
|
|
43
|
-
build: async (_ctx, _tenantId) => createS3ProviderFromEnv(), // @wrapper-known semantic-alias
|
|
44
|
-
};
|
|
45
|
-
r.useExtension("fileProvider", "s3-env", plugin);
|
|
46
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|