@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
@@ -6,8 +6,8 @@
6
6
  * state persistence.
7
7
  */
8
8
  import { PlatformEnvironmentConfiguration, PlatformEnvOperatingSystem, SetupStatus } from '../../services/environment/environment.schemas';
9
- import { BackingServiceKind, DatabaseEngine, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType, type BackingServicesEnvConfig } from '@wildo-ai/platform-config-lib';
10
- import { PlatformDatabaseChoice, PlatformDataServices } from '../../services/data-services/data-services.schemas';
9
+ import { BackingServiceKind, DatabaseEngine, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType, type BackingServicesEnvConfig, type EnvironmentServiceProfile } from '@wildo-ai/platform-config-lib';
10
+ import { PlatformDatabaseChoice } from '../../services/data-services/data-services.schemas';
11
11
  export declare class EnvironmentLifecycle {
12
12
  static initializeLocal(overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration;
13
13
  static initializeEnvironment(name: string, locationType: WildoLocationType, overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration;
@@ -124,7 +124,9 @@ export declare class EnvironmentLifecycle {
124
124
  *
125
125
  * - **Mandatory platform dependencies — `redis`, `rabbitmq`, `s3`.** The platform cannot run
126
126
  * without a cache, a broker and an object store: `platform-init` fails closed without
127
- * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. So an undeclared entry means "the framework
127
+ * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. The broker is the exception since #2303 slice D: it is mandatory
128
+ * only while the environment's queue is RabbitMQ (`environmentServiceProfileRunsMessageBroker`), and a profile
129
+ * whose queue lives in the application's database runs none. So an undeclared entry means "the framework
128
130
  * supplies one", which is exactly today's unconditional behaviour and is why this change cannot
129
131
  * delete a workload from any environment that never declared the kind. Only an explicit
130
132
  * `MANAGED` withdraws the local workload — which is the fix. Reading `!== MANAGED` rather than
@@ -150,6 +152,7 @@ export declare class EnvironmentLifecycle {
150
152
  static selfHostsBackingService(env: {
151
153
  name: string;
152
154
  backingServices?: BackingServicesEnvConfig;
155
+ serviceProfile?: EnvironmentServiceProfile;
153
156
  }, kind: BackingServiceKind): boolean;
154
157
  /**
155
158
  * Does this environment USE `kind` and serve it from OUTSIDE its own deployment — a managed database, a managed broker
@@ -169,9 +172,9 @@ export declare class EnvironmentLifecycle {
169
172
  static servesBackingServiceOffCluster(env: {
170
173
  name: string;
171
174
  backingServices?: BackingServicesEnvConfig;
175
+ serviceProfile?: EnvironmentServiceProfile;
172
176
  }, kind: BackingServiceKind): boolean;
173
177
  static getRuntime(envName?: string): WildoDeploymentRuntime;
174
- static getRequiredInfraServices(envName?: string): PlatformDataServices[];
175
178
  static getRequiredPlatformServices(): PlatformWildoServices[];
176
179
  static detectOS(): PlatformEnvOperatingSystem;
177
180
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environment-lifecycle.service.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-lifecycle.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAE1B,WAAW,EACZ,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAwB,cAAc,EAA0B,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAElO,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,yDAAyD,CAAC;AAKjE,qBAAa,oBAAoB;IAM/B,MAAM,CAAC,eAAe,CACpB,SAAS,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,GACpD,gCAAgC;IAQnC,MAAM,CAAC,qBAAqB,CAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,iBAAiB,EAC/B,SAAS,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,GACpD,gCAAgC;IAqDnC,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,gCAAgC,GAAG,IAAI;IAyC1E,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW;IAKpD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IASlE,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO;IAQlD,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,uBAAuB,CAAC,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,CAAC,EAAE,MAAM,GAAG,oBAAoB,EAAE;IAgBzE,MAAM,CAAC,2BAA2B,IAAI,qBAAqB,EAAE;IAY7D,MAAM,CAAC,QAAQ,IAAI,0BAA0B;CAM9C"}
1
+ {"version":3,"file":"environment-lifecycle.service.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-lifecycle.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAE1B,WAAW,EACZ,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAwB,cAAc,EAAsE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE9S,OAAO,EACL,sBAAsB,EAEvB,MAAM,yDAAyD,CAAC;AAKjE,qBAAa,oBAAoB;IAM/B,MAAM,CAAC,eAAe,CACpB,SAAS,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,GACpD,gCAAgC;IAQnC,MAAM,CAAC,qBAAqB,CAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,iBAAiB,EAC/B,SAAS,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,GACpD,gCAAgC;IAqDnC,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,gCAAgC,GAAG,IAAI;IAyC1E,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW;IAKpD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IASlE,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO;IAQlD,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAA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,sBAAsB;IAS3D,MAAM,CAAC,2BAA2B,IAAI,qBAAqB,EAAE;IAY7D,MAAM,CAAC,QAAQ,IAAI,0BAA0B;CAM9C"}
@@ -6,9 +6,8 @@
6
6
  * state persistence.
7
7
  */
8
8
  import { PlatformEnvOperatingSystem, parsePlatformEnvironmentId, SetupStatus, } from '../../services/environment/environment.schemas.js';
9
- import { BackingServiceKind, BackingServiceSource, DatabaseEngine, PUBLIC_DOMAIN_DEFAULTS, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';
9
+ import { BackingServiceKind, BackingServiceSource, DatabaseEngine, environmentServiceProfileRunsMessageBroker, PUBLIC_DOMAIN_DEFAULTS, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';
10
10
  import { RuntimeEnvironment } from '@wildo-ai/saas-models';
11
- import { PlatformDataServices, } from '../../services/data-services/data-services.schemas.js';
12
11
  import { EnvironmentPaths } from '../../services/environment/environment-paths.service.js';
13
12
  import { EnvironmentRegistry } from '../../services/environment/environment-registry.service.js';
14
13
  import { PlatformRuntimeStateService } from '../../services/environment/platform-runtime-state.service.js';
@@ -257,7 +256,9 @@ export class EnvironmentLifecycle {
257
256
  *
258
257
  * - **Mandatory platform dependencies — `redis`, `rabbitmq`, `s3`.** The platform cannot run
259
258
  * without a cache, a broker and an object store: `platform-init` fails closed without
260
- * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. So an undeclared entry means "the framework
259
+ * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. The broker is the exception since #2303 slice D: it is mandatory
260
+ * only while the environment's queue is RabbitMQ (`environmentServiceProfileRunsMessageBroker`), and a profile
261
+ * whose queue lives in the application's database runs none. So an undeclared entry means "the framework
261
262
  * supplies one", which is exactly today's unconditional behaviour and is why this change cannot
262
263
  * delete a workload from any environment that never declared the kind. Only an explicit
263
264
  * `MANAGED` withdraws the local workload — which is the fix. Reading `!== MANAGED` rather than
@@ -286,8 +287,14 @@ export class EnvironmentLifecycle {
286
287
  return EnvironmentLifecycle.needsLocalMongoDB(env);
287
288
  case BackingServiceKind.POSTGRESQL:
288
289
  return EnvironmentLifecycle.needsLocalPostgreSQL(env);
289
- case BackingServiceKind.REDIS:
290
290
  case BackingServiceKind.RABBITMQ:
291
+ // #2303 slice D — the broker is mandatory only while the environment's queue is RabbitMQ. Under a profile whose
292
+ // queue lives in the application's database it runs no broker at all; the descriptor refuses a declaration
293
+ // beside it, so absence here is the only shape that reaches this.
294
+ if (!environmentServiceProfileRunsMessageBroker(env.serviceProfile))
295
+ return false;
296
+ return env.backingServices?.[kind]?.source !== BackingServiceSource.MANAGED;
297
+ case BackingServiceKind.REDIS:
291
298
  case BackingServiceKind.S3:
292
299
  return env.backingServices?.[kind]?.source !== BackingServiceSource.MANAGED;
293
300
  case BackingServiceKind.CLAMAV:
@@ -313,8 +320,10 @@ export class EnvironmentLifecycle {
313
320
  static servesBackingServiceOffCluster(env, kind) {
314
321
  const declaredManaged = env.backingServices?.[kind]?.source === BackingServiceSource.MANAGED;
315
322
  switch (kind) {
316
- case BackingServiceKind.REDIS:
317
323
  case BackingServiceKind.RABBITMQ:
324
+ // Used at all only while the environment runs a broker (#2303 slice D); then off-cluster exactly when not self-hosted.
325
+ return environmentServiceProfileRunsMessageBroker(env.serviceProfile) && !EnvironmentLifecycle.selfHostsBackingService(env, kind);
326
+ case BackingServiceKind.REDIS:
318
327
  case BackingServiceKind.S3:
319
328
  return !EnvironmentLifecycle.selfHostsBackingService(env, kind);
320
329
  case BackingServiceKind.CLAMAV:
@@ -338,19 +347,6 @@ export class EnvironmentLifecycle {
338
347
  // --------------------------------------------------------------------------
339
348
  // Infrastructure service resolution
340
349
  // --------------------------------------------------------------------------
341
- static getRequiredInfraServices(envName) {
342
- const services = [
343
- PlatformDataServices.VALKEY,
344
- PlatformDataServices.RABBITMQ,
345
- PlatformDataServices.MINIO,
346
- PlatformDataServices.MINIO_INIT,
347
- ];
348
- const name = envName ?? EnvironmentRegistry.getCurrentName();
349
- if (EnvironmentLifecycle.needsLocalMongoDB({ name, backingServices: EnvironmentRegistry.get(name)?.backingServices })) {
350
- services.unshift(PlatformDataServices.MONGODB, PlatformDataServices.MONGODB_INIT);
351
- }
352
- return services;
353
- }
354
350
  static getRequiredPlatformServices() {
355
351
  return [
356
352
  PlatformWildoServices.PLATFORM_INIT,
@@ -1 +1 @@
1
- {"version":3,"file":"environment-lifecycle.service.js","sourceRoot":"","sources":["../../../../src/services/environment/environment-lifecycle.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,0BAA0B,EAC1B,0BAA0B,EAC1B,WAAW,GACZ,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAiC,MAAM,+BAA+B,CAAC;AAClO,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAEL,oBAAoB,GACrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAE7G,MAAM,OAAO,oBAAoB;IAE/B,6EAA6E;IAC7E,iBAAiB;IACjB,6EAA6E;IAE7E,MAAM,CAAC,eAAe,CACpB,SAAqD;QAErD,OAAO,oBAAoB,CAAC,qBAAqB,CAC/C,iBAAiB,CAAC,KAAK,EACvB,iBAAiB,CAAC,KAAK,EACvB,SAAS,CACV,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,qBAAqB,CAC1B,IAAY,EACZ,YAA+B,EAC/B,SAAqD;QAErD,MAAM,aAAa,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACvD,MAA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AoB,CAAC,UAAU;SAChC,CAAC;QAEF,MAAM,IAAI,GAAG,OAAO,IAAI,mBAAmB,CAAC,cAAc,EAAE,CAAC;QAC7D,IAAI,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;YACtH,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;QACpF,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,2BAA2B;QAChC,OAAO;YACL,qBAAqB,CAAC,aAAa;YACnC,qBAAqB,CAAC,YAAY;YAClC,qBAAqB,CAAC,wBAAwB;SAC/C,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,eAAe;IACf,6EAA6E;IAE7E,MAAM,CAAC,QAAQ;QACb,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,QAAQ,KAAK,OAAO;YAAE,OAAO,0BAA0B,CAAC,OAAO,CAAC;QACpE,IAAI,QAAQ,KAAK,QAAQ;YAAE,OAAO,0BAA0B,CAAC,KAAK,CAAC;QACnE,OAAO,0BAA0B,CAAC,KAAK,CAAC;IAC1C,CAAC;CACF","sourcesContent":["/**\n * EnvironmentLifecycle — initialization, setup status, and domain-specific helpers.\n *\n * Handles environment creation, setup flow tracking, database configuration,\n * and infrastructure service resolution. Depends on EnvironmentRegistry for\n * state persistence.\n */\n\nimport {\n PlatformEnvironmentConfiguration,\n PlatformEnvOperatingSystem,\n parsePlatformEnvironmentId,\n SetupStatus,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport { BackingServiceKind, BackingServiceSource, DatabaseEngine, PUBLIC_DOMAIN_DEFAULTS, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType, type BackingServicesEnvConfig } from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport {\n PlatformDatabaseChoice,\n PlatformDataServices,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { PlatformRuntimeStateService } from '~wildo-cli/services/environment/platform-runtime-state.service';\n\nexport class EnvironmentLifecycle {\n\n // --------------------------------------------------------------------------\n // Initialization\n // --------------------------------------------------------------------------\n\n static initializeLocal(\n overrides?: Partial<PlatformEnvironmentConfiguration>,\n ): PlatformEnvironmentConfiguration {\n return EnvironmentLifecycle.initializeEnvironment(\n WildoLocationType.LOCAL,\n WildoLocationType.LOCAL,\n overrides,\n );\n }\n\n static initializeEnvironment(\n name: string,\n locationType: WildoLocationType,\n overrides?: Partial<PlatformEnvironmentConfiguration>,\n ): PlatformEnvironmentConfiguration {\n const validatedName = parsePlatformEnvironmentId(name);\n const existing = EnvironmentRegistry.get(validatedName);\n if (existing) return existing;\n\n const now = new Date().toISOString();\n const defaultDatabase = {\n engine: DatabaseEngine.MONGODB,\n source: BackingServiceSource.SELF,\n };\n const seededRuntime = overrides?.runtime ?? WildoDeploymentRuntime.DOCKER_COMPOSE;\n // `publicDomain` is required on `PlatformEnvironmentConfiguration`\n // (mirrors the schema-required `WildoInfraEnvConfig.publicDomain`).\n // For the local-init path the canonical write-time default depends\n // on the seeded runtime; remote callers MUST pass an explicit\n // `publicDomain` override (no remote default exists).\n const seededPublicDomain = overrides?.publicDomain\n ?? (locationType === WildoLocationType.LOCAL\n ? (seededRuntime === WildoDeploymentRuntime.KUBERNETES\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_K8S\n : PUBLIC_DOMAIN_DEFAULTS.LOCAL_COMPOSE)\n : undefined);\n if (!seededPublicDomain) {\n throw new Error(\n `EnvironmentLifecycle.initializeEnvironment: '${validatedName}' (remote) must be initialized with an explicit publicDomain override.`,\n );\n }\n const env: PlatformEnvironmentConfiguration = {\n name: validatedName,\n locationType,\n runtime: seededRuntime,\n runtimeEnvironment: overrides?.runtimeEnvironment\n ?? (locationType === WildoLocationType.LOCAL ? RuntimeEnvironment.DEVELOPMENT : undefined),\n os: EnvironmentLifecycle.detectOS(),\n secretsPath: overrides?.secretsPath ?? EnvironmentPaths.resolveDefaultSecretsBase(),\n configPath: overrides?.configPath ?? EnvironmentPaths.resolveDefaultConfigBase(),\n infraPath: overrides?.infraPath ?? EnvironmentPaths.resolveDefaultInfraBase(),\n database: overrides?.database ?? defaultDatabase,\n publicDomain: seededPublicDomain,\n setupStatus: overrides?.setupStatus ?? SetupStatus.NOT_STARTED,\n createdAt: overrides?.createdAt ?? now,\n updatedAt: overrides?.updatedAt ?? now,\n ...overrides,\n };\n\n EnvironmentRegistry.insert(env);\n return env;\n }\n\n // --------------------------------------------------------------------------\n // Batch update (from full env config object)\n // --------------------------------------------------------------------------\n\n static updateEnvironmentState(env: PlatformEnvironmentConfiguration): void {\n EnvironmentRegistry.update(env.name, {\n runtime: env.runtime,\n runtimeEnvironment: env.runtimeEnvironment,\n /*\n * Same defence-in-depth as the public-identity trio below: `config.json` stays the on-disk\n * source of truth and every reader reconciles through `hydrateEnvironmentFromConfig`, but an\n * explicit projection like this one drops whatever it does not list, and a registry record\n * that silently lost the storage mode would report a shape the running stack does not have.\n */\n localDataStorage: env.localDataStorage,\n // Same defence-in-depth as `localDataStorage`: an explicit projection drops what it does not list (#2303).\n serviceProfile: env.serviceProfile,\n secretsPath: env.secretsPath,\n configPath: env.configPath,\n infraPath: env.infraPath,\n database: env.database,\n infrastructureHost: env.infrastructureHost,\n publicDomain: env.publicDomain,\n /**\n * The edge SCHEME and its certificate travel WITH the domain — the three together are the\n * environment's public identity, and a record carrying one without the others describes a\n * host nobody is served on.\n *\n * Persisting them is defence in depth, not the primary mechanism: `config.json` remains the\n * on-disk source of truth and every generator reconciles against it through\n * `hydrateEnvironmentFromConfig`. But omitting them here made the registry actively\n * misleading rather than merely partial — a reader saw `publicDomain: 'localhost'` with no\n * scheme and could not tell \"http\" from \"never round-tripped\", which is exactly the reading\n * that produced an http topology for a TLS dev edge on 2026-08-13.\n */\n kubernetes: env.kubernetes,\n backingServices: env.backingServices,\n serviceAuth: env.serviceAuth,\n });\n }\n\n // --------------------------------------------------------------------------\n // Setup status\n // --------------------------------------------------------------------------\n\n static getSetupStatus(envName?: string): SetupStatus {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.setupStatus ?? SetupStatus.NOT_STARTED;\n }\n\n static setSetupStatus(status: SetupStatus, envName?: string): void {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n const updates: Partial<PlatformEnvironmentConfiguration> = { setupStatus: status };\n if (status === SetupStatus.COMPLETED) {\n updates.setupCompletedAt = new Date().toISOString();\n }\n EnvironmentRegistry.update(name, updates);\n }\n\n static isSetupCompleted(envName?: string): boolean {\n return EnvironmentLifecycle.getSetupStatus(envName) === SetupStatus.COMPLETED;\n }\n\n // --------------------------------------------------------------------------\n // Platform initialization (apps-manager INIT mode)\n // --------------------------------------------------------------------------\n\n static isPlatformInitialized(envName?: string): boolean {\n return PlatformRuntimeStateService.isPlatformInitialized(envName);\n }\n\n static markPlatformInitialized(envName?: string): void {\n PlatformRuntimeStateService.markPlatformInitialized(envName);\n }\n\n static clearPlatformInitialized(envName?: string): void {\n PlatformRuntimeStateService.clearPlatformInitialized(envName);\n }\n\n // --------------------------------------------------------------------------\n // Database helpers\n // --------------------------------------------------------------------------\n\n static getDatabaseChoice(envName?: string): PlatformDatabaseChoice {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.database ?? {\n engine: DatabaseEngine.MONGODB,\n source: BackingServiceSource.SELF,\n };\n }\n\n static getDatabaseEngine(envName?: string): DatabaseEngine {\n return EnvironmentLifecycle.getDatabaseChoice(envName).engine;\n }\n\n static setDatabaseChoice(database: PlatformDatabaseChoice, envName?: string): void {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n EnvironmentRegistry.update(name, { database });\n }\n\n /**\n * Should this environment self-deploy a MongoDB container?\n *\n * A UNION of the two ways an environment can ask for one — the exact mirror of\n * {@link needsLocalPostgreSQL}, and made a union for the mirror-image reason (Phase 5.1, D7):\n * once the PLATFORM engine moves to PostgreSQL, `engine === MONGODB` goes false — but a\n * transition environment still runs every Mongo-backed APPLICATION it always ran, and deleting\n * mongod from under them because the platform moved is the same inexpressibility defect the\n * PostgreSQL gate had, with the stores swapped. Dual-store environments are a first-class state.\n *\n * - platform half: the environment's own database engine is self-hosted MongoDB (unchanged\n * meaning — Atlas/MANAGED envs still get no local mongod);\n * - authored half: `backingServices.mongodb: { source: SELF }` in `wildo.infra.<env>.config.ts`,\n * which composes with ANY platform engine.\n *\n * Takes the env structurally (name + authored `backingServices` snapshot) for the same freshness\n * reason as the PostgreSQL predicate; name-only callers build the shape from the registry.\n */\n static needsLocalMongoDB(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean {\n const db = EnvironmentLifecycle.getDatabaseChoice(env.name);\n const platformEngineIsSelfHostedMongo = db.engine === DatabaseEngine.MONGODB && db.source === BackingServiceSource.SELF;\n const authorDeclaredSelfHostedMongo = env.backingServices?.[BackingServiceKind.MONGODB]?.source === BackingServiceSource.SELF;\n return platformEngineIsSelfHostedMongo || authorDeclaredSelfHostedMongo;\n }\n\n /**\n * Should this environment self-deploy a PostgreSQL container?\n *\n * ## Why this is not simply `getDatabaseEngine() === POSTGRESQL`\n *\n * `database.engine` is the PLATFORM's own database choice, and it is EXCLUSIVE with MongoDB by\n * construction: {@link needsLocalMongoDB}'s PLATFORM half is `engine === MONGODB && source === SELF`\n * (since Phase 5.1 it is a union with an authored `backingServices.mongodb` half — a transition\n * env keeps mongod for its Mongo-backed apps after the platform engine moves), so selecting\n * PostgreSQL there removes MongoDB from the rendered compose file entirely. That is correct for\n * what the field means — apps-manager stores `APPLICATION_ID` as a Mongo `_id`, so the platform\n * control plane IS Mongo-backed — but it left no way to express the configuration an application\n * on the PostgreSQL persistence adapter actually needs: **MongoDB for the platform, PostgreSQL for\n * the application's own resources.** Both containers, at once.\n *\n * Until this predicate existed, PostgreSQL was the ONE self-hosted service in the compose template\n * not gated on its own declaration. Every sibling reads `backingServices.<kind>.source === SELF`\n * (`resolveIncludeLocalClamAV`, `resolveIncludeLocalImmudb`, and MongoDB above). PostgreSQL read a\n * field that also subtracts a different service, which is why no environment could ever have one.\n *\n * So the rule is a UNION of the two ways an environment can ask for a local PostgreSQL:\n *\n * - the platform's own database engine is PostgreSQL and self-hosted — the pre-existing meaning,\n * preserved exactly;\n * - the env author declared `backingServices.postgresql: { source: SELF }` in\n * `wildo.infra.<env>.config.ts` — the additive meaning, which composes with any platform engine.\n *\n * `source === SELF` is required on BOTH halves. The engine half previously ignored `source`, so a\n * MANAGED PostgreSQL (an external RDS) would still have spawned a local container. Requiring SELF\n * matches {@link needsLocalMongoDB} and every sibling resolver; it is unreachable as a behaviour\n * change today because the only CLI path that writes `engine: POSTGRESQL` also writes\n * `source: SELF`.\n *\n * Takes the env STRUCTURALLY (name + the in-memory authored `backingServices` snapshot) rather\n * than a name alone, because the authored snapshot is what the compose generator and the K8s\n * catalog both hold and it can be fresher than the persisted registry entry — the same shape\n * `getDeployableInfraServicesForK8s` already accepts for exactly that reason.\n *\n * Single source of truth for the four sites that ask this question:\n * - `renderDockerComposeTemplate`'s `includePostgreSQL` context value;\n * - `getDockerComposeLocalDataServices` (whether `local_data/postgresql/` must be pre-created);\n * - `getDeployableInfraServicesForK8s` (Compose ⇄ K8s parity);\n * - `shouldProvisionPostgreSQL` in `env-vars-builder.service.ts` (whether env files carry the\n * PostgreSQL admin credentials — half of its union rule). That site used to keep the bare\n * engine predicate this JSDoc rejects, so the compose file rendered a postgres service whose\n * `POSTGRES_ADMIN_PASSWORD` was never emitted (2026-08-11: crash-looping container, failed\n * `wildo local dev`). A fifth site must reuse one of these, never re-derive.\n */\n static needsLocalPostgreSQL(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean {\n const db = EnvironmentLifecycle.getDatabaseChoice(env.name);\n const platformEngineIsSelfHostedPostgres =\n db.engine === DatabaseEngine.POSTGRESQL && db.source === BackingServiceSource.SELF;\n const authorDeclaredSelfHostedPostgres =\n env.backingServices?.[BackingServiceKind.POSTGRESQL]?.source === BackingServiceSource.SELF;\n return platformEngineIsSelfHostedPostgres || authorDeclaredSelfHostedPostgres;\n }\n\n /**\n * Does this environment run its OWN workload for `kind` — a Compose container or a K8s\n * StatefulSet — as opposed to pointing at somebody else's endpoint?\n *\n * ## Why this exists as ONE total function\n *\n * `backingServices.<kind>.source` is the author's statement of the hosting model, and the whole\n * point of `MANAGED` is that the operator supplies the instance. Until this function existed,\n * three of the nine kinds ignored that statement entirely: `redis`, `rabbitmq` and `s3` were\n * pushed unconditionally by BOTH lanes (`getDockerComposeLocalDataServices` and\n * `getDeployableInfraServicesForK8s`), so declaring `redis: { source: MANAGED }` deployed a local\n * Valkey container beside the managed cache and the operator paid for both. `postgresql` had the\n * same shape on the K8s side only.\n *\n * The defect was never that any one condition was wrong — each of the four gated kinds\n * (`mongodb`, `postgresql` on Compose, `clamav`, `immudb`) reads its own declaration correctly. It\n * was that \"is this kind self-hosted?\" had no single owner, so a kind could be added — or an\n * emission site written — without anyone deciding. Hence a `switch` with NO `default` branch and\n * an explicit `: boolean` return type: a member added to {@link BackingServiceKind} tomorrow makes\n * this function fall off its end and fails the build (TS2366) until someone answers the question\n * for it. That is the assert; there is deliberately no second hand-written list to keep in step.\n *\n * ## The answers, and why an OMITTED entry is not one rule\n *\n * `backingServices` keys are optional by design (a flattened app declaration stays truthful about\n * what it enables), so absence is a real input and it means different things per kind:\n *\n * - **Mandatory platform dependencies — `redis`, `rabbitmq`, `s3`.** The platform cannot run\n * without a cache, a broker and an object store: `platform-init` fails closed without\n * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. So an undeclared entry means \"the framework\n * supplies one\", which is exactly today's unconditional behaviour and is why this change cannot\n * delete a workload from any environment that never declared the kind. Only an explicit\n * `MANAGED` withdraws the local workload — which is the fix. Reading `!== MANAGED` rather than\n * `=== SELF` is the whole distinction, and it is deliberate: `=== SELF` would silently drop the\n * three containers from every environment whose file predates the `backingServices` block.\n * - **Optional capabilities — `clamav`, `immudb`.** Nothing runs them unless asked, so absence\n * means no workload and only `SELF` produces one. Unchanged from\n * `resolveIncludeLocalClamAV` / `resolveIncludeLocalImmudb`, which now delegate here.\n *\n * There used to be a third answer, \"no workload at all\", for `metrics-telemetry` and `backup`. Both\n * kinds were WITHDRAWN (2026-09-09 and 2026-09-26, #476 and #1693) because nothing read them.\n *\n * This predicate answers WORKLOAD inclusion only. A `MANAGED` cache, broker or object store is still\n * correctly answered `false` here, and is independently REFUSED at authoring time while no provider\n * module can serve it (`findUnservableBackingServiceDeclarations`, #1693).\n *\n * `mongodb` and `postgresql` are neither: each is a UNION with the PLATFORM's own engine choice\n * (`database.engine`), which lives in the registry rather than in `backingServices`. They delegate\n * to the two predicates that already own that union — never re-derive it here.\n *\n * @param kind the backing service being asked about — every member of the enum is answerable.\n */\n static selfHostsBackingService(\n env: { name: string; backingServices?: BackingServicesEnvConfig },\n kind: BackingServiceKind,\n ): boolean {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n return EnvironmentLifecycle.needsLocalMongoDB(env);\n case BackingServiceKind.POSTGRESQL:\n return EnvironmentLifecycle.needsLocalPostgreSQL(env);\n case BackingServiceKind.REDIS:\n case BackingServiceKind.RABBITMQ:\n case BackingServiceKind.S3:\n return env.backingServices?.[kind]?.source !== BackingServiceSource.MANAGED;\n case BackingServiceKind.CLAMAV:\n case BackingServiceKind.IMMUDB:\n return env.backingServices?.[kind]?.source === BackingServiceSource.SELF;\n }\n }\n\n /**\n * Does this environment USE `kind` and serve it from OUTSIDE its own deployment — a managed database, a managed broker\n * — so that the runtimes dialling it leave the cluster (#3511)?\n *\n * The complement of {@link selfHostsBackingService} within the kinds the environment uses at all, which is why it is\n * not simply `!selfHostsBackingService`: an optional capability nobody declared (`clamav`, `immudb`) is neither\n * self-hosted nor served from elsewhere, and a store no part of the platform uses is not reached anywhere. Answered\n * per kind, with the same no-`default` switch, so a kind added tomorrow fails the build here too:\n *\n * - **`redis`, `rabbitmq`, `s3`** are always used (mandatory platform dependencies), so they are off-cluster exactly\n * when not self-hosted, i.e. declared `MANAGED`.\n * - **`clamav`, `immudb`** are used only when declared, so only a declared `MANAGED` is off-cluster.\n * - **`mongodb`, `postgresql`** are used when the platform's own engine is that store (whatever its source) or the\n * author declares the kind, and are off-cluster when used and not self-hosted.\n */\n static servesBackingServiceOffCluster(\n env: { name: string; backingServices?: BackingServicesEnvConfig },\n kind: BackingServiceKind,\n ): boolean {\n const declaredManaged = env.backingServices?.[kind]?.source === BackingServiceSource.MANAGED;\n switch (kind) {\n case BackingServiceKind.REDIS:\n case BackingServiceKind.RABBITMQ:\n case BackingServiceKind.S3:\n return !EnvironmentLifecycle.selfHostsBackingService(env, kind);\n case BackingServiceKind.CLAMAV:\n case BackingServiceKind.IMMUDB:\n return declaredManaged;\n case BackingServiceKind.MONGODB:\n case BackingServiceKind.POSTGRESQL: {\n const engine = kind === BackingServiceKind.MONGODB ? DatabaseEngine.MONGODB : DatabaseEngine.POSTGRESQL;\n const used = EnvironmentLifecycle.getDatabaseChoice(env.name).engine === engine || env.backingServices?.[kind] !== undefined;\n return used && !EnvironmentLifecycle.selfHostsBackingService(env, kind);\n }\n }\n }\n\n // --------------------------------------------------------------------------\n // Runtime\n // --------------------------------------------------------------------------\n\n static getRuntime(envName?: string): WildoDeploymentRuntime {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.runtime ?? WildoDeploymentRuntime.DOCKER_COMPOSE;\n }\n\n // --------------------------------------------------------------------------\n // Infrastructure service resolution\n // --------------------------------------------------------------------------\n\n static getRequiredInfraServices(envName?: string): PlatformDataServices[] {\n const services: PlatformDataServices[] = [\n PlatformDataServices.VALKEY,\n PlatformDataServices.RABBITMQ,\n PlatformDataServices.MINIO,\n PlatformDataServices.MINIO_INIT,\n ];\n\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n if (EnvironmentLifecycle.needsLocalMongoDB({ name, backingServices: EnvironmentRegistry.get(name)?.backingServices })) {\n services.unshift(PlatformDataServices.MONGODB, PlatformDataServices.MONGODB_INIT);\n }\n\n return services;\n }\n\n static getRequiredPlatformServices(): PlatformWildoServices[] {\n return [\n PlatformWildoServices.PLATFORM_INIT,\n PlatformWildoServices.APPS_MANAGER,\n PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n ];\n }\n\n // --------------------------------------------------------------------------\n // OS detection\n // --------------------------------------------------------------------------\n\n static detectOS(): PlatformEnvOperatingSystem {\n const platform = process.platform;\n if (platform === 'win32') return PlatformEnvOperatingSystem.WINDOWS;\n if (platform === 'darwin') return PlatformEnvOperatingSystem.MACOS;\n return PlatformEnvOperatingSystem.LINUX;\n }\n}\n"]}
1
+ {"version":3,"file":"environment-lifecycle.service.js","sourceRoot":"","sources":["../../../../src/services/environment/environment-lifecycle.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,0BAA0B,EAC1B,0BAA0B,EAC1B,WAAW,GACZ,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,EAAE,0CAA0C,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAiE,MAAM,+BAA+B,CAAC;AAC9S,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAE7G,MAAM,OAAO,oBAAoB;IAE/B,6EAA6E;IAC7E,iBAAiB;IACjB,6EA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KAAK,MAAM,IAAI,GAAG,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;gBAC7H,OAAO,IAAI,IAAI,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC;IAED,6EAA6E;IAC7E,UAAU;IACV,6EAA6E;IAE7E,MAAM,CAAC,UAAU,CAAC,OAAgB;QAChC,MAAM,IAAI,GAAG,OAAO,IAAI,mBAAmB,CAAC,cAAc,EAAE,CAAC;QAC7D,OAAO,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI,sBAAsB,CAAC,cAAc,CAAC;IACzF,CAAC;IAED,6EAA6E;IAC7E,oCAAoC;IACpC,6EAA6E;IAE7E,MAAM,CAAC,2BAA2B;QAChC,OAAO;YACL,qBAAqB,CAAC,aAAa;YACnC,qBAAqB,CAAC,YAAY;YAClC,qBAAqB,CAAC,wBAAwB;SAC/C,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,eAAe;IACf,6EAA6E;IAE7E,MAAM,CAAC,QAAQ;QACb,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,QAAQ,KAAK,OAAO;YAAE,OAAO,0BAA0B,CAAC,OAAO,CAAC;QACpE,IAAI,QAAQ,KAAK,QAAQ;YAAE,OAAO,0BAA0B,CAAC,KAAK,CAAC;QACnE,OAAO,0BAA0B,CAAC,KAAK,CAAC;IAC1C,CAAC;CACF","sourcesContent":["/**\n * EnvironmentLifecycle — initialization, setup status, and domain-specific helpers.\n *\n * Handles environment creation, setup flow tracking, database configuration,\n * and infrastructure service resolution. Depends on EnvironmentRegistry for\n * state persistence.\n */\n\nimport {\n PlatformEnvironmentConfiguration,\n PlatformEnvOperatingSystem,\n parsePlatformEnvironmentId,\n SetupStatus,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport { BackingServiceKind, BackingServiceSource, DatabaseEngine, environmentServiceProfileRunsMessageBroker, PUBLIC_DOMAIN_DEFAULTS, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType, type BackingServicesEnvConfig, type EnvironmentServiceProfile } from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport {\n PlatformDatabaseChoice,\n PlatformDataServices,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { PlatformRuntimeStateService } from '~wildo-cli/services/environment/platform-runtime-state.service';\n\nexport class EnvironmentLifecycle {\n\n // --------------------------------------------------------------------------\n // Initialization\n // --------------------------------------------------------------------------\n\n static initializeLocal(\n overrides?: Partial<PlatformEnvironmentConfiguration>,\n ): PlatformEnvironmentConfiguration {\n return EnvironmentLifecycle.initializeEnvironment(\n WildoLocationType.LOCAL,\n WildoLocationType.LOCAL,\n overrides,\n );\n }\n\n static initializeEnvironment(\n name: string,\n locationType: WildoLocationType,\n overrides?: Partial<PlatformEnvironmentConfiguration>,\n ): PlatformEnvironmentConfiguration {\n const validatedName = parsePlatformEnvironmentId(name);\n const existing = EnvironmentRegistry.get(validatedName);\n if (existing) return existing;\n\n const now = new Date().toISOString();\n const defaultDatabase = {\n engine: DatabaseEngine.MONGODB,\n source: BackingServiceSource.SELF,\n };\n const seededRuntime = overrides?.runtime ?? WildoDeploymentRuntime.DOCKER_COMPOSE;\n // `publicDomain` is required on `PlatformEnvironmentConfiguration`\n // (mirrors the schema-required `WildoInfraEnvConfig.publicDomain`).\n // For the local-init path the canonical write-time default depends\n // on the seeded runtime; remote callers MUST pass an explicit\n // `publicDomain` override (no remote default exists).\n const seededPublicDomain = overrides?.publicDomain\n ?? (locationType === WildoLocationType.LOCAL\n ? (seededRuntime === WildoDeploymentRuntime.KUBERNETES\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_K8S\n : PUBLIC_DOMAIN_DEFAULTS.LOCAL_COMPOSE)\n : undefined);\n if (!seededPublicDomain) {\n throw new Error(\n `EnvironmentLifecycle.initializeEnvironment: '${validatedName}' (remote) must be initialized with an explicit publicDomain override.`,\n );\n }\n const env: PlatformEnvironmentConfiguration = {\n name: validatedName,\n locationType,\n runtime: seededRuntime,\n runtimeEnvironment: overrides?.runtimeEnvironment\n ?? (locationType === WildoLocationType.LOCAL ? RuntimeEnvironment.DEVELOPMENT : undefined),\n os: EnvironmentLifecycle.detectOS(),\n secretsPath: overrides?.secretsPath ?? EnvironmentPaths.resolveDefaultSecretsBase(),\n configPath: overrides?.configPath ?? EnvironmentPaths.resolveDefaultConfigBase(),\n infraPath: overrides?.infraPath ?? EnvironmentPaths.resolveDefaultInfraBase(),\n database: overrides?.database ?? defaultDatabase,\n publicDomain: seededPublicDomain,\n setupStatus: overrides?.setupStatus ?? SetupStatus.NOT_STARTED,\n createdAt: overrides?.createdAt ?? now,\n updatedAt: overrides?.updatedAt ?? now,\n ...overrides,\n };\n\n EnvironmentRegistry.insert(env);\n return env;\n }\n\n // --------------------------------------------------------------------------\n // Batch update (from full env config object)\n // --------------------------------------------------------------------------\n\n static updateEnvironmentState(env: PlatformEnvironmentConfiguration): void {\n EnvironmentRegistry.update(env.name, {\n runtime: env.runtime,\n runtimeEnvironment: env.runtimeEnvironment,\n /*\n * Same defence-in-depth as the public-identity trio below: `config.json` stays the on-disk\n * source of truth and every reader reconciles through `hydrateEnvironmentFromConfig`, but an\n * explicit projection like this one drops whatever it does not list, and a registry record\n * that silently lost the storage mode would report a shape the running stack does not have.\n */\n localDataStorage: env.localDataStorage,\n // Same defence-in-depth as `localDataStorage`: an explicit projection drops what it does not list (#2303).\n serviceProfile: env.serviceProfile,\n secretsPath: env.secretsPath,\n configPath: env.configPath,\n infraPath: env.infraPath,\n database: env.database,\n infrastructureHost: env.infrastructureHost,\n publicDomain: env.publicDomain,\n /**\n * The edge SCHEME and its certificate travel WITH the domain — the three together are the\n * environment's public identity, and a record carrying one without the others describes a\n * host nobody is served on.\n *\n * Persisting them is defence in depth, not the primary mechanism: `config.json` remains the\n * on-disk source of truth and every generator reconciles against it through\n * `hydrateEnvironmentFromConfig`. But omitting them here made the registry actively\n * misleading rather than merely partial — a reader saw `publicDomain: 'localhost'` with no\n * scheme and could not tell \"http\" from \"never round-tripped\", which is exactly the reading\n * that produced an http topology for a TLS dev edge on 2026-08-13.\n */\n kubernetes: env.kubernetes,\n backingServices: env.backingServices,\n serviceAuth: env.serviceAuth,\n });\n }\n\n // --------------------------------------------------------------------------\n // Setup status\n // --------------------------------------------------------------------------\n\n static getSetupStatus(envName?: string): SetupStatus {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.setupStatus ?? SetupStatus.NOT_STARTED;\n }\n\n static setSetupStatus(status: SetupStatus, envName?: string): void {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n const updates: Partial<PlatformEnvironmentConfiguration> = { setupStatus: status };\n if (status === SetupStatus.COMPLETED) {\n updates.setupCompletedAt = new Date().toISOString();\n }\n EnvironmentRegistry.update(name, updates);\n }\n\n static isSetupCompleted(envName?: string): boolean {\n return EnvironmentLifecycle.getSetupStatus(envName) === SetupStatus.COMPLETED;\n }\n\n // --------------------------------------------------------------------------\n // Platform initialization (apps-manager INIT mode)\n // --------------------------------------------------------------------------\n\n static isPlatformInitialized(envName?: string): boolean {\n return PlatformRuntimeStateService.isPlatformInitialized(envName);\n }\n\n static markPlatformInitialized(envName?: string): void {\n PlatformRuntimeStateService.markPlatformInitialized(envName);\n }\n\n static clearPlatformInitialized(envName?: string): void {\n PlatformRuntimeStateService.clearPlatformInitialized(envName);\n }\n\n // --------------------------------------------------------------------------\n // Database helpers\n // --------------------------------------------------------------------------\n\n static getDatabaseChoice(envName?: string): PlatformDatabaseChoice {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.database ?? {\n engine: DatabaseEngine.MONGODB,\n source: BackingServiceSource.SELF,\n };\n }\n\n static getDatabaseEngine(envName?: string): DatabaseEngine {\n return EnvironmentLifecycle.getDatabaseChoice(envName).engine;\n }\n\n static setDatabaseChoice(database: PlatformDatabaseChoice, envName?: string): void {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n EnvironmentRegistry.update(name, { database });\n }\n\n /**\n * Should this environment self-deploy a MongoDB container?\n *\n * A UNION of the two ways an environment can ask for one — the exact mirror of\n * {@link needsLocalPostgreSQL}, and made a union for the mirror-image reason (Phase 5.1, D7):\n * once the PLATFORM engine moves to PostgreSQL, `engine === MONGODB` goes false — but a\n * transition environment still runs every Mongo-backed APPLICATION it always ran, and deleting\n * mongod from under them because the platform moved is the same inexpressibility defect the\n * PostgreSQL gate had, with the stores swapped. Dual-store environments are a first-class state.\n *\n * - platform half: the environment's own database engine is self-hosted MongoDB (unchanged\n * meaning — Atlas/MANAGED envs still get no local mongod);\n * - authored half: `backingServices.mongodb: { source: SELF }` in `wildo.infra.<env>.config.ts`,\n * which composes with ANY platform engine.\n *\n * Takes the env structurally (name + authored `backingServices` snapshot) for the same freshness\n * reason as the PostgreSQL predicate; name-only callers build the shape from the registry.\n */\n static needsLocalMongoDB(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean {\n const db = EnvironmentLifecycle.getDatabaseChoice(env.name);\n const platformEngineIsSelfHostedMongo = db.engine === DatabaseEngine.MONGODB && db.source === BackingServiceSource.SELF;\n const authorDeclaredSelfHostedMongo = env.backingServices?.[BackingServiceKind.MONGODB]?.source === BackingServiceSource.SELF;\n return platformEngineIsSelfHostedMongo || authorDeclaredSelfHostedMongo;\n }\n\n /**\n * Should this environment self-deploy a PostgreSQL container?\n *\n * ## Why this is not simply `getDatabaseEngine() === POSTGRESQL`\n *\n * `database.engine` is the PLATFORM's own database choice, and it is EXCLUSIVE with MongoDB by\n * construction: {@link needsLocalMongoDB}'s PLATFORM half is `engine === MONGODB && source === SELF`\n * (since Phase 5.1 it is a union with an authored `backingServices.mongodb` half — a transition\n * env keeps mongod for its Mongo-backed apps after the platform engine moves), so selecting\n * PostgreSQL there removes MongoDB from the rendered compose file entirely. That is correct for\n * what the field means — apps-manager stores `APPLICATION_ID` as a Mongo `_id`, so the platform\n * control plane IS Mongo-backed — but it left no way to express the configuration an application\n * on the PostgreSQL persistence adapter actually needs: **MongoDB for the platform, PostgreSQL for\n * the application's own resources.** Both containers, at once.\n *\n * Until this predicate existed, PostgreSQL was the ONE self-hosted service in the compose template\n * not gated on its own declaration. Every sibling reads `backingServices.<kind>.source === SELF`\n * (`resolveIncludeLocalClamAV`, `resolveIncludeLocalImmudb`, and MongoDB above). PostgreSQL read a\n * field that also subtracts a different service, which is why no environment could ever have one.\n *\n * So the rule is a UNION of the two ways an environment can ask for a local PostgreSQL:\n *\n * - the platform's own database engine is PostgreSQL and self-hosted — the pre-existing meaning,\n * preserved exactly;\n * - the env author declared `backingServices.postgresql: { source: SELF }` in\n * `wildo.infra.<env>.config.ts` — the additive meaning, which composes with any platform engine.\n *\n * `source === SELF` is required on BOTH halves. The engine half previously ignored `source`, so a\n * MANAGED PostgreSQL (an external RDS) would still have spawned a local container. Requiring SELF\n * matches {@link needsLocalMongoDB} and every sibling resolver; it is unreachable as a behaviour\n * change today because the only CLI path that writes `engine: POSTGRESQL` also writes\n * `source: SELF`.\n *\n * Takes the env STRUCTURALLY (name + the in-memory authored `backingServices` snapshot) rather\n * than a name alone, because the authored snapshot is what the compose generator and the K8s\n * catalog both hold and it can be fresher than the persisted registry entry — the same shape\n * `getDeployableInfraServicesForK8s` already accepts for exactly that reason.\n *\n * Single source of truth for the four sites that ask this question:\n * - `renderDockerComposeTemplate`'s `includePostgreSQL` context value;\n * - `getDockerComposeLocalDataServices` (whether `local_data/postgresql/` must be pre-created);\n * - `getDeployableInfraServicesForK8s` (Compose ⇄ K8s parity);\n * - `shouldProvisionPostgreSQL` in `env-vars-builder.service.ts` (whether env files carry the\n * PostgreSQL admin credentials — half of its union rule). That site used to keep the bare\n * engine predicate this JSDoc rejects, so the compose file rendered a postgres service whose\n * `POSTGRES_ADMIN_PASSWORD` was never emitted (2026-08-11: crash-looping container, failed\n * `wildo local dev`). A fifth site must reuse one of these, never re-derive.\n */\n static needsLocalPostgreSQL(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean {\n const db = EnvironmentLifecycle.getDatabaseChoice(env.name);\n const platformEngineIsSelfHostedPostgres =\n db.engine === DatabaseEngine.POSTGRESQL && db.source === BackingServiceSource.SELF;\n const authorDeclaredSelfHostedPostgres =\n env.backingServices?.[BackingServiceKind.POSTGRESQL]?.source === BackingServiceSource.SELF;\n return platformEngineIsSelfHostedPostgres || authorDeclaredSelfHostedPostgres;\n }\n\n /**\n * Does this environment run its OWN workload for `kind` — a Compose container or a K8s\n * StatefulSet — as opposed to pointing at somebody else's endpoint?\n *\n * ## Why this exists as ONE total function\n *\n * `backingServices.<kind>.source` is the author's statement of the hosting model, and the whole\n * point of `MANAGED` is that the operator supplies the instance. Until this function existed,\n * three of the nine kinds ignored that statement entirely: `redis`, `rabbitmq` and `s3` were\n * pushed unconditionally by BOTH lanes (`getDockerComposeLocalDataServices` and\n * `getDeployableInfraServicesForK8s`), so declaring `redis: { source: MANAGED }` deployed a local\n * Valkey container beside the managed cache and the operator paid for both. `postgresql` had the\n * same shape on the K8s side only.\n *\n * The defect was never that any one condition was wrong — each of the four gated kinds\n * (`mongodb`, `postgresql` on Compose, `clamav`, `immudb`) reads its own declaration correctly. It\n * was that \"is this kind self-hosted?\" had no single owner, so a kind could be added — or an\n * emission site written — without anyone deciding. Hence a `switch` with NO `default` branch and\n * an explicit `: boolean` return type: a member added to {@link BackingServiceKind} tomorrow makes\n * this function fall off its end and fails the build (TS2366) until someone answers the question\n * for it. That is the assert; there is deliberately no second hand-written list to keep in step.\n *\n * ## The answers, and why an OMITTED entry is not one rule\n *\n * `backingServices` keys are optional by design (a flattened app declaration stays truthful about\n * what it enables), so absence is a real input and it means different things per kind:\n *\n * - **Mandatory platform dependencies — `redis`, `rabbitmq`, `s3`.** The platform cannot run\n * without a cache, a broker and an object store: `platform-init` fails closed without\n * `REDIS_HOST` / `RABBITMQ_HOST` / `STORAGE_*`. The broker is the exception since #2303 slice D: it is mandatory\n * only while the environment's queue is RabbitMQ (`environmentServiceProfileRunsMessageBroker`), and a profile\n * whose queue lives in the application's database runs none. So an undeclared entry means \"the framework\n * supplies one\", which is exactly today's unconditional behaviour and is why this change cannot\n * delete a workload from any environment that never declared the kind. Only an explicit\n * `MANAGED` withdraws the local workload — which is the fix. Reading `!== MANAGED` rather than\n * `=== SELF` is the whole distinction, and it is deliberate: `=== SELF` would silently drop the\n * three containers from every environment whose file predates the `backingServices` block.\n * - **Optional capabilities — `clamav`, `immudb`.** Nothing runs them unless asked, so absence\n * means no workload and only `SELF` produces one. Unchanged from\n * `resolveIncludeLocalClamAV` / `resolveIncludeLocalImmudb`, which now delegate here.\n *\n * There used to be a third answer, \"no workload at all\", for `metrics-telemetry` and `backup`. Both\n * kinds were WITHDRAWN (2026-09-09 and 2026-09-26, #476 and #1693) because nothing read them.\n *\n * This predicate answers WORKLOAD inclusion only. A `MANAGED` cache, broker or object store is still\n * correctly answered `false` here, and is independently REFUSED at authoring time while no provider\n * module can serve it (`findUnservableBackingServiceDeclarations`, #1693).\n *\n * `mongodb` and `postgresql` are neither: each is a UNION with the PLATFORM's own engine choice\n * (`database.engine`), which lives in the registry rather than in `backingServices`. They delegate\n * to the two predicates that already own that union — never re-derive it here.\n *\n * @param kind the backing service being asked about — every member of the enum is answerable.\n */\n static selfHostsBackingService(\n env: { name: string; backingServices?: BackingServicesEnvConfig; serviceProfile?: EnvironmentServiceProfile },\n kind: BackingServiceKind,\n ): boolean {\n switch (kind) {\n case BackingServiceKind.MONGODB:\n return EnvironmentLifecycle.needsLocalMongoDB(env);\n case BackingServiceKind.POSTGRESQL:\n return EnvironmentLifecycle.needsLocalPostgreSQL(env);\n case BackingServiceKind.RABBITMQ:\n // #2303 slice D — the broker is mandatory only while the environment's queue is RabbitMQ. Under a profile whose\n // queue lives in the application's database it runs no broker at all; the descriptor refuses a declaration\n // beside it, so absence here is the only shape that reaches this.\n if (!environmentServiceProfileRunsMessageBroker(env.serviceProfile)) return false;\n return env.backingServices?.[kind]?.source !== BackingServiceSource.MANAGED;\n case BackingServiceKind.REDIS:\n case BackingServiceKind.S3:\n return env.backingServices?.[kind]?.source !== BackingServiceSource.MANAGED;\n case BackingServiceKind.CLAMAV:\n case BackingServiceKind.IMMUDB:\n return env.backingServices?.[kind]?.source === BackingServiceSource.SELF;\n }\n }\n\n /**\n * Does this environment USE `kind` and serve it from OUTSIDE its own deployment — a managed database, a managed broker\n * — so that the runtimes dialling it leave the cluster (#3511)?\n *\n * The complement of {@link selfHostsBackingService} within the kinds the environment uses at all, which is why it is\n * not simply `!selfHostsBackingService`: an optional capability nobody declared (`clamav`, `immudb`) is neither\n * self-hosted nor served from elsewhere, and a store no part of the platform uses is not reached anywhere. Answered\n * per kind, with the same no-`default` switch, so a kind added tomorrow fails the build here too:\n *\n * - **`redis`, `rabbitmq`, `s3`** are always used (mandatory platform dependencies), so they are off-cluster exactly\n * when not self-hosted, i.e. declared `MANAGED`.\n * - **`clamav`, `immudb`** are used only when declared, so only a declared `MANAGED` is off-cluster.\n * - **`mongodb`, `postgresql`** are used when the platform's own engine is that store (whatever its source) or the\n * author declares the kind, and are off-cluster when used and not self-hosted.\n */\n static servesBackingServiceOffCluster(\n env: { name: string; backingServices?: BackingServicesEnvConfig; serviceProfile?: EnvironmentServiceProfile },\n kind: BackingServiceKind,\n ): boolean {\n const declaredManaged = env.backingServices?.[kind]?.source === BackingServiceSource.MANAGED;\n switch (kind) {\n case BackingServiceKind.RABBITMQ:\n // Used at all only while the environment runs a broker (#2303 slice D); then off-cluster exactly when not self-hosted.\n return environmentServiceProfileRunsMessageBroker(env.serviceProfile) && !EnvironmentLifecycle.selfHostsBackingService(env, kind);\n case BackingServiceKind.REDIS:\n case BackingServiceKind.S3:\n return !EnvironmentLifecycle.selfHostsBackingService(env, kind);\n case BackingServiceKind.CLAMAV:\n case BackingServiceKind.IMMUDB:\n return declaredManaged;\n case BackingServiceKind.MONGODB:\n case BackingServiceKind.POSTGRESQL: {\n const engine = kind === BackingServiceKind.MONGODB ? DatabaseEngine.MONGODB : DatabaseEngine.POSTGRESQL;\n const used = EnvironmentLifecycle.getDatabaseChoice(env.name).engine === engine || env.backingServices?.[kind] !== undefined;\n return used && !EnvironmentLifecycle.selfHostsBackingService(env, kind);\n }\n }\n }\n\n // --------------------------------------------------------------------------\n // Runtime\n // --------------------------------------------------------------------------\n\n static getRuntime(envName?: string): WildoDeploymentRuntime {\n const name = envName ?? EnvironmentRegistry.getCurrentName();\n return EnvironmentRegistry.get(name)?.runtime ?? WildoDeploymentRuntime.DOCKER_COMPOSE;\n }\n\n // --------------------------------------------------------------------------\n // Infrastructure service resolution\n // --------------------------------------------------------------------------\n\n static getRequiredPlatformServices(): PlatformWildoServices[] {\n return [\n PlatformWildoServices.PLATFORM_INIT,\n PlatformWildoServices.APPS_MANAGER,\n PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n ];\n }\n\n // --------------------------------------------------------------------------\n // OS detection\n // --------------------------------------------------------------------------\n\n static detectOS(): PlatformEnvOperatingSystem {\n const platform = process.platform;\n if (platform === 'win32') return PlatformEnvOperatingSystem.WINDOWS;\n if (platform === 'darwin') return PlatformEnvOperatingSystem.MACOS;\n return PlatformEnvOperatingSystem.LINUX;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { BackingServiceKind, EnvironmentServiceProfile, EnvironmentServiceProfileOptionalService, type BackingServicesEnvConfig } from '@wildo-ai/platform-config-lib';
1
+ import { BackingServiceKind, DatabaseEngine, EnvironmentServiceProfile, EnvironmentServiceProfileOptionalService, type BackingServicesEnvConfig } from '@wildo-ai/platform-config-lib';
2
2
  /**
3
3
  * #2303 — what an environment's service profile allows it to RUN, asked by BOTH deployment lanes (the Docker Compose
4
4
  * generator and the Kubernetes manifests) through these functions, so the two cannot disagree about which workloads a
@@ -31,4 +31,11 @@ export declare function includesMongoSearchSidecar(env: ServiceProfileEnvInput):
31
31
  * passing through it.
32
32
  */
33
33
  export declare function assertProfileRunsItsDatabaseFamilies(env: ServiceProfileEnvInput): void;
34
+ /**
35
+ * Refuse to render minions in an environment whose profile runs them on a queue that cannot confine them (#2303): the
36
+ * DATABASE queue of the `small` profile on a MongoDB application, which has no row-level security (PostgreSQL confines
37
+ * each minion to its own queues). The application's boot refuses the same thing through the same function, for a record
38
+ * that reaches a runtime another way.
39
+ */
40
+ export declare function assertProfileRunsDeclaredMinions(env: ServiceProfileEnvInput, declaredMinionCount: number, applicationDatabaseEngine: DatabaseEngine): void;
34
41
  //# sourceMappingURL=environment-service-profile.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment-service-profile.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-service-profile.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,yBAAyB,EACzB,wCAAwC,EAIxC,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,yBAAyB,CAAC;CACrD;AAED;;GAEG;AACH,wBAAgB,wCAAwC,CACtD,GAAG,EAAE,sBAAsB,EAC3B,IAAI,EAAE,kBAAkB,CAAC,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAC3D,OAAO,EAAE,wCAAwC,GAChD,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAK/E;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,CAWtF"}
1
+ {"version":3,"file":"environment-service-profile.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-service-profile.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,cAAc,EAEd,yBAAyB,EACzB,wCAAwC,EAKxC,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,yBAAyB,CAAC;CACrD;AAED;;GAEG;AACH,wBAAgB,wCAAwC,CACtD,GAAG,EAAE,sBAAsB,EAC3B,IAAI,EAAE,kBAAkB,CAAC,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAC3D,OAAO,EAAE,wCAAwC,GAChD,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAK/E;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,CAWtF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,sBAAsB,EAC3B,mBAAmB,EAAE,MAAM,EAC3B,yBAAyB,EAAE,cAAc,GACxC,IAAI,CAIN"}
@@ -1,4 +1,4 @@
1
- import { BackingServiceSource, DEFAULT_ENVIRONMENT_SERVICE_PROFILE, EnvironmentServiceProfile, EnvironmentServiceProfileOptionalService, describeServiceOmittedByEnvironmentServiceProfile, environmentServiceProfileOmits, environmentServiceProfileRunsOneDatabaseFamily, } from '@wildo-ai/platform-config-lib';
1
+ import { BackingServiceSource, DEFAULT_ENVIRONMENT_SERVICE_PROFILE, EnvironmentServiceProfile, EnvironmentServiceProfileOptionalService, describeMinionsRefusedByEnvironmentServiceProfile, describeServiceOmittedByEnvironmentServiceProfile, environmentServiceProfileOmits, environmentServiceProfileRunsOneDatabaseFamily, } from '@wildo-ai/platform-config-lib';
2
2
  import { EnvironmentUtils } from '../../services/environment/environment.service.js';
3
3
  /**
4
4
  * Whether the environment self-hosts an OPTIONAL backing service, refusing a SELF declaration its profile omits.
@@ -40,4 +40,17 @@ export function assertProfileRunsItsDatabaseFamilies(env) {
40
40
  + `run \`wildo config sync\`, or set serviceProfile to '${EnvironmentServiceProfile.FULL}'.`);
41
41
  }
42
42
  }
43
+ /**
44
+ * Refuse to render minions in an environment whose profile runs them on a queue that cannot confine them (#2303): the
45
+ * DATABASE queue of the `small` profile on a MongoDB application, which has no row-level security (PostgreSQL confines
46
+ * each minion to its own queues). The application's boot refuses the same thing through the same function, for a record
47
+ * that reaches a runtime another way.
48
+ */
49
+ export function assertProfileRunsDeclaredMinions(env, declaredMinionCount, applicationDatabaseEngine) {
50
+ if (declaredMinionCount === 0)
51
+ return;
52
+ const refused = describeMinionsRefusedByEnvironmentServiceProfile(env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE, applicationDatabaseEngine);
53
+ if (refused)
54
+ throw new Error(`Environment "${env.name}": ${refused}`);
55
+ }
43
56
  //# sourceMappingURL=environment-service-profile.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment-service-profile.utils.js","sourceRoot":"","sources":["../../../../src/services/environment/environment-service-profile.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EACpB,mCAAmC,EACnC,yBAAyB,EACzB,wCAAwC,EACxC,iDAAiD,EACjD,8BAA8B,EAC9B,8CAA8C,GAE/C,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAmBvF;;GAEG;AACH,MAAM,UAAU,wCAAwC,CACtD,GAA2B,EAC3B,IAA2D,EAC3D,OAAiD;IAEjD,MAAM,UAAU,GAAG,gBAAgB,CAAC,uBAAuB,CAAC,GAAG,EAAE,I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iceProfileOptionalService,\n describeServiceOmittedByEnvironmentServiceProfile,\n environmentServiceProfileOmits,\n environmentServiceProfileRunsOneDatabaseFamily,\n type BackingServicesEnvConfig,\n} from '@wildo-ai/platform-config-lib';\n\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\n\n/**\n * #2303 — what an environment's service profile allows it to RUN, asked by BOTH deployment lanes (the Docker Compose\n * generator and the Kubernetes manifests) through these functions, so the two cannot disagree about which workloads a\n * profile removes.\n *\n * The descriptor schema refuses the same contradictions while it is parsed (`define-infra-env-config.ts`). These are\n * the render-time site of the same invariants, for an environment record that reaches a lane by another path (a\n * `config.json` persisted before the profile was authored, a registry record): a render that silently dropped a\n * service would leave a capability that looks enabled and does nothing, and a render that kept it would ignore the\n * profile. Neither may win in silence, so the render stops and says why.\n */\nexport interface ServiceProfileEnvInput {\n readonly name: string;\n readonly backingServices?: BackingServicesEnvConfig;\n readonly serviceProfile?: EnvironmentServiceProfile;\n}\n\n/**\n * Whether the environment self-hosts an OPTIONAL backing service, refusing a SELF declaration its profile omits.\n */\nexport function selfHostsOptionalServiceAllowedByProfile(\n env: ServiceProfileEnvInput,\n kind: BackingServiceKind.CLAMAV | BackingServiceKind.IMMUDB,\n service: EnvironmentServiceProfileOptionalService,\n): boolean {\n const selfHosted = EnvironmentUtils.selfHostsBackingService(env, kind);\n const profile = env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE;\n if (selfHosted && environmentServiceProfileOmits(profile, service)) {\n throw new Error(\n `Environment \"${env.name}\": ${describeServiceOmittedByEnvironmentServiceProfile(profile, service)} `\n + `Yet \\`backingServices.${kind}\\` declares { source: ${BackingServiceSource.SELF} }. Remove that declaration, `\n + `or set serviceProfile to '${EnvironmentServiceProfile.FULL}', then render again.`,\n );\n }\n return selfHosted;\n}\n\n/**\n * Whether the `mongot` search sidecar belongs in this environment: it is an attachment to a self-hosted mongod, and the\n * profile may omit it. Every mongot artifact of a lane (the workload, mongod's `mongotHost` routing parameters, the\n * sync-source user and secret, the data directory or persistent volume) reads this one answer.\n */\nexport function includesMongoSearchSidecar(env: ServiceProfileEnvInput): boolean {\n // `needsLocalMongoDB` is what `selfHostsBackingService(env, MONGODB)` answers with; named directly, as both lanes did\n // before this helper existed.\n return EnvironmentUtils.needsLocalMongoDB(env)\n && !environmentServiceProfileOmits(env.serviceProfile, EnvironmentServiceProfileOptionalService.MONGODB_SEARCH);\n}\n\n/**\n * Refuse to render a profile that runs one database family beside two self-hosted database engines. The descriptor\n * refuses the declarations that would bring a second family; this catches a record that reached the lane without\n * passing through it.\n */\nexport function assertProfileRunsItsDatabaseFamilies(env: ServiceProfileEnvInput): void {\n const profile = env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE;\n if (!environmentServiceProfileRunsOneDatabaseFamily(profile)) return;\n if (EnvironmentUtils.needsLocalMongoDB(env) && EnvironmentUtils.needsLocalPostgreSQL(env)) {\n throw new Error(\n `Environment \"${env.name}\": serviceProfile '${profile}' runs ONE database family, and this environment would run both a `\n + 'MongoDB and a PostgreSQL. Put the platform and the application on the same engine (`database.engine` and '\n + '`applicationDatabase.engine` in wildo.infra.<env>.config.ts), declare only that store in `backingServices`, '\n + `run \\`wildo config sync\\`, or set serviceProfile to '${EnvironmentServiceProfile.FULL}'.`,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"environment-service-profile.utils.js","sourceRoot":"","sources":["../../../../src/services/environment/environment-service-profile.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,mCAAmC,EACnC,yBAAyB,EACzB,wCAAwC,EACxC,iDAAiD,EACjD,iDAAiD,EACjD,8BAA8B,EAC9B,8CAA8C,GAE/C,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAmBvF;;GAEG;AACH,MAAM,UAAU,wCAAwC,CACtD,GAA2B,EAC3B,IAA2D,EAC3D,OAAiD;IAEjD,MAAM,UAAU,G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C3B,mBAA2B,EAC3B,yBAAyC;IAEzC,IAAI,mBAAmB,KAAK,CAAC;QAAE,OAAO;IACtC,MAAM,OAAO,GAAG,iDAAiD,CAAC,GAAG,CAAC,cAAc,IAAI,mCAAmC,EAAE,yBAAyB,CAAC,CAAC;IACxJ,IAAI,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,CAAC,IAAI,MAAM,OAAO,EAAE,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import {\n BackingServiceKind,\n BackingServiceSource,\n DatabaseEngine,\n DEFAULT_ENVIRONMENT_SERVICE_PROFILE,\n EnvironmentServiceProfile,\n EnvironmentServiceProfileOptionalService,\n describeMinionsRefusedByEnvironmentServiceProfile,\n describeServiceOmittedByEnvironmentServiceProfile,\n environmentServiceProfileOmits,\n environmentServiceProfileRunsOneDatabaseFamily,\n type BackingServicesEnvConfig,\n} from '@wildo-ai/platform-config-lib';\n\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\n\n/**\n * #2303 — what an environment's service profile allows it to RUN, asked by BOTH deployment lanes (the Docker Compose\n * generator and the Kubernetes manifests) through these functions, so the two cannot disagree about which workloads a\n * profile removes.\n *\n * The descriptor schema refuses the same contradictions while it is parsed (`define-infra-env-config.ts`). These are\n * the render-time site of the same invariants, for an environment record that reaches a lane by another path (a\n * `config.json` persisted before the profile was authored, a registry record): a render that silently dropped a\n * service would leave a capability that looks enabled and does nothing, and a render that kept it would ignore the\n * profile. Neither may win in silence, so the render stops and says why.\n */\nexport interface ServiceProfileEnvInput {\n readonly name: string;\n readonly backingServices?: BackingServicesEnvConfig;\n readonly serviceProfile?: EnvironmentServiceProfile;\n}\n\n/**\n * Whether the environment self-hosts an OPTIONAL backing service, refusing a SELF declaration its profile omits.\n */\nexport function selfHostsOptionalServiceAllowedByProfile(\n env: ServiceProfileEnvInput,\n kind: BackingServiceKind.CLAMAV | BackingServiceKind.IMMUDB,\n service: EnvironmentServiceProfileOptionalService,\n): boolean {\n const selfHosted = EnvironmentUtils.selfHostsBackingService(env, kind);\n const profile = env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE;\n if (selfHosted && environmentServiceProfileOmits(profile, service)) {\n throw new Error(\n `Environment \"${env.name}\": ${describeServiceOmittedByEnvironmentServiceProfile(profile, service)} `\n + `Yet \\`backingServices.${kind}\\` declares { source: ${BackingServiceSource.SELF} }. Remove that declaration, `\n + `or set serviceProfile to '${EnvironmentServiceProfile.FULL}', then render again.`,\n );\n }\n return selfHosted;\n}\n\n/**\n * Whether the `mongot` search sidecar belongs in this environment: it is an attachment to a self-hosted mongod, and the\n * profile may omit it. Every mongot artifact of a lane (the workload, mongod's `mongotHost` routing parameters, the\n * sync-source user and secret, the data directory or persistent volume) reads this one answer.\n */\nexport function includesMongoSearchSidecar(env: ServiceProfileEnvInput): boolean {\n // `needsLocalMongoDB` is what `selfHostsBackingService(env, MONGODB)` answers with; named directly, as both lanes did\n // before this helper existed.\n return EnvironmentUtils.needsLocalMongoDB(env)\n && !environmentServiceProfileOmits(env.serviceProfile, EnvironmentServiceProfileOptionalService.MONGODB_SEARCH);\n}\n\n/**\n * Refuse to render a profile that runs one database family beside two self-hosted database engines. The descriptor\n * refuses the declarations that would bring a second family; this catches a record that reached the lane without\n * passing through it.\n */\nexport function assertProfileRunsItsDatabaseFamilies(env: ServiceProfileEnvInput): void {\n const profile = env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE;\n if (!environmentServiceProfileRunsOneDatabaseFamily(profile)) return;\n if (EnvironmentUtils.needsLocalMongoDB(env) && EnvironmentUtils.needsLocalPostgreSQL(env)) {\n throw new Error(\n `Environment \"${env.name}\": serviceProfile '${profile}' runs ONE database family, and this environment would run both a `\n + 'MongoDB and a PostgreSQL. Put the platform and the application on the same engine (`database.engine` and '\n + '`applicationDatabase.engine` in wildo.infra.<env>.config.ts), declare only that store in `backingServices`, '\n + `run \\`wildo config sync\\`, or set serviceProfile to '${EnvironmentServiceProfile.FULL}'.`,\n );\n }\n}\n\n/**\n * Refuse to render minions in an environment whose profile runs them on a queue that cannot confine them (#2303): the\n * DATABASE queue of the `small` profile on a MongoDB application, which has no row-level security (PostgreSQL confines\n * each minion to its own queues). The application's boot refuses the same thing through the same function, for a record\n * that reaches a runtime another way.\n */\nexport function assertProfileRunsDeclaredMinions(\n env: ServiceProfileEnvInput,\n declaredMinionCount: number,\n applicationDatabaseEngine: DatabaseEngine,\n): void {\n if (declaredMinionCount === 0) return;\n const refused = describeMinionsRefusedByEnvironmentServiceProfile(env.serviceProfile ?? DEFAULT_ENVIRONMENT_SERVICE_PROFILE, applicationDatabaseEngine);\n if (refused) throw new Error(`Environment \"${env.name}\": ${refused}`);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"environment-setup.service.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-setup.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAItG,OAAO,EAOL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA0BtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,WAAW,CAAC,CAmXtB"}
1
+ {"version":3,"file":"environment-setup.service.d.ts","sourceRoot":"","sources":["../../../../src/services/environment/environment-setup.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAKtG,OAAO,EAQL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA0BtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,WAAW,CAAC,CAsXtB"}
@@ -1,8 +1,9 @@
1
1
  import chalk from 'chalk';
2
2
  import { confirm } from '@inquirer/prompts';
3
3
  import { EnvironmentUtils } from '../../services/environment/environment.service.js';
4
+ import { EnvironmentLifecycle } from '../../services/environment/environment-lifecycle.service.js';
4
5
  import { SetupStatus } from '../../services/environment/environment.schemas.js';
5
- import { BackingServiceSource, DatabaseEngine, K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, PUBLIC_DOMAIN_DEFAULTS, WildoDeploymentRuntime, WildoLocationType, } from '@wildo-ai/platform-config-lib';
6
+ import { BackingServiceKind, BackingServiceSource, DatabaseEngine, K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, PUBLIC_DOMAIN_DEFAULTS, WildoDeploymentRuntime, WildoLocationType, } from '@wildo-ai/platform-config-lib';
6
7
  import { ContextManager } from '../../services/context/context-manager.service.js';
7
8
  import { applyProviderKeyDefaults, DEFAULT_PROVIDER_KEY_DEFAULTS_MODE, resolveProviderKeyDefaultsAdoption, } from '../../services/credentials/local-defaults.service.js';
8
9
  import { runtimeModule } from '../../modules/domain/environment/runtime-selector.module.js';
@@ -244,7 +245,11 @@ export async function runEnvSetup(envName, locationType, options, log) {
244
245
  // the one thing a headless caller genuinely must state (see `resolveAdminUserFromEnvSeeds`).
245
246
  // Reconfiguration may add an approver or provider key, but is never credential rotation.
246
247
  // Read after path selection so this is the store the writer will actually update.
247
- const existingSecrets = readSetupSecrets(EnvironmentPaths.resolveSecretsDir(envName));
248
+ // A hosted application's file holds only its own sections, so it is read as such; the authored descriptor decides.
249
+ const authoredForEnv = await loadAuthoredInfraEnvConfig(envName, saasRoot);
250
+ const existingSecrets = readSetupSecrets(EnvironmentPaths.resolveSecretsDir(envName), {
251
+ hosted: authoredForEnv?.config.infrastructureHost !== undefined,
252
+ });
248
253
  const adminAnswers = existingSecrets?.admin ?? (options.nonInteractive
249
254
  ? resolveAdminUserFromEnvSeeds(log)
250
255
  : await platformAdminUserModule.prompt({ log }));
@@ -347,7 +352,6 @@ export async function runEnvSetup(envName, locationType, options, log) {
347
352
  // `env.backingServices?.clamav?.source === SELF` in the docker-compose
348
353
  // generator). Loading the authored descriptor here keeps setup honoring
349
354
  // the operator's authored choices.
350
- const authoredForEnv = await loadAuthoredInfraEnvConfig(envName, saasRoot);
351
355
  if (authoredForEnv) {
352
356
  env.backingServices = authoredForEnv.config.backingServices;
353
357
  env.serviceAuth = authoredForEnv.config.serviceAuth;
@@ -422,13 +426,20 @@ function printSetupSummary(log, env, platformImageRef, isFrameworkDeveloper, adm
422
426
  if (runtime === WildoDeploymentRuntime.KUBERNETES) {
423
427
  log.info(` K8s namespace: ${env.kubernetes?.namespace}`);
424
428
  }
425
- const mongoSuffix = isLocalDb ? ', mongodb' : '';
429
+ // Derived from the same rule the lanes render from, so the summary cannot list a service the profile drops (#2303).
430
+ // Called on `EnvironmentLifecycle` itself, not the `EnvironmentUtils` facade, which tests replace with a partial mock.
431
+ const infraServices = [
432
+ ...(EnvironmentLifecycle.selfHostsBackingService(env, BackingServiceKind.REDIS) ? ['valkey'] : []),
433
+ ...(EnvironmentLifecycle.selfHostsBackingService(env, BackingServiceKind.RABBITMQ) ? ['rabbitmq'] : []),
434
+ ...(EnvironmentLifecycle.selfHostsBackingService(env, BackingServiceKind.S3) ? ['minio'] : []),
435
+ ...(isLocalDb ? ['mongodb'] : []),
436
+ ].join(', ') || 'none';
426
437
  if (isFrameworkDeveloper) {
427
- log.info(`\n Infra services: valkey, rabbitmq, minio${mongoSuffix}`);
438
+ log.info(`\n Infra services: ${infraServices}`);
428
439
  log.info(` Platform services: run natively (hot-reload)`);
429
440
  }
430
441
  else {
431
- log.info(`\n Infra services: valkey, rabbitmq, minio${mongoSuffix}`);
442
+ log.info(`\n Infra services: ${infraServices}`);
432
443
  log.info(` Platform services: apps-manager, crontabs-batches-manager, module-registry (Docker containers)`);
433
444
  log.info(` Docker image: ${platformImageRef} (pulled from Docker Hub)`);
434
445
  }