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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1056) hide show
  1. package/dist/esm/__tests__/fixture-deep-partial.d.ts.map +1 -1
  2. package/dist/esm/__tests__/integration/redis-integration-gate.d.ts.map +1 -1
  3. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  4. package/dist/esm/__tests__/test-container.d.ts.map +1 -1
  5. package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/seeds/application-metadata-defaults.seeds.d.ts.map +1 -1
  7. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
  8. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
  9. package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
  10. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
  11. package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -1
  12. package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +1 -1
  13. package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -1
  14. package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -1
  15. package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -1
  16. package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -1
  17. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -1
  18. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -1
  19. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -1
  20. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +12 -1
  21. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -1
  22. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
  23. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
  24. package/dist/esm/base-classes/services/batches/resource-retention-sweep.batch.backend.service.d.ts.map +1 -1
  25. package/dist/esm/base-classes/services/batches/suspension-reactivation-sweep.batch.backend.service.d.ts.map +1 -1
  26. package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.map +1 -1
  27. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
  28. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
  29. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
  30. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
  31. package/dist/esm/base-classes/services/controllers/utils/audit-access-fields.backend.utils.d.ts.map +1 -1
  32. package/dist/esm/base-classes/services/controllers/utils/operation-response-serializer.backend.utils.d.ts.map +1 -1
  33. package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -1
  34. package/dist/esm/base-classes/services/repositories/__tests__/method-span-scan.guard-helpers.d.ts.map +1 -1
  35. package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -1
  36. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
  37. package/dist/esm/base-classes/services/repositories/http-api/http-api-filter-translation.backend.d.ts.map +1 -1
  38. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
  39. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +13 -4
  40. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
  41. package/dist/esm/base-classes/services/repositories/http-api/http-api-query.backend.d.ts.map +1 -1
  42. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
  43. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +17 -0
  44. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
  45. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
  46. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
  47. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -1
  48. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -1
  49. package/dist/esm/base-classes/services/repositories/http-api/http-api-row-projection.backend.d.ts.map +1 -1
  50. package/dist/esm/base-classes/services/repositories/http-api/http-api-subject-erasure-effect.backend.d.ts.map +1 -1
  51. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
  52. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
  53. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
  54. package/dist/esm/base-classes/services/repositories/http-api/odoo-jsonrpc-compiler.backend.d.ts.map +1 -1
  55. package/dist/esm/base-classes/services/repositories/http-api/rest-json-query-compiler.backend.d.ts.map +1 -1
  56. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
  57. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
  58. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
  59. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
  60. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +57 -0
  61. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
  62. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +95 -2
  63. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
  64. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
  65. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
  66. package/dist/esm/base-classes/services/repositories/repository-guarded-mutation.backend.types.d.ts.map +1 -1
  67. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +5 -2
  68. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
  69. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +14 -3
  70. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
  71. package/dist/esm/base-classes/services/repositories/repository-version-metadata.backend.utils.d.ts.map +1 -1
  72. package/dist/esm/base-classes/services/repositories/resource-write-integrity.backend.d.ts.map +1 -1
  73. package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts +72 -0
  74. package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts.map +1 -0
  75. package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js +88 -0
  76. package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js.map +1 -0
  77. package/dist/esm/base-classes/services/repositories/unique-constraint-conflict-reference.backend.d.ts.map +1 -1
  78. package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -1
  79. package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -1
  80. package/dist/esm/base-classes/services/services/__tests__/mock-system-access.service.d.ts.map +1 -1
  81. package/dist/esm/base-classes/services/services/read-only-field-change.backend.utils.d.ts.map +1 -1
  82. package/dist/esm/base-classes/services/services/resource-operation-audit-emission.backend.utils.d.ts.map +1 -1
  83. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
  84. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
  85. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -1
  86. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
  87. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
  88. package/dist/esm/base-classes/services/services/resource-operation-server-injected-fields.backend.utils.d.ts.map +1 -1
  89. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.map +1 -1
  90. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  91. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  92. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
  93. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
  94. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  95. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +44 -6
  96. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  97. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
  98. package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
  99. package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -1
  100. package/dist/esm/base-classes/utils/single-subject-addressing.backend.utils.d.ts.map +1 -1
  101. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -1
  102. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -1
  103. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -1
  104. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -1
  105. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -1
  106. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -1
  107. package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -1
  108. package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -1
  109. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +1 -1
  110. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -1
  111. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +5 -4
  112. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -1
  113. package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -1
  114. package/dist/esm/billing/services/back-office/billing-state.backend.service.js +11 -1
  115. package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -1
  116. package/dist/esm/billing/services/back-office/billing-subject-erasure-effect.backend.d.ts.map +1 -1
  117. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
  118. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
  119. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
  120. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
  121. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -1
  122. package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -1
  123. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
  124. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
  125. package/dist/esm/billing/services/billing.utils.d.ts.map +1 -1
  126. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
  127. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
  128. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +32 -0
  129. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
  130. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +32 -1
  131. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
  132. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
  133. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
  134. package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
  135. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
  136. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
  137. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
  138. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
  139. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +9 -6
  140. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
  141. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +9 -6
  142. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
  143. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -1
  144. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -1
  145. package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -1
  146. package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -1
  147. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
  148. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +50 -3
  149. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
  150. package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -1
  151. package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
  152. package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
  153. package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -1
  154. package/dist/esm/charts/services/chart-registry.backend.service.d.ts +80 -7
  155. package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -1
  156. package/dist/esm/charts/services/chart-registry.backend.service.js +115 -8
  157. package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -1
  158. package/dist/esm/companion-exports.d.ts.map +1 -1
  159. package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -1
  160. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.d.ts.map +1 -1
  161. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
  162. package/dist/esm/compliance/audit-trails/batches/immudb-audit-reconcile.batch.backend.service.d.ts.map +1 -1
  163. package/dist/esm/compliance/audit-trails/batches/siem-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  164. package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -1
  165. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
  166. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
  167. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +107 -4
  168. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
  169. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +176 -5
  170. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
  171. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
  172. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
  173. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
  174. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
  175. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
  176. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
  177. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -1
  178. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -1
  179. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
  180. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +21 -0
  181. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
  182. package/dist/esm/compliance/audit-trails/services/utils/ocsf-class-mapping.backend.utils.d.ts.map +1 -1
  183. package/dist/esm/compliance/audit-trails/services/utils/siem-dictionary.backend.utils.d.ts.map +1 -1
  184. package/dist/esm/compliance/audit-trails/services/utils/siem-ocsf-projection.backend.utils.d.ts.map +1 -1
  185. package/dist/esm/compliance/audit-trails/services/utils/siem-projection-contract.backend.utils.d.ts.map +1 -1
  186. package/dist/esm/compliance/audit-trails/utils/audit-actor.backend.utils.d.ts.map +1 -1
  187. package/dist/esm/compliance/audit-trails/utils/layer2-audit-provider-boot-diagnostic.backend.utils.d.ts.map +1 -1
  188. package/dist/esm/compliance/index.d.ts.map +1 -1
  189. package/dist/esm/compliance/privacy/retention-hide-predicate.backend.d.ts.map +1 -1
  190. package/dist/esm/compliance/privacy/services/subject-erasure-external-effects.backend.service.d.ts.map +1 -1
  191. package/dist/esm/compliance/privacy/services/subject-session-revocation.backend.service.d.ts.map +1 -1
  192. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
  193. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
  194. package/dist/esm/config/bootstrap/minion-initialization-projection.backend.d.ts.map +1 -1
  195. package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.d.ts.map +1 -1
  196. package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js +3 -0
  197. package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js.map +1 -1
  198. package/dist/esm/config/bootstrap/runtime-principal.backend.service.d.ts.map +1 -1
  199. package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
  200. package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -1
  201. package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -1
  202. package/dist/esm/config/models/app-config.backend.schemas.d.ts +4 -4
  203. package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
  204. package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
  205. package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -1
  206. package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts +36 -0
  207. package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts.map +1 -0
  208. package/dist/esm/config/models/apps-manager-transport.backend.definitions.js +36 -0
  209. package/dist/esm/config/models/apps-manager-transport.backend.definitions.js.map +1 -0
  210. package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -1
  211. package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -1
  212. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
  213. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
  214. package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -1
  215. package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -1
  216. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
  217. package/dist/esm/config/services/app-configuration-loader.backend.service.js +3 -0
  218. package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
  219. package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
  220. package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
  221. package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
  222. package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
  223. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +12 -0
  224. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
  225. package/dist/esm/config/services/application-startup-config-validator.backend.service.js +28 -0
  226. package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
  227. package/dist/esm/data-seeding/batches/data-seeding-run-cleanup.batch.backend.service.d.ts.map +1 -1
  228. package/dist/esm/data-seeding/batches/data-seeding-scheduled-rerun.batch.backend.service.d.ts.map +1 -1
  229. package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.contracts.d.ts.map +1 -1
  230. package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.controller.d.ts.map +1 -1
  231. package/dist/esm/data-seeding/data-seeding-models.d.ts.map +1 -1
  232. package/dist/esm/data-seeding/models/business-key-resolver.shared.utils.d.ts.map +1 -1
  233. package/dist/esm/data-seeding/models/data-seed-execution-context.shared.types.d.ts.map +1 -1
  234. package/dist/esm/data-seeding/models/data-seed-migrator-runner.shared.utils.d.ts.map +1 -1
  235. package/dist/esm/data-seeding/models/data-seed-reconciler.shared.utils.d.ts.map +1 -1
  236. package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.schemas.d.ts.map +1 -1
  237. package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.utils.d.ts.map +1 -1
  238. package/dist/esm/data-seeding/models/data-seed-run.shared.resources-config.schemas.d.ts.map +1 -1
  239. package/dist/esm/data-seeding/models/data-seed-run.shared.schemas.d.ts.map +1 -1
  240. package/dist/esm/data-seeding/models/data-seed-trigger-mode-matrix.shared.utils.d.ts.map +1 -1
  241. package/dist/esm/data-seeding/models/data-seed.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/data-seeding/services/data-seed-application-bootstrap.backend.d.ts.map +1 -1
  243. package/dist/esm/data-seeding/services/data-seed-dispatcher.backend.service.d.ts.map +1 -1
  244. package/dist/esm/data-seeding/services/data-seed-registry.backend.service.d.ts.map +1 -1
  245. package/dist/esm/data-seeding/services/data-seed-scope-resolver-registry.backend.service.d.ts.map +1 -1
  246. package/dist/esm/data-seeding/services/engines/additive-seed-engine.backend.service.d.ts.map +1 -1
  247. package/dist/esm/data-seeding/services/engines/lazy-seed-engine.backend.service.d.ts.map +1 -1
  248. package/dist/esm/data-seeding/services/engines/manual-seed-engine.backend.service.d.ts.map +1 -1
  249. package/dist/esm/data-seeding/services/engines/sync-seed-engine.backend.service.d.ts.map +1 -1
  250. package/dist/esm/data-seeding/services/engines/upgrade-seed-engine.backend.service.d.ts.map +1 -1
  251. package/dist/esm/data-seeding/services/shared/data-seed-business-key.shared.utils.d.ts.map +1 -1
  252. package/dist/esm/data-seeding/services/shared/data-seed-error.shared.utils.d.ts.map +1 -1
  253. package/dist/esm/data-seeding/services/shared/data-seed-run-counters.shared.types.d.ts.map +1 -1
  254. package/dist/esm/data-seeding/services/shared/data-seed-run-ledger.backend.d.ts.map +1 -1
  255. package/dist/esm/data-seeding/services/shared/data-seed-scope-anchor.shared.types.d.ts.map +1 -1
  256. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts.map +1 -1
  257. package/dist/esm/data-seeding/services/shared/data-seed-scope-resolution.backend.d.ts.map +1 -1
  258. package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -1
  259. package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -1
  260. package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -1
  261. package/dist/esm/databases/models/resolve-persistence-adapter.backend.utils.d.ts.map +1 -1
  262. package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -1
  263. package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -1
  264. package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -1
  265. package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -1
  266. package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -1
  267. package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -1
  268. package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.map +1 -1
  269. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
  270. package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts.map +1 -1
  271. package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -1
  272. package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -1
  273. package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -1
  274. package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -1
  275. package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -1
  276. package/dist/esm/databases/services/db-utils.d.ts.map +1 -1
  277. package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -1
  278. package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -1
  279. package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -1
  280. package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -1
  281. package/dist/esm/databases/services/postgresql-development-provisioning.backend.d.ts.map +1 -1
  282. package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -1
  283. package/dist/esm/databases/services/postgresql-migration-runner.backend.d.ts.map +1 -1
  284. package/dist/esm/databases/services/postgresql-schema-ddl.backend.d.ts.map +1 -1
  285. package/dist/esm/databases/services/postgresql-schema-migration-sql.backend.d.ts.map +1 -1
  286. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
  287. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
  288. package/dist/esm/databases/services/postgresql-schema-plan-lockfile.backend.d.ts.map +1 -1
  289. package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
  290. package/dist/esm/databases/services/resource-persistence-unit-of-work.backend.service.d.ts.map +1 -1
  291. package/dist/esm/databases/services/schema-planning-standalone.backend.d.ts.map +1 -1
  292. package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -1
  293. package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -1
  294. package/dist/esm/databases/utils/postgresql-identifier.backend.utils.d.ts.map +1 -1
  295. package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -1
  296. package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
  297. package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
  298. package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
  299. package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
  300. package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
  301. package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
  302. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
  303. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
  304. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
  305. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
  306. package/dist/esm/external-data/batches/external-data-pipeline-scheduled-run.batch.backend.service.d.ts.map +1 -1
  307. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -1
  308. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -1
  309. package/dist/esm/external-data/external-data-extraction-source.backend.d.ts.map +1 -1
  310. package/dist/esm/external-data/external-data-models.exports.d.ts.map +1 -1
  311. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
  312. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
  313. package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
  314. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
  315. package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -1
  316. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
  317. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
  318. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +102 -52
  319. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -1
  320. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +117 -71
  321. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -1
  322. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -1
  323. package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -1
  324. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -1
  325. package/dist/esm/external-providers/operations/provider-request-signing.backend.js +26 -7
  326. package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -1
  327. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -1
  328. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -1
  329. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
  330. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
  331. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -1
  332. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -1
  333. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
  334. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
  335. package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts +81 -34
  336. package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
  337. package/dist/esm/external-providers/services/document-extraction.backend.service.js +179 -98
  338. package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
  339. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  340. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  341. package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -1
  342. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +121 -0
  343. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  344. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +151 -0
  345. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  346. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts +15 -1
  347. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
  348. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +60 -4
  349. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
  350. package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -1
  351. package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -1
  352. package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -1
  353. package/dist/esm/features/services/application-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
  354. package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -1
  355. package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -1
  356. package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -1
  357. package/dist/esm/features/services/organization-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
  358. package/dist/esm/features/services/scope-feature-ledger-relationship.backend.utils.d.ts.map +1 -1
  359. package/dist/esm/features/services/scope-features-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
  360. package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -1
  361. package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -1
  362. package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -1
  363. package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -1
  364. package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -1
  365. package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -1
  366. package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -1
  367. package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
  368. package/dist/esm/files/controllers/file.controller.js.map +1 -1
  369. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -1
  370. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -1
  371. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +37 -0
  372. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
  373. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +221 -21
  374. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
  375. package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -1
  376. package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -1
  377. package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -1
  378. package/dist/esm/files/scanning/yara-scanner.backend.service.js +20 -2
  379. package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -1
  380. package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -1
  381. package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -1
  382. package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -1
  383. package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -1
  384. package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
  385. package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
  386. package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -1
  387. package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
  388. package/dist/esm/files/services/file-scanning.backend.service.js +5 -0
  389. package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
  390. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
  391. package/dist/esm/files/services/file-text-extraction.backend.service.js +8 -5
  392. package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
  393. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
  394. package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
  395. package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
  396. package/dist/esm/files/services/files.backend.service.js +3 -1
  397. package/dist/esm/files/services/files.backend.service.js.map +1 -1
  398. package/dist/esm/files/services/rag-source-field-detection.backend.service.d.ts.map +1 -1
  399. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -1
  400. package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -1
  401. package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -1
  402. package/dist/esm/files/storage/file-storage-provider.types.d.ts +36 -1
  403. package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
  404. package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
  405. package/dist/esm/files/storage/file-storage-router.backend.service.d.ts +21 -3
  406. package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -1
  407. package/dist/esm/files/storage/file-storage-router.backend.service.js +38 -5
  408. package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -1
  409. package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts +87 -0
  410. package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts.map +1 -0
  411. package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js +340 -0
  412. package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js.map +1 -0
  413. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
  414. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
  415. package/dist/esm/files/storage/storage-credential-provider.backend.utils.d.ts.map +1 -1
  416. package/dist/esm/files/storage/storage-platform-sts-credential-resolver.backend.utils.d.ts.map +1 -1
  417. package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.d.ts.map +1 -1
  418. package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js +10 -3
  419. package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js.map +1 -1
  420. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
  421. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
  422. package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
  423. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
  424. package/dist/esm/files/utils/file-upload.utils.d.ts.map +1 -1
  425. package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
  426. package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
  427. package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -1
  428. package/dist/esm/files/utils/image-derivation.backend.utils.d.ts.map +1 -1
  429. package/dist/esm/files/utils/image-thumbnail.backend.utils.d.ts.map +1 -1
  430. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -1
  431. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -1
  432. package/dist/esm/files/utils/rag-source-field-schema-path.backend.utils.d.ts.map +1 -1
  433. package/dist/esm/files/utils/storage-application-identity.backend.utils.d.ts.map +1 -1
  434. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
  435. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
  436. package/dist/esm/flows-actors/a2a/batches/a2a-push-delivery.batch.backend.service.d.ts.map +1 -1
  437. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
  438. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
  439. package/dist/esm/flows-actors/a2a/models/a2a-dialect.backend.schemas.d.ts.map +1 -1
  440. package/dist/esm/flows-actors/a2a/models/a2a-push-notification-delivery.backend.utils.d.ts.map +1 -1
  441. package/dist/esm/flows-actors/a2a/models/a2a-push-notification.backend.schemas.d.ts.map +1 -1
  442. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
  443. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
  444. package/dist/esm/flows-actors/a2a/services/a2a-push-delivery-log.repository.d.ts.map +1 -1
  445. package/dist/esm/flows-actors/a2a/services/a2a-push-dispatcher.backend.service.d.ts.map +1 -1
  446. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
  447. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
  448. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
  449. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
  450. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
  451. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
  452. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
  453. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
  454. package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts.map +1 -1
  455. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
  456. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
  457. package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -1
  458. package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -1
  459. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
  460. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
  461. package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -1
  462. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
  463. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
  464. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +107 -16
  465. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  466. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +118 -18
  467. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  468. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
  469. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
  470. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -1
  471. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -1
  472. package/dist/esm/flows-actors/services/__tests__/fixtures/meta-workflow-evaluation-treatment.test-fixture.d.ts.map +1 -1
  473. package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
  474. package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
  475. package/dist/esm/flows-actors/services/agent-call-trace-sink.backend.d.ts.map +1 -1
  476. package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -1
  477. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +104 -5
  478. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  479. package/dist/esm/flows-actors/services/agents.backend.service.js +263 -31
  480. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  481. package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -1
  482. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +46 -1
  483. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  484. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +193 -6
  485. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  486. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  487. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  488. package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
  489. package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
  490. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
  491. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
  492. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -1
  493. package/dist/esm/flows-actors/services/mcp-client.backend.service.js +3 -0
  494. package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -1
  495. package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts +99 -0
  496. package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts.map +1 -0
  497. package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js +155 -0
  498. package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js.map +1 -0
  499. package/dist/esm/flows-actors/services/meta-workflow-evaluation-treatment-compiler.backend.service.d.ts.map +1 -1
  500. package/dist/esm/flows-actors/services/meta-workflow-standard-action-contracts.backend.service.d.ts.map +1 -1
  501. package/dist/esm/flows-actors/services/meta-workflow-standard-evaluation-contracts.backend.service.d.ts.map +1 -1
  502. package/dist/esm/flows-actors/services/meta-workflow-structured-artifact-action-compiler.backend.service.d.ts.map +1 -1
  503. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
  504. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
  505. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  506. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +9 -0
  507. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  508. package/dist/esm/flows-actors/utils/bounded-subprocess.backend.utils.d.ts.map +1 -1
  509. package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -1
  510. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
  511. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
  512. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
  513. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
  514. package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -1
  515. package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts +77 -0
  516. package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts.map +1 -0
  517. package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js +164 -0
  518. package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js.map +1 -0
  519. package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts +48 -0
  520. package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts.map +1 -0
  521. package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js +101 -0
  522. package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js.map +1 -0
  523. package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -1
  524. package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -1
  525. package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -1
  526. package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -1
  527. package/dist/esm/guidance/services/lifecycle-scope-id.backend.utils.d.ts.map +1 -1
  528. package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -1
  529. package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -1
  530. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
  531. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
  532. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -1
  533. package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -1
  534. package/dist/esm/guidance/services/scoped-state-read-custom-implementations.backend.d.ts.map +1 -1
  535. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
  536. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
  537. package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -1
  538. package/dist/esm/index.d.ts +0 -1
  539. package/dist/esm/index.d.ts.map +1 -1
  540. package/dist/esm/index.js +0 -1
  541. package/dist/esm/index.js.map +1 -1
  542. package/dist/esm/inject/models/container.d.ts +10 -0
  543. package/dist/esm/inject/models/container.d.ts.map +1 -1
  544. package/dist/esm/inject/models/container.js +49 -1
  545. package/dist/esm/inject/models/container.js.map +1 -1
  546. package/dist/esm/inject/models/service-types.d.ts +3 -0
  547. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  548. package/dist/esm/inject/models/service-types.js +3 -0
  549. package/dist/esm/inject/models/service-types.js.map +1 -1
  550. package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
  551. package/dist/esm/mcp/controllers/mcp.controller.js +50 -3
  552. package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
  553. package/dist/esm/mcp/models/mcp-protocol.backend.schemas.d.ts.map +1 -1
  554. package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
  555. package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
  556. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
  557. package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
  558. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
  559. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
  560. package/dist/esm/mcp/services/resource-server-instances-registry.backend.service.d.ts.map +1 -1
  561. package/dist/esm/mcp/utils/zod-to-mcp-json-schema.backend.utils.d.ts.map +1 -1
  562. package/dist/esm/meta-workflow-runtime.exports.d.ts.map +1 -1
  563. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
  564. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
  565. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -1
  566. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -1
  567. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
  568. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
  569. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
  570. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
  571. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
  572. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
  573. package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.map +1 -1
  574. package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
  575. package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
  576. package/dist/esm/monitoring/logger/services/logger.service.js +3 -3
  577. package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
  578. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -1
  579. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -1
  580. package/dist/esm/monitoring/logger/utils/log-value-normalization.backend.utils.d.ts.map +1 -1
  581. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +10 -6
  582. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -1
  583. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +10 -6
  584. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -1
  585. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  586. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  587. package/dist/esm/monitoring/observability/otel-preload.d.ts.map +1 -1
  588. package/dist/esm/monitoring/observability/otel-sdk-global-handle.d.ts.map +1 -1
  589. package/dist/esm/monitoring/observability/services/__tests__/mock-metrics.service.d.ts.map +1 -1
  590. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  591. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  592. package/dist/esm/monitoring/observability/services/observability.backend.service.d.ts.map +1 -1
  593. package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -1
  594. package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -1
  595. package/dist/esm/notifications/email/models/email-transport.backend.definitions.d.ts.map +1 -1
  596. package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -1
  597. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
  598. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
  599. package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
  600. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
  601. package/dist/esm/notifications/email/services/email.backend.service.d.ts +47 -6
  602. package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
  603. package/dist/esm/notifications/email/services/email.backend.service.js +86 -36
  604. package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
  605. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
  606. package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
  607. package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts.map +1 -1
  608. package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -1
  609. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
  610. package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
  611. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
  612. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
  613. package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts +32 -0
  614. package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts.map +1 -0
  615. package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js +32 -0
  616. package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js.map +1 -0
  617. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +64 -10
  618. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
  619. package/dist/esm/notifications/sms/services/sms.backend.service.js +277 -82
  620. package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
  621. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  622. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  623. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  624. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
  625. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
  626. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
  627. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
  628. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
  629. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.repository.d.ts.map +1 -1
  630. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-dispatcher.backend.service.d.ts.map +1 -1
  631. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-public-key.custom-impl.backend.service.d.ts.map +1 -1
  632. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
  633. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
  634. package/dist/esm/notifications/webhooks/outbound/services/webhook-config.backend.service.d.ts.map +1 -1
  635. package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -1
  636. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
  637. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
  638. package/dist/esm/organizations/batches/organization-member-invitation-sweep.batch.backend.service.d.ts.map +1 -1
  639. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts.map +1 -1
  640. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
  641. package/dist/esm/organizations/services/authority-change-audit.backend.utils.d.ts.map +1 -1
  642. package/dist/esm/organizations/services/invitation-acceptance.backend.utils.d.ts.map +1 -1
  643. package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -1
  644. package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.map +1 -1
  645. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
  646. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
  647. package/dist/esm/organizations/services/organization-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
  648. package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -1
  649. package/dist/esm/organizations/services/organization-onboarding-operation.backend.utils.d.ts.map +1 -1
  650. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
  651. package/dist/esm/organizations/services/organization-unit-member-custom-implementation.backend.service.d.ts.map +1 -1
  652. package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -1
  653. package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -1
  654. package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -1
  655. package/dist/esm/pdf-templates/__tests__/fixtures/tiny-pdf-template.fixture.d.ts.map +1 -1
  656. package/dist/esm/pdf-templates/models/pdf-template-binding.d.ts.map +1 -1
  657. package/dist/esm/pdf-templates/models/pdf-template-definition.d.ts.map +1 -1
  658. package/dist/esm/pdf-templates/services/pdf-generated-file-writer.backend.service.d.ts.map +1 -1
  659. package/dist/esm/pdf-templates/services/pdf-generation-orchestrator.backend.service.d.ts.map +1 -1
  660. package/dist/esm/pdf-templates/services/pdf-renderer.backend.service.d.ts.map +1 -1
  661. package/dist/esm/pdf-templates/services/pdf-template-binding.backend.service.d.ts.map +1 -1
  662. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -1
  663. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -1
  664. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -1
  665. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -1
  666. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -1
  667. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -1
  668. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -1
  669. package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -1
  670. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
  671. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
  672. package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -1
  673. package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -1
  674. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
  675. package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
  676. package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -1
  677. package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
  678. package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
  679. package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
  680. package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
  681. package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -1
  682. package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -1
  683. package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
  684. package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
  685. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
  686. package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
  687. package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
  688. package/dist/esm/queue/queue.backend.service.js.map +1 -1
  689. package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -1
  690. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
  691. package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
  692. package/dist/esm/rag/batches/rag-embedding-drain.batch.backend.service.d.ts.map +1 -1
  693. package/dist/esm/rag/batches/rag-reconciliation-sweep.batch.backend.service.d.ts.map +1 -1
  694. package/dist/esm/rag/models/rag-chunk-store.backend.types.d.ts.map +1 -1
  695. package/dist/esm/rag/models/rag-retrieval.backend.types.d.ts.map +1 -1
  696. package/dist/esm/rag/services/mongodb-rag-chunk-store.backend.service.d.ts.map +1 -1
  697. package/dist/esm/rag/services/postgresql-rag-chunk-store.backend.service.d.ts.map +1 -1
  698. package/dist/esm/rag/services/rag-chunk-collection.mongodb-ddl.backend.d.ts.map +1 -1
  699. package/dist/esm/rag/services/rag-chunk-retrieval.mongodb-query.backend.d.ts.map +1 -1
  700. package/dist/esm/rag/services/rag-chunk-retrieval.postgresql-query.backend.d.ts.map +1 -1
  701. package/dist/esm/rag/services/rag-chunk-store.backend.service.d.ts.map +1 -1
  702. package/dist/esm/rag/services/rag-chunk-table.postgresql-ddl.backend.d.ts.map +1 -1
  703. package/dist/esm/rag/services/rag-ingestion.backend.service.d.ts.map +1 -1
  704. package/dist/esm/rag/services/rag-retrieval.backend.service.d.ts.map +1 -1
  705. package/dist/esm/rag/utils/rag-chunk-fusion.backend.utils.d.ts.map +1 -1
  706. package/dist/esm/rag/utils/rag-chunk-removal.backend.utils.d.ts.map +1 -1
  707. package/dist/esm/rag/utils/rag-chunk-row-shaping.backend.utils.d.ts.map +1 -1
  708. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
  709. package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
  710. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
  711. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
  712. package/dist/esm/rag/utils/rag-ingestion-trigger.backend.utils.d.ts.map +1 -1
  713. package/dist/esm/rag/utils/rag-retrieval-scope.backend.utils.d.ts.map +1 -1
  714. package/dist/esm/rag/utils/rag-source-field-value.backend.utils.d.ts.map +1 -1
  715. package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -1
  716. package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -1
  717. package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -1
  718. package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -1
  719. package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -1
  720. package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -1
  721. package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
  722. package/dist/esm/requests/service/websocket.service.js +49 -1
  723. package/dist/esm/requests/service/websocket.service.js.map +1 -1
  724. package/dist/esm/resources/backend-resource-registry.exports.d.ts.map +1 -1
  725. package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
  726. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +2 -0
  727. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
  728. package/dist/esm/resources/models/index.d.ts.map +1 -1
  729. package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
  730. package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
  731. package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
  732. package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
  733. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
  734. package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
  735. package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -1
  736. package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -1
  737. package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -1
  738. package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -1
  739. package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -1
  740. package/dist/esm/resources/services/resource-population.backend.service.d.ts +17 -2
  741. package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -1
  742. package/dist/esm/resources/services/resource-population.backend.service.js +74 -18
  743. package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -1
  744. package/dist/esm/resources/services/resources-registry.backend.service.d.ts +23 -0
  745. package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
  746. package/dist/esm/resources/services/resources-registry.backend.service.js +31 -0
  747. package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
  748. package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -1
  749. package/dist/esm/resources/utils/resource-retention.backend.utils.d.ts.map +1 -1
  750. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
  751. package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
  752. package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
  753. package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
  754. package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -1
  755. package/dist/esm/runtime/models/request-context.als.backend.d.ts.map +1 -1
  756. package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.map +1 -1
  757. package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
  758. package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
  759. package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -1
  760. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
  761. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
  762. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  763. package/dist/esm/runtime/services/http-server.backend.service.js +10 -0
  764. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  765. package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
  766. package/dist/esm/runtime/services/start-application.backend.service.js +26 -12
  767. package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
  768. package/dist/esm/runtime/services/utils/oauth-body-cap.backend.utils.d.ts.map +1 -1
  769. package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -1
  770. package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -1
  771. package/dist/esm/runtime/utils/application-startup-config-access.backend.utils.d.ts.map +1 -1
  772. package/dist/esm/runtime/utils/feature-gated-core-resource-exclusions.backend.utils.d.ts.map +1 -1
  773. package/dist/esm/runtime/utils/request-client-ip.utils.d.ts.map +1 -1
  774. package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -1
  775. package/dist/esm/security/api-keys/api-key-generation.backend.utils.d.ts.map +1 -1
  776. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
  777. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
  778. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
  779. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
  780. package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -1
  781. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +22 -0
  782. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
  783. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +84 -0
  784. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
  785. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
  786. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
  787. package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -1
  788. package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -1
  789. package/dist/esm/security/authentications/models/authorization-client.backend.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
  791. package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
  792. package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts +37 -0
  793. package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts.map +1 -0
  794. package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js +37 -0
  795. package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js.map +1 -0
  796. package/dist/esm/security/authentications/models/identity-persistence-boundaries.backend.d.ts.map +1 -1
  797. package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
  799. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
  801. package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts.map +1 -1
  802. package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -1
  803. package/dist/esm/security/authentications/models/user-authorization-version.backend.utils.d.ts.map +1 -1
  804. package/dist/esm/security/authentications/seeds/enterprise-config-defaults.seeds.d.ts.map +1 -1
  805. package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -1
  806. package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -1
  807. package/dist/esm/security/authentications/services/__tests__/oauth-provider-audit-spies.mock.d.ts.map +1 -1
  808. package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -1
  809. package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -1
  810. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
  811. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
  812. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
  813. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
  814. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
  815. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
  816. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
  817. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
  818. package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -1
  819. package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +2 -1
  820. package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -1
  821. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +9 -2
  822. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
  823. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +9 -2
  824. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
  825. package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -1
  826. package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.map +1 -1
  827. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
  828. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
  829. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
  830. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -1
  831. package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -1
  832. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
  833. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
  834. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +97 -0
  835. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
  836. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +218 -26
  837. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
  838. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts +14 -0
  839. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
  840. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +36 -0
  841. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
  842. package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts.map +1 -1
  843. package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -1
  844. package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -1
  845. package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -1
  846. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
  847. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
  848. package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -1
  849. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
  850. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
  851. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
  852. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
  853. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
  854. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
  855. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
  856. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
  857. package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -1
  858. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
  859. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
  860. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +57 -1
  861. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
  862. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
  863. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
  864. package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -1
  865. package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +11 -1
  866. package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -1
  867. package/dist/esm/security/authentications/services/email-verification-initiator.backend.service.d.ts.map +1 -1
  868. package/dist/esm/security/authentications/services/machine-token-issuer.backend.service.d.ts.map +1 -1
  869. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
  870. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
  871. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
  872. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
  873. package/dist/esm/security/authentications/services/oidc-user-claims.backend.service.d.ts.map +1 -1
  874. package/dist/esm/security/authentications/services/resolve-active-member-orgs.backend.utils.d.ts.map +1 -1
  875. package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -1
  876. package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -1
  877. package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.map +1 -1
  878. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
  879. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
  880. package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.map +1 -1
  881. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
  882. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
  883. package/dist/esm/security/authentications/services/utils/concurrent-session-eviction.backend.utils.d.ts.map +1 -1
  884. package/dist/esm/security/authentications/services/utils/ensure-user-profile.backend.utils.d.ts.map +1 -1
  885. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
  886. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
  887. package/dist/esm/security/authentications/services/utils/machine-auth-rate-limit.backend.utils.d.ts.map +1 -1
  888. package/dist/esm/security/authentications/services/utils/pkce.backend.utils.d.ts.map +1 -1
  889. package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -1
  890. package/dist/esm/security/authentications/utils/application-auth-policy-audit.backend.utils.d.ts.map +1 -1
  891. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
  892. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
  893. package/dist/esm/security/authentications/utils/one-off-session-lifetime.backend.utils.d.ts.map +1 -1
  894. package/dist/esm/security/authentications/utils/social-oauth2-purpose.backend.utils.d.ts.map +1 -1
  895. package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts +59 -0
  896. package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts.map +1 -0
  897. package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js +111 -0
  898. package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js.map +1 -0
  899. package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts +57 -0
  900. package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts.map +1 -0
  901. package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js +133 -0
  902. package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js.map +1 -0
  903. package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts +41 -0
  904. package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts.map +1 -0
  905. package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js +157 -0
  906. package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js.map +1 -0
  907. package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts +84 -0
  908. package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts.map +1 -0
  909. package/dist/esm/security/authorizations/application-wide-read-admission.backend.js +99 -0
  910. package/dist/esm/security/authorizations/application-wide-read-admission.backend.js.map +1 -0
  911. package/dist/esm/security/authorizations/authorization-denial-audit.backend.utils.d.ts.map +1 -1
  912. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -1
  913. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -1
  914. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
  915. package/dist/esm/security/authorizations/junction-scope-resolution.backend.d.ts.map +1 -1
  916. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
  917. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
  918. package/dist/esm/security/authorizations/organization-unit-narrowing-enforcement.backend.d.ts.map +1 -1
  919. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
  920. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +20 -181
  921. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
  922. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -1
  923. package/dist/esm/security/authorizations/relationship-foreign-key-filter.backend.d.ts.map +1 -1
  924. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
  925. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
  926. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +40 -0
  927. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -1
  928. package/dist/esm/security/authorizations/role-conferral.backend.utils.js +43 -1
  929. package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -1
  930. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +27 -17
  931. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
  932. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +27 -17
  933. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
  934. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +72 -0
  935. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
  936. package/dist/esm/security/authorizations/services/authorizations.backend.service.js +153 -10
  937. package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
  938. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  939. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  940. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -1
  941. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -1
  942. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +139 -1
  943. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -1
  944. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +474 -33
  945. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -1
  946. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +40 -0
  947. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -1
  948. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -1
  949. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -1
  950. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -1
  951. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +19 -0
  952. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -1
  953. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +38 -0
  954. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -1
  955. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
  956. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -1
  957. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -1
  958. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +17 -1
  959. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -1
  960. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +14 -0
  961. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -1
  962. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +16 -0
  963. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -1
  964. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -1
  965. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +1 -1
  966. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -1
  967. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +19 -0
  968. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -1
  969. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +45 -2
  970. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -1
  971. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
  972. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -1
  973. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +37 -1
  974. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -1
  975. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -1
  976. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -1
  977. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -1
  978. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -1
  979. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -1
  980. package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts +34 -0
  981. package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts.map +1 -0
  982. package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js +39 -0
  983. package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js.map +1 -0
  984. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
  985. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -1
  986. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
  987. package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts.map +1 -1
  988. package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -1
  989. package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -1
  990. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
  991. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
  992. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
  993. package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
  994. package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -1
  995. package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
  996. package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts +13 -0
  997. package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts.map +1 -1
  998. package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js +14 -0
  999. package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js.map +1 -1
  1000. package/dist/esm/security/jwt/utils/jwt-verification-error-classification.backend.utils.d.ts.map +1 -1
  1001. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
  1002. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
  1003. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  1004. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  1005. package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts +39 -0
  1006. package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts.map +1 -0
  1007. package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js +60 -0
  1008. package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js.map +1 -0
  1009. package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts +66 -0
  1010. package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts.map +1 -0
  1011. package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js +75 -0
  1012. package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js.map +1 -0
  1013. package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
  1014. package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
  1015. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
  1016. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
  1017. package/dist/esm/security/scim/utils/scim-attribute-path-resolver.backend.utils.d.ts.map +1 -1
  1018. package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -1
  1019. package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -1
  1020. package/dist/esm/security/session-invalidation-fence.backend.utils.d.ts.map +1 -1
  1021. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
  1022. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
  1023. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -1
  1024. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -1
  1025. package/dist/esm/security/token-invalidation-fence.backend.utils.d.ts.map +1 -1
  1026. package/dist/esm/testing.d.ts.map +1 -1
  1027. package/dist/esm/users/services/inbound-contact-custom-implementation.backend.service.d.ts.map +1 -1
  1028. package/dist/esm/users/services/user-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
  1029. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
  1030. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -1
  1031. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -1
  1032. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
  1033. package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
  1034. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
  1035. package/dist/tsconfig.build.tsbuildinfo +1 -1
  1036. package/package.json +9 -9
  1037. package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts +0 -45
  1038. package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts.map +0 -1
  1039. package/dist/esm/external-providers/services/flow-actor-design.backend.service.js +0 -22
  1040. package/dist/esm/external-providers/services/flow-actor-design.backend.service.js.map +0 -1
  1041. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -0
  1042. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -0
  1043. package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -0
  1044. package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -0
  1045. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -0
  1046. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -0
  1047. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -0
  1048. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -0
  1049. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -0
  1050. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -0
  1051. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -0
  1052. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -0
  1053. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -0
  1054. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -0
  1055. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -0
  1056. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"role-conferral.backend.utils.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/role-conferral.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAK5C;IACC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAE7D,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC9C,IAAI,MAAM,CAAC,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YACpF,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * # Role conferral — ONE derivation of \"which role keys confer authority X, in scope S\"\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — the shared derivation every authority floor\n * measures its protected population with.\n *\n * ## The role-key vocabulary is genuinely OPEN, and closing it would be a defect\n *\n * Recorded here because the opposite is the obvious reading and was proposed as a finding: *\"a\n * membership's `roles` field is a free string, so an application-scope role value is storable in an\n * organisation-scoped membership row.\"* Both halves of that are true. The conclusion — close the\n * vocabulary — is not, and the evidence is in the framework's own contract:\n *\n * - `RolesSchema` is `union([enum(CORE_APP_ROLES), enum(CORE_ORG_ROLES), z.string().min(1)])`, and\n * the third arm is the SUPPORTED feature, not an oversight: an application registers its own role\n * keys at startup through `initializeRolesWithCustom`, and `RolesConfigurationSchema` is a\n * `z.record(z.string(), RoleDefinitionSchema)`. A closed enum would delete custom roles.\n * - So \"is this string a valid role key?\" has no static answer. It has a RUNTIME answer, per\n * application, per scope — which is exactly what the role tables are.\n *\n * ## What IS closed, and where its one source lives\n *\n * The **scope partition**. Every role key belongs to exactly one `relatedPrimaryScope`, and\n * `AuthorizationsBackendService.getRoleHierarchy(roleKey, scope)` is the single runtime source of\n * that fact: it selects the APPLICATION table or the ORGANIZATIONS table and never consults both. A\n * key unknown in the passed scope expands to the EMPTY chain, which is what makes an app-scope\n * string written into an org-scoped membership row confer nothing — the safety comes from\n * RESOLUTION, not from the field's type, and it must stay that way.\n *\n * ## What was duplicated, and is not any more\n *\n * The derivation BUILT ON that partition. `resolveSuperAdminConferringRoles` and\n * `resolveOrganizationOwnerConferringRoles` were the same eleven lines twice, differing only in\n * (table, scope, anchor) — each carrying its own paragraph re-establishing the partition argument\n * above, in its own words, for its own reader. That is the shape `CLAUDE.md` asks to have one named\n * runtime source for: not the role STRINGS, which cannot be closed, but the QUESTION asked of them.\n *\n * Two floors measure populations with it today ({@link resolveSuperAdminConferringRoles},\n * {@link resolveOrganizationOwnerConferringRoles}); a third scope's floor is one call, not another\n * copy.\n *\n * ## Why this module ships with NO test file of its own\n *\n * A direct suite was written and then DELETED, because measuring it showed every property it\n * asserted was already covered — and its stated rationale was false. It claimed the floor suites\n * \"stub `getRoleHierarchy` as a function that IGNORES its scope\"; both actually stub\n * `(role, scope) => scope === <their own scope> ? table[role] : []`, and both tables already contain\n * a CUSTOM, non-enum role key (`CUSTOM_PLATFORM_OWNER`, `CUSTOM_TENANT_PRINCIPAL`) reaching the\n * anchor — so the open-vocabulary property is pinned too.\n *\n * Proven rather than assumed: binding the super-admin floor to `ORGANIZATIONS` scope instead of\n * `APPLICATION` — the one regression the extraction newly makes possible — reddens THREE tests in\n * `super-admin-floor.backend.utils.test.ts` on its own. The bindings are the coverage.\n *\n * So do not add a suite here to \"cover the new module\". If a THIRD binding appears, pin it in its\n * own floor's suite the way these two are; that is where a wrong `scope` argument is observable.\n */\n\nimport type { ResourcePrimaryScope } from '@wildo-ai/saas-models';\n\n/**\n * Every role key in `declaredRoleKeys` whose `inheritFrom` chain reaches `anchorRole`, within\n * `scope` — i.e. every role whose holder passes a gate that requires `anchorRole`.\n *\n * ## Why the derivation is shaped this way\n *\n * **It mirrors the authorization layer's own test.** `authorize` admits a caller when\n * `getRoleHierarchy(heldRole, scope).includes(requiredRole)`. Deriving the set the same way is what\n * keeps a floor counting exactly the principals the gates would let through; an independently\n * written membership test is how the two drift, and a floor that measures a different population\n * than the gate protects is worse than no floor — it reports a healthy count for an unprotected\n * scope.\n *\n * **The anchor is seeded unconditionally rather than discovered by the walk.** If an application's\n * role table somehow omitted the anchor key, `roleHierarchyResolver` would return an empty chain for\n * every key, the conferring set would be empty, and the floor would then measure a population that\n * is empty BY CONSTRUCTION — refusing every removal forever while protecting nothing.\n *\n * **`scope` is passed to the resolver, never assumed.** That single argument is what carries the\n * closed half of the vocabulary (see this module's header): the caller states which table the keys\n * are to be read against, and a key belonging to the other table expands to nothing. A caller that\n * passed the wrong scope would silently get `[anchorRole]` — the seed — which is the fail-CLOSED\n * direction for a floor (it under-counts the protected population and so refuses more, never less).\n *\n * @param declaredRoleKeys the keys of the LIVE role table for `scope`. Live, because the effective\n * hierarchy is application-configurable and a statically-derived set would silently disagree with\n * the roles the authorization layer actually honours.\n */\nexport function resolveRolesConferringAnchor(params: {\n readonly anchorRole: string;\n readonly scope: ResourcePrimaryScope;\n readonly declaredRoleKeys: readonly string[];\n readonly roleHierarchyResolver: (roleKey: string, scope: ResourcePrimaryScope) => string[];\n}): string[] {\n const conferringRoles = new Set<string>([params.anchorRole]);\n\n for (const roleKey of params.declaredRoleKeys) {\n if (params.roleHierarchyResolver(roleKey, params.scope).includes(params.anchorRole)) {\n conferringRoles.add(roleKey);\n }\n }\n\n return [...conferringRoles];\n}\n"]}
1
+ {"version":3,"file":"role-conferral.backend.utils.js","sourceRoot":"","sources":["../../../../src/security/authorizations/role-conferral.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAK5C;IACC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAE7D,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC9C,IAAI,oBAAoB,CAAC;YACvB,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,MAAM,CAAC,UAAU;YAClC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;SACpD,CAAC,EAAE,CAAC;YACH,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAKpC;IACC,OAAO,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AACzG,CAAC","sourcesContent":["/**\n * # Role conferral — ONE derivation of \"which role keys confer authority X, in scope S\"\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — the shared derivation every authority floor\n * measures its protected population with.\n *\n * ## The role-key vocabulary is genuinely OPEN, and closing it would be a defect\n *\n * Recorded here because the opposite is the obvious reading and was proposed as a finding: *\"a\n * membership's `roles` field is a free string, so an application-scope role value is storable in an\n * organisation-scoped membership row.\"* Both halves of that are true. The conclusion — close the\n * vocabulary — is not, and the evidence is in the framework's own contract:\n *\n * - `RolesSchema` is `union([enum(CORE_APP_ROLES), enum(CORE_ORG_ROLES), z.string().min(1)])`, and\n * the third arm is the SUPPORTED feature, not an oversight: an application registers its own role\n * keys at startup through `initializeRolesWithCustom`, and `RolesConfigurationSchema` is a\n * `z.record(z.string(), RoleDefinitionSchema)`. A closed enum would delete custom roles.\n * - So \"is this string a valid role key?\" has no static answer. It has a RUNTIME answer, per\n * application, per scope — which is exactly what the role tables are.\n *\n * ## What IS closed, and where its one source lives\n *\n * The **scope partition**. Every role key belongs to exactly one `relatedPrimaryScope`, and\n * `AuthorizationsBackendService.getRoleHierarchy(roleKey, scope)` is the single runtime source of\n * that fact: it selects the APPLICATION table or the ORGANIZATIONS table and never consults both. A\n * key unknown in the passed scope expands to the EMPTY chain, which is what makes an app-scope\n * string written into an org-scoped membership row confer nothing — the safety comes from\n * RESOLUTION, not from the field's type, and it must stay that way.\n *\n * ## What was duplicated, and is not any more\n *\n * The derivation BUILT ON that partition. `resolveSuperAdminConferringRoles` and\n * `resolveOrganizationOwnerConferringRoles` were the same eleven lines twice, differing only in\n * (table, scope, anchor) — each carrying its own paragraph re-establishing the partition argument\n * above, in its own words, for its own reader. That is the shape `CLAUDE.md` asks to have one named\n * runtime source for: not the role STRINGS, which cannot be closed, but the QUESTION asked of them.\n *\n * Two floors measure populations with it today ({@link resolveSuperAdminConferringRoles},\n * {@link resolveOrganizationOwnerConferringRoles}); a third scope's floor is one call, not another\n * copy.\n *\n * ## Why this module ships with NO test file of its own\n *\n * A direct suite was written and then DELETED, because measuring it showed every property it\n * asserted was already covered — and its stated rationale was false. It claimed the floor suites\n * \"stub `getRoleHierarchy` as a function that IGNORES its scope\"; both actually stub\n * `(role, scope) => scope === <their own scope> ? table[role] : []`, and both tables already contain\n * a CUSTOM, non-enum role key (`CUSTOM_PLATFORM_OWNER`, `CUSTOM_TENANT_PRINCIPAL`) reaching the\n * anchor — so the open-vocabulary property is pinned too.\n *\n * Proven rather than assumed: binding the super-admin floor to `ORGANIZATIONS` scope instead of\n * `APPLICATION` — the one regression the extraction newly makes possible — reddens THREE tests in\n * `super-admin-floor.backend.utils.test.ts` on its own. The bindings are the coverage.\n *\n * So do not add a suite here to \"cover the new module\". If a THIRD binding appears, pin it in its\n * own floor's suite the way these two are; that is where a wrong `scope` argument is observable.\n */\n\nimport type { ResourcePrimaryScope } from '@wildo-ai/saas-models';\n\n/**\n * Every role key in `declaredRoleKeys` whose `inheritFrom` chain reaches `anchorRole`, within\n * `scope` — i.e. every role whose holder passes a gate that requires `anchorRole`.\n *\n * ## Why the derivation is shaped this way\n *\n * **It mirrors the authorization layer's own test.** `authorize` admits a caller when\n * `getRoleHierarchy(heldRole, scope).includes(requiredRole)`. Deriving the set the same way is what\n * keeps a floor counting exactly the principals the gates would let through; an independently\n * written membership test is how the two drift, and a floor that measures a different population\n * than the gate protects is worse than no floor — it reports a healthy count for an unprotected\n * scope.\n *\n * **The anchor is seeded unconditionally rather than discovered by the walk.** If an application's\n * role table somehow omitted the anchor key, `roleHierarchyResolver` would return an empty chain for\n * every key, the conferring set would be empty, and the floor would then measure a population that\n * is empty BY CONSTRUCTION — refusing every removal forever while protecting nothing.\n *\n * **`scope` is passed to the resolver, never assumed.** That single argument is what carries the\n * closed half of the vocabulary (see this module's header): the caller states which table the keys\n * are to be read against, and a key belonging to the other table expands to nothing. A caller that\n * passed the wrong scope would silently get `[anchorRole]` — the seed — which is the fail-CLOSED\n * direction for a floor (it under-counts the protected population and so refuses more, never less).\n *\n * @param declaredRoleKeys the keys of the LIVE role table for `scope`. Live, because the effective\n * hierarchy is application-configurable and a statically-derived set would silently disagree with\n * the roles the authorization layer actually honours.\n */\nexport function resolveRolesConferringAnchor(params: {\n readonly anchorRole: string;\n readonly scope: ResourcePrimaryScope;\n readonly declaredRoleKeys: readonly string[];\n readonly roleHierarchyResolver: (roleKey: string, scope: ResourcePrimaryScope) => string[];\n}): string[] {\n const conferringRoles = new Set<string>([params.anchorRole]);\n\n for (const roleKey of params.declaredRoleKeys) {\n if (roleConfersAuthority({\n heldRoleKey: roleKey,\n requiredRoleKey: params.anchorRole,\n scope: params.scope,\n roleHierarchyResolver: params.roleHierarchyResolver,\n })) {\n conferringRoles.add(roleKey);\n }\n }\n\n return [...conferringRoles];\n}\n\n/**\n * Does holding `heldRoleKey` in `scope` satisfy a gate that requires `requiredRoleKey`?\n *\n * ## The one place the scope partition is consulted\n *\n * This is the ATOM. Everything this module's header argues about the vocabulary lands here: the role\n * key is an open string, the SCOPE partition is what is closed, and the safety comes from RESOLUTION\n * rather than from the field's type — a key unknown in `scope` expands to the EMPTY chain and\n * therefore confers nothing, which is what makes an application-scope string written into an\n * organisation-scoped membership row harmless. Every copy of these two lines is another place that\n * argument can quietly stop being true, and the only way to notice would be a security test nobody\n * wrote.\n *\n * ## Two names for one parameter, deliberately\n *\n * A FLOOR calls the target an ANCHOR — it is measuring the population that reaches an authority. A\n * GATE calls it the REQUIRED ROLE — it is deciding one caller. Same question of the same table, so\n * the parameter is named neutrally here rather than picked from one caller's vocabulary.\n *\n * ## What this does NOT do, and must not grow into\n *\n * It answers about ONE held key. The quantifier belongs to the caller, and the callers genuinely\n * differ: `resolveRolesConferringAnchor` maps it over the declared role TABLE to produce a SET, so a\n * floor can measure a protected population; an admission maps it over the roles the CALLER holds to\n * produce a BOOLEAN. Those are two different questions and collapsing them into one helper that\n * \"does both\" is the convenience-over-semantics failure `.claude/rules/design-philosophy.md` refuses.\n * The distinction is kept; only the shared atom is named — which is what that rule asks for when it\n * says to add helpers for controlled merging instead of collapsing a distinction.\n *\n * @param heldRoleKey a role key a principal holds, or a key declared in the role table.\n * @param requiredRoleKey the authority being tested for — a floor's anchor, or a gate's required role.\n * @param scope which role table `heldRoleKey` is to be read against. Passing the wrong one resolves\n * to the empty chain and answers `false`, which is the fail-CLOSED direction for both callers.\n */\nexport function roleConfersAuthority(params: {\n readonly heldRoleKey: string;\n readonly requiredRoleKey: string;\n readonly scope: ResourcePrimaryScope;\n readonly roleHierarchyResolver: (roleKey: string, scope: ResourcePrimaryScope) => string[];\n}): boolean {\n return params.roleHierarchyResolver(params.heldRoleKey, params.scope).includes(params.requiredRoleKey);\n}\n"]}
@@ -99,30 +99,40 @@ export declare enum ScopeRootConfinementDisposition {
99
99
  * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` (`users`), `ORG_MEMBER` (`applications` LIST) |
100
100
  * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the authorizing grant | `PLATFORM_DIRECTORY_ACCESS`, naming no elevation |
101
101
  *
102
- * So the NARROW act is governed and the WIDE one is not, and the wide one sits at a strictly lower
103
- * role tier. That is the correct reading of the finding, and it is worse than "not symmetric".
102
+ * That WAS the correct reading of the finding, and it was worse than "not symmetric": the control
103
+ * was inverted.
104
104
  *
105
- * ## Why the grant model cannot govern it, and what that does NOT mean
105
+ * ## CLOSED 2026-09-09 — the table above is HISTORY, not current state
106
106
  *
107
- * `hasUsablePlatformAccessGrant` needs a TARGET tenant and answers `false` on an empty one; a
108
- * collection call names none. So the EXISTING mechanism is structurally inapplicable here — but
109
- * that is a fact about the mechanism, not a proof that prevention is impossible, and the
110
- * distinction matters because the shipped `PLATFORM_DIRECTORY_ACCESS` JSDoc states the stronger
111
- * form and a reader could take it as "do not try".
107
+ * The "elevation required" cell now reads *a usable, second-signed `applicationAccessGrants` row*
108
+ * on both halves. Do not reason from the table as if it still described the system; it is kept
109
+ * because the inversion is the argument for the mechanism that replaced it.
112
110
  *
113
- * An application-wide grant KIND is buildable. What blocks it is a decision, not structure, and the
114
- * decision is WHO APPROVES: a tenant grant is approved by the tenant it names (Lockbox), and an
115
- * application-wide one names none — so it is either self-service (auto-approved, which is the
116
- * grant model's own default posture) or two-person, which
117
- * `.claude/rules/administrative-continuity-floors.md` recommends for the widest acts. Nobody may
118
- * pick that unilaterally.
111
+ * `hasUsablePlatformAccessGrant` still needs a TARGET tenant and still answers `false` on an empty
112
+ * one, so the TENANT grant remains structurally inapplicable to a collection call — that half was
113
+ * always a fact about the mechanism rather than a proof that prevention was impossible, and it is
114
+ * what made a second resource necessary rather than a field.
115
+ *
116
+ * **`CoreResourceType.APPLICATION_ACCESS_GRANTS` is that second resource**, approved under a
117
+ * TWO-PERSON RULE: the signature must come from a platform administrator who is NOT the requester,
118
+ * enforced in the implementation and hidden by the operation's `enabledCondition`. Customer
119
+ * approval (Lockbox, Access Approval) is the industry ceiling and is structurally unavailable —
120
+ * there is no single customer to ask — so a second signature is the strongest control that exists
121
+ * for this act; `.claude/rules/administrative-continuity-floors.md` says so in as many words.
122
+ *
123
+ * The admission is `readRequiresApplicationWideGrant`, which COMPOSES this authority's own
124
+ * `isUnconfinedScopeRootDirectoryRead` with `isObservedCrossTenantRead` rather than asking a third
125
+ * question, so the gate and the trail cannot disagree about which reads are in scope. Auto-approval
126
+ * was rejected: it is the tenant grant's default posture only because a tenant can opt in above it,
127
+ * and there is no such party here.
119
128
  *
120
129
  * A related choice is already RECORDED and should not be quietly reversed: a browsable platform
121
130
  * tenant directory was considered and rejected, on the reasoning that industry practice (Customer
122
131
  * Lockbox, Access Approval) has the tenant id arrive out of band with the customer's support
123
- * ticket. That reasoning also answers the grant flow's bootstrap gap — an operator needs an
124
- * `organizationId` to request a grant and no surface yields one — so reopening the elevation
125
- * question means reopening that decision too.
132
+ * ticket. It is UNCHANGED by the closure above and is now load-bearing in a second way: with the
133
+ * directory read itself elevated, an operator who wanted to browse tenants would need an
134
+ * application-wide grant and a second signature to do it, which is the outcome that decision
135
+ * wanted anyway.
126
136
  *
127
137
  * ## What was rejected on MEASUREMENT rather than on cost
128
138
  *
@@ -1 +1 @@
1
- {"version":3,"file":"scope-root-collection-confinement.backend.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/scope-root-collection-confinement.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAE9B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AAE/B,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oBAAY,+BAA+B;IACzC;;;OAGG;IACH,gCAAgC,qCAAqC;IACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;IACH,qCAAqC,0CAA0C;IAC/E;;;;;;;;;;;OAWG;IACH,qCAAqC,0CAA0C;IAC/E;;;;;;;OAOG;IACH,oCAAoC,yCAAyC;CAC9E;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,CAKtH,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,sCAAsC,GAC/C,+BAA+B,GAAG,SAAS,CAG7C;AA8CD,oGAAoG;AACpG,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,aAAa,EAAE,8BA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AAC;IAChE,QAAQ,CAAC,qBAAqB,EAAE,sCAAsC,CAAC;IACvE,2FAA2F;IAC3F,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,CAAC;CACnE,GAAG,OAAO,CA0BV"}
1
+ {"version":3,"file":"scope-root-collection-confinement.backend.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/scope-root-collection-confinement.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAE9B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AAE/B,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oBAAY,+BAA+B;IACzC;;;OAGG;IACH,gCAAgC,qCAAqC;IACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,qCAAqC,0CAA0C;IAC/E;;;;;;;;;;;OAWG;IACH,qCAAqC,0CAA0C;IAC/E;;;;;;;OAOG;IACH,oCAAoC,yCAAyC;CAC9E;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,CAKtH,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,sCAAsC,GAC/C,+BAA+B,GAAG,SAAS,CAG7C;AA8CD,oGAAoG;AACpG,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,aAAa,EAAE,8BAA8B,CAAC;IACvD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS;QACjC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;QACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAA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100,30 +100,40 @@ export var ScopeRootConfinementDisposition;
100
100
  * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` (`users`), `ORG_MEMBER` (`applications` LIST) |
101
101
  * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the authorizing grant | `PLATFORM_DIRECTORY_ACCESS`, naming no elevation |
102
102
  *
103
- * So the NARROW act is governed and the WIDE one is not, and the wide one sits at a strictly lower
104
- * role tier. That is the correct reading of the finding, and it is worse than "not symmetric".
103
+ * That WAS the correct reading of the finding, and it was worse than "not symmetric": the control
104
+ * was inverted.
105
105
  *
106
- * ## Why the grant model cannot govern it, and what that does NOT mean
106
+ * ## CLOSED 2026-09-09 — the table above is HISTORY, not current state
107
107
  *
108
- * `hasUsablePlatformAccessGrant` needs a TARGET tenant and answers `false` on an empty one; a
109
- * collection call names none. So the EXISTING mechanism is structurally inapplicable here — but
110
- * that is a fact about the mechanism, not a proof that prevention is impossible, and the
111
- * distinction matters because the shipped `PLATFORM_DIRECTORY_ACCESS` JSDoc states the stronger
112
- * form and a reader could take it as "do not try".
108
+ * The "elevation required" cell now reads *a usable, second-signed `applicationAccessGrants` row*
109
+ * on both halves. Do not reason from the table as if it still described the system; it is kept
110
+ * because the inversion is the argument for the mechanism that replaced it.
113
111
  *
114
- * An application-wide grant KIND is buildable. What blocks it is a decision, not structure, and the
115
- * decision is WHO APPROVES: a tenant grant is approved by the tenant it names (Lockbox), and an
116
- * application-wide one names none — so it is either self-service (auto-approved, which is the
117
- * grant model's own default posture) or two-person, which
118
- * `.claude/rules/administrative-continuity-floors.md` recommends for the widest acts. Nobody may
119
- * pick that unilaterally.
112
+ * `hasUsablePlatformAccessGrant` still needs a TARGET tenant and still answers `false` on an empty
113
+ * one, so the TENANT grant remains structurally inapplicable to a collection call — that half was
114
+ * always a fact about the mechanism rather than a proof that prevention was impossible, and it is
115
+ * what made a second resource necessary rather than a field.
116
+ *
117
+ * **`CoreResourceType.APPLICATION_ACCESS_GRANTS` is that second resource**, approved under a
118
+ * TWO-PERSON RULE: the signature must come from a platform administrator who is NOT the requester,
119
+ * enforced in the implementation and hidden by the operation's `enabledCondition`. Customer
120
+ * approval (Lockbox, Access Approval) is the industry ceiling and is structurally unavailable —
121
+ * there is no single customer to ask — so a second signature is the strongest control that exists
122
+ * for this act; `.claude/rules/administrative-continuity-floors.md` says so in as many words.
123
+ *
124
+ * The admission is `readRequiresApplicationWideGrant`, which COMPOSES this authority's own
125
+ * `isUnconfinedScopeRootDirectoryRead` with `isObservedCrossTenantRead` rather than asking a third
126
+ * question, so the gate and the trail cannot disagree about which reads are in scope. Auto-approval
127
+ * was rejected: it is the tenant grant's default posture only because a tenant can opt in above it,
128
+ * and there is no such party here.
120
129
  *
121
130
  * A related choice is already RECORDED and should not be quietly reversed: a browsable platform
122
131
  * tenant directory was considered and rejected, on the reasoning that industry practice (Customer
123
132
  * Lockbox, Access Approval) has the tenant id arrive out of band with the customer's support
124
- * ticket. That reasoning also answers the grant flow's bootstrap gap — an operator needs an
125
- * `organizationId` to request a grant and no surface yields one — so reopening the elevation
126
- * question means reopening that decision too.
133
+ * ticket. It is UNCHANGED by the closure above and is now load-bearing in a second way: with the
134
+ * directory read itself elevated, an operator who wanted to browse tenants would need an
135
+ * application-wide grant and a second signature to do it, which is the outcome that decision
136
+ * wanted anyway.
127
137
  *
128
138
  * ## What was rejected on MEASUREMENT rather than on cost
129
139
  *
@@ -1 +1 @@
1
- {"version":3,"file":"scope-root-collection-confinement.backend.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/scope-root-collection-confinement.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,mCAAmC,EACnC,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,kGAAkG;AAClG,MAAM,CAAC,MAAM,4B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AC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * # Scope-ROOT collection confinement — ONE definition, compiled by both adapters\n *\n * assurance-control: WILDO.ACCESS.SCOPE_CONFINEMENT — confines a collection read of the tenant\n * resource itself to the tenants the caller belongs to.\n *\n * ## The hole this closes\n *\n * Every ORGANIZATIONS-scoped resource is confined by `assignInitiatorOrganizationConfinementToFilter`\n * (D3) or by the context-entry loop, both keyed on the `organizationId` COLUMN the row carries.\n * `organizations` carries no such column: it IS the tenant, addressed by `_id`. Both adapters then\n * lose the axis twice over, and independently —\n *\n * 1. `blacklistedFields` is seeded with the resource's own `resourceFieldIdentifier` \"to avoid\n * self-reference in filtering\". For the scope root that identifier IS the scope field, so the\n * context loop skips it and D3 returns `false` at its blacklist check;\n * 2. `OrganizationSchema` models no `organizationId` path (and PostgreSQL plans no such column), so\n * even an admitted D3 would find nothing to write.\n *\n * Measured, not reasoned: a scope-root LIST compiled to `{}` — the empty filter, no tenant predicate\n * at all — on BOTH adapters, while a non-root org-scoped resource on the identical execution context\n * compiled to `{organizationId: 'org-caller'}`. See\n * `base-classes/__tests__/scope-root-collection-confinement.probe.test.ts`.\n *\n * Nothing leaked, because the ORGANIZATIONS branch of `validateParentScopeAccess` refused every\n * caller before the repository ran — it demands a PARENT organization scope, which the scope root\n * structurally does not have. So the gate was the SOLE control standing between an APPLICATION-role\n * caller and an unconfined cross-tenant tenant directory, and the two-line \"fix\" to that gate would\n * have been a full cross-tenant disclosure that turned every existing pin green.\n *\n * This module is therefore the half that had to land FIRST. See\n * `.claude/plans/organizations-scope-root-collection-gate-analysis.md`.\n *\n * ## Why an authority module and not two repository branches\n *\n * There are two `buildContextualFilter` implementations. The retention hide learned the cost of a\n * hand-written copy on each side (gate G-PG-NULL); D3 learned it again — it existed on PostgreSQL\n * and not on MongoDB, \"the only measured divergence where the two adapters disagreed about WHO CAN\n * SEE WHOSE ROWS\". A tenancy predicate present on one adapter and absent on the other is not a gap,\n * it is a bypass on the adapter that lacks it (`.claude/rules/invariant-call-site-enumeration.md`).\n *\n * ## Membership comes from ROLE ENTRIES, never from `initiatorIds`\n *\n * `initiatorIds.organizationId` names the ONE tenant the request is acting in, which is the wrong\n * question here: a collection read of the tenant resource asks \"which tenants are yours\", plural.\n * Role entries are also the one input a request cannot author for itself — the same reasoning\n * `holdsOrganizationWideEntryFor` and `authorizeOrganizations` rest on.\n *\n * ORGANIZATION-WIDE entries only. A unit-narrowed grant confers authority over a unit inside a\n * tenant, not over the tenant row, and every org-wide gate in the authorization service filters\n * those out; counting one here would let a unit member enumerate the tenant they are narrowed inside.\n */\n\nimport {\n CoreResourceOperation,\n ExecutionContext_ExecutionType,\n PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE,\n ResourcePrimaryScope,\n isOrganizationWideRoleInfo,\n} from '@wildo-ai/saas-models';\n\n/** The queryable key a scope-root row is addressed by. Named once so no call site can typo it. */\nexport const SCOPE_ROOT_CONFINEMENT_FIELD = '_id';\n\n/**\n * WHY a given scope root is, or is not, row-confined.\n *\n * A named vocabulary rather than four prose comments, because \"which roots owe confinement\" is a\n * closed semantic question and had been answered four times, in four files, in four different words\n * — the shape `CLAUDE.md` asks to have one runtime source for. It also makes the answer READABLE\n * from the authority itself instead of from the resource configs it governs.\n *\n * THE RULE THAT DECIDES MEMBERSHIP, stated once so the next scope is not settled by taste:\n *\n * > **A scope root owes row confinement exactly when a caller's authority for that scope names ONE\n * > INSTANCE of it, while the collection holds every instance.**\n *\n * That is a fact about ROLE ENTRIES, and it is measurable rather than a judgement: only an\n * `ORGANIZATIONS` entry carries a `relatedResourceId` selecting a particular scope instance. An\n * `APPLICATION` entry names the deployment (there is one), and `USER_SELF` / `ANONYMOUS` have no\n * role entries at all — their instance comes from `initiatorIds`, which the request supplies about\n * ITSELF and which therefore cannot be an authority set. So on today's vocabulary exactly one root\n * owes it, and that is a derivation, not a denominator someone chose.\n */\nexport enum ScopeRootConfinementDisposition {\n /**\n * Confined to the tenants the caller holds an organization-WIDE role entry for. The only\n * disposition that produces a predicate.\n */\n CONFINED_TO_CALLER_ORGANIZATIONS = 'CONFINED_TO_CALLER_ORGANIZATIONS',\n /**\n * The root's HTTP collection surface is the APPLICATION-tier administrative directory, and the\n * caller's authority for it is application-wide — so \"all rows\" is not wider than the authority\n * that reached them. Narrower callers reach the same rows only through a route that confines them\n * by a DIFFERENT mechanism (`users` is enumerated per tenant through\n * `/organizations/{organizationId}/users/search`, whose junction filter intersects `_id` with the\n * tenant's membership; the global routes stay admin-gated).\n *\n * ## ⚠️ The ELEVATION asymmetry this disposition carries, stated so nobody has to re-derive it\n *\n * Read against the per-row door, the sentence above is the whole of the control and it is a\n * statement about a STANDING role. Measured 2026-09-09:\n *\n * | | per-row crossing | this directory read |\n * |---|---|---|\n * | declared per variant | `admitsCrossTenantPlatformAdministration` | nothing |\n * | elevation required | a usable, time-bound, justified `platformAccessGrants` row | none |\n * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` (`users`), `ORG_MEMBER` (`applications` LIST) |\n * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the authorizing grant | `PLATFORM_DIRECTORY_ACCESS`, naming no elevation |\n *\n * So the NARROW act is governed and the WIDE one is not, and the wide one sits at a strictly lower\n * role tier. That is the correct reading of the finding, and it is worse than \"not symmetric\".\n *\n * ## Why the grant model cannot govern it, and what that does NOT mean\n *\n * `hasUsablePlatformAccessGrant` needs a TARGET tenant and answers `false` on an empty one; a\n * collection call names none. So the EXISTING mechanism is structurally inapplicable here — but\n * that is a fact about the mechanism, not a proof that prevention is impossible, and the\n * distinction matters because the shipped `PLATFORM_DIRECTORY_ACCESS` JSDoc states the stronger\n * form and a reader could take it as \"do not try\".\n *\n * An application-wide grant KIND is buildable. What blocks it is a decision, not structure, and the\n * decision is WHO APPROVES: a tenant grant is approved by the tenant it names (Lockbox), and an\n * application-wide one names none — so it is either self-service (auto-approved, which is the\n * grant model's own default posture) or two-person, which\n * `.claude/rules/administrative-continuity-floors.md` recommends for the widest acts. Nobody may\n * pick that unilaterally.\n *\n * A related choice is already RECORDED and should not be quietly reversed: a browsable platform\n * tenant directory was considered and rejected, on the reasoning that industry practice (Customer\n * Lockbox, Access Approval) has the tenant id arrive out of band with the customer's support\n * ticket. That reasoning also answers the grant flow's bootstrap gap — an operator needs an\n * `organizationId` to request a grant and no surface yields one — so reopening the elevation\n * question means reopening that decision too.\n *\n * ## What was rejected on MEASUREMENT rather than on cost\n *\n * Confining this read to tenants the caller holds a grant for is not merely undesirable here, it\n * is structurally unavailable for the widest case: `users` rows carry NO tenant column at all\n * (membership lives in `organizationMembers`), so there is nothing for a tenant predicate to bind\n * to. Any such confinement would be a junction query that also removes the tenant-less user — the\n * person who has just signed up and belongs to nobody — from the only surface that can find them.\n */\n UNCONFINED_APPLICATION_TIER_DIRECTORY = 'UNCONFINED_APPLICATION_TIER_DIRECTORY',\n /**\n * ONE DATABASE PER APPLICATION. \"An application's organizations live in that application's own\n * database\" — so this collection holds this deployment's own row and a caller can only ever see\n * the application they are already using. Safe by ARCHITECTURE, not by a predicate, which is why\n * it is spelled out: the default LIST/SEARCH variants are gated `ORG_MEMBER`, one role tier BELOW\n * the `organizations` hole, and would be a full directory the day a second row existed.\n *\n * The premise is ASSERTED rather than assumed, and only a lane with a real store can assert it:\n * `examples/wonder-todos/e2e/applications-scope-root-list-confinement.e2e.ts` fails if the\n * deployment ever holds more than one application row. (The unit probe beside this authority\n * asserts the complementary half — that this declaration and the compiled filter agree.)\n */\n UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE = 'UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE',\n /**\n * There is NOTHING to confine to. An anonymous session is a pre-authentication visitor of the\n * application; it has no organization, so a \"confined\" listing would name a relationship that does\n * not exist. `APP_ADMIN_SUPER_ADMIN` is the whole of the control, and it is the right one.\n *\n * ⚠️ If anonymous sessions ever gain a tenant association this becomes an ORGANIZATIONS-axis\n * question and the disposition moves to {@link ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS}.\n */\n UNCONFINED_NO_CONFINING_RELATIONSHIP = 'UNCONFINED_NO_CONFINING_RELATIONSHIP',\n}\n\n/**\n * The disposition of every scope root, TOTAL over `ResourcePrimaryScope`.\n *\n * Total on purpose (`.claude/rules/derive-before-you-ask.md` #3): a scope added to the vocabulary\n * tomorrow is a COMPILE ERROR here, so someone has to answer the rule above for it rather than\n * inheriting silence. The predicate this replaced was `resourcePrimaryScope !== ORGANIZATIONS` with\n * a comment saying the other three \"would change four surfaces this analysis did not measure\" —\n * true when written, and by then no longer true: all four had since been measured\n * (`scope-root-collection-confinement.probe.test.ts`, the RESIDUAL sweep) and each answer recorded\n * in a different resource config. This map is where that answer now lives, once.\n */\nexport const SCOPE_ROOT_CONFINEMENT_DISPOSITIONS: Readonly<Record<ResourcePrimaryScope, ScopeRootConfinementDisposition>> = Object.freeze({\n [ResourcePrimaryScope.ORGANIZATIONS]: ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS,\n [ResourcePrimaryScope.USER_SELF]: ScopeRootConfinementDisposition.UNCONFINED_APPLICATION_TIER_DIRECTORY,\n [ResourcePrimaryScope.APPLICATION]: ScopeRootConfinementDisposition.UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE,\n [ResourcePrimaryScope.ANONYMOUS]: ScopeRootConfinementDisposition.UNCONFINED_NO_CONFINING_RELATIONSHIP,\n});\n\n/**\n * The disposition governing this resource, or `undefined` when it is not a scope root at all.\n *\n * Exported so a test — or a future gate — can ask the SAME question this authority answers instead\n * of re-deriving it from the resource configs, which is how the four recorded answers came to be\n * four separate paragraphs in the first place.\n */\nexport function resolveScopeRootConfinementDisposition(\n resource: ScopeRootCollectionConfinementResource,\n): ScopeRootConfinementDisposition | undefined {\n if (!isOwnScopeRootResource(resource)) return undefined;\n return SCOPE_ROOT_CONFINEMENT_DISPOSITIONS[resource.resourcePrimaryScope as ResourcePrimaryScope];\n}\n\n/**\n * The operations this confinement governs: those that resolve a SET of rows with no per-row\n * authorization behind them.\n *\n * Per-INSTANCE operations are deliberately absent, and this is a decision rather than an oversight.\n * `authorizeOrganizations` fetches the row and compares its tenant against the caller's org-wide\n * role entries, refusing a non-member — that gate was hardened on 2026-08-05 and is measured healthy\n * (a per-instance READ answers 200 for a member while every collection call answers 403). Adding a\n * row filter underneath it would buy no isolation and would actively BREAK the declared cross-tenant\n * repair doors (`restore`, `activate`, `requestDeletion: admin`), every one of which is per-instance\n * — silently filtering an operation authorization deliberately admitted, which is the precise\n * failure `.claude/rules/administrative-continuity-floors.md` warns about and which D3's own\n * crossing-awareness exists to prevent.\n *\n * The write-family bulk verbs ARE included. `organizations` declares none today, so including them\n * is free; excluding them would leave a set-shaped write on the tenant resource unconfined the day\n * one is declared, which is exactly how a scope-root hole comes back.\n */\nconst SCOPE_ROOT_CONFINED_OPERATIONS: readonly CoreResourceOperation[] = [\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE_MANY,\n];\n\n/**\n * Execution types that carry no membership by construction and must not be confined.\n *\n * Mirrors {@link ORGANIZATION_UNIT_NARROWING_EXEMPT_EXECUTION_TYPES} and is exempt for the same\n * reason: `INTERNALLY_INITIATED_REQUEST` is the framework's context-free system actor (batch, cron,\n * cascade, bootstrap) and `WEBHOOK_CALLBACK` is trusted after signature verification. Neither holds\n * role entries, so confining them would not fail closed — it would empty every tenant sweep, purge\n * and cascade, presenting a broken system as \"no rows\".\n *\n * ⚠️ Every OTHER execution type — user, machine, anonymous, consumable-token, public — is confined,\n * and a principal with no org-wide entry is confined to the EMPTY set rather than exempted. Adding a\n * member here removes a tenant-isolation check.\n */\nconst SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES: readonly ExecutionContext_ExecutionType[] = [\n ExecutionContext_ExecutionType.INTERNALLY_INITIATED_REQUEST,\n ExecutionContext_ExecutionType.WEBHOOK_CALLBACK,\n];\n\n/** What this authority needs from the execution context. Deliberately narrow, like its siblings. */\nexport interface ScopeRootCollectionConfinementSignal {\n readonly executionType: ExecutionContext_ExecutionType;\n readonly initiatorRoles?: readonly {\n readonly relatedPrimaryScope?: string;\n readonly relatedResourceId?: string | null;\n readonly roles?: readonly string[];\n /**\n * Present ⇒ the entry is a UNIT grant, not tenant membership. Declared here rather than left\n * implicit because omitting it is how a test fixture builds an entry that LOOKS unit-scoped and\n * is silently treated as organization-wide — which is how the first draft of this module's own\n * pin passed for the wrong reason.\n */\n readonly organizationUnitId?: string;\n }[] | null;\n /**\n * Only the crossing declaration is read. An operation that did NOT declare one is confined, which\n * is what keeps the opt-in enumerable rather than a privilege-based bypass.\n */\n readonly operation?: { readonly admitsCrossTenantPlatformAdministration?: boolean } | null;\n}\n\n/** What this authority needs from the resource configuration. */\nexport interface ScopeRootCollectionConfinementResource {\n readonly resourceIdentifier?: string;\n readonly resourcePrimaryScope?: string;\n}\n\n/**\n * Is this resource the ROOT of its own primary scope — the tenant row itself rather than a row\n * inside a tenant?\n *\n * Structural (`resourceIdentifier === PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope]`) rather than a\n * comparison against `CoreResourceType.ORGANIZATIONS`, so a future tenant scope is covered the day\n * it is declared.\n *\n * **Exported because the authorization GATE asks the same question**, and the gate's answer and the\n * filter's answer must be the SAME answer. A gate that opens for a scope root the filter does not\n * recognise is precisely the disclosure this whole module exists to prevent, and two look-alike\n * derivations of one predicate is how that happens (`.claude/rules/invariant-call-site-enumeration.md`).\n */\nexport function isOwnScopeRootResource(resource: ScopeRootCollectionConfinementResource): boolean {\n const scope = resource.resourcePrimaryScope;\n if (!scope) return false;\n const rootResourceType = PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope as ResourcePrimaryScope];\n return Boolean(rootResourceType) && resource.resourceIdentifier === String(rootResourceType);\n}\n\n/**\n * Is this collection read an APPLICATION-WIDE directory enumeration — a scope-root collection whose\n * rows are NOT confined to any one tenant?\n *\n * This is the audit trigger's question, and it is deliberately the exact complement of the\n * confinement decision above rather than a second, similar-looking rule. A resource is a directory\n * precisely when it is its own scope root AND this authority declines to confine it: today that is\n * `users`, `applications` and `anonymousUsers` (non-tenant scope roots), and it would become false\n * for any of them the moment the confinement is widened to their axis. Deriving the two answers from\n * one predicate is what stops the trail claiming \"unconfined\" about a read that has since been\n * confined.\n *\n * An exempt execution type is NOT a directory read for audit purposes: a batch or webhook has no\n * operator to attribute, and recording framework machinery as operator browsing would bury the\n * signal the event exists to carry.\n */\nexport function isUnconfinedScopeRootDirectoryRead(params: {\n readonly executionContext: ScopeRootCollectionConfinementSignal;\n readonly resourceConfiguration: ScopeRootCollectionConfinementResource;\n readonly executedCoreOperation: CoreResourceOperation | undefined;\n}): boolean {\n if (!isOwnScopeRootResource(params.resourceConfiguration)) return false;\n if (!params.executedCoreOperation) return false;\n if (!SCOPE_ROOT_CONFINED_OPERATIONS.includes(params.executedCoreOperation)) return false;\n if (SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES.includes(params.executionContext.executionType)) return false;\n\n // Confined ⇒ not a directory. Asked of a throwaway filter so the question can be answered without\n // a caller having to own one, and so the two answers can never disagree.\n return !assignScopeRootCollectionConfinementToFilter({\n filter: {},\n executionContext: params.executionContext,\n resourceConfiguration: params.resourceConfiguration,\n executedCoreOperation: params.executedCoreOperation,\n });\n}\n\n/**\n * The tenant ids the caller holds an organization-WIDE role entry for.\n *\n * Exported so the authorization gate can report the same set it is about to confine to, rather than\n * re-deriving it — two derivations of one membership set is how a gate and a filter start\n * disagreeing about who is a member.\n */\nexport function resolveCallerOrganizationIds(\n executionContext: ScopeRootCollectionConfinementSignal,\n): string[] {\n const ids = new Set<string>();\n for (const roleInfo of (executionContext.initiatorRoles ?? []).filter(isOrganizationWideRoleInfo as never)) {\n const entry = roleInfo as { relatedPrimaryScope?: string; relatedResourceId?: string | null };\n if (entry.relatedPrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS) continue;\n const id = String(entry.relatedResourceId ?? '');\n if (id) ids.add(id);\n }\n return [...ids];\n}\n\n/**\n * Confine `filter` to the caller's own tenants, in place. Returns whether it was applied.\n *\n * ## Composition with a caller-supplied `_id`\n *\n * The sibling authorities OVERWRITE at the top level, because for them a caller-supplied value for\n * the confined field is an attempt to widen and must be neutralised. Here the same reasoning gives a\n * different mechanic: `_id` is also how a legitimate request NARROWS, so an overwrite would silently\n * discard a caller's own filter and hand back MORE rows than they asked for.\n *\n * So this INTERSECTS — never skips. The result is always a subset of both the caller's request and\n * the caller's membership, so it cannot be widened by anything a caller sends. A shape the\n * intersection cannot interpret (a `$ne`, a regex, an operator object) resolves to the EMPTY set\n * rather than being passed through: an uninterpretable narrowing is not a licence to drop the\n * confinement.\n *\n * A \"skip if the caller already set `_id`\" guard would be the fail-OPEN version of this. Do not\n * add one.\n *\n * `$in: []` is the portable match-nothing: MongoDB matches nothing, and the PostgreSQL compiler\n * emits `FALSE` rather than the `IN ()` syntax error a naive translation would produce (gate\n * G-PG-NULL). One emitter covers the confined case and the deny-all case on both adapters.\n */\nexport function assignScopeRootCollectionConfinementToFilter<TFilter extends object>(params: {\n readonly filter: TFilter;\n readonly executionContext: ScopeRootCollectionConfinementSignal;\n readonly resourceConfiguration: ScopeRootCollectionConfinementResource;\n /** The core operation THIS repository call executes — NOT `executionContext.operation`. */\n readonly executedCoreOperation: CoreResourceOperation | undefined;\n}): boolean {\n const disposition = resolveScopeRootConfinementDisposition(params.resourceConfiguration);\n if (!disposition) return false;\n // Which roots owe a predicate is DECLARED, total over the scope vocabulary, with the rule that\n // decides membership stated on the enum. An unrecognised scope cannot reach here —\n // `isOwnScopeRootResource` already refuses a scope absent from `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE`\n // — but were the two maps ever to disagree, `undefined` falls through this check and CONFINES,\n // which yields the caller's organization ids as `_id`s of some other resource: no rows, loudly,\n // rather than every row, silently.\n if (disposition !== undefined && disposition !== ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS) return false;\n\n if (!params.executedCoreOperation) return false;\n if (!SCOPE_ROOT_CONFINED_OPERATIONS.includes(params.executedCoreOperation)) return false;\n\n if (SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES.includes(params.executionContext.executionType)) return false;\n\n // A DECLARED crossing was admitted at the authorization layer, deliberately and with an audit\n // record. Re-confining it here would undo that decision one layer down — D3's documented failure.\n if (params.executionContext.operation?.admitsCrossTenantPlatformAdministration === true) return false;\n\n const callerOrganizationIds = resolveCallerOrganizationIds(params.executionContext);\n const requested = (params.filter as Record<string, unknown>)[SCOPE_ROOT_CONFINEMENT_FIELD];\n const confinedIds = intersectRequestedIdsWithMembership(requested, callerOrganizationIds);\n\n (params.filter as Record<string, unknown>)[SCOPE_ROOT_CONFINEMENT_FIELD] = { $in: confinedIds };\n return true;\n}\n\n/**\n * Intersect whatever the caller asked for with what they are a member of.\n *\n * Fail-closed on every shape that is not plainly an id or a set of ids: an operator object could\n * express a superset (`$ne`, `$nin`, a regex), and there is no honest intersection with a predicate\n * whose extension is unknown here.\n */\nfunction intersectRequestedIdsWithMembership(requested: unknown, membershipIds: readonly string[]): string[] {\n if (requested === undefined || requested === null) return [...membershipIds];\n\n const membership = new Set(membershipIds);\n\n if (typeof requested === 'string') {\n return membership.has(requested) ? [requested] : [];\n }\n\n if (Array.isArray(requested)) {\n return requested.map(String).filter((id) => membership.has(id));\n }\n\n if (typeof requested === 'object') {\n const operators = Object.keys(requested as Record<string, unknown>);\n const inValue = (requested as { $in?: unknown }).$in;\n // ONLY a lone `$in`. A mixed operator object ({$in, $ne}) has an extension this cannot compute.\n if (operators.length === 1 && operators[0] === '$in' && Array.isArray(inValue)) {\n return inValue.map(String).filter((id) => membership.has(id));\n }\n return [];\n }\n\n return [];\n}\n"]}
1
+ {"version":3,"file":"scope-root-collection-confinement.backend.js","sourceRoot":"","sources":["../../../../src/security/authorizations/scope-root-collection-confinement.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,mCAAmC,EACnC,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,kGAAkG;AAClG,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAElD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAN,IAAY,+BA4FX;AA5FD,WAAY,+BAA+B;IACzC;;;OAGG;IACH,wGAAqE,CAAA;IACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,kHAA+E,CAAA;IAC/E;;;;;;;;;;;OAWG;IACH,kHAA+E,CAAA;IAC/E;;;;;;;OAOG;IACH,gHAA6E,CAAA;AAC/E,CAAC,EA5FW,+BAA+B,KAA/B,+BAA+B,QA4F1C;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAA4E,MAAM,CAAC,MAAM,CAAC;IACxI,CAAC,oBAAoB,CAAC,aAAa,CAAC,EAAE,+BAA+B,CAAC,gCAAgC;IACtG,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,+BAA+B,CAAC,qCAAqC;IACvG,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,+BAA+B,CAAC,qCAAqC;IACzG,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,+BAA+B,CAAC,oCAAoC;CACvG,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACpD,QAAgD;IAEhD,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CA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C;IAED,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,SAAoC,CAAC,CAAC;QACpE,MAAM,OAAO,GAAI,SAA+B,CAAC,GAAG,CAAC;QACrD,gGAAgG;QAChG,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/E,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * # Scope-ROOT collection confinement — ONE definition, compiled by both adapters\n *\n * assurance-control: WILDO.ACCESS.SCOPE_CONFINEMENT — confines a collection read of the tenant\n * resource itself to the tenants the caller belongs to.\n *\n * ## The hole this closes\n *\n * Every ORGANIZATIONS-scoped resource is confined by `assignInitiatorOrganizationConfinementToFilter`\n * (D3) or by the context-entry loop, both keyed on the `organizationId` COLUMN the row carries.\n * `organizations` carries no such column: it IS the tenant, addressed by `_id`. Both adapters then\n * lose the axis twice over, and independently —\n *\n * 1. `blacklistedFields` is seeded with the resource's own `resourceFieldIdentifier` \"to avoid\n * self-reference in filtering\". For the scope root that identifier IS the scope field, so the\n * context loop skips it and D3 returns `false` at its blacklist check;\n * 2. `OrganizationSchema` models no `organizationId` path (and PostgreSQL plans no such column), so\n * even an admitted D3 would find nothing to write.\n *\n * Measured, not reasoned: a scope-root LIST compiled to `{}` — the empty filter, no tenant predicate\n * at all — on BOTH adapters, while a non-root org-scoped resource on the identical execution context\n * compiled to `{organizationId: 'org-caller'}`. See\n * `base-classes/__tests__/scope-root-collection-confinement.probe.test.ts`.\n *\n * Nothing leaked, because the ORGANIZATIONS branch of `validateParentScopeAccess` refused every\n * caller before the repository ran — it demands a PARENT organization scope, which the scope root\n * structurally does not have. So the gate was the SOLE control standing between an APPLICATION-role\n * caller and an unconfined cross-tenant tenant directory, and the two-line \"fix\" to that gate would\n * have been a full cross-tenant disclosure that turned every existing pin green.\n *\n * This module is therefore the half that had to land FIRST. See\n * `.claude/plans/organizations-scope-root-collection-gate-analysis.md`.\n *\n * ## Why an authority module and not two repository branches\n *\n * There are two `buildContextualFilter` implementations. The retention hide learned the cost of a\n * hand-written copy on each side (gate G-PG-NULL); D3 learned it again — it existed on PostgreSQL\n * and not on MongoDB, \"the only measured divergence where the two adapters disagreed about WHO CAN\n * SEE WHOSE ROWS\". A tenancy predicate present on one adapter and absent on the other is not a gap,\n * it is a bypass on the adapter that lacks it (`.claude/rules/invariant-call-site-enumeration.md`).\n *\n * ## Membership comes from ROLE ENTRIES, never from `initiatorIds`\n *\n * `initiatorIds.organizationId` names the ONE tenant the request is acting in, which is the wrong\n * question here: a collection read of the tenant resource asks \"which tenants are yours\", plural.\n * Role entries are also the one input a request cannot author for itself — the same reasoning\n * `holdsOrganizationWideEntryFor` and `authorizeOrganizations` rest on.\n *\n * ORGANIZATION-WIDE entries only. A unit-narrowed grant confers authority over a unit inside a\n * tenant, not over the tenant row, and every org-wide gate in the authorization service filters\n * those out; counting one here would let a unit member enumerate the tenant they are narrowed inside.\n */\n\nimport {\n CoreResourceOperation,\n ExecutionContext_ExecutionType,\n PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE,\n ResourcePrimaryScope,\n isOrganizationWideRoleInfo,\n} from '@wildo-ai/saas-models';\n\n/** The queryable key a scope-root row is addressed by. Named once so no call site can typo it. */\nexport const SCOPE_ROOT_CONFINEMENT_FIELD = '_id';\n\n/**\n * WHY a given scope root is, or is not, row-confined.\n *\n * A named vocabulary rather than four prose comments, because \"which roots owe confinement\" is a\n * closed semantic question and had been answered four times, in four files, in four different words\n * — the shape `CLAUDE.md` asks to have one runtime source for. It also makes the answer READABLE\n * from the authority itself instead of from the resource configs it governs.\n *\n * THE RULE THAT DECIDES MEMBERSHIP, stated once so the next scope is not settled by taste:\n *\n * > **A scope root owes row confinement exactly when a caller's authority for that scope names ONE\n * > INSTANCE of it, while the collection holds every instance.**\n *\n * That is a fact about ROLE ENTRIES, and it is measurable rather than a judgement: only an\n * `ORGANIZATIONS` entry carries a `relatedResourceId` selecting a particular scope instance. An\n * `APPLICATION` entry names the deployment (there is one), and `USER_SELF` / `ANONYMOUS` have no\n * role entries at all — their instance comes from `initiatorIds`, which the request supplies about\n * ITSELF and which therefore cannot be an authority set. So on today's vocabulary exactly one root\n * owes it, and that is a derivation, not a denominator someone chose.\n */\nexport enum ScopeRootConfinementDisposition {\n /**\n * Confined to the tenants the caller holds an organization-WIDE role entry for. The only\n * disposition that produces a predicate.\n */\n CONFINED_TO_CALLER_ORGANIZATIONS = 'CONFINED_TO_CALLER_ORGANIZATIONS',\n /**\n * The root's HTTP collection surface is the APPLICATION-tier administrative directory, and the\n * caller's authority for it is application-wide — so \"all rows\" is not wider than the authority\n * that reached them. Narrower callers reach the same rows only through a route that confines them\n * by a DIFFERENT mechanism (`users` is enumerated per tenant through\n * `/organizations/{organizationId}/users/search`, whose junction filter intersects `_id` with the\n * tenant's membership; the global routes stay admin-gated).\n *\n * ## ⚠️ The ELEVATION asymmetry this disposition carries, stated so nobody has to re-derive it\n *\n * Read against the per-row door, the sentence above is the whole of the control and it is a\n * statement about a STANDING role. Measured 2026-09-09:\n *\n * | | per-row crossing | this directory read |\n * |---|---|---|\n * | declared per variant | `admitsCrossTenantPlatformAdministration` | nothing |\n * | elevation required | a usable, time-bound, justified `platformAccessGrants` row | none |\n * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` (`users`), `ORG_MEMBER` (`applications` LIST) |\n * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the authorizing grant | `PLATFORM_DIRECTORY_ACCESS`, naming no elevation |\n *\n * That WAS the correct reading of the finding, and it was worse than \"not symmetric\": the control\n * was inverted.\n *\n * ## CLOSED 2026-09-09 — the table above is HISTORY, not current state\n *\n * The \"elevation required\" cell now reads *a usable, second-signed `applicationAccessGrants` row*\n * on both halves. Do not reason from the table as if it still described the system; it is kept\n * because the inversion is the argument for the mechanism that replaced it.\n *\n * `hasUsablePlatformAccessGrant` still needs a TARGET tenant and still answers `false` on an empty\n * one, so the TENANT grant remains structurally inapplicable to a collection call — that half was\n * always a fact about the mechanism rather than a proof that prevention was impossible, and it is\n * what made a second resource necessary rather than a field.\n *\n * **`CoreResourceType.APPLICATION_ACCESS_GRANTS` is that second resource**, approved under a\n * TWO-PERSON RULE: the signature must come from a platform administrator who is NOT the requester,\n * enforced in the implementation and hidden by the operation's `enabledCondition`. Customer\n * approval (Lockbox, Access Approval) is the industry ceiling and is structurally unavailable —\n * there is no single customer to ask — so a second signature is the strongest control that exists\n * for this act; `.claude/rules/administrative-continuity-floors.md` says so in as many words.\n *\n * The admission is `readRequiresApplicationWideGrant`, which COMPOSES this authority's own\n * `isUnconfinedScopeRootDirectoryRead` with `isObservedCrossTenantRead` rather than asking a third\n * question, so the gate and the trail cannot disagree about which reads are in scope. Auto-approval\n * was rejected: it is the tenant grant's default posture only because a tenant can opt in above it,\n * and there is no such party here.\n *\n * A related choice is already RECORDED and should not be quietly reversed: a browsable platform\n * tenant directory was considered and rejected, on the reasoning that industry practice (Customer\n * Lockbox, Access Approval) has the tenant id arrive out of band with the customer's support\n * ticket. It is UNCHANGED by the closure above and is now load-bearing in a second way: with the\n * directory read itself elevated, an operator who wanted to browse tenants would need an\n * application-wide grant and a second signature to do it, which is the outcome that decision\n * wanted anyway.\n *\n * ## What was rejected on MEASUREMENT rather than on cost\n *\n * Confining this read to tenants the caller holds a grant for is not merely undesirable here, it\n * is structurally unavailable for the widest case: `users` rows carry NO tenant column at all\n * (membership lives in `organizationMembers`), so there is nothing for a tenant predicate to bind\n * to. Any such confinement would be a junction query that also removes the tenant-less user — the\n * person who has just signed up and belongs to nobody — from the only surface that can find them.\n */\n UNCONFINED_APPLICATION_TIER_DIRECTORY = 'UNCONFINED_APPLICATION_TIER_DIRECTORY',\n /**\n * ONE DATABASE PER APPLICATION. \"An application's organizations live in that application's own\n * database\" — so this collection holds this deployment's own row and a caller can only ever see\n * the application they are already using. Safe by ARCHITECTURE, not by a predicate, which is why\n * it is spelled out: the default LIST/SEARCH variants are gated `ORG_MEMBER`, one role tier BELOW\n * the `organizations` hole, and would be a full directory the day a second row existed.\n *\n * The premise is ASSERTED rather than assumed, and only a lane with a real store can assert it:\n * `examples/wonder-todos/e2e/applications-scope-root-list-confinement.e2e.ts` fails if the\n * deployment ever holds more than one application row. (The unit probe beside this authority\n * asserts the complementary half — that this declaration and the compiled filter agree.)\n */\n UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE = 'UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE',\n /**\n * There is NOTHING to confine to. An anonymous session is a pre-authentication visitor of the\n * application; it has no organization, so a \"confined\" listing would name a relationship that does\n * not exist. `APP_ADMIN_SUPER_ADMIN` is the whole of the control, and it is the right one.\n *\n * ⚠️ If anonymous sessions ever gain a tenant association this becomes an ORGANIZATIONS-axis\n * question and the disposition moves to {@link ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS}.\n */\n UNCONFINED_NO_CONFINING_RELATIONSHIP = 'UNCONFINED_NO_CONFINING_RELATIONSHIP',\n}\n\n/**\n * The disposition of every scope root, TOTAL over `ResourcePrimaryScope`.\n *\n * Total on purpose (`.claude/rules/derive-before-you-ask.md` #3): a scope added to the vocabulary\n * tomorrow is a COMPILE ERROR here, so someone has to answer the rule above for it rather than\n * inheriting silence. The predicate this replaced was `resourcePrimaryScope !== ORGANIZATIONS` with\n * a comment saying the other three \"would change four surfaces this analysis did not measure\" —\n * true when written, and by then no longer true: all four had since been measured\n * (`scope-root-collection-confinement.probe.test.ts`, the RESIDUAL sweep) and each answer recorded\n * in a different resource config. This map is where that answer now lives, once.\n */\nexport const SCOPE_ROOT_CONFINEMENT_DISPOSITIONS: Readonly<Record<ResourcePrimaryScope, ScopeRootConfinementDisposition>> = Object.freeze({\n [ResourcePrimaryScope.ORGANIZATIONS]: ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS,\n [ResourcePrimaryScope.USER_SELF]: ScopeRootConfinementDisposition.UNCONFINED_APPLICATION_TIER_DIRECTORY,\n [ResourcePrimaryScope.APPLICATION]: ScopeRootConfinementDisposition.UNCONFINED_SINGLE_ROW_BY_ARCHITECTURE,\n [ResourcePrimaryScope.ANONYMOUS]: ScopeRootConfinementDisposition.UNCONFINED_NO_CONFINING_RELATIONSHIP,\n});\n\n/**\n * The disposition governing this resource, or `undefined` when it is not a scope root at all.\n *\n * Exported so a test — or a future gate — can ask the SAME question this authority answers instead\n * of re-deriving it from the resource configs, which is how the four recorded answers came to be\n * four separate paragraphs in the first place.\n */\nexport function resolveScopeRootConfinementDisposition(\n resource: ScopeRootCollectionConfinementResource,\n): ScopeRootConfinementDisposition | undefined {\n if (!isOwnScopeRootResource(resource)) return undefined;\n return SCOPE_ROOT_CONFINEMENT_DISPOSITIONS[resource.resourcePrimaryScope as ResourcePrimaryScope];\n}\n\n/**\n * The operations this confinement governs: those that resolve a SET of rows with no per-row\n * authorization behind them.\n *\n * Per-INSTANCE operations are deliberately absent, and this is a decision rather than an oversight.\n * `authorizeOrganizations` fetches the row and compares its tenant against the caller's org-wide\n * role entries, refusing a non-member — that gate was hardened on 2026-08-05 and is measured healthy\n * (a per-instance READ answers 200 for a member while every collection call answers 403). Adding a\n * row filter underneath it would buy no isolation and would actively BREAK the declared cross-tenant\n * repair doors (`restore`, `activate`, `requestDeletion: admin`), every one of which is per-instance\n * — silently filtering an operation authorization deliberately admitted, which is the precise\n * failure `.claude/rules/administrative-continuity-floors.md` warns about and which D3's own\n * crossing-awareness exists to prevent.\n *\n * The write-family bulk verbs ARE included. `organizations` declares none today, so including them\n * is free; excluding them would leave a set-shaped write on the tenant resource unconfined the day\n * one is declared, which is exactly how a scope-root hole comes back.\n */\nconst SCOPE_ROOT_CONFINED_OPERATIONS: readonly CoreResourceOperation[] = [\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE_MANY,\n];\n\n/**\n * Execution types that carry no membership by construction and must not be confined.\n *\n * Mirrors {@link ORGANIZATION_UNIT_NARROWING_EXEMPT_EXECUTION_TYPES} and is exempt for the same\n * reason: `INTERNALLY_INITIATED_REQUEST` is the framework's context-free system actor (batch, cron,\n * cascade, bootstrap) and `WEBHOOK_CALLBACK` is trusted after signature verification. Neither holds\n * role entries, so confining them would not fail closed — it would empty every tenant sweep, purge\n * and cascade, presenting a broken system as \"no rows\".\n *\n * ⚠️ Every OTHER execution type — user, machine, anonymous, consumable-token, public — is confined,\n * and a principal with no org-wide entry is confined to the EMPTY set rather than exempted. Adding a\n * member here removes a tenant-isolation check.\n */\nconst SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES: readonly ExecutionContext_ExecutionType[] = [\n ExecutionContext_ExecutionType.INTERNALLY_INITIATED_REQUEST,\n ExecutionContext_ExecutionType.WEBHOOK_CALLBACK,\n];\n\n/** What this authority needs from the execution context. Deliberately narrow, like its siblings. */\nexport interface ScopeRootCollectionConfinementSignal {\n readonly executionType: ExecutionContext_ExecutionType;\n readonly initiatorRoles?: readonly {\n readonly relatedPrimaryScope?: string;\n readonly relatedResourceId?: string | null;\n readonly roles?: readonly string[];\n /**\n * Present ⇒ the entry is a UNIT grant, not tenant membership. Declared here rather than left\n * implicit because omitting it is how a test fixture builds an entry that LOOKS unit-scoped and\n * is silently treated as organization-wide — which is how the first draft of this module's own\n * pin passed for the wrong reason.\n */\n readonly organizationUnitId?: string;\n }[] | null;\n /**\n * Only the crossing declaration is read. An operation that did NOT declare one is confined, which\n * is what keeps the opt-in enumerable rather than a privilege-based bypass.\n */\n readonly operation?: { readonly admitsCrossTenantPlatformAdministration?: boolean } | null;\n}\n\n/** What this authority needs from the resource configuration. */\nexport interface ScopeRootCollectionConfinementResource {\n readonly resourceIdentifier?: string;\n readonly resourcePrimaryScope?: string;\n}\n\n/**\n * Is this resource the ROOT of its own primary scope — the tenant row itself rather than a row\n * inside a tenant?\n *\n * Structural (`resourceIdentifier === PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope]`) rather than a\n * comparison against `CoreResourceType.ORGANIZATIONS`, so a future tenant scope is covered the day\n * it is declared.\n *\n * **Exported because the authorization GATE asks the same question**, and the gate's answer and the\n * filter's answer must be the SAME answer. A gate that opens for a scope root the filter does not\n * recognise is precisely the disclosure this whole module exists to prevent, and two look-alike\n * derivations of one predicate is how that happens (`.claude/rules/invariant-call-site-enumeration.md`).\n */\nexport function isOwnScopeRootResource(resource: ScopeRootCollectionConfinementResource): boolean {\n const scope = resource.resourcePrimaryScope;\n if (!scope) return false;\n const rootResourceType = PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE[scope as ResourcePrimaryScope];\n return Boolean(rootResourceType) && resource.resourceIdentifier === String(rootResourceType);\n}\n\n/**\n * Is this collection read an APPLICATION-WIDE directory enumeration — a scope-root collection whose\n * rows are NOT confined to any one tenant?\n *\n * This is the audit trigger's question, and it is deliberately the exact complement of the\n * confinement decision above rather than a second, similar-looking rule. A resource is a directory\n * precisely when it is its own scope root AND this authority declines to confine it: today that is\n * `users`, `applications` and `anonymousUsers` (non-tenant scope roots), and it would become false\n * for any of them the moment the confinement is widened to their axis. Deriving the two answers from\n * one predicate is what stops the trail claiming \"unconfined\" about a read that has since been\n * confined.\n *\n * An exempt execution type is NOT a directory read for audit purposes: a batch or webhook has no\n * operator to attribute, and recording framework machinery as operator browsing would bury the\n * signal the event exists to carry.\n */\nexport function isUnconfinedScopeRootDirectoryRead(params: {\n readonly executionContext: ScopeRootCollectionConfinementSignal;\n readonly resourceConfiguration: ScopeRootCollectionConfinementResource;\n readonly executedCoreOperation: CoreResourceOperation | undefined;\n}): boolean {\n if (!isOwnScopeRootResource(params.resourceConfiguration)) return false;\n if (!params.executedCoreOperation) return false;\n if (!SCOPE_ROOT_CONFINED_OPERATIONS.includes(params.executedCoreOperation)) return false;\n if (SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES.includes(params.executionContext.executionType)) return false;\n\n // Confined ⇒ not a directory. Asked of a throwaway filter so the question can be answered without\n // a caller having to own one, and so the two answers can never disagree.\n return !assignScopeRootCollectionConfinementToFilter({\n filter: {},\n executionContext: params.executionContext,\n resourceConfiguration: params.resourceConfiguration,\n executedCoreOperation: params.executedCoreOperation,\n });\n}\n\n/**\n * The tenant ids the caller holds an organization-WIDE role entry for.\n *\n * Exported so the authorization gate can report the same set it is about to confine to, rather than\n * re-deriving it — two derivations of one membership set is how a gate and a filter start\n * disagreeing about who is a member.\n */\nexport function resolveCallerOrganizationIds(\n executionContext: ScopeRootCollectionConfinementSignal,\n): string[] {\n const ids = new Set<string>();\n for (const roleInfo of (executionContext.initiatorRoles ?? []).filter(isOrganizationWideRoleInfo as never)) {\n const entry = roleInfo as { relatedPrimaryScope?: string; relatedResourceId?: string | null };\n if (entry.relatedPrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS) continue;\n const id = String(entry.relatedResourceId ?? '');\n if (id) ids.add(id);\n }\n return [...ids];\n}\n\n/**\n * Confine `filter` to the caller's own tenants, in place. Returns whether it was applied.\n *\n * ## Composition with a caller-supplied `_id`\n *\n * The sibling authorities OVERWRITE at the top level, because for them a caller-supplied value for\n * the confined field is an attempt to widen and must be neutralised. Here the same reasoning gives a\n * different mechanic: `_id` is also how a legitimate request NARROWS, so an overwrite would silently\n * discard a caller's own filter and hand back MORE rows than they asked for.\n *\n * So this INTERSECTS — never skips. The result is always a subset of both the caller's request and\n * the caller's membership, so it cannot be widened by anything a caller sends. A shape the\n * intersection cannot interpret (a `$ne`, a regex, an operator object) resolves to the EMPTY set\n * rather than being passed through: an uninterpretable narrowing is not a licence to drop the\n * confinement.\n *\n * A \"skip if the caller already set `_id`\" guard would be the fail-OPEN version of this. Do not\n * add one.\n *\n * `$in: []` is the portable match-nothing: MongoDB matches nothing, and the PostgreSQL compiler\n * emits `FALSE` rather than the `IN ()` syntax error a naive translation would produce (gate\n * G-PG-NULL). One emitter covers the confined case and the deny-all case on both adapters.\n */\nexport function assignScopeRootCollectionConfinementToFilter<TFilter extends object>(params: {\n readonly filter: TFilter;\n readonly executionContext: ScopeRootCollectionConfinementSignal;\n readonly resourceConfiguration: ScopeRootCollectionConfinementResource;\n /** The core operation THIS repository call executes — NOT `executionContext.operation`. */\n readonly executedCoreOperation: CoreResourceOperation | undefined;\n}): boolean {\n const disposition = resolveScopeRootConfinementDisposition(params.resourceConfiguration);\n if (!disposition) return false;\n // Which roots owe a predicate is DECLARED, total over the scope vocabulary, with the rule that\n // decides membership stated on the enum. An unrecognised scope cannot reach here —\n // `isOwnScopeRootResource` already refuses a scope absent from `PRIMARY_SCOPE_TO_CORE_RESOURCE_TYPE`\n // — but were the two maps ever to disagree, `undefined` falls through this check and CONFINES,\n // which yields the caller's organization ids as `_id`s of some other resource: no rows, loudly,\n // rather than every row, silently.\n if (disposition !== undefined && disposition !== ScopeRootConfinementDisposition.CONFINED_TO_CALLER_ORGANIZATIONS) return false;\n\n if (!params.executedCoreOperation) return false;\n if (!SCOPE_ROOT_CONFINED_OPERATIONS.includes(params.executedCoreOperation)) return false;\n\n if (SCOPE_ROOT_CONFINEMENT_EXEMPT_EXECUTION_TYPES.includes(params.executionContext.executionType)) return false;\n\n // A DECLARED crossing was admitted at the authorization layer, deliberately and with an audit\n // record. Re-confining it here would undo that decision one layer down — D3's documented failure.\n if (params.executionContext.operation?.admitsCrossTenantPlatformAdministration === true) return false;\n\n const callerOrganizationIds = resolveCallerOrganizationIds(params.executionContext);\n const requested = (params.filter as Record<string, unknown>)[SCOPE_ROOT_CONFINEMENT_FIELD];\n const confinedIds = intersectRequestedIdsWithMembership(requested, callerOrganizationIds);\n\n (params.filter as Record<string, unknown>)[SCOPE_ROOT_CONFINEMENT_FIELD] = { $in: confinedIds };\n return true;\n}\n\n/**\n * Intersect whatever the caller asked for with what they are a member of.\n *\n * Fail-closed on every shape that is not plainly an id or a set of ids: an operator object could\n * express a superset (`$ne`, `$nin`, a regex), and there is no honest intersection with a predicate\n * whose extension is unknown here.\n */\nfunction intersectRequestedIdsWithMembership(requested: unknown, membershipIds: readonly string[]): string[] {\n if (requested === undefined || requested === null) return [...membershipIds];\n\n const membership = new Set(membershipIds);\n\n if (typeof requested === 'string') {\n return membership.has(requested) ? [requested] : [];\n }\n\n if (Array.isArray(requested)) {\n return requested.map(String).filter((id) => membership.has(id));\n }\n\n if (typeof requested === 'object') {\n const operators = Object.keys(requested as Record<string, unknown>);\n const inValue = (requested as { $in?: unknown }).$in;\n // ONLY a lone `$in`. A mixed operator object ({$in, $ne}) has an extension this cannot compute.\n if (operators.length === 1 && operators[0] === '$in' && Array.isArray(inValue)) {\n return inValue.map(String).filter((id) => membership.has(id));\n }\n return [];\n }\n\n return [];\n}\n"]}
@@ -122,6 +122,26 @@ export declare class AuthorizationsBackendService {
122
122
  getOrgRoles(): RolesConfiguration;
123
123
  hasAppRole(roleKey: AppRoles): boolean;
124
124
  hasOrgRole(roleKey: OrgRoles): boolean;
125
+ /**
126
+ * Does holding `heldRoleKey` in `scope` satisfy a gate that requires `requiredRoleKey`?
127
+ *
128
+ * Delegates to {@link roleConfersAuthority}, which is the ONE derivation this repository has of
129
+ * that question — the same atom the authority floors measure their protected populations with.
130
+ *
131
+ * Sharing it is not tidiness. The atom is where the SCOPE PARTITION is consulted, and the partition
132
+ * is the entire reason an application-scope role string written into an organisation-scoped
133
+ * membership row confers nothing: the key is unknown in the passed table, so its chain is EMPTY.
134
+ * That safety comes from RESOLUTION rather than from the field's type, and every separate copy of
135
+ * these two lines is another place the argument can quietly stop holding. It was written out four
136
+ * times — twice in this class's own admission paths, once in the platform-authority check, and once
137
+ * inside the floors' shared derivation — which is the defect shape
138
+ * `.claude/rules/invariant-call-site-enumeration.md` exists for.
139
+ *
140
+ * The floors' derivation and these gates still ask DIFFERENT questions and keep different shapes:
141
+ * a floor quantifies over the declared role TABLE and returns a set, a gate quantifies over the
142
+ * roles a CALLER holds and returns a boolean. Only the atom is shared.
143
+ */
144
+ private roleConfersAuthority;
125
145
  getRoleHierarchy(roleKey: Roles, scope: ResourcePrimaryScope): string[];
126
146
  resetRolesToDefaults(): void;
127
147
  /**
@@ -237,6 +257,58 @@ export declare class AuthorizationsBackendService {
237
257
  */
238
258
  private operationDeclaresPublicAccess;
239
259
  authorizeInRepositoryAndService(id_or_ids: IdOrIdsOrFilterType, operation: ResourceConfiguration_Operation<any, any, any>, executionContext: ExecutionContext<any>): Promise<void>;
260
+ /**
261
+ * The core operation this call actually EXECUTES.
262
+ *
263
+ * `resourceOperationLike ?? operationIdentifier` — the derivation the controller tier, the batch
264
+ * dispatcher and the response serializer all already use. A custom verb declares which core
265
+ * operation it borrows persistence from (`approve` is UPDATE-like, `requestAccess` is CREATE-like),
266
+ * and without that indirection a custom READ-like verb would be invisible to every core-operation
267
+ * predicate in the system.
268
+ */
269
+ private resolveExecutedCoreOperation;
270
+ /**
271
+ * Refuse an APPLICATION-WIDE read unless the caller holds a usable, second-signed elevation.
272
+ *
273
+ * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — the widest read is admitted only
274
+ * under an elevation, on the same terms the narrowest one already was.
275
+ * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE
276
+ *
277
+ * ## Why it runs LAST
278
+ *
279
+ * After the role gate, deliberately. A caller who does not hold the administrator role must be
280
+ * refused with `INSUFFICIENT_ROLES` and learn nothing about the elevation mechanism; only a caller
281
+ * who WOULD have been admitted before this change reaches the new refusal. That also keeps the two
282
+ * reasons countable: `APPLICATION_WIDE_ELEVATION_MISSING` measures exactly the standing privilege
283
+ * this removes, and nothing else.
284
+ *
285
+ * ## Why it is stamped on the CONTEXT
286
+ *
287
+ * The observation seams run in the service registry, AFTER the rows are in hand, and they emit the
288
+ * evidence. Stashing the authorizing grant id here is what lets that evidence NAME the elevation —
289
+ * the same mechanism `admitsCrossTenantPlatformAdministration` already uses for the per-row
290
+ * crossing. On the CONTEXT and never on the service: the authorizer is a singleton, and a field
291
+ * here would leak one request's grant onto another's audit row under concurrency.
292
+ */
293
+ private enforceApplicationWideReadAdmission;
294
+ /**
295
+ * Is there a live application-wide elevation for this operator?
296
+ *
297
+ * The sibling of {@link hasUsablePlatformAccessGrant}, and deliberately NOT a parameterisation of
298
+ * it: that one keys on `(operator, TENANT)` and answers `false` on an empty tenant, which is
299
+ * exactly the structural fact that made this resource necessary. A shared helper taking an optional
300
+ * tenant would make "no tenant supplied" mean two opposite things depending on which resource was
301
+ * being read — the kind of overload that fails open the first time a caller forgets an argument.
302
+ *
303
+ * Read on a SYSTEM context: the grants are APPLICATION-scoped and the caller's own contextual
304
+ * filter is not what decides whether their elevation exists. **Fails CLOSED** — a read error, an
305
+ * unbound repository, a missing resource all answer "no elevation", because the alternative would
306
+ * let an operator restore standing access by breaking the grant store.
307
+ *
308
+ * Returns the GRANT ID so the evidence can name the elevation; `true` remains possible only for a
309
+ * grant with no `_id`, which the repository does not produce.
310
+ */
311
+ private hasUsableApplicationAccessGrant;
240
312
  /**
241
313
  * Resolve the effective scope at runtime.
242
314
  * For isAnonymizable resources (primaryScope: USER_SELF), the effective scope
@@ -1 +1 @@
1
- {"version":3,"file":"authorizations.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authorizations/services/authorizations.backend.service.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAEhI,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,y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I,CAAC;IAKH,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCpI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgFG;IACU,8BAA8B,CACzC,SAAS,EAAE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACzD,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,GACtC,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;;;;;OASG;YACW,4BAA4B;IAmE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;YACW,4BAA4B;IA0E1C;;;;;;;;OAQG;YACW,yBAAyB;IAoPvC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,qBAAqB;CAc9B"}
1
+ {"version":3,"file":"authorizations.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/services/authorizations.backend.service.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAEhI,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,yCAAyC,EAAE,MAAM,qGAAqG,CAAC;AAChK,OAAO,EAAE,mBAAmB,EAAE,MAAM,qEAAqE,CAAC;AAC1G,OAAO,EACL,+BAA+B,EAQ/B,oBAAoB,EAMpB,kBAAkB,EAClB,cAAc,EAGd,KAAK,EACL,QAAQ,EACR,QAAQ,EAKT,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,KAAK,EAAE,SAAS,EAAE,MA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