@wildo-ai/saas-backend-lib 1.1.2 → 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.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +27 -6
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.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 +47 -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 +96 -29
- 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/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +9 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +49 -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 +171 -18
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +23 -3
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +20 -0
- 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-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 +529 -41
- 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 +48 -7
- 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 +225 -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 +340 -62
- 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 +244 -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 +386 -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 +6 -2
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +31 -9
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
- 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 +57 -1
- 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 +31 -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/models/app-config.backend.schemas.d.ts +142 -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 +33 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +39 -1
- 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/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/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 +129 -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/external-data-pipeline-run.backend.service.d.ts +59 -2
- 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 +52 -17
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.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 +292 -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 +533 -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.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +21 -13
- package/dist/esm/files/controllers/file.controller.js.map +1 -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 +39 -15
- package/dist/esm/files/handlers/resource-file-upload-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 +53 -2
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.js +127 -3
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts +68 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +175 -5
- 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/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 +196 -40
- 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 +28 -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 +204 -18
- 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.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +8 -4
- 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 +11 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -4
- 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 +78 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +17 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +19 -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 +20 -0
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +56 -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 +107 -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.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +22 -0
- 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 +99 -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 +422 -66
- 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 +46 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -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 +16 -6
- 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 +12 -12
- 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/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 +32 -8
- 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 +14 -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/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 +90 -6
- 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/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 +19 -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 +261 -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/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.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +68 -1
- 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-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 +17 -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 +49 -17
- 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/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/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 +74 -8
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +175 -19
- 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/services/consumable-token.backend.service.d.ts +21 -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 +26 -16
- 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/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 +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-tools.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/function-tools.backend.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAA2D,MAAM,uBAAuB,CAAC;AAEvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,wGAAwG,CAAC;AA+GlJ,4FAA4F;AAC5F,SAAS,YAAY,CAAC,MAAe,EAAE,KAAa;IAClD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;IAC5E,CAAC;IACD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAE,MAA8B,CAAC,IAAI,CAAC,EAAE,CAAC;QACpH,MAAM,KAAK,GAAG,MAAmD,CAAC;QAClE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;IAClH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACtB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAA0B,EAC1B,OAAkG;IAElG,0EAA0E;IAC1E,MAAM,YAAY,GAAG,OAAO,EAAE,YAAY,IAAI,EAAE,CAAC;IACjD,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,GAAG,CAAC;IAE1C,OAAO;QACL,WAAW,EAA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,GAAG,MAAM,uBAAuB,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;gBAC7E,0FAA0F;gBAC1F,8FAA8F;gBAC9F,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;YAED,iFAAiF;YACjF,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,IAAuB,CAAC;YACjD,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9C,MAAM,IAAI,KAAK,CACb,qBAAqB,YAAY,kFAAkF,CACpH,CAAC;YACJ,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAClF,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { z } from 'zod';\nimport { CoreResourceOperation, type ResourceType, type ResourceConfiguration_Operation } from '@wildo-ai/saas-models';\n\nimport { toResponseSafeToolOutput } from '~wildo-backend-lib/base-classes/services/controllers/utils/operation-response-serializer.backend.utils';\nimport type { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n/**\n * Function-Tool Contract (backend)\n * ================================\n *\n * An executable tool an AI agent can call during an invocation (the runtime\n * behind an agent's declarative `capabilities.tools.functionRefs`). Unlike the\n * shared agent/system schemas, a `FunctionTool` carries backend execution logic,\n * so it lives in `saas-backend-lib`, not `saas-models`.\n *\n * Tools are registered per-application through\n * `BackendDomainModule.flowsActors.functionTools`, indexed by `functionRef` in\n * the `FlowsActorsRegistryService`, and resolved + wired into the AI-SDK `tools`\n * parameter by `AgentsBackendService` when a streaming invocation runs. The\n * engine supplies the execution *context* (caller identity + backend services)\n * at call time; the tool itself stays a pure, reusable declaration.\n */\n\n/** Backend services a tool may use at execution time (supplied by the caller). */\nexport interface FunctionToolExecutionServices {\n resourcesRegistry: ResourcesRegistryBackendService;\n servicesRegistryHandler: ServicesRegistryHandlerBackendService;\n executionContextCreator: ExecutionContextCreatorBackendService;\n}\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.function-tool facet:layer:backend facet:family:flows-actors\n *\n * Execution context threaded into every tool call. Carries the CALLER's verified\n * identity (`auth`) so a tool reads/writes as the user with the user's own\n * visibility — never trusting LLM-supplied identity — plus the backend services\n * the tool may use. The engine supplies this at call time; a tool never fabricates\n * identity from the model's arguments.\n *\n * Import path: `@wildo-ai/saas-backend-lib`.\n */\nexport interface FunctionToolExecutionContext {\n /** The authenticated caller (server-verified identity + roles). */\n auth: SocketAuthResult;\n /** Active organization scope for the call, when applicable. */\n organizationId?: string;\n /** Backend services the tool may use. */\n services: FunctionToolExecutionServices;\n}\n\n/**\n * A single agent-callable tool (grounding / action an agent can invoke).\n *\n * Register instances on a backend module's `flowsActors.functionTools`; reference\n * one from an agent's `capabilities.tools.functionRefs` by its `functionRef`. The\n * engine resolves each declared ref into an AI-SDK tool at invocation time and\n * calls `execute(args, context)` with the caller's {@link FunctionToolExecutionContext}\n * (so the tool acts as the user, with the user's own visibility). For reading a\n * resource, prefer the `resourceReadTool(resourceType)` factory over a hand-written\n * tool. Import path: `@wildo-ai/saas-backend-lib`.\n *\n * @example\n * // a custom tool\n * const echoTool: FunctionTool = {\n * functionRef: 'demo.echo',\n * description: 'Echo the provided text back.',\n * inputSchema: z.object({ text: z.string() }),\n * execute: async (args) => ({ echoed: args.text }),\n * };\n */\nexport interface FunctionTool {\n /** Stable id referenced from `agent.capabilities.tools.functionRefs`. */\n functionRef: string;\n /** Natural-language description shown to the model (what the tool does + when). */\n description: string;\n /** Zod schema of the tool's arguments (surfaced to the model). */\n inputSchema: z.ZodTypeAny;\n /** Execute the tool with validated args under the caller's context. */\n execute: (args: any, context: FunctionToolExecutionContext) => Promise<unknown>;\n /**\n * Require a HUMAN decision before this tool runs (human-in-the-loop).\n *\n * When set, a turn that reaches this tool SUSPENDS instead of executing it: the run state is\n * persisted, the execution moves to `AWAITING_APPROVAL`, and the caller is asked to approve or\n * deny. Approving resumes the turn and runs the tool; denying resumes it and tells the model the\n * call was refused, so the agent can respond rather than silently stalling.\n *\n * Declare it on tools whose effect a person should authorise — sending money, emailing a\n * customer, deleting at scale — not on reads.\n *\n * ⚠️ Two things worth knowing before you set this:\n *\n * 1. **It requires a configured approval secret.** Approval decisions are HMAC-signed so a client\n * cannot forge one. A turn that would expose an approval-gated tool with no secret configured\n * REFUSES TO RUN rather than falling back to unsigned approvals — the tools someone bothered to\n * gate are exactly the ones where a forged approval matters most.\n * 2. **This is Wildo's declaration, not the model SDK's.** The engine translates it into the\n * SDK's call-level approval configuration. Do not reach for the SDK's own tool-level\n * `needsApproval`: it is deprecated, and approval is handled at the call level now.\n */\n requiresHumanApproval?: boolean;\n}\n/** @wildo_source:part:end saas.backend.flows-actors.function-tool */\n\n/** Uniform, model-facing result shape for read tools. */\ninterface ResourceReadToolResult {\n data: unknown[];\n pagination?: unknown;\n truncated?: boolean;\n}\n\n/** Normalize a handler list/search result (array or paginated) to the tool result shape. */\nfunction toReadResult(result: unknown, limit: number): ResourceReadToolResult {\n if (Array.isArray(result)) {\n return { data: result.slice(0, limit), truncated: result.length > limit };\n }\n if (result && typeof result === 'object' && 'data' in result && Array.isArray((result as { data: unknown[] }).data)) {\n const paged = result as { data: unknown[]; pagination?: unknown };\n return { data: paged.data.slice(0, limit), pagination: paged.pagination, truncated: paged.data.length > limit };\n }\n return { data: [] };\n}\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.resource-read-tool facet:layer:backend facet:family:flows-actors\n *\n * Generic resource-read tool factory. Produces a {@link FunctionTool} that lets\n * an agent look up records of ONE resource type **scoped to the calling user**,\n * with that user's own visibility — no `systemAccessPolicy` bypass. Instantiate\n * it per resource an agent should be able to read (e.g. `resourceReadTool(TODOS)`),\n * making any registered resource agent-readable without hand-writing a tool.\n *\n * The tool reads through the normal service path under a user `ExecutionContext`\n * rebuilt from the caller's socket auth, so the framework's contextual filter +\n * role ACL apply exactly as for the user's own request. Identity is NEVER taken\n * from the model — only the `searchQuery` / `limit` args are. Its `functionRef`\n * defaults to `resource.<resourceType>.read` — reference that exact string from\n * your agent's `capabilities.tools.functionRefs`. Import path:\n * `@wildo-ai/saas-backend-lib`.\n *\n * @param resourceType the resource to expose (any registered `ResourceType`).\n * @param options optional `functionRef` / `description` / `defaultLimit` / `maxLimit` overrides.\n * @example\n * // in a backend module's `flowsActors.functionTools` contribution:\n * functionTools: [resourceReadTool(TasksManager_ResourceType.TODOS)]\n * // and on the agent:\n * capabilities: { tools: { functionRefs: ['resource.todos.read'], mcpRefs: [] } }\n */\nexport function resourceReadTool(\n resourceType: ResourceType,\n options?: { functionRef?: string; description?: string; defaultLimit?: number; maxLimit?: number },\n): FunctionTool {\n /** @wildo_source:part:end saas.backend.flows-actors.resource-read-tool */\n const defaultLimit = options?.defaultLimit ?? 50;\n const maxLimit = options?.maxLimit ?? 100;\n\n return {\n functionRef: options?.functionRef ?? `resource.${resourceType}.read`,\n description:\n options?.description ??\n `Look up the current user's \"${resourceType}\" records to answer their questions about them. ` +\n `Optionally pass a free-text searchQuery to narrow the results. Only the current user's own records are ever returned.`,\n inputSchema: z.object({\n searchQuery: z.string().optional(),\n limit: z.number().int().min(1).max(maxLimit).optional(),\n }),\n execute: async (args: { searchQuery?: string; limit?: number }, ctx: FunctionToolExecutionContext): Promise<ResourceReadToolResult> => {\n const { resourcesRegistry, servicesRegistryHandler, executionContextCreator } = ctx.services;\n const limit = typeof args?.limit === 'number' ? Math.min(args.limit, maxLimit) : defaultLimit;\n const searchQuery = typeof args?.searchQuery === 'string' && args.searchQuery.trim().length > 0 ? args.searchQuery.trim() : undefined;\n const contextIds: Record<string, string> = ctx.organizationId ? { organizationId: ctx.organizationId } : {};\n\n // Prefer SEARCH when a query is supplied AND the resource supports it; fall\n // back to a scoped LIST. Both run as the user (no ACL bypass).\n if (searchQuery) {\n // The fallback catch covers ONLY op-resolution + the search call — a resource may have no\n // SEARCH operation, in which case we degrade to a scoped LIST. It deliberately does NOT wrap\n // the response-DTO projection below: a projection failure there is a real server contract\n // violation (a record that violates its own response DTO) and must surface as a tool error,\n // exactly as it would on the LIST path — never silently degrade to an unfiltered LIST.\n let searchOp: ResourceConfiguration_Operation<any, any, any> | undefined;\n let searchResult: unknown;\n try {\n searchOp = resourcesRegistry.getOperationFromPath(\n resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.SEARCH),\n );\n const searchEc = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, searchOp, contextIds);\n searchResult = await servicesRegistryHandler.search(resourceType, searchEc, searchQuery);\n } catch {\n searchOp = undefined; // Resource has no SEARCH operation (or it failed to resolve) — fall through to LIST.\n }\n if (searchOp !== undefined) {\n // Project through the SEARCH operation's response DTO + JSON wire step, exactly as the\n // REST controller does, so no `Date`/backend-only/secret field reaches the model.\n const safeSearchResult = await toResponseSafeToolOutput(searchOp, searchResult);\n return toReadResult(safeSearchResult, limit);\n }\n }\n\n const listOp = resourcesRegistry.getOperationFromPath(\n resourcesRegistry.getServiceOperationPathDefault(resourceType, CoreResourceOperation.LIST),\n );\n const listEc = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, listOp, contextIds);\n // `paginated: true` yields the `{ data, pagination }` envelope the LIST response DTO expects\n // (the same shape the HTTP controller requests) — a bare array would fail the wrapper-DTO\n // projection in `toResponseSafeToolOutput` below.\n const listResult = await servicesRegistryHandler.list(resourceType, listEc, undefined, { page: 1, limit }, { paginated: true });\n const safeListResult = await toResponseSafeToolOutput(listOp, listResult);\n return toReadResult(safeListResult, limit);\n },\n };\n}\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.resource-write-tool facet:layer:backend facet:family:flows-actors\n *\n * Generic resource-WRITE tool factory. The mutating sibling of {@link resourceReadTool}.\n * Produces a {@link FunctionTool} that lets an agent CREATE or UPDATE ONE resource\n * type **as the calling user**, under the caller's own `ExecutionContext` rebuilt\n * from their verified socket auth — no `systemAccessPolicy` bypass, and identity is\n * NEVER taken from the model. The resource's own CREATE / UPDATE `accessControl`\n * (roles + parent scope) is enforced by the service tier exactly as for the user's\n * own HTTP request, so authorization is **fail-closed**: a caller lacking the\n * operation's role gets a thrown authz error, not a silent write. Owner FKs and\n * other server-set fields are EC-injected / `excludeFromCreate`, so the model can\n * never spoof ownership through the tool arguments.\n *\n * Unlike the read tool (whose args are a fixed `{ searchQuery, limit }`), a write\n * tool's arguments are resource-specific, so the caller MUST supply the model-facing\n * `inputSchema` — the create/update field contract shown to the model. Keep it to the\n * fields the model should legitimately set. For `UPDATE`, include the record `id` in\n * the schema; the factory splits `id` out to address the row and passes the remaining\n * fields as the patch.\n *\n * `functionRef` defaults to `resource.<resourceType>.<op>` (e.g. `resource.todos.create`)\n * — reference that exact string from your agent's `capabilities.tools.functionRefs`.\n * Import path: `@wildo-ai/saas-backend-lib`.\n *\n * @param resourceType the resource to expose (any registered `ResourceType`).\n * @param op `CoreResourceOperation.CREATE` or `CoreResourceOperation.UPDATE`.\n * @param options `{ inputSchema, functionRef?, description? }` — `inputSchema` is REQUIRED (the model-facing argument contract).\n * @example\n * // in a backend module's `flowsActors.functionTools` contribution:\n * functionTools: [\n * resourceWriteTool(TasksManager_ResourceType.TODOS, CoreResourceOperation.CREATE, {\n * inputSchema: z.object({ title: z.string(), todoListId: z.string(), description: z.string().optional() }),\n * }),\n * ]\n * // and on the agent:\n * capabilities: { tools: { functionRefs: ['resource.todos.create'], mcpRefs: [] } }\n */\nexport function resourceWriteTool(\n resourceType: ResourceType,\n op: CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE,\n options: {\n inputSchema: z.ZodTypeAny;\n functionRef?: string;\n description?: string;\n /**\n * Gate this write behind a HUMAN decision (see {@link FunctionTool.requiresHumanApproval}).\n *\n * Without this passthrough the flag was declarable only by hand-rolling a `FunctionTool`, so\n * the approval gate was unreachable from the factory every app author actually uses — a\n * capability present in the contract and absent from the authoring surface. Reads are not\n * offered the option: approval exists to gate EFFECTS, and gating a read teaches authors to\n * approve things reflexively, which is how an approval prompt stops being read.\n */\n requiresHumanApproval?: boolean;\n },\n): FunctionTool {\n /** @wildo_source:part:end saas.backend.flows-actors.resource-write-tool */\n return {\n functionRef: options.functionRef ?? `resource.${resourceType}.${op}`,\n requiresHumanApproval: options.requiresHumanApproval,\n description:\n options.description ??\n (op === CoreResourceOperation.CREATE\n ? `Create a new \"${resourceType}\" record on behalf of the current user from the provided fields. The record is owned by and scoped to the current user; ownership fields are set by the system, not from the arguments.`\n : `Update an existing \"${resourceType}\" record the current user owns. Pass the record \"id\" plus only the fields to change.`),\n inputSchema: options.inputSchema,\n execute: async (args: Record<string, unknown>, ctx: FunctionToolExecutionContext): Promise<unknown> => {\n const { resourcesRegistry, servicesRegistryHandler, executionContextCreator } = ctx.services;\n const contextIds: Record<string, string> = ctx.organizationId ? { organizationId: ctx.organizationId } : {};\n\n // Rebuild a scoped ExecutionContext from the CALLER's verified auth for this\n // operation. The service tier then enforces the op's role + scope ACL against\n // this EC (fail-closed) — the write runs as the user, never with an ACL bypass.\n const operation = resourcesRegistry.getOperationFromPath(\n resourcesRegistry.getServiceOperationPathDefault(resourceType, op),\n );\n const ec = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, operation, contextIds);\n\n if (op === CoreResourceOperation.CREATE) {\n const created = await servicesRegistryHandler.create(resourceType, ec, args);\n // Return the same JSON-safe, response-DTO-projected record the REST endpoint would, so no\n // `Date`/backend-only/secret reaches the model and the tool-loop CONTINUATION step validates.\n return toResponseSafeToolOutput(operation, created);\n }\n\n // UPDATE: the record \"id\" addresses the row; the remaining fields are the patch.\n const { id, ...patch } = args as { id?: string };\n if (typeof id !== 'string' || id.length === 0) {\n throw new Error(\n `resourceWriteTool(${resourceType}, update): the \"id\" argument is required — declare it in the tool's inputSchema.`,\n );\n }\n const updated = await servicesRegistryHandler.update(resourceType, ec, id, patch);\n return toResponseSafeToolOutput(operation, updated);\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"function-tools.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/function-tools.backend.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,4BAA4B,EAC5B,kCAAkC,EAClC,mBAAmB,GAIpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,wGAAwG,CAAC;AAClJ,OAAO,EAAE,+BAA+B,EAAE,MAAM,mGAAmG,CAAC;AA6KpJ,4FAA4F;AAC5F,SAAS,YAAY,CAAC,MAAe,EAAE,KAAa;IAClD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;IAC5E,CAAC;IACD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAE,MAA8B,CAAC,IAAI,CAAC,EAAE,CAAC;QACpH,MAAM,KAAK,GAAG,MAAmD,CAAC;QAClE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,KA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AE,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAChE,6FAA6F;YAC7F,wEAAwE;YACxE,MAAM,gCAAgC,CAAC,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;YAEzE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,iBAAiB,CAAC,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;gBACpG,0FAA0F;gBAC1F,8FAA8F;gBAC9F,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;YAED,iFAAiF;YACjF,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,iBAAiB,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAC9F,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n CoreResourceOperation,\n ErrorType,\n ResourceOperationVariantType,\n ResourcesConfig_OperationPathUtils,\n isWildoBackendError,\n type ResourceType,\n type ResourceConfiguration_Operation,\n type ResourceConfiguration_OperationPath,\n} from '@wildo-ai/saas-models';\n\nimport { toResponseSafeToolOutput } from '~wildo-backend-lib/base-classes/services/controllers/utils/operation-response-serializer.backend.utils';\nimport { resolveDeclaredPolicySubjectKey } from '~wildo-backend-lib/security/authentications/services/utils/external-turn-rate-limit.backend.utils';\nimport type { AuthorizationsBackendService } from '~wildo-backend-lib/security/authorizations/services/authorizations.backend.service';\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport type { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport type { RateLimitBackendService } from '~wildo-backend-lib/errors/services/rate-limit.backend.service';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n/**\n * Function-Tool Contract (backend)\n * ================================\n *\n * An executable tool an AI agent can call during an invocation (the runtime\n * behind an agent's declarative `capabilities.tools.functionRefs`). Unlike the\n * shared agent/system schemas, a `FunctionTool` carries backend execution logic,\n * so it lives in `saas-backend-lib`, not `saas-models`.\n *\n * Tools are registered per-application through\n * `BackendDomainModule.flowsActors.functionTools`, indexed by `functionRef` in\n * the `FlowsActorsRegistryService`, and resolved + wired into the AI-SDK `tools`\n * parameter by `AgentsBackendService` when a streaming invocation runs. The\n * engine supplies the execution *context* (caller identity + backend services)\n * at call time; the tool itself stays a pure, reusable declaration.\n */\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.tool-dispatch-obligations facet:layer:backend facet:audience:app-developer\n *\n * Backend services a tool may use at execution time (supplied by the caller).\n *\n * ⚠️ **Two of these are OBLIGATIONS, not conveniences, for a hand-written tool that dispatches a\n * resource operation.**\n *\n * A tool enters at the SERVICE tier, bypassing Express — so the two gates that live on the HTTP\n * controller never run for it. `resourceReadTool` and `resourceWriteTool` discharge both on your\n * behalf. A tool you write yourself owes the same two calls:\n *\n * | gate | why the service tier does not apply it | what your tool must call |\n * |---|---|---|\n * | the operation's declared `roles` ACL | it is a CONTROLLER-tier gate; the service verbs deliberately apply no role check, because their dominant population is the authentication reads that run BEFORE a role-bearing principal exists | `ctx.services.authorizer.authorizeInController(...)` |\n * | the operation's authored `rateLimit?` policy | the declared policy's only other consumer is the HTTP controller pre-flight | `ctx.services.rateLimitService.checkPolicyForSubject(...)` |\n *\n * Both are on THIS interface for exactly that reason. The factories below wrap them in the private\n * helpers `authorizeToolDispatch` / `assertDeclaredOperationRateLimit`, which are module-scoped and\n * not importable — a hand-written tool calls the services directly.\n *\n * Skipping the first means a caller whose roles the operation REFUSES, but whose tenancy admits the\n * row, succeeds — the operation's `accessControl` simply unenforced on this plane. That is right for\n * a framework-internal caller and wrong here, where the caller is an external principal naming an\n * operation on their own authority.\n *\n * What you still get for free, on every tool: the repository's contextual filter in full — tenancy,\n * relationship narrowing, organization-unit narrowing, the anonymous guard and the retention hide,\n * all fail-closed — plus the whole operation pipeline of validation, enabled conditions, custom\n * implementation and hooks.\n */\nexport interface FunctionToolExecutionServices {\n resourcesRegistry: ResourcesRegistryBackendService;\n servicesRegistryHandler: ServicesRegistryHandlerBackendService;\n executionContextCreator: ExecutionContextCreatorBackendService;\n /**\n * Enforces an operation's OWN authored `rateLimit?` policy on this plane.\n *\n * Present because a tool DISPATCHES A RESOURCE OPERATION while bypassing Express, so the\n * declared policy's only other consumer — the HTTP controller pre-flight — never runs. A\n * hand-written {@link FunctionTool} that dispatches an operation itself owes the same charge —\n * call `checkPolicyForSubject(...)` on THIS service. (The factories below wrap it in the\n * module-private `assertDeclaredOperationRateLimit`, which is not importable from outside this\n * file; the service on this interface is the reachable path.)\n */\n rateLimitService: RateLimitBackendService;\n /**\n * Applies the dispatched operation's own declared `roles` ACL.\n *\n * Present because a tool enters at the SERVICE tier, and **the role gate is a CONTROLLER-tier\n * gate** — `ServicesRegistryHandlerBackendService`'s verbs apply the repository's contextual\n * filter and the whole operation pipeline, and deliberately apply no role check, because their\n * dominant population is the authentication reads that run before a role-bearing principal\n * exists. That is right for a framework-internal caller and wrong for this plane, whose caller is\n * an external principal (an A2A agent, or a user's own WebSocket) naming an operation on their\n * own authority. Without this the operation's `accessControl` was simply unenforced here: a\n * caller whose roles the operation refuses, but whose tenancy admits the row, succeeded.\n *\n * A hand-written {@link FunctionTool} that dispatches a resource operation owes the same call —\n * `authorizeInController(idOrIds, executionContext)` on THIS service. (The factories below wrap it\n * in the module-private `authorizeToolDispatch`, which is not importable from outside this file.)\n */\n authorizer: AuthorizationsBackendService;\n}\n/** @wildo_source:part:end saas.backend.flows-actors.tool-dispatch-obligations */\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.function-tool facet:layer:backend facet:family:flows-actors\n *\n * Execution context threaded into every tool call. Carries the CALLER's verified\n * identity (`auth`) so a tool reads/writes as the user with the user's own\n * visibility — never trusting LLM-supplied identity — plus the backend services\n * the tool may use. The engine supplies this at call time; a tool never fabricates\n * identity from the model's arguments.\n *\n * Import path: `@wildo-ai/saas-backend-lib`.\n */\nexport interface FunctionToolExecutionContext {\n /** The authenticated caller (server-verified identity + roles). */\n auth: SocketAuthResult;\n /** Active organization scope for the call, when applicable. */\n organizationId?: string;\n /** Backend services the tool may use. */\n services: FunctionToolExecutionServices;\n}\n\n/**\n * A single agent-callable tool (grounding / action an agent can invoke).\n *\n * Register instances on a backend module's `flowsActors.functionTools`; reference\n * one from an agent's `capabilities.tools.functionRefs` by its `functionRef`. The\n * engine resolves each declared ref into an AI-SDK tool at invocation time and\n * calls `execute(args, context)` with the caller's {@link FunctionToolExecutionContext}\n * (so the tool acts as the user, with the user's own visibility). For reading a\n * resource, prefer the `resourceReadTool(resourceType)` factory over a hand-written\n * tool. Import path: `@wildo-ai/saas-backend-lib`.\n *\n * @example\n * // a custom tool\n * const echoTool: FunctionTool = {\n * functionRef: 'demo.echo',\n * description: 'Echo the provided text back.',\n * inputSchema: z.object({ text: z.string() }),\n * execute: async (args) => ({ echoed: args.text }),\n * };\n */\nexport interface FunctionTool {\n /** Stable id referenced from `agent.capabilities.tools.functionRefs`. */\n functionRef: string;\n /** Natural-language description shown to the model (what the tool does + when). */\n description: string;\n /** Zod schema of the tool's arguments (surfaced to the model). */\n inputSchema: z.ZodTypeAny;\n /** Execute the tool with validated args under the caller's context. */\n execute: (args: any, context: FunctionToolExecutionContext) => Promise<unknown>;\n /**\n * Require a HUMAN decision before this tool runs (human-in-the-loop).\n *\n * When set, a turn that reaches this tool SUSPENDS instead of executing it: the run state is\n * persisted, the execution moves to `AWAITING_APPROVAL`, and the caller is asked to approve or\n * deny. Approving resumes the turn and runs the tool; denying resumes it and tells the model the\n * call was refused, so the agent can respond rather than silently stalling.\n *\n * Declare it on tools whose effect a person should authorise — sending money, emailing a\n * customer, deleting at scale — not on reads.\n *\n * ⚠️ Two things worth knowing before you set this:\n *\n * 1. **It requires a configured approval secret.** Approval decisions are HMAC-signed so a client\n * cannot forge one. A turn that would expose an approval-gated tool with no secret configured\n * REFUSES TO RUN rather than falling back to unsigned approvals — the tools someone bothered to\n * gate are exactly the ones where a forged approval matters most.\n * 2. **This is Wildo's declaration, not the model SDK's.** The engine translates it into the\n * SDK's call-level approval configuration. Do not reach for the SDK's own tool-level\n * `needsApproval`: it is deprecated, and approval is handled at the call level now.\n */\n requiresHumanApproval?: boolean;\n}\n/** @wildo_source:part:end saas.backend.flows-actors.function-tool */\n\n/** Uniform, model-facing result shape for read tools. */\ninterface ResourceReadToolResult {\n data: unknown[];\n pagination?: unknown;\n truncated?: boolean;\n}\n\n/** Normalize a handler list/search result (array or paginated) to the tool result shape. */\nfunction toReadResult(result: unknown, limit: number): ResourceReadToolResult {\n if (Array.isArray(result)) {\n return { data: result.slice(0, limit), truncated: result.length > limit };\n }\n if (result && typeof result === 'object' && 'data' in result && Array.isArray((result as { data: unknown[] }).data)) {\n const paged = result as { data: unknown[]; pagination?: unknown };\n return { data: paged.data.slice(0, limit), pagination: paged.pagination, truncated: paged.data.length > limit };\n }\n return { data: [] };\n}\n\n/**\n * Resolve the operation a tool DISPATCHES for `(resourceType, operationIdentifier)`: the\n * URL-BEARING default, and nothing else.\n *\n * ## The defect this closes — `authorize ≡ advertise ≡ execute`\n *\n * Both factories used to resolve through `getServiceOperationPathDefault`, and they dispatched\n * through the `ServicesRegistryHandlerBackendService` convenience verbs (`create` / `update` /\n * `list` / `search`), which re-resolve the same way. That resolver PREFERS an `INTERNAL_CALL`\n * default over the URL-bearing one — deliberately, because it is the SERVICE layer's native\n * transport and the trusted internal callers it was written for want exactly that. This plane is\n * not one of them: it faces an external principal and advertises a public operation to a model.\n *\n * So for a resource declaring BOTH defaults, the tool advertised one operation and executed\n * another — a different `requestDto` validating the model's arguments, a different response DTO,\n * a different `roles` declaration, and different prefix / postfix / custom-impl side effects.\n *\n * **Measured 2026-09-08, and exactly one resource declares both: `organizations` CREATE.** The\n * divergence there is not cosmetic. Its `INTERNAL_CALL` default is the transport registration owns,\n * so the shared CREATE prefix treats that path as registration-managed and SKIPS the\n * `org_type_creation_restricted` guard that confines creation-policy-managed organization types to\n * the registration flow; and the founding-owner postfix is registered on the DEFAULT `API_CALL`\n * variant ONLY, so the internal path writes no owner membership. An agent tool wired to\n * `resourceWriteTool(ORGANIZATIONS, CREATE)` therefore created a tenant with no owner — precisely\n * the stranded state `administrative-continuity-floors.md` exists to prevent — while also reaching\n * a restricted organization type. The MCP tool plane had already made this exact decision and wrote\n * down the reasoning (`McpServerBackendService.callTool`); this plane simply had not.\n *\n * ## Why \"no URL-bearing default\" now REFUSES, and why that is the safe direction\n *\n * This is a behaviour change, and it is intended. A resource whose only default for an identifier\n * is `INTERNAL_CALL` has NO HTTP surface, and its author reasoned from exactly that: `users` LIST\n * declares `roles: []` and says in as many words that the empty set \"is inert here precisely\n * because it is not URL-bearing\". A tool that dispatched it made a route-less, deliberately\n * unexposed operation reachable by an external agent — the opposite of what the declaration\n * assumed. Refusing is fail-closed, and the refusal names the resource and the operation so an app\n * author who genuinely wants that surface exposed can declare a URL-bearing default for it.\n *\n * @returns the URL-bearing default operation, or `undefined` when the resource declares none.\n */\nfunction resolveDispatchableOperation(\n ctx: FunctionToolExecutionContext,\n resourceType: ResourceType,\n operationIdentifier: string,\n): ResourceConfiguration_Operation<any, any, any> | undefined {\n const { resourcesRegistry } = ctx.services;\n // Non-throwing probe FIRST: `getOperationPathDefault` mints an alert-grade INTERNAL error on its\n // miss path, and merely CONSTRUCTING a Wildo error fires its backend actions (LOG / ALERT /\n // METRICS) before any `catch` could downgrade them. A resource with no URL-bearing default for\n // this identifier is an ordinary, expected shape here — not an incident.\n if (!resourcesRegistry.hasOperationPathDefault(resourceType, operationIdentifier)) {\n return undefined;\n }\n return resourcesRegistry.getOperationFromPath(\n resourcesRegistry.getOperationPathDefault(resourceType, operationIdentifier),\n );\n}\n\n/** {@link resolveDispatchableOperation}, refusing rather than returning `undefined`. */\nfunction requireDispatchableOperation(\n ctx: FunctionToolExecutionContext,\n resourceType: ResourceType,\n operationIdentifier: string,\n): ResourceConfiguration_Operation<any, any, any> {\n const operation = resolveDispatchableOperation(ctx, resourceType, operationIdentifier);\n if (!operation) {\n throw new Error(\n `Agent function tool for \"${resourceType}.${operationIdentifier}\": the resource declares no default URL-bearing `\n + 'variant for this operation, so there is no publicly-advertised operation for the tool to dispatch. Declare an '\n + 'API_CALL default for it, or expose a different operation.',\n );\n }\n return operation;\n}\n\n/**\n * Apply the dispatched operation's OWN `roles` ACL — the gate this plane was missing entirely.\n *\n * ## What was broken\n *\n * A function tool dispatches a resource operation through\n * `ServicesRegistryHandlerBackendService`, i.e. it enters at the SERVICE tier. The service tier\n * applies the repository's contextual filter (tenancy, FK narrowing, unit narrowing, the anonymous\n * guard, the retention row-hide — all fail-closed) and the whole operation pipeline (Zod, enabled\n * conditions, custom impl, hooks). It applies NO role check, and that is deliberate and\n * load-bearing: its dominant population is authentication, SCIM provisioning, webhook routing and\n * sweeps, which run BEFORE a role-bearing principal exists. Enforcing declared roles there would\n * deny the reads that ESTABLISH identity.\n *\n * `AuthorizationsBackendService.authorizeInController` is therefore the ONLY place an operation's\n * declared `roles` are checked, and it is mounted at the CONTROLLER tier — the boundary, because\n * that is where an untrusted principal names an operation.\n *\n * **This plane is that boundary and did not ask.** A tool call arrives from an external principal\n * (an A2A agent's token, or a user's own WebSocket) naming an operation on their own authority, and\n * dispatched it with the role ACL unread. A caller whose roles the operation refuses, but whose\n * tenancy admits the row, succeeded — so `roles: [ORG_MEMBER]` on Wonder Todos' todos CREATE, and\n * `roles: [APP_USER]` on the organizations self-service CREATE, were both statements about the HTTP\n * door only. Worse, the factories' own JSDoc, the app's registration comment and\n * `authenticateExternalToken`'s contract all asserted the opposite, so the gap read as closed.\n *\n * The MCP plane, which faces the same class of caller through a different transport, has always run\n * this gate (`McpServerBackendService.callTool`). This is the same call, on the sibling plane.\n *\n * ## Collection vs row\n *\n * `idOrIds` is `undefined` for CREATE / LIST / SEARCH (collection: roles + parent scope) and the\n * addressed record id for UPDATE (row: additionally FK reachability and per-row access). Passing a\n * value in the row's place for a collection call would authorize a READ of a row whose id happens\n * to be a scope id — a question nobody asked, failing for the wrong reason.\n *\n * Refusals are recorded by the authorizer's own denial-audit funnel, so a tool call denied here\n * produces the same `RESOURCE_OPERATION_DENIED` evidence a denied HTTP request produces.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — an external caller reaching a resource operation\n * off the HTTP plane is held to that operation's own declared authority, through the same predicate.\n *\n * @throws AUTHORIZATION — surfaced to the model as a tool error, so the agent can say it was refused.\n */\nasync function authorizeToolDispatch(\n ctx: FunctionToolExecutionContext,\n executionContext: ExecutionContext<any>,\n idOrIds?: string,\n): Promise<void> {\n await ctx.services.authorizer.authorizeInController(idOrIds, executionContext);\n}\n\n/**\n * Charge ONE dispatch against the operation's own authored `rateLimit?` policy, before the\n * dispatch happens.\n *\n * ## What was broken\n *\n * `rateLimit?` is authored on an `API_CALL` / `API_CALL_WITH_CALLBACK` variant and had exactly\n * two consumers: `RateLimitBackendService.checkPolicyForVariant` at the HTTP controller\n * pre-flight, and `McpServerBackendService.assertOperationRateLimitPolicy` on the MCP tool plane.\n * The factories below dispatch the SAME operations through the SAME service pipeline while\n * bypassing Express entirely, so the identical operation was throttled over REST, throttled over\n * MCP, and unthrottled as an agent tool.\n *\n * The exposure is larger here than on either of those planes, which is why this is not merely a\n * consistency fix. A2A's blanket per-principal cap (`A2A_EXTERNAL_TURN_RATE_MAX`) bounds TURNS,\n * and one turn's tool loop may issue arbitrarily many tool calls — so an operation declaring\n * `requestsPerMinute: 5` could be dispatched far more than five times a minute by an external\n * caller spending a single turn. MCP has no such multiplier: one `tools/call` is one dispatch, so\n * its transport cap bounds dispatches 1:1.\n *\n * ## The policy is read off the operation actually being DISPATCHED — which is now the right one\n *\n * This guard originally re-resolved the URL-bearing default for itself, because the factories\n * dispatched the `INTERNAL_CALL` default and `rateLimit?` does not exist on that variant at all —\n * so reading the dispatched operation would have made the guard permanently inert for precisely\n * the resources that declare both. That divergence is gone: {@link resolveDispatchableOperation}\n * makes the URL-bearing default the dispatched operation, and this function takes it as an\n * argument. Policy-source and dispatch-target are now the same object rather than two resolutions\n * that agreed by discipline — which is what stops them separating again.\n *\n * Reading a single declaration as the OPERATION's budget is the framework's own established\n * reading of the field, not an invention: `resources-config.shared.factory.ts` projects\n * `rateLimit: defaultApiCallVariant.rateLimit` onto every derived auto-variant, stating that \"a\n * single declaration on the default URL-bearing variant covers all derived auto-variants\".\n *\n * ## Subject: the CREDENTIAL, not the tenant\n *\n * See {@link resolveDeclaredPolicySubjectKey} for the full argument. In short, an authored\n * `requestsPerMinute` has always meant \"per CLIENT\" — the HTTP seam keys on the source IP — so\n * the faithful translation onto a plane whose callers are credentials is the credential, then the\n * delegated user, then the owning scope. Keying on the tenant would silently make the same\n * declared number several times stricter here than over REST for any tenant running more than one\n * agent. Every branch reads a SERVER-VERIFIED field of the caller's auth; nothing here may ever be\n * sourced from a tool argument, or the throttle becomes opt-out by a model choosing a fresh bucket.\n *\n * ## Scope: a THIRD bucket, deliberately\n *\n * `agent-tool:resource:<resource>:<operation>`, distinct from the HTTP seam's\n * `resource:<resource>:<operation>` and MCP's `mcp:resource:<resource>:<operation>`. The three\n * count different SUBJECTS (an IP, a credential, a credential on a different transport); one\n * shared bucket would mix identity spaces and let a browser's traffic spend an agent's budget.\n *\n * ## Ordering: AFTER authorization\n *\n * Reversed 2026-09-08, when the role gate landed beside it, and MCP's argument is adopted verbatim:\n * a caller who may not run the operation at all must be refused with AUTHORIZATION rather than told\n * how much of a budget they have, and must not consume a slot of a budget that is not theirs —\n * which would let an unauthorized caller exhaust an authorized one's quota. The HTTP seam orders\n * these the other way round because it has no choice (`checkPolicyForVariant` runs pre-flight,\n * before the execution context authorization needs exists); here the identity is already resolved,\n * so the safer order is available and is taken.\n *\n * ## Postures\n *\n * - **No declared policy, or a non-HTTP default** -> no-op, zero Redis traffic. The overwhelmingly\n * common case: most operations declare nothing.\n * - **Unkeyable subject with a policy declared** -> REFUSE. This diverges from MCP's\n * proceed-and-log, and the reason is the tool-loop multiplier described above: there, an\n * unkeyed call is still bounded 1:1 by the transport's per-principal cap, so proceeding costs a\n * bounded amount; here an unkeyed turn could drive an uncounted, unbounded loop against an\n * endpoint whose author asked for a budget. The branch is structurally unreachable — a tool runs\n * only inside an authenticated turn, and an authenticated principal always carries one of the\n * four identity fields — so the refusal costs nothing today and cannot decay into a silent hole.\n * - **Limiter outage** -> propagates, exactly as it does over HTTP and MCP for the same declared\n * policy. An authored budget must not quietly become \"unlimited\" on one plane while it is a 500\n * on the others. (Contrast `assertExternalTurnWithinRate`, the framework-default abuse throttle,\n * which fails OPEN because nobody declared it.)\n *\n * ## Call-site enumeration, so the next reader does not re-derive it\n *\n * The invariant is \"a resource operation dispatched on behalf of an external CLIENT is charged\n * against its declared budget\". Enumerated 2026-09-08 over every caller of the generic service\n * dispatch (`doByOperationPath` and the `ServicesRegistryHandlerBackendService` verbs):\n *\n * | Plane | Verdict |\n * |---|---|\n * | REST route (`ControllerResourceBackendService.doOperation`) | charged — `checkPolicyForVariant`, IP-keyed |\n * | MCP `tools/call` (`McpServerBackendService`) | charged — `checkPolicyForSubject`, credential-keyed |\n * | Agent function tool (here; reachable over A2A and the app WebSocket) | charged — this function |\n * | Queue job executor (`job-executor.backend.service.ts`) | **N/A** — a REPLAY of an operation already authorized, and already charged, at enqueue time (`isWorkerExecution: true`). Charging again would double-count one client request and throttle a background worker against a client's budget |\n * | Minion-scoped handler (`saas-minions-lib`) | **N/A** — same worker plane, one scope deeper |\n * | Custom controllers (SCIM, charts, flows-actors) | **N/A** — the separate authoring surface: they declare their own policy and call `checkPolicy` inline (SCIM does, with its own scope key) rather than inheriting a resource operation's |\n * | Engine-internal collaborators (auth, org, RAG, seeding, retention) | **N/A** — not client-driven; reached from a plane that already charged, or from a system path with no client at all |\n *\n * The rule that generalises: a NEW plane that dispatches a resource operation on a client's behalf\n * owes its own `checkPolicyForSubject` call — AND its own `authorizeInController`. Nothing\n * structural forces either; both fields are simply unread where nobody reads them, which is how\n * both the MCP plane and this one shipped unthrottled, and how this one shipped unauthorized.\n *\n * @throws RATE_LIMIT (429) carrying `context.retryAfterSeconds` — the same envelope the HTTP and\n * MCP seams throw, so one refusal vocabulary covers all three planes. The AI SDK surfaces it to\n * the model as a tool error, so the agent can tell the user it is being throttled.\n */\nasync function assertDeclaredOperationRateLimit(\n ctx: FunctionToolExecutionContext,\n operation: ResourceConfiguration_Operation<any, any, any>,\n resourceType: ResourceType,\n operationIdentifier: string,\n): Promise<void> {\n // Defensive: `resolveDispatchableOperation` already filters to URL-bearing variants, so this\n // narrow exists to reach `rateLimit` on the union rather than to exclude a reachable case.\n if (\n operation.variantType !== ResourceOperationVariantType.API_CALL\n && operation.variantType !== ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n ) {\n return;\n }\n const policy = operation.rateLimit;\n if (!policy) {\n return;\n }\n\n const subjectKey = resolveDeclaredPolicySubjectKey(ctx.auth?.initiatorIds);\n if (!subjectKey) {\n throw new Error(\n `Agent function tool for \"${resourceType}.${operationIdentifier}\": the operation declares a rateLimit policy but the `\n + 'caller carries no server-verified identity to count it against, so the declared budget cannot be honoured.',\n );\n }\n\n await ctx.services.rateLimitService.checkPolicyForSubject(\n policy,\n `agent-tool:resource:${resourceType}:${operationIdentifier}`,\n subjectKey,\n ctx.organizationId,\n );\n}\n\n/**\n * Is this a REFUSAL the read tool must never launder into a different operation?\n *\n * Exists for exactly one reason: the read tool's SEARCH branch degrades to a scoped LIST on any\n * throw, and a refusal swallowed there would silently become an UNGATED LIST — the guard present\n * and inert, which is worse than absent because it reads as enforced. Two refusal kinds qualify:\n *\n * - **RATE_LIMIT** — a declared budget is an application's statement about the endpoint, not a\n * reason to reach for a different one.\n * - **AUTHORIZATION** — stronger still. A denial has already been RECORDED by the authorizer's\n * audit funnel, so proceeding would leave a `RESOURCE_OPERATION_DENIED` row beside a request\n * that then succeeded, making the access trail describe something that did not happen.\n *\n * A genuine \"this resource has no URL-bearing SEARCH operation\" still degrades, unchanged.\n */\nfunction isNonDegradableRefusal(error: unknown): boolean {\n return isWildoBackendError(error)\n && (error.type === ErrorType.RATE_LIMIT || error.type === ErrorType.AUTHORIZATION);\n}\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.resource-read-tool facet:layer:backend facet:family:flows-actors\n *\n * Generic resource-read tool factory. Produces a {@link FunctionTool} that lets\n * an agent look up records of ONE resource type **scoped to the calling user**,\n * with that user's own visibility — no `systemAccessPolicy` bypass. Instantiate\n * it per resource an agent should be able to read (e.g. `resourceReadTool(TODOS)`),\n * making any registered resource agent-readable without hand-writing a tool.\n *\n * The tool dispatches the resource's PUBLIC, URL-bearing default LIST / SEARCH — the same\n * operation a REST client reaches — under a user `ExecutionContext` rebuilt from the caller's\n * socket auth, and applies that operation's own declared `roles` ACL through\n * `AuthorizationsBackendService.authorizeInController` before dispatching it. So the framework's\n * contextual filter AND the role ACL apply exactly as for the user's own request. (The role gate\n * is named explicitly because it does NOT come free with the service path: the service tier\n * applies tenancy and the operation pipeline and no role check, so a tool that merely dispatched\n * would run with the ACL unread — which is what this factory did until 2026-09-08.) A resource\n * that declares no URL-bearing default for the operation is REFUSED rather than served through its\n * route-less internal variant. Identity is NEVER taken\n * from the model — only the `searchQuery` / `limit` args are. Its `functionRef`\n * defaults to `resource.<resourceType>.read` — reference that exact string from\n * your agent's `capabilities.tools.functionRefs`. Import path:\n * `@wildo-ai/saas-backend-lib`.\n *\n * @param resourceType the resource to expose (any registered `ResourceType`).\n * @param options optional `functionRef` / `description` / `defaultLimit` / `maxLimit` overrides.\n * @example\n * // in a backend module's `flowsActors.functionTools` contribution:\n * functionTools: [resourceReadTool(TasksManager_ResourceType.TODOS)]\n * // and on the agent:\n * capabilities: { tools: { functionRefs: ['resource.todos.read'], mcpRefs: [] } }\n */\nexport function resourceReadTool(\n resourceType: ResourceType,\n options?: { functionRef?: string; description?: string; defaultLimit?: number; maxLimit?: number },\n): FunctionTool {\n /** @wildo_source:part:end saas.backend.flows-actors.resource-read-tool */\n const defaultLimit = options?.defaultLimit ?? 50;\n const maxLimit = options?.maxLimit ?? 100;\n\n return {\n functionRef: options?.functionRef ?? `resource.${resourceType}.read`,\n description:\n options?.description ??\n `Look up the current user's \"${resourceType}\" records to answer their questions about them. ` +\n `Optionally pass a free-text searchQuery to narrow the results. Only the current user's own records are ever returned.`,\n inputSchema: z.object({\n searchQuery: z.string().optional(),\n limit: z.number().int().min(1).max(maxLimit).optional(),\n }),\n execute: async (args: { searchQuery?: string; limit?: number }, ctx: FunctionToolExecutionContext): Promise<ResourceReadToolResult> => {\n const { servicesRegistryHandler, executionContextCreator } = ctx.services;\n const limit = typeof args?.limit === 'number' ? Math.min(args.limit, maxLimit) : defaultLimit;\n const searchQuery = typeof args?.searchQuery === 'string' && args.searchQuery.trim().length > 0 ? args.searchQuery.trim() : undefined;\n const contextIds: Record<string, string> = ctx.organizationId ? { organizationId: ctx.organizationId } : {};\n\n // Prefer SEARCH when a query is supplied AND the resource EXPOSES it; fall back to a scoped\n // LIST. Both run as the user, under the operation's own role ACL (no bypass).\n if (searchQuery) {\n // The fallback catch covers ONLY op-resolution + the search call — a resource may expose no\n // SEARCH operation, in which case we degrade to a scoped LIST. It deliberately does NOT wrap\n // the response-DTO projection below: a projection failure there is a real server contract\n // violation (a record that violates its own response DTO) and must surface as a tool error,\n // exactly as it would on the LIST path — never silently degrade to an unfiltered LIST.\n let searchOp: ResourceConfiguration_Operation<any, any, any> | undefined;\n let searchResult: unknown;\n try {\n // Non-throwing: a resource with no URL-bearing SEARCH default has nothing to expose here,\n // which is the documented degradation rather than a refusal.\n searchOp = resolveDispatchableOperation(ctx, resourceType, CoreResourceOperation.SEARCH);\n if (searchOp) {\n const searchEc = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, searchOp, contextIds);\n // Authorize, then charge, then dispatch — the MCP order. Both gates sit inside this try\n // because that is where the dispatch is; the catch below re-throws either refusal so\n // neither can be laundered into an ungated LIST.\n await authorizeToolDispatch(ctx, searchEc);\n await assertDeclaredOperationRateLimit(ctx, searchOp, resourceType, CoreResourceOperation.SEARCH);\n searchResult = await servicesRegistryHandler.doByOperationPath(\n ResourcesConfig_OperationPathUtils.extractOperationPath(searchOp) as ResourceConfiguration_OperationPath<any, any>,\n searchEc,\n undefined,\n { searchQuery, filter: undefined },\n );\n }\n } catch (error) {\n // A declared budget, or a role refusal, is a statement about THIS endpoint — not a reason\n // to reach for a different one. Degrading here would answer the model with LIST results\n // the caller was just refused: enforcement that reports success.\n if (isNonDegradableRefusal(error)) throw error;\n searchOp = undefined; // SEARCH failed to resolve or dispatch — fall through to LIST.\n }\n if (searchOp !== undefined) {\n // Project through the SEARCH operation's response DTO + JSON wire step, exactly as the\n // REST controller does, so no `Date`/backend-only/secret field reaches the model.\n const safeSearchResult = await toResponseSafeToolOutput(searchOp, searchResult);\n return toReadResult(safeSearchResult, limit);\n }\n }\n\n // LIST is a distinct operation with its own ACL and its own declared budget, so it is\n // authorized and charged separately. A call that resolved SEARCH and then degraded to LIST\n // does both twice — two operations were attempted, exactly as two HTTP requests would be, and\n // that path is only reached when the search dispatch failed for a reason that is not a refusal.\n const listOp = requireDispatchableOperation(ctx, resourceType, CoreResourceOperation.LIST);\n const listEc = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, listOp, contextIds);\n await authorizeToolDispatch(ctx, listEc);\n await assertDeclaredOperationRateLimit(ctx, listOp, resourceType, CoreResourceOperation.LIST);\n // `paginated: true` yields the `{ data, pagination }` envelope the LIST response DTO expects\n // (the same shape the HTTP controller requests) — a bare array would fail the wrapper-DTO\n // projection in `toResponseSafeToolOutput` below.\n const listResult = await servicesRegistryHandler.doByOperationPath(\n ResourcesConfig_OperationPathUtils.extractOperationPath(listOp) as ResourceConfiguration_OperationPath<any, any>,\n listEc,\n undefined,\n { filter: undefined, page: 1, limit },\n { paginated: true },\n );\n const safeListResult = await toResponseSafeToolOutput(listOp, listResult);\n return toReadResult(safeListResult, limit);\n },\n };\n}\n\n/**\n * @wildo_source:part:start saas.backend.flows-actors.resource-write-tool facet:layer:backend facet:family:flows-actors\n *\n * Generic resource-WRITE tool factory. The mutating sibling of {@link resourceReadTool}.\n * Produces a {@link FunctionTool} that lets an agent CREATE or UPDATE ONE resource\n * type **as the calling user**, under the caller's own `ExecutionContext` rebuilt\n * from their verified socket auth — no `systemAccessPolicy` bypass, and identity is\n * NEVER taken from the model. It dispatches the resource's PUBLIC, URL-bearing default CREATE /\n * UPDATE — the same operation a REST client reaches, with the same request DTO validating the\n * model's arguments and the same prefix / postfix side effects — and applies that operation's own\n * `accessControl` (roles + parent scope, plus per-row access on UPDATE) through\n * `AuthorizationsBackendService.authorizeInController` before the write. Authorization is therefore\n * **fail-closed**: a caller lacking the operation's role gets a thrown authz error, not a silent\n * write.\n *\n * Both halves of that are load-bearing and neither came free, so do not simplify them away. The\n * service tier applies tenancy and the operation pipeline and NO role check, and the service\n * layer's own default resolver PREFERS a route-less `INTERNAL_CALL` variant over the public one —\n * so before 2026-09-08 this factory dispatched a different operation from the one it advertises,\n * with the ACL unread. On `organizations` CREATE that combination created ownerless tenants.\n *\n * A resource that declares no URL-bearing default for the operation is REFUSED rather than written\n * through its internal variant. Owner FKs and\n * other server-set fields are EC-injected / `excludeFromCreate`, so the model can\n * never spoof ownership through the tool arguments.\n *\n * Unlike the read tool (whose args are a fixed `{ searchQuery, limit }`), a write\n * tool's arguments are resource-specific, so the caller MUST supply the model-facing\n * `inputSchema` — the create/update field contract shown to the model. Keep it to the\n * fields the model should legitimately set. For `UPDATE`, include the record `id` in\n * the schema; the factory splits `id` out to address the row and passes the remaining\n * fields as the patch.\n *\n * `functionRef` defaults to `resource.<resourceType>.<op>` (e.g. `resource.todos.create`)\n * — reference that exact string from your agent's `capabilities.tools.functionRefs`.\n * Import path: `@wildo-ai/saas-backend-lib`.\n *\n * @param resourceType the resource to expose (any registered `ResourceType`).\n * @param op `CoreResourceOperation.CREATE` or `CoreResourceOperation.UPDATE`.\n * @param options `{ inputSchema, functionRef?, description? }` — `inputSchema` is REQUIRED (the model-facing argument contract).\n * @example\n * // in a backend module's `flowsActors.functionTools` contribution:\n * functionTools: [\n * resourceWriteTool(TasksManager_ResourceType.TODOS, CoreResourceOperation.CREATE, {\n * inputSchema: z.object({ title: z.string(), todoListId: z.string(), description: z.string().optional() }),\n * }),\n * ]\n * // and on the agent:\n * capabilities: { tools: { functionRefs: ['resource.todos.create'], mcpRefs: [] } }\n */\nexport function resourceWriteTool(\n resourceType: ResourceType,\n op: CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE,\n options: {\n inputSchema: z.ZodTypeAny;\n functionRef?: string;\n description?: string;\n /**\n * Gate this write behind a HUMAN decision (see {@link FunctionTool.requiresHumanApproval}).\n *\n * Without this passthrough the flag was declarable only by hand-rolling a `FunctionTool`, so\n * the approval gate was unreachable from the factory every app author actually uses — a\n * capability present in the contract and absent from the authoring surface. Reads are not\n * offered the option: approval exists to gate EFFECTS, and gating a read teaches authors to\n * approve things reflexively, which is how an approval prompt stops being read.\n */\n requiresHumanApproval?: boolean;\n },\n): FunctionTool {\n /** @wildo_source:part:end saas.backend.flows-actors.resource-write-tool */\n return {\n functionRef: options.functionRef ?? `resource.${resourceType}.${op}`,\n requiresHumanApproval: options.requiresHumanApproval,\n description:\n options.description ??\n (op === CoreResourceOperation.CREATE\n ? `Create a new \"${resourceType}\" record on behalf of the current user from the provided fields. The record is owned by and scoped to the current user; ownership fields are set by the system, not from the arguments.`\n : `Update an existing \"${resourceType}\" record the current user owns. Pass the record \"id\" plus only the fields to change.`),\n inputSchema: options.inputSchema,\n execute: async (args: Record<string, unknown>, ctx: FunctionToolExecutionContext): Promise<unknown> => {\n const { servicesRegistryHandler, executionContextCreator } = ctx.services;\n const contextIds: Record<string, string> = ctx.organizationId ? { organizationId: ctx.organizationId } : {};\n\n // UPDATE addresses a row; CREATE does not. Split FIRST, before anything is resolved: this is\n // a check on the tool AUTHOR's own `inputSchema`, independent of the registry, and surfacing\n // it ahead of a resolution failure keeps the actionable message the actionable one.\n // `authorizeInController` then takes the addressed id and runs the row-scoped phases only\n // when there is one.\n const isUpdate = op === CoreResourceOperation.UPDATE;\n const { id, ...patch } = args as { id?: string };\n if (isUpdate && (typeof id !== 'string' || id.length === 0)) {\n throw new Error(\n `resourceWriteTool(${resourceType}, update): the \"id\" argument is required — declare it in the tool's inputSchema.`,\n );\n }\n\n // The operation the tool ADVERTISES is the resource's public, URL-bearing default; dispatch\n // that exact one rather than re-resolving through the service layer's INTERNAL-preferred\n // resolver. See `resolveDispatchableOperation` for what diverged and what it cost.\n const operation = requireDispatchableOperation(ctx, resourceType, op);\n const operationPath = ResourcesConfig_OperationPathUtils.extractOperationPath(operation) as ResourceConfiguration_OperationPath<any, any>;\n\n // Rebuild a scoped ExecutionContext from the CALLER's verified auth for this operation, then\n // apply the operation's own role + scope ACL against it (fail-closed) before anything is\n // written. The write runs as the user, never with an ACL bypass.\n const ec = await executionContextCreator.buildContextFromSocketAuth(ctx.auth, operation, contextIds);\n await authorizeToolDispatch(ctx, ec, isUpdate ? id : undefined);\n // The operation's own declared budget, charged after authorization so an unauthorized caller\n // cannot spend an authorized one's quota, and before any write happens.\n await assertDeclaredOperationRateLimit(ctx, operation, resourceType, op);\n\n if (!isUpdate) {\n const created = await servicesRegistryHandler.doByOperationPath(operationPath, ec, undefined, args);\n // Return the same JSON-safe, response-DTO-projected record the REST endpoint would, so no\n // `Date`/backend-only/secret reaches the model and the tool-loop CONTINUATION step validates.\n return toResponseSafeToolOutput(operation, created);\n }\n\n // UPDATE: the record \"id\" addresses the row; the remaining fields are the patch.\n const updated = await servicesRegistryHandler.doByOperationPath(operationPath, ec, id, patch);\n return toResponseSafeToolOutput(operation, updated);\n },\n };\n}\n"]}
|
package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-generation.actors-system.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/market-generation.actors-system.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,iBAAiB,EAKlB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"market-generation.actors-system.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/market-generation.actors-system.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,iBAAiB,EAKlB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,2BAA2B,EAAG,yBAAkC,CAAC;AAE9E,eAAO,MAAM,qBAAqB,EAAE,iBAoCnC,CAAC;AACF,0DAA0D"}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* override with a lower temperature.
|
|
40
40
|
*/
|
|
41
41
|
import { FlowsActors_Agent_Skill_Type, FlowsActors_Agent_Status, ResourceOperationRiskLevel, ResourcePrimaryScope, } from '@wildo-ai/saas-models';
|
|
42
|
-
import { LLMProvider_GenerateTextInputSchema, LLMProvider_GenerateTextOutputSchema, LLMProvider_OperationContext_BaseSchema, LLMProvider_OperationKey,
|
|
42
|
+
import { LLMProvider_GenerateTextInputSchema, LLMProvider_GenerateTextOutputSchema, LLMProvider_OperationContext_BaseSchema, LLMProvider_OperationKey, LLM_Model_Applicability } from '@wildo-ai/external-connectors-models';
|
|
43
43
|
export const MARKET_GENERATION_AGENT_REF = 'market.generation.agent';
|
|
44
44
|
export const marketGenerationAgent = {
|
|
45
45
|
ref: MARKET_GENERATION_AGENT_REF,
|
|
@@ -47,7 +47,9 @@ export const marketGenerationAgent = {
|
|
|
47
47
|
status: FlowsActors_Agent_Status.ACTIVE,
|
|
48
48
|
config: {
|
|
49
49
|
providerRef: 'openai',
|
|
50
|
-
|
|
50
|
+
// STRUCTURED_AUTHORING: a market snapshot generated against a declared schema (#439).
|
|
51
|
+
// Resolves to `gpt-5.6-terra` on `openai` today — the model this pinned.
|
|
52
|
+
modelApplicability: LLM_Model_Applicability.STRUCTURED_AUTHORING,
|
|
51
53
|
operationKey: LLMProvider_OperationKey.GENERATE_TEXT,
|
|
52
54
|
// No sampling params: the GPT-5.6 family rejects non-default temperature (verified live 2026-07-16).
|
|
53
55
|
accessControl: [{
|
package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-generation.actors-system.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/market-generation.actors-system.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAEL,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"market-generation.actors-system.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/market-generation.actors-system.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAEL,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mCAAmC,EAAE,oCAAoC,EAAE,uCAAuC,EAAuC,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAElQ,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAkC,CAAC;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,GAAG,EAAE,2BAA2B;IAChC,WAAW,EAAE,yBAAyB;IACtC,MAAM,EAAE,wBAAwB,CAAC,MAAM;IACvC,MAAM,EAAE;QACN,WAAW,EAAE,QAAQ;QACrB,sFAAsF;QACtF,yEAAyE;QACzE,kBAAkB,EAAE,uBAAuB,CAAC,oBAAoB;QAChE,YAAY,EAAE,wBAAwB,CAAC,aAAa;QACpD,qGAAqG;QACrG,aAAa,EAAE,CAAC;gBACd,YAAY,EAAE,oBAAoB,CAAC,WAAW;gBAC9C,gBAAgB,EAAE,KAAK;aACxB,CAAC;QACF,SAAS,EAAE,0BAA0B,CAAC,GAAG;KAC1C;IACD,mBAAmB,EAAE;QACnB,YAAY,EAAE,wBAAwB,CAAC,aAAa;QACpD,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,oCAAoC;QAClD,sBAAsB,EAAE,uCAAuC;KAClB;IAC/C,UAAU,EAAE;QACV,IAAI,EAAE,oFAAoF;cACtF,2FAA2F;cAC3F,uFAAuF;QAC3F,OAAO,EAAE,4FAA4F;cACjG,4FAA4F;cAC5F,gGAAgG;cAChG,qGAAqG;QACzG,SAAS,EAAE,4BAA4B,CAAC,UAAU;QAClD,YAAY,EAAE,EAAE;KACjB;IACD,SAAS,EAAE,0BAA0B;CACtC,CAAC;AACF,0DAA0D","sourcesContent":["/**\n * @wildo_source:part:start saas.market.generation-agent facet:layer:backend facet:family:market\n *\n * Market generation agent — framework default (Phase 4.2).\n *\n * The market generation agent is a free-form text-generation LLM agent\n * driven by the `wildo market generate` CLI. It receives a fully\n * rendered prompt (market-context block + Mustache-substituted\n * `MarketMessageTemplate` body) and returns the LLM's prose output as a\n * single string.\n *\n * Import path: `@wildo-ai/saas-backend-lib`.\n *\n * **Framework default + application override.** This constant is the\n * default agent the dev companion registers under\n * `MARKET_GENERATION_AGENT_REF` when the application authors no\n * override. An application chooses its own LLM provider / model /\n * persona by exporting a `marketGenerationAgentOverride` on its backend\n * companion-exports (`BackendCompanionExports.marketGenerationAgentOverride`);\n * the companion registers the override in place of this default. The\n * override MUST keep `ref: MARKET_GENERATION_AGENT_REF` — the companion's\n * market service invokes the agent by that fixed ref, so the override\n * replaces the default under the same identity (an override under a\n * different ref would never be reached). The ref is authored here (not\n * in the companion) precisely so an application's `backend-api` can\n * import it to author a valid override.\n *\n * Why `GENERATE_TEXT` instead of `GENERATE_STRUCTURED`: Phase-4.2\n * outputs are always free-form prose (landing-page hero copy,\n * objection-response email body, etc.). A structured schema would force\n * every template author to also author a matching Zod schema per\n * variant. Mirrors the companion's `emailTemplateGenerationAgent`\n * pattern (a build-time `GENERATE_TEXT` scaffolding agent).\n *\n * Temperature note: 0.6 is intentionally higher than\n * `email-template.generation.agent` (0.4) because marketing copy\n * benefits from more creative latitude than email-template TSX\n * scaffolding. An application that wants deterministic reruns authors an\n * override with a lower temperature.\n */\n\nimport {\n FlowsActors_Agent,\n FlowsActors_Agent_Skill_Type,\n FlowsActors_Agent_Status,\n ResourceOperationRiskLevel,\n ResourcePrimaryScope,\n} from '@wildo-ai/saas-models';\nimport { LLMProvider_GenerateTextInputSchema, LLMProvider_GenerateTextOutputSchema, LLMProvider_OperationContext_BaseSchema, LLMProvider_OperationDefinitionBase, LLMProvider_OperationKey, LLM_Model_Applicability } from '@wildo-ai/external-connectors-models';\n\nexport const MARKET_GENERATION_AGENT_REF = 'market.generation.agent' as const;\n\nexport const marketGenerationAgent: FlowsActors_Agent = {\n ref: MARKET_GENERATION_AGENT_REF,\n displayName: 'Market Generation Agent',\n status: FlowsActors_Agent_Status.ACTIVE,\n config: {\n providerRef: 'openai',\n // STRUCTURED_AUTHORING: a market snapshot generated against a declared schema (#439).\n // Resolves to `gpt-5.6-terra` on `openai` today — the model this pinned.\n modelApplicability: LLM_Model_Applicability.STRUCTURED_AUTHORING,\n operationKey: LLMProvider_OperationKey.GENERATE_TEXT,\n // No sampling params: the GPT-5.6 family rejects non-default temperature (verified live 2026-07-16).\n accessControl: [{\n primaryScope: ResourcePrimaryScope.APPLICATION,\n requiresApproval: false,\n }],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n operationDefinition: {\n operationKey: LLMProvider_OperationKey.GENERATE_TEXT,\n providerRef: 'openai',\n inputSchema: LLMProvider_GenerateTextInputSchema,\n outputSchema: LLMProvider_GenerateTextOutputSchema,\n operationContextSchema: LLMProvider_OperationContext_BaseSchema,\n } satisfies LLMProvider_OperationDefinitionBase,\n promptSpec: {\n role: 'You are a senior B2B SaaS marketing writer. You receive an English market-context '\n + 'briefing followed by a single concrete writing task. The briefing is the source of truth '\n + 'for ICP, benefits, voice, and any objections — never invent facts that contradict it.',\n persona: 'You write tight, customer-led copy. You favour the reader\\'s outcomes over feature lists, '\n + 'never use marketing clichés (\"game-changer\", \"revolutionary\", \"synergy\"), and respect the '\n + 'preferred tone of voice from the briefing. When the task asks for a specific output language, '\n + 'you write the entire response in that language while keeping proper nouns and product names intact.',\n skillType: FlowsActors_Agent_Skill_Type.GENERATION,\n instructions: [],\n },\n createdAt: '2026-04-17T00:00:00.000Z',\n};\n/** @wildo_source:part:end saas.market.generation-agent */\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { FlowsActors_McpServer } from '@wildo-ai/saas-models';
|
|
2
|
+
/**
|
|
3
|
+
* The protocol revision this client speaks, sent as `protocolVersion` in `initialize` and as the
|
|
4
|
+
* `MCP-Protocol-Version` header on every later request.
|
|
5
|
+
*
|
|
6
|
+
* spec-cite: MCP 2025-06-18 — Lifecycle §Version Negotiation (the client MUST send a protocol
|
|
7
|
+
* version it supports, and SHOULD send the latest it supports) and Transports §Protocol Version
|
|
8
|
+
* Header (`MCP-Protocol-Version: 2025-06-18`).
|
|
9
|
+
*
|
|
10
|
+
* A pinned constant rather than a per-server setting: version negotiation is the protocol's own
|
|
11
|
+
* mechanism, and letting an application declare a version per server would put a wire-compatibility
|
|
12
|
+
* decision in application config where nobody can reason about it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MCP_CLIENT_PROTOCOL_VERSION = "2025-06-18";
|
|
15
|
+
/** What this client tells a server it is. Sent as `clientInfo` in `initialize`. */
|
|
16
|
+
export declare const MCP_CLIENT_INFO: {
|
|
17
|
+
readonly name: "wildo-engine";
|
|
18
|
+
readonly version: "1";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* How a call to somebody else's server ended.
|
|
22
|
+
*
|
|
23
|
+
* A CLOSED vocabulary, and the reason it is not `{ ok: boolean; error?: string }` is the whole point
|
|
24
|
+
* of #491: an MCP call is a REMOTE call, and the mistake to avoid is modelling it as a second kind
|
|
25
|
+
* of local function. A local function returns or throws. This can be refused before it leaves, never
|
|
26
|
+
* arrive, arrive late, arrive malformed, or arrive perfectly carrying the server's own failure — and
|
|
27
|
+
* those five mean different things to the agent and to whoever reads the audit trail.
|
|
28
|
+
*/
|
|
29
|
+
export declare enum McpOutcomeKind {
|
|
30
|
+
/** The call completed and the server answered. */
|
|
31
|
+
OK = "ok",
|
|
32
|
+
/**
|
|
33
|
+
* REFUSED before any request left this process — the target failed the outbound guard (a private
|
|
34
|
+
* or reserved address, credentials in the URL, a special-use hostname). Distinct from UNREACHABLE
|
|
35
|
+
* because nothing was contacted: this is our own refusal, and it names a misconfiguration rather
|
|
36
|
+
* than somebody else's outage.
|
|
37
|
+
*/
|
|
38
|
+
REFUSED_TARGET = "refused_target",
|
|
39
|
+
/** The request left and no answer came back — DNS, connection, TLS, or a non-2xx HTTP status. */
|
|
40
|
+
UNREACHABLE = "unreachable",
|
|
41
|
+
/** The bounded budget elapsed first. Kept apart from UNREACHABLE: a slow server is not a down one. */
|
|
42
|
+
TIMED_OUT = "timed_out",
|
|
43
|
+
/**
|
|
44
|
+
* The server answered, and the answer was not the protocol — a JSON-RPC `error`, an unparseable
|
|
45
|
+
* body, or a result missing the field its method must return. Someone's server is wrong; that is
|
|
46
|
+
* a different remedy from a network fault and must not be reported as one.
|
|
47
|
+
*/
|
|
48
|
+
PROTOCOL_ERROR = "protocol_error",
|
|
49
|
+
/**
|
|
50
|
+
* The TOOL failed, and the protocol worked perfectly — a `tools/call` result carrying
|
|
51
|
+
* `isError: true`.
|
|
52
|
+
*
|
|
53
|
+
* spec-cite: MCP 2025-06-18 — Tools §Error Handling ("Tool Execution Errors: Reported in tool
|
|
54
|
+
* results with `isError: true`", listed against Protocol Errors as the other mechanism).
|
|
55
|
+
*
|
|
56
|
+
* This is the outcome an AGENT should reason about and retry or route around, and the one an
|
|
57
|
+
* operator should NOT be paged for. Collapsing it into PROTOCOL_ERROR would make every rate limit
|
|
58
|
+
* and every business-rule refusal look like a broken server.
|
|
59
|
+
*/
|
|
60
|
+
TOOL_ERROR = "tool_error"
|
|
61
|
+
}
|
|
62
|
+
/** One tool a server offers, as far as an agent needs it. */
|
|
63
|
+
export interface McpToolDescriptor {
|
|
64
|
+
name: string;
|
|
65
|
+
/** Optional human-readable name for display. */
|
|
66
|
+
title?: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
/** JSON Schema for the tool's parameters, passed through to the model unchanged. */
|
|
69
|
+
inputSchema: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A live session with one server.
|
|
73
|
+
*
|
|
74
|
+
* `sessionId` is `null` for a stateless server, and that is not a degraded case — assigning one is
|
|
75
|
+
* optional.
|
|
76
|
+
*
|
|
77
|
+
* spec-cite: MCP 2025-06-18 — Transports §Session Management (a server "MAY assign a session ID at
|
|
78
|
+
* initialization time, by including it in an `Mcp-Session-Id` header"; when one is returned the
|
|
79
|
+
* client "MUST include it in the `Mcp-Session-Id` header on all of their subsequent HTTP requests").
|
|
80
|
+
*/
|
|
81
|
+
export interface McpSession {
|
|
82
|
+
readonly server: FlowsActors_McpServer;
|
|
83
|
+
readonly sessionId: string | null;
|
|
84
|
+
readonly tools: readonly McpToolDescriptor[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Why a call did not produce a usable answer. Carries no URL — see `destinationHost`.
|
|
88
|
+
*
|
|
89
|
+
* ONE type shared by both outcomes rather than a failure arm written twice: every caller handles
|
|
90
|
+
* failure identically (report it, contribute no tool, let the turn continue), and two structurally
|
|
91
|
+
* identical arms would drift the moment one grew a field.
|
|
92
|
+
*/
|
|
93
|
+
export interface McpFailureOutcome {
|
|
94
|
+
kind: Exclude<McpOutcomeKind, McpOutcomeKind.OK>;
|
|
95
|
+
/** The server ref, so a reader can find the declaration that named it. */
|
|
96
|
+
mcpServerRef: string;
|
|
97
|
+
/** HOST only. An MCP endpoint routinely carries a tenant or session id in its path. */
|
|
98
|
+
destinationHost: string;
|
|
99
|
+
/** A short, non-sensitive account of what went wrong, safe for a log and an audit row. */
|
|
100
|
+
detail: string;
|
|
101
|
+
}
|
|
102
|
+
export type McpDiscoveryOutcome = {
|
|
103
|
+
kind: McpOutcomeKind.OK;
|
|
104
|
+
session: McpSession;
|
|
105
|
+
} | McpFailureOutcome;
|
|
106
|
+
export type McpToolCallOutcome = {
|
|
107
|
+
kind: McpOutcomeKind.OK;
|
|
108
|
+
/** Unstructured result blocks, passed to the model as the tool's answer. */
|
|
109
|
+
content: unknown[];
|
|
110
|
+
/** Present when the tool declares an output schema and returned structured data. */
|
|
111
|
+
structuredContent?: Record<string, unknown>;
|
|
112
|
+
} | McpFailureOutcome;
|
|
113
|
+
//# sourceMappingURL=mcp-client.backend.definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-client.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/mcp-client.backend.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAMnE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,mFAAmF;AAC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AE,OAAO,EAAE,CAAC;IACnB,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C,GACD,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//===============================================================
|
|
2
|
+
// MCP CLIENT — the contract a turn reads
|
|
3
|
+
//===============================================================
|
|
4
|
+
/**
|
|
5
|
+
* The protocol revision this client speaks, sent as `protocolVersion` in `initialize` and as the
|
|
6
|
+
* `MCP-Protocol-Version` header on every later request.
|
|
7
|
+
*
|
|
8
|
+
* spec-cite: MCP 2025-06-18 — Lifecycle §Version Negotiation (the client MUST send a protocol
|
|
9
|
+
* version it supports, and SHOULD send the latest it supports) and Transports §Protocol Version
|
|
10
|
+
* Header (`MCP-Protocol-Version: 2025-06-18`).
|
|
11
|
+
*
|
|
12
|
+
* A pinned constant rather than a per-server setting: version negotiation is the protocol's own
|
|
13
|
+
* mechanism, and letting an application declare a version per server would put a wire-compatibility
|
|
14
|
+
* decision in application config where nobody can reason about it.
|
|
15
|
+
*/
|
|
16
|
+
export const MCP_CLIENT_PROTOCOL_VERSION = '2025-06-18';
|
|
17
|
+
/** What this client tells a server it is. Sent as `clientInfo` in `initialize`. */
|
|
18
|
+
export const MCP_CLIENT_INFO = { name: 'wildo-engine', version: '1' };
|
|
19
|
+
/**
|
|
20
|
+
* How a call to somebody else's server ended.
|
|
21
|
+
*
|
|
22
|
+
* A CLOSED vocabulary, and the reason it is not `{ ok: boolean; error?: string }` is the whole point
|
|
23
|
+
* of #491: an MCP call is a REMOTE call, and the mistake to avoid is modelling it as a second kind
|
|
24
|
+
* of local function. A local function returns or throws. This can be refused before it leaves, never
|
|
25
|
+
* arrive, arrive late, arrive malformed, or arrive perfectly carrying the server's own failure — and
|
|
26
|
+
* those five mean different things to the agent and to whoever reads the audit trail.
|
|
27
|
+
*/
|
|
28
|
+
export var McpOutcomeKind;
|
|
29
|
+
(function (McpOutcomeKind) {
|
|
30
|
+
/** The call completed and the server answered. */
|
|
31
|
+
McpOutcomeKind["OK"] = "ok";
|
|
32
|
+
/**
|
|
33
|
+
* REFUSED before any request left this process — the target failed the outbound guard (a private
|
|
34
|
+
* or reserved address, credentials in the URL, a special-use hostname). Distinct from UNREACHABLE
|
|
35
|
+
* because nothing was contacted: this is our own refusal, and it names a misconfiguration rather
|
|
36
|
+
* than somebody else's outage.
|
|
37
|
+
*/
|
|
38
|
+
McpOutcomeKind["REFUSED_TARGET"] = "refused_target";
|
|
39
|
+
/** The request left and no answer came back — DNS, connection, TLS, or a non-2xx HTTP status. */
|
|
40
|
+
McpOutcomeKind["UNREACHABLE"] = "unreachable";
|
|
41
|
+
/** The bounded budget elapsed first. Kept apart from UNREACHABLE: a slow server is not a down one. */
|
|
42
|
+
McpOutcomeKind["TIMED_OUT"] = "timed_out";
|
|
43
|
+
/**
|
|
44
|
+
* The server answered, and the answer was not the protocol — a JSON-RPC `error`, an unparseable
|
|
45
|
+
* body, or a result missing the field its method must return. Someone's server is wrong; that is
|
|
46
|
+
* a different remedy from a network fault and must not be reported as one.
|
|
47
|
+
*/
|
|
48
|
+
McpOutcomeKind["PROTOCOL_ERROR"] = "protocol_error";
|
|
49
|
+
/**
|
|
50
|
+
* The TOOL failed, and the protocol worked perfectly — a `tools/call` result carrying
|
|
51
|
+
* `isError: true`.
|
|
52
|
+
*
|
|
53
|
+
* spec-cite: MCP 2025-06-18 — Tools §Error Handling ("Tool Execution Errors: Reported in tool
|
|
54
|
+
* results with `isError: true`", listed against Protocol Errors as the other mechanism).
|
|
55
|
+
*
|
|
56
|
+
* This is the outcome an AGENT should reason about and retry or route around, and the one an
|
|
57
|
+
* operator should NOT be paged for. Collapsing it into PROTOCOL_ERROR would make every rate limit
|
|
58
|
+
* and every business-rule refusal look like a broken server.
|
|
59
|
+
*/
|
|
60
|
+
McpOutcomeKind["TOOL_ERROR"] = "tool_error";
|
|
61
|
+
})(McpOutcomeKind || (McpOutcomeKind = {}));
|
|
62
|
+
//# sourceMappingURL=mcp-client.backend.definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-client.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/mcp-client.backend.definitions.ts"],"names":[],"mappings":"AAEA,iEAAiE;AACjE,0CAA0C;AAC1C,iEAAiE;AAEjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC;AAExD,mFAAmF;AACnF,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAW,CAAC;AAE/E;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,cAgCX;AAhCD,WAAY,cAAc;IACxB,kDAAkD;IAClD,2BAAS,CAAA;IACT;;;;;OAKG;IACH,mDAAiC,CAAA;IACjC,iGAAiG;IACjG,6CAA2B,CAAA;IAC3B,sGAAsG;IACtG,yCAAuB,CAAA;IACvB;;;;OAIG;IACH,mDAAiC,CAAA;IACjC;;;;;;;;;;OAUG;IACH,2CAAyB,CAAA;AAC3B,CAAC,EAhCW,cAAc,KAAd,cAAc,QAgCzB","sourcesContent":["import type { FlowsActors_McpServer } from '@wildo-ai/saas-models';\n\n//===============================================================\n// MCP CLIENT — the contract a turn reads\n//===============================================================\n\n/**\n * The protocol revision this client speaks, sent as `protocolVersion` in `initialize` and as the\n * `MCP-Protocol-Version` header on every later request.\n *\n * spec-cite: MCP 2025-06-18 — Lifecycle §Version Negotiation (the client MUST send a protocol\n * version it supports, and SHOULD send the latest it supports) and Transports §Protocol Version\n * Header (`MCP-Protocol-Version: 2025-06-18`).\n *\n * A pinned constant rather than a per-server setting: version negotiation is the protocol's own\n * mechanism, and letting an application declare a version per server would put a wire-compatibility\n * decision in application config where nobody can reason about it.\n */\nexport const MCP_CLIENT_PROTOCOL_VERSION = '2025-06-18';\n\n/** What this client tells a server it is. Sent as `clientInfo` in `initialize`. */\nexport const MCP_CLIENT_INFO = { name: 'wildo-engine', version: '1' } as const;\n\n/**\n * How a call to somebody else's server ended.\n *\n * A CLOSED vocabulary, and the reason it is not `{ ok: boolean; error?: string }` is the whole point\n * of #491: an MCP call is a REMOTE call, and the mistake to avoid is modelling it as a second kind\n * of local function. A local function returns or throws. This can be refused before it leaves, never\n * arrive, arrive late, arrive malformed, or arrive perfectly carrying the server's own failure — and\n * those five mean different things to the agent and to whoever reads the audit trail.\n */\nexport enum McpOutcomeKind {\n /** The call completed and the server answered. */\n OK = 'ok',\n /**\n * REFUSED before any request left this process — the target failed the outbound guard (a private\n * or reserved address, credentials in the URL, a special-use hostname). Distinct from UNREACHABLE\n * because nothing was contacted: this is our own refusal, and it names a misconfiguration rather\n * than somebody else's outage.\n */\n REFUSED_TARGET = 'refused_target',\n /** The request left and no answer came back — DNS, connection, TLS, or a non-2xx HTTP status. */\n UNREACHABLE = 'unreachable',\n /** The bounded budget elapsed first. Kept apart from UNREACHABLE: a slow server is not a down one. */\n TIMED_OUT = 'timed_out',\n /**\n * The server answered, and the answer was not the protocol — a JSON-RPC `error`, an unparseable\n * body, or a result missing the field its method must return. Someone's server is wrong; that is\n * a different remedy from a network fault and must not be reported as one.\n */\n PROTOCOL_ERROR = 'protocol_error',\n /**\n * The TOOL failed, and the protocol worked perfectly — a `tools/call` result carrying\n * `isError: true`.\n *\n * spec-cite: MCP 2025-06-18 — Tools §Error Handling (\"Tool Execution Errors: Reported in tool\n * results with `isError: true`\", listed against Protocol Errors as the other mechanism).\n *\n * This is the outcome an AGENT should reason about and retry or route around, and the one an\n * operator should NOT be paged for. Collapsing it into PROTOCOL_ERROR would make every rate limit\n * and every business-rule refusal look like a broken server.\n */\n TOOL_ERROR = 'tool_error',\n}\n\n/** One tool a server offers, as far as an agent needs it. */\nexport interface McpToolDescriptor {\n name: string;\n /** Optional human-readable name for display. */\n title?: string;\n description?: string;\n /** JSON Schema for the tool's parameters, passed through to the model unchanged. */\n inputSchema: Record<string, unknown>;\n}\n\n/**\n * A live session with one server.\n *\n * `sessionId` is `null` for a stateless server, and that is not a degraded case — assigning one is\n * optional.\n *\n * spec-cite: MCP 2025-06-18 — Transports §Session Management (a server \"MAY assign a session ID at\n * initialization time, by including it in an `Mcp-Session-Id` header\"; when one is returned the\n * client \"MUST include it in the `Mcp-Session-Id` header on all of their subsequent HTTP requests\").\n */\nexport interface McpSession {\n readonly server: FlowsActors_McpServer;\n readonly sessionId: string | null;\n readonly tools: readonly McpToolDescriptor[];\n}\n\n/**\n * Why a call did not produce a usable answer. Carries no URL — see `destinationHost`.\n *\n * ONE type shared by both outcomes rather than a failure arm written twice: every caller handles\n * failure identically (report it, contribute no tool, let the turn continue), and two structurally\n * identical arms would drift the moment one grew a field.\n */\nexport interface McpFailureOutcome {\n kind: Exclude<McpOutcomeKind, McpOutcomeKind.OK>;\n /** The server ref, so a reader can find the declaration that named it. */\n mcpServerRef: string;\n /** HOST only. An MCP endpoint routinely carries a tenant or session id in its path. */\n destinationHost: string;\n /** A short, non-sensitive account of what went wrong, safe for a log and an audit row. */\n detail: string;\n}\n\nexport type McpDiscoveryOutcome =\n | { kind: McpOutcomeKind.OK; session: McpSession }\n | McpFailureOutcome;\n\nexport type McpToolCallOutcome =\n | {\n kind: McpOutcomeKind.OK;\n /** Unstructured result blocks, passed to the model as the tool's answer. */\n content: unknown[];\n /** Present when the tool declares an output schema and returned structured data. */\n structuredContent?: Record<string, unknown>;\n }\n | McpFailureOutcome;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actors-system.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/services/actors-system.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7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I;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB;IAoCY,mBAAmB,CAC9B,IAAI,EAAE,gBAAgB,EACtB,YAAY,CAAC,EAAE,iBAAiB,GAC/B,OAAO,CAAC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"actors-system.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/services/actors-system.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAWhE,OAAO,EACL,WAAW,EACX,qBAAqB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAmBL,KAAK,iBAAiB,EAMtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAOxB,MAAM,uBAAuB,CAAC;AAa/B;;;;;;;;;;;;;GAaG;AACH,qBACa,0BAA0B;IAKA,OAAO,CAAC,QAAQ,CAAC,MAAM;IACV,OAAO,CAAC,QAAQ,CAAC,YAAY;IACtB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa;IANjF,SAAS,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;gBAG3B,MAAM,EAAE,aAAa,EACR,YAAY,EAAE,0BAA0B,EACjC,mBAAmB,EAAE,0BAA0B,EACrD,aAAa,EAAE,oBAAoB;IAYvG;;;OAGG;IACU,YAAY,CAAC,SAAS,EAAE,qBAAqB,GAAG,OA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e;IAWvB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;YAcf,eAAe;IA0D7B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,uBAAuB;CAgBhC"}
|
|
@@ -407,7 +407,6 @@ let ActorsSystemBackendService = class ActorsSystemBackendService {
|
|
|
407
407
|
// No synthesis: the schema documents its absence for exactly this state.
|
|
408
408
|
roundBudget: plan.roundBudget,
|
|
409
409
|
status: DeliberationStatus.REJECTED,
|
|
410
|
-
charterInputsDigests: plan.charterInputsDigests,
|
|
411
410
|
humanDecision: null,
|
|
412
411
|
startedAt,
|
|
413
412
|
finishedAt: new Date().toISOString(),
|
|
@@ -436,7 +435,6 @@ let ActorsSystemBackendService = class ActorsSystemBackendService {
|
|
|
436
435
|
concurrence: ActorsSystemBackendService_1.computeConcurrence(synthesis.winnerRef, finalVerdicts),
|
|
437
436
|
roundBudget: plan.roundBudget,
|
|
438
437
|
status,
|
|
439
|
-
charterInputsDigests: plan.charterInputsDigests,
|
|
440
438
|
humanDecision: null,
|
|
441
439
|
startedAt,
|
|
442
440
|
finishedAt: new Date().toISOString(),
|