@wildo-ai/saas-backend-lib 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (853) hide show
  1. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
  2. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
  3. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
  4. package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
  5. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
  6. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
  7. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
  8. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
  9. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
  10. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
  11. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
  12. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
  13. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
  14. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
  15. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
  16. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
  17. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
  18. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
  19. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
  20. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +27 -6
  21. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
  22. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
  23. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
  24. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
  25. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
  26. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
  27. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
  28. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
  29. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
  30. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +47 -4
  31. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
  32. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +96 -29
  33. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
  34. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
  35. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
  36. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
  37. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
  38. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
  39. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
  40. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
  41. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
  42. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
  43. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +9 -1
  44. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
  45. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +49 -0
  46. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
  47. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +171 -18
  48. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
  49. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
  50. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +23 -3
  51. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
  52. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
  53. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +20 -0
  54. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
  55. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
  56. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
  57. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
  58. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  59. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
  60. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  61. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
  62. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
  63. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
  64. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
  65. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
  66. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  67. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +529 -41
  68. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  69. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
  70. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
  71. package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
  72. package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
  73. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
  74. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
  75. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
  76. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
  77. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
  78. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
  79. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
  80. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
  81. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
  82. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
  83. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
  84. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
  85. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
  86. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
  87. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
  88. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
  89. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
  90. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
  91. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
  92. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
  93. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
  94. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
  95. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
  96. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
  97. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
  98. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
  99. package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
  100. package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
  101. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
  102. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
  103. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
  104. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
  105. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
  106. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +48 -7
  107. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
  108. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
  109. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
  110. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
  111. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
  112. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
  113. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
  114. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
  115. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
  116. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
  117. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
  118. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
  119. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
  120. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
  121. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
  122. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
  123. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
  124. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
  125. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
  126. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
  127. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
  128. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
  129. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
  130. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
  131. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
  132. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
  133. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
  134. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
  135. package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
  136. package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
  137. package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
  138. package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
  139. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
  140. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
  141. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +225 -13
  142. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
  143. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +340 -62
  144. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
  145. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +244 -7
  146. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
  147. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +386 -5
  148. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
  149. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
  150. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
  151. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
  152. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +6 -2
  153. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
  154. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +31 -9
  155. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
  156. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
  157. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
  158. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +57 -1
  159. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
  160. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
  161. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
  162. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
  163. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
  164. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
  165. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +31 -0
  166. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
  167. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
  168. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
  169. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
  170. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
  171. package/dist/esm/config/models/app-config.backend.schemas.d.ts +142 -46
  172. package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
  173. package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
  174. package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
  175. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
  176. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
  177. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
  178. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
  179. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
  180. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
  181. package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
  182. package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
  183. package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
  184. package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
  185. package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
  186. package/dist/esm/config/services/app-configuration.backend.utils.d.ts +33 -0
  187. package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
  188. package/dist/esm/config/services/app-configuration.backend.utils.js +39 -1
  189. package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
  190. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
  191. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
  192. package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
  193. package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
  194. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
  195. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
  196. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
  197. package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
  198. package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
  199. package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
  200. package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
  201. package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
  202. package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
  203. package/dist/esm/errors/services/error-handler.backend.service.js +129 -8
  204. package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
  205. package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
  206. package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
  207. package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
  208. package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
  209. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
  210. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
  211. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
  212. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
  213. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
  214. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
  215. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
  216. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
  217. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +59 -2
  218. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
  219. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +52 -17
  220. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
  221. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
  222. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
  223. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
  224. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
  225. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
  226. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
  227. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
  228. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
  229. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
  230. package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
  231. package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
  232. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
  233. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
  234. package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
  235. package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
  236. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
  237. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
  238. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
  239. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
  240. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
  241. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
  242. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
  243. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
  244. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
  245. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
  246. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
  247. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
  248. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
  249. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
  250. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
  251. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
  252. package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
  253. package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
  254. package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
  255. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  256. package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
  257. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  258. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +292 -7
  259. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  260. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +533 -45
  261. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  262. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
  263. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
  264. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
  265. package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
  266. package/dist/esm/files/controllers/file.controller.js +21 -13
  267. package/dist/esm/files/controllers/file.controller.js.map +1 -1
  268. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
  269. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +39 -15
  270. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
  271. package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
  272. package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
  273. package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
  274. package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
  275. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
  276. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
  277. package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
  278. package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
  279. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +53 -2
  280. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
  281. package/dist/esm/files/services/file-upload-grant.backend.service.js +127 -3
  282. package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
  283. package/dist/esm/files/services/files.backend.service.d.ts +68 -0
  284. package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
  285. package/dist/esm/files/services/files.backend.service.js +175 -5
  286. package/dist/esm/files/services/files.backend.service.js.map +1 -1
  287. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
  288. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
  289. package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
  290. package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
  291. package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
  292. package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
  293. package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
  294. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
  295. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
  296. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
  297. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
  298. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
  299. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
  300. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
  301. package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
  302. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
  303. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
  304. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
  305. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
  306. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
  307. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
  308. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
  309. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
  310. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
  311. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
  312. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
  313. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
  314. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
  315. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
  316. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
  317. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
  318. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
  319. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
  320. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
  321. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +196 -40
  322. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
  323. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
  324. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
  325. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
  326. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
  327. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
  328. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
  329. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
  330. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
  331. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
  332. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
  333. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
  334. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
  335. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
  337. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
  338. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
  339. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
  341. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
  342. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
  343. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
  345. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
  346. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  347. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
  348. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  349. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
  351. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
  352. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
  353. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
  354. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
  355. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
  356. package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
  357. package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
  358. package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
  359. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +28 -1
  360. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  361. package/dist/esm/flows-actors/services/agents.backend.service.js +204 -18
  362. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  363. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
  364. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  365. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
  366. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  367. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
  368. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  369. package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
  370. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  371. package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
  373. package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
  374. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
  376. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
  377. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
  378. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
  379. package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
  380. package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
  381. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
  382. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
  383. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
  384. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
  385. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +8 -4
  387. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  388. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
  389. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
  391. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
  392. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
  393. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
  394. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
  395. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
  396. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
  397. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
  398. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
  399. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
  400. package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
  401. package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
  402. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
  403. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
  404. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
  405. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
  406. package/dist/esm/index.d.ts +11 -4
  407. package/dist/esm/index.d.ts.map +1 -1
  408. package/dist/esm/index.js +31 -4
  409. package/dist/esm/index.js.map +1 -1
  410. package/dist/esm/inject/models/container.d.ts.map +1 -1
  411. package/dist/esm/inject/models/container.js +78 -10
  412. package/dist/esm/inject/models/container.js.map +1 -1
  413. package/dist/esm/inject/models/service-types.d.ts +17 -3
  414. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  415. package/dist/esm/inject/models/service-types.js +19 -3
  416. package/dist/esm/inject/models/service-types.js.map +1 -1
  417. package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
  418. package/dist/esm/mcp/controllers/mcp.controller.js +20 -0
  419. package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
  420. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +56 -1
  421. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
  422. package/dist/esm/mcp/services/mcp-server.backend.service.js +107 -11
  423. package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
  424. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
  425. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +22 -0
  426. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
  427. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
  428. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
  429. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
  430. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
  431. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
  432. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
  433. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
  434. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
  435. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
  436. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
  437. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
  438. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
  439. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
  440. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
  441. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
  442. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
  443. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
  444. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
  445. package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
  446. package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
  447. package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
  448. package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
  449. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
  450. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
  451. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
  452. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
  453. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
  454. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
  455. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
  456. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
  457. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
  458. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  459. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  460. package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
  461. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  462. package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
  463. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  464. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
  465. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
  466. package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
  467. package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
  468. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
  469. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
  470. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
  471. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
  472. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
  473. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
  474. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
  475. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
  476. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
  477. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
  479. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
  480. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
  481. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
  482. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
  483. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
  484. package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
  485. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
  486. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
  487. package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
  488. package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
  489. package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
  490. package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
  491. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
  492. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
  493. package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
  494. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
  495. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
  496. package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
  497. package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
  498. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +99 -13
  499. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
  500. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +422 -66
  501. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
  502. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
  503. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
  504. package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
  505. package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
  506. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
  507. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  508. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
  509. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  510. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
  511. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  512. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +46 -1
  513. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
  514. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
  515. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +16 -6
  516. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
  517. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
  518. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +12 -12
  519. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
  520. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
  521. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
  522. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
  523. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
  524. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
  525. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
  526. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
  527. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
  528. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
  529. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
  530. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
  531. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
  532. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
  533. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
  534. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
  535. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
  536. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
  537. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
  538. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
  539. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
  540. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
  541. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
  542. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
  543. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
  544. package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
  545. package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
  546. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
  547. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
  548. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
  549. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
  550. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
  551. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
  552. package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
  553. package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
  554. package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
  555. package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
  556. package/dist/esm/queue/job-consumer.backend.service.js +1 -4
  557. package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
  558. package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
  559. package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
  560. package/dist/esm/queue/job-executor.backend.service.js +1 -4
  561. package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
  562. package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
  563. package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
  564. package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
  565. package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
  566. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
  567. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
  568. package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
  569. package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
  570. package/dist/esm/queue/queue.backend.service.d.ts +3 -3
  571. package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
  572. package/dist/esm/queue/queue.backend.service.js +26 -4
  573. package/dist/esm/queue/queue.backend.service.js.map +1 -1
  574. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
  575. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
  576. package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
  577. package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
  578. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
  579. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
  580. package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
  581. package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
  582. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
  583. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
  584. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
  585. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
  586. package/dist/esm/requests/service/websocket.service.d.ts +9 -0
  587. package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
  588. package/dist/esm/requests/service/websocket.service.js +32 -8
  589. package/dist/esm/requests/service/websocket.service.js.map +1 -1
  590. package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
  591. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +14 -2
  592. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
  593. package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
  594. package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
  595. package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
  596. package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
  597. package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
  598. package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
  599. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
  600. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
  601. package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
  602. package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
  603. package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
  604. package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
  605. package/dist/esm/resources/services/resources-registry.backend.service.js +90 -6
  606. package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
  607. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
  608. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
  609. package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
  610. package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
  611. package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
  612. package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
  613. package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
  614. package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
  615. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
  616. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
  617. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
  618. package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
  619. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  620. package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
  621. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  622. package/dist/esm/runtime/services/start-application.backend.service.d.ts +19 -1
  623. package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
  624. package/dist/esm/runtime/services/start-application.backend.service.js +261 -77
  625. package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
  626. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
  627. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
  628. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
  629. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
  630. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
  631. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
  632. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
  633. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
  634. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
  635. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
  636. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
  637. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
  638. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
  639. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
  640. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
  641. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
  642. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
  643. package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
  644. package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
  645. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
  646. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
  647. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
  648. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
  649. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
  650. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
  651. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
  652. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
  653. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
  654. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
  655. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
  656. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
  657. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
  658. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
  659. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
  660. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
  661. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
  662. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
  663. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
  664. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
  665. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
  666. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
  667. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
  668. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
  669. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +68 -1
  670. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
  671. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
  672. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
  673. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
  674. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
  675. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
  676. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
  677. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
  678. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
  679. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
  680. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
  681. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
  682. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
  683. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
  684. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
  685. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +17 -1
  686. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
  687. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +49 -17
  688. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
  689. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
  690. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
  691. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
  692. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
  693. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
  694. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
  695. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
  696. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
  697. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
  698. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
  699. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
  700. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
  701. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
  702. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
  703. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
  704. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
  705. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
  706. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
  707. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
  708. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
  709. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
  711. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
  712. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
  713. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
  715. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
  716. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
  717. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
  718. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
  719. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
  721. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
  722. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
  723. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
  725. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
  726. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
  727. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
  729. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
  730. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
  731. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
  732. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
  733. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
  734. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
  735. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
  736. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
  737. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
  738. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
  739. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
  740. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
  741. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
  742. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
  743. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
  744. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
  745. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
  746. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
  747. package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
  748. package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
  749. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
  750. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
  751. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
  752. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
  753. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +74 -8
  754. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
  755. package/dist/esm/security/authorizations/services/authorizations.backend.service.js +175 -19
  756. package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
  757. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
  758. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  759. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
  760. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  761. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
  762. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
  763. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
  764. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
  765. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
  766. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
  767. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
  768. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
  769. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
  770. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
  771. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
  772. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
  773. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
  774. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
  775. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
  776. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
  777. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
  778. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
  779. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
  780. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
  781. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
  782. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  783. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
  784. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
  785. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
  786. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
  787. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
  788. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
  789. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
  790. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
  791. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
  792. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
  793. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
  794. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
  795. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
  796. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
  797. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
  798. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
  799. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
  800. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
  801. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
  802. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  803. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
  804. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
  805. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
  806. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
  807. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
  808. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
  809. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
  810. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
  811. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
  812. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
  813. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
  814. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
  815. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
  816. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
  817. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +21 -3
  818. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
  819. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +26 -16
  820. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
  821. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
  822. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
  823. package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
  824. package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
  825. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
  826. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
  827. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
  828. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
  829. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
  830. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  831. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
  832. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  833. package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
  834. package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
  835. package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
  836. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
  837. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
  838. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
  839. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
  840. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
  841. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
  842. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
  843. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
  844. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
  845. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
  846. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
  847. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
  848. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
  849. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
  850. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
  851. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
  852. package/dist/tsconfig.build.tsbuildinfo +1 -1
  853. package/package.json +11 -9
@@ -1 +1 @@
1
- {"version":3,"file":"application-startup-config-validator.backend.service.js","sourceRoot":"","sources":["../../../../../src/config/services/application-startup-config-validator.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EACL,UAAU,EACV,SAAS,EACT,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAE9B,mBAAmB,EACnB,gCAAgC,EAChC,+CAA+C,EAC/C,qBAAqB,EAIrB,6BAA6B,EAC7B,+BAA+B,EA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,EAAE,CAAA;IAEV,YAAA,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA;IACpD,YAAA,QAAQ,EAAE,CAAA;IAEV,YAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,YAAA,QAAQ,EAAE,CAAA;IAOV,YAAA,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAA;IACzC,YAAA,QAAQ,EAAE,CAAA;qCA1CiD,aAAa;QACM,0BAA0B;QAE7D,uCAAuC;QAE7C,0BAA0B;QAE5B,+BAA+B;QAE9B,gCAAgC;QAEjC,+BAA+B;QAEnC,2BAA2B;QAE7B,yBAAyB;GAnB9C,wCAAwC,CA47DpD","sourcesContent":["import { inject, injectable, optional } from 'inversify';\nimport {\n AuthMethod,\n AuthUtils,\n CoreUserNotificationChannel,\n EmailTemplateType,\n ErrorCustomMessageReference,\n ErrorType,\n FlowsActors_Agent_Status,\n OrganizationNameSource,\n RegistrationAcquisitionChannel,\n RegistrationMode,\n isWildoBackendError,\n isRegistrationAcquisitionAllowed,\n findOrganizationTypeRegistrationCreationMatches,\n ClientInstanceIdScope,\n type AppConfiguration_Shared_Auth,\n type ConfigurationValidationIssue,\n type ConfigurationValidationResult,\n ConfigurationValidationDomain,\n ConfigurationValidationSeverity,\n PersistenceAdapter,\n buildValidationResult,\n isApiCallOperation,\n isApiCallWithCallbackOperation,\n issueError,\n issueWarning,\n isCodingAgentConfiguration,\n type FlowsActors_Agent_CodingConfiguration,\n} from '@wildo-ai/saas-models';\nimport {\n APPLICATION_ENVIRONMENT,\n AgentClientProtocol_AuthMode,\n ExternalProvider_ExchangeProtocol_Kind,\n type LLMProvider_OperationKey,\n} from '@wildo-ai/external-connectors-models';\nimport { FileGenerationSource, FileStorageAccepted } from '@wildo-ai/zod-decorators';\nimport type {\n AppConfiguration,\n} from '~wildo-backend-lib/config/models/app-config.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { ExternalProvidersRegistryBackendService } from '~wildo-backend-lib/external-providers/services/external-providers-registry.backend.service';\nimport { FlowsActorsRegistryService } from '~wildo-backend-lib/flows-actors/services/flows-actors-registry.service';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { FileFieldDetectionBackendService } from '~wildo-backend-lib/files/services/file-field-detection.backend.service';\nimport { FileStorageRouterBackendService } from '~wildo-backend-lib/files/storage/file-storage-router.backend.service';\nimport { ClamAVScannerBackendService } from '~wildo-backend-lib/files/scanning/clamav-scanner.backend.service';\nimport { YaraScannerBackendService } from '~wildo-backend-lib/files/scanning/yara-scanner.backend.service';\nimport { isEnabledSocialOAuth2LoginProvider } from '~wildo-backend-lib/security/authentications/utils/social-oauth2-purpose.backend.utils';\nimport {\n isPublicInvitationPasswordCredentialReachable,\n} from '~wildo-backend-lib/security/authentications/services/utils/auth-policy-resolution.backend.utils';\nimport type {\n EmailTemplateRegistryBackendService,\n} from '~wildo-backend-lib/notifications/email/services/email-template-registry.backend.service';\nimport {\n buildUserNotificationEmailTemplateRef,\n} from '~wildo-backend-lib/notifications/services/notifications-dispatcher.backend.service';\nimport type {\n ResourceOperationCustomImplementationRegistryBackendService,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service';\nimport type {\n ResourcePersistenceUnitOfWorkBackendService,\n ResourcePersistenceUnitOfWorkRequest,\n} from '~wildo-backend-lib/databases/services/resource-persistence-unit-of-work.backend.service';\nimport {\n createResourceWritePersistenceRequest,\n resolveResourceOperationTransactionPersistenceContract,\n ResourceWriteFileParticipation,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-transaction-persistence.backend.utils';\nimport {\n ResourceOperationImplementationCoverage,\n ResourceOperationRequestContractBreadth,\n getPersistedFieldNames,\n resolveResourceOperationImplementationCoverage,\n resolveResourceOperationRequestContractBreadth,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-implementation-coverage.backend.utils';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { resolvePersistenceAdapterForConfiguration } from '~wildo-backend-lib/databases/models/resolve-persistence-adapter.backend.utils';\nimport type { PostgreSQLDatabaseBackendService } from '~wildo-backend-lib/databases/services/postgresql-database.backend.service';\nimport type { MongoDBService } from '~wildo-backend-lib/databases/services/mongodb.service';\nimport type { RagSourceFieldDetectionBackendService } from '~wildo-backend-lib/files/services/rag-source-field-detection.backend.service';\nimport type { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport {\n MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE,\n RagChunkStoreHosting,\n resolveRagChunkStoreHosting,\n} from '~wildo-backend-lib/rag/models/rag-chunk-store.backend.types';\nimport { collectResourceRetentionPolicies } from '~wildo-backend-lib/resources/utils/resource-retention.backend.utils';\nimport {\n APPLICATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n APPLICATION_USER_CREATION_UNIT_OF_WORK,\n createAuthenticatedInvitationAcceptancePersistenceRequest,\n createDeferredOrganizationOnboardingPersistenceRequest,\n createPublicInvitationAcceptancePersistenceRequest,\n createSelfRegistrationPersistenceRequest,\n ORGANIZATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n ORGANIZATION_USER_CREATION_UNIT_OF_WORK,\n SOCIAL_EXISTING_USER_LINK_UNIT_OF_WORK,\n SOCIAL_INVITATION_ACCEPTANCE_UNIT_OF_WORK,\n SOCIAL_USER_CREATION_UNIT_OF_WORK,\n} from '~wildo-backend-lib/security/authentications/models/identity-persistence-boundaries.backend';\n\n/**\n * Startup-only governance rules for application configuration.\n *\n * Two phases:\n *\n * 1. `validate(config)` — pre-registry checks on the raw AppConfiguration\n * (auth consistency, frontend service bindings, etc.)\n *\n * 2. `validateInitializedRuntimeContracts()` — post-registry cross-checks\n * that need the fully resolved registry (z_file() vs storage providers,\n * CLI-runtime agents, etc.). Uses the collector pattern: each validator\n * returns `ConfigurationValidationIssue[]`, the runner consolidates,\n * logs warnings, and throws on errors.\n *\n * Frontend will adopt the same `ConfigurationValidationIssue` contract\n * for its own post-registry checks (feature gating, launcher coherence, etc.).\n */\n@injectable()\nexport class ApplicationStartupConfigValidatorService {\n private logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService)\n private readonly externalProvidersRegistry: ExternalProvidersRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.FlowsActorsRegistryService)\n private readonly flowsActorsRegistry: FlowsActorsRegistryService,\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService)\n private readonly resourcesRegistry: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FileStorageRouter)\n private readonly fileStorageRouter: FileStorageRouterBackendService,\n @inject(SAAS_SERVICE_TYPES.ClamAVScannerService)\n private readonly clamavScanner: ClamAVScannerBackendService,\n @inject(SAAS_SERVICE_TYPES.YaraScannerService)\n private readonly yaraScanner: YaraScannerBackendService,\n @inject(SAAS_SERVICE_TYPES.EmailTemplateRegistry)\n private readonly emailTemplateRegistry: EmailTemplateRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceOperationCustomImplementationRegistryService)\n private readonly customImplRegistry: ResourceOperationCustomImplementationRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourcePersistenceUnitOfWorkService)\n @optional()\n private readonly resourcePersistenceUnitOfWork?:\n ResourcePersistenceUnitOfWorkBackendService,\n // RAG capability probe dependencies (appended LAST + optional: this constructor is invoked\n // POSITIONALLY in tests). Absent detection ⇒ the probe cannot see `.ragSource()` declarations\n // and no-ops — acceptable only because the real container always binds it.\n @inject(SAAS_SERVICE_TYPES.RagSourceFieldDetectionService)\n @optional()\n private readonly ragSourceFieldDetection?: RagSourceFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.PostgreSQLDatabaseService)\n @optional()\n private readonly postgreSQLDatabaseService?: PostgreSQLDatabaseBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n @optional()\n private readonly appConfigService?: AppConfigurationService,\n /**\n * The MongoDB half of the same probe (Phase 6). Appended LAST for the reason the block above\n * states: this constructor is invoked POSITIONALLY in tests, so a parameter inserted beside its\n * PostgreSQL sibling would silently shift every later argument into the wrong slot.\n */\n @inject(SAAS_SERVICE_TYPES.MongoDBService)\n @optional()\n private readonly mongoDBService?: MongoDBService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationStartupConfigValidatorService');\n }\n\n // ─────────────────────────────────────────────────────────────────────────\n // Phase 1: pre-registry config checks\n // ─────────────────────────────────────────────────────────────────────────\n\n public validate(config: AppConfiguration): void {\n this.assertNoRemovedGlobalAuthFields(config.auth);\n this.validateFrontendServiceRuntimeBindings(config);\n this.validateUserTypeAuthConsistency(config);\n this.validateAuditTrailArchivalFloor(config);\n this.warnOnMultipleDefaultUserTypes(config);\n this.warnOnDuplicateClaimedDomains(config);\n this.warnOnBroadAutoLinkSocialOAuth2(config);\n this.warnOnClientInstanceIdentificationEnabled(config);\n }\n\n /**\n * Warn when the application has opted into CLIENT-INSTALL identification\n * (`compliance.clientInstanceIdScope !== DISABLED`), naming the obligations that opt-in creates.\n *\n * **Why a startup warning and not silence.** `clientInstanceId` is a pseudonymous identifier stored on the\n * user's terminal equipment, so selecting `SESSION`/`PERSISTENT` engages ePrivacy Art 5(3) and creates\n * paperwork the framework cannot do on the application's behalf — a recorded legitimate-interest\n * assessment, and a decision about whether an erasure request scrubs the identifier from retained audit\n * evidence. Those are documented as owed, but a documented obligation with no mechanical firing pin is one\n * forgotten session away from drift, which is exactly the failure mode\n * `.claude/rules/capability-catalog-integration.md` names. This is that firing pin: the application cannot\n * turn the capability on without the reason it must act appearing in its own boot log.\n *\n * WARN, never ERROR: opting in is a legitimate, deliberate choice, and refusing to boot over an\n * app-authored privacy posture would be the framework overriding the controller's decision.\n *\n * assurance-control: WILDO.PRIVACY.DATA_MINIMIZATION — surfaces the compliance obligations attached to\n * collecting a device-stored pseudonymous identifier at the moment the collection is enabled.\n */\n private warnOnClientInstanceIdentificationEnabled(config: AppConfiguration): void {\n const scope = config.compliance?.clientInstanceIdScope;\n if (scope === undefined || scope === ClientInstanceIdScope.DISABLED) {\n return; // The default posture — nothing is collected, nothing is owed.\n }\n\n this.logger.warn(\n `[compliance] Client-install identification is ENABLED (compliance.clientInstanceIdScope='${scope}'). `\n + 'Every request may now carry an `x-client-instance-id` that is recorded on audit rows and forwarded to '\n + 'the SIEM — a pseudonymous identifier under GDPR Art 4(5), stored on the user\\'s device. Confirm with '\n + 'counsel that (1) a legitimate-interest assessment is recorded for this processing, (2) the storage is '\n + 'lawful in your jurisdiction (ePrivacy Art 5(3); consent may be required, and PERSISTENT is the harder '\n + 'case), (3) your privacy notice discloses it, and (4) your erasure procedure states whether the '\n + 'identifier is scrubbed from retained audit evidence. Set clientInstanceIdScope to DISABLED to opt out.',\n { clientInstanceIdScope: scope },\n );\n }\n\n /**\n * Production floor for the audit-log archival horizon\n * (`auditTrail.archiveAfterDays`). Audit records must remain in the primary\n * store for at least this many days before they become archival-eligible in\n * a staging/production environment. Mirrors the SSO `auditConfig.retentionDays`\n * default (365) as the compliance minimum.\n */\n private static readonly AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS = 365;\n\n /**\n * Enforce the production floor on `auditTrail.archiveAfterDays`.\n *\n * The schema-level `.min(1)` is the absolute floor; this raises it to\n * {@link AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS} outside development. It lives\n * here — a RUNTIME validator — rather than in a Zod `.superRefine()` on the\n * shared schema, because the environment gate reads `process.env.APPLICATION_ENV`,\n * a runtime signal a pure, environment-agnostic shared schema must not touch\n * (mirrors the env-gated `.superRefine` in `define-infra-env-config.ts`, which\n * only works there because THAT schema carries the environment as a field).\n *\n * Development is exempt (dev convenience — mirrors the infra `!isLocalEnvironmentId`\n * gate); staging + production enforce the floor. Archival is opt-in, so an\n * unset `archiveAfterDays` is always allowed (nothing to floor).\n */\n private validateAuditTrailArchivalFloor(config: AppConfiguration): void {\n const archiveAfterDays = config.auditTrail?.archiveAfterDays;\n if (archiveAfterDays === undefined) {\n return; // Archival opt-out — no horizon to floor.\n }\n\n const applicationEnv = (process.env.APPLICATION_ENV ?? APPLICATION_ENVIRONMENT.DEVELOPMENT) as APPLICATION_ENVIRONMENT;\n if (applicationEnv === APPLICATION_ENVIRONMENT.DEVELOPMENT) {\n return; // Development is exempt from the compliance floor.\n }\n\n const floor = ApplicationStartupConfigValidatorService.AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS;\n if (archiveAfterDays < floor) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `auditTrail.archiveAfterDays (${archiveAfterDays}) is below the production floor of ${floor} days ` +\n `in environment '${applicationEnv}'. Audit records must remain in the primary store for at least ` +\n `${floor} days before archival in staging/production. Set archiveAfterDays >= ${floor} ` +\n `(values below ${floor} are permitted only in development), or omit archiveAfterDays entirely ` +\n `to disable archival.`,\n archiveAfterDays,\n floorDays: floor,\n applicationEnv,\n },\n });\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────\n // Phase 2: post-registry cross-checks (collector pattern)\n // ─────────────────────────────────────────────────────────────────────────\n\n /**\n * Run all post-registry validators, collect issues, then report.\n *\n * To add a new cross-check:\n * 1. Write a private method returning `ConfigurationValidationIssue[]`\n * 2. Add its call to the `validators` array below\n * 3. The runner handles logging warnings and throwing on errors\n */\n /**\n * TIER 1 — DECLARATION-ONLY. Safe for ANY runtime that owns a resource registry.\n *\n * These read the resource DECLARATIONS and the infrastructure they name, and assert nothing about\n * whether the runtime implements those resources. A scheduler that registers core resources purely\n * so the controllers registry can initialize passes these, because it declares nothing it does not\n * honour.\n *\n * Classified by what each collector actually READS, not by its name — see\n * `collectImplementationBackedContractIssues` for why that distinction is load-bearing.\n */\n private collectDeclarationContractIssues(): (() => ConfigurationValidationIssue[])[] {\n return [\n // resources registry (file fields) + fileStorageRouter — do declared `z_file()` fields have a\n // provider that can actually store them?\n () => this.collectStorageIssues(),\n // resources registry only — is any operation's request contract wider than it declares?\n () => this.collectOverbroadResourceOperationRequestContractIssues(),\n ];\n }\n\n /**\n * TIER 2 — OPERATION-IMPLEMENTATION-BACKED. Only for a runtime that EXECUTES the operations it\n * registers.\n *\n * Every collector here cross-references the resource registry against the machinery that RUNS an\n * operation — `customImplRegistry` and the persistence unit of work. A runtime that registers\n * resources without implementing their operations fails all of them, and is not wrong to do so.\n *\n * Measured 2026-08-14: wiring these into `platform-crontabs-batches-manager` — a SCHEDULER that\n * registers the core resource set so `controllersRegistryService.initialize()` works, and\n * implements none of it — broke its boot with 83 `[LIFECYCLE] Operation 'organizations.…'` errors\n * from `collectUnimplementedResourceOperationIssues` alone. That is what proved a two-way split by\n * collector NAME was insufficient.\n */\n private collectImplementationBackedContractIssues(config?: AppConfiguration): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectResourceOperationTransactionContractIssues(),\n () => this.collectPersistenceBoundaryCompatibilityIssues(config),\n () => this.collectUnimplementedResourceOperationIssues(),\n () => this.collectResourceOperationAuthoritativeFieldIssues(),\n ];\n }\n\n /**\n * TIER 2N — NOTIFICATION-DELIVERY-BACKED. Only for a runtime that DELIVERS the notifications the\n * operations it registers declare.\n *\n * Split out of tier 2 on 2026-08-14 because \"implements the resources it registers\" turned out to\n * be TWO capabilities, not one, and the platform services hold exactly one of them. `platform-\n * apps-manager` and `platform-module-registry` DO execute core resource operations — they own\n * custom implementations and persistence — so tier 2 is correct for them. Neither DELIVERS an\n * application's user notifications: they register `organizationMembers` because the registry needs\n * the core set, and they ship none of its templates. Cross-referencing the resource registry\n * against `emailTemplateRegistry` therefore fails them on templates they are not the subject of.\n *\n * Measured: both crash-looped at boot on the same two ERRORs — the token-backed\n * `email.organizationMembers.create.user-self` and `…resend.user-self` — which are the only two\n * token-backed operations in the engine, hence the only two that escalate a missing template from\n * WARNING to ERROR (see `collectOperationEmailTemplateIssues`, where severity follows\n * `tokenGeneration`). The warning flood on the non-token-backed operations was harmless and is\n * what made the two fatal rows easy to miss in the log.\n *\n * Rejected alternative: moving this collector down to tier 3 (application FEATURES). Tier 3 reads\n * scanners, vector stores and provider config — optional product features. A declared operation\n * email is neither optional nor a feature: it is part of the operation's contract, and it must\n * stay adjacent to the tier that validates the rest of that contract for every runtime that does\n * own delivery.\n */\n private collectNotificationDeliveryContractIssues(): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectOperationEmailTemplateIssues(),\n ];\n }\n\n /**\n * TIER 3 — APPLICATION FEATURES. Only for an application runtime.\n *\n * Each validates an optional product feature a platform service does not own: virus scanning,\n * YARA rules, organization-registration policy, CLI runtime agents. They read\n * scanners, provider registries and config — not the resource contract.\n *\n * NOTE: the Weaviate-era RAG collector (`collectRAGIssues`) that used to run in this tier was\n * deleted with the Weaviate lane on 2026-08-26. Its fail-closed successor is\n * {@link validateInitializedRagStoreCapability} — ASYNC (it executes a probe on the live\n * database), so it runs as its own startup step beside the transaction-readiness proof rather\n * than inside these sync collector tiers.\n */\n private collectApplicationFeatureIssues(config?: AppConfiguration): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectScanningIssues(),\n () => this.collectYaraIssues(),\n () => this.collectOrganizationRegistrationCreationPolicyIssues(config),\n () => this.collectCodingAgentIssues(),\n ];\n }\n\n private runCollectors(collectors: (() => ConfigurationValidationIssue[])[]): ConfigurationValidationResult {\n const allIssues: ConfigurationValidationIssue[] = [];\n for (const collector of collectors) {\n allIssues.push(...collector());\n }\n const result = buildValidationResult(allIssues);\n this.reportValidationResult(result);\n return result;\n }\n\n /** Application runtimes: every tier. Unchanged behaviour — an application both executes its\n * operations and delivers their notifications, so it is the one runtime that owns all of them. */\n public validateInitializedRuntimeContracts(config?: AppConfiguration): ConfigurationValidationResult {\n this.resourcesRegistry.validateInitializedPersistenceAdapterConfiguration();\n return this.runCollectors([\n ...this.collectDeclarationContractIssues(),\n ...this.collectImplementationBackedContractIssues(config),\n ...this.collectNotificationDeliveryContractIssues(),\n ...this.collectApplicationFeatureIssues(config),\n ]);\n }\n\n /**\n * Platform services that IMPLEMENT the resources they register — the module registry, apps-manager.\n *\n * Tiers 1+2, and deliberately NOT tier 2N. Exists because `resolveApplicationConfigForStartup`\n * returns `undefined` unconditionally for `isPlatformApplication: true`, so the shared startup\n * skips post-registry validation entirely for every platform service — including\n * `collectStorageIssues()`, which is exactly the check that cross-references `z_file()` resources\n * against configured providers.\n *\n * A platform service EXECUTES core resource operations but DELIVERS none of their user\n * notifications, so `collectNotificationDeliveryContractIssues()` is excluded — see its JSDoc for\n * the boot failure that established the split.\n */\n public validateInitializedPlatformRuntimeContracts(config?: AppConfiguration): ConfigurationValidationResult {\n return this.runCollectors([\n ...this.collectDeclarationContractIssues(),\n ...this.collectImplementationBackedContractIssues(config),\n ]);\n }\n\n /**\n * Runtimes that REGISTER resources without implementing them — a scheduler, a companion, any\n * service initializing a registry only so another registry can start.\n *\n * Tier 1 only. Gives such a runtime the storage and declaration-shape guarantees while asserting\n * nothing about implementations it was never meant to provide.\n */\n public validateInitializedDeclarationContracts(): ConfigurationValidationResult {\n return this.runCollectors(this.collectDeclarationContractIssues());\n }\n\n\n /**\n * Prove that every adapter selected by an authored transaction-requiring\n * boundary can actually start, execute, and commit a native transaction.\n *\n * Adapter compatibility alone cannot distinguish a MongoDB replica set from\n * a standalone server. The adapter-owned probe executes a read-only command\n * inside the transaction; an empty callback would not start a MongoDB server\n * transaction. Probes are deduplicated to one request per selected adapter.\n * No controller is initialized until they succeed.\n */\n public async validateInitializedRuntimeTransactionReadiness(config: AppConfiguration): Promise<void> {\n if (!this.resourcePersistenceUnitOfWork) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'ResourcePersistenceUnitOfWorkService is unavailable during initialized runtime validation',\n reason: 'resource_persistence_unit_of_work_service_unavailable',\n },\n },\n );\n }\n\n const firstRequestByAdapter = new Map<\n string,\n ResourcePersistenceUnitOfWorkRequest\n >();\n for (\n const request\n of this.collectTransactionReadinessPersistenceRequests(config)\n ) {\n const assessment = this.resourcePersistenceUnitOfWork.assessCompatibility(request);\n if (!assessment.compatible) {\n // Preserve one canonical compatibility failure instead of silently\n // omitting an authored transaction boundary from readiness proof.\n await this.resourcePersistenceUnitOfWork\n .verifyTransactionReadiness(request);\n }\n if (assessment.compatible && assessment.selectedAdapter !== undefined\n && !firstRequestByAdapter.has(assessment.selectedAdapter)\n ) {\n firstRequestByAdapter.set(assessment.selectedAdapter, request);\n }\n }\n\n for (const [adapter, request] of firstRequestByAdapter) {\n try {\n await this.resourcePersistenceUnitOfWork\n .verifyTransactionReadiness(request);\n } catch (error) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Persistence adapter '${adapter}' cannot commit the native `\n + `transaction required by boundary '${request.boundary}'`,\n reason: 'persistence_transaction_readiness_probe_failed',\n adapter,\n boundary: request.boundary,\n originalError: error instanceof Error\n ? error.message\n : String(error),\n },\n },\n );\n }\n }\n }\n\n /**\n * RAG store capability probe — the fail-closed successor of the Weaviate-era `collectRAGIssues`\n * (plan `.claude/plans/resource-rag-capability.md`, M6 carry-over).\n *\n * For every registered resource that declares `.ragSource()` fields, two refusals:\n *\n * - **row retention × RAG source** → ERROR, before any store question is asked. See\n * {@link collectRagSourceRetentionRefusal}: DL3 enforced at RESOURCE level, which is the tier\n * the risk lives on (the `.ttl()` field and the `.ragSource()` field are ordinarily different\n * fields of the same row, so the decorator-level companion refusal cannot see the pair).\n *\n * …then prove the datastore its chunks would live in (D1: the resource's OWN persistence adapter)\n * can actually hold them:\n *\n * - **PostgreSQL** → EXECUTE a pgvector expression (`select '[1]'::vector`) on the live\n * connection. Executed rather than inferred from catalogs or config, per the toolchain rule\n * (\"verify a toolchain claim by executing it\") — a `pg_extension` row proves installation, not\n * that the type works on THIS connection's search path.\n * - **MongoDB** → ERROR unconditionally: the Mongo chunk store is gated on the 8.2 + mongot infra\n * bump ({@link MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}).\n *\n * Fail-closed ERROR (never a warning), because the failure mode is not a degraded feature: an\n * application that has already WRITTEN chunk rows and then lost its store cannot honour an erasure\n * — the chunks hold copies of subject text that no removal seam can reach. Refusing to boot is the\n * only posture under which that dead-end cannot silently accumulate.\n *\n * An application with NO `.ragSource()` fields probes nothing and passes — the probe must never\n * force a database connection an application does not use.\n *\n * Async and separate from the sync collector tiers for the same reason as\n * {@link validateInitializedRuntimeTransactionReadiness}: it talks to a live database.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies would be unreachable by the erasure seams.\n */\n public async validateInitializedRagStoreCapability(): Promise<void> {\n const issues = await this.collectRagStoreCapabilityIssues();\n this.reportValidationResult(buildValidationResult(issues));\n }\n\n private async collectRagStoreCapabilityIssues(): Promise<ConfigurationValidationIssue[]> {\n if (!this.ragSourceFieldDetection) {\n // No detection service bound (minimal harness) — nothing can be asserted either way.\n return [];\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n const ragResourcesByAdapter = new Map<string, string[]>();\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n let hasRagFields: boolean;\n try {\n hasRagFields = this.ragSourceFieldDetection.hasRagSourceFields(resourceType);\n } catch (error) {\n // Detection itself refusing (incompatible/unsupported `.ragSource()` declarations) is a\n // configuration defect in its own right — surface it as this probe's ERROR rather than\n // letting an unrelated later consumer be the first to trip over it.\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `RAG source-field detection failed for resource '${String(resourceType)}': ${describeCaughtError(error)}`,\n { resourceType: String(resourceType) },\n ));\n continue;\n }\n if (!hasRagFields) continue;\n\n const resourceConfiguration = this.resourcesRegistry.tryGetResourceConfiguration(resourceType);\n\n const retentionIssue = this.collectRagSourceRetentionRefusal(resourceType, resourceConfiguration);\n if (retentionIssue) {\n issues.push(retentionIssue);\n // Already refused — do not also probe its store. The application will not boot either way,\n // and one precise diagnostic beats two that name the same resource for different reasons.\n continue;\n }\n\n const declaredAdapter = resourceConfiguration?.persistenceAdapter;\n const adapter = resolvePersistenceAdapterForConfiguration(declaredAdapter, this.appConfigService);\n const existing = ragResourcesByAdapter.get(adapter) ?? [];\n existing.push(String(resourceType));\n ragResourcesByAdapter.set(adapter, existing);\n }\n\n if (ragResourcesByAdapter.size === 0) {\n return issues;\n }\n\n for (const [adapter, resourceTypes] of ragResourcesByAdapter) {\n /**\n * Classified through the SAME total map the routing store uses\n * (`RAG_CHUNK_STORE_HOSTING_BY_ADAPTER`), so the boot refusal and the runtime refusal cannot\n * disagree about which adapters can hold chunks — and so a NEW adapter is a compile error at\n * that map rather than a silent arrival in the \"unrecognised\" branch here, where it would be\n * reported as a typo instead of as a capability decision.\n */\n const hosting = resolveRagChunkStoreHosting(adapter);\n if (hosting === undefined) {\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on unrecognised persistence adapter `\n + `'${adapter}' — no RAG chunk store exists for it.`,\n { resourceTypes, adapter },\n ));\n continue;\n }\n switch (hosting) {\n case RagChunkStoreHosting.POSTGRESQL:\n issues.push(...await this.probePostgresVectorCapability(resourceTypes));\n break;\n case RagChunkStoreHosting.MONGODB:\n issues.push(...await this.probeMongodbSearchCapability(resourceTypes));\n break;\n case RagChunkStoreHosting.NONE:\n // A DECLARED adapter with no chunk store — there is nothing to PROBE, and that is the\n // point: the refusal is about the adapter's nature, not about a reachable dependency.\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on persistence adapter `\n + `'${adapter}', which cannot host chunk rows. A chunk store holds COPIES of field text that every `\n + 'removal seam must be able to delete, and this adapter owns no local rows to delete — so chunks '\n + 'derived from these resources would be unreachable by every erasure path. Remove the .ragSource() '\n + 'declarations, or move these resources to a PostgreSQL- or MongoDB-backed adapter.'\n /*\n * HTTP_API earns one extra sentence, and it is guidance rather than a second refusal.\n *\n * The generic text above says what is wrong; for a READ-THROUGH resource it stops one step short\n * of what to do instead, and \"move it to a PostgreSQL-backed adapter\" is not the answer — the\n * whole point of the resource is that its rows live elsewhere. RAG over remote content is designed\n * to ride a locally MATERIALIZED copy, where every existing RAG mechanism applies unchanged.\n *\n * Appended to the ONE typed refusal rather than restored as a separate `if (adapter ===\n * HTTP_API)` branch: the adapter→hosting map is the single place that decision belongs, and a\n * second branch beside it would be a second answer to the same question.\n */\n + (adapter === PersistenceAdapter.HTTP_API\n ? ' This resource is read-through: it has no local write path for ingestion, no local rows for the '\n + 'reconciliation sweep to enumerate, and no local rows for the erasure seams to key chunk removal to. '\n + 'RAG over remote content arrives with partial-resource coverage, where the declared field is a locally '\n + 'MATERIALIZED copy of the remote field and the ordinary RAG machinery applies '\n + '(partial-resource-coverage paper).'\n : ''),\n { resourceTypes, adapter },\n ));\n break;\n }\n }\n\n return issues;\n }\n\n /**\n * DL3 at the tier the risk actually lives on: a resource that declares BOTH a `.ttl()` field and\n * a `.ragSource()` field is refused, whichever fields they are.\n *\n * ## Why the field-level decorator refusal was not enough (corrected 2026-08-27)\n *\n * `RAG_SOURCE_REFUSED_COMPANIONS` in `zod.module-override.ts` refuses `.ttl()` and `.ragSource()`\n * on the SAME field, and four documents recorded that as closing DL3. It does not, because the\n * two decorators essentially cannot meet there: `.ttl()`'s applicable types are\n * `['ZodDate','ZodOptional']` and `.ragSource()`'s are `['ZodString','ZodOptional','ZodNullable','ZodDefault']`.\n * The reachable configuration is the ORDINARY one —\n *\n * expiresAt: z.date().ttl({ expireAfterSeconds: 0 }),\n * notes: z.string().ragSource(),\n *\n * — two different fields of one resource, which the field-level check cannot see. **A Mongo TTL\n * index deletes the WHOLE DOCUMENT** (`hasTtl` → `expires` in the Mongoose convertor) with zero\n * application code running: no hook, no cascade, no post-commit effect, so the row's chunks —\n * copies of its text — survive it permanently. The risk is scoped to the ROW; the refusal was\n * scoped to the FIELD.\n *\n * On PostgreSQL `.ttl()` renders only a `comment on column` and the framework retention sweep\n * performs the deletes, which DOES call the chunk-removal seam. So today's exposure is\n * MongoDB-only and is additionally masked by the Mongo arm below refusing every Mongo-backed\n * `.ragSource()` resource pending {@link MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}. That masking is\n * exactly why this is worth fixing now: it opens the day the Mongo adapter lands, in a change\n * whose author will have no reason to re-derive this reasoning.\n *\n * ## Why THIS enforcement point, and what was rejected\n *\n * **Chosen: the startup capability probe.** It is the earliest point that can ask BOTH existing\n * authorities — `collectRagSourceFieldSchemaMetadata` (through the detection service, cached) and\n * `collectResourceRetentionPolicies` — rather than re-deriving either, and it already walks every\n * registered resource. Its refusal is fail-closed at boot, before any process serves traffic or\n * runs a batch.\n *\n * **Rejected: `validateDecoratorCombinations` in the resource-configuration factory**\n * (`resources-config.shared.factory.ts`), which is genuinely earlier — module load — and is where\n * this repository's other resource-level decorator refusals live. It cannot reach either\n * authority: both live in `saas-backend-lib`, and the factory is in `saas-models`, which\n * `saas-backend-lib` depends ON. A factory check would therefore need a THIRD derivation of\n * \"which fields declare a RAG source\", and the only cheap form available there — `getRagSourceConfig`\n * over the top-level `getZodObjectShape`, the shape every neighbouring check in that function\n * uses — is TOP-LEVEL ONLY. It would miss a nested declaration (`profile.bio`), i.e. under-detect,\n * i.e. fail OPEN in a refusal. Moving the walker into `saas-models` would fix that and is the\n * right long-term shape, but it is a public-entrypoint reshape touching every RAG consumer, not\n * a fix to this finding.\n *\n * The field-level refusal is KEPT — it is cheap, correct, and catches the one configuration this\n * check would only report at boot rather than at authoring time.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies could outlive the row they were derived from, unreachably.\n */\n private collectRagSourceRetentionRefusal(\n resourceType: string,\n resourceConfiguration: { mainSchema?: unknown } | undefined,\n ): ConfigurationValidationIssue | undefined {\n const mainSchema = resourceConfiguration?.mainSchema;\n if (!mainSchema) return undefined;\n\n const policies = collectResourceRetentionPolicies(mainSchema as never);\n if (policies.length === 0) return undefined;\n\n const ragFieldNames = this.ragSourceFieldDetection\n ? this.ragSourceFieldDetection.detectRagSourceFields(resourceType as never).map((field) => field.fieldName)\n : [];\n\n return issueError(\n ConfigurationValidationDomain.RAG,\n `Resource '${String(resourceType)}' declares BOTH row retention (.ttl() on `\n + `[${policies.map((policy) => policy.fieldName).join(', ')}]) and RAG source fields `\n + `([${ragFieldNames.join(', ')}]). Refused (plan resource-rag-capability DL3): a store that expires rows `\n + 'NATIVELY — MongoDB\\'s TTL monitor deletes the whole document — runs no application code, so no hook, '\n + 'cascade or post-commit effect can remove the derived chunks, and they keep serving copies of the '\n + 'expired row\\'s text forever. Note the refusal is at RESOURCE level because the risk is: the .ttl() '\n + 'field and the .ragSource() field are ordinarily DIFFERENT fields of the same row. '\n + 'Remove the .ragSource() declarations, or drop the .ttl() and let the framework retention sweep '\n + 'perform the deletes (it calls the chunk-removal seam). '\n + 'THE DOOR: this refusal lifts when the backstop reconciliation sweep reconciles chunk sets against '\n + 'vanished parent rows, at which point natively-expired rows become a bounded serving window instead '\n + 'of a permanent leak.',\n { resourceType: String(resourceType), retentionFields: policies.map((policy) => policy.fieldName), ragSourceFields: ragFieldNames },\n );\n }\n\n /**\n * EXECUTE a search-index command on the live MongoDB connection — the `mongot` half of the RAG\n * store capability probe, and the sibling of {@link probePostgresVectorCapability}.\n *\n * ## Reachability is PROVEN, never inferred, and never dispatched on a brand\n *\n * `MongoDBService.verifySearchCapability` runs `$listSearchIndexes`, which `mongod` PROXIES to\n * `mongot`. A version string cannot answer this question: a MongoDB 8.2 server with search NOT\n * configured reports 8.2 truthfully and throws `SearchNotEnabled`; a configured-but-down `mongot`\n * reports the same version and fails as a connection error; and a Mongo-compatible managed service\n * reports a MongoDB version it did not implement. This is the toolchain baseline's rule (\"verify a\n * claim by executing it\") applied to a second process rather than to a compiler.\n *\n * `aws-documentdb` — the documented managed Mongo-compatible backing service — cannot run\n * `mongot` and therefore fails this probe NATURALLY, on the same command, for the same reason a\n * mis-configured self-managed deployment does. There is deliberately no provider-name check: that\n * would be a second, hand-maintained list of which products have search, wrong the day one of them\n * gains it and silently wrong the day a self-managed deployment loses its sidecar.\n *\n * Fail-closed ERROR for the same reason as the PostgreSQL arm: an application that has already\n * WRITTEN chunk documents and then lost its store cannot honour an erasure, because the chunks\n * hold copies of subject text that no removal seam can reach.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies would be unreachable by the erasure seams.\n */\n private async probeMongodbSearchCapability(resourceTypes: string[]): Promise<ConfigurationValidationIssue[]> {\n if (!this.mongoDBService) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on MongoDB-backed storage, but no `\n + 'MongoDB database service is bound in this container — their chunk store would be unreachable, which '\n + 'is an erasure dead-end the moment a chunk document exists.',\n { resourceTypes },\n )];\n }\n try {\n await this.mongoDBService.verifySearchCapability();\n return [];\n } catch (error) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on MongoDB-backed storage, but the `\n + 'MongoDB Search capability probe FAILED on the live connection '\n + `($listSearchIndexes → ${describeCaughtError(error)}). `\n + 'RAG on MongoDB is served by native $vectorSearch/$search, which require MongoDB 8.2 or later WITH the '\n + 'separate `mongot` process configured and reachable (it mirrors the collection through change streams). '\n + 'Configure a search-capable deployment, move these resources to PostgreSQL, or remove the .ragSource() '\n + `declarations. Note a Mongo-COMPATIBLE managed service (aws-documentdb) cannot run mongot and will always `\n + `fail this probe. Fail-closed: if this application has already written chunk documents, a store that `\n + `stopped answering is an erasure dead-end, so booting without it would let unreachable copies of subject `\n + `text accumulate. Background: ${MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}.`,\n { resourceTypes },\n )];\n }\n }\n\n /** EXECUTE a pgvector expression on the live PostgreSQL connection (see the probe's JSDoc). */\n private async probePostgresVectorCapability(resourceTypes: string[]): Promise<ConfigurationValidationIssue[]> {\n if (!this.postgreSQLDatabaseService) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on PostgreSQL-backed storage, but no `\n + 'PostgreSQL database service is bound in this container — their chunk store would be unreachable, which '\n + 'is an erasure dead-end the moment a chunk row exists.',\n { resourceTypes },\n )];\n }\n try {\n await this.postgreSQLDatabaseService.verifyVectorCapability();\n return [];\n } catch (error) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on PostgreSQL-backed storage, but the `\n + 'pgvector capability probe FAILED on the live connection '\n + `(select '[1]'::vector → ${describeCaughtError(error)}). `\n + 'The application database must have the pgvector extension available and created '\n + '(`CREATE EXTENSION IF NOT EXISTS vector` — provisioned per application database by the platform '\n + 'PostgreSQL manager; the baseline image is pgvector/pgvector:pg17). Fail-closed: if this application has '\n + 'already written chunk rows, a store that stopped answering is an erasure dead-end, so booting without it '\n + 'would let unreachable copies of subject text accumulate.',\n { resourceTypes },\n )];\n }\n }\n\n /**\n * Log warnings and throw a consolidated error if any ERROR-severity\n * issues were collected.\n */\n private reportValidationResult(result: ConfigurationValidationResult): void {\n const warnings = result.issues.filter((i) => i.severity === ConfigurationValidationSeverity.WARNING);\n const errors = result.issues.filter((i) => i.severity === ConfigurationValidationSeverity.ERROR);\n\n for (const warning of warnings) {\n this.logger.warn(`[${warning.domain}] ${warning.message}`, warning.context);\n }\n\n if (errors.length === 0) {\n if (warnings.length > 0) {\n this.logDebug(`Post-registry validation completed with ${warnings.length} warning(s)`);\n }\n return;\n }\n\n const errorMessages = errors.map((e) => ` [${e.domain}] ${e.message}`).join('\\n');\n\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Post-registry configuration validation failed with ${errors.length} error(s):\\n` +\n errorMessages,\n errorCount: errors.length,\n warningCount: warnings.length,\n domains: [...new Set(errors.map((e) => e.domain))],\n },\n });\n }\n\n private assertNoRemovedGlobalAuthFields(auth: AppConfiguration_Shared_Auth): void {\n const rawAuth = auth as Record<string, unknown> | undefined;\n const removedFields = [\n 'mfaPolicy',\n 'authMethodsEnabled',\n 'autoLinkByEmail',\n 'registration',\n 'passwordPolicy',\n 'methodManagement',\n 'sessionDurationMinutes',\n 'magicLink',\n 'smsOtp',\n ] as const;\n\n const foundDeprecated = removedFields.filter((field) => rawAuth && field in rawAuth);\n if (foundDeprecated.length === 0) {\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Deprecated auth config fields detected: ${foundDeprecated.join(', ')}. ` +\n `These fields were removed in W6.8. Migrate them to userTypes[typeName].auth.* ` +\n `(see entity-identity-config.shared.schemas.ts → UserTypeAuthPolicySchema). ` +\n `Remove them from your auth config and configure per-user-type auth policies instead.`,\n },\n });\n }\n\n private validateUserTypeAuthConsistency(config: AppConfiguration): void {\n const userTypes = config.userTypes ?? {};\n const frontendServices = config.frontendServices ?? {};\n\n for (const [typeName, typeDef] of Object.entries(userTypes)) {\n const typeAuth = (typeDef as Record<string, any>)?.auth;\n if (!typeAuth) {\n continue;\n }\n\n if (typeAuth.mfaPolicy?.requireMFA) {\n const secondFactorMethods = AuthUtils.getSecondFactorMethods();\n const hasEnabled = secondFactorMethods.some((method) => !!typeAuth.authMethodsEnabled?.[method]);\n if (!hasEnabled) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Config deadlock: userTypes.${typeName}.auth.mfaPolicy.requireMFA is true ` +\n `but no second-factor method is enabled in authMethodsEnabled. ` +\n `Enable at least one of: ${secondFactorMethods.join(', ')}`,\n },\n });\n }\n }\n\n const acceptableMethods = typeAuth.mfaPolicy?.acceptableMFAMethods ?? [];\n for (const method of acceptableMethods) {\n if (!typeAuth.authMethodsEnabled?.[method]) {\n this.logger.warn(\n `userTypes.${typeName}: acceptableMFAMethods includes '${method}' but it is not enabled in authMethodsEnabled`,\n );\n }\n // S0.1: a method that is INTRINSICALLY first-factor-only can never be a second factor, whatever the\n // app config says. `AUTH_METHOD_FACTOR_MAP` pins SSO redirect flows (ORG_SAML / ORG_OPENID_CONNECT /\n // EXTERNAL_OAUTH2) plus PASSWORD and MAGIC_LINK as FIRST_ONLY — SSO deliberately so, because an IdP\n // redirect is not an MFA ceremony (B-SEC-1). Listing one here is silently INERT at runtime:\n // `_getAvailableSecondFactorMethods` derives its candidates from `AuthUtils.getSecondFactorMethods()`\n // and uses `acceptableMFAMethods` only as a NARROWING filter, so such an entry can never add the\n // method — it can only subtract real ones. Warn so the author learns that instead of trusting a\n // second factor that was never in force.\n if (!AuthUtils.canBeSecondFactor(method)) {\n this.logger.warn(\n `userTypes.${typeName}: acceptableMFAMethods includes '${method}', which is ` +\n `${AuthUtils.getFactorType(method)} and can NEVER act as a second factor — the entry has no effect. ` +\n `Second-factor-capable methods are: ${AuthUtils.getSecondFactorMethods().join(', ')}.`,\n );\n }\n }\n\n // S0.1 (deadlock variant): the block above throws when requireMFA is set and NO second-factor method is\n // enabled at all. This is the same deadlock reached a different way — second factors ARE enabled, but\n // `acceptableMFAMethods` filters every one of them out (e.g. it lists only SSO methods, or only methods\n // left disabled). The runtime then resolves an EMPTY `usableSecondFactorMethods` while `requiresMFA`\n // stays true, and `_isAuthenticationComplete` refuses to complete a first-factor-only session forever:\n // every user of this type is locked out, and the MFA challenge screen can only render its `no_methods`\n // error. Fail at STARTUP with the same CONFIGURATION severity as the sibling deadlock rather than\n // letting it surface as an unexplained per-user lockout in production.\n if (typeAuth.mfaPolicy?.requireMFA && acceptableMethods.length > 0) {\n // The predicate must mirror `_resolveUsableMfaMethods` EXACTLY, including its final\n // `requireStrongMFA` step, or this validation gives false assurance. That step drops EMAIL_OTP from\n // the usable set, so `requireStrongMFA` + `acceptableMFAMethods:[EMAIL_OTP]` resolves to an empty\n // usable list at runtime even though EMAIL_OTP is both second-factor-capable AND enabled — the exact\n // lockout this check exists to prevent, reached by a third route. (EMAIL_OTP is the only method the\n // runtime strips; if that ever generalises to a \"weak methods\" set, generalise this alongside it.)\n const requireStrongMFA = !!typeAuth.mfaPolicy?.requireStrongMFA;\n const usableAcceptable = acceptableMethods.filter(\n (method: AuthMethod) =>\n AuthUtils.canBeSecondFactor(method)\n && !!typeAuth.authMethodsEnabled?.[method]\n && !(requireStrongMFA && method === AuthMethod.EMAIL_OTP),\n );\n if (usableAcceptable.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Config deadlock: userTypes.${typeName}.auth.mfaPolicy.requireMFA is true but ` +\n `acceptableMFAMethods (${acceptableMethods.join(', ')}) leaves no method that is ` +\n `second-factor-capable, enabled in authMethodsEnabled` +\n (requireStrongMFA ? `, and strong (requireStrongMFA excludes ${AuthMethod.EMAIL_OTP})` : '') +\n `. Every user of this type would be unable to complete MFA. Include at least one enabled ` +\n `method from: ${AuthUtils.getSecondFactorMethods()\n .filter((method) => !(requireStrongMFA && method === AuthMethod.EMAIL_OTP))\n .join(', ')}, or drop acceptableMFAMethods to accept all enabled ones.`,\n },\n });\n }\n }\n\n if (typeAuth.mfaPolicy?.requireMFA && typeAuth.mfaPolicy?.enrollmentGracePeriodDays === 0) {\n const emailVerification = (typeAuth.registration as Record<string, any> | undefined)?.emailVerification;\n if (emailVerification === 'deferred') {\n this.logger.warn(\n `userTypes.${typeName}: enrollmentGracePeriodDays=0 with emailVerification=deferred — users must enroll MFA immediately on deferred-verified accounts (valid but poor UX)`,\n );\n }\n }\n\n const registrationMode = typeAuth.registration?.mode as RegistrationMode | undefined;\n if (!registrationMode) {\n continue;\n }\n\n const allowsSelfServiceRegistration = isRegistrationAcquisitionAllowed(\n registrationMode,\n RegistrationAcquisitionChannel.PUBLIC_SELF_SERVICE,\n );\n for (const [frontendServiceName, frontendServiceConfig] of Object.entries(frontendServices)) {\n const userManagement = (frontendServiceConfig as Record<string, any>)?.usersManagement?.[typeName];\n if (!userManagement) {\n continue;\n }\n\n if (!allowsSelfServiceRegistration && userManagement.register) {\n this.logger.warn(\n `userTypes.${typeName}: registration.mode='${registrationMode}' blocks self-service registration but frontendServices.${frontendServiceName}.usersManagement.${typeName}.register=true — registration will be blocked at API level`,\n );\n }\n if (allowsSelfServiceRegistration && !userManagement.register) {\n this.logger.warn(\n `userTypes.${typeName}: registration.mode='${registrationMode}' but frontendServices.${frontendServiceName}.usersManagement.${typeName}.register=false — registration will be blocked at frontend service level`,\n );\n }\n }\n }\n }\n\n private validateFrontendServiceRuntimeBindings(config: AppConfiguration): void {\n const frontendServices = Object.entries(config.frontendServices ?? {});\n if (frontendServices.length === 0) {\n return;\n }\n\n for (const [frontendServiceName, frontendServiceConfig] of frontendServices) {\n const runtimeEndpoint = config.runtime?.endPoints?.[frontendServiceName];\n if (!runtimeEndpoint?.publicUrl || !runtimeEndpoint?.internalUrl) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `frontendServices.${frontendServiceName} is declared but runtime.endPoints.${frontendServiceName} ` +\n `is missing a matching publicUrl/internalUrl binding. Runtime topology must materialize every declared frontend service.`,\n frontendServiceName,\n },\n });\n }\n }\n }\n\n private warnOnMultipleDefaultUserTypes(config: AppConfiguration): void {\n for (const [frontendServiceName, frontendServiceConfig] of Object.entries(config.frontendServices ?? {})) {\n const userManagement = (frontendServiceConfig as Record<string, any>)?.usersManagement ?? {};\n const defaultEntries = Object.entries(userManagement).filter(([, value]) => (value as Record<string, any>)?.isDefault);\n if (defaultEntries.length > 1) {\n this.logger.warn(\n `frontendServices.${frontendServiceName}: multiple isDefault:true entries in usersManagement: ${defaultEntries.map(([key]) => key).join(', ')}. Only the first will be used for user-type resolution.`,\n );\n }\n }\n }\n\n private warnOnDuplicateClaimedDomains(config: AppConfiguration): void {\n const domainClaimMap = new Map<string, string[]>();\n\n for (const [orgTypeName, orgTypeDef] of Object.entries(config.organizationTypes ?? {})) {\n const claimedDomains = (orgTypeDef as Record<string, any>)?.sso?.claimedDomains as string[] | undefined;\n if (!claimedDomains) {\n continue;\n }\n\n for (const domain of claimedDomains) {\n const normalizedDomain = domain.toLowerCase();\n const orgTypes = domainClaimMap.get(normalizedDomain) ?? [];\n orgTypes.push(orgTypeName);\n domainClaimMap.set(normalizedDomain, orgTypes);\n }\n }\n\n for (const [domain, orgTypeNames] of domainClaimMap.entries()) {\n if (orgTypeNames.length > 1) {\n this.logger.warn(\n `E-VER-9: Domain \"${domain}\" is claimed by multiple organization types: ${orgTypeNames.join(', ')}. Domain-to-org resolution will be non-deterministic.`,\n );\n }\n }\n }\n\n private warnOnBroadAutoLinkSocialOAuth2(config: AppConfiguration): void {\n const socialOAuth2Providers = config.auth?.socialOAuth2Providers ?? {};\n const socialProvidersWithEmptyDomains = Object.entries(socialOAuth2Providers)\n .filter(([, providerConfig]) => {\n const typedConfig = providerConfig as Record<string, any>;\n return isEnabledSocialOAuth2LoginProvider(typedConfig)\n && (!typedConfig.allowedDomains || typedConfig.allowedDomains.length === 0);\n })\n .map(([providerName]) => providerName);\n\n if (socialProvidersWithEmptyDomains.length === 0) {\n return;\n }\n\n for (const [typeName, typeDef] of Object.entries(config.userTypes ?? {})) {\n const autoLinkByEmail = (typeDef as Record<string, any>)?.auth?.autoLinkByEmail;\n if (autoLinkByEmail === true || autoLinkByEmail === undefined) {\n this.logger.warn(\n `E-VER-11: userTypes.${typeName}.auth.autoLinkByEmail is true (or defaulted) and social OAuth2 providers [${socialProvidersWithEmptyDomains.join(', ')}] have empty allowedDomains. Any verified email from these IdPs can auto-link to existing accounts.`,\n );\n }\n }\n }\n\n // ─── Storage ────────────────────────────────────────────────────────────\n\n private collectStorageIssues(): ConfigurationValidationIssue[] {\n const allResourceTypes = this.resourcesRegistry.getResourceTypes();\n if (allResourceTypes.length === 0) {\n return [];\n }\n\n const envHints: Record<string, string> = {\n // Managed storage no longer takes a credential from env — it fetches\n // short-lived, prefix-confined sessions from apps-manager — so the hint\n // names the endpoint plus the bootstrap contract that authenticates that\n // fetch. Naming the retired `STORAGE_ACCESS_KEY` / `STORAGE_SECRET_KEY`\n // here would send an operator hunting for variables the platform\n // deliberately no longer emits, and `isConfigured()` gates on exactly the\n // set below.\n [FileStorageAccepted.WILDO_MANAGED]:\n 'STORAGE_ENDPOINT, PLATFORM_APPS_MANAGER_URL, PLATFORM_APPLICATION_PRIMARY_SECRET, APPLICATION_ID',\n [FileStorageAccepted.LOCAL_DIRECTORY]: 'STORAGE_LOCAL_BASE_DIR',\n };\n\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of allResourceTypes) {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n continue;\n }\n\n for (const field of fileFields) {\n const accepted = field.fileMetadata.storageAccepted;\n const fieldRef = `${resourceType}.${field.fieldName}`;\n\n if (!accepted || accepted.length === 0) {\n const provider = this.fileStorageRouter.getProviderById(FileStorageAccepted.WILDO_MANAGED);\n if (!provider || !provider.isConfigured()) {\n const hint = envHints[FileStorageAccepted.WILDO_MANAGED];\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldRef}: no storageAccepted specified and default WILDO_MANAGED is not configured — set ${hint}`,\n { fieldRef, storageAccepted: [FileStorageAccepted.WILDO_MANAGED] },\n ));\n }\n } else {\n const hasSatisfied = accepted.some((provId) => {\n const p = this.fileStorageRouter.getProviderById(provId);\n return p?.isConfigured() ?? false;\n });\n if (!hasSatisfied) {\n const hints = accepted.map((p) => envHints[p] ?? p).join(' or ');\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldRef}: accepts [${accepted.join(', ')}] but none are configured — set ${hints}`,\n { fieldRef, storageAccepted: [...accepted] },\n ));\n }\n }\n }\n }\n\n return issues;\n }\n\n // ─── Scanning (ClamAV) ──────────────────────────────────────────────────\n\n private collectScanningIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n const allResourceTypes = this.resourcesRegistry.getResourceTypes();\n const fieldsRequiringScan: string[] = [];\n\n for (const resourceType of allResourceTypes) {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n continue;\n }\n\n for (const field of fileFields) {\n if (field.fileMetadata.scanPolicy === 'required') {\n fieldsRequiringScan.push(`${resourceType}.${field.fieldName}`);\n }\n }\n }\n\n if (fieldsRequiringScan.length === 0) {\n return issues;\n }\n\n if (!this.clamavScanner.isConfigured()) {\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldsRequiringScan.length} z_file() field(s) declare scanPolicy: 'required' but ClamAV is not configured — set CLAMAV_HOST and CLAMAV_PORT`,\n { fields: fieldsRequiringScan, hint: 'Set CLAMAV_HOST env var or remove scanPolicy from z_file() declarations' },\n ));\n }\n\n return issues;\n }\n\n // ─── YARA (platform-level pattern scanning) ─────────────────────────\n\n private collectYaraIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n if (!this.yaraScanner.isExplicitlyEnabled()) return issues;\n\n if (!this.yaraScanner.isConfigured()) {\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n 'YARA_ENABLED is true but YARA_HOST is not set — the YARA scanner service is unreachable',\n { hint: 'Set YARA_HOST to the YARA scanner Docker service hostname (e.g., yara-scanner)' },\n ));\n }\n\n return issues;\n }\n\n // ─── Authentication persistence boundaries ─────────────────────────────\n\n /**\n * One registering user type may own at most one automatic organization\n * creation policy. The shared schema enforces this for parsed declarations;\n * this initialized-runtime border intentionally repeats the same canonical\n * lookup so programmatic or otherwise type-erased configuration cannot boot\n * into a frontend/backend ambiguity.\n */\n private collectOrganizationRegistrationCreationPolicyIssues(config?: AppConfiguration): ConfigurationValidationIssue[] {\n if (!config) return [];\n\n const authoredUserTypes = new Set<string>();\n for (const organizationType of Object.values(\n config.organizationTypes ?? {},\n )) {\n for (\n const userType\n of organizationType.creationPolicy\n ?.createOnUserTypeRegistration ?? []\n ) {\n authoredUserTypes.add(userType);\n }\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n for (const userType of [...authoredUserTypes].sort()) {\n const matches = findOrganizationTypeRegistrationCreationMatches(\n config.organizationTypes,\n userType,\n );\n if (matches.length <= 1) continue;\n\n issues.push(issueError(\n ConfigurationValidationDomain.AUTH,\n `User type '${userType}' is assigned to multiple organization-creation `\n + `policies [${matches\n .map((match) => match.organizationType).join(', ')}]. `\n + 'Registration must resolve exactly one organization type.',\n {\n reason:\n 'registration_user_type_has_ambiguous_organization_creation_policy',\n userType,\n matchingOrgTypes: matches.map((match) => match.organizationType),\n },\n ));\n }\n\n return issues;\n }\n\n /**\n * Build the complete set of identity transactions reachable from authored\n * application capabilities.\n *\n * Runtime methods use the same request builders. Startup intentionally\n * validates the broadest supported variant of each enabled boundary (for\n * example optional password creation is still part of self-registration's\n * capability) so a configuration cannot boot with only a subset of one\n * feature working.\n */\n private collectEnabledAuthenticationPersistenceBoundaryRequests(config: AppConfiguration): ResourcePersistenceUnitOfWorkRequest[] {\n const requests: ResourcePersistenceUnitOfWorkRequest[] = [];\n const userTypeEntries = Object.entries(config.userTypes ?? {});\n const selfRegistrationUserTypes = userTypeEntries\n .filter(([, definition]) =>\n isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.PUBLIC_SELF_SERVICE,\n )\n && definition.auth.registration.allowedMethods.includes(\n AuthMethod.PASSWORD,\n ),\n )\n .map(([userType]) => userType);\n\n if (selfRegistrationUserTypes.length > 0) {\n const eligibleUserTypes = new Set(selfRegistrationUserTypes);\n const reachableOrganizationCreationPolicies = Object.values(\n config.organizationTypes ?? {},\n )\n .map((definition) => definition.creationPolicy)\n .filter(\n (policy): policy is NonNullable<typeof policy> =>\n policy !== undefined\n && policy.createOnUserTypeRegistration.some(\n (userType) => eligibleUserTypes.has(userType),\n ),\n );\n const hasSynchronousOrganizationCreation =\n reachableOrganizationCreationPolicies.some(\n (policy) =>\n policy.orgNameSource !== OrganizationNameSource.ONBOARDING,\n );\n const hasDeferredOrganizationOnboarding =\n reachableOrganizationCreationPolicies.some(\n (policy) =>\n policy.orgNameSource === OrganizationNameSource.ONBOARDING,\n );\n requests.push(createSelfRegistrationPersistenceRequest({\n // PASSWORD is an allowed method. Even when a particular call omits it,\n // the authored self-registration capability includes credential writes.\n includeCredentials: true,\n includeSynchronousOrganizationCreation:\n hasSynchronousOrganizationCreation,\n }));\n if (hasDeferredOrganizationOnboarding) {\n requests.push(\n createDeferredOrganizationOnboardingPersistenceRequest(),\n );\n }\n }\n\n // Invitation acceptance has identity-level persistence boundaries distinct\n // from the organization-member CREATE operation. The presence of an\n // organization type makes these boundaries reachable even when all its\n // grant modes are ADMIN_ONLY/DISABLED: invitation policy applies only to\n // newly acquired user types, so an existing holder (or an org type with no\n // grants) can still be invited. There is currently no authored global\n // invitation-disable switch. Invitation issuance itself is validated\n // exactly once by the generic resource-operation transaction resolver below\n // (operation resource + declared custom participants + framework token\n // participant).\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(\n createPublicInvitationAcceptancePersistenceRequest({\n includeCredentials:\n isPublicInvitationPasswordCredentialReachable(config),\n }),\n createAuthenticatedInvitationAcceptancePersistenceRequest(),\n );\n }\n\n const hasEnabledSocialProvider = Object.values(\n config.auth?.socialOAuth2Providers ?? {},\n ).some((provider) => isEnabledSocialOAuth2LoginProvider(provider));\n if (hasEnabledSocialProvider) {\n requests.push(SOCIAL_EXISTING_USER_LINK_UNIT_OF_WORK);\n const socialJitCreationEnabled = userTypeEntries.some(\n ([, definition]) =>\n definition.auth.registration.allowedMethods.includes(\n AuthMethod.EXTERNAL_OAUTH2,\n )\n && isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.SOCIAL_OAUTH_JIT,\n ),\n );\n if (socialJitCreationEnabled) {\n requests.push(SOCIAL_USER_CREATION_UNIT_OF_WORK);\n }\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(SOCIAL_INVITATION_ACCEPTANCE_UNIT_OF_WORK);\n }\n }\n\n const enterpriseProvisioningEnabled =\n userTypeEntries.some(([, definition]) =>\n isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.ENTERPRISE_SSO_JIT,\n ),\n )\n || Object.values(config.organizationTypes ?? {}).some(\n (definition) => definition.scimProvisioning?.enabled === true,\n );\n if (enterpriseProvisioningEnabled) {\n requests.push(\n APPLICATION_USER_CREATION_UNIT_OF_WORK,\n APPLICATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n );\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(\n ORGANIZATION_USER_CREATION_UNIT_OF_WORK,\n ORGANIZATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n );\n }\n }\n\n return requests;\n }\n\n /**\n * How FILES participates in writes to this resource, derived from the schema alone.\n *\n * A generated document must land in the SAME commit as the row that references it,\n * so it is ATOMIC and a cross-adapter boundary is refused. Ordinary file METADATA is\n * compensatable — it may commit separately, which the service layer already handles\n * and already documents as an at-least-once obligation.\n */\n /**\n * Resource-WRITE boundaries — declared separately from transaction-readiness ones,\n * and deliberately NOT mixed into them.\n *\n * `collectTransactionReadinessPersistenceRequests` feeds a live probe that opens a\n * real transaction per adapter. A write whose only extra participant is COMPENSATABLE\n * file metadata requires no transaction at all, so folding these in would claim a\n * transaction requirement that does not exist — and would report a missing unit of\n * work as \"transaction-requiring boundaries are configured\", which is false.\n *\n * These are assessed for COMPATIBILITY only. That is the whole point: it is what\n * turns \"a resource writes files across an adapter boundary\" from a per-request\n * runtime discovery into a boot-time answer.\n */\n private collectResourceWritePersistenceRequests(): ResourcePersistenceUnitOfWorkRequest[] {\n const requests: ResourcePersistenceUnitOfWorkRequest[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const fileParticipation = this.resolveResourceWriteFileParticipation(resourceType);\n if (fileParticipation === ResourceWriteFileParticipation.NONE) {\n continue;\n }\n requests.push(createResourceWritePersistenceRequest({\n resourceType: String(resourceType),\n fileParticipation,\n }));\n }\n\n return requests;\n }\n\n private resolveResourceWriteFileParticipation(\n resourceType: Parameters<FileFieldDetectionBackendService['detectFileFields']>[0],\n ): ResourceWriteFileParticipation {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n // Detection is schema-driven; a resource it cannot read contributes no boundary\n // rather than failing startup on a diagnostic that is not itself a control.\n return ResourceWriteFileParticipation.NONE;\n }\n\n if (fileFields.length === 0) {\n return ResourceWriteFileParticipation.NONE;\n }\n\n const hasGeneratedDocument = fileFields.some(\n (fileField) => fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE,\n );\n\n return hasGeneratedDocument\n ? ResourceWriteFileParticipation.ATOMIC_MATERIALIZATION\n : ResourceWriteFileParticipation.METADATA;\n }\n\n /**\n * Collect every statically authored boundary that requires a native\n * transaction before traffic is accepted.\n *\n * Identity services declare their multi-resource units of work explicitly.\n * Resource operations additionally require a transaction when they generate\n * tokens or a custom implementation opts into `transactionalCore`.\n * Token-coupled operations include the token resource in the same request so\n * startup and runtime enforce the same adapter boundary.\n */\n private collectTransactionReadinessPersistenceRequests(config?: AppConfiguration): ResourcePersistenceUnitOfWorkRequest[] {\n const requests = [\n ...(config\n ? this.collectEnabledAuthenticationPersistenceBoundaryRequests(config)\n : []),\n ];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n\n for (const operation of resourceConfig.operations) {\n const contract =\n resolveResourceOperationTransactionPersistenceContract(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n if (!contract.request) {\n continue;\n }\n requests.push(contract.request);\n }\n }\n\n return requests;\n }\n\n /**\n * Assess every declared native transaction boundary through the same UoW\n * contract runtime execution uses.\n *\n * This deliberately stays generic. Identity boundaries and resource\n * operations contribute requests, while adapter resolution, mixed-store\n * detection, required-adapter constraints, and database availability remain\n * owned by `ResourcePersistenceUnitOfWorkBackendService`.\n */\n private collectPersistenceBoundaryCompatibilityIssues(config?: AppConfiguration): ConfigurationValidationIssue[] {\n const transactionRequiringRequests = this.collectTransactionReadinessPersistenceRequests(config);\n const resourceWriteRequests = this.collectResourceWritePersistenceRequests();\n const requests = [...transactionRequiringRequests, ...resourceWriteRequests];\n if (requests.length === 0) {\n return [];\n }\n if (!this.resourcePersistenceUnitOfWork) {\n /**\n * Unchanged semantics: a missing unit of work is only an ISSUE when a boundary\n * genuinely requires a transaction. Resource-write boundaries cannot be assessed\n * without it either, but their absence is not itself a misconfiguration — and\n * reporting one here would fire on every application that merely has file fields.\n */\n if (transactionRequiringRequests.length === 0) {\n return [];\n }\n return [issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n 'Transaction-requiring persistence boundaries are configured, but '\n + 'ResourcePersistenceUnitOfWorkService is unavailable.',\n {\n boundaries: requests.map((request) => request.boundary),\n reason: 'resource_persistence_unit_of_work_service_unavailable',\n },\n )];\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n for (const request of requests) {\n const assessment = this.resourcePersistenceUnitOfWork.assessCompatibility(request);\n if (assessment.compatible) {\n continue;\n }\n\n issues.push(issueError(\n request.boundary.startsWith('resource-operation-transaction:')\n ? ConfigurationValidationDomain.LIFECYCLE\n : ConfigurationValidationDomain.AUTH,\n `Persistence boundary '${request.boundary}' cannot execute `\n + `atomically (${assessment.status}). Every named participant must `\n + 'resolve to one supported native persistence adapter.',\n {\n boundary: request.boundary,\n compatibilityStatus: assessment.status,\n participantResourceMap: assessment.participantResourceMap,\n resourceAdapterMap: assessment.resourceAdapterMap,\n unresolvedParticipantResourceMap:\n assessment.unresolvedParticipantResourceMap,\n requiredAdapter: assessment.requiredAdapter,\n selectedAdapter: assessment.selectedAdapter,\n },\n ));\n }\n return issues;\n }\n\n /**\n * Reject operation pipelines whose synchronous result-transforming terminal\n * hooks cannot be reconciled with a framework-owned transaction.\n *\n * The custom-implementation registry catches transactional-registration\n * combinations during normal initialization. This startup border repeats the\n * complete operation-level check because token generation, authentication,\n * or revocation can require a transaction even when no custom registration\n * opted into one.\n */\n private collectResourceOperationTransactionContractIssues():\n ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const contract =\n resolveResourceOperationTransactionPersistenceContract(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n if (!contract.transactionRequired) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n if (contract.overrideAllRegistrationLabels.length > 0) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Transaction-requiring operation '${operationRef}' cannot use `\n + 'OVERRIDE_ALL because that mode replaces and returns before '\n + 'the framework-owned transaction pipeline.',\n {\n operationRef,\n tokenGenerationConfigured:\n contract.tokenGeneration !== undefined,\n transactionalRegistrationLabels:\n contract.transactionalRegistrationLabels,\n overrideAllRegistrationLabels:\n contract.overrideAllRegistrationLabels,\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Validate the template side of EVERY operation email before traffic is accepted.\n *\n * ## What binds an operation to a template\n *\n * A `userNotifications` entry with `channel: EMAIL` never names its template. The dispatcher\n * DERIVES one — `email.<resource>.<operation>[.<variantKey>].<target-kebab>` — and the\n * application must ship a template folder of exactly that name. Nothing in the type system\n * connects the two: the declaration is a config object, the template is a directory.\n *\n * ## Why this used to cover only token-backed operations, and why that was the bug\n *\n * The check opened with `if (!operation.tokenGeneration) continue;`, so an operation that merely\n * NOTIFIES was never validated. Combined with dispatch being post-commit and fire-and-forget by\n * design (a mutation must not fail because an email could not render), an unresolvable ref was\n * invisible everywhere: not in typecheck, not in the suites, not at boot, not in e2e lanes that\n * drove the very operations.\n *\n * That is not hypothetical. Moving the member notification off `ORGANIZATIONS | delete` onto\n * `request_deletion` (2026-08-05) moved the declaration and left the template directory behind,\n * producing three unresolvable refs and two orphaned templates with zero signal. It was found by\n * hand, months of boots later, only because someone went looking.\n *\n * ## Why severity SPLITS rather than failing everything closed\n *\n * The consequence of a missing template genuinely differs, so the report does too:\n *\n * - **Token-backed → ERROR.** The email carries a consumable token, so failing to send does not\n * merely lose a notice — the user cannot accept the invitation or reset the password. The\n * operation is functionally broken, and starting is worse than refusing to.\n * - **Informational → WARNING.** The operation completed correctly and a courtesy notice was not\n * delivered. Refusing to START an application because a notice is unauthored trades a missing\n * email for a total outage, which is the worse failure — an application must be able to boot\n * while its notification copy is still being written.\n *\n * The warning is not a shrug. It is emitted PER unresolvable ref, names the declaring operation,\n * and prints the exact directory the application has to create — so it is actionable at the first\n * boot rather than after an audit. Silence was the defect; a specific, repeated, remediable\n * warning is not silence.\n *\n * ## Scope\n *\n * This proves that runtime dispatch can RESOLVE every authored email through the configured\n * locale chain, and that a template cannot override transactional routing with a marketing\n * provider class. It deliberately says nothing about durable delivery, which has its own\n * (best-effort, post-commit) reliability boundary.\n */\n private collectOperationEmailTemplateIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n if (\n !isApiCallOperation(operation)\n && !isApiCallWithCallbackOperation(operation)\n ) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n const emailNotifications = (operation.userNotifications ?? []).filter(\n (notification) =>\n notification.channel === CoreUserNotificationChannel.EMAIL,\n );\n // Token-backed emails carry a consumable token, so a missing template BREAKS the flow;\n // informational ones only lose a notice. Severity follows that, not uniformity.\n const isTokenBacked = Boolean(operation.tokenGeneration);\n const issueFor = isTokenBacked ? issueError : issueWarning;\n\n for (const notification of emailNotifications) {\n const templateRef = buildUserNotificationEmailTemplateRef(\n {\n resourceIdentifier: String(operation.resourceIdentifier),\n operationIdentifier: String(operation.operationIdentifier),\n ...('variantKey' in operation && operation.variantKey\n ? { variantKey: String(operation.variantKey) }\n : {}),\n },\n notification,\n );\n\n try {\n const resolvedTemplate = this.emailTemplateRegistry.resolveForConfiguredLocale(templateRef);\n const effectiveTemplateType =\n resolvedTemplate.definition.type\n ?? EmailTemplateType.TRANSACTIONAL;\n if (effectiveTemplateType !== EmailTemplateType.TRANSACTIONAL) {\n issues.push(issueFor(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation email template '${templateRef}' for `\n + `operation '${operationRef}' resolves as `\n + `${effectiveTemplateType}; operation email `\n + `delivery requires ${EmailTemplateType.TRANSACTIONAL}.`,\n {\n operationRef,\n templateRef,\n resolvedLocale: resolvedTemplate.resolvedLocale,\n effectiveTemplateType,\n requiredTemplateType: EmailTemplateType.TRANSACTIONAL,\n },\n ));\n }\n } catch (error) {\n if (\n !isWildoBackendError(error)\n || error.type !== ErrorType.CONFIGURATION\n ) {\n throw error;\n }\n issues.push(issueFor(\n ConfigurationValidationDomain.LIFECYCLE,\n `${isTokenBacked ? 'Token-backed operation' : 'Operation'} email template `\n + `'${templateRef}' for operation '${operationRef}' does not resolve through the `\n + 'configured primary/fallback locale chain'\n + (isTokenBacked\n ? ' — this email carries a consumable token, so the flow it belongs to cannot complete.'\n : ' — the operation still succeeds, but its notification is silently never delivered.')\n // The remedy, spelled out: the ref IS the directory name, and an author who has not\n // met this derivation before has no way to guess it from the declaration.\n + ` Create the template folder named '${templateRef}' `\n + '(template.tsx + labels.<locale>.ts), or remove the notification declaration.',\n { operationRef, templateRef, tokenBacked: isTokenBacked },\n ));\n }\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when a configured operation cannot fulfil the contract it declares.\n *\n * A custom operation whose `requestDto` nothing consumes does not fail — it falls through to\n * the generic core path, writes nothing, and answers **HTTP 200 with the unchanged row**. A\n * hostile e2e probe caught `organizationMembers | promote` doing that on 2026-08-01, and a\n * catalogue sweep found 41 routed operations sharing the shape (8 CRITICAL, 11 HIGH). Nothing\n * escalates, which is why every security lane stayed green — the damage is that a destructive\n * verb reports success it never performed, so every runbook, script, and UI that trusts the\n * 2xx is wrong.\n *\n * The verdict comes from `resolveResourceOperationImplementationCoverage`, the same resolver\n * the dispatcher consults before executing. Sharing it is the point: a predicate that lived in\n * two places could bless an operation at boot that still answers 2xx on the first request.\n *\n * The check is BIDIRECTIONAL, and both directions are fail-closed:\n *\n * - **unserviceable and unacknowledged** — a new silent no-op cannot ship. Implement the\n * operation, remove the declaration, or acknowledge the gap deliberately.\n * - **acknowledged but serviceable** — a stale marker cannot survive someone implementing the\n * operation, which would otherwise leave a working operation permanently refusing.\n *\n * Every violation is aggregated into one throw, so one boot surfaces the whole set rather than\n * one restart per operation.\n *\n * assurance-control: WILDO.OPERATIONS.EXECUTION_INTEGRITY — an interface must not report success for an\n * action it did not perform.\n */\n private collectUnimplementedResourceOperationIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const verdict = resolveResourceOperationImplementationCoverage(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n\n if (\n verdict.coverage === ResourceOperationImplementationCoverage.UNSERVICEABLE\n && !verdict.acknowledgement\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' is routed but nothing consumes its declared request `\n + 'contract, so it would answer a success status having performed nothing. '\n + 'Implement it (a custom implementation bound to this exact operation path, or a '\n + 'declarative side effect), remove the declaration, or declare the gap with '\n + '`unimplementedAcknowledgement` — which also makes the request fail closed.',\n {\n operationRef,\n reason: verdict.unserviceableReason,\n unconsumedRequestFields: verdict.unconsumedRequestFields,\n riskLevel: operation.riskLevel,\n resourceOperationLike: operation.resourceOperationLike,\n },\n ));\n continue;\n }\n\n if (\n verdict.coverage !== ResourceOperationImplementationCoverage.UNSERVICEABLE\n && verdict.acknowledgement\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares 'unimplementedAcknowledgement' but is `\n + 'serviceable. The acknowledgement makes every request to it fail closed, so a '\n + 'stale marker silently disables a working operation. Remove it.',\n {\n operationRef,\n coverage: verdict.coverage,\n acknowledgementReason: verdict.acknowledgement.reason,\n acknowledgementTrackingRef: verdict.acknowledgement.trackingRef,\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when an `authoritativeFields` declaration names something that is not a\n * persisted field of the resource.\n *\n * `authoritativeFields` is what carries a hook-authored value past the repository's strict\n * `requestDto` re-parse even when the caller also supplied the key. It is typed `readonly\n * string[]` rather than `keyof` the main schema, because the declaration is shared by the\n * authoring parameters and the type-erased built operation (where `keyof` collapses to `never`),\n * and because custom-implementation registrations declare plain strings with no schema generic\n * available at all.\n *\n * So the name check has to happen here. A typo is the dangerous case: a misspelled field\n * declares nothing, the hook's value silently reverts to the added-key inference, and the first\n * caller who supplies that key turns the operation back into a success response that wrote\n * nothing — the precise defect `unimplementedAcknowledgement` exists to prevent. Failing at boot\n * makes that impossible to ship.\n *\n * Both declaration sites are covered: the operation-variant `authoritativeFields` (which pairs\n * with `basicPrefixOperation`) and every custom-implementation registration bound to the\n * operation path.\n *\n * assurance-control: WILDO.SOFTWARE.AUTHORITY_INTEGRITY — a server-owned field must have exactly one named\n * authority, and that authority must be provable at boot rather than assumed.\n */\n private collectResourceOperationAuthoritativeFieldIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const declarations: { source: string; fields: readonly string[] }[] = [];\n\n const configuredFields = (\n operation as { authoritativeFields?: readonly string[] }\n ).authoritativeFields;\n if (configuredFields?.length) {\n declarations.push({ source: 'operation variant', fields: configuredFields });\n }\n\n for (const registration of this.customImplRegistry.getRegistrationsForOperation(operation)) {\n if (registration.authoritativeFields?.length) {\n declarations.push({\n source: `custom implementation '${registration.debugLabel}'`,\n fields: registration.authoritativeFields,\n });\n }\n }\n\n if (declarations.length === 0) continue;\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n const persistedFields = getPersistedFieldNames(operation);\n\n for (const declaration of declarations) {\n const unknownFields = declaration.fields.filter((field) => !persistedFields.has(field));\n if (unknownFields.length === 0) continue;\n\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares authoritativeFields `\n + `[${unknownFields.join(', ')}] on its ${declaration.source}, but `\n + `${unknownFields.length === 1 ? 'that name is not a persisted field' : 'those names are not persisted fields'} `\n + 'of the resource. A name that matches nothing declares nothing: the hook\\'s value '\n + 'falls back to being inferred from the keys it added, so the first caller who '\n + 'supplies that key makes the write silently empty while the operation still '\n + 'answers success. Fix the spelling, or drop the declaration if the field is no '\n + 'longer authored.',\n {\n operationRef,\n declarationSource: declaration.source,\n unknownFields,\n persistedFields: [...persistedFields],\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when a custom write-like verb never authored the request contract it exposes.\n *\n * The DTO builder synthesizes a contract for an operation that does not author one, and for a\n * write-like `resourceOperationLike` that synthesis is the resource's ENTIRE create/update\n * contract. A verb then advertises far more than it names: `applicationApiKeys | deactivate`\n * accepted `status` (so it could activate) and `roles` (on a resource whose only role gate runs\n * when minting); `organizationOAuthClients | regenerate` accepted `redirectUris`.\n *\n * This is a DIFFERENT defect from an unserviceable operation and gets its own resolver — those\n * operations write nothing, these write too much, and several of these have full custom\n * implementations. `unimplementedAcknowledgement` is deliberately NOT the escape hatch here: the\n * fix is to author the contract. An operation that really does accept the whole resource\n * contract declares it explicitly, which is visible at the declaration site and in review.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least privilege applies to a request contract as\n * much as to a role.\n */\n private collectOverbroadResourceOperationRequestContractIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const verdict = resolveResourceOperationRequestContractBreadth(operation);\n if (\n verdict.breadth\n !== ResourceOperationRequestContractBreadth.OVERBROAD_INHERITED_FULL_CONTRACT\n ) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares no 'requestDto', so it inherited its resource's `\n + 'ENTIRE update contract and accepts every field listed below — including fields the '\n + 'verb contradicts. Author a `requestDto` naming exactly what the verb accepts '\n + '(`z.object({})` when the transition is server-decided) and force the transition '\n + 'from a `prefixCoreOperations` / `basicPrefixOperation` hook. If the operation '\n + 'really does accept the whole contract, declare that contract explicitly.',\n {\n operationRef,\n inheritedRequestFields: verdict.inheritedRequestFields,\n riskLevel: operation.riskLevel,\n resourceOperationLike: operation.resourceOperationLike,\n },\n ));\n }\n }\n\n return issues;\n }\n\n private static buildOperationRef(operation: {\n resourceIdentifier: unknown;\n operationIdentifier: unknown;\n variantKey?: unknown;\n }): string {\n return [\n String(operation.resourceIdentifier),\n String(operation.operationIdentifier),\n ...(operation.variantKey ? [String(operation.variantKey)] : []),\n ].join('.');\n }\n\n // ─── CLI Runtime Agents ─────────────────────────────────────────────────\n\n /**\n * Refuse at STARTUP an active coding agent whose ACP transport cannot serve it.\n *\n * Replaces the CLI-runtime validator this transport superseded, and keeps its\n * purpose: an agent whose provider, profile, model or environment does not\n * line up should fail while an operator is reading startup output, not on the\n * first dispatch — where the same misconfiguration surfaces minutes into a\n * journey, after a task row already exists.\n */\n private collectCodingAgentIssues(): ConfigurationValidationIssue[] {\n const applicationEnv = (process.env.APPLICATION_ENV ?? APPLICATION_ENVIRONMENT.DEVELOPMENT) as APPLICATION_ENVIRONMENT;\n const platformEnvironmentId = process.env.PLATFORM_ENVIRONMENT_ID;\n const agents = Object.values(this.flowsActorsRegistry.getRegistry().agents);\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const agent of agents) {\n if (agent.status !== FlowsActors_Agent_Status.ACTIVE || !isCodingAgentConfiguration(agent.config)) {\n continue;\n }\n\n const codingConfig: FlowsActors_Agent_CodingConfiguration = agent.config;\n const providerRef = codingConfig.providerRef;\n const executionProfileRef = codingConfig.executionProfileRef;\n const agentCtx = { agentRef: agent.ref, providerRef, executionProfileRef };\n\n if (!this.externalProvidersRegistry.isProviderEnabled(providerRef, ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': provider '${providerRef}' has no enabled Agent Client Protocol`,\n agentCtx,\n ));\n continue;\n }\n\n const acpProfile = this.externalProvidersRegistry.getAgentClientProtocolProfile(providerRef);\n const executionProfile = this.externalProvidersRegistry.getAgentClientProtocolExecutionProfile(\n providerRef,\n executionProfileRef,\n );\n if (!acpProfile || !executionProfile) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP metadata or execution profile '${executionProfileRef}' not found`,\n agentCtx,\n ));\n continue;\n }\n\n if (!acpProfile.supportedOperationKeys.includes(codingConfig.operationKey)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP transport does not support operation '${codingConfig.operationKey}'`,\n agentCtx,\n ));\n }\n\n if (!acpProfile.supportedModels.includes(codingConfig.model)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP transport does not declare support for model '${codingConfig.model}'`,\n { ...agentCtx, supportedModels: acpProfile.supportedModels },\n ));\n }\n\n // The environment gate, checked at startup as well as at dispatch. A\n // profile that can never run here is a configuration error worth naming\n // now rather than a refusal discovered mid-journey.\n if (!executionProfile.allowedApplicationEnvironments.includes(applicationEnv)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile is not allowed in application environment '${applicationEnv}'`,\n { ...agentCtx, allowedApplicationEnvironments: executionProfile.allowedApplicationEnvironments },\n ));\n }\n\n if (\n executionProfile.allowedPlatformEnvironmentIds?.length\n && (!platformEnvironmentId || !executionProfile.allowedPlatformEnvironmentIds.includes(platformEnvironmentId))\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile is not allowed in platform environment '${platformEnvironmentId ?? '(unset)'}'`,\n { ...agentCtx, allowedPlatformEnvironmentIds: executionProfile.allowedPlatformEnvironmentIds },\n ));\n }\n\n if (\n executionProfile.authMode === AgentClientProtocol_AuthMode.SECRET_REF_ENV_INJECTION\n && !this.externalProvidersRegistry.getAgentClientProtocolExecutionProfileSecret(providerRef, executionProfileRef)\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile declares secret injection but its secret is not resolvable`,\n agentCtx,\n ));\n }\n }\n\n return issues;\n }\n}\n"]}
1
+ {"version":3,"file":"application-startup-config-validator.backend.service.js","sourceRoot":"","sources":["../../../../../src/config/services/application-startup-config-validator.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EACL,UAAU,EACV,SAAS,EACT,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAE9B,mBAAmB,EACnB,gCAAgC,EAChC,+CAA+C,EAC/C,qBAAqB,EAIrB,6BAA6B,EAC7B,+BAA+B,EAC/B,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,8BAA8B,EAC9B,UAAU,EACV,YAAY,EACZ,0BAA0B,GAE3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,sCAAsC,GAEvC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAIrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,uCAAuC,EAAE,MAAM,4FAA4F,CAAC;AACrJ,OAAO,EAAE,0BAA0B,EAAE,MAAM,wEAAwE,CAAC;AACpH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAC3H,OAAO,EAAE,gCAAgC,EAAE,MAAM,wEAAwE,CA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injectable, optional } from 'inversify';\nimport {\n AuthMethod,\n AuthUtils,\n CoreUserNotificationChannel,\n EmailTemplateType,\n ErrorCustomMessageReference,\n ErrorType,\n FlowsActors_Agent_Status,\n OrganizationNameSource,\n RegistrationAcquisitionChannel,\n RegistrationMode,\n isWildoBackendError,\n isRegistrationAcquisitionAllowed,\n findOrganizationTypeRegistrationCreationMatches,\n ClientInstanceIdScope,\n type AppConfiguration_Shared_Auth,\n type ConfigurationValidationIssue,\n type ConfigurationValidationResult,\n ConfigurationValidationDomain,\n ConfigurationValidationSeverity,\n PersistenceAdapter,\n buildValidationResult,\n isApiCallOperation,\n isApiCallWithCallbackOperation,\n issueError,\n issueWarning,\n isCodingAgentConfiguration,\n type FlowsActors_Agent_CodingConfiguration,\n} from '@wildo-ai/saas-models';\nimport {\n APPLICATION_ENVIRONMENT,\n AgentClientProtocol_AuthMode,\n ExternalProvider_ExchangeProtocol_Kind,\n type LLMProvider_OperationKey,\n} from '@wildo-ai/external-connectors-models';\nimport { FileGenerationSource, FileStorageAccepted } from '@wildo-ai/zod-decorators';\nimport type {\n AppConfiguration,\n} from '~wildo-backend-lib/config/models/app-config.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { ExternalProvidersRegistryBackendService } from '~wildo-backend-lib/external-providers/services/external-providers-registry.backend.service';\nimport { FlowsActorsRegistryService } from '~wildo-backend-lib/flows-actors/services/flows-actors-registry.service';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { FileFieldDetectionBackendService } from '~wildo-backend-lib/files/services/file-field-detection.backend.service';\nimport { FileStorageRouterBackendService } from '~wildo-backend-lib/files/storage/file-storage-router.backend.service';\nimport { ClamAVScannerBackendService } from '~wildo-backend-lib/files/scanning/clamav-scanner.backend.service';\nimport { YaraScannerBackendService } from '~wildo-backend-lib/files/scanning/yara-scanner.backend.service';\nimport { isEnabledSocialOAuth2LoginProvider } from '~wildo-backend-lib/security/authentications/utils/social-oauth2-purpose.backend.utils';\nimport {\n isPublicInvitationPasswordCredentialReachable,\n} from '~wildo-backend-lib/security/authentications/services/utils/auth-policy-resolution.backend.utils';\nimport type {\n EmailTemplateRegistryBackendService,\n} from '~wildo-backend-lib/notifications/email/services/email-template-registry.backend.service';\nimport {\n buildUserNotificationEmailTemplateRef,\n} from '~wildo-backend-lib/notifications/services/notifications-dispatcher.backend.service';\nimport type {\n ResourceOperationCustomImplementationRegistryBackendService,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service';\nimport type {\n ResourcePersistenceUnitOfWorkBackendService,\n ResourcePersistenceUnitOfWorkRequest,\n} from '~wildo-backend-lib/databases/services/resource-persistence-unit-of-work.backend.service';\nimport {\n createResourceWritePersistenceRequest,\n resolveResourceOperationTransactionPersistenceContract,\n ResourceWriteFileParticipation,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-transaction-persistence.backend.utils';\nimport {\n ResourceOperationImplementationCoverage,\n ResourceOperationRequestContractBreadth,\n getPersistedFieldNames,\n resolveResourceOperationImplementationCoverage,\n resolveResourceOperationRequestContractBreadth,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-implementation-coverage.backend.utils';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { resolvePersistenceAdapterForConfiguration } from '~wildo-backend-lib/databases/models/resolve-persistence-adapter.backend.utils';\nimport type { PostgreSQLDatabaseBackendService } from '~wildo-backend-lib/databases/services/postgresql-database.backend.service';\nimport type { MongoDBService } from '~wildo-backend-lib/databases/services/mongodb.service';\nimport type { RagSourceFieldDetectionBackendService } from '~wildo-backend-lib/files/services/rag-source-field-detection.backend.service';\nimport type { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport {\n MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE,\n RagChunkStoreHosting,\n resolveRagChunkStoreHosting,\n} from '~wildo-backend-lib/rag/models/rag-chunk-store.backend.types';\nimport { collectResourceRetentionPolicies } from '~wildo-backend-lib/resources/utils/resource-retention.backend.utils';\nimport {\n APPLICATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n APPLICATION_USER_CREATION_UNIT_OF_WORK,\n createAuthenticatedInvitationAcceptancePersistenceRequest,\n createDeferredOrganizationOnboardingPersistenceRequest,\n createPublicInvitationAcceptancePersistenceRequest,\n createSelfRegistrationPersistenceRequest,\n ORGANIZATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n ORGANIZATION_USER_CREATION_UNIT_OF_WORK,\n SOCIAL_EXISTING_USER_LINK_UNIT_OF_WORK,\n SOCIAL_INVITATION_ACCEPTANCE_UNIT_OF_WORK,\n SOCIAL_USER_CREATION_UNIT_OF_WORK,\n} from '~wildo-backend-lib/security/authentications/models/identity-persistence-boundaries.backend';\n\n/**\n * Startup-only governance rules for application configuration.\n *\n * Two phases:\n *\n * 1. `validate(config)` — pre-registry checks on the raw AppConfiguration\n * (auth consistency, frontend service bindings, etc.)\n *\n * 2. `validateInitializedRuntimeContracts()` — post-registry cross-checks\n * that need the fully resolved registry (z_file() vs storage providers,\n * CLI-runtime agents, etc.). Uses the collector pattern: each validator\n * returns `ConfigurationValidationIssue[]`, the runner consolidates,\n * logs warnings, and throws on errors.\n *\n * Frontend will adopt the same `ConfigurationValidationIssue` contract\n * for its own post-registry checks (feature gating, launcher coherence, etc.).\n */\n@injectable()\nexport class ApplicationStartupConfigValidatorService {\n private logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService)\n private readonly externalProvidersRegistry: ExternalProvidersRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.FlowsActorsRegistryService)\n private readonly flowsActorsRegistry: FlowsActorsRegistryService,\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService)\n private readonly resourcesRegistry: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FileStorageRouter)\n private readonly fileStorageRouter: FileStorageRouterBackendService,\n @inject(SAAS_SERVICE_TYPES.ClamAVScannerService)\n private readonly clamavScanner: ClamAVScannerBackendService,\n @inject(SAAS_SERVICE_TYPES.YaraScannerService)\n private readonly yaraScanner: YaraScannerBackendService,\n @inject(SAAS_SERVICE_TYPES.EmailTemplateRegistry)\n private readonly emailTemplateRegistry: EmailTemplateRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourceOperationCustomImplementationRegistryService)\n private readonly customImplRegistry: ResourceOperationCustomImplementationRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.ResourcePersistenceUnitOfWorkService)\n @optional()\n private readonly resourcePersistenceUnitOfWork?:\n ResourcePersistenceUnitOfWorkBackendService,\n // RAG capability probe dependencies (appended LAST + optional: this constructor is invoked\n // POSITIONALLY in tests). Absent detection ⇒ the probe cannot see `.ragSource()` declarations\n // and no-ops — acceptable only because the real container always binds it.\n @inject(SAAS_SERVICE_TYPES.RagSourceFieldDetectionService)\n @optional()\n private readonly ragSourceFieldDetection?: RagSourceFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.PostgreSQLDatabaseService)\n @optional()\n private readonly postgreSQLDatabaseService?: PostgreSQLDatabaseBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService)\n @optional()\n private readonly appConfigService?: AppConfigurationService,\n /**\n * The MongoDB half of the same probe (Phase 6). Appended LAST for the reason the block above\n * states: this constructor is invoked POSITIONALLY in tests, so a parameter inserted beside its\n * PostgreSQL sibling would silently shift every later argument into the wrong slot.\n */\n @inject(SAAS_SERVICE_TYPES.MongoDBService)\n @optional()\n private readonly mongoDBService?: MongoDBService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationStartupConfigValidatorService');\n }\n\n // ─────────────────────────────────────────────────────────────────────────\n // Phase 1: pre-registry config checks\n // ─────────────────────────────────────────────────────────────────────────\n\n public validate(config: AppConfiguration): void {\n this.assertNoRemovedGlobalAuthFields(config.auth);\n this.validateFrontendServiceRuntimeBindings(config);\n this.validateUserTypeAuthConsistency(config);\n this.validateAuditTrailArchivalFloor(config);\n this.warnOnMultipleDefaultUserTypes(config);\n this.warnOnDuplicateClaimedDomains(config);\n this.warnOnBroadAutoLinkSocialOAuth2(config);\n this.warnOnClientInstanceIdentificationEnabled(config);\n }\n\n /**\n * Warn when the application has opted into CLIENT-INSTALL identification\n * (`compliance.clientInstanceIdScope !== DISABLED`), naming the obligations that opt-in creates.\n *\n * **Why a startup warning and not silence.** `clientInstanceId` is a pseudonymous identifier stored on the\n * user's terminal equipment, so selecting `SESSION`/`PERSISTENT` engages ePrivacy Art 5(3) and creates\n * paperwork the framework cannot do on the application's behalf — a recorded legitimate-interest\n * assessment, and a decision about whether an erasure request scrubs the identifier from retained audit\n * evidence. Those are documented as owed, but a documented obligation with no mechanical firing pin is one\n * forgotten session away from drift, which is exactly the failure mode\n * `.claude/rules/capability-catalog-integration.md` names. This is that firing pin: the application cannot\n * turn the capability on without the reason it must act appearing in its own boot log.\n *\n * WARN, never ERROR: opting in is a legitimate, deliberate choice, and refusing to boot over an\n * app-authored privacy posture would be the framework overriding the controller's decision.\n *\n * assurance-control: WILDO.PRIVACY.DATA_MINIMIZATION — surfaces the compliance obligations attached to\n * collecting a device-stored pseudonymous identifier at the moment the collection is enabled.\n */\n private warnOnClientInstanceIdentificationEnabled(config: AppConfiguration): void {\n const scope = config.compliance?.clientInstanceIdScope;\n if (scope === undefined || scope === ClientInstanceIdScope.DISABLED) {\n return; // The default posture — nothing is collected, nothing is owed.\n }\n\n this.logger.warn(\n `[compliance] Client-install identification is ENABLED (compliance.clientInstanceIdScope='${scope}'). `\n + 'Every request may now carry an `x-client-instance-id` that is recorded on audit rows and forwarded to '\n + 'the SIEM — a pseudonymous identifier under GDPR Art 4(5), stored on the user\\'s device. Confirm with '\n + 'counsel that (1) a legitimate-interest assessment is recorded for this processing, (2) the storage is '\n + 'lawful in your jurisdiction (ePrivacy Art 5(3); consent may be required, and PERSISTENT is the harder '\n + 'case), (3) your privacy notice discloses it, and (4) your erasure procedure states whether the '\n + 'identifier is scrubbed from retained audit evidence. Set clientInstanceIdScope to DISABLED to opt out.',\n { clientInstanceIdScope: scope },\n );\n }\n\n /**\n * Production floor for the audit-log archival horizon\n * (`auditTrail.archiveAfterDays`). Audit records must remain in the primary\n * store for at least this many days before they become archival-eligible in\n * a staging/production environment. Mirrors the SSO `auditConfig.retentionDays`\n * default (365) as the compliance minimum.\n */\n private static readonly AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS = 365;\n\n /**\n * Enforce the production floor on `auditTrail.archiveAfterDays`.\n *\n * The schema-level `.min(1)` is the absolute floor; this raises it to\n * {@link AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS} outside development. It lives\n * here — a RUNTIME validator — rather than in a Zod `.superRefine()` on the\n * shared schema, because the environment gate reads `process.env.APPLICATION_ENV`,\n * a runtime signal a pure, environment-agnostic shared schema must not touch\n * (mirrors the env-gated `.superRefine` in `define-infra-env-config.ts`, which\n * only works there because THAT schema carries the environment as a field).\n *\n * Development is exempt (dev convenience — mirrors the infra `!isLocalEnvironmentId`\n * gate); staging + production enforce the floor. Archival is opt-in, so an\n * unset `archiveAfterDays` is always allowed (nothing to floor).\n */\n private validateAuditTrailArchivalFloor(config: AppConfiguration): void {\n const archiveAfterDays = config.auditTrail?.archiveAfterDays;\n if (archiveAfterDays === undefined) {\n return; // Archival opt-out — no horizon to floor.\n }\n\n const applicationEnv = (process.env.APPLICATION_ENV ?? APPLICATION_ENVIRONMENT.DEVELOPMENT) as APPLICATION_ENVIRONMENT;\n if (applicationEnv === APPLICATION_ENVIRONMENT.DEVELOPMENT) {\n return; // Development is exempt from the compliance floor.\n }\n\n const floor = ApplicationStartupConfigValidatorService.AUDIT_ARCHIVE_PRODUCTION_FLOOR_DAYS;\n if (archiveAfterDays < floor) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `auditTrail.archiveAfterDays (${archiveAfterDays}) is below the production floor of ${floor} days ` +\n `in environment '${applicationEnv}'. Audit records must remain in the primary store for at least ` +\n `${floor} days before archival in staging/production. Set archiveAfterDays >= ${floor} ` +\n `(values below ${floor} are permitted only in development), or omit archiveAfterDays entirely ` +\n `to disable archival.`,\n archiveAfterDays,\n floorDays: floor,\n applicationEnv,\n },\n });\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────\n // Phase 2: post-registry cross-checks (collector pattern)\n // ─────────────────────────────────────────────────────────────────────────\n\n /**\n * Run all post-registry validators, collect issues, then report.\n *\n * To add a new cross-check:\n * 1. Write a private method returning `ConfigurationValidationIssue[]`\n * 2. Add its call to the `validators` array below\n * 3. The runner handles logging warnings and throwing on errors\n */\n /**\n * TIER 1 — DECLARATION-ONLY. Safe for ANY runtime that owns a resource registry.\n *\n * These read the resource DECLARATIONS and the infrastructure they name, and assert nothing about\n * whether the runtime implements those resources. A scheduler that registers core resources purely\n * so the controllers registry can initialize passes these, because it declares nothing it does not\n * honour.\n *\n * Classified by what each collector actually READS, not by its name — see\n * `collectImplementationBackedContractIssues` for why that distinction is load-bearing.\n */\n private collectDeclarationContractIssues(): (() => ConfigurationValidationIssue[])[] {\n return [\n // resources registry (file fields) + fileStorageRouter — do declared `z_file()` fields have a\n // provider that can actually store them?\n () => this.collectStorageIssues(),\n // resources registry only — is any operation's request contract wider than it declares?\n () => this.collectOverbroadResourceOperationRequestContractIssues(),\n ];\n }\n\n /**\n * TIER 2 — OPERATION-IMPLEMENTATION-BACKED. Only for a runtime that EXECUTES the operations it\n * registers.\n *\n * Every collector here cross-references the resource registry against the machinery that RUNS an\n * operation — `customImplRegistry` and the persistence unit of work. A runtime that registers\n * resources without implementing their operations fails all of them, and is not wrong to do so.\n *\n * Measured 2026-08-14: wiring these into `platform-crontabs-batches-manager` — a SCHEDULER that\n * registers the core resource set so `controllersRegistryService.initialize()` works, and\n * implements none of it — broke its boot with 83 `[LIFECYCLE] Operation 'organizations.…'` errors\n * from `collectUnimplementedResourceOperationIssues` alone. That is what proved a two-way split by\n * collector NAME was insufficient.\n */\n private collectImplementationBackedContractIssues(config?: AppConfiguration): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectResourceOperationTransactionContractIssues(),\n () => this.collectPersistenceBoundaryCompatibilityIssues(config),\n () => this.collectUnimplementedResourceOperationIssues(),\n () => this.collectResourceOperationAuthoritativeFieldIssues(),\n ];\n }\n\n /**\n * TIER 2N — NOTIFICATION-DELIVERY-BACKED. Only for a runtime that DELIVERS the notifications the\n * operations it registers declare.\n *\n * Split out of tier 2 on 2026-08-14 because \"implements the resources it registers\" turned out to\n * be TWO capabilities, not one, and the platform services hold exactly one of them. `platform-\n * apps-manager` and `platform-module-registry` DO execute core resource operations — they own\n * custom implementations and persistence — so tier 2 is correct for them. Neither DELIVERS an\n * application's user notifications: they register `organizationMembers` because the registry needs\n * the core set, and they ship none of its templates. Cross-referencing the resource registry\n * against `emailTemplateRegistry` therefore fails them on templates they are not the subject of.\n *\n * Measured: both crash-looped at boot on the same two ERRORs — the token-backed\n * `email.organizationMembers.create.user-self` and `…resend.user-self` — which are the only two\n * token-backed operations in the engine, hence the only two that escalate a missing template from\n * WARNING to ERROR (see `collectOperationEmailTemplateIssues`, where severity follows\n * `tokenGeneration`). The warning flood on the non-token-backed operations was harmless and is\n * what made the two fatal rows easy to miss in the log.\n *\n * Rejected alternative: moving this collector down to tier 3 (application FEATURES). Tier 3 reads\n * scanners, vector stores and provider config — optional product features. A declared operation\n * email is neither optional nor a feature: it is part of the operation's contract, and it must\n * stay adjacent to the tier that validates the rest of that contract for every runtime that does\n * own delivery.\n */\n private collectNotificationDeliveryContractIssues(): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectOperationEmailTemplateIssues(),\n ];\n }\n\n /**\n * TIER 3 — APPLICATION FEATURES. Only for an application runtime.\n *\n * Each validates an optional product feature a platform service does not own: virus scanning,\n * YARA rules, organization-registration policy, CLI runtime agents. They read\n * scanners, provider registries and config — not the resource contract.\n *\n * NOTE: the Weaviate-era RAG collector (`collectRAGIssues`) that used to run in this tier was\n * deleted with the Weaviate lane on 2026-08-26. Its fail-closed successor is\n * {@link validateInitializedRagStoreCapability} — ASYNC (it executes a probe on the live\n * database), so it runs as its own startup step beside the transaction-readiness proof rather\n * than inside these sync collector tiers.\n */\n private collectApplicationFeatureIssues(config?: AppConfiguration): (() => ConfigurationValidationIssue[])[] {\n return [\n () => this.collectScanningIssues(),\n () => this.collectYaraIssues(),\n () => this.collectOrganizationRegistrationCreationPolicyIssues(config),\n () => this.collectCodingAgentIssues(),\n ];\n }\n\n private runCollectors(collectors: (() => ConfigurationValidationIssue[])[]): ConfigurationValidationResult {\n const allIssues: ConfigurationValidationIssue[] = [];\n for (const collector of collectors) {\n allIssues.push(...collector());\n }\n const result = buildValidationResult(allIssues);\n this.reportValidationResult(result);\n return result;\n }\n\n /** Application runtimes: every tier. Unchanged behaviour — an application both executes its\n * operations and delivers their notifications, so it is the one runtime that owns all of them. */\n public validateInitializedRuntimeContracts(config?: AppConfiguration): ConfigurationValidationResult {\n this.resourcesRegistry.validateInitializedPersistenceAdapterConfiguration();\n return this.runCollectors([\n ...this.collectDeclarationContractIssues(),\n ...this.collectImplementationBackedContractIssues(config),\n ...this.collectNotificationDeliveryContractIssues(),\n ...this.collectApplicationFeatureIssues(config),\n ]);\n }\n\n /**\n * Platform services that IMPLEMENT the resources they register — the module registry, apps-manager.\n *\n * Tiers 1+2, and deliberately NOT tier 2N. Exists because `resolveApplicationConfigForStartup`\n * returns `undefined` unconditionally for `isPlatformApplication: true`, so the shared startup\n * skips post-registry validation entirely for every platform service — including\n * `collectStorageIssues()`, which is exactly the check that cross-references `z_file()` resources\n * against configured providers.\n *\n * A platform service EXECUTES core resource operations but DELIVERS none of their user\n * notifications, so `collectNotificationDeliveryContractIssues()` is excluded — see its JSDoc for\n * the boot failure that established the split.\n */\n public validateInitializedPlatformRuntimeContracts(config?: AppConfiguration): ConfigurationValidationResult {\n return this.runCollectors([\n ...this.collectDeclarationContractIssues(),\n ...this.collectImplementationBackedContractIssues(config),\n ]);\n }\n\n /**\n * Runtimes that REGISTER resources without implementing them — a scheduler, a companion, any\n * service initializing a registry only so another registry can start.\n *\n * Tier 1 only. Gives such a runtime the storage and declaration-shape guarantees while asserting\n * nothing about implementations it was never meant to provide.\n */\n public validateInitializedDeclarationContracts(): ConfigurationValidationResult {\n return this.runCollectors(this.collectDeclarationContractIssues());\n }\n\n\n /**\n * Prove that every adapter selected by an authored transaction-requiring\n * boundary can actually start, execute, and commit a native transaction.\n *\n * Adapter compatibility alone cannot distinguish a MongoDB replica set from\n * a standalone server. The adapter-owned probe executes a read-only command\n * inside the transaction; an empty callback would not start a MongoDB server\n * transaction. Probes are deduplicated to one request per selected adapter.\n * No controller is initialized until they succeed.\n */\n public async validateInitializedRuntimeTransactionReadiness(config: AppConfiguration): Promise<void> {\n if (!this.resourcePersistenceUnitOfWork) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'ResourcePersistenceUnitOfWorkService is unavailable during initialized runtime validation',\n reason: 'resource_persistence_unit_of_work_service_unavailable',\n },\n },\n );\n }\n\n const firstRequestByAdapter = new Map<\n string,\n ResourcePersistenceUnitOfWorkRequest\n >();\n for (\n const request\n of this.collectTransactionReadinessPersistenceRequests(config)\n ) {\n const assessment = this.resourcePersistenceUnitOfWork.assessCompatibility(request);\n if (!assessment.compatible) {\n // Preserve one canonical compatibility failure instead of silently\n // omitting an authored transaction boundary from readiness proof.\n await this.resourcePersistenceUnitOfWork\n .verifyTransactionReadiness(request);\n }\n if (assessment.compatible && assessment.selectedAdapter !== undefined\n && !firstRequestByAdapter.has(assessment.selectedAdapter)\n ) {\n firstRequestByAdapter.set(assessment.selectedAdapter, request);\n }\n }\n\n for (const [adapter, request] of firstRequestByAdapter) {\n try {\n await this.resourcePersistenceUnitOfWork\n .verifyTransactionReadiness(request);\n } catch (error) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Persistence adapter '${adapter}' cannot commit the native `\n + `transaction required by boundary '${request.boundary}'`,\n reason: 'persistence_transaction_readiness_probe_failed',\n adapter,\n boundary: request.boundary,\n originalError: error instanceof Error\n ? error.message\n : String(error),\n },\n },\n );\n }\n }\n }\n\n /**\n * RAG store capability probe — the fail-closed successor of the Weaviate-era `collectRAGIssues`\n * (plan `.claude/plans/resource-rag-capability.md`, M6 carry-over).\n *\n * For every registered resource that declares `.ragSource()` fields, two refusals:\n *\n * - **row retention × RAG source** → ERROR, before any store question is asked. See\n * {@link collectRagSourceRetentionRefusal}: DL3 enforced at RESOURCE level, which is the tier\n * the risk lives on (the `.ttl()` field and the `.ragSource()` field are ordinarily different\n * fields of the same row, so the decorator-level companion refusal cannot see the pair).\n *\n * …then prove the datastore its chunks would live in (D1: the resource's OWN persistence adapter)\n * can actually hold them:\n *\n * - **PostgreSQL** → EXECUTE a pgvector expression (`select '[1]'::vector`) on the live\n * connection. Executed rather than inferred from catalogs or config, per the toolchain rule\n * (\"verify a toolchain claim by executing it\") — a `pg_extension` row proves installation, not\n * that the type works on THIS connection's search path.\n * - **MongoDB** → ERROR unconditionally: the Mongo chunk store is gated on the 8.2 + mongot infra\n * bump ({@link MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}).\n *\n * Fail-closed ERROR (never a warning), because the failure mode is not a degraded feature: an\n * application that has already WRITTEN chunk rows and then lost its store cannot honour an erasure\n * — the chunks hold copies of subject text that no removal seam can reach. Refusing to boot is the\n * only posture under which that dead-end cannot silently accumulate.\n *\n * An application with NO `.ragSource()` fields probes nothing and passes — the probe must never\n * force a database connection an application does not use.\n *\n * Async and separate from the sync collector tiers for the same reason as\n * {@link validateInitializedRuntimeTransactionReadiness}: it talks to a live database.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies would be unreachable by the erasure seams.\n */\n public async validateInitializedRagStoreCapability(): Promise<void> {\n const issues = await this.collectRagStoreCapabilityIssues();\n this.reportValidationResult(buildValidationResult(issues));\n }\n\n private async collectRagStoreCapabilityIssues(): Promise<ConfigurationValidationIssue[]> {\n if (!this.ragSourceFieldDetection) {\n // No detection service bound (minimal harness) — nothing can be asserted either way.\n return [];\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n const ragResourcesByAdapter = new Map<string, string[]>();\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n let hasRagFields: boolean;\n try {\n hasRagFields = this.ragSourceFieldDetection.hasRagSourceFields(resourceType);\n } catch (error) {\n // Detection itself refusing (incompatible/unsupported `.ragSource()` declarations) is a\n // configuration defect in its own right — surface it as this probe's ERROR rather than\n // letting an unrelated later consumer be the first to trip over it.\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `RAG source-field detection failed for resource '${String(resourceType)}': ${describeCaughtError(error)}`,\n { resourceType: String(resourceType) },\n ));\n continue;\n }\n if (!hasRagFields) continue;\n\n const resourceConfiguration = this.resourcesRegistry.tryGetResourceConfiguration(resourceType);\n\n const retentionIssue = this.collectRagSourceRetentionRefusal(resourceType, resourceConfiguration);\n if (retentionIssue) {\n issues.push(retentionIssue);\n // Already refused — do not also probe its store. The application will not boot either way,\n // and one precise diagnostic beats two that name the same resource for different reasons.\n continue;\n }\n\n const declaredAdapter = resourceConfiguration?.persistenceAdapter;\n const adapter = resolvePersistenceAdapterForConfiguration(declaredAdapter, this.appConfigService);\n const existing = ragResourcesByAdapter.get(adapter) ?? [];\n existing.push(String(resourceType));\n ragResourcesByAdapter.set(adapter, existing);\n }\n\n if (ragResourcesByAdapter.size === 0) {\n return issues;\n }\n\n for (const [adapter, resourceTypes] of ragResourcesByAdapter) {\n /**\n * Classified through the SAME total map the routing store uses\n * (`RAG_CHUNK_STORE_HOSTING_BY_ADAPTER`), so the boot refusal and the runtime refusal cannot\n * disagree about which adapters can hold chunks — and so a NEW adapter is a compile error at\n * that map rather than a silent arrival in the \"unrecognised\" branch here, where it would be\n * reported as a typo instead of as a capability decision.\n */\n const hosting = resolveRagChunkStoreHosting(adapter);\n if (hosting === undefined) {\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on unrecognised persistence adapter `\n + `'${adapter}' — no RAG chunk store exists for it.`,\n { resourceTypes, adapter },\n ));\n continue;\n }\n switch (hosting) {\n case RagChunkStoreHosting.POSTGRESQL:\n issues.push(...await this.probePostgresVectorCapability(resourceTypes));\n break;\n case RagChunkStoreHosting.MONGODB:\n issues.push(...await this.probeMongodbSearchCapability(resourceTypes));\n break;\n case RagChunkStoreHosting.NONE:\n // A DECLARED adapter with no chunk store — there is nothing to PROBE, and that is the\n // point: the refusal is about the adapter's nature, not about a reachable dependency.\n issues.push(issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on persistence adapter `\n + `'${adapter}', which cannot host chunk rows. A chunk store holds COPIES of field text that every `\n + 'removal seam must be able to delete, and this adapter owns no local rows to delete — so chunks '\n + 'derived from these resources would be unreachable by every erasure path. Remove the .ragSource() '\n + 'declarations, or move these resources to a PostgreSQL- or MongoDB-backed adapter.'\n /*\n * HTTP_API earns one extra sentence, and it is guidance rather than a second refusal.\n *\n * The generic text above says what is wrong; for a READ-THROUGH resource it stops one step short\n * of what to do instead, and \"move it to a PostgreSQL-backed adapter\" is not the answer — the\n * whole point of the resource is that its rows live elsewhere. RAG over remote content is designed\n * to ride a locally MATERIALIZED copy, where every existing RAG mechanism applies unchanged.\n *\n * Appended to the ONE typed refusal rather than restored as a separate `if (adapter ===\n * HTTP_API)` branch: the adapter→hosting map is the single place that decision belongs, and a\n * second branch beside it would be a second answer to the same question.\n */\n + (adapter === PersistenceAdapter.HTTP_API\n ? ' This resource is read-through: it has no local write path for ingestion, no local rows for the '\n + 'reconciliation sweep to enumerate, and no local rows for the erasure seams to key chunk removal to. '\n + 'RAG over remote content arrives with partial-resource coverage, where the declared field is a locally '\n + 'MATERIALIZED copy of the remote field and the ordinary RAG machinery applies '\n + '(partial-resource-coverage paper).'\n : ''),\n { resourceTypes, adapter },\n ));\n break;\n }\n }\n\n return issues;\n }\n\n /**\n * DL3 at the tier the risk actually lives on: a resource that declares BOTH a `.ttl()` field and\n * a `.ragSource()` field is refused, whichever fields they are.\n *\n * ## Why the field-level decorator refusal was not enough (corrected 2026-08-27)\n *\n * `RAG_SOURCE_REFUSED_COMPANIONS` in `zod.module-override.ts` refuses `.ttl()` and `.ragSource()`\n * on the SAME field, and four documents recorded that as closing DL3. It does not, because the\n * two decorators essentially cannot meet there: `.ttl()`'s applicable types are\n * `['ZodDate','ZodOptional']` and `.ragSource()`'s are `['ZodString','ZodOptional','ZodNullable','ZodDefault']`.\n * The reachable configuration is the ORDINARY one —\n *\n * expiresAt: z.date().ttl({ expireAfterSeconds: 0 }),\n * notes: z.string().ragSource(),\n *\n * — two different fields of one resource, which the field-level check cannot see. **A Mongo TTL\n * index deletes the WHOLE DOCUMENT** (`hasTtl` → `expires` in the Mongoose convertor) with zero\n * application code running: no hook, no cascade, no post-commit effect, so the row's chunks —\n * copies of its text — survive it permanently. The risk is scoped to the ROW; the refusal was\n * scoped to the FIELD.\n *\n * On PostgreSQL `.ttl()` renders only a `comment on column` and the framework retention sweep\n * performs the deletes, which DOES call the chunk-removal seam. So today's exposure is\n * MongoDB-only and is additionally masked by the Mongo arm below refusing every Mongo-backed\n * `.ragSource()` resource pending {@link MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}. That masking is\n * exactly why this is worth fixing now: it opens the day the Mongo adapter lands, in a change\n * whose author will have no reason to re-derive this reasoning.\n *\n * ## Why THIS enforcement point, and what was rejected\n *\n * **Chosen: the startup capability probe.** It is the earliest point that can ask BOTH existing\n * authorities — `collectRagSourceFieldSchemaMetadata` (through the detection service, cached) and\n * `collectResourceRetentionPolicies` — rather than re-deriving either, and it already walks every\n * registered resource. Its refusal is fail-closed at boot, before any process serves traffic or\n * runs a batch.\n *\n * **Rejected: `validateDecoratorCombinations` in the resource-configuration factory**\n * (`resources-config.shared.factory.ts`), which is genuinely earlier — module load — and is where\n * this repository's other resource-level decorator refusals live. It cannot reach either\n * authority: both live in `saas-backend-lib`, and the factory is in `saas-models`, which\n * `saas-backend-lib` depends ON. A factory check would therefore need a THIRD derivation of\n * \"which fields declare a RAG source\", and the only cheap form available there — `getRagSourceConfig`\n * over the top-level `getZodObjectShape`, the shape every neighbouring check in that function\n * uses — is TOP-LEVEL ONLY. It would miss a nested declaration (`profile.bio`), i.e. under-detect,\n * i.e. fail OPEN in a refusal. Moving the walker into `saas-models` would fix that and is the\n * right long-term shape, but it is a public-entrypoint reshape touching every RAG consumer, not\n * a fix to this finding.\n *\n * The field-level refusal is KEPT — it is cheap, correct, and catches the one configuration this\n * check would only report at boot rather than at authoring time.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies could outlive the row they were derived from, unreachably.\n */\n private collectRagSourceRetentionRefusal(\n resourceType: string,\n resourceConfiguration: { mainSchema?: unknown } | undefined,\n ): ConfigurationValidationIssue | undefined {\n const mainSchema = resourceConfiguration?.mainSchema;\n if (!mainSchema) return undefined;\n\n const policies = collectResourceRetentionPolicies(mainSchema as never);\n if (policies.length === 0) return undefined;\n\n const ragFieldNames = this.ragSourceFieldDetection\n ? this.ragSourceFieldDetection.detectRagSourceFields(resourceType as never).map((field) => field.fieldName)\n : [];\n\n return issueError(\n ConfigurationValidationDomain.RAG,\n `Resource '${String(resourceType)}' declares BOTH row retention (.ttl() on `\n + `[${policies.map((policy) => policy.fieldName).join(', ')}]) and RAG source fields `\n + `([${ragFieldNames.join(', ')}]). Refused (plan resource-rag-capability DL3): a store that expires rows `\n + 'NATIVELY — MongoDB\\'s TTL monitor deletes the whole document — runs no application code, so no hook, '\n + 'cascade or post-commit effect can remove the derived chunks, and they keep serving copies of the '\n + 'expired row\\'s text forever. Note the refusal is at RESOURCE level because the risk is: the .ttl() '\n + 'field and the .ragSource() field are ordinarily DIFFERENT fields of the same row. '\n + 'Remove the .ragSource() declarations, or drop the .ttl() and let the framework retention sweep '\n + 'perform the deletes (it calls the chunk-removal seam). '\n + 'THE DOOR: this refusal lifts when the backstop reconciliation sweep reconciles chunk sets against '\n + 'vanished parent rows, at which point natively-expired rows become a bounded serving window instead '\n + 'of a permanent leak.',\n { resourceType: String(resourceType), retentionFields: policies.map((policy) => policy.fieldName), ragSourceFields: ragFieldNames },\n );\n }\n\n /**\n * EXECUTE a search-index command on the live MongoDB connection — the `mongot` half of the RAG\n * store capability probe, and the sibling of {@link probePostgresVectorCapability}.\n *\n * ## Reachability is PROVEN, never inferred, and never dispatched on a brand\n *\n * `MongoDBService.verifySearchCapability` runs `$listSearchIndexes`, which `mongod` PROXIES to\n * `mongot`. A version string cannot answer this question: a MongoDB 8.2 server with search NOT\n * configured reports 8.2 truthfully and throws `SearchNotEnabled`; a configured-but-down `mongot`\n * reports the same version and fails as a connection error; and a Mongo-compatible managed service\n * reports a MongoDB version it did not implement. This is the toolchain baseline's rule (\"verify a\n * claim by executing it\") applied to a second process rather than to a compiler.\n *\n * `aws-documentdb` — the documented managed Mongo-compatible backing service — cannot run\n * `mongot` and therefore fails this probe NATURALLY, on the same command, for the same reason a\n * mis-configured self-managed deployment does. There is deliberately no provider-name check: that\n * would be a second, hand-maintained list of which products have search, wrong the day one of them\n * gains it and silently wrong the day a self-managed deployment loses its sidecar.\n *\n * Fail-closed ERROR for the same reason as the PostgreSQL arm: an application that has already\n * WRITTEN chunk documents and then lost its store cannot honour an erasure, because the chunks\n * hold copies of subject text that no removal seam can reach.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — refuses a configuration whose derived\n * subject-text copies would be unreachable by the erasure seams.\n */\n private async probeMongodbSearchCapability(resourceTypes: string[]): Promise<ConfigurationValidationIssue[]> {\n if (!this.mongoDBService) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on MongoDB-backed storage, but no `\n + 'MongoDB database service is bound in this container — their chunk store would be unreachable, which '\n + 'is an erasure dead-end the moment a chunk document exists.',\n { resourceTypes },\n )];\n }\n try {\n await this.mongoDBService.verifySearchCapability();\n return [];\n } catch (error) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on MongoDB-backed storage, but the `\n + 'MongoDB Search capability probe FAILED on the live connection '\n + `($listSearchIndexes → ${describeCaughtError(error)}). `\n + 'RAG on MongoDB is served by native $vectorSearch/$search, which require MongoDB 8.2 or later WITH the '\n + 'separate `mongot` process configured and reachable (it mirrors the collection through change streams). '\n + 'Configure a search-capable deployment, move these resources to PostgreSQL, or remove the .ragSource() '\n + `declarations. Note a Mongo-COMPATIBLE managed service (aws-documentdb) cannot run mongot and will always `\n + `fail this probe. Fail-closed: if this application has already written chunk documents, a store that `\n + `stopped answering is an erasure dead-end, so booting without it would let unreachable copies of subject `\n + `text accumulate. Background: ${MONGODB_RAG_CHUNK_STORE_TRACKING_ISSUE}.`,\n { resourceTypes },\n )];\n }\n }\n\n /** EXECUTE a pgvector expression on the live PostgreSQL connection (see the probe's JSDoc). */\n private async probePostgresVectorCapability(resourceTypes: string[]): Promise<ConfigurationValidationIssue[]> {\n if (!this.postgreSQLDatabaseService) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on PostgreSQL-backed storage, but no `\n + 'PostgreSQL database service is bound in this container — their chunk store would be unreachable, which '\n + 'is an erasure dead-end the moment a chunk row exists.',\n { resourceTypes },\n )];\n }\n try {\n await this.postgreSQLDatabaseService.verifyVectorCapability();\n return [];\n } catch (error) {\n return [issueError(\n ConfigurationValidationDomain.RAG,\n `Resources [${resourceTypes.join(', ')}] declare .ragSource() fields on PostgreSQL-backed storage, but the `\n + 'pgvector capability probe FAILED on the live connection '\n + `(select '[1]'::vector → ${describeCaughtError(error)}). `\n + 'The application database must have the pgvector extension available and created '\n + '(`CREATE EXTENSION IF NOT EXISTS vector` — provisioned per application database by the platform '\n + 'PostgreSQL manager; the baseline image is pgvector/pgvector:pg17). Fail-closed: if this application has '\n + 'already written chunk rows, a store that stopped answering is an erasure dead-end, so booting without it '\n + 'would let unreachable copies of subject text accumulate.',\n { resourceTypes },\n )];\n }\n }\n\n /**\n * Log warnings and throw a consolidated error if any ERROR-severity\n * issues were collected.\n */\n private reportValidationResult(result: ConfigurationValidationResult): void {\n const warnings = result.issues.filter((i) => i.severity === ConfigurationValidationSeverity.WARNING);\n const errors = result.issues.filter((i) => i.severity === ConfigurationValidationSeverity.ERROR);\n\n for (const warning of warnings) {\n this.logger.warn(`[${warning.domain}] ${warning.message}`, warning.context);\n }\n\n if (errors.length === 0) {\n if (warnings.length > 0) {\n this.logDebug(`Post-registry validation completed with ${warnings.length} warning(s)`);\n }\n return;\n }\n\n const errorMessages = errors.map((e) => ` [${e.domain}] ${e.message}`).join('\\n');\n\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Post-registry configuration validation failed with ${errors.length} error(s):\\n` +\n errorMessages,\n errorCount: errors.length,\n warningCount: warnings.length,\n domains: [...new Set(errors.map((e) => e.domain))],\n },\n });\n }\n\n private assertNoRemovedGlobalAuthFields(auth: AppConfiguration_Shared_Auth): void {\n const rawAuth = auth as Record<string, unknown> | undefined;\n const removedFields = [\n 'mfaPolicy',\n 'authMethodsEnabled',\n 'autoLinkByEmail',\n 'registration',\n 'passwordPolicy',\n 'methodManagement',\n 'sessionDurationMinutes',\n 'magicLink',\n 'smsOtp',\n ] as const;\n\n const foundDeprecated = removedFields.filter((field) => rawAuth && field in rawAuth);\n if (foundDeprecated.length === 0) {\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Deprecated auth config fields detected: ${foundDeprecated.join(', ')}. ` +\n `These fields were removed in W6.8. Migrate them to userTypes[typeName].auth.* ` +\n `(see entity-identity-config.shared.schemas.ts → UserTypeAuthPolicySchema). ` +\n `Remove them from your auth config and configure per-user-type auth policies instead.`,\n },\n });\n }\n\n private validateUserTypeAuthConsistency(config: AppConfiguration): void {\n const userTypes = config.userTypes ?? {};\n const frontendServices = config.frontendServices ?? {};\n\n for (const [typeName, typeDef] of Object.entries(userTypes)) {\n const typeAuth = (typeDef as Record<string, any>)?.auth;\n if (!typeAuth) {\n continue;\n }\n\n if (typeAuth.mfaPolicy?.requireMFA) {\n const secondFactorMethods = AuthUtils.getSecondFactorMethods();\n const hasEnabled = secondFactorMethods.some((method) => !!typeAuth.authMethodsEnabled?.[method]);\n if (!hasEnabled) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Config deadlock: userTypes.${typeName}.auth.mfaPolicy.requireMFA is true ` +\n `but no second-factor method is enabled in authMethodsEnabled. ` +\n `Enable at least one of: ${secondFactorMethods.join(', ')}`,\n },\n });\n }\n }\n\n const acceptableMethods = typeAuth.mfaPolicy?.acceptableMFAMethods ?? [];\n for (const method of acceptableMethods) {\n if (!typeAuth.authMethodsEnabled?.[method]) {\n this.logger.warn(\n `userTypes.${typeName}: acceptableMFAMethods includes '${method}' but it is not enabled in authMethodsEnabled`,\n );\n }\n // S0.1: a method that is INTRINSICALLY first-factor-only can never be a second factor, whatever the\n // app config says. `AUTH_METHOD_FACTOR_MAP` pins SSO redirect flows (ORG_SAML / ORG_OPENID_CONNECT /\n // EXTERNAL_OAUTH2) plus PASSWORD and MAGIC_LINK as FIRST_ONLY — SSO deliberately so, because an IdP\n // redirect is not an MFA ceremony (B-SEC-1). Listing one here is silently INERT at runtime:\n // `_getAvailableSecondFactorMethods` derives its candidates from `AuthUtils.getSecondFactorMethods()`\n // and uses `acceptableMFAMethods` only as a NARROWING filter, so such an entry can never add the\n // method — it can only subtract real ones. Warn so the author learns that instead of trusting a\n // second factor that was never in force.\n if (!AuthUtils.canBeSecondFactor(method)) {\n this.logger.warn(\n `userTypes.${typeName}: acceptableMFAMethods includes '${method}', which is ` +\n `${AuthUtils.getFactorType(method)} and can NEVER act as a second factor — the entry has no effect. ` +\n `Second-factor-capable methods are: ${AuthUtils.getSecondFactorMethods().join(', ')}.`,\n );\n }\n }\n\n // S0.1 (deadlock variant): the block above throws when requireMFA is set and NO second-factor method is\n // enabled at all. This is the same deadlock reached a different way — second factors ARE enabled, but\n // `acceptableMFAMethods` filters every one of them out (e.g. it lists only SSO methods, or only methods\n // left disabled). The runtime then resolves an EMPTY `usableSecondFactorMethods` while `requiresMFA`\n // stays true, and `_isAuthenticationComplete` refuses to complete a first-factor-only session forever:\n // every user of this type is locked out, and the MFA challenge screen can only render its `no_methods`\n // error. Fail at STARTUP with the same CONFIGURATION severity as the sibling deadlock rather than\n // letting it surface as an unexplained per-user lockout in production.\n if (typeAuth.mfaPolicy?.requireMFA && acceptableMethods.length > 0) {\n // The predicate must mirror `_resolveUsableMfaMethods` EXACTLY, including its final\n // `requireStrongMFA` step, or this validation gives false assurance. That step drops EMAIL_OTP from\n // the usable set, so `requireStrongMFA` + `acceptableMFAMethods:[EMAIL_OTP]` resolves to an empty\n // usable list at runtime even though EMAIL_OTP is both second-factor-capable AND enabled — the exact\n // lockout this check exists to prevent, reached by a third route. (EMAIL_OTP is the only method the\n // runtime strips; if that ever generalises to a \"weak methods\" set, generalise this alongside it.)\n const requireStrongMFA = !!typeAuth.mfaPolicy?.requireStrongMFA;\n const usableAcceptable = acceptableMethods.filter(\n (method: AuthMethod) =>\n AuthUtils.canBeSecondFactor(method)\n && !!typeAuth.authMethodsEnabled?.[method]\n && !(requireStrongMFA && method === AuthMethod.EMAIL_OTP),\n );\n if (usableAcceptable.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `Config deadlock: userTypes.${typeName}.auth.mfaPolicy.requireMFA is true but ` +\n `acceptableMFAMethods (${acceptableMethods.join(', ')}) leaves no method that is ` +\n `second-factor-capable, enabled in authMethodsEnabled` +\n (requireStrongMFA ? `, and strong (requireStrongMFA excludes ${AuthMethod.EMAIL_OTP})` : '') +\n `. Every user of this type would be unable to complete MFA. Include at least one enabled ` +\n `method from: ${AuthUtils.getSecondFactorMethods()\n .filter((method) => !(requireStrongMFA && method === AuthMethod.EMAIL_OTP))\n .join(', ')}, or drop acceptableMFAMethods to accept all enabled ones.`,\n },\n });\n }\n }\n\n if (typeAuth.mfaPolicy?.requireMFA && typeAuth.mfaPolicy?.enrollmentGracePeriodDays === 0) {\n const emailVerification = (typeAuth.registration as Record<string, any> | undefined)?.emailVerification;\n if (emailVerification === 'deferred') {\n this.logger.warn(\n `userTypes.${typeName}: enrollmentGracePeriodDays=0 with emailVerification=deferred — users must enroll MFA immediately on deferred-verified accounts (valid but poor UX)`,\n );\n }\n }\n\n const registrationMode = typeAuth.registration?.mode as RegistrationMode | undefined;\n if (!registrationMode) {\n continue;\n }\n\n const allowsSelfServiceRegistration = isRegistrationAcquisitionAllowed(\n registrationMode,\n RegistrationAcquisitionChannel.PUBLIC_SELF_SERVICE,\n );\n for (const [frontendServiceName, frontendServiceConfig] of Object.entries(frontendServices)) {\n const userManagement = (frontendServiceConfig as Record<string, any>)?.usersManagement?.[typeName];\n if (!userManagement) {\n continue;\n }\n\n if (!allowsSelfServiceRegistration && userManagement.register) {\n this.logger.warn(\n `userTypes.${typeName}: registration.mode='${registrationMode}' blocks self-service registration but frontendServices.${frontendServiceName}.usersManagement.${typeName}.register=true — registration will be blocked at API level`,\n );\n }\n if (allowsSelfServiceRegistration && !userManagement.register) {\n this.logger.warn(\n `userTypes.${typeName}: registration.mode='${registrationMode}' but frontendServices.${frontendServiceName}.usersManagement.${typeName}.register=false — registration will be blocked at frontend service level`,\n );\n }\n }\n }\n }\n\n private validateFrontendServiceRuntimeBindings(config: AppConfiguration): void {\n const frontendServices = Object.entries(config.frontendServices ?? {});\n if (frontendServices.length === 0) {\n return;\n }\n\n for (const [frontendServiceName, frontendServiceConfig] of frontendServices) {\n const runtimeEndpoint = config.runtime?.endPoints?.[frontendServiceName];\n if (!runtimeEndpoint?.publicUrl || !runtimeEndpoint?.internalUrl) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n `frontendServices.${frontendServiceName} is declared but runtime.endPoints.${frontendServiceName} ` +\n `is missing a matching publicUrl/internalUrl binding. Runtime topology must materialize every declared frontend service.`,\n frontendServiceName,\n },\n });\n }\n }\n }\n\n private warnOnMultipleDefaultUserTypes(config: AppConfiguration): void {\n for (const [frontendServiceName, frontendServiceConfig] of Object.entries(config.frontendServices ?? {})) {\n const userManagement = (frontendServiceConfig as Record<string, any>)?.usersManagement ?? {};\n const defaultEntries = Object.entries(userManagement).filter(([, value]) => (value as Record<string, any>)?.isDefault);\n if (defaultEntries.length > 1) {\n this.logger.warn(\n `frontendServices.${frontendServiceName}: multiple isDefault:true entries in usersManagement: ${defaultEntries.map(([key]) => key).join(', ')}. Only the first will be used for user-type resolution.`,\n );\n }\n }\n }\n\n private warnOnDuplicateClaimedDomains(config: AppConfiguration): void {\n const domainClaimMap = new Map<string, string[]>();\n\n for (const [orgTypeName, orgTypeDef] of Object.entries(config.organizationTypes ?? {})) {\n const claimedDomains = (orgTypeDef as Record<string, any>)?.sso?.claimedDomains as string[] | undefined;\n if (!claimedDomains) {\n continue;\n }\n\n for (const domain of claimedDomains) {\n const normalizedDomain = domain.toLowerCase();\n const orgTypes = domainClaimMap.get(normalizedDomain) ?? [];\n orgTypes.push(orgTypeName);\n domainClaimMap.set(normalizedDomain, orgTypes);\n }\n }\n\n for (const [domain, orgTypeNames] of domainClaimMap.entries()) {\n if (orgTypeNames.length > 1) {\n this.logger.warn(\n `E-VER-9: Domain \"${domain}\" is claimed by multiple organization types: ${orgTypeNames.join(', ')}. Domain-to-org resolution will be non-deterministic.`,\n );\n }\n }\n }\n\n private warnOnBroadAutoLinkSocialOAuth2(config: AppConfiguration): void {\n const socialOAuth2Providers = config.auth?.socialOAuth2Providers ?? {};\n const socialProvidersWithEmptyDomains = Object.entries(socialOAuth2Providers)\n .filter(([, providerConfig]) => {\n const typedConfig = providerConfig as Record<string, any>;\n return isEnabledSocialOAuth2LoginProvider(typedConfig)\n && (!typedConfig.allowedDomains || typedConfig.allowedDomains.length === 0);\n })\n .map(([providerName]) => providerName);\n\n if (socialProvidersWithEmptyDomains.length === 0) {\n return;\n }\n\n for (const [typeName, typeDef] of Object.entries(config.userTypes ?? {})) {\n const autoLinkByEmail = (typeDef as Record<string, any>)?.auth?.autoLinkByEmail;\n if (autoLinkByEmail === true || autoLinkByEmail === undefined) {\n this.logger.warn(\n `E-VER-11: userTypes.${typeName}.auth.autoLinkByEmail is true (or defaulted) and social OAuth2 providers [${socialProvidersWithEmptyDomains.join(', ')}] have empty allowedDomains. Any verified email from these IdPs can auto-link to existing accounts.`,\n );\n }\n }\n }\n\n // ─── Storage ────────────────────────────────────────────────────────────\n\n private collectStorageIssues(): ConfigurationValidationIssue[] {\n const allResourceTypes = this.resourcesRegistry.getResourceTypes();\n if (allResourceTypes.length === 0) {\n return [];\n }\n\n const envHints: Record<string, string> = {\n // Managed storage no longer takes a credential from env — it fetches\n // short-lived, prefix-confined sessions from apps-manager — so the hint\n // names the endpoint plus the bootstrap contract that authenticates that\n // fetch. Naming the retired `STORAGE_ACCESS_KEY` / `STORAGE_SECRET_KEY`\n // here would send an operator hunting for variables the platform\n // deliberately no longer emits, and `isConfigured()` gates on exactly the\n // set below.\n [FileStorageAccepted.WILDO_MANAGED]:\n 'STORAGE_ENDPOINT, PLATFORM_APPS_MANAGER_URL, PLATFORM_APPLICATION_PRIMARY_SECRET, APPLICATION_ID',\n [FileStorageAccepted.LOCAL_DIRECTORY]: 'STORAGE_LOCAL_BASE_DIR',\n };\n\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of allResourceTypes) {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n continue;\n }\n\n for (const field of fileFields) {\n const accepted = field.fileMetadata.storageAccepted;\n const fieldRef = `${resourceType}.${field.fieldName}`;\n\n if (!accepted || accepted.length === 0) {\n const provider = this.fileStorageRouter.getProviderById(FileStorageAccepted.WILDO_MANAGED);\n if (!provider || !provider.isConfigured()) {\n const hint = envHints[FileStorageAccepted.WILDO_MANAGED];\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldRef}: no storageAccepted specified and default WILDO_MANAGED is not configured — set ${hint}`,\n { fieldRef, storageAccepted: [FileStorageAccepted.WILDO_MANAGED] },\n ));\n }\n } else {\n const hasSatisfied = accepted.some((provId) => {\n const p = this.fileStorageRouter.getProviderById(provId);\n return p?.isConfigured() ?? false;\n });\n if (!hasSatisfied) {\n const hints = accepted.map((p) => envHints[p] ?? p).join(' or ');\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldRef}: accepts [${accepted.join(', ')}] but none are configured — set ${hints}`,\n { fieldRef, storageAccepted: [...accepted] },\n ));\n }\n }\n }\n }\n\n return issues;\n }\n\n // ─── Scanning (ClamAV) ──────────────────────────────────────────────────\n\n /**\n * Refuse to boot an application whose file fields DECLARE a required scan with nothing to scan them.\n *\n * Keyed on the per-field `scanPolicy: 'required'` declaration only, and that is complete rather than a\n * gap — the reasoning is worth recording because the obvious second branch is dead code.\n *\n * `FileScanningBackendService.isGlobalScanningEnabled()` (the application-wide default for a field that\n * declares no policy) is DERIVED from the scanner topology: it is\n * `clamavScanner.isConfigured() || yaraScanner.isEnabled()`. So \"scanning is globally on and no scanner\n * is reachable\" is not a state this configuration can be in, and a branch reporting it would be\n * `false && …` at every boot of every application — a check that can never fire, which reports a clean\n * configuration and a broken checker identically. It was considered on 2026-09-09, when the dead global\n * switch was repaired, and deliberately not added; it becomes necessary the day that switch is turned\n * back into a separately-declared boolean, which is one of the three reasons it was not.\n *\n * The remaining route into \"a scan was requested with no scanner\" is therefore exactly the per-field\n * declaration this collector already walks — plus any field this walk MISSES, which the `catch\n * { continue; }` below makes possible and which is why `executeScan` also refuses at runtime rather\n * than trusting that boot has already answered.\n *\n * ClamAV specifically, not \"any scanner\": YARA is a pattern layer documented as running on top of\n * signature AV, not a replacement for it, so a `required` field is not satisfied by YARA alone. That is\n * a posture, not an oversight — relaxing it would let an application satisfy `scanPolicy: 'required'`\n * with no signature scanning at all.\n */\n private collectScanningIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n const allResourceTypes = this.resourcesRegistry.getResourceTypes();\n const fieldsRequiringScan: string[] = [];\n\n for (const resourceType of allResourceTypes) {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n continue;\n }\n\n for (const field of fileFields) {\n if (field.fileMetadata.scanPolicy === 'required') {\n fieldsRequiringScan.push(`${resourceType}.${field.fieldName}`);\n }\n }\n }\n\n if (fieldsRequiringScan.length === 0) {\n return issues;\n }\n\n if (!this.clamavScanner.isConfigured()) {\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n `${fieldsRequiringScan.length} z_file() field(s) declare scanPolicy: 'required' but ClamAV is not configured — set CLAMAV_HOST and CLAMAV_PORT`,\n { fields: fieldsRequiringScan, hint: 'Set CLAMAV_HOST env var or remove scanPolicy from z_file() declarations' },\n ));\n }\n\n return issues;\n }\n\n // ─── YARA (platform-level pattern scanning) ─────────────────────────\n\n private collectYaraIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n if (!this.yaraScanner.isExplicitlyEnabled()) return issues;\n\n if (!this.yaraScanner.isConfigured()) {\n issues.push(issueError(\n ConfigurationValidationDomain.STORAGE,\n 'YARA_ENABLED is true but YARA_HOST is not set — the YARA scanner service is unreachable',\n { hint: 'Set YARA_HOST to the YARA scanner Docker service hostname (e.g., yara-scanner)' },\n ));\n }\n\n return issues;\n }\n\n // ─── Authentication persistence boundaries ─────────────────────────────\n\n /**\n * One registering user type may own at most one automatic organization\n * creation policy. The shared schema enforces this for parsed declarations;\n * this initialized-runtime border intentionally repeats the same canonical\n * lookup so programmatic or otherwise type-erased configuration cannot boot\n * into a frontend/backend ambiguity.\n */\n private collectOrganizationRegistrationCreationPolicyIssues(config?: AppConfiguration): ConfigurationValidationIssue[] {\n if (!config) return [];\n\n const authoredUserTypes = new Set<string>();\n for (const organizationType of Object.values(\n config.organizationTypes ?? {},\n )) {\n for (\n const userType\n of organizationType.creationPolicy\n ?.createOnUserTypeRegistration ?? []\n ) {\n authoredUserTypes.add(userType);\n }\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n for (const userType of [...authoredUserTypes].sort()) {\n const matches = findOrganizationTypeRegistrationCreationMatches(\n config.organizationTypes,\n userType,\n );\n if (matches.length <= 1) continue;\n\n issues.push(issueError(\n ConfigurationValidationDomain.AUTH,\n `User type '${userType}' is assigned to multiple organization-creation `\n + `policies [${matches\n .map((match) => match.organizationType).join(', ')}]. `\n + 'Registration must resolve exactly one organization type.',\n {\n reason:\n 'registration_user_type_has_ambiguous_organization_creation_policy',\n userType,\n matchingOrgTypes: matches.map((match) => match.organizationType),\n },\n ));\n }\n\n return issues;\n }\n\n /**\n * Build the complete set of identity transactions reachable from authored\n * application capabilities.\n *\n * Runtime methods use the same request builders. Startup intentionally\n * validates the broadest supported variant of each enabled boundary (for\n * example optional password creation is still part of self-registration's\n * capability) so a configuration cannot boot with only a subset of one\n * feature working.\n */\n private collectEnabledAuthenticationPersistenceBoundaryRequests(config: AppConfiguration): ResourcePersistenceUnitOfWorkRequest[] {\n const requests: ResourcePersistenceUnitOfWorkRequest[] = [];\n const userTypeEntries = Object.entries(config.userTypes ?? {});\n const selfRegistrationUserTypes = userTypeEntries\n .filter(([, definition]) =>\n isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.PUBLIC_SELF_SERVICE,\n )\n /*\n * Any method whose signup runs through `createSelfRegistrationPersistenceRequest`, not\n * PASSWORD alone (#463).\n *\n * MAGIC_LINK and PASSKEY gained public registration and use the SAME persistence path — they\n * differ only in holding no credential and minting a link afterwards. Left as `PASSWORD`\n * alone, an application enabling ONLY password-less signup would not have this boundary\n * declared, and its first registration would fail at the transaction rather than at\n * configuration time.\n *\n * EXTERNAL_OAUTH2 is deliberately NOT here: social JIT creation has its own boundary\n * request, collected below.\n */\n && definition.auth.registration.allowedMethods.some((method) =>\n method === AuthMethod.PASSWORD\n || method === AuthMethod.MAGIC_LINK\n || method === AuthMethod.PASSKEY,\n ),\n )\n .map(([userType]) => userType);\n\n if (selfRegistrationUserTypes.length > 0) {\n const eligibleUserTypes = new Set(selfRegistrationUserTypes);\n const reachableOrganizationCreationPolicies = Object.values(\n config.organizationTypes ?? {},\n )\n .map((definition) => definition.creationPolicy)\n .filter(\n (policy): policy is NonNullable<typeof policy> =>\n policy !== undefined\n && policy.createOnUserTypeRegistration.some(\n (userType) => eligibleUserTypes.has(userType),\n ),\n );\n const hasSynchronousOrganizationCreation =\n reachableOrganizationCreationPolicies.some(\n (policy) =>\n policy.orgNameSource !== OrganizationNameSource.ONBOARDING,\n );\n const hasDeferredOrganizationOnboarding =\n reachableOrganizationCreationPolicies.some(\n (policy) =>\n policy.orgNameSource === OrganizationNameSource.ONBOARDING,\n );\n requests.push(createSelfRegistrationPersistenceRequest({\n // PASSWORD is an allowed method. Even when a particular call omits it,\n // the authored self-registration capability includes credential writes.\n includeCredentials: true,\n includeSynchronousOrganizationCreation:\n hasSynchronousOrganizationCreation,\n }));\n if (hasDeferredOrganizationOnboarding) {\n requests.push(\n createDeferredOrganizationOnboardingPersistenceRequest(),\n );\n }\n }\n\n // Invitation acceptance has identity-level persistence boundaries distinct\n // from the organization-member CREATE operation. The presence of an\n // organization type makes these boundaries reachable even when all its\n // grant modes are ADMIN_ONLY/DISABLED: invitation policy applies only to\n // newly acquired user types, so an existing holder (or an org type with no\n // grants) can still be invited. There is currently no authored global\n // invitation-disable switch. Invitation issuance itself is validated\n // exactly once by the generic resource-operation transaction resolver below\n // (operation resource + declared custom participants + framework token\n // participant).\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(\n createPublicInvitationAcceptancePersistenceRequest({\n includeCredentials:\n isPublicInvitationPasswordCredentialReachable(config),\n }),\n createAuthenticatedInvitationAcceptancePersistenceRequest(),\n );\n }\n\n const hasEnabledSocialProvider = Object.values(\n config.auth?.socialOAuth2Providers ?? {},\n ).some((provider) => isEnabledSocialOAuth2LoginProvider(provider));\n if (hasEnabledSocialProvider) {\n requests.push(SOCIAL_EXISTING_USER_LINK_UNIT_OF_WORK);\n const socialJitCreationEnabled = userTypeEntries.some(\n ([, definition]) =>\n definition.auth.registration.allowedMethods.includes(\n AuthMethod.EXTERNAL_OAUTH2,\n )\n && isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.SOCIAL_OAUTH_JIT,\n ),\n );\n if (socialJitCreationEnabled) {\n requests.push(SOCIAL_USER_CREATION_UNIT_OF_WORK);\n }\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(SOCIAL_INVITATION_ACCEPTANCE_UNIT_OF_WORK);\n }\n }\n\n const enterpriseProvisioningEnabled =\n userTypeEntries.some(([, definition]) =>\n isRegistrationAcquisitionAllowed(\n definition.auth.registration.mode,\n RegistrationAcquisitionChannel.ENTERPRISE_SSO_JIT,\n ),\n )\n || Object.values(config.organizationTypes ?? {}).some(\n (definition) => definition.scimProvisioning?.enabled === true,\n );\n if (enterpriseProvisioningEnabled) {\n requests.push(\n APPLICATION_USER_CREATION_UNIT_OF_WORK,\n APPLICATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n );\n if (Object.keys(config.organizationTypes ?? {}).length > 0) {\n requests.push(\n ORGANIZATION_USER_CREATION_UNIT_OF_WORK,\n ORGANIZATION_EXISTING_USER_LINK_UNIT_OF_WORK,\n );\n }\n }\n\n return requests;\n }\n\n /**\n * How FILES participates in writes to this resource, derived from the schema alone.\n *\n * A generated document must land in the SAME commit as the row that references it,\n * so it is ATOMIC and a cross-adapter boundary is refused. Ordinary file METADATA is\n * compensatable — it may commit separately, which the service layer already handles\n * and already documents as an at-least-once obligation.\n */\n /**\n * Resource-WRITE boundaries — declared separately from transaction-readiness ones,\n * and deliberately NOT mixed into them.\n *\n * `collectTransactionReadinessPersistenceRequests` feeds a live probe that opens a\n * real transaction per adapter. A write whose only extra participant is COMPENSATABLE\n * file metadata requires no transaction at all, so folding these in would claim a\n * transaction requirement that does not exist — and would report a missing unit of\n * work as \"transaction-requiring boundaries are configured\", which is false.\n *\n * These are assessed for COMPATIBILITY only. That is the whole point: it is what\n * turns \"a resource writes files across an adapter boundary\" from a per-request\n * runtime discovery into a boot-time answer.\n */\n private collectResourceWritePersistenceRequests(): ResourcePersistenceUnitOfWorkRequest[] {\n const requests: ResourcePersistenceUnitOfWorkRequest[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const fileParticipation = this.resolveResourceWriteFileParticipation(resourceType);\n if (fileParticipation === ResourceWriteFileParticipation.NONE) {\n continue;\n }\n requests.push(createResourceWritePersistenceRequest({\n resourceType: String(resourceType),\n fileParticipation,\n }));\n }\n\n return requests;\n }\n\n private resolveResourceWriteFileParticipation(\n resourceType: Parameters<FileFieldDetectionBackendService['detectFileFields']>[0],\n ): ResourceWriteFileParticipation {\n let fileFields;\n try {\n fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n } catch {\n // Detection is schema-driven; a resource it cannot read contributes no boundary\n // rather than failing startup on a diagnostic that is not itself a control.\n return ResourceWriteFileParticipation.NONE;\n }\n\n if (fileFields.length === 0) {\n return ResourceWriteFileParticipation.NONE;\n }\n\n const hasGeneratedDocument = fileFields.some(\n (fileField) => fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE,\n );\n\n return hasGeneratedDocument\n ? ResourceWriteFileParticipation.ATOMIC_MATERIALIZATION\n : ResourceWriteFileParticipation.METADATA;\n }\n\n /**\n * Collect every statically authored boundary that requires a native\n * transaction before traffic is accepted.\n *\n * Identity services declare their multi-resource units of work explicitly.\n * Resource operations additionally require a transaction when they generate\n * tokens or a custom implementation opts into `transactionalCore`.\n * Token-coupled operations include the token resource in the same request so\n * startup and runtime enforce the same adapter boundary.\n */\n private collectTransactionReadinessPersistenceRequests(config?: AppConfiguration): ResourcePersistenceUnitOfWorkRequest[] {\n const requests = [\n ...(config\n ? this.collectEnabledAuthenticationPersistenceBoundaryRequests(config)\n : []),\n ];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n\n for (const operation of resourceConfig.operations) {\n const contract =\n resolveResourceOperationTransactionPersistenceContract(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n if (!contract.request) {\n continue;\n }\n requests.push(contract.request);\n }\n }\n\n return requests;\n }\n\n /**\n * Assess every declared native transaction boundary through the same UoW\n * contract runtime execution uses.\n *\n * This deliberately stays generic. Identity boundaries and resource\n * operations contribute requests, while adapter resolution, mixed-store\n * detection, required-adapter constraints, and database availability remain\n * owned by `ResourcePersistenceUnitOfWorkBackendService`.\n */\n private collectPersistenceBoundaryCompatibilityIssues(config?: AppConfiguration): ConfigurationValidationIssue[] {\n const transactionRequiringRequests = this.collectTransactionReadinessPersistenceRequests(config);\n const resourceWriteRequests = this.collectResourceWritePersistenceRequests();\n const requests = [...transactionRequiringRequests, ...resourceWriteRequests];\n if (requests.length === 0) {\n return [];\n }\n if (!this.resourcePersistenceUnitOfWork) {\n /**\n * Unchanged semantics: a missing unit of work is only an ISSUE when a boundary\n * genuinely requires a transaction. Resource-write boundaries cannot be assessed\n * without it either, but their absence is not itself a misconfiguration — and\n * reporting one here would fire on every application that merely has file fields.\n */\n if (transactionRequiringRequests.length === 0) {\n return [];\n }\n return [issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n 'Transaction-requiring persistence boundaries are configured, but '\n + 'ResourcePersistenceUnitOfWorkService is unavailable.',\n {\n boundaries: requests.map((request) => request.boundary),\n reason: 'resource_persistence_unit_of_work_service_unavailable',\n },\n )];\n }\n\n const issues: ConfigurationValidationIssue[] = [];\n for (const request of requests) {\n const assessment = this.resourcePersistenceUnitOfWork.assessCompatibility(request);\n if (assessment.compatible) {\n continue;\n }\n\n issues.push(issueError(\n request.boundary.startsWith('resource-operation-transaction:')\n ? ConfigurationValidationDomain.LIFECYCLE\n : ConfigurationValidationDomain.AUTH,\n `Persistence boundary '${request.boundary}' cannot execute `\n + `atomically (${assessment.status}). Every named participant must `\n + 'resolve to one supported native persistence adapter.',\n {\n boundary: request.boundary,\n compatibilityStatus: assessment.status,\n participantResourceMap: assessment.participantResourceMap,\n resourceAdapterMap: assessment.resourceAdapterMap,\n unresolvedParticipantResourceMap:\n assessment.unresolvedParticipantResourceMap,\n requiredAdapter: assessment.requiredAdapter,\n selectedAdapter: assessment.selectedAdapter,\n },\n ));\n }\n return issues;\n }\n\n /**\n * Reject operation pipelines whose synchronous result-transforming terminal\n * hooks cannot be reconciled with a framework-owned transaction.\n *\n * The custom-implementation registry catches transactional-registration\n * combinations during normal initialization. This startup border repeats the\n * complete operation-level check because token generation, authentication,\n * or revocation can require a transaction even when no custom registration\n * opted into one.\n */\n private collectResourceOperationTransactionContractIssues():\n ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const contract =\n resolveResourceOperationTransactionPersistenceContract(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n if (!contract.transactionRequired) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n if (contract.overrideAllRegistrationLabels.length > 0) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Transaction-requiring operation '${operationRef}' cannot use `\n + 'OVERRIDE_ALL because that mode replaces and returns before '\n + 'the framework-owned transaction pipeline.',\n {\n operationRef,\n tokenGenerationConfigured:\n contract.tokenGeneration !== undefined,\n transactionalRegistrationLabels:\n contract.transactionalRegistrationLabels,\n overrideAllRegistrationLabels:\n contract.overrideAllRegistrationLabels,\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Validate the template side of EVERY operation email before traffic is accepted.\n *\n * ## What binds an operation to a template\n *\n * A `userNotifications` entry with `channel: EMAIL` never names its template. The dispatcher\n * DERIVES one — `email.<resource>.<operation>[.<variantKey>].<target-kebab>` — and the\n * application must ship a template folder of exactly that name. Nothing in the type system\n * connects the two: the declaration is a config object, the template is a directory.\n *\n * ## Why this used to cover only token-backed operations, and why that was the bug\n *\n * The check opened with `if (!operation.tokenGeneration) continue;`, so an operation that merely\n * NOTIFIES was never validated. Combined with dispatch being post-commit and fire-and-forget by\n * design (a mutation must not fail because an email could not render), an unresolvable ref was\n * invisible everywhere: not in typecheck, not in the suites, not at boot, not in e2e lanes that\n * drove the very operations.\n *\n * That is not hypothetical. Moving the member notification off `ORGANIZATIONS | delete` onto\n * `request_deletion` (2026-08-05) moved the declaration and left the template directory behind,\n * producing three unresolvable refs and two orphaned templates with zero signal. It was found by\n * hand, months of boots later, only because someone went looking.\n *\n * ## Why severity SPLITS rather than failing everything closed\n *\n * The consequence of a missing template genuinely differs, so the report does too:\n *\n * - **Token-backed → ERROR.** The email carries a consumable token, so failing to send does not\n * merely lose a notice — the user cannot accept the invitation or reset the password. The\n * operation is functionally broken, and starting is worse than refusing to.\n * - **Informational → WARNING.** The operation completed correctly and a courtesy notice was not\n * delivered. Refusing to START an application because a notice is unauthored trades a missing\n * email for a total outage, which is the worse failure — an application must be able to boot\n * while its notification copy is still being written.\n *\n * The warning is not a shrug. It is emitted PER unresolvable ref, names the declaring operation,\n * and prints the exact directory the application has to create — so it is actionable at the first\n * boot rather than after an audit. Silence was the defect; a specific, repeated, remediable\n * warning is not silence.\n *\n * ## Scope\n *\n * This proves that runtime dispatch can RESOLVE every authored email through the configured\n * locale chain, and that a template cannot override transactional routing with a marketing\n * provider class. It deliberately says nothing about durable delivery, which has its own\n * (best-effort, post-commit) reliability boundary.\n */\n private collectOperationEmailTemplateIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n if (\n !isApiCallOperation(operation)\n && !isApiCallWithCallbackOperation(operation)\n ) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n const emailNotifications = (operation.userNotifications ?? []).filter(\n (notification) =>\n notification.channel === CoreUserNotificationChannel.EMAIL,\n );\n // Token-backed emails carry a consumable token, so a missing template BREAKS the flow;\n // informational ones only lose a notice. Severity follows that, not uniformity.\n const isTokenBacked = Boolean(operation.tokenGeneration);\n const issueFor = isTokenBacked ? issueError : issueWarning;\n\n for (const notification of emailNotifications) {\n const templateRef = buildUserNotificationEmailTemplateRef(\n {\n resourceIdentifier: String(operation.resourceIdentifier),\n operationIdentifier: String(operation.operationIdentifier),\n ...('variantKey' in operation && operation.variantKey\n ? { variantKey: String(operation.variantKey) }\n : {}),\n },\n notification,\n );\n\n try {\n const resolvedTemplate = this.emailTemplateRegistry.resolveForConfiguredLocale(templateRef);\n const effectiveTemplateType =\n resolvedTemplate.definition.type\n ?? EmailTemplateType.TRANSACTIONAL;\n if (effectiveTemplateType !== EmailTemplateType.TRANSACTIONAL) {\n issues.push(issueFor(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation email template '${templateRef}' for `\n + `operation '${operationRef}' resolves as `\n + `${effectiveTemplateType}; operation email `\n + `delivery requires ${EmailTemplateType.TRANSACTIONAL}.`,\n {\n operationRef,\n templateRef,\n resolvedLocale: resolvedTemplate.resolvedLocale,\n effectiveTemplateType,\n requiredTemplateType: EmailTemplateType.TRANSACTIONAL,\n },\n ));\n }\n } catch (error) {\n if (\n !isWildoBackendError(error)\n || error.type !== ErrorType.CONFIGURATION\n ) {\n throw error;\n }\n issues.push(issueFor(\n ConfigurationValidationDomain.LIFECYCLE,\n `${isTokenBacked ? 'Token-backed operation' : 'Operation'} email template `\n + `'${templateRef}' for operation '${operationRef}' does not resolve through the `\n + 'configured primary/fallback locale chain'\n + (isTokenBacked\n ? ' — this email carries a consumable token, so the flow it belongs to cannot complete.'\n : ' — the operation still succeeds, but its notification is silently never delivered.')\n // The remedy, spelled out: the ref IS the directory name, and an author who has not\n // met this derivation before has no way to guess it from the declaration.\n + ` Create the template folder named '${templateRef}' `\n + '(template.tsx + labels.<locale>.ts), or remove the notification declaration.',\n { operationRef, templateRef, tokenBacked: isTokenBacked },\n ));\n }\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when a configured operation cannot fulfil the contract it declares.\n *\n * A custom operation whose `requestDto` nothing consumes does not fail — it falls through to\n * the generic core path, writes nothing, and answers **HTTP 200 with the unchanged row**. A\n * hostile e2e probe caught `organizationMembers | promote` doing that on 2026-08-01, and a\n * catalogue sweep found 41 routed operations sharing the shape (8 CRITICAL, 11 HIGH). Nothing\n * escalates, which is why every security lane stayed green — the damage is that a destructive\n * verb reports success it never performed, so every runbook, script, and UI that trusts the\n * 2xx is wrong.\n *\n * The verdict comes from `resolveResourceOperationImplementationCoverage`, the same resolver\n * the dispatcher consults before executing. Sharing it is the point: a predicate that lived in\n * two places could bless an operation at boot that still answers 2xx on the first request.\n *\n * The check is BIDIRECTIONAL, and both directions are fail-closed:\n *\n * - **unserviceable and unacknowledged** — a new silent no-op cannot ship. Implement the\n * operation, remove the declaration, or acknowledge the gap deliberately.\n * - **acknowledged but serviceable** — a stale marker cannot survive someone implementing the\n * operation, which would otherwise leave a working operation permanently refusing.\n *\n * Every violation is aggregated into one throw, so one boot surfaces the whole set rather than\n * one restart per operation.\n *\n * assurance-control: WILDO.OPERATIONS.EXECUTION_INTEGRITY — an interface must not report success for an\n * action it did not perform.\n */\n private collectUnimplementedResourceOperationIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const verdict = resolveResourceOperationImplementationCoverage(\n operation,\n this.customImplRegistry.getRegistrationsForOperation(operation),\n );\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n\n if (\n verdict.coverage === ResourceOperationImplementationCoverage.UNSERVICEABLE\n && !verdict.acknowledgement\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' is routed but nothing consumes its declared request `\n + 'contract, so it would answer a success status having performed nothing. '\n + 'Implement it (a custom implementation bound to this exact operation path, or a '\n + 'declarative side effect), remove the declaration, or declare the gap with '\n + '`unimplementedAcknowledgement` — which also makes the request fail closed.',\n {\n operationRef,\n reason: verdict.unserviceableReason,\n unconsumedRequestFields: verdict.unconsumedRequestFields,\n riskLevel: operation.riskLevel,\n resourceOperationLike: operation.resourceOperationLike,\n },\n ));\n continue;\n }\n\n if (\n verdict.coverage !== ResourceOperationImplementationCoverage.UNSERVICEABLE\n && verdict.acknowledgement\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares 'unimplementedAcknowledgement' but is `\n + 'serviceable. The acknowledgement makes every request to it fail closed, so a '\n + 'stale marker silently disables a working operation. Remove it.',\n {\n operationRef,\n coverage: verdict.coverage,\n acknowledgementReason: verdict.acknowledgement.reason,\n acknowledgementTrackingRef: verdict.acknowledgement.trackingRef,\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when an `authoritativeFields` declaration names something that is not a\n * persisted field of the resource.\n *\n * `authoritativeFields` is what carries a hook-authored value past the repository's strict\n * `requestDto` re-parse even when the caller also supplied the key. It is typed `readonly\n * string[]` rather than `keyof` the main schema, because the declaration is shared by the\n * authoring parameters and the type-erased built operation (where `keyof` collapses to `never`),\n * and because custom-implementation registrations declare plain strings with no schema generic\n * available at all.\n *\n * So the name check has to happen here. A typo is the dangerous case: a misspelled field\n * declares nothing, the hook's value silently reverts to the added-key inference, and the first\n * caller who supplies that key turns the operation back into a success response that wrote\n * nothing — the precise defect `unimplementedAcknowledgement` exists to prevent. Failing at boot\n * makes that impossible to ship.\n *\n * Both declaration sites are covered: the operation-variant `authoritativeFields` (which pairs\n * with `basicPrefixOperation`) and every custom-implementation registration bound to the\n * operation path.\n *\n * assurance-control: WILDO.SOFTWARE.AUTHORITY_INTEGRITY — a server-owned field must have exactly one named\n * authority, and that authority must be provable at boot rather than assumed.\n */\n private collectResourceOperationAuthoritativeFieldIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const declarations: { source: string; fields: readonly string[] }[] = [];\n\n const configuredFields = (\n operation as { authoritativeFields?: readonly string[] }\n ).authoritativeFields;\n if (configuredFields?.length) {\n declarations.push({ source: 'operation variant', fields: configuredFields });\n }\n\n for (const registration of this.customImplRegistry.getRegistrationsForOperation(operation)) {\n if (registration.authoritativeFields?.length) {\n declarations.push({\n source: `custom implementation '${registration.debugLabel}'`,\n fields: registration.authoritativeFields,\n });\n }\n }\n\n if (declarations.length === 0) continue;\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n const persistedFields = getPersistedFieldNames(operation);\n\n for (const declaration of declarations) {\n const unknownFields = declaration.fields.filter((field) => !persistedFields.has(field));\n if (unknownFields.length === 0) continue;\n\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares authoritativeFields `\n + `[${unknownFields.join(', ')}] on its ${declaration.source}, but `\n + `${unknownFields.length === 1 ? 'that name is not a persisted field' : 'those names are not persisted fields'} `\n + 'of the resource. A name that matches nothing declares nothing: the hook\\'s value '\n + 'falls back to being inferred from the keys it added, so the first caller who '\n + 'supplies that key makes the write silently empty while the operation still '\n + 'answers success. Fix the spelling, or drop the declaration if the field is no '\n + 'longer authored.',\n {\n operationRef,\n declarationSource: declaration.source,\n unknownFields,\n persistedFields: [...persistedFields],\n },\n ));\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Refuse to start when a custom write-like verb never authored the request contract it exposes.\n *\n * The DTO builder synthesizes a contract for an operation that does not author one, and for a\n * write-like `resourceOperationLike` that synthesis is the resource's ENTIRE create/update\n * contract. A verb then advertises far more than it names: `applicationApiKeys | deactivate`\n * accepted `status` (so it could activate) and `roles` (on a resource whose only role gate runs\n * when minting); `organizationOAuthClients | regenerate` accepted `redirectUris`.\n *\n * This is a DIFFERENT defect from an unserviceable operation and gets its own resolver — those\n * operations write nothing, these write too much, and several of these have full custom\n * implementations. `unimplementedAcknowledgement` is deliberately NOT the escape hatch here: the\n * fix is to author the contract. An operation that really does accept the whole resource\n * contract declares it explicitly, which is visible at the declaration site and in review.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least privilege applies to a request contract as\n * much as to a role.\n */\n private collectOverbroadResourceOperationRequestContractIssues(): ConfigurationValidationIssue[] {\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const resourceType of this.resourcesRegistry.getResourceTypes()) {\n const resourceConfig = this.resourcesRegistry.getResourceConfiguration(resourceType);\n for (const operation of resourceConfig.operations) {\n const verdict = resolveResourceOperationRequestContractBreadth(operation);\n if (\n verdict.breadth\n !== ResourceOperationRequestContractBreadth.OVERBROAD_INHERITED_FULL_CONTRACT\n ) {\n continue;\n }\n\n const operationRef = ApplicationStartupConfigValidatorService.buildOperationRef(operation);\n issues.push(issueError(\n ConfigurationValidationDomain.LIFECYCLE,\n `Operation '${operationRef}' declares no 'requestDto', so it inherited its resource's `\n + 'ENTIRE update contract and accepts every field listed below — including fields the '\n + 'verb contradicts. Author a `requestDto` naming exactly what the verb accepts '\n + '(`z.object({})` when the transition is server-decided) and force the transition '\n + 'from a `prefixCoreOperations` / `basicPrefixOperation` hook. If the operation '\n + 'really does accept the whole contract, declare that contract explicitly.',\n {\n operationRef,\n inheritedRequestFields: verdict.inheritedRequestFields,\n riskLevel: operation.riskLevel,\n resourceOperationLike: operation.resourceOperationLike,\n },\n ));\n }\n }\n\n return issues;\n }\n\n private static buildOperationRef(operation: {\n resourceIdentifier: unknown;\n operationIdentifier: unknown;\n variantKey?: unknown;\n }): string {\n return [\n String(operation.resourceIdentifier),\n String(operation.operationIdentifier),\n ...(operation.variantKey ? [String(operation.variantKey)] : []),\n ].join('.');\n }\n\n // ─── CLI Runtime Agents ─────────────────────────────────────────────────\n\n /**\n * Refuse at STARTUP an active coding agent whose ACP transport cannot serve it.\n *\n * Replaces the CLI-runtime validator this transport superseded, and keeps its\n * purpose: an agent whose provider, profile, model or environment does not\n * line up should fail while an operator is reading startup output, not on the\n * first dispatch — where the same misconfiguration surfaces minutes into a\n * journey, after a task row already exists.\n */\n private collectCodingAgentIssues(): ConfigurationValidationIssue[] {\n const applicationEnv = (process.env.APPLICATION_ENV ?? APPLICATION_ENVIRONMENT.DEVELOPMENT) as APPLICATION_ENVIRONMENT;\n const platformEnvironmentId = process.env.PLATFORM_ENVIRONMENT_ID;\n const agents = Object.values(this.flowsActorsRegistry.getRegistry().agents);\n const issues: ConfigurationValidationIssue[] = [];\n\n for (const agent of agents) {\n if (agent.status !== FlowsActors_Agent_Status.ACTIVE || !isCodingAgentConfiguration(agent.config)) {\n continue;\n }\n\n const codingConfig: FlowsActors_Agent_CodingConfiguration = agent.config;\n const providerRef = codingConfig.providerRef;\n const executionProfileRef = codingConfig.executionProfileRef;\n const agentCtx = { agentRef: agent.ref, providerRef, executionProfileRef };\n\n if (!this.externalProvidersRegistry.isProviderEnabled(providerRef, ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': provider '${providerRef}' has no enabled Agent Client Protocol`,\n agentCtx,\n ));\n continue;\n }\n\n const acpProfile = this.externalProvidersRegistry.getAgentClientProtocolProfile(providerRef);\n const executionProfile = this.externalProvidersRegistry.getAgentClientProtocolExecutionProfile(\n providerRef,\n executionProfileRef,\n );\n if (!acpProfile || !executionProfile) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP metadata or execution profile '${executionProfileRef}' not found`,\n agentCtx,\n ));\n continue;\n }\n\n if (!acpProfile.supportedOperationKeys.includes(codingConfig.operationKey)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP transport does not support operation '${codingConfig.operationKey}'`,\n agentCtx,\n ));\n }\n\n if (!acpProfile.supportedModels.includes(codingConfig.model)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP transport does not declare support for model '${codingConfig.model}'`,\n { ...agentCtx, supportedModels: acpProfile.supportedModels },\n ));\n }\n\n // The environment gate, checked at startup as well as at dispatch. A\n // profile that can never run here is a configuration error worth naming\n // now rather than a refusal discovered mid-journey.\n if (!executionProfile.allowedApplicationEnvironments.includes(applicationEnv)) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile is not allowed in application environment '${applicationEnv}'`,\n { ...agentCtx, allowedApplicationEnvironments: executionProfile.allowedApplicationEnvironments },\n ));\n }\n\n if (\n executionProfile.allowedPlatformEnvironmentIds?.length\n && (!platformEnvironmentId || !executionProfile.allowedPlatformEnvironmentIds.includes(platformEnvironmentId))\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile is not allowed in platform environment '${platformEnvironmentId ?? '(unset)'}'`,\n { ...agentCtx, allowedPlatformEnvironmentIds: executionProfile.allowedPlatformEnvironmentIds },\n ));\n }\n\n if (\n executionProfile.authMode === AgentClientProtocol_AuthMode.SECRET_REF_ENV_INJECTION\n && !this.externalProvidersRegistry.getAgentClientProtocolExecutionProfileSecret(providerRef, executionProfileRef)\n ) {\n issues.push(issueError(\n ConfigurationValidationDomain.AGENTS,\n `Agent '${agent.ref}': ACP execution profile declares secret injection but its secret is not resolvable`,\n agentCtx,\n ));\n }\n }\n\n return issues;\n }\n}\n"]}