@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
@@ -0,0 +1,153 @@
1
+ /**
2
+ * The backend paths an outside party must reach, forwarded through the tunnel; every other path answers 404.
3
+ *
4
+ * The API's protocol surfaces (`/api/v1/a2a…`, `/api/v1/mcp…`, the OAuth endpoints, the discovery documents and the
5
+ * webhooks) and the root RFC 8414 / RFC 9728 discovery aliases. Not `/api/v1/auth/*` (sign-in), not the resource API,
6
+ * not `/internal/*`, not `/health*`: a dev stack signs in with known credentials and must not be reachable beyond the
7
+ * protocol doors.
8
+ */
9
+ export declare const TUNNEL_FORWARDED_API_PATHS: readonly string[];
10
+ /** One application's entry in the machine's tunnel. */
11
+ export interface TunnelApplicationRoute {
12
+ readonly hostname: string;
13
+ readonly backendPort: number;
14
+ }
15
+ /** A hostname the tunnel serves that is not an application: a test receiver. */
16
+ export interface TunnelExtraRoute {
17
+ readonly hostname: string;
18
+ /** `http://127.0.0.1:<port>`: always a local service. */
19
+ readonly service: string;
20
+ }
21
+ /** What an application records while its public origin is the tunnel's. Machine-local, gitignored, throwaway. */
22
+ export interface ApplicationTunnelState {
23
+ readonly schemaVersion: 1;
24
+ readonly tunnelName: string;
25
+ readonly hostname: string;
26
+ /** `https://<hostname>`: the default frontend's `publicUrl` while the tunnel runs. */
27
+ readonly publicOrigin: string;
28
+ /** The frontend service whose `publicUrl` follows the tunnel: the one the backend resolves as its default. */
29
+ readonly frontendServiceName: string;
30
+ readonly backendPort: number;
31
+ }
32
+ /** The machine's one tunnel process and everything it serves. */
33
+ export interface MachineTunnelState {
34
+ readonly schemaVersion: 1;
35
+ readonly tunnelName: string;
36
+ readonly pid: number | null;
37
+ readonly configPath: string;
38
+ readonly logPath: string;
39
+ /** Keyed by application root. */
40
+ readonly applications: Record<string, TunnelApplicationRoute>;
41
+ readonly extras: readonly TunnelExtraRoute[];
42
+ /**
43
+ * The credentials file the tunnel was started with when it was GIVEN (`--credentials-file`), on a machine with no
44
+ * Cloudflare login (#3907 item 3, the QA VM). A restart then reuses it instead of asking the account, which that
45
+ * machine cannot do. Absent when the tunnel was found through this machine's login.
46
+ */
47
+ readonly givenCredentialsFile?: string;
48
+ }
49
+ export declare const APPLICATION_TUNNEL_STATE_FILE: string;
50
+ /** `~/.wildo/tunnel`: the machine's tunnel files. Overridable for tests. */
51
+ export declare function machineTunnelDirectory(home?: string): string;
52
+ export declare function applicationTunnelStatePath(appRoot: string): string;
53
+ export declare function readMachineTunnelState(directory?: string): MachineTunnelState | null;
54
+ export declare function writeMachineTunnelState(state: MachineTunnelState, directory?: string): void;
55
+ export declare function readApplicationTunnelState(appRoot: string): ApplicationTunnelState | null;
56
+ export declare function writeApplicationTunnelState(appRoot: string, state: ApplicationTunnelState): void;
57
+ export declare function removeApplicationTunnelState(appRoot: string): void;
58
+ /**
59
+ * Whether `pid` is the machine's tunnel: a live process this user owns that runs `cloudflared` with `configPath`.
60
+ *
61
+ * A pid alone is not enough (#3907 review F4): after a reboot it may name an unrelated process, which the command would
62
+ * then signal and the env generation would believe is the tunnel. So the process's own command line must name both.
63
+ */
64
+ export declare function processIsTunnel(pid: number | null | undefined, configPath: string): boolean;
65
+ /**
66
+ * The application's tunnel, only when it is in effect: its state exists, the machine's tunnel serves it, and the
67
+ * recorded `cloudflared` process is alive. A state left behind by a crash or a reboot is IGNORED (and named by
68
+ * `staleReason`), so the next env generation never advertises a dead issuer.
69
+ */
70
+ export declare function readLiveApplicationTunnel(appRoot: string, directory?: string, isTunnel?: (pid: number | null | undefined, configPath: string) => boolean): {
71
+ readonly live: ApplicationTunnelState | null;
72
+ readonly staleReason: string | null;
73
+ };
74
+ /**
75
+ * The `cloudflared` ingress for the machine's tunnel: per application, the forwarded API paths to its backend and a 404
76
+ * for everything else on its hostname; then the extras; then a catch-all 404.
77
+ *
78
+ * spec-cite: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file/
79
+ * (fetched 2026-11-16): the ingress check shows "the first rule that matches", and "Configuration files that contain
80
+ * ingress rules must always include a catch-all rule that concludes the file."
81
+ */
82
+ export declare function buildTunnelIngressYaml(input: {
83
+ readonly tunnelName: string;
84
+ readonly credentialsFile: string;
85
+ readonly applications: readonly TunnelApplicationRoute[];
86
+ readonly extras: readonly TunnelExtraRoute[];
87
+ }): string;
88
+ /** The `cloudflared` operations the command needs, injectable for tests. */
89
+ export interface CloudflaredRunner {
90
+ /** Run a `cloudflared` subcommand to completion; resolves its stdout, rejects with its stderr. */
91
+ exec(args: readonly string[]): Promise<string>;
92
+ /** Start `cloudflared` detached with its output in `logPath`; resolves the pid. */
93
+ startDetached(args: readonly string[], logPath: string): number;
94
+ /** Stop a process this command started. */
95
+ stop(pid: number): void;
96
+ }
97
+ export declare const systemCloudflaredRunner: CloudflaredRunner;
98
+ /** The named tunnel's id, creating the tunnel when this machine's `cert.pem` login has none by that name. */
99
+ export declare function ensureNamedTunnel(runner: CloudflaredRunner, tunnelName: string): Promise<{
100
+ readonly id: string;
101
+ readonly created: boolean;
102
+ }>;
103
+ /**
104
+ * Route `hostname` to the tunnel, or refuse.
105
+ *
106
+ * `cloudflared tunnel route dns` already SUCCEEDS when the record routes to this tunnel ("is already configured to route
107
+ * to your tunnel"), so the idempotent case needs no handling. The error it raises for an existing record ("An A, AAAA, or
108
+ * CNAME record with that host already exists") is the case where the hostname points ELSEWHERE — another tunnel, or a
109
+ * record someone else made. That is never tolerated (#3907 review F1): the application would advertise an issuer, its
110
+ * audiences and its agent card on a host another party serves, and outside clients would send their tokens there.
111
+ */
112
+ export declare function routeHostname(runner: CloudflaredRunner, tunnelName: string, hostname: string): Promise<void>;
113
+ /** Wait until `cloudflared` reports a registered connection in its log, or the process ends; `false` on timeout. */
114
+ export declare function waitForTunnelConnection(logPath: string, pid: number, configPath: string, options?: {
115
+ timeoutMs?: number;
116
+ isTunnel?: typeof processIsTunnel;
117
+ readLog?: (path: string) => string;
118
+ sleep?: (ms: number) => Promise<void>;
119
+ }): Promise<boolean>;
120
+ /** Wait until a stopped `cloudflared` has exited, so two connectors with different ingress never overlap (review F12). */
121
+ export declare function waitForTunnelExit(pid: number, configPath: string, options?: {
122
+ timeoutMs?: number;
123
+ isTunnel?: typeof processIsTunnel;
124
+ sleep?: (ms: number) => Promise<void>;
125
+ }): Promise<boolean>;
126
+ /** The credentials file `cloudflared tunnel create` wrote for a locally-managed tunnel. */
127
+ export declare function credentialsFileOf(tunnelId: string, home?: string): string;
128
+ /** Whether `cloudflared` is installed and logged in (`cert.pem`), with what to do when it is not. */
129
+ /**
130
+ * The tunnel id a credentials file holds (`TunnelID`), read without ever returning or logging the secret beside it.
131
+ * Refuses a file that is not one (#3907 item 3: the QA VM receives the file as a CI secret, so a malformed secret must
132
+ * fail here, by name, rather than as a cloudflared connection that never registers).
133
+ */
134
+ export declare function tunnelIdOfCredentialsFile(path: string): string;
135
+ export declare function cloudflaredReadiness(home?: string): string | null;
136
+ /** A runtime endpoint as the env generation writes it (`RuntimeEndpointUrls` in `@wildo-ai/platform-core-shared`). */
137
+ interface WritableRuntimeEndpoint {
138
+ publicUrl: string;
139
+ internalUrl: string;
140
+ additionalBrowserOrigins?: string[];
141
+ }
142
+ /**
143
+ * The runtime endpoints with a live tunnel applied: ONLY the tunnel's frontend gets the public origin as its `publicUrl`,
144
+ * and keeps the local listen origin as an additional browser origin, so the developer's own browser still passes every
145
+ * origin check. Every other endpoint (the backend's included: the SPA builds its WebSocket URL from it) is unchanged.
146
+ * Returns the input when there is no tunnel, or when its frontend has no endpoint (named in `skipped`).
147
+ */
148
+ export declare function applyTunnelToRuntimeEndpoints<T extends Record<string, WritableRuntimeEndpoint>>(endpoints: T, tunnel: Pick<ApplicationTunnelState, 'publicOrigin' | 'frontendServiceName'> | null): {
149
+ readonly endpoints: T;
150
+ readonly skipped: string | null;
151
+ };
152
+ export {};
153
+ //# sourceMappingURL=local-tunnel.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-tunnel.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/local-tunnel.service.ts"],"names":[],"mappings":"AAmCA;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAGvD,CAAC;AAEF,uDAAuD;AACvD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAA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gB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEpF;AAED,qGAAqG;AACrG;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAY9D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,GAAG,IAAI,CAI5E;AAED,sHAAsH;AACtH,UAAU,uBAAuB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAC7F,SAAS,EAAE,CAAC,EACZ,MAAM,EAAE,IAAI,CAAC,sBAAsB,EAAE,cAAc,GAAG,qBAAqB,CAAC,GAAG,IAAI,GAClF;IAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAgB5D"}
@@ -0,0 +1,294 @@
1
+ /**
2
+ * A locally-managed Cloudflare tunnel that gives a local application a public HTTPS origin while it runs (#3907).
3
+ *
4
+ * ## What it is for
5
+ *
6
+ * An outside party (an A2A client following the agent card, an MCP client, a push receiver, a vendor webhook) cannot
7
+ * reach `http://localhost`. A named tunnel ends TLS at Cloudflare's edge and forwards to the local backend, which keeps
8
+ * listening on plain http: the 2026-08-14 failure (a backend port advertising https with no certificate) cannot recur.
9
+ *
10
+ * ## The shape, and why
11
+ *
12
+ * - **One public origin per application** (`https://<app>-<machine>.wildo.ai`). The engine derives the OAuth issuer, every
13
+ * audience and the A2A card `url` from the default frontend's `publicUrl` + `/api/v1`, as behind a deployed ingress, so
14
+ * the tunnel path-routes that origin: the protocol paths go to the backend, everything else answers 404
15
+ * ({@link TUNNEL_FORWARDED_API_PATHS}). The frontend is not exposed until Cloudflare Access fronts it.
16
+ * - **One `cloudflared` process per MACHINE**, whose ingress is the union of every application that is up plus the
17
+ * declared extras (a test receiver). Two connectors of one named tunnel with different ingress would answer each
18
+ * other's requests: two connectors of one tunnel are replicas, and "Replicas do not support traffic steering".
19
+ * - **Only the default frontend's `publicUrl` follows the tunnel**, and only while the recorded process is alive
20
+ * ({@link readLiveApplicationTunnel}); the local listen origin stays a configured browser origin
21
+ * (`additionalBrowserOrigins`). See `AppBootstrapService.buildRuntimeEndpoints`.
22
+ *
23
+ * Off by default: nothing here runs unless `wildo local tunnel up` is asked, and a running dev stack (which signs in with
24
+ * known local credentials) is never reachable by accident.
25
+ *
26
+ * spec-cite: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/deploy-tunnels/deploy-cloudflared-replicas/
27
+ * (fetched 2026-11-16): "Replicas do not support traffic steering (such as round-robin or hash-based routing)." and
28
+ * "Cloudflare retries with other replicas, but there is no guarantee about which one is chosen."
29
+ */
30
+ import { spawn, execFile, execFileSync } from 'child_process';
31
+ import { existsSync, mkdirSync, openSync, readFileSync, rmSync, writeFileSync } from 'fs';
32
+ import { homedir } from 'os';
33
+ import { dirname, join } from 'path';
34
+ import { promisify } from 'util';
35
+ /**
36
+ * The backend paths an outside party must reach, forwarded through the tunnel; every other path answers 404.
37
+ *
38
+ * The API's protocol surfaces (`/api/v1/a2a…`, `/api/v1/mcp…`, the OAuth endpoints, the discovery documents and the
39
+ * webhooks) and the root RFC 8414 / RFC 9728 discovery aliases. Not `/api/v1/auth/*` (sign-in), not the resource API,
40
+ * not `/internal/*`, not `/health*`: a dev stack signs in with known credentials and must not be reachable beyond the
41
+ * protocol doors.
42
+ */
43
+ export const TUNNEL_FORWARDED_API_PATHS = [
44
+ '^/api/v1/(a2a|mcp|oauth|\\.well-known|webhooks)(/|$)',
45
+ '^/\\.well-known/',
46
+ ];
47
+ export const APPLICATION_TUNNEL_STATE_FILE = join('.wildo-saas', 'state', 'tunnel.json');
48
+ /** `~/.wildo/tunnel`: the machine's tunnel files. Overridable for tests. */
49
+ export function machineTunnelDirectory(home = homedir()) {
50
+ return join(home, '.wildo', 'tunnel');
51
+ }
52
+ export function applicationTunnelStatePath(appRoot) {
53
+ return join(appRoot, APPLICATION_TUNNEL_STATE_FILE);
54
+ }
55
+ function readJson(path) {
56
+ try {
57
+ return JSON.parse(readFileSync(path, 'utf8'));
58
+ }
59
+ catch {
60
+ return null;
61
+ }
62
+ }
63
+ function writeJson(path, value) {
64
+ mkdirSync(dirname(path), { recursive: true });
65
+ writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);
66
+ }
67
+ export function readMachineTunnelState(directory = machineTunnelDirectory()) {
68
+ return readJson(join(directory, 'state.json'));
69
+ }
70
+ export function writeMachineTunnelState(state, directory = machineTunnelDirectory()) {
71
+ writeJson(join(directory, 'state.json'), state);
72
+ }
73
+ export function readApplicationTunnelState(appRoot) {
74
+ return readJson(applicationTunnelStatePath(appRoot));
75
+ }
76
+ export function writeApplicationTunnelState(appRoot, state) {
77
+ writeJson(applicationTunnelStatePath(appRoot), state);
78
+ }
79
+ export function removeApplicationTunnelState(appRoot) {
80
+ rmSync(applicationTunnelStatePath(appRoot), { force: true });
81
+ }
82
+ /**
83
+ * Whether `pid` is the machine's tunnel: a live process this user owns that runs `cloudflared` with `configPath`.
84
+ *
85
+ * A pid alone is not enough (#3907 review F4): after a reboot it may name an unrelated process, which the command would
86
+ * then signal and the env generation would believe is the tunnel. So the process's own command line must name both.
87
+ */
88
+ export function processIsTunnel(pid, configPath) {
89
+ if (!pid || pid <= 0)
90
+ return false;
91
+ try {
92
+ process.kill(pid, 0);
93
+ }
94
+ catch {
95
+ return false;
96
+ }
97
+ try {
98
+ const command = execFileSync('ps', ['-o', 'command=', '-p', String(pid)], { encoding: 'utf8' });
99
+ return command.includes('cloudflared') && command.includes(configPath);
100
+ }
101
+ catch {
102
+ return false;
103
+ }
104
+ }
105
+ /**
106
+ * The application's tunnel, only when it is in effect: its state exists, the machine's tunnel serves it, and the
107
+ * recorded `cloudflared` process is alive. A state left behind by a crash or a reboot is IGNORED (and named by
108
+ * `staleReason`), so the next env generation never advertises a dead issuer.
109
+ */
110
+ export function readLiveApplicationTunnel(appRoot, directory = machineTunnelDirectory(), isTunnel = processIsTunnel) {
111
+ const state = readApplicationTunnelState(appRoot);
112
+ if (!state)
113
+ return { live: null, staleReason: null };
114
+ const machine = readMachineTunnelState(directory);
115
+ if (!machine || machine.applications[appRoot]?.hostname !== state.hostname) {
116
+ return { live: null, staleReason: `the machine's tunnel does not serve ${state.hostname}` };
117
+ }
118
+ if (!isTunnel(machine.pid, machine.configPath)) {
119
+ return { live: null, staleReason: `the tunnel process (pid ${machine.pid ?? 'none'}) is not running` };
120
+ }
121
+ return { live: state, staleReason: null };
122
+ }
123
+ /**
124
+ * The `cloudflared` ingress for the machine's tunnel: per application, the forwarded API paths to its backend and a 404
125
+ * for everything else on its hostname; then the extras; then a catch-all 404.
126
+ *
127
+ * spec-cite: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file/
128
+ * (fetched 2026-11-16): the ingress check shows "the first rule that matches", and "Configuration files that contain
129
+ * ingress rules must always include a catch-all rule that concludes the file."
130
+ */
131
+ export function buildTunnelIngressYaml(input) {
132
+ const lines = [
133
+ `tunnel: ${input.tunnelName}`,
134
+ `credentials-file: ${input.credentialsFile}`,
135
+ 'ingress:',
136
+ ];
137
+ for (const application of input.applications) {
138
+ for (const path of TUNNEL_FORWARDED_API_PATHS) {
139
+ lines.push(` - hostname: ${application.hostname}`, ` path: ${JSON.stringify(path)}`, ` service: http://127.0.0.1:${application.backendPort}`);
140
+ }
141
+ lines.push(` - hostname: ${application.hostname}`, ' service: http_status:404');
142
+ }
143
+ for (const extra of input.extras) {
144
+ lines.push(` - hostname: ${extra.hostname}`, ` service: ${extra.service}`);
145
+ }
146
+ lines.push(' - service: http_status:404', '');
147
+ return lines.join('\n');
148
+ }
149
+ export const systemCloudflaredRunner = {
150
+ async exec(args) {
151
+ const { stdout } = await promisify(execFile)('cloudflared', [...args], { maxBuffer: 8 * 1024 * 1024 });
152
+ return stdout;
153
+ },
154
+ startDetached(args, logPath) {
155
+ mkdirSync(dirname(logPath), { recursive: true });
156
+ const out = openSync(logPath, 'a');
157
+ const child = spawn('cloudflared', [...args], { detached: true, stdio: ['ignore', out, out] });
158
+ child.unref();
159
+ if (!child.pid)
160
+ throw new Error('cloudflared did not start');
161
+ return child.pid;
162
+ },
163
+ stop(pid) {
164
+ try {
165
+ process.kill(pid, 'SIGTERM');
166
+ }
167
+ catch { /* already gone */ }
168
+ },
169
+ };
170
+ /** `cloudflared tunnel list --output json`, read defensively: anything but an array is no tunnel. */
171
+ async function listTunnels(runner, tunnelName) {
172
+ const parsed = JSON.parse(await runner.exec(['tunnel', 'list', '--output', 'json', '--name', tunnelName]));
173
+ return Array.isArray(parsed) ? parsed : [];
174
+ }
175
+ /** The named tunnel's id, creating the tunnel when this machine's `cert.pem` login has none by that name. */
176
+ export async function ensureNamedTunnel(runner, tunnelName) {
177
+ const existing = (await listTunnels(runner, tunnelName)).find((tunnel) => tunnel.name === tunnelName && tunnel.id);
178
+ if (existing?.id)
179
+ return { id: existing.id, created: false };
180
+ await runner.exec(['tunnel', 'create', tunnelName]);
181
+ const created = (await listTunnels(runner, tunnelName)).find((tunnel) => tunnel.name === tunnelName && tunnel.id);
182
+ if (!created?.id)
183
+ throw new Error(`cloudflared created no tunnel named ${tunnelName}`);
184
+ return { id: created.id, created: true };
185
+ }
186
+ /**
187
+ * Route `hostname` to the tunnel, or refuse.
188
+ *
189
+ * `cloudflared tunnel route dns` already SUCCEEDS when the record routes to this tunnel ("is already configured to route
190
+ * to your tunnel"), so the idempotent case needs no handling. The error it raises for an existing record ("An A, AAAA, or
191
+ * CNAME record with that host already exists") is the case where the hostname points ELSEWHERE — another tunnel, or a
192
+ * record someone else made. That is never tolerated (#3907 review F1): the application would advertise an issuer, its
193
+ * audiences and its agent card on a host another party serves, and outside clients would send their tokens there.
194
+ */
195
+ export async function routeHostname(runner, tunnelName, hostname) {
196
+ try {
197
+ await runner.exec(['tunnel', 'route', 'dns', tunnelName, hostname]);
198
+ }
199
+ catch (error) {
200
+ const message = error instanceof Error ? error.message : String(error);
201
+ const elsewhere = /already exists/i.test(message)
202
+ ? ' A record that already exists points somewhere else; remove it or choose another hostname.'
203
+ : '';
204
+ throw new Error(`${hostname} could not be routed to the tunnel '${tunnelName}': ${message.trim()}.${elsewhere} Nothing was changed.`);
205
+ }
206
+ }
207
+ /** Wait until `cloudflared` reports a registered connection in its log, or the process ends; `false` on timeout. */
208
+ export async function waitForTunnelConnection(logPath, pid, configPath, options = {}) {
209
+ const isTunnel = options.isTunnel ?? processIsTunnel;
210
+ const readLog = options.readLog ?? ((path) => { try {
211
+ return readFileSync(path, 'utf8');
212
+ }
213
+ catch {
214
+ return '';
215
+ } });
216
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
217
+ const startLength = readLog(logPath).length;
218
+ const deadline = Date.now() + (options.timeoutMs ?? 30_000);
219
+ while (Date.now() < deadline) {
220
+ if (/Registered tunnel connection/.test(readLog(logPath).slice(startLength)))
221
+ return true;
222
+ if (!isTunnel(pid, configPath))
223
+ return false;
224
+ await sleep(500);
225
+ }
226
+ return false;
227
+ }
228
+ /** Wait until a stopped `cloudflared` has exited, so two connectors with different ingress never overlap (review F12). */
229
+ export async function waitForTunnelExit(pid, configPath, options = {}) {
230
+ const isTunnel = options.isTunnel ?? processIsTunnel;
231
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
232
+ const deadline = Date.now() + (options.timeoutMs ?? 40_000);
233
+ while (Date.now() < deadline) {
234
+ if (!isTunnel(pid, configPath))
235
+ return true;
236
+ await sleep(500);
237
+ }
238
+ return !isTunnel(pid, configPath);
239
+ }
240
+ /** The credentials file `cloudflared tunnel create` wrote for a locally-managed tunnel. */
241
+ export function credentialsFileOf(tunnelId, home = homedir()) {
242
+ return join(home, '.cloudflared', `${tunnelId}.json`);
243
+ }
244
+ /** Whether `cloudflared` is installed and logged in (`cert.pem`), with what to do when it is not. */
245
+ /**
246
+ * The tunnel id a credentials file holds (`TunnelID`), read without ever returning or logging the secret beside it.
247
+ * Refuses a file that is not one (#3907 item 3: the QA VM receives the file as a CI secret, so a malformed secret must
248
+ * fail here, by name, rather than as a cloudflared connection that never registers).
249
+ */
250
+ export function tunnelIdOfCredentialsFile(path) {
251
+ let parsed;
252
+ try {
253
+ parsed = JSON.parse(readFileSync(path, 'utf8'));
254
+ }
255
+ catch {
256
+ throw new Error(`${path} is not a readable tunnel credentials file (JSON).`);
257
+ }
258
+ const id = parsed?.TunnelID;
259
+ if (typeof id !== 'string' || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u.test(id)) {
260
+ throw new Error(`${path} names no TunnelID: it is not a tunnel credentials file.`);
261
+ }
262
+ return id;
263
+ }
264
+ export function cloudflaredReadiness(home = homedir()) {
265
+ return existsSync(join(home, '.cloudflared', 'cert.pem'))
266
+ ? null
267
+ : 'No Cloudflare login on this machine: run `cloudflared tunnel login` once (it writes ~/.cloudflared/cert.pem).';
268
+ }
269
+ /**
270
+ * The runtime endpoints with a live tunnel applied: ONLY the tunnel's frontend gets the public origin as its `publicUrl`,
271
+ * and keeps the local listen origin as an additional browser origin, so the developer's own browser still passes every
272
+ * origin check. Every other endpoint (the backend's included: the SPA builds its WebSocket URL from it) is unchanged.
273
+ * Returns the input when there is no tunnel, or when its frontend has no endpoint (named in `skipped`).
274
+ */
275
+ export function applyTunnelToRuntimeEndpoints(endpoints, tunnel) {
276
+ if (!tunnel)
277
+ return { endpoints, skipped: null };
278
+ const local = endpoints[tunnel.frontendServiceName];
279
+ if (!local)
280
+ return { endpoints, skipped: `the tunnel names frontend '${tunnel.frontendServiceName}', which has no local endpoint` };
281
+ const localOrigin = new URL(local.publicUrl).origin;
282
+ return {
283
+ endpoints: {
284
+ ...endpoints,
285
+ [tunnel.frontendServiceName]: {
286
+ publicUrl: tunnel.publicOrigin,
287
+ internalUrl: local.internalUrl,
288
+ additionalBrowserOrigins: [...new Set([...(local.additionalBrowserOrigins ?? []), localOrigin])],
289
+ },
290
+ },
291
+ skipped: null,
292
+ };
293
+ }
294
+ //# sourceMappingURL=local-tunnel.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-tunnel.service.js","sourceRoot":"","sources":["../../../../src/services/application/local-tunnel.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,sDAAsD;IACtD,kBAAkB;CACnB,CAAC;AA6CF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AAEzF,4EAA4E;AAC5E,MAAM,UAAU,sBAAsB,CAAC,OAAe,OAAO,EAAE;IAC7D,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,OAAO,IAAI,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,QAAQ,CAAI,IA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AwB,IAAI,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;aACjG;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC","sourcesContent":["/**\n * A locally-managed Cloudflare tunnel that gives a local application a public HTTPS origin while it runs (#3907).\n *\n * ## What it is for\n *\n * An outside party (an A2A client following the agent card, an MCP client, a push receiver, a vendor webhook) cannot\n * reach `http://localhost`. A named tunnel ends TLS at Cloudflare's edge and forwards to the local backend, which keeps\n * listening on plain http: the 2026-08-14 failure (a backend port advertising https with no certificate) cannot recur.\n *\n * ## The shape, and why\n *\n * - **One public origin per application** (`https://<app>-<machine>.wildo.ai`). The engine derives the OAuth issuer, every\n * audience and the A2A card `url` from the default frontend's `publicUrl` + `/api/v1`, as behind a deployed ingress, so\n * the tunnel path-routes that origin: the protocol paths go to the backend, everything else answers 404\n * ({@link TUNNEL_FORWARDED_API_PATHS}). The frontend is not exposed until Cloudflare Access fronts it.\n * - **One `cloudflared` process per MACHINE**, whose ingress is the union of every application that is up plus the\n * declared extras (a test receiver). Two connectors of one named tunnel with different ingress would answer each\n * other's requests: two connectors of one tunnel are replicas, and \"Replicas do not support traffic steering\".\n * - **Only the default frontend's `publicUrl` follows the tunnel**, and only while the recorded process is alive\n * ({@link readLiveApplicationTunnel}); the local listen origin stays a configured browser origin\n * (`additionalBrowserOrigins`). See `AppBootstrapService.buildRuntimeEndpoints`.\n *\n * Off by default: nothing here runs unless `wildo local tunnel up` is asked, and a running dev stack (which signs in with\n * known local credentials) is never reachable by accident.\n *\n * spec-cite: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/deploy-tunnels/deploy-cloudflared-replicas/\n * (fetched 2026-11-16): \"Replicas do not support traffic steering (such as round-robin or hash-based routing).\" and\n * \"Cloudflare retries with other replicas, but there is no guarantee about which one is chosen.\"\n */\nimport { spawn, execFile, execFileSync } from 'child_process';\nimport { existsSync, mkdirSync, openSync, readFileSync, rmSync, writeFileSync } from 'fs';\nimport { homedir } from 'os';\nimport { dirname, join } from 'path';\nimport { promisify } from 'util';\n\n/**\n * The backend paths an outside party must reach, forwarded through the tunnel; every other path answers 404.\n *\n * The API's protocol surfaces (`/api/v1/a2a…`, `/api/v1/mcp…`, the OAuth endpoints, the discovery documents and the\n * webhooks) and the root RFC 8414 / RFC 9728 discovery aliases. Not `/api/v1/auth/*` (sign-in), not the resource API,\n * not `/internal/*`, not `/health*`: a dev stack signs in with known credentials and must not be reachable beyond the\n * protocol doors.\n */\nexport const TUNNEL_FORWARDED_API_PATHS: readonly string[] = [\n '^/api/v1/(a2a|mcp|oauth|\\\\.well-known|webhooks)(/|$)',\n '^/\\\\.well-known/',\n];\n\n/** One application's entry in the machine's tunnel. */\nexport interface TunnelApplicationRoute {\n readonly hostname: string;\n readonly backendPort: number;\n}\n\n/** A hostname the tunnel serves that is not an application: a test receiver. */\nexport interface TunnelExtraRoute {\n readonly hostname: string;\n /** `http://127.0.0.1:<port>`: always a local service. */\n readonly service: string;\n}\n\n/** What an application records while its public origin is the tunnel's. Machine-local, gitignored, throwaway. */\nexport interface ApplicationTunnelState {\n readonly schemaVersion: 1;\n readonly tunnelName: string;\n readonly hostname: string;\n /** `https://<hostname>`: the default frontend's `publicUrl` while the tunnel runs. */\n readonly publicOrigin: string;\n /** The frontend service whose `publicUrl` follows the tunnel: the one the backend resolves as its default. */\n readonly frontendServiceName: string;\n readonly backendPort: number;\n}\n\n/** The machine's one tunnel process and everything it serves. */\nexport interface MachineTunnelState {\n readonly schemaVersion: 1;\n readonly tunnelName: string;\n readonly pid: number | null;\n readonly configPath: string;\n readonly logPath: string;\n /** Keyed by application root. */\n readonly applications: Record<string, TunnelApplicationRoute>;\n readonly extras: readonly TunnelExtraRoute[];\n /**\n * The credentials file the tunnel was started with when it was GIVEN (`--credentials-file`), on a machine with no\n * Cloudflare login (#3907 item 3, the QA VM). A restart then reuses it instead of asking the account, which that\n * machine cannot do. Absent when the tunnel was found through this machine's login.\n */\n readonly givenCredentialsFile?: string;\n}\n\nexport const APPLICATION_TUNNEL_STATE_FILE = join('.wildo-saas', 'state', 'tunnel.json');\n\n/** `~/.wildo/tunnel`: the machine's tunnel files. Overridable for tests. */\nexport function machineTunnelDirectory(home: string = homedir()): string {\n return join(home, '.wildo', 'tunnel');\n}\n\nexport function applicationTunnelStatePath(appRoot: string): string {\n return join(appRoot, APPLICATION_TUNNEL_STATE_FILE);\n}\n\nfunction readJson<T>(path: string): T | null {\n try {\n return JSON.parse(readFileSync(path, 'utf8')) as T;\n } catch {\n return null;\n }\n}\n\nfunction writeJson(path: string, value: unknown): void {\n mkdirSync(dirname(path), { recursive: true });\n writeFileSync(path, `${JSON.stringify(value, null, 2)}\\n`);\n}\n\nexport function readMachineTunnelState(directory: string = machineTunnelDirectory()): MachineTunnelState | null {\n return readJson<MachineTunnelState>(join(directory, 'state.json'));\n}\n\nexport function writeMachineTunnelState(state: MachineTunnelState, directory: string = machineTunnelDirectory()): void {\n writeJson(join(directory, 'state.json'), state);\n}\n\nexport function readApplicationTunnelState(appRoot: string): ApplicationTunnelState | null {\n return readJson<ApplicationTunnelState>(applicationTunnelStatePath(appRoot));\n}\n\nexport function writeApplicationTunnelState(appRoot: string, state: ApplicationTunnelState): void {\n writeJson(applicationTunnelStatePath(appRoot), state);\n}\n\nexport function removeApplicationTunnelState(appRoot: string): void {\n rmSync(applicationTunnelStatePath(appRoot), { force: true });\n}\n\n/**\n * Whether `pid` is the machine's tunnel: a live process this user owns that runs `cloudflared` with `configPath`.\n *\n * A pid alone is not enough (#3907 review F4): after a reboot it may name an unrelated process, which the command would\n * then signal and the env generation would believe is the tunnel. So the process's own command line must name both.\n */\nexport function processIsTunnel(pid: number | null | undefined, configPath: string): boolean {\n if (!pid || pid <= 0) return false;\n try {\n process.kill(pid, 0);\n } catch {\n return false;\n }\n try {\n const command = execFileSync('ps', ['-o', 'command=', '-p', String(pid)], { encoding: 'utf8' });\n return command.includes('cloudflared') && command.includes(configPath);\n } catch {\n return false;\n }\n}\n\n/**\n * The application's tunnel, only when it is in effect: its state exists, the machine's tunnel serves it, and the\n * recorded `cloudflared` process is alive. A state left behind by a crash or a reboot is IGNORED (and named by\n * `staleReason`), so the next env generation never advertises a dead issuer.\n */\nexport function readLiveApplicationTunnel(\n appRoot: string,\n directory: string = machineTunnelDirectory(),\n isTunnel: (pid: number | null | undefined, configPath: string) => boolean = processIsTunnel,\n): { readonly live: ApplicationTunnelState | null; readonly staleReason: string | null } {\n const state = readApplicationTunnelState(appRoot);\n if (!state) return { live: null, staleReason: null };\n const machine = readMachineTunnelState(directory);\n if (!machine || machine.applications[appRoot]?.hostname !== state.hostname) {\n return { live: null, staleReason: `the machine's tunnel does not serve ${state.hostname}` };\n }\n if (!isTunnel(machine.pid, machine.configPath)) {\n return { live: null, staleReason: `the tunnel process (pid ${machine.pid ?? 'none'}) is not running` };\n }\n return { live: state, staleReason: null };\n}\n\n/**\n * The `cloudflared` ingress for the machine's tunnel: per application, the forwarded API paths to its backend and a 404\n * for everything else on its hostname; then the extras; then a catch-all 404.\n *\n * spec-cite: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file/\n * (fetched 2026-11-16): the ingress check shows \"the first rule that matches\", and \"Configuration files that contain\n * ingress rules must always include a catch-all rule that concludes the file.\"\n */\nexport function buildTunnelIngressYaml(input: {\n readonly tunnelName: string;\n readonly credentialsFile: string;\n readonly applications: readonly TunnelApplicationRoute[];\n readonly extras: readonly TunnelExtraRoute[];\n}): string {\n const lines = [\n `tunnel: ${input.tunnelName}`,\n `credentials-file: ${input.credentialsFile}`,\n 'ingress:',\n ];\n for (const application of input.applications) {\n for (const path of TUNNEL_FORWARDED_API_PATHS) {\n lines.push(` - hostname: ${application.hostname}`, ` path: ${JSON.stringify(path)}`, ` service: http://127.0.0.1:${application.backendPort}`);\n }\n lines.push(` - hostname: ${application.hostname}`, ' service: http_status:404');\n }\n for (const extra of input.extras) {\n lines.push(` - hostname: ${extra.hostname}`, ` service: ${extra.service}`);\n }\n lines.push(' - service: http_status:404', '');\n return lines.join('\\n');\n}\n\n/** The `cloudflared` operations the command needs, injectable for tests. */\nexport interface CloudflaredRunner {\n /** Run a `cloudflared` subcommand to completion; resolves its stdout, rejects with its stderr. */\n exec(args: readonly string[]): Promise<string>;\n /** Start `cloudflared` detached with its output in `logPath`; resolves the pid. */\n startDetached(args: readonly string[], logPath: string): number;\n /** Stop a process this command started. */\n stop(pid: number): void;\n}\n\nexport const systemCloudflaredRunner: CloudflaredRunner = {\n async exec(args) {\n const { stdout } = await promisify(execFile)('cloudflared', [...args], { maxBuffer: 8 * 1024 * 1024 });\n return stdout;\n },\n startDetached(args, logPath) {\n mkdirSync(dirname(logPath), { recursive: true });\n const out = openSync(logPath, 'a');\n const child = spawn('cloudflared', [...args], { detached: true, stdio: ['ignore', out, out] });\n child.unref();\n if (!child.pid) throw new Error('cloudflared did not start');\n return child.pid;\n },\n stop(pid) {\n try { process.kill(pid, 'SIGTERM'); } catch { /* already gone */ }\n },\n};\n\n/** `cloudflared tunnel list --output json`, read defensively: anything but an array is no tunnel. */\nasync function listTunnels(runner: CloudflaredRunner, tunnelName: string): Promise<Array<{ id?: string; name?: string }>> {\n const parsed = JSON.parse(await runner.exec(['tunnel', 'list', '--output', 'json', '--name', tunnelName])) as unknown;\n return Array.isArray(parsed) ? parsed as Array<{ id?: string; name?: string }> : [];\n}\n\n/** The named tunnel's id, creating the tunnel when this machine's `cert.pem` login has none by that name. */\nexport async function ensureNamedTunnel(runner: CloudflaredRunner, tunnelName: string): Promise<{ readonly id: string; readonly created: boolean }> {\n const existing = (await listTunnels(runner, tunnelName)).find((tunnel) => tunnel.name === tunnelName && tunnel.id);\n if (existing?.id) return { id: existing.id, created: false };\n await runner.exec(['tunnel', 'create', tunnelName]);\n const created = (await listTunnels(runner, tunnelName)).find((tunnel) => tunnel.name === tunnelName && tunnel.id);\n if (!created?.id) throw new Error(`cloudflared created no tunnel named ${tunnelName}`);\n return { id: created.id, created: true };\n}\n\n/**\n * Route `hostname` to the tunnel, or refuse.\n *\n * `cloudflared tunnel route dns` already SUCCEEDS when the record routes to this tunnel (\"is already configured to route\n * to your tunnel\"), so the idempotent case needs no handling. The error it raises for an existing record (\"An A, AAAA, or\n * CNAME record with that host already exists\") is the case where the hostname points ELSEWHERE — another tunnel, or a\n * record someone else made. That is never tolerated (#3907 review F1): the application would advertise an issuer, its\n * audiences and its agent card on a host another party serves, and outside clients would send their tokens there.\n */\nexport async function routeHostname(runner: CloudflaredRunner, tunnelName: string, hostname: string): Promise<void> {\n try {\n await runner.exec(['tunnel', 'route', 'dns', tunnelName, hostname]);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n const elsewhere = /already exists/i.test(message)\n ? ' A record that already exists points somewhere else; remove it or choose another hostname.'\n : '';\n throw new Error(`${hostname} could not be routed to the tunnel '${tunnelName}': ${message.trim()}.${elsewhere} Nothing was changed.`);\n }\n}\n\n/** Wait until `cloudflared` reports a registered connection in its log, or the process ends; `false` on timeout. */\nexport async function waitForTunnelConnection(\n logPath: string,\n pid: number,\n configPath: string,\n options: { timeoutMs?: number; isTunnel?: typeof processIsTunnel; readLog?: (path: string) => string; sleep?: (ms: number) => Promise<void> } = {},\n): Promise<boolean> {\n const isTunnel = options.isTunnel ?? processIsTunnel;\n const readLog = options.readLog ?? ((path: string) => { try { return readFileSync(path, 'utf8'); } catch { return ''; } });\n const sleep = options.sleep ?? ((ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n const startLength = readLog(logPath).length;\n const deadline = Date.now() + (options.timeoutMs ?? 30_000);\n while (Date.now() < deadline) {\n if (/Registered tunnel connection/.test(readLog(logPath).slice(startLength))) return true;\n if (!isTunnel(pid, configPath)) return false;\n await sleep(500);\n }\n return false;\n}\n\n/** Wait until a stopped `cloudflared` has exited, so two connectors with different ingress never overlap (review F12). */\nexport async function waitForTunnelExit(pid: number, configPath: string, options: { timeoutMs?: number; isTunnel?: typeof processIsTunnel; sleep?: (ms: number) => Promise<void> } = {}): Promise<boolean> {\n const isTunnel = options.isTunnel ?? processIsTunnel;\n const sleep = options.sleep ?? ((ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n const deadline = Date.now() + (options.timeoutMs ?? 40_000);\n while (Date.now() < deadline) {\n if (!isTunnel(pid, configPath)) return true;\n await sleep(500);\n }\n return !isTunnel(pid, configPath);\n}\n\n/** The credentials file `cloudflared tunnel create` wrote for a locally-managed tunnel. */\nexport function credentialsFileOf(tunnelId: string, home: string = homedir()): string {\n return join(home, '.cloudflared', `${tunnelId}.json`);\n}\n\n/** Whether `cloudflared` is installed and logged in (`cert.pem`), with what to do when it is not. */\n/**\n * The tunnel id a credentials file holds (`TunnelID`), read without ever returning or logging the secret beside it.\n * Refuses a file that is not one (#3907 item 3: the QA VM receives the file as a CI secret, so a malformed secret must\n * fail here, by name, rather than as a cloudflared connection that never registers).\n */\nexport function tunnelIdOfCredentialsFile(path: string): string {\n let parsed: unknown;\n try {\n parsed = JSON.parse(readFileSync(path, 'utf8'));\n } catch {\n throw new Error(`${path} is not a readable tunnel credentials file (JSON).`);\n }\n const id = (parsed as { TunnelID?: unknown } | null)?.TunnelID;\n if (typeof id !== 'string' || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u.test(id)) {\n throw new Error(`${path} names no TunnelID: it is not a tunnel credentials file.`);\n }\n return id;\n}\n\nexport function cloudflaredReadiness(home: string = homedir()): string | null {\n return existsSync(join(home, '.cloudflared', 'cert.pem'))\n ? null\n : 'No Cloudflare login on this machine: run `cloudflared tunnel login` once (it writes ~/.cloudflared/cert.pem).';\n}\n\n/** A runtime endpoint as the env generation writes it (`RuntimeEndpointUrls` in `@wildo-ai/platform-core-shared`). */\ninterface WritableRuntimeEndpoint {\n publicUrl: string;\n internalUrl: string;\n additionalBrowserOrigins?: string[];\n}\n\n/**\n * The runtime endpoints with a live tunnel applied: ONLY the tunnel's frontend gets the public origin as its `publicUrl`,\n * and keeps the local listen origin as an additional browser origin, so the developer's own browser still passes every\n * origin check. Every other endpoint (the backend's included: the SPA builds its WebSocket URL from it) is unchanged.\n * Returns the input when there is no tunnel, or when its frontend has no endpoint (named in `skipped`).\n */\nexport function applyTunnelToRuntimeEndpoints<T extends Record<string, WritableRuntimeEndpoint>>(\n endpoints: T,\n tunnel: Pick<ApplicationTunnelState, 'publicOrigin' | 'frontendServiceName'> | null,\n): { readonly endpoints: T; readonly skipped: string | null } {\n if (!tunnel) return { endpoints, skipped: null };\n const local = endpoints[tunnel.frontendServiceName];\n if (!local) return { endpoints, skipped: `the tunnel names frontend '${tunnel.frontendServiceName}', which has no local endpoint` };\n const localOrigin = new URL(local.publicUrl).origin;\n return {\n endpoints: {\n ...endpoints,\n [tunnel.frontendServiceName]: {\n publicUrl: tunnel.publicOrigin,\n internalUrl: local.internalUrl,\n additionalBrowserOrigins: [...new Set([...(local.additionalBrowserOrigins ?? []), localOrigin])],\n },\n },\n skipped: null,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-runtime-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/provider-runtime-sync.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,cAAc,EAef,MAAM,+BAA+B,CAAC;AAevC,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAuBvC,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,oHAAoH;IACpH,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4GAA4G;IAC5G,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,aAAa,CAAC,EA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OAAO,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,8BAA8B,EAAE,CAAC;IACrE,0HAA0H;IAC1H,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,wCAAwC,EAAE,CAAC,CAAC;IAChH,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChK,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kHAAkH;IAClH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACvF,GACL,OAAO,CAAC,oCAAoC,CAAC,CA0D/C;AAoeD;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAExG"}
1
+ {"version":3,"file":"provider-runtime-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/provider-runtime-sync.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,cAAc,EAef,MAAM,+BAA+B,CAAC;AAgBvC,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAuBvC,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,oHAAoH;IACpH,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4GAA4G;IAC5G,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC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A0B,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,8BAA8B,EAAE,CAAC;IACrE,0HAA0H;IAC1H,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,wCAAwC,EAAE,CAAC,CAAC;IAChH,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAChK,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kHAAkH;IAClH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACvF,GACL,OAAO,CAAC,oCAAoC,CAAC,CA0D/C;AAoeD;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAExG"}
@@ -5,7 +5,8 @@ import { buildDiscoveredProviderCatalog, InfraCapability, LEGACY_PROVIDER_RUNTIM
5
5
  import { resolveAndRegisterSaasProviderContributions } from '../credentials/composed-provider-catalogue.js';
6
6
  import { declareSystemsOfRecordLibrary } from './systems-of-record-library.service.js';
7
7
  import { resolveEnvironmentProviderConfigurations } from './environment-provider-configurations.service.js';
8
- import { screenFrontendProviderPublicConfigForEnvironment } from './frontend-public-config-secret-screen.service.js';
8
+ import { EnvironmentRegistry } from '../../services/environment/environment-registry.service.js';
9
+ import { loadEnvironmentSecretsForScreen, screenFrontendProviderPublicConfigForEnvironment } from './frontend-public-config-secret-screen.service.js';
9
10
  import { listFrontendProvidersNotConfiguredInArtifacts } from './frontend-providers-not-configured.service.js';
10
11
  import { assertSelectedFrontendProviderSdksAreDeclared } from './frontend-provider-sdk-declarations.service.js';
11
12
  import { describeFrontendProviderNotConfigured, describeCaughtError } from '@wildo-ai/saas-models';
@@ -369,6 +370,22 @@ export function findRefusedProviderRuntimeArtifacts(saasRoot) {
369
370
  }
370
371
  return refused;
371
372
  }
373
+ /**
374
+ * The environment's `secrets.json → providerEnv`, read so a vendor's BROWSER-PUBLIC slot can fill the frontend key of its
375
+ * slug (PostHog's project key). Only those slots are read from it (`browserPublicProviderSecretValues`); every other
376
+ * value stays out of every served bag, and the secret screen still compares each served value against all of them.
377
+ *
378
+ * Undefined when this process targets no application root (the loader would throw; a caller deriving artifacts outside a
379
+ * CLI command has none) or the environment has no secrets. Filling nothing is the safe direction: a key that only the
380
+ * secrets supply is then absent from the served bag, which hydration reports as a provider not configured, and the
381
+ * sync that WRITES the artifacts screens them against the same secrets and refuses outright when it cannot read them.
382
+ * Any other failure of the loader is not swallowed.
383
+ */
384
+ function readEnvironmentProviderEnvForBrowserPublicValues(environmentName) {
385
+ if (EnvironmentRegistry.getSaasRoot() === null)
386
+ return undefined;
387
+ return loadEnvironmentSecretsForScreen(environmentName)?.providerEnv;
388
+ }
372
389
  /**
373
390
  * Everything the provider runtime artifacts are derived from, and the artifacts themselves, computed WITHOUT writing.
374
391
  *
@@ -400,6 +417,14 @@ async function deriveProviderRuntimeArtifacts(input) {
400
417
  // The listed packages discovery admitted (#1676), recorded in the lock.
401
418
  admittedProviderPackages,
402
419
  nodeWorkerKeys,
420
+ // A browser-public provider key (PostHog's project key) is read from the environment's secrets, where the backend's
421
+ // copy of it already lives, so no environment has to commit it to a config file. The same source the secret screen
422
+ // reads, so a sync and its screen see one `providerEnv`; absent secrets fill nothing, and the screen then refuses.
423
+ // Read only when a frontend service has providers: nothing else can use it, and an application serving none must
424
+ // not start reporting on a secrets file it never needed.
425
+ providerEnvironmentValues: Object.keys(saasConfig.providers?.scopes?.frontendServices ?? {}).length > 0
426
+ ? readEnvironmentProviderEnvForBrowserPublicValues(environmentName)
427
+ : undefined,
403
428
  });
404
429
  return { discoveredProviderContributions, admittedProviderPackages, discoveryAdvisories, minionConfigs, workerConfigs, nodeWorkerKeys, artifacts, lockSection };
405
430
  }
@@ -416,6 +441,9 @@ const PROVIDER_RUNTIME_DECLARATION_FIELDS = [
416
441
  // #3513: a changed processing region (or an artifact written before regions were bound) is behind its declaration, so a
417
442
  // start regenerates it rather than letting the provider keep calling the host of the region it no longer names.
418
443
  'providerProcessingRegions',
444
+ // #4002: a provider whose frame origins changed (or an artifact written before they were recorded) is behind its
445
+ // declaration, so a start regenerates it and `wildo dev sync-csp` reads the origins the module declares now.
446
+ 'providerFrameOrigins',
419
447
  // #2294: a residency declared (or narrowed, or a choice changed) after the artifact was written leaves it behind its
420
448
  // declaration, so a start regenerates it and the host's provider loader re-applies the residency the application now
421
449
  // declares rather than loading providers against none.