@wildo-ai/saas-backend-lib 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/__tests__/fixture-deep-partial.d.ts.map +1 -1
- package/dist/esm/__tests__/integration/redis-integration-gate.d.ts.map +1 -1
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/__tests__/test-container.d.ts.map +1 -1
- package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/applications/seeds/application-metadata-defaults.seeds.d.ts.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +12 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/base-classes/services/batches/resource-retention-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/suspension-reactivation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.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.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/audit-access-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/operation-response-serializer.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/method-span-scan.guard-helpers.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-filter-translation.backend.d.ts.map +1 -1
- 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 +13 -4
- 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-query.backend.d.ts.map +1 -1
- 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 +17 -0
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-row-projection.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-subject-erasure-effect.backend.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odoo-jsonrpc-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/rest-json-query-compiler.backend.d.ts.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.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +57 -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 +95 -2
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-guarded-mutation.backend.types.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +5 -2
- 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 +14 -3
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-version-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/resource-write-integrity.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts +72 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js +88 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/unique-constraint-conflict-reference.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-system-access.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/read-only-field-change.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-audit-emission.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-server-injected-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.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.map +1 -1
- 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.map +1 -1
- 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 +44 -6
- 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.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -1
- package/dist/esm/base-classes/utils/single-subject-addressing.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -1
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +5 -4
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js +11 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-subject-erasure-effect.backend.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/billing.utils.d.ts.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.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +32 -0
- 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 +32 -1
- 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.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/credit-pool.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.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +9 -6
- 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 +9 -6
- 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.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -1
- 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 +50 -3
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts +80 -7
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.js +115 -8
- package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/immudb-audit-reconcile.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/siem-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +107 -4
- 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 +176 -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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -1
- 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 +21 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-class-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-dictionary.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-ocsf-projection.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-projection-contract.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/audit-actor.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/layer2-audit-provider-boot-diagnostic.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/index.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-hide-predicate.backend.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-erasure-external-effects.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-session-revocation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/bootstrap/minion-initialization-projection.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js +3 -0
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +4 -4
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -1
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -1
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -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 +3 -0
- 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.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +12 -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 +28 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-run-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-scheduled-rerun.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-models.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/business-key-resolver.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-execution-context.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-migrator-runner.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-reconciler.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-trigger-mode-matrix.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-application-bootstrap.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-scope-resolver-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/additive-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/lazy-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/manual-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/sync-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/upgrade-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-business-key.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-error.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-counters.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-ledger.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-anchor.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-resolution.backend.d.ts.map +1 -1
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/resolve-persistence-adapter.backend.utils.d.ts.map +1 -1
- package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/db-utils.d.ts.map +1 -1
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-development-provisioning.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-migration-runner.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-ddl.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-migration-sql.backend.d.ts.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.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-lockfile.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/resource-persistence-unit-of-work.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/schema-planning-standalone.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -1
- package/dist/esm/databases/utils/postgresql-identifier.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -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.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/batches/external-data-pipeline-scheduled-run.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-extraction-source.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-models.exports.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -1
- 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 +102 -52
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +117 -71
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +26 -7
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +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.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts +81 -34
- 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 +179 -98
- 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.map +1 -1
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +121 -0
- 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 +151 -0
- 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 +15 -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 +60 -4
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -1
- package/dist/esm/features/services/application-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/organization-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/scope-feature-ledger-relationship.backend.utils.d.ts.map +1 -1
- package/dist/esm/features/services/scope-features-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -1
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +37 -0
- 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 +221 -21
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.js +20 -2
- package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +5 -0
- 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.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +8 -5
- 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.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +3 -1
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/services/rag-source-field-detection.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -1
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +36 -1
- 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/file-storage-router.backend.service.d.ts +21 -3
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-router.backend.service.js +38 -5
- package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -1
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts +87 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js +340 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js.map +1 -0
- 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.map +1 -1
- package/dist/esm/files/storage/storage-credential-provider.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-platform-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js +10 -3
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.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.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.map +1 -1
- package/dist/esm/files/utils/file-upload.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
- package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-derivation.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-thumbnail.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/rag-source-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/storage-application-identity.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-push-delivery.batch.backend.service.d.ts.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.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-dialect.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification-delivery.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification.backend.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-dispatcher.backend.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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.map +1 -1
- 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/controllers/flows-actors.controller.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -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 +107 -16
- 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 +118 -18
- 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.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/services/__tests__/fixtures/meta-workflow-evaluation-treatment.test-fixture.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/services/agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +104 -5
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +263 -31
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +46 -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 +193 -6
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +3 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts +99 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js +155 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/meta-workflow-evaluation-treatment-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-action-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-evaluation-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-structured-artifact-action-compiler.backend.service.d.ts.map +1 -1
- 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.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 +9 -0
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/bounded-subprocess.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -1
- 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.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/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts +77 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js +164 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts +48 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js +101 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-scope-id.backend.utils.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/scoped-state-read-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts +10 -0
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +49 -1
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +3 -0
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +3 -0
- 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 +50 -3
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -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.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.map +1 -1
- package/dist/esm/mcp/services/resource-server-instances-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/utils/zod-to-mcp-json-schema.backend.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflow-runtime.exports.d.ts.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.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.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 +3 -3
- 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.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-value-normalization.backend.utils.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -1
- 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/otel-preload.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/otel-sdk-global-handle.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/__tests__/mock-metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/monitoring/observability/services/observability.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-transport.backend.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -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.map +1 -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.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +47 -6
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +86 -36
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -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/email/utils/interpolate-email-label.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +64 -10
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +277 -82
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.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.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-public-key.custom-impl.backend.service.d.ts.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.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/organizations/batches/organization-member-invitation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/authority-change-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/invitation-acceptance.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.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.map +1 -1
- package/dist/esm/organizations/services/organization-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-onboarding-operation.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -1
- package/dist/esm/pdf-templates/__tests__/fixtures/tiny-pdf-template.fixture.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-binding.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-definition.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generated-file-writer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generation-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-renderer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-template-binding.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -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.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/batches/rag-embedding-drain.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/batches/rag-reconciliation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-chunk-store.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-retrieval.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/services/mongodb-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/postgresql-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-collection.mongodb-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.mongodb-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.postgresql-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-table.postgresql-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-ingestion.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-retrieval.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-fusion.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-removal.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-row-shaping.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-ingestion-trigger.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-retrieval-scope.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-source-field-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -1
- package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +49 -1
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/backend-resource-registry.exports.d.ts.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 +2 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/index.d.ts.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.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.map +1 -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.map +1 -1
- package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -1
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.d.ts +17 -2
- package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.js +74 -18
- package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +23 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +31 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-retention.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/models/request-context.als.backend.d.ts.map +1 -1
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +10 -0
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -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 +26 -12
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/utils/oauth-body-cap.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -1
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -1
- package/dist/esm/runtime/utils/application-startup-config-access.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/feature-gated-core-resource-exclusions.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/request-client-ip.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-key-generation.backend.utils.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +22 -0
- 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 +84 -0
- 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.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authorization-client.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js.map +1 -0
- package/dist/esm/security/authentications/models/identity-persistence-boundaries.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.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/models/saml-authentication.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/user-authorization-version.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/seeds/enterprise-config-defaults.seeds.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/oauth-provider-audit-spies.mock.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +2 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +9 -2
- 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 +9 -2
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.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.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +97 -0
- 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 +218 -26
- 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 +14 -0
- 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 +36 -0
- 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/saml-assertion-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -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.map +1 -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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +57 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +11 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/email-verification-initiator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/machine-token-issuer.backend.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/services/oidc-user-claims.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/resolve-active-member-orgs.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.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.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.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.map +1 -1
- package/dist/esm/security/authentications/services/utils/concurrent-session-eviction.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/ensure-user-profile.backend.utils.d.ts.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/services/utils/machine-auth-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/pkce.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/application-auth-policy-audit.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/utils/one-off-session-lifetime.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/social-oauth2-purpose.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts +59 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js +111 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts +57 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js +133 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts +41 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js +157 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts +84 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js +99 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js.map +1 -0
- package/dist/esm/security/authorizations/authorization-denial-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/junction-scope-resolution.backend.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/organization-unit-narrowing-enforcement.backend.d.ts.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 +20 -181
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/relationship-foreign-key-filter.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +40 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +43 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +27 -17
- 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 +27 -17
- 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 +72 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +153 -10
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +139 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +474 -33
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +40 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +38 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +17 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +14 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +16 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +45 -2
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +37 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts +34 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js +39 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts +13 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js +14 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js.map +1 -1
- package/dist/esm/security/jwt/utils/jwt-verification-error-classification.backend.utils.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts +39 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js +60 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts +66 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js +75 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/scim/utils/scim-attribute-path-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -1
- package/dist/esm/security/session-invalidation-fence.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -1
- package/dist/esm/security/token-invalidation-fence.backend.utils.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/services/inbound-contact-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts +0 -45
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts.map +0 -1
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js +0 -22
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversational-execution.backend.service.js","sourceRoot":"","sources":["../../../../../src/flows-actors/services/conversational-execution.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,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAC3H,OAAO,EAAE,qCAAqC,EAAE,MAAM,6FAA6F,CAAC;AACpJ,OAAO,EAAE,0BAA0B,EAAE,MAAM,iFAAiF,CAAC;AAC7H,OAAO,EAAE,qCAAqC,EAAE,MAAM,+EAA+E,CAAC;AAKtI,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,8BAA8B,EAAgC,MAAM,0BAA0B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7C,SAAS;YACT,WAAW;YACX,SAAS;YACT,YAAY;YACZ,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA3/BY,qCAAqC;IADjD,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;IACrD,WAAA,MAAM,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;IAC/C,WAAA,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAA;IAClD,WAAA,MAAM,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAA;IACzD,WAAA,MAAM,CAAC,kBAAkB,CAAC,qCAAqC,CAAC,CAAA;IAChE,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAA;IAIlD,WAAA,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;qCAXW,aAAa;QACoB,0BAA0B;QACtC,oBAAoB;QACb,+BAA+B;QAClB,qCAAqC;QAC9B,qCAAqC;QAClE,0BAA0B;GARhG,qCAAqC,CA2/BjD","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { randomUUID } from 'crypto';\n\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport { SystemAccessBackendService } from '~wildo-backend-lib/base-classes/services/services/system-access.backend.service';\nimport { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport type { FunctionToolExecutionContext } from '~wildo-backend-lib/flows-actors/models/function-tools.backend.definitions';\nimport type { RateLimitBackendService } from '~wildo-backend-lib/errors/services/rate-limit.backend.service';\nimport type { AuthorizationsBackendService } from '~wildo-backend-lib/security/authorizations/services/authorizations.backend.service';\nimport { FlowsActorsRegistryService } from './flows-actors-registry.service';\nimport { AgentsBackendService, AgentStreamingUnsupportedError, type AgentApprovalSuspension } from './agents.backend.service';\nimport {\n Actor_ExecutionMode,\n CoreResourceType,\n CoreWebSocketEvent,\n FlowActorSystem_Kind,\n FlowsActors_ConversationRole,\n FlowsActors_MessageContentType,\n FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE,\n FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS,\n parseFlowActorPausedApproval,\n type FlowActorExecution_PausedApproval,\n serializeFlowActorPausedApproval,\n FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n FlowsActors_Status,\n type ActorSystem,\n type AgentTraceContext,\n type ExecutionContext_InitiatorIds,\n type FlowActorExecution,\n type FlowActorExecution_Message,\n type FlowsActors_Agent_Invocation,\n type WS_FlowsActorsApprovalAnnouncementData,\n} from '@wildo-ai/saas-models';\n\n/**\n * Transport-agnostic sink for the server→client events a conversational\n * execution emits. The WebSocket layer supplies an implementation bound to the\n * initiating user's room; this service never imports `WebSocketService`, which\n * (a) keeps the runtime independent of the transport (Decision A's honest seam —\n * a future SSE/other transport could supply a different emitter) and (b) avoids\n * a circular DI dependency between the two services.\n *\n * The `event` is one of the `CoreWebSocketEvent.FLOWS_ACTORS_*` server→client\n * events; `payload` matches the corresponding `WS_FlowsActors*PayloadSchema`.\n */\nexport type FlowsActorsExecutionEmitter = (event: CoreWebSocketEvent, payload: unknown) => void;\n\n/**\n * Owner scope of a conversation — EXACTLY ONE owner. Selects the persisted\n * polymorphic variant resource and its owner FK:\n * - `{ userId }` → `userFlowActorExecutions` (WS chat + user-delegated A2A)\n * - `{ organizationId }` → `organizationFlowActorExecutions` (org-machine A2A)\n * - `{ applicationId }` → `applicationFlowActorExecutions` (app-machine A2A)\n *\n * A conversation is owned by exactly one scope; the runtime never mixes owners on\n * one row. Resolved to `{ resourceType, ownerFields, scopeContext }` by\n * `resolveOwnerVariant`.\n */\nexport type ConversationalOwnerScope =\n | { userId: string }\n | { organizationId: string }\n | { applicationId: string };\n\n/** An owner scope resolved to its persisted variant + owner FK + `*AsSystem` scope map. */\nexport interface ResolvedOwnerVariant {\n resourceType: CoreResourceType;\n ownerFields: Record<string, string>;\n scopeContext: { userId?: string; organizationId?: string; applicationId?: string };\n}\n\n/** Parameters to start one conversational execution of an actor system. */\nexport interface StartConversationalExecutionParams {\n /**\n * The A2A agent this turn arrived through — absent for the WebSocket surface, which has no agent,\n * and for the default (unnamed) A2A agent. Normalised to the sentinel on the way to storage and\n * part of the continuation filter thereafter, so a held `contextId` cannot load this transcript\n * into a different agent's context (review finding G5-8).\n */\n resourceServerInstanceRef?: string;\n /** Ref of the flow/actor system to converse with. */\n systemRef: string;\n /** Client-supplied execution id; a new one is minted when absent. */\n executionId?: string;\n /** Free-form start input from the client; the user's turn is read from it. */\n initialInput?: Record<string, unknown>;\n /** Authenticated initiator identity (from the socket / A2A auth). */\n initiator: ExecutionContext_InitiatorIds;\n /**\n * Full verified auth of the caller (user OR machine principal). Used to build\n * the tool `ExecutionContext` when running the agent's tools, so tools read/write\n * as the caller with the caller's own visibility (never trusting LLM-supplied\n * identity).\n */\n auth: SocketAuthResult;\n /** Owner scope of the persisted execution (selects the variant + owner FK). */\n scopeContext: ConversationalOwnerScope;\n /** Sink for the server→client stream of this execution. */\n emitter: FlowsActorsExecutionEmitter;\n /**\n * Cooperative cancellation for this turn's model call. Supplied by the A2A transport\n * when the turn is addressable as a task (so `tasks/cancel` can reach it); absent for\n * WebSocket chat, where the client cancels by disconnecting.\n */\n abortSignal?: AbortSignal;\n /**\n * Optional sink for the turn's LLM token usage, invoked once after the agent returns (streamed\n * or buffered) when the provider reported usage. Exists because usage is only knowable AFTER the\n * stream drains, so it cannot ride the per-delta `emitter` — and the transport-agnostic runtime\n * must not itself know about metering or budgets. The A2A transport uses it to accumulate the\n * caller's per-tenant token budget; callers that do not meter simply omit it.\n */\n onUsage?: (usage: { totalTokens?: number }) => void;\n}\n\n/**\n * Drives a **conversational execution** of a flows-actors system: resolve the\n * system, find its chat actor's agent, stream the agent's token-by-token answer\n * (executing its grounding tools mid-turn), and persist the execution + full\n * message log to the owner's `*FlowActorExecutions` variant — streaming server→client\n * events over the supplied emitter throughout.\n *\n * PERSISTENCE + MULTI-TURN (server-authoritative): one execution row per\n * discussion accumulates every turn's messages. Each turn READS the existing row\n * (owner-scoped via `scopeContext` — the USER_SELF filter resolves from the scope\n * context-map, never LLM- or client-supplied identity), builds the LLM context\n * from that DURABLE transcript, appends the new user + assistant turns, and writes\n * the row back. Reload history is served from the same rows by the controller's\n * `/flows-actors/history` endpoint under the caller's own EC. No client-supplied\n * history is trusted, and nothing is stored browser-side.\n *\n * SCOPE: the actor conversational path streams a real round-trip against\n * `AgentsBackendService.invokeAgentStreaming` (buffered fallback for non-streaming\n * transports) with tool execution. The richer actor plan/task orchestration\n * (`actorState` graph state) is not produced yet — see the schema note.\n *\n * KIND-AGNOSTIC (Invariant): the record persisted is kind-discriminated. v1\n * implements the ACTOR conversational path only; a FLOW system fails closed with\n * a typed \"not implemented\" rather than pretending to run.\n */\n/**\n * Keep only conversation messages that can actually be PERSISTED — i.e. those carrying content.\n *\n * WHY: `FlowActorExecution_Message.content` is declared `z.string()`, which maps to a REQUIRED\n * mongoose string, and mongoose treats `''` as ABSENT — so a message with empty content fails the\n * write with `messages.<n>.content: Path 'content' is required`. That matters far beyond the one\n * message: the execution row is persisted by writing the WHOLE messages array together with the\n * terminal status, so ONE contentless message used to fail the entire update — discarding the user's\n * own turn and leaving the row wedged at PROCESSING. An assistant turn legitimately produces no text\n * (a reasoning-only step, or a tool loop whose continuation yielded nothing), so this is a real state\n * that must not cost the rest of the history.\n *\n * Dropping such a message is honest rather than lossy: an empty message carries no information, and\n * its absence — next to a COMPLETED status — is itself the signal. Callers should log the empty-reply\n * case so it stays visible.\n */\nexport function toPersistableConversationMessages(\n messages: readonly FlowActorExecution_Message[],\n): FlowActorExecution_Message[] {\n return messages.filter((message) => typeof message?.content === 'string' && message.content.length > 0);\n}\n\n/**\n * The machine credential that owns a turn, normalised for storage and filtering.\n *\n * A user-delegated turn has none — the human is the principal and the `userId` owner FK already\n * discriminates — so it stores the sentinel rather than a null, keeping the filter a plain\n * equality on both persistence adapters.\n */\n/**\n * The agent instance a turn arrived through, normalised for storage and filtering.\n *\n * The WebSocket surface has no agent and the default A2A agent is an identity of its own; both\n * store the sentinel. One resolver rather than the expression repeated at each of the five\n * owner-scoped sites — see `.claude/rules/invariant-call-site-enumeration.md`.\n */\nfunction agentInstanceOf(resourceServerInstanceRef: string | undefined): string {\n return resourceServerInstanceRef ?? FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE;\n}\n\nfunction machineCredentialIdOf(auth: { initiatorIds?: { machineCredential?: { credentialId?: string } } } | undefined): string {\n return auth?.initiatorIds?.machineCredential?.credentialId ?? FLOWS_ACTORS_NO_MACHINE_CREDENTIAL;\n}\n\n@injectable()\nexport class ConversationalExecutionBackendService {\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.AgentsBackendService) private readonly agentsBackend: AgentsBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) private readonly resourcesRegistry: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ServicesRegistryHandlerService) private readonly servicesRegistryHandler: ServicesRegistryHandlerBackendService,\n @inject(SAAS_SERVICE_TYPES.ExecutionContextCreatorBackendService) private readonly executionContextCreator: ExecutionContextCreatorBackendService,\n @inject(SAAS_SERVICE_TYPES.SystemAccessService) private readonly systemAccess: SystemAccessBackendService,\n @inject(SAAS_SERVICE_TYPES.RateLimitBackendService) private readonly rateLimitService: RateLimitBackendService,\n // Appended LAST deliberately: a constructor parameter inserted mid-list silently re-binds every\n // positional construction site (the DI container resolves by decorator, hand-built test doubles\n // do not).\n @inject(SAAS_SERVICE_TYPES.AuthorizationsService) private readonly authorizer: AuthorizationsBackendService,\n ) {}\n\n /**\n * Resolve the owner scope to its persisted polymorphic variant: the concrete\n * `CoreResourceType`, the single owner FK to write on create, and the `*AsSystem`\n * scope-context map (which seeds the contextual filter so reads/writes are scoped\n * to that owner). Fails closed if no owner is present. Priority userId → org → app\n * (a conversation has exactly one owner; priority only disambiguates a\n * mis-populated caller).\n */\n private resolveOwnerVariant(scope: ConversationalOwnerScope): ResolvedOwnerVariant {\n const s = scope as { userId?: string; organizationId?: string; applicationId?: string };\n if (s.userId) {\n return { resourceType: CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS, ownerFields: { userId: s.userId }, scopeContext: { userId: s.userId } };\n }\n if (s.organizationId) {\n return { resourceType: CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS, ownerFields: { organizationId: s.organizationId }, scopeContext: { organizationId: s.organizationId } };\n }\n if (s.applicationId) {\n return { resourceType: CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS, ownerFields: { applicationId: s.applicationId }, scopeContext: { applicationId: s.applicationId } };\n }\n throw new Error('[ConversationalExecution] scopeContext carries no owner (userId | organizationId | applicationId).');\n }\n\n /**\n * Start (and, for v1, fully run) one conversational execution. Never throws to\n * the caller — every failure path is reported through the emitter as a\n * `FLOWS_ACTORS_ERROR`, so the WebSocket handler stays a thin dispatcher.\n */\n public async startConversationalExecution(params: StartConversationalExecutionParams): Promise<void> {\n const { systemRef, initialInput, initiator, auth, scopeContext, emitter } = params;\n const executionId = params.executionId ?? randomUUID();\n const startedAt = Date.now();\n\n // Resolve the owner scope → its persisted variant (userFlowActorExecutions /\n // organizationFlowActorExecutions / applicationFlowActorExecutions) + owner FK.\n // Never throws to the caller — a missing owner is reported through the emitter.\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(scopeContext);\n } catch {\n this.emitError(emitter, systemRef, executionId, 'NO_OWNER', 'The conversation has no resolvable owner scope.');\n return;\n }\n\n // ── Resolve the system (ACTOR-only in v1; FLOW fails closed) ──────────────\n const actorSystem = this.resolveConversationalActorSystem(systemRef, executionId, emitter);\n if (!actorSystem) return;\n\n // ── Find the chat actor's agent ──────────────────────────────────────────\n const agentRef = this.resolveChatAgentRef(actorSystem);\n if (!agentRef) {\n this.emitError(emitter, systemRef, executionId, 'NO_CHAT_ACTOR', `System '${systemRef}' has no AGENTIC actor bound to an agent to converse with.`);\n return;\n }\n\n // ── Extract the user's turn ──────────────────────────────────────────────\n const userText = this.extractUserText(initialInput);\n if (!userText) {\n this.emitError(emitter, systemRef, executionId, 'EMPTY_INPUT', 'No user message was provided to start the conversation.');\n return;\n }\n\n // ── Load the persisted thread (server-authoritative history) ─────────────\n // One execution row per discussion accumulates every turn's message log. On a\n // CONTINUED thread the client reuses the `executionId`, so the row already\n // exists; reading it here yields BOTH the durable transcript to append to AND\n // the multi-turn context for the LLM — no client-supplied history is trusted.\n //\n // The read is owner-scoped through `scopeContext`: `readAsSystem` seeds the\n // USER_SELF filter from the scope context-map (`userId`), NOT from the absent\n // system-context initiator identity (an internal EC rejects identity fields on\n // `initiatorIds`). So a user only ever reads their own thread.\n const now = new Date();\n let priorMessages: FlowActorExecution_Message[] = [];\n let rowExists = false;\n try {\n // Scope the lookup by the owner FK, NOT `executionId` alone: `executionId` is\n // CALLER-SUPPLIED (the A2A `contextId`), and the APPLICATION variant's `*AsSystem`\n // scope-context map does NOT carry `applicationId` (system-access forwards it to\n // `initiatorIds`, which the contextual filter never reads). Without the owner FK\n // in the filter, an app-machine that supplies ANOTHER app's `executionId` would\n // read/continue that app's conversation. The FK makes every variant fail-closed\n // (redundant-but-harmless for USER/ORG, load-bearing for APP).\n const existing = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType,\n // The CREDENTIAL axis rides alongside the owner FK (finding H-5). The scope FK does not\n // identify the principal on the machine variants — `applicationId` is a deployment\n // singleton and `organizationId` is shared by every machine client of one tenant — so\n // without it a separately-credentialed client could continue another's conversation and\n // read its whole message log.\n { executionId, ...owner.ownerFields, machineCredentialId: machineCredentialIdOf(auth), resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) },\n { scopeContext: owner.scopeContext },\n );\n if (existing) {\n rowExists = true;\n priorMessages = existing.messages ?? [];\n }\n } catch (error) {\n // Non-fatal: treat as a fresh thread. A create below surfaces any hard\n // persistence failure loudly; a transient read blip must not drop the turn.\n this.logger.error('[ConversationalExecution] Failed to read existing execution', { systemRef, executionId, error });\n }\n\n const userMessage: FlowActorExecution_Message = {\n id: randomUUID(),\n role: FlowsActors_ConversationRole.USER,\n contentType: FlowsActors_MessageContentType.TEXT,\n content: userText,\n createdAt: now,\n };\n\n // ── Open (new) or advance (continued) the row to PROCESSING ──────────────\n // A new thread INSERTs; a continued thread UPDATEs by `executionId` (the row's\n // `isUnique({ scope: 'global' })` id) so a reused id never collides on insert —\n // the prior bug was an unconditional create that E11000'd on continuation.\n try {\n if (!rowExists) {\n await this.systemAccess.createAsSystem(owner.resourceType, {\n executionId,\n ...owner.ownerFields,\n systemRef,\n kind: FlowActorSystem_Kind.ACTOR,\n status: FlowsActors_Status.PROCESSING,\n statusChanges: [{ status: FlowsActors_Status.PROCESSING, timestamp: now }],\n messages: [userMessage],\n machineCredentialId: machineCredentialIdOf(auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n }, { scopeContext: owner.scopeContext });\n } else {\n const advanced = await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId: machineCredentialIdOf(auth), resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) }, {\n status: FlowsActors_Status.PROCESSING,\n messages: [...priorMessages, userMessage],\n }, { scopeContext: owner.scopeContext });\n // The row existed on read but the owner-scoped write matched nothing →\n // a real scope inconsistency, not an empty result. Fail loudly.\n if (!advanced) {\n this.logger.error('[ConversationalExecution] Continued-thread PROCESSING update matched no row', { systemRef, executionId, owner: owner.scopeContext });\n }\n }\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to persist execution', { systemRef, executionId, error });\n this.emitError(emitter, systemRef, executionId, 'PERSIST_FAILED', 'Failed to open the execution record.');\n return;\n }\n\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_STARTED, { systemRef, executionId, success: true });\n\n // ── Invoke the agent, streaming token deltas back over the channel ───────\n // One id ties every streamed delta to a single assistant message on the\n // client (the payload's `messageId`); the terminal event carries the full\n // assembled markdown (`isFinal: true`).\n const assistantMessageId = randomUUID();\n // Generics are Zod *schema* types (fields are `z.infer<...>`); the runtime\n // invocation is untyped input, matching `invokeAgent`'s own `<any,any,any>`.\n // Multi-turn context from the DURABLE transcript (server-authoritative): the\n // thread's prior user/assistant turns from the DB, then the new user message.\n // PROGRESS/SYSTEM/TOOL log entries are not conversational, so they are dropped.\n const conversationMessages = [\n ...priorMessages\n .filter((m) => m.role === FlowsActors_ConversationRole.USER || m.role === FlowsActors_ConversationRole.ASSISTANT)\n .map((m) => ({ role: m.role, content: m.content })),\n { role: 'user', content: userText },\n ];\n const invocation: FlowsActors_Agent_Invocation<any, any, any> = {\n agentRef,\n initiator,\n invocationContext: [],\n input: { messages: conversationMessages },\n output: {},\n executionContext: {},\n artifactBindings: [],\n };\n\n // Tool-execution context: lets the agent's grounding tools read the user's\n // own data (scoped by the caller's verified auth), never LLM-supplied identity.\n const toolContext: FunctionToolExecutionContext = this.buildToolExecutionContext(auth);\n\n // Traceability: correlate every agent call of this conversation (`sessionRef` =\n // executionId) and carry the EXTERNAL PRINCIPAL as filterable dimensions, so\n // run-time observability can attribute LLM spend + behaviour to the caller — a\n // user, or an org/app machine agent (A2A). The engine emits a per-call trace to\n // the configured sink only when traceability is enabled (NONE ⇒ skipped).\n const traceContext: AgentTraceContext = {\n sessionRef: executionId,\n label: `flows-actors:${systemRef}`,\n attributes: {\n systemRef,\n executionType: auth.executionType,\n ...owner.ownerFields,\n ...(auth.initiatorIds?.machineCredential ? { machineCredential: auth.initiatorIds.machineCredential } : {}),\n },\n };\n\n let assistantText: string;\n /** Set when the turn stopped at a human-in-the-loop boundary instead of finishing. */\n let approvalSuspension: AgentApprovalSuspension | undefined;\n try {\n try {\n let streamedText = '';\n const result = await this.agentsBackend.invokeAgentStreaming(invocation, {\n abortSignal: params.abortSignal,\n onDelta: (delta) => {\n streamedText += delta;\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageId: assistantMessageId,\n // MARKDOWN throughout: LLM chat output is markdown, and the client's\n // streaming renderer (Streamdown) handles partial markdown, so the\n // reply renders formatted as it streams — not plain text then a swap.\n messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: delta,\n isFinal: false,\n timestamp: new Date(),\n });\n },\n onToolEvent: (event) => {\n // One friendly status per tool CALL (the result event is not surfaced —\n // the streamed answer replaces the status). e.g. \"Looking up your todos…\".\n if (event.phase !== 'call') return;\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageType: FlowsActors_MessageContentType.PROGRESS,\n content: this.humanizeToolStatus(event.toolName),\n data: { tool: event.toolName, phase: event.phase },\n timestamp: new Date(),\n });\n },\n }, toolContext, traceContext);\n assistantText = this.extractAssistantText(result.output) || streamedText;\n this.reportUsage(params, result);\n approvalSuspension = (result as { approvalSuspension?: AgentApprovalSuspension }).approvalSuspension;\n } catch (streamError) {\n if (streamError instanceof AgentStreamingUnsupportedError) {\n // Graceful degradation (e.g. a CLI-transport agent): deliver the full\n // reply in one buffered turn — not streamed, but honest and complete.\n //\n // ⚠️ CANCELLATION LIMIT (review finding F-6) — a deliberate SCOPE CHOICE, and it\n // matters that it is recorded as one rather than as a technical impossibility.\n //\n // It WOULD be wireable: AI-SDK's `generateText` accepts an `abortSignal`, and Node's\n // `spawn` accepts one too, so both the buffered provider call and the CLI child\n // process could honour cancellation. What stops it today is that no seam exists and\n // adding one widens `invokeAgent` — an `@wildo_source`-ANCHORED public contract that\n // ships into app-facing skills — for a capability nothing yet exercises.\n //\n // An earlier version of this comment claimed a signal \"cannot reach\" these\n // transports. That was false, and stating a choice as an impossibility is exactly\n // what stops a future maintainer revisiting it. Revisit it when a buffered-transport\n // agent actually needs interruption.\n //\n // What IS honoured: a cancellation that arrived before this fallback begins. That\n // bounds the exposure to one already-started buffered turn instead of letting a\n // cancelled conversation start a whole new one.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn was cancelled before the buffered fallback began; recording CANCELLED', { systemRef, executionId });\n // FINALIZE, do not just return (review finding G4-2). Returning bare left the row wedged\n // at PROCESSING while the task plane had already written CANCELLED — the same two-plane\n // disagreement G3-1 was raised to fix, surviving on the one transport G3-1's fix does not\n // reach. It also contradicted this file's own completion path, which exists so a reload\n // never shows \"a row wedged at PROCESSING\".\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n this.logger.info('[ConversationalExecution] Streaming unsupported; falling back to buffered invocation', { systemRef, executionId, reason: streamError.reason });\n const result = await this.agentsBackend.invokeAgent(invocation, traceContext);\n assistantText = this.extractAssistantText(result.output);\n this.reportUsage(params, result);\n } else {\n throw streamError;\n }\n }\n } catch (error) {\n // A CANCELLED turn is not a failed one: `tasks/cancel` and an SSE disconnect both abort the\n // model call deliberately, so without this branch an ordinary user action is recorded as\n // `FAILED`, emits `AGENT_FAILED` to the client, and logs at ERROR twice per cancellation —\n // contradicting the task plane (which writes `CANCELLED` for the same event) and training\n // operators to ignore the error channel.\n //\n // ⚠️ THIS IS THE SECONDARY ARM, not the primary one. An earlier revision claimed \"the abort\n // surfaces here as a thrown provider/SDK error\" and relied on that; it is NOT reliably true\n // (AI-SDK v7 ends an aborted stream cleanly with an `abort` part), and the claim quietly\n // became false when the metering fix removed the one read that threw. See the post-invocation\n // check after this block — that is what actually catches a cancelled streaming turn. This arm\n // survives for the transports and providers that DO throw on abort (a future buffered call\n // wired to a signal, an SDK layer that rejects), so cancellation is classified correctly\n // whether it arrives as a throw or as a clean return. Do not delete it; do not rely on it alone.\n //\n // Detected from OUR OWN signal rather than the error's shape: abort errors are named\n // inconsistently across providers and SDK layers, whereas `abortSignal.aborted` is the fact\n // we control and is true only because something deliberately cancelled this turn.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn cancelled by the caller; recording CANCELLED', { systemRef, executionId, agentRef });\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n this.logger.error('[ConversationalExecution] Agent invocation failed', { systemRef, executionId, agentRef, error });\n // Mark the persisted row FAILED (keeping the user turn) so a reload shows the\n // question with a failed status rather than a row wedged at PROCESSING.\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.FAILED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n this.emitError(emitter, systemRef, executionId, 'AGENT_FAILED', 'The assistant failed to produce a response.');\n return;\n }\n\n // ── A SUSPENDED turn is not a COMPLETED one either ───────────────────────\n //\n // Ordered before the cancellation check on purpose: both are non-completion outcomes, but a\n // turn cannot be both, and a suspension carries state that must be persisted before anything\n // else can act on the row. Falling through to the completion write below would record a\n // terminal status for work the model has not done — the same class of lie as recording\n // COMPLETED for a cancelled turn.\n if (approvalSuspension) {\n await this.persistApprovalSuspension({\n systemRef, executionId, owner, auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n messages: [...priorMessages, userMessage],\n suspension: approvalSuspension,\n emitter,\n });\n return;\n }\n\n // ── A CANCELLED turn is not a COMPLETED one ──────────────────────────────\n //\n // ⚠️ THIS CHECK CANNOT MOVE BACK INTO THE `catch` ABOVE — that is precisely where it used to\n // live, and where it silently died (review findings F-B, then G3-1).\n //\n // F-B detected cancellation in the catch on the premise stated in its own comment: \"the abort\n // surfaces here as a thrown provider/SDK error\". A LATER fix IN THE SAME BATCH (F-A, the\n // unmetered-cancellation hole) removed the only thing that threw — `streamTextToDeltas`'s\n // unguarded `await result.usage`. AI-SDK v7 signals an abort as a stream PART (`type:'abort'`),\n // so `fullStream` ends cleanly, `invokeAgentStreaming` only re-throws what it catches, and\n // nothing below the controller throws at all. F-B's branch therefore became DEAD CODE on the\n // only abortable transport, and every cancelled streaming turn fell through to the COMPLETED\n // write below — reproducing the two-plane disagreement F-B existed to fix, inverted (task plane\n // CANCELLED, conversation plane COMPLETED, on the same user action).\n //\n // The lesson generalises: a handler that detects a condition by CATCHING is coupled to whoever\n // throws, and that coupling is invisible to the type system. Detect from the signal we own.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn cancelled by the caller; recording CANCELLED', { systemRef, executionId, agentRef });\n // Retain whatever already streamed: the user SAW that text, so discarding it would leave a\n // reloaded transcript emptier than the live one was. `toPersistableConversationMessages`\n // (inside `finalizeTerminal`) drops a contentless message, so an immediately-cancelled turn\n // persists nothing extra rather than an empty assistant bubble.\n const cancelledMessages: FlowActorExecution_Message[] = assistantText.length > 0\n ? [...priorMessages, userMessage, {\n id: assistantMessageId,\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: new Date(),\n }]\n : [...priorMessages, userMessage];\n await this.finalizeTerminal(systemRef, executionId, owner, cancelledMessages, FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n\n // ── Persist the assistant turn + complete ────────────────────────────────\n const finishedAt = new Date();\n const assistantMessage: FlowActorExecution_Message = {\n id: assistantMessageId,\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: finishedAt,\n };\n if (assistantText.length === 0) {\n this.logger.warn('[ConversationalExecution] Assistant produced no text; persisting the turn without an assistant message', { systemRef, executionId, agentRef });\n }\n const persistedMessages = toPersistableConversationMessages([...priorMessages, userMessage, assistantMessage]);\n try {\n const completed = await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId: params.auth ? machineCredentialIdOf(params.auth) : FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) }, {\n status: FlowsActors_Status.COMPLETED,\n finishedAt,\n statusChanges: [\n { status: FlowsActors_Status.PROCESSING, timestamp: now },\n { status: FlowsActors_Status.COMPLETED, timestamp: finishedAt },\n ],\n messages: persistedMessages,\n }, { scopeContext: owner.scopeContext });\n if (!completed) {\n this.logger.error('[ConversationalExecution] Completion update matched no row', { systemRef, executionId, owner: owner.scopeContext });\n }\n } catch (error) {\n // The answer was produced and streamed; a persistence failure here is logged\n // but the user still receives the reply (best-effort durable history).\n this.logger.error('[ConversationalExecution] Failed to persist assistant turn', { systemRef, executionId, error });\n }\n\n // Terminal, authoritative message: full assembled markdown. The client\n // replaces the accumulated `text` deltas for this `messageId` with it.\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageId: assistantMessageId,\n messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n isFinal: true,\n timestamp: new Date(),\n });\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_COMPLETED, {\n systemRef,\n executionId,\n success: true,\n duration: Date.now() - startedAt,\n });\n }\n\n /**\n * Mark a persisted execution FAILED after the agent invocation threw. The\n * user's turn is retained (passed in) so a reloaded transcript still shows the\n * question. Best-effort: a persistence failure here is logged, never thrown —\n * the caller has already emitted the client-facing error.\n */\n /**\n * Record a TERMINAL outcome for the turn, keeping the messages accumulated so far.\n *\n * The status is a parameter because a cancelled turn is NOT a failed one. A caller who invokes\n * `tasks/cancel`, or an SSE client that disconnects, ABORTS the model call deliberately — writing\n * `FAILED` there would contradict the task plane (the A2A controller records `CANCELLED` for the\n * very same event) and would leave the two planes disagreeing about one user action.\n */\n private async finalizeTerminal(\n systemRef: string,\n executionId: string,\n owner: ResolvedOwnerVariant,\n messages: FlowActorExecution_Message[],\n status: FlowsActors_Status.FAILED | FlowsActors_Status.CANCELLED,\n // Carried explicitly: this write is owner-scoped, and the owner FK alone does not identify the\n // principal on the machine variants — a terminal write that omits the axis matches nothing.\n machineCredentialId: string = FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n resourceServerInstanceRef: string = FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE,\n ): Promise<void> {\n try {\n await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId, resourceServerInstanceRef }, {\n status,\n finishedAt: new Date(),\n // Same persistence invariant as the completion path: one contentless message would fail the\n // whole update and lose the terminal status the caller is trying to record.\n messages: toPersistableConversationMessages(messages),\n }, { scopeContext: owner.scopeContext });\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to finalize execution', { systemRef, executionId, status, error });\n }\n }\n\n\n /**\n * Persist a turn that SUSPENDED at a human-in-the-loop approval boundary.\n *\n * Writes `AWAITING_APPROVAL` plus the serialized run state, then tells the client what decision is\n * being asked for. Three properties matter and each is deliberate:\n *\n * - **It is not terminal.** `AWAITING_APPROVAL` projects to A2A `input-required`, which is\n * explicitly exempt from the liveness sweep and from derive-on-read (finding A3-3) — a paused\n * turn holds no lease BY DESIGN, and treating \"no lease\" as \"abandoned\" here would fail every\n * approval one grace window after it was requested.\n * - **The user's turn is persisted with it.** A reload during the wait must still show the\n * question that is pending a decision, not an empty thread.\n * - **A failed write is loud.** If the row does not record the pause, the resume has nothing to\n * load and the turn is unrecoverable — silence here would strand a human decision forever.\n */\n private async persistApprovalSuspension(params: {\n systemRef: string;\n executionId: string;\n owner: ResolvedOwnerVariant;\n auth: SocketAuthResult | undefined;\n resourceServerInstanceRef?: string;\n messages: FlowActorExecution_Message[];\n suspension: AgentApprovalSuspension;\n emitter: FlowsActorsExecutionEmitter;\n }): Promise<void> {\n const { systemRef, executionId, owner, suspension, emitter } = params;\n const requestedAt = new Date().toISOString();\n const pausedApprovalExpiresAt = new Date(Date.now() + FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS).toISOString();\n\n const pausedApproval = serializeFlowActorPausedApproval({\n approvalId: suspension.approvalId,\n sdkModelMessages: suspension.sdkModelMessages,\n pendingToolName: suspension.toolName,\n pendingToolArgs: suspension.toolArgs,\n requestedAt,\n // #465: the suspension carries its own expiry. The field was declared, sent to the browser and\n // read there, and never written — so a pending approval never expired.\n //\n // Computed ONCE, above, and shared with the announcement below: two `Date.now()` calls would\n // let the row and the message a client is shown disagree about when the pause lapses.\n expiresAt: pausedApprovalExpiresAt,\n });\n\n try {\n const paused = await this.systemAccess.updateAsSystem(\n owner.resourceType,\n {\n executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n },\n {\n status: FlowsActors_Status.AWAITING_APPROVAL,\n pausedApproval,\n messages: toPersistableConversationMessages(params.messages),\n },\n { scopeContext: owner.scopeContext },\n );\n if (!paused) {\n this.logger.error('[ConversationalExecution] Approval-pause write matched no row; the decision cannot be resumed', {\n systemRef, executionId, approvalId: suspension.approvalId,\n });\n return;\n }\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to persist an approval pause; the turn is unrecoverable', {\n systemRef, executionId, approvalId: suspension.approvalId, ...projectCaughtErrorLogFields(error),\n });\n return;\n }\n\n // Only announce a pause that was actually RECORDED. Emitting first would invite a client to\n // answer a decision no row can accept.\n /*\n * Built through the NAMED schema rather than as an anonymous `data` bag. The bag is\n * `Record<string, unknown>` on the wire, so nothing typed this announcement and the browser\n * ended up listening on `FLOWS_ACTORS_APPROVAL_REQUEST` — an event no code has ever emitted\n * — which meant no shipped screen could observe a paused turn at all (#528). Typing the\n * producer is what lets the consumer parse it instead of guessing at keys.\n *\n * `expiresAt` travels here and nowhere else: since #465 the suspension genuinely carries an\n * expiry, and this block is the only path by which a client can learn it.\n */\n const announcement: WS_FlowsActorsApprovalAnnouncementData = {\n approvalRequested: true,\n approvalId: suspension.approvalId,\n toolName: suspension.toolName,\n toolArgs: suspension.toolArgs,\n requestedAt,\n expiresAt: pausedApprovalExpiresAt,\n // The isolation axis the DECISION must carry back. Without it a responder can only be\n // filtered against the default-instance sentinel, so an approval raised on a named agent\n // instance is unresumable — the read matches no row and the decision is dropped silently.\n // Emitted even when it is the default, so a client echoes one field unconditionally rather\n // than branching on whether the value is meaningful.\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n };\n\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageType: FlowsActors_MessageContentType.PROGRESS,\n content: `Waiting for approval to run \"${suspension.toolName}\".`,\n data: announcement,\n timestamp: new Date(),\n });\n }\n\n /**\n * Record a human's approval decision and RESUME the suspended turn.\n *\n * ## The three things this must get right\n *\n * 1. **The decision is scoped like every other read of this family.** The filter carries the owner\n * FK, the machine credential and the agent instance, so one principal cannot answer another's\n * pending approval — a decision is an ACTION on someone else's work, which makes it exactly the\n * kind of thing an isolation axis exists for.\n * 2. **`approvalId` must match.** It is the idempotency key AND the anti-replay check: the model\n * SDK binds it to the specific tool call with an HMAC signature, so answering a stale id must\n * refuse rather than approve whatever happens to be pending now.\n * 3. **A DENIAL resumes too.** Denying is not cancelling: the SDK is told the call was refused and\n * the model gets to respond (\"I can't do that without approval\"). Treating denial as a terminal\n * failure would leave the user with a dead thread instead of an answer.\n */\n /**\n * The tool-execution context a turn's grounding tools run under.\n *\n * Extracted so the RESUME cannot drift from the original turn. It was inlined at the start-turn\n * site only, and the resume passed no context at all — `resolveAgentTools` returns `undefined`\n * without one, so a resumed turn ran with NO TOOLS. The approved call could not be executed, and\n * the unresolved `tool_use` reached the provider as\n * \"tool_use ids were found without tool_result blocks\". The approval succeeded and the work never\n * happened.\n *\n * The auth is the APPROVER's, carried from the socket that answered. That is the point rather than\n * an implementation detail: the gated tool runs with a verified identity, so approving cannot\n * escalate anything the approver could not already do. Ambient authority here would make the\n * approval itself a privilege-escalation primitive.\n */\n private buildToolExecutionContext(auth: SocketAuthResult): FunctionToolExecutionContext {\n return {\n auth,\n // The org the tools scope reads to = the CALLER's own org from their verified auth (a user's\n // active org, or an org-machine's org), NOT the conversation owner scope. An app-machine\n // caller has no org → undefined (app-scope reads).\n organizationId: auth.initiatorIds?.organizationId,\n services: {\n resourcesRegistry: this.resourcesRegistry,\n servicesRegistryHandler: this.servicesRegistryHandler,\n executionContextCreator: this.executionContextCreator,\n // A tool dispatches a resource operation while bypassing Express, so the operation's own\n // authored `rateLimit?` — whose other consumers are the HTTP controller pre-flight and the\n // MCP tool plane — has no enforcer on this plane unless one is supplied here.\n rateLimitService: this.rateLimitService,\n // Same reason, for the operation's `roles` ACL: bypassing Express also bypasses the\n // CONTROLLER tier, which is the only place that ACL is read. Supplying the authorizer here\n // is what lets the tool factories apply it themselves.\n authorizer: this.authorizer,\n },\n };\n }\n\n /**\n * The current STATUS of one conversational execution, or `undefined` when the caller's filter\n * matches no row.\n *\n * Exists for the A2A task plane, which projects a task from the execution it wraps. When a turn\n * suspends for approval the task is materialised at `input-required`, and NOTHING advances that\n * task when the decision arrives: the resume happens over a different transport (the app's\n * WebSocket), which knows the execution and not the task. Without this seam the task reports\n * `input-required` forever, for work that finished — and, worse, stays cancellable, because the\n * cancel path compare-and-swaps on the STORED status.\n *\n * Read through the SAME four isolation axes as every other read of this family (owner FK, machine\n * credential, agent instance). The caller has already proved it owns the TASK; that does not\n * license an unfiltered read of the execution, and answering `undefined` on a mismatch keeps\n * not-found and not-yours indistinguishable exactly as the rest of this plane does.\n *\n * Deliberately returns the status ALONE. A richer projection would tempt the transport into\n * reading the transcript, which is the prompt text this plane's isolation rules exist to protect.\n */\n public async readExecutionStatus(params: {\n executionId: string;\n scopeContext: ConversationalOwnerScope;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n }): Promise<FlowsActors_Status | undefined> {\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(params.scopeContext);\n } catch {\n return undefined;\n }\n\n try {\n const row = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType,\n {\n executionId: params.executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n },\n { scopeContext: owner.scopeContext },\n );\n return row?.status;\n } catch (error) {\n // A read that throws must not take down the task read that asked. The caller falls back to\n // the stored task status, which is the pre-existing behaviour — degraded, never broken.\n this.logger.warn('[ConversationalExecution] Could not read execution status for a task projection', {\n executionId: params.executionId, ...projectCaughtErrorLogFields(error),\n });\n return undefined;\n }\n }\n\n public async respondToApproval(params: {\n systemRef: string;\n executionId: string;\n approvalId: string;\n approved: boolean;\n scopeContext: ConversationalOwnerScope;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n reason?: string;\n emitter?: FlowsActorsExecutionEmitter;\n }): Promise<void> {\n const { systemRef, executionId, approvalId, approved } = params;\n\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(params.scopeContext);\n } catch {\n this.logger.error('[ConversationalExecution] Approval response has no resolvable owner scope', { systemRef, executionId });\n return;\n }\n\n const ownerFilter = {\n executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n };\n\n const row = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType, ownerFilter, { scopeContext: owner.scopeContext },\n );\n if (!row?.pausedApproval) {\n // Not-found and not-yours answer identically, as everywhere else on this plane: telling a\n // caller that SOMEONE has a pending approval they cannot see is itself a disclosure.\n this.logger.info('[ConversationalExecution] No pending approval matches this response', { systemRef, executionId, approvalId });\n return;\n }\n\n let paused: FlowActorExecution_PausedApproval;\n try {\n paused = parseFlowActorPausedApproval(row.pausedApproval);\n } catch (parseError) {\n // A corrupted blob fails LOUDLY rather than resuming from garbage — the parse helper's own\n // contract. Resuming from a partial message array would replay a different conversation.\n this.logger.error('[ConversationalExecution] Paused-approval state is unreadable; refusing to resume', {\n systemRef, executionId, approvalId, ...projectCaughtErrorLogFields(parseError),\n });\n return;\n }\n\n if (paused.approvalId !== approvalId) {\n this.logger.warn('[ConversationalExecution] Approval response does not match the pending request; refusing', {\n systemRef, executionId, pendingApprovalId: paused.approvalId, respondedApprovalId: approvalId,\n });\n return;\n }\n\n /*\n * #465: an EXPIRED approval is refused, and the turn becomes terminal.\n *\n * This is the half that matters for safety rather than hygiene: honouring a decision on a tool\n * call raised days ago would execute it against a conversation, a world and an intent that have\n * all moved on, and the person answering has no memory of the question. `FAILED` is the terminal\n * state the status vocabulary already named for expiry — nothing new was invented.\n *\n * Placed AFTER the approvalId match so a mismatched id keeps its own diagnosis; an expired\n * approval and a wrong one are different facts and an operator reading the log needs both.\n *\n * KNOWN GAP, stated rather than implied: nothing sweeps. A turn nobody answers stays\n * `AWAITING_APPROVAL` until a late decision arrives and is refused here, rather than lapsing on\n * its own. That makes this a guard at USE, not the unattended auto-fail the schema describes —\n * closing it needs a scheduled sweep, which is deliberately not built here.\n */\n if (paused.expiresAt !== undefined && new Date(paused.expiresAt).getTime() <= Date.now()) {\n this.logger.warn('[ConversationalExecution] Approval decision arrived after the pause expired; refusing and failing the turn', {\n systemRef, executionId, approvalId, expiresAt: paused.expiresAt, toolName: paused.pendingToolName,\n });\n await this.systemAccess.updateAsSystem(owner.resourceType, ownerFilter, {\n status: FlowsActors_Status.FAILED,\n pausedApproval: null,\n }, { scopeContext: owner.scopeContext }).catch((error: unknown) => {\n this.logger.error('[ConversationalExecution] Could not fail an expired approval pause', {\n systemRef, executionId, ...projectCaughtErrorLogFields(error),\n });\n });\n return;\n }\n\n this.logger.info('[ConversationalExecution] Resuming a suspended turn on a human decision', {\n systemRef, executionId, approvalId, approved, toolName: paused.pendingToolName,\n });\n\n // Back to PROCESSING before the model call: the row must not read `awaiting_approval` while the\n // turn is actually running, or a second decision could be accepted for a turn already resumed.\n await this.systemAccess.updateAsSystem(owner.resourceType, ownerFilter, {\n status: FlowsActors_Status.PROCESSING,\n pausedApproval: null,\n }, { scopeContext: owner.scopeContext }).catch((error: unknown) => {\n this.logger.error('[ConversationalExecution] Could not clear the approval pause before resuming', {\n systemRef, executionId, ...projectCaughtErrorLogFields(error),\n });\n });\n\n await this.resumeAfterApproval({\n systemRef, executionId, owner, paused, approved,\n reason: params.reason,\n auth: params.auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n emitter: params.emitter,\n // The transcript SO FAR. The resume appends its answer to it; without the prior turns the\n // completion write would replace the whole thread with a single assistant message.\n priorMessages: (row.messages ?? []) as FlowActorExecution_Message[],\n });\n }\n\n\n /**\n * Re-invoke the agent with the human's decision appended, and finish the turn.\n *\n * The resume payload is the SDK's own message array captured at suspension, plus a\n * `tool-approval-response` carrying the decision. We do not reconstruct the conversation: the\n * array is opaque to us by contract, and rebuilding it would silently change what the model sees.\n */\n private async resumeAfterApproval(params: {\n systemRef: string;\n executionId: string;\n owner: ResolvedOwnerVariant;\n paused: FlowActorExecution_PausedApproval;\n approved: boolean;\n reason?: string;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n emitter?: FlowsActorsExecutionEmitter;\n /** The conversation as persisted before the decision; the resumed answer is appended to it. */\n priorMessages?: FlowActorExecution_Message[];\n }): Promise<void> {\n const { systemRef, executionId, owner, paused, approved } = params;\n\n const resumeMessages = [\n ...paused.sdkModelMessages,\n {\n role: 'tool',\n content: [{\n type: 'tool-approval-response',\n approvalId: paused.approvalId,\n approved,\n ...(params.reason ? { reason: params.reason } : {}),\n }],\n },\n ];\n\n try {\n const actorSystem = this.resolveConversationalActorSystem(systemRef, executionId, params.emitter ?? (() => {}));\n if (!actorSystem) return;\n const agentRef = this.resolveChatAgentRef(actorSystem);\n if (!agentRef) return;\n\n // The tool context is what makes a resume able to DO anything. Without it the agent resolves\n // no tools, so the approved call cannot execute and the provider rejects the unresolved\n // `tool_use`. A resume that cannot run the tool is not a resume.\n if (!params.auth) {\n this.logger.error('[ConversationalExecution] Cannot resume without the approver\\'s auth; the tool would have no identity to run as', {\n systemRef, executionId, approvalId: paused.approvalId,\n });\n return;\n }\n\n const result = await this.agentsBackend.invokeAgentStreaming(\n { agentRef, input: { messages: resumeMessages } } as any,\n {\n onDelta: (delta) => params.emitter?.(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef, executionId, messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: delta, isFinal: false, timestamp: new Date(),\n }),\n },\n this.buildToolExecutionContext(params.auth),\n );\n\n // A resumed turn can suspend AGAIN — a multi-step agent may hit a second gated tool. That is\n // ordinary, not an error, so it is persisted the same way rather than recorded as completed.\n const nextSuspension = (result as { approvalSuspension?: AgentApprovalSuspension }).approvalSuspension;\n if (nextSuspension) {\n await this.persistApprovalSuspension({\n systemRef, executionId, owner, auth: params.auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n messages: [],\n suspension: nextSuspension,\n emitter: params.emitter ?? (() => {}),\n });\n return;\n }\n\n // PERSIST THE ANSWER, not just the status.\n //\n // This wrote `status` + `finishedAt` only, so the agent's reply was emitted to the live socket\n // and then dropped: a reload after a decision showed the thread with the question and no\n // answer. It matters most for a DENIAL, where the reply (\"I can't do that without approval\")\n // IS the entire outcome of the turn — the same reason the pause path persists the user's turn\n // alongside the suspension.\n const assistantText = this.extractAssistantText(result.output);\n const finishedAt = new Date();\n const resumedMessages: FlowActorExecution_Message[] = assistantText.length > 0\n ? [...(params.priorMessages ?? []), {\n id: randomUUID(),\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: finishedAt,\n }]\n : (params.priorMessages ?? []);\n\n await this.systemAccess.updateAsSystem(owner.resourceType, {\n executionId, ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n }, {\n status: FlowsActors_Status.COMPLETED,\n finishedAt,\n messages: toPersistableConversationMessages(resumedMessages),\n }, { scopeContext: owner.scopeContext });\n\n params.emitter?.(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef, executionId, messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText, isFinal: true, timestamp: new Date(),\n });\n } catch (error) {\n this.logger.error('[ConversationalExecution] Resumed turn failed after the approval decision', {\n systemRef, executionId, approvalId: paused.approvalId, ...projectCaughtErrorLogFields(error),\n });\n await this.finalizeTerminal(systemRef, executionId, owner, [], FlowsActors_Status.FAILED,\n machineCredentialIdOf(params.auth), agentInstanceOf(params.resourceServerInstanceRef));\n }\n }\n\n // ── Internals ──────────────────────────────────────────────────────────────\n\n /**\n * Resolve the target system as an ACTOR system. If it is a FLOW system, fail\n * closed with a typed \"not implemented\" (v1 has no flow conversational\n * runtime); if it does not exist at all, report not-found.\n */\n private resolveConversationalActorSystem(\n systemRef: string,\n executionId: string,\n emitter: FlowsActorsExecutionEmitter,\n ): ActorSystem | undefined {\n const actor = this.flowsActorsRegistry.getSystem(systemRef, FlowActorSystem_Kind.ACTOR);\n if (actor) return actor as ActorSystem;\n\n if (this.flowsActorsRegistry.getSystem(systemRef, FlowActorSystem_Kind.FLOW)) {\n this.emitError(emitter, systemRef, executionId, 'FLOW_CONVERSATION_NOT_IMPLEMENTED', `System '${systemRef}' is a FLOW system; conversational execution of flows is not yet implemented.`);\n return undefined;\n }\n this.emitError(emitter, systemRef, executionId, 'SYSTEM_NOT_FOUND', `No actor system registered for ref '${systemRef}'.`);\n return undefined;\n }\n\n /** Pick the agent-backed actor to converse with (first AGENTIC actor with an agentRef). */\n private resolveChatAgentRef(actorSystem: ActorSystem): string | undefined {\n const chatActor = actorSystem.actors.find(\n (a) => a.executionMode === Actor_ExecutionMode.AGENTIC && !!a.agentRef,\n );\n return chatActor?.agentRef;\n }\n\n /** Read the user's turn from the free-form start input (`message` or `prompt`). */\n private extractUserText(initialInput?: Record<string, unknown>): string | undefined {\n if (!initialInput) return undefined;\n const candidate = initialInput.message ?? initialInput.prompt;\n if (typeof candidate === 'string' && candidate.trim().length > 0) return candidate;\n return undefined;\n }\n\n /**\n * A user-facing status line for a tool call. Turns the identifier-safe tool\n * name (e.g. `resource_todos_read`) into \"Looking up your todos…\"; falls back\n * to a generic phrase for non-resource tools.\n */\n private humanizeToolStatus(toolName: string): string {\n const match = /^resource[._](.+?)[._]read$/.exec(toolName);\n if (match) {\n const words = match[1].replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/[_.]/g, ' ').toLowerCase().trim();\n return `Looking up your ${words}…`;\n }\n return 'Looking things up…';\n }\n\n /**\n * Forward the turn's LLM token usage to the optional `onUsage` sink. The agent layer folds the\n * provider's normalized usage onto the returned invocation's `executionContext.usage`; this is\n * the ONLY place the conversational runtime reads it, and it stays deliberately ignorant of what\n * the consumer does with it (metering, budgets, observability).\n *\n * Never throws: a metering sink must not be able to fail a turn that already produced an answer.\n */\n private reportUsage(params: StartConversationalExecutionParams, result: unknown): void {\n if (!params.onUsage) return;\n try {\n const usage = (result as { executionContext?: { usage?: { totalTokens?: number } } })?.executionContext?.usage;\n const totalTokens = typeof usage?.totalTokens === 'number' ? usage.totalTokens : undefined;\n params.onUsage({ totalTokens });\n } catch (error) {\n this.logger.warn('[ConversationalExecution] onUsage sink failed (non-fatal)', {\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n /** Normalize the agent output (chat `{message:{content}}` or text `{text}`) to a string. */\n private extractAssistantText(output: unknown): string {\n if (typeof output === 'string') return output;\n if (output && typeof output === 'object') {\n const record = output as Record<string, unknown>;\n const message = record.message;\n if (message && typeof message === 'object' && typeof (message as Record<string, unknown>).content === 'string') {\n return (message as Record<string, unknown>).content as string;\n }\n if (typeof record.text === 'string') return record.text;\n }\n return typeof output === 'undefined' ? '' : JSON.stringify(output);\n }\n\n /** Emit a `FLOWS_ACTORS_ERROR` payload. */\n private emitError(\n emitter: FlowsActorsExecutionEmitter,\n systemRef: string,\n executionId: string,\n errorCode: string,\n errorMessage: string,\n ): void {\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_ERROR, {\n systemRef,\n executionId,\n errorCode,\n errorMessage,\n recoverable: false,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"conversational-execution.backend.service.js","sourceRoot":"","sources":["../../../../src/flows-actors/services/conversational-execution.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAC3H,OAAO,EAAE,qCAAqC,EAAE,MAAM,6FAA6F,CAAC;AACpJ,OAAO,EAAE,0BAA0B,EAAE,MAAM,iFAAiF,CAAC;AAC7H,OAAO,EAAE,qCAAqC,EAAE,MAAM,+EAA+E,CAAC;AAGtI,OAAO,EAAE,2BAA2B,EAAE,MAAM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kB,CAAC,uBAAuB,CAAC,CAAA;IAClD,WAAA,MAAM,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAA;IACzD,WAAA,MAAM,CAAC,kBAAkB,CAAC,qCAAqC,CAAC,CAAA;IAChE,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAA;IAIlD,WAAA,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;IAOhD,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAAE,WAAA,QAAQ,EAAE,CAAA;qCAlBI,aAAa;QACoB,0BAA0B;QACtC,oBAAoB;QACb,+BAA+B;QAClB,qCAAqC;QAC9B,qCAAqC;QAClE,0BAA0B;GARhG,qCAAqC,CA+tCjD","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject, optional } from 'inversify';\nimport { randomUUID } from 'crypto';\n\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport { SystemAccessBackendService } from '~wildo-backend-lib/base-classes/services/services/system-access.backend.service';\nimport { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';\nimport type { SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport type { FunctionToolExecutionContext } from '~wildo-backend-lib/flows-actors/models/function-tools.backend.definitions';\nimport { modelToolNameForFunctionRef } from '~wildo-backend-lib/flows-actors/models/function-tools.backend.definitions';\nimport type { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';\nimport { hashToolApprovalInput } from '~wildo-backend-lib/flows-actors/utils/tool-approval-signing.backend.utils';\nimport { applyModifiedToolApprovalInput, ToolApprovalModificationOutcomeKind } from '~wildo-backend-lib/flows-actors/utils/tool-approval-modification.backend.utils';\nimport type { RateLimitBackendService } from '~wildo-backend-lib/errors/services/rate-limit.backend.service';\nimport type { AuthorizationsBackendService } from '~wildo-backend-lib/security/authorizations/services/authorizations.backend.service';\nimport { FlowsActorsRegistryService } from './flows-actors-registry.service';\nimport { AgentsBackendService, AgentStreamingUnsupportedError, type AgentApprovalSuspension } from './agents.backend.service';\nimport {\n Actor_ExecutionMode,\n CoreResourceType,\n CoreWebSocketEvent,\n FlowActorSystem_Kind,\n FlowsActors_ConversationRole,\n FlowsActors_MessageContentType,\n FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE,\n FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS,\n parseFlowActorPausedApproval,\n type FlowActorExecution_PausedApproval,\n serializeFlowActorPausedApproval,\n FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n FlowsActors_Status,\n type ActorSystem,\n type AgentTraceContext,\n type ExecutionContext_InitiatorIds,\n type FlowActorExecution,\n type FlowActorExecution_Message,\n type FlowsActors_Agent_Invocation,\n type WS_FlowsActorsApprovalAnnouncementData,\n} from '@wildo-ai/saas-models';\n\n/**\n * Transport-agnostic sink for the server→client events a conversational\n * execution emits. The WebSocket layer supplies an implementation bound to the\n * initiating user's room; this service never imports `WebSocketService`, which\n * (a) keeps the runtime independent of the transport (Decision A's honest seam —\n * a future SSE/other transport could supply a different emitter) and (b) avoids\n * a circular DI dependency between the two services.\n *\n * The `event` is one of the `CoreWebSocketEvent.FLOWS_ACTORS_*` server→client\n * events; `payload` matches the corresponding `WS_FlowsActors*PayloadSchema`.\n */\nexport type FlowsActorsExecutionEmitter = (event: CoreWebSocketEvent, payload: unknown) => void;\n\n/**\n * Owner scope of a conversation — EXACTLY ONE owner. Selects the persisted\n * polymorphic variant resource and its owner FK:\n * - `{ userId }` → `userFlowActorExecutions` (WS chat + user-delegated A2A)\n * - `{ organizationId }` → `organizationFlowActorExecutions` (org-machine A2A)\n * - `{ applicationId }` → `applicationFlowActorExecutions` (app-machine A2A)\n *\n * A conversation is owned by exactly one scope; the runtime never mixes owners on\n * one row. Resolved to `{ resourceType, ownerFields, scopeContext }` by\n * `resolveOwnerVariant`.\n */\nexport type ConversationalOwnerScope =\n | { userId: string }\n | { organizationId: string }\n | { applicationId: string };\n\n/**\n * One approve-with-modifications decision, prepared and ready to resume (#566).\n *\n * Produced by ONE walk of the SDK's message array, which is why the audit fields ride here rather\n * than being recomputed at the emit site: a second walk could disagree with the version that was\n * signed, and the digests are only evidence while they describe exactly what ran.\n */\ninterface PreparedToolCallModification {\n /** The agent whose declaration gated the tool — for the trail, so a row reads back to a config. */\n agentRef: string;\n /** The tool name AS THE SDK ARRAY DECLARES IT, which is what the re-signature was computed over. */\n toolName: string;\n /** The rewritten, re-signed resume payload. */\n sdkModelMessages: Record<string, unknown>[];\n /** Argument NAMES the approver changed, sorted. Names only — never values. */\n modifiedArgumentKeys: string[];\n proposedInputDigest: string;\n executedInputDigest: string;\n}\n\n/**\n * The outcome of preparing a modification, discriminated by\n * {@link ToolApprovalModificationOutcomeKind} — see that enum for why the discriminant is a named\n * string rather than an `ok` boolean (this package compiles with `strict: false`, under which a\n * boolean-literal discriminant narrows nothing).\n *\n * `UNCHANGED` is the honest encoding of an edit that changed nothing: the turn resumes untouched and\n * no audit row is written, because a person who typed the same arguments back did not author them.\n */\ntype ToolCallModificationPreparation =\n | { kind: ToolApprovalModificationOutcomeKind.MODIFIED; modification: PreparedToolCallModification }\n | { kind: ToolApprovalModificationOutcomeKind.UNCHANGED }\n | { kind: ToolApprovalModificationOutcomeKind.REFUSED; message: string };\n\n/** An owner scope resolved to its persisted variant + owner FK + `*AsSystem` scope map. */\nexport interface ResolvedOwnerVariant {\n resourceType: CoreResourceType;\n ownerFields: Record<string, string>;\n scopeContext: { userId?: string; organizationId?: string; applicationId?: string };\n}\n\n/** Parameters to start one conversational execution of an actor system. */\nexport interface StartConversationalExecutionParams {\n /**\n * The A2A agent this turn arrived through — absent for the WebSocket surface, which has no agent,\n * and for the default (unnamed) A2A agent. Normalised to the sentinel on the way to storage and\n * part of the continuation filter thereafter, so a held `contextId` cannot load this transcript\n * into a different agent's context (review finding G5-8).\n */\n resourceServerInstanceRef?: string;\n /** Ref of the flow/actor system to converse with. */\n systemRef: string;\n /** Client-supplied execution id; a new one is minted when absent. */\n executionId?: string;\n /** Free-form start input from the client; the user's turn is read from it. */\n initialInput?: Record<string, unknown>;\n /** Authenticated initiator identity (from the socket / A2A auth). */\n initiator: ExecutionContext_InitiatorIds;\n /**\n * Full verified auth of the caller (user OR machine principal). Used to build\n * the tool `ExecutionContext` when running the agent's tools, so tools read/write\n * as the caller with the caller's own visibility (never trusting LLM-supplied\n * identity).\n */\n auth: SocketAuthResult;\n /** Owner scope of the persisted execution (selects the variant + owner FK). */\n scopeContext: ConversationalOwnerScope;\n /** Sink for the server→client stream of this execution. */\n emitter: FlowsActorsExecutionEmitter;\n /**\n * Cooperative cancellation for this turn's model call. Supplied by the A2A transport\n * when the turn is addressable as a task (so `tasks/cancel` can reach it); absent for\n * WebSocket chat, where the client cancels by disconnecting.\n */\n abortSignal?: AbortSignal;\n /**\n * Optional sink for the turn's LLM token usage, invoked once after the agent returns (streamed\n * or buffered) when the provider reported usage. Exists because usage is only knowable AFTER the\n * stream drains, so it cannot ride the per-delta `emitter` — and the transport-agnostic runtime\n * must not itself know about metering or budgets. The A2A transport uses it to accumulate the\n * caller's per-tenant token budget; callers that do not meter simply omit it.\n */\n onUsage?: (usage: { totalTokens?: number }) => void;\n}\n\n/**\n * Drives a **conversational execution** of a flows-actors system: resolve the\n * system, find its chat actor's agent, stream the agent's token-by-token answer\n * (executing its grounding tools mid-turn), and persist the execution + full\n * message log to the owner's `*FlowActorExecutions` variant — streaming server→client\n * events over the supplied emitter throughout.\n *\n * PERSISTENCE + MULTI-TURN (server-authoritative): one execution row per\n * discussion accumulates every turn's messages. Each turn READS the existing row\n * (owner-scoped via `scopeContext` — the USER_SELF filter resolves from the scope\n * context-map, never LLM- or client-supplied identity), builds the LLM context\n * from that DURABLE transcript, appends the new user + assistant turns, and writes\n * the row back. Reload history is served from the same rows by the controller's\n * `/flows-actors/history` endpoint under the caller's own EC. No client-supplied\n * history is trusted, and nothing is stored browser-side.\n *\n * SCOPE: the actor conversational path streams a real round-trip against\n * `AgentsBackendService.invokeAgentStreaming` (buffered fallback for non-streaming\n * transports) with tool execution. The richer actor plan/task orchestration\n * (`actorState` graph state) is not produced yet — see the schema note.\n *\n * KIND-AGNOSTIC (Invariant): the record persisted is kind-discriminated. v1\n * implements the ACTOR conversational path only; a FLOW system fails closed with\n * a typed \"not implemented\" rather than pretending to run.\n */\n/**\n * Keep only conversation messages that can actually be PERSISTED — i.e. those carrying content.\n *\n * WHY: `FlowActorExecution_Message.content` is declared `z.string()`, which maps to a REQUIRED\n * mongoose string, and mongoose treats `''` as ABSENT — so a message with empty content fails the\n * write with `messages.<n>.content: Path 'content' is required`. That matters far beyond the one\n * message: the execution row is persisted by writing the WHOLE messages array together with the\n * terminal status, so ONE contentless message used to fail the entire update — discarding the user's\n * own turn and leaving the row wedged at PROCESSING. An assistant turn legitimately produces no text\n * (a reasoning-only step, or a tool loop whose continuation yielded nothing), so this is a real state\n * that must not cost the rest of the history.\n *\n * Dropping such a message is honest rather than lossy: an empty message carries no information, and\n * its absence — next to a COMPLETED status — is itself the signal. Callers should log the empty-reply\n * case so it stays visible.\n */\nexport function toPersistableConversationMessages(\n messages: readonly FlowActorExecution_Message[],\n): FlowActorExecution_Message[] {\n return messages.filter((message) => typeof message?.content === 'string' && message.content.length > 0);\n}\n\n/**\n * The machine credential that owns a turn, normalised for storage and filtering.\n *\n * A user-delegated turn has none — the human is the principal and the `userId` owner FK already\n * discriminates — so it stores the sentinel rather than a null, keeping the filter a plain\n * equality on both persistence adapters.\n */\n/**\n * The agent instance a turn arrived through, normalised for storage and filtering.\n *\n * The WebSocket surface has no agent and the default A2A agent is an identity of its own; both\n * store the sentinel. One resolver rather than the expression repeated at each of the five\n * owner-scoped sites — see `.claude/rules/invariant-call-site-enumeration.md`.\n */\nfunction agentInstanceOf(resourceServerInstanceRef: string | undefined): string {\n return resourceServerInstanceRef ?? FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE;\n}\n\nfunction machineCredentialIdOf(auth: { initiatorIds?: { machineCredential?: { credentialId?: string } } } | undefined): string {\n return auth?.initiatorIds?.machineCredential?.credentialId ?? FLOWS_ACTORS_NO_MACHINE_CREDENTIAL;\n}\n\n@injectable()\nexport class ConversationalExecutionBackendService {\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.AgentsBackendService) private readonly agentsBackend: AgentsBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) private readonly resourcesRegistry: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ServicesRegistryHandlerService) private readonly servicesRegistryHandler: ServicesRegistryHandlerBackendService,\n @inject(SAAS_SERVICE_TYPES.ExecutionContextCreatorBackendService) private readonly executionContextCreator: ExecutionContextCreatorBackendService,\n @inject(SAAS_SERVICE_TYPES.SystemAccessService) private readonly systemAccess: SystemAccessBackendService,\n @inject(SAAS_SERVICE_TYPES.RateLimitBackendService) private readonly rateLimitService: RateLimitBackendService,\n // Appended LAST deliberately: a constructor parameter inserted mid-list silently re-binds every\n // positional construction site (the DI container resolves by decorator, hand-built test doubles\n // do not).\n @inject(SAAS_SERVICE_TYPES.AuthorizationsService) private readonly authorizer: AuthorizationsBackendService,\n /**\n * The trail an approve-with-modifications decision leaves. `@optional` and feature-detected at\n * every use, for the reason the MCP emitter already records: an absent or failing audit sink\n * must never fail the act it was going to observe, and this service is constructed positionally\n * by hand in several test doubles.\n */\n @inject(SAAS_SERVICE_TYPES.AuditLogsService) @optional() private readonly auditLogs?: AuditLogsBackendService,\n ) {}\n\n /**\n * Resolve the owner scope to its persisted polymorphic variant: the concrete\n * `CoreResourceType`, the single owner FK to write on create, and the `*AsSystem`\n * scope-context map (which seeds the contextual filter so reads/writes are scoped\n * to that owner). Fails closed if no owner is present. Priority userId → org → app\n * (a conversation has exactly one owner; priority only disambiguates a\n * mis-populated caller).\n */\n private resolveOwnerVariant(scope: ConversationalOwnerScope): ResolvedOwnerVariant {\n const s = scope as { userId?: string; organizationId?: string; applicationId?: string };\n if (s.userId) {\n return { resourceType: CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS, ownerFields: { userId: s.userId }, scopeContext: { userId: s.userId } };\n }\n if (s.organizationId) {\n return { resourceType: CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS, ownerFields: { organizationId: s.organizationId }, scopeContext: { organizationId: s.organizationId } };\n }\n if (s.applicationId) {\n return { resourceType: CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS, ownerFields: { applicationId: s.applicationId }, scopeContext: { applicationId: s.applicationId } };\n }\n throw new Error('[ConversationalExecution] scopeContext carries no owner (userId | organizationId | applicationId).');\n }\n\n /**\n * Start (and, for v1, fully run) one conversational execution. Never throws to\n * the caller — every failure path is reported through the emitter as a\n * `FLOWS_ACTORS_ERROR`, so the WebSocket handler stays a thin dispatcher.\n */\n public async startConversationalExecution(params: StartConversationalExecutionParams): Promise<void> {\n const { systemRef, initialInput, initiator, auth, scopeContext, emitter } = params;\n const executionId = params.executionId ?? randomUUID();\n const startedAt = Date.now();\n\n // Resolve the owner scope → its persisted variant (userFlowActorExecutions /\n // organizationFlowActorExecutions / applicationFlowActorExecutions) + owner FK.\n // Never throws to the caller — a missing owner is reported through the emitter.\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(scopeContext);\n } catch {\n this.emitError(emitter, systemRef, executionId, 'NO_OWNER', 'The conversation has no resolvable owner scope.');\n return;\n }\n\n // ── Resolve the system (ACTOR-only in v1; FLOW fails closed) ──────────────\n const actorSystem = this.resolveConversationalActorSystem(systemRef, executionId, emitter);\n if (!actorSystem) return;\n\n // ── Find the chat actor's agent ──────────────────────────────────────────\n const agentRef = this.resolveChatAgentRef(actorSystem);\n if (!agentRef) {\n this.emitError(emitter, systemRef, executionId, 'NO_CHAT_ACTOR', `System '${systemRef}' has no AGENTIC actor bound to an agent to converse with.`);\n return;\n }\n\n // ── Extract the user's turn ──────────────────────────────────────────────\n const userText = this.extractUserText(initialInput);\n if (!userText) {\n this.emitError(emitter, systemRef, executionId, 'EMPTY_INPUT', 'No user message was provided to start the conversation.');\n return;\n }\n\n // ── Load the persisted thread (server-authoritative history) ─────────────\n // One execution row per discussion accumulates every turn's message log. On a\n // CONTINUED thread the client reuses the `executionId`, so the row already\n // exists; reading it here yields BOTH the durable transcript to append to AND\n // the multi-turn context for the LLM — no client-supplied history is trusted.\n //\n // The read is owner-scoped through `scopeContext`: `readAsSystem` seeds the\n // USER_SELF filter from the scope context-map (`userId`), NOT from the absent\n // system-context initiator identity (an internal EC rejects identity fields on\n // `initiatorIds`). So a user only ever reads their own thread.\n const now = new Date();\n let priorMessages: FlowActorExecution_Message[] = [];\n let rowExists = false;\n try {\n // Scope the lookup by the owner FK, NOT `executionId` alone: `executionId` is\n // CALLER-SUPPLIED (the A2A `contextId`), and the APPLICATION variant's `*AsSystem`\n // scope-context map does NOT carry `applicationId` (system-access forwards it to\n // `initiatorIds`, which the contextual filter never reads). Without the owner FK\n // in the filter, an app-machine that supplies ANOTHER app's `executionId` would\n // read/continue that app's conversation. The FK makes every variant fail-closed\n // (redundant-but-harmless for USER/ORG, load-bearing for APP).\n const existing = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType,\n // The CREDENTIAL axis rides alongside the owner FK (finding H-5). The scope FK does not\n // identify the principal on the machine variants — `applicationId` is a deployment\n // singleton and `organizationId` is shared by every machine client of one tenant — so\n // without it a separately-credentialed client could continue another's conversation and\n // read its whole message log.\n { executionId, ...owner.ownerFields, machineCredentialId: machineCredentialIdOf(auth), resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) },\n { scopeContext: owner.scopeContext },\n );\n if (existing) {\n rowExists = true;\n priorMessages = existing.messages ?? [];\n }\n } catch (error) {\n // Non-fatal: treat as a fresh thread. A create below surfaces any hard\n // persistence failure loudly; a transient read blip must not drop the turn.\n this.logger.error('[ConversationalExecution] Failed to read existing execution', { systemRef, executionId, error });\n }\n\n const userMessage: FlowActorExecution_Message = {\n id: randomUUID(),\n role: FlowsActors_ConversationRole.USER,\n contentType: FlowsActors_MessageContentType.TEXT,\n content: userText,\n createdAt: now,\n };\n\n // ── Open (new) or advance (continued) the row to PROCESSING ──────────────\n // A new thread INSERTs; a continued thread UPDATEs by `executionId` (the row's\n // `isUnique({ scope: 'global' })` id) so a reused id never collides on insert —\n // the prior bug was an unconditional create that E11000'd on continuation.\n try {\n if (!rowExists) {\n await this.systemAccess.createAsSystem(owner.resourceType, {\n executionId,\n ...owner.ownerFields,\n systemRef,\n kind: FlowActorSystem_Kind.ACTOR,\n status: FlowsActors_Status.PROCESSING,\n statusChanges: [{ status: FlowsActors_Status.PROCESSING, timestamp: now }],\n messages: [userMessage],\n machineCredentialId: machineCredentialIdOf(auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n }, { scopeContext: owner.scopeContext });\n } else {\n const advanced = await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId: machineCredentialIdOf(auth), resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) }, {\n status: FlowsActors_Status.PROCESSING,\n messages: [...priorMessages, userMessage],\n }, { scopeContext: owner.scopeContext });\n // The row existed on read but the owner-scoped write matched nothing →\n // a real scope inconsistency, not an empty result. Fail loudly.\n if (!advanced) {\n this.logger.error('[ConversationalExecution] Continued-thread PROCESSING update matched no row', { systemRef, executionId, owner: owner.scopeContext });\n }\n }\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to persist execution', { systemRef, executionId, error });\n this.emitError(emitter, systemRef, executionId, 'PERSIST_FAILED', 'Failed to open the execution record.');\n return;\n }\n\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_STARTED, { systemRef, executionId, success: true });\n\n // ── Invoke the agent, streaming token deltas back over the channel ───────\n // One id ties every streamed delta to a single assistant message on the\n // client (the payload's `messageId`); the terminal event carries the full\n // assembled markdown (`isFinal: true`).\n const assistantMessageId = randomUUID();\n // Generics are Zod *schema* types (fields are `z.infer<...>`); the runtime\n // invocation is untyped input, matching `invokeAgent`'s own `<any,any,any>`.\n // Multi-turn context from the DURABLE transcript (server-authoritative): the\n // thread's prior user/assistant turns from the DB, then the new user message.\n // PROGRESS/SYSTEM/TOOL log entries are not conversational, so they are dropped.\n const conversationMessages = [\n ...priorMessages\n .filter((m) => m.role === FlowsActors_ConversationRole.USER || m.role === FlowsActors_ConversationRole.ASSISTANT)\n .map((m) => ({ role: m.role, content: m.content })),\n { role: 'user', content: userText },\n ];\n const invocation: FlowsActors_Agent_Invocation<any, any, any> = {\n agentRef,\n initiator,\n invocationContext: [],\n input: { messages: conversationMessages },\n output: {},\n executionContext: {},\n artifactBindings: [],\n };\n\n // Tool-execution context: lets the agent's grounding tools read the user's\n // own data (scoped by the caller's verified auth), never LLM-supplied identity.\n const toolContext: FunctionToolExecutionContext = this.buildToolExecutionContext(auth);\n\n // Traceability: correlate every agent call of this conversation (`sessionRef` =\n // executionId) and carry the EXTERNAL PRINCIPAL as filterable dimensions, so\n // run-time observability can attribute LLM spend + behaviour to the caller — a\n // user, or an org/app machine agent (A2A). The engine emits a per-call trace to\n // the configured sink only when traceability is enabled (NONE ⇒ skipped).\n const traceContext: AgentTraceContext = {\n sessionRef: executionId,\n label: `flows-actors:${systemRef}`,\n attributes: {\n systemRef,\n executionType: auth.executionType,\n ...owner.ownerFields,\n ...(auth.initiatorIds?.machineCredential ? { machineCredential: auth.initiatorIds.machineCredential } : {}),\n },\n };\n\n let assistantText: string;\n /** Set when the turn stopped at a human-in-the-loop boundary instead of finishing. */\n let approvalSuspension: AgentApprovalSuspension | undefined;\n try {\n try {\n let streamedText = '';\n const result = await this.agentsBackend.invokeAgentStreaming(invocation, {\n abortSignal: params.abortSignal,\n onDelta: (delta) => {\n streamedText += delta;\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageId: assistantMessageId,\n // MARKDOWN throughout: LLM chat output is markdown, and the client's\n // streaming renderer (Streamdown) handles partial markdown, so the\n // reply renders formatted as it streams — not plain text then a swap.\n messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: delta,\n isFinal: false,\n timestamp: new Date(),\n });\n },\n onToolEvent: (event) => {\n // One friendly status per tool CALL (the result event is not surfaced —\n // the streamed answer replaces the status). e.g. \"Looking up your todos…\".\n if (event.phase !== 'call') return;\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageType: FlowsActors_MessageContentType.PROGRESS,\n content: this.humanizeToolStatus(event.toolName),\n data: { tool: event.toolName, phase: event.phase },\n timestamp: new Date(),\n });\n },\n }, toolContext, traceContext);\n assistantText = this.extractAssistantText(result.output) || streamedText;\n this.reportUsage(params, result);\n approvalSuspension = (result as { approvalSuspension?: AgentApprovalSuspension }).approvalSuspension;\n } catch (streamError) {\n if (streamError instanceof AgentStreamingUnsupportedError) {\n // Graceful degradation (e.g. a CLI-transport agent): deliver the full\n // reply in one buffered turn — not streamed, but honest and complete.\n //\n // ⚠️ CANCELLATION LIMIT (review finding F-6) — a deliberate SCOPE CHOICE, and it\n // matters that it is recorded as one rather than as a technical impossibility.\n //\n // It WOULD be wireable: AI-SDK's `generateText` accepts an `abortSignal`, and Node's\n // `spawn` accepts one too, so both the buffered provider call and the CLI child\n // process could honour cancellation. What stops it today is that no seam exists and\n // adding one widens `invokeAgent` — an `@wildo_source`-ANCHORED public contract that\n // ships into app-facing skills — for a capability nothing yet exercises.\n //\n // An earlier version of this comment claimed a signal \"cannot reach\" these\n // transports. That was false, and stating a choice as an impossibility is exactly\n // what stops a future maintainer revisiting it. Revisit it when a buffered-transport\n // agent actually needs interruption.\n //\n // What IS honoured: a cancellation that arrived before this fallback begins. That\n // bounds the exposure to one already-started buffered turn instead of letting a\n // cancelled conversation start a whole new one.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn was cancelled before the buffered fallback began; recording CANCELLED', { systemRef, executionId });\n // FINALIZE, do not just return (review finding G4-2). Returning bare left the row wedged\n // at PROCESSING while the task plane had already written CANCELLED — the same two-plane\n // disagreement G3-1 was raised to fix, surviving on the one transport G3-1's fix does not\n // reach. It also contradicted this file's own completion path, which exists so a reload\n // never shows \"a row wedged at PROCESSING\".\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n this.logger.info('[ConversationalExecution] Streaming unsupported; falling back to buffered invocation', { systemRef, executionId, reason: streamError.reason });\n const result = await this.agentsBackend.invokeAgent(invocation, traceContext);\n assistantText = this.extractAssistantText(result.output);\n this.reportUsage(params, result);\n } else {\n throw streamError;\n }\n }\n } catch (error) {\n // A CANCELLED turn is not a failed one: `tasks/cancel` and an SSE disconnect both abort the\n // model call deliberately, so without this branch an ordinary user action is recorded as\n // `FAILED`, emits `AGENT_FAILED` to the client, and logs at ERROR twice per cancellation —\n // contradicting the task plane (which writes `CANCELLED` for the same event) and training\n // operators to ignore the error channel.\n //\n // ⚠️ THIS IS THE SECONDARY ARM, not the primary one. An earlier revision claimed \"the abort\n // surfaces here as a thrown provider/SDK error\" and relied on that; it is NOT reliably true\n // (AI-SDK v7 ends an aborted stream cleanly with an `abort` part), and the claim quietly\n // became false when the metering fix removed the one read that threw. See the post-invocation\n // check after this block — that is what actually catches a cancelled streaming turn. This arm\n // survives for the transports and providers that DO throw on abort (a future buffered call\n // wired to a signal, an SDK layer that rejects), so cancellation is classified correctly\n // whether it arrives as a throw or as a clean return. Do not delete it; do not rely on it alone.\n //\n // Detected from OUR OWN signal rather than the error's shape: abort errors are named\n // inconsistently across providers and SDK layers, whereas `abortSignal.aborted` is the fact\n // we control and is true only because something deliberately cancelled this turn.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn cancelled by the caller; recording CANCELLED', { systemRef, executionId, agentRef });\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n this.logger.error('[ConversationalExecution] Agent invocation failed', { systemRef, executionId, agentRef, error });\n // Mark the persisted row FAILED (keeping the user turn) so a reload shows the\n // question with a failed status rather than a row wedged at PROCESSING.\n await this.finalizeTerminal(systemRef, executionId, owner, [...priorMessages, userMessage], FlowsActors_Status.FAILED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n this.emitError(emitter, systemRef, executionId, 'AGENT_FAILED', 'The assistant failed to produce a response.');\n return;\n }\n\n // ── A SUSPENDED turn is not a COMPLETED one either ───────────────────────\n //\n // Ordered before the cancellation check on purpose: both are non-completion outcomes, but a\n // turn cannot be both, and a suspension carries state that must be persisted before anything\n // else can act on the row. Falling through to the completion write below would record a\n // terminal status for work the model has not done — the same class of lie as recording\n // COMPLETED for a cancelled turn.\n if (approvalSuspension) {\n await this.persistApprovalSuspension({\n systemRef, executionId, owner, auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n messages: [...priorMessages, userMessage],\n suspension: approvalSuspension,\n emitter,\n });\n return;\n }\n\n // ── A CANCELLED turn is not a COMPLETED one ──────────────────────────────\n //\n // ⚠️ THIS CHECK CANNOT MOVE BACK INTO THE `catch` ABOVE — that is precisely where it used to\n // live, and where it silently died (review findings F-B, then G3-1).\n //\n // F-B detected cancellation in the catch on the premise stated in its own comment: \"the abort\n // surfaces here as a thrown provider/SDK error\". A LATER fix IN THE SAME BATCH (F-A, the\n // unmetered-cancellation hole) removed the only thing that threw — `streamTextToDeltas`'s\n // unguarded `await result.usage`. AI-SDK v7 signals an abort as a stream PART (`type:'abort'`),\n // so `fullStream` ends cleanly, `invokeAgentStreaming` only re-throws what it catches, and\n // nothing below the controller throws at all. F-B's branch therefore became DEAD CODE on the\n // only abortable transport, and every cancelled streaming turn fell through to the COMPLETED\n // write below — reproducing the two-plane disagreement F-B existed to fix, inverted (task plane\n // CANCELLED, conversation plane COMPLETED, on the same user action).\n //\n // The lesson generalises: a handler that detects a condition by CATCHING is coupled to whoever\n // throws, and that coupling is invisible to the type system. Detect from the signal we own.\n if (params.abortSignal?.aborted) {\n this.logger.info('[ConversationalExecution] Turn cancelled by the caller; recording CANCELLED', { systemRef, executionId, agentRef });\n // Retain whatever already streamed: the user SAW that text, so discarding it would leave a\n // reloaded transcript emptier than the live one was. `toPersistableConversationMessages`\n // (inside `finalizeTerminal`) drops a contentless message, so an immediately-cancelled turn\n // persists nothing extra rather than an empty assistant bubble.\n const cancelledMessages: FlowActorExecution_Message[] = assistantText.length > 0\n ? [...priorMessages, userMessage, {\n id: assistantMessageId,\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: new Date(),\n }]\n : [...priorMessages, userMessage];\n await this.finalizeTerminal(systemRef, executionId, owner, cancelledMessages, FlowsActors_Status.CANCELLED, machineCredentialIdOf(auth), agentInstanceOf(params.resourceServerInstanceRef));\n return;\n }\n\n // ── Persist the assistant turn + complete ────────────────────────────────\n const finishedAt = new Date();\n const assistantMessage: FlowActorExecution_Message = {\n id: assistantMessageId,\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: finishedAt,\n };\n if (assistantText.length === 0) {\n this.logger.warn('[ConversationalExecution] Assistant produced no text; persisting the turn without an assistant message', { systemRef, executionId, agentRef });\n }\n const persistedMessages = toPersistableConversationMessages([...priorMessages, userMessage, assistantMessage]);\n try {\n const completed = await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId: params.auth ? machineCredentialIdOf(params.auth) : FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef) }, {\n status: FlowsActors_Status.COMPLETED,\n finishedAt,\n statusChanges: [\n { status: FlowsActors_Status.PROCESSING, timestamp: now },\n { status: FlowsActors_Status.COMPLETED, timestamp: finishedAt },\n ],\n messages: persistedMessages,\n }, { scopeContext: owner.scopeContext });\n if (!completed) {\n this.logger.error('[ConversationalExecution] Completion update matched no row', { systemRef, executionId, owner: owner.scopeContext });\n }\n } catch (error) {\n // The answer was produced and streamed; a persistence failure here is logged\n // but the user still receives the reply (best-effort durable history).\n this.logger.error('[ConversationalExecution] Failed to persist assistant turn', { systemRef, executionId, error });\n }\n\n // Terminal, authoritative message: full assembled markdown. The client\n // replaces the accumulated `text` deltas for this `messageId` with it.\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageId: assistantMessageId,\n messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n isFinal: true,\n timestamp: new Date(),\n });\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_COMPLETED, {\n systemRef,\n executionId,\n success: true,\n duration: Date.now() - startedAt,\n });\n }\n\n /**\n * Mark a persisted execution FAILED after the agent invocation threw. The\n * user's turn is retained (passed in) so a reloaded transcript still shows the\n * question. Best-effort: a persistence failure here is logged, never thrown —\n * the caller has already emitted the client-facing error.\n */\n /**\n * Record a TERMINAL outcome for the turn, keeping the messages accumulated so far.\n *\n * The status is a parameter because a cancelled turn is NOT a failed one. A caller who invokes\n * `tasks/cancel`, or an SSE client that disconnects, ABORTS the model call deliberately — writing\n * `FAILED` there would contradict the task plane (the A2A controller records `CANCELLED` for the\n * very same event) and would leave the two planes disagreeing about one user action.\n */\n private async finalizeTerminal(\n systemRef: string,\n executionId: string,\n owner: ResolvedOwnerVariant,\n messages: FlowActorExecution_Message[],\n status: FlowsActors_Status.FAILED | FlowsActors_Status.CANCELLED,\n // Carried explicitly: this write is owner-scoped, and the owner FK alone does not identify the\n // principal on the machine variants — a terminal write that omits the axis matches nothing.\n machineCredentialId: string = FLOWS_ACTORS_NO_MACHINE_CREDENTIAL,\n resourceServerInstanceRef: string = FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE,\n ): Promise<void> {\n try {\n await this.systemAccess.updateAsSystem(owner.resourceType, { executionId, ...owner.ownerFields, machineCredentialId, resourceServerInstanceRef }, {\n status,\n finishedAt: new Date(),\n // Same persistence invariant as the completion path: one contentless message would fail the\n // whole update and lose the terminal status the caller is trying to record.\n messages: toPersistableConversationMessages(messages),\n }, { scopeContext: owner.scopeContext });\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to finalize execution', { systemRef, executionId, status, error });\n }\n }\n\n\n /**\n * Persist a turn that SUSPENDED at a human-in-the-loop approval boundary.\n *\n * Writes `AWAITING_APPROVAL` plus the serialized run state, then tells the client what decision is\n * being asked for. Three properties matter and each is deliberate:\n *\n * - **It is not terminal.** `AWAITING_APPROVAL` projects to A2A `input-required`, which is\n * explicitly exempt from the liveness sweep and from derive-on-read (finding A3-3) — a paused\n * turn holds no lease BY DESIGN, and treating \"no lease\" as \"abandoned\" here would fail every\n * approval one grace window after it was requested.\n * - **The user's turn is persisted with it.** A reload during the wait must still show the\n * question that is pending a decision, not an empty thread.\n * - **A failed write is loud.** If the row does not record the pause, the resume has nothing to\n * load and the turn is unrecoverable — silence here would strand a human decision forever.\n */\n private async persistApprovalSuspension(params: {\n systemRef: string;\n executionId: string;\n owner: ResolvedOwnerVariant;\n auth: SocketAuthResult | undefined;\n resourceServerInstanceRef?: string;\n messages: FlowActorExecution_Message[];\n suspension: AgentApprovalSuspension;\n emitter: FlowsActorsExecutionEmitter;\n }): Promise<void> {\n const { systemRef, executionId, owner, suspension, emitter } = params;\n const requestedAt = new Date().toISOString();\n const pausedApprovalExpiresAt = new Date(Date.now() + FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS).toISOString();\n\n const pausedApproval = serializeFlowActorPausedApproval({\n approvalId: suspension.approvalId,\n sdkModelMessages: suspension.sdkModelMessages,\n pendingToolName: suspension.toolName,\n pendingToolArgs: suspension.toolArgs,\n requestedAt,\n // #465: the suspension carries its own expiry. The field was declared, sent to the browser and\n // read there, and never written — so a pending approval never expired.\n //\n // Computed ONCE, above, and shared with the announcement below: two `Date.now()` calls would\n // let the row and the message a client is shown disagree about when the pause lapses.\n expiresAt: pausedApprovalExpiresAt,\n });\n\n try {\n const paused = await this.systemAccess.updateAsSystem(\n owner.resourceType,\n {\n executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n },\n {\n status: FlowsActors_Status.AWAITING_APPROVAL,\n pausedApproval,\n messages: toPersistableConversationMessages(params.messages),\n },\n { scopeContext: owner.scopeContext },\n );\n if (!paused) {\n this.logger.error('[ConversationalExecution] Approval-pause write matched no row; the decision cannot be resumed', {\n systemRef, executionId, approvalId: suspension.approvalId,\n });\n return;\n }\n } catch (error) {\n this.logger.error('[ConversationalExecution] Failed to persist an approval pause; the turn is unrecoverable', {\n systemRef, executionId, approvalId: suspension.approvalId, ...projectCaughtErrorLogFields(error),\n });\n return;\n }\n\n // Only announce a pause that was actually RECORDED. Emitting first would invite a client to\n // answer a decision no row can accept.\n /*\n * Built through the NAMED schema rather than as an anonymous `data` bag. The bag is\n * `Record<string, unknown>` on the wire, so nothing typed this announcement and the browser\n * ended up listening on `FLOWS_ACTORS_APPROVAL_REQUEST` — an event no code has ever emitted\n * — which meant no shipped screen could observe a paused turn at all (#528). Typing the\n * producer is what lets the consumer parse it instead of guessing at keys.\n *\n * `expiresAt` travels here and nowhere else: since #465 the suspension genuinely carries an\n * expiry, and this block is the only path by which a client can learn it.\n */\n const announcement: WS_FlowsActorsApprovalAnnouncementData = {\n approvalRequested: true,\n approvalId: suspension.approvalId,\n toolName: suspension.toolName,\n toolArgs: suspension.toolArgs,\n requestedAt,\n expiresAt: pausedApprovalExpiresAt,\n // The isolation axis the DECISION must carry back. Without it a responder can only be\n // filtered against the default-instance sentinel, so an approval raised on a named agent\n // instance is unresumable — the read matches no row and the decision is dropped silently.\n // Emitted even when it is the default, so a client echoes one field unconditionally rather\n // than branching on whether the value is meaningful.\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n };\n\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef,\n executionId,\n messageType: FlowsActors_MessageContentType.PROGRESS,\n content: `Waiting for approval to run \"${suspension.toolName}\".`,\n data: announcement,\n timestamp: new Date(),\n });\n }\n\n /**\n * Record a human's approval decision and RESUME the suspended turn.\n *\n * ## The three things this must get right\n *\n * 1. **The decision is scoped like every other read of this family.** The filter carries the owner\n * FK, the machine credential and the agent instance, so one principal cannot answer another's\n * pending approval — a decision is an ACTION on someone else's work, which makes it exactly the\n * kind of thing an isolation axis exists for.\n * 2. **`approvalId` must match.** It is the idempotency key AND the anti-replay check: the model\n * SDK binds it to the specific tool call with an HMAC signature, so answering a stale id must\n * refuse rather than approve whatever happens to be pending now.\n * 3. **A DENIAL resumes too.** Denying is not cancelling: the SDK is told the call was refused and\n * the model gets to respond (\"I can't do that without approval\"). Treating denial as a terminal\n * failure would leave the user with a dead thread instead of an answer.\n */\n /**\n * The tool-execution context a turn's grounding tools run under.\n *\n * Extracted so the RESUME cannot drift from the original turn. It was inlined at the start-turn\n * site only, and the resume passed no context at all — `resolveAgentTools` returns `undefined`\n * without one, so a resumed turn ran with NO TOOLS. The approved call could not be executed, and\n * the unresolved `tool_use` reached the provider as\n * \"tool_use ids were found without tool_result blocks\". The approval succeeded and the work never\n * happened.\n *\n * The auth is the APPROVER's, carried from the socket that answered. That is the point rather than\n * an implementation detail: the gated tool runs with a verified identity, so approving cannot\n * escalate anything the approver could not already do. Ambient authority here would make the\n * approval itself a privilege-escalation primitive.\n */\n private buildToolExecutionContext(auth: SocketAuthResult): FunctionToolExecutionContext {\n return {\n auth,\n // The org the tools scope reads to = the CALLER's own org from their verified auth (a user's\n // active org, or an org-machine's org), NOT the conversation owner scope. An app-machine\n // caller has no org → undefined (app-scope reads).\n organizationId: auth.initiatorIds?.organizationId,\n services: {\n resourcesRegistry: this.resourcesRegistry,\n servicesRegistryHandler: this.servicesRegistryHandler,\n executionContextCreator: this.executionContextCreator,\n // A tool dispatches a resource operation while bypassing Express, so the operation's own\n // authored `rateLimit?` — whose other consumers are the HTTP controller pre-flight and the\n // MCP tool plane — has no enforcer on this plane unless one is supplied here.\n rateLimitService: this.rateLimitService,\n // Same reason, for the operation's `roles` ACL: bypassing Express also bypasses the\n // CONTROLLER tier, which is the only place that ACL is read. Supplying the authorizer here\n // is what lets the tool factories apply it themselves.\n authorizer: this.authorizer,\n },\n };\n }\n\n /**\n * The current STATUS of one conversational execution, or `undefined` when the caller's filter\n * matches no row.\n *\n * Exists for the A2A task plane, which projects a task from the execution it wraps. When a turn\n * suspends for approval the task is materialised at `input-required`, and NOTHING advances that\n * task when the decision arrives: the resume happens over a different transport (the app's\n * WebSocket), which knows the execution and not the task. Without this seam the task reports\n * `input-required` forever, for work that finished — and, worse, stays cancellable, because the\n * cancel path compare-and-swaps on the STORED status.\n *\n * Read through the SAME four isolation axes as every other read of this family (owner FK, machine\n * credential, agent instance). The caller has already proved it owns the TASK; that does not\n * license an unfiltered read of the execution, and answering `undefined` on a mismatch keeps\n * not-found and not-yours indistinguishable exactly as the rest of this plane does.\n *\n * Deliberately returns the status ALONE. A richer projection would tempt the transport into\n * reading the transcript, which is the prompt text this plane's isolation rules exist to protect.\n */\n public async readExecutionStatus(params: {\n executionId: string;\n scopeContext: ConversationalOwnerScope;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n }): Promise<FlowsActors_Status | undefined> {\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(params.scopeContext);\n } catch {\n return undefined;\n }\n\n try {\n const row = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType,\n {\n executionId: params.executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n },\n { scopeContext: owner.scopeContext },\n );\n return row?.status;\n } catch (error) {\n // A read that throws must not take down the task read that asked. The caller falls back to\n // the stored task status, which is the pre-existing behaviour — degraded, never broken.\n this.logger.warn('[ConversationalExecution] Could not read execution status for a task projection', {\n executionId: params.executionId, ...projectCaughtErrorLogFields(error),\n });\n return undefined;\n }\n }\n\n public async respondToApproval(params: {\n systemRef: string;\n executionId: string;\n approvalId: string;\n approved: boolean;\n scopeContext: ConversationalOwnerScope;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n reason?: string;\n emitter?: FlowsActorsExecutionEmitter;\n /**\n * APPROVE-WITH-MODIFICATIONS (#566): arguments the approver authored, replacing the model's.\n *\n * Honoured only on an APPROVAL. On a denial there is no call to run, so arguments attached to\n * one are meaningless rather than dangerous — they are ignored, silently, because refusing a\n * denial over a field that cannot affect anything would block the one decision that must always\n * be available.\n */\n modifiedToolArgs?: Record<string, unknown>;\n }): Promise<void> {\n const { systemRef, executionId, approvalId, approved } = params;\n\n let owner: ResolvedOwnerVariant;\n try {\n owner = this.resolveOwnerVariant(params.scopeContext);\n } catch {\n this.logger.error('[ConversationalExecution] Approval response has no resolvable owner scope', { systemRef, executionId });\n return;\n }\n\n const ownerFilter = {\n executionId,\n ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n };\n\n const row = await this.systemAccess.readAsSystem<FlowActorExecution>(\n owner.resourceType, ownerFilter, { scopeContext: owner.scopeContext },\n );\n if (!row?.pausedApproval) {\n // Not-found and not-yours answer identically, as everywhere else on this plane: telling a\n // caller that SOMEONE has a pending approval they cannot see is itself a disclosure.\n this.logger.info('[ConversationalExecution] No pending approval matches this response', { systemRef, executionId, approvalId });\n return;\n }\n\n let paused: FlowActorExecution_PausedApproval;\n try {\n paused = parseFlowActorPausedApproval(row.pausedApproval);\n } catch (parseError) {\n // A corrupted blob fails LOUDLY rather than resuming from garbage — the parse helper's own\n // contract. Resuming from a partial message array would replay a different conversation.\n this.logger.error('[ConversationalExecution] Paused-approval state is unreadable; refusing to resume', {\n systemRef, executionId, approvalId, ...projectCaughtErrorLogFields(parseError),\n });\n return;\n }\n\n if (paused.approvalId !== approvalId) {\n this.logger.warn('[ConversationalExecution] Approval response does not match the pending request; refusing', {\n systemRef, executionId, pendingApprovalId: paused.approvalId, respondedApprovalId: approvalId,\n });\n return;\n }\n\n /*\n * #465: an EXPIRED approval is refused, and the turn becomes terminal.\n *\n * This is the half that matters for safety rather than hygiene: honouring a decision on a tool\n * call raised days ago would execute it against a conversation, a world and an intent that have\n * all moved on, and the person answering has no memory of the question. `FAILED` is the terminal\n * state the status vocabulary already named for expiry — nothing new was invented.\n *\n * Placed AFTER the approvalId match so a mismatched id keeps its own diagnosis; an expired\n * approval and a wrong one are different facts and an operator reading the log needs both.\n *\n * KNOWN GAP, stated rather than implied: nothing sweeps. A turn nobody answers stays\n * `AWAITING_APPROVAL` until a late decision arrives and is refused here, rather than lapsing on\n * its own. That makes this a guard at USE, not the unattended auto-fail the schema describes —\n * closing it needs a scheduled sweep, which is deliberately not built here.\n */\n if (paused.expiresAt !== undefined && new Date(paused.expiresAt).getTime() <= Date.now()) {\n this.logger.warn('[ConversationalExecution] Approval decision arrived after the pause expired; refusing and failing the turn', {\n systemRef, executionId, approvalId, expiresAt: paused.expiresAt, toolName: paused.pendingToolName,\n });\n await this.systemAccess.updateAsSystem(owner.resourceType, ownerFilter, {\n status: FlowsActors_Status.FAILED,\n pausedApproval: null,\n }, { scopeContext: owner.scopeContext }).catch((error: unknown) => {\n this.logger.error('[ConversationalExecution] Could not fail an expired approval pause', {\n systemRef, executionId, ...projectCaughtErrorLogFields(error),\n });\n });\n return;\n }\n\n /*\n * APPROVE-WITH-MODIFICATIONS (#566) — resolved BEFORE the pause is cleared, and that ordering is\n * the whole point rather than a detail.\n *\n * The next statement flips the row to PROCESSING and drops `pausedApproval`, after which there\n * is no approval left to answer: a modification refused one line later would leave the approver\n * with a turn that is neither paused nor resumable, having told them nothing. Refusing HERE\n * costs them an error message and leaves the decision exactly where it was — they can correct\n * the arguments, or approve the call as the model proposed it.\n *\n * Only on an approval. A denial resumes so the model can respond; there is no call to edit.\n */\n let modifiedResume: PreparedToolCallModification | undefined;\n if (approved && params.modifiedToolArgs) {\n const prepared = this.prepareApprovedToolCallModification({\n systemRef, executionId, paused, modifiedToolArgs: params.modifiedToolArgs,\n });\n if (prepared.kind === ToolApprovalModificationOutcomeKind.REFUSED) {\n this.logger.warn('[ConversationalExecution] Refusing an approval whose modified arguments could not be applied; the pause stands', {\n systemRef, executionId, approvalId, toolName: paused.pendingToolName, reason: prepared.message,\n });\n if (params.emitter) {\n // `recoverable: true` — the approval is still pending and still answerable. Every other\n // caller of this helper is ending the attempt; this one is not.\n this.emitError(params.emitter, systemRef, executionId, 'APPROVAL_MODIFICATION_REJECTED', prepared.message, true);\n }\n return;\n }\n modifiedResume = prepared.kind === ToolApprovalModificationOutcomeKind.MODIFIED ? prepared.modification : undefined;\n }\n\n this.logger.info('[ConversationalExecution] Resuming a suspended turn on a human decision', {\n systemRef, executionId, approvalId, approved, toolName: paused.pendingToolName,\n modifiedArgumentKeys: modifiedResume?.modifiedArgumentKeys,\n });\n\n // Back to PROCESSING before the model call: the row must not read `awaiting_approval` while the\n // turn is actually running, or a second decision could be accepted for a turn already resumed.\n await this.systemAccess.updateAsSystem(owner.resourceType, ownerFilter, {\n status: FlowsActors_Status.PROCESSING,\n pausedApproval: null,\n }, { scopeContext: owner.scopeContext }).catch((error: unknown) => {\n this.logger.error('[ConversationalExecution] Could not clear the approval pause before resuming', {\n systemRef, executionId, ...projectCaughtErrorLogFields(error),\n });\n });\n\n if (modifiedResume) {\n this.recordApprovalModification({\n systemRef, executionId, approvalId, prepared: modifiedResume, auth: params.auth,\n });\n }\n\n await this.resumeAfterApproval({\n systemRef, executionId, owner, paused, approved,\n reason: params.reason,\n // The rewritten, re-signed SDK array when the approver authored the arguments; otherwise the\n // resume reads `paused.sdkModelMessages` exactly as before.\n modifiedSdkModelMessages: modifiedResume?.sdkModelMessages,\n auth: params.auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n emitter: params.emitter,\n // The transcript SO FAR. The resume appends its answer to it; without the prior turns the\n // completion write would replace the whole thread with a single assistant message.\n priorMessages: (row.messages ?? []) as FlowActorExecution_Message[],\n });\n }\n\n\n /**\n * Re-invoke the agent with the human's decision appended, and finish the turn.\n *\n * The resume payload is the SDK's own message array captured at suspension, plus a\n * `tool-approval-response` carrying the decision. We do not reconstruct the conversation: the\n * array is opaque to us by contract, and rebuilding it would silently change what the model sees.\n */\n private async resumeAfterApproval(params: {\n systemRef: string;\n executionId: string;\n owner: ResolvedOwnerVariant;\n paused: FlowActorExecution_PausedApproval;\n approved: boolean;\n reason?: string;\n auth?: SocketAuthResult;\n resourceServerInstanceRef?: string;\n emitter?: FlowsActorsExecutionEmitter;\n /** The conversation as persisted before the decision; the resumed answer is appended to it. */\n priorMessages?: FlowActorExecution_Message[];\n /**\n * The SDK array REWRITTEN so the pending tool call carries the approver's own arguments, with\n * the approval signature re-bound to them (#566).\n *\n * Absent on every ordinary decision, which is why the fallback is the untouched\n * `paused.sdkModelMessages` rather than a merge: the contract above — \"we do not reconstruct the\n * conversation\" — still holds. A modification replaces exactly two values inside the array the\n * SDK itself produced, and nothing else about it is authored here.\n */\n modifiedSdkModelMessages?: Record<string, unknown>[];\n }): Promise<void> {\n const { systemRef, executionId, owner, paused, approved } = params;\n\n const resumeMessages = [\n ...(params.modifiedSdkModelMessages ?? paused.sdkModelMessages),\n {\n role: 'tool',\n content: [{\n type: 'tool-approval-response',\n approvalId: paused.approvalId,\n approved,\n ...(params.reason ? { reason: params.reason } : {}),\n }],\n },\n ];\n\n try {\n const actorSystem = this.resolveConversationalActorSystem(systemRef, executionId, params.emitter ?? (() => {}));\n if (!actorSystem) return;\n const agentRef = this.resolveChatAgentRef(actorSystem);\n if (!agentRef) return;\n\n // The tool context is what makes a resume able to DO anything. Without it the agent resolves\n // no tools, so the approved call cannot execute and the provider rejects the unresolved\n // `tool_use`. A resume that cannot run the tool is not a resume.\n if (!params.auth) {\n this.logger.error('[ConversationalExecution] Cannot resume without the approver\\'s auth; the tool would have no identity to run as', {\n systemRef, executionId, approvalId: paused.approvalId,\n });\n return;\n }\n\n const result = await this.agentsBackend.invokeAgentStreaming(\n { agentRef, input: { messages: resumeMessages } } as any,\n {\n onDelta: (delta) => params.emitter?.(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef, executionId, messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: delta, isFinal: false, timestamp: new Date(),\n }),\n },\n this.buildToolExecutionContext(params.auth),\n );\n\n // A resumed turn can suspend AGAIN — a multi-step agent may hit a second gated tool. That is\n // ordinary, not an error, so it is persisted the same way rather than recorded as completed.\n const nextSuspension = (result as { approvalSuspension?: AgentApprovalSuspension }).approvalSuspension;\n if (nextSuspension) {\n await this.persistApprovalSuspension({\n systemRef, executionId, owner, auth: params.auth,\n resourceServerInstanceRef: params.resourceServerInstanceRef,\n messages: [],\n suspension: nextSuspension,\n emitter: params.emitter ?? (() => {}),\n });\n return;\n }\n\n // PERSIST THE ANSWER, not just the status.\n //\n // This wrote `status` + `finishedAt` only, so the agent's reply was emitted to the live socket\n // and then dropped: a reload after a decision showed the thread with the question and no\n // answer. It matters most for a DENIAL, where the reply (\"I can't do that without approval\")\n // IS the entire outcome of the turn — the same reason the pause path persists the user's turn\n // alongside the suspension.\n const assistantText = this.extractAssistantText(result.output);\n const finishedAt = new Date();\n const resumedMessages: FlowActorExecution_Message[] = assistantText.length > 0\n ? [...(params.priorMessages ?? []), {\n id: randomUUID(),\n role: FlowsActors_ConversationRole.ASSISTANT,\n contentType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText,\n createdAt: finishedAt,\n }]\n : (params.priorMessages ?? []);\n\n await this.systemAccess.updateAsSystem(owner.resourceType, {\n executionId, ...owner.ownerFields,\n machineCredentialId: machineCredentialIdOf(params.auth),\n resourceServerInstanceRef: agentInstanceOf(params.resourceServerInstanceRef),\n }, {\n status: FlowsActors_Status.COMPLETED,\n finishedAt,\n messages: toPersistableConversationMessages(resumedMessages),\n }, { scopeContext: owner.scopeContext });\n\n params.emitter?.(CoreWebSocketEvent.FLOWS_ACTORS_MESSAGE, {\n systemRef, executionId, messageType: FlowsActors_MessageContentType.MARKDOWN,\n content: assistantText, isFinal: true, timestamp: new Date(),\n });\n } catch (error) {\n this.logger.error('[ConversationalExecution] Resumed turn failed after the approval decision', {\n systemRef, executionId, approvalId: paused.approvalId, ...projectCaughtErrorLogFields(error),\n });\n await this.finalizeTerminal(systemRef, executionId, owner, [], FlowsActors_Status.FAILED,\n machineCredentialIdOf(params.auth), agentInstanceOf(params.resourceServerInstanceRef));\n }\n }\n\n // ── Approve-with-modifications (#566) ──────────────────────────────────────\n\n /**\n * A modification that survived every server-side check and is ready to resume.\n *\n * Carries the rewritten array AND what the audit trail needs, because both are produced by the\n * same walk of the SDK's message array — recomputing either afterwards would mean walking it a\n * second time and could disagree with the version that was signed.\n */\n private prepareApprovedToolCallModification(params: {\n systemRef: string;\n executionId: string;\n paused: FlowActorExecution_PausedApproval;\n modifiedToolArgs: Record<string, unknown>;\n }): ToolCallModificationPreparation {\n const { paused, modifiedToolArgs } = params;\n\n /*\n * The agent, and the FunctionTool behind the name the model was shown.\n *\n * A gated tool is always a FunctionTool: `requiresHumanApproval` is declared on that interface\n * and nothing else contributes to the approval-gated set — an MCP tool is discovered from a\n * server at turn start and no author can gate one. So a pending approval whose tool this cannot\n * find is a disagreement between the paused row and the live registry, not an unsupported case.\n */\n const actorSystem = this.flowsActorsRegistry.getSystem(params.systemRef, FlowActorSystem_Kind.ACTOR) as ActorSystem | undefined;\n const agentRef = actorSystem ? this.resolveChatAgentRef(actorSystem) : undefined;\n const agent = agentRef ? this.flowsActorsRegistry.getAgent(agentRef) : undefined;\n if (!agent || !agentRef) {\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: 'The agent that raised this approval is no longer registered, so its arguments cannot be checked. Approve the call as proposed, or deny it.' };\n }\n\n const functionRef = (agent.capabilities?.tools?.functionRefs ?? [])\n .find((ref) => modelToolNameForFunctionRef(ref) === paused.pendingToolName);\n const functionTool = functionRef ? this.flowsActorsRegistry.getFunctionTool(functionRef) : undefined;\n if (!functionTool) {\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: `The agent no longer declares the tool \"${paused.pendingToolName}\", so modified arguments cannot be validated against it. Approve the call as proposed, or deny it.` };\n }\n if (!functionTool.requiresHumanApproval) {\n // Not pedantry: it means the registry no longer gates this tool, so the resumed turn would run\n // arguments a human authored under a gate that has since been removed.\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: `The tool \"${paused.pendingToolName}\" no longer requires approval, so this pending decision is stale. Deny it and ask again.` };\n }\n\n /*\n * Step 2 of the issue's order: the SERVER validates, against the tool's OWN schema.\n *\n * The browser's validation is a convenience — an approver editing a call is authoring a call the\n * agent never proposed, and the only schema that can judge it is the one the tool declares. The\n * SDK re-validates too (`validate-tool-approvals.ts` throws `InvalidToolInputError`), so this is\n * not what makes it SAFE; it is what makes it USABLE. Its refusal arrives while the pause is\n * still standing and names the offending argument, whereas the SDK's arrives mid-resume as an\n * exception, which reaches a person as a turn that died.\n *\n * The RAW edit is what gets validated, written and signed — never the parse OUTPUT. A schema\n * with a transform would otherwise make the persisted arguments something the approver did not\n * type, and it keeps an approver's input treated exactly like a model's.\n */\n const validation = functionTool.inputSchema.safeParse(modifiedToolArgs);\n if (!validation.success) {\n const detail = validation.error.issues\n .map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`)\n .join('; ');\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: `Those arguments are not valid for \"${paused.pendingToolName}\" — ${detail}. The approval is still pending: correct them, or approve the call as proposed.` };\n }\n\n const signingKey = this.agentsBackend.resolveToolApprovalSigningKey();\n if (!signingKey) {\n // Unreachable while the turn is running — a turn with an approval-gated tool is refused\n // outright when the key cannot be derived — but stated rather than assumed, because signing\n // with nothing would silently produce an approval the SDK refuses at resume.\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: 'The approval-signing key is not configured, so a modified call cannot be re-bound to this approval. Approve the call as proposed, or deny it.' };\n }\n\n const applied = applyModifiedToolApprovalInput({\n sdkModelMessages: paused.sdkModelMessages,\n approvalId: paused.approvalId,\n modifiedInput: modifiedToolArgs,\n signingKey,\n });\n if (applied.kind === ToolApprovalModificationOutcomeKind.REFUSED) {\n this.logger.error('[ConversationalExecution] A paused turn\\'s resume payload does not contain the call its approval names', {\n systemRef: params.systemRef, executionId: params.executionId,\n approvalId: paused.approvalId, refusal: applied.refusal, detail: applied.detail,\n });\n return { kind: ToolApprovalModificationOutcomeKind.REFUSED, message: 'This pending call could not be rewritten with your arguments. Approve it as proposed, or deny it.' };\n }\n\n /*\n * Nothing changed, so nothing is a modification.\n *\n * An approver who opens the editor, changes their mind and approves has approved the call as\n * proposed — resuming through the rewritten array would still be correct (the signature is over\n * identical bytes), but it would put a row on the audit trail claiming a person authored\n * arguments they did not, which is the one thing this event exists to mean.\n */\n if (applied.modifiedArgumentKeys.length === 0) {\n return { kind: ToolApprovalModificationOutcomeKind.UNCHANGED };\n }\n\n return {\n kind: ToolApprovalModificationOutcomeKind.MODIFIED,\n modification: {\n agentRef,\n sdkModelMessages: applied.sdkModelMessages,\n toolName: applied.toolName,\n modifiedArgumentKeys: applied.modifiedArgumentKeys,\n proposedInputDigest: hashToolApprovalInput(applied.proposedInput),\n executedInputDigest: hashToolApprovalInput(modifiedToolArgs),\n },\n };\n }\n\n /**\n * Put one approve-with-modifications decision on the audit trail.\n *\n * Fire-and-forget and feature-detected, the same contract as every other emitter in this codebase:\n * an absent or failing sink must never fail the act it was going to observe. A decision a person\n * made must not be undone because the trail could not be written — the observation is evidence,\n * not a gate.\n *\n * Emitted AFTER the pause is cleared and BEFORE the model is re-invoked, so the row records the\n * DECISION rather than its outcome. A resume that then fails does not make it untrue that a human\n * authored those arguments and authorized the call.\n */\n private recordApprovalModification(params: {\n systemRef: string;\n executionId: string;\n approvalId: string;\n prepared: PreparedToolCallModification;\n auth?: SocketAuthResult;\n }): void {\n if (!this.auditLogs) return;\n void this.auditLogs.logAgentToolApprovalModified({\n executionId: params.executionId,\n approvalId: params.approvalId,\n systemRef: params.systemRef,\n agentRef: params.prepared.agentRef,\n toolName: params.prepared.toolName,\n proposedInputDigest: params.prepared.proposedInputDigest,\n executedInputDigest: params.prepared.executedInputDigest,\n modifiedArgumentKeys: params.prepared.modifiedArgumentKeys,\n approverUserId: params.auth?.initiatorIds?.userId,\n organizationId: params.auth?.initiatorIds?.organizationId,\n }).catch((error: unknown) => {\n this.logger.warn('[ConversationalExecution] Could not record an approve-with-modifications decision on the audit trail; the turn is unaffected', {\n systemRef: params.systemRef, executionId: params.executionId, approvalId: params.approvalId,\n ...projectCaughtErrorLogFields(error),\n });\n });\n }\n\n // ── Internals ──────────────────────────────────────────────────────────────\n\n /**\n * Resolve the target system as an ACTOR system. If it is a FLOW system, fail\n * closed with a typed \"not implemented\" (v1 has no flow conversational\n * runtime); if it does not exist at all, report not-found.\n */\n private resolveConversationalActorSystem(\n systemRef: string,\n executionId: string,\n emitter: FlowsActorsExecutionEmitter,\n ): ActorSystem | undefined {\n const actor = this.flowsActorsRegistry.getSystem(systemRef, FlowActorSystem_Kind.ACTOR);\n if (actor) return actor as ActorSystem;\n\n if (this.flowsActorsRegistry.getSystem(systemRef, FlowActorSystem_Kind.FLOW)) {\n this.emitError(emitter, systemRef, executionId, 'FLOW_CONVERSATION_NOT_IMPLEMENTED', `System '${systemRef}' is a FLOW system; conversational execution of flows is not yet implemented.`);\n return undefined;\n }\n this.emitError(emitter, systemRef, executionId, 'SYSTEM_NOT_FOUND', `No actor system registered for ref '${systemRef}'.`);\n return undefined;\n }\n\n /** Pick the agent-backed actor to converse with (first AGENTIC actor with an agentRef). */\n private resolveChatAgentRef(actorSystem: ActorSystem): string | undefined {\n const chatActor = actorSystem.actors.find(\n (a) => a.executionMode === Actor_ExecutionMode.AGENTIC && !!a.agentRef,\n );\n return chatActor?.agentRef;\n }\n\n /** Read the user's turn from the free-form start input (`message` or `prompt`). */\n private extractUserText(initialInput?: Record<string, unknown>): string | undefined {\n if (!initialInput) return undefined;\n const candidate = initialInput.message ?? initialInput.prompt;\n if (typeof candidate === 'string' && candidate.trim().length > 0) return candidate;\n return undefined;\n }\n\n /**\n * A user-facing status line for a tool call. Turns the identifier-safe tool\n * name (e.g. `resource_todos_read`) into \"Looking up your todos…\"; falls back\n * to a generic phrase for non-resource tools.\n */\n private humanizeToolStatus(toolName: string): string {\n const match = /^resource[._](.+?)[._]read$/.exec(toolName);\n if (match) {\n const words = match[1].replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/[_.]/g, ' ').toLowerCase().trim();\n return `Looking up your ${words}…`;\n }\n return 'Looking things up…';\n }\n\n /**\n * Forward the turn's LLM token usage to the optional `onUsage` sink. The agent layer folds the\n * provider's normalized usage onto the returned invocation's `executionContext.usage`; this is\n * the ONLY place the conversational runtime reads it, and it stays deliberately ignorant of what\n * the consumer does with it (metering, budgets, observability).\n *\n * Never throws: a metering sink must not be able to fail a turn that already produced an answer.\n */\n private reportUsage(params: StartConversationalExecutionParams, result: unknown): void {\n if (!params.onUsage) return;\n try {\n const usage = (result as { executionContext?: { usage?: { totalTokens?: number } } })?.executionContext?.usage;\n const totalTokens = typeof usage?.totalTokens === 'number' ? usage.totalTokens : undefined;\n params.onUsage({ totalTokens });\n } catch (error) {\n this.logger.warn('[ConversationalExecution] onUsage sink failed (non-fatal)', {\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n /** Normalize the agent output (chat `{message:{content}}` or text `{text}`) to a string. */\n private extractAssistantText(output: unknown): string {\n if (typeof output === 'string') return output;\n if (output && typeof output === 'object') {\n const record = output as Record<string, unknown>;\n const message = record.message;\n if (message && typeof message === 'object' && typeof (message as Record<string, unknown>).content === 'string') {\n return (message as Record<string, unknown>).content as string;\n }\n if (typeof record.text === 'string') return record.text;\n }\n return typeof output === 'undefined' ? '' : JSON.stringify(output);\n }\n\n /** Emit a `FLOWS_ACTORS_ERROR` payload. */\n private emitError(\n emitter: FlowsActorsExecutionEmitter,\n systemRef: string,\n executionId: string,\n errorCode: string,\n errorMessage: string,\n /**\n * `true` when the turn is still answerable — the caller may fix the input and try again.\n *\n * Defaults to `false`, which is what every pre-existing caller means: a missing system, a flow\n * system, an empty input all end the attempt. A REFUSED ARGUMENT EDIT does not: the pause is\n * deliberately left standing, so telling the client otherwise would make the surface hide the\n * decision that is still waiting for it.\n */\n recoverable = false,\n ): void {\n emitter(CoreWebSocketEvent.FLOWS_ACTORS_ERROR, {\n systemRef,\n executionId,\n errorCode,\n errorMessage,\n recoverable,\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors-registry.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors-registry.service.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/services/flows-actors-registry.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC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