@wildo-ai/saas-backend-lib 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +27 -6
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +47 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +96 -29
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +9 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +49 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +171 -18
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +23 -3
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +20 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +529 -41
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +48 -7
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +225 -13
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +340 -62
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +244 -7
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +386 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +6 -2
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +31 -9
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +57 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +31 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +142 -46
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +33 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +39 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +129 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +59 -2
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +52 -17
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +292 -7
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +533 -45
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +21 -13
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +39 -15
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +53 -2
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.js +127 -3
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts +68 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +175 -5
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +196 -40
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +28 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +204 -18
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +8 -4
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +78 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +17 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +19 -3
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +20 -0
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +56 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.js +107 -11
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +22 -0
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +99 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +422 -66
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +46 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +16 -6
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +12 -12
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +32 -8
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +14 -2
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +90 -6
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +19 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.js +261 -77
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +68 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +17 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +49 -17
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +74 -8
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +175 -19
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +21 -3
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +26 -16
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a.backend.service.js","sourceRoot":"","sources":["../../../../../../src/flows-actors/a2a/services/a2a.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,wEAAwE,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,wEAAwE,CAAC;AACpH,OAAO,EACL,qCAAqC,GAEtC,MAAM,mFAAmF,CAAC;AAC3F,OAAO,EAAE,qCAAqC,EAAE,MAAM,+EAA+E,CAAC;AACtI,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,6CAA6C,EAAE,MAAM,oFAAoF,CAAC;AACnJ,OAAO,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,kGAAkG,CAAC;AAElJ,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,EAC9B,oBAAoB,EACpB,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,GAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GAGrB,MAAM,gEAAgE,CAAC;AACxE,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EACrC,4BAA4B,EAC5B,uBAAuB,GAExB,MAAM,mGAAmG,CAAC;AAC3G,OAAO,EACL,4BAA4B,GAE7B,MAAM,+EAA+E,CA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AChE,WAAA,MAAM,CAAC,kBAAkB,CAAC,qCAAqC,CAAC,CAAA;IAChE,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAA;IACvC,WAAA,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,CAAA;qCARC,aAAa;QACoB,0BAA0B;QACX,qCAAqC;QACrC,qCAAqC;QACjE,uBAAuB;QAC9B,uBAAuB;QACxB,YAAY;QACJ,4BAA4B;QACN,6CAA6C;GAV1I,iBAAiB,CAmf7B","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { randomUUID } from 'crypto';\n\nimport { A2A_Dialect } from '~wildo-backend-lib/flows-actors/a2a/models/a2a-dialect.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { FlowsActorsRegistryService } from '~wildo-backend-lib/flows-actors/services/flows-actors-registry.service';\nimport {\n ConversationalExecutionBackendService,\n type ConversationalOwnerScope,\n} from '~wildo-backend-lib/flows-actors/services/conversational-execution.backend.service';\nimport { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { ResourceServerInstancesRegistryBackendService } from '~wildo-backend-lib/mcp/services/resource-server-instances-registry.backend.service';\nimport { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';\nimport { RedisService } from '~wildo-backend-lib/databases/services/redis.service';\nimport { recordExternalTokenAuthFailure } from '~wildo-backend-lib/security/authentications/services/utils/machine-auth-rate-limit.backend.utils';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport {\n Actor_ExecutionMode,\n CoreWebSocketEvent,\n ExecutionContext_ExecutionType,\n FlowActorSystem_Kind,\n MachineAccessOperation,\n MANUAL_CONTROLLER_ROUTES_URLS,\n ManualControllerRouteKey,\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceServerKind,\n type ActorSystem,\n} from '@wildo-ai/saas-models';\nimport {\n A2A_JSONRPC_TRANSPORT,\n A2A_PROTOCOL_VERSION,\n type A2A_AgentCard,\n type A2A_Skill,\n} from '~wildo-backend-lib/flows-actors/a2a/models/a2a.backend.schemas';\nimport {\n A2A_EXTERNAL_TURN_RATE_MAX,\n A2A_EXTERNAL_TURN_RATE_WINDOW_SECONDS,\n assertExternalTurnWithinRate,\n resolvePrincipalRateKey,\n type ExternalTurnRateDecision,\n} from '~wildo-backend-lib/security/authentications/services/utils/external-turn-rate-limit.backend.utils';\nimport {\n A2ATokenBudgetBackendService,\n type A2ATokenBudgetDecision,\n} from '~wildo-backend-lib/flows-actors/a2a/services/a2a-token-budget.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\n\n/**\n * Outcome of authenticating an inbound A2A caller. Uses a STRING discriminant\n * (`kind`) rather than a boolean `ok` because this package compiles with\n * `strictNullChecks` off, under which TypeScript does not narrow boolean-literal\n * discriminated unions reliably.\n *\n * `owner` is the conversation owner scope resolved from the authenticated\n * principal — a user (`{ userId }`) or a machine (`{ organizationId }` /\n * `{ applicationId }`). It selects the persisted execution VARIANT.\n */\nexport type A2AAuthResult =\n | { kind: 'ok'; auth: SocketAuthResult; owner: ConversationalOwnerScope }\n | { kind: 'error'; errorMessage: string };\n\n/**\n * Outcome of running one A2A turn. String discriminant, same rationale as above.\n *\n * ## Why `awaiting-approval` is its own arm rather than a field on `ok`\n *\n * A turn that paused at a human-in-the-loop approval boundary produced NO answer — the model asked\n * permission and stopped. It is neither `ok` (there is nothing to reply with) nor `error` (nothing\n * failed). Modelling it as an optional field on `ok` would let every existing consumer keep\n * compiling while reporting a completed turn, which is precisely the defect shape this codebase has\n * hit repeatedly: an invariant applied at one of its call sites, the others silently recording a\n * terminal state for work that never happened.\n *\n * As a third arm, every site that consumes a turn is a COMPILE ERROR until it decides what a pause\n * means there — the three `runTurn` callers each needed a different answer, and a type is the only\n * thing that makes finding them not depend on remembering to look.\n */\nexport type A2ATurnResult =\n | { kind: 'ok'; text: string; contextId: string }\n | {\n /** The turn suspended awaiting a human decision; it will resume when one arrives. */\n kind: 'awaiting-approval';\n /** Correlates the decision back to the pending call — the client answers with this. */\n approvalId: string;\n /** The gated tool, so the transport can describe what is being asked. */\n toolName: string;\n contextId: string;\n }\n | { kind: 'error'; errorCode: string; errorMessage: string };\n\n/** Outcome of resolving a target skill. String discriminant, same rationale. */\nexport type A2ASkillResolution =\n | { kind: 'ok'; systemRef: string }\n | { kind: 'error'; errorMessage: string };\n\n/** Callbacks the streaming (`message/stream`) transport supplies. */\nexport interface A2ATurnStreamHooks {\n /** A partial markdown delta of the agent's reply (SSE token stream). */\n onDelta?: (delta: string) => void;\n}\n\n/**\n * Backend service for the inbound Agent2Agent (A2A) transport. Exposes the app's\n * actor runtime to external agent callers WITHOUT reshaping the transport-agnostic\n * {@link ConversationalExecutionBackendService} — it is purely the identity /\n * ownership / protocol edge:\n *\n * - **Agent card** — advertises the exposable actor systems as A2A skills and the\n * OAuth2 security schemes a caller must satisfy. The card `url` is the agent's\n * canonical audience (RFC 8707 / external-access D7).\n * - **Auth (D6, both principals)** — the inbound Bearer token is authenticated by\n * the shared {@link ExecutionContextCreatorBackendService.authenticateExternalToken}\n * seam, which accepts EITHER a user-delegated `USER_REQUEST` token (the\n * conversation is owned by the delegating user → the `userFlowActorExecutions`\n * variant) OR a machine `client_credentials` token (`ORGANIZATION_MACHINE` /\n * `APPLICATION_MACHINE` → the `organization`/`applicationFlowActorExecutions`\n * variant). The turn runs with the caller's OWN roles/scope — never LLM- or\n * caller-supplied identity — via the same `SocketAuthResult` the WebSocket\n * transport uses; the conversation persists to the owner's variant.\n * - **Audience binding** — a user-delegated token's `aud` MUST equal this agent's\n * canonical URI; a machine token is resource-server-bound by `verifyMachineToken`\n * (a valid machine token for THIS API reaches this surface). See\n * `authenticateExternalToken` for the per-principal binding rationale.\n *\n * An inbound A2A `message/send` maps onto one conversational turn; the agent's\n * reply is returned as an A2A agent `Message`. `message/stream` forwards the token\n * deltas over SSE.\n */\n\n/**\n * A2A method → the audited machine-access operation.\n *\n * A `satisfies`-checked map rather than a ternary: the vocabulary is closed and now has\n * four members, so a conditional would silently mis-attribute any method added later.\n * Every externally-reachable A2A method must appear here — an unaudited one is an access\n * that happened with no record.\n *\n * semantic-literal-boundary: the keys are A2A protocol method names (JSON-RPC `method`\n * strings defined by the external spec, not by Wildo). This map is the thin adapter that\n * translates them into the internal `MachineAccessOperation` vocabulary; the literals must\n * not spread beyond it.\n */\nconst A2A_MACHINE_ACCESS_OPERATION_BY_METHOD = {\n 'message/send': MachineAccessOperation.A2A_MESSAGE_SEND,\n 'message/stream': MachineAccessOperation.A2A_MESSAGE_STREAM,\n 'tasks/get': MachineAccessOperation.A2A_TASKS_GET,\n 'tasks/resubscribe': MachineAccessOperation.A2A_TASKS_RESUBSCRIBE,\n 'tasks/cancel': MachineAccessOperation.A2A_TASKS_CANCEL,\n 'tasks/pushNotificationConfig/set': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_SET,\n 'tasks/pushNotificationConfig/get': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_GET,\n 'tasks/pushNotificationConfig/list': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_LIST,\n 'tasks/pushNotificationConfig/delete': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_DELETE,\n // 1.0-only: no v0.2.5 spelling exists, so these keys are the 1.0 names themselves.\n ListTasks: MachineAccessOperation.A2A_TASKS_LIST,\n} satisfies Record<A2A_MethodName, MachineAccessOperation>;\n\n/**\n * Every A2A JSON-RPC method this server answers.\n *\n * Named rather than inlined into the `satisfies` above so the closed vocabulary has ONE runtime\n * source, and so the dispatch site can be typed against the same union it audits against.\n *\n * ## The version note, because the names below are v0.2.5's and the shapes are 1.0's\n *\n * A2A 1.0 renames every method (`SendMessage`, `GetTask`, `CancelTask`, `SubscribeToTask`,\n * `CreateTaskPushNotificationConfig`, …). This surface still answers the v0.2.5 names, and the push\n * methods keep that vocabulary deliberately: shipping 1.0 names for the four new methods while\n * `tasks/get` and `tasks/cancel` kept the old ones would make the surface conformant to NEITHER\n * version. The DATA shapes follow 1.0 (see `a2a-push-notification.backend.schemas.ts`), because\n * that is where v0.2.5 is actually deficient — it never defined the webhook payload.\n *\n * Renaming the existing methods to the 1.0 vocabulary is a separate, larger unit: it touches every\n * method, every live lane, and every client. Tracked in `.claude/plans/a2a-surface-followups.md`.\n *\n * spec-cite: A2A 1.0 §5.3 (binding method table — the 1.0 JSON-RPC names) and the legacy anchors it\n * carries for the v0.2.5 names (e.g. `75-taskspushnotificationconfigset` on §3.1.7), which is what\n * makes the two vocabularies a published mapping rather than a guess.\n */\nexport type A2A_MethodName =\n // semantic-literal-boundary: these are the A2A specification's own JSON-RPC method names, not a\n // Wildo vocabulary — the wire strings a conformant client sends. Renaming a member here would not\n // rename anything, it would break conformance, so the union IS the translation boundary and there\n // is no runtime source to derive it from. The version split (v0.2.5 names for the existing methods,\n // the 1.0 name for `ListTasks`) is documented above and is a published mapping, not a guess.\n | 'message/send'\n | 'message/stream'\n | 'tasks/get'\n | 'tasks/cancel'\n | 'tasks/resubscribe'\n | 'tasks/pushNotificationConfig/set'\n | 'tasks/pushNotificationConfig/get'\n | 'tasks/pushNotificationConfig/list'\n | 'tasks/pushNotificationConfig/delete'\n /**\n * A2A 1.0 only — v0.2.5 defines no equivalent, so this appears under its 1.0 name.\n *\n * `GetExtendedAgentCard` is deliberately ABSENT from this union and from the audit map: it is\n * refused unconditionally (we declare no extended card), so no access ever occurs and there is\n * nothing to record. A member here would describe an audit row that can never be written.\n */\n | 'ListTasks';\n\n/** The four push-notification-configuration methods, as their own union. */\nexport type A2A_PushNotificationConfigMethod = Extract<A2A_MethodName, `tasks/pushNotificationConfig/${string}`>;\n\n/**\n * The four push-notification-configuration methods, as a runtime set.\n *\n * Typed against the union above so it cannot drift from it, and used at the dispatch site to apply\n * the §3.3.4 capability gate to all four at once — the alternative, four `||`-joined comparisons,\n * is exactly the shape that acquires a fifth method without acquiring its gate.\n */\nconst A2A_PUSH_NOTIFICATION_CONFIG_METHODS: ReadonlySet<string> = new Set([\n 'tasks/pushNotificationConfig/set',\n 'tasks/pushNotificationConfig/get',\n 'tasks/pushNotificationConfig/list',\n 'tasks/pushNotificationConfig/delete',\n] satisfies A2A_PushNotificationConfigMethod[]);\n\n/**\n * Narrow a raw JSON-RPC `method` string to the push-configuration union.\n *\n * A type PREDICATE, not a set membership test the caller then casts through. The distinction is the\n * whole point: review finding G3-3 recorded that a cast at the dispatch site defeats the\n * `satisfies`-checked audit map — the method type-checks, resolves to `undefined` in the map, and\n * produces an access with no audit row. A predicate makes the compiler carry the narrowing into\n * `handleTaskMethod`, so a method that is not in the audited union cannot be dispatched there at all.\n */\nexport function isA2APushNotificationConfigMethod(method: string): method is A2A_PushNotificationConfigMethod {\n return A2A_PUSH_NOTIFICATION_CONFIG_METHODS.has(method);\n}\n\n/**\n * Whether this agent advertises — and therefore honours — webhook task updates.\n *\n * ONE constant, read by both the agent card and the dispatch gate. They are two call sites of a\n * single invariant (\"what the card promises is what the methods do\"), and hand-maintaining the\n * answer in both places is how a card comes to advertise a capability whose methods answer\n * `-32003`, or worse, the reverse: methods that quietly work while the card says they do not, so no\n * client ever calls them and the whole feature is dead code nobody notices.\n *\n * Turned `true` on 2026-08-09 on UNIT evidence; turned back to `false` on 2026-08-11 when the live\n * lane finally ran and found delivery inert; turned `true` again the same day once the cause was fixed\n * and the lane observed durable delivery rows. The middle step was not ceremony — it is what the\n * previous revision of this comment prescribed, and doing it kept the card honest for the hour between\n * discovering the defect and fixing it.\n *\n * ## The defect this constant caught, kept because the shape recurs\n *\n * ### Why it was `false` for an hour: DELIVERY WAS BROKEN, measured, not suspected\n *\n * `examples/wonder-todos/e2e/a2a-push-notifications.e2e.ts` drove two REAL transitions on tasks that\n * each carried a registered webhook (one organization-scoped, one user-scoped via the approval pause),\n * asserted that each cancel was ACCEPTED, and found **zero delivery rows in all three variants**. The\n * backend log names the cause once per configured webhook:\n *\n * resources_registry_operation_path_not_found\n * { resourceType: \"userA2aPushDeliveryLog\", operationIdentifier: \"create\" }\n *\n * `A2APushDeliveryLogRepository` writes through `SystemAccessBackendService`\n * (`createAsSystem` / `updateAsSystem`), which resolves its operation via\n * `getServiceOperationPathDefault` — admitting only `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`\n * (`INTERNAL_CALL` plus the URL-bearing pair). The delivery-log resource declared CREATE and UPDATE as\n * **`REPOSITORY_ONLY`**, which is in neither set. So every write threw, the dispatcher's no-throw\n * contract swallowed it at WARN, and the feature was inert end to end: no row opened, no job enqueued,\n * nothing for the worker to claim. Reads worked throughout — READ is `API_CALL` — which is exactly why\n * the configuration plane looked healthy.\n *\n * Two intentional decisions that were jointly unsatisfiable, not a typo: \"a delivery row is EVIDENCE,\n * so its writes never leave the repository tier\" and \"the repository writes through\n * `SystemAccessBackendService`\". `*AsSystem` IS the service tier. See\n * `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`, whose own JSDoc predicts this defect class verbatim\n * and records that it had already shipped once (the `USERS` retention opt-in).\n *\n * ### The fix, and the one that was NOT taken\n *\n * CREATE and UPDATE on the delivery log are now `INTERNAL_CALL` instead of `REPOSITORY_ONLY`. Both are\n * route-less, so no HTTP surface was opened and the \"a client must not be able to fabricate delivery\n * evidence\" property is untouched; only the TIER that can reach the op changed. This is the same\n * recipe already applied to the SSO and SCIM lazy-creates, and the sibling `flows-actors-task` config —\n * written by this same runtime through `*AsSystem` — states the rule outright: \"INTERNAL_CALL (not\n * REPOSITORY_ONLY) is mandatory\".\n *\n * An earlier revision of this comment prescribed the opposite fix — moving the repository to the\n * repository tier — and argued that `INTERNAL_CALL` would \"reverse the resource's stated decision that\n * these writes never leave the repository tier\". **That was wrong and is recorded rather than quietly\n * deleted**, because the mistake is instructive: the stated decision was about EXPOSURE (no external\n * caller may author evidence), and route-lessness delivers that under either variant. Conflating\n * \"route-less\" with \"repository-tier\" is what authored the bug in the first place, and it very nearly\n * authored the fix as well.\n *\n * ### What made it `true` again\n *\n * The live lane observed the durable rows: one per registered webhook, carrying the destination\n * captured at dispatch, the isolation axes and the dedup id, with the worker claiming and attempting\n * each. NOT unit tests — the unit pins were green and mutation-proven throughout the eleven days this\n * was broken, because they stub the repository and therefore cannot see which tier it writes at.\n *\n * Flipping this is a deliberate act that reddens G-6 in whichever direction it moves — do it only with\n * a live green D-section, never on the strength of the suite alone.\n */\nexport const A2A_PUSH_NOTIFICATIONS_SUPPORTED = true;\n\n/**\n * The A2A methods that emit a `MACHINE_ACCESS` audit — DERIVED from the map above rather\n * than restated, so the two can never drift apart.\n *\n * Every consumer that forwards a method into {@link A2ABackendService.auditMachineAccess}\n * types its own parameter as this. That is what makes an unaudited method a COMPILE error\n * instead of a runtime one: review finding G3-3 showed `handleTaskMethod` taking a bare\n * `string` and casting at the call site, which meant adding a fifth method (`tasks/resubscribe`)\n * type-checked cleanly, resolved to `undefined` in the map, failed the emit's required\n * `operationIdentifier` at Zod validation, and was swallowed by the fire-and-forget `.catch()` —\n * an unaudited access, which is exactly the failure the map claims to prevent.\n */\nexport type A2A_AuditedMethod = keyof typeof A2A_MACHINE_ACCESS_OPERATION_BY_METHOD;\n\n@injectable()\nexport class A2ABackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.FlowsActorsRegistryService) private readonly flowsActorsRegistry: FlowsActorsRegistryService,\n @inject(SAAS_SERVICE_TYPES.ConversationalExecutionBackendService) private readonly conversationalExecution: ConversationalExecutionBackendService,\n @inject(SAAS_SERVICE_TYPES.ExecutionContextCreatorBackendService) private readonly executionContextCreator: ExecutionContextCreatorBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.AuditLogsService) private readonly auditLogs: AuditLogsBackendService,\n @inject(SAAS_SERVICE_TYPES.RedisService) private readonly redisService: RedisService,\n @inject(SAAS_SERVICE_TYPES.A2ATokenBudgetService) private readonly tokenBudget: A2ATokenBudgetBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceServerInstancesRegistry) private readonly resourceServerInstances: ResourceServerInstancesRegistryBackendService,\n ) {}\n\n /**\n * The agent's canonical URI = the absolute A2A task-endpoint URL. Doubles as\n * the audience a user-delegated inbound token must carry (RFC 8707). `undefined`\n * when the app public base URL is unresolvable (→ the transport fails closed).\n */\n public resolveAgentAudience(instanceRef?: string): string | undefined {\n // Delegate to the single audience authority: the token MINT validates a requested `resource`\n // against `resolveResourceServerAudience(A2A)`, and THIS is the verify-side `callerAudience` the\n // A2A arm enforces — deriving both from one function makes \"mint and verify cannot drift\" TRUE\n // by construction (rather than by three parallel `${apiAudience}${route}` expressions).\n //\n // R-2: a NAMED agent instance carries its own audience (`…/a2a/<ref>`), so a token minted for one\n // agent is rejected at another — agents are separate resource servers, not views of one.\n return this.appConfigService.resolveResourceServerAudience(ResourceServerKind.A2A, instanceRef);\n }\n\n /**\n * The ACTOR systems this app exposes over A2A: those with an AGENTIC actor bound\n * to an agent (i.e. the exact set the conversational runtime can actually serve).\n * FLOW systems and agent-less actor systems are excluded — advertising a skill we\n * cannot run would be a lie in the agent card.\n *\n * R-2 instance semantics, deliberately FAIL-CLOSED (this mirrors the MCP twin\n * `isOnMcpServerInstance`, which returns `false` for an unresolvable instance rather than falling\n * back to the full catalog):\n *\n * - **no `instanceRef`** ⇒ the DEFAULT agent: every runnable system. The registry is never consulted,\n * so declaring agents stays purely additive.\n * - **a declared agent with `actorSystemRefs`** ⇒ exactly that subset.\n * - **a declared agent with NO `actorSystemRefs`** ⇒ every runnable system (\"no restriction\"). The\n * schema forbids an EMPTY list precisely so this reading is unambiguous: omitted means all, and a\n * present list always names at least one system.\n * - **an UNRESOLVABLE ref** ⇒ **NOTHING**. Previously this returned every runnable system, so a\n * deleted or mistyped agent ref silently produced a card advertising the app's ENTIRE skill set —\n * the exact opposite of the curation the caller asked for, and a widening failure on a surface whose\n * whole purpose is to narrow. The transports 404 an unknown ref before reaching here, so an empty\n * result is unreachable in practice; it is the fail-closed answer if that guard is ever bypassed.\n */\n public listExposableActorSystems(instanceRef?: string): ActorSystem[] {\n const runnable = this.flowsActorsRegistry\n .getActors()\n .filter((system): system is ActorSystem => system.kind === FlowActorSystem_Kind.ACTOR)\n .filter((system) => system.actors.some((a) => a.executionMode === Actor_ExecutionMode.AGENTIC && !!a.agentRef));\n\n if (!instanceRef) return runnable;\n const agent = this.resourceServerInstances.tryGetInstance(ResourceServerKind.A2A, instanceRef);\n if (!agent) return [];\n const allowedRefs = agent.actorSystemRefs;\n if (!allowedRefs) return runnable;\n return runnable.filter((system) => allowedRefs.includes(system.ref));\n }\n\n /**\n * Build the served A2A agent card, or `null` when the agent audience is\n * unresolvable (the controller then returns 503). Each exposable actor system becomes an A2A skill\n * (`skill.id === systemRef`).\n *\n * One card per AGENT: the DEFAULT agent (no `instanceRef`) carries the app-level identity and every\n * runnable skill, while each declared instance carries its own `displayName`/`description`, its own\n * `url` (== its own RFC 8707 audience) and only its `actorSystemRefs` subset — so a client that reads\n * a named card obtains a token scoped to THAT agent and nothing else.\n */\n public buildAgentCard(instanceRef?: string): A2A_AgentCard | null {\n const audience = this.resolveAgentAudience(instanceRef);\n if (!audience) return null;\n // R-2: a named agent identifies itself with its OWN declared name/description; the default agent\n // keeps the app-level identity. `url` is always this agent's own audience, so a client that reads\n // the card obtains a token scoped to THIS agent and nothing else.\n const instance = instanceRef ? this.resourceServerInstances.tryGetInstance(ResourceServerKind.A2A, instanceRef) : undefined;\n\n const skills: A2A_Skill[] = this.listExposableActorSystems(instanceRef).map((system) => ({\n id: system.ref,\n name: system.displayName,\n description: system.description,\n tags: system.tags ?? [],\n }));\n\n const tokenUrl = `${this.appConfigService.resolveApiResourceAudience()}${MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.OAUTH_PROVIDER_TOKEN]}`;\n\n return {\n // The legacy scalar, still `0.2.5` on purpose — see the field's JSDoc. A v0.2.5 client reads\n // ONLY this, and that is the version its dialect of this surface genuinely speaks.\n protocolVersion: A2A_PROTOCOL_VERSION,\n // 1.0 FIRST: the list is ordered by preference, so this is how the agent says \"prefer the\n // current norm\" while remaining reachable to clients that only know the old one. Both entries\n // point at the SAME url — the dialect is carried by the method name, not by the endpoint, so\n // there is no second route to keep in sync.\n supportedInterfaces: [\n { url: audience, transport: A2A_JSONRPC_TRANSPORT, version: A2A_Dialect.V1_0 },\n { url: audience, transport: A2A_JSONRPC_TRANSPORT, version: A2A_Dialect.V0_2_5 },\n ],\n name: instance?.displayName ?? this.appConfigService.config.appIdentity?.appName ?? 'Wildo Application',\n description: instance?.description ?? 'Actor systems exposed as Agent2Agent (A2A) skills.',\n url: audience,\n version: '1.0.0',\n // Read from the shared constant, never restated — see A2A_PUSH_NOTIFICATIONS_SUPPORTED for\n // why the card and the dispatch gate must not be able to disagree.\n capabilities: { streaming: true, pushNotifications: A2A_PUSH_NOTIFICATIONS_SUPPORTED },\n defaultInputModes: ['text/plain'],\n defaultOutputModes: ['text/markdown'],\n skills,\n // Both D6 principals: authorizationCode (user-delegated → user-owned session)\n // and clientCredentials (machine → org/app-owned session). The token endpoint +\n // JWKS are the app's OIDC provider surfaces. Callers request a token whose `aud`\n // (RFC 8707 `resource`) is THIS card's `url` (user) / the API resource (machine).\n securitySchemes: {\n oauth2: {\n type: 'oauth2',\n flows: {\n authorizationCode: {\n authorizationUrl: `${this.appConfigService.resolveApiResourceAudience()}${MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.OAUTH_PROVIDER_AUTHORIZE]}`,\n tokenUrl,\n scopes: {},\n },\n clientCredentials: {\n tokenUrl,\n scopes: {},\n },\n },\n },\n },\n security: [{ oauth2: [] }],\n };\n }\n\n /**\n * Authenticate an inbound A2A caller from its Bearer token (D6 — user-delegated\n * OR machine). Delegates verification + principal resolution to the shared\n * {@link ExecutionContextCreatorBackendService.authenticateExternalToken} seam\n * (audience binding, machine vs user), then maps the authenticated principal to\n * the conversation owner scope that selects the persisted execution variant.\n *\n * R-2: the token must be audience-bound to the AGENT INSTANCE it was presented to, so a token\n * minted for another agent (or for the default one) is rejected here — agents are separate\n * resource servers.\n */\n public async authenticateCaller(token: string, clientIp?: string, instanceRef?: string): Promise<A2AAuthResult> {\n const expectedAudience = this.resolveAgentAudience(instanceRef);\n if (!expectedAudience) {\n return { kind: 'error', errorMessage: 'A2A agent audience is not resolvable (app public URL unset).' };\n }\n\n let auth: SocketAuthResult;\n try {\n auth = await this.executionContextCreator.authenticateExternalToken(token, expectedAudience);\n } catch (error) {\n // `authenticateExternalToken` rejects with a `WildoError_Backend`, which is a\n // plain object rather than an `Error` — an `instanceof Error` ternary sent it\n // down the `String(...)` branch and logged every A2A auth failure as the\n // literal `'[object Object]'`, erasing WHY the token was refused (expired vs\n // wrong audience vs bad signature) on a security surface where that\n // distinction is the whole diagnostic value.\n this.logger.warn(\n '[A2A] Inbound caller authentication failed',\n projectCaughtErrorLogFields(error),\n );\n // SIEM-2 symmetry (S2): feed the shared per-IP failure counter + emit MACHINE_AUTH_FAILED so a\n // revoked/expired/forged token rejected at /a2a is visible to the SIEM (was invisible — only\n // the token-MINT endpoint audited failures). Fire-and-forget; never blocks the rejection.\n if (clientIp) {\n void recordExternalTokenAuthFailure(\n { redisService: this.redisService, logger: this.logger, auditLogs: this.auditLogs },\n { clientIp, resourceServer: ResourceServerKind.A2A, reason: 'external_token_invalid' },\n );\n }\n return { kind: 'error', errorMessage: 'The access token is invalid, expired, or not audience-bound to this agent.' };\n }\n\n const owner = this.ownerScopeFromAuth(auth);\n if (!owner) {\n return { kind: 'error', errorMessage: 'The authenticated token carries no resolvable owner identity.' };\n }\n return { kind: 'ok', auth, owner };\n }\n\n /**\n * Per-PRINCIPAL turn throttle for this agent (LLM-spend guard). An A2A agent turn runs the\n * LLM runtime, so an authenticated caller holding one valid token could otherwise drive\n * unbounded model spend; this caps turns-per-window per principal. Covers BOTH `message/send`\n * and `message/stream` (one turn each) — the controller calls it once before dispatch and\n * maps `rate_limited` to a transport-level 429. Fails OPEN (a limiter outage never breaks the\n * endpoint); see {@link assertExternalTurnWithinRate} for the fail-open + cost rationale. An\n * unkeyable principal (defensive — auth already fails closed without an owner id) is not\n * throttled.\n */\n public async assertTurnWithinRate(auth: SocketAuthResult): Promise<ExternalTurnRateDecision> {\n const principalKey = resolvePrincipalRateKey(auth);\n if (!principalKey) return { kind: 'ok' };\n return assertExternalTurnWithinRate(\n { redisService: this.redisService, logger: this.logger },\n {\n principalKey,\n resourceServer: ResourceServerKind.A2A,\n maxPerWindow: A2A_EXTERNAL_TURN_RATE_MAX,\n windowSeconds: A2A_EXTERNAL_TURN_RATE_WINDOW_SECONDS,\n applicationEnv: this.appConfigService.applicationEnv,\n },\n );\n }\n\n /**\n * Per-TENANT LLM token-budget gate (sustained spend control) — the complement to\n * {@link assertTurnWithinRate}'s per-principal BURST cap. Resolves the owner's plan-granted token\n * allowance and denies once the current period's accumulated consumption reaches it. Delegates to\n * {@link A2ATokenBudgetBackendService}; see that class for the deliberate fail-open (allowance\n * unresolvable → allow, budgeting is opt-in) vs fail-closed (budget configured but consumption\n * unverifiable → deny) split. The controller maps a denial to HTTP 402 / `BUDGET_EXCEEDED`.\n */\n public async assertTurnWithinBudget(auth: SocketAuthResult): Promise<A2ATokenBudgetDecision> {\n return this.tokenBudget.assertTurnWithinBudget(auth);\n }\n\n /**\n * SIEM-2: emit a per-request MACHINE_ACCESS audit for an authenticated A2A caller (fire-and-forget).\n * Normalises the A2A JSON-RPC method to a stable {@link MachineAccessOperation} (so A2A + MCP share\n * one audit vocabulary) and delegates the principal→audit shaping + F4 org routing to the single\n * source of truth {@link AuditLogsBackendService.logMachineResourceAccessFromAuth} — which no-ops\n * for user-delegated turns (a human action) and emits only for machine principals.\n */\n /**\n * Audit an A2A TASK-method access, for EITHER principal kind (review finding A3-7).\n *\n * ## Why this exists rather than calling `auditMachineAccess` alone\n *\n * `logMachineResourceAccessFromAuth` returns early for anything that is not a machine, with the\n * comment \"user-delegated turns are audited as human actions, not machine access\". For the task\n * methods that was not true: a user-delegated `tasks/get` or `tasks/cancel` produced only the\n * runtime-attributed `SYSTEM_CONTEXT_READ`/`SYSTEM_CONTEXT_WRITE` that `readAsSystem` emits, and\n * NOTHING naming the human. So the G2-1 remediation — which existed to stop an external principal\n * reading and cancelling a tenant's work with no record — closed only the machine half.\n *\n * A delegated token is a HUMAN acting through an agent, and `tasks/cancel` in particular destroys\n * in-flight work. `RESOURCE_OPERATION_PERFORMED` is the framework's human-attributed access event,\n * so the delegated arm emits that with the real actor on the row.\n *\n * Fire-and-forget, like every emitter on this path: auditing must never fail the request it\n * observes. Emitted BEFORE the read, so an attempt on a task the caller cannot see is recorded too.\n */\n public auditTaskAccess(\n auth: SocketAuthResult,\n taskId: string,\n method: Extract<A2A_AuditedMethod, 'tasks/get' | 'tasks/cancel' | 'tasks/resubscribe'> | A2A_PushNotificationConfigMethod,\n resourceType: string | undefined,\n ipAddress?: string,\n ): void {\n // Machine principals: unchanged, and the single source of truth still decides.\n this.auditMachineAccess(auth, taskId, method, ipAddress);\n\n const isMachine = auth.executionType === ExecutionContext_ExecutionType.ORGANIZATION_MACHINE\n || auth.executionType === ExecutionContext_ExecutionType.APPLICATION_MACHINE;\n if (isMachine) return;\n\n const actorUserId = auth.initiatorIds?.userId;\n if (!actorUserId || !resourceType) {\n // Neither branch can name what it would record. Warn rather than emit a row whose actor or\n // subject is blank — an unattributable audit row is worse than a logged gap, because it reads\n // as evidence.\n this.logger.warn?.('[A2A] Task access could not be attributed for the human-action audit', { method, hasActor: !!actorUserId, resourceType });\n return;\n }\n\n void this.auditLogs.logResourceOperationPerformed({\n resourceType,\n // The A2A verb, not a core CRUD name: `tasks/cancel` is what the caller actually invoked, and\n // collapsing it to `update` would make a destructive protocol verb indistinguishable in the\n // trail from an ordinary field edit.\n operationIdentifier: method,\n variantType: ResourceOperationVariantType.API_CALL,\n resourceId: taskId,\n initiatorRoles: (auth.initiatorRoles ?? []).flatMap((r) => r.roles),\n executionType: auth.executionType,\n // Single-shot task methods with no cascade, so the depth is always the caller's own frame. The\n // request-correlation id is hoisted to the audit row's top-level `correlationId` by `_createAuditLog`\n // (from the ambient request-context frame), which correlates this row to its actual A2A HTTP request.\n subCallDepth: 0,\n // `tasks/cancel` destroys in-flight work; `tasks/get` merely observes.\n riskLevel: method === 'tasks/cancel' ? ResourceOperationRiskLevel.MEDIUM : ResourceOperationRiskLevel.LOW,\n actorUserId,\n organizationId: auth.initiatorIds?.organizationId,\n applicationId: auth.initiatorIds?.applicationId,\n }).catch((auditError) => this.logger.warn?.('[A2A] Task-access human audit emit failed (non-fatal)', {\n method,\n ...projectCaughtErrorLogFields(auditError),\n }));\n }\n\n public auditMachineAccess(\n auth: SocketAuthResult,\n resourceIdentifier: string,\n method: A2A_AuditedMethod,\n ipAddress?: string,\n ): void {\n this.auditLogs.logMachineResourceAccessFromAuth(auth, {\n resourceServer: ResourceServerKind.A2A,\n // For the message methods this is the target actor system; for the task methods it is\n // the task id, which is the thing actually being accessed.\n resourceIdentifier,\n operationIdentifier: A2A_MACHINE_ACCESS_OPERATION_BY_METHOD[method],\n ipAddress,\n });\n }\n\n /**\n * Map an authenticated principal to its conversation owner scope. USER_REQUEST →\n * `{ userId }`; the two machine principals → `{ organizationId }` / `{ applicationId }`.\n * Returns `undefined` when the expected owner id is missing (fail-closed).\n *\n * MULTI-ORG NOTE (parity with the MCP `contextIds` path): a user-delegated turn is owned by\n * `{ userId }`, so the conversation itself is unambiguous. The ACTIVE ORGANIZATION is a separate\n * axis, and A2A still has no per-request channel for the caller to select one — but since\n * 2026-07-31 it no longer needs one in the common case: `authenticateExternalToken` derives the\n * active org from the delegating OAuth client's OWN tenant (`azp` → org-scoped client →\n * organizationId). A multi-org member acting through an org's agent client is therefore correctly\n * scoped AND correctly billed, where previously such a turn carried no org at all — denying every\n * org-scoped resource operation while its token spend went uncapped.\n *\n * A turn still carries no active org when the delegating client is APPLICATION-scoped (no tenant to\n * pin — binding one at the authorize endpoint is the deferred extension), when the user has no\n * memberships, or when the client's pinned org is not one of the user's (deliberately declined\n * rather than substituted). Org-scoped operations continue to fail closed in those cases, and the\n * token budget's own guard covers the spend axis independently.\n */\n private ownerScopeFromAuth(auth: SocketAuthResult): ConversationalOwnerScope | undefined {\n const ids = auth.initiatorIds;\n if (!ids) return undefined;\n if (auth.executionType === ExecutionContext_ExecutionType.USER_REQUEST && ids.userId) {\n return { userId: ids.userId };\n }\n if (auth.executionType === ExecutionContext_ExecutionType.ORGANIZATION_MACHINE && ids.organizationId) {\n return { organizationId: ids.organizationId };\n }\n if (auth.executionType === ExecutionContext_ExecutionType.APPLICATION_MACHINE && ids.applicationId) {\n return { applicationId: ids.applicationId };\n }\n return undefined;\n }\n\n /**\n * Resolve the target actor system for a turn. A caller selects a skill via\n * `metadata.skillId`; when omitted AND exactly one system is exposed, that one\n * is used (the common single-agent app). Otherwise the caller must name a skill.\n *\n * R-2: resolution is scoped to the AGENT instance the request arrived on, so a `skillId` outside\n * that agent's declared subset is rejected exactly like an unknown skill — the card and the\n * dispatch gate advertise/accept the same set (a named agent cannot be used as a side-door into\n * another agent's actor system).\n */\n public resolveTargetSystemRef(skillId?: string, instanceRef?: string): A2ASkillResolution {\n const exposable = this.listExposableActorSystems(instanceRef);\n if (skillId) {\n const match = exposable.find((s) => s.ref === skillId);\n if (!match) return { kind: 'error', errorMessage: `No A2A skill '${skillId}' is exposed by this agent.` };\n return { kind: 'ok', systemRef: match.ref };\n }\n if (exposable.length === 1) return { kind: 'ok', systemRef: exposable[0].ref };\n if (exposable.length === 0) return { kind: 'error', errorMessage: 'This agent exposes no runnable skills.' };\n return { kind: 'error', errorMessage: 'Multiple skills are exposed; specify metadata.skillId.' };\n }\n\n /**\n * Run one A2A turn against the conversational runtime under the caller's OWN\n * context (user or machine principal). Returns the agent's full reply (blocking)\n * or an error. When `hooks.onDelta` is supplied, partial markdown deltas are\n * forwarded live (SSE streaming) while the final text is still returned. The\n * conversation persists to the owner's variant (`owner` selects it).\n */\n public async runTurn(params: {\n auth: SocketAuthResult;\n owner: ConversationalOwnerScope;\n systemRef: string;\n text: string;\n contextId?: string;\n /** The agent this turn arrived through — forwarded so the conversation records its origin. */\n instanceRef?: string;\n hooks?: A2ATurnStreamHooks;\n /**\n * Cancellation signal for the turn. Two transports supply one, for different reasons:\n * `blocking: false` task turns wire it to `tasks/cancel` (addressable by task id), and\n * `message/stream` wires it to the SSE socket closing — that path owns no task, so the\n * client's connection IS its cancellation channel. Reaches AI-SDK `streamText`, so it aborts\n * the multi-step tool loop, not just the text stream. The blocking `message/send` path passes\n * none: it holds the response open, so there is no disconnect to observe separately.\n */\n abortSignal?: AbortSignal;\n }): Promise<A2ATurnResult> {\n const { auth, owner, systemRef, text, hooks } = params;\n const contextId = params.contextId ?? randomUUID();\n\n let finalText = '';\n let streamedText = '';\n let turnError: { errorCode: string; errorMessage: string } | undefined;\n /**\n * Set when the turn suspended for a human decision instead of answering.\n *\n * Read off the emitted PROGRESS payload rather than through a new return channel: the pause is\n * ALREADY announced on the transport-agnostic emitter (that is how the WebSocket plane learns\n * of it), so keying on the same event keeps one announcement rather than two that can disagree.\n */\n let turnApproval: { approvalId: string; toolName: string } | undefined;\n\n // Transport-agnostic emitter: capture the terminal assistant message + any\n // error, and forward deltas to the SSE hook when streaming.\n const emitter = (event: CoreWebSocketEvent, payload: unknown): void => {\n const p = (payload ?? {}) as Record<string, unknown>;\n if (event === CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE) {\n const content = typeof p.content === 'string' ? p.content : '';\n const data = (p.data ?? {}) as Record<string, unknown>;\n if (data.approvalRequested === true && typeof data.approvalId === 'string' && typeof data.toolName === 'string') {\n // A pause, not an answer. Captured BEFORE the delta arms below because an approval\n // progress payload carries no `messageId` and would otherwise fall through as an\n // ordinary tool-status frame — i.e. be dropped, leaving the turn indistinguishable\n // from one that simply produced no text.\n turnApproval = { approvalId: data.approvalId, toolName: data.toolName };\n } else if (p.isFinal === true) {\n finalText = content;\n } else if (p.messageId) {\n // A streamed answer delta (tool-status progress payloads carry no messageId).\n streamedText += content;\n hooks?.onDelta?.(content);\n }\n } else if (event === CoreWebSocketEvent.FLOWS_ACTORS_ERROR) {\n turnError = {\n errorCode: typeof p.errorCode === 'string' ? p.errorCode : 'AGENT_FAILED',\n errorMessage: typeof p.errorMessage === 'string' ? p.errorMessage : 'The agent failed to produce a response.',\n };\n }\n };\n\n // Token usage is only knowable AFTER the agent stream drains, so the runtime hands it back\n // through this sink rather than the per-delta emitter.\n let turnTotalTokens: number | undefined;\n\n // `startConversationalExecution` never throws — it runs the whole turn and\n // reports every failure through the emitter, so inspecting captured state\n // after the await is sufficient.\n await this.conversationalExecution.startConversationalExecution({\n resourceServerInstanceRef: params.instanceRef,\n onUsage: ({ totalTokens }) => { turnTotalTokens = totalTokens; },\n systemRef,\n executionId: contextId,\n initialInput: { message: text },\n // The caller's server-verified identity (never LLM-supplied). Machine\n // principals always carry initiatorIds; the fallback is defensive.\n initiator: auth.initiatorIds ?? {},\n auth,\n scopeContext: owner,\n emitter,\n abortSignal: params.abortSignal,\n });\n\n // Accumulate this turn's tokens against the PAYING TENANT's period budget (resolved from the\n // principal, not the conversation owner — a delegated turn is paid by the user's organization).\n // Deliberately AFTER the turn (usage is only known once the agent finished) and fire-and-forget:\n // metering must never fail a turn we already served.\n if (turnTotalTokens) {\n void this.tokenBudget.recordTurnTokens(auth, turnTotalTokens);\n } else {\n // UNMETERABLE TURN. The provider reported no usage — the agent transport does not surface it\n // (CLI / image agents), or the invocation failed after the model had already run.\n //\n // A THIRD cause used to belong here and no longer does (review gate #2, F-A): a CANCELLED\n // turn. `result.usage` rejects on an aborted stream, so the throw skipped `reportUsage` and\n // every cancellation landed in this branch — which made cancelling a way to consume real\n // provider spend while the tenant's budget never moved, repeatable on demand. Fixed at the\n // source: `streamTextToDeltas` now accumulates per-step usage that survives the abort, so a\n // cancelled turn meters the steps that completed. If cancellations start appearing here\n // again, that accumulator has regressed — do not simply widen this comment to re-admit them.\n //\n // Either way this turn consumed spend that the budget cannot see, so a capped tenant drifts\n // above its allowance silently. Logged rather than denied: refusing would disable whole agent\n // transports for budgeted tenants, which is a product decision, not one to take here.\n this.logger.warn('[A2A] Turn produced no LLM usage — not metered against the token budget', {\n systemRef,\n contextId,\n executionType: auth.executionType,\n });\n }\n\n if (turnError) return { kind: 'error', ...turnError };\n // Ordered AFTER the error arm deliberately: a turn that suspended and then failed on the\n // persistence write has an error to report and no resumable pause, so the error wins. It is\n // ordered BEFORE the ok arm because a pause with partial streamed text is still a pause —\n // answering with that text would present a half-finished thought as the agent's reply.\n if (turnApproval) return { kind: 'awaiting-approval', ...turnApproval, contextId };\n return { kind: 'ok', text: finalText || streamedText, contextId };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"a2a.backend.service.js","sourceRoot":"","sources":["../../../../../../src/flows-actors/a2a/services/a2a.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,wEAAwE,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC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CAAqC;QACjE,uBAAuB;QAC9B,uBAAuB;QACxB,YAAY;QACJ,4BAA4B;QACN,6CAA6C;GAV1I,iBAAiB,CAmf7B","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { randomUUID } from 'crypto';\n\nimport { A2A_Dialect } from '~wildo-backend-lib/flows-actors/a2a/models/a2a-dialect.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { FlowsActorsRegistryService } from '~wildo-backend-lib/flows-actors/services/flows-actors-registry.service';\nimport {\n ConversationalExecutionBackendService,\n type ConversationalOwnerScope,\n} from '~wildo-backend-lib/flows-actors/services/conversational-execution.backend.service';\nimport { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { ResourceServerInstancesRegistryBackendService } from '~wildo-backend-lib/mcp/services/resource-server-instances-registry.backend.service';\nimport { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';\nimport { RedisService } from '~wildo-backend-lib/databases/services/redis.service';\nimport { recordExternalTokenAuthFailure } from '~wildo-backend-lib/security/authentications/services/utils/machine-auth-rate-limit.backend.utils';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport {\n Actor_ExecutionMode,\n CoreWebSocketEvent,\n ExecutionContext_ExecutionType,\n FlowActorSystem_Kind,\n MachineAccessOperation,\n MANUAL_CONTROLLER_ROUTES_URLS,\n ManualControllerRouteKey,\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceServerKind,\n type ActorSystem,\n} from '@wildo-ai/saas-models';\nimport {\n A2A_JSONRPC_TRANSPORT,\n A2A_PROTOCOL_VERSION,\n type A2A_AgentCard,\n type A2A_Skill,\n} from '~wildo-backend-lib/flows-actors/a2a/models/a2a.backend.schemas';\nimport {\n A2A_EXTERNAL_TURN_RATE_MAX,\n A2A_EXTERNAL_TURN_RATE_WINDOW_SECONDS,\n assertExternalTurnWithinRate,\n resolvePrincipalRateKey,\n type ExternalTurnRateDecision,\n} from '~wildo-backend-lib/security/authentications/services/utils/external-turn-rate-limit.backend.utils';\nimport {\n A2ATokenBudgetBackendService,\n type A2ATokenBudgetDecision,\n} from '~wildo-backend-lib/flows-actors/a2a/services/a2a-token-budget.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\n\n/**\n * Outcome of authenticating an inbound A2A caller. Uses a STRING discriminant\n * (`kind`) rather than a boolean `ok` because this package compiles with\n * `strictNullChecks` off, under which TypeScript does not narrow boolean-literal\n * discriminated unions reliably.\n *\n * `owner` is the conversation owner scope resolved from the authenticated\n * principal — a user (`{ userId }`) or a machine (`{ organizationId }` /\n * `{ applicationId }`). It selects the persisted execution VARIANT.\n */\nexport type A2AAuthResult =\n | { kind: 'ok'; auth: SocketAuthResult; owner: ConversationalOwnerScope }\n | { kind: 'error'; errorMessage: string };\n\n/**\n * Outcome of running one A2A turn. String discriminant, same rationale as above.\n *\n * ## Why `awaiting-approval` is its own arm rather than a field on `ok`\n *\n * A turn that paused at a human-in-the-loop approval boundary produced NO answer — the model asked\n * permission and stopped. It is neither `ok` (there is nothing to reply with) nor `error` (nothing\n * failed). Modelling it as an optional field on `ok` would let every existing consumer keep\n * compiling while reporting a completed turn, which is precisely the defect shape this codebase has\n * hit repeatedly: an invariant applied at one of its call sites, the others silently recording a\n * terminal state for work that never happened.\n *\n * As a third arm, every site that consumes a turn is a COMPILE ERROR until it decides what a pause\n * means there — the three `runTurn` callers each needed a different answer, and a type is the only\n * thing that makes finding them not depend on remembering to look.\n */\nexport type A2ATurnResult =\n | { kind: 'ok'; text: string; contextId: string }\n | {\n /** The turn suspended awaiting a human decision; it will resume when one arrives. */\n kind: 'awaiting-approval';\n /** Correlates the decision back to the pending call — the client answers with this. */\n approvalId: string;\n /** The gated tool, so the transport can describe what is being asked. */\n toolName: string;\n contextId: string;\n }\n | { kind: 'error'; errorCode: string; errorMessage: string };\n\n/** Outcome of resolving a target skill. String discriminant, same rationale. */\nexport type A2ASkillResolution =\n | { kind: 'ok'; systemRef: string }\n | { kind: 'error'; errorMessage: string };\n\n/** Callbacks the streaming (`message/stream`) transport supplies. */\nexport interface A2ATurnStreamHooks {\n /** A partial markdown delta of the agent's reply (SSE token stream). */\n onDelta?: (delta: string) => void;\n}\n\n/**\n * Backend service for the inbound Agent2Agent (A2A) transport. Exposes the app's\n * actor runtime to external agent callers WITHOUT reshaping the transport-agnostic\n * {@link ConversationalExecutionBackendService} — it is purely the identity /\n * ownership / protocol edge:\n *\n * - **Agent card** — advertises the exposable actor systems as A2A skills and the\n * OAuth2 security schemes a caller must satisfy. The card `url` is the agent's\n * canonical audience (RFC 8707 / external-access D7).\n * - **Auth (D6, both principals)** — the inbound Bearer token is authenticated by\n * the shared {@link ExecutionContextCreatorBackendService.authenticateExternalToken}\n * seam, which accepts EITHER a user-delegated `USER_REQUEST` token (the\n * conversation is owned by the delegating user → the `userFlowActorExecutions`\n * variant) OR a machine `client_credentials` token (`ORGANIZATION_MACHINE` /\n * `APPLICATION_MACHINE` → the `organization`/`applicationFlowActorExecutions`\n * variant). The turn runs with the caller's OWN roles/scope — never LLM- or\n * caller-supplied identity — via the same `SocketAuthResult` the WebSocket\n * transport uses; the conversation persists to the owner's variant.\n * - **Audience binding** — a user-delegated token's `aud` MUST equal this agent's\n * canonical URI; a machine token is resource-server-bound by `verifyMachineToken`\n * (a valid machine token for THIS API reaches this surface). See\n * `authenticateExternalToken` for the per-principal binding rationale.\n *\n * An inbound A2A `message/send` maps onto one conversational turn; the agent's\n * reply is returned as an A2A agent `Message`. `message/stream` forwards the token\n * deltas over SSE.\n */\n\n/**\n * A2A method → the audited machine-access operation.\n *\n * A `satisfies`-checked map rather than a ternary: the vocabulary is closed and now has\n * four members, so a conditional would silently mis-attribute any method added later.\n * Every externally-reachable A2A method must appear here — an unaudited one is an access\n * that happened with no record.\n *\n * semantic-literal-boundary: the keys are A2A protocol method names (JSON-RPC `method`\n * strings defined by the external spec, not by Wildo). This map is the thin adapter that\n * translates them into the internal `MachineAccessOperation` vocabulary; the literals must\n * not spread beyond it.\n */\nconst A2A_MACHINE_ACCESS_OPERATION_BY_METHOD = {\n 'message/send': MachineAccessOperation.A2A_MESSAGE_SEND,\n 'message/stream': MachineAccessOperation.A2A_MESSAGE_STREAM,\n 'tasks/get': MachineAccessOperation.A2A_TASKS_GET,\n 'tasks/resubscribe': MachineAccessOperation.A2A_TASKS_RESUBSCRIBE,\n 'tasks/cancel': MachineAccessOperation.A2A_TASKS_CANCEL,\n 'tasks/pushNotificationConfig/set': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_SET,\n 'tasks/pushNotificationConfig/get': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_GET,\n 'tasks/pushNotificationConfig/list': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_LIST,\n 'tasks/pushNotificationConfig/delete': MachineAccessOperation.A2A_PUSH_NOTIFICATION_CONFIG_DELETE,\n // 1.0-only: no v0.2.5 spelling exists, so these keys are the 1.0 names themselves.\n ListTasks: MachineAccessOperation.A2A_TASKS_LIST,\n} satisfies Record<A2A_MethodName, MachineAccessOperation>;\n\n/**\n * Every A2A JSON-RPC method this server answers.\n *\n * Named rather than inlined into the `satisfies` above so the closed vocabulary has ONE runtime\n * source, and so the dispatch site can be typed against the same union it audits against.\n *\n * ## The version note, because the names below are v0.2.5's and the shapes are 1.0's\n *\n * A2A 1.0 renames every method (`SendMessage`, `GetTask`, `CancelTask`, `SubscribeToTask`,\n * `CreateTaskPushNotificationConfig`, …). The transport answers BOTH vocabularies: the method name\n * is the dialect signal, `resolveA2AMethod` classifies it, and the request is then NORMALISED to the\n * v0.2.5 spelling before any routing happens (see `a2a-dialect.backend.schemas.ts`). So this union\n * is the NORMALISED spelling that the audit map and every handler key off, not a statement that a\n * client may only send the older names. The one exception is `ListTasks`, which v0.2.5 never\n * defined, so it appears here under its 1.0 name.\n *\n * The DATA shapes follow 1.0 (see `a2a-push-notification.backend.schemas.ts`), because that is where\n * v0.2.5 is actually deficient: it never defined the webhook payload.\n *\n * Renaming the members below to the 1.0 vocabulary would be a separate, larger unit even now that\n * both dialects are served: it touches the audit map, every routing branch and every handler\n * signature, and it buys nothing on the wire, because the wire already accepts either spelling.\n *\n * spec-cite: A2A 1.0 §5.3 (binding method table — the 1.0 JSON-RPC names) and the legacy anchors it\n * carries for the v0.2.5 names (e.g. `75-taskspushnotificationconfigset` on §3.1.7), which is what\n * makes the two vocabularies a published mapping rather than a guess.\n */\nexport type A2A_MethodName =\n // semantic-literal-boundary: these are the A2A specification's own JSON-RPC method names, not a\n // Wildo vocabulary — the wire strings a conformant client sends. Renaming a member here would not\n // rename anything, it would break conformance, so the union IS the translation boundary and there\n // is no runtime source to derive it from. The version split (v0.2.5 names for the existing methods,\n // the 1.0 name for `ListTasks`) is documented above and is a published mapping, not a guess.\n | 'message/send'\n | 'message/stream'\n | 'tasks/get'\n | 'tasks/cancel'\n | 'tasks/resubscribe'\n | 'tasks/pushNotificationConfig/set'\n | 'tasks/pushNotificationConfig/get'\n | 'tasks/pushNotificationConfig/list'\n | 'tasks/pushNotificationConfig/delete'\n /**\n * A2A 1.0 only — v0.2.5 defines no equivalent, so this appears under its 1.0 name.\n *\n * `GetExtendedAgentCard` is deliberately ABSENT from this union and from the audit map: it is\n * refused unconditionally (we declare no extended card), so no access ever occurs and there is\n * nothing to record. A member here would describe an audit row that can never be written.\n */\n | 'ListTasks';\n\n/** The four push-notification-configuration methods, as their own union. */\nexport type A2A_PushNotificationConfigMethod = Extract<A2A_MethodName, `tasks/pushNotificationConfig/${string}`>;\n\n/**\n * The four push-notification-configuration methods, as a runtime set.\n *\n * Typed against the union above so it cannot drift from it, and used at the dispatch site to apply\n * the §3.3.4 capability gate to all four at once — the alternative, four `||`-joined comparisons,\n * is exactly the shape that acquires a fifth method without acquiring its gate.\n */\nconst A2A_PUSH_NOTIFICATION_CONFIG_METHODS: ReadonlySet<string> = new Set([\n 'tasks/pushNotificationConfig/set',\n 'tasks/pushNotificationConfig/get',\n 'tasks/pushNotificationConfig/list',\n 'tasks/pushNotificationConfig/delete',\n] satisfies A2A_PushNotificationConfigMethod[]);\n\n/**\n * Narrow a raw JSON-RPC `method` string to the push-configuration union.\n *\n * A type PREDICATE, not a set membership test the caller then casts through. The distinction is the\n * whole point: review finding G3-3 recorded that a cast at the dispatch site defeats the\n * `satisfies`-checked audit map — the method type-checks, resolves to `undefined` in the map, and\n * produces an access with no audit row. A predicate makes the compiler carry the narrowing into\n * `handleTaskMethod`, so a method that is not in the audited union cannot be dispatched there at all.\n */\nexport function isA2APushNotificationConfigMethod(method: string): method is A2A_PushNotificationConfigMethod {\n return A2A_PUSH_NOTIFICATION_CONFIG_METHODS.has(method);\n}\n\n/**\n * Whether this agent advertises — and therefore honours — webhook task updates.\n *\n * ONE constant, read by both the agent card and the dispatch gate. They are two call sites of a\n * single invariant (\"what the card promises is what the methods do\"), and hand-maintaining the\n * answer in both places is how a card comes to advertise a capability whose methods answer\n * `-32003`, or worse, the reverse: methods that quietly work while the card says they do not, so no\n * client ever calls them and the whole feature is dead code nobody notices.\n *\n * Turned `true` on 2026-08-09 on UNIT evidence; turned back to `false` on 2026-08-11 when the live\n * lane finally ran and found delivery inert; turned `true` again the same day once the cause was fixed\n * and the lane observed durable delivery rows. The middle step was not ceremony — it is what the\n * previous revision of this comment prescribed, and doing it kept the card honest for the hour between\n * discovering the defect and fixing it.\n *\n * ## The defect this constant caught, kept because the shape recurs\n *\n * ### Why it was `false` for an hour: DELIVERY WAS BROKEN, measured, not suspected\n *\n * `examples/wonder-todos/e2e/a2a-push-notifications.e2e.ts` drove two REAL transitions on tasks that\n * each carried a registered webhook (one organization-scoped, one user-scoped via the approval pause),\n * asserted that each cancel was ACCEPTED, and found **zero delivery rows in all three variants**. The\n * backend log names the cause once per configured webhook:\n *\n * resources_registry_operation_path_not_found\n * { resourceType: \"userA2aPushDeliveryLog\", operationIdentifier: \"create\" }\n *\n * `A2APushDeliveryLogRepository` writes through `SystemAccessBackendService`\n * (`createAsSystem` / `updateAsSystem`), which resolves its operation via\n * `getServiceOperationPathDefault` — admitting only `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`\n * (`INTERNAL_CALL` plus the URL-bearing pair). The delivery-log resource declared CREATE and UPDATE as\n * **`REPOSITORY_ONLY`**, which is in neither set. So every write threw, the dispatcher's no-throw\n * contract swallowed it at WARN, and the feature was inert end to end: no row opened, no job enqueued,\n * nothing for the worker to claim. Reads worked throughout — READ is `API_CALL` — which is exactly why\n * the configuration plane looked healthy.\n *\n * Two intentional decisions that were jointly unsatisfiable, not a typo: \"a delivery row is EVIDENCE,\n * so its writes never leave the repository tier\" and \"the repository writes through\n * `SystemAccessBackendService`\". `*AsSystem` IS the service tier. See\n * `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`, whose own JSDoc predicts this defect class verbatim\n * and records that it had already shipped once (the `USERS` retention opt-in).\n *\n * ### The fix, and the one that was NOT taken\n *\n * CREATE and UPDATE on the delivery log are now `INTERNAL_CALL` instead of `REPOSITORY_ONLY`. Both are\n * route-less, so no HTTP surface was opened and the \"a client must not be able to fabricate delivery\n * evidence\" property is untouched; only the TIER that can reach the op changed. This is the same\n * recipe already applied to the SSO and SCIM lazy-creates, and the sibling `flows-actors-task` config —\n * written by this same runtime through `*AsSystem` — states the rule outright: \"INTERNAL_CALL (not\n * REPOSITORY_ONLY) is mandatory\".\n *\n * An earlier revision of this comment prescribed the opposite fix — moving the repository to the\n * repository tier — and argued that `INTERNAL_CALL` would \"reverse the resource's stated decision that\n * these writes never leave the repository tier\". **That was wrong and is recorded rather than quietly\n * deleted**, because the mistake is instructive: the stated decision was about EXPOSURE (no external\n * caller may author evidence), and route-lessness delivers that under either variant. Conflating\n * \"route-less\" with \"repository-tier\" is what authored the bug in the first place, and it very nearly\n * authored the fix as well.\n *\n * ### What made it `true` again\n *\n * The live lane observed the durable rows: one per registered webhook, carrying the destination\n * captured at dispatch, the isolation axes and the dedup id, with the worker claiming and attempting\n * each. NOT unit tests — the unit pins were green and mutation-proven throughout the eleven days this\n * was broken, because they stub the repository and therefore cannot see which tier it writes at.\n *\n * Flipping this is a deliberate act that reddens G-6 in whichever direction it moves — do it only with\n * a live green D-section, never on the strength of the suite alone.\n */\nexport const A2A_PUSH_NOTIFICATIONS_SUPPORTED = true;\n\n/**\n * The A2A methods that emit a `MACHINE_ACCESS` audit — DERIVED from the map above rather\n * than restated, so the two can never drift apart.\n *\n * Every consumer that forwards a method into {@link A2ABackendService.auditMachineAccess}\n * types its own parameter as this. That is what makes an unaudited method a COMPILE error\n * instead of a runtime one: review finding G3-3 showed `handleTaskMethod` taking a bare\n * `string` and casting at the call site, which meant adding a fifth method (`tasks/resubscribe`)\n * type-checked cleanly, resolved to `undefined` in the map, failed the emit's required\n * `operationIdentifier` at Zod validation, and was swallowed by the fire-and-forget `.catch()` —\n * an unaudited access, which is exactly the failure the map claims to prevent.\n */\nexport type A2A_AuditedMethod = keyof typeof A2A_MACHINE_ACCESS_OPERATION_BY_METHOD;\n\n@injectable()\nexport class A2ABackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.FlowsActorsRegistryService) private readonly flowsActorsRegistry: FlowsActorsRegistryService,\n @inject(SAAS_SERVICE_TYPES.ConversationalExecutionBackendService) private readonly conversationalExecution: ConversationalExecutionBackendService,\n @inject(SAAS_SERVICE_TYPES.ExecutionContextCreatorBackendService) private readonly executionContextCreator: ExecutionContextCreatorBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.AuditLogsService) private readonly auditLogs: AuditLogsBackendService,\n @inject(SAAS_SERVICE_TYPES.RedisService) private readonly redisService: RedisService,\n @inject(SAAS_SERVICE_TYPES.A2ATokenBudgetService) private readonly tokenBudget: A2ATokenBudgetBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceServerInstancesRegistry) private readonly resourceServerInstances: ResourceServerInstancesRegistryBackendService,\n ) {}\n\n /**\n * The agent's canonical URI = the absolute A2A task-endpoint URL. Doubles as\n * the audience a user-delegated inbound token must carry (RFC 8707). `undefined`\n * when the app public base URL is unresolvable (→ the transport fails closed).\n */\n public resolveAgentAudience(instanceRef?: string): string | undefined {\n // Delegate to the single audience authority: the token MINT validates a requested `resource`\n // against `resolveResourceServerAudience(A2A)`, and THIS is the verify-side `callerAudience` the\n // A2A arm enforces — deriving both from one function makes \"mint and verify cannot drift\" TRUE\n // by construction (rather than by three parallel `${apiAudience}${route}` expressions).\n //\n // R-2: a NAMED agent instance carries its own audience (`…/a2a/<ref>`), so a token minted for one\n // agent is rejected at another — agents are separate resource servers, not views of one.\n return this.appConfigService.resolveResourceServerAudience(ResourceServerKind.A2A, instanceRef);\n }\n\n /**\n * The ACTOR systems this app exposes over A2A: those with an AGENTIC actor bound\n * to an agent (i.e. the exact set the conversational runtime can actually serve).\n * FLOW systems and agent-less actor systems are excluded — advertising a skill we\n * cannot run would be a lie in the agent card.\n *\n * R-2 instance semantics, deliberately FAIL-CLOSED (this mirrors the MCP twin\n * `isOnMcpServerInstance`, which returns `false` for an unresolvable instance rather than falling\n * back to the full catalog):\n *\n * - **no `instanceRef`** ⇒ the DEFAULT agent: every runnable system. The registry is never consulted,\n * so declaring agents stays purely additive.\n * - **a declared agent with `actorSystemRefs`** ⇒ exactly that subset.\n * - **a declared agent with NO `actorSystemRefs`** ⇒ every runnable system (\"no restriction\"). The\n * schema forbids an EMPTY list precisely so this reading is unambiguous: omitted means all, and a\n * present list always names at least one system.\n * - **an UNRESOLVABLE ref** ⇒ **NOTHING**. Previously this returned every runnable system, so a\n * deleted or mistyped agent ref silently produced a card advertising the app's ENTIRE skill set —\n * the exact opposite of the curation the caller asked for, and a widening failure on a surface whose\n * whole purpose is to narrow. The transports 404 an unknown ref before reaching here, so an empty\n * result is unreachable in practice; it is the fail-closed answer if that guard is ever bypassed.\n */\n public listExposableActorSystems(instanceRef?: string): ActorSystem[] {\n const runnable = this.flowsActorsRegistry\n .getActors()\n .filter((system): system is ActorSystem => system.kind === FlowActorSystem_Kind.ACTOR)\n .filter((system) => system.actors.some((a) => a.executionMode === Actor_ExecutionMode.AGENTIC && !!a.agentRef));\n\n if (!instanceRef) return runnable;\n const agent = this.resourceServerInstances.tryGetInstance(ResourceServerKind.A2A, instanceRef);\n if (!agent) return [];\n const allowedRefs = agent.actorSystemRefs;\n if (!allowedRefs) return runnable;\n return runnable.filter((system) => allowedRefs.includes(system.ref));\n }\n\n /**\n * Build the served A2A agent card, or `null` when the agent audience is\n * unresolvable (the controller then returns 503). Each exposable actor system becomes an A2A skill\n * (`skill.id === systemRef`).\n *\n * One card per AGENT: the DEFAULT agent (no `instanceRef`) carries the app-level identity and every\n * runnable skill, while each declared instance carries its own `displayName`/`description`, its own\n * `url` (== its own RFC 8707 audience) and only its `actorSystemRefs` subset — so a client that reads\n * a named card obtains a token scoped to THAT agent and nothing else.\n */\n public buildAgentCard(instanceRef?: string): A2A_AgentCard | null {\n const audience = this.resolveAgentAudience(instanceRef);\n if (!audience) return null;\n // R-2: a named agent identifies itself with its OWN declared name/description; the default agent\n // keeps the app-level identity. `url` is always this agent's own audience, so a client that reads\n // the card obtains a token scoped to THIS agent and nothing else.\n const instance = instanceRef ? this.resourceServerInstances.tryGetInstance(ResourceServerKind.A2A, instanceRef) : undefined;\n\n const skills: A2A_Skill[] = this.listExposableActorSystems(instanceRef).map((system) => ({\n id: system.ref,\n name: system.displayName,\n description: system.description,\n tags: system.tags ?? [],\n }));\n\n const tokenUrl = `${this.appConfigService.resolveApiResourceAudience()}${MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.OAUTH_PROVIDER_TOKEN]}`;\n\n return {\n // The legacy scalar, still `0.2.5` on purpose — see the field's JSDoc. A v0.2.5 client reads\n // ONLY this, and that is the version its dialect of this surface genuinely speaks.\n protocolVersion: A2A_PROTOCOL_VERSION,\n // 1.0 FIRST: the list is ordered by preference, so this is how the agent says \"prefer the\n // current norm\" while remaining reachable to clients that only know the old one. Both entries\n // point at the SAME url — the dialect is carried by the method name, not by the endpoint, so\n // there is no second route to keep in sync.\n supportedInterfaces: [\n { url: audience, transport: A2A_JSONRPC_TRANSPORT, version: A2A_Dialect.V1_0 },\n { url: audience, transport: A2A_JSONRPC_TRANSPORT, version: A2A_Dialect.V0_2_5 },\n ],\n name: instance?.displayName ?? this.appConfigService.config.appIdentity?.appName ?? 'Wildo Application',\n description: instance?.description ?? 'Actor systems exposed as Agent2Agent (A2A) skills.',\n url: audience,\n version: '1.0.0',\n // Read from the shared constant, never restated — see A2A_PUSH_NOTIFICATIONS_SUPPORTED for\n // why the card and the dispatch gate must not be able to disagree.\n capabilities: { streaming: true, pushNotifications: A2A_PUSH_NOTIFICATIONS_SUPPORTED },\n defaultInputModes: ['text/plain'],\n defaultOutputModes: ['text/markdown'],\n skills,\n // Both D6 principals: authorizationCode (user-delegated → user-owned session)\n // and clientCredentials (machine → org/app-owned session). The token endpoint +\n // JWKS are the app's OIDC provider surfaces. Callers request a token whose `aud`\n // (RFC 8707 `resource`) is THIS card's `url` (user) / the API resource (machine).\n securitySchemes: {\n oauth2: {\n type: 'oauth2',\n flows: {\n authorizationCode: {\n authorizationUrl: `${this.appConfigService.resolveApiResourceAudience()}${MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.OAUTH_PROVIDER_AUTHORIZE]}`,\n tokenUrl,\n scopes: {},\n },\n clientCredentials: {\n tokenUrl,\n scopes: {},\n },\n },\n },\n },\n security: [{ oauth2: [] }],\n };\n }\n\n /**\n * Authenticate an inbound A2A caller from its Bearer token (D6 — user-delegated\n * OR machine). Delegates verification + principal resolution to the shared\n * {@link ExecutionContextCreatorBackendService.authenticateExternalToken} seam\n * (audience binding, machine vs user), then maps the authenticated principal to\n * the conversation owner scope that selects the persisted execution variant.\n *\n * R-2: the token must be audience-bound to the AGENT INSTANCE it was presented to, so a token\n * minted for another agent (or for the default one) is rejected here — agents are separate\n * resource servers.\n */\n public async authenticateCaller(token: string, clientIp?: string, instanceRef?: string): Promise<A2AAuthResult> {\n const expectedAudience = this.resolveAgentAudience(instanceRef);\n if (!expectedAudience) {\n return { kind: 'error', errorMessage: 'A2A agent audience is not resolvable (app public URL unset).' };\n }\n\n let auth: SocketAuthResult;\n try {\n auth = await this.executionContextCreator.authenticateExternalToken(token, expectedAudience);\n } catch (error) {\n // `authenticateExternalToken` rejects with a `WildoError_Backend`, which is a\n // plain object rather than an `Error` — an `instanceof Error` ternary sent it\n // down the `String(...)` branch and logged every A2A auth failure as the\n // literal `'[object Object]'`, erasing WHY the token was refused (expired vs\n // wrong audience vs bad signature) on a security surface where that\n // distinction is the whole diagnostic value.\n this.logger.warn(\n '[A2A] Inbound caller authentication failed',\n projectCaughtErrorLogFields(error),\n );\n // SIEM-2 symmetry (S2): feed the shared per-IP failure counter + emit MACHINE_AUTH_FAILED so a\n // revoked/expired/forged token rejected at /a2a is visible to the SIEM (was invisible — only\n // the token-MINT endpoint audited failures). Fire-and-forget; never blocks the rejection.\n if (clientIp) {\n void recordExternalTokenAuthFailure(\n { redisService: this.redisService, logger: this.logger, auditLogs: this.auditLogs },\n { clientIp, resourceServer: ResourceServerKind.A2A, reason: 'external_token_invalid' },\n );\n }\n return { kind: 'error', errorMessage: 'The access token is invalid, expired, or not audience-bound to this agent.' };\n }\n\n const owner = this.ownerScopeFromAuth(auth);\n if (!owner) {\n return { kind: 'error', errorMessage: 'The authenticated token carries no resolvable owner identity.' };\n }\n return { kind: 'ok', auth, owner };\n }\n\n /**\n * Per-PRINCIPAL turn throttle for this agent (LLM-spend guard). An A2A agent turn runs the\n * LLM runtime, so an authenticated caller holding one valid token could otherwise drive\n * unbounded model spend; this caps turns-per-window per principal. Covers BOTH `message/send`\n * and `message/stream` (one turn each) — the controller calls it once before dispatch and\n * maps `rate_limited` to a transport-level 429. Fails OPEN (a limiter outage never breaks the\n * endpoint); see {@link assertExternalTurnWithinRate} for the fail-open + cost rationale. An\n * unkeyable principal (defensive — auth already fails closed without an owner id) is not\n * throttled.\n */\n public async assertTurnWithinRate(auth: SocketAuthResult): Promise<ExternalTurnRateDecision> {\n const principalKey = resolvePrincipalRateKey(auth);\n if (!principalKey) return { kind: 'ok' };\n return assertExternalTurnWithinRate(\n { redisService: this.redisService, logger: this.logger },\n {\n principalKey,\n resourceServer: ResourceServerKind.A2A,\n maxPerWindow: A2A_EXTERNAL_TURN_RATE_MAX,\n windowSeconds: A2A_EXTERNAL_TURN_RATE_WINDOW_SECONDS,\n applicationEnv: this.appConfigService.applicationEnv,\n },\n );\n }\n\n /**\n * Per-TENANT LLM token-budget gate (sustained spend control) — the complement to\n * {@link assertTurnWithinRate}'s per-principal BURST cap. Resolves the owner's plan-granted token\n * allowance and denies once the current period's accumulated consumption reaches it. Delegates to\n * {@link A2ATokenBudgetBackendService}; see that class for the deliberate fail-open (allowance\n * unresolvable → allow, budgeting is opt-in) vs fail-closed (budget configured but consumption\n * unverifiable → deny) split. The controller maps a denial to HTTP 402 / `BUDGET_EXCEEDED`.\n */\n public async assertTurnWithinBudget(auth: SocketAuthResult): Promise<A2ATokenBudgetDecision> {\n return this.tokenBudget.assertTurnWithinBudget(auth);\n }\n\n /**\n * SIEM-2: emit a per-request MACHINE_ACCESS audit for an authenticated A2A caller (fire-and-forget).\n * Normalises the A2A JSON-RPC method to a stable {@link MachineAccessOperation} (so A2A + MCP share\n * one audit vocabulary) and delegates the principal→audit shaping + F4 org routing to the single\n * source of truth {@link AuditLogsBackendService.logMachineResourceAccessFromAuth} — which no-ops\n * for user-delegated turns (a human action) and emits only for machine principals.\n */\n /**\n * Audit an A2A TASK-method access, for EITHER principal kind (review finding A3-7).\n *\n * ## Why this exists rather than calling `auditMachineAccess` alone\n *\n * `logMachineResourceAccessFromAuth` returns early for anything that is not a machine, with the\n * comment \"user-delegated turns are audited as human actions, not machine access\". For the task\n * methods that was not true: a user-delegated `tasks/get` or `tasks/cancel` produced only the\n * runtime-attributed `SYSTEM_CONTEXT_READ`/`SYSTEM_CONTEXT_WRITE` that `readAsSystem` emits, and\n * NOTHING naming the human. So the G2-1 remediation — which existed to stop an external principal\n * reading and cancelling a tenant's work with no record — closed only the machine half.\n *\n * A delegated token is a HUMAN acting through an agent, and `tasks/cancel` in particular destroys\n * in-flight work. `RESOURCE_OPERATION_PERFORMED` is the framework's human-attributed access event,\n * so the delegated arm emits that with the real actor on the row.\n *\n * Fire-and-forget, like every emitter on this path: auditing must never fail the request it\n * observes. Emitted BEFORE the read, so an attempt on a task the caller cannot see is recorded too.\n */\n public auditTaskAccess(\n auth: SocketAuthResult,\n taskId: string,\n method: Extract<A2A_AuditedMethod, 'tasks/get' | 'tasks/cancel' | 'tasks/resubscribe'> | A2A_PushNotificationConfigMethod,\n resourceType: string | undefined,\n ipAddress?: string,\n ): void {\n // Machine principals: unchanged, and the single source of truth still decides.\n this.auditMachineAccess(auth, taskId, method, ipAddress);\n\n const isMachine = auth.executionType === ExecutionContext_ExecutionType.ORGANIZATION_MACHINE\n || auth.executionType === ExecutionContext_ExecutionType.APPLICATION_MACHINE;\n if (isMachine) return;\n\n const actorUserId = auth.initiatorIds?.userId;\n if (!actorUserId || !resourceType) {\n // Neither branch can name what it would record. Warn rather than emit a row whose actor or\n // subject is blank — an unattributable audit row is worse than a logged gap, because it reads\n // as evidence.\n this.logger.warn?.('[A2A] Task access could not be attributed for the human-action audit', { method, hasActor: !!actorUserId, resourceType });\n return;\n }\n\n void this.auditLogs.logResourceOperationPerformed({\n resourceType,\n // The A2A verb, not a core CRUD name: `tasks/cancel` is what the caller actually invoked, and\n // collapsing it to `update` would make a destructive protocol verb indistinguishable in the\n // trail from an ordinary field edit.\n operationIdentifier: method,\n variantType: ResourceOperationVariantType.API_CALL,\n resourceId: taskId,\n initiatorRoles: (auth.initiatorRoles ?? []).flatMap((r) => r.roles),\n executionType: auth.executionType,\n // Single-shot task methods with no cascade, so the depth is always the caller's own frame. The\n // request-correlation id is hoisted to the audit row's top-level `correlationId` by `_createAuditLog`\n // (from the ambient request-context frame), which correlates this row to its actual A2A HTTP request.\n subCallDepth: 0,\n // `tasks/cancel` destroys in-flight work; `tasks/get` merely observes.\n riskLevel: method === 'tasks/cancel' ? ResourceOperationRiskLevel.MEDIUM : ResourceOperationRiskLevel.LOW,\n actorUserId,\n organizationId: auth.initiatorIds?.organizationId,\n applicationId: auth.initiatorIds?.applicationId,\n }).catch((auditError) => this.logger.warn?.('[A2A] Task-access human audit emit failed (non-fatal)', {\n method,\n ...projectCaughtErrorLogFields(auditError),\n }));\n }\n\n public auditMachineAccess(\n auth: SocketAuthResult,\n resourceIdentifier: string,\n method: A2A_AuditedMethod,\n ipAddress?: string,\n ): void {\n this.auditLogs.logMachineResourceAccessFromAuth(auth, {\n resourceServer: ResourceServerKind.A2A,\n // For the message methods this is the target actor system; for the task methods it is\n // the task id, which is the thing actually being accessed.\n resourceIdentifier,\n operationIdentifier: A2A_MACHINE_ACCESS_OPERATION_BY_METHOD[method],\n ipAddress,\n });\n }\n\n /**\n * Map an authenticated principal to its conversation owner scope. USER_REQUEST →\n * `{ userId }`; the two machine principals → `{ organizationId }` / `{ applicationId }`.\n * Returns `undefined` when the expected owner id is missing (fail-closed).\n *\n * MULTI-ORG NOTE (parity with the MCP `contextIds` path): a user-delegated turn is owned by\n * `{ userId }`, so the conversation itself is unambiguous. The ACTIVE ORGANIZATION is a separate\n * axis, and A2A still has no per-request channel for the caller to select one — but since\n * 2026-07-31 it no longer needs one in the common case: `authenticateExternalToken` derives the\n * active org from the delegating OAuth client's OWN tenant (`azp` → org-scoped client →\n * organizationId). A multi-org member acting through an org's agent client is therefore correctly\n * scoped AND correctly billed, where previously such a turn carried no org at all — denying every\n * org-scoped resource operation while its token spend went uncapped.\n *\n * A turn still carries no active org when the delegating client is APPLICATION-scoped (no tenant to\n * pin — binding one at the authorize endpoint is the deferred extension), when the user has no\n * memberships, or when the client's pinned org is not one of the user's (deliberately declined\n * rather than substituted). Org-scoped operations continue to fail closed in those cases, and the\n * token budget's own guard covers the spend axis independently.\n */\n private ownerScopeFromAuth(auth: SocketAuthResult): ConversationalOwnerScope | undefined {\n const ids = auth.initiatorIds;\n if (!ids) return undefined;\n if (auth.executionType === ExecutionContext_ExecutionType.USER_REQUEST && ids.userId) {\n return { userId: ids.userId };\n }\n if (auth.executionType === ExecutionContext_ExecutionType.ORGANIZATION_MACHINE && ids.organizationId) {\n return { organizationId: ids.organizationId };\n }\n if (auth.executionType === ExecutionContext_ExecutionType.APPLICATION_MACHINE && ids.applicationId) {\n return { applicationId: ids.applicationId };\n }\n return undefined;\n }\n\n /**\n * Resolve the target actor system for a turn. A caller selects a skill via\n * `metadata.skillId`; when omitted AND exactly one system is exposed, that one\n * is used (the common single-agent app). Otherwise the caller must name a skill.\n *\n * R-2: resolution is scoped to the AGENT instance the request arrived on, so a `skillId` outside\n * that agent's declared subset is rejected exactly like an unknown skill — the card and the\n * dispatch gate advertise/accept the same set (a named agent cannot be used as a side-door into\n * another agent's actor system).\n */\n public resolveTargetSystemRef(skillId?: string, instanceRef?: string): A2ASkillResolution {\n const exposable = this.listExposableActorSystems(instanceRef);\n if (skillId) {\n const match = exposable.find((s) => s.ref === skillId);\n if (!match) return { kind: 'error', errorMessage: `No A2A skill '${skillId}' is exposed by this agent.` };\n return { kind: 'ok', systemRef: match.ref };\n }\n if (exposable.length === 1) return { kind: 'ok', systemRef: exposable[0].ref };\n if (exposable.length === 0) return { kind: 'error', errorMessage: 'This agent exposes no runnable skills.' };\n return { kind: 'error', errorMessage: 'Multiple skills are exposed; specify metadata.skillId.' };\n }\n\n /**\n * Run one A2A turn against the conversational runtime under the caller's OWN\n * context (user or machine principal). Returns the agent's full reply (blocking)\n * or an error. When `hooks.onDelta` is supplied, partial markdown deltas are\n * forwarded live (SSE streaming) while the final text is still returned. The\n * conversation persists to the owner's variant (`owner` selects it).\n */\n public async runTurn(params: {\n auth: SocketAuthResult;\n owner: ConversationalOwnerScope;\n systemRef: string;\n text: string;\n contextId?: string;\n /** The agent this turn arrived through — forwarded so the conversation records its origin. */\n instanceRef?: string;\n hooks?: A2ATurnStreamHooks;\n /**\n * Cancellation signal for the turn. Two transports supply one, for different reasons:\n * `blocking: false` task turns wire it to `tasks/cancel` (addressable by task id), and\n * `message/stream` wires it to the SSE socket closing — that path owns no task, so the\n * client's connection IS its cancellation channel. Reaches AI-SDK `streamText`, so it aborts\n * the multi-step tool loop, not just the text stream. The blocking `message/send` path passes\n * none: it holds the response open, so there is no disconnect to observe separately.\n */\n abortSignal?: AbortSignal;\n }): Promise<A2ATurnResult> {\n const { auth, owner, systemRef, text, hooks } = params;\n const contextId = params.contextId ?? randomUUID();\n\n let finalText = '';\n let streamedText = '';\n let turnError: { errorCode: string; errorMessage: string } | undefined;\n /**\n * Set when the turn suspended for a human decision instead of answering.\n *\n * Read off the emitted PROGRESS payload rather than through a new return channel: the pause is\n * ALREADY announced on the transport-agnostic emitter (that is how the WebSocket plane learns\n * of it), so keying on the same event keeps one announcement rather than two that can disagree.\n */\n let turnApproval: { approvalId: string; toolName: string } | undefined;\n\n // Transport-agnostic emitter: capture the terminal assistant message + any\n // error, and forward deltas to the SSE hook when streaming.\n const emitter = (event: CoreWebSocketEvent, payload: unknown): void => {\n const p = (payload ?? {}) as Record<string, unknown>;\n if (event === CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE) {\n const content = typeof p.content === 'string' ? p.content : '';\n const data = (p.data ?? {}) as Record<string, unknown>;\n if (data.approvalRequested === true && typeof data.approvalId === 'string' && typeof data.toolName === 'string') {\n // A pause, not an answer. Captured BEFORE the delta arms below because an approval\n // progress payload carries no `messageId` and would otherwise fall through as an\n // ordinary tool-status frame — i.e. be dropped, leaving the turn indistinguishable\n // from one that simply produced no text.\n turnApproval = { approvalId: data.approvalId, toolName: data.toolName };\n } else if (p.isFinal === true) {\n finalText = content;\n } else if (p.messageId) {\n // A streamed answer delta (tool-status progress payloads carry no messageId).\n streamedText += content;\n hooks?.onDelta?.(content);\n }\n } else if (event === CoreWebSocketEvent.FLOWS_ACTORS_ERROR) {\n turnError = {\n errorCode: typeof p.errorCode === 'string' ? p.errorCode : 'AGENT_FAILED',\n errorMessage: typeof p.errorMessage === 'string' ? p.errorMessage : 'The agent failed to produce a response.',\n };\n }\n };\n\n // Token usage is only knowable AFTER the agent stream drains, so the runtime hands it back\n // through this sink rather than the per-delta emitter.\n let turnTotalTokens: number | undefined;\n\n // `startConversationalExecution` never throws — it runs the whole turn and\n // reports every failure through the emitter, so inspecting captured state\n // after the await is sufficient.\n await this.conversationalExecution.startConversationalExecution({\n resourceServerInstanceRef: params.instanceRef,\n onUsage: ({ totalTokens }) => { turnTotalTokens = totalTokens; },\n systemRef,\n executionId: contextId,\n initialInput: { message: text },\n // The caller's server-verified identity (never LLM-supplied). Machine\n // principals always carry initiatorIds; the fallback is defensive.\n initiator: auth.initiatorIds ?? {},\n auth,\n scopeContext: owner,\n emitter,\n abortSignal: params.abortSignal,\n });\n\n // Accumulate this turn's tokens against the PAYING TENANT's period budget (resolved from the\n // principal, not the conversation owner — a delegated turn is paid by the user's organization).\n // Deliberately AFTER the turn (usage is only known once the agent finished) and fire-and-forget:\n // metering must never fail a turn we already served.\n if (turnTotalTokens) {\n void this.tokenBudget.recordTurnTokens(auth, turnTotalTokens);\n } else {\n // UNMETERABLE TURN. The provider reported no usage — the agent transport does not surface it\n // (CLI / image agents), or the invocation failed after the model had already run.\n //\n // A THIRD cause used to belong here and no longer does (review gate #2, F-A): a CANCELLED\n // turn. `result.usage` rejects on an aborted stream, so the throw skipped `reportUsage` and\n // every cancellation landed in this branch — which made cancelling a way to consume real\n // provider spend while the tenant's budget never moved, repeatable on demand. Fixed at the\n // source: `streamTextToDeltas` now accumulates per-step usage that survives the abort, so a\n // cancelled turn meters the steps that completed. If cancellations start appearing here\n // again, that accumulator has regressed — do not simply widen this comment to re-admit them.\n //\n // Either way this turn consumed spend that the budget cannot see, so a capped tenant drifts\n // above its allowance silently. Logged rather than denied: refusing would disable whole agent\n // transports for budgeted tenants, which is a product decision, not one to take here.\n this.logger.warn('[A2A] Turn produced no LLM usage — not metered against the token budget', {\n systemRef,\n contextId,\n executionType: auth.executionType,\n });\n }\n\n if (turnError) return { kind: 'error', ...turnError };\n // Ordered AFTER the error arm deliberately: a turn that suspended and then failed on the\n // persistence write has an error to report and no resumable pause, so the error wins. It is\n // ordered BEFORE the ok arm because a pause with partial streamed text is still a pause —\n // answering with that text would present a half-finished thought as the agent's reply.\n if (turnApproval) return { kind: 'awaiting-approval', ...turnApproval, contextId };\n return { kind: 'ok', text: finalText || streamedText, contextId };\n }\n}\n"]}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - OutOfScopeCatalog: Explicit scope boundaries
|
|
9
9
|
* - ModelPresetsCatalog: LLM configuration presets
|
|
10
10
|
* - ToolBundlesCatalog: Tool function bundles
|
|
11
|
-
* - MCPBundlesCatalog: MCP server bundles
|
|
12
11
|
*
|
|
13
12
|
* @see AGENT_FACETS_AND_CATALOGS.md for design documentation
|
|
14
13
|
*/
|
|
@@ -224,16 +223,4 @@ export declare const ToolBundlesCatalog: {
|
|
|
224
223
|
};
|
|
225
224
|
};
|
|
226
225
|
export type ToolBundleId = keyof typeof ToolBundlesCatalog;
|
|
227
|
-
export declare const MCPBundlesCatalog: {
|
|
228
|
-
readonly CODE_ASSISTANT: {
|
|
229
|
-
readonly mcpRefs: readonly ["filesystem-mcp", "code-editor-mcp", "git-mcp"];
|
|
230
|
-
};
|
|
231
|
-
readonly WEB_AUTOMATION: {
|
|
232
|
-
readonly mcpRefs: readonly ["browser-mcp", "screenshot-mcp"];
|
|
233
|
-
};
|
|
234
|
-
readonly DATABASE_ACCESS: {
|
|
235
|
-
readonly mcpRefs: readonly ["mongodb-mcp", "postgres-mcp"];
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
export type MCPBundleId = keyof typeof MCPBundlesCatalog;
|
|
239
226
|
//# sourceMappingURL=agent-catalogs.backend.definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-catalogs.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/agent-catalogs.backend.definitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-catalogs.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/agent-catalogs.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAOnF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuHrB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAO3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;CA0DtB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAO7D,eAAO,MAAM,YAAY;;;;;;;;;;;;;CA4Bf,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,YAAY,CAAC;AAO/C,eAAO,MAAM,iBAAiB;;;;;;;;;;;CA0BpB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAO1D,eAAO,MAAM,mBAAmB;IAK9B;;;OAGG;;;;;;;;;;;;;;;;;;;;IAiCH;;;;;;;;;;;;OAYG;;;;;;;;;;;;;;CAkBK,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAO7D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;CAqCrB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - OutOfScopeCatalog: Explicit scope boundaries
|
|
9
9
|
* - ModelPresetsCatalog: LLM configuration presets
|
|
10
10
|
* - ToolBundlesCatalog: Tool function bundles
|
|
11
|
-
* - MCPBundlesCatalog: MCP server bundles
|
|
12
11
|
*
|
|
13
12
|
* @see AGENT_FACETS_AND_CATALOGS.md for design documentation
|
|
14
13
|
*/
|
|
@@ -312,26 +311,19 @@ export const ToolBundlesCatalog = {
|
|
|
312
311
|
},
|
|
313
312
|
};
|
|
314
313
|
//===============================================================
|
|
315
|
-
// MCP BUNDLES CATALOG
|
|
314
|
+
// MCP BUNDLES CATALOG — REMOVED 2026-09-09 (#491)
|
|
316
315
|
//===============================================================
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
//===================
|
|
331
|
-
// DATABASE
|
|
332
|
-
//===================
|
|
333
|
-
DATABASE_ACCESS: {
|
|
334
|
-
mcpRefs: ["mongodb-mcp", "postgres-mcp"],
|
|
335
|
-
},
|
|
336
|
-
};
|
|
316
|
+
//
|
|
317
|
+
// Held three bundles of invented server names — `filesystem-mcp`, `code-editor-mcp`, `git-mcp`,
|
|
318
|
+
// `browser-mcp`, `screenshot-mcp`, `mongodb-mcp`, `postgres-mcp`. None named a server that existed,
|
|
319
|
+
// nothing resolved them into a callable tool, and the agent card rendered them as capabilities: a
|
|
320
|
+
// claim shown to a user about a reach the agent did not have.
|
|
321
|
+
//
|
|
322
|
+
// Two of the three bundles were referenced by nothing but their own tests. The third reached one
|
|
323
|
+
// core facet, now withdrawn with it.
|
|
324
|
+
//
|
|
325
|
+
// An `mcpRef` now names an MCP server the APPLICATION declared (`FlowsActors_McpServer`), and the
|
|
326
|
+
// registry REFUSES an agent whose refs name no declared server — so this shape cannot be recreated.
|
|
327
|
+
// A shipped catalog of refs is the wrong home by construction: the engine does not know which third
|
|
328
|
+
// parties an application permits its agents to reach.
|
|
337
329
|
//# sourceMappingURL=agent-catalogs.backend.definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-catalogs.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/agent-catalogs.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF,iEAAiE;AACjE,sBAAsB;AACtB,iEAAiE;AAEjE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,qBAAqB;IACrB,WAAW;IACX,qBAAqB;IAErB,sBAAsB,EAAE;QACtB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,mFAAmF;QACzF,IAAI,EAAE,gCAAgC,CAAC,QAAQ;QAC/C,WAAW,EAAE,QAAiB;KAC/B;IAED,iBAAiB,EAAE;QACjB,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,+DAA+D;QACrE,IAAI,EAAE,gCAAgC,CAAC,QAAQ;QAC/C,WAAW,EAAE,QAAiB;KAC/B;IAED,kBAAkB,EAAE;QAClB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,wDAAwD;QAC9D,IAAI,EAAE,gCAAgC,CAAC,QAAQ;QAC/C,WAAW,EAAE,QAAiB;KAC/B;IAED,aAAa,EAAE;QACb,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,mDAAmD;QACzD,IAAI,EAAE,gCAAgC,CAAC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E,gBAAgB,EAAE,eAAe,CAAC;KACpE;IAED,qBAAqB;IACrB,OAAO;IACP,qBAAqB;IAErB,aAAa,EAAE;QACb,YAAY,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,CAAC;KACpE;IAED,qBAAqB;IACrB,aAAa;IACb,qBAAqB;IAErB,UAAU,EAAE;QACV,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC;KACvE;CAEO,CAAC;AAKX,iEAAiE;AACjE,sBAAsB;AACtB,iEAAiE;AAEjE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,qBAAqB;IACrB,cAAc;IACd,qBAAqB;IAErB,cAAc,EAAE;QACd,OAAO,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,CAAC;KAC1D;IAED,qBAAqB;IACrB,UAAU;IACV,qBAAqB;IAErB,cAAc,EAAE;QACd,OAAO,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC;KAC3C;IAED,qBAAqB;IACrB,WAAW;IACX,qBAAqB;IAErB,eAAe,EAAE;QACf,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;KACzC;CAEO,CAAC","sourcesContent":["/**\n * Agent Catalogs - Reusable atomic elements for agent composition\n * \n * Catalogs provide typed, reusable building blocks:\n * - ConstraintsCatalog: Security, privacy, safety, scope, compliance constraints\n * - InstructionsCatalog: Behavioral instruction strings\n * - HintsCatalog: Soft guidance preferences\n * - OutOfScopeCatalog: Explicit scope boundaries\n * - ModelPresetsCatalog: LLM configuration presets\n * - ToolBundlesCatalog: Tool function bundles\n * - MCPBundlesCatalog: MCP server bundles\n * \n * @see AGENT_FACETS_AND_CATALOGS.md for design documentation\n */\n\nimport { FlowsActors_Agent_ConstraintType } from '@wildo-ai/saas-models';\nimport { LLMProvider_ReasoningEffort } from '@wildo-ai/external-connectors-models';\n\n\n//===============================================================\n// CONSTRAINTS CATALOG\n//===============================================================\n\nexport const ConstraintsCatalog = {\n //===================\n // SECURITY\n //===================\n \n NO_CREDENTIAL_EXPOSURE: {\n id: \"sec-no-creds\",\n text: \"Never expose credentials, API keys, secrets, or internal system details in output\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n NO_SECRET_LOGGING: {\n id: \"sec-no-log-secrets\",\n text: \"Never log, store, or transmit sensitive credentials or tokens\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n NO_BYPASS_SECURITY: {\n id: \"sec-no-bypass\",\n text: \"Never suggest bypassing or weakening security controls\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n ANALYSIS_ONLY: {\n id: \"sec-analysis-only\",\n text: \"Only analyze code, never execute, run, or test it\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n //===================\n // PRIVACY\n //===================\n \n NO_PII_OUTPUT: {\n id: \"priv-no-pii\",\n text: \"Do not include or expose personally identifiable information (PII) in output\",\n type: FlowsActors_Agent_ConstraintType.PRIVACY,\n onViolation: \"refuse\" as const,\n },\n \n ANONYMIZE_EXAMPLES: {\n id: \"priv-anon-examples\",\n text: \"Always anonymize any examples that could identify individuals\",\n type: FlowsActors_Agent_ConstraintType.PRIVACY,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // SAFETY\n //===================\n \n CONFIRM_BEFORE_DESTRUCTIVE: {\n id: \"safe-confirm-destructive\",\n text: \"Always require explicit confirmation before destructive or irreversible actions\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"refuse\" as const,\n },\n \n NO_PRODUCTION_CHANGES_UNATTENDED: {\n id: \"safe-no-prod-unattended\",\n text: \"Never modify production systems without explicit user approval\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"refuse\" as const,\n },\n \n VERIFY_PREREQUISITES: {\n id: \"safe-verify-prereqs\",\n text: \"Verify all prerequisites before proceeding with any operation\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // SCOPE\n //===================\n \n STAY_IN_TASK_BOUNDS: {\n id: \"scope-task-bounds\",\n text: \"Only operate within the explicitly defined task boundaries\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n NO_SCOPE_CREEP: {\n id: \"scope-no-creep\",\n text: \"Do not add features or functionality not explicitly requested\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n SINGLE_RESPONSIBILITY: {\n id: \"scope-single-resp\",\n text: \"Focus on the specific task, do not attempt to solve adjacent problems\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // COMPLIANCE\n //===================\n \n DOCUMENT_ALL_ACTIONS: {\n id: \"comp-doc-actions\",\n text: \"Document every action taken for audit purposes\",\n type: FlowsActors_Agent_ConstraintType.COMPLIANCE,\n onViolation: \"warn\" as const,\n },\n \n FOLLOW_DATA_RETENTION: {\n id: \"comp-data-retention\",\n text: \"Adhere to data retention policies - do not persist data beyond required scope\",\n type: FlowsActors_Agent_ConstraintType.COMPLIANCE,\n onViolation: \"warn\" as const,\n },\n \n} as const;\n\nexport type ConstraintId = keyof typeof ConstraintsCatalog;\n\n\n//===============================================================\n// INSTRUCTIONS CATALOG\n//===============================================================\n\nexport const InstructionsCatalog = {\n //===================\n // STRUCTURE\n //===================\n \n USE_CONSISTENT_STRUCTURE: \"Present output in a structured, consistent format\",\n CITE_SOURCES: \"Cite specific sources or evidence for all claims\",\n SHOW_REASONING: \"Explain the reasoning behind conclusions\",\n SUMMARIZE_FIRST: \"Start with a brief summary before detailed analysis\",\n \n //===================\n // QUALITY\n //===================\n \n VERIFY_BEFORE_ASSERTING: \"Verify information before making assertions\",\n ACKNOWLEDGE_LIMITATIONS: \"Acknowledge limitations and areas of uncertainty\",\n PREFER_SIMPLICITY: \"Prefer simpler solutions over complex ones when equivalent\",\n AVOID_JARGON: \"Avoid unnecessary jargon; explain technical terms when used\",\n \n //===================\n // SAFETY\n //===================\n \n LOG_DECISION_RATIONALE: \"Log the rationale for each significant decision\",\n VALIDATE_INPUTS: \"Validate all inputs before processing\",\n CHECK_OUTPUTS: \"Verify outputs match expected format before returning\",\n \n //===================\n // PRIVACY\n //===================\n \n REDACT_PII_IN_OUTPUT: \"Redact any PII (names, emails, phone numbers) in output\",\n USE_SYNTHETIC_DATA: \"Use synthetic data for examples instead of real data\",\n \n //===================\n // DOMAIN: Security\n //===================\n \n FOCUS_OWASP_TOP_10: \"Focus on OWASP Top 10 vulnerabilities when reviewing security\",\n PROVIDE_REMEDIATION: \"Provide specific remediation steps for each finding\",\n RATE_SEVERITY: \"Rate each finding by severity (Critical, High, Medium, Low, Info)\",\n \n //===================\n // DOMAIN: Data Analysis\n //===================\n \n IDENTIFY_PATTERNS: \"Identify key themes and patterns in the provided content\",\n SUPPORT_WITH_EVIDENCE: \"Support findings with specific evidence from the input\",\n QUANTIFY_WHEN_POSSIBLE: \"Quantify findings with metrics when possible\",\n \n //===================\n // DOMAIN: Operations\n //===================\n \n DOCUMENT_EACH_STEP: \"Document each step of the operation for audit purposes\",\n VALIDATE_OUTCOMES: \"Validate outcomes against expected results\",\n STATE_IMPACT_BEFORE_ACTION: \"Before any action, clearly state what will happen\",\n \n} as const;\n\nexport type InstructionId = keyof typeof InstructionsCatalog;\n\n\n//===============================================================\n// HINTS CATALOG\n//===============================================================\n\nexport const HintsCatalog = {\n //===================\n // BEHAVIOR PREFERENCES\n //===================\n \n PREFER_ACCURACY_OVER_SPEED: \"When in doubt, prefer accuracy over speed\",\n PREFER_REVERSIBLE_ACTIONS: \"Prefer reversible actions over irreversible ones\",\n FAIL_SAFE_ON_UNCERTAINTY: \"When uncertain, fail safely rather than guess\",\n ASK_RATHER_THAN_ASSUME: \"Ask for clarification rather than making assumptions\",\n DOCUMENT_ASSUMPTIONS: \"Document any assumptions you make\",\n \n //===================\n // COMMUNICATION\n //===================\n \n BE_DIRECT: \"Be direct and get to the point quickly\",\n USE_EXAMPLES: \"Use examples to clarify complex concepts\",\n MATCH_USER_TONE: \"Match the formality level of the user's request\",\n ANTICIPATE_FOLLOW_UPS: \"Anticipate likely follow-up questions\",\n \n //===================\n // QUALITY\n //===================\n \n DOUBLE_CHECK_CRITICAL: \"Double-check critical calculations and facts\",\n CONSIDER_EDGE_CASES: \"Consider edge cases in your analysis\",\n TEST_YOUR_LOGIC: \"Walk through your logic step by step\",\n \n} as const;\n\nexport type HintId = keyof typeof HintsCatalog;\n\n\n//===============================================================\n// OUT OF SCOPE CATALOG\n//===============================================================\n\nexport const OutOfScopeCatalog = {\n //===================\n // SECURITY\n //===================\n \n NO_EXPLOIT_CODE: \"Do not provide exploit code or proof-of-concept attacks\",\n NO_SECURITY_BYPASS_ADVICE: \"Do not advise on bypassing security measures\",\n NO_EXECUTE_CODE: \"Do not execute or run any code\",\n \n //===================\n // OPERATIONS\n //===================\n \n NO_AUTO_EXECUTE: \"Do not auto-execute without explicit confirmation\",\n NO_PROD_MODIFY: \"Do not modify production data without explicit approval\",\n NO_BYPASS_VALIDATION: \"Do not bypass security checks or validation steps\",\n NO_ASSUME_INFRA_STATE: \"Do not make assumptions about infrastructure state\",\n \n //===================\n // SCOPE\n //===================\n \n NO_ADJACENT_PROBLEMS: \"Do not solve problems outside the requested scope\",\n NO_UNSOLICITED_REFACTORING: \"Do not refactor code unless explicitly asked\",\n NO_FEATURE_CREEP: \"Do not add features not explicitly requested\",\n \n} as const;\n\nexport type OutOfScopeId = keyof typeof OutOfScopeCatalog;\n\n\n//===============================================================\n// MODEL PRESETS CATALOG\n//===============================================================\n\nexport const ModelPresetsCatalog = {\n //===================\n // PRECISION\n //===================\n \n /**\n * Deterministic output with zero randomness\n * Note: Use agent-level config.seed for reproducible outputs if needed\n */\n DETERMINISTIC: {\n temperature: 0,\n },\n \n LOW_CREATIVITY: {\n temperature: 0.2,\n topP: 0.9,\n },\n \n //===================\n // CREATIVE\n //===================\n \n BALANCED: {\n temperature: 0.5,\n topP: 0.95,\n },\n \n CREATIVE: {\n temperature: 0.8,\n topP: 1.0,\n },\n \n HIGH_CREATIVITY: {\n temperature: 1.0,\n topP: 1.0,\n },\n \n //===================\n // SPECIALIZED\n //===================\n \n /**\n * Deep reasoning. Expressed as `reasoningEffort: HIGH` — the single authority\n * on reasoning depth, forwarded to the provider's native reasoning setting.\n *\n * This preset previously set an inert `thinkingEnabled: true` (retired\n * 2026-07-17): no executor ever read it, so composing it changed NOTHING.\n * `HIGH` (not XHIGH) is the deliberate default — it is the deep-judgment tier\n * used by the derivation/critique/judge agents, and it is supported by every\n * reasoning model we ship.\n *\n * Do NOT pair this preset with a non-reasoning model: registration validates\n * `model × reasoningEffort` against verified capability and will fail closed.\n */\n THINKING_MODE: {\n reasoningEffort: LLMProvider_ReasoningEffort.HIGH,\n },\n \n TOOLING_ENABLED: {\n toolingFunctionEnabled: true,\n },\n \n MCP_COMPATIBLE: {\n mcpCompatible: true,\n },\n \n CODE_GENERATION: {\n temperature: 0.2,\n frequencyPenalty: 0.1,\n },\n \n} as const;\n\nexport type ModelPresetId = keyof typeof ModelPresetsCatalog;\n\n\n//===============================================================\n// TOOL BUNDLES CATALOG\n//===============================================================\n\nexport const ToolBundlesCatalog = {\n //===================\n // SECURITY\n //===================\n \n SECURITY_ANALYSIS: {\n functionRefs: [\"security-scanner\", \"dependency-checker\", \"secrets-detector\"],\n },\n \n //===================\n // CODE\n //===================\n \n CODE_REVIEW: {\n functionRefs: [\"linter\", \"formatter\", \"complexity-analyzer\"],\n },\n \n CODE_GENERATION: {\n functionRefs: [\"code-generator\", \"test-generator\", \"doc-generator\"],\n },\n \n //===================\n // DATA\n //===================\n \n DATA_ANALYSIS: {\n functionRefs: [\"data-query\", \"chart-generator\", \"stats-calculator\"],\n },\n \n //===================\n // OPERATIONS\n //===================\n \n DEPLOYMENT: {\n functionRefs: [\"kubectl-runner\", \"health-checker\", \"rollback-trigger\"],\n },\n \n} as const;\n\nexport type ToolBundleId = keyof typeof ToolBundlesCatalog;\n\n\n//===============================================================\n// MCP BUNDLES CATALOG\n//===============================================================\n\nexport const MCPBundlesCatalog = {\n //===================\n // DEVELOPMENT\n //===================\n \n CODE_ASSISTANT: {\n mcpRefs: [\"filesystem-mcp\", \"code-editor-mcp\", \"git-mcp\"],\n },\n \n //===================\n // BROWSER\n //===================\n \n WEB_AUTOMATION: {\n mcpRefs: [\"browser-mcp\", \"screenshot-mcp\"],\n },\n \n //===================\n // DATABASE\n //===================\n \n DATABASE_ACCESS: {\n mcpRefs: [\"mongodb-mcp\", \"postgres-mcp\"],\n },\n \n} as const;\n\nexport type MCPBundleId = keyof typeof MCPBundlesCatalog;\n"]}
|
|
1
|
+
{"version":3,"file":"agent-catalogs.backend.definitions.js","sourceRoot":"","sources":["../../../../../src/flows-actors/models/agent-catalogs.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF,iEAAiE;AACjE,sBAAsB;AACtB,iEAAiE;AAEjE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,qBAAqB;IACrB,WAAW;IACX,qBAAqB;IAErB,sBAAsB,EAAE;QACtB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,mFAAmF;QACzF,IAAI,EAAE,gCAAgC,CAAC,QAAQ;QAC/C,WAAW,EAAE,QAAiB;KAC/B;IAED,iBAAiB,EAAE;QACjB,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,+DAA+D;QACrE,IAAI,EAAE,gCAAgC,CAAC,QAAQ;QAC/C,WAAW,EAAE,QAAiB;KAC/B;IAED,kBAAkB,EAAE;QAClB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,wDAAwD;QAC9D,IAA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ACrB,OAAO;IACP,qBAAqB;IAErB,WAAW,EAAE;QACX,YAAY,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,qBAAqB,CAAC;KAC7D;IAED,eAAe,EAAE;QACf,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,CAAC;KACpE;IAED,qBAAqB;IACrB,OAAO;IACP,qBAAqB;IAErB,aAAa,EAAE;QACb,YAAY,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,CAAC;KACpE;IAED,qBAAqB;IACrB,aAAa;IACb,qBAAqB;IAErB,UAAU,EAAE;QACV,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC;KACvE;CAEO,CAAC;AAKX,iEAAiE;AACjE,kDAAkD;AAClD,iEAAiE;AACjE,EAAE;AACF,gGAAgG;AAChG,oGAAoG;AACpG,kGAAkG;AAClG,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,qCAAqC;AACrC,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,oGAAoG;AACpG,sDAAsD","sourcesContent":["/**\n * Agent Catalogs - Reusable atomic elements for agent composition\n * \n * Catalogs provide typed, reusable building blocks:\n * - ConstraintsCatalog: Security, privacy, safety, scope, compliance constraints\n * - InstructionsCatalog: Behavioral instruction strings\n * - HintsCatalog: Soft guidance preferences\n * - OutOfScopeCatalog: Explicit scope boundaries\n * - ModelPresetsCatalog: LLM configuration presets\n * - ToolBundlesCatalog: Tool function bundles\n * \n * @see AGENT_FACETS_AND_CATALOGS.md for design documentation\n */\n\nimport { FlowsActors_Agent_ConstraintType } from '@wildo-ai/saas-models';\nimport { LLMProvider_ReasoningEffort } from '@wildo-ai/external-connectors-models';\n\n\n//===============================================================\n// CONSTRAINTS CATALOG\n//===============================================================\n\nexport const ConstraintsCatalog = {\n //===================\n // SECURITY\n //===================\n \n NO_CREDENTIAL_EXPOSURE: {\n id: \"sec-no-creds\",\n text: \"Never expose credentials, API keys, secrets, or internal system details in output\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n NO_SECRET_LOGGING: {\n id: \"sec-no-log-secrets\",\n text: \"Never log, store, or transmit sensitive credentials or tokens\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n NO_BYPASS_SECURITY: {\n id: \"sec-no-bypass\",\n text: \"Never suggest bypassing or weakening security controls\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n ANALYSIS_ONLY: {\n id: \"sec-analysis-only\",\n text: \"Only analyze code, never execute, run, or test it\",\n type: FlowsActors_Agent_ConstraintType.SECURITY,\n onViolation: \"refuse\" as const,\n },\n \n //===================\n // PRIVACY\n //===================\n \n NO_PII_OUTPUT: {\n id: \"priv-no-pii\",\n text: \"Do not include or expose personally identifiable information (PII) in output\",\n type: FlowsActors_Agent_ConstraintType.PRIVACY,\n onViolation: \"refuse\" as const,\n },\n \n ANONYMIZE_EXAMPLES: {\n id: \"priv-anon-examples\",\n text: \"Always anonymize any examples that could identify individuals\",\n type: FlowsActors_Agent_ConstraintType.PRIVACY,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // SAFETY\n //===================\n \n CONFIRM_BEFORE_DESTRUCTIVE: {\n id: \"safe-confirm-destructive\",\n text: \"Always require explicit confirmation before destructive or irreversible actions\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"refuse\" as const,\n },\n \n NO_PRODUCTION_CHANGES_UNATTENDED: {\n id: \"safe-no-prod-unattended\",\n text: \"Never modify production systems without explicit user approval\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"refuse\" as const,\n },\n \n VERIFY_PREREQUISITES: {\n id: \"safe-verify-prereqs\",\n text: \"Verify all prerequisites before proceeding with any operation\",\n type: FlowsActors_Agent_ConstraintType.SAFETY,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // SCOPE\n //===================\n \n STAY_IN_TASK_BOUNDS: {\n id: \"scope-task-bounds\",\n text: \"Only operate within the explicitly defined task boundaries\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n NO_SCOPE_CREEP: {\n id: \"scope-no-creep\",\n text: \"Do not add features or functionality not explicitly requested\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n SINGLE_RESPONSIBILITY: {\n id: \"scope-single-resp\",\n text: \"Focus on the specific task, do not attempt to solve adjacent problems\",\n type: FlowsActors_Agent_ConstraintType.SCOPE,\n onViolation: \"warn\" as const,\n },\n \n //===================\n // COMPLIANCE\n //===================\n \n DOCUMENT_ALL_ACTIONS: {\n id: \"comp-doc-actions\",\n text: \"Document every action taken for audit purposes\",\n type: FlowsActors_Agent_ConstraintType.COMPLIANCE,\n onViolation: \"warn\" as const,\n },\n \n FOLLOW_DATA_RETENTION: {\n id: \"comp-data-retention\",\n text: \"Adhere to data retention policies - do not persist data beyond required scope\",\n type: FlowsActors_Agent_ConstraintType.COMPLIANCE,\n onViolation: \"warn\" as const,\n },\n \n} as const;\n\nexport type ConstraintId = keyof typeof ConstraintsCatalog;\n\n\n//===============================================================\n// INSTRUCTIONS CATALOG\n//===============================================================\n\nexport const InstructionsCatalog = {\n //===================\n // STRUCTURE\n //===================\n \n USE_CONSISTENT_STRUCTURE: \"Present output in a structured, consistent format\",\n CITE_SOURCES: \"Cite specific sources or evidence for all claims\",\n SHOW_REASONING: \"Explain the reasoning behind conclusions\",\n SUMMARIZE_FIRST: \"Start with a brief summary before detailed analysis\",\n \n //===================\n // QUALITY\n //===================\n \n VERIFY_BEFORE_ASSERTING: \"Verify information before making assertions\",\n ACKNOWLEDGE_LIMITATIONS: \"Acknowledge limitations and areas of uncertainty\",\n PREFER_SIMPLICITY: \"Prefer simpler solutions over complex ones when equivalent\",\n AVOID_JARGON: \"Avoid unnecessary jargon; explain technical terms when used\",\n \n //===================\n // SAFETY\n //===================\n \n LOG_DECISION_RATIONALE: \"Log the rationale for each significant decision\",\n VALIDATE_INPUTS: \"Validate all inputs before processing\",\n CHECK_OUTPUTS: \"Verify outputs match expected format before returning\",\n \n //===================\n // PRIVACY\n //===================\n \n REDACT_PII_IN_OUTPUT: \"Redact any PII (names, emails, phone numbers) in output\",\n USE_SYNTHETIC_DATA: \"Use synthetic data for examples instead of real data\",\n \n //===================\n // DOMAIN: Security\n //===================\n \n FOCUS_OWASP_TOP_10: \"Focus on OWASP Top 10 vulnerabilities when reviewing security\",\n PROVIDE_REMEDIATION: \"Provide specific remediation steps for each finding\",\n RATE_SEVERITY: \"Rate each finding by severity (Critical, High, Medium, Low, Info)\",\n \n //===================\n // DOMAIN: Data Analysis\n //===================\n \n IDENTIFY_PATTERNS: \"Identify key themes and patterns in the provided content\",\n SUPPORT_WITH_EVIDENCE: \"Support findings with specific evidence from the input\",\n QUANTIFY_WHEN_POSSIBLE: \"Quantify findings with metrics when possible\",\n \n //===================\n // DOMAIN: Operations\n //===================\n \n DOCUMENT_EACH_STEP: \"Document each step of the operation for audit purposes\",\n VALIDATE_OUTCOMES: \"Validate outcomes against expected results\",\n STATE_IMPACT_BEFORE_ACTION: \"Before any action, clearly state what will happen\",\n \n} as const;\n\nexport type InstructionId = keyof typeof InstructionsCatalog;\n\n\n//===============================================================\n// HINTS CATALOG\n//===============================================================\n\nexport const HintsCatalog = {\n //===================\n // BEHAVIOR PREFERENCES\n //===================\n \n PREFER_ACCURACY_OVER_SPEED: \"When in doubt, prefer accuracy over speed\",\n PREFER_REVERSIBLE_ACTIONS: \"Prefer reversible actions over irreversible ones\",\n FAIL_SAFE_ON_UNCERTAINTY: \"When uncertain, fail safely rather than guess\",\n ASK_RATHER_THAN_ASSUME: \"Ask for clarification rather than making assumptions\",\n DOCUMENT_ASSUMPTIONS: \"Document any assumptions you make\",\n \n //===================\n // COMMUNICATION\n //===================\n \n BE_DIRECT: \"Be direct and get to the point quickly\",\n USE_EXAMPLES: \"Use examples to clarify complex concepts\",\n MATCH_USER_TONE: \"Match the formality level of the user's request\",\n ANTICIPATE_FOLLOW_UPS: \"Anticipate likely follow-up questions\",\n \n //===================\n // QUALITY\n //===================\n \n DOUBLE_CHECK_CRITICAL: \"Double-check critical calculations and facts\",\n CONSIDER_EDGE_CASES: \"Consider edge cases in your analysis\",\n TEST_YOUR_LOGIC: \"Walk through your logic step by step\",\n \n} as const;\n\nexport type HintId = keyof typeof HintsCatalog;\n\n\n//===============================================================\n// OUT OF SCOPE CATALOG\n//===============================================================\n\nexport const OutOfScopeCatalog = {\n //===================\n // SECURITY\n //===================\n \n NO_EXPLOIT_CODE: \"Do not provide exploit code or proof-of-concept attacks\",\n NO_SECURITY_BYPASS_ADVICE: \"Do not advise on bypassing security measures\",\n NO_EXECUTE_CODE: \"Do not execute or run any code\",\n \n //===================\n // OPERATIONS\n //===================\n \n NO_AUTO_EXECUTE: \"Do not auto-execute without explicit confirmation\",\n NO_PROD_MODIFY: \"Do not modify production data without explicit approval\",\n NO_BYPASS_VALIDATION: \"Do not bypass security checks or validation steps\",\n NO_ASSUME_INFRA_STATE: \"Do not make assumptions about infrastructure state\",\n \n //===================\n // SCOPE\n //===================\n \n NO_ADJACENT_PROBLEMS: \"Do not solve problems outside the requested scope\",\n NO_UNSOLICITED_REFACTORING: \"Do not refactor code unless explicitly asked\",\n NO_FEATURE_CREEP: \"Do not add features not explicitly requested\",\n \n} as const;\n\nexport type OutOfScopeId = keyof typeof OutOfScopeCatalog;\n\n\n//===============================================================\n// MODEL PRESETS CATALOG\n//===============================================================\n\nexport const ModelPresetsCatalog = {\n //===================\n // PRECISION\n //===================\n \n /**\n * Deterministic output with zero randomness\n * Note: Use agent-level config.seed for reproducible outputs if needed\n */\n DETERMINISTIC: {\n temperature: 0,\n },\n \n LOW_CREATIVITY: {\n temperature: 0.2,\n topP: 0.9,\n },\n \n //===================\n // CREATIVE\n //===================\n \n BALANCED: {\n temperature: 0.5,\n topP: 0.95,\n },\n \n CREATIVE: {\n temperature: 0.8,\n topP: 1.0,\n },\n \n HIGH_CREATIVITY: {\n temperature: 1.0,\n topP: 1.0,\n },\n \n //===================\n // SPECIALIZED\n //===================\n \n /**\n * Deep reasoning. Expressed as `reasoningEffort: HIGH` — the single authority\n * on reasoning depth, forwarded to the provider's native reasoning setting.\n *\n * This preset previously set an inert `thinkingEnabled: true` (retired\n * 2026-07-17): no executor ever read it, so composing it changed NOTHING.\n * `HIGH` (not XHIGH) is the deliberate default — it is the deep-judgment tier\n * used by the derivation/critique/judge agents, and it is supported by every\n * reasoning model we ship.\n *\n * Do NOT pair this preset with a non-reasoning model: registration validates\n * `model × reasoningEffort` against verified capability and will fail closed.\n */\n THINKING_MODE: {\n reasoningEffort: LLMProvider_ReasoningEffort.HIGH,\n },\n \n TOOLING_ENABLED: {\n toolingFunctionEnabled: true,\n },\n \n MCP_COMPATIBLE: {\n mcpCompatible: true,\n },\n \n CODE_GENERATION: {\n temperature: 0.2,\n frequencyPenalty: 0.1,\n },\n \n} as const;\n\nexport type ModelPresetId = keyof typeof ModelPresetsCatalog;\n\n\n//===============================================================\n// TOOL BUNDLES CATALOG\n//===============================================================\n\nexport const ToolBundlesCatalog = {\n //===================\n // SECURITY\n //===================\n \n SECURITY_ANALYSIS: {\n functionRefs: [\"security-scanner\", \"dependency-checker\", \"secrets-detector\"],\n },\n \n //===================\n // CODE\n //===================\n \n CODE_REVIEW: {\n functionRefs: [\"linter\", \"formatter\", \"complexity-analyzer\"],\n },\n \n CODE_GENERATION: {\n functionRefs: [\"code-generator\", \"test-generator\", \"doc-generator\"],\n },\n \n //===================\n // DATA\n //===================\n \n DATA_ANALYSIS: {\n functionRefs: [\"data-query\", \"chart-generator\", \"stats-calculator\"],\n },\n \n //===================\n // OPERATIONS\n //===================\n \n DEPLOYMENT: {\n functionRefs: [\"kubectl-runner\", \"health-checker\", \"rollback-trigger\"],\n },\n \n} as const;\n\nexport type ToolBundleId = keyof typeof ToolBundlesCatalog;\n\n\n//===============================================================\n// MCP BUNDLES CATALOG — REMOVED 2026-09-09 (#491)\n//===============================================================\n//\n// Held three bundles of invented server names — `filesystem-mcp`, `code-editor-mcp`, `git-mcp`,\n// `browser-mcp`, `screenshot-mcp`, `mongodb-mcp`, `postgres-mcp`. None named a server that existed,\n// nothing resolved them into a callable tool, and the agent card rendered them as capabilities: a\n// claim shown to a user about a reach the agent did not have.\n//\n// Two of the three bundles were referenced by nothing but their own tests. The third reached one\n// core facet, now withdrawn with it.\n//\n// An `mcpRef` now names an MCP server the APPLICATION declared (`FlowsActors_McpServer`), and the\n// registry REFUSES an agent whose refs name no declared server — so this shape cannot be recreated.\n// A shipped catalog of refs is the wrong home by construction: the engine does not know which third\n// parties an application permits its agents to reach.\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Compliance: AuditTrailFacet, ConfirmationGateFacet
|
|
7
7
|
* - Quality/Behavior: HighPrecisionFacet, ConservativeFacet, ThinkingModeFacet
|
|
8
8
|
* - Output: VerboseFacet, SuccinctFacet
|
|
9
|
-
* - Domain/Tooling: SecurityAnalysisFacet
|
|
9
|
+
* - Domain/Tooling: SecurityAnalysisFacet
|
|
10
10
|
*
|
|
11
11
|
* Presets (named facet arrays):
|
|
12
12
|
* - CriticalOperationPreset
|
|
@@ -27,7 +27,6 @@ export declare const ThinkingModeFacet: AgentFacet;
|
|
|
27
27
|
export declare const VerboseFacet: AgentFacet;
|
|
28
28
|
export declare const SuccinctFacet: AgentFacet;
|
|
29
29
|
export declare const SecurityAnalysisFacet: AgentFacet;
|
|
30
|
-
export declare const MCPCodeAssistantFacet: AgentFacet;
|
|
31
30
|
export declare const DataAnalysisFacet: AgentFacet;
|
|
32
31
|
/**
|
|
33
32
|
* Critical Operation Preset
|
|
@@ -41,7 +40,13 @@ export declare const CriticalOperationPreset: AgentFacet[];
|
|
|
41
40
|
export declare const SecurityReviewerPreset: AgentFacet[];
|
|
42
41
|
/**
|
|
43
42
|
* Code Assistant Preset
|
|
44
|
-
* Use for:
|
|
43
|
+
* Use for: careful, deliberate assistance on precise work.
|
|
44
|
+
*
|
|
45
|
+
* `MCPCodeAssistantFacet` was removed from this preset 2026-09-09 (#491) — see its withdrawal note
|
|
46
|
+
* above. The preset is KEPT rather than deleted with it: what it composes now is a real posture
|
|
47
|
+
* (deliberate reasoning at high precision) that an application can use today, whereas the removed
|
|
48
|
+
* facet contributed only refs to servers that did not exist. Keeping the preset and dropping the
|
|
49
|
+
* facet is the honest split — nothing here ever supplied the tools, so nothing is lost by saying so.
|
|
45
50
|
*/
|
|
46
51
|
export declare const CodeAssistantPreset: AgentFacet[];
|
|
47
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-facets.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/core-facets.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"core-facets.backend.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/flows-actors/models/core-facets.backend.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,oCAAoC,CAAC;AAoB/E,eAAO,MAAM,aAAa,EAAE,UAc3B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,UAgBjC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,UAcjC,CAAC;AAQF,eAAO,MAAM,eAAe,EAAE,UAiB7B,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,UAgBnC,CAAC;AAQF,eAAO,MAAM,kBAAkB,EAAE,UAgBhC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,UAgB/B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,UAiB/B,CAAC;AAQF,eAAO,MAAM,YAAY,EAAE,UAe1B,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,UAiB3B,CAAC;AAQF,eAAO,MAAM,qBAAqB,EAAE,UAsBnC,CAAC;AAoBF,eAAO,MAAM,iBAAiB,EAAE,UAe/B,CAAC;AAQF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAAU,EAK/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAU,EAK9C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAG3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,EAIzC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Compliance: AuditTrailFacet, ConfirmationGateFacet
|
|
7
7
|
* - Quality/Behavior: HighPrecisionFacet, ConservativeFacet, ThinkingModeFacet
|
|
8
8
|
* - Output: VerboseFacet, SuccinctFacet
|
|
9
|
-
* - Domain/Tooling: SecurityAnalysisFacet
|
|
9
|
+
* - Domain/Tooling: SecurityAnalysisFacet
|
|
10
10
|
*
|
|
11
11
|
* Presets (named facet arrays):
|
|
12
12
|
* - CriticalOperationPreset
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { FacetCategory } from './agent-facets.backend.definitions.js';
|
|
19
19
|
import { AgentFacetsBackendService } from '../../flows-actors/services/agent-facets.backend.service.js';
|
|
20
|
-
import { ConstraintsCatalog, InstructionsCatalog, HintsCatalog, OutOfScopeCatalog, ModelPresetsCatalog, ToolBundlesCatalog,
|
|
20
|
+
import { ConstraintsCatalog, InstructionsCatalog, HintsCatalog, OutOfScopeCatalog, ModelPresetsCatalog, ToolBundlesCatalog, } from './agent-catalogs.backend.definitions.js';
|
|
21
21
|
import { FlowsActors_Agent_UncertaintyPolicy, FlowsActors_Agent_Verbosity, } from '@wildo-ai/saas-models';
|
|
22
22
|
//===============================================================
|
|
23
23
|
// SECURITY FACETS
|
|
@@ -235,17 +235,22 @@ export const SecurityAnalysisFacet = {
|
|
|
235
235
|
},
|
|
236
236
|
};
|
|
237
237
|
AgentFacetsBackendService.registerFacet(SecurityAnalysisFacet);
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
/*
|
|
239
|
+
* `MCPCodeAssistantFacet` was WITHDRAWN 2026-09-09 (#491), with `MCPBundlesCatalog` beside it.
|
|
240
|
+
*
|
|
241
|
+
* It composed `mcpRefs: ["filesystem-mcp", "code-editor-mcp", "git-mcp"]` — three strings that named
|
|
242
|
+
* no server anywhere. Nothing resolved them, and the agent card rendered them, so any agent carrying
|
|
243
|
+
* this facet advertised a reach it did not have. That is the whole of #491.
|
|
244
|
+
*
|
|
245
|
+
* It is not restored as an empty shell. An `mcpRef` now names a server the APPLICATION declared, so
|
|
246
|
+
* a facet shipped by the engine cannot supply one: the engine does not know which third parties an
|
|
247
|
+
* application permits its agents to reach, and that is the decision the declaration exists to hold.
|
|
248
|
+
* A code-assistant facet becomes meaningful again when an application declares a code-assistant MCP
|
|
249
|
+
* server and references it by ref — at which point it is that application's facet, not this file's.
|
|
250
|
+
*
|
|
251
|
+
* The names also described a CODING agent's reach — a filesystem, a git checkout — which is the ACP
|
|
252
|
+
* coding-agent lane rather than anything a generated business application's agent calls.
|
|
253
|
+
*/
|
|
249
254
|
export const DataAnalysisFacet = {
|
|
250
255
|
id: "data-analysis",
|
|
251
256
|
name: "Data Analysis",
|
|
@@ -288,10 +293,15 @@ export const SecurityReviewerPreset = [
|
|
|
288
293
|
];
|
|
289
294
|
/**
|
|
290
295
|
* Code Assistant Preset
|
|
291
|
-
* Use for:
|
|
296
|
+
* Use for: careful, deliberate assistance on precise work.
|
|
297
|
+
*
|
|
298
|
+
* `MCPCodeAssistantFacet` was removed from this preset 2026-09-09 (#491) — see its withdrawal note
|
|
299
|
+
* above. The preset is KEPT rather than deleted with it: what it composes now is a real posture
|
|
300
|
+
* (deliberate reasoning at high precision) that an application can use today, whereas the removed
|
|
301
|
+
* facet contributed only refs to servers that did not exist. Keeping the preset and dropping the
|
|
302
|
+
* facet is the honest split — nothing here ever supplied the tools, so nothing is lost by saying so.
|
|
292
303
|
*/
|
|
293
304
|
export const CodeAssistantPreset = [
|
|
294
|
-
MCPCodeAssistantFacet,
|
|
295
305
|
ThinkingModeFacet,
|
|
296
306
|
HighPrecisionFacet,
|
|
297
307
|
];
|