@wildo-ai/saas-backend-lib 1.1.1 → 1.1.3
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/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +14 -3
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +138 -24
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +8 -3
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js +11 -2
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +48 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +102 -30
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js +16 -0
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts +20 -6
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +96 -32
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js +32 -7
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts +8 -5
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +80 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +298 -23
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +71 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +85 -5
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +21 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +146 -4
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts +3 -26
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js +3 -68
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +533 -43
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +54 -13
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +263 -13
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +376 -58
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +264 -7
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +414 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +140 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +65 -6
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +45 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js +7 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +146 -46
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +43 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +52 -3
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.js +2 -2
- package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +20 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts +27 -0
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.js +29 -0
- package/dist/esm/databases/services/redis.service.js.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +134 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts +41 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js +40 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts +64 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js +193 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +72 -4
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +60 -19
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.js +7 -1
- package/dist/esm/external-data/external-data-transform.backend.js.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts +2 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js +13 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +306 -7
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +539 -45
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts +24 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +83 -11
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts +17 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +5 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +76 -13
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +18 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.js +36 -28
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +214 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js +566 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -0
- package/dist/esm/files/services/files.backend.service.d.ts +87 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +252 -19
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.js +12 -0
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +200 -44
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +107 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +519 -56
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +151 -41
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +308 -143
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/index.d.ts +15 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +45 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +82 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +20 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +21 -3
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +32 -4
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts +34 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js +42 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +84 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.js +235 -11
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts +64 -2
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +152 -6
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +108 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +432 -101
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +54 -7
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts +5 -5
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js +14 -13
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts +2 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +18 -8
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +20 -18
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js +4 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +88 -15
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +16 -2
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.js +3 -3
- package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +91 -7
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js +13 -7
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +47 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.js +343 -77
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +3 -23
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js +20 -45
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +9 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +77 -2
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +5 -3
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +41 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +87 -4
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js +24 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts +117 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js +104 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +175 -14
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +385 -49
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +18 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +110 -74
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +17 -3
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +12 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +41 -3
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +83 -20
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.js +1 -18
- package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +17 -9
- package/dist/esm/.builder.pid +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-uploader.utils.js","sourceRoot":"","sources":["../../../../../src/files/utils/file-uploader.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAqC/B;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,gBAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;IAEnD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,QAAQ,gBAAgB,CAAC,aAAa,EAAE,CAAC;QACvC,KAAK,8BAA8B,CAAC,YAAY;YAC9C,OAAO,YAAY,CAAC,MAAM;gBACxB,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,MAAM;oBAC/B,oBAAoB,EAAE,sBAAsB,CAAC,IAAI;iBAClD;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,KAAK,8BAA8B,CAAC,iBAAiB;YACnD,OAAO,YAAY,CAAC,eAAe;gBACjC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,eAAe;oBACxC,oBAAoB,EAAE,sBAAsB,CAAC,cAAc;iBAC5D;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,sFAAsF;QACtF,+FAA+F;QAC/F,+FAA+F;QAC/F,8FAA8F;QAC9F,gGAAgG;QAChG,+EAA+E;QAC/E,KAAK,8BAA8B,CAAC,oBAAoB;YACtD,OAAO,YAAY,CAAC,iBAAiB;gBACnC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,YAAY;oBACvD,oBAAoB,EAAE,sBAAsB,CAAC,oBAAoB;iBAClE;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,KAAK,8BAA8B,CAAC,mBAAmB;YACrD,OAAO,YAAY,CAAC,iBAAiB;gBACnC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,YAAY;oBACvD,oBAAoB,EAAE,sBAAsB,CAAC,mBAAmB;iBACjE;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import {\n ExecutionContext_ExecutionType,\n FileUploaderEntityType,\n} from '@wildo-ai/saas-models';\n\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n/**\n * SINGLE SOURCE OF TRUTH — the machine file-uploader entity types are DERIVED-BY-CONTRACT from the\n * machine EXECUTION types, which are the authority.\n *\n * `FileUploaderEntityType.{ORGANIZATION,APPLICATION}_MACHINE` and\n * `ExecutionContext_ExecutionType.{ORGANIZATION,APPLICATION}_MACHINE` name the SAME machine\n * principal, so their string values MUST stay identical — the switch below projects the execution\n * type straight onto the entity type. They cannot physically share the literal: `FileUploaderEntityType`\n * lives in the upstream `zod-decorators` package (it cannot import the execution type), and TS\n * string-enum members must be literals (not computed from another enum). So instead these compile-time\n * assertions PIN the two equal. A future rename of a machine execution-type VALUE — exactly the\n * `org_api_key`→`organization_machine` recentering that silently left this uploader stranded on\n * `*_api_key` — then FAILS TO COMPILE here until the file-uploader enum is updated in lockstep.\n *\n * Only the MACHINE values are pinned. The human values legitimately DIFFER (`USER`=`user` vs\n * `USER_REQUEST`=`user_request`; `ANONYMOUS_USER`=`anonymous_user` vs `ANONYMOUS_SESSION`=\n * `anonymous_session`) — an entity/principal KIND is not the same concept as an execution KIND — so\n * pinning them would be wrong.\n */\ntype _StringEqual<A extends string, B extends string> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;\ntype _Expect<T extends true> = T;\ntype _AssertOrgMachineUploaderTracksExecutionType = _Expect<\n _StringEqual<`${FileUploaderEntityType.ORGANIZATION_MACHINE}`, `${ExecutionContext_ExecutionType.ORGANIZATION_MACHINE}`>\n>;\ntype _AssertAppMachineUploaderTracksExecutionType = _Expect<\n _StringEqual<`${FileUploaderEntityType.APPLICATION_MACHINE}`, `${ExecutionContext_ExecutionType.APPLICATION_MACHINE}`>\n>;\n\nexport interface FileUploaderPrincipal {\n uploadedBy: string;\n uploadedByEntityType: FileUploaderEntityType;\n}\n\n/**\n * Derive the concrete uploader principal from the execution context.\n *\n * File ownership is intentionally stored as a lightweight raw id + entity type\n * pair. We do not resolve related entities here; callers can hydrate richer\n * display data separately when needed.\n */\nexport function resolveFileUploaderPrincipal(\n executionContext: ExecutionContext<any>,\n): FileUploaderPrincipal | undefined {\n const initiatorIds = executionContext.initiatorIds;\n\n if (!initiatorIds) {\n return undefined;\n }\n\n switch (executionContext.executionType) {\n case ExecutionContext_ExecutionType.USER_REQUEST:\n return initiatorIds.userId\n ? {\n uploadedBy: initiatorIds.userId,\n uploadedByEntityType: FileUploaderEntityType.USER,\n }\n : undefined;\n\n case ExecutionContext_ExecutionType.ANONYMOUS_SESSION:\n return initiatorIds.anonymousUserId\n ? {\n uploadedBy: initiatorIds.anonymousUserId,\n uploadedByEntityType: FileUploaderEntityType.ANONYMOUS_USER,\n }\n : undefined;\n\n // Machine principals (API key OR OAuth client): the uploader id is the authenticating\n // credential (`machineCredential.credentialId`), and the entity type is the credential-NEUTRAL\n // machine principal (`ORGANIZATION_MACHINE` / `APPLICATION_MACHINE`) — an api-key and an OAuth\n // client both resolve to the same machine principal, so labelling the upload `*_MACHINE` (not\n // `*_API_KEY`) is honest for both. The specific credential KIND (api-key vs OAuth client) is on\n // `machineCredential.authMethod` if a consumer ever needs to distinguish them.\n case ExecutionContext_ExecutionType.ORGANIZATION_MACHINE:\n return initiatorIds.machineCredential\n ? {\n uploadedBy: initiatorIds.machineCredential.credentialId,\n uploadedByEntityType: FileUploaderEntityType.ORGANIZATION_MACHINE,\n }\n : undefined;\n\n case ExecutionContext_ExecutionType.APPLICATION_MACHINE:\n return initiatorIds.machineCredential\n ? {\n uploadedBy: initiatorIds.machineCredential.credentialId,\n uploadedByEntityType: FileUploaderEntityType.APPLICATION_MACHINE,\n }\n : undefined;\n\n default:\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"file-uploader.utils.js","sourceRoot":"","sources":["../../../../../src/files/utils/file-uploader.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAqC/B;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,gBAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;IAEnD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,QAAQ,gBAAgB,CAAC,aAAa,EAAE,CAAC;QACvC,KAAK,8BAA8B,CAAC,YAAY;YAC9C,OAAO,YAAY,CAAC,MAAM;gBACxB,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,MAAM;oBAC/B,oBAAoB,EAAE,sBAAsB,CAAC,IAAI;iBAClD;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,KAAK,8BAA8B,CAAC,iBAAiB;YACnD,OAAO,YAAY,CAAC,eAAe;gBACjC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,eAAe;oBACxC,oBAAoB,EAAE,sBAAsB,CAAC,cAAc;iBAC5D;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,sFAAsF;QACtF,+FAA+F;QAC/F,+FAA+F;QAC/F,8FAA8F;QAC9F,gGAAgG;QAChG,+EAA+E;QAC/E,KAAK,8BAA8B,CAAC,oBAAoB;YACtD,OAAO,YAAY,CAAC,iBAAiB;gBACnC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,YAAY;oBACvD,oBAAoB,EAAE,sBAAsB,CAAC,oBAAoB;iBAClE;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,KAAK,8BAA8B,CAAC,mBAAmB;YACrD,OAAO,YAAY,CAAC,iBAAiB;gBACnC,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,YAAY;oBACvD,oBAAoB,EAAE,sBAAsB,CAAC,mBAAmB;iBACjE;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB,kGAAkG;QAClG,sGAAsG;QACtG,iGAAiG;QACjG,iGAAiG;QACjG,wDAAwD;QACxD,KAAK,8BAA8B,CAAC,gBAAgB;YAClD,OAAO,YAAY,CAAC,MAAM;gBACxB,CAAC,CAAC;oBACE,UAAU,EAAE,YAAY,CAAC,MAAM;oBAC/B,oBAAoB,EAAE,sBAAsB,CAAC,IAAI;iBAClD;gBACH,CAAC,CAAC,SAAS,CAAC;QAEhB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import {\n ExecutionContext_ExecutionType,\n FileUploaderEntityType,\n} from '@wildo-ai/saas-models';\n\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n/**\n * SINGLE SOURCE OF TRUTH — the machine file-uploader entity types are DERIVED-BY-CONTRACT from the\n * machine EXECUTION types, which are the authority.\n *\n * `FileUploaderEntityType.{ORGANIZATION,APPLICATION}_MACHINE` and\n * `ExecutionContext_ExecutionType.{ORGANIZATION,APPLICATION}_MACHINE` name the SAME machine\n * principal, so their string values MUST stay identical — the switch below projects the execution\n * type straight onto the entity type. They cannot physically share the literal: `FileUploaderEntityType`\n * lives in the upstream `zod-decorators` package (it cannot import the execution type), and TS\n * string-enum members must be literals (not computed from another enum). So instead these compile-time\n * assertions PIN the two equal. A future rename of a machine execution-type VALUE — exactly the\n * `org_api_key`→`organization_machine` recentering that silently left this uploader stranded on\n * `*_api_key` — then FAILS TO COMPILE here until the file-uploader enum is updated in lockstep.\n *\n * Only the MACHINE values are pinned. The human values legitimately DIFFER (`USER`=`user` vs\n * `USER_REQUEST`=`user_request`; `ANONYMOUS_USER`=`anonymous_user` vs `ANONYMOUS_SESSION`=\n * `anonymous_session`) — an entity/principal KIND is not the same concept as an execution KIND — so\n * pinning them would be wrong.\n */\ntype _StringEqual<A extends string, B extends string> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;\ntype _Expect<T extends true> = T;\ntype _AssertOrgMachineUploaderTracksExecutionType = _Expect<\n _StringEqual<`${FileUploaderEntityType.ORGANIZATION_MACHINE}`, `${ExecutionContext_ExecutionType.ORGANIZATION_MACHINE}`>\n>;\ntype _AssertAppMachineUploaderTracksExecutionType = _Expect<\n _StringEqual<`${FileUploaderEntityType.APPLICATION_MACHINE}`, `${ExecutionContext_ExecutionType.APPLICATION_MACHINE}`>\n>;\n\nexport interface FileUploaderPrincipal {\n uploadedBy: string;\n uploadedByEntityType: FileUploaderEntityType;\n}\n\n/**\n * Derive the concrete uploader principal from the execution context.\n *\n * File ownership is intentionally stored as a lightweight raw id + entity type\n * pair. We do not resolve related entities here; callers can hydrate richer\n * display data separately when needed.\n */\nexport function resolveFileUploaderPrincipal(\n executionContext: ExecutionContext<any>,\n): FileUploaderPrincipal | undefined {\n const initiatorIds = executionContext.initiatorIds;\n\n if (!initiatorIds) {\n return undefined;\n }\n\n switch (executionContext.executionType) {\n case ExecutionContext_ExecutionType.USER_REQUEST:\n return initiatorIds.userId\n ? {\n uploadedBy: initiatorIds.userId,\n uploadedByEntityType: FileUploaderEntityType.USER,\n }\n : undefined;\n\n case ExecutionContext_ExecutionType.ANONYMOUS_SESSION:\n return initiatorIds.anonymousUserId\n ? {\n uploadedBy: initiatorIds.anonymousUserId,\n uploadedByEntityType: FileUploaderEntityType.ANONYMOUS_USER,\n }\n : undefined;\n\n // Machine principals (API key OR OAuth client): the uploader id is the authenticating\n // credential (`machineCredential.credentialId`), and the entity type is the credential-NEUTRAL\n // machine principal (`ORGANIZATION_MACHINE` / `APPLICATION_MACHINE`) — an api-key and an OAuth\n // client both resolve to the same machine principal, so labelling the upload `*_MACHINE` (not\n // `*_API_KEY`) is honest for both. The specific credential KIND (api-key vs OAuth client) is on\n // `machineCredential.authMethod` if a consumer ever needs to distinguish them.\n case ExecutionContext_ExecutionType.ORGANIZATION_MACHINE:\n return initiatorIds.machineCredential\n ? {\n uploadedBy: initiatorIds.machineCredential.credentialId,\n uploadedByEntityType: FileUploaderEntityType.ORGANIZATION_MACHINE,\n }\n : undefined;\n\n case ExecutionContext_ExecutionType.APPLICATION_MACHINE:\n return initiatorIds.machineCredential\n ? {\n uploadedBy: initiatorIds.machineCredential.credentialId,\n uploadedByEntityType: FileUploaderEntityType.APPLICATION_MACHINE,\n }\n : undefined;\n\n // A consumable-token context carries the userId the token was MINTED for (set by the token bridge\n // in `createExecutionContextFromRequest`). For a user-minted file upload grant that IS the uploader —\n // the person who delegated the upload, not the bearer who performed it. A token with no `userId`\n // (a machine-minted grant) resolves to nothing here; the upload handler then attributes the file\n // from the grant's own `minter` record. Issue #312, D7.\n case ExecutionContext_ExecutionType.CONSUMABLE_TOKEN:\n return initiatorIds.userId\n ? {\n uploadedBy: initiatorIds.userId,\n uploadedByEntityType: FileUploaderEntityType.USER,\n }\n : undefined;\n\n default:\n return undefined;\n }\n}\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LOCAL text extraction for the two ZIP+XML document families — OOXML (`.docx` / `.xlsx` /
|
|
3
|
+
* `.pptx`) and OpenDocument (`.odt` / `.ods` / `.odp`).
|
|
4
|
+
*
|
|
5
|
+
* ## Why these six, and not the other three (#434, decided 2026-09-09)
|
|
6
|
+
*
|
|
7
|
+
* The nine document types the `Documents` media group admits are THREE technical problems, and
|
|
8
|
+
* treating them as one is what produced the original "there is no local library for Office" claim:
|
|
9
|
+
*
|
|
10
|
+
* | family | types | container |
|
|
11
|
+
* |-----------------------|---------------------------|----------------------|
|
|
12
|
+
* | OOXML | `.docx` `.xlsx` `.pptx` | ZIP + XML |
|
|
13
|
+
* | OpenDocument | `.odt` `.ods` `.odp` | ZIP + XML — the SAME |
|
|
14
|
+
* | legacy binary Office | `.doc` `.xls` `.ppt` | OLE2 compound file |
|
|
15
|
+
*
|
|
16
|
+
* The first two are one technique, which is why one module serves both. The third is a
|
|
17
|
+
* pre-2007 binary format whose reader is a project rather than a dependency, and it stays
|
|
18
|
+
* PROVIDER-ONLY — along with the genuinely provider-shaped case a local parser can never serve: a
|
|
19
|
+
* scanned document whose text exists only inside images and needs real OCR.
|
|
20
|
+
*
|
|
21
|
+
* ## Why a local library at all, when a provider can already do it
|
|
22
|
+
*
|
|
23
|
+
* Because without one, a deployment with no `AI_DOCUMENT_EXTRACTION` provider accepted a `.docx`
|
|
24
|
+
* upload, stored it, and produced NO corpus from it — logged at DEBUG and never an error. The media
|
|
25
|
+
* group advertised nine types the deployment could not read, and said nothing.
|
|
26
|
+
*
|
|
27
|
+
* A local parser also keeps the document IN the deployment. Routing every `.docx` to a vendor for
|
|
28
|
+
* text that is already sitting in plain XML inside the file is egress an operator has to declare
|
|
29
|
+
* and a per-page cost, for a document that needs neither.
|
|
30
|
+
*
|
|
31
|
+
* The provider is NOT displaced: `FileTextExtractionBackendService` keeps its existing ladder, and
|
|
32
|
+
* this module is the same rung `pdfjs-dist` occupies for PDF — the local library a provider falls
|
|
33
|
+
* back to, and the only path when no provider is configured.
|
|
34
|
+
*
|
|
35
|
+
* ## What is extracted, and what is deliberately dropped
|
|
36
|
+
*
|
|
37
|
+
* Text, in document order, with a line break at each block boundary. Nothing else: no styling, no
|
|
38
|
+
* cell coordinates, no slide numbers, no revision metadata. The consumer is a RAG corpus, which
|
|
39
|
+
* embeds prose — a spreadsheet's cell addresses would be embedded noise, and a document's fonts
|
|
40
|
+
* carry no meaning to retrieve.
|
|
41
|
+
*/
|
|
42
|
+
import { Buffer } from 'node:buffer';
|
|
43
|
+
/** OOXML — the Office 2007+ ZIP container. */
|
|
44
|
+
export declare const OOXML_DOCUMENT_MIMES: ReadonlySet<string>;
|
|
45
|
+
/** OpenDocument — the same ZIP+XML technique, one `content.xml` per document. */
|
|
46
|
+
export declare const OPEN_DOCUMENT_MIMES: ReadonlySet<string>;
|
|
47
|
+
/** Every type this module can read without any provider. */
|
|
48
|
+
export declare const LOCALLY_EXTRACTABLE_DOCUMENT_MIMES: ReadonlySet<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Pre-2007 binary Office. NOT served here, and the omission is a decision rather than a gap:
|
|
51
|
+
* these are OLE2 compound files, a different container from a different era, and a reader for them
|
|
52
|
+
* is a project. They remain extractable only through a configured provider.
|
|
53
|
+
*/
|
|
54
|
+
export declare const LEGACY_BINARY_OFFICE_MIMES: ReadonlySet<string>;
|
|
55
|
+
/** Why a local extraction could not be produced. The service maps these onto its own failure classes. */
|
|
56
|
+
export declare enum OfficeDocumentExtractionFailure {
|
|
57
|
+
/** The bytes are not a readable ZIP container — a truncated upload, or a file whose extension lies. */
|
|
58
|
+
UNREADABLE_CONTAINER = "UNREADABLE_CONTAINER",
|
|
59
|
+
/** A readable archive that declares more uncompressed bytes than {@link MAX_TOTAL_UNCOMPRESSED_BYTES}. */
|
|
60
|
+
ARCHIVE_TOO_LARGE = "ARCHIVE_TOO_LARGE",
|
|
61
|
+
/**
|
|
62
|
+
* A readable archive with none of the XML parts this format keeps its text in. Almost always a
|
|
63
|
+
* mislabelled file — a `.zip` renamed, or a `.docx` MIME on something else entirely.
|
|
64
|
+
*/
|
|
65
|
+
NO_TEXT_PARTS = "NO_TEXT_PARTS"
|
|
66
|
+
}
|
|
67
|
+
export declare class OfficeDocumentExtractionError extends Error {
|
|
68
|
+
readonly failure: OfficeDocumentExtractionFailure;
|
|
69
|
+
readonly cause?: unknown;
|
|
70
|
+
constructor(failure: OfficeDocumentExtractionFailure, message: string, cause?: unknown);
|
|
71
|
+
}
|
|
72
|
+
export interface OfficeDocumentExtraction {
|
|
73
|
+
readonly text: string;
|
|
74
|
+
/** How many XML parts contributed — slides, sheets, or the single `content.xml`. Reported as `pageCount`. */
|
|
75
|
+
readonly partCount: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Extract the text of one OOXML or OpenDocument file.
|
|
79
|
+
*
|
|
80
|
+
* Throws {@link OfficeDocumentExtractionError} rather than returning an empty string for a document
|
|
81
|
+
* it could not read: an empty corpus and an unreadable file are different facts, and the caller
|
|
82
|
+
* classifies them differently — one is "this document has no text", the other is "these bytes are
|
|
83
|
+
* not what they claim to be".
|
|
84
|
+
*/
|
|
85
|
+
export declare function extractOfficeDocumentText(document: Buffer, mimeType: string): Promise<OfficeDocumentExtraction>;
|
|
86
|
+
//# sourceMappingURL=office-document-text-extraction.backend.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-document-text-extraction.backend.utils.d.ts","sourceRoot":"","sources":["../../../../../src/files/utils/office-document-text-extraction.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,8CAA8C;AAC9C,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAInD,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,kCAAkC,EAAE,WAAW,CAAC,MAAM,CAGjE,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAIzD,CAAC;AAuCH,yGAAyG;AACzG,oBAAY,+BAA+B;IACzC,uGAAuG;IACvG,oBAAoB,yBAAyB;IAC7C,0GAA0G;IAC1G,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAED,qBAAa,6BAA8B,SAAQ,KAAK;IAC1C,QAAQ,CAAC,OAAO,EAAE,+BAA+B;IAAmB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;gBAAnF,OAAO,EAAE,+BAA+B,EAAE,OAAO,EAAE,MAAM,EAAW,KAAK,CAAC,EAAE,OAAO;CAIzG;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6GAA6G;IAC7G,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAuGD;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,wBAAwB,CAAC,CA8FnC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LOCAL text extraction for the two ZIP+XML document families — OOXML (`.docx` / `.xlsx` /
|
|
3
|
+
* `.pptx`) and OpenDocument (`.odt` / `.ods` / `.odp`).
|
|
4
|
+
*
|
|
5
|
+
* ## Why these six, and not the other three (#434, decided 2026-09-09)
|
|
6
|
+
*
|
|
7
|
+
* The nine document types the `Documents` media group admits are THREE technical problems, and
|
|
8
|
+
* treating them as one is what produced the original "there is no local library for Office" claim:
|
|
9
|
+
*
|
|
10
|
+
* | family | types | container |
|
|
11
|
+
* |-----------------------|---------------------------|----------------------|
|
|
12
|
+
* | OOXML | `.docx` `.xlsx` `.pptx` | ZIP + XML |
|
|
13
|
+
* | OpenDocument | `.odt` `.ods` `.odp` | ZIP + XML — the SAME |
|
|
14
|
+
* | legacy binary Office | `.doc` `.xls` `.ppt` | OLE2 compound file |
|
|
15
|
+
*
|
|
16
|
+
* The first two are one technique, which is why one module serves both. The third is a
|
|
17
|
+
* pre-2007 binary format whose reader is a project rather than a dependency, and it stays
|
|
18
|
+
* PROVIDER-ONLY — along with the genuinely provider-shaped case a local parser can never serve: a
|
|
19
|
+
* scanned document whose text exists only inside images and needs real OCR.
|
|
20
|
+
*
|
|
21
|
+
* ## Why a local library at all, when a provider can already do it
|
|
22
|
+
*
|
|
23
|
+
* Because without one, a deployment with no `AI_DOCUMENT_EXTRACTION` provider accepted a `.docx`
|
|
24
|
+
* upload, stored it, and produced NO corpus from it — logged at DEBUG and never an error. The media
|
|
25
|
+
* group advertised nine types the deployment could not read, and said nothing.
|
|
26
|
+
*
|
|
27
|
+
* A local parser also keeps the document IN the deployment. Routing every `.docx` to a vendor for
|
|
28
|
+
* text that is already sitting in plain XML inside the file is egress an operator has to declare
|
|
29
|
+
* and a per-page cost, for a document that needs neither.
|
|
30
|
+
*
|
|
31
|
+
* The provider is NOT displaced: `FileTextExtractionBackendService` keeps its existing ladder, and
|
|
32
|
+
* this module is the same rung `pdfjs-dist` occupies for PDF — the local library a provider falls
|
|
33
|
+
* back to, and the only path when no provider is configured.
|
|
34
|
+
*
|
|
35
|
+
* ## What is extracted, and what is deliberately dropped
|
|
36
|
+
*
|
|
37
|
+
* Text, in document order, with a line break at each block boundary. Nothing else: no styling, no
|
|
38
|
+
* cell coordinates, no slide numbers, no revision metadata. The consumer is a RAG corpus, which
|
|
39
|
+
* embeds prose — a spreadsheet's cell addresses would be embedded noise, and a document's fonts
|
|
40
|
+
* carry no meaning to retrieve.
|
|
41
|
+
*/
|
|
42
|
+
/** OOXML — the Office 2007+ ZIP container. */
|
|
43
|
+
export const OOXML_DOCUMENT_MIMES = new Set([
|
|
44
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
45
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
46
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
47
|
+
]);
|
|
48
|
+
/** OpenDocument — the same ZIP+XML technique, one `content.xml` per document. */
|
|
49
|
+
export const OPEN_DOCUMENT_MIMES = new Set([
|
|
50
|
+
'application/vnd.oasis.opendocument.text',
|
|
51
|
+
'application/vnd.oasis.opendocument.spreadsheet',
|
|
52
|
+
'application/vnd.oasis.opendocument.presentation',
|
|
53
|
+
]);
|
|
54
|
+
/** Every type this module can read without any provider. */
|
|
55
|
+
export const LOCALLY_EXTRACTABLE_DOCUMENT_MIMES = new Set([
|
|
56
|
+
...OOXML_DOCUMENT_MIMES,
|
|
57
|
+
...OPEN_DOCUMENT_MIMES,
|
|
58
|
+
]);
|
|
59
|
+
/**
|
|
60
|
+
* Pre-2007 binary Office. NOT served here, and the omission is a decision rather than a gap:
|
|
61
|
+
* these are OLE2 compound files, a different container from a different era, and a reader for them
|
|
62
|
+
* is a project. They remain extractable only through a configured provider.
|
|
63
|
+
*/
|
|
64
|
+
export const LEGACY_BINARY_OFFICE_MIMES = new Set([
|
|
65
|
+
'application/msword',
|
|
66
|
+
'application/vnd.ms-excel',
|
|
67
|
+
'application/vnd.ms-powerpoint',
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* Largest total of UNCOMPRESSED bytes this module will decompress out of one archive.
|
|
71
|
+
*
|
|
72
|
+
* A ZIP bomb is a real upload, not a hypothetical: a few hundred kilobytes can declare gigabytes,
|
|
73
|
+
* and `unzipSync` would allocate every one of them before anything else could refuse. The cap is
|
|
74
|
+
* applied from the central directory's declared sizes — BEFORE decompression — which is the only
|
|
75
|
+
* point at which refusing is still cheap.
|
|
76
|
+
*
|
|
77
|
+
* 64 MiB because it is far above any genuine document's XML (a 500-page manuscript's
|
|
78
|
+
* `document.xml` is single-digit megabytes) and far below a size that could exhaust a backend
|
|
79
|
+
* serving many uploads at once.
|
|
80
|
+
*/
|
|
81
|
+
const MAX_TOTAL_UNCOMPRESSED_BYTES = 64 * 1024 * 1024;
|
|
82
|
+
/** Bound on entries INSPECTED, so a pathological central directory cannot make the filter itself the attack. */
|
|
83
|
+
const MAX_ARCHIVE_ENTRIES = 4096;
|
|
84
|
+
/**
|
|
85
|
+
* Element names after which the walker emits a line break.
|
|
86
|
+
*
|
|
87
|
+
* ONE union across both families rather than a per-format table, because the walker never needs to
|
|
88
|
+
* know which format it is reading — it needs to know which elements END A BLOCK, and the six
|
|
89
|
+
* formats disagree only about spelling:
|
|
90
|
+
*
|
|
91
|
+
* - `w:p` / `w:tr` — WordprocessingML paragraph and table row
|
|
92
|
+
* - `a:p` — DrawingML paragraph (every `.pptx` text frame)
|
|
93
|
+
* - `text:p` / `text:h` / `text:table-row` — OpenDocument paragraph, heading, table row
|
|
94
|
+
* - `si` / `c` — SpreadsheetML shared-string item and cell: one line per value, which is what
|
|
95
|
+
* makes a sheet read as a list of values rather than one unbroken string
|
|
96
|
+
*/
|
|
97
|
+
const BLOCK_ELEMENT_NAMES = new Set([
|
|
98
|
+
'w:p', 'w:tr',
|
|
99
|
+
'a:p',
|
|
100
|
+
'text:p', 'text:h', 'text:table-row',
|
|
101
|
+
'si', 'c',
|
|
102
|
+
]);
|
|
103
|
+
/** Why a local extraction could not be produced. The service maps these onto its own failure classes. */
|
|
104
|
+
export var OfficeDocumentExtractionFailure;
|
|
105
|
+
(function (OfficeDocumentExtractionFailure) {
|
|
106
|
+
/** The bytes are not a readable ZIP container — a truncated upload, or a file whose extension lies. */
|
|
107
|
+
OfficeDocumentExtractionFailure["UNREADABLE_CONTAINER"] = "UNREADABLE_CONTAINER";
|
|
108
|
+
/** A readable archive that declares more uncompressed bytes than {@link MAX_TOTAL_UNCOMPRESSED_BYTES}. */
|
|
109
|
+
OfficeDocumentExtractionFailure["ARCHIVE_TOO_LARGE"] = "ARCHIVE_TOO_LARGE";
|
|
110
|
+
/**
|
|
111
|
+
* A readable archive with none of the XML parts this format keeps its text in. Almost always a
|
|
112
|
+
* mislabelled file — a `.zip` renamed, or a `.docx` MIME on something else entirely.
|
|
113
|
+
*/
|
|
114
|
+
OfficeDocumentExtractionFailure["NO_TEXT_PARTS"] = "NO_TEXT_PARTS";
|
|
115
|
+
})(OfficeDocumentExtractionFailure || (OfficeDocumentExtractionFailure = {}));
|
|
116
|
+
export class OfficeDocumentExtractionError extends Error {
|
|
117
|
+
failure;
|
|
118
|
+
cause;
|
|
119
|
+
constructor(failure, message, cause) {
|
|
120
|
+
super(message);
|
|
121
|
+
this.failure = failure;
|
|
122
|
+
this.cause = cause;
|
|
123
|
+
this.name = 'OfficeDocumentExtractionError';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function selectorFor(mimeType) {
|
|
127
|
+
switch (mimeType) {
|
|
128
|
+
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
129
|
+
/*
|
|
130
|
+
* Body first, then notes. Headers and footers are deliberately EXCLUDED: they repeat on every
|
|
131
|
+
* page, so including them multiplies one boilerplate line by the page count and hands the
|
|
132
|
+
* corpus a phrase that retrieves against everything.
|
|
133
|
+
*/
|
|
134
|
+
return {
|
|
135
|
+
matches: (name) => name === 'word/document.xml' || name === 'word/footnotes.xml' || name === 'word/endnotes.xml',
|
|
136
|
+
rank: (name) => (name === 'word/document.xml' ? 0 : 1),
|
|
137
|
+
};
|
|
138
|
+
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
|
139
|
+
/*
|
|
140
|
+
* Slides, then speaker notes. Notes are included because they routinely carry the substance a
|
|
141
|
+
* slide only gestures at — the sentence a presenter says out loud is often the one worth
|
|
142
|
+
* retrieving.
|
|
143
|
+
*/
|
|
144
|
+
return {
|
|
145
|
+
matches: (name) => /^ppt\/(slides\/slide|notesSlides\/notesSlide)\d+\.xml$/u.test(name),
|
|
146
|
+
rank: (name) => (name.startsWith('ppt/slides/') ? 0 : 1),
|
|
147
|
+
};
|
|
148
|
+
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
|
149
|
+
/*
|
|
150
|
+
* Shared strings FIRST, then the sheets. In SpreadsheetML most cell text is de-duplicated into
|
|
151
|
+
* `sharedStrings.xml` and referenced by index from the sheet, so the shared table IS the
|
|
152
|
+
* document's prose; the sheets add inline strings and the numbers' surrounding structure.
|
|
153
|
+
*
|
|
154
|
+
* The index indirection is deliberately NOT resolved. Reading both parts yields every string
|
|
155
|
+
* once, which is what a corpus needs; rebuilding each cell's value in place would reproduce
|
|
156
|
+
* the spreadsheet, not its text, and would repeat every shared string once per use.
|
|
157
|
+
*/
|
|
158
|
+
return {
|
|
159
|
+
matches: (name) => name === 'xl/sharedStrings.xml' || /^xl\/worksheets\/sheet\d+\.xml$/u.test(name),
|
|
160
|
+
rank: (name) => (name === 'xl/sharedStrings.xml' ? 0 : 1),
|
|
161
|
+
};
|
|
162
|
+
default:
|
|
163
|
+
// Every OpenDocument format keeps its whole body in one `content.xml` — which is why the
|
|
164
|
+
// three of them need no branch between them.
|
|
165
|
+
return { matches: (name) => name === 'content.xml', rank: () => 0 };
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/** Numeric-aware comparison, so `slide2.xml` precedes `slide10.xml` rather than following it. */
|
|
169
|
+
function compareNumericallyWithinRank(left, right) {
|
|
170
|
+
return left.localeCompare(right, 'en', { numeric: true });
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Walk a `preserveOrder` parse tree, appending every text node and breaking lines at block
|
|
174
|
+
* boundaries.
|
|
175
|
+
*
|
|
176
|
+
* `preserveOrder` is what makes this correct rather than approximate: the parser emits an ARRAY of
|
|
177
|
+
* single-key objects in document order, so text that is interleaved between child elements — which
|
|
178
|
+
* is every run in a Word paragraph — arrives in the order a reader would meet it. The default
|
|
179
|
+
* (unordered) shape collapses repeated siblings into arrays keyed by tag name and loses the
|
|
180
|
+
* interleaving entirely, which silently reorders every sentence containing formatting.
|
|
181
|
+
*/
|
|
182
|
+
function collectText(node, out) {
|
|
183
|
+
if (Array.isArray(node)) {
|
|
184
|
+
for (const child of node) {
|
|
185
|
+
collectText(child, out);
|
|
186
|
+
}
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (typeof node !== 'object' || node === null) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
for (const [name, value] of Object.entries(node)) {
|
|
193
|
+
if (name === '#text') {
|
|
194
|
+
// `trimValues: false` keeps the intra-run spacing that separates words across formatting
|
|
195
|
+
// boundaries — trimming here is what turns "the <b>quick</b> fox" into "thequickfox".
|
|
196
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
197
|
+
out.push(value);
|
|
198
|
+
}
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
collectText(value, out);
|
|
202
|
+
if (BLOCK_ELEMENT_NAMES.has(name)) {
|
|
203
|
+
out.push('\n');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Extract the text of one OOXML or OpenDocument file.
|
|
209
|
+
*
|
|
210
|
+
* Throws {@link OfficeDocumentExtractionError} rather than returning an empty string for a document
|
|
211
|
+
* it could not read: an empty corpus and an unreadable file are different facts, and the caller
|
|
212
|
+
* classifies them differently — one is "this document has no text", the other is "these bytes are
|
|
213
|
+
* not what they claim to be".
|
|
214
|
+
*/
|
|
215
|
+
export async function extractOfficeDocumentText(document, mimeType) {
|
|
216
|
+
// Dynamic, matching how `pdfjs-dist` is loaded for PDF: both are installed dependencies that only
|
|
217
|
+
// a file-extraction call needs, and neither belongs on the boot path of every backend process.
|
|
218
|
+
const [{ unzipSync }, { XMLParser }] = await Promise.all([
|
|
219
|
+
import('fflate'),
|
|
220
|
+
import('fast-xml-parser'),
|
|
221
|
+
]);
|
|
222
|
+
const selector = selectorFor(mimeType);
|
|
223
|
+
let declaredBytes = 0;
|
|
224
|
+
let inspectedEntries = 0;
|
|
225
|
+
let entries;
|
|
226
|
+
try {
|
|
227
|
+
entries = unzipSync(new Uint8Array(document), {
|
|
228
|
+
filter: (file) => {
|
|
229
|
+
inspectedEntries += 1;
|
|
230
|
+
if (inspectedEntries > MAX_ARCHIVE_ENTRIES) {
|
|
231
|
+
throw new OfficeDocumentExtractionError(OfficeDocumentExtractionFailure.ARCHIVE_TOO_LARGE, `Archive declares more than ${MAX_ARCHIVE_ENTRIES} entries`);
|
|
232
|
+
}
|
|
233
|
+
if (!selector.matches(file.name)) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
/*
|
|
237
|
+
* `originalSize` comes from the central directory, so this refuses BEFORE the bytes are
|
|
238
|
+
* allocated. Checking after decompression would be checking after the damage.
|
|
239
|
+
*/
|
|
240
|
+
declaredBytes += file.originalSize;
|
|
241
|
+
if (declaredBytes > MAX_TOTAL_UNCOMPRESSED_BYTES) {
|
|
242
|
+
throw new OfficeDocumentExtractionError(OfficeDocumentExtractionFailure.ARCHIVE_TOO_LARGE, `Archive declares ${declaredBytes} uncompressed bytes across its text parts, above the ${MAX_TOTAL_UNCOMPRESSED_BYTES} limit`);
|
|
243
|
+
}
|
|
244
|
+
return true;
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
catch (cause) {
|
|
249
|
+
if (cause instanceof OfficeDocumentExtractionError) {
|
|
250
|
+
throw cause;
|
|
251
|
+
}
|
|
252
|
+
throw new OfficeDocumentExtractionError(OfficeDocumentExtractionFailure.UNREADABLE_CONTAINER, 'The document is not a readable ZIP container', cause);
|
|
253
|
+
}
|
|
254
|
+
const partNames = Object.keys(entries).sort((left, right) => selector.rank(left) - selector.rank(right) || compareNumericallyWithinRank(left, right));
|
|
255
|
+
if (partNames.length === 0) {
|
|
256
|
+
throw new OfficeDocumentExtractionError(OfficeDocumentExtractionFailure.NO_TEXT_PARTS, `The archive holds none of the XML parts a ${mimeType} keeps its text in`);
|
|
257
|
+
}
|
|
258
|
+
const parser = new XMLParser({
|
|
259
|
+
preserveOrder: true,
|
|
260
|
+
// Attributes carry no prose. Ignoring them also keeps the walker from having to skip the
|
|
261
|
+
// parser's `:@` attribute nodes, which would otherwise be indistinguishable from elements.
|
|
262
|
+
ignoreAttributes: true,
|
|
263
|
+
trimValues: false,
|
|
264
|
+
// XML's five predefined entities and numeric references are what a `&` in a document body
|
|
265
|
+
// arrives as; without this the corpus carries the escape rather than the character.
|
|
266
|
+
processEntities: true,
|
|
267
|
+
});
|
|
268
|
+
const decoder = new TextDecoder('utf-8');
|
|
269
|
+
const pieces = [];
|
|
270
|
+
for (const partName of partNames) {
|
|
271
|
+
collectText(parser.parse(decoder.decode(entries[partName])), pieces);
|
|
272
|
+
// A part boundary is a block boundary: the last paragraph of one slide must not run into the
|
|
273
|
+
// first of the next.
|
|
274
|
+
pieces.push('\n');
|
|
275
|
+
}
|
|
276
|
+
/*
|
|
277
|
+
* Collapse the runs of blank lines the block breaks produce — a Word paragraph inside a table row
|
|
278
|
+
* closes both, and an empty paragraph closes one around nothing. Left alone, a document with any
|
|
279
|
+
* table structure arrives as more newlines than text, and the chunker then splits on them.
|
|
280
|
+
*/
|
|
281
|
+
const text = pieces
|
|
282
|
+
.join('')
|
|
283
|
+
.replace(/[ \t]+\n/gu, '\n')
|
|
284
|
+
.replace(/\n{3,}/gu, '\n\n')
|
|
285
|
+
.trim();
|
|
286
|
+
return { text, partCount: partNames.length };
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=office-document-text-extraction.backend.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-document-text-extraction.backend.utils.js","sourceRoot":"","sources":["../../../../../src/files/utils/office-document-text-extraction.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAIH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC;IAC/D,yEAAyE;IACzE,mEAAmE;IACnE,2EAA2E;CAC5E,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC;IAC9D,yCAAyC;IACzC,gDAAgD;IAChD,iDAAiD;CAClD,CAAC,CAAC;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,kCAAkC,GAAwB,IAAI,GAAG,CAAC;IAC7E,GAAG,oBAAoB;IACvB,GAAG,mBAAmB;CACvB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IACrE,oBAAoB;IACpB,0BAA0B;IAC1B,+BAA+B;CAChC,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,4BAA4B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,gHAAgH;AAChH,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC;IACvD,KAAK,EAAE,MAAM;IACb,KAAK;IACL,QAAQ,EAAE,QAAQ,EAAE,gBAAgB;IACpC,IAAI,EAAE,GAAG;CACV,CAAC,CAAC;AAEH,yGAAyG;AACzG,MAAM,CAAN,IAAY,+BAUX;AAVD,WAAY,+BAA+B;IACzC,uGAAuG;IACvG,gFAA6C,CAAA;IAC7C,0GAA0G;IAC1G,0EAAuC,CAAA;IACvC;;;OAGG;IACH,kEAA+B,CAAA;AACjC,CAAC,EAVW,+BAA+B,KAA/B,+BAA+B,QAU1C;AAED,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACjC;IAAoE;IAAzF,YAAqB,OAAwC,EAAE,OAAe,EAAW,KAAe;QACtG,KAAK,CAAC,OAAO,CAAC,CAAC;QADI,YAAO,GAAP,OAAO,CAAiC;QAA4B,UAAK,GAAL,KAAK,CAAU;QAEtG,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAC9C,CAAC;CACF;AAqBD,SAAS,WAAW,CAAC,QAAgB;IACnC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,yEAAyE;YAC5E;;;;eAIG;YACH,OAAO;gBACL,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,mBAAmB,IAAI,IAAI,KAAK,oBAAoB,IAAI,IAAI,KAAK,mBAAmB;gBAChH,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvD,CAAC;QAEJ,KAAK,2EAA2E;YAC9E;;;;eAIG;YACH,OAAO;gBACL,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,yDAAyD,CAAC,IAAI,CAAC,IAAI,CAAC;gBACvF,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACzD,CAAC;QAEJ,KAAK,mEAAmE;YACtE;;;;;;;;eAQG;YACH,OAAO;gBACL,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,sBAAsB,IAAI,kCAAkC,CAAC,IAAI,CAAC,IAAI,CAAC;gBACnG,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1D,CAAC;QAEJ;YACE,yFAAyF;YACzF,6CAA6C;YAC7C,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IACxE,CAAC;AACH,CAAC;AAED,iGAAiG;AACjG,SAAS,4BAA4B,CAAC,IAAY,EAAE,KAAa;IAC/D,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,GAAa;IAC/C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO;IACT,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAA+B,CAAC,EAAE,CAAC;QAC5E,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACrB,yFAAyF;YACzF,sFAAsF;YACtF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;YACD,SAAS;QACX,CAAC;QACD,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACxB,IAAI,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,QAAgB,EAChB,QAAgB;IAEhB,kGAAkG;IAClG,+FAA+F;IAC/F,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvD,MAAM,CAAC,QAAQ,CAAC;QAChB,MAAM,CAAC,iBAAiB,CAAC;KAC1B,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEvC,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,IAAI,OAAmC,CAAC;IACxC,IAAI,CAAC;QACH,OAAO,GAAG,SAAS,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC5C,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACf,gBAAgB,IAAI,CAAC,CAAC;gBACtB,IAAI,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;oBAC3C,MAAM,IAAI,6BAA6B,CACrC,+BAA+B,CAAC,iBAAiB,EACjD,8BAA8B,mBAAmB,UAAU,CAC5D,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACjC,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD;;;mBAGG;gBACH,aAAa,IAAI,IAAI,CAAC,YAAY,CAAC;gBACnC,IAAI,aAAa,GAAG,4BAA4B,EAAE,CAAC;oBACjD,MAAM,IAAI,6BAA6B,CACrC,+BAA+B,CAAC,iBAAiB,EACjD,oBAAoB,aAAa,wDAAwD,4BAA4B,QAAQ,CAC9H,CAAC;gBACJ,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,6BAA6B,EAAE,CAAC;YACnD,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,6BAA6B,CACrC,+BAA+B,CAAC,oBAAoB,EACpD,8CAA8C,EAC9C,KAAK,CACN,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CACzC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,4BAA4B,CAAC,IAAI,EAAE,KAAK,CAAC,CACzG,CAAC;IAEF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,6BAA6B,CACrC,+BAA+B,CAAC,aAAa,EAC7C,6CAA6C,QAAQ,oBAAoB,CAC1E,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,aAAa,EAAE,IAAI;QACnB,yFAAyF;QACzF,2FAA2F;QAC3F,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,KAAK;QACjB,8FAA8F;QAC9F,oFAAoF;QACpF,eAAe,EAAE,IAAI;KACtB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACtE,6FAA6F;QAC7F,qBAAqB;QACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM,IAAI,GAAG,MAAM;SAChB,IAAI,CAAC,EAAE,CAAC;SACR,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;SAC3B,IAAI,EAAE,CAAC;IAEV,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;AAC/C,CAAC","sourcesContent":["/**\n * LOCAL text extraction for the two ZIP+XML document families — OOXML (`.docx` / `.xlsx` /\n * `.pptx`) and OpenDocument (`.odt` / `.ods` / `.odp`).\n *\n * ## Why these six, and not the other three (#434, decided 2026-09-09)\n *\n * The nine document types the `Documents` media group admits are THREE technical problems, and\n * treating them as one is what produced the original \"there is no local library for Office\" claim:\n *\n * | family | types | container |\n * |-----------------------|---------------------------|----------------------|\n * | OOXML | `.docx` `.xlsx` `.pptx` | ZIP + XML |\n * | OpenDocument | `.odt` `.ods` `.odp` | ZIP + XML — the SAME |\n * | legacy binary Office | `.doc` `.xls` `.ppt` | OLE2 compound file |\n *\n * The first two are one technique, which is why one module serves both. The third is a\n * pre-2007 binary format whose reader is a project rather than a dependency, and it stays\n * PROVIDER-ONLY — along with the genuinely provider-shaped case a local parser can never serve: a\n * scanned document whose text exists only inside images and needs real OCR.\n *\n * ## Why a local library at all, when a provider can already do it\n *\n * Because without one, a deployment with no `AI_DOCUMENT_EXTRACTION` provider accepted a `.docx`\n * upload, stored it, and produced NO corpus from it — logged at DEBUG and never an error. The media\n * group advertised nine types the deployment could not read, and said nothing.\n *\n * A local parser also keeps the document IN the deployment. Routing every `.docx` to a vendor for\n * text that is already sitting in plain XML inside the file is egress an operator has to declare\n * and a per-page cost, for a document that needs neither.\n *\n * The provider is NOT displaced: `FileTextExtractionBackendService` keeps its existing ladder, and\n * this module is the same rung `pdfjs-dist` occupies for PDF — the local library a provider falls\n * back to, and the only path when no provider is configured.\n *\n * ## What is extracted, and what is deliberately dropped\n *\n * Text, in document order, with a line break at each block boundary. Nothing else: no styling, no\n * cell coordinates, no slide numbers, no revision metadata. The consumer is a RAG corpus, which\n * embeds prose — a spreadsheet's cell addresses would be embedded noise, and a document's fonts\n * carry no meaning to retrieve.\n */\n\nimport { Buffer } from 'node:buffer';\n\n/** OOXML — the Office 2007+ ZIP container. */\nexport const OOXML_DOCUMENT_MIMES: ReadonlySet<string> = new Set([\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n]);\n\n/** OpenDocument — the same ZIP+XML technique, one `content.xml` per document. */\nexport const OPEN_DOCUMENT_MIMES: ReadonlySet<string> = new Set([\n 'application/vnd.oasis.opendocument.text',\n 'application/vnd.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.presentation',\n]);\n\n/** Every type this module can read without any provider. */\nexport const LOCALLY_EXTRACTABLE_DOCUMENT_MIMES: ReadonlySet<string> = new Set([\n ...OOXML_DOCUMENT_MIMES,\n ...OPEN_DOCUMENT_MIMES,\n]);\n\n/**\n * Pre-2007 binary Office. NOT served here, and the omission is a decision rather than a gap:\n * these are OLE2 compound files, a different container from a different era, and a reader for them\n * is a project. They remain extractable only through a configured provider.\n */\nexport const LEGACY_BINARY_OFFICE_MIMES: ReadonlySet<string> = new Set([\n 'application/msword',\n 'application/vnd.ms-excel',\n 'application/vnd.ms-powerpoint',\n]);\n\n/**\n * Largest total of UNCOMPRESSED bytes this module will decompress out of one archive.\n *\n * A ZIP bomb is a real upload, not a hypothetical: a few hundred kilobytes can declare gigabytes,\n * and `unzipSync` would allocate every one of them before anything else could refuse. The cap is\n * applied from the central directory's declared sizes — BEFORE decompression — which is the only\n * point at which refusing is still cheap.\n *\n * 64 MiB because it is far above any genuine document's XML (a 500-page manuscript's\n * `document.xml` is single-digit megabytes) and far below a size that could exhaust a backend\n * serving many uploads at once.\n */\nconst MAX_TOTAL_UNCOMPRESSED_BYTES = 64 * 1024 * 1024;\n\n/** Bound on entries INSPECTED, so a pathological central directory cannot make the filter itself the attack. */\nconst MAX_ARCHIVE_ENTRIES = 4096;\n\n/**\n * Element names after which the walker emits a line break.\n *\n * ONE union across both families rather than a per-format table, because the walker never needs to\n * know which format it is reading — it needs to know which elements END A BLOCK, and the six\n * formats disagree only about spelling:\n *\n * - `w:p` / `w:tr` — WordprocessingML paragraph and table row\n * - `a:p` — DrawingML paragraph (every `.pptx` text frame)\n * - `text:p` / `text:h` / `text:table-row` — OpenDocument paragraph, heading, table row\n * - `si` / `c` — SpreadsheetML shared-string item and cell: one line per value, which is what\n * makes a sheet read as a list of values rather than one unbroken string\n */\nconst BLOCK_ELEMENT_NAMES: ReadonlySet<string> = new Set([\n 'w:p', 'w:tr',\n 'a:p',\n 'text:p', 'text:h', 'text:table-row',\n 'si', 'c',\n]);\n\n/** Why a local extraction could not be produced. The service maps these onto its own failure classes. */\nexport enum OfficeDocumentExtractionFailure {\n /** The bytes are not a readable ZIP container — a truncated upload, or a file whose extension lies. */\n UNREADABLE_CONTAINER = 'UNREADABLE_CONTAINER',\n /** A readable archive that declares more uncompressed bytes than {@link MAX_TOTAL_UNCOMPRESSED_BYTES}. */\n ARCHIVE_TOO_LARGE = 'ARCHIVE_TOO_LARGE',\n /**\n * A readable archive with none of the XML parts this format keeps its text in. Almost always a\n * mislabelled file — a `.zip` renamed, or a `.docx` MIME on something else entirely.\n */\n NO_TEXT_PARTS = 'NO_TEXT_PARTS',\n}\n\nexport class OfficeDocumentExtractionError extends Error {\n constructor(readonly failure: OfficeDocumentExtractionFailure, message: string, readonly cause?: unknown) {\n super(message);\n this.name = 'OfficeDocumentExtractionError';\n }\n}\n\nexport interface OfficeDocumentExtraction {\n readonly text: string;\n /** How many XML parts contributed — slides, sheets, or the single `content.xml`. Reported as `pageCount`. */\n readonly partCount: number;\n}\n\n/**\n * Which XML parts inside the archive hold this format's text, and in what order.\n *\n * Returned as a MATCHER plus a sort key rather than a fixed list, because two of the six formats\n * hold their text in an unbounded numbered series (`slide1.xml` … `slideN.xml`) whose members are\n * only known once the archive is open.\n */\ninterface TextPartSelector {\n readonly matches: (entryName: string) => boolean;\n /** Ordering rank. Lower sorts first; ties fall back to a NUMERIC name comparison. */\n readonly rank: (entryName: string) => number;\n}\n\nfunction selectorFor(mimeType: string): TextPartSelector {\n switch (mimeType) {\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n /*\n * Body first, then notes. Headers and footers are deliberately EXCLUDED: they repeat on every\n * page, so including them multiplies one boilerplate line by the page count and hands the\n * corpus a phrase that retrieves against everything.\n */\n return {\n matches: (name) => name === 'word/document.xml' || name === 'word/footnotes.xml' || name === 'word/endnotes.xml',\n rank: (name) => (name === 'word/document.xml' ? 0 : 1),\n };\n\n case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':\n /*\n * Slides, then speaker notes. Notes are included because they routinely carry the substance a\n * slide only gestures at — the sentence a presenter says out loud is often the one worth\n * retrieving.\n */\n return {\n matches: (name) => /^ppt\\/(slides\\/slide|notesSlides\\/notesSlide)\\d+\\.xml$/u.test(name),\n rank: (name) => (name.startsWith('ppt/slides/') ? 0 : 1),\n };\n\n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\n /*\n * Shared strings FIRST, then the sheets. In SpreadsheetML most cell text is de-duplicated into\n * `sharedStrings.xml` and referenced by index from the sheet, so the shared table IS the\n * document's prose; the sheets add inline strings and the numbers' surrounding structure.\n *\n * The index indirection is deliberately NOT resolved. Reading both parts yields every string\n * once, which is what a corpus needs; rebuilding each cell's value in place would reproduce\n * the spreadsheet, not its text, and would repeat every shared string once per use.\n */\n return {\n matches: (name) => name === 'xl/sharedStrings.xml' || /^xl\\/worksheets\\/sheet\\d+\\.xml$/u.test(name),\n rank: (name) => (name === 'xl/sharedStrings.xml' ? 0 : 1),\n };\n\n default:\n // Every OpenDocument format keeps its whole body in one `content.xml` — which is why the\n // three of them need no branch between them.\n return { matches: (name) => name === 'content.xml', rank: () => 0 };\n }\n}\n\n/** Numeric-aware comparison, so `slide2.xml` precedes `slide10.xml` rather than following it. */\nfunction compareNumericallyWithinRank(left: string, right: string): number {\n return left.localeCompare(right, 'en', { numeric: true });\n}\n\n/**\n * Walk a `preserveOrder` parse tree, appending every text node and breaking lines at block\n * boundaries.\n *\n * `preserveOrder` is what makes this correct rather than approximate: the parser emits an ARRAY of\n * single-key objects in document order, so text that is interleaved between child elements — which\n * is every run in a Word paragraph — arrives in the order a reader would meet it. The default\n * (unordered) shape collapses repeated siblings into arrays keyed by tag name and loses the\n * interleaving entirely, which silently reorders every sentence containing formatting.\n */\nfunction collectText(node: unknown, out: string[]): void {\n if (Array.isArray(node)) {\n for (const child of node) {\n collectText(child, out);\n }\n return;\n }\n if (typeof node !== 'object' || node === null) {\n return;\n }\n\n for (const [name, value] of Object.entries(node as Record<string, unknown>)) {\n if (name === '#text') {\n // `trimValues: false` keeps the intra-run spacing that separates words across formatting\n // boundaries — trimming here is what turns \"the <b>quick</b> fox\" into \"thequickfox\".\n if (typeof value === 'string' && value.length > 0) {\n out.push(value);\n }\n continue;\n }\n collectText(value, out);\n if (BLOCK_ELEMENT_NAMES.has(name)) {\n out.push('\\n');\n }\n }\n}\n\n/**\n * Extract the text of one OOXML or OpenDocument file.\n *\n * Throws {@link OfficeDocumentExtractionError} rather than returning an empty string for a document\n * it could not read: an empty corpus and an unreadable file are different facts, and the caller\n * classifies them differently — one is \"this document has no text\", the other is \"these bytes are\n * not what they claim to be\".\n */\nexport async function extractOfficeDocumentText(\n document: Buffer,\n mimeType: string,\n): Promise<OfficeDocumentExtraction> {\n // Dynamic, matching how `pdfjs-dist` is loaded for PDF: both are installed dependencies that only\n // a file-extraction call needs, and neither belongs on the boot path of every backend process.\n const [{ unzipSync }, { XMLParser }] = await Promise.all([\n import('fflate'),\n import('fast-xml-parser'),\n ]);\n\n const selector = selectorFor(mimeType);\n\n let declaredBytes = 0;\n let inspectedEntries = 0;\n let entries: Record<string, Uint8Array>;\n try {\n entries = unzipSync(new Uint8Array(document), {\n filter: (file) => {\n inspectedEntries += 1;\n if (inspectedEntries > MAX_ARCHIVE_ENTRIES) {\n throw new OfficeDocumentExtractionError(\n OfficeDocumentExtractionFailure.ARCHIVE_TOO_LARGE,\n `Archive declares more than ${MAX_ARCHIVE_ENTRIES} entries`,\n );\n }\n if (!selector.matches(file.name)) {\n return false;\n }\n /*\n * `originalSize` comes from the central directory, so this refuses BEFORE the bytes are\n * allocated. Checking after decompression would be checking after the damage.\n */\n declaredBytes += file.originalSize;\n if (declaredBytes > MAX_TOTAL_UNCOMPRESSED_BYTES) {\n throw new OfficeDocumentExtractionError(\n OfficeDocumentExtractionFailure.ARCHIVE_TOO_LARGE,\n `Archive declares ${declaredBytes} uncompressed bytes across its text parts, above the ${MAX_TOTAL_UNCOMPRESSED_BYTES} limit`,\n );\n }\n return true;\n },\n });\n } catch (cause) {\n if (cause instanceof OfficeDocumentExtractionError) {\n throw cause;\n }\n throw new OfficeDocumentExtractionError(\n OfficeDocumentExtractionFailure.UNREADABLE_CONTAINER,\n 'The document is not a readable ZIP container',\n cause,\n );\n }\n\n const partNames = Object.keys(entries).sort(\n (left, right) => selector.rank(left) - selector.rank(right) || compareNumericallyWithinRank(left, right),\n );\n\n if (partNames.length === 0) {\n throw new OfficeDocumentExtractionError(\n OfficeDocumentExtractionFailure.NO_TEXT_PARTS,\n `The archive holds none of the XML parts a ${mimeType} keeps its text in`,\n );\n }\n\n const parser = new XMLParser({\n preserveOrder: true,\n // Attributes carry no prose. Ignoring them also keeps the walker from having to skip the\n // parser's `:@` attribute nodes, which would otherwise be indistinguishable from elements.\n ignoreAttributes: true,\n trimValues: false,\n // XML's five predefined entities and numeric references are what a `&` in a document body\n // arrives as; without this the corpus carries the escape rather than the character.\n processEntities: true,\n });\n\n const decoder = new TextDecoder('utf-8');\n const pieces: string[] = [];\n for (const partName of partNames) {\n collectText(parser.parse(decoder.decode(entries[partName]!)), pieces);\n // A part boundary is a block boundary: the last paragraph of one slide must not run into the\n // first of the next.\n pieces.push('\\n');\n }\n\n /*\n * Collapse the runs of blank lines the block breaks produce — a Word paragraph inside a table row\n * closes both, and an empty paragraph closes one around nothing. Left alone, a document with any\n * table structure arrives as more newlines than text, and the chunker then splits on them.\n */\n const text = pieces\n .join('')\n .replace(/[ \\t]+\\n/gu, '\\n')\n .replace(/\\n{3,}/gu, '\\n\\n')\n .trim();\n\n return { text, partCount: partNames.length };\n}\n"]}
|
package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts
CHANGED
|
@@ -20,6 +20,21 @@
|
|
|
20
20
|
* the lease is refreshed on a heartbeat, the row is not. So `updatedAt` is used purely
|
|
21
21
|
* to avoid a Redis lookup per non-terminal row; the LEASE decides. Treating an old
|
|
22
22
|
* timestamp as proof of abandonment would kill healthy long-running work.
|
|
23
|
+
*
|
|
24
|
+
* ## Why a missing lease is not, on its own, the verdict either
|
|
25
|
+
*
|
|
26
|
+
* The lease decides only when its ABSENCE can be explained. A pod whose own Redis writes are
|
|
27
|
+
* failing produces a turn that is running perfectly and has no lease, and from this pod that is
|
|
28
|
+
* indistinguishable from a pod that died — while `isLeaseMechanismWritable` above, which is
|
|
29
|
+
* evaluated HERE, sees nothing wrong. Recording FAILED on such a row makes a false reading
|
|
30
|
+
* permanent, and until the reclaim path in `advanceTask` there was no way back at all.
|
|
31
|
+
*
|
|
32
|
+
* So each candidate's missing lease has to explain itself before this batch acts on it
|
|
33
|
+
* (`corroborateAbandonment` → {@link A2A_AbandonmentEvidence}): a lease that demonstrably existed
|
|
34
|
+
* and lapsed is a verdict on the first pass, an unexplained absence has to still be there a full
|
|
35
|
+
* sweep period later, and an enquiry that failed outright is never counted as either. The cost is
|
|
36
|
+
* an hour's delay for the rare row whose establishment marker has expired; the benefit is that no
|
|
37
|
+
* single unexplainable reading can end a live turn.
|
|
23
38
|
*/
|
|
24
39
|
import { createCustomBatchExecutionService } from '../../../base-classes/services/batches/batches-cronjobs-custom-execution.service';
|
|
25
40
|
export declare function createA2AAbandonedTaskSweepBatch(): ReturnType<typeof createCustomBatchExecutionService>;
|
package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a-abandoned-task-sweep.batch.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"a2a-abandoned-task-sweep.batch.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAUH,OAAO,EAAE,iCAAiC,EAAE,MAAM,4FAA4F,CAAC;AA6D/I,wBAAgB,gCAAgC,IAAI,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAgNvG"}
|
|
@@ -20,6 +20,21 @@
|
|
|
20
20
|
* the lease is refreshed on a heartbeat, the row is not. So `updatedAt` is used purely
|
|
21
21
|
* to avoid a Redis lookup per non-terminal row; the LEASE decides. Treating an old
|
|
22
22
|
* timestamp as proof of abandonment would kill healthy long-running work.
|
|
23
|
+
*
|
|
24
|
+
* ## Why a missing lease is not, on its own, the verdict either
|
|
25
|
+
*
|
|
26
|
+
* The lease decides only when its ABSENCE can be explained. A pod whose own Redis writes are
|
|
27
|
+
* failing produces a turn that is running perfectly and has no lease, and from this pod that is
|
|
28
|
+
* indistinguishable from a pod that died — while `isLeaseMechanismWritable` above, which is
|
|
29
|
+
* evaluated HERE, sees nothing wrong. Recording FAILED on such a row makes a false reading
|
|
30
|
+
* permanent, and until the reclaim path in `advanceTask` there was no way back at all.
|
|
31
|
+
*
|
|
32
|
+
* So each candidate's missing lease has to explain itself before this batch acts on it
|
|
33
|
+
* (`corroborateAbandonment` → {@link A2A_AbandonmentEvidence}): a lease that demonstrably existed
|
|
34
|
+
* and lapsed is a verdict on the first pass, an unexplained absence has to still be there a full
|
|
35
|
+
* sweep period later, and an enquiry that failed outright is never counted as either. The cost is
|
|
36
|
+
* an hour's delay for the rare row whose establishment marker has expired; the benefit is that no
|
|
37
|
+
* single unexplainable reading can end a live turn.
|
|
23
38
|
*/
|
|
24
39
|
import { z } from 'zod';
|
|
25
40
|
import { CoreResourceType, FlowsActors_Status, } from '@wildo-ai/saas-models';
|
|
@@ -28,7 +43,7 @@ import { ENGINE_A2A_ABANDONED_TASK_SWEEP_BATCH_MANIFEST } from '../../../base-cl
|
|
|
28
43
|
import { SAAS_SERVICE_TYPES } from '../../../inject/models/service-types.js';
|
|
29
44
|
import { projectCaughtErrorLogFields } from '../../../errors/utils/error-log-level-classification.backend.utils.js';
|
|
30
45
|
import { A2A_TASK_LEASE_TTL_SECONDS } from '../../../flows-actors/a2a/services/a2a-task-cancellation.backend.service.js';
|
|
31
|
-
import { isLivenessGovernedA2ATaskStatus, LIVENESS_GOVERNED_TASK_STATUSES, } from '../../../flows-actors/a2a/models/a2a.backend.schemas.js';
|
|
46
|
+
import { A2A_AbandonmentEvidence, abandonmentEvidenceIsAVerdict, isLivenessGovernedA2ATaskStatus, LIVENESS_GOVERNED_TASK_STATUSES, } from '../../../flows-actors/a2a/models/a2a.backend.schemas.js';
|
|
32
47
|
/**
|
|
33
48
|
* Only rows untouched for several lease periods are even considered. Generous on
|
|
34
49
|
* purpose: the cost of waiting one more cycle to repair a dead row is nil, while the
|
|
@@ -59,6 +74,18 @@ const A2AAbandonedTaskSweepOutputSchema = z.object({
|
|
|
59
74
|
stillAlive: z.number(),
|
|
60
75
|
/** Rows that reached a terminal state between the listing and the repair — NOT repairs. */
|
|
61
76
|
raced: z.number(),
|
|
77
|
+
/**
|
|
78
|
+
* Rows whose missing lease could not yet be explained, and whose absence this run RECORDED so a
|
|
79
|
+
* later one can corroborate it. Counted apart from `markedFailed` for the same reason `raced`
|
|
80
|
+
* is: reporting an enquiry as a repair is claiming work that did not happen.
|
|
81
|
+
*/
|
|
82
|
+
awaitingCorroboration: z.number(),
|
|
83
|
+
/**
|
|
84
|
+
* Rows about which this run learned NOTHING — the enquiry itself failed. Distinct from
|
|
85
|
+
* `awaitingCorroboration`, which made progress toward a verdict; a run that is mostly this is a
|
|
86
|
+
* degraded run, not a quiet one.
|
|
87
|
+
*/
|
|
88
|
+
undetermined: z.number(),
|
|
62
89
|
});
|
|
63
90
|
export function createA2AAbandonedTaskSweepBatch() {
|
|
64
91
|
return createCustomBatchExecutionService({
|
|
@@ -83,6 +110,12 @@ export function createA2AAbandonedTaskSweepBatch() {
|
|
|
83
110
|
// because they are NOT repairs — counting them in `markedFailed` is how a sweep claims work
|
|
84
111
|
// it did not do, which is the same dishonesty the no-match log exists to prevent.
|
|
85
112
|
let raced = 0;
|
|
113
|
+
// Rows this run declined to judge, split by WHY. Two counters, not one, because the two
|
|
114
|
+
// want opposite reactions: a run full of `awaitingCorroboration` is working as designed and
|
|
115
|
+
// will decide next hour, while a run full of `undetermined` is one whose liveness enquiry is
|
|
116
|
+
// itself broken and will never decide anything.
|
|
117
|
+
let awaitingCorroboration = 0;
|
|
118
|
+
let undetermined = 0;
|
|
86
119
|
// ── ABSTAIN when the liveness signal cannot be trusted (review finding A3-4) ───────────
|
|
87
120
|
//
|
|
88
121
|
// This batch is the ONLY consumer that converts a liveness answer into a durable terminal
|
|
@@ -98,7 +131,7 @@ export function createA2AAbandonedTaskSweepBatch() {
|
|
|
98
131
|
logger.warn('[A2ATaskSweep] Skipping the run: the task-lease mechanism is not writable, so liveness cannot be trusted', {
|
|
99
132
|
consequence: 'abandoned tasks stay unrepaired until a later run; derive-on-read still reports them as failed',
|
|
100
133
|
});
|
|
101
|
-
return { scanned: 0, markedFailed: 0, stillAlive: 0, raced: 0 };
|
|
134
|
+
return { scanned: 0, markedFailed: 0, stillAlive: 0, raced: 0, awaitingCorroboration: 0, undetermined: 0 };
|
|
102
135
|
}
|
|
103
136
|
const cutoff = new Date(Date.now() - ABANDONMENT_GRACE_MS);
|
|
104
137
|
for (const resourceType of TASK_VARIANTS) {
|
|
@@ -139,6 +172,40 @@ export function createA2AAbandonedTaskSweepBatch() {
|
|
|
139
172
|
stillAlive += 1;
|
|
140
173
|
continue;
|
|
141
174
|
}
|
|
175
|
+
// ── "No lease" is not yet a VERDICT (review finding S-1a) ──────────────────────────
|
|
176
|
+
//
|
|
177
|
+
// The fleet-wide `isLeaseMechanismWritable` gate above is evaluated on THIS pod. A
|
|
178
|
+
// per-pod failure — the EXECUTING pod's Redis connection is broken while the sweep's is
|
|
179
|
+
// fine — passes it untouched: `isTurnAlive` then truthfully reports no lease for a turn
|
|
180
|
+
// that is running perfectly well, and everything below would record that durably. The
|
|
181
|
+
// owning pod does log the fact, but it logs it on the pod nobody here is reading.
|
|
182
|
+
//
|
|
183
|
+
// So the absence has to explain itself before it is acted on. `LEASE_LAPSED` means the
|
|
184
|
+
// lease demonstrably existed and stopped — a pod held this work and died, which is this
|
|
185
|
+
// batch's whole purpose and is repaired on the first pass, exactly as before.
|
|
186
|
+
// `CORROBORATED_ABSENCE` means a previous run saw the same unexplained absence and it is
|
|
187
|
+
// still there a full sweep period later, which no merely-failed write survives. Anything
|
|
188
|
+
// else is an enquiry, not an answer, and an enquiry must never become a terminal status.
|
|
189
|
+
const evidence = await cancellation.corroborateAbandonment(task.taskId);
|
|
190
|
+
if (!abandonmentEvidenceIsAVerdict(evidence)) {
|
|
191
|
+
// Note what is NOT done here: no broadcast. Cancelling on an unexplained absence would
|
|
192
|
+
// destroy the very turn this abstention exists to protect, and the broadcast below is
|
|
193
|
+
// deliberately paired with the durable write rather than with the observation.
|
|
194
|
+
if (evidence === A2A_AbandonmentEvidence.FIRST_ABSENCE) {
|
|
195
|
+
awaitingCorroboration += 1;
|
|
196
|
+
logger.info('[A2ATaskSweep] A task has no lease and no record of ever having had one; left alone pending corroboration', {
|
|
197
|
+
taskId: task.taskId,
|
|
198
|
+
consequence: 'if the absence is still there next run it is repaired; if the owning pod was merely unable to write, its next heartbeat clears this',
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
undetermined += 1;
|
|
203
|
+
logger.warn('[A2ATaskSweep] Could not establish why a task has no lease; nothing was learned and nothing was recorded', {
|
|
204
|
+
taskId: task.taskId, evidence,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
142
209
|
// Site 2 of 2 for "a cancellation is broadcast whenever cancellation is requested"
|
|
143
210
|
// (review finding G7-2). The sweep is about to DECLARE this turn dead. If it is not
|
|
144
211
|
// actually dead — the lease could be missing because a write failed, or because the
|
|
@@ -175,6 +242,11 @@ export function createA2AAbandonedTaskSweepBatch() {
|
|
|
175
242
|
const repaired = await systemAccess.updateAsSystem(resourceType, { taskId: task.taskId, status: { $in: SWEEPABLE_STATUSES } }, { status: FlowsActors_Status.FAILED, finishedAt: new Date() });
|
|
176
243
|
if (repaired) {
|
|
177
244
|
markedFailed += 1;
|
|
245
|
+
// The EVIDENCE is carried into the record of the repair, not just the fact of it. A
|
|
246
|
+
// run whose repairs are all `corroborated-absence` is telling an operator that turns
|
|
247
|
+
// are being killed on the weaker of the two verdicts — which is the signal that a
|
|
248
|
+
// pod somewhere cannot write its leases, and the only place that shows.
|
|
249
|
+
logger.info('[A2ATaskSweep] Repaired an abandoned task', { taskId: task.taskId, evidence });
|
|
178
250
|
}
|
|
179
251
|
else {
|
|
180
252
|
// A no-match is now AMBIGUOUS and the two causes want opposite reactions, so it is
|
|
@@ -203,9 +275,8 @@ export function createA2AAbandonedTaskSweepBatch() {
|
|
|
203
275
|
}
|
|
204
276
|
// Logged unconditionally, including the zero case: a sweep that silently finds
|
|
205
277
|
// nothing is indistinguishable from a sweep that silently stopped running.
|
|
206
|
-
logger.info('[A2ATaskSweep]
|
|
207
|
-
|
|
208
|
-
return { scanned, markedFailed, stillAlive, raced };
|
|
278
|
+
logger.info('[A2ATaskSweep] Sweep complete', { scanned, markedFailed, stillAlive, raced, awaitingCorroboration, undetermined });
|
|
279
|
+
return { scanned, markedFailed, stillAlive, raced, awaitingCorroboration, undetermined };
|
|
209
280
|
},
|
|
210
281
|
});
|
|
211
282
|
}
|