@wildo-ai/saas-backend-lib 1.0.1
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/__tests__/setup.d.ts +7 -0
- package/dist/esm/__tests__/setup.d.ts.map +1 -0
- package/dist/esm/__tests__/setup.js +14 -0
- package/dist/esm/__tests__/setup.js.map +1 -0
- package/dist/esm/__tests__/test-container.d.ts +39 -0
- package/dist/esm/__tests__/test-container.d.ts.map +1 -0
- package/dist/esm/__tests__/test-container.js +94 -0
- package/dist/esm/__tests__/test-container.js.map +1 -0
- package/dist/esm/applications/models/applications.backend.schemas.d.ts +11 -0
- package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -0
- package/dist/esm/applications/models/applications.backend.schemas.js +15 -0
- package/dist/esm/applications/models/applications.backend.schemas.js.map +1 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts +12 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +30 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts +98 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.js +11 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.js.map +1 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +31 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.js +52 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts +56 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.js +52 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts +33 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.js +125 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts +20 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.js +45 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts +133 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.js +280 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +147 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +1320 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +107 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +369 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts +194 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.js +417 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts +9 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.js +35 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +107 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +800 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +181 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +529 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +245 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +1509 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts +134 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.js +388 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts +9 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.js +26 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +144 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js +49 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts +84 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js +156 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts +42 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js +94 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js.map +1 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +593 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +4015 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts +43 -0
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -0
- package/dist/esm/base-classes/utils/backend-type-utils.js +10 -0
- package/dist/esm/base-classes/utils/backend-type-utils.js.map +1 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts +44 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.js +94 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts +102 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.js +405 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts +55 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js +268 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +83 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +371 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +80 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +255 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -0
- package/dist/esm/billing/services/billing.utils.d.ts +17 -0
- package/dist/esm/billing/services/billing.utils.d.ts.map +1 -0
- package/dist/esm/billing/services/billing.utils.js +25 -0
- package/dist/esm/billing/services/billing.utils.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts +50 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +290 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +92 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +193 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +66 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +180 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts +31 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.js +100 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +33 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +200 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts +58 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +362 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts +19 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.js +50 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts +21 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.js +32 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +114 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +569 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -0
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts +109 -0
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -0
- package/dist/esm/billing/testing/billing-test-fixtures.js +200 -0
- package/dist/esm/billing/testing/billing-test-fixtures.js.map +1 -0
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +152 -0
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -0
- package/dist/esm/billing/testing/mock-billing-provider.js +394 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -0
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts +46 -0
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -0
- package/dist/esm/charts/controllers/chart.backend.controller.js +214 -0
- package/dist/esm/charts/controllers/chart.backend.controller.js.map +1 -0
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts +55 -0
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/charts/services/chart-registry.backend.service.js +102 -0
- package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts +9 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.js +80 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.js +46 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +73 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +291 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +447 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +898 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +127 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +462 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -0
- package/dist/esm/compliance/index.d.ts +2 -0
- package/dist/esm/compliance/index.d.ts.map +1 -0
- package/dist/esm/compliance/index.js +1 -0
- package/dist/esm/compliance/index.js.map +1 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts +31 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.js +112 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.d.ts +29 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.js +143 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.js.map +1 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts +56 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.js +121 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts +35 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.js +89 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.js.map +1 -0
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +1651 -0
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-config.backend.schemas.js +478 -0
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts +74 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.js +115 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts +11 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.js +50 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.js.map +1 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts +48 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.js +106 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts +12 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.js +23 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.js.map +1 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts +39 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.js +124 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +76 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +375 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.service.d.ts +148 -0
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.service.js +494 -0
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +17 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.utils.js +61 -0
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +70 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +470 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts +136 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.js +9 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/databases.backend.schemas.d.ts +32 -0
- package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/databases.backend.schemas.js +60 -0
- package/dist/esm/databases/models/databases.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/filter.backend.schemas.d.ts +83 -0
- package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/filter.backend.schemas.js +27 -0
- package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/sql.backend.schemas.d.ts +75 -0
- package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/sql.backend.schemas.js +31 -0
- package/dist/esm/databases/models/sql.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts +120 -0
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/transaction.shared.schemas.js +30 -0
- package/dist/esm/databases/models/transaction.shared.schemas.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts +15 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.js +60 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts +19 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.js +69 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts +11 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.js +315 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts +29 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.js +65 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts +19 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.js +44 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts +74 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +369 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts +110 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.js +444 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts +38 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.js +180 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts +42 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.js +183 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts +48 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.js +320 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts +47 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.js +187 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts +47 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.js +250 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/db-utils.d.ts +56 -0
- package/dist/esm/databases/services/db-utils.d.ts.map +1 -0
- package/dist/esm/databases/services/db-utils.js +66 -0
- package/dist/esm/databases/services/db-utils.js.map +1 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts +91 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.js +652 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.js.map +1 -0
- package/dist/esm/databases/services/mongodb.service.d.ts +132 -0
- package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -0
- package/dist/esm/databases/services/mongodb.service.js +630 -0
- package/dist/esm/databases/services/mongodb.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts +113 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.js +635 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts +75 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.js +255 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts +116 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.js +624 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.js.map +1 -0
- package/dist/esm/databases/services/redis.service.d.ts +143 -0
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -0
- package/dist/esm/databases/services/redis.service.js +429 -0
- package/dist/esm/databases/services/redis.service.js.map +1 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts +302 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.js +1787 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts +65 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.js +237 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.js.map +1 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts +339 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.js +209 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.js.map +1 -0
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +95 -0
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/error-builder.backend.service.js +334 -0
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -0
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +43 -0
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/error-handler.backend.service.js +219 -0
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +23 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/rate-limit.backend.service.js +59 -0
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts +135 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.js +129 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +18 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +38 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.d.ts +20 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.js +44 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.js.map +1 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts +9 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.js +36 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +83 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +422 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.d.ts +102 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.js +352 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.d.ts +141 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.js +391 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.js.map +1 -0
- package/dist/esm/features/controllers/features.backend.controller.d.ts +35 -0
- package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -0
- package/dist/esm/features/controllers/features.backend.controller.js +179 -0
- package/dist/esm/features/controllers/features.backend.controller.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.d.ts +8 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.js +31 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts +22 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.js +52 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts +13 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.js +36 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.js.map +1 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts +111 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.js +437 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/features/services/feature-gate.backend.service.d.ts +110 -0
- package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-gate.backend.service.js +414 -0
- package/dist/esm/features/services/feature-gate.backend.service.js.map +1 -0
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts +163 -0
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-resolution.backend.service.js +550 -0
- package/dist/esm/features/services/feature-resolution.backend.service.js.map +1 -0
- package/dist/esm/features/testing/feature-test-utils.d.ts +85 -0
- package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -0
- package/dist/esm/features/testing/feature-test-utils.js +127 -0
- package/dist/esm/features/testing/feature-test-utils.js.map +1 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts +34 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.js +226 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/file-analyzers.types.d.ts +76 -0
- package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-analyzers.types.js +16 -0
- package/dist/esm/files/constraints/file-analyzers.types.js.map +1 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts +38 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.js +99 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/file-constraint.types.d.ts +77 -0
- package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-constraint.types.js +16 -0
- package/dist/esm/files/constraints/file-constraint.types.js.map +1 -0
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts +63 -0
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-validation.backend.service.js +317 -0
- package/dist/esm/files/constraints/file-validation.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts +33 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.js +126 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.js.map +1 -0
- package/dist/esm/files/controllers/file.controller.d.ts +145 -0
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -0
- package/dist/esm/files/controllers/file.controller.js +806 -0
- package/dist/esm/files/controllers/file.controller.js.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +85 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +512 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.d.ts +84 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.d.ts.map +1 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.js +224 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.js.map +1 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts +55 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.js +202 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.js.map +1 -0
- package/dist/esm/files/scanning/file-scan.types.d.ts +17 -0
- package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -0
- package/dist/esm/files/scanning/file-scan.types.js +7 -0
- package/dist/esm/files/scanning/file-scan.types.js.map +1 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts +73 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.js +184 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts +12 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.js +41 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts +33 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.js +71 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts +16 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.js +95 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.js.map +1 -0
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts +57 -0
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-field-detection.backend.service.js +145 -0
- package/dist/esm/files/services/file-field-detection.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +103 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.js +604 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-population.backend.service.d.ts +73 -0
- package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-population.backend.service.js +367 -0
- package/dist/esm/files/services/file-population.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.d.ts +64 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.js +188 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +97 -0
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-scanning.backend.service.js +323 -0
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +52 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.js +168 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -0
- package/dist/esm/files/services/files.backend.service.d.ts +235 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/files.backend.service.js +987 -0
- package/dist/esm/files/services/files.backend.service.js.map +1 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts +50 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.js +253 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +156 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.js +10 -0
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts +68 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.js +168 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +57 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +307 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts +41 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +397 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts +30 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +251 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -0
- package/dist/esm/files/utils/file-upload.utils.d.ts +74 -0
- package/dist/esm/files/utils/file-upload.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-upload.utils.js +116 -0
- package/dist/esm/files/utils/file-upload.utils.js.map +1 -0
- package/dist/esm/files/utils/file-uploader.utils.d.ts +15 -0
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-uploader.utils.js +47 -0
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -0
- package/dist/esm/files/utils/file-validation.utils.d.ts +111 -0
- package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-validation.utils.js +516 -0
- package/dist/esm/files/utils/file-validation.utils.js.map +1 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.d.ts +222 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.js +320 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.js.map +1 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts +33 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts.map +1 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.js +96 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.js.map +1 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +225 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +323 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts +77 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.js +28 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.js +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +52 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +307 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts +7 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.js +8 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +30 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js +7 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts +72 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +229 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts +95 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.js +276 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +183 -0
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/agents.backend.service.js +2095 -0
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts +64 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.js +180 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +101 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +313 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -0
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts +64 -0
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/flows.backend.services.js +203 -0
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +91 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +629 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.d.ts +15 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.js +55 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.d.ts +22 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.js +131 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts +15 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.js +43 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts +66 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.js +219 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.js.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts +17 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.js +110 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts +41 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.js +135 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts +33 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.js +105 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.js.map +1 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts +103 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.js +685 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts +23 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.js +57 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts +49 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.js +248 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +64 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +487 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +55 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +208 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -0
- package/dist/esm/i18n/services/i18n.backend.service.d.ts +43 -0
- package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -0
- package/dist/esm/i18n/services/i18n.backend.service.js +83 -0
- package/dist/esm/i18n/services/i18n.backend.service.js.map +1 -0
- package/dist/esm/index.d.ts +203 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +239 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/inject/models/container.d.ts +44 -0
- package/dist/esm/inject/models/container.d.ts.map +1 -0
- package/dist/esm/inject/models/container.js +489 -0
- package/dist/esm/inject/models/container.js.map +1 -0
- package/dist/esm/inject/models/service-types.d.ts +198 -0
- package/dist/esm/inject/models/service-types.d.ts.map +1 -0
- package/dist/esm/inject/models/service-types.js +226 -0
- package/dist/esm/inject/models/service-types.js.map +1 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts +34 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +122 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +41 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +62 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +18 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js +43 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.d.ts +12 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.js +25 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.js.map +1 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +41 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +29 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts +22 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.js +53 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.js.map +1 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +37 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/services/logger.service.js +189 -0
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.d.ts +38 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.js +147 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.d.ts +26 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.js +117 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.d.ts +28 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.js +182 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +86 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.d.ts +57 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.js +77 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.js.map +1 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +27 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js +236 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.d.ts +28 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.js +144 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.js.map +1 -0
- package/dist/esm/monitoring/observability/services/tracer.service.d.ts +24 -0
- package/dist/esm/monitoring/observability/services/tracer.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/tracer.service.js +287 -0
- package/dist/esm/monitoring/observability/services/tracer.service.js.map +1 -0
- package/dist/esm/notifications/email/components/email-components.d.ts +90 -0
- package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -0
- package/dist/esm/notifications/email/components/email-components.js +171 -0
- package/dist/esm/notifications/email/components/email-components.js.map +1 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +80 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +25 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +1 -0
- package/dist/esm/notifications/email/models/email-template-definition.d.ts +68 -0
- package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-template-definition.js +12 -0
- package/dist/esm/notifications/email/models/email-template-definition.js.map +1 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.d.ts +19 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.js +66 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.js.map +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.d.ts +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.js +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.js.map +1 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts +74 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.js +196 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +49 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +141 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.d.ts +74 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.js +215 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +37 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +121 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.d.ts +115 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.js +634 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +48 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +146 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +58 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +223 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts +49 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +204 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +76 -0
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email.backend.service.js +294 -0
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +56 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.js +108 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts +8 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.js +15 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.js.map +1 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts +50 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.js +281 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.js.map +1 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +94 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.js +292 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +202 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +1290 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +50 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.js +209 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +58 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +184 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts +56 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.js +109 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +96 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +396 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts +39 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.js +73 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts +22 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.js +35 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts +10 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +77 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts +10 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.js +131 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts +22 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.js +21 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts +25 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.js +34 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts +32 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.js +66 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +126 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +370 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts +86 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.js +176 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.js.map +1 -0
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts +42 -0
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/cron-job-sync.backend.service.js +181 -0
- package/dist/esm/queue/cron-job-sync.backend.service.js.map +1 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +84 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +275 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -0
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts +111 -0
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-completion-registry.backend.service.js +237 -0
- package/dist/esm/queue/job-completion-registry.backend.service.js.map +1 -0
- package/dist/esm/queue/job-consumer.backend.service.d.ts +109 -0
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-consumer.backend.service.js +515 -0
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -0
- package/dist/esm/queue/job-executor.backend.service.d.ts +53 -0
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-executor.backend.service.js +278 -0
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -0
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts +86 -0
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-payload-storage.backend.service.js +250 -0
- package/dist/esm/queue/job-payload-storage.backend.service.js.map +1 -0
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts +97 -0
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-status-tracking.backend.service.js +281 -0
- package/dist/esm/queue/job-status-tracking.backend.service.js.map +1 -0
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +71 -0
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue-monitoring.backend.service.js +297 -0
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +63 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +171 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -0
- package/dist/esm/queue/queue.backend.service.d.ts +108 -0
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue.backend.service.js +419 -0
- package/dist/esm/queue/queue.backend.service.js.map +1 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts +74 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.js +189 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.js.map +1 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +124 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +250 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts +34 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.js +42 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.js.map +1 -0
- package/dist/esm/requests/models/requests.backend.schemas.d.ts +48 -0
- package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -0
- package/dist/esm/requests/models/requests.backend.schemas.js +7 -0
- package/dist/esm/requests/models/requests.backend.schemas.js.map +1 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.d.ts +6 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.d.ts.map +1 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.js +20 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.js.map +1 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.d.ts +84 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.js +462 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.js.map +1 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts +9 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.js +36 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.js.map +1 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts +6 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.js +47 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.js.map +1 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts +111 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.js +354 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.js.map +1 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts +9 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.js +36 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.js.map +1 -0
- package/dist/esm/requests/service/websocket.service.d.ts +507 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -0
- package/dist/esm/requests/service/websocket.service.js +2222 -0
- package/dist/esm/requests/service/websocket.service.js.map +1 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts +3 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +17 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -0
- package/dist/esm/resources/models/index.d.ts +7 -0
- package/dist/esm/resources/models/index.d.ts.map +1 -0
- package/dist/esm/resources/models/index.js +7 -0
- package/dist/esm/resources/models/index.js.map +1 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts +4 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +7 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts +3 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +19 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +13 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js +14 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -0
- package/dist/esm/resources/models/resources.backend.schemas.d.ts +7 -0
- package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -0
- package/dist/esm/resources/models/resources.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources.backend.schemas.js.map +1 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts +121 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.js +10 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.js.map +1 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts +25 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.js +59 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.js.map +1 -0
- package/dist/esm/resources/services/resource-context.backend.service.d.ts +321 -0
- package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-context.backend.service.js +723 -0
- package/dist/esm/resources/services/resource-context.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resource-id.backend.service.d.ts +110 -0
- package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-id.backend.service.js +267 -0
- package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resource-population.backend.service.d.ts +149 -0
- package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-population.backend.service.js +543 -0
- package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +151 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js +867 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts +72 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.js +254 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.js.map +1 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +73 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +275 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +43 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js +70 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts +253 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.js +329 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.js.map +1 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts +45 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.map +1 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.js +73 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.js.map +1 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts +315 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js +1525 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts +60 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.js +150 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +11 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +188 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/http-server.backend.service.js +755 -0
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +240 -0
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/start-application.backend.service.js +977 -0
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts +10 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.js +13 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.js.map +1 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts +15 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.js +42 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.js.map +1 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts +85 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.js +171 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.js.map +1 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +19 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +59 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts +31 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.js +215 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +493 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +2371 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts +83 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.js +113 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.js.map +1 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts +98 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.js +59 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +42 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js +98 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +163 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js +12 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts +102 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.js +7 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts +88 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.js +17 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts +27 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.js +66 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.js.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts +30 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.js +44 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts +19 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.js +43 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts +37 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.js +58 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +85 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +379 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +79 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +205 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +59 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +179 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +116 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +436 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts +67 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +222 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +80 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +368 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts +75 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.js +139 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts +72 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.js +127 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +57 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +459 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts +44 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +131 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts +58 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js +209 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts +46 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.js +124 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +165 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +816 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +218 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +1026 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts +150 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +737 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts +224 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.js +593 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts +267 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.js +1376 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts +93 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.js +396 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts +40 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.js +92 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +82 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +325 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts +66 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.js +198 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +108 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +406 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +366 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +2631 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts +13 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +53 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.d.ts +12 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.js +41 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.d.ts +18 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.js +140 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.js +112 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js +101 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.d.ts +18 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.js +136 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +19 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +154 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts +26 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +657 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts +27 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.js +60 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts +23 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.js +44 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts +89 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.js +192 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts +20 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.js +55 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts +50 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +135 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts +26 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.js +59 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.js.map +1 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +137 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +723 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +28 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +156 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +4 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +72 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts +125 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.js +69 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/index.d.ts +3 -0
- package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/index.js +3 -0
- package/dist/esm/security/consumable-tokens/models/index.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts +26 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.js +55 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +142 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +446 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts +46 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.js +147 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.js.map +1 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts +75 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.js +368 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts +71 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +863 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +275 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +139 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts +35 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.js +232 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.js.map +1 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts +42 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.js +89 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.js.map +1 -0
- package/dist/esm/testing.d.ts +31 -0
- package/dist/esm/testing.d.ts.map +1 -0
- package/dist/esm/testing.js +31 -0
- package/dist/esm/testing.js.map +1 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts +9 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.js +48 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +163 -0
- package/src/__tests__/integration/bulk-repository-write-contract.integration.test.ts +373 -0
- package/src/__tests__/integration/custom-batch-job-execution.integration.test.ts +147 -0
- package/src/__tests__/integration/delete-file-rollback-persistence.integration.test.ts +551 -0
- package/src/__tests__/integration/file-management-nested-persistence.integration.test.ts +487 -0
- package/src/__tests__/integration/file-management-postgresql-persistence.integration.test.ts +466 -0
- package/src/__tests__/integration/files-cleanup-persistence.integration.test.ts +335 -0
- package/src/__tests__/integration/generated-bulk-relationship-runtime.integration.test.ts +545 -0
- package/src/__tests__/integration/lifecycle-delete-rollback-persistence.integration.test.ts +537 -0
- package/src/__tests__/integration/postgresql-contextual-filter-enforcement.integration.test.ts +170 -0
- package/src/__tests__/integration/postgresql-delete-best-effort-boundary.integration.test.ts +604 -0
- package/src/__tests__/integration/prompt-compiler.integration.test.ts +723 -0
- package/src/__tests__/integration/relationship-service-semantics.integration.test.ts +2086 -0
- package/src/__tests__/integration/repositories-registry.integration.test.ts +296 -0
- package/src/__tests__/integration/resource-factory-pipeline.integration.test.ts +556 -0
- package/src/__tests__/integration/resource-services.integration.test.ts +265 -0
- package/src/__tests__/integration/resources-registry.integration.test.ts +327 -0
- package/src/__tests__/integration/services-registry.integration.test.ts +231 -0
- package/src/__tests__/integration/update-many-runtime-guards.integration.test.ts +290 -0
- package/src/__tests__/setup.ts +15 -0
- package/src/__tests__/test-container.ts +120 -0
- package/src/applications/models/applications.backend.schemas.ts +18 -0
- package/src/base-classes/__tests__/batches-cronjobs-executor.test.ts +63 -0
- package/src/base-classes/__tests__/bulk-delete-child-file-guard.test.ts +152 -0
- package/src/base-classes/__tests__/bulk-nested-file-update-coordination.test.ts +171 -0
- package/src/base-classes/__tests__/delete-file-coordination.test.ts +185 -0
- package/src/base-classes/__tests__/postgresql-file-transaction-coordination.test.ts +424 -0
- package/src/base-classes/__tests__/postgresql-repository-contextual-filter-enforcement.test.ts +88 -0
- package/src/base-classes/__tests__/repository-contextual-filter-enforcement.test.ts +87 -0
- package/src/base-classes/__tests__/resource-operation-helper-context-enforcement.test.ts +74 -0
- package/src/base-classes/__tests__/transaction-boundaries.test.ts +153 -0
- package/src/base-classes/models/manual-controllers.backend.definition.ts +56 -0
- package/src/base-classes/models/repositories.backend.schemas.ts +105 -0
- package/src/base-classes/services/__tests__/mock-resource-operation-helper.service.ts +61 -0
- package/src/base-classes/services/batches/batches-cronjobs-custom-execution.service.ts +148 -0
- package/src/base-classes/services/batches/batches-cronjobs-executor.backend.service.ts +115 -0
- package/src/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.ts +58 -0
- package/src/base-classes/services/controllers/__tests__/controller-request-validation.utils.test.ts +292 -0
- package/src/base-classes/services/controllers/__tests__/controller-resource-file-upload-routes.test.ts +1335 -0
- package/src/base-classes/services/controllers/__tests__/controller-resource.version-conflict.test.ts +372 -0
- package/src/base-classes/services/controllers/abstract-controller.backend.service.ts +302 -0
- package/src/base-classes/services/controllers/controller-resource.backend.service.ts +1833 -0
- package/src/base-classes/services/controllers/controllers-registry-handler.backend.service.ts +494 -0
- package/src/base-classes/services/controllers/validate-field-handler.backend.service.ts +613 -0
- package/src/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.ts +31 -0
- package/src/base-classes/services/repositories/__tests__/repository-resource.singleton-read.test.ts +50 -0
- package/src/base-classes/services/repositories/postgresql-resource-repository.backend.service.ts +1207 -0
- package/src/base-classes/services/repositories/repositories-registry-handler.backend.service.ts +804 -0
- package/src/base-classes/services/repositories/repository-resource.backend.service.ts +2186 -0
- package/src/base-classes/services/resource-operations-helper.backend.service.ts +468 -0
- package/src/base-classes/services/services/__tests__/mock-services-registry-handler.service.ts +21 -0
- package/src/base-classes/services/services/__tests__/services-registry-handler.notifications.test.ts +65 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.ts +305 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts +224 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation.factory.backend.ts +331 -0
- package/src/base-classes/services/services/services-registry-handler.backend.service.ts +6288 -0
- package/src/base-classes/utils/backend-type-utils.ts +64 -0
- package/src/billing/services/back-office/__tests__/billing-feature-sync.backend.service.test.ts +132 -0
- package/src/billing/services/back-office/__tests__/billing-state.backend.service.test.ts +245 -0
- package/src/billing/services/back-office/__tests__/product-catalog-sync.backend.service.test.ts +238 -0
- package/src/billing/services/back-office/abstract-billing.backend.service.ts +89 -0
- package/src/billing/services/back-office/billing-feature-sync.backend.service.ts +473 -0
- package/src/billing/services/back-office/billing-state.backend.service.ts +348 -0
- package/src/billing/services/back-office/product-catalog-sync.backend.service.ts +415 -0
- package/src/billing/services/back-office/usage-metering.backend.service.ts +326 -0
- package/src/billing/services/billing.utils.ts +26 -0
- package/src/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.ts +342 -0
- package/src/billing/services/custom-impl/billing-custom-impl-utils.backend.ts +274 -0
- package/src/billing/services/custom-impl/billing-custom-implementations.backend.ts +236 -0
- package/src/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.ts +133 -0
- package/src/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.ts +242 -0
- package/src/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.ts +434 -0
- package/src/billing/services/webhooks/billing-webhook-adapter.backend.service.ts +70 -0
- package/src/billing/services/webhooks/billing-webhook-capability-handler.backend.service.ts +46 -0
- package/src/billing/services/webhooks/billing-webhook-event-router.backend.service.ts +727 -0
- package/src/billing/testing/billing-test-fixtures.ts +296 -0
- package/src/billing/testing/mock-billing-provider.ts +548 -0
- package/src/charts/controllers/__tests__/chart.backend.controller.test.ts +403 -0
- package/src/charts/controllers/chart.backend.controller.ts +238 -0
- package/src/charts/services/__tests__/chart-registry.backend.service.test.ts +120 -0
- package/src/charts/services/chart-registry.backend.service.ts +109 -0
- package/src/compliance/audit-trails/audit-logs.custom-impl.backend.service.ts +104 -0
- package/src/compliance/audit-trails/services/__tests__/mock-audit-logs.service.ts +48 -0
- package/src/compliance/audit-trails/services/audit-event-dispatcher.backend.service.ts +325 -0
- package/src/compliance/audit-trails/services/audit-logs.backend.service.ts +1313 -0
- package/src/compliance/audit-trails/services/siem-webhook-delivery.backend.service.ts +542 -0
- package/src/compliance/index.ts +1 -0
- package/src/config/custom/application-config-controller.backend.service.ts +119 -0
- package/src/config/models/__tests__/app-config-secrets.boundaries.test.ts +56 -0
- package/src/config/models/__tests__/app-config.backend-authored.definitions.test.ts +286 -0
- package/src/config/models/app-config-secrets.backend.schemas.ts +154 -0
- package/src/config/models/app-config.backend-authored.definitions.ts +165 -0
- package/src/config/models/app-config.backend.schemas.ts +614 -0
- package/src/config/models/app-env-config.backend.schemas.ts +135 -0
- package/src/config/models/config-mutation-boundary.utils.ts +76 -0
- package/src/config/models/postgresql-env-config.backend.schemas.ts +126 -0
- package/src/config/models/runtime-topology.backend.contracts.ts +42 -0
- package/src/config/services/__tests__/app-configuration-loader.backend.service.test.ts +118 -0
- package/src/config/services/__tests__/app-configuration.backend.service.test.ts +40 -0
- package/src/config/services/__tests__/app-configuration.backend.utils.test.ts +72 -0
- package/src/config/services/__tests__/application-startup-config-validator.backend.service.test.ts +404 -0
- package/src/config/services/__tests__/mock-app-configuration.service.ts +131 -0
- package/src/config/services/app-configuration-loader.backend.service.ts +443 -0
- package/src/config/services/app-configuration.backend.service.ts +570 -0
- package/src/config/services/app-configuration.backend.utils.ts +94 -0
- package/src/config/services/application-startup-config-validator.backend.service.ts +611 -0
- package/src/databases/models/aggregation.backend.schemas.ts +174 -0
- package/src/databases/models/databases.backend.schemas.ts +70 -0
- package/src/databases/models/filter.backend.schemas.ts +101 -0
- package/src/databases/models/sql.backend.schemas.ts +111 -0
- package/src/databases/models/transaction.shared.schemas.ts +172 -0
- package/src/databases/services/__tests__/mock-mongo-transaction-registry.service.ts +90 -0
- package/src/databases/services/__tests__/mock-mongodb.service.ts +86 -0
- package/src/databases/services/__tests__/mock-mongoose-model.service.ts +411 -0
- package/src/databases/services/__tests__/mock-redis.service.ts +72 -0
- package/src/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.ts +41 -0
- package/src/databases/services/__tests__/mongo-aggregation-compiler.test.ts +918 -0
- package/src/databases/services/__tests__/postgresql-filter.backend.service.test.ts +180 -0
- package/src/databases/services/__tests__/sql-hybrid-transform.test.ts +73 -0
- package/src/databases/services/aggregation/__tests__/aggregation-authorization.backend.service.test.ts +444 -0
- package/src/databases/services/aggregation/__tests__/aggregation-query.backend.service.test.ts +150 -0
- package/src/databases/services/aggregation/__tests__/computed-measure-evaluator.test.ts +525 -0
- package/src/databases/services/aggregation/__tests__/field-access-validator.test.ts +458 -0
- package/src/databases/services/aggregation/__tests__/time-series-densifier.test.ts +631 -0
- package/src/databases/services/aggregation/__tests__/window-function-processor.test.ts +598 -0
- package/src/databases/services/aggregation/aggregation-authorization.backend.service.ts +516 -0
- package/src/databases/services/aggregation/aggregation-query.backend.service.ts +514 -0
- package/src/databases/services/aggregation/computed-measure-evaluator.backend.service.ts +196 -0
- package/src/databases/services/aggregation/field-access-validator.backend.service.ts +225 -0
- package/src/databases/services/aggregation/time-series-densifier.backend.service.ts +389 -0
- package/src/databases/services/aggregation/topn-processor.backend.service.ts +221 -0
- package/src/databases/services/aggregation/window-function-processor.backend.service.ts +301 -0
- package/src/databases/services/db-utils.ts +96 -0
- package/src/databases/services/mongo-aggregation.backend.service.ts +762 -0
- package/src/databases/services/mongodb.service.ts +736 -0
- package/src/databases/services/postgresql-aggregation.backend.service.ts +794 -0
- package/src/databases/services/postgresql-database.backend.service.ts +288 -0
- package/src/databases/services/postgresql-filter.backend.service.ts +673 -0
- package/src/databases/services/redis.service.ts +531 -0
- package/src/databases/services/zod-to-mongoose-schema-convertor.backend.service.ts +2486 -0
- package/src/databases/services/zod-to-sql-hybrid-schema.planner.ts +312 -0
- package/src/errors/services/__tests__/error-builder.backend.service.test.ts +31 -0
- package/src/errors/services/__tests__/error-handler.backend.service.test.ts +82 -0
- package/src/errors/services/__tests__/mock-error-builder.service.ts +288 -0
- package/src/errors/services/error-builder.backend.service.ts +403 -0
- package/src/errors/services/error-handler.backend.service.ts +236 -0
- package/src/errors/services/rate-limit.backend.service.ts +45 -0
- package/src/external-providers/models/external-providers.backend.schemas.ts +243 -0
- package/src/external-providers/services/__tests__/external-providers-registry.backend.service.test.ts +136 -0
- package/src/external-providers/services/__tests__/feature-bindings.backend.service.test.ts +40 -0
- package/src/external-providers/services/__tests__/mock-external-providers-registry.service.ts +33 -0
- package/src/external-providers/services/__tests__/mock-lazy-provider-registry.service.ts +45 -0
- package/src/external-providers/services/external-api-handler.backend.service.ts +19 -0
- package/src/external-providers/services/external-providers-registry.backend.service.ts +534 -0
- package/src/external-providers/services/feature-bindings.backend.service.ts +422 -0
- package/src/external-providers/services/lazy-provider-registry.backend.service.ts +486 -0
- package/src/features/__tests__/feature-builders.test.ts +152 -0
- package/src/features/controllers/__tests__/features.backend.controller.test.ts +173 -0
- package/src/features/controllers/features.backend.controller.ts +200 -0
- package/src/features/services/__tests__/feature-definition-registry.backend.service.test.ts +152 -0
- package/src/features/services/__tests__/feature-gate.test.ts +484 -0
- package/src/features/services/__tests__/feature-resolution.backend.service.test.ts +203 -0
- package/src/features/services/__tests__/mock-capability-bindings.service.ts +26 -0
- package/src/features/services/__tests__/mock-feature-definition-registry.service.ts +56 -0
- package/src/features/services/__tests__/mock-feature-resolution.service.ts +36 -0
- package/src/features/services/feature-definition-registry.backend.service.ts +537 -0
- package/src/features/services/feature-gate.backend.service.ts +522 -0
- package/src/features/services/feature-resolution.backend.service.ts +652 -0
- package/src/features/testing/feature-test-utils.ts +200 -0
- package/src/files/batches/__tests__/files-cleanup.batch.backend.service.test.ts +186 -0
- package/src/files/batches/files-cleanup.batch.backend.service.ts +259 -0
- package/src/files/constraints/file-analyzers.types.ts +85 -0
- package/src/files/constraints/file-constraint-resolver-chain.backend.service.ts +99 -0
- package/src/files/constraints/file-constraint.types.ts +104 -0
- package/src/files/constraints/file-validation.backend.service.ts +359 -0
- package/src/files/constraints/resource-field-constraint-resolver.backend.service.ts +138 -0
- package/src/files/controllers/__tests__/file.controller.behavior.test.ts +655 -0
- package/src/files/controllers/file.controller.ts +1030 -0
- package/src/files/handlers/__tests__/resource-file-upload-handler.backend.service.test.ts +392 -0
- package/src/files/handlers/resource-file-upload-handler.backend.service.ts +605 -0
- package/src/files/rag/weaviate-vector-store.backend.service.ts +271 -0
- package/src/files/scanning/clamav-scanner.backend.service.ts +214 -0
- package/src/files/scanning/file-scan.types.ts +17 -0
- package/src/files/scanning/yara-scanner.backend.service.ts +212 -0
- package/src/files/services/__tests__/file-field-detection.backend.service.test.ts +91 -0
- package/src/files/services/__tests__/file-operation-handler.backend.service.test.ts +272 -0
- package/src/files/services/__tests__/file-population.backend.service.test.ts +120 -0
- package/src/files/services/__tests__/file-scanning.backend.service.test.ts +163 -0
- package/src/files/services/__tests__/files.backend.service.test.ts +885 -0
- package/src/files/services/__tests__/mock-file-field-detection.service.ts +43 -0
- package/src/files/services/__tests__/mock-file-operation-handler.service.ts +113 -0
- package/src/files/services/__tests__/mock-file-repository.service.ts +104 -0
- package/src/files/services/file-field-detection.backend.service.ts +156 -0
- package/src/files/services/file-operation-handler.backend.service.ts +861 -0
- package/src/files/services/file-population.backend.service.ts +485 -0
- package/src/files/services/file-rag-indexing.backend.service.ts +229 -0
- package/src/files/services/file-scanning.backend.service.ts +373 -0
- package/src/files/services/file-text-extraction.backend.service.ts +193 -0
- package/src/files/services/files.backend.service.ts +1356 -0
- package/src/files/storage/file-storage-path-resolver.backend.service.ts +289 -0
- package/src/files/storage/file-storage-provider.types.ts +188 -0
- package/src/files/storage/file-storage-router.backend.service.ts +172 -0
- package/src/files/storage/local-directory-storage-provider.backend.service.ts +417 -0
- package/src/files/storage/wildo-managed-storage-provider.backend.service.ts +530 -0
- package/src/files/utils/__tests__/file-field-schema-path.backend.utils.test.ts +44 -0
- package/src/files/utils/__tests__/file-uploader.utils.test.ts +57 -0
- package/src/files/utils/__tests__/file-validation.utils.test.ts +559 -0
- package/src/files/utils/file-field-schema-path.backend.utils.ts +385 -0
- package/src/files/utils/file-upload.utils.ts +146 -0
- package/src/files/utils/file-uploader.utils.ts +65 -0
- package/src/files/utils/file-validation.utils.ts +753 -0
- package/src/flows-actors/agent-catalogs.backend.ts +427 -0
- package/src/flows-actors/controllers/flows-actors.controller.ts +91 -0
- package/src/flows-actors/models/agent-catalogs.backend.definitions.ts +430 -0
- package/src/flows-actors/models/agent-facets.backend.definitions.ts +120 -0
- package/src/flows-actors/models/agents.backend.definitions.ts +4 -0
- package/src/flows-actors/models/core-facets.backend.definitions.ts +348 -0
- package/src/flows-actors/models/flows-actors.backend.definitions.ts +13 -0
- package/src/flows-actors/models/flows-actors.backend.schemas.ts +44 -0
- package/src/flows-actors/services/__tests__/agent-facets-catalogs.test.ts +544 -0
- package/src/flows-actors/services/__tests__/agents.backend.service.cli-runtime.test.ts +234 -0
- package/src/flows-actors/services/actors-system.backend.service.ts +270 -0
- package/src/flows-actors/services/agent-facets.backend.service.ts +350 -0
- package/src/flows-actors/services/agents.backend.service.ts +2730 -0
- package/src/flows-actors/services/context-curation.backend.service.ts +203 -0
- package/src/flows-actors/services/flows-actors-registry.service.ts +374 -0
- package/src/flows-actors/services/flows.backend.services.ts +237 -0
- package/src/flows-actors/services/prompt-compiler.backend.service.ts +734 -0
- package/src/flows-actors/utils/__tests__/cli-runtime-operation-support.backend.utils.test.ts +95 -0
- package/src/flows-actors/utils/cli-runtime-operation-support.backend.utils.ts +87 -0
- package/src/flows-actors/utils/cli-runtime-runner.backend.utils.ts +171 -0
- package/src/flows-actors/utils/flows-actors-frontend-extractor.utils.ts +63 -0
- package/src/flows-actors/utils/prompt-ir-adapters.backend.utils.ts +257 -0
- package/src/guidance/batches/dormancy-detection.batch.backend.service.ts +126 -0
- package/src/guidance/services/__tests__/guidance-trigger-evaluator.backend.service.test.ts +49 -0
- package/src/guidance/services/__tests__/lifecycle-evaluator.backend.service.test.ts +85 -0
- package/src/guidance/services/__tests__/milestone-definition-registry.backend.service.test.ts +211 -0
- package/src/guidance/services/__tests__/milestone-evaluator.backend.service.test.ts +561 -0
- package/src/guidance/services/guidance-trigger-evaluator.backend.service.ts +151 -0
- package/src/guidance/services/lifecycle-custom-implementations.backend.ts +139 -0
- package/src/guidance/services/lifecycle-evaluator.backend.service.ts +908 -0
- package/src/guidance/services/milestone-condition-registry.backend.service.ts +57 -0
- package/src/guidance/services/milestone-definition-registry.backend.service.ts +265 -0
- package/src/guidance/services/milestone-evaluator.backend.service.ts +611 -0
- package/src/i18n/controllers/i18n-controller.backend.service.ts +227 -0
- package/src/i18n/services/i18n.backend.service.ts +88 -0
- package/src/index.ts +286 -0
- package/src/inject/models/container.ts +586 -0
- package/src/inject/models/service-types.ts +488 -0
- package/src/monitoring/analytics/controllers/analytics.backend.controller.ts +114 -0
- package/src/monitoring/analytics/services/value-moment-engine.backend.service.ts +53 -0
- package/src/monitoring/analytics/services/value-moment-handler-registry.backend.service.ts +38 -0
- package/src/monitoring/logger/middleware/logging.middleware.ts +40 -0
- package/src/monitoring/logger/models/logger.backend.schemas.ts +56 -0
- package/src/monitoring/logger/services/__tests__/mock-logger.service.ts +49 -0
- package/src/monitoring/logger/services/logger.service.ts +214 -0
- package/src/monitoring/observability/middleware/metrics.middleware.ts +205 -0
- package/src/monitoring/observability/middleware/telemetry.middleware.ts +188 -0
- package/src/monitoring/observability/middleware/tracing.middleware.ts +265 -0
- package/src/monitoring/observability/models/observability.backend.schemas.ts +96 -0
- package/src/monitoring/observability/services/instrumentations/custom.instrumentations.ts +132 -0
- package/src/monitoring/observability/services/metrics.service.ts +266 -0
- package/src/monitoring/observability/services/telemetry.service.ts +157 -0
- package/src/monitoring/observability/services/tracer.service.ts +334 -0
- package/src/notifications/email/components/email-components.ts +341 -0
- package/src/notifications/email/models/email-context-provider.interface.ts +107 -0
- package/src/notifications/email/models/email-template-definition.ts +74 -0
- package/src/notifications/email/models/email-template.actors-system.backend.definitions.ts +80 -0
- package/src/notifications/email/models/email.backend.scheamas.ts +0 -0
- package/src/notifications/email/services/email-batch-send.batch.backend.service.ts +236 -0
- package/src/notifications/email/services/email-context-provider-registry.backend.service.ts +157 -0
- package/src/notifications/email/services/email-renderer.backend.service.ts +274 -0
- package/src/notifications/email/services/email-template-compiler.backend.service.ts +136 -0
- package/src/notifications/email/services/email-template-generation.backend.service.ts +811 -0
- package/src/notifications/email/services/email-template-registry.backend.service.ts +166 -0
- package/src/notifications/email/services/email-template-sandbox.backend.service.ts +255 -0
- package/src/notifications/email/services/email-template-validator.backend.service.ts +229 -0
- package/src/notifications/email/services/email.backend.service.ts +429 -0
- package/src/notifications/email/utils/color-conversion.utils.ts +142 -0
- package/src/notifications/email/utils/interpolate-email-label.utils.ts +16 -0
- package/src/notifications/email/utils/zod-to-typescript.utils.ts +352 -0
- package/src/notifications/services/__tests__/notifications-dispatcher.operation-semantics.test.ts +773 -0
- package/src/notifications/services/__tests__/notifications-dispatcher.websocket-integration.test.ts +173 -0
- package/src/notifications/services/notification-badge.backend.service.ts +412 -0
- package/src/notifications/services/notifications-dispatcher.backend.service.ts +1696 -0
- package/src/notifications/sms/services/sms.backend.service.ts +283 -0
- package/src/notifications/webhooks/controllers/webhook-auto-controller.backend.service.ts +220 -0
- package/src/notifications/webhooks/services/polymorphic-lookup.backend.service.ts +131 -0
- package/src/notifications/webhooks/services/webhook-handler.backend.service.ts +481 -0
- package/src/organizations/services/__tests__/org-creation-on-registration.backend.utils.test.ts +193 -0
- package/src/organizations/services/__tests__/org-member-roles-validation.backend.utils.test.ts +101 -0
- package/src/organizations/services/__tests__/organization-custom-implementation.backend.service.test.ts +113 -0
- package/src/organizations/services/__tests__/scim-provisioning-gate.backend.utils.test.ts +94 -0
- package/src/organizations/services/__tests__/user-org-type-grant.backend.utils.test.ts +164 -0
- package/src/organizations/services/__tests__/user-type-revocation-on-org-leave.backend.utils.test.ts +161 -0
- package/src/organizations/services/org-creation-on-registration.backend.utils.ts +119 -0
- package/src/organizations/services/org-member-roles-validation.backend.utils.ts +51 -0
- package/src/organizations/services/organization-custom-implementation.backend.service.ts +106 -0
- package/src/organizations/services/organization-member-custom-implementation.backend.service.ts +150 -0
- package/src/organizations/services/scim-provisioning-gate.backend.utils.ts +34 -0
- package/src/organizations/services/user-org-type-grant.backend.utils.ts +49 -0
- package/src/organizations/services/user-type-revocation-on-org-leave.backend.utils.ts +102 -0
- package/src/queue/adapters/rabbitmq-adapter.backend.service.ts +494 -0
- package/src/queue/apps-crontabs-manager.backend.service.ts +258 -0
- package/src/queue/cron-job-sync.backend.service.ts +184 -0
- package/src/queue/domain-queue-consumer.backend.service.ts +333 -0
- package/src/queue/job-completion-registry.backend.service.ts +342 -0
- package/src/queue/job-consumer.backend.service.ts +646 -0
- package/src/queue/job-executor.backend.service.ts +315 -0
- package/src/queue/job-payload-storage.backend.service.ts +297 -0
- package/src/queue/job-status-tracking.backend.service.ts +376 -0
- package/src/queue/queue-monitoring.backend.service.ts +333 -0
- package/src/queue/queue-worker-initializer.backend.service.ts +179 -0
- package/src/queue/queue.backend.service.ts +530 -0
- package/src/queue/scheduled-message-verifier.backend.service.ts +228 -0
- package/src/queue/worker-shutdown-manager.backend.service.ts +298 -0
- package/src/requests/models/api-routes.backend.defintions.ts +45 -0
- package/src/requests/models/requests.backend.schemas.ts +73 -0
- package/src/requests/service/__tests__/websocket.service.auth-refresh.test.ts +361 -0
- package/src/requests/service/__tests__/websocket.service.resource-room-validation.test.ts +234 -0
- package/src/requests/service/__tests__/websocket.service.variant-authorization.test.ts +94 -0
- package/src/requests/service/platform-mutualized-handler.backend.service.ts +19 -0
- package/src/requests/service/platform-requests.backend.utils.ts +54 -0
- package/src/requests/service/remote-client-base.backend.service.ts +485 -0
- package/src/requests/service/serverless-services-handler.backend.service.ts +19 -0
- package/src/requests/service/websocket.service.ts +2844 -0
- package/src/resources/models/custom-service-implementations.backend.definition.ts +22 -0
- package/src/resources/models/index.ts +7 -0
- package/src/resources/models/resources-operations.backend.definitions.ts +9 -0
- package/src/resources/models/resources-relationships.backend.definitions.ts +30 -0
- package/src/resources/models/resources-types.backend.schemas.ts +14 -0
- package/src/resources/models/resources.backend.schemas.ts +6 -0
- package/src/resources/models/virtual-fields.backend.types.ts +132 -0
- package/src/resources/services/__tests__/mock-resources-registry.service.ts +69 -0
- package/src/resources/services/__tests__/resource-id.backend.service.test.ts +69 -0
- package/src/resources/services/resource-context.backend.service.ts +1107 -0
- package/src/resources/services/resource-id.backend.service.ts +280 -0
- package/src/resources/services/resource-population.backend.service.ts +761 -0
- package/src/resources/services/resources-registry.backend.service.ts +1126 -0
- package/src/resources/services/virtual-fields.backend.service.ts +303 -0
- package/src/runtime/__tests__/execution-context-creator.backend.service.test.ts +469 -0
- package/src/runtime/controllers/health-controller.backend.service.ts +297 -0
- package/src/runtime/domain-module.backend.definitions.test.ts +83 -0
- package/src/runtime/domain-module.backend.definitions.ts +161 -0
- package/src/runtime/models/execution-context.backend.schemas.ts +456 -0
- package/src/runtime/models/runtime.backend.schemas.ts +82 -0
- package/src/runtime/services/execution-context-creator.backend.service.ts +2102 -0
- package/src/runtime/services/execution-context-handler.backend.service.ts +224 -0
- package/src/runtime/services/health-readiness-contributor.backend.interface.ts +11 -0
- package/src/runtime/services/http-server.backend.service.ts +870 -0
- package/src/runtime/services/start-application.backend.service.ts +1109 -0
- package/src/runtime/testing/execution-context-test-fixtures.ts +14 -0
- package/src/runtime/testing/mock-execution-context-creator.service.ts +46 -0
- package/src/runtime/utils/scan-default-exports.backend.utils.ts +247 -0
- package/src/security/authentications/__tests__/auth-registration.test.ts +338 -0
- package/src/security/authentications/__tests__/authentication-controller.test.ts +31 -0
- package/src/security/authentications/__tests__/authentication-orchestrator.test.ts +27 -0
- package/src/security/authentications/__tests__/saml-assertion-validator.test.ts +631 -0
- package/src/security/authentications/__tests__/saml-authentication.test.ts +126 -0
- package/src/security/authentications/__tests__/saml-integration-test-helpers.test.ts +234 -0
- package/src/security/authentications/__tests__/saml-metadata.test.ts +185 -0
- package/src/security/authentications/__tests__/saml-replay-guard.test.ts +99 -0
- package/src/security/authentications/__tests__/saml-sso-flow.integration.test.ts +355 -0
- package/src/security/authentications/__tests__/saml-test-fixtures.test.ts +433 -0
- package/src/security/authentications/__tests__/saml-test-parser.test.ts +117 -0
- package/src/security/authentications/__tests__/sso-connection-custom-ops.integration.test.ts +236 -0
- package/src/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.ts +71 -0
- package/src/security/authentications/controllers/auth-method-management-controller.backend.service.ts +205 -0
- package/src/security/authentications/controllers/authentication-controller.backend.service.ts +2712 -0
- package/src/security/authentications/models/auth-constants.backend.ts +141 -0
- package/src/security/authentications/models/authentications.backend.schemas.ts +106 -0
- package/src/security/authentications/models/jwt.backend.schemas.ts +107 -0
- package/src/security/authentications/models/oauth2-connection.backend.schemas.ts +196 -0
- package/src/security/authentications/models/saml-authentication.backend.schemas.ts +124 -0
- package/src/security/authentications/models/sso-connection.backend.schemas.ts +104 -0
- package/src/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.ts +73 -0
- package/src/security/authentications/services/__tests__/mock-auth-token-issuer.service.ts +46 -0
- package/src/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.ts +40 -0
- package/src/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.ts +67 -0
- package/src/security/authentications/services/admin-config/auth-organization-configuration.service.ts +424 -0
- package/src/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.ts +244 -0
- package/src/security/authentications/services/admin-config/domain-verification.backend.service.ts +215 -0
- package/src/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.ts +509 -0
- package/src/security/authentications/services/admin-config/oidc-discovery.backend.service.ts +250 -0
- package/src/security/authentications/services/anonymous-session.backend.service.ts +442 -0
- package/src/security/authentications/services/auth-credential-verifier.backend.service.ts +147 -0
- package/src/security/authentications/services/auth-execution-context-factory.backend.service.ts +132 -0
- package/src/security/authentications/services/auth-methods/auth-method-management.backend.service.ts +532 -0
- package/src/security/authentications/services/auth-methods/auth-mfa.backend.service.ts +141 -0
- package/src/security/authentications/services/auth-methods/auth-password-reset.backend.service.ts +215 -0
- package/src/security/authentications/services/auth-methods/auth-phone-verification.backend.service.ts +136 -0
- package/src/security/authentications/services/auth-methods/auth-registration.backend.service.ts +994 -0
- package/src/security/authentications/services/auth-methods/oauth2-authentication.backend.service.ts +1210 -0
- package/src/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.ts +903 -0
- package/src/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.ts +791 -0
- package/src/security/authentications/services/auth-methods/saml-authentication.backend.service.ts +1727 -0
- package/src/security/authentications/services/auth-methods/saml-metadata.backend.service.ts +432 -0
- package/src/security/authentications/services/auth-methods/saml-replay-guard.backend.service.ts +90 -0
- package/src/security/authentications/services/auth-methods/webauthn.backend.service.ts +393 -0
- package/src/security/authentications/services/auth-session-store.backend.service.ts +211 -0
- package/src/security/authentications/services/auth-token-issuer.backend.service.ts +496 -0
- package/src/security/authentications/services/authentication-orchestrator.backend.service.ts +3156 -0
- package/src/security/authentications/services/custom-impls/auth-custom-implementations.backend.ts +88 -0
- package/src/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.ts +54 -0
- package/src/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.ts +167 -0
- package/src/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.ts +136 -0
- package/src/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.ts +123 -0
- package/src/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.ts +161 -0
- package/src/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.ts +185 -0
- package/src/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.ts +792 -0
- package/src/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.ts +62 -0
- package/src/security/authentications/services/utils/auth-controller.utils.ts +51 -0
- package/src/security/authentications/services/utils/auth-credential-ops.backend.service.ts +202 -0
- package/src/security/authentications/services/utils/auth-response-helper.backend.service.ts +38 -0
- package/src/security/authentications/services/utils/auth-user-lookup.backend.service.ts +128 -0
- package/src/security/authentications/services/utils/saml-java-availability.ts +64 -0
- package/src/security/authorizations/__tests__/authorizations.backend.service.test.ts +82 -0
- package/src/security/authorizations/services/authorizations.backend.service.ts +934 -0
- package/src/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.ts +168 -0
- package/src/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.ts +92 -0
- package/src/security/consumable-tokens/models/consumable-tokens.shared.schemas.ts +86 -0
- package/src/security/consumable-tokens/models/index.ts +3 -0
- package/src/security/consumable-tokens/services/__tests__/mock-consumable-token.service.ts +63 -0
- package/src/security/consumable-tokens/services/consumable-token.backend.service.ts +568 -0
- package/src/security/jwt/services/auth-jwt-guard.backend.service.ts +137 -0
- package/src/security/jwt/services/jwt.backend.service.ts +397 -0
- package/src/security/scim/__tests__/scim-filter-parser.test.ts +121 -0
- package/src/security/scim/controllers/scim.backend.controller.ts +1066 -0
- package/src/security/scim/models/scim-protocol.backend.schemas.ts +258 -0
- package/src/security/scim/utils/scim-filter-parser.ts +289 -0
- package/src/security/scim/utils/scim-response-formatter.ts +122 -0
- package/src/testing.ts +30 -0
- package/src/types/xmldom.d.ts +9 -0
- package/src/users/services/user-self-custom-implementations.backend.ts +62 -0
|
@@ -0,0 +1,2730 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { injectable, inject } from 'inversify';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import Bottleneck from 'bottleneck';
|
|
5
|
+
import { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';
|
|
6
|
+
import { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';
|
|
7
|
+
import { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';
|
|
8
|
+
import { FlowsActorsRegistryService } from './flows-actors-registry.service';
|
|
9
|
+
import { ExternalProvidersRegistryBackendService } from '~wildo-backend-lib/external-providers/services/external-providers-registry.backend.service';
|
|
10
|
+
import { PromptCompilerBackendService } from './prompt-compiler.backend.service';
|
|
11
|
+
import {
|
|
12
|
+
FlowsActors_Agent,
|
|
13
|
+
FlowsActors_Agent_Status,
|
|
14
|
+
FlowsActors_Agent_Invocation,
|
|
15
|
+
PromptIR_ContextItem,
|
|
16
|
+
PromptIR_TrustLevel,
|
|
17
|
+
PromptIR_ContextSourceKind,
|
|
18
|
+
ErrorType,
|
|
19
|
+
ErrorCustomMessageReference,
|
|
20
|
+
} from '@wildo-ai/saas-models';
|
|
21
|
+
import {
|
|
22
|
+
APPLICATION_ENVIRONMENT,
|
|
23
|
+
CLIRuntime_AuthMode,
|
|
24
|
+
CLIRuntime_Configuration,
|
|
25
|
+
CLIRuntime_ExecutionProfile,
|
|
26
|
+
CLIRuntime_ModelBindingPlaceholder,
|
|
27
|
+
CLIRuntime_OutputParserMode,
|
|
28
|
+
CLIRuntime_Profile,
|
|
29
|
+
LLMProvider_ExecutionArtifactMetadata,
|
|
30
|
+
LLMProvider_ExecutionTransportMetadata,
|
|
31
|
+
LLMProvider_ExecutionTransportKind,
|
|
32
|
+
LLMProvider_ExecutionTransportMetadataSchema,
|
|
33
|
+
LLMProvider_UsageSchema,
|
|
34
|
+
ExternalProvider_ExchangeProtocol_Kind,
|
|
35
|
+
ExternalProvider_RateLimitConfigurationSchema,
|
|
36
|
+
LLMProvider_Configuration,
|
|
37
|
+
LLMProvider_OperationKey,
|
|
38
|
+
LLMProvider_MessageRole,
|
|
39
|
+
} from '@wildo-ai/external-connectors-models';
|
|
40
|
+
import { openai, createOpenAI } from '@ai-sdk/openai';
|
|
41
|
+
import { anthropic, createAnthropic } from '@ai-sdk/anthropic';
|
|
42
|
+
import { google } from '@ai-sdk/google';
|
|
43
|
+
import { mistral, createMistral } from '@ai-sdk/mistral';
|
|
44
|
+
import { perplexity, createPerplexity } from '@ai-sdk/perplexity';
|
|
45
|
+
import { xai, createXai } from '@ai-sdk/xai';
|
|
46
|
+
import { generateText, streamText, generateObject } from 'ai';
|
|
47
|
+
import { userInputToContextItem } from '~wildo-backend-lib/flows-actors/utils/prompt-ir-adapters.backend.utils';
|
|
48
|
+
import {
|
|
49
|
+
CLIRuntimeCommandExecutionResult,
|
|
50
|
+
CLIRuntimeRunnerError,
|
|
51
|
+
executeCLIRuntimeCommand,
|
|
52
|
+
resolveCLIRuntimeWorkingDirectory,
|
|
53
|
+
} from '~wildo-backend-lib/flows-actors/utils/cli-runtime-runner.backend.utils';
|
|
54
|
+
import {
|
|
55
|
+
assessCLIRuntimeOperationSupport,
|
|
56
|
+
getCLIRuntimeOperationBinding,
|
|
57
|
+
getEffectiveCLIRuntimeOutputParserMode,
|
|
58
|
+
} from '~wildo-backend-lib/flows-actors/utils/cli-runtime-operation-support.backend.utils';
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
interface executeOperationParams {
|
|
63
|
+
providerClient: any;
|
|
64
|
+
providerRef: string;
|
|
65
|
+
config: FlowsActors_Agent['config'];
|
|
66
|
+
operationKey: LLMProvider_OperationKey;
|
|
67
|
+
systemPrompt: string;
|
|
68
|
+
instructions: string;
|
|
69
|
+
input: any;
|
|
70
|
+
llmProviderConfig?: LLMProvider_Configuration;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface CompiledExecutionPrompts {
|
|
74
|
+
systemPrompt: string;
|
|
75
|
+
instructions: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface AgentExecutionResult {
|
|
79
|
+
output: unknown;
|
|
80
|
+
usage?: unknown;
|
|
81
|
+
transport?: LLMProvider_ExecutionTransportMetadata;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface ResolvedCLIRuntimeInvocation {
|
|
85
|
+
command: string;
|
|
86
|
+
args?: string[];
|
|
87
|
+
env: NodeJS.ProcessEnv;
|
|
88
|
+
stdinPayload?: string;
|
|
89
|
+
requestedModel: string;
|
|
90
|
+
resolvedModel: string;
|
|
91
|
+
effectiveOutputParserMode: CLIRuntime_OutputParserMode;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type ResolvedAgentExecution =
|
|
95
|
+
| {
|
|
96
|
+
transport: 'api';
|
|
97
|
+
providerRef: string;
|
|
98
|
+
operationKey: LLMProvider_OperationKey;
|
|
99
|
+
llmProviderConfig?: LLMProvider_Configuration;
|
|
100
|
+
}
|
|
101
|
+
| {
|
|
102
|
+
transport: 'cli';
|
|
103
|
+
providerRef: string;
|
|
104
|
+
operationKey: LLMProvider_OperationKey;
|
|
105
|
+
executionProfileRef: string;
|
|
106
|
+
llmProviderConfig?: LLMProvider_Configuration;
|
|
107
|
+
cliRuntimeConfig: CLIRuntime_Configuration;
|
|
108
|
+
cliRuntimeProfile: CLIRuntime_Profile;
|
|
109
|
+
cliExecutionProfile: CLIRuntime_ExecutionProfile;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const DEFAULT_MAX_STRUCTURED_DATA_FIELD_ALLOWED = 99;
|
|
113
|
+
const CLIRUNTIME_BASE_INHERITED_ENV_KEYS = [
|
|
114
|
+
'PATH',
|
|
115
|
+
'HOME',
|
|
116
|
+
'USER',
|
|
117
|
+
'LOGNAME',
|
|
118
|
+
'SHELL',
|
|
119
|
+
'TMPDIR',
|
|
120
|
+
'TMP',
|
|
121
|
+
'TEMP',
|
|
122
|
+
'LANG',
|
|
123
|
+
'LC_ALL',
|
|
124
|
+
'LC_CTYPE',
|
|
125
|
+
'TERM',
|
|
126
|
+
'COLORTERM',
|
|
127
|
+
'NO_COLOR',
|
|
128
|
+
'FORCE_COLOR',
|
|
129
|
+
'CI',
|
|
130
|
+
'XDG_CONFIG_HOME',
|
|
131
|
+
'XDG_CACHE_HOME',
|
|
132
|
+
'XDG_STATE_HOME',
|
|
133
|
+
'XDG_RUNTIME_DIR',
|
|
134
|
+
'SSL_CERT_FILE',
|
|
135
|
+
'SSL_CERT_DIR',
|
|
136
|
+
'HTTP_PROXY',
|
|
137
|
+
'HTTPS_PROXY',
|
|
138
|
+
'NO_PROXY',
|
|
139
|
+
] as const;
|
|
140
|
+
|
|
141
|
+
@injectable()
|
|
142
|
+
export class AgentsBackendService {
|
|
143
|
+
|
|
144
|
+
protected logDebug: (message: string, context?: Record<string, unknown>) => void;
|
|
145
|
+
|
|
146
|
+
// Bottleneck instances per provider for rate limiting LLM calls
|
|
147
|
+
private readonly bottleneckInstances: Map<string, Bottleneck> = new Map();
|
|
148
|
+
|
|
149
|
+
constructor(
|
|
150
|
+
@inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,
|
|
151
|
+
@inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,
|
|
152
|
+
@inject(SAAS_SERVICE_TYPES.FlowsActorsRegistryService) private readonly flowsActorsRegistry: FlowsActorsRegistryService,
|
|
153
|
+
@inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService) private readonly externalProvidersRegistry: ExternalProvidersRegistryBackendService,
|
|
154
|
+
@inject(SAAS_SERVICE_TYPES.PromptCompilerService) private readonly promptCompiler: PromptCompilerBackendService,
|
|
155
|
+
) {
|
|
156
|
+
this.logDebug = this.logger.debugByType('AgentsBackend');
|
|
157
|
+
this.logger.setDebugTypeLogging('AgentsBackend', false);
|
|
158
|
+
|
|
159
|
+
this.logDebug('Agents backend service created');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ================================
|
|
163
|
+
// Structured Data Chunking Utilities
|
|
164
|
+
// ================================
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
private mergeChunkedObjects<T extends Record<string, unknown>>(chunks: T[]): T {
|
|
168
|
+
if (chunks.length === 0) {
|
|
169
|
+
return {} as T;
|
|
170
|
+
}
|
|
171
|
+
if (chunks.length === 1) {
|
|
172
|
+
return chunks[0];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Deep merge nested objects instead of shallow merge
|
|
176
|
+
const result = { ...chunks[0] } as any;
|
|
177
|
+
|
|
178
|
+
for (let i = 1; i < chunks.length; i++) {
|
|
179
|
+
const chunk = chunks[i];
|
|
180
|
+
for (const key in chunk) {
|
|
181
|
+
if (chunk.hasOwnProperty(key)) {
|
|
182
|
+
const chunkValue = chunk[key];
|
|
183
|
+
const resultValue = result[key];
|
|
184
|
+
|
|
185
|
+
// If both values are plain objects, deep merge them
|
|
186
|
+
if (
|
|
187
|
+
chunkValue !== null &&
|
|
188
|
+
typeof chunkValue === 'object' &&
|
|
189
|
+
!Array.isArray(chunkValue) &&
|
|
190
|
+
resultValue !== null &&
|
|
191
|
+
typeof resultValue === 'object' &&
|
|
192
|
+
!Array.isArray(resultValue) &&
|
|
193
|
+
resultValue.constructor === Object &&
|
|
194
|
+
chunkValue.constructor === Object
|
|
195
|
+
) {
|
|
196
|
+
result[key] = this.mergeChunkedObjects([resultValue, chunkValue]);
|
|
197
|
+
} else {
|
|
198
|
+
// Otherwise, use the chunk value (last one wins for conflicts)
|
|
199
|
+
result[key] = chunkValue;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return result as T;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Count leaf fields in a Zod schema recursively
|
|
210
|
+
* Leaf fields are non-object fields (strings, numbers, enums, etc.)
|
|
211
|
+
*/
|
|
212
|
+
private countLeafFields(schema: z.ZodSchema<any>): number {
|
|
213
|
+
if (!schema || typeof schema !== 'object' || !('_def' in schema)) {
|
|
214
|
+
return 1; // Treat as a single leaf if not a valid schema
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const def = (schema as any)._def;
|
|
218
|
+
const typeName = def.typeName || def.type;
|
|
219
|
+
|
|
220
|
+
// Handle wrappers - unwrap and count inner type
|
|
221
|
+
if (typeName === 'ZodOptional' || typeName === 'optional' ||
|
|
222
|
+
typeName === 'ZodNullable' || typeName === 'nullable' ||
|
|
223
|
+
typeName === 'ZodDefault' || typeName === 'default') {
|
|
224
|
+
return this.countLeafFields(def.innerType || def.wrapped);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (typeName === 'ZodEffects' || typeName === 'effects' || typeName === 'transform' || typeName === 'refine') {
|
|
228
|
+
return this.countLeafFields(def.schema || def.innerType);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Handle objects - count all nested leaf fields
|
|
232
|
+
if (typeName === 'ZodObject' || typeName === 'object') {
|
|
233
|
+
const shape = typeof def.shape === 'function' ? def.shape() : def.shape;
|
|
234
|
+
if (!shape) return 1;
|
|
235
|
+
|
|
236
|
+
let count = 0;
|
|
237
|
+
for (const key of Object.keys(shape)) {
|
|
238
|
+
count += this.countLeafFields(shape[key]);
|
|
239
|
+
}
|
|
240
|
+
return count;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Handle arrays - count element type
|
|
244
|
+
if (typeName === 'ZodArray' || typeName === 'array') {
|
|
245
|
+
return this.countLeafFields(def.element || def.type);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Handle unions - count max of options
|
|
249
|
+
if (typeName === 'ZodUnion' || typeName === 'union' ||
|
|
250
|
+
typeName === 'ZodDiscriminatedUnion' || typeName === 'discriminatedUnion') {
|
|
251
|
+
const options = def.options || [];
|
|
252
|
+
let maxCount = 0;
|
|
253
|
+
for (const opt of options) {
|
|
254
|
+
maxCount = Math.max(maxCount, this.countLeafFields(opt));
|
|
255
|
+
}
|
|
256
|
+
return maxCount;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// All other types are leaf fields
|
|
260
|
+
return 1;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Flatten a nested Zod object schema to dot-notation paths with their leaf schemas
|
|
265
|
+
* e.g., { a: { b: z.string() } } -> [{ path: ['a', 'b'], schema: z.string() }]
|
|
266
|
+
*/
|
|
267
|
+
private flattenZodSchema(schema: z.ZodSchema<any>, basePath: string[] = []): Array<{ path: string[]; schema: z.ZodSchema<any> }> {
|
|
268
|
+
if (!schema || typeof schema !== 'object' || !('_def' in schema)) {
|
|
269
|
+
return [{ path: basePath, schema }];
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const def = (schema as any)._def;
|
|
273
|
+
const typeName = def.typeName || def.type;
|
|
274
|
+
|
|
275
|
+
// Handle wrappers - preserve wrapper but flatten inner
|
|
276
|
+
if (typeName === 'ZodOptional' || typeName === 'optional' ||
|
|
277
|
+
typeName === 'ZodNullable' || typeName === 'nullable' ||
|
|
278
|
+
typeName === 'ZodDefault' || typeName === 'default' ||
|
|
279
|
+
typeName === 'ZodEffects' || typeName === 'effects' || typeName === 'transform' || typeName === 'refine') {
|
|
280
|
+
// For wrappers, we keep the whole schema as a leaf
|
|
281
|
+
return [{ path: basePath, schema }];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Handle objects - flatten recursively
|
|
285
|
+
if (typeName === 'ZodObject' || typeName === 'object') {
|
|
286
|
+
const shape = typeof def.shape === 'function' ? def.shape() : def.shape;
|
|
287
|
+
if (!shape) return [{ path: basePath, schema }];
|
|
288
|
+
|
|
289
|
+
const result: Array<{ path: string[]; schema: z.ZodSchema<any> }> = [];
|
|
290
|
+
for (const key of Object.keys(shape)) {
|
|
291
|
+
const childFlattened = this.flattenZodSchema(shape[key], [...basePath, key]);
|
|
292
|
+
result.push(...childFlattened);
|
|
293
|
+
}
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// All other types are leaf fields
|
|
298
|
+
return [{ path: basePath, schema }];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Build a nested Zod schema from flattened paths
|
|
303
|
+
*/
|
|
304
|
+
private buildNestedSchemaFromPaths(paths: Array<{ path: string[]; schema: z.ZodSchema<any> }>): z.ZodSchema<any> {
|
|
305
|
+
const nested: Record<string, any> = {};
|
|
306
|
+
|
|
307
|
+
for (const { path, schema } of paths) {
|
|
308
|
+
let current = nested;
|
|
309
|
+
for (let i = 0; i < path.length - 1; i++) {
|
|
310
|
+
const part = path[i];
|
|
311
|
+
if (!current[part]) {
|
|
312
|
+
current[part] = {};
|
|
313
|
+
}
|
|
314
|
+
current = current[part];
|
|
315
|
+
}
|
|
316
|
+
const finalPart = path[path.length - 1];
|
|
317
|
+
current[finalPart] = schema;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Recursively convert nested objects to Zod objects
|
|
321
|
+
const convertToZod = (obj: Record<string, any>): z.ZodSchema<any> => {
|
|
322
|
+
const shape: Record<string, z.ZodTypeAny> = {};
|
|
323
|
+
|
|
324
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
325
|
+
if (value && typeof value === 'object' && '_def' in value) {
|
|
326
|
+
// It's a Zod schema
|
|
327
|
+
shape[key] = value;
|
|
328
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
329
|
+
// It's a nested object, convert recursively
|
|
330
|
+
shape[key] = convertToZod(value);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return z.object(shape);
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
return convertToZod(nested);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
private chunkZodSchema(schema: z.ZodSchema<any>, maxFields: number): z.ZodSchema<any>[] {
|
|
341
|
+
if (!schema || typeof schema !== 'object' || !('_def' in schema)) {
|
|
342
|
+
return [schema];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const def = (schema as any)._def;
|
|
346
|
+
const typeName = def.typeName || def.type;
|
|
347
|
+
|
|
348
|
+
// Only chunk ZodObject schemas
|
|
349
|
+
if (typeName !== 'ZodObject' && typeName !== 'object') {
|
|
350
|
+
return [schema];
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (!def.shape) {
|
|
354
|
+
return [schema];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Count total leaf fields
|
|
358
|
+
const totalLeafFields = this.countLeafFields(schema);
|
|
359
|
+
|
|
360
|
+
this.logDebug('Checking if schema needs chunking', {
|
|
361
|
+
totalLeafFields,
|
|
362
|
+
maxFields,
|
|
363
|
+
needsChunking: totalLeafFields > maxFields,
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
if (totalLeafFields <= maxFields) {
|
|
367
|
+
return [schema];
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Flatten the schema to get all leaf paths
|
|
371
|
+
const flattenedPaths = this.flattenZodSchema(schema);
|
|
372
|
+
|
|
373
|
+
this.logDebug('Chunking nested schema by leaf fields', {
|
|
374
|
+
totalLeafFields,
|
|
375
|
+
maxFields,
|
|
376
|
+
flattenedPathCount: flattenedPaths.length,
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// Use 95% of maxFields to leave buffer
|
|
380
|
+
const chunkSize = Math.floor(maxFields * 0.95);
|
|
381
|
+
const schemaChunks: z.ZodSchema<any>[] = [];
|
|
382
|
+
|
|
383
|
+
for (let i = 0; i < flattenedPaths.length; i += chunkSize) {
|
|
384
|
+
const chunkPaths = flattenedPaths.slice(i, i + chunkSize);
|
|
385
|
+
const chunkSchema = this.buildNestedSchemaFromPaths(chunkPaths);
|
|
386
|
+
schemaChunks.push(chunkSchema);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
this.logDebug('Schema chunked', {
|
|
390
|
+
totalChunks: schemaChunks.length,
|
|
391
|
+
pathsPerChunk: chunkSize,
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
return schemaChunks;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// ================================
|
|
398
|
+
// Bottleneck Rate Limiting
|
|
399
|
+
// ================================
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
private getBottleneckForProvider(
|
|
403
|
+
providerRef: string,
|
|
404
|
+
protocolKind: ExternalProvider_ExchangeProtocol_Kind = ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER
|
|
405
|
+
): Bottleneck {
|
|
406
|
+
const limiterKey = `${providerRef}:${protocolKind}`;
|
|
407
|
+
if (this.bottleneckInstances.has(limiterKey)) {
|
|
408
|
+
const existingLimiter = this.bottleneckInstances.get(limiterKey)!;
|
|
409
|
+
this.logDebug('Returning existing bottleneck instance for provider', { providerRef, protocolKind });
|
|
410
|
+
return existingLimiter;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
this.logDebug('Creating new bottleneck instance for provider', { providerRef, protocolKind });
|
|
414
|
+
const config = this.externalProvidersRegistry.getProviderConfiguration(providerRef, protocolKind);
|
|
415
|
+
|
|
416
|
+
const rateLimitConfig = config && 'rateLimitConfig' in config && config.rateLimitConfig
|
|
417
|
+
? ExternalProvider_RateLimitConfigurationSchema.parse(config.rateLimitConfig)
|
|
418
|
+
: ExternalProvider_RateLimitConfigurationSchema.parse({});
|
|
419
|
+
|
|
420
|
+
// Create bottleneck options
|
|
421
|
+
const bottleneckOptions: Record<string, number | undefined> = {
|
|
422
|
+
maxConcurrent: rateLimitConfig.maxConcurrent ?? 10,
|
|
423
|
+
minTime: rateLimitConfig.minTime,
|
|
424
|
+
reservoir: rateLimitConfig.reservoir,
|
|
425
|
+
reservoirRefreshInterval: rateLimitConfig.reservoirRefreshInterval,
|
|
426
|
+
reservoirRefreshAmount: rateLimitConfig.reservoirRefreshAmount,
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
// Remove undefined values
|
|
430
|
+
Object.keys(bottleneckOptions).forEach(key => {
|
|
431
|
+
if (bottleneckOptions[key] === undefined) {
|
|
432
|
+
delete bottleneckOptions[key];
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
// Create and store bottleneck instance
|
|
437
|
+
const limiter = new Bottleneck(bottleneckOptions);
|
|
438
|
+
|
|
439
|
+
// Add event listeners for rate limiting visibility
|
|
440
|
+
this.setupBottleneckEventListeners(limiter, limiterKey);
|
|
441
|
+
|
|
442
|
+
this.bottleneckInstances.set(limiterKey, limiter);
|
|
443
|
+
|
|
444
|
+
this.logDebug('Bottleneck instance created for provider', {
|
|
445
|
+
providerRef,
|
|
446
|
+
protocolKind,
|
|
447
|
+
maxConcurrent: bottleneckOptions.maxConcurrent,
|
|
448
|
+
minTime: bottleneckOptions.minTime,
|
|
449
|
+
reservoir: bottleneckOptions.reservoir
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
return limiter;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Setup event listeners on bottleneck instance to track rate limiting behavior
|
|
457
|
+
*/
|
|
458
|
+
private setupBottleneckEventListeners(limiter: Bottleneck, providerRef: string): void {
|
|
459
|
+
// Track when jobs are queued (delayed due to rate limiting)
|
|
460
|
+
limiter.on('queued', (info: any) => {
|
|
461
|
+
const jobId = info?.options?.id || 'unknown';
|
|
462
|
+
this.logDebug('API call queued (rate limited - will be delayed)', {
|
|
463
|
+
providerRef,
|
|
464
|
+
jobId,
|
|
465
|
+
queued: limiter.queued(),
|
|
466
|
+
running: limiter.running(),
|
|
467
|
+
done: limiter.done(),
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
// Track when jobs start running (immediate or after queuing)
|
|
472
|
+
limiter.on('executing', (info: any) => {
|
|
473
|
+
const jobId = info?.options?.id || 'unknown';
|
|
474
|
+
this.logDebug('API call executing (running now)', {
|
|
475
|
+
providerRef,
|
|
476
|
+
jobId,
|
|
477
|
+
queued: limiter.queued(),
|
|
478
|
+
running: limiter.running(),
|
|
479
|
+
done: limiter.done(),
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
// Track when jobs complete
|
|
484
|
+
limiter.on('done', (info: any) => {
|
|
485
|
+
const jobId = info?.options?.id || 'unknown';
|
|
486
|
+
this.logDebug('API call completed through rate limiter', {
|
|
487
|
+
providerRef,
|
|
488
|
+
jobId,
|
|
489
|
+
queued: limiter.queued(),
|
|
490
|
+
running: limiter.running(),
|
|
491
|
+
done: limiter.done(),
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// Track when jobs are dropped (queue full or other reasons)
|
|
496
|
+
limiter.on('dropped', (info: any) => {
|
|
497
|
+
const jobId = info?.options?.id || 'unknown';
|
|
498
|
+
this.logger.warn('API call dropped by rate limiter (queue full or limit exceeded)', {
|
|
499
|
+
providerRef,
|
|
500
|
+
jobId,
|
|
501
|
+
queued: limiter.queued(),
|
|
502
|
+
running: limiter.running(),
|
|
503
|
+
});
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// Track when reservoir is depleted
|
|
507
|
+
limiter.on('depleted', () => {
|
|
508
|
+
this.logDebug('Rate limiter reservoir depleted (waiting for refresh)', {
|
|
509
|
+
providerRef,
|
|
510
|
+
queued: limiter.queued(),
|
|
511
|
+
running: limiter.running(),
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
// Track errors in the limiter
|
|
516
|
+
limiter.on('error', (error: any) => {
|
|
517
|
+
this.logger.error('Rate limiter error', {
|
|
518
|
+
providerRef,
|
|
519
|
+
error: error instanceof Error ? error.message : String(error),
|
|
520
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
521
|
+
});
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// ================================
|
|
526
|
+
// Agent Invocation
|
|
527
|
+
// ================================
|
|
528
|
+
|
|
529
|
+
public async invokeAgent(request: FlowsActors_Agent_Invocation<any, any, any>): Promise<FlowsActors_Agent_Invocation<any, any, any>> {
|
|
530
|
+
const startTime = Date.now();
|
|
531
|
+
|
|
532
|
+
this.logDebug('Invoking agent', { agentRef: request.agentRef,hasInput: !!request.input,hasExecutionContext: !!request.executionContext });
|
|
533
|
+
|
|
534
|
+
const agent = this.flowsActorsRegistry.getAgentOrThrow(request.agentRef);
|
|
535
|
+
|
|
536
|
+
this.validateAgentStatus(agent);
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
const result = await this.executeAgent(agent, request);
|
|
540
|
+
|
|
541
|
+
const executionTime = Date.now() - startTime;
|
|
542
|
+
const finishedAt = new Date().toISOString();
|
|
543
|
+
const executionContext = {
|
|
544
|
+
...request.executionContext,
|
|
545
|
+
callDuration: executionTime,
|
|
546
|
+
executionTime,
|
|
547
|
+
finishedAt,
|
|
548
|
+
...(result.usage ? { usage: LLMProvider_UsageSchema.parse(result.usage) } : {}),
|
|
549
|
+
...(result.transport ? { transport: LLMProvider_ExecutionTransportMetadataSchema.parse(result.transport) } : {}),
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
this.logDebug('Agent invocation completed', {agentRef: request.agentRef,executionTime,hasOutput: !!result.output });
|
|
553
|
+
|
|
554
|
+
return {
|
|
555
|
+
...request,
|
|
556
|
+
output: this.normalizeOperationOutput(agent.config.operationKey, result.output),
|
|
557
|
+
executionContext,
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Normalize executor outputs to the shared transport-neutral LLM contract.
|
|
563
|
+
*
|
|
564
|
+
* The current execution helpers naturally produce provider/raw payloads such as
|
|
565
|
+
* plain strings or plain objects. Downstream consumers, however, already rely on
|
|
566
|
+
* the wrapped shared schemas (`{ text }`, `{ object }`, `{ message }`, etc.).
|
|
567
|
+
* Centralizing the normalization here fixes the runtime boundary once instead of
|
|
568
|
+
* forcing every caller to guess the provider-shaped payload.
|
|
569
|
+
*/
|
|
570
|
+
private normalizeOperationOutput(operationKey: LLMProvider_OperationKey, output: unknown): unknown {
|
|
571
|
+
switch (operationKey) {
|
|
572
|
+
case LLMProvider_OperationKey.GENERATE_TEXT:
|
|
573
|
+
case LLMProvider_OperationKey.GENERATE_TEXT_THINKING:
|
|
574
|
+
if (this.isRecord(output) && typeof output.text === 'string') {
|
|
575
|
+
return output;
|
|
576
|
+
}
|
|
577
|
+
return { text: typeof output === 'string' ? output : JSON.stringify(output ?? '') };
|
|
578
|
+
|
|
579
|
+
case LLMProvider_OperationKey.CHAT_COMPLETION:
|
|
580
|
+
case LLMProvider_OperationKey.CHAT_COMPLETION_THINKING:
|
|
581
|
+
case LLMProvider_OperationKey.CHAT_MULTIMODAL:
|
|
582
|
+
case LLMProvider_OperationKey.CHAT_MULTIMODAL_THINKING:
|
|
583
|
+
if (this.isRecord(output) && this.isRecord(output.message)) {
|
|
584
|
+
return output;
|
|
585
|
+
}
|
|
586
|
+
return {
|
|
587
|
+
message: {
|
|
588
|
+
role: LLMProvider_MessageRole.ASSISTANT,
|
|
589
|
+
content: typeof output === 'string' ? output : JSON.stringify(output ?? ''),
|
|
590
|
+
},
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
case LLMProvider_OperationKey.GENERATE_STRUCTURED:
|
|
594
|
+
case LLMProvider_OperationKey.GENERATE_STRUCTURED_THINKING:
|
|
595
|
+
if (this.isRecord(output) && 'object' in output) {
|
|
596
|
+
return output;
|
|
597
|
+
}
|
|
598
|
+
return { object: output };
|
|
599
|
+
|
|
600
|
+
case LLMProvider_OperationKey.STREAM_TEXT:
|
|
601
|
+
case LLMProvider_OperationKey.STREAM_TEXT_THINKING:
|
|
602
|
+
if (this.isRecord(output) && typeof output.textDelta === 'string') {
|
|
603
|
+
return output;
|
|
604
|
+
}
|
|
605
|
+
return { textDelta: typeof output === 'string' ? output : JSON.stringify(output ?? '') };
|
|
606
|
+
|
|
607
|
+
case LLMProvider_OperationKey.STREAM_STRUCTURED:
|
|
608
|
+
case LLMProvider_OperationKey.STREAM_STRUCTURED_THINKING:
|
|
609
|
+
if (this.isRecord(output) && ('object' in output || 'partialObject' in output)) {
|
|
610
|
+
return output;
|
|
611
|
+
}
|
|
612
|
+
return { object: output };
|
|
613
|
+
|
|
614
|
+
default:
|
|
615
|
+
return output;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
private isRecord(value: unknown): value is Record<string, any> {
|
|
620
|
+
return typeof value === 'object' && value !== null;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Execute agent with LLM provider using @ai-sdk
|
|
625
|
+
*/
|
|
626
|
+
private async executeAgent( agent: FlowsActors_Agent, request: FlowsActors_Agent_Invocation<any, any, any>): Promise<AgentExecutionResult> {
|
|
627
|
+
this.logDebug('Executing agent', {
|
|
628
|
+
agentRef: agent.ref,
|
|
629
|
+
operationKey: agent.config.operationKey,
|
|
630
|
+
providerRef: agent.config.providerRef,
|
|
631
|
+
model: agent.config.model,
|
|
632
|
+
executionProfileRef: agent.config.executionProfileRef,
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
const execution = this.resolveAgentExecution(agent);
|
|
636
|
+
const prompts = await this.buildExecutionPrompts(agent, request);
|
|
637
|
+
|
|
638
|
+
if (execution.transport === 'cli') {
|
|
639
|
+
return this.executeAgentViaCLI(agent, request, execution, prompts);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
return this.executeAgentViaApi(agent, request, execution, prompts);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
private resolveAgentExecution(agent: FlowsActors_Agent): ResolvedAgentExecution {
|
|
646
|
+
const providerRef = agent.config.providerRef;
|
|
647
|
+
const operationKey = agent.config.operationKey as LLMProvider_OperationKey;
|
|
648
|
+
const semanticProtocolKind = ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER;
|
|
649
|
+
|
|
650
|
+
if (!this.externalProvidersRegistry.isProviderEnabled(providerRef, semanticProtocolKind)) {
|
|
651
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
652
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
653
|
+
context: {
|
|
654
|
+
providerRef,
|
|
655
|
+
protocolKind: semanticProtocolKind,
|
|
656
|
+
message: 'Provider/protocol is not enabled in application configuration'
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
const llmProtocol = this.externalProvidersRegistry.getCachedProtocol(providerRef, semanticProtocolKind);
|
|
662
|
+
if (!llmProtocol) {
|
|
663
|
+
throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {
|
|
664
|
+
customMessageReference: ErrorCustomMessageReference.NOT_FOUND,
|
|
665
|
+
context: {
|
|
666
|
+
providerRef,
|
|
667
|
+
message: 'Provider not found or LLM protocol not loaded'
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (!('operations' in llmProtocol)) {
|
|
673
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
674
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
675
|
+
context: {
|
|
676
|
+
providerRef,
|
|
677
|
+
message: 'Provider does not support LLM protocol operations'
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (!llmProtocol.operations[operationKey]) {
|
|
683
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
684
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
685
|
+
context: {
|
|
686
|
+
providerRef,
|
|
687
|
+
operationKey,
|
|
688
|
+
message: 'Operation not supported by provider'
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const llmProviderConfig = this.externalProvidersRegistry.getProviderConfiguration(
|
|
694
|
+
providerRef,
|
|
695
|
+
semanticProtocolKind
|
|
696
|
+
) as LLMProvider_Configuration | undefined;
|
|
697
|
+
|
|
698
|
+
const executionProfileRef = agent.config.executionProfileRef;
|
|
699
|
+
if (!executionProfileRef) {
|
|
700
|
+
return {
|
|
701
|
+
transport: 'api',
|
|
702
|
+
providerRef,
|
|
703
|
+
operationKey,
|
|
704
|
+
llmProviderConfig,
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const executionProtocolKind = ExternalProvider_ExchangeProtocol_Kind.CLI_RUNTIME;
|
|
709
|
+
if (!this.externalProvidersRegistry.isProviderEnabled(providerRef, executionProtocolKind)) {
|
|
710
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
711
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
712
|
+
context: {
|
|
713
|
+
providerRef,
|
|
714
|
+
protocolKind: executionProtocolKind,
|
|
715
|
+
executionProfileRef,
|
|
716
|
+
message: 'CLI runtime protocol is not enabled for the selected provider'
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
const cliRuntimeConfig = this.externalProvidersRegistry.getCLIRuntimeConfiguration(providerRef);
|
|
722
|
+
const cliRuntimeProfile = this.externalProvidersRegistry.getCachedCLIRuntimeProfile(providerRef);
|
|
723
|
+
const cliExecutionProfile = this.externalProvidersRegistry.getCLIRuntimeExecutionProfile(
|
|
724
|
+
providerRef,
|
|
725
|
+
executionProfileRef
|
|
726
|
+
);
|
|
727
|
+
|
|
728
|
+
if (!cliRuntimeConfig || !cliRuntimeProfile || !cliExecutionProfile) {
|
|
729
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
730
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
731
|
+
context: {
|
|
732
|
+
providerRef,
|
|
733
|
+
executionProfileRef,
|
|
734
|
+
message: 'CLI runtime protocol metadata or execution profile not found in provider configuration'
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
const execution: Extract<ResolvedAgentExecution, { transport: 'cli' }> = {
|
|
740
|
+
transport: 'cli',
|
|
741
|
+
providerRef,
|
|
742
|
+
operationKey,
|
|
743
|
+
executionProfileRef,
|
|
744
|
+
llmProviderConfig,
|
|
745
|
+
cliRuntimeConfig,
|
|
746
|
+
cliRuntimeProfile,
|
|
747
|
+
cliExecutionProfile,
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
this.validateCLIRuntimeDefinitionSupport(execution, agent.config.model);
|
|
751
|
+
|
|
752
|
+
return execution;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
private async buildExecutionPrompts(
|
|
756
|
+
agent: FlowsActors_Agent,
|
|
757
|
+
request: FlowsActors_Agent_Invocation<any, any, any>
|
|
758
|
+
): Promise<CompiledExecutionPrompts> {
|
|
759
|
+
const rawInstructions = this.extractRawInstructions(request.input);
|
|
760
|
+
|
|
761
|
+
if (agent.promptSpec) {
|
|
762
|
+
const compiled = await this.buildCompiledPrompts(agent, request, rawInstructions);
|
|
763
|
+
return {
|
|
764
|
+
systemPrompt: compiled.systemPrompt,
|
|
765
|
+
instructions: compiled.userPrompt,
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
return {
|
|
770
|
+
systemPrompt: this.buildSystemPrompt(agent, request),
|
|
771
|
+
instructions: rawInstructions,
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
private extractRawInstructions(input: unknown): string {
|
|
776
|
+
if (typeof input === 'object' && input !== null) {
|
|
777
|
+
if ('prompt' in input && typeof input.prompt === 'string') {
|
|
778
|
+
return input.prompt;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if ('messages' in input && Array.isArray(input.messages)) {
|
|
782
|
+
const userMessages = (input.messages as any[]).filter((message: any) => message.role === 'user');
|
|
783
|
+
return userMessages
|
|
784
|
+
.map((message: any) => typeof message.content === 'string' ? message.content : JSON.stringify(message.content))
|
|
785
|
+
.join('\n');
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
return JSON.stringify(input);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
return String(input);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
private async executeAgentViaApi(
|
|
795
|
+
agent: FlowsActors_Agent,
|
|
796
|
+
request: FlowsActors_Agent_Invocation<any, any, any>,
|
|
797
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'api' }>,
|
|
798
|
+
prompts: CompiledExecutionPrompts
|
|
799
|
+
): Promise<AgentExecutionResult> {
|
|
800
|
+
const apiKey = this.externalProvidersRegistry.getProviderApiKey(
|
|
801
|
+
execution.providerRef,
|
|
802
|
+
ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER
|
|
803
|
+
);
|
|
804
|
+
if (!apiKey) {
|
|
805
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
806
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
807
|
+
context: {
|
|
808
|
+
providerRef: execution.providerRef,
|
|
809
|
+
protocolKind: ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER,
|
|
810
|
+
message: 'API key not found for provider. Please configure the provider secrets in application configuration.'
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
const aiProvider = this.getAIProvider(execution.providerRef, apiKey);
|
|
816
|
+
if (!aiProvider) {
|
|
817
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
818
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
819
|
+
context: {
|
|
820
|
+
providerRef: execution.providerRef,
|
|
821
|
+
message: 'AI SDK provider not available'
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
const limiter = this.getBottleneckForProvider(
|
|
827
|
+
execution.providerRef,
|
|
828
|
+
ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER
|
|
829
|
+
);
|
|
830
|
+
const jobId = `${agent.ref}-api-${Date.now()}-${Math.random().toString(36).substring(7)}`;
|
|
831
|
+
|
|
832
|
+
this.logDebug('Scheduling API call through rate limiter', {
|
|
833
|
+
agentRef: agent.ref,
|
|
834
|
+
providerRef: execution.providerRef,
|
|
835
|
+
operationKey: execution.operationKey,
|
|
836
|
+
model: agent.config.model,
|
|
837
|
+
jobId,
|
|
838
|
+
currentQueueSize: limiter.queued(),
|
|
839
|
+
currentRunning: limiter.running(),
|
|
840
|
+
usesPromptCompiler: !!agent.promptSpec,
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
const result = await limiter.schedule(
|
|
844
|
+
{ id: jobId },
|
|
845
|
+
() => this.executeOperation({
|
|
846
|
+
providerClient: aiProvider,
|
|
847
|
+
providerRef: execution.providerRef,
|
|
848
|
+
config: agent.config,
|
|
849
|
+
operationKey: execution.operationKey,
|
|
850
|
+
systemPrompt: prompts.systemPrompt,
|
|
851
|
+
instructions: prompts.instructions,
|
|
852
|
+
input: request.input,
|
|
853
|
+
llmProviderConfig: execution.llmProviderConfig,
|
|
854
|
+
})
|
|
855
|
+
);
|
|
856
|
+
|
|
857
|
+
return {
|
|
858
|
+
...result,
|
|
859
|
+
transport: {
|
|
860
|
+
kind: LLMProvider_ExecutionTransportKind.API,
|
|
861
|
+
protocolKind: ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER,
|
|
862
|
+
providerRef: execution.providerRef,
|
|
863
|
+
model: agent.config.model,
|
|
864
|
+
},
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
private async executeAgentViaCLI(
|
|
869
|
+
agent: FlowsActors_Agent,
|
|
870
|
+
request: FlowsActors_Agent_Invocation<any, any, any>,
|
|
871
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
872
|
+
prompts: CompiledExecutionPrompts
|
|
873
|
+
): Promise<AgentExecutionResult> {
|
|
874
|
+
const limiter = this.getBottleneckForProvider(
|
|
875
|
+
execution.providerRef,
|
|
876
|
+
ExternalProvider_ExchangeProtocol_Kind.CLI_RUNTIME
|
|
877
|
+
);
|
|
878
|
+
const jobId = `${agent.ref}-cli-${Date.now()}-${Math.random().toString(36).substring(7)}`;
|
|
879
|
+
|
|
880
|
+
this.logDebug('Scheduling CLI execution through rate limiter', {
|
|
881
|
+
agentRef: agent.ref,
|
|
882
|
+
providerRef: execution.providerRef,
|
|
883
|
+
operationKey: execution.operationKey,
|
|
884
|
+
executionProfileRef: execution.executionProfileRef,
|
|
885
|
+
jobId,
|
|
886
|
+
currentQueueSize: limiter.queued(),
|
|
887
|
+
currentRunning: limiter.running(),
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
return limiter.schedule({ id: jobId }, async () => {
|
|
891
|
+
this.validateCLIRuntimeDefinitionSupport(execution, agent.config.model);
|
|
892
|
+
this.validateCLIRuntimePolicy(execution);
|
|
893
|
+
|
|
894
|
+
const cliCommandResult = await this.runCLIRuntimeCommand(
|
|
895
|
+
execution,
|
|
896
|
+
agent.config.model,
|
|
897
|
+
this.buildCLIRuntimePromptInput(execution, prompts, request.input),
|
|
898
|
+
);
|
|
899
|
+
|
|
900
|
+
return {
|
|
901
|
+
output: this.parseCLIOperationOutput(execution, cliCommandResult.stdout, request.input),
|
|
902
|
+
transport: this.buildCLITransportMetadata(execution, cliCommandResult),
|
|
903
|
+
};
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
private validateCLIOperationSupport(
|
|
908
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>
|
|
909
|
+
): void {
|
|
910
|
+
const support = assessCLIRuntimeOperationSupport(
|
|
911
|
+
execution.cliRuntimeProfile,
|
|
912
|
+
execution.cliExecutionProfile,
|
|
913
|
+
execution.operationKey,
|
|
914
|
+
);
|
|
915
|
+
if (!support.supported) {
|
|
916
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
917
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
918
|
+
context: {
|
|
919
|
+
providerRef: execution.providerRef,
|
|
920
|
+
executionProfileRef: execution.executionProfileRef,
|
|
921
|
+
operationKey: execution.operationKey,
|
|
922
|
+
supportedOperationKeys: execution.cliRuntimeProfile.supportedOperationKeys,
|
|
923
|
+
message: support.message ?? 'CLI runtime profile does not declare support for the selected semantic LLM operation',
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
private validateCLIModelSupport(
|
|
930
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
931
|
+
requestedModel: string
|
|
932
|
+
): void {
|
|
933
|
+
if (execution.cliRuntimeProfile.supportedModels.includes(requestedModel)) {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
938
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
939
|
+
context: {
|
|
940
|
+
providerRef: execution.providerRef,
|
|
941
|
+
executionProfileRef: execution.executionProfileRef,
|
|
942
|
+
model: requestedModel,
|
|
943
|
+
supportedModels: execution.cliRuntimeProfile.supportedModels,
|
|
944
|
+
message: 'CLI runtime profile does not declare support for the selected semantic model'
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
private validateCLIRuntimeDefinitionSupport(
|
|
950
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
951
|
+
requestedModel: string
|
|
952
|
+
): void {
|
|
953
|
+
this.validateCLIOperationSupport(execution);
|
|
954
|
+
this.validateCLIModelSupport(execution, requestedModel);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Get AI SDK provider client configured with API key
|
|
959
|
+
* Returns a provider client that has a .languageModel() method
|
|
960
|
+
*/
|
|
961
|
+
private getAIProvider(providerRef: string, apiKey: string): any {
|
|
962
|
+
try {
|
|
963
|
+
let providerClient: any;
|
|
964
|
+
|
|
965
|
+
switch (providerRef) {
|
|
966
|
+
case "openai":
|
|
967
|
+
providerClient = createOpenAI({ apiKey } as any);
|
|
968
|
+
break;
|
|
969
|
+
case "anthropic":
|
|
970
|
+
providerClient = createAnthropic({ apiKey } as any);
|
|
971
|
+
break;
|
|
972
|
+
case "google":
|
|
973
|
+
// Google provider might use a different pattern - try google() directly
|
|
974
|
+
providerClient = google({ apiKey } as any);
|
|
975
|
+
// If google() returns a model directly, wrap it
|
|
976
|
+
if (providerClient && !providerClient.languageModel && typeof providerClient !== 'function') {
|
|
977
|
+
// google() might return a model directly, so we need to handle it differently
|
|
978
|
+
// For now, try to use it as-is and handle in executeOperation
|
|
979
|
+
this.logDebug('Google provider returned model directly', {
|
|
980
|
+
hasLanguageModel: typeof providerClient?.languageModel === 'function',
|
|
981
|
+
keys: Object.keys(providerClient).slice(0, 10)
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
break;
|
|
985
|
+
case "mistral":
|
|
986
|
+
providerClient = createMistral({ apiKey } as any);
|
|
987
|
+
break;
|
|
988
|
+
case "perplexity":
|
|
989
|
+
providerClient = createPerplexity({ apiKey } as any);
|
|
990
|
+
break;
|
|
991
|
+
case "grok":
|
|
992
|
+
providerClient = createXai({ apiKey } as any);
|
|
993
|
+
break;
|
|
994
|
+
default:
|
|
995
|
+
return null;
|
|
996
|
+
}
|
|
997
|
+
return providerClient;
|
|
998
|
+
} catch (error) {
|
|
999
|
+
this.logger.error('Failed to initialize AI provider', { providerRef, error: error instanceof Error ? error.message : String(error) });
|
|
1000
|
+
throw error;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
private validateCLIRuntimePolicy(
|
|
1005
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>
|
|
1006
|
+
): void {
|
|
1007
|
+
const applicationEnv = (process.env.APPLICATION_ENV || APPLICATION_ENVIRONMENT.DEVELOPMENT) as APPLICATION_ENVIRONMENT;
|
|
1008
|
+
const platformEnvironmentId = process.env.PLATFORM_ENVIRONMENT_ID;
|
|
1009
|
+
const { cliExecutionProfile } = execution;
|
|
1010
|
+
|
|
1011
|
+
if (!cliExecutionProfile.allowedApplicationEnvironments.includes(applicationEnv)) {
|
|
1012
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1013
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1014
|
+
context: {
|
|
1015
|
+
providerRef: execution.providerRef,
|
|
1016
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1017
|
+
applicationEnv,
|
|
1018
|
+
allowedApplicationEnvironments: cliExecutionProfile.allowedApplicationEnvironments,
|
|
1019
|
+
message: 'CLI runtime execution profile is not allowed in the current application environment'
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
if (
|
|
1025
|
+
cliExecutionProfile.allowedPlatformEnvironmentIds?.length
|
|
1026
|
+
&& (!platformEnvironmentId || !cliExecutionProfile.allowedPlatformEnvironmentIds.includes(platformEnvironmentId))
|
|
1027
|
+
) {
|
|
1028
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1029
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1030
|
+
context: {
|
|
1031
|
+
providerRef: execution.providerRef,
|
|
1032
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1033
|
+
platformEnvironmentId,
|
|
1034
|
+
allowedPlatformEnvironmentIds: cliExecutionProfile.allowedPlatformEnvironmentIds,
|
|
1035
|
+
message: 'CLI runtime execution profile is not allowed in the current platform environment'
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
private buildCLIPromptInput(prompts: CompiledExecutionPrompts): string {
|
|
1042
|
+
if (!prompts.systemPrompt.trim()) {
|
|
1043
|
+
return prompts.instructions;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
return [
|
|
1047
|
+
'[SYSTEM]',
|
|
1048
|
+
prompts.systemPrompt,
|
|
1049
|
+
'',
|
|
1050
|
+
'[USER]',
|
|
1051
|
+
prompts.instructions,
|
|
1052
|
+
].join('\n');
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* CLI runtimes get one synthesized task payload. Structured generation appends
|
|
1057
|
+
* explicit JSON-shape instructions here instead of leaking schemas through
|
|
1058
|
+
* argv, then validates the returned object against the requested Zod schema
|
|
1059
|
+
* after parsing.
|
|
1060
|
+
*/
|
|
1061
|
+
private buildCLIRuntimePromptInput(
|
|
1062
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1063
|
+
prompts: CompiledExecutionPrompts,
|
|
1064
|
+
input?: unknown,
|
|
1065
|
+
): string {
|
|
1066
|
+
const basePrompt = this.buildCLIPromptInput(prompts);
|
|
1067
|
+
if (execution.operationKey !== LLMProvider_OperationKey.GENERATE_STRUCTURED) {
|
|
1068
|
+
return basePrompt;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
const jsonSchema = this.serializeCLIRuntimeStructuredSchema(execution, input);
|
|
1072
|
+
|
|
1073
|
+
return [
|
|
1074
|
+
basePrompt,
|
|
1075
|
+
'',
|
|
1076
|
+
'[STRUCTURED_OUTPUT_REQUIREMENTS]',
|
|
1077
|
+
'Return only a valid JSON object.',
|
|
1078
|
+
'Do not wrap the JSON in markdown fences or commentary.',
|
|
1079
|
+
'The JSON object must conform to this JSON Schema:',
|
|
1080
|
+
jsonSchema,
|
|
1081
|
+
].join('\n');
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
private async runCLIRuntimeCommand(
|
|
1085
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1086
|
+
requestedModel: string,
|
|
1087
|
+
promptPayload: string,
|
|
1088
|
+
): Promise<CLIRuntimeCommandExecutionResult & {
|
|
1089
|
+
workingDirectory: string;
|
|
1090
|
+
requestedModel: string;
|
|
1091
|
+
resolvedModel: string;
|
|
1092
|
+
effectiveOutputParserMode: CLIRuntime_OutputParserMode;
|
|
1093
|
+
}> {
|
|
1094
|
+
const invocation = this.resolveCLIRuntimeInvocation(execution, requestedModel, promptPayload);
|
|
1095
|
+
let cwd: string;
|
|
1096
|
+
try {
|
|
1097
|
+
cwd = resolveCLIRuntimeWorkingDirectory(execution.cliExecutionProfile);
|
|
1098
|
+
} catch (error) {
|
|
1099
|
+
if (error instanceof CLIRuntimeRunnerError) {
|
|
1100
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1101
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1102
|
+
context: {
|
|
1103
|
+
providerRef: execution.providerRef,
|
|
1104
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1105
|
+
...error.details,
|
|
1106
|
+
message: error.message,
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
throw error;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
const timeoutMs = execution.cliExecutionProfile.timeoutMs ?? 120_000;
|
|
1114
|
+
try {
|
|
1115
|
+
const result = await executeCLIRuntimeCommand({
|
|
1116
|
+
command: invocation.command,
|
|
1117
|
+
args: invocation.args,
|
|
1118
|
+
cwd,
|
|
1119
|
+
env: invocation.env,
|
|
1120
|
+
stdinPayload: invocation.stdinPayload,
|
|
1121
|
+
timeoutMs,
|
|
1122
|
+
});
|
|
1123
|
+
|
|
1124
|
+
return {
|
|
1125
|
+
...result,
|
|
1126
|
+
requestedModel: invocation.requestedModel,
|
|
1127
|
+
resolvedModel: invocation.resolvedModel,
|
|
1128
|
+
effectiveOutputParserMode: invocation.effectiveOutputParserMode,
|
|
1129
|
+
workingDirectory: cwd,
|
|
1130
|
+
};
|
|
1131
|
+
} catch (error) {
|
|
1132
|
+
if (error instanceof CLIRuntimeRunnerError) {
|
|
1133
|
+
const errorType = this.getCLIRuntimeRunnerErrorType(error);
|
|
1134
|
+
throw this.errorBuilder.buildError(errorType, undefined, {
|
|
1135
|
+
customMessageReference: errorType === ErrorType.CONFIGURATION
|
|
1136
|
+
? ErrorCustomMessageReference.CONFIGURATION
|
|
1137
|
+
: ErrorCustomMessageReference.INTERNAL,
|
|
1138
|
+
context: {
|
|
1139
|
+
providerRef: execution.providerRef,
|
|
1140
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1141
|
+
...error.details,
|
|
1142
|
+
message: error.message,
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
throw error;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
private getCLIRuntimeRunnerErrorType(error: CLIRuntimeRunnerError): ErrorType {
|
|
1152
|
+
if (error.message.startsWith('Failed to start CLI runtime command')) {
|
|
1153
|
+
return ErrorType.CONFIGURATION;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
return ErrorType.INTERNAL;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
private buildCLITransportMetadata(
|
|
1160
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1161
|
+
commandResult: CLIRuntimeCommandExecutionResult & {
|
|
1162
|
+
workingDirectory: string;
|
|
1163
|
+
requestedModel: string;
|
|
1164
|
+
resolvedModel: string;
|
|
1165
|
+
effectiveOutputParserMode: CLIRuntime_OutputParserMode;
|
|
1166
|
+
}
|
|
1167
|
+
): LLMProvider_ExecutionTransportMetadata {
|
|
1168
|
+
const artifacts: LLMProvider_ExecutionArtifactMetadata[] = [];
|
|
1169
|
+
|
|
1170
|
+
if (commandResult.stdout.length > 0) {
|
|
1171
|
+
artifacts.push({
|
|
1172
|
+
kind: 'stdout',
|
|
1173
|
+
byteLength: Buffer.byteLength(commandResult.stdout),
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
if (commandResult.stderr.length > 0) {
|
|
1178
|
+
artifacts.push({
|
|
1179
|
+
kind: 'stderr',
|
|
1180
|
+
byteLength: Buffer.byteLength(commandResult.stderr),
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
return {
|
|
1185
|
+
kind: LLMProvider_ExecutionTransportKind.CLI,
|
|
1186
|
+
protocolKind: ExternalProvider_ExchangeProtocol_Kind.CLI_RUNTIME,
|
|
1187
|
+
providerRef: execution.providerRef,
|
|
1188
|
+
model: commandResult.requestedModel,
|
|
1189
|
+
resolvedModel: commandResult.resolvedModel,
|
|
1190
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1191
|
+
runnerHost: execution.cliExecutionProfile.runnerHost,
|
|
1192
|
+
outputParserMode: commandResult.effectiveOutputParserMode,
|
|
1193
|
+
command: execution.cliExecutionProfile.command,
|
|
1194
|
+
workingDirectory: commandResult.workingDirectory,
|
|
1195
|
+
exitCode: commandResult.exitCode,
|
|
1196
|
+
signal: commandResult.signal,
|
|
1197
|
+
artifacts: artifacts.length > 0 ? artifacts : undefined,
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
private resolveCLIRuntimeInvocation(
|
|
1202
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1203
|
+
requestedModel: string,
|
|
1204
|
+
promptPayload: string,
|
|
1205
|
+
): ResolvedCLIRuntimeInvocation {
|
|
1206
|
+
const resolvedModel = this.resolveCLIRuntimeModel(execution, requestedModel);
|
|
1207
|
+
const effectiveOutputParserMode = getEffectiveCLIRuntimeOutputParserMode(
|
|
1208
|
+
execution.cliRuntimeProfile,
|
|
1209
|
+
execution.cliExecutionProfile,
|
|
1210
|
+
execution.operationKey,
|
|
1211
|
+
);
|
|
1212
|
+
|
|
1213
|
+
return {
|
|
1214
|
+
command: execution.cliExecutionProfile.command,
|
|
1215
|
+
args: this.buildCLIRuntimeCommandArgs(execution, resolvedModel),
|
|
1216
|
+
env: this.buildCLIRuntimeEnvironment(execution, resolvedModel),
|
|
1217
|
+
stdinPayload: promptPayload,
|
|
1218
|
+
requestedModel,
|
|
1219
|
+
resolvedModel,
|
|
1220
|
+
effectiveOutputParserMode,
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* CLI-backed agents still select their semantic model on `agent.config.model`.
|
|
1226
|
+
* The provider-owned CLI runtime profile defines how that semantic model is
|
|
1227
|
+
* translated into CLI arguments and/or environment variables.
|
|
1228
|
+
*/
|
|
1229
|
+
private resolveCLIRuntimeModel(
|
|
1230
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1231
|
+
requestedModel: string
|
|
1232
|
+
): string {
|
|
1233
|
+
const modelBinding = execution.cliRuntimeProfile.modelBinding;
|
|
1234
|
+
if (!modelBinding) {
|
|
1235
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1236
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1237
|
+
context: {
|
|
1238
|
+
providerRef: execution.providerRef,
|
|
1239
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1240
|
+
requestedModel,
|
|
1241
|
+
message: 'CLI runtime profile is missing modelBinding, so semantic model selection cannot be preserved'
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
return modelBinding.modelValueOverrides?.[requestedModel] ?? requestedModel;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
private buildCLIRuntimeCommandArgs(
|
|
1250
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1251
|
+
resolvedModel: string,
|
|
1252
|
+
): string[] | undefined {
|
|
1253
|
+
const baseArgs = execution.cliExecutionProfile.args ? [...execution.cliExecutionProfile.args] : [];
|
|
1254
|
+
const argumentTemplate = execution.cliRuntimeProfile.modelBinding?.argumentTemplate;
|
|
1255
|
+
const operationArgumentTemplate = getCLIRuntimeOperationBinding(
|
|
1256
|
+
execution.cliRuntimeProfile,
|
|
1257
|
+
execution.operationKey,
|
|
1258
|
+
)?.argumentTemplate;
|
|
1259
|
+
const templateValues = this.buildCLIRuntimeTemplateValues(resolvedModel);
|
|
1260
|
+
|
|
1261
|
+
if (argumentTemplate?.length) {
|
|
1262
|
+
baseArgs.push(
|
|
1263
|
+
...argumentTemplate.map((part) =>
|
|
1264
|
+
this.applyCLIRuntimeTemplateValues(part, templateValues)
|
|
1265
|
+
)
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
if (operationArgumentTemplate?.length) {
|
|
1270
|
+
baseArgs.push(
|
|
1271
|
+
...operationArgumentTemplate.map((part) =>
|
|
1272
|
+
this.applyCLIRuntimeTemplateValues(part, templateValues)
|
|
1273
|
+
)
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
return baseArgs.length > 0 ? baseArgs : undefined;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
private buildCLIRuntimeEnvironment(
|
|
1281
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1282
|
+
resolvedModel: string,
|
|
1283
|
+
): NodeJS.ProcessEnv {
|
|
1284
|
+
const env = this.buildCLIRuntimeBaseEnvironment(execution.cliExecutionProfile);
|
|
1285
|
+
const { cliExecutionProfile } = execution;
|
|
1286
|
+
const templateValues = this.buildCLIRuntimeTemplateValues(resolvedModel);
|
|
1287
|
+
|
|
1288
|
+
if (cliExecutionProfile.authMode === CLIRuntime_AuthMode.SECRET_REF_ENV_INJECTION) {
|
|
1289
|
+
if (!cliExecutionProfile.secretEnvVarName) {
|
|
1290
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1291
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1292
|
+
context: {
|
|
1293
|
+
providerRef: execution.providerRef,
|
|
1294
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1295
|
+
message: 'CLI runtime execution profile is missing secretEnvVarName'
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
const secret = this.externalProvidersRegistry.getCLIRuntimeExecutionProfileSecret(
|
|
1301
|
+
execution.providerRef,
|
|
1302
|
+
execution.executionProfileRef
|
|
1303
|
+
);
|
|
1304
|
+
if (!secret) {
|
|
1305
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1306
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1307
|
+
context: {
|
|
1308
|
+
providerRef: execution.providerRef,
|
|
1309
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1310
|
+
message: 'CLI runtime execution profile secret could not be resolved'
|
|
1311
|
+
}
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
env[cliExecutionProfile.secretEnvVarName] = secret;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
for (const [envKey, envValueTemplate] of Object.entries(
|
|
1319
|
+
execution.cliRuntimeProfile.modelBinding?.environmentVariables ?? {}
|
|
1320
|
+
)) {
|
|
1321
|
+
env[envKey] = this.applyCLIRuntimeTemplateValues(envValueTemplate, templateValues);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
for (const [envKey, envValueTemplate] of Object.entries(
|
|
1325
|
+
getCLIRuntimeOperationBinding(execution.cliRuntimeProfile, execution.operationKey)?.environmentVariables ?? {}
|
|
1326
|
+
)) {
|
|
1327
|
+
env[envKey] = this.applyCLIRuntimeTemplateValues(envValueTemplate, templateValues);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
return env;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
private buildCLIRuntimeBaseEnvironment(
|
|
1334
|
+
profile: Pick<CLIRuntime_ExecutionProfile, 'inheritedEnvironmentVariables'>
|
|
1335
|
+
): NodeJS.ProcessEnv {
|
|
1336
|
+
const env: NodeJS.ProcessEnv = {};
|
|
1337
|
+
const inheritedKeys = new Set<string>([
|
|
1338
|
+
...CLIRUNTIME_BASE_INHERITED_ENV_KEYS,
|
|
1339
|
+
...(profile.inheritedEnvironmentVariables ?? []),
|
|
1340
|
+
]);
|
|
1341
|
+
|
|
1342
|
+
for (const envKey of inheritedKeys) {
|
|
1343
|
+
const envValue = process.env[envKey];
|
|
1344
|
+
if (envValue !== undefined) {
|
|
1345
|
+
env[envKey] = envValue;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
return env;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
private buildCLIRuntimeTemplateValues(resolvedModel: string): Record<string, string> {
|
|
1353
|
+
return {
|
|
1354
|
+
[CLIRuntime_ModelBindingPlaceholder]: resolvedModel,
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
private applyCLIRuntimeTemplateValues(
|
|
1359
|
+
template: string,
|
|
1360
|
+
values: Record<string, string>,
|
|
1361
|
+
): string {
|
|
1362
|
+
let resolved = template;
|
|
1363
|
+
|
|
1364
|
+
for (const [placeholder, value] of Object.entries(values)) {
|
|
1365
|
+
resolved = resolved.replaceAll(placeholder, value);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
return resolved;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Structured CLI execution still needs a real JSON Schema boundary even though
|
|
1373
|
+
* the CLI prompt travels over stdin. We serialize the requested Zod schema
|
|
1374
|
+
* once so the synthesized stdin payload can describe the contract precisely
|
|
1375
|
+
* and the parsed response can be validated against the same shape.
|
|
1376
|
+
*/
|
|
1377
|
+
private serializeCLIRuntimeStructuredSchema(
|
|
1378
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1379
|
+
input?: unknown,
|
|
1380
|
+
): string {
|
|
1381
|
+
try {
|
|
1382
|
+
return JSON.stringify(z.toJSONSchema(this.getCLIRuntimeStructuredSchema(execution, input)));
|
|
1383
|
+
} catch (error) {
|
|
1384
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1385
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1386
|
+
context: {
|
|
1387
|
+
providerRef: execution.providerRef,
|
|
1388
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1389
|
+
operationKey: execution.operationKey,
|
|
1390
|
+
message: 'Failed to serialize the structured output schema for CLI execution',
|
|
1391
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
private parseCLIOperationOutput(
|
|
1398
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1399
|
+
stdout: string,
|
|
1400
|
+
input?: unknown,
|
|
1401
|
+
): unknown {
|
|
1402
|
+
const outputParserMode = getEffectiveCLIRuntimeOutputParserMode(
|
|
1403
|
+
execution.cliRuntimeProfile,
|
|
1404
|
+
execution.cliExecutionProfile,
|
|
1405
|
+
execution.operationKey,
|
|
1406
|
+
);
|
|
1407
|
+
const parsedOutput = outputParserMode === CLIRuntime_OutputParserMode.JSON
|
|
1408
|
+
? this.parseCLIJsonOutput(execution, stdout)
|
|
1409
|
+
: stdout.trim();
|
|
1410
|
+
|
|
1411
|
+
switch (execution.operationKey) {
|
|
1412
|
+
case LLMProvider_OperationKey.GENERATE_TEXT:
|
|
1413
|
+
return {
|
|
1414
|
+
text: this.extractCLITextOutput(parsedOutput),
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
case LLMProvider_OperationKey.GENERATE_STRUCTURED:
|
|
1418
|
+
return {
|
|
1419
|
+
object: this.extractCLIStructuredOutput(execution, parsedOutput, input),
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
default:
|
|
1423
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1424
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1425
|
+
context: {
|
|
1426
|
+
providerRef: execution.providerRef,
|
|
1427
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1428
|
+
operationKey: execution.operationKey,
|
|
1429
|
+
message: 'CLI runtime executor does not implement truthful output normalization for this operation yet'
|
|
1430
|
+
}
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
private parseCLIJsonOutput(
|
|
1436
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1437
|
+
stdout: string
|
|
1438
|
+
): unknown {
|
|
1439
|
+
try {
|
|
1440
|
+
return JSON.parse(stdout);
|
|
1441
|
+
} catch (error) {
|
|
1442
|
+
const outputParserMode = getEffectiveCLIRuntimeOutputParserMode(
|
|
1443
|
+
execution.cliRuntimeProfile,
|
|
1444
|
+
execution.cliExecutionProfile,
|
|
1445
|
+
execution.operationKey,
|
|
1446
|
+
);
|
|
1447
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1448
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1449
|
+
context: {
|
|
1450
|
+
providerRef: execution.providerRef,
|
|
1451
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1452
|
+
outputParserMode,
|
|
1453
|
+
message: 'CLI runtime command did not return valid JSON output',
|
|
1454
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1455
|
+
}
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
private extractCLITextOutput(output: unknown): string {
|
|
1461
|
+
if (typeof output === 'string') {
|
|
1462
|
+
return output;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
if (this.isRecord(output)) {
|
|
1466
|
+
if (typeof output.result === 'string') {
|
|
1467
|
+
return output.result;
|
|
1468
|
+
}
|
|
1469
|
+
if (typeof output.text === 'string') {
|
|
1470
|
+
return output.text;
|
|
1471
|
+
}
|
|
1472
|
+
if (typeof output.output === 'string') {
|
|
1473
|
+
return output.output;
|
|
1474
|
+
}
|
|
1475
|
+
if (typeof output.content === 'string') {
|
|
1476
|
+
return output.content;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
return JSON.stringify(output ?? '');
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
private extractCLIStructuredOutput(
|
|
1484
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1485
|
+
output: unknown,
|
|
1486
|
+
input?: unknown,
|
|
1487
|
+
): unknown {
|
|
1488
|
+
const binding = getCLIRuntimeOperationBinding(
|
|
1489
|
+
execution.cliRuntimeProfile,
|
|
1490
|
+
execution.operationKey,
|
|
1491
|
+
);
|
|
1492
|
+
const path = binding?.jsonOutputPath;
|
|
1493
|
+
|
|
1494
|
+
if (!path?.length) {
|
|
1495
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1496
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1497
|
+
context: {
|
|
1498
|
+
providerRef: execution.providerRef,
|
|
1499
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1500
|
+
operationKey: execution.operationKey,
|
|
1501
|
+
message: 'CLI runtime structured output is missing a configured JSON output path',
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
let current: unknown = output;
|
|
1507
|
+
for (const segment of path) {
|
|
1508
|
+
if (!this.isRecord(current) || !(segment in current)) {
|
|
1509
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1510
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1511
|
+
context: {
|
|
1512
|
+
providerRef: execution.providerRef,
|
|
1513
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1514
|
+
operationKey: execution.operationKey,
|
|
1515
|
+
jsonOutputPath: path,
|
|
1516
|
+
missingSegment: segment,
|
|
1517
|
+
message: 'CLI runtime structured output did not contain the configured JSON payload path',
|
|
1518
|
+
}
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
current = current[segment];
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
let structuredOutput = current;
|
|
1526
|
+
if (typeof structuredOutput === 'string') {
|
|
1527
|
+
try {
|
|
1528
|
+
structuredOutput = JSON.parse(structuredOutput);
|
|
1529
|
+
} catch (error) {
|
|
1530
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1531
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1532
|
+
context: {
|
|
1533
|
+
providerRef: execution.providerRef,
|
|
1534
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1535
|
+
operationKey: execution.operationKey,
|
|
1536
|
+
jsonOutputPath: path,
|
|
1537
|
+
message: 'CLI runtime structured output payload was not valid JSON',
|
|
1538
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
const structuredSchema = this.getCLIRuntimeStructuredSchema(execution, input);
|
|
1545
|
+
|
|
1546
|
+
try {
|
|
1547
|
+
return structuredSchema.parse(structuredOutput);
|
|
1548
|
+
} catch (error) {
|
|
1549
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1550
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1551
|
+
context: {
|
|
1552
|
+
providerRef: execution.providerRef,
|
|
1553
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1554
|
+
operationKey: execution.operationKey,
|
|
1555
|
+
jsonOutputPath: path,
|
|
1556
|
+
message: 'CLI runtime structured output did not satisfy the requested schema',
|
|
1557
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1558
|
+
}
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
private getCLIRuntimeStructuredSchema(
|
|
1564
|
+
execution: Extract<ResolvedAgentExecution, { transport: 'cli' }>,
|
|
1565
|
+
input?: unknown,
|
|
1566
|
+
): z.ZodTypeAny {
|
|
1567
|
+
if (
|
|
1568
|
+
execution.operationKey !== LLMProvider_OperationKey.GENERATE_STRUCTURED
|
|
1569
|
+
|| !input
|
|
1570
|
+
|| typeof input !== 'object'
|
|
1571
|
+
|| !('schema' in input)
|
|
1572
|
+
|| !(input.schema instanceof z.ZodType)
|
|
1573
|
+
) {
|
|
1574
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1575
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1576
|
+
context: {
|
|
1577
|
+
providerRef: execution.providerRef,
|
|
1578
|
+
executionProfileRef: execution.executionProfileRef,
|
|
1579
|
+
operationKey: execution.operationKey,
|
|
1580
|
+
message: 'CLI runtime structured execution requires a Zod schema on the invocation input',
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
return input.schema;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Build system prompt from agent configuration
|
|
1590
|
+
*
|
|
1591
|
+
* If agent has promptSpec, uses the PromptCompiler for structured prompt building.
|
|
1592
|
+
* Otherwise, falls back to legacy skill-based prompt building.
|
|
1593
|
+
*/
|
|
1594
|
+
private buildSystemPrompt(agent: FlowsActors_Agent, request: FlowsActors_Agent_Invocation<any, any, any>): string {
|
|
1595
|
+
const parts: string[] = [];
|
|
1596
|
+
|
|
1597
|
+
if (agent.promptSpec.role) {
|
|
1598
|
+
parts.push(`Role: ${agent.promptSpec.role}`);
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
if (agent.promptSpec.persona) {
|
|
1602
|
+
parts.push(`Persona: ${agent.promptSpec.persona}`);
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
if (request.executionContext) {
|
|
1606
|
+
parts.push(`Context: ${JSON.stringify(request.executionContext)}`);
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
return parts.join('\n\n');
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* Build prompts using the PromptCompiler when agent has promptSpec
|
|
1614
|
+
* Returns compiled system and user prompts
|
|
1615
|
+
*/
|
|
1616
|
+
private async buildCompiledPrompts(
|
|
1617
|
+
agent: FlowsActors_Agent,
|
|
1618
|
+
request: FlowsActors_Agent_Invocation<any, any, any>,
|
|
1619
|
+
instructions: string
|
|
1620
|
+
): Promise<{ systemPrompt: string; userPrompt: string }> {
|
|
1621
|
+
if (!agent.promptSpec) {
|
|
1622
|
+
// Fall back to legacy mode
|
|
1623
|
+
return {
|
|
1624
|
+
systemPrompt: this.buildSystemPrompt(agent, request),
|
|
1625
|
+
userPrompt: instructions,
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
this.logDebug('Building compiled prompts using PromptCompiler', {
|
|
1630
|
+
agentRef: agent.ref,
|
|
1631
|
+
hasInstructions: agent.promptSpec.instructions.length > 0,
|
|
1632
|
+
hasHints: !!agent.promptSpec.hints?.length,
|
|
1633
|
+
hasCuration: !!agent.promptSpec.curation,
|
|
1634
|
+
});
|
|
1635
|
+
|
|
1636
|
+
// Build context items from execution context
|
|
1637
|
+
// Note: User input is NOT added here - it goes in the user prompt section, not context
|
|
1638
|
+
const contextItems: PromptIR_ContextItem[] = [];
|
|
1639
|
+
|
|
1640
|
+
if (request.executionContext) {
|
|
1641
|
+
contextItems.push({
|
|
1642
|
+
id: 'exec_context',
|
|
1643
|
+
content: JSON.stringify(request.executionContext, null, 2),
|
|
1644
|
+
trust: PromptIR_TrustLevel.HIGH,
|
|
1645
|
+
sourceKind: PromptIR_ContextSourceKind.RELATIONSHIP,
|
|
1646
|
+
timestamp: new Date().toISOString(),
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
// Compile using the prompt compiler - works directly with agent + invocation
|
|
1651
|
+
const compiled = await this.promptCompiler.compile(
|
|
1652
|
+
agent,
|
|
1653
|
+
request,
|
|
1654
|
+
contextItems,
|
|
1655
|
+
instructions
|
|
1656
|
+
);
|
|
1657
|
+
|
|
1658
|
+
this.logDebug('Prompts compiled', {
|
|
1659
|
+
agentRef: agent.ref,
|
|
1660
|
+
format: compiled.format,
|
|
1661
|
+
systemPromptLength: compiled.systemPrompt.length,
|
|
1662
|
+
userPromptLength: compiled.userPrompt.length,
|
|
1663
|
+
tokenEstimates: compiled.tokenEstimates,
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
return {
|
|
1667
|
+
systemPrompt: compiled.systemPrompt,
|
|
1668
|
+
userPrompt: compiled.userPrompt,
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Execute operation based on operation key
|
|
1674
|
+
* Dispatches to specific operation handlers
|
|
1675
|
+
*/
|
|
1676
|
+
private async executeOperation({ providerClient, providerRef, config, operationKey, systemPrompt, instructions, input, llmProviderConfig }: executeOperationParams): Promise<{ output: unknown; usage?: any }> {
|
|
1677
|
+
const model = this.getModelFromProvider(providerClient, config.model);
|
|
1678
|
+
const baseOptions = this.buildBaseOptions(config);
|
|
1679
|
+
|
|
1680
|
+
try {
|
|
1681
|
+
switch (operationKey) {
|
|
1682
|
+
case LLMProvider_OperationKey.GENERATE_TEXT:
|
|
1683
|
+
case LLMProvider_OperationKey.GENERATE_TEXT_THINKING:
|
|
1684
|
+
return await this.executeGenerateText({ model, systemPrompt, instructions, baseOptions });
|
|
1685
|
+
|
|
1686
|
+
case LLMProvider_OperationKey.CHAT_COMPLETION:
|
|
1687
|
+
case LLMProvider_OperationKey.CHAT_COMPLETION_THINKING:
|
|
1688
|
+
return await this.executeChatCompletion({ model, systemPrompt, instructions, input, baseOptions });
|
|
1689
|
+
|
|
1690
|
+
case LLMProvider_OperationKey.CHAT_MULTIMODAL:
|
|
1691
|
+
case LLMProvider_OperationKey.CHAT_MULTIMODAL_THINKING:
|
|
1692
|
+
return await this.executeChatMultimodal({ model, systemPrompt, instructions, input, baseOptions });
|
|
1693
|
+
|
|
1694
|
+
case LLMProvider_OperationKey.GENERATE_STRUCTURED:
|
|
1695
|
+
case LLMProvider_OperationKey.GENERATE_STRUCTURED_THINKING:
|
|
1696
|
+
return await this.executeGenerateStructured({ model, systemPrompt, instructions, input, baseOptions, llmProviderConfig, providerRef });
|
|
1697
|
+
|
|
1698
|
+
case LLMProvider_OperationKey.STREAM_TEXT:
|
|
1699
|
+
case LLMProvider_OperationKey.STREAM_TEXT_THINKING:
|
|
1700
|
+
return await this.executeStreamText({ model, systemPrompt, instructions, baseOptions });
|
|
1701
|
+
|
|
1702
|
+
case LLMProvider_OperationKey.STREAM_STRUCTURED:
|
|
1703
|
+
case LLMProvider_OperationKey.STREAM_STRUCTURED_THINKING:
|
|
1704
|
+
return await this.executeStreamStructured({ model, systemPrompt, instructions, baseOptions });
|
|
1705
|
+
|
|
1706
|
+
default:
|
|
1707
|
+
throw this.errorBuilder.buildError(
|
|
1708
|
+
ErrorType.VALIDATION,
|
|
1709
|
+
undefined,
|
|
1710
|
+
{
|
|
1711
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1712
|
+
context: {
|
|
1713
|
+
operationKey,
|
|
1714
|
+
message: `Unsupported operation key: ${operationKey}`,
|
|
1715
|
+
supportedOperations: Object.values(LLMProvider_OperationKey),
|
|
1716
|
+
},
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
} catch (error) {
|
|
1721
|
+
// Re-throw if it's already a built error
|
|
1722
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
1723
|
+
throw error;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
// Extract detailed provider error information
|
|
1727
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
1728
|
+
|
|
1729
|
+
// Log detailed error information
|
|
1730
|
+
this.logger.error('Operation execution failed - provider error details', {
|
|
1731
|
+
operationKey,
|
|
1732
|
+
model: config.model,
|
|
1733
|
+
providerRef: (providerClient as any)?.providerRef || 'unknown',
|
|
1734
|
+
...errorDetails,
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
throw this.errorBuilder.buildError(
|
|
1738
|
+
ErrorType.INTERNAL,
|
|
1739
|
+
undefined,
|
|
1740
|
+
{
|
|
1741
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
1742
|
+
context: {
|
|
1743
|
+
operationKey,
|
|
1744
|
+
model: config.model,
|
|
1745
|
+
message: `Failed to execute operation ${operationKey}: ${errorDetails.errorMessage}`,
|
|
1746
|
+
...errorDetails,
|
|
1747
|
+
},
|
|
1748
|
+
}
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* Get model instance from provider client
|
|
1755
|
+
*/
|
|
1756
|
+
private getModelFromProvider(providerClient: any, modelName: string): any {
|
|
1757
|
+
if (providerClient && typeof providerClient.languageModel === 'function') {
|
|
1758
|
+
try {
|
|
1759
|
+
return providerClient.languageModel(modelName);
|
|
1760
|
+
} catch (error) {
|
|
1761
|
+
this.logger.error('Failed to get model via languageModel()', {
|
|
1762
|
+
modelName,
|
|
1763
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1764
|
+
});
|
|
1765
|
+
throw this.errorBuilder.buildError(
|
|
1766
|
+
ErrorType.VALIDATION,
|
|
1767
|
+
undefined,
|
|
1768
|
+
{
|
|
1769
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1770
|
+
context: {
|
|
1771
|
+
modelName,
|
|
1772
|
+
message: `Failed to initialize model ${modelName} via languageModel() method`,
|
|
1773
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1774
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
1775
|
+
},
|
|
1776
|
+
}
|
|
1777
|
+
);
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
if (typeof providerClient === 'function') {
|
|
1782
|
+
try {
|
|
1783
|
+
return providerClient(modelName);
|
|
1784
|
+
} catch (error) {
|
|
1785
|
+
this.logger.error('Failed to get model via function call', {
|
|
1786
|
+
modelName,
|
|
1787
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1788
|
+
});
|
|
1789
|
+
throw this.errorBuilder.buildError(
|
|
1790
|
+
ErrorType.VALIDATION,
|
|
1791
|
+
undefined,
|
|
1792
|
+
{
|
|
1793
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1794
|
+
context: {
|
|
1795
|
+
modelName,
|
|
1796
|
+
message: `Failed to initialize model ${modelName} via provider function`,
|
|
1797
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1798
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
1799
|
+
},
|
|
1800
|
+
}
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
if (providerClient && typeof providerClient.model === 'function') {
|
|
1806
|
+
try {
|
|
1807
|
+
return providerClient.model(modelName);
|
|
1808
|
+
} catch (error) {
|
|
1809
|
+
this.logger.error('Failed to get model via model()', {
|
|
1810
|
+
modelName,
|
|
1811
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1812
|
+
});
|
|
1813
|
+
throw this.errorBuilder.buildError(
|
|
1814
|
+
ErrorType.VALIDATION,
|
|
1815
|
+
undefined,
|
|
1816
|
+
{
|
|
1817
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1818
|
+
context: {
|
|
1819
|
+
modelName,
|
|
1820
|
+
message: `Failed to initialize model ${modelName} via model() method`,
|
|
1821
|
+
originalError: error instanceof Error ? error.message : String(error),
|
|
1822
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
1823
|
+
},
|
|
1824
|
+
}
|
|
1825
|
+
);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
this.logger.error('Failed to get model from provider client', {
|
|
1830
|
+
providerType: typeof providerClient,
|
|
1831
|
+
providerKeys: providerClient ? Object.keys(providerClient).slice(0, 10) : [],
|
|
1832
|
+
hasLanguageModel: typeof providerClient?.languageModel === 'function',
|
|
1833
|
+
hasModel: typeof providerClient?.model === 'function',
|
|
1834
|
+
isFunction: typeof providerClient === 'function',
|
|
1835
|
+
});
|
|
1836
|
+
|
|
1837
|
+
throw this.errorBuilder.buildError(
|
|
1838
|
+
ErrorType.VALIDATION,
|
|
1839
|
+
undefined,
|
|
1840
|
+
{
|
|
1841
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1842
|
+
context: {
|
|
1843
|
+
modelName,
|
|
1844
|
+
message: 'AI provider client does not support any known model initialization pattern',
|
|
1845
|
+
providerType: typeof providerClient,
|
|
1846
|
+
hasLanguageModel: typeof providerClient?.languageModel === 'function',
|
|
1847
|
+
hasModel: typeof providerClient?.model === 'function',
|
|
1848
|
+
isFunction: typeof providerClient === 'function',
|
|
1849
|
+
},
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* Build base options for LLM operations
|
|
1856
|
+
*/
|
|
1857
|
+
private buildBaseOptions(config: FlowsActors_Agent['config']): any {
|
|
1858
|
+
const baseOptions: any = {
|
|
1859
|
+
temperature: config.temperature,
|
|
1860
|
+
topP: config.topP,
|
|
1861
|
+
};
|
|
1862
|
+
|
|
1863
|
+
// Only set maxOutputTokens if explicitly configured
|
|
1864
|
+
if (config.maxTokens !== undefined) {
|
|
1865
|
+
baseOptions.maxOutputTokens = config.maxTokens;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
if (config.seed !== undefined) {
|
|
1869
|
+
baseOptions.seed = config.seed;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
return baseOptions;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* Execute GENERATE_TEXT operation
|
|
1877
|
+
*/
|
|
1878
|
+
private async executeGenerateText({ model, systemPrompt, instructions, baseOptions }: {
|
|
1879
|
+
model: any;
|
|
1880
|
+
systemPrompt: string;
|
|
1881
|
+
instructions: string;
|
|
1882
|
+
baseOptions: any;
|
|
1883
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
1884
|
+
try {
|
|
1885
|
+
const result = await generateText({
|
|
1886
|
+
model,
|
|
1887
|
+
prompt: instructions,
|
|
1888
|
+
system: systemPrompt,
|
|
1889
|
+
...baseOptions,
|
|
1890
|
+
});
|
|
1891
|
+
|
|
1892
|
+
return {
|
|
1893
|
+
output: {
|
|
1894
|
+
text: result.text,
|
|
1895
|
+
},
|
|
1896
|
+
usage: this.extractUsage(result.usage),
|
|
1897
|
+
};
|
|
1898
|
+
} catch (error) {
|
|
1899
|
+
// Re-throw if it's already a built error
|
|
1900
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
1901
|
+
throw error;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
1905
|
+
|
|
1906
|
+
this.logger.error('Generate text operation failed - provider response', {
|
|
1907
|
+
operation: 'GENERATE_TEXT',
|
|
1908
|
+
hasSystemPrompt: !!systemPrompt,
|
|
1909
|
+
instructionsLength: instructions.length,
|
|
1910
|
+
...errorDetails,
|
|
1911
|
+
});
|
|
1912
|
+
|
|
1913
|
+
throw this.errorBuilder.buildError(
|
|
1914
|
+
ErrorType.INTERNAL,
|
|
1915
|
+
undefined,
|
|
1916
|
+
{
|
|
1917
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
1918
|
+
context: {
|
|
1919
|
+
operation: 'GENERATE_TEXT',
|
|
1920
|
+
message: `Failed to generate text: ${errorDetails.errorMessage}`,
|
|
1921
|
+
...errorDetails,
|
|
1922
|
+
},
|
|
1923
|
+
}
|
|
1924
|
+
);
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Execute CHAT_COMPLETION operation
|
|
1930
|
+
*/
|
|
1931
|
+
private async executeChatCompletion({ model, systemPrompt, instructions, input, baseOptions }: {
|
|
1932
|
+
model: any;
|
|
1933
|
+
systemPrompt: string;
|
|
1934
|
+
instructions: string;
|
|
1935
|
+
input: any;
|
|
1936
|
+
baseOptions: any;
|
|
1937
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
1938
|
+
let messages: Array<{ role: 'system' | 'user' | 'assistant'; content: string | Array<any> }> = [];
|
|
1939
|
+
|
|
1940
|
+
try {
|
|
1941
|
+
if (input && typeof input === 'object' && 'messages' in input && Array.isArray(input.messages)) {
|
|
1942
|
+
messages = input.messages;
|
|
1943
|
+
if (systemPrompt && !messages.some((m: any) => m.role === 'system')) {
|
|
1944
|
+
messages.unshift({ role: 'system', content: systemPrompt });
|
|
1945
|
+
}
|
|
1946
|
+
} else {
|
|
1947
|
+
if (systemPrompt) {
|
|
1948
|
+
messages.push({ role: 'system', content: systemPrompt });
|
|
1949
|
+
}
|
|
1950
|
+
messages.push({ role: 'user', content: instructions });
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
if (messages.length === 0) {
|
|
1954
|
+
throw this.errorBuilder.buildError(
|
|
1955
|
+
ErrorType.VALIDATION,
|
|
1956
|
+
undefined,
|
|
1957
|
+
{
|
|
1958
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1959
|
+
context: {
|
|
1960
|
+
operation: 'CHAT_COMPLETION',
|
|
1961
|
+
message: 'No messages provided for chat completion',
|
|
1962
|
+
},
|
|
1963
|
+
}
|
|
1964
|
+
);
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
const result = await generateText({
|
|
1968
|
+
model,
|
|
1969
|
+
messages,
|
|
1970
|
+
...baseOptions,
|
|
1971
|
+
});
|
|
1972
|
+
|
|
1973
|
+
return {
|
|
1974
|
+
output: {
|
|
1975
|
+
message: {
|
|
1976
|
+
role: LLMProvider_MessageRole.ASSISTANT,
|
|
1977
|
+
content: result.text,
|
|
1978
|
+
},
|
|
1979
|
+
},
|
|
1980
|
+
usage: this.extractUsage(result.usage),
|
|
1981
|
+
};
|
|
1982
|
+
} catch (error) {
|
|
1983
|
+
// Re-throw if it's already a built error
|
|
1984
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
1985
|
+
throw error;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
1989
|
+
|
|
1990
|
+
this.logger.error('Chat completion operation failed - provider response', {
|
|
1991
|
+
operation: 'CHAT_COMPLETION',
|
|
1992
|
+
hasSystemPrompt: !!systemPrompt,
|
|
1993
|
+
hasInputMessages: input && typeof input === 'object' && 'messages' in input,
|
|
1994
|
+
messagesCount: messages.length,
|
|
1995
|
+
...errorDetails,
|
|
1996
|
+
});
|
|
1997
|
+
|
|
1998
|
+
throw this.errorBuilder.buildError(
|
|
1999
|
+
ErrorType.INTERNAL,
|
|
2000
|
+
undefined,
|
|
2001
|
+
{
|
|
2002
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2003
|
+
context: {
|
|
2004
|
+
operation: 'CHAT_COMPLETION',
|
|
2005
|
+
message: `Failed to complete chat: ${errorDetails.errorMessage}`,
|
|
2006
|
+
...errorDetails,
|
|
2007
|
+
},
|
|
2008
|
+
}
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* Execute CHAT_MULTIMODAL operation
|
|
2015
|
+
*/
|
|
2016
|
+
private async executeChatMultimodal({ model, systemPrompt, instructions, input, baseOptions }: {
|
|
2017
|
+
model: any;
|
|
2018
|
+
systemPrompt: string;
|
|
2019
|
+
instructions: string;
|
|
2020
|
+
input: any;
|
|
2021
|
+
baseOptions: any;
|
|
2022
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2023
|
+
let messages: Array<{ role: 'system' | 'user' | 'assistant'; content: string | Array<any> }> = [];
|
|
2024
|
+
|
|
2025
|
+
try {
|
|
2026
|
+
if (input && typeof input === 'object' && 'messages' in input && Array.isArray(input.messages)) {
|
|
2027
|
+
messages = input.messages;
|
|
2028
|
+
if (systemPrompt && !messages.some((m: any) => m.role === 'system')) {
|
|
2029
|
+
messages.unshift({ role: 'system', content: systemPrompt });
|
|
2030
|
+
}
|
|
2031
|
+
} else {
|
|
2032
|
+
if (systemPrompt) {
|
|
2033
|
+
messages.push({ role: 'system', content: systemPrompt });
|
|
2034
|
+
}
|
|
2035
|
+
messages.push({ role: 'user', content: instructions });
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
if (messages.length === 0) {
|
|
2039
|
+
throw this.errorBuilder.buildError(
|
|
2040
|
+
ErrorType.VALIDATION,
|
|
2041
|
+
undefined,
|
|
2042
|
+
{
|
|
2043
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
2044
|
+
context: {
|
|
2045
|
+
operation: 'CHAT_MULTIMODAL',
|
|
2046
|
+
message: 'No messages provided for multimodal chat completion',
|
|
2047
|
+
},
|
|
2048
|
+
}
|
|
2049
|
+
);
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
const result = await generateText({
|
|
2053
|
+
model,
|
|
2054
|
+
messages,
|
|
2055
|
+
...baseOptions,
|
|
2056
|
+
});
|
|
2057
|
+
|
|
2058
|
+
return {
|
|
2059
|
+
output: {
|
|
2060
|
+
message: {
|
|
2061
|
+
role: LLMProvider_MessageRole.ASSISTANT,
|
|
2062
|
+
content: result.text,
|
|
2063
|
+
},
|
|
2064
|
+
},
|
|
2065
|
+
usage: this.extractUsage(result.usage),
|
|
2066
|
+
};
|
|
2067
|
+
} catch (error) {
|
|
2068
|
+
// Re-throw if it's already a built error
|
|
2069
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
2070
|
+
throw error;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2074
|
+
|
|
2075
|
+
this.logger.error('Chat multimodal operation failed - provider response', {
|
|
2076
|
+
operation: 'CHAT_MULTIMODAL',
|
|
2077
|
+
hasSystemPrompt: !!systemPrompt,
|
|
2078
|
+
hasInputMessages: input && typeof input === 'object' && 'messages' in input,
|
|
2079
|
+
messagesCount: messages.length,
|
|
2080
|
+
...errorDetails,
|
|
2081
|
+
});
|
|
2082
|
+
|
|
2083
|
+
throw this.errorBuilder.buildError(
|
|
2084
|
+
ErrorType.INTERNAL,
|
|
2085
|
+
undefined,
|
|
2086
|
+
{
|
|
2087
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2088
|
+
context: {
|
|
2089
|
+
operation: 'CHAT_MULTIMODAL',
|
|
2090
|
+
message: `Failed to complete multimodal chat: ${errorDetails.errorMessage}`,
|
|
2091
|
+
...errorDetails,
|
|
2092
|
+
},
|
|
2093
|
+
}
|
|
2094
|
+
);
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Execute GENERATE_STRUCTURED operation
|
|
2100
|
+
*/
|
|
2101
|
+
private async executeGenerateStructured({ model, systemPrompt, instructions, input, baseOptions, llmProviderConfig, providerRef }: {
|
|
2102
|
+
model: any;
|
|
2103
|
+
systemPrompt: string;
|
|
2104
|
+
instructions: string;
|
|
2105
|
+
input: any;
|
|
2106
|
+
baseOptions: any;
|
|
2107
|
+
llmProviderConfig?: LLMProvider_Configuration;
|
|
2108
|
+
providerRef: string;
|
|
2109
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2110
|
+
try {
|
|
2111
|
+
if (!input || typeof input !== 'object' || !('schema' in input) || !input.schema) {
|
|
2112
|
+
throw this.errorBuilder.buildError(
|
|
2113
|
+
ErrorType.VALIDATION,
|
|
2114
|
+
undefined,
|
|
2115
|
+
{
|
|
2116
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
2117
|
+
context: {
|
|
2118
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2119
|
+
message: 'schema is required for GENERATE_STRUCTURED operation',
|
|
2120
|
+
hasInput: !!input,
|
|
2121
|
+
inputType: typeof input,
|
|
2122
|
+
hasSchema: input && typeof input === 'object' && 'schema' in input,
|
|
2123
|
+
},
|
|
2124
|
+
}
|
|
2125
|
+
);
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
const schema = input.schema;
|
|
2129
|
+
const maxFields = llmProviderConfig?.maxStructuredDataFieldAllowed ?? DEFAULT_MAX_STRUCTURED_DATA_FIELD_ALLOWED;
|
|
2130
|
+
const isOpenAI = providerRef === "openai";
|
|
2131
|
+
|
|
2132
|
+
// Count leaf fields (not just top-level properties) to properly handle nested schemas
|
|
2133
|
+
const leafFieldCount = this.countLeafFields(schema);
|
|
2134
|
+
|
|
2135
|
+
this.logDebug('Checking if schema needs chunking', {
|
|
2136
|
+
leafFieldCount,
|
|
2137
|
+
maxFields,
|
|
2138
|
+
needsChunking: leafFieldCount > maxFields,
|
|
2139
|
+
isOpenAI,
|
|
2140
|
+
});
|
|
2141
|
+
|
|
2142
|
+
if (leafFieldCount > maxFields) {
|
|
2143
|
+
return await this.executeGenerateStructuredChunked({
|
|
2144
|
+
model,
|
|
2145
|
+
systemPrompt,
|
|
2146
|
+
instructions,
|
|
2147
|
+
schema,
|
|
2148
|
+
baseOptions,
|
|
2149
|
+
maxFields,
|
|
2150
|
+
leafFieldCount,
|
|
2151
|
+
isOpenAI,
|
|
2152
|
+
});
|
|
2153
|
+
} else {
|
|
2154
|
+
return await this.executeGenerateStructuredSingle({
|
|
2155
|
+
model,
|
|
2156
|
+
systemPrompt,
|
|
2157
|
+
instructions,
|
|
2158
|
+
schema,
|
|
2159
|
+
baseOptions,
|
|
2160
|
+
isOpenAI,
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2163
|
+
} catch (error) {
|
|
2164
|
+
// Re-throw if it's already a built error
|
|
2165
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
2166
|
+
throw error;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2170
|
+
|
|
2171
|
+
this.logger.error('Generate structured operation failed - provider response', {
|
|
2172
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2173
|
+
hasSchema: input && typeof input === 'object' && 'schema' in input,
|
|
2174
|
+
...errorDetails,
|
|
2175
|
+
});
|
|
2176
|
+
|
|
2177
|
+
throw this.errorBuilder.buildError(
|
|
2178
|
+
ErrorType.INTERNAL,
|
|
2179
|
+
undefined,
|
|
2180
|
+
{
|
|
2181
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2182
|
+
context: {
|
|
2183
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2184
|
+
message: `Failed to generate structured data: ${errorDetails.errorMessage}`,
|
|
2185
|
+
...errorDetails,
|
|
2186
|
+
},
|
|
2187
|
+
}
|
|
2188
|
+
);
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* Execute structured generation with chunking - runs chunks in parallel
|
|
2194
|
+
*/
|
|
2195
|
+
private async executeGenerateStructuredChunked({ model, systemPrompt, instructions, schema, baseOptions, maxFields, leafFieldCount, isOpenAI }: {
|
|
2196
|
+
model: any;
|
|
2197
|
+
systemPrompt: string;
|
|
2198
|
+
instructions: string;
|
|
2199
|
+
schema: z.ZodSchema<any>;
|
|
2200
|
+
baseOptions: any;
|
|
2201
|
+
maxFields: number;
|
|
2202
|
+
leafFieldCount: number;
|
|
2203
|
+
isOpenAI: boolean;
|
|
2204
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2205
|
+
try {
|
|
2206
|
+
const schemaChunks = this.chunkZodSchema(schema, maxFields);
|
|
2207
|
+
this.logDebug('Chunking structured generation - parallel execution', {
|
|
2208
|
+
totalLeafFields: leafFieldCount,
|
|
2209
|
+
maxFields,
|
|
2210
|
+
chunks: schemaChunks.length,
|
|
2211
|
+
isOpenAI,
|
|
2212
|
+
});
|
|
2213
|
+
|
|
2214
|
+
// Execute all chunks in parallel using Promise.all
|
|
2215
|
+
const chunkPromises = schemaChunks.map(async (chunkSchema, index) => {
|
|
2216
|
+
try {
|
|
2217
|
+
this.logDebug(`Starting structured chunk ${index + 1}/${schemaChunks.length}`);
|
|
2218
|
+
|
|
2219
|
+
const chunkResult = await generateObject({
|
|
2220
|
+
model,
|
|
2221
|
+
mode: "json",
|
|
2222
|
+
prompt: instructions,
|
|
2223
|
+
system: systemPrompt,
|
|
2224
|
+
schema: chunkSchema,
|
|
2225
|
+
...baseOptions,
|
|
2226
|
+
// Only add strictJsonSchema for OpenAI provider
|
|
2227
|
+
...(isOpenAI ? {
|
|
2228
|
+
providerOptions: {
|
|
2229
|
+
openai: {
|
|
2230
|
+
strictJsonSchema: true,
|
|
2231
|
+
},
|
|
2232
|
+
},
|
|
2233
|
+
} : {}),
|
|
2234
|
+
});
|
|
2235
|
+
|
|
2236
|
+
this.logDebug(`Completed structured chunk ${index + 1}/${schemaChunks.length}`);
|
|
2237
|
+
|
|
2238
|
+
return {
|
|
2239
|
+
index,
|
|
2240
|
+
object: chunkResult.object as Record<string, unknown>,
|
|
2241
|
+
usage: this.extractUsage(chunkResult.usage),
|
|
2242
|
+
};
|
|
2243
|
+
} catch (error) {
|
|
2244
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2245
|
+
|
|
2246
|
+
this.logger.error(`Failed to generate structured chunk ${index + 1}/${schemaChunks.length} - provider response`, {
|
|
2247
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2248
|
+
chunkIndex: index,
|
|
2249
|
+
totalChunks: schemaChunks.length,
|
|
2250
|
+
...errorDetails,
|
|
2251
|
+
});
|
|
2252
|
+
|
|
2253
|
+
throw this.errorBuilder.buildError(
|
|
2254
|
+
ErrorType.INTERNAL,
|
|
2255
|
+
undefined,
|
|
2256
|
+
{
|
|
2257
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2258
|
+
context: {
|
|
2259
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2260
|
+
message: `Failed to generate structured chunk ${index + 1}/${schemaChunks.length}: ${errorDetails.errorMessage}`,
|
|
2261
|
+
chunkIndex: index,
|
|
2262
|
+
totalChunks: schemaChunks.length,
|
|
2263
|
+
...errorDetails,
|
|
2264
|
+
},
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2269
|
+
|
|
2270
|
+
// Wait for all chunks to complete in parallel
|
|
2271
|
+
const chunkResultsWithMeta = await Promise.all(chunkPromises);
|
|
2272
|
+
|
|
2273
|
+
// Sort by index to ensure consistent merge order, then extract objects
|
|
2274
|
+
const chunkResults = chunkResultsWithMeta
|
|
2275
|
+
.sort((a, b) => a.index - b.index)
|
|
2276
|
+
.map(r => r.object);
|
|
2277
|
+
|
|
2278
|
+
// Aggregate usage from all chunks
|
|
2279
|
+
const totalUsage = chunkResultsWithMeta.reduce(
|
|
2280
|
+
(acc, r) => ({
|
|
2281
|
+
promptTokens: acc.promptTokens + r.usage.promptTokens,
|
|
2282
|
+
completionTokens: acc.completionTokens + r.usage.completionTokens,
|
|
2283
|
+
totalTokens: acc.totalTokens + r.usage.totalTokens,
|
|
2284
|
+
}),
|
|
2285
|
+
{ promptTokens: 0, completionTokens: 0, totalTokens: 0 }
|
|
2286
|
+
);
|
|
2287
|
+
|
|
2288
|
+
const mergedResult = this.mergeChunkedObjects(chunkResults);
|
|
2289
|
+
|
|
2290
|
+
this.logDebug('All structured chunks completed and merged', {
|
|
2291
|
+
chunks: schemaChunks.length,
|
|
2292
|
+
totalUsage,
|
|
2293
|
+
});
|
|
2294
|
+
|
|
2295
|
+
return {
|
|
2296
|
+
output: {
|
|
2297
|
+
object: mergedResult,
|
|
2298
|
+
},
|
|
2299
|
+
usage: totalUsage,
|
|
2300
|
+
};
|
|
2301
|
+
} catch (error) {
|
|
2302
|
+
// Re-throw if it's already a built error
|
|
2303
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
2304
|
+
throw error;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2308
|
+
|
|
2309
|
+
throw this.errorBuilder.buildError(
|
|
2310
|
+
ErrorType.INTERNAL,
|
|
2311
|
+
undefined,
|
|
2312
|
+
{
|
|
2313
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2314
|
+
context: {
|
|
2315
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2316
|
+
message: `Failed to generate structured data with chunking: ${errorDetails.errorMessage}`,
|
|
2317
|
+
...errorDetails,
|
|
2318
|
+
},
|
|
2319
|
+
}
|
|
2320
|
+
);
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* Execute structured generation without chunking
|
|
2326
|
+
*/
|
|
2327
|
+
private async executeGenerateStructuredSingle({ model, systemPrompt, instructions, schema, baseOptions, isOpenAI }: {
|
|
2328
|
+
model: any;
|
|
2329
|
+
systemPrompt: string;
|
|
2330
|
+
instructions: string;
|
|
2331
|
+
schema: z.ZodSchema<any>;
|
|
2332
|
+
baseOptions: any;
|
|
2333
|
+
isOpenAI: boolean;
|
|
2334
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2335
|
+
try {
|
|
2336
|
+
this.logDebug('Generating structured normally', {
|
|
2337
|
+
hasSchema: !!schema,
|
|
2338
|
+
instructionsLength: instructions.length,
|
|
2339
|
+
hasSystemPrompt: !!systemPrompt,
|
|
2340
|
+
isOpenAI,
|
|
2341
|
+
});
|
|
2342
|
+
|
|
2343
|
+
const result = await generateObject({
|
|
2344
|
+
model,
|
|
2345
|
+
mode: "json",
|
|
2346
|
+
prompt: instructions,
|
|
2347
|
+
system: systemPrompt,
|
|
2348
|
+
schema,
|
|
2349
|
+
...baseOptions,
|
|
2350
|
+
// Only add strictJsonSchema for OpenAI provider
|
|
2351
|
+
...(isOpenAI ? {
|
|
2352
|
+
providerOptions: {
|
|
2353
|
+
openai: {
|
|
2354
|
+
strictJsonSchema: true,
|
|
2355
|
+
},
|
|
2356
|
+
},
|
|
2357
|
+
} : {}),
|
|
2358
|
+
});
|
|
2359
|
+
|
|
2360
|
+
return {
|
|
2361
|
+
output: {
|
|
2362
|
+
object: result.object,
|
|
2363
|
+
},
|
|
2364
|
+
usage: this.extractUsage(result.usage),
|
|
2365
|
+
};
|
|
2366
|
+
} catch (error) {
|
|
2367
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2368
|
+
|
|
2369
|
+
this.logger.error('Failed to generate structured data - provider response', {
|
|
2370
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2371
|
+
hasSchema: !!schema,
|
|
2372
|
+
...errorDetails,
|
|
2373
|
+
});
|
|
2374
|
+
|
|
2375
|
+
throw this.errorBuilder.buildError(
|
|
2376
|
+
ErrorType.INTERNAL,
|
|
2377
|
+
undefined,
|
|
2378
|
+
{
|
|
2379
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2380
|
+
context: {
|
|
2381
|
+
operation: 'GENERATE_STRUCTURED',
|
|
2382
|
+
message: `Failed to generate structured data: ${errorDetails.errorMessage}`,
|
|
2383
|
+
...errorDetails,
|
|
2384
|
+
},
|
|
2385
|
+
}
|
|
2386
|
+
);
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* Execute STREAM_TEXT operation
|
|
2392
|
+
*/
|
|
2393
|
+
private async executeStreamText({ model, systemPrompt, instructions, baseOptions }: {
|
|
2394
|
+
model: any;
|
|
2395
|
+
systemPrompt: string;
|
|
2396
|
+
instructions: string;
|
|
2397
|
+
baseOptions: any;
|
|
2398
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2399
|
+
try {
|
|
2400
|
+
const result = await streamText({
|
|
2401
|
+
model,
|
|
2402
|
+
prompt: instructions,
|
|
2403
|
+
system: systemPrompt,
|
|
2404
|
+
...baseOptions,
|
|
2405
|
+
});
|
|
2406
|
+
|
|
2407
|
+
let fullText = '';
|
|
2408
|
+
try {
|
|
2409
|
+
for await (const chunk of result.textStream) {
|
|
2410
|
+
fullText += chunk;
|
|
2411
|
+
}
|
|
2412
|
+
} catch (streamError) {
|
|
2413
|
+
this.logger.error('Failed to read text stream', {
|
|
2414
|
+
error: streamError instanceof Error ? streamError.message : String(streamError),
|
|
2415
|
+
textLength: fullText.length,
|
|
2416
|
+
});
|
|
2417
|
+
throw this.errorBuilder.buildError(
|
|
2418
|
+
ErrorType.INTERNAL,
|
|
2419
|
+
undefined,
|
|
2420
|
+
{
|
|
2421
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2422
|
+
context: {
|
|
2423
|
+
operation: 'STREAM_TEXT',
|
|
2424
|
+
message: `Failed to read text stream: ${streamError instanceof Error ? streamError.message : String(streamError)}`,
|
|
2425
|
+
originalError: streamError instanceof Error ? streamError.message : String(streamError),
|
|
2426
|
+
stack: streamError instanceof Error ? streamError.stack : undefined,
|
|
2427
|
+
},
|
|
2428
|
+
}
|
|
2429
|
+
);
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
const usage = await result.usage;
|
|
2433
|
+
|
|
2434
|
+
return {
|
|
2435
|
+
output: {
|
|
2436
|
+
textDelta: fullText,
|
|
2437
|
+
},
|
|
2438
|
+
usage: this.extractUsage(usage),
|
|
2439
|
+
};
|
|
2440
|
+
} catch (error) {
|
|
2441
|
+
// Re-throw if it's already a built error
|
|
2442
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
2443
|
+
throw error;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2447
|
+
|
|
2448
|
+
this.logger.error('Stream text operation failed - provider response', {
|
|
2449
|
+
operation: 'STREAM_TEXT',
|
|
2450
|
+
hasSystemPrompt: !!systemPrompt,
|
|
2451
|
+
instructionsLength: instructions.length,
|
|
2452
|
+
...errorDetails,
|
|
2453
|
+
});
|
|
2454
|
+
|
|
2455
|
+
throw this.errorBuilder.buildError(
|
|
2456
|
+
ErrorType.INTERNAL,
|
|
2457
|
+
undefined,
|
|
2458
|
+
{
|
|
2459
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2460
|
+
context: {
|
|
2461
|
+
operation: 'STREAM_TEXT',
|
|
2462
|
+
message: `Failed to stream text: ${errorDetails.errorMessage}`,
|
|
2463
|
+
...errorDetails,
|
|
2464
|
+
},
|
|
2465
|
+
}
|
|
2466
|
+
);
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
/**
|
|
2471
|
+
* Execute STREAM_STRUCTURED operation
|
|
2472
|
+
*/
|
|
2473
|
+
private async executeStreamStructured({ model, systemPrompt, instructions, baseOptions }: {
|
|
2474
|
+
model: any;
|
|
2475
|
+
systemPrompt: string;
|
|
2476
|
+
instructions: string;
|
|
2477
|
+
baseOptions: any;
|
|
2478
|
+
}): Promise<{ output: unknown; usage?: any }> {
|
|
2479
|
+
try {
|
|
2480
|
+
const result = await streamText({
|
|
2481
|
+
model,
|
|
2482
|
+
prompt: instructions,
|
|
2483
|
+
system: systemPrompt,
|
|
2484
|
+
...baseOptions,
|
|
2485
|
+
});
|
|
2486
|
+
|
|
2487
|
+
let fullText = '';
|
|
2488
|
+
try {
|
|
2489
|
+
for await (const chunk of result.textStream) {
|
|
2490
|
+
fullText += chunk;
|
|
2491
|
+
}
|
|
2492
|
+
} catch (streamError) {
|
|
2493
|
+
const errorDetails = this.extractProviderErrorDetails(streamError);
|
|
2494
|
+
|
|
2495
|
+
this.logger.error('Failed to read structured stream - provider response', {
|
|
2496
|
+
operation: 'STREAM_STRUCTURED',
|
|
2497
|
+
textLength: fullText.length,
|
|
2498
|
+
...errorDetails,
|
|
2499
|
+
});
|
|
2500
|
+
|
|
2501
|
+
throw this.errorBuilder.buildError(
|
|
2502
|
+
ErrorType.INTERNAL,
|
|
2503
|
+
undefined,
|
|
2504
|
+
{
|
|
2505
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2506
|
+
context: {
|
|
2507
|
+
operation: 'STREAM_STRUCTURED',
|
|
2508
|
+
message: `Failed to read structured stream: ${errorDetails.errorMessage}`,
|
|
2509
|
+
...errorDetails,
|
|
2510
|
+
},
|
|
2511
|
+
}
|
|
2512
|
+
);
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
const usage = await result.usage;
|
|
2516
|
+
|
|
2517
|
+
let parsedOutput: unknown = fullText;
|
|
2518
|
+
try {
|
|
2519
|
+
parsedOutput = JSON.parse(fullText);
|
|
2520
|
+
} catch (parseError) {
|
|
2521
|
+
this.logDebug('Failed to parse structured stream as JSON, returning as text', {
|
|
2522
|
+
error: parseError instanceof Error ? parseError.message : String(parseError),
|
|
2523
|
+
textLength: fullText.length,
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
return {
|
|
2528
|
+
output: {
|
|
2529
|
+
object: parsedOutput,
|
|
2530
|
+
},
|
|
2531
|
+
usage: this.extractUsage(usage),
|
|
2532
|
+
};
|
|
2533
|
+
} catch (error) {
|
|
2534
|
+
// Re-throw if it's already a built error
|
|
2535
|
+
if (error && typeof error === 'object' && 'errorType' in error) {
|
|
2536
|
+
throw error;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
const errorDetails = this.extractProviderErrorDetails(error);
|
|
2540
|
+
|
|
2541
|
+
this.logger.error('Stream structured operation failed - provider response', {
|
|
2542
|
+
operation: 'STREAM_STRUCTURED',
|
|
2543
|
+
hasSystemPrompt: !!systemPrompt,
|
|
2544
|
+
instructionsLength: instructions.length,
|
|
2545
|
+
...errorDetails,
|
|
2546
|
+
});
|
|
2547
|
+
|
|
2548
|
+
throw this.errorBuilder.buildError(
|
|
2549
|
+
ErrorType.INTERNAL,
|
|
2550
|
+
undefined,
|
|
2551
|
+
{
|
|
2552
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
2553
|
+
context: {
|
|
2554
|
+
operation: 'STREAM_STRUCTURED',
|
|
2555
|
+
message: `Failed to stream structured data: ${errorDetails.errorMessage}`,
|
|
2556
|
+
...errorDetails,
|
|
2557
|
+
},
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* Extract usage information from AI SDK usage object
|
|
2565
|
+
* Handles different usage object structures across providers
|
|
2566
|
+
*/
|
|
2567
|
+
private extractUsage(usage: any): { promptTokens: number; completionTokens: number; totalTokens: number } {
|
|
2568
|
+
// AI SDK usage object structure varies by provider
|
|
2569
|
+
// Common properties: promptTokens, completionTokens, totalTokens
|
|
2570
|
+
const promptTokens = usage?.promptTokens ?? usage?.inputTokens ?? 0;
|
|
2571
|
+
const completionTokens = usage?.completionTokens ?? usage?.outputTokens ?? 0;
|
|
2572
|
+
const totalTokens = usage?.totalTokens ?? (promptTokens + completionTokens);
|
|
2573
|
+
|
|
2574
|
+
return { promptTokens, completionTokens, totalTokens };
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* Extract detailed error information from AI SDK errors
|
|
2579
|
+
* Captures provider response details, status codes, and error bodies
|
|
2580
|
+
*/
|
|
2581
|
+
private extractProviderErrorDetails(error: unknown): Record<string, unknown> {
|
|
2582
|
+
const details: Record<string, unknown> = {
|
|
2583
|
+
errorMessage: error instanceof Error ? error.message : String(error),
|
|
2584
|
+
errorName: error instanceof Error ? error.name : typeof error,
|
|
2585
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2588
|
+
// AI SDK errors often have response details
|
|
2589
|
+
if (error && typeof error === 'object') {
|
|
2590
|
+
const err = error as any;
|
|
2591
|
+
|
|
2592
|
+
// Extract HTTP response details if available
|
|
2593
|
+
if (err.response) {
|
|
2594
|
+
details.response = {
|
|
2595
|
+
status: err.response.status,
|
|
2596
|
+
statusText: err.response.statusText,
|
|
2597
|
+
headers: err.response.headers,
|
|
2598
|
+
data: err.response.data,
|
|
2599
|
+
body: err.response.body,
|
|
2600
|
+
};
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
// Extract status code directly
|
|
2604
|
+
if (err.statusCode || err.status) {
|
|
2605
|
+
details.statusCode = err.statusCode || err.status;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
// Extract error code
|
|
2609
|
+
if (err.code) {
|
|
2610
|
+
details.errorCode = err.code;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
// Extract error type
|
|
2614
|
+
if (err.type) {
|
|
2615
|
+
details.errorType = err.type;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
// Extract cause if available
|
|
2619
|
+
if (err.cause) {
|
|
2620
|
+
details.cause = this.extractProviderErrorDetails(err.cause);
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
// Extract any additional error properties
|
|
2624
|
+
if (err.data) {
|
|
2625
|
+
details.data = err.data;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
if (err.body) {
|
|
2629
|
+
details.body = err.body;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
// Extract provider-specific error details
|
|
2633
|
+
if (err.error) {
|
|
2634
|
+
details.providerError = err.error;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
// Extract request details if available
|
|
2638
|
+
if (err.request) {
|
|
2639
|
+
details.request = {
|
|
2640
|
+
method: err.request.method,
|
|
2641
|
+
url: err.request.url,
|
|
2642
|
+
headers: err.request.headers,
|
|
2643
|
+
};
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
// Try to extract readable error message from various formats
|
|
2647
|
+
if (err.message) {
|
|
2648
|
+
details.message = err.message;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
if (err.error?.message) {
|
|
2652
|
+
details.providerErrorMessage = err.error.message;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
if (err.data?.error?.message) {
|
|
2656
|
+
details.dataErrorMessage = err.data.error.message;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
return details;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
// ================================
|
|
2664
|
+
// Agent Validation
|
|
2665
|
+
// ================================
|
|
2666
|
+
|
|
2667
|
+
private validateAgentStatus(agent: FlowsActors_Agent): void {
|
|
2668
|
+
if (agent.status !== FlowsActors_Agent_Status.ACTIVE) {
|
|
2669
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
2670
|
+
{ customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
2671
|
+
context: { agentRef: agent.ref, status: agent.status, message: 'Agent is not active' }});
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
public validateAgentCapabilities(agentRef: string,requiredCapabilities: string[]): boolean {
|
|
2676
|
+
const agent = this.flowsActorsRegistry.getAgentOrThrow(agentRef);
|
|
2677
|
+
|
|
2678
|
+
// TODO: Implement capability validation based on agent.capabilities
|
|
2679
|
+
// For now, return true
|
|
2680
|
+
|
|
2681
|
+
this.logDebug('Agent capabilities validated', { agentRef, requiredCapabilities, hasCapabilities: true});
|
|
2682
|
+
|
|
2683
|
+
return true;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
// ================================
|
|
2687
|
+
// Agent Discovery
|
|
2688
|
+
// ================================
|
|
2689
|
+
|
|
2690
|
+
public getAvailableAgents(): FlowsActors_Agent[] {
|
|
2691
|
+
const registry = this.flowsActorsRegistry.getRegistry();
|
|
2692
|
+
return Object.values(registry.agents).filter((agent: FlowsActors_Agent) => agent.status === FlowsActors_Agent_Status.ACTIVE);
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
public getAgentsBySkillType(skillType: string): FlowsActors_Agent[] {
|
|
2696
|
+
return this.getAvailableAgents().filter(agent => agent.promptSpec.skillType === skillType);
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
public getAgent(agentRef: string): FlowsActors_Agent | undefined {
|
|
2700
|
+
return this.flowsActorsRegistry.getAgent(agentRef);
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
public getAgentOrThrow(agentRef: string): FlowsActors_Agent {
|
|
2704
|
+
return this.flowsActorsRegistry.getAgentOrThrow(agentRef);
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
// ================================
|
|
2708
|
+
// Debug Methods
|
|
2709
|
+
// ================================
|
|
2710
|
+
|
|
2711
|
+
public getDebugInfo(): { totalAgents: number; activeAgents: number; agentsByProvider: Record<string, number>; agentsBySkillType: Record<string, number> } {
|
|
2712
|
+
const allAgents = Object.values(this.flowsActorsRegistry.getRegistry().agents) as FlowsActors_Agent[];
|
|
2713
|
+
|
|
2714
|
+
const activeAgents = allAgents.filter(a => a.status === FlowsActors_Agent_Status.ACTIVE);
|
|
2715
|
+
|
|
2716
|
+
const agentsByProvider: Record<string, number> = {};
|
|
2717
|
+
const agentsBySkillType: Record<string, number> = {};
|
|
2718
|
+
|
|
2719
|
+
allAgents.forEach(agent => {
|
|
2720
|
+
const provider = agent.config.providerRef;
|
|
2721
|
+
agentsByProvider[provider] = (agentsByProvider[provider] || 0) + 1;
|
|
2722
|
+
|
|
2723
|
+
const skillType = agent.promptSpec.skillType;
|
|
2724
|
+
agentsBySkillType[skillType] = (agentsBySkillType[skillType] || 0) + 1;
|
|
2725
|
+
});
|
|
2726
|
+
|
|
2727
|
+
return { totalAgents: allAgents.length, activeAgents: activeAgents.length, agentsByProvider, agentsBySkillType, };
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
|