@wildo-ai/wildo-cli 1.1.13 → 1.1.15

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 (589) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  27. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  28. package/dist/src/commands/generate/email-command.utils.js +5 -0
  29. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  30. package/dist/src/commands/init.command.d.ts +14 -0
  31. package/dist/src/commands/init.command.d.ts.map +1 -1
  32. package/dist/src/commands/init.command.js +36 -5
  33. package/dist/src/commands/init.command.js.map +1 -1
  34. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  35. package/dist/src/commands/local/deregister.command.js +4 -0
  36. package/dist/src/commands/local/deregister.command.js.map +1 -1
  37. package/dist/src/commands/local/dev.command.d.ts +6 -0
  38. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  39. package/dist/src/commands/local/dev.command.js +72 -0
  40. package/dist/src/commands/local/dev.command.js.map +1 -1
  41. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  42. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  43. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  44. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  45. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  46. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  47. package/dist/src/commands/local/jobs-run.command.js +92 -0
  48. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  49. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  50. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  51. package/dist/src/commands/local/jobs.command.js +59 -0
  52. package/dist/src/commands/local/jobs.command.js.map +1 -0
  53. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  54. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  55. package/dist/src/commands/local/tunnel.command.js +274 -0
  56. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  57. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  58. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  59. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  60. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  61. package/dist/src/commands/registry/update.command.js +1 -0
  62. package/dist/src/commands/registry/update.command.js.map +1 -1
  63. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  64. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  65. package/dist/src/commands/seal/verify.command.js +62 -1
  66. package/dist/src/commands/seal/verify.command.js.map +1 -1
  67. package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
  68. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  69. package/dist/src/services/application/app-bootstrap.service.js +49 -3
  70. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  71. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  72. package/dist/src/services/application/app-runtime-targets.service.js +9 -1
  73. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  74. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  75. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  76. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  77. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  78. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  79. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  80. package/dist/src/services/application/local-tunnel.service.js +294 -0
  81. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  82. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  83. package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
  84. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  85. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  86. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.js +26 -2
  88. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  89. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  90. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  92. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  93. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  94. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  95. package/dist/src/services/companion/build-console.service.js +54 -4
  96. package/dist/src/services/companion/build-console.service.js.map +1 -1
  97. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  98. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  99. package/dist/src/services/companion/creation-console.service.js +14 -2
  100. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  102. package/dist/src/services/companion/creation-drive.service.js +5 -2
  103. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  104. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  105. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  107. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  108. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  109. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  110. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  111. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  112. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  113. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  114. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  115. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  116. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  117. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  118. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  119. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  120. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  121. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  122. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  123. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  124. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  125. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  126. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  127. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  128. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
  129. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  130. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
  131. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  132. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  133. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  134. package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
  135. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  136. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  137. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  138. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  139. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  140. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
  142. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  143. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  144. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  145. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  146. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  147. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  148. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  149. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  150. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  151. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  152. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  153. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  154. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  155. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  156. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
  157. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  158. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
  159. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  160. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  161. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  162. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  163. package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
  164. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  165. package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
  166. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  167. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  168. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  169. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  170. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  171. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  172. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  173. package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
  174. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  175. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  176. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  177. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  178. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  179. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  180. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  181. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  182. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  183. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  184. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  185. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  186. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  187. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  188. package/dist/src/services/environment/environment-setup.service.js +17 -6
  189. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  190. package/dist/src/services/environment/environment.service.d.ts +4 -3
  191. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  192. package/dist/src/services/environment/environment.service.js +0 -1
  193. package/dist/src/services/environment/environment.service.js.map +1 -1
  194. package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
  195. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  196. package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
  197. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  198. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  199. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  200. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  201. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  202. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  203. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  204. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  205. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  206. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  207. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  208. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  209. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  210. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  211. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  212. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  213. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  214. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  215. package/dist/src/services/registry/module-install.service.js +1 -0
  216. package/dist/src/services/registry/module-install.service.js.map +1 -1
  217. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  218. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  219. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  220. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  221. package/dist/src/services/security/csp-sync.service.js +21 -2
  222. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/framework-root-package.json +3 -3
  225. package/package.json +23 -23
  226. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  227. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
  228. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  229. package/templates/infra/registry-host/docker-compose.yml +9 -2
  230. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  231. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  232. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  233. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  234. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  235. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  236. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  237. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  238. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  239. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  240. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  241. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  242. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  243. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  244. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  245. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  246. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  247. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  248. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  249. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  250. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  251. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  252. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  253. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  254. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  255. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  256. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  257. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  258. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  259. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  260. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  261. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  262. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  263. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  264. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  265. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  266. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  267. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  268. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  269. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  270. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  271. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  272. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  273. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  274. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  275. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  276. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  277. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  278. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  279. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  280. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  282. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  283. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  284. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  285. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  286. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  287. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  288. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  289. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  290. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  291. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  292. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  293. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  294. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  295. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  296. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  297. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  298. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  299. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  300. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  301. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  302. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  303. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  304. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  305. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  306. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  307. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  308. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  309. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  310. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  311. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  312. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  313. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  314. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  315. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  316. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  317. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  318. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  319. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  320. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  321. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  322. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  323. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  324. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  325. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  326. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  327. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  328. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  329. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  330. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  331. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  332. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  333. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  334. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  335. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  336. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  337. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  338. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  339. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  340. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  341. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  342. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  343. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  344. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  345. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  346. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  347. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  348. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  349. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  350. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  351. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  352. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  353. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  354. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  355. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  356. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  357. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  358. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  359. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  360. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  361. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  362. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  363. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  364. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  365. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  366. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  367. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  368. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  369. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  370. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  371. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  372. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  373. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  374. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  375. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  376. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  377. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  378. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  379. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  380. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  381. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  382. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  383. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  384. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  385. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  386. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  387. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  388. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  390. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  391. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  392. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  393. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  394. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  395. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  396. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  397. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  398. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  399. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  400. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  401. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  402. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  403. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  404. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  405. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  406. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  407. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  408. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  409. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  410. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  411. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  412. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  413. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  414. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  415. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  416. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  417. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  418. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  419. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  420. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  421. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  422. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  423. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  424. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  425. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  426. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  427. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  428. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  429. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  430. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  431. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  432. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  433. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  434. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  435. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  436. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  437. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  438. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  439. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  440. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  441. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  442. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  443. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  444. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  445. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  446. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  447. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  448. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  449. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  450. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  451. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  452. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  453. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  454. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  455. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  456. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  457. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  458. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  459. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  460. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  461. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  462. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  463. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  464. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  465. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  466. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  467. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  468. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  469. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  470. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  471. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  472. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  473. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  474. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  475. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  476. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  477. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  478. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  479. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  480. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  481. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  482. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  483. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  484. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  485. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  486. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  487. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  488. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  489. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  490. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  491. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  492. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  493. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  494. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  495. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  496. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  497. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  498. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  499. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  500. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  501. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  502. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  503. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  504. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  505. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  506. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  507. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  508. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  509. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  510. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  511. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  512. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  513. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  514. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  515. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  516. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  517. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  518. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  519. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  520. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  521. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  522. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  523. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  524. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  525. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  526. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  527. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  528. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  529. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  530. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  531. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  532. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  533. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  534. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  535. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  536. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  537. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  538. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  539. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  540. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  541. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  542. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  543. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  544. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  545. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  546. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  547. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  548. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  549. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  550. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  551. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  552. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  553. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  554. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  555. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  556. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  557. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  558. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  559. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  560. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  561. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  562. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  563. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  564. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  565. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  566. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  567. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  568. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  569. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  570. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  571. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  572. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  573. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  574. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  575. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  576. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  577. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  578. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  579. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  580. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  581. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  582. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  583. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  584. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  585. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  586. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  587. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  588. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  589. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EACL,6BAA6B,GAG9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AACrG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CAAC,QAA2E,EAAE,OAAiB;QACpG,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE;YAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IACD,yFAAyF;IACzF,+FAA+F;IAC/F,4EAA4E;IAC5E,IAAI,KAA8C,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,KAAgD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACvF,OAAO,KAAiD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC,MAAM,CAAC,QAAQ,CAAC,KAA8D,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3H","sourcesContent":["/**\n * The COMPOSED provider catalogue — the one place the CLI's secrets layer asks\n * \"which providers exist, and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport { engineBackendProviderContributions } from '@wildo-ai/external-connectors-private/companion';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * An engine module says so on its contract, and a contribution carries both marks in its values-free\n * shape since #2579 (`describeProviderSecretsContractShape`), so sync and the backend's screen read a\n * package slot the same way.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint: from a loadable module's `otlpAuth`, or from a contribution's, which carries the\n * same values-free declaration since #2579. Absent for a provider whose endpoint needs no auth.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * A contribution that names a ref the ENGINE tier already owns and does not come from the engine (#3243).\n *\n * The contribution is ignored either way (the engine tier is the floor). What this records is the case worth telling\n * someone about: a package or an application module that claims an engine provider's ref, so whatever it declares\n * (secret slots, capabilities) is silently not what the CLI uses.\n */\nexport interface ContributionShadowingEngineProvider {\n /** The engine provider's ref the contribution claims. */\n readonly providerRef: string;\n /** The package the contribution says it comes from, when its identity names one. */\n readonly declaredPackageName?: string;\n /** The package root discovery read it from, when the caller was discovery (it carries the owner). */\n readonly ownerPackageRoot?: string;\n}\n\n/** The ignored, NON-engine contributions this process registered, by ref. Read by `wildo local doctor` and the dev preflight. */\nconst contributionsShadowingEngineProviders = new Map<string, ContributionShadowingEngineProvider>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately: the engine tier is the floor, and a package silently\n * shadowing an engine provider's secret contract is exactly the substitution this layer must not perform.\n *\n * ## Ignored, and said only when someone shadows (#3243)\n *\n * This used to print one `[provider-catalogue] … is ignored` line per collision on stderr, in EVERY process. Every\n * application collides on every engine provider, because discovery admits the engine's own provider barrel\n * (`@wildo-ai/external-connectors-private/companion`, #358) and every frontend re-exports the engine's frontend\n * contributions: so each `wildo` verb in app-creation-test-007 began with 19 such lines, for anthropic … twilio,\n * none of which anybody had overridden. Agents had to `grep -v` every call.\n *\n * A collision is silent only when the contribution IS the engine's own, judged by COMPARISON\n * ({@link isEngineOwnContribution}), never by what the contribution says about itself: an override built by spreading\n * the engine's contribution and changing its secrets contract still declares origin ENGINE and tier MAIN, and is\n * exactly the case worth reporting. Every other collision is recorded, never printed here: `wildo local doctor` and\n * the `wildo local dev` preflight report it once (`checkProviderContributionsShadowingEngine`), naming the provider\n * and where the contribution came from. Printing it here put it on every verb, which is how the real case became\n * noise nobody read.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n if (!isEngineOwnContribution(contribution)) {\n const ownerPackageRoot = (contribution as Partial<DiscoveredProviderCompanionContribution>).owner?.packageRoot;\n contributionsShadowingEngineProviders.set(contribution.ref, {\n providerRef: contribution.ref,\n ...(contribution.identity?.packageName === undefined ? {} : { declaredPackageName: contribution.identity.packageName }),\n ...(ownerPackageRoot === undefined ? {} : { ownerPackageRoot }),\n });\n }\n continue;\n }\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/**\n * Fields discovery itself writes onto a contribution, so they cannot tell the engine's record from an override: the\n * runtime targets an application's own `providers.scopes` imply (`resolveScopeImpliedRuntimeTargets` replaces the\n * engine barrel's defaults), and the owner discovery read it from.\n */\nconst DISCOVERY_OWNED_CONTRIBUTION_FIELDS: ReadonlySet<string> = new Set(['runtimeTargets', 'owner']);\n\n/** A value as canonical JSON: object keys sorted, so two equal records compare equal whatever order built them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, item: unknown) => (\n item !== null && typeof item === 'object' && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right)))\n : item\n ));\n}\n\n/** The engine backend barrel's own contributions, by ref: the records discovery reads off `./companion`. */\nlet engineOwnBackendContributionsByRef: ReadonlyMap<string, string> | undefined;\n\nfunction canonicalContractOf(contribution: ProviderCompanionContribution): string {\n return canonicalJson(Object.fromEntries(Object.entries(contribution).filter(([field]) => !DISCOVERY_OWNED_CONTRIBUTION_FIELDS.has(field))));\n}\n\n/**\n * Whether a contribution colliding with an engine provider's ref is the engine's OWN record, so ignoring it loses\n * nothing (#3243). Decided by comparison, never by the contribution's declared origin, which an override keeps.\n *\n * - **A backend facet** (any runtime target outside a frontend service) must equal the engine barrel's contribution\n * for that ref (`engineBackendProviderContributions`) on every field it carries (identity, capabilities, protocols,\n * the secrets-contract shape and its protocol slots, the compliance profile), the fields discovery writes excepted.\n * - **A frontend facet** (every target a frontend service): the engine's frontend contributions declare no secret slot\n * and no OTLP auth (a browser-safe provider owns no server secret), and those are the only fields this catalogue\n * would take from it. So it is the engine's own when it declares neither; one that does declares a secrets contract\n * the catalogue ignores, which is a shadow. Its browser fields are the frontend runtime's to compose, not this\n * layer's, and the CLI does not load the frontend provider registries.\n */\nexport function isEngineOwnContribution(contribution: ProviderCompanionContribution): boolean {\n const targets = contribution.runtimeTargets ?? [];\n if (targets.length > 0 && targets.every((target) => target.kind === 'frontendService')) {\n return (contribution.secretsContractShape ?? []).length === 0 && contribution.otlpAuth === undefined;\n }\n engineOwnBackendContributionsByRef ??= new Map(engineBackendProviderContributions.map((own) => [own.ref, canonicalContractOf(own)]));\n return engineOwnBackendContributionsByRef.get(contribution.ref) === canonicalContractOf(contribution);\n}\n\n/**\n * The non-engine contributions this process registered that claim an engine provider's ref, sorted by ref (#3243).\n *\n * Empty until discovery ran ({@link resolveAndRegisterSaasProviderContributions}); the reporting check runs discovery\n * first for that reason.\n */\nexport function listContributionsShadowingEngineProviders(): ContributionShadowingEngineProvider[] {\n return [...contributionsShadowingEngineProviders.values()].sort((left, right) => left.providerRef.localeCompare(right.providerRef));\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n contributionsShadowingEngineProviders.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n // A package slot's not-confidential mark rides the contribution since #2579, as an engine module's does.\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n // A package-shipped telemetry provider's header (#2579): without it, its telemetry exported with no credential.\n ...(contribution.otlpAuth === undefined ? {} : { otlpAuth: contribution.otlpAuth }),\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
1
+ {"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EACL,6BAA6B,GAG9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AACrG,OAAO,EACL,yCAAyC,GAI1C,MAAM,+BAA+B,CAAC;AAqEvC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAyC,CAAC;AAkBjF,iIAAiI;AACjI,MAAM,qCAAqC,GAAG,IAAI,GAAG,EAA+C,CAAC;AAErG;;;GAGG;AACH,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,uCAAuC,CACrD,aAAuD;IAEvD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,6BAA6B,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAY,CAAC,EAAE,CAAC;YAC9E,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC3C,MAAM,gBAAgB,GAAI,YAAiE,CAAC,KAAK,EAAE,WAAW,CAAC;gBAC/G,qCAAqC,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE;oBAC1D,WAAW,EAAE,YAAY,CAAC,GAAG;oBAC7B,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,YAAY,CAAC,QAAQ,CAAC,WA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C,MAAM,CAAC,QAAQ,CAAC,KAA8D,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3H","sourcesContent":["/**\n * The COMPOSED provider catalogue — the one place the CLI's secrets layer asks\n * \"which providers exist, and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport { engineBackendProviderContributions } from '@wildo-ai/external-connectors-private/companion';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * An engine module says so on its contract, and a contribution carries both marks in its values-free\n * shape since #2579 (`describeProviderSecretsContractShape`), so sync and the backend's screen read a\n * package slot the same way.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint: from a loadable module's `otlpAuth`, or from a contribution's, which carries the\n * same values-free declaration since #2579. Absent for a provider whose endpoint needs no auth.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * A contribution that names a ref the ENGINE tier already owns and does not come from the engine (#3243).\n *\n * The contribution is ignored either way (the engine tier is the floor). What this records is the case worth telling\n * someone about: a package or an application module that claims an engine provider's ref, so whatever it declares\n * (secret slots, capabilities) is silently not what the CLI uses.\n */\nexport interface ContributionShadowingEngineProvider {\n /** The engine provider's ref the contribution claims. */\n readonly providerRef: string;\n /** The package the contribution says it comes from, when its identity names one. */\n readonly declaredPackageName?: string;\n /** The package root discovery read it from, when the caller was discovery (it carries the owner). */\n readonly ownerPackageRoot?: string;\n}\n\n/** The ignored, NON-engine contributions this process registered, by ref. Read by `wildo local doctor` and the dev preflight. */\nconst contributionsShadowingEngineProviders = new Map<string, ContributionShadowingEngineProvider>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately: the engine tier is the floor, and a package silently\n * shadowing an engine provider's secret contract is exactly the substitution this layer must not perform.\n *\n * ## Ignored, and said only when someone shadows (#3243)\n *\n * This used to print one `[provider-catalogue] … is ignored` line per collision on stderr, in EVERY process. Every\n * application collides on every engine provider, because discovery admits the engine's own provider barrel\n * (`@wildo-ai/external-connectors-private/companion`, #358) and every frontend re-exports the engine's frontend\n * contributions: so each `wildo` verb in app-creation-test-007 began with 19 such lines, for anthropic … twilio,\n * none of which anybody had overridden. Agents had to `grep -v` every call.\n *\n * A collision is silent only when the contribution IS the engine's own, judged by COMPARISON\n * ({@link isEngineOwnContribution}), never by what the contribution says about itself: an override built by spreading\n * the engine's contribution and changing its secrets contract still declares origin ENGINE and tier MAIN, and is\n * exactly the case worth reporting. Every other collision is recorded, never printed here: `wildo local doctor` and\n * the `wildo local dev` preflight report it once (`checkProviderContributionsShadowingEngine`), naming the provider\n * and where the contribution came from. Printing it here put it on every verb, which is how the real case became\n * noise nobody read.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n if (!isEngineOwnContribution(contribution)) {\n const ownerPackageRoot = (contribution as Partial<DiscoveredProviderCompanionContribution>).owner?.packageRoot;\n contributionsShadowingEngineProviders.set(contribution.ref, {\n providerRef: contribution.ref,\n ...(contribution.identity?.packageName === undefined ? {} : { declaredPackageName: contribution.identity.packageName }),\n ...(ownerPackageRoot === undefined ? {} : { ownerPackageRoot }),\n });\n }\n continue;\n }\n // One provider is discovered once per FACET (#2272): PostHog's backend module, then its browser module once per\n // frontend service that declares it. A browser facet owns no server secret (`secretsContractShape: []` by\n // construction), so it may never REPLACE a backend facet's entry: the last-registered facet used to win, which left\n // a provider with a browser facet holding no secret slot at all. Every one of its keys was then dropped from every\n // runtime's environment as \"belonging to no provider\", and its browser-public key was screened as a secret.\n const registered = discoveredContributions.get(contribution.ref);\n if (registered !== undefined && isFrontendOnlyContribution(contribution) && !isFrontendOnlyContribution(registered)) continue;\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/** Whether every runtime target of a contribution is a frontend service: a browser facet, which declares no secret. */\nfunction isFrontendOnlyContribution(contribution: ProviderCompanionContribution): boolean {\n const targets = contribution.runtimeTargets ?? [];\n return targets.length > 0 && targets.every((target) => target.kind === 'frontendService');\n}\n\n/**\n * Fields discovery itself writes onto a contribution, so they cannot tell the engine's record from an override: the\n * runtime targets an application's own `providers.scopes` imply (`resolveScopeImpliedRuntimeTargets` replaces the\n * engine barrel's defaults), and the owner discovery read it from.\n */\nconst DISCOVERY_OWNED_CONTRIBUTION_FIELDS: ReadonlySet<string> = new Set(['runtimeTargets', 'owner']);\n\n/** A value as canonical JSON: object keys sorted, so two equal records compare equal whatever order built them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, item: unknown) => (\n item !== null && typeof item === 'object' && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right)))\n : item\n ));\n}\n\n/** The engine backend barrel's own contributions, by ref: the records discovery reads off `./companion`. */\nlet engineOwnBackendContributionsByRef: ReadonlyMap<string, string> | undefined;\n\nfunction canonicalContractOf(contribution: ProviderCompanionContribution): string {\n return canonicalJson(Object.fromEntries(Object.entries(contribution).filter(([field]) => !DISCOVERY_OWNED_CONTRIBUTION_FIELDS.has(field))));\n}\n\n/**\n * Whether a contribution colliding with an engine provider's ref is the engine's OWN record, so ignoring it loses\n * nothing (#3243). Decided by comparison, never by the contribution's declared origin, which an override keeps.\n *\n * - **A backend facet** (any runtime target outside a frontend service) must equal the engine barrel's contribution\n * for that ref (`engineBackendProviderContributions`) on every field it carries (identity, capabilities, protocols,\n * the secrets-contract shape and its protocol slots, the compliance profile), the fields discovery writes excepted.\n * - **A frontend facet** (every target a frontend service): the engine's frontend contributions declare no secret slot\n * and no OTLP auth (a browser-safe provider owns no server secret), and those are the only fields this catalogue\n * would take from it. So it is the engine's own when it declares neither; one that does declares a secrets contract\n * the catalogue ignores, which is a shadow. Its browser fields are the frontend runtime's to compose, not this\n * layer's, and the CLI does not load the frontend provider registries.\n */\nexport function isEngineOwnContribution(contribution: ProviderCompanionContribution): boolean {\n if (isFrontendOnlyContribution(contribution)) {\n return (contribution.secretsContractShape ?? []).length === 0 && contribution.otlpAuth === undefined;\n }\n engineOwnBackendContributionsByRef ??= new Map(engineBackendProviderContributions.map((own) => [own.ref, canonicalContractOf(own)]));\n return engineOwnBackendContributionsByRef.get(contribution.ref) === canonicalContractOf(contribution);\n}\n\n/**\n * The non-engine contributions this process registered that claim an engine provider's ref, sorted by ref (#3243).\n *\n * Empty until discovery ran ({@link resolveAndRegisterSaasProviderContributions}); the reporting check runs discovery\n * first for that reason.\n */\nexport function listContributionsShadowingEngineProviders(): ContributionShadowingEngineProvider[] {\n return [...contributionsShadowingEngineProviders.values()].sort((left, right) => left.providerRef.localeCompare(right.providerRef));\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n contributionsShadowingEngineProviders.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n // A package slot's not-confidential mark rides the contribution since #2579, as an engine module's does.\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n // A package-shipped telemetry provider's header (#2579): without it, its telemetry exported with no credential.\n ...(contribution.otlpAuth === undefined ? {} : { otlpAuth: contribution.otlpAuth }),\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-env-vars.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/provider-env-vars.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AASnH,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,oBAAY,wBAAwB;IAClC;;;;OAIG;IACH,2BAA2B,gCAAgC;IAC3D;;;;;OAKG;IACH,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC,2BAA2B,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAEnG;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,oBAAoB,CAc3F;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,oBAAoB,CAEpE;AA6CD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,sBAAsB,EAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3C,wBAAwB,EAAE,CA4J5B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,MAAM,EACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC,MAAM,C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MAAM,CAAA;CAAE,GACxF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,oBAAoB,CAAC;IACnC,8FAA8F;IAC9F,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,GAAG,wBAAwB,CA+ExF"}
1
+ {"version":3,"file":"provider-env-vars.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/provider-env-vars.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AASnH,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,oBAAY,wBAAwB;IAClC;;;;OAIG;IACH,2BAA2B,gCAAgC;IAC3D;;;;;OAKG;IACH,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC,2BAA2B,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC,QAA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Y7E;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAkD,CAAC;AAM/G;;;;;;;GAOG;AACH,oBAAY,qBAAqB;IAC/B,qFAAqF;IACrF,gBAAgB,qBAAqB;IACrC,0EAA0E;IAC1E,YAAY,iBAAiB;IAC7B,+EAA+E;IAC/E,iBAAiB,sBAAsB;IACvC;;;;;;;;OAQG;IACH,sBAAsB,2BAA2B;IACjD,iFAAiF;IACjF,gBAAgB,qBAAqB;IACrC,0FAA0F;IAC1F,sBAAsB,2BAA2B;CAClD;AAED,MAAM,MAAM,wBAAwB,GAChC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,oBAAoB,CAAC;IACnC,8FAA8F;IAC9F,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,GAAG,wBAAwB,CA+ExF"}
@@ -180,8 +180,10 @@ export function getProtocolSecretEnvBindings(providerRef, protocol, configuredPr
180
180
  pushSecret(runtimeContract.apiKey.secretRef);
181
181
  break;
182
182
  case ProviderProtocolRuntimeKind.ELECTRONIC_SIGNATURE:
183
- // An electronic-signature vendor (#2293): one API key in a header, like the classifier above.
183
+ // An electronic-signature vendor (#2293): one API key in a header, like the classifier above, or the JWT-grant key it
184
+ // is exchanged from; and, for a vendor whose base URL differs per account (DocuSign), the slot that holds it.
184
185
  pushSecret(runtimeContract.apiKey.secretRef);
186
+ pushSecret(runtimeContract.baseUrlEnvVarName);
185
187
  break;
186
188
  case ProviderProtocolRuntimeKind.EMAIL:
187
189
  // The `email` runtime contract is a discriminated union on `delivery`:
@@ -1 +1 @@
1
- {"version":3,"file":"provider-env-vars.utils.js","sourceRoot":"","sources":["../../../../src/services/credentials/provider-env-vars.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAC3H,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,aAAa,EACb,oBAAoB,GACrB,MAAM,6DAA6D,CAAC;AAUrE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAN,IAAY,wBAcX;AAdD,WAAY,wBAAwB;IAClC;;;;OAIG;IACH,uFAA2D,CAAA;IAC3D;;;;;OAKG;IACH,iDAAqB,CAAA;AACvB,CAAC,EAdW,wBAAwB,KAAxB,wBAAwB,QAcnC;AAMD;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAA+B;IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,8FAA8F;QAC9F,2FAA2F;QAC3F,2FAA2F;QAC3F,2FAA2F;QAC3F,4FAA4F;QAC5F,yDAAyD;QACzD,MAAM,IAAI,KAAK,CACb,gGAAgG;cAC9F,mFAAmF,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,wBAAwB,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B;IAC3C,OA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C,gBAAgB;YAC3G,MAAM,EAAE,UAAU;gBAChB,CAAC,CAAC,aAAa,WAAW,uCAAuC,UAAU,IAAI;gBAC/E,CAAC,CAAC,aAAa,WAAW,cAAc,KAAK,CAAC,OAAO,CAAC,MAAM,gCAAgC;sBACxF,uDAAuD;SAC9D,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;YACL,EAAE,EAAE,KAAK;YACT,WAAW;YACX,OAAO,EAAE,qBAAqB,CAAC,sBAAsB;YACrD,MAAM,EACJ,aAAa,WAAW,+BAA+B,cAAc,CAAC,IAAI,SAAS;kBACjF,GAAG,cAAc,CAAC,UAAU,yDAAyD;kBACrF,uBAAuB,cAAc,CAAC,UAAU,KAAK;SAC1D,CAAC;IACJ,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,WAAW;QACX,UAAU,EAAE,cAAc,CAAC,IAAI;QAC/B,UAAU,EAAE,cAAc,CAAC,UAAU;QACrC,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["import type { BackendProviderModule, BackendProtocolBinding } from '@wildo-ai/external-connectors-private/backend';\nimport { ExternalProvider_ExchangeProtocol_Kind, ProviderProtocolRuntimeKind } from '@wildo-ai/external-connectors-models';\nimport {\n getComposedProviderEntry,\n getComposedProviderSecretsCatalogue,\n LiveEnvKeySet,\n memoiseOverCatalogue,\n} from '~wildo-cli/services/credentials/composed-provider-catalogue';\n\nexport interface ProviderSecretEnvBinding {\n protocolKind: string;\n secretRef: string;\n envVarName: string;\n required?: boolean;\n executionProfileRef?: string;\n}\n\n/**\n * Which provider secrets a generated runtime environment is entitled to.\n *\n * ## Why this is a named vocabulary rather than `readonly string[] | null`\n *\n * The scope answers a fail-closed SECURITY question — \"may this process read the application's\n * Stripe key?\" — and the previous encoding made three distinct answers share two values:\n *\n * | Meaning | Old encoding | Problem |\n * |---|---|---|\n * | Platform tier: every provider secret | `null` | fine, but only by convention |\n * | Declares none, legitimately (`myRustWorker` authors `providers: {}`) | `[]` | — |\n * | Nobody threaded the value through | `undefined` → `?? []` | **collapses into the row above** |\n *\n * So a wiring omission and a valid configuration produced byte-identical output, and the failure\n * was invisible: a `.env` missing every provider secret looks exactly like a correctly-scoped one\n * for a runtime that needs none. That is how five of six call sites shipped without a scope, and\n * how a `wildo config sync` came to strip `STRIPE_SECRET_KEY`, `RESEND_API_KEY`, `OPENAI_API_KEY`\n * and the `IMMUDB_*` connection out of the Wonder Todos backend `.env` — the application then died\n * at startup resolving its billing provider, three layers away from the cause.\n *\n * Fail-closed is the correct posture for a DECISION. Applied to an OMISSION it is a silent outage.\n * This union removes the omission from the type system: there is no value meaning \"not stated\", so\n * a caller must decide, and a new call site cannot compile without deciding.\n *\n * @see {@link declaredProviderScope} / {@link platformTierAllProvidersScope} — the two constructors.\n */\nexport enum RuntimeProviderScopeKind {\n /**\n * Platform-tier runtime (apps-manager, the dev companion): receives every provider secret in the\n * environment. A deliberate, reviewable declaration — never the default, and never what an\n * application-tier runtime gets.\n */\n PLATFORM_TIER_ALL_PROVIDERS = 'platform_tier_all_providers',\n /**\n * Application-tier runtime: exactly the providers its `providers.scopes.{backend,workers.<name>,\n * minions.<name>}.providers` authors, and nothing else. An EMPTY set is a legitimate, explicit\n * answer here — it means the runtime declared no provider — which is precisely why it must not\n * double as the encoding for \"the caller forgot\".\n */\n DECLARED = 'declared',\n}\n\nexport type RuntimeProviderScope =\n | { readonly kind: RuntimeProviderScopeKind.PLATFORM_TIER_ALL_PROVIDERS }\n | { readonly kind: RuntimeProviderScopeKind.DECLARED; readonly providerRefs: readonly string[] };\n\n/**\n * The application-tier scope: exactly the authored provider refs.\n *\n * Pass the refs resolved from `providers.scopes.*` — an empty array is meaningful and accepted\n * (the runtime authored no provider), so this constructor deliberately does NOT treat `[]` as a\n * mistake to be corrected.\n */\nexport function declaredProviderScope(providerRefs: readonly string[]): RuntimeProviderScope {\n if (!Array.isArray(providerRefs)) {\n // The type system cannot reach every caller: env targets are built behind `as never` casts in\n // tests, and a JSON-shaped target could arrive without the field at all. In those paths an\n // absent value would flow straight through as `providerRefs: undefined` and be filtered as\n // \"declares nothing\" — reinstating, at runtime, exactly the silent-empty failure the union\n // removed from the type. Throwing keeps the two states distinguishable everywhere: an empty\n // scope has to be WRITTEN as `[]`, never merely omitted.\n throw new Error(\n 'declaredProviderScope() requires an explicit provider-ref array. Pass `[]` for a runtime that '\n + 'authors no provider — an omitted scope is not the same statement as an empty one.',\n );\n }\n return { kind: RuntimeProviderScopeKind.DECLARED, providerRefs };\n}\n\n/**\n * The platform-tier scope: every provider secret.\n *\n * A function rather than a shared constant so each call site reads as its own decision at the\n * point it is made, and so no consumer can retain a reference and hand it to an application-tier\n * builder later.\n */\nexport function platformTierAllProvidersScope(): RuntimeProviderScope {\n return { kind: RuntimeProviderScopeKind.PLATFORM_TIER_ALL_PROVIDERS };\n}\n\n/**\n * The authored `providerConfigurations` keys that can carry a provider module's declared protocol.\n *\n * Two spellings, because the two sides of this lookup name one vocabulary differently: a provider\n * module declares `protocol: 'LLM_PROVIDER'` — the enum MEMBER NAME — while an application authors\n * `[ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER]`, which evaluates to the enum VALUE\n * `'llm_provider'`. Neither side is wrong; something has to translate.\n *\n * DERIVED from the enum rather than hand-listed, because the hand-listed table this replaces\n * drifted in both directions at once and neither direction could be seen. Typed\n * `Record<string, string[]>`, it kept a `CLI_RUNTIME` row after that kind was retired — an inert\n * entry no compiler could flag — and never gained `AGENT_CLIENT_PROTOCOL`, `IMAGE_PROVIDER` or\n * `DOCUMENT_EXTRACTION_PROVIDER`, because a missing entry resolves to `undefined` and the fallback\n * then tries only the uppercase member name, which no authored configuration ever uses. The live\n * consequence was that an ACP provider's authored `executionProfiles` were never found, so a\n * `SECRET_REF_ENV_INJECTION` profile bound no environment variable and failed at auth time with\n * nothing pointing back here.\n *\n * Reading the enum cannot omit a member and cannot retain a retired one.\n *\n * `backendProtocol` arrives as a bare `string` (`BackendProtocolBinding` is generic over it), so\n * the index cast is the boundary where an untyped value meets the enum. A string enum has no\n * reverse mapping, so a value that is not a member name reads back `undefined` — which is the\n * signal to fall back to the protocol string itself rather than to guess a second spelling.\n */\nfunction backendProtocolConfigKeys(backendProtocol: string): readonly string[] {\n const wireValue = (ExternalProvider_ExchangeProtocol_Kind as Record<string, string | undefined>)[\n backendProtocol\n ];\n return wireValue === undefined ? [backendProtocol] : [backendProtocol, wireValue];\n}\n\nfunction getConfiguredProtocol(\n configuredProtocols: Partial<Record<string, Record<string, unknown>>> | undefined,\n backendProtocol: string,\n): Record<string, unknown> | undefined {\n for (const key of backendProtocolConfigKeys(backendProtocol)) {\n const config = configuredProtocols?.[key];\n if (config) return config;\n }\n return undefined;\n}\n\n/**\n * EXPORTED since #341 so the per-protocol binding is reachable on its own.\n *\n * Since #329 the ref is resolved through the COMPOSED catalogue rather than the engine registry,\n * so a package-shipped provider's protocols reach this function as soon as discovery registers it.\n * A contribution-sourced entry carries no runtime contracts (a binding is code, a contribution is\n * data), so this function is reached for such a provider only when a caller holds a binding of its\n * own; its secret keys are attributed from the contract half instead, which is complete — see\n * `composed-provider-catalogue.ts`.\n */\nexport function getProtocolSecretEnvBindings(\n providerRef: string,\n protocol: BackendProtocolBinding,\n configuredProtocol?: Record<string, unknown>,\n): ProviderSecretEnvBinding[] {\n const bindings: ProviderSecretEnvBinding[] = [];\n\n const pushSecret = (secretRef: string | undefined) => {\n if (!secretRef) return;\n const matchingEntry = getComposedProviderEntry(providerRef)\n ?.secrets.find((entry) => entry.envVarName === secretRef);\n bindings.push({\n protocolKind: protocol.protocol,\n secretRef,\n envVarName: matchingEntry?.envVarName ?? secretRef,\n required: matchingEntry?.required,\n });\n };\n\n const runtimeContract = protocol.runtimeContract;\n\n switch (runtimeContract.kind) {\n case ProviderProtocolRuntimeKind.LLM:\n // An arm that signs each request instead (#3780, Amazon Bedrock with IAM credentials) holds its two halves and an\n // optional session token, exactly as a signed document-extraction arm does below.\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.REST:\n /*\n * Same shape as `llm` above: the contract's `apiKey.secretRef` names the env var carrying the\n * key. Absent, this switch's `default` THREW at module load — and because these bindings are\n * computed while the module is evaluated, that killed the ENTIRE CLI: `wildo help` and\n * `wildo config validate` both died with `Unsupported provider runtime contract kind: rest`,\n * so a single unhandled provider kind made every unrelated command unusable.\n */\n pushSecret(runtimeContract.apiKey?.secretRef);\n break;\n case ProviderProtocolRuntimeKind.IMAGE:\n // Image-generation transport (gpt-image) — same API-key secret shape as llm.\n pushSecret(runtimeContract.apiKey.secretRef);\n break;\n case ProviderProtocolRuntimeKind.EMBEDDINGS:\n // Embeddings transport (RAG drain/retrieval) — same secret shape as llm, signed arms included (#3780).\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.DOCUMENT_EXTRACTION:\n // Document-extraction transport (OCR) — same API-key secret shape as llm/image/embeddings,\n // even though this family builds its own HTTPS request instead of handing the key to an SDK.\n // What the binding needs is the env var NAME, which is identical either way. A contract that signs\n // each request instead (#3426, AWS Textract) holds its two halves and an optional session token.\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.CONTENT_SAFETY:\n // A content-safety classifier (#2292): the same API-key shape as document extraction.\n pushSecret(runtimeContract.apiKey.secretRef);\n break;\n case ProviderProtocolRuntimeKind.ELECTRONIC_SIGNATURE:\n // An electronic-signature vendor (#2293): one API key in a header, like the classifier above.\n pushSecret(runtimeContract.apiKey.secretRef);\n break;\n case ProviderProtocolRuntimeKind.EMAIL:\n // The `email` runtime contract is a discriminated union on `delivery`:\n // the network variant (real providers — Resend, Postmark, Mailgun, …)\n // carries an `apiKey.secretRef`, while the `delivery: 'log'` variant\n // (the `email-preview` local/dev provider) intentionally carries NO\n // credentials — a log sink needs no API key. Branch on the contract\n // field, never on the provider ref: a log provider has no secret to bind.\n if (runtimeContract.delivery !== 'log') {\n pushSecret(runtimeContract.apiKey.secretRef);\n }\n break;\n case ProviderProtocolRuntimeKind.OAUTH2_SSO:\n pushSecret(runtimeContract.clientSecretRef);\n if (typeof runtimeContract.extensions?.teamIdSecretRef === 'string') {\n pushSecret(runtimeContract.extensions.teamIdSecretRef);\n }\n if (typeof runtimeContract.extensions?.keyIdSecretRef === 'string') {\n pushSecret(runtimeContract.extensions.keyIdSecretRef);\n }\n break;\n case ProviderProtocolRuntimeKind.BILLING:\n case ProviderProtocolRuntimeKind.WEBHOOK_ORIGINATOR:\n pushSecret(runtimeContract.secretRef);\n break;\n case ProviderProtocolRuntimeKind.SMS:\n // A receiving-email provider: the API key its message and attachment fetches carry (#1630).\n case ProviderProtocolRuntimeKind.EMAIL_INBOUND:\n pushSecret(runtimeContract.auth.secretRef);\n break;\n case ProviderProtocolRuntimeKind.AGENT_CLIENT_PROTOCOL:\n // A coding agent under host-managed auth (the default) declares no\n // secretRef at all — `pushSecret` is a no-op for `undefined`, which is\n // the correct outcome: nothing to bind, and nothing to warn about.\n pushSecret(runtimeContract.secretRef);\n break;\n default: {\n // Exhaustive on purpose: every engine-side switch over `runtimeContract.kind` carries this\n // `never` check, and this site was the one that did not — which is exactly how the\n // `embeddings` kind shipped without a case here and crashed `wildo local dev` at module load\n // (2026-08-27). A new kind must fail COMPILATION here, not the next developer's startup.\n const exhaustiveCheck: never = runtimeContract;\n throw new Error(`Unsupported provider runtime contract kind: ${JSON.stringify(exhaustiveCheck)}`);\n }\n }\n\n // Execution-profile secret bindings.\n //\n // NOTE this is a SECOND dispatch on the same axis as the switch above, and it\n // is an `if` rather than a `case`, so the `never` check does NOT protect it:\n // a new execution-profile-bearing kind added to the switch and forgotten here\n // compiles perfectly and silently binds no environment variable, leaving the\n // agent to fail at auth time with no indication that a secret was authored.\n // Every kind that owns execution profiles must be listed.\n if (runtimeContract.kind === ProviderProtocolRuntimeKind.AGENT_CLIENT_PROTOCOL) {\n const agentClientProtocolConfig = configuredProtocol as\n | {\n executionProfiles?: Record<\n string,\n {\n authMode?: string;\n secretRef?: string;\n secretEnvVarName?: string;\n }\n >;\n }\n | undefined;\n const executionProfiles = agentClientProtocolConfig?.executionProfiles ?? {};\n for (const [executionProfileRef, executionProfile] of Object.entries(executionProfiles)) {\n if (\n executionProfile.authMode === 'secret_ref_env_injection'\n && executionProfile.secretRef\n && executionProfile.secretEnvVarName\n ) {\n bindings.push({\n protocolKind: protocol.protocol,\n secretRef: executionProfile.secretRef,\n envVarName: executionProfile.secretEnvVarName,\n executionProfileRef,\n });\n }\n }\n }\n\n return bindings.filter((binding, index, allBindings) => (\n allBindings.findIndex((candidate) => (\n candidate.protocolKind === binding.protocolKind\n && candidate.secretRef === binding.secretRef\n && candidate.envVarName === binding.envVarName\n && candidate.executionProfileRef === binding.executionProfileRef\n )) === index\n ));\n}\n\n/**\n * Every environment variable the named provider's PROTOCOL BINDINGS require.\n *\n * Resolves through the composed catalogue (#329). A provider known only from a companion\n * contribution has no runtime contracts, so this answers `[]` for it — deliberately, and without\n * loss: its secret keys are classified and allow-listed from its `secretsContract` shape, which\n * for every engine provider measured is a superset of what the bindings name.\n */\nexport function getProviderSecretEnvBindings(\n providerRef: string,\n configuredProtocols?: Partial<Record<string, Record<string, unknown>>>,\n): ProviderSecretEnvBinding[] {\n const entry = getComposedProviderEntry(providerRef);\n if (!entry) return [];\n\n return entry.protocolBindings.flatMap((protocol) => (\n getProtocolSecretEnvBindings(\n providerRef,\n protocol,\n getConfiguredProtocol(configuredProtocols, protocol.protocol),\n )\n ));\n}\n\n/**\n * Derives the canonical env var name for a provider's generic secret binding\n * from its protocol definitions.\n *\n * This is useful for setup flows that collect one provider secret value and\n * need to store it directly in the canonical `providerEnv` map. Transport-aware\n * callers should still prefer `getProviderSecretEnvBindings()`.\n */\nexport function getProviderSecretEnvVarName(\n providerRefOrModule: string | BackendProviderModule,\n): string | undefined {\n const providerRef =\n typeof providerRefOrModule === 'string'\n ? providerRefOrModule\n : providerRefOrModule.metadata.ref;\n const bindings = getProviderSecretEnvBindings(providerRef);\n return bindings.find((binding) => !binding.executionProfileRef)?.envVarName;\n}\n\n/**\n * Every provider-related env var name that must be classified as sensitive.\n *\n * Derived from the COMPOSED catalogue (#329) — engine tier plus whatever discovery registered —\n * so a package-shipped provider's key is classified like any other. It used to enumerate\n * `EngineBackendProviderRegistry` alone, which meant a package provider's key was attributable to\n * nobody: unclassified for the Secret/ConfigMap split, and kept by the confinement filter as\n * \"configuration\".\n *\n * Recomputed whenever composition changes rather than cached once, because discovery necessarily\n * runs after this module is imported.\n */\nexport const getProviderSensitiveEnvKeys: () => ReadonlySet<string> = memoiseOverCatalogue(() => {\n const keys = new Set<string>();\n for (const entry of getComposedProviderSecretsCatalogue().values()) {\n for (const secret of entry.secrets) keys.add(secret.envVarName);\n for (const binding of getProviderSecretEnvBindings(entry.providerRef)) keys.add(binding.envVarName);\n }\n return keys;\n});\n\n/** One secret a provider declares. */\nexport interface ProviderSelectionSecret {\n envVarName: string;\n description?: string;\n /** The provider refuses to boot without this var once the provider is enabled. */\n required: boolean;\n}\n\n/** One provider that declares at least one secret, with its operator-facing label. */\nexport interface ProviderSelectionCatalogEntry {\n providerRef: string;\n /** Operator-facing label (falls back to the ref when no display name is set). */\n label: string;\n /** Every secret this provider declares, in contract order. */\n secrets: ProviderSelectionSecret[];\n}\n\n/**\n * Every provider that declares a secret, derived from the COMPOSED provider catalogue (engine tier plus\n * whatever discovery registered — #329), sorted by label. `wildo setup`'s summary names the configured\n * providers from it.\n *\n * It used to power a setup step that offered this whole catalogue for credentials, grouped by a\n * presentation category. That step was removed (#1637): setup asks only for the companion's LLM key, and\n * every other secret is asked when its feature needs it (`wildo secrets`), derived from what the\n * application scopes rather than from everything that exists. The grouping went with it.\n *\n * Providers with an empty `secretsContract` (e.g. the `email-preview` log sink) are omitted.\n */\nexport function getProviderSelectionCatalog(): ProviderSelectionCatalogEntry[] {\n const entries: ProviderSelectionCatalogEntry[] = [];\n for (const provider of getComposedProviderSecretsCatalogue().values()) {\n const secrets: ProviderSelectionSecret[] = provider.secrets.map((secret) => ({\n envVarName: secret.envVarName,\n description: secret.description,\n required: secret.required,\n }));\n if (secrets.length === 0) continue;\n entries.push({ providerRef: provider.providerRef, label: provider.label, secrets });\n }\n return entries.sort((a, b) => a.label.localeCompare(b.label));\n}\n\n/**\n * All provider env-var names classified as sensitive, as a LIVE view.\n *\n * It was a module-load snapshot until #329, and a snapshot cannot work once composition is a\n * thing that happens: this module is imported by `credentials.schemas.ts` on the CLI's first\n * touch of the credential layer, which is always before an application's provider packages have\n * been discovered. A snapshot would therefore have been permanently blind to exactly the tier\n * this slice exists to classify. The exported NAME and the `.has()` shape are unchanged, so its\n * consumers need no edit.\n */\nexport const PROVIDER_SENSITIVE_ENV_KEYS: ReadonlySet<string> = new LiveEnvKeySet(getProviderSensitiveEnvKeys);\n\n// ============================================================================\n// Provider API-key resolution over the composed catalogue (seam for #331)\n// ============================================================================\n\n/**\n * Why a provider's credential could not be resolved.\n *\n * A closed vocabulary rather than a message string, because the caller BRANCHES on it: an\n * executor surfaces `SECRET_NOT_PROVISIONED` to an operator as \"run `wildo secrets set`\", and\n * `NOT_IN_SCOPE` to a developer as \"this runtime does not declare that provider\" — two very\n * different remedies that a single \"failed to resolve\" would have flattened.\n */\nexport enum ProviderApiKeyRefusal {\n /** No entry in the composed catalogue claims the ref — engine tier or discovered. */\n UNKNOWN_PROVIDER = 'unknown_provider',\n /** The runtime's declared provider scope does not carry this provider. */\n NOT_IN_SCOPE = 'not_in_scope',\n /** An operation named `requiredScopes` slugs the provider does not declare. */\n UNDECLARED_SCOPES = 'undeclared_scopes',\n /**\n * The caller named a `secretSlug` the provider does not declare.\n *\n * Distinct from `UNDECLARED_SCOPES` on purpose, even though both mean \"a slug that is not in the\n * contract\": one says an OPERATION requires a credential the package never ships (re-generate or\n * retire the operation), the other says THIS CALL asked for the wrong slug (a caller bug). A\n * caller branches differently on each, and merging two remedies under one member is exactly the\n * vocabulary collapse this repository's closed-vocabulary rule exists to prevent.\n */\n UNDECLARED_SECRET_SLUG = 'undeclared_secret_slug',\n /** The contract declares several candidate secrets and the caller named none. */\n AMBIGUOUS_SECRET = 'ambiguous_secret',\n /** The contract is satisfied; the value is simply not provisioned in this environment. */\n SECRET_NOT_PROVISIONED = 'secret_not_provisioned',\n}\n\nexport type ProviderApiKeyResolution =\n | { ok: true; providerRef: string; secretSlug: string; envVarName: string; value: string }\n | { ok: false; providerRef: string; refusal: ProviderApiKeyRefusal; detail: string };\n\nexport interface ProviderApiKeyRequest {\n providerRef: string;\n /**\n * What the runtime asking for the key is entitled to. Positional-equivalent to the scope\n * threaded through {@link declaredProviderScope} everywhere else in this layer, and required\n * for the same reason: an optional entitlement is one nobody decides, and the whole provider\n * bag reaching every runtime is what that produced last time.\n */\n runtimeScope: RuntimeProviderScope;\n /** Where values come from. Never `process.env` read by this function — the caller decides. */\n providerEnv: Record<string, string>;\n /**\n * Secret-contract SLUGS an operation requires, checked against the provider's contract.\n *\n * These are contract slugs, NOT OAuth scopes: a delegated-authorization scope check needs a\n * connected-account store and belongs to the delegated-auth slice. What is honestly checkable\n * here is that every credential a catalogue operation names is one the provider package\n * actually declares — so a generated operation asking for a credential its package never\n * ships is refused at resolution instead of at the vendor's 401.\n */\n requiredScopes?: readonly string[];\n /** Which contract slug carries the key. Defaults to the sole required (else sole) secret. */\n secretSlug?: string;\n}\n\n/**\n * Resolve one provider credential over the COMPOSED catalogue.\n *\n * The seam #331's operation executor consumes (plan, wave-1 seam table). Three properties are\n * what make it worth having over a bare `providerEnv[secretRef]`:\n *\n * 1. It resolves over the composed catalogue, so it answers for a package-shipped provider the\n * moment discovery registers one, and refuses `UNKNOWN_PROVIDER` BY NAME before that — rather\n * than silently reading an env var nothing claims.\n * 2. It checks entitlement against the same {@link RuntimeProviderScope} the confinement filter\n * uses, so \"the executor could read it\" and \"the env var was allowed into this runtime\" can\n * never disagree.\n * 3. It never touches `process.env`. The caller supplies the source, which keeps the function a\n * pure decision and therefore testable without an ambient environment.\n */\nexport function getProviderApiKey(input: ProviderApiKeyRequest): ProviderApiKeyResolution {\n const { providerRef, runtimeScope, providerEnv, requiredScopes = [], secretSlug } = input;\n\n const entry = getComposedProviderEntry(providerRef);\n if (!entry) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.UNKNOWN_PROVIDER,\n detail:\n `No provider '${providerRef}' in the composed catalogue. Either the application does not `\n + 'declare its package, or discovery has not registered its companion contribution.',\n };\n }\n\n if (\n runtimeScope.kind === RuntimeProviderScopeKind.DECLARED\n && !runtimeScope.providerRefs.includes(providerRef)\n ) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.NOT_IN_SCOPE,\n detail:\n `This runtime declares [${runtimeScope.providerRefs.join(', ') || 'none'}] and not `\n + `'${providerRef}', so its credential is deliberately absent from this environment.`,\n };\n }\n\n const declaredSlugs = new Set(entry.secrets.map((secret) => secret.slug));\n const missingScopes = requiredScopes.filter((slug) => !declaredSlugs.has(slug));\n if (missingScopes.length > 0) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.UNDECLARED_SCOPES,\n detail:\n `Provider '${providerRef}' declares no secret-contract slug [${missingScopes.join(', ')}]; `\n + `its contract holds [${[...declaredSlugs].join(', ') || 'none'}].`,\n };\n }\n\n const candidates = entry.secrets.filter((secret) => secret.required);\n const resolvedSecret = secretSlug\n ? entry.secrets.find((secret) => secret.slug === secretSlug)\n : (candidates.length === 1 ? candidates[0] : (entry.secrets.length === 1 ? entry.secrets[0] : undefined));\n\n if (!resolvedSecret) {\n return {\n ok: false,\n providerRef,\n refusal: secretSlug ? ProviderApiKeyRefusal.UNDECLARED_SECRET_SLUG : ProviderApiKeyRefusal.AMBIGUOUS_SECRET,\n detail: secretSlug\n ? `Provider '${providerRef}' declares no secret-contract slug '${secretSlug}'.`\n : `Provider '${providerRef}' declares ${entry.secrets.length} secrets and none is uniquely `\n + 'required — name the slug that carries the credential.',\n };\n }\n\n const value = providerEnv[resolvedSecret.envVarName];\n if (!value) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.SECRET_NOT_PROVISIONED,\n detail:\n `Provider '${providerRef}' is in scope and declares '${resolvedSecret.slug}', but `\n + `${resolvedSecret.envVarName} carries no value in this environment. Provide it with `\n + `\\`wildo secrets set ${resolvedSecret.envVarName}\\`.`,\n };\n }\n\n return {\n ok: true,\n providerRef,\n secretSlug: resolvedSecret.slug,\n envVarName: resolvedSecret.envVarName,\n value,\n };\n}\n"]}
1
+ {"version":3,"file":"provider-env-vars.utils.js","sourceRoot":"","sources":["../../../../src/services/credentials/provider-env-vars.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAC3H,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,aAAa,EACb,oBAAoB,GACrB,MAAM,6DAA6D,CAAC;AAUrE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAN,IAAY,wBAcX;AAdD,WAAY,wBAAwB;IAClC;;;;OAIG;IACH,uFAA2D,CAAA;IAC3D;;;;;OAKG;IACH,iDAAqB,CAAA;AACvB,CAAC,EAdW,wBAAwB,KAAxB,wBAAwB,QAcnC;AAMD;;;;;;GAMG;AACH,MAAM,UAAU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backend';\nimport { ExternalProvider_ExchangeProtocol_Kind, ProviderProtocolRuntimeKind } from '@wildo-ai/external-connectors-models';\nimport {\n getComposedProviderEntry,\n getComposedProviderSecretsCatalogue,\n LiveEnvKeySet,\n memoiseOverCatalogue,\n} from '~wildo-cli/services/credentials/composed-provider-catalogue';\n\nexport interface ProviderSecretEnvBinding {\n protocolKind: string;\n secretRef: string;\n envVarName: string;\n required?: boolean;\n executionProfileRef?: string;\n}\n\n/**\n * Which provider secrets a generated runtime environment is entitled to.\n *\n * ## Why this is a named vocabulary rather than `readonly string[] | null`\n *\n * The scope answers a fail-closed SECURITY question — \"may this process read the application's\n * Stripe key?\" — and the previous encoding made three distinct answers share two values:\n *\n * | Meaning | Old encoding | Problem |\n * |---|---|---|\n * | Platform tier: every provider secret | `null` | fine, but only by convention |\n * | Declares none, legitimately (`myRustWorker` authors `providers: {}`) | `[]` | — |\n * | Nobody threaded the value through | `undefined` → `?? []` | **collapses into the row above** |\n *\n * So a wiring omission and a valid configuration produced byte-identical output, and the failure\n * was invisible: a `.env` missing every provider secret looks exactly like a correctly-scoped one\n * for a runtime that needs none. That is how five of six call sites shipped without a scope, and\n * how a `wildo config sync` came to strip `STRIPE_SECRET_KEY`, `RESEND_API_KEY`, `OPENAI_API_KEY`\n * and the `IMMUDB_*` connection out of the Wonder Todos backend `.env` — the application then died\n * at startup resolving its billing provider, three layers away from the cause.\n *\n * Fail-closed is the correct posture for a DECISION. Applied to an OMISSION it is a silent outage.\n * This union removes the omission from the type system: there is no value meaning \"not stated\", so\n * a caller must decide, and a new call site cannot compile without deciding.\n *\n * @see {@link declaredProviderScope} / {@link platformTierAllProvidersScope} — the two constructors.\n */\nexport enum RuntimeProviderScopeKind {\n /**\n * Platform-tier runtime (apps-manager, the dev companion): receives every provider secret in the\n * environment. A deliberate, reviewable declaration — never the default, and never what an\n * application-tier runtime gets.\n */\n PLATFORM_TIER_ALL_PROVIDERS = 'platform_tier_all_providers',\n /**\n * Application-tier runtime: exactly the providers its `providers.scopes.{backend,workers.<name>,\n * minions.<name>}.providers` authors, and nothing else. An EMPTY set is a legitimate, explicit\n * answer here — it means the runtime declared no provider — which is precisely why it must not\n * double as the encoding for \"the caller forgot\".\n */\n DECLARED = 'declared',\n}\n\nexport type RuntimeProviderScope =\n | { readonly kind: RuntimeProviderScopeKind.PLATFORM_TIER_ALL_PROVIDERS }\n | { readonly kind: RuntimeProviderScopeKind.DECLARED; readonly providerRefs: readonly string[] };\n\n/**\n * The application-tier scope: exactly the authored provider refs.\n *\n * Pass the refs resolved from `providers.scopes.*` — an empty array is meaningful and accepted\n * (the runtime authored no provider), so this constructor deliberately does NOT treat `[]` as a\n * mistake to be corrected.\n */\nexport function declaredProviderScope(providerRefs: readonly string[]): RuntimeProviderScope {\n if (!Array.isArray(providerRefs)) {\n // The type system cannot reach every caller: env targets are built behind `as never` casts in\n // tests, and a JSON-shaped target could arrive without the field at all. In those paths an\n // absent value would flow straight through as `providerRefs: undefined` and be filtered as\n // \"declares nothing\" — reinstating, at runtime, exactly the silent-empty failure the union\n // removed from the type. Throwing keeps the two states distinguishable everywhere: an empty\n // scope has to be WRITTEN as `[]`, never merely omitted.\n throw new Error(\n 'declaredProviderScope() requires an explicit provider-ref array. Pass `[]` for a runtime that '\n + 'authors no provider — an omitted scope is not the same statement as an empty one.',\n );\n }\n return { kind: RuntimeProviderScopeKind.DECLARED, providerRefs };\n}\n\n/**\n * The platform-tier scope: every provider secret.\n *\n * A function rather than a shared constant so each call site reads as its own decision at the\n * point it is made, and so no consumer can retain a reference and hand it to an application-tier\n * builder later.\n */\nexport function platformTierAllProvidersScope(): RuntimeProviderScope {\n return { kind: RuntimeProviderScopeKind.PLATFORM_TIER_ALL_PROVIDERS };\n}\n\n/**\n * The authored `providerConfigurations` keys that can carry a provider module's declared protocol.\n *\n * Two spellings, because the two sides of this lookup name one vocabulary differently: a provider\n * module declares `protocol: 'LLM_PROVIDER'` — the enum MEMBER NAME — while an application authors\n * `[ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER]`, which evaluates to the enum VALUE\n * `'llm_provider'`. Neither side is wrong; something has to translate.\n *\n * DERIVED from the enum rather than hand-listed, because the hand-listed table this replaces\n * drifted in both directions at once and neither direction could be seen. Typed\n * `Record<string, string[]>`, it kept a `CLI_RUNTIME` row after that kind was retired — an inert\n * entry no compiler could flag — and never gained `AGENT_CLIENT_PROTOCOL`, `IMAGE_PROVIDER` or\n * `DOCUMENT_EXTRACTION_PROVIDER`, because a missing entry resolves to `undefined` and the fallback\n * then tries only the uppercase member name, which no authored configuration ever uses. The live\n * consequence was that an ACP provider's authored `executionProfiles` were never found, so a\n * `SECRET_REF_ENV_INJECTION` profile bound no environment variable and failed at auth time with\n * nothing pointing back here.\n *\n * Reading the enum cannot omit a member and cannot retain a retired one.\n *\n * `backendProtocol` arrives as a bare `string` (`BackendProtocolBinding` is generic over it), so\n * the index cast is the boundary where an untyped value meets the enum. A string enum has no\n * reverse mapping, so a value that is not a member name reads back `undefined` — which is the\n * signal to fall back to the protocol string itself rather than to guess a second spelling.\n */\nfunction backendProtocolConfigKeys(backendProtocol: string): readonly string[] {\n const wireValue = (ExternalProvider_ExchangeProtocol_Kind as Record<string, string | undefined>)[\n backendProtocol\n ];\n return wireValue === undefined ? [backendProtocol] : [backendProtocol, wireValue];\n}\n\nfunction getConfiguredProtocol(\n configuredProtocols: Partial<Record<string, Record<string, unknown>>> | undefined,\n backendProtocol: string,\n): Record<string, unknown> | undefined {\n for (const key of backendProtocolConfigKeys(backendProtocol)) {\n const config = configuredProtocols?.[key];\n if (config) return config;\n }\n return undefined;\n}\n\n/**\n * EXPORTED since #341 so the per-protocol binding is reachable on its own.\n *\n * Since #329 the ref is resolved through the COMPOSED catalogue rather than the engine registry,\n * so a package-shipped provider's protocols reach this function as soon as discovery registers it.\n * A contribution-sourced entry carries no runtime contracts (a binding is code, a contribution is\n * data), so this function is reached for such a provider only when a caller holds a binding of its\n * own; its secret keys are attributed from the contract half instead, which is complete — see\n * `composed-provider-catalogue.ts`.\n */\nexport function getProtocolSecretEnvBindings(\n providerRef: string,\n protocol: BackendProtocolBinding,\n configuredProtocol?: Record<string, unknown>,\n): ProviderSecretEnvBinding[] {\n const bindings: ProviderSecretEnvBinding[] = [];\n\n const pushSecret = (secretRef: string | undefined) => {\n if (!secretRef) return;\n const matchingEntry = getComposedProviderEntry(providerRef)\n ?.secrets.find((entry) => entry.envVarName === secretRef);\n bindings.push({\n protocolKind: protocol.protocol,\n secretRef,\n envVarName: matchingEntry?.envVarName ?? secretRef,\n required: matchingEntry?.required,\n });\n };\n\n const runtimeContract = protocol.runtimeContract;\n\n switch (runtimeContract.kind) {\n case ProviderProtocolRuntimeKind.LLM:\n // An arm that signs each request instead (#3780, Amazon Bedrock with IAM credentials) holds its two halves and an\n // optional session token, exactly as a signed document-extraction arm does below.\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.REST:\n /*\n * Same shape as `llm` above: the contract's `apiKey.secretRef` names the env var carrying the\n * key. Absent, this switch's `default` THREW at module load — and because these bindings are\n * computed while the module is evaluated, that killed the ENTIRE CLI: `wildo help` and\n * `wildo config validate` both died with `Unsupported provider runtime contract kind: rest`,\n * so a single unhandled provider kind made every unrelated command unusable.\n */\n pushSecret(runtimeContract.apiKey?.secretRef);\n break;\n case ProviderProtocolRuntimeKind.IMAGE:\n // Image-generation transport (gpt-image) — same API-key secret shape as llm.\n pushSecret(runtimeContract.apiKey.secretRef);\n break;\n case ProviderProtocolRuntimeKind.EMBEDDINGS:\n // Embeddings transport (RAG drain/retrieval) — same secret shape as llm, signed arms included (#3780).\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.DOCUMENT_EXTRACTION:\n // Document-extraction transport (OCR) — same API-key secret shape as llm/image/embeddings,\n // even though this family builds its own HTTPS request instead of handing the key to an SDK.\n // What the binding needs is the env var NAME, which is identical either way. A contract that signs\n // each request instead (#3426, AWS Textract) holds its two halves and an optional session token.\n pushSecret(runtimeContract.apiKey?.secretRef);\n pushSecret(runtimeContract.requestSigning?.keyIdSecretRef);\n pushSecret(runtimeContract.requestSigning?.secretKeySecretRef);\n pushSecret(runtimeContract.requestSigning?.sessionTokenSecretRef);\n break;\n case ProviderProtocolRuntimeKind.CONTENT_SAFETY:\n // A content-safety classifier (#2292): the same API-key shape as document extraction.\n pushSecret(runtimeContract.apiKey.secretRef);\n break;\n case ProviderProtocolRuntimeKind.ELECTRONIC_SIGNATURE:\n // An electronic-signature vendor (#2293): one API key in a header, like the classifier above, or the JWT-grant key it\n // is exchanged from; and, for a vendor whose base URL differs per account (DocuSign), the slot that holds it.\n pushSecret(runtimeContract.apiKey.secretRef);\n pushSecret(runtimeContract.baseUrlEnvVarName);\n break;\n case ProviderProtocolRuntimeKind.EMAIL:\n // The `email` runtime contract is a discriminated union on `delivery`:\n // the network variant (real providers — Resend, Postmark, Mailgun, …)\n // carries an `apiKey.secretRef`, while the `delivery: 'log'` variant\n // (the `email-preview` local/dev provider) intentionally carries NO\n // credentials — a log sink needs no API key. Branch on the contract\n // field, never on the provider ref: a log provider has no secret to bind.\n if (runtimeContract.delivery !== 'log') {\n pushSecret(runtimeContract.apiKey.secretRef);\n }\n break;\n case ProviderProtocolRuntimeKind.OAUTH2_SSO:\n pushSecret(runtimeContract.clientSecretRef);\n if (typeof runtimeContract.extensions?.teamIdSecretRef === 'string') {\n pushSecret(runtimeContract.extensions.teamIdSecretRef);\n }\n if (typeof runtimeContract.extensions?.keyIdSecretRef === 'string') {\n pushSecret(runtimeContract.extensions.keyIdSecretRef);\n }\n break;\n case ProviderProtocolRuntimeKind.BILLING:\n case ProviderProtocolRuntimeKind.WEBHOOK_ORIGINATOR:\n pushSecret(runtimeContract.secretRef);\n break;\n case ProviderProtocolRuntimeKind.SMS:\n // A receiving-email provider: the API key its message and attachment fetches carry (#1630).\n case ProviderProtocolRuntimeKind.EMAIL_INBOUND:\n pushSecret(runtimeContract.auth.secretRef);\n break;\n case ProviderProtocolRuntimeKind.AGENT_CLIENT_PROTOCOL:\n // A coding agent under host-managed auth (the default) declares no\n // secretRef at all — `pushSecret` is a no-op for `undefined`, which is\n // the correct outcome: nothing to bind, and nothing to warn about.\n pushSecret(runtimeContract.secretRef);\n break;\n default: {\n // Exhaustive on purpose: every engine-side switch over `runtimeContract.kind` carries this\n // `never` check, and this site was the one that did not — which is exactly how the\n // `embeddings` kind shipped without a case here and crashed `wildo local dev` at module load\n // (2026-08-27). A new kind must fail COMPILATION here, not the next developer's startup.\n const exhaustiveCheck: never = runtimeContract;\n throw new Error(`Unsupported provider runtime contract kind: ${JSON.stringify(exhaustiveCheck)}`);\n }\n }\n\n // Execution-profile secret bindings.\n //\n // NOTE this is a SECOND dispatch on the same axis as the switch above, and it\n // is an `if` rather than a `case`, so the `never` check does NOT protect it:\n // a new execution-profile-bearing kind added to the switch and forgotten here\n // compiles perfectly and silently binds no environment variable, leaving the\n // agent to fail at auth time with no indication that a secret was authored.\n // Every kind that owns execution profiles must be listed.\n if (runtimeContract.kind === ProviderProtocolRuntimeKind.AGENT_CLIENT_PROTOCOL) {\n const agentClientProtocolConfig = configuredProtocol as\n | {\n executionProfiles?: Record<\n string,\n {\n authMode?: string;\n secretRef?: string;\n secretEnvVarName?: string;\n }\n >;\n }\n | undefined;\n const executionProfiles = agentClientProtocolConfig?.executionProfiles ?? {};\n for (const [executionProfileRef, executionProfile] of Object.entries(executionProfiles)) {\n if (\n executionProfile.authMode === 'secret_ref_env_injection'\n && executionProfile.secretRef\n && executionProfile.secretEnvVarName\n ) {\n bindings.push({\n protocolKind: protocol.protocol,\n secretRef: executionProfile.secretRef,\n envVarName: executionProfile.secretEnvVarName,\n executionProfileRef,\n });\n }\n }\n }\n\n return bindings.filter((binding, index, allBindings) => (\n allBindings.findIndex((candidate) => (\n candidate.protocolKind === binding.protocolKind\n && candidate.secretRef === binding.secretRef\n && candidate.envVarName === binding.envVarName\n && candidate.executionProfileRef === binding.executionProfileRef\n )) === index\n ));\n}\n\n/**\n * Every environment variable the named provider's PROTOCOL BINDINGS require.\n *\n * Resolves through the composed catalogue (#329). A provider known only from a companion\n * contribution has no runtime contracts, so this answers `[]` for it — deliberately, and without\n * loss: its secret keys are classified and allow-listed from its `secretsContract` shape, which\n * for every engine provider measured is a superset of what the bindings name.\n */\nexport function getProviderSecretEnvBindings(\n providerRef: string,\n configuredProtocols?: Partial<Record<string, Record<string, unknown>>>,\n): ProviderSecretEnvBinding[] {\n const entry = getComposedProviderEntry(providerRef);\n if (!entry) return [];\n\n return entry.protocolBindings.flatMap((protocol) => (\n getProtocolSecretEnvBindings(\n providerRef,\n protocol,\n getConfiguredProtocol(configuredProtocols, protocol.protocol),\n )\n ));\n}\n\n/**\n * Derives the canonical env var name for a provider's generic secret binding\n * from its protocol definitions.\n *\n * This is useful for setup flows that collect one provider secret value and\n * need to store it directly in the canonical `providerEnv` map. Transport-aware\n * callers should still prefer `getProviderSecretEnvBindings()`.\n */\nexport function getProviderSecretEnvVarName(\n providerRefOrModule: string | BackendProviderModule,\n): string | undefined {\n const providerRef =\n typeof providerRefOrModule === 'string'\n ? providerRefOrModule\n : providerRefOrModule.metadata.ref;\n const bindings = getProviderSecretEnvBindings(providerRef);\n return bindings.find((binding) => !binding.executionProfileRef)?.envVarName;\n}\n\n/**\n * Every provider-related env var name that must be classified as sensitive.\n *\n * Derived from the COMPOSED catalogue (#329) — engine tier plus whatever discovery registered —\n * so a package-shipped provider's key is classified like any other. It used to enumerate\n * `EngineBackendProviderRegistry` alone, which meant a package provider's key was attributable to\n * nobody: unclassified for the Secret/ConfigMap split, and kept by the confinement filter as\n * \"configuration\".\n *\n * Recomputed whenever composition changes rather than cached once, because discovery necessarily\n * runs after this module is imported.\n */\nexport const getProviderSensitiveEnvKeys: () => ReadonlySet<string> = memoiseOverCatalogue(() => {\n const keys = new Set<string>();\n for (const entry of getComposedProviderSecretsCatalogue().values()) {\n for (const secret of entry.secrets) keys.add(secret.envVarName);\n for (const binding of getProviderSecretEnvBindings(entry.providerRef)) keys.add(binding.envVarName);\n }\n return keys;\n});\n\n/** One secret a provider declares. */\nexport interface ProviderSelectionSecret {\n envVarName: string;\n description?: string;\n /** The provider refuses to boot without this var once the provider is enabled. */\n required: boolean;\n}\n\n/** One provider that declares at least one secret, with its operator-facing label. */\nexport interface ProviderSelectionCatalogEntry {\n providerRef: string;\n /** Operator-facing label (falls back to the ref when no display name is set). */\n label: string;\n /** Every secret this provider declares, in contract order. */\n secrets: ProviderSelectionSecret[];\n}\n\n/**\n * Every provider that declares a secret, derived from the COMPOSED provider catalogue (engine tier plus\n * whatever discovery registered — #329), sorted by label. `wildo setup`'s summary names the configured\n * providers from it.\n *\n * It used to power a setup step that offered this whole catalogue for credentials, grouped by a\n * presentation category. That step was removed (#1637): setup asks only for the companion's LLM key, and\n * every other secret is asked when its feature needs it (`wildo secrets`), derived from what the\n * application scopes rather than from everything that exists. The grouping went with it.\n *\n * Providers with an empty `secretsContract` (e.g. the `email-preview` log sink) are omitted.\n */\nexport function getProviderSelectionCatalog(): ProviderSelectionCatalogEntry[] {\n const entries: ProviderSelectionCatalogEntry[] = [];\n for (const provider of getComposedProviderSecretsCatalogue().values()) {\n const secrets: ProviderSelectionSecret[] = provider.secrets.map((secret) => ({\n envVarName: secret.envVarName,\n description: secret.description,\n required: secret.required,\n }));\n if (secrets.length === 0) continue;\n entries.push({ providerRef: provider.providerRef, label: provider.label, secrets });\n }\n return entries.sort((a, b) => a.label.localeCompare(b.label));\n}\n\n/**\n * All provider env-var names classified as sensitive, as a LIVE view.\n *\n * It was a module-load snapshot until #329, and a snapshot cannot work once composition is a\n * thing that happens: this module is imported by `credentials.schemas.ts` on the CLI's first\n * touch of the credential layer, which is always before an application's provider packages have\n * been discovered. A snapshot would therefore have been permanently blind to exactly the tier\n * this slice exists to classify. The exported NAME and the `.has()` shape are unchanged, so its\n * consumers need no edit.\n */\nexport const PROVIDER_SENSITIVE_ENV_KEYS: ReadonlySet<string> = new LiveEnvKeySet(getProviderSensitiveEnvKeys);\n\n// ============================================================================\n// Provider API-key resolution over the composed catalogue (seam for #331)\n// ============================================================================\n\n/**\n * Why a provider's credential could not be resolved.\n *\n * A closed vocabulary rather than a message string, because the caller BRANCHES on it: an\n * executor surfaces `SECRET_NOT_PROVISIONED` to an operator as \"run `wildo secrets set`\", and\n * `NOT_IN_SCOPE` to a developer as \"this runtime does not declare that provider\" — two very\n * different remedies that a single \"failed to resolve\" would have flattened.\n */\nexport enum ProviderApiKeyRefusal {\n /** No entry in the composed catalogue claims the ref — engine tier or discovered. */\n UNKNOWN_PROVIDER = 'unknown_provider',\n /** The runtime's declared provider scope does not carry this provider. */\n NOT_IN_SCOPE = 'not_in_scope',\n /** An operation named `requiredScopes` slugs the provider does not declare. */\n UNDECLARED_SCOPES = 'undeclared_scopes',\n /**\n * The caller named a `secretSlug` the provider does not declare.\n *\n * Distinct from `UNDECLARED_SCOPES` on purpose, even though both mean \"a slug that is not in the\n * contract\": one says an OPERATION requires a credential the package never ships (re-generate or\n * retire the operation), the other says THIS CALL asked for the wrong slug (a caller bug). A\n * caller branches differently on each, and merging two remedies under one member is exactly the\n * vocabulary collapse this repository's closed-vocabulary rule exists to prevent.\n */\n UNDECLARED_SECRET_SLUG = 'undeclared_secret_slug',\n /** The contract declares several candidate secrets and the caller named none. */\n AMBIGUOUS_SECRET = 'ambiguous_secret',\n /** The contract is satisfied; the value is simply not provisioned in this environment. */\n SECRET_NOT_PROVISIONED = 'secret_not_provisioned',\n}\n\nexport type ProviderApiKeyResolution =\n | { ok: true; providerRef: string; secretSlug: string; envVarName: string; value: string }\n | { ok: false; providerRef: string; refusal: ProviderApiKeyRefusal; detail: string };\n\nexport interface ProviderApiKeyRequest {\n providerRef: string;\n /**\n * What the runtime asking for the key is entitled to. Positional-equivalent to the scope\n * threaded through {@link declaredProviderScope} everywhere else in this layer, and required\n * for the same reason: an optional entitlement is one nobody decides, and the whole provider\n * bag reaching every runtime is what that produced last time.\n */\n runtimeScope: RuntimeProviderScope;\n /** Where values come from. Never `process.env` read by this function — the caller decides. */\n providerEnv: Record<string, string>;\n /**\n * Secret-contract SLUGS an operation requires, checked against the provider's contract.\n *\n * These are contract slugs, NOT OAuth scopes: a delegated-authorization scope check needs a\n * connected-account store and belongs to the delegated-auth slice. What is honestly checkable\n * here is that every credential a catalogue operation names is one the provider package\n * actually declares — so a generated operation asking for a credential its package never\n * ships is refused at resolution instead of at the vendor's 401.\n */\n requiredScopes?: readonly string[];\n /** Which contract slug carries the key. Defaults to the sole required (else sole) secret. */\n secretSlug?: string;\n}\n\n/**\n * Resolve one provider credential over the COMPOSED catalogue.\n *\n * The seam #331's operation executor consumes (plan, wave-1 seam table). Three properties are\n * what make it worth having over a bare `providerEnv[secretRef]`:\n *\n * 1. It resolves over the composed catalogue, so it answers for a package-shipped provider the\n * moment discovery registers one, and refuses `UNKNOWN_PROVIDER` BY NAME before that — rather\n * than silently reading an env var nothing claims.\n * 2. It checks entitlement against the same {@link RuntimeProviderScope} the confinement filter\n * uses, so \"the executor could read it\" and \"the env var was allowed into this runtime\" can\n * never disagree.\n * 3. It never touches `process.env`. The caller supplies the source, which keeps the function a\n * pure decision and therefore testable without an ambient environment.\n */\nexport function getProviderApiKey(input: ProviderApiKeyRequest): ProviderApiKeyResolution {\n const { providerRef, runtimeScope, providerEnv, requiredScopes = [], secretSlug } = input;\n\n const entry = getComposedProviderEntry(providerRef);\n if (!entry) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.UNKNOWN_PROVIDER,\n detail:\n `No provider '${providerRef}' in the composed catalogue. Either the application does not `\n + 'declare its package, or discovery has not registered its companion contribution.',\n };\n }\n\n if (\n runtimeScope.kind === RuntimeProviderScopeKind.DECLARED\n && !runtimeScope.providerRefs.includes(providerRef)\n ) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.NOT_IN_SCOPE,\n detail:\n `This runtime declares [${runtimeScope.providerRefs.join(', ') || 'none'}] and not `\n + `'${providerRef}', so its credential is deliberately absent from this environment.`,\n };\n }\n\n const declaredSlugs = new Set(entry.secrets.map((secret) => secret.slug));\n const missingScopes = requiredScopes.filter((slug) => !declaredSlugs.has(slug));\n if (missingScopes.length > 0) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.UNDECLARED_SCOPES,\n detail:\n `Provider '${providerRef}' declares no secret-contract slug [${missingScopes.join(', ')}]; `\n + `its contract holds [${[...declaredSlugs].join(', ') || 'none'}].`,\n };\n }\n\n const candidates = entry.secrets.filter((secret) => secret.required);\n const resolvedSecret = secretSlug\n ? entry.secrets.find((secret) => secret.slug === secretSlug)\n : (candidates.length === 1 ? candidates[0] : (entry.secrets.length === 1 ? entry.secrets[0] : undefined));\n\n if (!resolvedSecret) {\n return {\n ok: false,\n providerRef,\n refusal: secretSlug ? ProviderApiKeyRefusal.UNDECLARED_SECRET_SLUG : ProviderApiKeyRefusal.AMBIGUOUS_SECRET,\n detail: secretSlug\n ? `Provider '${providerRef}' declares no secret-contract slug '${secretSlug}'.`\n : `Provider '${providerRef}' declares ${entry.secrets.length} secrets and none is uniquely `\n + 'required — name the slug that carries the credential.',\n };\n }\n\n const value = providerEnv[resolvedSecret.envVarName];\n if (!value) {\n return {\n ok: false,\n providerRef,\n refusal: ProviderApiKeyRefusal.SECRET_NOT_PROVISIONED,\n detail:\n `Provider '${providerRef}' is in scope and declares '${resolvedSecret.slug}', but `\n + `${resolvedSecret.envVarName} carries no value in this environment. Provide it with `\n + `\\`wildo secrets set ${resolvedSecret.envVarName}\\`.`,\n };\n }\n\n return {\n ok: true,\n providerRef,\n secretSlug: resolvedSecret.slug,\n envVarName: resolvedSecret.envVarName,\n value,\n };\n}\n"]}
@@ -35,7 +35,8 @@ export interface SecretRequirement {
35
35
  /**
36
36
  * The runtimes that RECEIVE the key in their environment — the processes a change regenerates and
37
37
  * restarts — as their scope path. For an UNUSED key that is where it is carried, not where it is used:
38
- * `backend`, `companion`, `minions.<key>`, `workers.<key>`, `frontendServices.<key>`.
38
+ * `backend`, `companion`, `minions.<key>`, `workers.<key>`. Never a `frontendServices.<key>` for a provider key: no
39
+ * frontend service is built with a provider env (#3837), whatever it uses the provider for.
39
40
  */
40
41
  readonly runtimes: readonly string[];
41
42
  readonly standing: ApplicationSecretStanding;
@@ -1 +1 @@
1
- {"version":3,"file":"secret-requirements.service.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/secret-requirements.service.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAEL,gBAAgB,EAUjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,mCAAmC,EACzC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAKzG,MAAM,WAAW,iBAAiB;IAChC,oHAAoH;IACpH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,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47
47
  const KEYED_SCOPE_FAMILIES = ['frontendServices', 'minions', 'workers'];
48
+ /** The scope family whose runtimes are frontend services: they use providers and receive none of their secrets. */
49
+ const FRONTEND_SERVICES_SCOPE_FAMILY = 'frontendServices';
48
50
  /** Every scoped runtime with the provider refs it declares, as `backend`, `companion` or `<family>.<key>`. */
49
51
  export function flattenProviderScopes(scopes) {
50
52
  const runtimes = [];
@@ -570,7 +572,7 @@ function deriveProviderRequirements(input, isSet) {
570
572
  : entry.description ?? null,
571
573
  required,
572
574
  capabilities,
573
- runtimes,
575
+ runtimes: runtimesReceivingProviderKey(runtimes),
574
576
  standing: set ? ApplicationSecretStanding.SET : needed ? ApplicationSecretStanding.NEEDED : ApplicationSecretStanding.AVAILABLE,
575
577
  creationEssential: capabilities.includes(CREATION_ESSENTIAL_CAPABILITY)
576
578
  && companionUnread !== undefined
@@ -733,6 +735,20 @@ function deriveUnusedSecrets(owners, present, presence, claimed) {
733
735
  }
734
736
  return rows;
735
737
  }
738
+ /**
739
+ * Of the runtimes whose scope names a provider, those that RECEIVE its keys (#3837): every one but a frontend service.
740
+ *
741
+ * The env builders give provider secrets to the backend, to each minion and worker (filtered to its scope), and to the
742
+ * companion; no frontend service is built with a provider env, so its `.env` carries none of them (a browser provider's
743
+ * public configuration reaches it as configuration, never as a secret). A frontend service still USES the provider (its
744
+ * capabilities count for coverage through `runtimesByRef`); it does not receive the key, so it is neither named as a
745
+ * receiver in `wildo secrets list` nor restarted when the key changes. Measured on Wonder Todos, 2026-11-15:
746
+ * `TEAMS_BOT_APP_PASSWORD` was listed "received by backend, frontendServices.app" while `frontend/.env` held no
747
+ * `TEAMS_BOT_*` key.
748
+ */
749
+ function runtimesReceivingProviderKey(scopedRuntimes) {
750
+ return scopedRuntimes.filter((runtime) => !runtime.startsWith(`${FRONTEND_SERVICES_SCOPE_FAMILY}.`));
751
+ }
736
752
  /**
737
753
  * The runtimes whose generated `.env` still carries an unused key — read off the env builder's own delivery
738
754
  * rules, since they are what put it there: