@wildo-ai/saas-backend-lib 1.1.12 → 1.1.13

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 (226) hide show
  1. package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
  2. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +2 -0
  3. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
  4. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.d.ts +4 -0
  5. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.d.ts.map +1 -1
  6. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.js +20 -5
  7. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.js.map +1 -1
  8. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts +3 -0
  9. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -1
  10. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js +10 -1
  11. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js.map +1 -1
  12. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts +22 -0
  13. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
  14. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js +25 -1
  15. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js.map +1 -1
  16. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts +38 -3
  17. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.map +1 -1
  18. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.js +68 -5
  19. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.js.map +1 -1
  20. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts +2 -2
  21. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  22. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +6 -3
  23. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  24. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +83 -0
  25. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  26. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +217 -14
  27. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  28. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.d.ts +32 -0
  29. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.d.ts.map +1 -0
  30. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.js +36 -0
  31. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.js.map +1 -0
  32. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.d.ts +38 -0
  33. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.d.ts.map +1 -0
  34. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.js +83 -0
  35. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.js.map +1 -0
  36. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.d.ts +36 -0
  37. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.d.ts.map +1 -0
  38. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.js +51 -0
  39. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.js.map +1 -0
  40. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.d.ts +46 -0
  41. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.d.ts.map +1 -1
  42. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.js +68 -0
  43. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.js.map +1 -1
  44. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.d.ts +27 -0
  45. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.d.ts.map +1 -1
  46. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.js +42 -3
  47. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.js.map +1 -1
  48. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.d.ts +26 -1
  49. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.d.ts.map +1 -1
  50. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.js +10 -0
  51. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.js.map +1 -1
  52. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.d.ts +10 -1
  53. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.d.ts.map +1 -1
  54. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.js +60 -28
  55. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.js.map +1 -1
  56. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.d.ts +90 -0
  57. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.d.ts.map +1 -0
  58. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.js +373 -0
  59. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.js.map +1 -0
  60. package/dist/esm/compliance/approval-seals/decision-presentation.backend.d.ts +29 -2
  61. package/dist/esm/compliance/approval-seals/decision-presentation.backend.d.ts.map +1 -1
  62. package/dist/esm/compliance/approval-seals/decision-presentation.backend.js +40 -3
  63. package/dist/esm/compliance/approval-seals/decision-presentation.backend.js.map +1 -1
  64. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.d.ts.map +1 -1
  65. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.js +34 -6
  66. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.js.map +1 -1
  67. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.d.ts +30 -6
  68. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.d.ts.map +1 -1
  69. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.js +67 -22
  70. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.js.map +1 -1
  71. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.d.ts.map +1 -1
  72. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.js +18 -1
  73. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.js.map +1 -1
  74. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.d.ts +66 -1
  75. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.d.ts.map +1 -1
  76. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.js +161 -14
  77. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.js.map +1 -1
  78. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.d.ts +47 -0
  79. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.d.ts.map +1 -1
  80. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.js.map +1 -1
  81. package/dist/esm/external-providers/services/content-safety.backend.service.d.ts +27 -2
  82. package/dist/esm/external-providers/services/content-safety.backend.service.d.ts.map +1 -1
  83. package/dist/esm/external-providers/services/content-safety.backend.service.js +46 -1
  84. package/dist/esm/external-providers/services/content-safety.backend.service.js.map +1 -1
  85. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  86. package/dist/esm/external-providers/services/embeddings.backend.service.js +2 -0
  87. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  88. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +11 -0
  89. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  90. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +23 -0
  91. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  92. package/dist/esm/external-providers/services/provider-service-account-token.backend.d.ts +19 -1
  93. package/dist/esm/external-providers/services/provider-service-account-token.backend.d.ts.map +1 -1
  94. package/dist/esm/external-providers/services/provider-service-account-token.backend.js +41 -1
  95. package/dist/esm/external-providers/services/provider-service-account-token.backend.js.map +1 -1
  96. package/dist/esm/files/utils/file-parent-read-context.backend.d.ts +27 -2
  97. package/dist/esm/files/utils/file-parent-read-context.backend.d.ts.map +1 -1
  98. package/dist/esm/files/utils/file-parent-read-context.backend.js +23 -4
  99. package/dist/esm/files/utils/file-parent-read-context.backend.js.map +1 -1
  100. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.d.ts +26 -0
  101. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.d.ts.map +1 -1
  102. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.js +100 -8
  103. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.js.map +1 -1
  104. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.d.ts +3 -1
  105. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.d.ts.map +1 -1
  106. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.js +8 -2
  107. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.js.map +1 -1
  108. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +43 -0
  109. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  110. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +37 -0
  111. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  112. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.d.ts +7 -0
  113. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.d.ts.map +1 -1
  114. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.js +8 -3
  115. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.js.map +1 -1
  116. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +31 -6
  117. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  118. package/dist/esm/flows-actors/services/agents.backend.service.js +78 -30
  119. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  120. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.d.ts.map +1 -1
  121. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.js +4 -0
  122. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.js.map +1 -1
  123. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +28 -2
  124. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  125. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +132 -22
  126. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  127. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.d.ts.map +1 -1
  128. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.js +12 -8
  129. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.js.map +1 -1
  130. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +5 -0
  131. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  132. package/dist/esm/flows-actors/services/flows-actors-registry.service.js +18 -2
  133. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  134. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +33 -0
  135. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  136. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +58 -0
  137. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  138. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.d.ts +12 -1
  139. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.d.ts.map +1 -1
  140. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.js +23 -4
  141. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.js.map +1 -1
  142. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.d.ts +12 -1
  143. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.d.ts.map +1 -1
  144. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.js +55 -17
  145. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.js.map +1 -1
  146. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.d.ts +22 -1
  147. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.d.ts.map +1 -1
  148. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.js +52 -9
  149. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.js.map +1 -1
  150. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.d.ts +79 -0
  151. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.d.ts.map +1 -0
  152. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.js +211 -0
  153. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.js.map +1 -0
  154. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.d.ts +2 -2
  155. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.d.ts.map +1 -1
  156. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.js +9 -1
  157. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.js.map +1 -1
  158. package/dist/esm/index.d.ts +1 -0
  159. package/dist/esm/index.d.ts.map +1 -1
  160. package/dist/esm/index.js +1 -0
  161. package/dist/esm/index.js.map +1 -1
  162. package/dist/esm/inject/models/container.d.ts.map +1 -1
  163. package/dist/esm/inject/models/container.js +6 -0
  164. package/dist/esm/inject/models/container.js.map +1 -1
  165. package/dist/esm/inject/models/service-types.d.ts +5 -0
  166. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  167. package/dist/esm/inject/models/service-types.js +3 -0
  168. package/dist/esm/inject/models/service-types.js.map +1 -1
  169. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +5 -0
  170. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  171. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  172. package/dist/esm/monitoring/observability/services/metrics.service.d.ts +34 -1
  173. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  174. package/dist/esm/monitoring/observability/services/metrics.service.js +49 -0
  175. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  176. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +6 -1
  177. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  178. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +15 -4
  179. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  180. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
  181. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.js +3 -1
  182. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.js.map +1 -1
  183. package/dist/esm/runtime/services/http-server.backend.service.d.ts +3 -1
  184. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  185. package/dist/esm/runtime/services/http-server.backend.service.js +11 -3
  186. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  187. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.d.ts +22 -0
  188. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.d.ts.map +1 -1
  189. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.js +54 -0
  190. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.js.map +1 -1
  191. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts +51 -0
  192. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -1
  193. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js +87 -15
  194. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js.map +1 -1
  195. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
  196. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js +5 -2
  197. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js.map +1 -1
  198. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
  199. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +65 -24
  200. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
  201. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +64 -1
  202. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  203. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +84 -2
  204. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  205. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +14 -0
  206. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  207. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +13 -5
  208. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  209. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.d.ts.map +1 -1
  210. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.js +6 -2
  211. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.js.map +1 -1
  212. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts +7 -0
  213. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
  214. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.js +65 -20
  215. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.js.map +1 -1
  216. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
  217. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.js +11 -4
  218. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.js.map +1 -1
  219. package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
  220. package/dist/esm/users/services/user-self-custom-implementations.backend.js +4 -2
  221. package/dist/esm/users/services/user-self-custom-implementations.backend.js.map +1 -1
  222. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
  223. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.js +16 -0
  224. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.js.map +1 -1
  225. package/dist/tsconfig.build.tsbuildinfo +1 -1
  226. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"flows-actors-registry.service.js","sourceRoot":"","sources":["../../../../src/flows-actors/services/flows-actors-registry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACnH,OAAO,EAEL,oBAAoB,EAIpB,gBAAgB,EA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C,CAAC,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACpC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,KAAK,MAAM,KAAK,IAAI,gCAAgC,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5H,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,MAAM,KAAK,0BAA0B,CAAC,MAAM,EAAE,CAAC;YACtD,MAAM,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,MAAM,QAAQ,IAAI,CAAC,KAAK,kDAAkD,CAAC,CAAC;QACjH,CAAC;IACH,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,+FAA+F,CAAC,CAAC;IAC9G,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject, optional } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport {\n FlowActorSystem,\n FlowActorSystem_Kind,\n FlowsActors_Agent,\n ActorSystem,\n FlowSystem,\n flowSystemIssues,\n isLLMAgentConfiguration,\n agentContentGuardrailIssues,\n FlowsActors_McpServer,\n mcpServerDestinationHost,\n mcpServerTransportIsPlaintext,\n PRIMARY_SCOPE_TO_FIELD_IDENTIFIER,\n} from '@wildo-ai/saas-models';\nimport {\n ErrorType,\n ErrorCustomMessageReference,\n HumanDecision_RouteKind,\n humanDecisionAnswerChannelsIssues, humanDecisionStepUpDeclarationIssues, humanDecisionStepUpRequirementOf,\n ReviewEscalationActionKind,\n reviewDeadlinesDeclarationIssues,\n} from '@wildo-ai/saas-models';\nimport {\n FlowsActorsRegistry,\n FlowActorSystem_InitializationFactoryMap,\n AgentRegistryIndex\n} from '~wildo-backend-lib/flows-actors/models/flows-actors.backend.schemas';\nimport {\n describeLLMModelDeclarationsDefect,\n ExternalProvider_ExchangeProtocol_Kind,\n isLLMCatalogProvider,\n LLM_ModelResolutionFailure,\n ProviderProtocolRuntimeKind,\n resolveModelForApplicability,\n validateReasoningEffortForModel,\n type LLM_Model,\n type LLM_Model_Applicability,\n type LLM_ModelContextLimits,\n type LLM_ModelDeclaration,\n} from '@wildo-ai/external-connectors-models';\nimport type { ExternalProvidersRegistryBackendService } from '~wildo-backend-lib/external-providers/services/external-providers-registry.backend.service';\nimport { declaredCredentialFieldsOf } from '~wildo-backend-lib/flows-actors/utils/agent-work-correction.backend.utils';\nimport { chatAgentRefOfActorSystem, functionToolDeliverableDeclarationProblems, functionToolElectronicSignatureDeclarationProblems, resolveFunctionToolApprovalGate, type FunctionTool } from '~wildo-backend-lib/flows-actors/models/function-tools.backend.definitions';\nimport { flowsActors_Backend_Default_Definition } from '~wildo-backend-lib/flows-actors/models/flows-actors.backend.definitions';\nimport {\n assertAutonomousAgentDeclarations,\n type AutonomousAgentCaseResourceFacts,\n type FlowsActors_AutonomousAgentDeclaration,\n} from '~wildo-backend-lib/flows-actors/models/autonomous-agents.backend.definitions';\nimport type { ActorExecutionContinuation } from '~wildo-backend-lib/flows-actors/models/actor-execution-continuation.backend.definitions';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { assertChatAgentDeclarations, type FlowsActors_ChatAgentDeclaration } from '~wildo-backend-lib/flows-actors/models/chat-agents.backend.definitions';\n\n/**\n * FlowsActors Registry Service\n *\n * Central registry for managing flow-actor systems, agents, and their configurations.\n * Similar to ResourcesRegistryBackendService but for flow-actor domain.\n *\n * Features:\n * - Register and retrieve flow systems and actors\n * - Manage agent definitions and capabilities\n * - System validation and lookup\n * - Kind-based filtering and organization\n */\n/** Why a registry provider's declared chat models could not be read at agent registration (#2516). */\nenum DeclaredLLMModelsUnreadable {\n /** No provider registry is bound, or it is not initialized yet (a platform service, a harness). */\n PROVIDER_REGISTRY_NOT_READY = 'provider_registry_not_ready',\n /** The registry is ready and holds no LLM contract for this provider: it is not installed, or not an LLM provider. */\n NO_LLM_CONTRACT = 'no_llm_contract',\n}\n\n/** What agent registration knows of a provider's declared chat models — see `readDeclaredLLMModels`. */\ninterface DeclaredLLMModels {\n /** The declarations, for a provider the catalog does not know. Absent for an engine provider. */\n readonly models?: readonly LLM_ModelDeclaration[];\n readonly unreadable?: DeclaredLLMModelsUnreadable;\n}\n\n@injectable()\nexport class FlowsActorsRegistryService {\n\n private registry: FlowsActorsRegistry;\n private isInitialized = false;\n /**\n * This process's own answer to \"which model serves this kind of work\", where it differs from the framework's\n * `LLM_MODEL_APPLICABILITY_PREFERENCE`: per applicability, a preference list that REPLACES the default one. Set\n * through {@link useModelApplicabilityPreference} before {@link initialize}; absent, every agent resolves on the default.\n */\n private modelApplicabilityPreference: Partial<Record<LLM_Model_Applicability, readonly LLM_Model[]>> | undefined;\n /** The application's declared autonomous agents, by ref (#1611). */\n private readonly autonomousAgents = new Map<string, Readonly<FlowsActors_AutonomousAgentDeclaration>>();\n /** The application's declared chat agents, by ref, in declaration order (#2665). */\n private readonly chatAgents = new Map<string, Readonly<FlowsActors_ChatAgentDeclaration>>();\n /** The application's actor-run continuations, by actor system ref (#2539): what resumes a run once its question is answered. */\n private readonly actorExecutionContinuations = new Map<string, ActorExecutionContinuation<any>>();\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n /**\n * Where a registry provider's declared chat models are read from (#2516). Optional because an engine provider's\n * models are catalog rows and need nothing from it; a registration that does need it and finds it absent or not yet\n * initialized resolves against no declarations and fails closed, naming that.\n */\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService) @optional()\n private readonly externalProvidersRegistry?: ExternalProvidersRegistryBackendService,\n /**\n * The application's resources, for a function tool whose arguments are a resource's declaration\n * (`FunctionTool.bindToResources`: the read tool's filters). Optional and appended last: absent, or not yet\n * initialized, such a tool keeps its authored schema.\n */\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) @optional()\n private readonly resourcesRegistry?: ResourcesRegistryBackendService,\n ) {\n this.registry = {\n agents: {},\n flows: {},\n actors: {},\n mcpServers: {},\n agentRegistryIndex: {\n agents: {},\n agentsByProvider: {},\n agentsByOperation: {},\n },\n functionTools: {},\n };\n\n\n this.logDebug = this.logger.debugByType('FlowsActorsRegistry');\n this.logger.setDebugTypeLogging('FlowsActorsRegistry', false);\n\n this.logDebug('FlowsActors registry service created');\n }\n\n // ================================\n // Initialization\n // ================================\n\n /**\n * Give this process its own model preference per applicability, replacing the framework's list for each one named.\n * The development companion uses it to run its judgment work on a different model from the framework default an\n * application's agents resolve to.\n *\n * Only before {@link initialize}: every agent resolves its model once, at registration, so a preference set afterwards\n * would hold for the agents registered later and not for those already registered. Refused then, rather than splitting\n * the registry across two preferences (the same preference again is accepted, as a repeated `initialize` is skipped).\n * The resolver's gates still apply to every entry: a model is chosen only when its catalog row names the agent's\n * provider and declares the applicability.\n */\n public useModelApplicabilityPreference(preference: Partial<Record<LLM_Model_Applicability, readonly LLM_Model[]>>): void {\n if (this.isInitialized && preference !== this.modelApplicabilityPreference) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'The model applicability preference is set before the flows/actors registry initializes: agents already registered resolved their model on the default.' },\n });\n }\n this.modelApplicabilityPreference = preference;\n }\n\n /**\n * Initialize the registry with flow-actor systems and agents\n * Follows the same pattern as ResourcesRegistryBackendService.initialize()\n */\n public async initialize(\n customBackend_FlowActorSystemsFactoryMap?: FlowActorSystem_InitializationFactoryMap,\n customBackend_Agents?: FlowsActors_Agent[],\n customBackend_FunctionTools?: FunctionTool[],\n customBackend_McpServers?: FlowsActors_McpServer[],\n /** The application's autonomous agents (#1611); validated against the registered actor systems. */\n customBackend_AutonomousAgents?: FlowsActors_AutonomousAgentDeclaration[],\n /**\n * What a resource named by an agent's `schedule.perCase` is (#2540), from the resources registry. Absent, a\n * declaration with `perCase` is refused at startup — its rows could not be proven to be cases.\n */\n describeCaseResource?: (resourceType: string) => AutonomousAgentCaseResourceFacts | undefined,\n /** The agents the application lets answer in a chat workspace (#2665); validated against the registered actor systems. */\n customBackend_ChatAgents?: FlowsActors_ChatAgentDeclaration[],\n ): Promise<void> {\n if (this.isInitialized) {\n this.logDebug('Registry already initialized, skipping...');\n return;\n }\n\n const defaultSystemsFactoryMap = flowsActors_Backend_Default_Definition.flowActorSystemsFactoryMap;\n const defaultAgents = flowsActors_Backend_Default_Definition.agents;\n const defaultFunctionTools = flowsActors_Backend_Default_Definition.functionTools;\n\n // Merge default with custom backend (custom takes precedence)\n const mergedSystemsFactoryMap: FlowActorSystem_InitializationFactoryMap = {\n ...defaultSystemsFactoryMap,\n ...customBackend_FlowActorSystemsFactoryMap,\n };\n\n const mergedAgents: FlowsActors_Agent[] = [\n ...defaultAgents,\n ...(customBackend_Agents || []),\n ];\n\n const mergedFunctionTools: FunctionTool[] = [\n ...defaultFunctionTools,\n ...(customBackend_FunctionTools || []),\n ];\n\n this.logDebug('Initializing flows-actors registry', {\n defaultSystemsCount: Object.keys(defaultSystemsFactoryMap).length,\n customBackendSystemsCount: customBackend_FlowActorSystemsFactoryMap ? Object.keys(customBackend_FlowActorSystemsFactoryMap).length : 0,\n defaultAgentsCount: defaultAgents.length,\n customBackendAgentsCount: customBackend_Agents?.length || 0,\n });\n\n\n for (const [ref, factory] of Object.entries(mergedSystemsFactoryMap)) {\n try {\n const system = factory();\n this.registerSystem(system);\n } catch (error) {\n throw this.errorBuilder.buildError( ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE, context: { systemRef: ref, error: describeCaughtError(error) }});\n }\n }\n\n\n for (const agent of mergedAgents) {\n this.registerAgent(agent);\n }\n\n for (const functionTool of mergedFunctionTools) {\n this.registerFunctionTool(functionTool);\n }\n\n for (const mcpServer of customBackend_McpServers ?? []) {\n this.registerMcpServer(mcpServer);\n }\n\n /**\n * Every agent's `mcpRefs` must name a DECLARED server, checked here rather than in\n * `registerAgent` because registration order is not guaranteed — an agent may register before\n * the servers it names, and a per-registration check would refuse a coherent application for\n * the order its addons happened to load in.\n */\n this.assertDeclaredMcpRefs();\n // #2292: after the agents and the tools, for the same reason — order of registration is not guaranteed.\n this.assertGuardedAgentToolsDeclareTheirResults();\n this.assertAgentToolsAskForNoCredential();\n\n // After the systems: every declaration must name an ACTOR system that exists. A misdeclared autonomous\n // agent stops startup — a schedule firing into it would only record refusals nobody reads.\n const autonomousAgents = customBackend_AutonomousAgents ?? [];\n try {\n assertAutonomousAgentDeclarations(autonomousAgents, (systemRef) => !!this.registry.actors[systemRef], describeCaseResource);\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: describeCaughtError(error) } });\n }\n for (const declaration of autonomousAgents) this.autonomousAgents.set(declaration.ref, Object.freeze({ ...declaration }));\n\n // After the systems and agents: every chat agent must name an ACTOR system whose chat actor converses through a\n // registered agent. A misdeclared one stops startup — a message routed to it would only tell the person nobody answers.\n const chatAgents = customBackend_ChatAgents ?? [];\n try {\n assertChatAgentDeclarations(chatAgents, (systemRef) => {\n const actorSystem = this.registry.actors[systemRef];\n const agentRef = actorSystem ? chatAgentRefOfActorSystem(actorSystem) : undefined;\n return agentRef && this.registry.agents[agentRef] ? agentRef : undefined;\n });\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: describeCaughtError(error) } });\n }\n for (const declaration of chatAgents) this.chatAgents.set(declaration.ref, Object.freeze({ ...declaration }));\n\n this.isInitialized = true;\n\n this.logDebug('FlowsActors registry initialization completed', {\n totalSystems: Object.keys(this.registry.flows).length + Object.keys(this.registry.actors).length,\n flows: Object.keys(this.registry.flows).length,\n actors: Object.keys(this.registry.actors).length,\n agents: Object.keys(this.registry.agents).length,\n });\n }\n\n // ================================\n // System Registration & Retrieval\n // ================================\n\n /**\n * Register a flow-actor system\n */\n public registerSystem(system: FlowActorSystem): void {\n\n // Captured before the branching so the exhaustiveness arm below can report\n // WHICH system failed: inside that arm `system` is `never`, and reaching\n // through a `never` would need exactly the kind of assertion this change\n // exists to remove.\n const { ref: systemRef, kind: systemKind } = system;\n\n // #676: a run on the actor plane is opened by system ref alone, so one ref may name a flow or an actor system,\n // never both — the run would otherwise be drawn, continued and answered as whichever kind was looked up first.\n if ((system.kind === FlowActorSystem_Kind.FLOW && this.registry.actors[systemRef])\n || (system.kind === FlowActorSystem_Kind.ACTOR && this.registry.flows[systemRef])) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef, message: `'${systemRef}' names both a flow and an actor system. A system ref names one system.` },\n });\n }\n\n if (system.kind === FlowActorSystem_Kind.FLOW) {\n if (this.registry.flows[system.ref])\n this.logDebug('Flow already registered, updating...', { ref: system.ref });\n\n // #676: a flow that cannot run is refused here, at startup, rather than discovered by the first run that reaches\n // the step or the edge it cannot take.\n const issues = flowSystemIssues(system);\n if (issues.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef, message: `Flow '${systemRef}' cannot run: ${issues.join(' ')}` },\n });\n }\n\n // `FlowActorSystem` is a discriminated union on `kind`, so this assignment\n // is checked rather than asserted: the branch has already narrowed the\n // value to `FlowSystem`, which is what the registry bucket stores.\n this.registry.flows[system.ref] = system;\n\n } else if (system.kind === FlowActorSystem_Kind.ACTOR) {\n\n if (this.registry.actors[system.ref])\n this.logDebug('Actor already registered, updating...', { ref: system.ref });\n\n this.registry.actors[system.ref] = system;\n\n } else {\n /*\n * Exhaustiveness guard, newly possible because `FlowActorSystem` is a\n * discriminated union. Before it, an added system kind fell through here\n * and was dropped SILENTLY — the method returns void and logs \"System\n * registered\" either way, so the system was simply never resolvable. A\n * new union member now fails the `never` assignment at COMPILE time.\n *\n * The throw covers the runtime residue: this method is public API, so an\n * untyped or asserted caller can still hand over a system whose kind is\n * outside the union. Registration failing loudly at startup beats a\n * registry that reports success and resolves nothing.\n */\n const unhandledSystem: never = system;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n // `unhandledSystem` is carried into the diagnostic on purpose: an\n // exhaustiveness binding nothing reads looks like dead code, and the\n // next cleanup deletes the only compile-time guard in this method.\n // Here it is load-bearing in both directions — the `never` annotation\n // is the compile-time check, the value is the runtime diagnostic.\n context: { systemRef, kind: systemKind, unhandledSystem },\n });\n }\n\n\n this.logDebug('System registered', {\n ref: system.ref,\n kind: system.kind,\n displayName: system.displayName\n });\n }\n\n /**\n * Get a flow-actor system by reference\n */\n public getSystem(ref: string, kind: FlowActorSystem_Kind): FlowActorSystem | undefined {\n if (kind === FlowActorSystem_Kind.FLOW) {\n return this.registry.flows[ref];\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return this.registry.actors[ref];\n }\n return undefined;\n }\n\n /**\n * Get a flow-actor system or throw error\n */\n public getSystemOrThrow(ref: string, kind: FlowActorSystem_Kind): FlowActorSystem {\n const system = this.getSystem(ref, kind);\n if (!system) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined,\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { systemRef: ref, kind } });\n }\n return system;\n }\n\n /**\n * Get all systems of a specific kind\n */\n public getSystemsByKind(kind: FlowActorSystem_Kind): FlowActorSystem[] {\n if(kind === FlowActorSystem_Kind.FLOW) {\n return this.getFlows();\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return this.getActors();\n }\n return [];\n }\n\n /**\n * Get all flows.\n *\n * Returns `FlowSystem[]`, not the union: the kind is fixed by the accessor,\n * so widening would make every caller re-narrow to reach `steps`/`edges`\n * even though nothing here can be an actor system — and that re-narrowing\n * pressure is precisely what produced the assertions this change removed.\n *\n * These two accessors, not `getSystemsByKind`, are the typed primitives.\n * `getSystemsByKind` takes a kind as a RUNTIME VALUE, which no signature can\n * track without a generic, so it can only ever promise the union; it now\n * delegates here rather than re-reading the buckets, so the kind→bucket\n * mapping is stated once.\n */\n public getFlows(): FlowSystem[] {\n return Object.values(this.registry.flows);\n }\n\n /**\n * Get all actors — `ActorSystem[]`, so `.actors` is reachable on each entry\n * without a cast. See `getFlows`.\n */\n public getActors(): ActorSystem[] {\n return Object.values(this.registry.actors);\n }\n\n /**\n * Check if a system exists\n */\n public hasSystem(ref: string, kind: FlowActorSystem_Kind): boolean {\n if (kind === FlowActorSystem_Kind.FLOW) {\n return !!this.registry.flows[ref];\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return !!this.registry.actors[ref];\n }\n return false;\n }\n\n // ================================\n // Agent Registration & Retrieval\n // ================================\n\n /**\n * The chat models a registry provider declares on its LLM arm (#2516), held to their shape. An engine provider (one the\n * catalog knows) has none, and one that declares any anyway is REFUSED here, whatever the agent names: its models are\n * catalog rows, and a second list would also replace the catalog's reasoning facts for a concretely named model.\n * When the declarations cannot be read, the answer says why, so a refusal can name it.\n */\n private readDeclaredLLMModels(agentRef: string, providerRef: string): DeclaredLLMModels {\n const registry = this.externalProvidersRegistry;\n if (registry === undefined || !registry.isReady()) return { unreadable: DeclaredLLMModelsUnreadable.PROVIDER_REGISTRY_NOT_READY };\n const runtimeContract = registry.getProviderRuntimeContract(providerRef, ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER);\n if (runtimeContract?.kind !== ProviderProtocolRuntimeKind.LLM) return { unreadable: DeclaredLLMModelsUnreadable.NO_LLM_CONTRACT };\n const refuse = (message: string, failure?: LLM_ModelResolutionFailure): never => {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message, agentRef, providerRef, ...(failure === undefined ? {} : { failure }) } });\n };\n const defect = describeLLMModelDeclarationsDefect(runtimeContract.models);\n if (defect !== undefined) refuse(`Provider \"${providerRef}\" declares chat models that ${defect}, and no agent can use it`);\n if (isLLMCatalogProvider(providerRef)) {\n if ((runtimeContract.models?.length ?? 0) > 0) {\n refuse(\n `Provider \"${providerRef}\" is an engine provider whose models are catalog rows, and it also declares chat models; a second list is refused rather than merged`,\n LLM_ModelResolutionFailure.CATALOG_PROVIDER_DECLARES_MODELS,\n );\n }\n return {};\n }\n return { models: runtimeContract.models ?? [] };\n }\n\n /**\n * Register an agent.\n *\n * Fails CLOSED on a `model × reasoningEffort` pair the target model cannot\n * honour. Registration is the authoring-time seam: every agent — engine\n * defaults and app-registered customs alike — funnels through here at\n * startup, so a bad pair surfaces as a named boot error instead of a provider\n * 400 thrown deep inside a long agent pipeline (a deliberation can burn\n * minutes and real money before reaching its first call).\n *\n * The canonical trap this catches: `reasoningEffort: NONE` turns reasoning off\n * on GPT-5.6 and on most of Claude 5, but hard-errors on `claude-fable-5`,\n * whose thinking cannot be disabled — so the pair's validity depends on the\n * MODEL, not even on its family, and swapping a model without re-auditing its\n * reasoning params is exactly how it breaks.\n *\n * Validation fails OPEN for unknown/unverified model ids (custom + fine-tuned\n * deployments are legitimate) — see `validateReasoningEffortForModel`.\n */\n public registerAgent(agent: FlowsActors_Agent): void {\n // #2292: a content guardrail the engine cannot honour stops startup, rather than leaving an agent that looks guarded.\n // Checked per agent: it reads only the agent's own declaration, so registration order cannot matter.\n const guardrailIssues = agentContentGuardrailIssues({\n ref: agent.ref, isLanguageModelAgent: isLLMAgentConfiguration(agent.config), contentGuardrails: agent.contentGuardrails,\n });\n if (guardrailIssues.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: guardrailIssues.join(' ') } });\n }\n const previous = this.registry.agents[agent.ref];\n if (previous) {\n this.logDebug('Agent already registered, updating...', { ref: agent.ref });\n }\n\n /*\n * What gets REGISTERED may differ from what was AUTHORED (a resolved model id, below), and the\n * difference lives on a copy. The authored object is never written. Until 2026-09-09 this\n * method wrote `model` onto the caller's own config object; the dev companion's (since deleted)\n * startup-composition identity fence caught that as a mutated startup graph and crash-looped\n * every companion into `CRASH_RESPAWN_EXHAUSTED`. The fence was a survivor of the digest\n * demolition and went with it, but the registry was the side in the wrong regardless: a\n * resolver has no business changing its input, and the copy stays.\n */\n let registered: FlowsActors_Agent = agent;\n\n // Only the LLM arm of the config union reasons. Narrowed POSITIVELY: this\n // was `!isImageAgentConfiguration(...)`, which meant \"the LLM arm\" only\n // while the union had two members — the coding arm then fell straight into\n // it and the failure surfaced as a missing `reasoningEffort` property.\n if (isLLMAgentConfiguration(agent.config)) {\n /*\n * Resolve the APPLICABILITY axis into a concrete model id, here and only here (#439).\n *\n * An agent declares the KIND of work it does (`modelApplicability`) rather than naming a\n * model — the standing policy, which embeddings and document extraction already followed and\n * the agent path did not: `resolveModelForApplicability` had NO production caller anywhere,\n * and the field its own JSDoc named was declared by no configuration type.\n *\n * Registration is the chokepoint because it is where the config stops being authored and\n * starts being used: everything downstream reads `config.model` off the REGISTRY, so\n * resolving once here leaves all ~17 consumers untouched and keeps the invariant simple —\n * **a registered agent always carries a concrete model.** Resolving lazily at call time would\n * put a failure that belongs at startup inside a paid request.\n *\n * FAILS CLOSED, with the resolver's own named failure and the candidates it considered. An\n * applicability no model of this provider serves is a misconfiguration, and substituting some\n * other model would be the exact defect the axis exists to remove: the author asked for a\n * KIND, and quietly handing them a different kind is worse than refusing.\n */\n let llmConfig = agent.config;\n const declared = this.readDeclaredLLMModels(agent.ref, llmConfig.providerRef);\n const declaredModels = declared.models;\n if (llmConfig.modelApplicability !== undefined) {\n const resolution = resolveModelForApplicability({\n applicability: llmConfig.modelApplicability,\n providerRef: llmConfig.providerRef,\n ...(declaredModels === undefined ? {} : { declaredModels }),\n ...(this.modelApplicabilityPreference === undefined ? {} : { preferenceOverride: this.modelApplicabilityPreference }),\n });\n if (resolution.resolved === false) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Agent declares a model applicability no model of its provider can serve',\n agentRef: agent.ref,\n providerRef: llmConfig.providerRef,\n modelApplicability: llmConfig.modelApplicability,\n failure: resolution.failure,\n consideredModels: resolution.consideredModels,\n ...(declared.unreadable === undefined ? {} : { providerModelsUnreadable: declared.unreadable }),\n } });\n }\n // A COPY carrying the resolved id. The spread keeps the `isLLMAgentConfiguration` narrowing\n // for the reasoning validation immediately below — which must run on the RESOLVED model,\n // being model-dependent — so nothing here needs to write onto the authored object.\n llmConfig = { ...llmConfig, model: resolution.model };\n registered = { ...agent, config: llmConfig };\n }\n\n // The schema admits exactly one of `model` / `modelApplicability`, and an applicability was resolved to `model`\n // just above, so a registered agent names a concrete model. Both checks below are about a model id and answer\n // nothing for none (#3583): a configuration built outside the schema without one is judged by the provider's\n // client when it builds the model, exactly as before.\n const configuredModel = llmConfig.model;\n if (configuredModel !== undefined) {\n // #2294: a model id that names its own routing (a Bedrock `global.` or another geography's profile) would process\n // outside the region the application declared for the provider, and with it outside any data residency checked\n // against that region. Refused here, at startup; the provider's client refuses the same id again when it builds it.\n // Feature-detected: a partial registry (a unit harness) answers nothing here, and the client's own check still runs.\n const outsideDeclaredRegion = this.externalProvidersRegistry?.isReady() && typeof this.externalProvidersRegistry.describeModelOutsideDeclaredProcessingRegion === 'function'\n ? this.externalProvidersRegistry.describeModelOutsideDeclaredProcessingRegion(llmConfig.providerRef, configuredModel)\n : null;\n if (outsideDeclaredRegion !== null) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: `Agent \"${agent.ref}\": ${outsideDeclaredRegion}`, agentRef: agent.ref, providerRef: llmConfig.providerRef, model: llmConfig.model } });\n }\n\n // A registry provider's model is judged on its own declared thinking facts; the catalog knows nothing of it. A model\n // the provider does not declare (named concretely by the agent) has no facts and fails open, like an unprobed row.\n const declaredFacts = declaredModels?.find((declaration) => declaration.model === configuredModel);\n const reasoningViolation = declaredModels === undefined\n ? validateReasoningEffortForModel(configuredModel, llmConfig.reasoningEffort)\n : validateReasoningEffortForModel(configuredModel, llmConfig.reasoningEffort, declaredFacts ?? {});\n if (reasoningViolation) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: { agentRef: agent.ref, model: llmConfig.model, reasoningEffort: llmConfig.reasoningEffort, error: reasoningViolation } });\n }\n }\n }\n\n this.registry.agents[registered.ref] = registered;\n\n // Create index entries for quick lookup\n this.registry.agentRegistryIndex.agents[registered.ref] = registered;\n\n /*\n * An UPDATE replaces the agent in the two list indexes too. They used to be append-only, so a\n * re-registration left the superseded agent beside the new one and `getAgentsByProvider` /\n * `getAgentsByOperation` answered both. Re-registration became a runtime path when the dev\n * companion started refreshing an expert's agent from its live charter (#2349); before that it\n * only happened at startup, when an override replaced a default.\n */\n if (previous) {\n const withoutPrevious = (agents: FlowsActors_Agent[] | undefined): FlowsActors_Agent[] | undefined =>\n agents?.filter((candidate) => candidate.ref !== registered.ref);\n const byProvider = this.registry.agentRegistryIndex.agentsByProvider;\n const byOperation = this.registry.agentRegistryIndex.agentsByOperation;\n const previousProvider = withoutPrevious(byProvider[previous.config.providerRef]);\n if (previousProvider) byProvider[previous.config.providerRef] = previousProvider;\n const previousOperation = withoutPrevious(byOperation[previous.config.operationKey]);\n if (previousOperation) byOperation[previous.config.operationKey] = previousOperation;\n }\n\n // Index by provider\n if (!this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef]) {\n this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef] = [];\n }\n this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef].push(registered);\n\n // Index by operation\n if (!this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey]) {\n this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey] = [];\n }\n this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey].push(registered);\n\n this.logDebug('Agent registered', {\n ref: registered.ref,\n displayName: registered.displayName,\n operationKey: registered.config.operationKey,\n providerRef: registered.config.providerRef\n });\n }\n\n /**\n * Register how an application's runs of one actor system continue once their question is answered (#2539). Called by\n * startup for every module's `flowsActors.actorExecutionContinuations`, after `initialize` registered the systems, and\n * for every registered FLOW with the continuation the engine provides (`FlowsBackendService.flowContinuationOf`, #676).\n *\n * Refused at startup — a CONFIGURATION error — for a system that is not a registered actor system or flow, for a second\n * continuation of the same system, and for a ROLE or ASSIGNEE route that names no eligible role: each would leave a\n * question in an inbox with nothing that can continue the run it belongs to, or nobody it is routed to.\n */\n public registerActorExecutionContinuation(continuation: ActorExecutionContinuation<any>): void {\n const refuse = (message: string): never => {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef: continuation.systemRef, message },\n });\n };\n if (!this.registry.actors[continuation.systemRef] && !this.registry.flows[continuation.systemRef]) {\n refuse(`An actor-run continuation names '${continuation.systemRef}', which is not a registered actor system or flow.`);\n }\n if (this.actorExecutionContinuations.has(continuation.systemRef)) {\n refuse(`Two actor-run continuations name '${continuation.systemRef}'. A system's waiting runs are continued by exactly one.`);\n }\n for (const route of continuation.decisionRoutes) {\n if (route.route !== HumanDecision_RouteKind.OWNER && !route.eligibleRole) {\n refuse(`An actor-run continuation of '${continuation.systemRef}' routes its questions to a ${route.route} with no eligible role.`);\n }\n }\n const deadlineIssues = actorQuestionDeadlineIssues(continuation);\n if (deadlineIssues.length > 0) {\n refuse(`The actor-run continuation of '${continuation.systemRef}' declares deadlines that cannot work:\\n - ${deadlineIssues.join('\\n - ')}`);\n }\n // #2923: a step-up declaration that cannot mean what it says never runs.\n const stepUpIssues = [\n ...humanDecisionStepUpDeclarationIssues(continuation, 'continuation'),\n ...humanDecisionAnswerChannelsIssues(continuation.answerChannels, humanDecisionStepUpRequirementOf(continuation) !== undefined, 'continuation'),\n ];\n if (stepUpIssues.length > 0) {\n refuse(`The actor-run continuation of '${continuation.systemRef}' declares a step-up that cannot work:\\n - ${stepUpIssues.join('\\n - ')}`);\n }\n this.actorExecutionContinuations.set(continuation.systemRef, continuation);\n }\n\n /** How waiting runs of this actor system continue, or `undefined` when the application declares nothing (#2539). */\n public getActorExecutionContinuation(systemRef: string): ActorExecutionContinuation<any> | undefined {\n return this.actorExecutionContinuations.get(systemRef);\n }\n\n /** Every declared actor-run continuation (#2539): what the decision inbox's placement is derived from. */\n public listActorExecutionContinuations(): readonly ActorExecutionContinuation<any>[] {\n return [...this.actorExecutionContinuations.values()];\n }\n\n /** The declared autonomous agent with this ref, or `undefined` (#1611). */\n public getAutonomousAgent(ref: string): Readonly<FlowsActors_AutonomousAgentDeclaration> | undefined {\n return this.autonomousAgents.get(ref);\n }\n\n /** Every declared autonomous agent (#1611). */\n public getAutonomousAgents(): readonly Readonly<FlowsActors_AutonomousAgentDeclaration>[] {\n return [...this.autonomousAgents.values()];\n }\n\n /** The declared chat agent with this ref, or `undefined` (#2665). */\n public getChatAgent(ref: string): Readonly<FlowsActors_ChatAgentDeclaration> | undefined {\n return this.chatAgents.get(ref);\n }\n\n /** Every declared chat agent, in declaration order (#2665). */\n public getChatAgents(): readonly Readonly<FlowsActors_ChatAgentDeclaration>[] {\n return [...this.chatAgents.values()];\n }\n\n /** The chat agent declared `isDefault`, which answers where an organization chose none, or `undefined` (#2665). */\n public getDefaultChatAgent(): Readonly<FlowsActors_ChatAgentDeclaration> | undefined {\n return [...this.chatAgents.values()].find((declaration) => declaration.isDefault === true);\n }\n\n /**\n * The context limits a registry provider DECLARES for one of its models (#2750), or `undefined`: for an engine provider\n * (its models are catalog rows, which `modelInputTokenCeiling` reads itself), for a model it declares without limits,\n * and when its declarations cannot be read. Never throws: it is asked on every conversation turn, and a declaration\n * that could not be used already stopped the agent's registration, so a turn takes the framework floor rather than fail.\n */\n public declaredModelContextLimits(agentRef: string, providerRef: string, model: string): LLM_ModelContextLimits | undefined {\n try {\n return this.readDeclaredLLMModels(agentRef, providerRef).models?.find((declaration) => declaration.model === model)?.contextLimits;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Get an agent by reference\n */\n public getAgent(ref: string): FlowsActors_Agent | undefined {\n return this.registry.agents[ref];\n }\n\n /**\n * Get an agent or throw error\n */\n public getAgentOrThrow(ref: string): FlowsActors_Agent {\n const agent = this.getAgent(ref);\n\n if (!agent) {\n throw this.errorBuilder.buildError( ErrorType.NOT_FOUND, undefined,\n {customMessageReference: ErrorCustomMessageReference.NOT_FOUND,context: { agentRef: ref } });\n }\n return agent;\n }\n\n /**\n * Get agents by provider\n */\n public getAgentsByProvider(providerRef: string): FlowsActors_Agent[] {\n return this.registry.agentRegistryIndex.agentsByProvider[providerRef] || [];\n }\n\n /**\n * Get agents by operation key\n */\n public getAgentsByOperation(operationKey: string): FlowsActors_Agent[] {\n return this.registry.agentRegistryIndex.agentsByOperation[operationKey] || [];\n }\n\n /**\n * Check if an agent exists\n */\n public hasAgent(ref: string): boolean {\n return !!this.registry.agents[ref];\n }\n\n // ================================\n // Function Tools\n // ================================\n\n /**\n * Register an executable function tool, indexed by its `functionRef`. Agents\n * reference it via `capabilities.tools.functionRefs`; `AgentsBackendService`\n * resolves it into an AI-SDK tool at invocation time.\n */\n public registerFunctionTool(declared: FunctionTool): void {\n // A gate nobody can answer is refused here, at startup, rather than stranding the first turn that reaches it (#1594).\n resolveFunctionToolApprovalGate(declared);\n // #2292: `returnsThePersonsOwnWords` exempts a tool's result from prompt-injection screening, so only a tool whose\n // result IS the person's answer may claim it — a question tool. Any other tool claiming it would switch off a\n // security control for content somebody else wrote.\n if (declared.returnsThePersonsOwnWords && declared.asksThePerson !== true) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: `Function tool '${declared.functionRef}' declares returnsThePersonsOwnWords but does not ask the person (asksThePerson). `\n + 'Only a question tool returns the person\\'s own words; any other tool\\'s result is screened when its agent declares contentGuardrails.promptInjection.',\n },\n });\n }\n const functionTool = this.boundToResources(declared);\n // #2904: a file deliverable is bound by the approval of the call, through an argument the model is offered: checked on\n // the schema the tool registers with, so a declaration nothing could bind stops the application here.\n // #2293: a signature requirement on a deliverable nothing binds could never be sent.\n const deliverableProblems = [...functionToolDeliverableDeclarationProblems(functionTool), ...functionToolElectronicSignatureDeclarationProblems(functionTool)];\n if (deliverableProblems.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: deliverableProblems.join(' ') },\n });\n }\n this.registry.functionTools[functionTool.functionRef] = functionTool;\n this.logDebug('Registered function tool', { functionRef: functionTool.functionRef });\n }\n\n /**\n * A tool whose arguments are a resource's declaration, with them bound (`FunctionTool.bindToResources`): resolved here,\n * once, so the model, an approval card and an approval's validation all read the same schema. Unchanged when the tool\n * binds nothing.\n *\n * When a tool asks to be bound and the resources are not registered yet, it keeps its authored arguments and a WARNING\n * says so: those arguments are a strict subset (the read tool loses `filters`, and a model sending them has them\n * stripped without error), which is the failure the binding exists to remove. Both hosts register resources before\n * flows-actors (`start-application`, `start-companion-application`), so the warning means a host started them out of\n * order.\n */\n private boundToResources(functionTool: FunctionTool): FunctionTool {\n if (!functionTool.bindToResources) return functionTool;\n const resources = this.resourcesRegistry;\n if (!resources?.isReady()) {\n this.logger.warn('A function tool that takes its arguments from the resources was registered before them: it keeps its authored arguments only', {\n functionRef: functionTool.functionRef,\n resourcesRegistry: resources ? 'not initialized' : 'not bound',\n });\n return functionTool;\n }\n const bound = functionTool.bindToResources({\n // The same rule a tool's dispatch resolves its operation by (`resolveDispatchableOperation`): the URL-bearing default.\n dispatchableOperationOf: (resourceType, operationIdentifier) => (resources.hasOperationPathDefault(resourceType, operationIdentifier)\n ? resources.getOperationFromPath(resources.getOperationPathDefault(resourceType, operationIdentifier))\n : undefined),\n // The field the repository fills from the request's context for this resource's primary scope.\n primaryScopeFieldOf: (resourceType) => {\n const scope = resources.tryGetResourceConfiguration(resourceType)?.resourcePrimaryScope;\n return scope ? PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[scope] : undefined;\n },\n });\n return bound ? { ...functionTool, ...bound } : functionTool;\n }\n\n /** Get a function tool by ref. */\n public getFunctionTool(ref: string): FunctionTool | undefined {\n return this.registry.functionTools[ref];\n }\n\n /** Get a function tool or throw NOT_FOUND. */\n public getFunctionToolOrThrow(ref: string): FunctionTool {\n const functionTool = this.getFunctionTool(ref);\n if (!functionTool) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined,\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { functionRef: ref } });\n }\n return functionTool;\n }\n\n /** Every registered function tool — what a derivation over the application's declarations reads (#2527). */\n public listFunctionTools(): readonly FunctionTool[] {\n return Object.values(this.registry.functionTools);\n }\n\n /** Check if a function tool exists. */\n public hasFunctionTool(ref: string): boolean {\n return !!this.registry.functionTools[ref];\n }\n\n // ================================\n // MCP Server Registration & Retrieval\n // ================================\n\n /**\n * Register an MCP server the application permits its agents to reach, indexed by the ref an\n * agent's `capabilities.tools.mcpRefs` names (#491).\n *\n * REFUSES a plaintext endpoint. An MCP call carries a delegated credential to a third party, so\n * `http://` would put a bearer token on the wire in clear — and unlike the webhook lane, where a\n * plaintext endpoint is the operator's own declared destination and is reported rather than\n * blocked, nothing here is the application's to expose on someone else's behalf.\n */\n public registerMcpServer(mcpServer: FlowsActors_McpServer): void {\n if (mcpServerTransportIsPlaintext(mcpServer.url)) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: {\n mcpServerRef: mcpServer.ref,\n destinationHost: mcpServerDestinationHost(mcpServer.url),\n reason: 'mcp_server_endpoint_is_plaintext',\n },\n });\n }\n this.registry.mcpServers[mcpServer.ref] = mcpServer;\n this.logDebug('Registered MCP server', {\n ref: mcpServer.ref,\n transport: mcpServer.transport,\n destinationHost: mcpServerDestinationHost(mcpServer.url),\n });\n }\n\n /** Get a declared MCP server by ref. */\n public getMcpServer(ref: string): FlowsActors_McpServer | undefined {\n return this.registry.mcpServers[ref];\n }\n\n /** Check if an MCP server is declared. */\n public hasMcpServer(ref: string): boolean {\n return !!this.registry.mcpServers[ref];\n }\n\n /**\n * Refuse an agent whose `mcpRefs` name a server the application never declared.\n *\n * FAIL-CLOSED, and deliberately stricter than `functionRefs`, which skip an unknown ref with a\n * debug line. The asymmetry has a measured reason: an unknown `functionRef` costs an agent one\n * tool, while `mcpRefs` were RENDERED to a person as a capability, and every ref that ever\n * existed — `filesystem-mcp`, `git-mcp`, `browser-mcp`, `mongodb-mcp` — named no server anywhere,\n * because the field could be authored against nothing (#491). A refusal is what makes that state\n * unreachable rather than merely fixed once.\n *\n * The engine's own law, measured at `start-application.backend.service.ts`: a declaration gets\n * made if and only if the framework refuses to start without it.\n */\n private assertDeclaredMcpRefs(): void {\n const undeclared: { agentRef: string; mcpRef: string }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n for (const mcpRef of agent.capabilities?.tools?.mcpRefs ?? []) {\n if (!this.hasMcpServer(mcpRef)) undeclared.push({ agentRef: agent.ref, mcpRef });\n }\n }\n if (undeclared.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: {\n reason: 'agent_mcp_ref_names_no_declared_server',\n undeclared,\n declaredMcpServerRefs: Object.keys(this.registry.mcpServers),\n },\n });\n }\n\n /**\n * #2292: an agent that declares `contentGuardrails.personalData` may be offered only tools that say what their result\n * carries (`FunctionTool.personalDataOutput`). A result that does not say could carry anything, so the guard could not\n * treat it, and the agent would look guarded while a tool sends records in clear. Refused at startup, naming each pair;\n * the engine's own tools declare it.\n */\n private assertGuardedAgentToolsDeclareTheirResults(): void {\n const undeclared: { agentRef: string; functionRef: string }[] = [];\n const undeclaredForTenants: { agentRef: string; functionRef: string }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n if (!isLLMAgentConfiguration(agent.config)) continue;\n for (const functionRef of agent.capabilities?.tools?.functionRefs ?? []) {\n const functionTool = this.registry.functionTools[functionRef];\n if (!functionTool || functionTool.personalDataOutput) continue;\n (agent.contentGuardrails?.personalData ? undeclared : undeclaredForTenants).push({ agentRef: agent.ref, functionRef });\n }\n }\n // #2292 R8: any language-model agent can be put under a treatment by an organization's policy. A tool that does not say\n // what its result carries then reaches the model only withheld whole: the agent works, but blind to that tool's result.\n // Reported, not refused: the application did not ask for the treatment, an organization did.\n if (undeclaredForTenants.length > 0) {\n this.logger.warn('Tools offered to a language-model agent do not declare what their result carries (personalDataOutput). If an organization switches personal-data treatment on for these agents, their model receives these results withheld whole.', {\n tools: undeclaredForTenants.map((pair) => `${pair.agentRef} → ${pair.functionRef}`),\n });\n }\n if (undeclared.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n reason: 'guarded_agent_offered_tool_without_personal_data_output',\n message: `An agent whose personal data is guarded is offered a tool that does not declare what its result carries: ${\n undeclared.map((pair) => `${pair.agentRef} → ${pair.functionRef}`).join(', ')\n }. Declare personalDataOutput on each tool.`,\n undeclared,\n },\n });\n }\n\n /**\n * #3325: a tool offered to a language-model agent may not declare a credential among its arguments. Its schema is what the\n * model is asked to fill, and a call's arguments are kept on the paused row, in the tool trace and in the agent-work record,\n * so a secret has nowhere safe to travel through a call. Refused at startup, like a chat command's credential field\n * (`notFilledFromChatBecause`), because the remedy is a change of design: take the secret through the application's own\n * secret handling or a connected account, and let the tool read it.\n *\n * spec-cite: MCP 2025-11-25, client/elicitation, the sensitive-information warning, for the same line drawn at the same\n * kind of channel: \"Servers **MUST NOT** use form mode elicitation to request sensitive information\".\n *\n * This reads the tool's own schema: a field only its `argumentsResource` declares is met at run time, where the trace and any\n * pause withhold it, and a gated call is denied.\n *\n * Rejected: allowing it for a tool that \"legitimately\" takes a key the model read. No such tool exists here, and a guarded\n * agent is never shown a credential, so that tool would only work by holding the secret in the model's context.\n *\n * assurance-control: WILDO.SECURITY.FAIL_CLOSED — a tool cannot ask a model for a credential.\n */\n private assertAgentToolsAskForNoCredential(): void {\n const offending: { agentRef: string; functionRef: string; fields: string[] }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n if (!isLLMAgentConfiguration(agent.config)) continue;\n for (const functionRef of agent.capabilities?.tools?.functionRefs ?? []) {\n const functionTool = this.registry.functionTools[functionRef];\n const fields = functionTool ? declaredCredentialFieldsOf(functionTool.inputSchema) : [];\n if (fields.length > 0) offending.push({ agentRef: agent.ref, functionRef, fields });\n }\n }\n if (offending.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n reason: 'agent_offered_tool_taking_a_credential',\n message: `A tool offered to a language-model agent declares a credential among its arguments, which the model would have to write and a call would keep: ${\n offending.map((pair) => `${pair.agentRef} → ${pair.functionRef} (${pair.fields.join(', ')})`).join(', ')\n }. Take the secret through the application's own secret handling or a connected account, and let the tool read it.`,\n offending,\n },\n });\n }\n\n // ================================\n // Registry Access\n // ================================\n\n /**\n * Get the complete registry\n */\n public getRegistry(): FlowsActorsRegistry {\n return this.registry;\n }\n\n /**\n * Get the agent registry index\n */\n public getAgentRegistryIndex(): AgentRegistryIndex {\n return this.registry.agentRegistryIndex;\n }\n\n // ================================\n // Debug Methods\n // ================================\n\n public getDebugInfo(): {\n isInitialized: boolean;\n totalSystems: number;\n flowsCount: number;\n actorsCount: number;\n agentsCount: number;\n systemRefs: string[];\n agentRefs: string[];\n } {\n return {\n isInitialized: this.isInitialized,\n totalSystems: Object.keys(this.registry.flows).length + Object.keys(this.registry.actors).length,\n flowsCount: Object.keys(this.registry.flows).length,\n actorsCount: Object.keys(this.registry.actors).length,\n agentsCount: Object.keys(this.registry.agents).length,\n systemRefs: Object.keys(this.registry.flows).concat(Object.keys(this.registry.actors)),\n agentRefs: Object.keys(this.registry.agents),\n };\n }\n\n public displayRegistryInfo(): void {\n this.logDebug('\\n=== 🤖 FLOWS-ACTORS REGISTRY SUMMARY ===\\n');\n\n const info = this.getDebugInfo();\n\n this.logDebug(`📊 STATISTICS:`);\n this.logDebug(` Total Systems: ${info.totalSystems}`);\n this.logDebug(` Flows: ${info.flowsCount}`);\n this.logDebug(` Actors: ${info.actorsCount}`);\n this.logDebug(` Agents: ${info.agentsCount}`);\n this.logDebug(` Initialized: ${info.isInitialized}`);\n\n if (info.systemRefs.length > 0) {\n this.logDebug('\\n🔄 REGISTERED SYSTEMS:');\n info.systemRefs.forEach(ref => {\n const system = this.registry.flows[ref];\n this.logDebug(` - ${ref} (${system.kind}): ${system.displayName}`);\n });\n }\n\n if (info.agentRefs.length > 0) {\n this.logDebug('\\n🤖 REGISTERED AGENTS:');\n info.agentRefs.forEach(ref => {\n const agent = this.registry.agentRegistryIndex.agents[ref];\n this.logDebug(` - ${ref}: ${agent.displayName} [${agent.config.providerRef}/${agent.config.operationKey}]`);\n });\n }\n\n this.logDebug('=================================\\n');\n }\n}\n\n/**\n * Everything wrong with an actor system's question deadlines (#1863), checked when its continuation registers. The\n * shared checks run for each route the system declares (the calendar half needs the application configuration, so the\n * startup validator asks that one), and this plane adds two: the rules may only NOTIFY, and no pause state is offered.\n * A REASSIGN target is a function and a question's clocks outlive the process that raised it; no door on this plane\n * pauses a clock.\n */\nexport function actorQuestionDeadlineIssues(continuation: Pick<ActorExecutionContinuation<unknown>, 'deadlines' | 'decisionRoutes'>): string[] {\n const deadlines = continuation.deadlines;\n if (!deadlines) return [];\n const issues = new Set<string>();\n const routeKinds = continuation.decisionRoutes.length > 0\n ? continuation.decisionRoutes.map((route) => route.route)\n : [HumanDecision_RouteKind.OWNER];\n for (const routeKind of routeKinds) {\n for (const issue of reviewDeadlinesDeclarationIssues(deadlines, { routeKind, calendarDeclared: true })) issues.add(issue);\n }\n for (const rule of deadlines.rules ?? []) {\n if (rule.action !== ReviewEscalationActionKind.NOTIFY) {\n issues.add(`deadlines.rules ${rule.action}s at ${rule.stage}, but an actor question's rules may only NOTIFY.`);\n }\n }\n if ((deadlines.pauseStates ?? []).length > 0) {\n issues.add('deadlines.pauseStates is declared, but no door on the actor plane pauses a question\\'s clock.');\n }\n return [...issues];\n}\n"]}
1
+ {"version":3,"file":"flows-actors-registry.service.js","sourceRoot":"","sources":["../../../../src/flows-actors/services/flows-actors-registry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACnH,OAAO,EAEL,oBAAoB,EAIpB,gBAAgB,EAChB,uBA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CAAC;AACrB,CAAC","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject, optional } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport {\n FlowActorSystem,\n FlowActorSystem_Kind,\n FlowsActors_Agent,\n ActorSystem,\n FlowSystem,\n flowSystemIssues,\n isLLMAgentConfiguration,\n agentContentGuardrailIssues,\n FlowsActors_McpServer,\n mcpServerDestinationHost,\n mcpServerTransportIsPlaintext,\n PRIMARY_SCOPE_TO_FIELD_IDENTIFIER,\n} from '@wildo-ai/saas-models';\nimport {\n ErrorType,\n ErrorCustomMessageReference,\n HumanDecision_RouteKind,\n humanDecisionAnswerChannelsIssues, humanDecisionStepUpDeclarationIssues, humanDecisionStepUpRequirementOf,\n ReviewEscalationActionKind,\n reviewDeadlinesDeclarationIssues,\n} from '@wildo-ai/saas-models';\nimport {\n FlowsActorsRegistry,\n FlowActorSystem_InitializationFactoryMap,\n AgentRegistryIndex\n} from '~wildo-backend-lib/flows-actors/models/flows-actors.backend.schemas';\nimport {\n describeLLMModelDeclarationsDefect,\n ExternalProvider_ExchangeProtocol_Kind,\n isLLMCatalogProvider,\n LLM_ModelResolutionFailure,\n ProviderProtocolRuntimeKind,\n resolveModelForApplicability,\n validateReasoningEffortForModel,\n type LLM_Model,\n type LLM_Model_Applicability,\n type LLM_ModelContextLimits,\n type LLM_ModelDeclaration,\n} from '@wildo-ai/external-connectors-models';\nimport type { ExternalProvidersRegistryBackendService } from '~wildo-backend-lib/external-providers/services/external-providers-registry.backend.service';\nimport { declaredCredentialFieldsOf } from '~wildo-backend-lib/flows-actors/utils/agent-work-correction.backend.utils';\nimport { chatAgentRefOfActorSystem, functionToolDeliverableDeclarationProblems, functionToolElectronicSignatureDeclarationProblems, functionToolRecordApprovalDeclarationProblems, resolveFunctionToolApprovalGate, type FunctionTool } from '~wildo-backend-lib/flows-actors/models/function-tools.backend.definitions';\nimport { flowsActors_Backend_Default_Definition } from '~wildo-backend-lib/flows-actors/models/flows-actors.backend.definitions';\nimport {\n assertAutonomousAgentDeclarations,\n type AutonomousAgentCaseResourceFacts,\n type FlowsActors_AutonomousAgentDeclaration,\n} from '~wildo-backend-lib/flows-actors/models/autonomous-agents.backend.definitions';\nimport type { ActorExecutionContinuation } from '~wildo-backend-lib/flows-actors/models/actor-execution-continuation.backend.definitions';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport { assertChatAgentDeclarations, type FlowsActors_ChatAgentDeclaration } from '~wildo-backend-lib/flows-actors/models/chat-agents.backend.definitions';\n\n/**\n * FlowsActors Registry Service\n *\n * Central registry for managing flow-actor systems, agents, and their configurations.\n * Similar to ResourcesRegistryBackendService but for flow-actor domain.\n *\n * Features:\n * - Register and retrieve flow systems and actors\n * - Manage agent definitions and capabilities\n * - System validation and lookup\n * - Kind-based filtering and organization\n */\n/** Why a registry provider's declared chat models could not be read at agent registration (#2516). */\nenum DeclaredLLMModelsUnreadable {\n /** No provider registry is bound, or it is not initialized yet (a platform service, a harness). */\n PROVIDER_REGISTRY_NOT_READY = 'provider_registry_not_ready',\n /** The registry is ready and holds no LLM contract for this provider: it is not installed, or not an LLM provider. */\n NO_LLM_CONTRACT = 'no_llm_contract',\n}\n\n/** What agent registration knows of a provider's declared chat models — see `readDeclaredLLMModels`. */\ninterface DeclaredLLMModels {\n /** The declarations, for a provider the catalog does not know. Absent for an engine provider. */\n readonly models?: readonly LLM_ModelDeclaration[];\n readonly unreadable?: DeclaredLLMModelsUnreadable;\n}\n\n@injectable()\nexport class FlowsActorsRegistryService {\n\n private registry: FlowsActorsRegistry;\n private isInitialized = false;\n /**\n * This process's own answer to \"which model serves this kind of work\", where it differs from the framework's\n * `LLM_MODEL_APPLICABILITY_PREFERENCE`: per applicability, a preference list that REPLACES the default one. Set\n * through {@link useModelApplicabilityPreference} before {@link initialize}; absent, every agent resolves on the default.\n */\n private modelApplicabilityPreference: Partial<Record<LLM_Model_Applicability, readonly LLM_Model[]>> | undefined;\n /** The application's declared autonomous agents, by ref (#1611). */\n private readonly autonomousAgents = new Map<string, Readonly<FlowsActors_AutonomousAgentDeclaration>>();\n /** The application's declared chat agents, by ref, in declaration order (#2665). */\n private readonly chatAgents = new Map<string, Readonly<FlowsActors_ChatAgentDeclaration>>();\n /** The application's actor-run continuations, by actor system ref (#2539): what resumes a run once its question is answered. */\n private readonly actorExecutionContinuations = new Map<string, ActorExecutionContinuation<any>>();\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n /**\n * Where a registry provider's declared chat models are read from (#2516). Optional because an engine provider's\n * models are catalog rows and need nothing from it; a registration that does need it and finds it absent or not yet\n * initialized resolves against no declarations and fails closed, naming that.\n */\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService) @optional()\n private readonly externalProvidersRegistry?: ExternalProvidersRegistryBackendService,\n /**\n * The application's resources, for a function tool whose arguments are a resource's declaration\n * (`FunctionTool.bindToResources`: the read tool's filters). Optional and appended last: absent, or not yet\n * initialized, such a tool keeps its authored schema.\n */\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) @optional()\n private readonly resourcesRegistry?: ResourcesRegistryBackendService,\n ) {\n this.registry = {\n agents: {},\n flows: {},\n actors: {},\n mcpServers: {},\n agentRegistryIndex: {\n agents: {},\n agentsByProvider: {},\n agentsByOperation: {},\n },\n functionTools: {},\n };\n\n\n this.logDebug = this.logger.debugByType('FlowsActorsRegistry');\n this.logger.setDebugTypeLogging('FlowsActorsRegistry', false);\n\n this.logDebug('FlowsActors registry service created');\n }\n\n // ================================\n // Initialization\n // ================================\n\n /**\n * Give this process its own model preference per applicability, replacing the framework's list for each one named.\n * The development companion uses it to run its judgment work on a different model from the framework default an\n * application's agents resolve to.\n *\n * Only before {@link initialize}: every agent resolves its model once, at registration, so a preference set afterwards\n * would hold for the agents registered later and not for those already registered. Refused then, rather than splitting\n * the registry across two preferences (the same preference again is accepted, as a repeated `initialize` is skipped).\n * The resolver's gates still apply to every entry: a model is chosen only when its catalog row names the agent's\n * provider and declares the applicability.\n */\n public useModelApplicabilityPreference(preference: Partial<Record<LLM_Model_Applicability, readonly LLM_Model[]>>): void {\n if (this.isInitialized && preference !== this.modelApplicabilityPreference) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'The model applicability preference is set before the flows/actors registry initializes: agents already registered resolved their model on the default.' },\n });\n }\n this.modelApplicabilityPreference = preference;\n }\n\n /**\n * Initialize the registry with flow-actor systems and agents\n * Follows the same pattern as ResourcesRegistryBackendService.initialize()\n */\n public async initialize(\n customBackend_FlowActorSystemsFactoryMap?: FlowActorSystem_InitializationFactoryMap,\n customBackend_Agents?: FlowsActors_Agent[],\n customBackend_FunctionTools?: FunctionTool[],\n customBackend_McpServers?: FlowsActors_McpServer[],\n /** The application's autonomous agents (#1611); validated against the registered actor systems. */\n customBackend_AutonomousAgents?: FlowsActors_AutonomousAgentDeclaration[],\n /**\n * What a resource named by an agent's `schedule.perCase` is (#2540), from the resources registry. Absent, a\n * declaration with `perCase` is refused at startup — its rows could not be proven to be cases.\n */\n describeCaseResource?: (resourceType: string) => AutonomousAgentCaseResourceFacts | undefined,\n /** The agents the application lets answer in a chat workspace (#2665); validated against the registered actor systems. */\n customBackend_ChatAgents?: FlowsActors_ChatAgentDeclaration[],\n ): Promise<void> {\n if (this.isInitialized) {\n this.logDebug('Registry already initialized, skipping...');\n return;\n }\n\n const defaultSystemsFactoryMap = flowsActors_Backend_Default_Definition.flowActorSystemsFactoryMap;\n const defaultAgents = flowsActors_Backend_Default_Definition.agents;\n const defaultFunctionTools = flowsActors_Backend_Default_Definition.functionTools;\n\n // Merge default with custom backend (custom takes precedence)\n const mergedSystemsFactoryMap: FlowActorSystem_InitializationFactoryMap = {\n ...defaultSystemsFactoryMap,\n ...customBackend_FlowActorSystemsFactoryMap,\n };\n\n const mergedAgents: FlowsActors_Agent[] = [\n ...defaultAgents,\n ...(customBackend_Agents || []),\n ];\n\n const mergedFunctionTools: FunctionTool[] = [\n ...defaultFunctionTools,\n ...(customBackend_FunctionTools || []),\n ];\n\n this.logDebug('Initializing flows-actors registry', {\n defaultSystemsCount: Object.keys(defaultSystemsFactoryMap).length,\n customBackendSystemsCount: customBackend_FlowActorSystemsFactoryMap ? Object.keys(customBackend_FlowActorSystemsFactoryMap).length : 0,\n defaultAgentsCount: defaultAgents.length,\n customBackendAgentsCount: customBackend_Agents?.length || 0,\n });\n\n\n for (const [ref, factory] of Object.entries(mergedSystemsFactoryMap)) {\n try {\n const system = factory();\n this.registerSystem(system);\n } catch (error) {\n throw this.errorBuilder.buildError( ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE, context: { systemRef: ref, error: describeCaughtError(error) }});\n }\n }\n\n\n for (const agent of mergedAgents) {\n this.registerAgent(agent);\n }\n\n for (const functionTool of mergedFunctionTools) {\n this.registerFunctionTool(functionTool);\n }\n\n for (const mcpServer of customBackend_McpServers ?? []) {\n this.registerMcpServer(mcpServer);\n }\n\n /**\n * Every agent's `mcpRefs` must name a DECLARED server, checked here rather than in\n * `registerAgent` because registration order is not guaranteed — an agent may register before\n * the servers it names, and a per-registration check would refuse a coherent application for\n * the order its addons happened to load in.\n */\n this.assertDeclaredMcpRefs();\n // #2292: after the agents and the tools, for the same reason — order of registration is not guaranteed.\n this.assertGuardedAgentToolsDeclareTheirResults();\n this.assertAgentToolsAskForNoCredential();\n\n // After the systems: every declaration must name an ACTOR system that exists. A misdeclared autonomous\n // agent stops startup — a schedule firing into it would only record refusals nobody reads.\n const autonomousAgents = customBackend_AutonomousAgents ?? [];\n try {\n assertAutonomousAgentDeclarations(autonomousAgents, (systemRef) => !!this.registry.actors[systemRef], describeCaseResource);\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: describeCaughtError(error) } });\n }\n for (const declaration of autonomousAgents) this.autonomousAgents.set(declaration.ref, Object.freeze({ ...declaration }));\n\n // After the systems and agents: every chat agent must name an ACTOR system whose chat actor converses through a\n // registered agent. A misdeclared one stops startup — a message routed to it would only tell the person nobody answers.\n const chatAgents = customBackend_ChatAgents ?? [];\n try {\n assertChatAgentDeclarations(chatAgents, (systemRef) => {\n const actorSystem = this.registry.actors[systemRef];\n const agentRef = actorSystem ? chatAgentRefOfActorSystem(actorSystem) : undefined;\n return agentRef && this.registry.agents[agentRef] ? agentRef : undefined;\n });\n } catch (error) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: describeCaughtError(error) } });\n }\n for (const declaration of chatAgents) this.chatAgents.set(declaration.ref, Object.freeze({ ...declaration }));\n\n this.isInitialized = true;\n\n this.logDebug('FlowsActors registry initialization completed', {\n totalSystems: Object.keys(this.registry.flows).length + Object.keys(this.registry.actors).length,\n flows: Object.keys(this.registry.flows).length,\n actors: Object.keys(this.registry.actors).length,\n agents: Object.keys(this.registry.agents).length,\n });\n }\n\n // ================================\n // System Registration & Retrieval\n // ================================\n\n /**\n * Register a flow-actor system\n */\n public registerSystem(system: FlowActorSystem): void {\n\n // Captured before the branching so the exhaustiveness arm below can report\n // WHICH system failed: inside that arm `system` is `never`, and reaching\n // through a `never` would need exactly the kind of assertion this change\n // exists to remove.\n const { ref: systemRef, kind: systemKind } = system;\n\n // #676: a run on the actor plane is opened by system ref alone, so one ref may name a flow or an actor system,\n // never both — the run would otherwise be drawn, continued and answered as whichever kind was looked up first.\n if ((system.kind === FlowActorSystem_Kind.FLOW && this.registry.actors[systemRef])\n || (system.kind === FlowActorSystem_Kind.ACTOR && this.registry.flows[systemRef])) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef, message: `'${systemRef}' names both a flow and an actor system. A system ref names one system.` },\n });\n }\n\n if (system.kind === FlowActorSystem_Kind.FLOW) {\n if (this.registry.flows[system.ref])\n this.logDebug('Flow already registered, updating...', { ref: system.ref });\n\n // #676: a flow that cannot run is refused here, at startup, rather than discovered by the first run that reaches\n // the step or the edge it cannot take.\n const issues = flowSystemIssues(system);\n if (issues.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef, message: `Flow '${systemRef}' cannot run: ${issues.join(' ')}` },\n });\n }\n\n // `FlowActorSystem` is a discriminated union on `kind`, so this assignment\n // is checked rather than asserted: the branch has already narrowed the\n // value to `FlowSystem`, which is what the registry bucket stores.\n this.registry.flows[system.ref] = system;\n\n } else if (system.kind === FlowActorSystem_Kind.ACTOR) {\n\n if (this.registry.actors[system.ref])\n this.logDebug('Actor already registered, updating...', { ref: system.ref });\n\n this.registry.actors[system.ref] = system;\n\n } else {\n /*\n * Exhaustiveness guard, newly possible because `FlowActorSystem` is a\n * discriminated union. Before it, an added system kind fell through here\n * and was dropped SILENTLY — the method returns void and logs \"System\n * registered\" either way, so the system was simply never resolvable. A\n * new union member now fails the `never` assignment at COMPILE time.\n *\n * The throw covers the runtime residue: this method is public API, so an\n * untyped or asserted caller can still hand over a system whose kind is\n * outside the union. Registration failing loudly at startup beats a\n * registry that reports success and resolves nothing.\n */\n const unhandledSystem: never = system;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n // `unhandledSystem` is carried into the diagnostic on purpose: an\n // exhaustiveness binding nothing reads looks like dead code, and the\n // next cleanup deletes the only compile-time guard in this method.\n // Here it is load-bearing in both directions — the `never` annotation\n // is the compile-time check, the value is the runtime diagnostic.\n context: { systemRef, kind: systemKind, unhandledSystem },\n });\n }\n\n\n this.logDebug('System registered', {\n ref: system.ref,\n kind: system.kind,\n displayName: system.displayName\n });\n }\n\n /**\n * Get a flow-actor system by reference\n */\n public getSystem(ref: string, kind: FlowActorSystem_Kind): FlowActorSystem | undefined {\n if (kind === FlowActorSystem_Kind.FLOW) {\n return this.registry.flows[ref];\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return this.registry.actors[ref];\n }\n return undefined;\n }\n\n /**\n * Get a flow-actor system or throw error\n */\n public getSystemOrThrow(ref: string, kind: FlowActorSystem_Kind): FlowActorSystem {\n const system = this.getSystem(ref, kind);\n if (!system) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined,\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { systemRef: ref, kind } });\n }\n return system;\n }\n\n /**\n * Get all systems of a specific kind\n */\n public getSystemsByKind(kind: FlowActorSystem_Kind): FlowActorSystem[] {\n if(kind === FlowActorSystem_Kind.FLOW) {\n return this.getFlows();\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return this.getActors();\n }\n return [];\n }\n\n /**\n * Get all flows.\n *\n * Returns `FlowSystem[]`, not the union: the kind is fixed by the accessor,\n * so widening would make every caller re-narrow to reach `steps`/`edges`\n * even though nothing here can be an actor system — and that re-narrowing\n * pressure is precisely what produced the assertions this change removed.\n *\n * These two accessors, not `getSystemsByKind`, are the typed primitives.\n * `getSystemsByKind` takes a kind as a RUNTIME VALUE, which no signature can\n * track without a generic, so it can only ever promise the union; it now\n * delegates here rather than re-reading the buckets, so the kind→bucket\n * mapping is stated once.\n */\n public getFlows(): FlowSystem[] {\n return Object.values(this.registry.flows);\n }\n\n /**\n * Get all actors — `ActorSystem[]`, so `.actors` is reachable on each entry\n * without a cast. See `getFlows`.\n */\n public getActors(): ActorSystem[] {\n return Object.values(this.registry.actors);\n }\n\n /**\n * Check if a system exists\n */\n public hasSystem(ref: string, kind: FlowActorSystem_Kind): boolean {\n if (kind === FlowActorSystem_Kind.FLOW) {\n return !!this.registry.flows[ref];\n } else if (kind === FlowActorSystem_Kind.ACTOR) {\n return !!this.registry.actors[ref];\n }\n return false;\n }\n\n // ================================\n // Agent Registration & Retrieval\n // ================================\n\n /**\n * The chat models a registry provider declares on its LLM arm (#2516), held to their shape. An engine provider (one the\n * catalog knows) has none, and one that declares any anyway is REFUSED here, whatever the agent names: its models are\n * catalog rows, and a second list would also replace the catalog's reasoning facts for a concretely named model.\n * When the declarations cannot be read, the answer says why, so a refusal can name it.\n */\n private readDeclaredLLMModels(agentRef: string, providerRef: string): DeclaredLLMModels {\n const registry = this.externalProvidersRegistry;\n if (registry === undefined || !registry.isReady()) return { unreadable: DeclaredLLMModelsUnreadable.PROVIDER_REGISTRY_NOT_READY };\n const runtimeContract = registry.getProviderRuntimeContract(providerRef, ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER);\n if (runtimeContract?.kind !== ProviderProtocolRuntimeKind.LLM) return { unreadable: DeclaredLLMModelsUnreadable.NO_LLM_CONTRACT };\n const refuse = (message: string, failure?: LLM_ModelResolutionFailure): never => {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message, agentRef, providerRef, ...(failure === undefined ? {} : { failure }) } });\n };\n const defect = describeLLMModelDeclarationsDefect(runtimeContract.models);\n if (defect !== undefined) refuse(`Provider \"${providerRef}\" declares chat models that ${defect}, and no agent can use it`);\n if (isLLMCatalogProvider(providerRef)) {\n if ((runtimeContract.models?.length ?? 0) > 0) {\n refuse(\n `Provider \"${providerRef}\" is an engine provider whose models are catalog rows, and it also declares chat models; a second list is refused rather than merged`,\n LLM_ModelResolutionFailure.CATALOG_PROVIDER_DECLARES_MODELS,\n );\n }\n return {};\n }\n return { models: runtimeContract.models ?? [] };\n }\n\n /**\n * Register an agent.\n *\n * Fails CLOSED on a `model × reasoningEffort` pair the target model cannot\n * honour. Registration is the authoring-time seam: every agent — engine\n * defaults and app-registered customs alike — funnels through here at\n * startup, so a bad pair surfaces as a named boot error instead of a provider\n * 400 thrown deep inside a long agent pipeline (a deliberation can burn\n * minutes and real money before reaching its first call).\n *\n * The canonical trap this catches: `reasoningEffort: NONE` turns reasoning off\n * on GPT-5.6 and on most of Claude 5, but hard-errors on `claude-fable-5`,\n * whose thinking cannot be disabled — so the pair's validity depends on the\n * MODEL, not even on its family, and swapping a model without re-auditing its\n * reasoning params is exactly how it breaks.\n *\n * Validation fails OPEN for unknown/unverified model ids (custom + fine-tuned\n * deployments are legitimate) — see `validateReasoningEffortForModel`.\n */\n public registerAgent(agent: FlowsActors_Agent): void {\n // #2292: a content guardrail the engine cannot honour stops startup, rather than leaving an agent that looks guarded.\n // Checked per agent: it reads only the agent's own declaration, so registration order cannot matter.\n const guardrailIssues = agentContentGuardrailIssues({\n ref: agent.ref, isLanguageModelAgent: isLLMAgentConfiguration(agent.config), contentGuardrails: agent.contentGuardrails,\n });\n if (guardrailIssues.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION, context: { message: guardrailIssues.join(' ') } });\n }\n const previous = this.registry.agents[agent.ref];\n if (previous) {\n this.logDebug('Agent already registered, updating...', { ref: agent.ref });\n }\n\n /*\n * What gets REGISTERED may differ from what was AUTHORED (a resolved model id, below), and the\n * difference lives on a copy. The authored object is never written. Until 2026-09-09 this\n * method wrote `model` onto the caller's own config object; the dev companion's (since deleted)\n * startup-composition identity fence caught that as a mutated startup graph and crash-looped\n * every companion into `CRASH_RESPAWN_EXHAUSTED`. The fence was a survivor of the digest\n * demolition and went with it, but the registry was the side in the wrong regardless: a\n * resolver has no business changing its input, and the copy stays.\n */\n let registered: FlowsActors_Agent = agent;\n\n // Only the LLM arm of the config union reasons. Narrowed POSITIVELY: this\n // was `!isImageAgentConfiguration(...)`, which meant \"the LLM arm\" only\n // while the union had two members — the coding arm then fell straight into\n // it and the failure surfaced as a missing `reasoningEffort` property.\n if (isLLMAgentConfiguration(agent.config)) {\n /*\n * Resolve the APPLICABILITY axis into a concrete model id, here and only here (#439).\n *\n * An agent declares the KIND of work it does (`modelApplicability`) rather than naming a\n * model — the standing policy, which embeddings and document extraction already followed and\n * the agent path did not: `resolveModelForApplicability` had NO production caller anywhere,\n * and the field its own JSDoc named was declared by no configuration type.\n *\n * Registration is the chokepoint because it is where the config stops being authored and\n * starts being used: everything downstream reads `config.model` off the REGISTRY, so\n * resolving once here leaves all ~17 consumers untouched and keeps the invariant simple —\n * **a registered agent always carries a concrete model.** Resolving lazily at call time would\n * put a failure that belongs at startup inside a paid request.\n *\n * FAILS CLOSED, with the resolver's own named failure and the candidates it considered. An\n * applicability no model of this provider serves is a misconfiguration, and substituting some\n * other model would be the exact defect the axis exists to remove: the author asked for a\n * KIND, and quietly handing them a different kind is worse than refusing.\n */\n let llmConfig = agent.config;\n const declared = this.readDeclaredLLMModels(agent.ref, llmConfig.providerRef);\n const declaredModels = declared.models;\n if (llmConfig.modelApplicability !== undefined) {\n const resolution = resolveModelForApplicability({\n applicability: llmConfig.modelApplicability,\n providerRef: llmConfig.providerRef,\n ...(declaredModels === undefined ? {} : { declaredModels }),\n ...(this.modelApplicabilityPreference === undefined ? {} : { preferenceOverride: this.modelApplicabilityPreference }),\n });\n if (resolution.resolved === false) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Agent declares a model applicability no model of its provider can serve',\n agentRef: agent.ref,\n providerRef: llmConfig.providerRef,\n modelApplicability: llmConfig.modelApplicability,\n failure: resolution.failure,\n consideredModels: resolution.consideredModels,\n ...(declared.unreadable === undefined ? {} : { providerModelsUnreadable: declared.unreadable }),\n } });\n }\n // A COPY carrying the resolved id. The spread keeps the `isLLMAgentConfiguration` narrowing\n // for the reasoning validation immediately below — which must run on the RESOLVED model,\n // being model-dependent — so nothing here needs to write onto the authored object.\n llmConfig = { ...llmConfig, model: resolution.model };\n registered = { ...agent, config: llmConfig };\n }\n\n // The schema admits exactly one of `model` / `modelApplicability`, and an applicability was resolved to `model`\n // just above, so a registered agent names a concrete model. Both checks below are about a model id and answer\n // nothing for none (#3583): a configuration built outside the schema without one is judged by the provider's\n // client when it builds the model, exactly as before.\n const configuredModel = llmConfig.model;\n if (configuredModel !== undefined) {\n // #2294: a model id that names its own routing (a Bedrock `global.` or another geography's profile) would process\n // outside the region the application declared for the provider, and with it outside any data residency checked\n // against that region. Refused here, at startup; the provider's client refuses the same id again when it builds it.\n // Feature-detected: a partial registry (a unit harness) answers nothing here, and the client's own check still runs.\n const outsideDeclaredRegion = this.externalProvidersRegistry?.isReady() && typeof this.externalProvidersRegistry.describeModelOutsideDeclaredProcessingRegion === 'function'\n ? this.externalProvidersRegistry.describeModelOutsideDeclaredProcessingRegion(llmConfig.providerRef, configuredModel)\n : null;\n if (outsideDeclaredRegion !== null) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: `Agent \"${agent.ref}\": ${outsideDeclaredRegion}`, agentRef: agent.ref, providerRef: llmConfig.providerRef, model: llmConfig.model } });\n }\n\n // A registry provider's model is judged on its own declared thinking facts; the catalog knows nothing of it. A model\n // the provider does not declare (named concretely by the agent) has no facts and fails open, like an unprobed row.\n const declaredFacts = declaredModels?.find((declaration) => declaration.model === configuredModel);\n const reasoningViolation = declaredModels === undefined\n ? validateReasoningEffortForModel(configuredModel, llmConfig.reasoningEffort)\n : validateReasoningEffortForModel(configuredModel, llmConfig.reasoningEffort, declaredFacts ?? {});\n if (reasoningViolation) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined,\n { customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: { agentRef: agent.ref, model: llmConfig.model, reasoningEffort: llmConfig.reasoningEffort, error: reasoningViolation } });\n }\n }\n }\n\n this.registry.agents[registered.ref] = registered;\n\n // Create index entries for quick lookup\n this.registry.agentRegistryIndex.agents[registered.ref] = registered;\n\n /*\n * An UPDATE replaces the agent in the two list indexes too. They used to be append-only, so a\n * re-registration left the superseded agent beside the new one and `getAgentsByProvider` /\n * `getAgentsByOperation` answered both. Re-registration became a runtime path when the dev\n * companion started refreshing an expert's agent from its live charter (#2349); before that it\n * only happened at startup, when an override replaced a default.\n */\n if (previous) {\n const withoutPrevious = (agents: FlowsActors_Agent[] | undefined): FlowsActors_Agent[] | undefined =>\n agents?.filter((candidate) => candidate.ref !== registered.ref);\n const byProvider = this.registry.agentRegistryIndex.agentsByProvider;\n const byOperation = this.registry.agentRegistryIndex.agentsByOperation;\n const previousProvider = withoutPrevious(byProvider[previous.config.providerRef]);\n if (previousProvider) byProvider[previous.config.providerRef] = previousProvider;\n const previousOperation = withoutPrevious(byOperation[previous.config.operationKey]);\n if (previousOperation) byOperation[previous.config.operationKey] = previousOperation;\n }\n\n // Index by provider\n if (!this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef]) {\n this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef] = [];\n }\n this.registry.agentRegistryIndex.agentsByProvider[registered.config.providerRef].push(registered);\n\n // Index by operation\n if (!this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey]) {\n this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey] = [];\n }\n this.registry.agentRegistryIndex.agentsByOperation[registered.config.operationKey].push(registered);\n\n this.logDebug('Agent registered', {\n ref: registered.ref,\n displayName: registered.displayName,\n operationKey: registered.config.operationKey,\n providerRef: registered.config.providerRef\n });\n }\n\n /**\n * Register how an application's runs of one actor system continue once their question is answered (#2539). Called by\n * startup for every module's `flowsActors.actorExecutionContinuations`, after `initialize` registered the systems, and\n * for every registered FLOW with the continuation the engine provides (`FlowsBackendService.flowContinuationOf`, #676).\n *\n * Refused at startup — a CONFIGURATION error — for a system that is not a registered actor system or flow, for a second\n * continuation of the same system, and for a ROLE or ASSIGNEE route that names no eligible role: each would leave a\n * question in an inbox with nothing that can continue the run it belongs to, or nobody it is routed to.\n */\n public registerActorExecutionContinuation(continuation: ActorExecutionContinuation<any>): void {\n const refuse = (message: string): never => {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { systemRef: continuation.systemRef, message },\n });\n };\n if (!this.registry.actors[continuation.systemRef] && !this.registry.flows[continuation.systemRef]) {\n refuse(`An actor-run continuation names '${continuation.systemRef}', which is not a registered actor system or flow.`);\n }\n if (this.actorExecutionContinuations.has(continuation.systemRef)) {\n refuse(`Two actor-run continuations name '${continuation.systemRef}'. A system's waiting runs are continued by exactly one.`);\n }\n for (const route of continuation.decisionRoutes) {\n if (route.route !== HumanDecision_RouteKind.OWNER && !route.eligibleRole) {\n refuse(`An actor-run continuation of '${continuation.systemRef}' routes its questions to a ${route.route} with no eligible role.`);\n }\n }\n const deadlineIssues = actorQuestionDeadlineIssues(continuation);\n if (deadlineIssues.length > 0) {\n refuse(`The actor-run continuation of '${continuation.systemRef}' declares deadlines that cannot work:\\n - ${deadlineIssues.join('\\n - ')}`);\n }\n // #2923: a step-up declaration that cannot mean what it says never runs.\n const stepUpIssues = [\n ...humanDecisionStepUpDeclarationIssues(continuation, 'continuation'),\n ...humanDecisionAnswerChannelsIssues(continuation.answerChannels, humanDecisionStepUpRequirementOf(continuation) !== undefined, 'continuation'),\n ];\n if (stepUpIssues.length > 0) {\n refuse(`The actor-run continuation of '${continuation.systemRef}' declares a step-up that cannot work:\\n - ${stepUpIssues.join('\\n - ')}`);\n }\n this.actorExecutionContinuations.set(continuation.systemRef, continuation);\n }\n\n /** How waiting runs of this actor system continue, or `undefined` when the application declares nothing (#2539). */\n public getActorExecutionContinuation(systemRef: string): ActorExecutionContinuation<any> | undefined {\n return this.actorExecutionContinuations.get(systemRef);\n }\n\n /** Every declared actor-run continuation (#2539): what the decision inbox's placement is derived from. */\n public listActorExecutionContinuations(): readonly ActorExecutionContinuation<any>[] {\n return [...this.actorExecutionContinuations.values()];\n }\n\n /** The declared autonomous agent with this ref, or `undefined` (#1611). */\n public getAutonomousAgent(ref: string): Readonly<FlowsActors_AutonomousAgentDeclaration> | undefined {\n return this.autonomousAgents.get(ref);\n }\n\n /** Every declared autonomous agent (#1611). */\n public getAutonomousAgents(): readonly Readonly<FlowsActors_AutonomousAgentDeclaration>[] {\n return [...this.autonomousAgents.values()];\n }\n\n /** The declared chat agent with this ref, or `undefined` (#2665). */\n public getChatAgent(ref: string): Readonly<FlowsActors_ChatAgentDeclaration> | undefined {\n return this.chatAgents.get(ref);\n }\n\n /** Every declared chat agent, in declaration order (#2665). */\n public getChatAgents(): readonly Readonly<FlowsActors_ChatAgentDeclaration>[] {\n return [...this.chatAgents.values()];\n }\n\n /** The chat agent declared `isDefault`, which answers where an organization chose none, or `undefined` (#2665). */\n public getDefaultChatAgent(): Readonly<FlowsActors_ChatAgentDeclaration> | undefined {\n return [...this.chatAgents.values()].find((declaration) => declaration.isDefault === true);\n }\n\n /**\n * The context limits a registry provider DECLARES for one of its models (#2750), or `undefined`: for an engine provider\n * (its models are catalog rows, which `modelInputTokenCeiling` reads itself), for a model it declares without limits,\n * and when its declarations cannot be read. Never throws: it is asked on every conversation turn, and a declaration\n * that could not be used already stopped the agent's registration, so a turn takes the framework floor rather than fail.\n */\n public declaredModelContextLimits(agentRef: string, providerRef: string, model: string): LLM_ModelContextLimits | undefined {\n try {\n return this.readDeclaredLLMModels(agentRef, providerRef).models?.find((declaration) => declaration.model === model)?.contextLimits;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Get an agent by reference\n */\n public getAgent(ref: string): FlowsActors_Agent | undefined {\n return this.registry.agents[ref];\n }\n\n /**\n * Get an agent or throw error\n */\n public getAgentOrThrow(ref: string): FlowsActors_Agent {\n const agent = this.getAgent(ref);\n\n if (!agent) {\n throw this.errorBuilder.buildError( ErrorType.NOT_FOUND, undefined,\n {customMessageReference: ErrorCustomMessageReference.NOT_FOUND,context: { agentRef: ref } });\n }\n return agent;\n }\n\n /**\n * Get agents by provider\n */\n public getAgentsByProvider(providerRef: string): FlowsActors_Agent[] {\n return this.registry.agentRegistryIndex.agentsByProvider[providerRef] || [];\n }\n\n /**\n * Get agents by operation key\n */\n public getAgentsByOperation(operationKey: string): FlowsActors_Agent[] {\n return this.registry.agentRegistryIndex.agentsByOperation[operationKey] || [];\n }\n\n /**\n * Check if an agent exists\n */\n public hasAgent(ref: string): boolean {\n return !!this.registry.agents[ref];\n }\n\n // ================================\n // Function Tools\n // ================================\n\n /**\n * Register an executable function tool, indexed by its `functionRef`. Agents\n * reference it via `capabilities.tools.functionRefs`; `AgentsBackendService`\n * resolves it into an AI-SDK tool at invocation time.\n */\n public registerFunctionTool(declared: FunctionTool): void {\n // A gate nobody can answer is refused here, at startup, rather than stranding the first turn that reaches it (#1594).\n resolveFunctionToolApprovalGate(declared);\n // #2292: `returnsThePersonsOwnWords` exempts a tool's result from prompt-injection screening, so only a tool whose\n // result IS the person's answer may claim it — a question tool. Any other tool claiming it would switch off a\n // security control for content somebody else wrote.\n if (declared.returnsThePersonsOwnWords && declared.asksThePerson !== true) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: `Function tool '${declared.functionRef}' declares returnsThePersonsOwnWords but does not ask the person (asksThePerson). `\n + 'Only a question tool returns the person\\'s own words; any other tool\\'s result is screened when its agent declares contentGuardrails.promptInjection.',\n },\n });\n }\n const functionTool = this.boundToResources(declared);\n // #2904: a file deliverable is bound by the approval of the call, through an argument the model is offered: checked on\n // the schema the tool registers with, so a declaration nothing could bind stops the application here.\n // #2293: a signature requirement on a deliverable nothing binds could never be sent.\n // #2914: what an approval of a record covers, and whether it replaces an earlier one, are about the row the call names.\n const deliverableProblems = [\n ...functionToolDeliverableDeclarationProblems(functionTool),\n ...functionToolElectronicSignatureDeclarationProblems(functionTool),\n ...functionToolRecordApprovalDeclarationProblems(functionTool, (resourceType) => this.declaredResourceFieldsOf(resourceType)),\n ];\n if (deliverableProblems.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: deliverableProblems.join(' ') },\n });\n }\n this.registry.functionTools[functionTool.functionRef] = functionTool;\n this.logDebug('Registered function tool', { functionRef: functionTool.functionRef });\n }\n\n /**\n * A tool whose arguments are a resource's declaration, with them bound (`FunctionTool.bindToResources`): resolved here,\n * once, so the model, an approval card and an approval's validation all read the same schema. Unchanged when the tool\n * binds nothing.\n *\n * When a tool asks to be bound and the resources are not registered yet, it keeps its authored arguments and a WARNING\n * says so: those arguments are a strict subset (the read tool loses `filters`, and a model sending them has them\n * stripped without error), which is the failure the binding exists to remove. Both hosts register resources before\n * flows-actors (`start-application`, `start-companion-application`), so the warning means a host started them out of\n * order.\n */\n private boundToResources(functionTool: FunctionTool): FunctionTool {\n if (!functionTool.bindToResources) return functionTool;\n const resources = this.resourcesRegistry;\n if (!resources?.isReady()) {\n this.logger.warn('A function tool that takes its arguments from the resources was registered before them: it keeps its authored arguments only', {\n functionRef: functionTool.functionRef,\n resourcesRegistry: resources ? 'not initialized' : 'not bound',\n });\n return functionTool;\n }\n const bound = functionTool.bindToResources({\n // The same rule a tool's dispatch resolves its operation by (`resolveDispatchableOperation`): the URL-bearing default.\n dispatchableOperationOf: (resourceType, operationIdentifier) => (resources.hasOperationPathDefault(resourceType, operationIdentifier)\n ? resources.getOperationFromPath(resources.getOperationPathDefault(resourceType, operationIdentifier))\n : undefined),\n // The field the repository fills from the request's context for this resource's primary scope.\n primaryScopeFieldOf: (resourceType) => {\n const scope = resources.tryGetResourceConfiguration(resourceType)?.resourcePrimaryScope;\n return scope ? PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[scope] : undefined;\n },\n });\n return bound ? { ...functionTool, ...bound } : functionTool;\n }\n\n /**\n * The fields a registered resource's main schema declares (#2914), or undefined when the resources are not ready or do\n * not know it: a tool's sealed record fields are then not checked against them.\n */\n private declaredResourceFieldsOf(resourceType: string): readonly string[] | undefined {\n const resources = this.resourcesRegistry;\n if (!resources?.isReady()) return undefined;\n const schema = resources.tryGetResourceConfiguration(resourceType as never)?.mainSchema as { shape?: Record<string, unknown> } | undefined;\n return schema?.shape ? Object.keys(schema.shape) : undefined;\n }\n\n /** Get a function tool by ref. */\n public getFunctionTool(ref: string): FunctionTool | undefined {\n return this.registry.functionTools[ref];\n }\n\n /** Get a function tool or throw NOT_FOUND. */\n public getFunctionToolOrThrow(ref: string): FunctionTool {\n const functionTool = this.getFunctionTool(ref);\n if (!functionTool) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined,\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { functionRef: ref } });\n }\n return functionTool;\n }\n\n /** Every registered function tool — what a derivation over the application's declarations reads (#2527). */\n public listFunctionTools(): readonly FunctionTool[] {\n return Object.values(this.registry.functionTools);\n }\n\n /** Check if a function tool exists. */\n public hasFunctionTool(ref: string): boolean {\n return !!this.registry.functionTools[ref];\n }\n\n // ================================\n // MCP Server Registration & Retrieval\n // ================================\n\n /**\n * Register an MCP server the application permits its agents to reach, indexed by the ref an\n * agent's `capabilities.tools.mcpRefs` names (#491).\n *\n * REFUSES a plaintext endpoint. An MCP call carries a delegated credential to a third party, so\n * `http://` would put a bearer token on the wire in clear — and unlike the webhook lane, where a\n * plaintext endpoint is the operator's own declared destination and is reported rather than\n * blocked, nothing here is the application's to expose on someone else's behalf.\n */\n public registerMcpServer(mcpServer: FlowsActors_McpServer): void {\n if (mcpServerTransportIsPlaintext(mcpServer.url)) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: {\n mcpServerRef: mcpServer.ref,\n destinationHost: mcpServerDestinationHost(mcpServer.url),\n reason: 'mcp_server_endpoint_is_plaintext',\n },\n });\n }\n this.registry.mcpServers[mcpServer.ref] = mcpServer;\n this.logDebug('Registered MCP server', {\n ref: mcpServer.ref,\n transport: mcpServer.transport,\n destinationHost: mcpServerDestinationHost(mcpServer.url),\n });\n }\n\n /** Get a declared MCP server by ref. */\n public getMcpServer(ref: string): FlowsActors_McpServer | undefined {\n return this.registry.mcpServers[ref];\n }\n\n /** Check if an MCP server is declared. */\n public hasMcpServer(ref: string): boolean {\n return !!this.registry.mcpServers[ref];\n }\n\n /**\n * Refuse an agent whose `mcpRefs` name a server the application never declared.\n *\n * FAIL-CLOSED, and deliberately stricter than `functionRefs`, which skip an unknown ref with a\n * debug line. The asymmetry has a measured reason: an unknown `functionRef` costs an agent one\n * tool, while `mcpRefs` were RENDERED to a person as a capability, and every ref that ever\n * existed — `filesystem-mcp`, `git-mcp`, `browser-mcp`, `mongodb-mcp` — named no server anywhere,\n * because the field could be authored against nothing (#491). A refusal is what makes that state\n * unreachable rather than merely fixed once.\n *\n * The engine's own law, measured at `start-application.backend.service.ts`: a declaration gets\n * made if and only if the framework refuses to start without it.\n */\n private assertDeclaredMcpRefs(): void {\n const undeclared: { agentRef: string; mcpRef: string }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n for (const mcpRef of agent.capabilities?.tools?.mcpRefs ?? []) {\n if (!this.hasMcpServer(mcpRef)) undeclared.push({ agentRef: agent.ref, mcpRef });\n }\n }\n if (undeclared.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n context: {\n reason: 'agent_mcp_ref_names_no_declared_server',\n undeclared,\n declaredMcpServerRefs: Object.keys(this.registry.mcpServers),\n },\n });\n }\n\n /**\n * #2292: an agent that declares `contentGuardrails.personalData` may be offered only tools that say what their result\n * carries (`FunctionTool.personalDataOutput`). A result that does not say could carry anything, so the guard could not\n * treat it, and the agent would look guarded while a tool sends records in clear. Refused at startup, naming each pair;\n * the engine's own tools declare it.\n */\n private assertGuardedAgentToolsDeclareTheirResults(): void {\n const undeclared: { agentRef: string; functionRef: string }[] = [];\n const undeclaredForTenants: { agentRef: string; functionRef: string }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n if (!isLLMAgentConfiguration(agent.config)) continue;\n for (const functionRef of agent.capabilities?.tools?.functionRefs ?? []) {\n const functionTool = this.registry.functionTools[functionRef];\n if (!functionTool || functionTool.personalDataOutput) continue;\n (agent.contentGuardrails?.personalData ? undeclared : undeclaredForTenants).push({ agentRef: agent.ref, functionRef });\n }\n }\n // #2292 R8: any language-model agent can be put under a treatment by an organization's policy. A tool that does not say\n // what its result carries then reaches the model only withheld whole: the agent works, but blind to that tool's result.\n // Reported, not refused: the application did not ask for the treatment, an organization did.\n if (undeclaredForTenants.length > 0) {\n this.logger.warn('Tools offered to a language-model agent do not declare what their result carries (personalDataOutput). If an organization switches personal-data treatment on for these agents, their model receives these results withheld whole.', {\n tools: undeclaredForTenants.map((pair) => `${pair.agentRef} → ${pair.functionRef}`),\n });\n }\n if (undeclared.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n reason: 'guarded_agent_offered_tool_without_personal_data_output',\n message: `An agent whose personal data is guarded is offered a tool that does not declare what its result carries: ${\n undeclared.map((pair) => `${pair.agentRef} → ${pair.functionRef}`).join(', ')\n }. Declare personalDataOutput on each tool.`,\n undeclared,\n },\n });\n }\n\n /**\n * #3325: a tool offered to a language-model agent may not declare a credential among its arguments. Its schema is what the\n * model is asked to fill, and a call's arguments are kept on the paused row, in the tool trace and in the agent-work record,\n * so a secret has nowhere safe to travel through a call. Refused at startup, like a chat command's credential field\n * (`notFilledFromChatBecause`), because the remedy is a change of design: take the secret through the application's own\n * secret handling or a connected account, and let the tool read it.\n *\n * spec-cite: MCP 2025-11-25, client/elicitation, the sensitive-information warning, for the same line drawn at the same\n * kind of channel: \"Servers **MUST NOT** use form mode elicitation to request sensitive information\".\n *\n * This reads the tool's own schema: a field only its `argumentsResource` declares is met at run time, where the trace and any\n * pause withhold it, and a gated call is denied.\n *\n * Rejected: allowing it for a tool that \"legitimately\" takes a key the model read. No such tool exists here, and a guarded\n * agent is never shown a credential, so that tool would only work by holding the secret in the model's context.\n *\n * assurance-control: WILDO.SECURITY.FAIL_CLOSED — a tool cannot ask a model for a credential.\n */\n private assertAgentToolsAskForNoCredential(): void {\n const offending: { agentRef: string; functionRef: string; fields: string[] }[] = [];\n for (const agent of Object.values(this.registry.agents)) {\n if (!isLLMAgentConfiguration(agent.config)) continue;\n for (const functionRef of agent.capabilities?.tools?.functionRefs ?? []) {\n const functionTool = this.registry.functionTools[functionRef];\n const fields = functionTool ? declaredCredentialFieldsOf(functionTool.inputSchema) : [];\n if (fields.length > 0) offending.push({ agentRef: agent.ref, functionRef, fields });\n }\n }\n if (offending.length === 0) return;\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n reason: 'agent_offered_tool_taking_a_credential',\n message: `A tool offered to a language-model agent declares a credential among its arguments, which the model would have to write and a call would keep: ${\n offending.map((pair) => `${pair.agentRef} → ${pair.functionRef} (${pair.fields.join(', ')})`).join(', ')\n }. Take the secret through the application's own secret handling or a connected account, and let the tool read it.`,\n offending,\n },\n });\n }\n\n // ================================\n // Registry Access\n // ================================\n\n /**\n * Get the complete registry\n */\n public getRegistry(): FlowsActorsRegistry {\n return this.registry;\n }\n\n /**\n * Get the agent registry index\n */\n public getAgentRegistryIndex(): AgentRegistryIndex {\n return this.registry.agentRegistryIndex;\n }\n\n // ================================\n // Debug Methods\n // ================================\n\n public getDebugInfo(): {\n isInitialized: boolean;\n totalSystems: number;\n flowsCount: number;\n actorsCount: number;\n agentsCount: number;\n systemRefs: string[];\n agentRefs: string[];\n } {\n return {\n isInitialized: this.isInitialized,\n totalSystems: Object.keys(this.registry.flows).length + Object.keys(this.registry.actors).length,\n flowsCount: Object.keys(this.registry.flows).length,\n actorsCount: Object.keys(this.registry.actors).length,\n agentsCount: Object.keys(this.registry.agents).length,\n systemRefs: Object.keys(this.registry.flows).concat(Object.keys(this.registry.actors)),\n agentRefs: Object.keys(this.registry.agents),\n };\n }\n\n public displayRegistryInfo(): void {\n this.logDebug('\\n=== 🤖 FLOWS-ACTORS REGISTRY SUMMARY ===\\n');\n\n const info = this.getDebugInfo();\n\n this.logDebug(`📊 STATISTICS:`);\n this.logDebug(` Total Systems: ${info.totalSystems}`);\n this.logDebug(` Flows: ${info.flowsCount}`);\n this.logDebug(` Actors: ${info.actorsCount}`);\n this.logDebug(` Agents: ${info.agentsCount}`);\n this.logDebug(` Initialized: ${info.isInitialized}`);\n\n if (info.systemRefs.length > 0) {\n this.logDebug('\\n🔄 REGISTERED SYSTEMS:');\n info.systemRefs.forEach(ref => {\n const system = this.registry.flows[ref];\n this.logDebug(` - ${ref} (${system.kind}): ${system.displayName}`);\n });\n }\n\n if (info.agentRefs.length > 0) {\n this.logDebug('\\n🤖 REGISTERED AGENTS:');\n info.agentRefs.forEach(ref => {\n const agent = this.registry.agentRegistryIndex.agents[ref];\n this.logDebug(` - ${ref}: ${agent.displayName} [${agent.config.providerRef}/${agent.config.operationKey}]`);\n });\n }\n\n this.logDebug('=================================\\n');\n }\n}\n\n/**\n * Everything wrong with an actor system's question deadlines (#1863), checked when its continuation registers. The\n * shared checks run for each route the system declares (the calendar half needs the application configuration, so the\n * startup validator asks that one), and this plane adds two: the rules may only NOTIFY, and no pause state is offered.\n * A REASSIGN target is a function and a question's clocks outlive the process that raised it; no door on this plane\n * pauses a clock.\n */\nexport function actorQuestionDeadlineIssues(continuation: Pick<ActorExecutionContinuation<unknown>, 'deadlines' | 'decisionRoutes'>): string[] {\n const deadlines = continuation.deadlines;\n if (!deadlines) return [];\n const issues = new Set<string>();\n const routeKinds = continuation.decisionRoutes.length > 0\n ? continuation.decisionRoutes.map((route) => route.route)\n : [HumanDecision_RouteKind.OWNER];\n for (const routeKind of routeKinds) {\n for (const issue of reviewDeadlinesDeclarationIssues(deadlines, { routeKind, calendarDeclared: true })) issues.add(issue);\n }\n for (const rule of deadlines.rules ?? []) {\n if (rule.action !== ReviewEscalationActionKind.NOTIFY) {\n issues.add(`deadlines.rules ${rule.action}s at ${rule.stage}, but an actor question's rules may only NOTIFY.`);\n }\n }\n if ((deadlines.pauseStates ?? []).length > 0) {\n issues.add('deadlines.pauseStates is declared, but no door on the actor plane pauses a question\\'s clock.');\n }\n return [...issues];\n}\n"]}
@@ -179,6 +179,21 @@ export interface ACPStartSessionOptions {
179
179
  maxRecordedEventBytes?: number;
180
180
  /** Live progress sink. Never allowed to fail the run. */
181
181
  onEvent?: (event: ACPSessionEvent) => void;
182
+ /**
183
+ * Let the agent ASK a question through the protocol (#3710): advertise form elicitation at `initialize` and treat
184
+ * an `elicitation/create` the agent sends during a turn as that turn's question.
185
+ *
186
+ * The agent's question tool (Claude's `AskUserQuestion`) reaches a client only as a form elicitation, and an agent
187
+ * enables the tool only for a client that advertises the capability, so without this the agent cannot ask at all:
188
+ * whatever it writes in prose is narration, and nothing tells a question in it from a progress note but a guess.
189
+ * With it, the question is a protocol message: the runner records it ({@link ACPTurnResult.explicitQuestion}),
190
+ * answers the request `cancel` (the person is not here to fill the form during the turn), and cancels the turn, so
191
+ * the caller can park the session and answer with the next `promptTurn`.
192
+ *
193
+ * Off by default: only a caller that can hold a parked session may let an agent ask. A request from an agent that
194
+ * was not offered the capability is declined.
195
+ */
196
+ acceptsExplicitQuestions?: boolean;
182
197
  /**
183
198
  * Resume a prior session by id instead of opening a new one.
184
199
  *
@@ -233,6 +248,13 @@ export interface ACPTurnResult {
233
248
  readonly deniedPermissionCount: number;
234
249
  /** Permission decisions and callback policy refusals recorded during this turn. */
235
250
  readonly permissionDecisions: readonly ACPPermissionDecisionRecord[];
251
+ /**
252
+ * The question the agent ASKED during this turn through the protocol (`elicitation/create`, form mode), rendered as
253
+ * text: present only when the session was opened with {@link ACPStartSessionOptions.acceptsExplicitQuestions}. The
254
+ * turn was cancelled to put it, so its stop reason is `cancelled`; this field is what tells that from an operator's
255
+ * cancel. Absent: the agent asked nothing, whatever its final message says (#3710).
256
+ */
257
+ readonly explicitQuestion?: string;
236
258
  }
237
259
  /** What the agent declared about itself and the session at `initialize`/setup time. */
238
260
  export interface ACPAgentSession {
@@ -380,6 +402,17 @@ export declare function startACPAgentSession(options: ACPStartSessionOptions): P
380
402
  * `promptTurn` + `close`, so its behaviour tracks the handle by construction.
381
403
  */
382
404
  export declare function runACPCodingSession(options: ACPCodingSessionOptions): Promise<ACPCodingSessionResult>;
405
+ /**
406
+ * The text of a form elicitation (#3710): its `message`, then one line per field the form asks, with the choices it
407
+ * offers. What a person reads in place of the form, and what an answer is written against.
408
+ *
409
+ * Generic over ACP's `ElicitationSchema` (primitive properties; a single choice as `enum` or titled `oneOf`, a multiple
410
+ * choice as an array whose `items` carry `enum` or titled `anyOf`), never over one agent's form.
411
+ *
412
+ * spec-cite: ACP schema (`@agentclientprotocol/sdk` 1.5.0) — `CreateElicitationRequest` (`message`, `mode: "form"`,
413
+ * `requestedSchema: ElicitationSchema`) and `CreateElicitationResponse` (`accept` / `decline` / `cancel`).
414
+ */
415
+ export declare function renderElicitationQuestion(params: Record<string, unknown>): string;
383
416
  /** Re-exported so callers reason about ceilings through one ordering definition. */
384
417
  export { agentClientProtocolPermissionCeilingRank };
385
418
  //# sourceMappingURL=acp-session-runner.backend.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"acp-session-runner.backend.utils.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/utils/acp-session-runner.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;A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G;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAcrE;AA2BD;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC,CAymBpG;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CA0B3G;AAED,oFAAoF;AACpF,OAAO,EAAE,wCAAwC,EAAE,CAAC"}
1
+ {"version":3,"file":"acp-session-runner.backend.utils.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/utils/acp-session-runner.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAOH,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,wCAAwC,EAGxC,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAC;AAU9C,qBAAa,qBAAsB,SAAQ,KAAK;aAG5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBADhD,OAAO,EAAE,MAAM,EACC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAKnD;AAED,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iFAAiF;IACjF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,wFAAwF;AACxF,oBAA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