@wildo-ai/saas-backend-lib 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +14 -3
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +138 -24
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +8 -3
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js +11 -2
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +48 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +102 -30
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js +16 -0
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts +20 -6
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +96 -32
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js +32 -7
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts +8 -5
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +80 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +298 -23
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +71 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +85 -5
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +21 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +146 -4
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts +3 -26
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js +3 -68
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +533 -43
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +54 -13
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +263 -13
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +376 -58
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +264 -7
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +414 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +140 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +65 -6
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +45 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js +7 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +146 -46
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +43 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +52 -3
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.js +2 -2
- package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +20 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts +27 -0
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.js +29 -0
- package/dist/esm/databases/services/redis.service.js.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +134 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts +41 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js +40 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts +64 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js +193 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +72 -4
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +60 -19
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.js +7 -1
- package/dist/esm/external-data/external-data-transform.backend.js.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts +2 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js +13 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +306 -7
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +539 -45
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts +24 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +83 -11
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts +17 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +5 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +76 -13
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +18 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.js +36 -28
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +214 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js +566 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -0
- package/dist/esm/files/services/files.backend.service.d.ts +87 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +252 -19
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.js +12 -0
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +200 -44
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +107 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +519 -56
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +151 -41
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +308 -143
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/index.d.ts +15 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +45 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +82 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +20 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +21 -3
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +32 -4
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts +34 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js +42 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +84 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.js +235 -11
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts +64 -2
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +152 -6
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +108 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +432 -101
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +54 -7
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts +5 -5
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js +14 -13
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts +2 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +18 -8
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +20 -18
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js +4 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +88 -15
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +16 -2
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.js +3 -3
- package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +91 -7
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js +13 -7
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +47 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.js +343 -77
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +3 -23
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js +20 -45
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +9 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +77 -2
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +5 -3
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +41 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +87 -4
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js +24 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts +117 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js +104 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +175 -14
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +385 -49
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +18 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +110 -74
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +17 -3
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +12 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +41 -3
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +83 -20
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.js +1 -18
- package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +17 -9
- package/dist/esm/.builder.pid +0 -9
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { FlowsActors_McpServer } from '@wildo-ai/saas-models';
|
|
2
|
+
import { type McpDiscoveryOutcome, type McpSession, type McpToolCallOutcome } from '../../flows-actors/models/mcp-client.backend.definitions';
|
|
3
|
+
/**
|
|
4
|
+
* An MCP client over the Streamable HTTP transport.
|
|
5
|
+
*
|
|
6
|
+
* ## Why this is hand-written rather than an SDK
|
|
7
|
+
*
|
|
8
|
+
* The subset an agent turn needs is three methods — `initialize`, `tools/list`, `tools/call` — over
|
|
9
|
+
* JSON-RPC. Taking a runtime dependency for that would put the parts this engine must own most
|
|
10
|
+
* (which targets are refusable, what a timeout costs, what reaches an audit row, what a failure
|
|
11
|
+
* means to an agent) behind somebody else's abstractions, and it runs against the standing position
|
|
12
|
+
* that Wildo does not take runtime dependencies on third-party integration packages.
|
|
13
|
+
*
|
|
14
|
+
* ## What it is NOT
|
|
15
|
+
*
|
|
16
|
+
* Not a second kind of local function (#491). Every method returns a typed OUTCOME and never throws
|
|
17
|
+
* into the turn, because the failure modes an agent must distinguish — refused, unreachable, timed
|
|
18
|
+
* out, malformed, or the tool's own error — do not exist for a local call and cannot be flattened
|
|
19
|
+
* into one exception without losing the distinction that decides what happens next.
|
|
20
|
+
*
|
|
21
|
+
* spec-cite: MCP 2025-06-18 — Transports §Streamable HTTP for the request shape, session header and
|
|
22
|
+
* dual response content types; Lifecycle for the initialize/initialized handshake; Tools for
|
|
23
|
+
* `tools/list` and `tools/call`.
|
|
24
|
+
*/
|
|
25
|
+
export declare class McpClientBackendService {
|
|
26
|
+
/**
|
|
27
|
+
* Open a session and discover the server's tools, bounded by the server's DISCOVERY budget.
|
|
28
|
+
*
|
|
29
|
+
* Discovery is where an unreachable server is meant to be found. A server that does not answer
|
|
30
|
+
* here contributes no tools to the turn, and the agent is never offered a capability it cannot
|
|
31
|
+
* use — fail-closed on the CLAIM, fail-open on the turn.
|
|
32
|
+
*/
|
|
33
|
+
openSession(server: FlowsActors_McpServer, accessToken: string | null): Promise<McpDiscoveryOutcome>;
|
|
34
|
+
/**
|
|
35
|
+
* Call one tool, bounded by the server's CALL budget — a separate and larger budget than
|
|
36
|
+
* discovery, because doing the work legitimately takes longer than listing what can be done.
|
|
37
|
+
*/
|
|
38
|
+
callTool(session: McpSession, toolName: string, args: Record<string, unknown>, accessToken: string | null): Promise<McpToolCallOutcome>;
|
|
39
|
+
/**
|
|
40
|
+
* Release a session, best-effort.
|
|
41
|
+
*
|
|
42
|
+
* Deliberately returns nothing and reports nothing. A server MAY refuse to let a client terminate
|
|
43
|
+
* a session, so a failure here is an expected shape rather than a fault — and a turn that has
|
|
44
|
+
* already produced its answer must not fail on tidying up after itself.
|
|
45
|
+
*/
|
|
46
|
+
closeSession(session: McpSession, accessToken: string | null): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* The one place this service touches the network.
|
|
49
|
+
*
|
|
50
|
+
* A protected seam rather than an injected `fetch`, so nothing in production can substitute it and
|
|
51
|
+
* the DI binding stays parameterless. Tests subclass to drive the protocol deterministically —
|
|
52
|
+
* which they must, because the outbound guard REFUSES loopback and every private range, so a real
|
|
53
|
+
* local double could only ever produce `REFUSED_TARGET`. That refusal is itself pinned, against a
|
|
54
|
+
* genuinely private target, so the guard is proven rather than worked around.
|
|
55
|
+
*/
|
|
56
|
+
protected performFetch(url: string, init: RequestInit): Promise<Response>;
|
|
57
|
+
/**
|
|
58
|
+
* The outbound guard, applied before EVERY request rather than once at registration.
|
|
59
|
+
*
|
|
60
|
+
* Registration refuses a plaintext endpoint; this refuses the deeper set — a private or reserved
|
|
61
|
+
* address, credentials embedded in the URL, a special-use hostname. It runs per call because a
|
|
62
|
+
* hostname's meaning can change between registration and use, and because an application-declared
|
|
63
|
+
* URL pointed at a third party is precisely the shape that turns this server into a
|
|
64
|
+
* request-forgery tool.
|
|
65
|
+
*/
|
|
66
|
+
private refuseTarget;
|
|
67
|
+
private headers;
|
|
68
|
+
/** Send a JSON-RPC REQUEST and resolve its response, from either answer shape. */
|
|
69
|
+
private request;
|
|
70
|
+
/**
|
|
71
|
+
* Send a JSON-RPC NOTIFICATION, whose success is an HTTP status and not a body.
|
|
72
|
+
*
|
|
73
|
+
* spec-cite: MCP 2025-06-18 — Transports §Sending Messages to the Server (for a notification, "the
|
|
74
|
+
* server MUST return HTTP status code 202 Accepted with no body"). Any 2xx is accepted here rather
|
|
75
|
+
* than 202 exactly, because a proxy that rewrites a 202 to a 200 is not a protocol fault and
|
|
76
|
+
* refusing it would break a deployment for no gain in correctness.
|
|
77
|
+
*/
|
|
78
|
+
private notify;
|
|
79
|
+
/**
|
|
80
|
+
* Read the JSON-RPC response for `id` out of an SSE body.
|
|
81
|
+
*
|
|
82
|
+
* The stream may carry server-initiated requests and notifications BEFORE the response, so this
|
|
83
|
+
* cannot take the first event — it matches on the id and ignores everything else. Returns `null`
|
|
84
|
+
* if the stream ends without one, which the caller reports as a protocol error rather than as a
|
|
85
|
+
* timeout: the connection closed, so no budget was exceeded.
|
|
86
|
+
*/
|
|
87
|
+
private readJsonRpcFromEventStream;
|
|
88
|
+
private failure;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=mcp-client.backend.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-client.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/services/mcp-client.backend.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,kBAAkB,EAGxB,MAAM,uEAAuE,CAAC;AAK/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,uBAAuB;IAClC;;;;;;OAMG;IACU,WAAW,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA6EjH;;;OAGG;IACU,QAAQ,CACnB,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,kBAAkB,CAAC;IAuC9B;;;;;;OAMG;IACU,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzF;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQzE;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,OAAO;IAaf,kFAAkF;YACpE,OAAO;IAkErB;;;;;;;OAOG;YACW,MAAM;IAyBpB;;;;;;;OAOG;YACW,0BAA0B;IA2CxC,OAAO,CAAC,OAAO;CAYhB"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { injectable } from 'inversify';
|
|
8
|
+
import { mcpServerDestinationHost } from '@wildo-ai/saas-models';
|
|
9
|
+
import { MCP_CLIENT_INFO, MCP_CLIENT_PROTOCOL_VERSION, McpOutcomeKind, } from '../../flows-actors/models/mcp-client.backend.definitions.js';
|
|
10
|
+
import { classifyOutboundTargetUrl, } from '../../security/ssrf/outbound-target-guard.backend.utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* An MCP client over the Streamable HTTP transport.
|
|
13
|
+
*
|
|
14
|
+
* ## Why this is hand-written rather than an SDK
|
|
15
|
+
*
|
|
16
|
+
* The subset an agent turn needs is three methods — `initialize`, `tools/list`, `tools/call` — over
|
|
17
|
+
* JSON-RPC. Taking a runtime dependency for that would put the parts this engine must own most
|
|
18
|
+
* (which targets are refusable, what a timeout costs, what reaches an audit row, what a failure
|
|
19
|
+
* means to an agent) behind somebody else's abstractions, and it runs against the standing position
|
|
20
|
+
* that Wildo does not take runtime dependencies on third-party integration packages.
|
|
21
|
+
*
|
|
22
|
+
* ## What it is NOT
|
|
23
|
+
*
|
|
24
|
+
* Not a second kind of local function (#491). Every method returns a typed OUTCOME and never throws
|
|
25
|
+
* into the turn, because the failure modes an agent must distinguish — refused, unreachable, timed
|
|
26
|
+
* out, malformed, or the tool's own error — do not exist for a local call and cannot be flattened
|
|
27
|
+
* into one exception without losing the distinction that decides what happens next.
|
|
28
|
+
*
|
|
29
|
+
* spec-cite: MCP 2025-06-18 — Transports §Streamable HTTP for the request shape, session header and
|
|
30
|
+
* dual response content types; Lifecycle for the initialize/initialized handshake; Tools for
|
|
31
|
+
* `tools/list` and `tools/call`.
|
|
32
|
+
*/
|
|
33
|
+
let McpClientBackendService = class McpClientBackendService {
|
|
34
|
+
/**
|
|
35
|
+
* Open a session and discover the server's tools, bounded by the server's DISCOVERY budget.
|
|
36
|
+
*
|
|
37
|
+
* Discovery is where an unreachable server is meant to be found. A server that does not answer
|
|
38
|
+
* here contributes no tools to the turn, and the agent is never offered a capability it cannot
|
|
39
|
+
* use — fail-closed on the CLAIM, fail-open on the turn.
|
|
40
|
+
*/
|
|
41
|
+
async openSession(server, accessToken) {
|
|
42
|
+
const refusal = this.refuseTarget(server);
|
|
43
|
+
if (refusal)
|
|
44
|
+
return refusal;
|
|
45
|
+
const initialize = await this.request(server, {
|
|
46
|
+
method: 'initialize',
|
|
47
|
+
params: {
|
|
48
|
+
protocolVersion: MCP_CLIENT_PROTOCOL_VERSION,
|
|
49
|
+
// Declared EMPTY on purpose. `roots`, `sampling` and `elicitation` are client capabilities a
|
|
50
|
+
// server may then exercise — sampling in particular asks this process to run a model on the
|
|
51
|
+
// server's behalf. Declaring a capability we do not implement would invite a request we
|
|
52
|
+
// cannot answer; adding one is a deliberate decision, not a default.
|
|
53
|
+
capabilities: {},
|
|
54
|
+
clientInfo: MCP_CLIENT_INFO,
|
|
55
|
+
},
|
|
56
|
+
accessToken,
|
|
57
|
+
sessionId: null,
|
|
58
|
+
timeoutMs: server.timeouts.discoveryMs,
|
|
59
|
+
});
|
|
60
|
+
if (initialize.kind !== McpOutcomeKind.OK)
|
|
61
|
+
return initialize;
|
|
62
|
+
/*
|
|
63
|
+
* The session id arrives on the InitializeResult's HTTP response and must be echoed afterwards.
|
|
64
|
+
* A server that assigns none is stateless, which is a supported shape rather than a failure.
|
|
65
|
+
*/
|
|
66
|
+
const sessionId = initialize.sessionId;
|
|
67
|
+
/*
|
|
68
|
+
* The `initialized` notification. A notification carries no id and expects 202 with no body, so
|
|
69
|
+
* its failure cannot be read from a JSON-RPC result — only from the HTTP status, which
|
|
70
|
+
* `notify` reports. It is sent BEFORE `tools/list` because a server SHOULD NOT be asked for
|
|
71
|
+
* anything else until it arrives.
|
|
72
|
+
*/
|
|
73
|
+
const initialized = await this.notify(server, {
|
|
74
|
+
method: 'notifications/initialized',
|
|
75
|
+
accessToken,
|
|
76
|
+
sessionId,
|
|
77
|
+
timeoutMs: server.timeouts.discoveryMs,
|
|
78
|
+
});
|
|
79
|
+
if (initialized.kind !== McpOutcomeKind.OK)
|
|
80
|
+
return initialized;
|
|
81
|
+
const listed = await this.request(server, {
|
|
82
|
+
method: 'tools/list',
|
|
83
|
+
params: {},
|
|
84
|
+
accessToken,
|
|
85
|
+
sessionId,
|
|
86
|
+
timeoutMs: server.timeouts.discoveryMs,
|
|
87
|
+
});
|
|
88
|
+
if (listed.kind !== McpOutcomeKind.OK)
|
|
89
|
+
return listed;
|
|
90
|
+
const rawTools = listed.result?.tools;
|
|
91
|
+
if (!Array.isArray(rawTools)) {
|
|
92
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, 'tools/list returned no tools array');
|
|
93
|
+
}
|
|
94
|
+
/*
|
|
95
|
+
* Every entry is validated. A tool descriptor reaches a model as a callable contract, so one
|
|
96
|
+
* missing its name or its input schema must be DROPPED rather than passed through half-formed:
|
|
97
|
+
* the model would be offered a tool it cannot correctly call, which is the same shape of defect
|
|
98
|
+
* as advertising a server that does not exist.
|
|
99
|
+
*/
|
|
100
|
+
const tools = [];
|
|
101
|
+
for (const candidate of rawTools) {
|
|
102
|
+
const tool = candidate;
|
|
103
|
+
if (typeof tool?.name !== 'string' || tool.name.length === 0)
|
|
104
|
+
continue;
|
|
105
|
+
if (typeof tool.inputSchema !== 'object' || tool.inputSchema === null)
|
|
106
|
+
continue;
|
|
107
|
+
tools.push({
|
|
108
|
+
name: tool.name,
|
|
109
|
+
title: typeof tool.title === 'string' ? tool.title : undefined,
|
|
110
|
+
description: typeof tool.description === 'string' ? tool.description : undefined,
|
|
111
|
+
inputSchema: tool.inputSchema,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return { kind: McpOutcomeKind.OK, session: { server, sessionId, tools } };
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Call one tool, bounded by the server's CALL budget — a separate and larger budget than
|
|
118
|
+
* discovery, because doing the work legitimately takes longer than listing what can be done.
|
|
119
|
+
*/
|
|
120
|
+
async callTool(session, toolName, args, accessToken) {
|
|
121
|
+
const { server } = session;
|
|
122
|
+
const refusal = this.refuseTarget(server);
|
|
123
|
+
if (refusal)
|
|
124
|
+
return refusal;
|
|
125
|
+
const called = await this.request(server, {
|
|
126
|
+
method: 'tools/call',
|
|
127
|
+
params: { name: toolName, arguments: args },
|
|
128
|
+
accessToken,
|
|
129
|
+
sessionId: session.sessionId,
|
|
130
|
+
timeoutMs: server.timeouts.callMs,
|
|
131
|
+
});
|
|
132
|
+
if (called.kind !== McpOutcomeKind.OK)
|
|
133
|
+
return called;
|
|
134
|
+
const result = called.result;
|
|
135
|
+
/*
|
|
136
|
+
* `isError: true` is a TOOL failure on a working protocol, and it is reported as its own kind.
|
|
137
|
+
* The server did everything right; the tool did not. An agent can read that and try something
|
|
138
|
+
* else, and an operator should not be paged for it.
|
|
139
|
+
*/
|
|
140
|
+
if (result?.isError === true) {
|
|
141
|
+
return this.failure(server, McpOutcomeKind.TOOL_ERROR, `tool "${toolName}" reported isError`);
|
|
142
|
+
}
|
|
143
|
+
if (!Array.isArray(result?.content)) {
|
|
144
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `tools/call for "${toolName}" returned no content array`);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
kind: McpOutcomeKind.OK,
|
|
148
|
+
content: result.content,
|
|
149
|
+
structuredContent: typeof result.structuredContent === 'object' && result.structuredContent !== null
|
|
150
|
+
? result.structuredContent
|
|
151
|
+
: undefined,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Release a session, best-effort.
|
|
156
|
+
*
|
|
157
|
+
* Deliberately returns nothing and reports nothing. A server MAY refuse to let a client terminate
|
|
158
|
+
* a session, so a failure here is an expected shape rather than a fault — and a turn that has
|
|
159
|
+
* already produced its answer must not fail on tidying up after itself.
|
|
160
|
+
*/
|
|
161
|
+
async closeSession(session, accessToken) {
|
|
162
|
+
if (session.sessionId === null)
|
|
163
|
+
return;
|
|
164
|
+
const controller = new AbortController();
|
|
165
|
+
const timer = setTimeout(() => controller.abort(), session.server.timeouts.discoveryMs);
|
|
166
|
+
try {
|
|
167
|
+
await this.performFetch(session.server.url, {
|
|
168
|
+
method: 'DELETE',
|
|
169
|
+
headers: this.headers(accessToken, session.sessionId),
|
|
170
|
+
signal: controller.signal,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// Intentionally swallowed — see the docstring.
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
clearTimeout(timer);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The one place this service touches the network.
|
|
182
|
+
*
|
|
183
|
+
* A protected seam rather than an injected `fetch`, so nothing in production can substitute it and
|
|
184
|
+
* the DI binding stays parameterless. Tests subclass to drive the protocol deterministically —
|
|
185
|
+
* which they must, because the outbound guard REFUSES loopback and every private range, so a real
|
|
186
|
+
* local double could only ever produce `REFUSED_TARGET`. That refusal is itself pinned, against a
|
|
187
|
+
* genuinely private target, so the guard is proven rather than worked around.
|
|
188
|
+
*/
|
|
189
|
+
performFetch(url, init) {
|
|
190
|
+
return fetch(url, init);
|
|
191
|
+
}
|
|
192
|
+
// ================================
|
|
193
|
+
// Transport
|
|
194
|
+
// ================================
|
|
195
|
+
/**
|
|
196
|
+
* The outbound guard, applied before EVERY request rather than once at registration.
|
|
197
|
+
*
|
|
198
|
+
* Registration refuses a plaintext endpoint; this refuses the deeper set — a private or reserved
|
|
199
|
+
* address, credentials embedded in the URL, a special-use hostname. It runs per call because a
|
|
200
|
+
* hostname's meaning can change between registration and use, and because an application-declared
|
|
201
|
+
* URL pointed at a third party is precisely the shape that turns this server into a
|
|
202
|
+
* request-forgery tool.
|
|
203
|
+
*/
|
|
204
|
+
refuseTarget(server) {
|
|
205
|
+
const rejection = classifyOutboundTargetUrl(server.url, { admittedProtocols: ['https:'] });
|
|
206
|
+
if (!rejection)
|
|
207
|
+
return null;
|
|
208
|
+
return this.failure(server, McpOutcomeKind.REFUSED_TARGET, rejection);
|
|
209
|
+
}
|
|
210
|
+
headers(accessToken, sessionId) {
|
|
211
|
+
const headers = {
|
|
212
|
+
'content-type': 'application/json',
|
|
213
|
+
// Both content types are listed because the server chooses which to answer with, and a client
|
|
214
|
+
// that named only one would be refusing a response shape the transport permits.
|
|
215
|
+
accept: 'application/json, text/event-stream',
|
|
216
|
+
'mcp-protocol-version': MCP_CLIENT_PROTOCOL_VERSION,
|
|
217
|
+
};
|
|
218
|
+
if (sessionId !== null)
|
|
219
|
+
headers['mcp-session-id'] = sessionId;
|
|
220
|
+
if (accessToken !== null)
|
|
221
|
+
headers.authorization = `Bearer ${accessToken}`;
|
|
222
|
+
return headers;
|
|
223
|
+
}
|
|
224
|
+
/** Send a JSON-RPC REQUEST and resolve its response, from either answer shape. */
|
|
225
|
+
async request(server, input) {
|
|
226
|
+
const id = 1;
|
|
227
|
+
const controller = new AbortController();
|
|
228
|
+
const timer = setTimeout(() => controller.abort(), input.timeoutMs);
|
|
229
|
+
let response;
|
|
230
|
+
try {
|
|
231
|
+
response = await this.performFetch(server.url, {
|
|
232
|
+
method: 'POST',
|
|
233
|
+
headers: this.headers(input.accessToken, input.sessionId),
|
|
234
|
+
body: JSON.stringify({ jsonrpc: '2.0', id, method: input.method, params: input.params }),
|
|
235
|
+
signal: controller.signal,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
// An abort and a connection failure arrive through the same catch and mean different things:
|
|
240
|
+
// a slow server is not a down one, and the remedies differ.
|
|
241
|
+
const kind = controller.signal.aborted ? McpOutcomeKind.TIMED_OUT : McpOutcomeKind.UNREACHABLE;
|
|
242
|
+
return this.failure(server, kind, `${input.method}: ${kind === McpOutcomeKind.TIMED_OUT ? `exceeded ${input.timeoutMs}ms` : 'request failed'}`);
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
clearTimeout(timer);
|
|
246
|
+
}
|
|
247
|
+
if (!response.ok) {
|
|
248
|
+
return this.failure(server, McpOutcomeKind.UNREACHABLE, `${input.method}: HTTP ${response.status}`);
|
|
249
|
+
}
|
|
250
|
+
// Only present on the initialize response in practice, and read from every response so a server
|
|
251
|
+
// that assigns one later is not ignored.
|
|
252
|
+
const sessionId = response.headers.get('mcp-session-id') ?? input.sessionId;
|
|
253
|
+
let envelope;
|
|
254
|
+
try {
|
|
255
|
+
envelope = (response.headers.get('content-type') ?? '').includes('text/event-stream')
|
|
256
|
+
? await this.readJsonRpcFromEventStream(response, id)
|
|
257
|
+
: (await response.json());
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: response was not readable JSON-RPC`);
|
|
261
|
+
}
|
|
262
|
+
if (!envelope) {
|
|
263
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: no JSON-RPC response for the request`);
|
|
264
|
+
}
|
|
265
|
+
if (envelope.error) {
|
|
266
|
+
// The server's own message is NOT forwarded: it is third-party text that would land in a log
|
|
267
|
+
// and an audit row. The code identifies the fault; the message is the server's to keep.
|
|
268
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: JSON-RPC error ${envelope.error.code ?? 'unknown'}`);
|
|
269
|
+
}
|
|
270
|
+
if (envelope.result === undefined) {
|
|
271
|
+
return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: response carried neither result nor error`);
|
|
272
|
+
}
|
|
273
|
+
return { kind: McpOutcomeKind.OK, result: envelope.result, sessionId };
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Send a JSON-RPC NOTIFICATION, whose success is an HTTP status and not a body.
|
|
277
|
+
*
|
|
278
|
+
* spec-cite: MCP 2025-06-18 — Transports §Sending Messages to the Server (for a notification, "the
|
|
279
|
+
* server MUST return HTTP status code 202 Accepted with no body"). Any 2xx is accepted here rather
|
|
280
|
+
* than 202 exactly, because a proxy that rewrites a 202 to a 200 is not a protocol fault and
|
|
281
|
+
* refusing it would break a deployment for no gain in correctness.
|
|
282
|
+
*/
|
|
283
|
+
async notify(server, input) {
|
|
284
|
+
const controller = new AbortController();
|
|
285
|
+
const timer = setTimeout(() => controller.abort(), input.timeoutMs);
|
|
286
|
+
try {
|
|
287
|
+
const response = await this.performFetch(server.url, {
|
|
288
|
+
method: 'POST',
|
|
289
|
+
headers: this.headers(input.accessToken, input.sessionId),
|
|
290
|
+
body: JSON.stringify({ jsonrpc: '2.0', method: input.method }),
|
|
291
|
+
signal: controller.signal,
|
|
292
|
+
});
|
|
293
|
+
if (!response.ok) {
|
|
294
|
+
return this.failure(server, McpOutcomeKind.UNREACHABLE, `${input.method}: HTTP ${response.status}`);
|
|
295
|
+
}
|
|
296
|
+
return { kind: McpOutcomeKind.OK };
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
const kind = controller.signal.aborted ? McpOutcomeKind.TIMED_OUT : McpOutcomeKind.UNREACHABLE;
|
|
300
|
+
return this.failure(server, kind, `${input.method}: ${kind === McpOutcomeKind.TIMED_OUT ? `exceeded ${input.timeoutMs}ms` : 'request failed'}`);
|
|
301
|
+
}
|
|
302
|
+
finally {
|
|
303
|
+
clearTimeout(timer);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Read the JSON-RPC response for `id` out of an SSE body.
|
|
308
|
+
*
|
|
309
|
+
* The stream may carry server-initiated requests and notifications BEFORE the response, so this
|
|
310
|
+
* cannot take the first event — it matches on the id and ignores everything else. Returns `null`
|
|
311
|
+
* if the stream ends without one, which the caller reports as a protocol error rather than as a
|
|
312
|
+
* timeout: the connection closed, so no budget was exceeded.
|
|
313
|
+
*/
|
|
314
|
+
async readJsonRpcFromEventStream(response, id) {
|
|
315
|
+
const body = response.body;
|
|
316
|
+
if (!body)
|
|
317
|
+
return null;
|
|
318
|
+
const reader = body.getReader();
|
|
319
|
+
const decoder = new TextDecoder();
|
|
320
|
+
let buffered = '';
|
|
321
|
+
try {
|
|
322
|
+
for (;;) {
|
|
323
|
+
const { done, value } = await reader.read();
|
|
324
|
+
if (done)
|
|
325
|
+
return null;
|
|
326
|
+
buffered += decoder.decode(value, { stream: true });
|
|
327
|
+
// Events are separated by a blank line; a partial trailing event stays buffered.
|
|
328
|
+
let boundary = buffered.indexOf('\n\n');
|
|
329
|
+
while (boundary !== -1) {
|
|
330
|
+
const rawEvent = buffered.slice(0, boundary);
|
|
331
|
+
buffered = buffered.slice(boundary + 2);
|
|
332
|
+
const data = rawEvent
|
|
333
|
+
.split('\n')
|
|
334
|
+
.filter((line) => line.startsWith('data:'))
|
|
335
|
+
.map((line) => line.slice('data:'.length).trim())
|
|
336
|
+
.join('');
|
|
337
|
+
if (data.length > 0) {
|
|
338
|
+
try {
|
|
339
|
+
const parsed = JSON.parse(data);
|
|
340
|
+
if (parsed?.id === id)
|
|
341
|
+
return parsed;
|
|
342
|
+
}
|
|
343
|
+
catch {
|
|
344
|
+
// A single unparseable event does not end the stream — the response may still arrive.
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
boundary = buffered.indexOf('\n\n');
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
finally {
|
|
352
|
+
await reader.cancel().catch(() => { });
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
failure(server, kind, detail) {
|
|
356
|
+
return {
|
|
357
|
+
kind,
|
|
358
|
+
mcpServerRef: server.ref,
|
|
359
|
+
destinationHost: mcpServerDestinationHost(server.url),
|
|
360
|
+
detail,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
McpClientBackendService = __decorate([
|
|
365
|
+
injectable()
|
|
366
|
+
], McpClientBackendService);
|
|
367
|
+
export { McpClientBackendService };
|
|
368
|
+
//# sourceMappingURL=mcp-client.backend.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-client.backend.service.js","sourceRoot":"","sources":["../../../../../src/flows-actors/services/mcp-client.backend.service.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,cAAc,GAMf,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EACL,yBAAyB,GAC1B,MAAM,sEAAsE,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC;;;;;;OAMG;IACI,KAAK,CAAC,WAAW,CAAC,MAA6B,EAAE,WAA0B;QAChF,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,O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inversify';\n\nimport type { FlowsActors_McpServer } from '@wildo-ai/saas-models';\nimport { mcpServerDestinationHost } from '@wildo-ai/saas-models';\n\nimport {\n MCP_CLIENT_INFO,\n MCP_CLIENT_PROTOCOL_VERSION,\n McpOutcomeKind,\n type McpDiscoveryOutcome,\n type McpSession,\n type McpToolCallOutcome,\n type McpToolDescriptor,\n type McpFailureOutcome,\n} from '~wildo-backend-lib/flows-actors/models/mcp-client.backend.definitions';\nimport {\n classifyOutboundTargetUrl,\n} from '~wildo-backend-lib/security/ssrf/outbound-target-guard.backend.utils';\n\n/**\n * An MCP client over the Streamable HTTP transport.\n *\n * ## Why this is hand-written rather than an SDK\n *\n * The subset an agent turn needs is three methods — `initialize`, `tools/list`, `tools/call` — over\n * JSON-RPC. Taking a runtime dependency for that would put the parts this engine must own most\n * (which targets are refusable, what a timeout costs, what reaches an audit row, what a failure\n * means to an agent) behind somebody else's abstractions, and it runs against the standing position\n * that Wildo does not take runtime dependencies on third-party integration packages.\n *\n * ## What it is NOT\n *\n * Not a second kind of local function (#491). Every method returns a typed OUTCOME and never throws\n * into the turn, because the failure modes an agent must distinguish — refused, unreachable, timed\n * out, malformed, or the tool's own error — do not exist for a local call and cannot be flattened\n * into one exception without losing the distinction that decides what happens next.\n *\n * spec-cite: MCP 2025-06-18 — Transports §Streamable HTTP for the request shape, session header and\n * dual response content types; Lifecycle for the initialize/initialized handshake; Tools for\n * `tools/list` and `tools/call`.\n */\n@injectable()\nexport class McpClientBackendService {\n /**\n * Open a session and discover the server's tools, bounded by the server's DISCOVERY budget.\n *\n * Discovery is where an unreachable server is meant to be found. A server that does not answer\n * here contributes no tools to the turn, and the agent is never offered a capability it cannot\n * use — fail-closed on the CLAIM, fail-open on the turn.\n */\n public async openSession(server: FlowsActors_McpServer, accessToken: string | null): Promise<McpDiscoveryOutcome> {\n const refusal = this.refuseTarget(server);\n if (refusal) return refusal;\n\n const initialize = await this.request(server, {\n method: 'initialize',\n params: {\n protocolVersion: MCP_CLIENT_PROTOCOL_VERSION,\n // Declared EMPTY on purpose. `roots`, `sampling` and `elicitation` are client capabilities a\n // server may then exercise — sampling in particular asks this process to run a model on the\n // server's behalf. Declaring a capability we do not implement would invite a request we\n // cannot answer; adding one is a deliberate decision, not a default.\n capabilities: {},\n clientInfo: MCP_CLIENT_INFO,\n },\n accessToken,\n sessionId: null,\n timeoutMs: server.timeouts.discoveryMs,\n });\n if (initialize.kind !== McpOutcomeKind.OK) return initialize;\n\n /*\n * The session id arrives on the InitializeResult's HTTP response and must be echoed afterwards.\n * A server that assigns none is stateless, which is a supported shape rather than a failure.\n */\n const sessionId = initialize.sessionId;\n\n /*\n * The `initialized` notification. A notification carries no id and expects 202 with no body, so\n * its failure cannot be read from a JSON-RPC result — only from the HTTP status, which\n * `notify` reports. It is sent BEFORE `tools/list` because a server SHOULD NOT be asked for\n * anything else until it arrives.\n */\n const initialized = await this.notify(server, {\n method: 'notifications/initialized',\n accessToken,\n sessionId,\n timeoutMs: server.timeouts.discoveryMs,\n });\n if (initialized.kind !== McpOutcomeKind.OK) return initialized;\n\n const listed = await this.request(server, {\n method: 'tools/list',\n params: {},\n accessToken,\n sessionId,\n timeoutMs: server.timeouts.discoveryMs,\n });\n if (listed.kind !== McpOutcomeKind.OK) return listed;\n\n const rawTools = (listed.result as { tools?: unknown })?.tools;\n if (!Array.isArray(rawTools)) {\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, 'tools/list returned no tools array');\n }\n\n /*\n * Every entry is validated. A tool descriptor reaches a model as a callable contract, so one\n * missing its name or its input schema must be DROPPED rather than passed through half-formed:\n * the model would be offered a tool it cannot correctly call, which is the same shape of defect\n * as advertising a server that does not exist.\n */\n const tools: McpToolDescriptor[] = [];\n for (const candidate of rawTools) {\n const tool = candidate as Partial<McpToolDescriptor>;\n if (typeof tool?.name !== 'string' || tool.name.length === 0) continue;\n if (typeof tool.inputSchema !== 'object' || tool.inputSchema === null) continue;\n tools.push({\n name: tool.name,\n title: typeof tool.title === 'string' ? tool.title : undefined,\n description: typeof tool.description === 'string' ? tool.description : undefined,\n inputSchema: tool.inputSchema as Record<string, unknown>,\n });\n }\n\n return { kind: McpOutcomeKind.OK, session: { server, sessionId, tools } };\n }\n\n /**\n * Call one tool, bounded by the server's CALL budget — a separate and larger budget than\n * discovery, because doing the work legitimately takes longer than listing what can be done.\n */\n public async callTool(\n session: McpSession,\n toolName: string,\n args: Record<string, unknown>,\n accessToken: string | null,\n ): Promise<McpToolCallOutcome> {\n const { server } = session;\n const refusal = this.refuseTarget(server);\n if (refusal) return refusal;\n\n const called = await this.request(server, {\n method: 'tools/call',\n params: { name: toolName, arguments: args },\n accessToken,\n sessionId: session.sessionId,\n timeoutMs: server.timeouts.callMs,\n });\n if (called.kind !== McpOutcomeKind.OK) return called;\n\n const result = called.result as { content?: unknown; structuredContent?: unknown; isError?: unknown };\n\n /*\n * `isError: true` is a TOOL failure on a working protocol, and it is reported as its own kind.\n * The server did everything right; the tool did not. An agent can read that and try something\n * else, and an operator should not be paged for it.\n */\n if (result?.isError === true) {\n return this.failure(server, McpOutcomeKind.TOOL_ERROR, `tool \"${toolName}\" reported isError`);\n }\n\n if (!Array.isArray(result?.content)) {\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `tools/call for \"${toolName}\" returned no content array`);\n }\n\n return {\n kind: McpOutcomeKind.OK,\n content: result.content,\n structuredContent:\n typeof result.structuredContent === 'object' && result.structuredContent !== null\n ? (result.structuredContent as Record<string, unknown>)\n : undefined,\n };\n }\n\n /**\n * Release a session, best-effort.\n *\n * Deliberately returns nothing and reports nothing. A server MAY refuse to let a client terminate\n * a session, so a failure here is an expected shape rather than a fault — and a turn that has\n * already produced its answer must not fail on tidying up after itself.\n */\n public async closeSession(session: McpSession, accessToken: string | null): Promise<void> {\n if (session.sessionId === null) return;\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), session.server.timeouts.discoveryMs);\n try {\n await this.performFetch(session.server.url, {\n method: 'DELETE',\n headers: this.headers(accessToken, session.sessionId),\n signal: controller.signal,\n });\n } catch {\n // Intentionally swallowed — see the docstring.\n } finally {\n clearTimeout(timer);\n }\n }\n\n /**\n * The one place this service touches the network.\n *\n * A protected seam rather than an injected `fetch`, so nothing in production can substitute it and\n * the DI binding stays parameterless. Tests subclass to drive the protocol deterministically —\n * which they must, because the outbound guard REFUSES loopback and every private range, so a real\n * local double could only ever produce `REFUSED_TARGET`. That refusal is itself pinned, against a\n * genuinely private target, so the guard is proven rather than worked around.\n */\n protected performFetch(url: string, init: RequestInit): Promise<Response> {\n return fetch(url, init);\n }\n\n // ================================\n // Transport\n // ================================\n\n /**\n * The outbound guard, applied before EVERY request rather than once at registration.\n *\n * Registration refuses a plaintext endpoint; this refuses the deeper set — a private or reserved\n * address, credentials embedded in the URL, a special-use hostname. It runs per call because a\n * hostname's meaning can change between registration and use, and because an application-declared\n * URL pointed at a third party is precisely the shape that turns this server into a\n * request-forgery tool.\n */\n private refuseTarget(server: FlowsActors_McpServer): McpFailureOutcome | null {\n const rejection = classifyOutboundTargetUrl(server.url, { admittedProtocols: ['https:'] });\n if (!rejection) return null;\n return this.failure(server, McpOutcomeKind.REFUSED_TARGET, rejection);\n }\n\n private headers(accessToken: string | null, sessionId: string | null): Record<string, string> {\n const headers: Record<string, string> = {\n 'content-type': 'application/json',\n // Both content types are listed because the server chooses which to answer with, and a client\n // that named only one would be refusing a response shape the transport permits.\n accept: 'application/json, text/event-stream',\n 'mcp-protocol-version': MCP_CLIENT_PROTOCOL_VERSION,\n };\n if (sessionId !== null) headers['mcp-session-id'] = sessionId;\n if (accessToken !== null) headers.authorization = `Bearer ${accessToken}`;\n return headers;\n }\n\n /** Send a JSON-RPC REQUEST and resolve its response, from either answer shape. */\n private async request(\n server: FlowsActors_McpServer,\n input: {\n method: string;\n params: Record<string, unknown>;\n accessToken: string | null;\n sessionId: string | null;\n timeoutMs: number;\n },\n ): Promise<\n | { kind: McpOutcomeKind.OK; result: unknown; sessionId: string | null }\n | McpFailureOutcome\n > {\n const id = 1;\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), input.timeoutMs);\n\n let response: Response;\n try {\n response = await this.performFetch(server.url, {\n method: 'POST',\n headers: this.headers(input.accessToken, input.sessionId),\n body: JSON.stringify({ jsonrpc: '2.0', id, method: input.method, params: input.params }),\n signal: controller.signal,\n });\n } catch (error) {\n // An abort and a connection failure arrive through the same catch and mean different things:\n // a slow server is not a down one, and the remedies differ.\n const kind = controller.signal.aborted ? McpOutcomeKind.TIMED_OUT : McpOutcomeKind.UNREACHABLE;\n return this.failure(server, kind, `${input.method}: ${kind === McpOutcomeKind.TIMED_OUT ? `exceeded ${input.timeoutMs}ms` : 'request failed'}`);\n } finally {\n clearTimeout(timer);\n }\n\n if (!response.ok) {\n return this.failure(server, McpOutcomeKind.UNREACHABLE, `${input.method}: HTTP ${response.status}`);\n }\n\n // Only present on the initialize response in practice, and read from every response so a server\n // that assigns one later is not ignored.\n const sessionId = response.headers.get('mcp-session-id') ?? input.sessionId;\n\n let envelope: { result?: unknown; error?: { code?: number; message?: string } } | null;\n try {\n envelope = (response.headers.get('content-type') ?? '').includes('text/event-stream')\n ? await this.readJsonRpcFromEventStream(response, id)\n : ((await response.json()) as typeof envelope);\n } catch {\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: response was not readable JSON-RPC`);\n }\n\n if (!envelope) {\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: no JSON-RPC response for the request`);\n }\n if (envelope.error) {\n // The server's own message is NOT forwarded: it is third-party text that would land in a log\n // and an audit row. The code identifies the fault; the message is the server's to keep.\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: JSON-RPC error ${envelope.error.code ?? 'unknown'}`);\n }\n if (envelope.result === undefined) {\n return this.failure(server, McpOutcomeKind.PROTOCOL_ERROR, `${input.method}: response carried neither result nor error`);\n }\n\n return { kind: McpOutcomeKind.OK, result: envelope.result, sessionId };\n }\n\n /**\n * Send a JSON-RPC NOTIFICATION, whose success is an HTTP status and not a body.\n *\n * spec-cite: MCP 2025-06-18 — Transports §Sending Messages to the Server (for a notification, \"the\n * server MUST return HTTP status code 202 Accepted with no body\"). Any 2xx is accepted here rather\n * than 202 exactly, because a proxy that rewrites a 202 to a 200 is not a protocol fault and\n * refusing it would break a deployment for no gain in correctness.\n */\n private async notify(\n server: FlowsActors_McpServer,\n input: { method: string; accessToken: string | null; sessionId: string | null; timeoutMs: number },\n ): Promise<{ kind: McpOutcomeKind.OK } | McpFailureOutcome> {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), input.timeoutMs);\n try {\n const response = await this.performFetch(server.url, {\n method: 'POST',\n headers: this.headers(input.accessToken, input.sessionId),\n body: JSON.stringify({ jsonrpc: '2.0', method: input.method }),\n signal: controller.signal,\n });\n if (!response.ok) {\n return this.failure(server, McpOutcomeKind.UNREACHABLE, `${input.method}: HTTP ${response.status}`);\n }\n return { kind: McpOutcomeKind.OK };\n } catch {\n const kind = controller.signal.aborted ? McpOutcomeKind.TIMED_OUT : McpOutcomeKind.UNREACHABLE;\n return this.failure(server, kind, `${input.method}: ${kind === McpOutcomeKind.TIMED_OUT ? `exceeded ${input.timeoutMs}ms` : 'request failed'}`);\n } finally {\n clearTimeout(timer);\n }\n }\n\n /**\n * Read the JSON-RPC response for `id` out of an SSE body.\n *\n * The stream may carry server-initiated requests and notifications BEFORE the response, so this\n * cannot take the first event — it matches on the id and ignores everything else. Returns `null`\n * if the stream ends without one, which the caller reports as a protocol error rather than as a\n * timeout: the connection closed, so no budget was exceeded.\n */\n private async readJsonRpcFromEventStream(\n response: Response,\n id: number,\n ): Promise<{ result?: unknown; error?: { code?: number; message?: string } } | null> {\n const body = response.body;\n if (!body) return null;\n\n const reader = body.getReader();\n const decoder = new TextDecoder();\n let buffered = '';\n\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) return null;\n buffered += decoder.decode(value, { stream: true });\n\n // Events are separated by a blank line; a partial trailing event stays buffered.\n let boundary = buffered.indexOf('\\n\\n');\n while (boundary !== -1) {\n const rawEvent = buffered.slice(0, boundary);\n buffered = buffered.slice(boundary + 2);\n const data = rawEvent\n .split('\\n')\n .filter((line) => line.startsWith('data:'))\n .map((line) => line.slice('data:'.length).trim())\n .join('');\n if (data.length > 0) {\n try {\n const parsed = JSON.parse(data) as { id?: unknown; result?: unknown; error?: { code?: number; message?: string } };\n if (parsed?.id === id) return parsed;\n } catch {\n // A single unparseable event does not end the stream — the response may still arrive.\n }\n }\n boundary = buffered.indexOf('\\n\\n');\n }\n }\n } finally {\n await reader.cancel().catch(() => {});\n }\n }\n\n private failure(\n server: FlowsActors_McpServer,\n kind: Exclude<McpOutcomeKind, McpOutcomeKind.OK>,\n detail: string,\n ): McpFailureOutcome {\n return {\n kind,\n mcpServerRef: server.ref,\n destinationHost: mcpServerDestinationHost(server.url),\n detail,\n };\n }\n}\n"]}
|
|
@@ -24,13 +24,17 @@ export declare class PromptCompilerBackendService {
|
|
|
24
24
|
*/
|
|
25
25
|
compile(agent: FlowsActors_Agent, invocation: FlowsActors_Agent_Invocation<any, any, any>, context: PromptIR_ContextItem[], userPromptContent: string): Promise<PromptIR_CompiledPrompt>;
|
|
26
26
|
/**
|
|
27
|
-
* Resolve prompt format from provider
|
|
27
|
+
* Resolve the prompt format from the provider's LLM runtime contract.
|
|
28
|
+
*
|
|
29
|
+
* A provider that declares no `promptFormatPreference` gets the NEUTRAL format
|
|
30
|
+
* (`MARKDOWN_HEADINGS`). This used to fall back to sniffing the provider ref for
|
|
31
|
+
* substrings ('anthropic', 'claude', 'openai', 'gpt') — a provider-ref branch in
|
|
32
|
+
* disguise that the guard test could not see, and dead for every engine provider
|
|
33
|
+
* since all six LLM modules declare the preference. Retired 2026-09-05 (#327):
|
|
34
|
+
* the contract is the only source; a provider that wants a non-neutral format
|
|
35
|
+
* declares it.
|
|
28
36
|
*/
|
|
29
37
|
private resolveFormat;
|
|
30
|
-
/**
|
|
31
|
-
* Infer format from well-known providers
|
|
32
|
-
*/
|
|
33
|
-
private inferFormat;
|
|
34
38
|
/**
|
|
35
39
|
* Render the prompt using the specified format
|
|
36
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-compiler.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/services/prompt-compiler.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,4FAA4F,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAE5B,uBAAuB,EACvB,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-compiler.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/services/prompt-compiler.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,4FAA4F,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAE5B,uBAAuB,EACvB,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AA4D/B,qBACa,4BAA4B;IAKF,OAAO,CAAC,QAAQ,CAAC,MAAM;IAE1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAPlC,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,EAExD,iBAAiB,EAAE,uCAAuC,EAE1D,eAAe,EAAE,6BAA6B;IAQjE;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAIhC;;;;;;;;OAQG;IACG,OAAO,CACX,KAAK,EAAE,iBAAiB,EACxB,UAAU,EAAE,4BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACvD,OAAO,EAAE,oBAAoB,EAAE,EAC/B,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,uBAAuB,CAAC;IAiCnC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,aAAa;IAiBrB;;OAEG;IACH,OAAO,CAAC,MAAM;IAsBd;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,SAAS;IAoJjB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,WAAW;IAsJnB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAc;IAuJtB;;OAEG;IACH,OAAO,CAAC,WAAW;CA2BpB"}
|
|
@@ -17,7 +17,7 @@ import { LoggerService } from '../../monitoring/logger/services/logger.service.j
|
|
|
17
17
|
import { ExternalProvidersRegistryBackendService } from '../../external-providers/services/external-providers-registry.backend.service.js';
|
|
18
18
|
import { ContextCurationBackendService } from './context-curation.backend.service.js';
|
|
19
19
|
import { FlowsActors_Agent_Skill_Type, } from '@wildo-ai/saas-models';
|
|
20
|
-
import { ExternalProvider_ExchangeProtocol_Kind, LLMProvider_PromptFormat, } from '@wildo-ai/external-connectors-models';
|
|
20
|
+
import { ExternalProvider_ExchangeProtocol_Kind, LLMProvider_PromptFormat, ProviderProtocolRuntimeKind, } from '@wildo-ai/external-connectors-models';
|
|
21
21
|
/**
|
|
22
22
|
* Prompt Compiler Backend Service
|
|
23
23
|
*
|
|
@@ -125,30 +125,25 @@ let PromptCompilerBackendService = class PromptCompilerBackendService {
|
|
|
125
125
|
return compiled;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
* Resolve prompt format from provider
|
|
128
|
+
* Resolve the prompt format from the provider's LLM runtime contract.
|
|
129
|
+
*
|
|
130
|
+
* A provider that declares no `promptFormatPreference` gets the NEUTRAL format
|
|
131
|
+
* (`MARKDOWN_HEADINGS`). This used to fall back to sniffing the provider ref for
|
|
132
|
+
* substrings ('anthropic', 'claude', 'openai', 'gpt') — a provider-ref branch in
|
|
133
|
+
* disguise that the guard test could not see, and dead for every engine provider
|
|
134
|
+
* since all six LLM modules declare the preference. Retired 2026-09-05 (#327):
|
|
135
|
+
* the contract is the only source; a provider that wants a non-neutral format
|
|
136
|
+
* declares it.
|
|
129
137
|
*/
|
|
130
138
|
resolveFormat(providerRef) {
|
|
131
139
|
try {
|
|
132
140
|
const runtimeContract = this.providersRegistry.getProviderRuntimeContract(providerRef, ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER);
|
|
133
|
-
if (runtimeContract?.kind ===
|
|
141
|
+
if (runtimeContract?.kind === ProviderProtocolRuntimeKind.LLM && runtimeContract.promptFormatPreference) {
|
|
134
142
|
return runtimeContract.promptFormatPreference;
|
|
135
143
|
}
|
|
136
144
|
}
|
|
137
145
|
catch {
|
|
138
|
-
//
|
|
139
|
-
}
|
|
140
|
-
return this.inferFormat(providerRef);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Infer format from well-known providers
|
|
144
|
-
*/
|
|
145
|
-
inferFormat(providerRef) {
|
|
146
|
-
const lower = providerRef.toLowerCase();
|
|
147
|
-
if (lower.includes('anthropic') || lower.includes('claude')) {
|
|
148
|
-
return LLMProvider_PromptFormat.XML_BOUNDARIES;
|
|
149
|
-
}
|
|
150
|
-
if (lower.includes('openai') || lower.includes('gpt')) {
|
|
151
|
-
return LLMProvider_PromptFormat.MESSAGE_ROLES;
|
|
146
|
+
// A registry that cannot answer yields the neutral format below.
|
|
152
147
|
}
|
|
153
148
|
return LLMProvider_PromptFormat.MARKDOWN_HEADINGS;
|
|
154
149
|
}
|