@wildo-ai/wildo-cli 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  27. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  28. package/dist/src/commands/generate/email-command.utils.js +5 -0
  29. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  30. package/dist/src/commands/init.command.d.ts +14 -0
  31. package/dist/src/commands/init.command.d.ts.map +1 -1
  32. package/dist/src/commands/init.command.js +36 -5
  33. package/dist/src/commands/init.command.js.map +1 -1
  34. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  35. package/dist/src/commands/local/deregister.command.js +4 -0
  36. package/dist/src/commands/local/deregister.command.js.map +1 -1
  37. package/dist/src/commands/local/dev.command.d.ts +6 -0
  38. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  39. package/dist/src/commands/local/dev.command.js +72 -0
  40. package/dist/src/commands/local/dev.command.js.map +1 -1
  41. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  42. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  43. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  44. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  45. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  46. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  47. package/dist/src/commands/local/jobs-run.command.js +92 -0
  48. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  49. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  50. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  51. package/dist/src/commands/local/jobs.command.js +59 -0
  52. package/dist/src/commands/local/jobs.command.js.map +1 -0
  53. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  54. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  55. package/dist/src/commands/local/tunnel.command.js +274 -0
  56. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  57. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  58. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  59. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  60. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  61. package/dist/src/commands/registry/update.command.js +1 -0
  62. package/dist/src/commands/registry/update.command.js.map +1 -1
  63. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  64. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  65. package/dist/src/commands/seal/verify.command.js +62 -1
  66. package/dist/src/commands/seal/verify.command.js.map +1 -1
  67. package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
  68. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  69. package/dist/src/services/application/app-bootstrap.service.js +49 -3
  70. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  71. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  72. package/dist/src/services/application/app-runtime-targets.service.js +9 -1
  73. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  74. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  75. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  76. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  77. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  78. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  79. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  80. package/dist/src/services/application/local-tunnel.service.js +294 -0
  81. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  82. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  83. package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
  84. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  85. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  86. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.js +26 -2
  88. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  89. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  90. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  92. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  93. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  94. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  95. package/dist/src/services/companion/build-console.service.js +54 -4
  96. package/dist/src/services/companion/build-console.service.js.map +1 -1
  97. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  98. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  99. package/dist/src/services/companion/creation-console.service.js +14 -2
  100. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  102. package/dist/src/services/companion/creation-drive.service.js +5 -2
  103. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  104. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  105. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  107. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  108. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  109. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  110. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  111. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  112. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  113. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  114. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  115. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  116. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  117. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  118. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  119. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  120. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  121. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  122. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  123. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  124. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  125. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  126. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  127. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  128. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
  129. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  130. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
  131. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  132. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  133. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  134. package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
  135. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  136. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  137. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  138. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  139. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  140. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
  142. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  143. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  144. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  145. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  146. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  147. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  148. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  149. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  150. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  151. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  152. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  153. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  154. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  155. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  156. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
  157. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  158. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
  159. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  160. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  161. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  162. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  163. package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
  164. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  165. package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
  166. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  167. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  168. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  169. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  170. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  171. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  172. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  173. package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
  174. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  175. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  176. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  177. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  178. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  179. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  180. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  181. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  182. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  183. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  184. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  185. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  186. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  187. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  188. package/dist/src/services/environment/environment-setup.service.js +17 -6
  189. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  190. package/dist/src/services/environment/environment.service.d.ts +4 -3
  191. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  192. package/dist/src/services/environment/environment.service.js +0 -1
  193. package/dist/src/services/environment/environment.service.js.map +1 -1
  194. package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
  195. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  196. package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
  197. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  198. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  199. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  200. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  201. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  202. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  203. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  204. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  205. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  206. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  207. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  208. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  209. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  210. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  211. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  212. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  213. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  214. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  215. package/dist/src/services/registry/module-install.service.js +1 -0
  216. package/dist/src/services/registry/module-install.service.js.map +1 -1
  217. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  218. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  219. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  220. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  221. package/dist/src/services/security/csp-sync.service.js +21 -2
  222. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/framework-root-package.json +3 -3
  225. package/package.json +23 -23
  226. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  227. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
  228. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  229. package/templates/infra/registry-host/docker-compose.yml +9 -2
  230. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  231. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  232. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  233. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  234. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  235. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  236. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  237. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  238. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  239. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  240. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  241. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  242. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  243. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  244. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  245. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  246. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  247. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  248. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  249. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  250. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  251. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  252. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  253. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  254. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  255. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  256. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  257. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  258. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  259. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  260. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  261. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  262. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  263. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  264. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  265. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  266. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  267. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  268. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  269. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  270. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  271. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  272. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  273. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  274. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  275. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  276. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  277. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  278. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  279. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  280. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  282. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  283. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  284. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  285. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  286. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  287. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  288. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  289. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  290. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  291. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  292. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  293. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  294. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  295. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  296. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  297. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  298. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  299. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  300. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  301. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  302. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  303. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  304. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  305. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  306. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  307. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  308. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  309. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  310. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  311. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  312. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  313. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  314. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  315. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  316. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  317. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  318. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  319. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  320. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  321. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  322. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  323. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  324. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  325. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  326. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  327. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  328. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  329. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  330. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  331. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  332. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  333. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  334. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  335. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  336. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  337. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  338. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  339. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  340. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  341. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  342. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  343. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  344. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  345. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  346. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  347. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  348. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  349. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  350. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  351. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  352. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  353. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  354. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  355. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  356. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  357. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  358. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  359. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  360. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  361. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  362. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  363. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  364. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  365. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  366. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  367. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  368. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  369. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  370. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  371. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  372. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  373. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  374. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  375. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  376. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  377. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  378. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  379. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  380. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  381. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  382. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  383. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  384. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  385. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  386. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  387. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  388. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  390. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  391. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  392. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  393. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  394. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  395. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  396. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  397. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  398. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  399. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  400. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  401. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  402. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  403. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  404. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  405. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  406. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  407. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  408. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  409. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  410. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  411. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  412. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  413. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  414. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  415. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  416. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  417. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  418. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  419. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  420. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  421. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  422. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  423. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  424. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  425. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  426. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  427. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  428. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  429. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  430. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  431. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  432. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  433. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  434. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  435. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  436. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  437. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  438. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  439. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  440. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  441. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  442. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  443. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  444. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  445. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  446. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  447. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  448. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  449. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  450. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  451. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  452. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  453. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  454. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  455. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  456. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  457. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  458. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  459. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  460. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  461. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  462. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  463. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  464. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  465. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  466. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  467. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  468. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  469. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  470. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  471. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  472. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  473. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  474. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  475. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  476. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  477. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  478. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  479. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  480. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  481. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  482. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  483. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  484. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  485. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  486. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  487. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  488. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  489. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  490. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  491. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  492. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  493. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  494. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  495. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  496. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  497. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  498. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  499. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  500. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  501. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  502. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  503. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  504. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  505. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  506. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  507. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  508. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  509. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  510. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  511. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  512. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  513. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  514. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  515. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  516. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  517. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  518. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  519. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  520. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  521. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  522. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  523. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  524. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  525. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  526. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  527. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  528. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  529. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  530. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  531. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  532. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  533. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  534. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  535. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  536. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  537. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  538. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  539. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  540. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  541. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  542. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  543. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  544. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  545. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  546. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  547. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  548. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  549. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  550. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  551. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  552. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  553. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  554. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  555. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  556. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  557. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  558. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  559. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  560. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  561. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  562. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  563. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  564. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  565. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  566. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  567. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  568. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  569. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  570. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  571. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  572. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  573. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  574. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  575. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  576. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  577. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  578. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  579. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  580. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  581. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  582. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  583. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  584. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  585. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  586. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  587. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  588. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  589. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sync.command.js","sourceRoot":"","sources":["../../../../src/commands/config/sync.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,OAAO,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,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,4BAA4B,CAAC,GAAmB,EAAE,QAAgB,EAAE,QAAkB;QAClG,MAAM,eAAe,GAAG,sCAAsC,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC9F,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,4DAA4D,eAAe,IAAI,CAAC,CAAC,CAAC;QACzG,+FAA+F;QAC/F,MAAM,MAAM,GAAG,MAAM,kCAAkC,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE;YAC1F,aAAa,EAAE,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,cAAc,IAAI,IAAI;SAC7E,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF","sourcesContent":["/**\n * config sync — Sync configuration: regenerate .env files, manifests,\n * secrets, and CI/CD workflows.\n *\n * Domain filter (`--domain`) selects which operations run:\n * - `env-files`: per-service `.env` files (saas-app, app backends, companions)\n * - `secrets`: regenerate / rotate `secrets.json` for the targeted env\n * - `config`: render deploy artifacts under `.wildo-saas/deploy/<env>/`\n * (K8s Secrets/ConfigMaps + per-service `.env` files for compose runtimes).\n * This is what the generated deploy workflows\n * (`templates/infra/ci/deploy-{k8s,docker-compose}.yml.hbs`) call as\n * `npx wildo config sync --ci --env=<env>`.\n * NOTE: the output location is the SAME with or without `--ci`; `--ci` only\n * switches where credentials come from (flat `WILDO_SECRET_*` env vars vs\n * the on-disk `secrets.json`). A local run therefore also deposits\n * secret-bearing files there — which is why the zone is self-ignoring (see\n * `generateCiDeployArtifacts`).\n * - `manifest`: regenerate K8s manifests under `.wildo-saas/deploy/<env>/k8s/`\n * - `cicd`: write `.github/workflows/deploy-<env>.yml` from the per-env\n * deploy-workflow templates (`templates/infra/ci/deploy-*.yml.hbs`)\n * plus the per-app `wildo-config-validation.yml` validation workflow\n * (`templates/infra/ci/wildo-config-validation.yml.hbs`).\n *\n * `wildo config sync` is the canonical CI/CD entry point — there is\n * intentionally no `wildo deploy` command surface. Build steps (Docker)\n * and apply steps (kubectl / docker compose) live inside the generated\n * GitHub Actions workflow itself, not behind a CLI wrapper.\n */\n\nimport chalk from 'chalk';\nimport { join } from 'path';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { confirm } from '@inquirer/prompts';\nimport { existsSync, readdirSync } from 'fs';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { checkExisting, sync as envSync } from '~wildo-cli/services/environment/env-sync.service';\nimport { reconstructSecretsFromEnv, type ApplicationCiSecretKey } from '~wildo-cli/services/credentials/ci-secrets-adapter.service';\nimport { SecretsReader } from '~wildo-cli/services/credentials/secrets-reader.service';\nimport { SecretsRotation } from '~wildo-cli/services/credentials/secrets-rotation.service';\nimport { InfrastructureHost } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { SecretOwner } from '~wildo-cli/services/credentials/credentials.schemas';\nimport {\n SecretsProvisioning,\n SecretsProvisioningStatus,\n} from '~wildo-cli/services/credentials/secrets-provisioning.service';\nimport { ConfigSecretsUtils } from '~wildo-cli/services/credentials/credentials.service';\nimport type {\n PlatformEnvConfigJson,\n PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\nimport { renderDockerComposeTemplate } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { K8sManifestGenerator } from '~wildo-cli/services/deployment/k8s/k8s-manifest-generator.service';\nimport { shouldDeployPlatformServicesInRuntime } from '~wildo-cli/services/deployment/platform-runtime-policy.service';\nimport { AppFrontendType, overlayEnvironmentProviderConfigurations } from '@wildo-ai/platform-config-lib';\nimport { writeWorkflows, resolveServiceImageDockerfilePath, resolveServiceImageBuildArgs } from '~wildo-cli/services/deployment/ci-workflow-generator.service';\nimport type { WorkflowEnvConfig } from '~wildo-cli/services/deployment/ci-workflow-generator.service';\nimport { generateCiDeployArtifacts } from '~wildo-cli/services/deployment/ci-deploy-generator.service';\nimport {\n AppBootstrapService,\n AppsManagerUnavailableReason,\n classifyAppsManagerUnavailable,\n} from '~wildo-cli/services/application/app-bootstrap.service';\nimport type {\n ApplicationBackendEnvTarget,\n CompanionPlatformEnvTarget,\n ApplicationFrontendEnvExampleTarget,\n ApplicationWorkerEnvTarget,\n ApplicationMinionEnvTarget,\n ApplicationOperatorEnvTarget,\n} from '~wildo-cli/services/environment/env-configuration-generator.service';\nimport { getProviderSecretEnvBindings } from '~wildo-cli/services/credentials/provider-env-vars.utils';\nimport type { SystemOfRecordDeclarationForSecrets } from '~wildo-cli/services/credentials/application-secret-owners.service';\nimport {\n deriveDeployForwardedSecretKeys,\n deriveDeployProviderSecretRequirements,\n loadNonProviderSecretOwners,\n loadSecretRequirementInputs,\n systemOfRecordPresenceOf,\n} from '~wildo-cli/services/credentials/secret-requirements.service';\nimport { getComposedProviderEntry } from '~wildo-cli/services/credentials/composed-provider-catalogue';\nimport {\n describeUnservableBackingServiceDeclaration,\n findUnservableBackingServiceDeclarations,\n getWorkspaceMutationLockPath,\n loadSaasConfig,\n resolveAppLayout,\n WildoDeploymentRuntime,\n WildoLocationType,\n K8S_LOCAL_DEFAULTS,\n withDedicatedFileLock,\n} from '@wildo-ai/platform-config-lib';\nimport { ApplicationSecretKind, buildMinionServiceName, buildWorkerServiceName } from '@wildo-ai/platform-core-shared';\nimport {\n PlatformEnvOperatingSystem,\n parsePlatformEnvironmentId,\n SetupStatus,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { hydrateEnvironmentFromConfig } from '~wildo-cli/services/environment/environment-hydration.utils';\nimport { overlayAuthoredInfraMembers, persistAuthoredOverlay } from '~wildo-cli/services/environment/authored-infra-member-authority';\nimport {\n buildConfigJsonFromInfraEnvConfig,\n getUnsupportedAuthoredConfigFallbackReason,\n loadAuthoredInfraEnvConfig,\n type LoadedAuthoredInfraEnvConfig,\n} from '~wildo-cli/services/environment/authored-infra-config.utils';\nimport {\n PlatformEngineChangeDecision,\n decidePlatformEngineChange,\n describePlatformEngineChange,\n} from '~wildo-cli/services/environment/platform-engine-change.utils';\nimport {\n loadAuthoredInfraEnvSelections,\n resolveProviderArtifactEnvironmentName,\n syncProviderRuntimeArtifactsForApp,\n} from '~wildo-cli/services/application/provider-runtime-sync.service';\nimport { collectServableInfraProviders } from '@wildo-ai/platform-infra-providers';\nimport {\n RuntimeBootstrap,\n RuntimeConfigReconcileStatus,\n} from '~wildo-cli/services/environment/runtime-bootstrap.service';\n\nconst DOMAINS = ['cicd', 'secrets', 'config', 'manifest', 'env-files'] as const;\ntype DomainFilter = (typeof DOMAINS)[number];\nconst APP_ROOT_ONLY_DOMAINS = new Set<DomainFilter>(['cicd', 'manifest']);\n\ninterface PreparedEnvFilesSyncEntry {\n envName: string;\n resolvedEnv: PlatformEnvironmentConfiguration;\n applicationBackends?: ApplicationBackendEnvTarget[];\n companionApis?: CompanionPlatformEnvTarget[];\n applicationFrontends?: ApplicationFrontendEnvExampleTarget[];\n applicationWorkers?: ApplicationWorkerEnvTarget[];\n applicationMinions?: ApplicationMinionEnvTarget[];\n applicationOperators?: ApplicationOperatorEnvTarget[];\n}\n\ninterface PreparedEnvFilesSyncExecution {\n frameworkPath: string;\n isFrameworkDeveloper: boolean;\n entries: PreparedEnvFilesSyncEntry[];\n /**\n * Why the APPLICATION's env targets could not be prepared, when they could not. The platform's own env files are\n * still written (see the catch in `prepareEnvFilesSyncExecution`), and the phase still fails, naming this.\n */\n applicationTargetsRefusal?: string;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction extractServiceReplicas(raw: unknown): Record<string, number> | undefined {\n if (!isRecord(raw)) {\n return undefined;\n }\n\n const replicas: Record<string, number> = {};\n const serviceBuckets: Array<Record<string, unknown>> = [];\n\n if (isRecord(raw.services)) {\n serviceBuckets.push(raw.services);\n }\n if (isRecord(raw.kubernetes) && isRecord(raw.kubernetes.services)) {\n serviceBuckets.push(raw.kubernetes.services);\n }\n\n for (const services of serviceBuckets) {\n for (const [key, service] of Object.entries(services)) {\n if (isRecord(service) && typeof service.replicas === 'number') {\n replicas[key] = service.replicas;\n }\n }\n }\n\n return Object.keys(replicas).length > 0 ? replicas : undefined;\n}\n\n/**\n * Note: the {@link buildConfigJsonFromInfraEnvConfig} projection used to live\n * inline here. It now lives in\n * `~wildo-cli/services/environment/authored-infra-config.utils` so the new\n * runtime-bootstrap service (used by `wildo local up` pre-flight) can reuse\n * the exact same projection — single source of truth keeps the runtime\n * artifacts written by `local up` byte-identical to the ones\n * `wildo config sync --domain manifest` would produce later.\n *\n * The `devCompanion` exclusion (Slice 3 deep-review M-5, 2026-04-13) is\n * documented inside that shared module — same dual-config-json design\n * rationale, same author-versus-runtime split.\n */\n\nfunction createCiEnvConfig(envName: string, config: PlatformEnvConfigJson): PlatformEnvironmentConfiguration {\n const now = new Date().toISOString();\n const validatedEnvName = parsePlatformEnvironmentId(envName);\n const isLocalKubernetes =\n config.runtime === WildoDeploymentRuntime.KUBERNETES\n && config.type === WildoLocationType.LOCAL;\n return {\n name: validatedEnvName,\n locationType: config.type,\n runtime: config.runtime,\n runtimeEnvironment: config.runtimeEnvironment,\n /*\n * Carried from `config.json` so a CI render produces the same compose file as the developer's.\n * Absent on a `config.json` written before the field existed, which `resolveLocalDataStorage`\n * answers from `locationType` — the same value this environment would have been given anyway.\n */\n localDataStorage: config.localDataStorage,\n /** Carried for the same reason: a CI render must omit the services the developer's render omits (#2303). */\n serviceProfile: config.serviceProfile,\n os: PlatformEnvOperatingSystem.LINUX,\n secretsPath: '',\n configPath: '',\n infraPath: '',\n database: config.database,\n setupStatus: SetupStatus.NOT_STARTED,\n createdAt: now,\n updatedAt: now,\n publicDomain: config.publicDomain,\n // Threaded at every site that projects the authored infra config — this is the environment's\n // FIRST materialisation, and a field missing here is absent for the environment's whole life.\n serviceHosts: config.serviceHosts,\n cdn: config.cdn,\n kubernetes: config.kubernetes\n ? {\n ...config.kubernetes,\n imageRegistry: config.remoteProvider?.registryEndpoint,\n }\n : isLocalKubernetes\n ? {\n namespace: K8S_LOCAL_DEFAULTS.NAMESPACE,\n }\n : undefined,\n remoteProvider: config.remoteProvider,\n backingServices: config.backingServices,\n serviceAuth: config.serviceAuth,\n logging: config.logging,\n observability: config.observability,\n providerSelection: config.providerSelection,\n email: config.email,\n agentContentGuardrails: config.agentContentGuardrails,\n ownershipDnsStandIn: config.ownershipDnsStandIn,\n platformKeyManagement: config.platformKeyManagement,\n };\n}\n\nfunction hasRequiredRemoteKubernetesMetadata(config: PlatformEnvConfigJson): boolean {\n if (\n config.type !== WildoLocationType.REMOTE\n || config.runtime !== WildoDeploymentRuntime.KUBERNETES\n ) {\n return true;\n }\n\n return Boolean(config.kubernetes?.namespace && config.remoteProvider?.registryEndpoint);\n}\n\nexport default class ConfigSyncCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'config sync',\n description: 'Sync configuration — regenerate .env files, manifests, secrets, and CI/CD workflows',\n category: CommandCategory.Config,\n flags: {\n env: { type: 'string', description: 'Target specific environment', default: undefined },\n local: { type: 'boolean', description: 'Only local environments', default: false },\n remote: { type: 'boolean', description: 'Only remote environments', default: false },\n domain: { type: 'string', description: 'Filter by domain: cicd, secrets, config, manifest, env-files', default: undefined },\n app: { type: 'string', description: 'Application slug for app backend env generation', default: undefined },\n force: { type: 'boolean', description: 'Overwrite without confirmation (does NOT authorize destructive secret rotation — see --rotate-secrets)', default: false },\n 'rotate-secrets': {\n type: 'boolean',\n description:\n 'Explicitly opt in to destructive `secrets.json` rotation. Required for the `secrets` domain to do anything; --force alone never rotates secrets.',\n default: false,\n },\n 'accept-platform-engine-change': {\n type: 'boolean',\n description:\n 'Explicitly accept ABANDONING an initialized LOCAL platform\\'s data when the authored '\n + '`database.engine` differs from the engine it is running on. There is no Mongo/PostgreSQL '\n + 'migration; INIT re-creates the platform. --force never carries this meaning, and no flag '\n + 'authorizes the change on a REMOTE environment.',\n default: false,\n },\n ci: { type: 'boolean', description: 'CI mode — read secrets from env vars', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const scope = ctx.cliContext.scope;\n const domainFilter = this.resolveDomainFilter(ctx);\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const isCi = ctx.flags.ci === true;\n const envNames = this.resolveEnvNames(ctx, isCi);\n const force = ctx.flags.force === true;\n const rotateSecrets = ctx.flags.rotateSecrets === true || ctx.flags['rotate-secrets'] === true;\n\n const missingAppRootDomains = domainFilter.filter((domain) => APP_ROOT_ONLY_DOMAINS.has(domain));\n if (missingAppRootDomains.length > 0 && !saasRoot) {\n ctx.log.error(\n `Config sync domains [${missingAppRootDomains.join(', ')}] require a targeted app root with wildo.saas.config.ts.`,\n );\n return { success: false };\n }\n\n if (envNames.length === 0 && !domainFilter.includes('cicd')) {\n ctx.log.error(\n isCi\n ? 'No environments to sync. In CI mode, specify --env or pre-seed local environment state.'\n : 'No environments to sync. Run `wildo init` first or specify --env.',\n );\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(`\\n Config sync — scope: ${scope}, domains: ${domainFilter.join(', ') || 'all'}\\n`));\n\n const runSyncDomains = async (): Promise<CommandResult> => {\n // NOTE: there is deliberately no separate `anyFailure` flag. Failure is\n // DERIVED from the recorded outcomes below, so a phase cannot fail the\n // command without also appearing in the report — the two cannot drift.\n // A hand-maintained boolean alongside the list is exactly how the report\n // would come to claim every phase succeeded on a failed run.\n /**\n * Per-phase outcome, so a failure reports what SUCCEEDED alongside what did\n * not.\n *\n * `config sync` bundles pure generation (compose files, provider artifacts,\n * config.json) with phases that require a RUNNING apps-manager to mint\n * per-app secrets. When apps-manager is down the command previously printed\n * only `✖ config sync failed` — while the generation phases had completed and\n * written their files. Readers reasonably concluded nothing had happened, and\n * re-ran or hand-edited on that assumption.\n *\n * The exit code is unchanged: any failed phase still fails the command. What\n * changes is that the report distinguishes \"did not run / did not succeed\"\n * from \"succeeded, and its output is on disk\".\n */\n const phaseOutcomes: Array<{ phase: string; ok: boolean }> = [];\n const runPhase = async (phase: string, run: () => Promise<boolean>): Promise<boolean> => {\n const ok = await run();\n phaseOutcomes.push({ phase, ok });\n return ok;\n };\n let preparedEnvFilesSync: PreparedEnvFilesSyncExecution | null = null;\n\n // Root fix for the stale-config-json bug: BEFORE any domain reads the\n // generated `config.json` / `environments.json` snapshot, reconcile them\n // from the authored `wildo.infra.<env>.config.ts` for every LOCAL env so\n // authored backing-service / port / source changes deterministically\n // reach the generated compose + env files. Remote/CI envs (which\n // reconstruct config from env vars / a sibling secrets repo) are left\n // untouched — see `reconcileLocalConfigFromAuthoredInfra`.\n // MUST run BEFORE the reconcile below, and the ordering is load-bearing rather than\n // stylistic: `reconcileLocalConfigFromAuthoredInfra` writes the authored engine INTO\n // `config.json` unconditionally, which destroys the very baseline this guard compares\n // against. Run it after, and every engine change looks like no change at all.\n // #1693: refuse a backing-service declaration the platform cannot serve BEFORE any phase writes\n // a compose file, a config.json or a lockfile. The provider-runtime phase's lockfile projection\n // refuses the same declarations through the same function, but only after earlier phases have\n // already generated a stack without the service in it.\n if (saasRoot) {\n const servable = await this.refuseUnservableBackingServices(ctx, saasRoot);\n if (!servable) return { success: false };\n }\n\n if (!isCi && saasRoot && envNames.length > 0) {\n const authorized = await this.assertPlatformEngineChangeIsAuthorized(ctx, envNames, saasRoot);\n if (!authorized) return { success: false };\n }\n\n if (!isCi && saasRoot && envNames.length > 0) {\n const reconciled = await this.reconcileLocalConfigFromAuthoredInfra(ctx, envNames, saasRoot);\n if (!reconciled) return { success: false };\n }\n\n // Same ordering rationale, for the OTHER generated input every domain reads:\n // `secrets.json`. Mint any framework-managed credential material the environment\n // predates BEFORE the env-file / manifest renderers project it. Additive and\n // idempotent — it is not the destructive `--rotate-secrets` path. Skipped in CI,\n // which reconstructs secrets from published env vars and has no file to persist to.\n if (!isCi && envNames.length > 0) {\n this.provisionFrameworkManagedSecrets(ctx, envNames);\n }\n\n if (domainFilter.includes('config') && envNames.length > 0) {\n await runPhase('config (compose + config.json + deploy artifacts)', () => this.syncConfig(ctx, envNames, isCi));\n }\n\n if (domainFilter.includes('env-files') && envNames.length > 0) {\n if (!domainFilter.includes('config') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('provider runtime artifacts', () =>\n this.syncProviderRuntimeArtifacts(ctx, ctx.cliContext.resolvedHomes.app.declarationRoot!, envNames));\n }\n if (domainFilter.includes('secrets') && !isCi) {\n await runPhase('env-files (needs apps-manager)', async () => {\n preparedEnvFilesSync = await this.prepareEnvFilesSyncExecution(ctx, envNames, force, isCi);\n return Boolean(preparedEnvFilesSync);\n });\n } else {\n await runPhase('env-files', () => this.syncEnvFiles(ctx, envNames, force, isCi));\n }\n }\n\n if (domainFilter.includes('secrets') && envNames.length > 0) {\n await runPhase('secrets', () => this.syncSecrets(ctx, envNames, force, rotateSecrets));\n }\n\n if (preparedEnvFilesSync) {\n await runPhase('env-files (write)', () => this.syncPreparedEnvFiles(ctx, preparedEnvFilesSync!, isCi));\n }\n\n if (domainFilter.includes('manifest') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('manifest', () => this.syncManifest(ctx));\n }\n\n if (domainFilter.includes('cicd') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('cicd', () => this.syncCicd(ctx, force));\n }\n\n const anyFailure = phaseOutcomes.some((entry) => !entry.ok);\n\n if (anyFailure) {\n // Printed only on failure: on success the existing per-phase output is\n // already sufficient and a summary would be noise.\n const failed = phaseOutcomes.filter((entry) => !entry.ok).map((entry) => entry.phase);\n const succeeded = phaseOutcomes.filter((entry) => entry.ok).map((entry) => entry.phase);\n\n ctx.log.info('');\n ctx.log.info(chalk.cyan(' Phase outcomes:'));\n for (const { phase, ok } of phaseOutcomes) {\n ctx.log.info(ok ? chalk.green(` ✔ ${phase} — completed, output written`) : chalk.red(` ✖ ${phase}`));\n }\n if (succeeded.length > 0) {\n ctx.log.info(chalk.yellow(' Some phases succeeded — their generated files are on disk and do NOT need re-running.'));\n }\n /*\n * ONE SENTENCE naming the split, printed LAST so it sits directly above the runner's bare\n * `✖ config sync failed`.\n *\n * The per-phase list above already carries the facts; what it does not do is survive the\n * distance between a failure REASON and its outcome. Measured 2026-09-18: the reason\n * (\"Provider runtime artifact generation failed: …\") printed fifteen lines before the\n * successes, with provider-catalogue and env-builder chatter between them, and the verdict\n * underneath said \"failed\". An operator reading top-down concludes nothing landed and\n * re-runs; one reading bottom-up reads \"failed\" and concludes the same. A partial run is a\n * NORMAL outcome here — a hosted application legitimately skips shared domains — so the\n * report has to be built for it rather than treating it as an exception.\n */\n if (succeeded.length > 0) {\n ctx.log.info(chalk.yellow(\n ` In one line: ${succeeded.join(', ')} landed; ${failed.join(', ')} did not. `\n + `Each ✖ printed its own reason above, under its phase's output.`,\n ));\n }\n }\n\n ctx.log.info('');\n return { success: !anyFailure };\n };\n\n // Without a targeted app root there is no application worktree to\n // protect — run unlocked (platform-scope syncs).\n if (!saasRoot) {\n return runSyncDomains();\n }\n\n // Workspace-mutation lock (meta-workflows P-20): `config sync` writes\n // generated files across the application worktree, so it serializes\n // against companion coding-agent dispatch runs (which hold this same\n // lock for their whole run) and against concurrent syncs. Fail-fast on\n // contention — a dispatched agent run can hold the lock for many\n // minutes and silently queueing behind it would look like a hang.\n // Human/parallel-session EDITS are deliberately not gated (P-19b).\n try {\n return await withDedicatedFileLock(\n getWorkspaceMutationLockPath(saasRoot),\n runSyncDomains,\n { retries: { retries: 2 } },\n );\n } catch (error) {\n if ((error as { code?: string })?.code === 'ELOCKED') {\n ctx.log.error(\n `The workspace-mutation lock is held (${getWorkspaceMutationLockPath(saasRoot)}) — `\n + 'an active coding-agent dispatch run or another worktree-writing command owns the '\n + 'application worktree right now. Retry after it completes.',\n );\n return { success: false };\n }\n throw error;\n }\n }\n\n private resolveDefaultDomainFilter(ctx: CommandContext): DomainFilter[] {\n if (ctx.flags.ci === true) {\n return ctx.cliContext.resolvedHomes.app.declarationRoot\n ? ['cicd', 'config', 'env-files']\n : ['config', 'env-files'];\n }\n\n // 'secrets' is intentionally NOT in the default domain set — it\n // performs a DESTRUCTIVE rotation of `secrets.json` and is opt-in via\n // either `--domain secrets` (to scope only to secrets) or by passing\n // `--rotate-secrets` alongside the default invocation. See the\n // `--rotate-secrets` flag description and `syncSecrets` for the full\n // rationale (Fix M, 2026-04-21): the previous behavior caused\n // `wildo config sync --local --force` to silently rotate secrets and\n // overwrite a freshly-imported canonical `secrets.json`, which is\n // exactly the surprise this decoupling prevents.\n return ['config', 'env-files'];\n }\n\n private resolveDomainFilter(ctx: CommandContext): DomainFilter[] {\n const raw = ctx.flags.domain as string | undefined;\n if (!raw) {\n return this.resolveDefaultDomainFilter(ctx);\n }\n const value = raw.toLowerCase();\n if (DOMAINS.includes(value as DomainFilter)) return [value as DomainFilter];\n ctx.log.warn(chalk.yellow(` Unknown domain '${raw}', using default domains. Valid: ${DOMAINS.join(', ')}`));\n return this.resolveDefaultDomainFilter(ctx);\n }\n\n private resolveEnvNames(ctx: CommandContext, isCi: boolean): string[] {\n const envFlag = ctx.flags.env as string | undefined;\n const localOnly = ctx.flags.local === true;\n const remoteOnly = ctx.flags.remote === true;\n\n if (envFlag) {\n let validatedEnvName: string;\n try {\n validatedEnvName = parsePlatformEnvironmentId(envFlag);\n } catch {\n ctx.log.error(`Invalid environment name '${envFlag}'.`);\n return [];\n }\n\n if (isCi) {\n return [validatedEnvName];\n }\n\n const env = EnvironmentRegistry.get(validatedEnvName);\n if (!env) {\n ctx.log.error(`Environment '${validatedEnvName}' not found.`);\n return [];\n }\n return [validatedEnvName];\n }\n\n const all = EnvironmentRegistry.getAll();\n const names = Object.keys(all);\n\n if (localOnly) {\n return names.filter((n) => all[n]!.locationType === WildoLocationType.LOCAL);\n }\n if (remoteOnly) {\n return names.filter((n) => all[n]!.locationType === WildoLocationType.REMOTE);\n }\n\n const current = ctx.activeEnv?.name;\n if (current && all[current]) return [current];\n return names;\n }\n\n private loadConfigJsonFromSiblingSecretsRepo(\n envName: string,\n root: string | null | undefined,\n ): PlatformEnvConfigJson | null {\n if (!root) {\n return null;\n }\n\n const siblingSecretsRepo = EnvironmentUtils.detectSiblingSecretsRepo(root);\n if (!siblingSecretsRepo) {\n return null;\n }\n\n const configDir = join(siblingSecretsRepo, 'environments', envName);\n return EnvironmentRegistry.loadConfigJson(envName, configDir);\n }\n\n /**\n * Regenerate the persisted `config.json` + env-registry snapshot for every\n * LOCAL environment from its authored `wildo.infra.<env>.config.ts`, so a\n * subsequent domain (config / env-files / manifest) reads the authored\n * source of truth instead of a stale generated artifact.\n *\n * WHY this exists (root cause). `loadConfigForSync` used to read the generated\n * `config.json` FIRST and fall back to the authored descriptor only when\n * that file was ABSENT (it now lays the descriptor's members over a persisted\n * copy, #2310, but this reconcile predates that); the docker-compose renderer additionally reads the\n * generated `config.json` + the `env.backingServices` registry snapshot\n * directly. None of these were ever refreshed from the authored `.ts`, so a\n * newly-authored backing service (e.g. `immudb: { source: SELF }`) never\n * reached the generated compose and `wildo local up` never started its\n * container. Reconciling here closes that gap deterministically.\n *\n * Scope + guards (delegated to {@link RuntimeBootstrap.reconcileGeneratedConfigFromAuthored}):\n * - LOCAL only — remote/CI keep their generated / env-var-reconstructed\n * config.json (this method is already gated on `!isCi` at the call site).\n * - Atlas-backed Mongo is skipped (its generated config.json carries API\n * metadata the authored descriptor omits); the existing file is kept.\n * - Envs with no registry state or no authored descriptor are skipped.\n *\n * Authored-load/schema failures are fatal. Falling back to a prior generated\n * snapshot would silently preserve revoked or invalid policy, so no later\n * config/env-file domain may execute after reconciliation fails. Deliberate\n * `SKIPPED_UNSUPPORTED` results (for example Atlas metadata) remain distinct\n * and keep the generated snapshot explicitly.\n */\n /**\n * Refuse every `backingServices` declaration, in ANY authored environment, that the platform cannot\n * serve — one resolving to no infrastructure provider, or to a provider no provider module can\n * serve (#1693). Every environment rather than the targeted ones, because the lockfile's infra\n * section records all of them and its projection refuses on any.\n *\n * The judgement is `findUnservableBackingServiceDeclarations`, the same function the lockfile\n * projection (`materializeInfraSection`) and `wildo config validate` use; only the reporting is here.\n * No opt-out, by design — see that function's file header.\n *\n * @returns `false` when the sync must stop.\n */\n private async refuseUnservableBackingServices(ctx: CommandContext, saasRoot: string): Promise<boolean> {\n let envs: Awaited<ReturnType<typeof loadAuthoredInfraEnvSelections>>;\n try {\n envs = await loadAuthoredInfraEnvSelections(saasRoot);\n } catch (error) {\n // Not this check's finding: an environment that cannot be LOADED is reported by the phases that\n // load it (and the lockfile projection refuses it with its own error). Failing here would turn a\n // `--domain secrets` run into a failure it never had, over a file it does not read.\n ctx.log.warn(` Backing-service servability not checked — an authored environment could not be read: ${ErrorUtils.extractErrorMessage(error)}`);\n return true;\n }\n const servableProviders = collectServableInfraProviders();\n const findings = envs.flatMap((env) => findUnservableBackingServiceDeclarations({ ...env, servableProviders }));\n if (findings.length === 0) return true;\n\n ctx.log.error('Backing-service declarations the platform cannot serve — the application would receive a credential for a server it never connects to:');\n for (const finding of findings) {\n ctx.log.error(` ${describeUnservableBackingServiceDeclaration(finding)}`);\n }\n return false;\n }\n\n /**\n * Refuse an authored platform-engine change that would abandon data.\n *\n * The authored `database.engine` makes the platform's store a one-line, reviewable edit — which is\n * the goal, and also the hazard: the flip is fresh-install-only, so applying it to an environment\n * that has already been initialized does not migrate anything, it abandons it.\n *\n * Policy lives in `decidePlatformEngineChange`; this method only supplies the four facts it needs\n * and reports. Gated on `!isCi` for the same reason the reconcile is: CI reconstructs its config\n * from published env vars rather than from the authored descriptor, so it has no baseline this\n * comparison could trust.\n *\n * @returns `false` when the sync must stop.\n */\n private async assertPlatformEngineChangeIsAuthorized(\n ctx: CommandContext,\n envNames: string[],\n saasRoot: string,\n ): Promise<boolean> {\n /**\n * BOTH spellings, mirroring `rotateSecrets` above: the kernel exposes a kebab-case flag under\n * its camelCase name, and reading only one form leaves the flag inert while `--help` advertises\n * it. Found by running the real CLI — a unit test cannot catch this, because the test mocks\n * whichever key the implementation happens to read.\n */\n const acknowledged = ctx.flags.acceptPlatformEngineChange === true\n || ctx.flags['accept-platform-engine-change'] === true;\n\n for (const envName of envNames) {\n const env = EnvironmentRegistry.get(envName);\n if (!env) continue;\n\n const authored = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n if (!authored) continue;\n\n const decision = decidePlatformEngineChange({\n locationType: env.locationType,\n authoredEngine: authored.config.database?.engine,\n // The engine currently in force, read BEFORE the reconcile overwrites it.\n baselineEngine: EnvironmentUtils.loadConfigJson(envName)?.database?.engine,\n platformInitialized: EnvironmentUtils.isPlatformInitialized(envName),\n acknowledged,\n });\n\n const message = describePlatformEngineChange(decision, {\n envName,\n authoredEngine: authored.config.database?.engine,\n baselineEngine: EnvironmentUtils.loadConfigJson(envName)?.database?.engine,\n });\n\n switch (decision) {\n case PlatformEngineChangeDecision.NO_AUTHORED_ENGINE:\n case PlatformEngineChangeDecision.UNCHANGED:\n break;\n case PlatformEngineChangeDecision.DECLARED_FOR_NEW_BASELINE:\n if (message) ctx.log.info(chalk.dim(` ${message}`));\n break;\n case PlatformEngineChangeDecision.ALLOWED_LOCAL_UNINITIALIZED:\n case PlatformEngineChangeDecision.ALLOWED_LOCAL_ACKNOWLEDGED:\n if (message) ctx.log.warn(chalk.yellow(` ${message}`));\n break;\n case PlatformEngineChangeDecision.REFUSED_LOCAL_INITIALIZED:\n case PlatformEngineChangeDecision.REFUSED_REMOTE:\n if (message) ctx.log.error(message);\n return false;\n }\n }\n\n return true;\n }\n\n private async reconcileLocalConfigFromAuthoredInfra(\n ctx: CommandContext,\n envNames: string[],\n saasRoot: string,\n ): Promise<boolean> {\n for (const envName of envNames) {\n const env = EnvironmentRegistry.get(envName);\n if (!env) {\n // No registry state (CI/remote-reconstructed) — nothing to reconcile.\n continue;\n }\n\n try {\n const result = await RuntimeBootstrap.reconcileGeneratedConfigFromAuthored({\n env,\n saasRoot,\n });\n\n if (result.status === RuntimeConfigReconcileStatus.RECONCILED) {\n ctx.log.info(\n chalk.dim(\n result.refreshedEnvState\n ? ` Reconciled '${envName}' config.json + env state from authored infra.`\n : ` Reconciled '${envName}' config.json from authored infra (env state already current).`,\n ),\n );\n } else if (result.status === RuntimeConfigReconcileStatus.SKIPPED_UNSUPPORTED) {\n ctx.log.warn(\n chalk.yellow(\n ` Keeping generated config.json for '${envName}' (cannot reconcile from authored infra): ${result.reason}`,\n ),\n );\n }\n } catch (error) {\n ctx.log.error(\n `Could not reconcile '${envName}' from authored infra; refusing stale generated config: `\n + ErrorUtils.extractErrorMessage(error),\n );\n return false;\n }\n }\n return true;\n }\n\n /**\n * Mint + persist every framework-managed credential material missing from each target\n * environment's `secrets.json`, so the downstream domains render artifacts that carry\n * it.\n *\n * WHY this exists (root cause). Framework-GENERATED material used to be minted only by\n * the interactive `wildo setup` of a brand-new environment; nothing ever backfilled an\n * existing one. Every material introduced after an environment was created was\n * therefore permanently absent there, and the resulting failures were silent by design\n * — the crontabs-batches-manager signing keypair dead-lettering every scheduled tick,\n * and the immudb state-signing keypair leaving the audit store's whole-server\n * substitution defense off (\"state-signature pinning is OFF\"). This is the sibling of\n * {@link ConfigSyncCommand.reconcileLocalConfigFromAuthoredInfra}: same \"refresh the\n * generated INPUT before any domain consumes it\" discipline, applied to secrets.\n *\n * NOT a rotation. Only absent/blank material is minted; anything already present is\n * untouched, so this can never invalidate a credential a running deployment holds.\n * Destructive rotation remains behind `--rotate-secrets` (see {@link syncSecrets}).\n *\n * NON-FATAL by design: an environment with no readable `secrets.json` (never set up, or\n * remote-reconstructed) is skipped silently — the domain that actually needs secrets\n * fails loudly with its own actionable message.\n */\n private provisionFrameworkManagedSecrets(ctx: CommandContext, envNames: string[]): void {\n for (const envName of envNames) {\n try {\n const outcome = SecretsProvisioning.ensureForEnvironment(envName);\n if (outcome.status === SecretsProvisioningStatus.PROVISIONED) {\n ctx.log.info(\n chalk.dim(\n ` Provisioned missing framework-managed secret material for '${envName}': `\n + `${outcome.mintedRefs.join(', ')}.`,\n ),\n );\n }\n } catch (error) {\n ctx.log.warn(\n chalk.yellow(\n ` Could not provision framework-managed secrets for '${envName}': `\n + `${ErrorUtils.extractErrorMessage(error)}.`,\n ),\n );\n }\n }\n }\n\n private async loadConfigForSync(\n envName: string,\n frameworkPath: string | null,\n ctx: CommandContext,\n saasRoot?: string,\n ): Promise<PlatformEnvConfigJson | null> {\n /*\n * Whether this environment runs on ANOTHER application's infrastructure is decided by the authored descriptor\n * alone (`infrastructureHost`). A persisted config.json — generated, or in a sibling secrets repository — written\n * before that changed still names the old owner, and every guard downstream reads it: a hosted remote environment\n * would regenerate its host's platform and infrastructure material (#1171). So the authored descriptor, when there\n * is one, is loaded FIRST, and a persisted copy that disagrees with it about the host is passed over for the\n * authored projection — the rule `RuntimeBootstrap.ensureConfigJson` applies to the local lane.\n *\n * A persisted copy that agrees about the host is still not taken as it is (#2310). Every member the descriptor\n * decides (`AUTHORED_INFRA_MEMBER_AUTHORITY`) is laid over it from the authored projection, absence included\n * (`overlayAuthoredInfraMembers`): a remote environment used to render whatever logging, exporter, provider choice\n * or receiving domain its persisted file said, often none, and kept a value removed from the descriptor. The\n * persisted copy keeps only what a descriptor cannot carry (Atlas API metadata, external endpoints) and the setup\n * answers of a member the descriptor leaves unauthored.\n *\n * An authored descriptor that EXISTS and cannot be loaded refuses, even beside a persisted copy: a hosted\n * descriptor whose host is missing is exactly that case, and the persisted copy is the stale answer.\n */\n let authoredConfig: LoadedAuthoredInfraEnvConfig | null = null;\n if (saasRoot) {\n try {\n authoredConfig = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n } catch (error) {\n ctx.log.error(\n `Failed to load authored env descriptor for '${envName}': ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return null;\n }\n }\n const describesAuthoredHosting = (persisted: PlatformEnvConfigJson, source: string): boolean => {\n if (authoredConfig === null) return true;\n const persistedHost = persisted.infrastructureHost?.applicationRoot ?? null;\n const authoredHost = authoredConfig.config.infrastructureHost?.applicationRoot ?? null;\n if (persistedHost === authoredHost) return true;\n const describe = (host: string | null): string => host === null ? 'owning its infrastructure' : `running on the infrastructure of ${host}`;\n ctx.log.info(\n ` ${source} describes '${envName}' as ${describe(persistedHost)}, but ${authoredConfig.path} declares it as `\n + `${describe(authoredHost)}: using the authored descriptor.`,\n );\n return false;\n };\n\n const followAuthored = (persisted: PlatformEnvConfigJson, source: string, writeBack: boolean): PlatformEnvConfigJson => {\n if (authoredConfig === null) return persisted;\n const overlay = overlayAuthoredInfraMembers(persisted, authoredConfig.config);\n if (overlay.correctedMembers.length > 0) {\n ctx.log.info(\n ` ${source} for '${envName}' disagrees with ${authoredConfig.path} on ${overlay.correctedMembers.join(', ')}: `\n + 'using the authored descriptor for those.',\n );\n // The env-file and compose lanes read the GENERATED file from disk, not this return value. A sibling secrets\n // repository is the operator's, and is never written.\n const persisted = writeBack ? persistAuthoredOverlay(envName, overlay.config) : { written: false };\n if (persisted.refusal !== undefined) {\n ctx.log.warn(` Kept the generated config.json for '${envName}': the corrected copy does not validate (${persisted.refusal}).`);\n }\n }\n return overlay.config;\n };\n\n let generated: PlatformEnvConfigJson | null = null;\n try {\n generated = EnvironmentUtils.loadConfigJson(envName);\n } catch {\n // Fall through to external or authored config sources when the generated\n // scoped config payload is missing or unreadable.\n }\n // Outside the `try`: a failure to write the corrected copy back is not an unreadable config.json.\n if (generated && describesAuthoredHosting(generated, 'The generated config.json')) {\n const configured = followAuthored(generated, 'The generated config.json', true);\n if (!hasRequiredRemoteKubernetesMetadata(configured)) {\n return null;\n }\n return configured;\n }\n\n if (saasRoot) {\n const appSiblingPersisted = this.loadConfigJsonFromSiblingSecretsRepo(envName, saasRoot);\n if (appSiblingPersisted && describesAuthoredHosting(appSiblingPersisted, 'The sibling secrets repository config.json')) {\n const appSiblingConfig = followAuthored(appSiblingPersisted, 'The sibling secrets repository config.json', false);\n if (!hasRequiredRemoteKubernetesMetadata(appSiblingConfig)) {\n return null;\n }\n return appSiblingConfig;\n }\n\n if (authoredConfig) {\n const unsupportedFallbackReason = getUnsupportedAuthoredConfigFallbackReason(\n envName,\n authoredConfig.path,\n authoredConfig.config,\n );\n if (unsupportedFallbackReason) {\n ctx.log.error(unsupportedFallbackReason);\n return null;\n }\n\n const configJson = buildConfigJsonFromInfraEnvConfig(authoredConfig.config);\n if (!hasRequiredRemoteKubernetesMetadata(configJson)) {\n return null;\n }\n return configJson;\n }\n }\n\n const frameworkSiblingConfig = this.loadConfigJsonFromSiblingSecretsRepo(envName, frameworkPath);\n if (frameworkSiblingConfig) {\n if (!hasRequiredRemoteKubernetesMetadata(frameworkSiblingConfig)) {\n return null;\n }\n return frameworkSiblingConfig;\n }\n\n return null;\n }\n\n /**\n * Every provider env var the generated CI workflow must carry as a `WILDO_SECRET_PROVIDER_ENV_*`\n * input, for every provider this application declares.\n *\n * ## Both halves of a provider's secrets, not just the bindings (#361)\n *\n * A provider states its credentials TWICE, and the two sets are not the same size:\n *\n * | source | what it names | shipped by |\n * |---|---|---|\n * | `secretsContract` | every env var the provider needs, whatever it is for | engine module OR companion contribution |\n * | protocol `runtimeContract` bindings | the subset a PROTOCOL resolves through (base URL, auth header, …) | engine module only |\n *\n * The contract is a strict SUPERSET. Measured 2026-09-06 against the built engine registry: 13\n * engine contract keys are named by no binding at all — every `IMMUDB_*`,\n * `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`, `ODOO_BASE_URL`/`_DB`/`_LOGIN` — while\n * the reverse inclusion holds exactly (25 binding `secretRef`s, all of them contract\n * `envVarName`s, zero exceptions). This collector enumerated bindings alone, so those 13 had no\n * input in any generated workflow: the deployment authenticated with nothing and failed at the\n * vendor, three layers from the cause.\n *\n * It gets worse rather than merely staying incomplete. A provider known only from a companion\n * contribution has ZERO protocol bindings BY CONSTRUCTION — a runtime contract is code and a\n * contribution is values-free data — so the moment package-provider discovery registers one, it\n * contributes not a subset but nothing at all. Reading the contract half fixes both cases with\n * one source, and is why the composed catalogue exposes `secrets` independently of `protocols`.\n *\n * ## An unresolvable ref contributes nothing, silently, and that is calibrated rather than lazy\n *\n * A declared ref the composed catalogue cannot name yields no keys and no warning. Measured on\n * the dogfood applications: Wonder Todos declares `sentry` and `wonderTodosFilePicker`, neither of\n * which is an engine provider — they are FRONTEND_SDK providers whose material is public config\n * delivered through the frontend build, not a backend secret. Warning here would fire on correct\n * declarations, which is how an operator learns to skim the output. (`recaptcha` was the third until\n * 1783ec83 gave it a backend module; its verification secret is now a contract key like any other.)\n */\n private async loadConfiguredProviderEnvKeys(saasRoot: string): Promise<Omit<ApplicationCiSecretKey, 'kind'>[]> {\n const providerEnvKeys = new Map<string, Omit<ApplicationCiSecretKey, 'kind'>>();\n\n /**\n * `required` is merged with OR across sources, and the direction is deliberate: the contract\n * and the bindings each carry the flag and CAN disagree about the same env var. It decides only\n * which half of the generated block a key lands in — both halves are emitted, one under an\n * \"Optional\" comment — so an over-required key costs a comment line, while an under-required\n * one is the silent missing input this whole method exists to stop.\n *\n * For a SCOPED provider's contract key this is no longer the final answer: `syncCicd` places it by the derivation\n * `wildo secrets list` uses (`loadDeployProviderSecretRequirements`, #2977), which knows which arm reads which slot.\n * This merge decides every other key, and every key when that derivation cannot be loaded.\n */\n const addProviderEnvKey = (envVarName: string, required?: boolean) => {\n const previous = providerEnvKeys.get(envVarName);\n providerEnvKeys.set(envVarName, {\n envVarName,\n required: previous?.required === true || required === true,\n });\n };\n\n type ProviderConfiguredProtocols = Parameters<typeof getProviderSecretEnvBindings>[1];\n const collectProviderEnvKeys = (\n providerConfigurations: Record<string, ProviderConfiguredProtocols | undefined> | undefined,\n ) => {\n if (!providerConfigurations) {\n return;\n }\n\n for (const [providerRef, configuredProtocols] of Object.entries(providerConfigurations)) {\n if (!configuredProtocols) {\n continue;\n }\n\n for (const binding of getProviderSecretEnvBindings(providerRef, configuredProtocols)) {\n addProviderEnvKey(binding.envVarName, binding.required);\n }\n }\n };\n const collectProviderRefsFromScopes = (providersBlock: unknown): Set<string> => {\n const providerRefs = new Set<string>();\n\n const collectRuntimeScope = (scope: unknown) => {\n if (!scope || typeof scope !== 'object') {\n return;\n }\n const providers = (scope as { providers?: unknown }).providers;\n if (!providers || typeof providers !== 'object') {\n return;\n }\n for (const providerRef of Object.keys(providers)) {\n providerRefs.add(providerRef);\n }\n };\n\n const scopes = (providersBlock as { scopes?: Record<string, unknown> } | undefined)?.scopes;\n if (!scopes) {\n return providerRefs;\n }\n\n collectRuntimeScope(scopes.backend);\n collectRuntimeScope(scopes.companion);\n\n for (const scopeGroup of [scopes.frontendServices, scopes.minions, scopes.workers]) {\n if (!scopeGroup || typeof scopeGroup !== 'object') {\n continue;\n }\n for (const scope of Object.values(scopeGroup)) {\n collectRuntimeScope(scope);\n }\n }\n\n return providerRefs;\n };\n\n const saasConfig = await loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'));\n if (!saasConfig) {\n return [];\n }\n\n // `ProviderConfigurationsSchema` (in `define-saas-config.ts`) types each\n // per-provider entry as `Record<string, unknown>` — the protocol layer is\n // left intentionally loose at the schema level. `getProviderSecretEnvBindings`\n // narrows that to `Partial<Record<protocolKind, Record<string, unknown>>>`\n // (the runtime contract). The cast bridges the schema/function gap without\n // weakening the schema or over-tightening the runtime contract.\n collectProviderEnvKeys(\n saasConfig.providerConfigurations as Record<string, ProviderConfiguredProtocols | undefined>,\n );\n for (const providerRef of collectProviderRefsFromScopes(saasConfig.providers)) {\n const configuredProtocols = saasConfig.providerConfigurations[providerRef] as ProviderConfiguredProtocols | undefined;\n for (const binding of getProviderSecretEnvBindings(\n providerRef,\n configuredProtocols,\n )) {\n addProviderEnvKey(binding.envVarName, binding.required);\n }\n }\n\n // The contract half (#361), over EVERY declared ref from both populations above — a provider\n // configured but not scoped, or scoped but not configured, is declared either way, and the\n // secret it needs does not depend on which of the two the author wrote it in.\n //\n // Order relative to the binding passes is irrelevant: `addProviderEnvKey` merges `required`\n // with OR, so a key both halves name gets the same answer whichever runs last. (Measured\n // 2026-09-06 across all 22 engine providers: the two halves disagree about `required` for zero\n // keys today, so the merge is currently inert as well as order-free.)\n const declaredProviderRefs = new Set<string>([\n ...Object.keys(saasConfig.providerConfigurations ?? {}),\n ...collectProviderRefsFromScopes(saasConfig.providers),\n ]);\n for (const providerRef of declaredProviderRefs) {\n for (const secret of getComposedProviderEntry(providerRef)?.secrets ?? []) {\n addProviderEnvKey(secret.envVarName, secret.required);\n }\n }\n\n return [...providerEnvKeys.values()];\n }\n\n /**\n * Which scoped provider secrets the deploy job REQUIRES, by the derivation `wildo secrets list` uses (#2977), so the\n * workflow files a secret no enabled arm reads under its \"Optional\" comment exactly where the listing reports it\n * `required: false`. Before, the collector above OR-merged the contract's `required` over every declared ref, so\n * `MICROSOFT_OAUTH2_CLIENT_SECRET` landed among Wonder Todos' required GitHub secrets though its `microsoft` scope\n * enables `REST_API` alone and only the sign-in arm reads that slot.\n *\n * The derivation is not re-done here; this only loads its inputs and asks it. When they cannot be loaded (a provider\n * package's companion barrel fails to import, the SaaS config fails to bundle) the answer is `undefined`, and every\n * key keeps the OR-merge, whose error is to require too much: an over-required key costs a comment line, an\n * under-required one a deploy that boots without it.\n */\n private async loadDeployProviderSecretRequirements(ctx: CommandContext, saasRoot: string): Promise<ReadonlyMap<string, boolean> | undefined> {\n try {\n return deriveDeployProviderSecretRequirements(await loadSecretRequirementInputs(saasRoot));\n } catch (error) {\n ctx.log.warn(\n ` CI/CD: could not derive which provider secrets an enabled arm reads (${ErrorUtils.extractErrorMessage(error)}), so every `\n + 'provider secret a contract marks required is filed as a required GitHub secret.',\n );\n return undefined;\n }\n }\n\n private async syncEnvFiles(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n isCi: boolean,\n ): Promise<boolean> {\n const prepared = await this.prepareEnvFilesSyncExecution(ctx, envNames, force, isCi);\n if (!prepared) {\n return false;\n }\n\n return this.syncPreparedEnvFiles(ctx, prepared, isCi);\n }\n\n private loadSyncCredentials(\n ctx: CommandContext,\n envName: string,\n isCi: boolean,\n ): PlatformEnvSecretsJson | null {\n if (isCi) {\n try {\n return reconstructSecretsFromEnv();\n } catch (err) {\n ctx.log.error(`Failed to reconstruct secrets: ${ErrorUtils.extractErrorMessage(err)}`);\n return null;\n }\n }\n\n const credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return null;\n }\n\n return credentials;\n }\n\n private async prepareEnvFilesSyncExecution(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n isCi: boolean,\n ): Promise<PreparedEnvFilesSyncExecution | null> {\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error(\n 'Framework path not set. Re-run the CLI install script, or set `frameworkPath` in your machine preferences.',\n );\n return null;\n }\n\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const entries: PreparedEnvFilesSyncEntry[] = [];\n let applicationTargetsRefusal: string | undefined;\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const shouldPrepareApplicationTargets =\n isFrameworkDeveloper && Boolean(saasRoot);\n if (isFrameworkDeveloper && !saasRoot) {\n ctx.log.warn(\n 'Skipping application env target generation because config sync is running outside a targeted app root.',\n );\n }\n\n for (const envName of envNames) {\n const config = await this.loadConfigForSync(envName, frameworkPath, ctx, saasRoot ?? undefined);\n if (!config) {\n ctx.log.error(`No valid config for '${envName}'.`);\n return null;\n }\n\n const env = EnvironmentRegistry.get(envName);\n const resolvedEnv = hydrateEnvironmentFromConfig(\n env ?? createCiEnvConfig(envName, config),\n config,\n );\n if (!env && !isCi) {\n ctx.log.error(`Environment '${envName}' not found.`);\n return null;\n }\n\n if (resolvedEnv.locationType === WildoLocationType.REMOTE && !isCi) {\n ctx.log.warn(chalk.yellow(` Skipping env-files for remote '${envName}' (requires --ci).`));\n continue;\n }\n\n const credentials = this.loadSyncCredentials(ctx, envName, isCi);\n if (!credentials) {\n return null;\n }\n\n let applicationBackends: ApplicationBackendEnvTarget[] | undefined;\n let companionApis: CompanionPlatformEnvTarget[] | undefined;\n let applicationFrontends: ApplicationFrontendEnvExampleTarget[] | undefined;\n let applicationWorkers: ApplicationWorkerEnvTarget[] | undefined;\n let applicationMinions: ApplicationMinionEnvTarget[] | undefined;\n let applicationOperators: ApplicationOperatorEnvTarget[] | undefined;\n if (shouldPrepareApplicationTargets) {\n try {\n applicationBackends = await AppBootstrapService.buildApplicationBackendTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n companionApis = await AppBootstrapService.buildApplicationCompanionTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationFrontends = await AppBootstrapService.buildApplicationFrontendTargets({\n saasRoot,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationWorkers = await AppBootstrapService.buildApplicationWorkerTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationMinions = await AppBootstrapService.buildApplicationMinionTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationOperators = AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: resolvedEnv,\n config,\n saasRoot,\n });\n } catch (error) {\n /*\n * Preparing the application's targets REGISTERS it with apps-manager, and apps-manager answers from the env\n * this very phase writes. So a platform env that lags the platform's code (a key added since it was written)\n * made the registration fail, and the refusal stopped the one command that writes the missing key: a\n * deadlock whose remedy needed itself (measured 2026-09-29, #2019: apps-manager refused Wonder Todos' immudb\n * for want of IMMUDB_ADMIN_*, which only this phase writes). The platform half does not depend on the\n * registration, so it is written anyway; the phase still fails, and says what to run once apps-manager has\n * restarted on the new env.\n */\n applicationTargetsRefusal = ErrorUtils.extractErrorMessage(error);\n ctx.log.error(`Failed to prepare application env files: ${applicationTargetsRefusal}`);\n ctx.log.warn(\n chalk.yellow(\n \" Writing the platform's env files anyway: they do not need the registration, and a platform env that is out of date \"\n + 'is one reason it can fail. Once apps-manager has restarted on them, run `wildo config sync` again for the application.',\n ),\n );\n applicationBackends = undefined;\n companionApis = undefined;\n applicationFrontends = undefined;\n applicationWorkers = undefined;\n applicationMinions = undefined;\n applicationOperators = undefined;\n }\n }\n\n /*\n * The SAME options object shape the write below is given, so what the prompt names and what\n * `sync` writes are computed from one input. `invokingAppRoot` in particular is what tells a\n * foreign live platform owner from this session's own — omit it here and the prompt offers\n * shared files the write then skips.\n */\n const existing = checkExisting(resolvedEnv, {\n frameworkPath,\n isFrameworkDeveloper,\n ...(ctx.cliContext.resolvedHomes.app.declarationRoot\n ? { invokingAppRoot: ctx.cliContext.resolvedHomes.app.declarationRoot }\n : {}),\n applicationBackends,\n companionApis,\n applicationFrontends,\n applicationWorkers,\n applicationMinions,\n applicationOperators,\n });\n if (existing.length > 0 && !force) {\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.warn('Skipping env-files regeneration in non-interactive mode. Use --force to override.');\n continue;\n }\n ctx.log.info(chalk.bold(' Existing env files'));\n for (const p of existing) ctx.log.info(chalk.dim(` ${p}`));\n const proceed = await confirm({\n message: 'Regenerate all env files? (existing files will be overwritten)',\n default: false,\n });\n if (!proceed) continue;\n }\n\n entries.push({\n envName,\n resolvedEnv,\n applicationBackends,\n companionApis,\n applicationFrontends,\n applicationWorkers,\n applicationMinions,\n applicationOperators,\n });\n }\n\n return {\n frameworkPath,\n isFrameworkDeveloper,\n entries,\n ...(applicationTargetsRefusal === undefined ? {} : { applicationTargetsRefusal }),\n };\n }\n\n private async syncPreparedEnvFiles(\n ctx: CommandContext,\n prepared: PreparedEnvFilesSyncExecution,\n isCi: boolean,\n ): Promise<boolean> {\n for (const entry of prepared.entries) {\n const credentials = this.loadSyncCredentials(ctx, entry.envName, isCi);\n if (!credentials) {\n return false;\n }\n\n ctx.log.info(chalk.cyan(` Syncing env files for ${entry.envName}...`));\n const result = await envSync(\n entry.resolvedEnv,\n credentials,\n {\n frameworkPath: prepared.frameworkPath,\n isFrameworkDeveloper: prepared.isFrameworkDeveloper,\n ...(ctx.cliContext.resolvedHomes.app.declarationRoot\n ? { invokingAppRoot: ctx.cliContext.resolvedHomes.app.declarationRoot }\n : {}),\n applicationBackends: entry.applicationBackends,\n companionApis: entry.companionApis,\n applicationFrontends: entry.applicationFrontends,\n applicationWorkers: entry.applicationWorkers,\n applicationMinions: entry.applicationMinions,\n applicationOperators: entry.applicationOperators,\n },\n ctx.log,\n );\n ctx.log.success(` Updated ${result.envFilesUpdated.length} file(s) for ${entry.envName}`);\n }\n // The platform's files were written; the application's were not, so the phase has not done its job.\n return prepared.applicationTargetsRefusal === undefined;\n }\n\n private async syncSecrets(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n rotateSecrets: boolean,\n ): Promise<boolean> {\n // Fix M (2026-04-21) — `--force` and `--rotate-secrets` are now\n // ORTHOGONAL. `--force` only authorizes skipping confirmation prompts;\n // it never authorizes the destructive rotation that this domain\n // performs. Operators must explicitly pass `--rotate-secrets` to opt\n // into rewriting `secrets.json`. This prevents the prior surprise\n // where `wildo config sync --local --force` (intended as \"skip\n // confirmations\") silently overwrote a freshly-imported canonical\n // `secrets.json` with newly generated values.\n if (!rotateSecrets) {\n ctx.log.warn(\n chalk.yellow(\n ' Skipping secrets domain: pass --rotate-secrets to explicitly opt in to destructive `secrets.json` rotation.',\n ),\n );\n return true;\n }\n\n for (const envName of envNames) {\n const secrets = SecretsReader.loadSecrets(envName);\n if (!secrets) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return false;\n }\n\n if (!force) {\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.warn(\n 'Skipping secrets rotation in non-interactive mode. Combine --rotate-secrets with --force (or run interactively) to confirm.',\n );\n continue;\n }\n ctx.log.warn(chalk.yellow(` ⚠ Rotating secrets for '${envName}' will regenerate ALL auto-generated secrets.`));\n const proceed = await confirm({ message: `Rotate secrets for ${envName}?` });\n if (!proceed) continue;\n }\n\n const rotatable = structuredClone(secrets);\n // The AUTHORED descriptor decides (the persisted copies may predate a newly added or removed host).\n const hostedBy = await InfrastructureHost.resolveForCommand(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n EnvironmentRegistry.get(envName) ?? { name: envName },\n );\n if (hostedBy) {\n ctx.log.info(\n ` '${envName}' runs on the infrastructure of ${hostedBy.applicationRoot}: rotating this application's own secrets only. `\n + `Shared credentials are rotated from the host (cd ${hostedBy.applicationRoot} && wildo config sync --domain secrets --rotate-secrets).`,\n );\n }\n const result = SecretsRotation.rotate(rotatable, hostedBy ? { owners: new Set([SecretOwner.APPLICATION]) } : undefined);\n ConfigSecretsUtils.writeSecretsJson(envName, rotatable);\n ctx.log.success(` Rotated ${result.rotatedKeys.length} secrets for ${envName}`);\n // A held secret still carries its old value: say so, with why, so a rotation after a suspected leak is not read\n // as having replaced it.\n for (const { key, because } of result.heldKeys) {\n ctx.log.warn(chalk.yellow(` Not rotated: ${key} (${because})`));\n }\n const environment = EnvironmentRegistry.get(envName);\n if (environment?.locationType === WildoLocationType.LOCAL) {\n ctx.log.warn(\n chalk.yellow(\n ' Running local platform services and backing infra may still use the previous generated secrets until they are reprovisioned/restarted together.',\n ),\n );\n }\n }\n return true;\n }\n\n private async syncManifest(ctx: CommandContext): Promise<boolean> {\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return false;\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.warn(chalk.yellow(' Manifest regeneration: remote environments not yet supported.'));\n return true;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error('Framework path not set.');\n return false;\n }\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root. Run `wildo init` first.');\n return false;\n }\n\n const hostedBy = await InfrastructureHost.resolveForCommand(saasRoot, env);\n if (hostedBy) {\n ctx.log.info(\n ` Manifest regeneration skipped: '${env.name}' runs on the infrastructure of ${hostedBy.applicationRoot}, `\n + `which renders the shared manifests (cd ${hostedBy.applicationRoot} && wildo config sync --domain manifest).`,\n );\n return true;\n }\n\n const saasConfig = await loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'));\n if (!saasConfig) {\n ctx.log.error('Manifest regeneration now requires a targeted app root with wildo.saas.config.ts.');\n return false;\n }\n\n try {\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const serviceReplicas = await this.loadServiceReplicas(saasRoot, env);\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const result = K8sManifestGenerator.renderAllManifests(env, frameworkPath, {\n serviceReplicas,\n isFrameworkDeveloper,\n });\n ctx.log.success(` Regenerated ${result.total} K8s manifests.`);\n if (!shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper)) {\n ctx.log.info(' Platform manifests skipped because local framework developers run platform services natively.');\n }\n } else {\n const wroteCompose = await renderDockerComposeTemplate(env, frameworkPath, ctx.preferences?.isFrameworkDeveloper ?? false);\n ctx.log.success(wroteCompose ? ' Regenerated Docker Compose file.' : ' Docker Compose file is current (unchanged).');\n }\n } catch (err) {\n ctx.log.error(`Manifest regeneration failed: ${ErrorUtils.extractErrorMessage(err)}`);\n return false;\n }\n return true;\n }\n\n /**\n * Load per-service replica counts from the infra config file for K8s environments.\n * Returns `undefined` if no infra config or no services are defined.\n */\n private async loadServiceReplicas(\n saasRoot: string,\n env: PlatformEnvironmentConfiguration,\n ): Promise<Record<string, number> | undefined> {\n const authoredConfig = await loadAuthoredInfraEnvConfig(env.name, saasRoot);\n if (!authoredConfig) {\n return undefined;\n }\n\n return extractServiceReplicas(authoredConfig.config);\n }\n\n private async syncCicd(ctx: CommandContext, force: boolean): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root. Run this from within a SaaS application directory.');\n return false;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error('Framework path not set.');\n return false;\n }\n\n const saasConfigPath = join(saasRoot, 'wildo.saas.config.ts');\n const saasConfig = await loadSaasConfig(saasConfigPath);\n if (!saasConfig) {\n ctx.log.error(`No SaaS config found at ${saasConfigPath}.`);\n return false;\n }\n\n const environments: WorkflowEnvConfig[] = [];\n const contractProviderEnvSecretKeys = await this.loadConfiguredProviderEnvKeys(saasRoot);\n const derivedProviderSecretRequirements = await this.loadDeployProviderSecretRequirements(ctx, saasRoot);\n\n // Per-service image build targets (per-service deploy model) — each app\n // service (backend + every frontend) AND each app-owned minion/worker builds\n // its OWN image from its OWN Dockerfile. Same across every env (derived from\n // the app's declared topology in wildo.saas.config.ts).\n //\n // `serviceName` is the pushed image name and MUST match the k8s/compose\n // manifest image refs (else CI builds an image the deploy can't pull):\n // - services: the raw authored `services.<key>.serviceName`\n // - minions: `buildMinionServiceName(appSlug, bucketKey)` = `{appSlug}-minion-{dnsName}`\n // — the SAME helper `renderMinionForTarget` + the compose render use, so the\n // bucket key is RFC1123-normalized identically everywhere (a camelCase key\n // `marketingScrapper` → `marketing-scrapper`, a valid lowercase Docker tag).\n // - workers: `buildWorkerServiceName(appSlug, bucketKey)` (same on the worker axis).\n // `dockerfile` is `<path>/Dockerfile` (the bucket entry's folder + Dockerfile,\n // build context = the app root) — `resolveServiceImageDockerfilePath`, the mapping the\n // template contract also reads, so every shipped service path is held to it (#984).\n const dockerfileFor = resolveServiceImageDockerfilePath;\n // Minion/worker image names key on the app SLUG (the lowercase-hyphen\n // identifier the render uses via `runtimeTarget.appSlug`), NOT `appName`\n // (which prefers `name`). `slug` is a required saas-config field; the `?? name`\n // is defensive only.\n const appSlug = saasConfig.slug ?? saasConfig.name;\n const appServices = [\n ...Object.values(saasConfig.services ?? {}).map((svc) => ({\n serviceName: svc.serviceName,\n dockerfile: dockerfileFor(svc.path),\n frontendType: svc.frontendType,\n })),\n ...Object.entries(saasConfig.minions ?? {}).map(([minionKey, ref]) => ({\n serviceName: buildMinionServiceName(appSlug, minionKey),\n dockerfile: dockerfileFor(ref.path),\n frontendType: undefined,\n })),\n ...Object.entries(saasConfig.workers ?? {}).map(([workerKey, ref]) => ({\n serviceName: buildWorkerServiceName(appSlug, workerKey),\n dockerfile: dockerfileFor(ref.path),\n frontendType: undefined,\n })),\n ];\n // What a frontend image's build args resolve against (#1125): the main backend API's service key (the host its\n // public URL is built from — `backendApi`, else the first backend, the rule the runtime topology uses), the SaaS\n // app's key (the documentation site deep-links to it), and the display name the app's own bootstrap bakes in.\n const serviceEntries = Object.entries(saasConfig.services ?? {});\n const backendServiceKeys = serviceEntries.filter(([, svc]) => svc.frontendType === undefined).map(([key]) => key);\n const mainBackendApiServiceKey = backendServiceKeys.includes('backendApi') ? 'backendApi' : backendServiceKeys[0];\n const saasAppServiceKey = serviceEntries.find(([, svc]) => svc.frontendType === AppFrontendType.SAAS_APP)?.[0];\n const appDisplayName = saasConfig.displayName ?? saasConfig.name ?? appSlug;\n\n const infraDir = resolveAppLayout(saasRoot).authoredInfrastructureHome;\n if (!existsSync(infraDir)) {\n ctx.log.error(`No app-owned infrastructure directory found at ${infraDir}.`);\n return false;\n }\n\n const envDirs = readdirSync(infraDir, { withFileTypes: true })\n .filter((d) => d.isDirectory() && d.name !== 'local')\n .map((d) => d.name);\n\n /*\n * What owns the system-of-record credentials and inbound endpoint secrets (#1650): read ONCE, and only when an\n * environment actually deploys, because reading the endpoints runs the built backend. What could not be read is\n * said once, followed by which secrets the workflows will therefore not forward and how to regenerate them.\n * A failure to read them at all is named as such, not blamed on the environment being processed.\n */\n let nonProviderOwners: Awaited<ReturnType<typeof loadNonProviderSecretOwners>> | undefined;\n const loadNonProviderOwnersOnce = async (): Promise<Awaited<ReturnType<typeof loadNonProviderSecretOwners>>> => {\n if (nonProviderOwners !== undefined) return nonProviderOwners;\n const declaredSystems = (saasConfig as { systemsOfRecord?: Record<string, SystemOfRecordDeclarationForSecrets> }).systemsOfRecord ?? {};\n try {\n nonProviderOwners = await loadNonProviderSecretOwners(saasRoot, declaredSystems);\n } catch (error) {\n throw new Error(`Could not read the system-of-record credentials and inbound endpoints to forward: ${ErrorUtils.extractErrorMessage(error)}`);\n }\n for (const note of nonProviderOwners.incomplete) {\n ctx.log.warn(` CI/CD: ${note}`);\n }\n const unlistedSystems = nonProviderOwners.systemsOfRecord.filter((system) => system.secretSlots === null).map((system) => system.name);\n if (unlistedSystems.length > 0) {\n ctx.log.warn(\n ` CI/CD: the deploy workflows therefore forward no credential for ${unlistedSystems.join(', ')} beyond what an `\n + 'environment already stores, and a deploy whose backend needs one refuses to boot. Fix what is named above, then '\n + 'run `wildo config sync --domain cicd --force`.',\n );\n }\n if (nonProviderOwners.inboundEndpointKeys === null) {\n ctx.log.warn(\n ' CI/CD: the deploy workflows therefore forward only the inbound endpoint secrets an environment already '\n + 'stores; a declared endpoint\\'s route stays withheld in a deploy until its secret is forwarded. Build '\n + 'backend-api, then run `wildo config sync --domain cicd --force`.',\n );\n }\n return nonProviderOwners;\n };\n\n for (const envName of envDirs) {\n const configPath = join(infraDir, envName, 'wildo.infra.remote.config.ts');\n if (!existsSync(configPath)) continue;\n\n try {\n const authoredConfig = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n if (!authoredConfig) {\n continue;\n }\n const infraConfig = authoredConfig.config;\n if (!infraConfig.deployment) continue;\n const providerEnvSecretKeysByName = new Map(\n contractProviderEnvSecretKeys.map((entry) => [entry.envVarName, entry]),\n );\n // THIS environment's provider configuration can name a secret the application layer does not (a binding authored\n // in `wildo.infra.<env>.config.ts > providerConfigurations`), so its workflow's secrets block collects the bindings\n // of the merged configuration too — for the providers this environment overlays; the rest are already above.\n const environmentProviderConfigurations = overlayEnvironmentProviderConfigurations(\n saasConfig.providerConfigurations,\n infraConfig.providerConfigurations,\n );\n for (const providerRef of Object.keys(infraConfig.providerConfigurations ?? {})) {\n const configuredProtocols = environmentProviderConfigurations[providerRef] as Parameters<typeof getProviderSecretEnvBindings>[1];\n for (const binding of getProviderSecretEnvBindings(providerRef, configuredProtocols)) {\n providerEnvSecretKeysByName.set(binding.envVarName, {\n envVarName: binding.envVarName,\n required: providerEnvSecretKeysByName.get(binding.envVarName)?.required === true || binding.required === true,\n });\n }\n }\n const storedSecrets = (() => {\n try {\n return EnvironmentUtils.loadSecretsJson(envName);\n } catch {\n return null;\n }\n })();\n for (const envVarName of Object.keys(storedSecrets?.providerEnv ?? {})) {\n providerEnvSecretKeysByName.set(envVarName, {\n envVarName,\n required: providerEnvSecretKeysByName.get(envVarName)?.required,\n });\n }\n /*\n * Every kind of application secret, each under its own CI prefix (#1650): the provider secrets above, the\n * credentials of the declared systems of record and the secrets of the declared inbound endpoints — the rows\n * `wildo secrets list` shows for this environment — and, optional, any such secret the environment already\n * stores, so a stored value keeps reaching the deploy even where its owner could not be read.\n */\n const owners = await loadNonProviderOwnersOnce();\n const applicationSecretKeys: ApplicationCiSecretKey[] = [\n // A scoped provider's contract key is placed by the listing's own predicate (#2977); every other key keeps the merge.\n ...[...providerEnvSecretKeysByName.values()].map((entry) => ({\n kind: ApplicationSecretKind.PROVIDER,\n ...entry,\n required: derivedProviderSecretRequirements?.get(entry.envVarName) ?? entry.required,\n })),\n ...deriveDeployForwardedSecretKeys(owners, systemOfRecordPresenceOf(infraConfig.systemsOfRecord)),\n ...Object.keys(storedSecrets?.systemsOfRecordEnv ?? {}).map((envVarName) => ({ kind: ApplicationSecretKind.SYSTEM_OF_RECORD, envVarName })),\n ...Object.keys(storedSecrets?.inboundEndpointEnv ?? {}).map((envVarName) => ({ kind: ApplicationSecretKind.INBOUND_ENDPOINT, envVarName })),\n ];\n environments.push({\n envName: infraConfig.environment,\n deployment: infraConfig.deployment,\n // The registry the deploy manifests pull from — the workflow pushes to the same one.\n registryEndpoint: infraConfig.remoteProvider?.registryEndpoint,\n appName: saasConfig.name ?? saasConfig.slug,\n services: appServices.map(({ frontendType, ...service }) => {\n const { buildArgs, unresolved } = resolveServiceImageBuildArgs({\n frontendType,\n serviceName: service.serviceName,\n appDisplayName,\n envName: infraConfig.environment,\n runtimeEnvironment: infraConfig.runtimeEnvironment,\n publicDomain: infraConfig.publicDomain,\n serviceHosts: infraConfig.serviceHosts,\n mainBackendApiServiceKey,\n saasAppServiceKey,\n documentationSite: infraConfig.documentationSite,\n });\n if (unresolved.length > 0) {\n ctx.log.warn(\n ` CI/CD (${envName}): ${service.serviceName} is built without ${unresolved.join(', ')} — this environment `\n + 'declares nothing to derive them from, so its image bakes in no value for them.',\n );\n }\n return { ...service, buildArgs, unresolvedBuildArgs: unresolved };\n }),\n applicationSecretKeys,\n // A hosted environment deploys into its host's cluster and installs no cluster-wide controllers.\n ownsClusterInfrastructure: infraConfig.infrastructureHost === undefined,\n });\n } catch (error) {\n ctx.log.error(\n `Failed to load CI/CD config for '${envName}': ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return false;\n }\n }\n\n if (environments.length === 0) {\n ctx.log.warn(chalk.yellow(' No environments with deployment config found.'));\n return true;\n }\n\n const result = writeWorkflows(saasRoot, environments, frameworkPath, force);\n ctx.log.success(` CI/CD: created ${result.created.length}, skipped ${result.skipped.length}`);\n return true;\n }\n\n private async syncConfig(ctx: CommandContext, envNames: string[], isCi: boolean): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo config sync --domain config` requires a targeted app root with wildo.saas.config.ts.');\n return false;\n }\n\n const providerArtifactsSynced = await this.syncProviderRuntimeArtifacts(ctx, saasRoot, envNames);\n if (!providerArtifactsSynced) {\n return false;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n for (const envName of envNames) {\n const outputDir = EnvironmentPaths.resolveScopedDeployArtifactsDir(saasRoot, envName);\n const env = EnvironmentRegistry.get(envName);\n const config = await this.loadConfigForSync(envName, frameworkPath, ctx, saasRoot);\n if (!config) {\n ctx.log.error(`No valid config for '${envName}'.`);\n return false;\n }\n\n let credentials;\n if (isCi) {\n try {\n credentials = reconstructSecretsFromEnv();\n } catch (err) {\n ctx.log.error(`Failed to reconstruct secrets: ${ErrorUtils.extractErrorMessage(err)}`);\n return false;\n }\n } else {\n credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.warn(chalk.yellow(` Skipping config for ${envName}: no secrets`));\n continue;\n }\n }\n\n const envConfig: PlatformEnvironmentConfiguration = hydrateEnvironmentFromConfig(\n env ?? createCiEnvConfig(envName, config),\n config,\n );\n let applicationBackends;\n let applicationWorkers;\n let applicationMinions;\n\n try {\n const targetInput = {\n env: envConfig,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n };\n applicationBackends = await AppBootstrapService.buildApplicationBackendTargets(targetInput);\n applicationWorkers = await AppBootstrapService.buildApplicationWorkerTargets(targetInput);\n applicationMinions = await AppBootstrapService.buildApplicationMinionTargets(targetInput);\n } catch (error) {\n /*\n * The deploy-artifact step needs a RUNNING platform with THIS application registered — it\n * builds CI inputs under `.wildo-saas/deploy/` by asking apps-manager about the\n * application's backends, workers and minions. A first-time creator runs `config sync`\n * BEFORE any platform exists (because `wildo init`'s next steps say to), so on a fresh\n * machine this step cannot succeed and never could.\n *\n * Failing the phase for that was wrong twice over: everything else the phase produces —\n * compose, config.json, env files, provider runtime — is COMPLETE and is exactly what\n * `wildo local up` consumes next, and the remedy printed (\"Check PLATFORM_ADMIN_SECRET\")\n * is not the fix for either real cause. On a shared development host the 401 is almost\n * never a wrong secret; it is another application's platform answering on the port.\n *\n * So the two creator-facing causes SKIP with a line that names the cause and the order that\n * works, and the phase keeps its other outputs. Anything unclassified still fails: a real\n * defect in artifact generation must not be swallowed by a convenience for fresh machines.\n */\n const unavailable = classifyAppsManagerUnavailable(error);\n if (unavailable === null) {\n ctx.log.error(\n `Failed to prepare application deploy artifacts: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return false;\n }\n ctx.log.warn(chalk.yellow(\n unavailable === AppsManagerUnavailableReason.PLATFORM_NOT_RUNNING\n ? ' Deploy artifacts skipped: no platform is running for this application yet.'\n : ' Deploy artifacts skipped: the platform answering for this application refused our credentials '\n + '— on a shared host that usually means ANOTHER application\\'s platform holds the port.',\n ));\n ctx.log.info(chalk.dim(\n ' Local artifacts (compose, config.json, env files, provider runtime) are complete. '\n + 'Bring the platform up and register this application, then re-run to produce deploy artifacts:',\n ));\n ctx.log.info(chalk.dim(' wildo local up → wildo local init --register-only → wildo config sync'));\n continue;\n }\n\n ctx.log.info(chalk.cyan(` Generating deploy artifacts for ${envName}...`));\n generateCiDeployArtifacts(\n {\n env: envConfig,\n credentials,\n config,\n runtime: envConfig.runtime,\n outputDir,\n applicationBackends,\n applicationWorkers,\n applicationMinions,\n // Remote-cluster TLS manifests (ClusterIssuer + tls-config) + Traefik\n // Helm values are rendered from `templates/infra/k8s/**`, resolved via\n // the framework repo root (falls back to the app root — same\n // convention as buildApplicationBackendTargets above).\n frameworkPath: frameworkPath ?? saasRoot,\n },\n ctx.log,\n );\n }\n return true;\n }\n\n private async syncProviderRuntimeArtifacts(ctx: CommandContext, saasRoot: string, envNames: string[]): Promise<boolean> {\n const environmentName = resolveProviderArtifactEnvironmentName(envNames, ctx.activeEnv?.name);\n ctx.log.info(chalk.dim(` Provider runtime artifacts: generated for environment '${environmentName}'.`));\n // The frameworkPath lets the sync declare and link the system-of-record facet library (#2013).\n const result = await syncProviderRuntimeArtifactsForApp(ctx.log, saasRoot, environmentName, {\n frameworkPath: ctx.cliContext.resolvedHomes.framework.repositoryRoot ?? null,\n });\n return result.success;\n }\n}\n"]}
1
+ {"version":3,"file":"sync.command.js","sourceRoot":"","sources":["../../../../src/commands/config/sync.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAA+B,MAAM,4DAA4D,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,wDAAwD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAKzF,OAAO,E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AAQ,EAAE,CAAC;gBACnC,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;qBACxH,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;gBACnD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;oBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,eAAe,aAAa,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1I,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,eAAe,MAAM,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,oCAAoC,eAAe,KAAK,CAAC,CAAC;YACvK,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/**\n * config sync — Sync configuration: regenerate .env files, manifests,\n * secrets, and CI/CD workflows.\n *\n * Domain filter (`--domain`) selects which operations run:\n * - `env-files`: per-service `.env` files (saas-app, app backends, companions)\n * - `secrets`: regenerate / rotate `secrets.json` for the targeted env\n * - `config`: render deploy artifacts under `.wildo-saas/deploy/<env>/`\n * (K8s Secrets/ConfigMaps + per-service `.env` files for compose runtimes).\n * This is what the generated deploy workflows\n * (`templates/infra/ci/deploy-{k8s,docker-compose}.yml.hbs`) call as\n * `npx wildo config sync --ci --env=<env>`.\n * NOTE: the output location is the SAME with or without `--ci`; `--ci` only\n * switches where credentials come from (flat `WILDO_SECRET_*` env vars vs\n * the on-disk `secrets.json`). A local run therefore also deposits\n * secret-bearing files there — which is why the zone is self-ignoring (see\n * `generateCiDeployArtifacts`).\n * - `manifest`: regenerate K8s manifests under `.wildo-saas/deploy/<env>/k8s/`\n * - `cicd`: write `.github/workflows/deploy-<env>.yml` from the per-env\n * deploy-workflow templates (`templates/infra/ci/deploy-*.yml.hbs`)\n * plus the per-app `wildo-config-validation.yml` validation workflow\n * (`templates/infra/ci/wildo-config-validation.yml.hbs`).\n *\n * `wildo config sync` is the canonical CI/CD entry point — there is\n * intentionally no `wildo deploy` command surface. Build steps (Docker)\n * and apply steps (kubectl / docker compose) live inside the generated\n * GitHub Actions workflow itself, not behind a CLI wrapper.\n */\n\nimport chalk from 'chalk';\nimport { join } from 'path';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { CspSyncService } from '~wildo-cli/services/security/csp-sync.service';\nimport { confirm } from '@inquirer/prompts';\nimport { existsSync, readdirSync } from 'fs';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { checkExisting, sync as envSync } from '~wildo-cli/services/environment/env-sync.service';\nimport { reconstructSecretsFromEnv, type ApplicationCiSecretKey } from '~wildo-cli/services/credentials/ci-secrets-adapter.service';\nimport { SecretsReader } from '~wildo-cli/services/credentials/secrets-reader.service';\nimport { SecretsRotation } from '~wildo-cli/services/credentials/secrets-rotation.service';\nimport { InfrastructureHost } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { SecretOwner } from '~wildo-cli/services/credentials/credentials.schemas';\nimport {\n SecretsProvisioning,\n SecretsProvisioningStatus,\n} from '~wildo-cli/services/credentials/secrets-provisioning.service';\nimport { ConfigSecretsUtils } from '~wildo-cli/services/credentials/credentials.service';\nimport type {\n PlatformEnvConfigJson,\n PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\nimport { renderDockerComposeTemplate } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { K8sManifestGenerator } from '~wildo-cli/services/deployment/k8s/k8s-manifest-generator.service';\nimport { shouldDeployPlatformServicesInRuntime } from '~wildo-cli/services/deployment/platform-runtime-policy.service';\nimport { AppFrontendType, overlayEnvironmentProviderConfigurations } from '@wildo-ai/platform-config-lib';\nimport { writeWorkflows, resolveServiceImageDockerfilePath, resolveServiceImageBuildArgs } from '~wildo-cli/services/deployment/ci-workflow-generator.service';\nimport type { WorkflowEnvConfig } from '~wildo-cli/services/deployment/ci-workflow-generator.service';\nimport { generateCiDeployArtifacts } from '~wildo-cli/services/deployment/ci-deploy-generator.service';\nimport {\n AppBootstrapService,\n AppsManagerUnavailableReason,\n classifyAppsManagerUnavailable,\n} from '~wildo-cli/services/application/app-bootstrap.service';\nimport type {\n ApplicationBackendEnvTarget,\n CompanionPlatformEnvTarget,\n ApplicationFrontendEnvExampleTarget,\n ApplicationWorkerEnvTarget,\n ApplicationMinionEnvTarget,\n ApplicationOperatorEnvTarget,\n} from '~wildo-cli/services/environment/env-configuration-generator.service';\nimport { getProviderSecretEnvBindings } from '~wildo-cli/services/credentials/provider-env-vars.utils';\nimport type { SystemOfRecordDeclarationForSecrets } from '~wildo-cli/services/credentials/application-secret-owners.service';\nimport {\n deriveDeployForwardedSecretKeys,\n deriveDeployProviderSecretRequirements,\n loadNonProviderSecretOwners,\n loadSecretRequirementInputs,\n systemOfRecordPresenceOf,\n} from '~wildo-cli/services/credentials/secret-requirements.service';\nimport { getComposedProviderEntry } from '~wildo-cli/services/credentials/composed-provider-catalogue';\nimport {\n describeUnservableBackingServiceDeclaration,\n findUnservableBackingServiceDeclarations,\n getWorkspaceMutationLockPath,\n loadSaasConfig,\n resolveAppLayout,\n WildoDeploymentRuntime,\n WildoLocationType,\n K8S_LOCAL_DEFAULTS,\n withDedicatedFileLock,\n} from '@wildo-ai/platform-config-lib';\nimport { ApplicationSecretKind, buildMinionServiceName, buildWorkerServiceName } from '@wildo-ai/platform-core-shared';\nimport {\n PlatformEnvOperatingSystem,\n parsePlatformEnvironmentId,\n SetupStatus,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { hydrateEnvironmentFromConfig } from '~wildo-cli/services/environment/environment-hydration.utils';\nimport { overlayAuthoredInfraMembers, persistAuthoredOverlay } from '~wildo-cli/services/environment/authored-infra-member-authority';\nimport {\n buildConfigJsonFromInfraEnvConfig,\n getUnsupportedAuthoredConfigFallbackReason,\n loadAuthoredInfraEnvConfig,\n type LoadedAuthoredInfraEnvConfig,\n} from '~wildo-cli/services/environment/authored-infra-config.utils';\nimport {\n PlatformEngineChangeDecision,\n decidePlatformEngineChange,\n describePlatformEngineChange,\n} from '~wildo-cli/services/environment/platform-engine-change.utils';\nimport {\n loadAuthoredInfraEnvSelections,\n resolveProviderArtifactEnvironmentName,\n syncProviderRuntimeArtifactsForApp,\n} from '~wildo-cli/services/application/provider-runtime-sync.service';\nimport { collectServableInfraProviders } from '@wildo-ai/platform-infra-providers';\nimport {\n RuntimeBootstrap,\n RuntimeConfigReconcileStatus,\n} from '~wildo-cli/services/environment/runtime-bootstrap.service';\n\nconst DOMAINS = ['cicd', 'secrets', 'config', 'manifest', 'env-files'] as const;\ntype DomainFilter = (typeof DOMAINS)[number];\nconst APP_ROOT_ONLY_DOMAINS = new Set<DomainFilter>(['cicd', 'manifest']);\n\ninterface PreparedEnvFilesSyncEntry {\n envName: string;\n resolvedEnv: PlatformEnvironmentConfiguration;\n applicationBackends?: ApplicationBackendEnvTarget[];\n companionApis?: CompanionPlatformEnvTarget[];\n applicationFrontends?: ApplicationFrontendEnvExampleTarget[];\n applicationWorkers?: ApplicationWorkerEnvTarget[];\n applicationMinions?: ApplicationMinionEnvTarget[];\n applicationOperators?: ApplicationOperatorEnvTarget[];\n}\n\ninterface PreparedEnvFilesSyncExecution {\n frameworkPath: string;\n isFrameworkDeveloper: boolean;\n entries: PreparedEnvFilesSyncEntry[];\n /**\n * Why the APPLICATION's env targets could not be prepared, when they could not. The platform's own env files are\n * still written (see the catch in `prepareEnvFilesSyncExecution`), and the phase still fails, naming this.\n */\n applicationTargetsRefusal?: string;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction extractServiceReplicas(raw: unknown): Record<string, number> | undefined {\n if (!isRecord(raw)) {\n return undefined;\n }\n\n const replicas: Record<string, number> = {};\n const serviceBuckets: Array<Record<string, unknown>> = [];\n\n if (isRecord(raw.services)) {\n serviceBuckets.push(raw.services);\n }\n if (isRecord(raw.kubernetes) && isRecord(raw.kubernetes.services)) {\n serviceBuckets.push(raw.kubernetes.services);\n }\n\n for (const services of serviceBuckets) {\n for (const [key, service] of Object.entries(services)) {\n if (isRecord(service) && typeof service.replicas === 'number') {\n replicas[key] = service.replicas;\n }\n }\n }\n\n return Object.keys(replicas).length > 0 ? replicas : undefined;\n}\n\n/**\n * Note: the {@link buildConfigJsonFromInfraEnvConfig} projection used to live\n * inline here. It now lives in\n * `~wildo-cli/services/environment/authored-infra-config.utils` so the new\n * runtime-bootstrap service (used by `wildo local up` pre-flight) can reuse\n * the exact same projection — single source of truth keeps the runtime\n * artifacts written by `local up` byte-identical to the ones\n * `wildo config sync --domain manifest` would produce later.\n *\n * The `devCompanion` exclusion (Slice 3 deep-review M-5, 2026-04-13) is\n * documented inside that shared module — same dual-config-json design\n * rationale, same author-versus-runtime split.\n */\n\nfunction createCiEnvConfig(envName: string, config: PlatformEnvConfigJson): PlatformEnvironmentConfiguration {\n const now = new Date().toISOString();\n const validatedEnvName = parsePlatformEnvironmentId(envName);\n const isLocalKubernetes =\n config.runtime === WildoDeploymentRuntime.KUBERNETES\n && config.type === WildoLocationType.LOCAL;\n return {\n name: validatedEnvName,\n locationType: config.type,\n runtime: config.runtime,\n runtimeEnvironment: config.runtimeEnvironment,\n /*\n * Carried from `config.json` so a CI render produces the same compose file as the developer's.\n * Absent on a `config.json` written before the field existed, which `resolveLocalDataStorage`\n * answers from `locationType` — the same value this environment would have been given anyway.\n */\n localDataStorage: config.localDataStorage,\n /** Carried for the same reason: a CI render must omit the services the developer's render omits (#2303). */\n serviceProfile: config.serviceProfile,\n os: PlatformEnvOperatingSystem.LINUX,\n secretsPath: '',\n configPath: '',\n infraPath: '',\n database: config.database,\n setupStatus: SetupStatus.NOT_STARTED,\n createdAt: now,\n updatedAt: now,\n publicDomain: config.publicDomain,\n // Threaded at every site that projects the authored infra config — this is the environment's\n // FIRST materialisation, and a field missing here is absent for the environment's whole life.\n serviceHosts: config.serviceHosts,\n cdn: config.cdn,\n kubernetes: config.kubernetes\n ? {\n ...config.kubernetes,\n imageRegistry: config.remoteProvider?.registryEndpoint,\n }\n : isLocalKubernetes\n ? {\n namespace: K8S_LOCAL_DEFAULTS.NAMESPACE,\n }\n : undefined,\n remoteProvider: config.remoteProvider,\n backingServices: config.backingServices,\n serviceAuth: config.serviceAuth,\n logging: config.logging,\n observability: config.observability,\n providerSelection: config.providerSelection,\n email: config.email,\n agentContentGuardrails: config.agentContentGuardrails,\n ownershipDnsStandIn: config.ownershipDnsStandIn,\n platformKeyManagement: config.platformKeyManagement,\n };\n}\n\nfunction hasRequiredRemoteKubernetesMetadata(config: PlatformEnvConfigJson): boolean {\n if (\n config.type !== WildoLocationType.REMOTE\n || config.runtime !== WildoDeploymentRuntime.KUBERNETES\n ) {\n return true;\n }\n\n return Boolean(config.kubernetes?.namespace && config.remoteProvider?.registryEndpoint);\n}\n\nexport default class ConfigSyncCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'config sync',\n description: 'Sync configuration — regenerate .env files, manifests, secrets, and CI/CD workflows',\n category: CommandCategory.Config,\n flags: {\n env: { type: 'string', description: 'Target specific environment', default: undefined },\n local: { type: 'boolean', description: 'Only local environments', default: false },\n remote: { type: 'boolean', description: 'Only remote environments', default: false },\n domain: { type: 'string', description: 'Filter by domain: cicd, secrets, config, manifest, env-files', default: undefined },\n app: { type: 'string', description: 'Application slug for app backend env generation', default: undefined },\n force: { type: 'boolean', description: 'Overwrite without confirmation (does NOT authorize destructive secret rotation — see --rotate-secrets)', default: false },\n 'rotate-secrets': {\n type: 'boolean',\n description:\n 'Explicitly opt in to destructive `secrets.json` rotation. Required for the `secrets` domain to do anything; --force alone never rotates secrets.',\n default: false,\n },\n 'accept-platform-engine-change': {\n type: 'boolean',\n description:\n 'Explicitly accept ABANDONING an initialized LOCAL platform\\'s data when the authored '\n + '`database.engine` differs from the engine it is running on. There is no Mongo/PostgreSQL '\n + 'migration; INIT re-creates the platform. --force never carries this meaning, and no flag '\n + 'authorizes the change on a REMOTE environment.',\n default: false,\n },\n ci: { type: 'boolean', description: 'CI mode — read secrets from env vars', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const scope = ctx.cliContext.scope;\n const domainFilter = this.resolveDomainFilter(ctx);\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const isCi = ctx.flags.ci === true;\n const envNames = this.resolveEnvNames(ctx, isCi);\n const force = ctx.flags.force === true;\n const rotateSecrets = ctx.flags.rotateSecrets === true || ctx.flags['rotate-secrets'] === true;\n\n const missingAppRootDomains = domainFilter.filter((domain) => APP_ROOT_ONLY_DOMAINS.has(domain));\n if (missingAppRootDomains.length > 0 && !saasRoot) {\n ctx.log.error(\n `Config sync domains [${missingAppRootDomains.join(', ')}] require a targeted app root with wildo.saas.config.ts.`,\n );\n return { success: false };\n }\n\n if (envNames.length === 0 && !domainFilter.includes('cicd')) {\n ctx.log.error(\n isCi\n ? 'No environments to sync. In CI mode, specify --env or pre-seed local environment state.'\n : 'No environments to sync. Run `wildo init` first or specify --env.',\n );\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(`\\n Config sync — scope: ${scope}, domains: ${domainFilter.join(', ') || 'all'}\\n`));\n\n const runSyncDomains = async (): Promise<CommandResult> => {\n // NOTE: there is deliberately no separate `anyFailure` flag. Failure is\n // DERIVED from the recorded outcomes below, so a phase cannot fail the\n // command without also appearing in the report — the two cannot drift.\n // A hand-maintained boolean alongside the list is exactly how the report\n // would come to claim every phase succeeded on a failed run.\n /**\n * Per-phase outcome, so a failure reports what SUCCEEDED alongside what did\n * not.\n *\n * `config sync` bundles pure generation (compose files, provider artifacts,\n * config.json) with phases that require a RUNNING apps-manager to mint\n * per-app secrets. When apps-manager is down the command previously printed\n * only `✖ config sync failed` — while the generation phases had completed and\n * written their files. Readers reasonably concluded nothing had happened, and\n * re-ran or hand-edited on that assumption.\n *\n * The exit code is unchanged: any failed phase still fails the command. What\n * changes is that the report distinguishes \"did not run / did not succeed\"\n * from \"succeeded, and its output is on disk\".\n */\n const phaseOutcomes: Array<{ phase: string; ok: boolean }> = [];\n const runPhase = async (phase: string, run: () => Promise<boolean>): Promise<boolean> => {\n const ok = await run();\n phaseOutcomes.push({ phase, ok });\n return ok;\n };\n let preparedEnvFilesSync: PreparedEnvFilesSyncExecution | null = null;\n\n // Root fix for the stale-config-json bug: BEFORE any domain reads the\n // generated `config.json` / `environments.json` snapshot, reconcile them\n // from the authored `wildo.infra.<env>.config.ts` for every LOCAL env so\n // authored backing-service / port / source changes deterministically\n // reach the generated compose + env files. Remote/CI envs (which\n // reconstruct config from env vars / a sibling secrets repo) are left\n // untouched — see `reconcileLocalConfigFromAuthoredInfra`.\n // MUST run BEFORE the reconcile below, and the ordering is load-bearing rather than\n // stylistic: `reconcileLocalConfigFromAuthoredInfra` writes the authored engine INTO\n // `config.json` unconditionally, which destroys the very baseline this guard compares\n // against. Run it after, and every engine change looks like no change at all.\n // #1693: refuse a backing-service declaration the platform cannot serve BEFORE any phase writes\n // a compose file, a config.json or a lockfile. The provider-runtime phase's lockfile projection\n // refuses the same declarations through the same function, but only after earlier phases have\n // already generated a stack without the service in it.\n if (saasRoot) {\n const servable = await this.refuseUnservableBackingServices(ctx, saasRoot);\n if (!servable) return { success: false };\n }\n\n if (!isCi && saasRoot && envNames.length > 0) {\n const authorized = await this.assertPlatformEngineChangeIsAuthorized(ctx, envNames, saasRoot);\n if (!authorized) return { success: false };\n }\n\n if (!isCi && saasRoot && envNames.length > 0) {\n const reconciled = await this.reconcileLocalConfigFromAuthoredInfra(ctx, envNames, saasRoot);\n if (!reconciled) return { success: false };\n }\n\n // Same ordering rationale, for the OTHER generated input every domain reads:\n // `secrets.json`. Mint any framework-managed credential material the environment\n // predates BEFORE the env-file / manifest renderers project it. Additive and\n // idempotent — it is not the destructive `--rotate-secrets` path. Skipped in CI,\n // which reconstructs secrets from published env vars and has no file to persist to.\n if (!isCi && envNames.length > 0) {\n this.provisionFrameworkManagedSecrets(ctx, envNames);\n }\n\n if (domainFilter.includes('config') && envNames.length > 0) {\n await runPhase('config (compose + config.json + deploy artifacts)', () => this.syncConfig(ctx, envNames, isCi));\n }\n\n if (domainFilter.includes('env-files') && envNames.length > 0) {\n if (!domainFilter.includes('config') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('provider runtime artifacts', () =>\n this.syncProviderRuntimeArtifacts(ctx, ctx.cliContext.resolvedHomes.app.declarationRoot!, envNames));\n }\n if (domainFilter.includes('secrets') && !isCi) {\n await runPhase('env-files (needs apps-manager)', async () => {\n preparedEnvFilesSync = await this.prepareEnvFilesSyncExecution(ctx, envNames, force, isCi);\n return Boolean(preparedEnvFilesSync);\n });\n } else {\n await runPhase('env-files', () => this.syncEnvFiles(ctx, envNames, force, isCi));\n }\n }\n\n if (domainFilter.includes('secrets') && envNames.length > 0) {\n await runPhase('secrets', () => this.syncSecrets(ctx, envNames, force, rotateSecrets));\n }\n\n if (preparedEnvFilesSync) {\n await runPhase('env-files (write)', () => this.syncPreparedEnvFiles(ctx, preparedEnvFilesSync!, isCi));\n }\n\n if (domainFilter.includes('manifest') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('manifest', () => this.syncManifest(ctx));\n }\n\n if (domainFilter.includes('cicd') && ctx.cliContext.resolvedHomes.app.declarationRoot) {\n await runPhase('cicd', () => this.syncCicd(ctx, force));\n }\n\n const anyFailure = phaseOutcomes.some((entry) => !entry.ok);\n\n if (anyFailure) {\n // Printed only on failure: on success the existing per-phase output is\n // already sufficient and a summary would be noise.\n const failed = phaseOutcomes.filter((entry) => !entry.ok).map((entry) => entry.phase);\n const succeeded = phaseOutcomes.filter((entry) => entry.ok).map((entry) => entry.phase);\n\n ctx.log.info('');\n ctx.log.info(chalk.cyan(' Phase outcomes:'));\n for (const { phase, ok } of phaseOutcomes) {\n ctx.log.info(ok ? chalk.green(` ✔ ${phase} — completed, output written`) : chalk.red(` ✖ ${phase}`));\n }\n if (succeeded.length > 0) {\n ctx.log.info(chalk.yellow(' Some phases succeeded — their generated files are on disk and do NOT need re-running.'));\n }\n /*\n * ONE SENTENCE naming the split, printed LAST so it sits directly above the runner's bare\n * `✖ config sync failed`.\n *\n * The per-phase list above already carries the facts; what it does not do is survive the\n * distance between a failure REASON and its outcome. Measured 2026-09-18: the reason\n * (\"Provider runtime artifact generation failed: …\") printed fifteen lines before the\n * successes, with provider-catalogue and env-builder chatter between them, and the verdict\n * underneath said \"failed\". An operator reading top-down concludes nothing landed and\n * re-runs; one reading bottom-up reads \"failed\" and concludes the same. A partial run is a\n * NORMAL outcome here — a hosted application legitimately skips shared domains — so the\n * report has to be built for it rather than treating it as an exception.\n */\n if (succeeded.length > 0) {\n ctx.log.info(chalk.yellow(\n ` In one line: ${succeeded.join(', ')} landed; ${failed.join(', ')} did not. `\n + `Each ✖ printed its own reason above, under its phase's output.`,\n ));\n }\n }\n\n ctx.log.info('');\n return { success: !anyFailure };\n };\n\n // Without a targeted app root there is no application worktree to\n // protect — run unlocked (platform-scope syncs).\n if (!saasRoot) {\n return runSyncDomains();\n }\n\n // Workspace-mutation lock (meta-workflows P-20): `config sync` writes\n // generated files across the application worktree, so it serializes\n // against companion coding-agent dispatch runs (which hold this same\n // lock for their whole run) and against concurrent syncs. Fail-fast on\n // contention — a dispatched agent run can hold the lock for many\n // minutes and silently queueing behind it would look like a hang.\n // Human/parallel-session EDITS are deliberately not gated (P-19b).\n try {\n return await withDedicatedFileLock(\n getWorkspaceMutationLockPath(saasRoot),\n runSyncDomains,\n { retries: { retries: 2 } },\n );\n } catch (error) {\n if ((error as { code?: string })?.code === 'ELOCKED') {\n ctx.log.error(\n `The workspace-mutation lock is held (${getWorkspaceMutationLockPath(saasRoot)}) — `\n + 'an active coding-agent dispatch run or another worktree-writing command owns the '\n + 'application worktree right now. Retry after it completes.',\n );\n return { success: false };\n }\n throw error;\n }\n }\n\n private resolveDefaultDomainFilter(ctx: CommandContext): DomainFilter[] {\n if (ctx.flags.ci === true) {\n return ctx.cliContext.resolvedHomes.app.declarationRoot\n ? ['cicd', 'config', 'env-files']\n : ['config', 'env-files'];\n }\n\n // 'secrets' is intentionally NOT in the default domain set — it\n // performs a DESTRUCTIVE rotation of `secrets.json` and is opt-in via\n // either `--domain secrets` (to scope only to secrets) or by passing\n // `--rotate-secrets` alongside the default invocation. See the\n // `--rotate-secrets` flag description and `syncSecrets` for the full\n // rationale (Fix M, 2026-04-21): the previous behavior caused\n // `wildo config sync --local --force` to silently rotate secrets and\n // overwrite a freshly-imported canonical `secrets.json`, which is\n // exactly the surprise this decoupling prevents.\n return ['config', 'env-files'];\n }\n\n private resolveDomainFilter(ctx: CommandContext): DomainFilter[] {\n const raw = ctx.flags.domain as string | undefined;\n if (!raw) {\n return this.resolveDefaultDomainFilter(ctx);\n }\n const value = raw.toLowerCase();\n if (DOMAINS.includes(value as DomainFilter)) return [value as DomainFilter];\n ctx.log.warn(chalk.yellow(` Unknown domain '${raw}', using default domains. Valid: ${DOMAINS.join(', ')}`));\n return this.resolveDefaultDomainFilter(ctx);\n }\n\n private resolveEnvNames(ctx: CommandContext, isCi: boolean): string[] {\n const envFlag = ctx.flags.env as string | undefined;\n const localOnly = ctx.flags.local === true;\n const remoteOnly = ctx.flags.remote === true;\n\n if (envFlag) {\n let validatedEnvName: string;\n try {\n validatedEnvName = parsePlatformEnvironmentId(envFlag);\n } catch {\n ctx.log.error(`Invalid environment name '${envFlag}'.`);\n return [];\n }\n\n if (isCi) {\n return [validatedEnvName];\n }\n\n const env = EnvironmentRegistry.get(validatedEnvName);\n if (!env) {\n ctx.log.error(`Environment '${validatedEnvName}' not found.`);\n return [];\n }\n return [validatedEnvName];\n }\n\n const all = EnvironmentRegistry.getAll();\n const names = Object.keys(all);\n\n if (localOnly) {\n return names.filter((n) => all[n]!.locationType === WildoLocationType.LOCAL);\n }\n if (remoteOnly) {\n return names.filter((n) => all[n]!.locationType === WildoLocationType.REMOTE);\n }\n\n const current = ctx.activeEnv?.name;\n if (current && all[current]) return [current];\n return names;\n }\n\n private loadConfigJsonFromSiblingSecretsRepo(\n envName: string,\n root: string | null | undefined,\n ): PlatformEnvConfigJson | null {\n if (!root) {\n return null;\n }\n\n const siblingSecretsRepo = EnvironmentUtils.detectSiblingSecretsRepo(root);\n if (!siblingSecretsRepo) {\n return null;\n }\n\n const configDir = join(siblingSecretsRepo, 'environments', envName);\n return EnvironmentRegistry.loadConfigJson(envName, configDir);\n }\n\n /**\n * Regenerate the persisted `config.json` + env-registry snapshot for every\n * LOCAL environment from its authored `wildo.infra.<env>.config.ts`, so a\n * subsequent domain (config / env-files / manifest) reads the authored\n * source of truth instead of a stale generated artifact.\n *\n * WHY this exists (root cause). `loadConfigForSync` used to read the generated\n * `config.json` FIRST and fall back to the authored descriptor only when\n * that file was ABSENT (it now lays the descriptor's members over a persisted\n * copy, #2310, but this reconcile predates that); the docker-compose renderer additionally reads the\n * generated `config.json` + the `env.backingServices` registry snapshot\n * directly. None of these were ever refreshed from the authored `.ts`, so a\n * newly-authored backing service (e.g. `immudb: { source: SELF }`) never\n * reached the generated compose and `wildo local up` never started its\n * container. Reconciling here closes that gap deterministically.\n *\n * Scope + guards (delegated to {@link RuntimeBootstrap.reconcileGeneratedConfigFromAuthored}):\n * - LOCAL only — remote/CI keep their generated / env-var-reconstructed\n * config.json (this method is already gated on `!isCi` at the call site).\n * - Atlas-backed Mongo is skipped (its generated config.json carries API\n * metadata the authored descriptor omits); the existing file is kept.\n * - Envs with no registry state or no authored descriptor are skipped.\n *\n * Authored-load/schema failures are fatal. Falling back to a prior generated\n * snapshot would silently preserve revoked or invalid policy, so no later\n * config/env-file domain may execute after reconciliation fails. Deliberate\n * `SKIPPED_UNSUPPORTED` results (for example Atlas metadata) remain distinct\n * and keep the generated snapshot explicitly.\n */\n /**\n * Refuse every `backingServices` declaration, in ANY authored environment, that the platform cannot\n * serve — one resolving to no infrastructure provider, or to a provider no provider module can\n * serve (#1693). Every environment rather than the targeted ones, because the lockfile's infra\n * section records all of them and its projection refuses on any.\n *\n * The judgement is `findUnservableBackingServiceDeclarations`, the same function the lockfile\n * projection (`materializeInfraSection`) and `wildo config validate` use; only the reporting is here.\n * No opt-out, by design — see that function's file header.\n *\n * @returns `false` when the sync must stop.\n */\n private async refuseUnservableBackingServices(ctx: CommandContext, saasRoot: string): Promise<boolean> {\n let envs: Awaited<ReturnType<typeof loadAuthoredInfraEnvSelections>>;\n try {\n envs = await loadAuthoredInfraEnvSelections(saasRoot);\n } catch (error) {\n // Not this check's finding: an environment that cannot be LOADED is reported by the phases that\n // load it (and the lockfile projection refuses it with its own error). Failing here would turn a\n // `--domain secrets` run into a failure it never had, over a file it does not read.\n ctx.log.warn(` Backing-service servability not checked — an authored environment could not be read: ${ErrorUtils.extractErrorMessage(error)}`);\n return true;\n }\n const servableProviders = collectServableInfraProviders();\n const findings = envs.flatMap((env) => findUnservableBackingServiceDeclarations({ ...env, servableProviders }));\n if (findings.length === 0) return true;\n\n ctx.log.error('Backing-service declarations the platform cannot serve — the application would receive a credential for a server it never connects to:');\n for (const finding of findings) {\n ctx.log.error(` ${describeUnservableBackingServiceDeclaration(finding)}`);\n }\n return false;\n }\n\n /**\n * Refuse an authored platform-engine change that would abandon data.\n *\n * The authored `database.engine` makes the platform's store a one-line, reviewable edit — which is\n * the goal, and also the hazard: the flip is fresh-install-only, so applying it to an environment\n * that has already been initialized does not migrate anything, it abandons it.\n *\n * Policy lives in `decidePlatformEngineChange`; this method only supplies the four facts it needs\n * and reports. Gated on `!isCi` for the same reason the reconcile is: CI reconstructs its config\n * from published env vars rather than from the authored descriptor, so it has no baseline this\n * comparison could trust.\n *\n * @returns `false` when the sync must stop.\n */\n private async assertPlatformEngineChangeIsAuthorized(\n ctx: CommandContext,\n envNames: string[],\n saasRoot: string,\n ): Promise<boolean> {\n /**\n * BOTH spellings, mirroring `rotateSecrets` above: the kernel exposes a kebab-case flag under\n * its camelCase name, and reading only one form leaves the flag inert while `--help` advertises\n * it. Found by running the real CLI — a unit test cannot catch this, because the test mocks\n * whichever key the implementation happens to read.\n */\n const acknowledged = ctx.flags.acceptPlatformEngineChange === true\n || ctx.flags['accept-platform-engine-change'] === true;\n\n for (const envName of envNames) {\n const env = EnvironmentRegistry.get(envName);\n if (!env) continue;\n\n const authored = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n if (!authored) continue;\n\n const decision = decidePlatformEngineChange({\n locationType: env.locationType,\n authoredEngine: authored.config.database?.engine,\n // The engine currently in force, read BEFORE the reconcile overwrites it.\n baselineEngine: EnvironmentUtils.loadConfigJson(envName)?.database?.engine,\n platformInitialized: EnvironmentUtils.isPlatformInitialized(envName),\n acknowledged,\n });\n\n const message = describePlatformEngineChange(decision, {\n envName,\n authoredEngine: authored.config.database?.engine,\n baselineEngine: EnvironmentUtils.loadConfigJson(envName)?.database?.engine,\n });\n\n switch (decision) {\n case PlatformEngineChangeDecision.NO_AUTHORED_ENGINE:\n case PlatformEngineChangeDecision.UNCHANGED:\n break;\n case PlatformEngineChangeDecision.DECLARED_FOR_NEW_BASELINE:\n if (message) ctx.log.info(chalk.dim(` ${message}`));\n break;\n case PlatformEngineChangeDecision.ALLOWED_LOCAL_UNINITIALIZED:\n case PlatformEngineChangeDecision.ALLOWED_LOCAL_ACKNOWLEDGED:\n if (message) ctx.log.warn(chalk.yellow(` ${message}`));\n break;\n case PlatformEngineChangeDecision.REFUSED_LOCAL_INITIALIZED:\n case PlatformEngineChangeDecision.REFUSED_REMOTE:\n if (message) ctx.log.error(message);\n return false;\n }\n }\n\n return true;\n }\n\n private async reconcileLocalConfigFromAuthoredInfra(\n ctx: CommandContext,\n envNames: string[],\n saasRoot: string,\n ): Promise<boolean> {\n for (const envName of envNames) {\n const env = EnvironmentRegistry.get(envName);\n if (!env) {\n // No registry state (CI/remote-reconstructed) — nothing to reconcile.\n continue;\n }\n\n try {\n const result = await RuntimeBootstrap.reconcileGeneratedConfigFromAuthored({\n env,\n saasRoot,\n });\n\n if (result.status === RuntimeConfigReconcileStatus.RECONCILED) {\n ctx.log.info(\n chalk.dim(\n result.refreshedEnvState\n ? ` Reconciled '${envName}' config.json + env state from authored infra.`\n : ` Reconciled '${envName}' config.json from authored infra (env state already current).`,\n ),\n );\n } else if (result.status === RuntimeConfigReconcileStatus.SKIPPED_UNSUPPORTED) {\n ctx.log.warn(\n chalk.yellow(\n ` Keeping generated config.json for '${envName}' (cannot reconcile from authored infra): ${result.reason}`,\n ),\n );\n }\n } catch (error) {\n ctx.log.error(\n `Could not reconcile '${envName}' from authored infra; refusing stale generated config: `\n + ErrorUtils.extractErrorMessage(error),\n );\n return false;\n }\n }\n return true;\n }\n\n /**\n * Mint + persist every framework-managed credential material missing from each target\n * environment's `secrets.json`, so the downstream domains render artifacts that carry\n * it.\n *\n * WHY this exists (root cause). Framework-GENERATED material used to be minted only by\n * the interactive `wildo setup` of a brand-new environment; nothing ever backfilled an\n * existing one. Every material introduced after an environment was created was\n * therefore permanently absent there, and the resulting failures were silent by design\n * — the crontabs-batches-manager signing keypair dead-lettering every scheduled tick,\n * and the immudb state-signing keypair leaving the audit store's whole-server\n * substitution defense off (\"state-signature pinning is OFF\"). This is the sibling of\n * {@link ConfigSyncCommand.reconcileLocalConfigFromAuthoredInfra}: same \"refresh the\n * generated INPUT before any domain consumes it\" discipline, applied to secrets.\n *\n * NOT a rotation. Only absent/blank material is minted; anything already present is\n * untouched, so this can never invalidate a credential a running deployment holds.\n * Destructive rotation remains behind `--rotate-secrets` (see {@link syncSecrets}).\n *\n * NON-FATAL by design: an environment with no readable `secrets.json` (never set up, or\n * remote-reconstructed) is skipped silently — the domain that actually needs secrets\n * fails loudly with its own actionable message.\n */\n private provisionFrameworkManagedSecrets(ctx: CommandContext, envNames: string[]): void {\n for (const envName of envNames) {\n try {\n const outcome = SecretsProvisioning.ensureForEnvironment(envName);\n if (outcome.status === SecretsProvisioningStatus.PROVISIONED) {\n ctx.log.info(\n chalk.dim(\n ` Provisioned missing framework-managed secret material for '${envName}': `\n + `${outcome.mintedRefs.join(', ')}.`,\n ),\n );\n }\n } catch (error) {\n ctx.log.warn(\n chalk.yellow(\n ` Could not provision framework-managed secrets for '${envName}': `\n + `${ErrorUtils.extractErrorMessage(error)}.`,\n ),\n );\n }\n }\n }\n\n private async loadConfigForSync(\n envName: string,\n frameworkPath: string | null,\n ctx: CommandContext,\n saasRoot?: string,\n ): Promise<PlatformEnvConfigJson | null> {\n /*\n * Whether this environment runs on ANOTHER application's infrastructure is decided by the authored descriptor\n * alone (`infrastructureHost`). A persisted config.json — generated, or in a sibling secrets repository — written\n * before that changed still names the old owner, and every guard downstream reads it: a hosted remote environment\n * would regenerate its host's platform and infrastructure material (#1171). So the authored descriptor, when there\n * is one, is loaded FIRST, and a persisted copy that disagrees with it about the host is passed over for the\n * authored projection — the rule `RuntimeBootstrap.ensureConfigJson` applies to the local lane.\n *\n * A persisted copy that agrees about the host is still not taken as it is (#2310). Every member the descriptor\n * decides (`AUTHORED_INFRA_MEMBER_AUTHORITY`) is laid over it from the authored projection, absence included\n * (`overlayAuthoredInfraMembers`): a remote environment used to render whatever logging, exporter, provider choice\n * or receiving domain its persisted file said, often none, and kept a value removed from the descriptor. The\n * persisted copy keeps only what a descriptor cannot carry (Atlas API metadata, external endpoints) and the setup\n * answers of a member the descriptor leaves unauthored.\n *\n * An authored descriptor that EXISTS and cannot be loaded refuses, even beside a persisted copy: a hosted\n * descriptor whose host is missing is exactly that case, and the persisted copy is the stale answer.\n */\n let authoredConfig: LoadedAuthoredInfraEnvConfig | null = null;\n if (saasRoot) {\n try {\n authoredConfig = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n } catch (error) {\n ctx.log.error(\n `Failed to load authored env descriptor for '${envName}': ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return null;\n }\n }\n const describesAuthoredHosting = (persisted: PlatformEnvConfigJson, source: string): boolean => {\n if (authoredConfig === null) return true;\n const persistedHost = persisted.infrastructureHost?.applicationRoot ?? null;\n const authoredHost = authoredConfig.config.infrastructureHost?.applicationRoot ?? null;\n if (persistedHost === authoredHost) return true;\n const describe = (host: string | null): string => host === null ? 'owning its infrastructure' : `running on the infrastructure of ${host}`;\n ctx.log.info(\n ` ${source} describes '${envName}' as ${describe(persistedHost)}, but ${authoredConfig.path} declares it as `\n + `${describe(authoredHost)}: using the authored descriptor.`,\n );\n return false;\n };\n\n const followAuthored = (persisted: PlatformEnvConfigJson, source: string, writeBack: boolean): PlatformEnvConfigJson => {\n if (authoredConfig === null) return persisted;\n const overlay = overlayAuthoredInfraMembers(persisted, authoredConfig.config);\n if (overlay.correctedMembers.length > 0) {\n ctx.log.info(\n ` ${source} for '${envName}' disagrees with ${authoredConfig.path} on ${overlay.correctedMembers.join(', ')}: `\n + 'using the authored descriptor for those.',\n );\n // The env-file and compose lanes read the GENERATED file from disk, not this return value. A sibling secrets\n // repository is the operator's, and is never written.\n const persisted = writeBack ? persistAuthoredOverlay(envName, overlay.config) : { written: false };\n if (persisted.refusal !== undefined) {\n ctx.log.warn(` Kept the generated config.json for '${envName}': the corrected copy does not validate (${persisted.refusal}).`);\n }\n }\n return overlay.config;\n };\n\n let generated: PlatformEnvConfigJson | null = null;\n try {\n generated = EnvironmentUtils.loadConfigJson(envName);\n } catch {\n // Fall through to external or authored config sources when the generated\n // scoped config payload is missing or unreadable.\n }\n // Outside the `try`: a failure to write the corrected copy back is not an unreadable config.json.\n if (generated && describesAuthoredHosting(generated, 'The generated config.json')) {\n const configured = followAuthored(generated, 'The generated config.json', true);\n if (!hasRequiredRemoteKubernetesMetadata(configured)) {\n return null;\n }\n return configured;\n }\n\n if (saasRoot) {\n const appSiblingPersisted = this.loadConfigJsonFromSiblingSecretsRepo(envName, saasRoot);\n if (appSiblingPersisted && describesAuthoredHosting(appSiblingPersisted, 'The sibling secrets repository config.json')) {\n const appSiblingConfig = followAuthored(appSiblingPersisted, 'The sibling secrets repository config.json', false);\n if (!hasRequiredRemoteKubernetesMetadata(appSiblingConfig)) {\n return null;\n }\n return appSiblingConfig;\n }\n\n if (authoredConfig) {\n const unsupportedFallbackReason = getUnsupportedAuthoredConfigFallbackReason(\n envName,\n authoredConfig.path,\n authoredConfig.config,\n );\n if (unsupportedFallbackReason) {\n ctx.log.error(unsupportedFallbackReason);\n return null;\n }\n\n const configJson = buildConfigJsonFromInfraEnvConfig(authoredConfig.config);\n if (!hasRequiredRemoteKubernetesMetadata(configJson)) {\n return null;\n }\n return configJson;\n }\n }\n\n const frameworkSiblingConfig = this.loadConfigJsonFromSiblingSecretsRepo(envName, frameworkPath);\n if (frameworkSiblingConfig) {\n if (!hasRequiredRemoteKubernetesMetadata(frameworkSiblingConfig)) {\n return null;\n }\n return frameworkSiblingConfig;\n }\n\n return null;\n }\n\n /**\n * Every provider env var the generated CI workflow must carry as a `WILDO_SECRET_PROVIDER_ENV_*`\n * input, for every provider this application declares.\n *\n * ## Both halves of a provider's secrets, not just the bindings (#361)\n *\n * A provider states its credentials TWICE, and the two sets are not the same size:\n *\n * | source | what it names | shipped by |\n * |---|---|---|\n * | `secretsContract` | every env var the provider needs, whatever it is for | engine module OR companion contribution |\n * | protocol `runtimeContract` bindings | the subset a PROTOCOL resolves through (base URL, auth header, …) | engine module only |\n *\n * The contract is a strict SUPERSET. Measured 2026-09-06 against the built engine registry: 13\n * engine contract keys are named by no binding at all — every `IMMUDB_*`,\n * `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`, `ODOO_BASE_URL`/`_DB`/`_LOGIN` — while\n * the reverse inclusion holds exactly (25 binding `secretRef`s, all of them contract\n * `envVarName`s, zero exceptions). This collector enumerated bindings alone, so those 13 had no\n * input in any generated workflow: the deployment authenticated with nothing and failed at the\n * vendor, three layers from the cause.\n *\n * It gets worse rather than merely staying incomplete. A provider known only from a companion\n * contribution has ZERO protocol bindings BY CONSTRUCTION — a runtime contract is code and a\n * contribution is values-free data — so the moment package-provider discovery registers one, it\n * contributes not a subset but nothing at all. Reading the contract half fixes both cases with\n * one source, and is why the composed catalogue exposes `secrets` independently of `protocols`.\n *\n * ## An unresolvable ref contributes nothing, silently, and that is calibrated rather than lazy\n *\n * A declared ref the composed catalogue cannot name yields no keys and no warning. Measured on\n * the dogfood applications: Wonder Todos declares `sentry` and `wonderTodosFilePicker`, neither of\n * which is an engine provider — they are FRONTEND_SDK providers whose material is public config\n * delivered through the frontend build, not a backend secret. Warning here would fire on correct\n * declarations, which is how an operator learns to skim the output. (`recaptcha` was the third until\n * 1783ec83 gave it a backend module; its verification secret is now a contract key like any other.)\n */\n private async loadConfiguredProviderEnvKeys(saasRoot: string): Promise<Omit<ApplicationCiSecretKey, 'kind'>[]> {\n const providerEnvKeys = new Map<string, Omit<ApplicationCiSecretKey, 'kind'>>();\n\n /**\n * `required` is merged with OR across sources, and the direction is deliberate: the contract\n * and the bindings each carry the flag and CAN disagree about the same env var. It decides only\n * which half of the generated block a key lands in — both halves are emitted, one under an\n * \"Optional\" comment — so an over-required key costs a comment line, while an under-required\n * one is the silent missing input this whole method exists to stop.\n *\n * For a SCOPED provider's contract key this is no longer the final answer: `syncCicd` places it by the derivation\n * `wildo secrets list` uses (`loadDeployProviderSecretRequirements`, #2977), which knows which arm reads which slot.\n * This merge decides every other key, and every key when that derivation cannot be loaded.\n */\n const addProviderEnvKey = (envVarName: string, required?: boolean) => {\n const previous = providerEnvKeys.get(envVarName);\n providerEnvKeys.set(envVarName, {\n envVarName,\n required: previous?.required === true || required === true,\n });\n };\n\n type ProviderConfiguredProtocols = Parameters<typeof getProviderSecretEnvBindings>[1];\n const collectProviderEnvKeys = (\n providerConfigurations: Record<string, ProviderConfiguredProtocols | undefined> | undefined,\n ) => {\n if (!providerConfigurations) {\n return;\n }\n\n for (const [providerRef, configuredProtocols] of Object.entries(providerConfigurations)) {\n if (!configuredProtocols) {\n continue;\n }\n\n for (const binding of getProviderSecretEnvBindings(providerRef, configuredProtocols)) {\n addProviderEnvKey(binding.envVarName, binding.required);\n }\n }\n };\n const collectProviderRefsFromScopes = (providersBlock: unknown): Set<string> => {\n const providerRefs = new Set<string>();\n\n const collectRuntimeScope = (scope: unknown) => {\n if (!scope || typeof scope !== 'object') {\n return;\n }\n const providers = (scope as { providers?: unknown }).providers;\n if (!providers || typeof providers !== 'object') {\n return;\n }\n for (const providerRef of Object.keys(providers)) {\n providerRefs.add(providerRef);\n }\n };\n\n const scopes = (providersBlock as { scopes?: Record<string, unknown> } | undefined)?.scopes;\n if (!scopes) {\n return providerRefs;\n }\n\n collectRuntimeScope(scopes.backend);\n collectRuntimeScope(scopes.companion);\n\n for (const scopeGroup of [scopes.frontendServices, scopes.minions, scopes.workers]) {\n if (!scopeGroup || typeof scopeGroup !== 'object') {\n continue;\n }\n for (const scope of Object.values(scopeGroup)) {\n collectRuntimeScope(scope);\n }\n }\n\n return providerRefs;\n };\n\n const saasConfig = await loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'));\n if (!saasConfig) {\n return [];\n }\n\n // `ProviderConfigurationsSchema` (in `define-saas-config.ts`) types each\n // per-provider entry as `Record<string, unknown>` — the protocol layer is\n // left intentionally loose at the schema level. `getProviderSecretEnvBindings`\n // narrows that to `Partial<Record<protocolKind, Record<string, unknown>>>`\n // (the runtime contract). The cast bridges the schema/function gap without\n // weakening the schema or over-tightening the runtime contract.\n collectProviderEnvKeys(\n saasConfig.providerConfigurations as Record<string, ProviderConfiguredProtocols | undefined>,\n );\n for (const providerRef of collectProviderRefsFromScopes(saasConfig.providers)) {\n const configuredProtocols = saasConfig.providerConfigurations[providerRef] as ProviderConfiguredProtocols | undefined;\n for (const binding of getProviderSecretEnvBindings(\n providerRef,\n configuredProtocols,\n )) {\n addProviderEnvKey(binding.envVarName, binding.required);\n }\n }\n\n // The contract half (#361), over EVERY declared ref from both populations above — a provider\n // configured but not scoped, or scoped but not configured, is declared either way, and the\n // secret it needs does not depend on which of the two the author wrote it in.\n //\n // Order relative to the binding passes is irrelevant: `addProviderEnvKey` merges `required`\n // with OR, so a key both halves name gets the same answer whichever runs last. (Measured\n // 2026-09-06 across all 22 engine providers: the two halves disagree about `required` for zero\n // keys today, so the merge is currently inert as well as order-free.)\n const declaredProviderRefs = new Set<string>([\n ...Object.keys(saasConfig.providerConfigurations ?? {}),\n ...collectProviderRefsFromScopes(saasConfig.providers),\n ]);\n for (const providerRef of declaredProviderRefs) {\n for (const secret of getComposedProviderEntry(providerRef)?.secrets ?? []) {\n addProviderEnvKey(secret.envVarName, secret.required);\n }\n }\n\n return [...providerEnvKeys.values()];\n }\n\n /**\n * Which scoped provider secrets the deploy job REQUIRES, by the derivation `wildo secrets list` uses (#2977), so the\n * workflow files a secret no enabled arm reads under its \"Optional\" comment exactly where the listing reports it\n * `required: false`. Before, the collector above OR-merged the contract's `required` over every declared ref, so\n * `MICROSOFT_OAUTH2_CLIENT_SECRET` landed among Wonder Todos' required GitHub secrets though its `microsoft` scope\n * enables `REST_API` alone and only the sign-in arm reads that slot.\n *\n * The derivation is not re-done here; this only loads its inputs and asks it. When they cannot be loaded (a provider\n * package's companion barrel fails to import, the SaaS config fails to bundle) the answer is `undefined`, and every\n * key keeps the OR-merge, whose error is to require too much: an over-required key costs a comment line, an\n * under-required one a deploy that boots without it.\n */\n private async loadDeployProviderSecretRequirements(ctx: CommandContext, saasRoot: string): Promise<ReadonlyMap<string, boolean> | undefined> {\n try {\n return deriveDeployProviderSecretRequirements(await loadSecretRequirementInputs(saasRoot));\n } catch (error) {\n ctx.log.warn(\n ` CI/CD: could not derive which provider secrets an enabled arm reads (${ErrorUtils.extractErrorMessage(error)}), so every `\n + 'provider secret a contract marks required is filed as a required GitHub secret.',\n );\n return undefined;\n }\n }\n\n private async syncEnvFiles(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n isCi: boolean,\n ): Promise<boolean> {\n const prepared = await this.prepareEnvFilesSyncExecution(ctx, envNames, force, isCi);\n if (!prepared) {\n return false;\n }\n\n return this.syncPreparedEnvFiles(ctx, prepared, isCi);\n }\n\n private loadSyncCredentials(\n ctx: CommandContext,\n envName: string,\n isCi: boolean,\n ): PlatformEnvSecretsJson | null {\n if (isCi) {\n try {\n return reconstructSecretsFromEnv();\n } catch (err) {\n ctx.log.error(`Failed to reconstruct secrets: ${ErrorUtils.extractErrorMessage(err)}`);\n return null;\n }\n }\n\n const credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return null;\n }\n\n return credentials;\n }\n\n private async prepareEnvFilesSyncExecution(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n isCi: boolean,\n ): Promise<PreparedEnvFilesSyncExecution | null> {\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error(\n 'Framework path not set. Re-run the CLI install script, or set `frameworkPath` in your machine preferences.',\n );\n return null;\n }\n\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const entries: PreparedEnvFilesSyncEntry[] = [];\n let applicationTargetsRefusal: string | undefined;\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const shouldPrepareApplicationTargets =\n isFrameworkDeveloper && Boolean(saasRoot);\n if (isFrameworkDeveloper && !saasRoot) {\n ctx.log.warn(\n 'Skipping application env target generation because config sync is running outside a targeted app root.',\n );\n }\n\n for (const envName of envNames) {\n const config = await this.loadConfigForSync(envName, frameworkPath, ctx, saasRoot ?? undefined);\n if (!config) {\n ctx.log.error(`No valid config for '${envName}'.`);\n return null;\n }\n\n const env = EnvironmentRegistry.get(envName);\n const resolvedEnv = hydrateEnvironmentFromConfig(\n env ?? createCiEnvConfig(envName, config),\n config,\n );\n if (!env && !isCi) {\n ctx.log.error(`Environment '${envName}' not found.`);\n return null;\n }\n\n if (resolvedEnv.locationType === WildoLocationType.REMOTE && !isCi) {\n ctx.log.warn(chalk.yellow(` Skipping env-files for remote '${envName}' (requires --ci).`));\n continue;\n }\n\n const credentials = this.loadSyncCredentials(ctx, envName, isCi);\n if (!credentials) {\n return null;\n }\n\n let applicationBackends: ApplicationBackendEnvTarget[] | undefined;\n let companionApis: CompanionPlatformEnvTarget[] | undefined;\n let applicationFrontends: ApplicationFrontendEnvExampleTarget[] | undefined;\n let applicationWorkers: ApplicationWorkerEnvTarget[] | undefined;\n let applicationMinions: ApplicationMinionEnvTarget[] | undefined;\n let applicationOperators: ApplicationOperatorEnvTarget[] | undefined;\n if (shouldPrepareApplicationTargets) {\n try {\n applicationBackends = await AppBootstrapService.buildApplicationBackendTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n companionApis = await AppBootstrapService.buildApplicationCompanionTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationFrontends = await AppBootstrapService.buildApplicationFrontendTargets({\n saasRoot,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationWorkers = await AppBootstrapService.buildApplicationWorkerTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationMinions = await AppBootstrapService.buildApplicationMinionTargets({\n env: resolvedEnv,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n });\n applicationOperators = AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: resolvedEnv,\n config,\n saasRoot,\n });\n } catch (error) {\n /*\n * Preparing the application's targets REGISTERS it with apps-manager, and apps-manager answers from the env\n * this very phase writes. So a platform env that lags the platform's code (a key added since it was written)\n * made the registration fail, and the refusal stopped the one command that writes the missing key: a\n * deadlock whose remedy needed itself (measured 2026-09-29, #2019: apps-manager refused Wonder Todos' immudb\n * for want of IMMUDB_ADMIN_*, which only this phase writes). The platform half does not depend on the\n * registration, so it is written anyway; the phase still fails, and says what to run once apps-manager has\n * restarted on the new env.\n */\n applicationTargetsRefusal = ErrorUtils.extractErrorMessage(error);\n ctx.log.error(`Failed to prepare application env files: ${applicationTargetsRefusal}`);\n ctx.log.warn(\n chalk.yellow(\n \" Writing the platform's env files anyway: they do not need the registration, and a platform env that is out of date \"\n + 'is one reason it can fail. Once apps-manager has restarted on them, run `wildo config sync` again for the application.',\n ),\n );\n applicationBackends = undefined;\n companionApis = undefined;\n applicationFrontends = undefined;\n applicationWorkers = undefined;\n applicationMinions = undefined;\n applicationOperators = undefined;\n }\n }\n\n /*\n * The SAME options object shape the write below is given, so what the prompt names and what\n * `sync` writes are computed from one input. `invokingAppRoot` in particular is what tells a\n * foreign live platform owner from this session's own — omit it here and the prompt offers\n * shared files the write then skips.\n */\n const existing = checkExisting(resolvedEnv, {\n frameworkPath,\n isFrameworkDeveloper,\n ...(ctx.cliContext.resolvedHomes.app.declarationRoot\n ? { invokingAppRoot: ctx.cliContext.resolvedHomes.app.declarationRoot }\n : {}),\n applicationBackends,\n companionApis,\n applicationFrontends,\n applicationWorkers,\n applicationMinions,\n applicationOperators,\n });\n if (existing.length > 0 && !force) {\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.warn('Skipping env-files regeneration in non-interactive mode. Use --force to override.');\n continue;\n }\n ctx.log.info(chalk.bold(' Existing env files'));\n for (const p of existing) ctx.log.info(chalk.dim(` ${p}`));\n const proceed = await confirm({\n message: 'Regenerate all env files? (existing files will be overwritten)',\n default: false,\n });\n if (!proceed) continue;\n }\n\n entries.push({\n envName,\n resolvedEnv,\n applicationBackends,\n companionApis,\n applicationFrontends,\n applicationWorkers,\n applicationMinions,\n applicationOperators,\n });\n }\n\n return {\n frameworkPath,\n isFrameworkDeveloper,\n entries,\n ...(applicationTargetsRefusal === undefined ? {} : { applicationTargetsRefusal }),\n };\n }\n\n private async syncPreparedEnvFiles(\n ctx: CommandContext,\n prepared: PreparedEnvFilesSyncExecution,\n isCi: boolean,\n ): Promise<boolean> {\n for (const entry of prepared.entries) {\n const credentials = this.loadSyncCredentials(ctx, entry.envName, isCi);\n if (!credentials) {\n return false;\n }\n\n ctx.log.info(chalk.cyan(` Syncing env files for ${entry.envName}...`));\n const result = await envSync(\n entry.resolvedEnv,\n credentials,\n {\n frameworkPath: prepared.frameworkPath,\n isFrameworkDeveloper: prepared.isFrameworkDeveloper,\n ...(ctx.cliContext.resolvedHomes.app.declarationRoot\n ? { invokingAppRoot: ctx.cliContext.resolvedHomes.app.declarationRoot }\n : {}),\n applicationBackends: entry.applicationBackends,\n companionApis: entry.companionApis,\n applicationFrontends: entry.applicationFrontends,\n applicationWorkers: entry.applicationWorkers,\n applicationMinions: entry.applicationMinions,\n applicationOperators: entry.applicationOperators,\n },\n ctx.log,\n );\n ctx.log.success(` Updated ${result.envFilesUpdated.length} file(s) for ${entry.envName}`);\n }\n // The platform's files were written; the application's were not, so the phase has not done its job.\n return prepared.applicationTargetsRefusal === undefined;\n }\n\n private async syncSecrets(\n ctx: CommandContext,\n envNames: string[],\n force: boolean,\n rotateSecrets: boolean,\n ): Promise<boolean> {\n // Fix M (2026-04-21) — `--force` and `--rotate-secrets` are now\n // ORTHOGONAL. `--force` only authorizes skipping confirmation prompts;\n // it never authorizes the destructive rotation that this domain\n // performs. Operators must explicitly pass `--rotate-secrets` to opt\n // into rewriting `secrets.json`. This prevents the prior surprise\n // where `wildo config sync --local --force` (intended as \"skip\n // confirmations\") silently overwrote a freshly-imported canonical\n // `secrets.json` with newly generated values.\n if (!rotateSecrets) {\n ctx.log.warn(\n chalk.yellow(\n ' Skipping secrets domain: pass --rotate-secrets to explicitly opt in to destructive `secrets.json` rotation.',\n ),\n );\n return true;\n }\n\n for (const envName of envNames) {\n const secrets = SecretsReader.loadSecrets(envName);\n if (!secrets) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return false;\n }\n\n if (!force) {\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.warn(\n 'Skipping secrets rotation in non-interactive mode. Combine --rotate-secrets with --force (or run interactively) to confirm.',\n );\n continue;\n }\n ctx.log.warn(chalk.yellow(` ⚠ Rotating secrets for '${envName}' will regenerate ALL auto-generated secrets.`));\n const proceed = await confirm({ message: `Rotate secrets for ${envName}?` });\n if (!proceed) continue;\n }\n\n const rotatable = structuredClone(secrets);\n // The AUTHORED descriptor decides (the persisted copies may predate a newly added or removed host).\n const hostedBy = await InfrastructureHost.resolveForCommand(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n EnvironmentRegistry.get(envName) ?? { name: envName },\n );\n if (hostedBy) {\n ctx.log.info(\n ` '${envName}' runs on the infrastructure of ${hostedBy.applicationRoot}: rotating this application's own secrets only. `\n + `Shared credentials are rotated from the host (cd ${hostedBy.applicationRoot} && wildo config sync --domain secrets --rotate-secrets).`,\n );\n }\n const result = SecretsRotation.rotate(rotatable, hostedBy ? { owners: new Set([SecretOwner.APPLICATION]) } : undefined);\n ConfigSecretsUtils.writeSecretsJson(envName, rotatable);\n ctx.log.success(` Rotated ${result.rotatedKeys.length} secrets for ${envName}`);\n // A held secret still carries its old value: say so, with why, so a rotation after a suspected leak is not read\n // as having replaced it.\n for (const { key, because } of result.heldKeys) {\n ctx.log.warn(chalk.yellow(` Not rotated: ${key} (${because})`));\n }\n const environment = EnvironmentRegistry.get(envName);\n if (environment?.locationType === WildoLocationType.LOCAL) {\n ctx.log.warn(\n chalk.yellow(\n ' Running local platform services and backing infra may still use the previous generated secrets until they are reprovisioned/restarted together.',\n ),\n );\n }\n }\n return true;\n }\n\n private async syncManifest(ctx: CommandContext): Promise<boolean> {\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return false;\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.warn(chalk.yellow(' Manifest regeneration: remote environments not yet supported.'));\n return true;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error('Framework path not set.');\n return false;\n }\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root. Run `wildo init` first.');\n return false;\n }\n\n const hostedBy = await InfrastructureHost.resolveForCommand(saasRoot, env);\n if (hostedBy) {\n ctx.log.info(\n ` Manifest regeneration skipped: '${env.name}' runs on the infrastructure of ${hostedBy.applicationRoot}, `\n + `which renders the shared manifests (cd ${hostedBy.applicationRoot} && wildo config sync --domain manifest).`,\n );\n return true;\n }\n\n const saasConfig = await loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'));\n if (!saasConfig) {\n ctx.log.error('Manifest regeneration now requires a targeted app root with wildo.saas.config.ts.');\n return false;\n }\n\n try {\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const serviceReplicas = await this.loadServiceReplicas(saasRoot, env);\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const result = K8sManifestGenerator.renderAllManifests(env, frameworkPath, {\n serviceReplicas,\n isFrameworkDeveloper,\n });\n ctx.log.success(` Regenerated ${result.total} K8s manifests.`);\n if (!shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper)) {\n ctx.log.info(' Platform manifests skipped because local framework developers run platform services natively.');\n }\n } else {\n const wroteCompose = await renderDockerComposeTemplate(env, frameworkPath, ctx.preferences?.isFrameworkDeveloper ?? false);\n ctx.log.success(wroteCompose ? ' Regenerated Docker Compose file.' : ' Docker Compose file is current (unchanged).');\n }\n } catch (err) {\n ctx.log.error(`Manifest regeneration failed: ${ErrorUtils.extractErrorMessage(err)}`);\n return false;\n }\n return true;\n }\n\n /**\n * Load per-service replica counts from the infra config file for K8s environments.\n * Returns `undefined` if no infra config or no services are defined.\n */\n private async loadServiceReplicas(\n saasRoot: string,\n env: PlatformEnvironmentConfiguration,\n ): Promise<Record<string, number> | undefined> {\n const authoredConfig = await loadAuthoredInfraEnvConfig(env.name, saasRoot);\n if (!authoredConfig) {\n return undefined;\n }\n\n return extractServiceReplicas(authoredConfig.config);\n }\n\n private async syncCicd(ctx: CommandContext, force: boolean): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root. Run this from within a SaaS application directory.');\n return false;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath) {\n ctx.log.error('Framework path not set.');\n return false;\n }\n\n const saasConfigPath = join(saasRoot, 'wildo.saas.config.ts');\n const saasConfig = await loadSaasConfig(saasConfigPath);\n if (!saasConfig) {\n ctx.log.error(`No SaaS config found at ${saasConfigPath}.`);\n return false;\n }\n\n const environments: WorkflowEnvConfig[] = [];\n const contractProviderEnvSecretKeys = await this.loadConfiguredProviderEnvKeys(saasRoot);\n const derivedProviderSecretRequirements = await this.loadDeployProviderSecretRequirements(ctx, saasRoot);\n\n // Per-service image build targets (per-service deploy model) — each app\n // service (backend + every frontend) AND each app-owned minion/worker builds\n // its OWN image from its OWN Dockerfile. Same across every env (derived from\n // the app's declared topology in wildo.saas.config.ts).\n //\n // `serviceName` is the pushed image name and MUST match the k8s/compose\n // manifest image refs (else CI builds an image the deploy can't pull):\n // - services: the raw authored `services.<key>.serviceName`\n // - minions: `buildMinionServiceName(appSlug, bucketKey)` = `{appSlug}-minion-{dnsName}`\n // — the SAME helper `renderMinionForTarget` + the compose render use, so the\n // bucket key is RFC1123-normalized identically everywhere (a camelCase key\n // `marketingScrapper` → `marketing-scrapper`, a valid lowercase Docker tag).\n // - workers: `buildWorkerServiceName(appSlug, bucketKey)` (same on the worker axis).\n // `dockerfile` is `<path>/Dockerfile` (the bucket entry's folder + Dockerfile,\n // build context = the app root) — `resolveServiceImageDockerfilePath`, the mapping the\n // template contract also reads, so every shipped service path is held to it (#984).\n const dockerfileFor = resolveServiceImageDockerfilePath;\n // Minion/worker image names key on the app SLUG (the lowercase-hyphen\n // identifier the render uses via `runtimeTarget.appSlug`), NOT `appName`\n // (which prefers `name`). `slug` is a required saas-config field; the `?? name`\n // is defensive only.\n const appSlug = saasConfig.slug ?? saasConfig.name;\n const appServices = [\n ...Object.values(saasConfig.services ?? {}).map((svc) => ({\n serviceName: svc.serviceName,\n dockerfile: dockerfileFor(svc.path),\n frontendType: svc.frontendType,\n })),\n ...Object.entries(saasConfig.minions ?? {}).map(([minionKey, ref]) => ({\n serviceName: buildMinionServiceName(appSlug, minionKey),\n dockerfile: dockerfileFor(ref.path),\n frontendType: undefined,\n })),\n ...Object.entries(saasConfig.workers ?? {}).map(([workerKey, ref]) => ({\n serviceName: buildWorkerServiceName(appSlug, workerKey),\n dockerfile: dockerfileFor(ref.path),\n frontendType: undefined,\n })),\n ];\n // What a frontend image's build args resolve against (#1125): the main backend API's service key (the host its\n // public URL is built from — `backendApi`, else the first backend, the rule the runtime topology uses), the SaaS\n // app's key (the documentation site deep-links to it), and the display name the app's own bootstrap bakes in.\n const serviceEntries = Object.entries(saasConfig.services ?? {});\n const backendServiceKeys = serviceEntries.filter(([, svc]) => svc.frontendType === undefined).map(([key]) => key);\n const mainBackendApiServiceKey = backendServiceKeys.includes('backendApi') ? 'backendApi' : backendServiceKeys[0];\n const saasAppServiceKey = serviceEntries.find(([, svc]) => svc.frontendType === AppFrontendType.SAAS_APP)?.[0];\n const appDisplayName = saasConfig.displayName ?? saasConfig.name ?? appSlug;\n\n const infraDir = resolveAppLayout(saasRoot).authoredInfrastructureHome;\n if (!existsSync(infraDir)) {\n ctx.log.error(`No app-owned infrastructure directory found at ${infraDir}.`);\n return false;\n }\n\n const envDirs = readdirSync(infraDir, { withFileTypes: true })\n .filter((d) => d.isDirectory() && d.name !== 'local')\n .map((d) => d.name);\n\n /*\n * What owns the system-of-record credentials and inbound endpoint secrets (#1650): read ONCE, and only when an\n * environment actually deploys, because reading the endpoints runs the built backend. What could not be read is\n * said once, followed by which secrets the workflows will therefore not forward and how to regenerate them.\n * A failure to read them at all is named as such, not blamed on the environment being processed.\n */\n let nonProviderOwners: Awaited<ReturnType<typeof loadNonProviderSecretOwners>> | undefined;\n const loadNonProviderOwnersOnce = async (): Promise<Awaited<ReturnType<typeof loadNonProviderSecretOwners>>> => {\n if (nonProviderOwners !== undefined) return nonProviderOwners;\n const declaredSystems = (saasConfig as { systemsOfRecord?: Record<string, SystemOfRecordDeclarationForSecrets> }).systemsOfRecord ?? {};\n try {\n nonProviderOwners = await loadNonProviderSecretOwners(saasRoot, declaredSystems);\n } catch (error) {\n throw new Error(`Could not read the system-of-record credentials and inbound endpoints to forward: ${ErrorUtils.extractErrorMessage(error)}`);\n }\n for (const note of nonProviderOwners.incomplete) {\n ctx.log.warn(` CI/CD: ${note}`);\n }\n const unlistedSystems = nonProviderOwners.systemsOfRecord.filter((system) => system.secretSlots === null).map((system) => system.name);\n if (unlistedSystems.length > 0) {\n ctx.log.warn(\n ` CI/CD: the deploy workflows therefore forward no credential for ${unlistedSystems.join(', ')} beyond what an `\n + 'environment already stores, and a deploy whose backend needs one refuses to boot. Fix what is named above, then '\n + 'run `wildo config sync --domain cicd --force`.',\n );\n }\n if (nonProviderOwners.inboundEndpointKeys === null) {\n ctx.log.warn(\n ' CI/CD: the deploy workflows therefore forward only the inbound endpoint secrets an environment already '\n + 'stores; a declared endpoint\\'s route stays withheld in a deploy until its secret is forwarded. Build '\n + 'backend-api, then run `wildo config sync --domain cicd --force`.',\n );\n }\n return nonProviderOwners;\n };\n\n for (const envName of envDirs) {\n const configPath = join(infraDir, envName, 'wildo.infra.remote.config.ts');\n if (!existsSync(configPath)) continue;\n\n try {\n const authoredConfig = await loadAuthoredInfraEnvConfig(envName, saasRoot);\n if (!authoredConfig) {\n continue;\n }\n const infraConfig = authoredConfig.config;\n if (!infraConfig.deployment) continue;\n const providerEnvSecretKeysByName = new Map(\n contractProviderEnvSecretKeys.map((entry) => [entry.envVarName, entry]),\n );\n // THIS environment's provider configuration can name a secret the application layer does not (a binding authored\n // in `wildo.infra.<env>.config.ts > providerConfigurations`), so its workflow's secrets block collects the bindings\n // of the merged configuration too — for the providers this environment overlays; the rest are already above.\n const environmentProviderConfigurations = overlayEnvironmentProviderConfigurations(\n saasConfig.providerConfigurations,\n infraConfig.providerConfigurations,\n );\n for (const providerRef of Object.keys(infraConfig.providerConfigurations ?? {})) {\n const configuredProtocols = environmentProviderConfigurations[providerRef] as Parameters<typeof getProviderSecretEnvBindings>[1];\n for (const binding of getProviderSecretEnvBindings(providerRef, configuredProtocols)) {\n providerEnvSecretKeysByName.set(binding.envVarName, {\n envVarName: binding.envVarName,\n required: providerEnvSecretKeysByName.get(binding.envVarName)?.required === true || binding.required === true,\n });\n }\n }\n const storedSecrets = (() => {\n try {\n return EnvironmentUtils.loadSecretsJson(envName);\n } catch {\n return null;\n }\n })();\n for (const envVarName of Object.keys(storedSecrets?.providerEnv ?? {})) {\n providerEnvSecretKeysByName.set(envVarName, {\n envVarName,\n required: providerEnvSecretKeysByName.get(envVarName)?.required,\n });\n }\n /*\n * Every kind of application secret, each under its own CI prefix (#1650): the provider secrets above, the\n * credentials of the declared systems of record and the secrets of the declared inbound endpoints — the rows\n * `wildo secrets list` shows for this environment — and, optional, any such secret the environment already\n * stores, so a stored value keeps reaching the deploy even where its owner could not be read.\n */\n const owners = await loadNonProviderOwnersOnce();\n const applicationSecretKeys: ApplicationCiSecretKey[] = [\n // A scoped provider's contract key is placed by the listing's own predicate (#2977); every other key keeps the merge.\n ...[...providerEnvSecretKeysByName.values()].map((entry) => ({\n kind: ApplicationSecretKind.PROVIDER,\n ...entry,\n required: derivedProviderSecretRequirements?.get(entry.envVarName) ?? entry.required,\n })),\n ...deriveDeployForwardedSecretKeys(owners, systemOfRecordPresenceOf(infraConfig.systemsOfRecord)),\n ...Object.keys(storedSecrets?.systemsOfRecordEnv ?? {}).map((envVarName) => ({ kind: ApplicationSecretKind.SYSTEM_OF_RECORD, envVarName })),\n ...Object.keys(storedSecrets?.inboundEndpointEnv ?? {}).map((envVarName) => ({ kind: ApplicationSecretKind.INBOUND_ENDPOINT, envVarName })),\n ];\n environments.push({\n envName: infraConfig.environment,\n deployment: infraConfig.deployment,\n // The registry the deploy manifests pull from — the workflow pushes to the same one.\n registryEndpoint: infraConfig.remoteProvider?.registryEndpoint,\n appName: saasConfig.name ?? saasConfig.slug,\n services: appServices.map(({ frontendType, ...service }) => {\n const { buildArgs, unresolved } = resolveServiceImageBuildArgs({\n frontendType,\n serviceName: service.serviceName,\n appDisplayName,\n envName: infraConfig.environment,\n runtimeEnvironment: infraConfig.runtimeEnvironment,\n publicDomain: infraConfig.publicDomain,\n serviceHosts: infraConfig.serviceHosts,\n mainBackendApiServiceKey,\n saasAppServiceKey,\n documentationSite: infraConfig.documentationSite,\n });\n if (unresolved.length > 0) {\n ctx.log.warn(\n ` CI/CD (${envName}): ${service.serviceName} is built without ${unresolved.join(', ')} — this environment `\n + 'declares nothing to derive them from, so its image bakes in no value for them.',\n );\n }\n return { ...service, buildArgs, unresolvedBuildArgs: unresolved };\n }),\n applicationSecretKeys,\n // A hosted environment deploys into its host's cluster and installs no cluster-wide controllers.\n ownsClusterInfrastructure: infraConfig.infrastructureHost === undefined,\n });\n } catch (error) {\n ctx.log.error(\n `Failed to load CI/CD config for '${envName}': ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return false;\n }\n }\n\n if (environments.length === 0) {\n ctx.log.warn(chalk.yellow(' No environments with deployment config found.'));\n return true;\n }\n\n const result = writeWorkflows(saasRoot, environments, frameworkPath, force);\n ctx.log.success(` CI/CD: created ${result.created.length}, skipped ${result.skipped.length}`);\n return true;\n }\n\n private async syncConfig(ctx: CommandContext, envNames: string[], isCi: boolean): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo config sync --domain config` requires a targeted app root with wildo.saas.config.ts.');\n return false;\n }\n\n const providerArtifactsSynced = await this.syncProviderRuntimeArtifacts(ctx, saasRoot, envNames);\n if (!providerArtifactsSynced) {\n return false;\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n for (const envName of envNames) {\n const outputDir = EnvironmentPaths.resolveScopedDeployArtifactsDir(saasRoot, envName);\n const env = EnvironmentRegistry.get(envName);\n const config = await this.loadConfigForSync(envName, frameworkPath, ctx, saasRoot);\n if (!config) {\n ctx.log.error(`No valid config for '${envName}'.`);\n return false;\n }\n\n let credentials;\n if (isCi) {\n try {\n credentials = reconstructSecretsFromEnv();\n } catch (err) {\n ctx.log.error(`Failed to reconstruct secrets: ${ErrorUtils.extractErrorMessage(err)}`);\n return false;\n }\n } else {\n credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.warn(chalk.yellow(` Skipping config for ${envName}: no secrets`));\n continue;\n }\n }\n\n const envConfig: PlatformEnvironmentConfiguration = hydrateEnvironmentFromConfig(\n env ?? createCiEnvConfig(envName, config),\n config,\n );\n let applicationBackends;\n let applicationWorkers;\n let applicationMinions;\n\n try {\n const targetInput = {\n env: envConfig,\n credentials,\n saasRoot,\n config,\n requestedAppSlug: ctx.flags.app as string | undefined,\n };\n applicationBackends = await AppBootstrapService.buildApplicationBackendTargets(targetInput);\n applicationWorkers = await AppBootstrapService.buildApplicationWorkerTargets(targetInput);\n applicationMinions = await AppBootstrapService.buildApplicationMinionTargets(targetInput);\n } catch (error) {\n /*\n * The deploy-artifact step needs a RUNNING platform with THIS application registered — it\n * builds CI inputs under `.wildo-saas/deploy/` by asking apps-manager about the\n * application's backends, workers and minions. A first-time creator runs `config sync`\n * BEFORE any platform exists (because `wildo init`'s next steps say to), so on a fresh\n * machine this step cannot succeed and never could.\n *\n * Failing the phase for that was wrong twice over: everything else the phase produces —\n * compose, config.json, env files, provider runtime — is COMPLETE and is exactly what\n * `wildo local up` consumes next, and the remedy printed (\"Check PLATFORM_ADMIN_SECRET\")\n * is not the fix for either real cause. On a shared development host the 401 is almost\n * never a wrong secret; it is another application's platform answering on the port.\n *\n * So the two creator-facing causes SKIP with a line that names the cause and the order that\n * works, and the phase keeps its other outputs. Anything unclassified still fails: a real\n * defect in artifact generation must not be swallowed by a convenience for fresh machines.\n */\n const unavailable = classifyAppsManagerUnavailable(error);\n if (unavailable === null) {\n ctx.log.error(\n `Failed to prepare application deploy artifacts: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return false;\n }\n ctx.log.warn(chalk.yellow(\n unavailable === AppsManagerUnavailableReason.PLATFORM_NOT_RUNNING\n ? ' Deploy artifacts skipped: no platform is running for this application yet.'\n : ' Deploy artifacts skipped: the platform answering for this application refused our credentials '\n + '— on a shared host that usually means ANOTHER application\\'s platform holds the port.',\n ));\n ctx.log.info(chalk.dim(\n ' Local artifacts (compose, config.json, env files, provider runtime) are complete. '\n + 'Bring the platform up and register this application, then re-run to produce deploy artifacts:',\n ));\n ctx.log.info(chalk.dim(' wildo local up → wildo local init --register-only → wildo config sync'));\n continue;\n }\n\n ctx.log.info(chalk.cyan(` Generating deploy artifacts for ${envName}...`));\n generateCiDeployArtifacts(\n {\n env: envConfig,\n credentials,\n config,\n runtime: envConfig.runtime,\n outputDir,\n applicationBackends,\n applicationWorkers,\n applicationMinions,\n // Remote-cluster TLS manifests (ClusterIssuer + tls-config) + Traefik\n // Helm values are rendered from `templates/infra/k8s/**`, resolved via\n // the framework repo root (falls back to the app root — same\n // convention as buildApplicationBackendTargets above).\n frameworkPath: frameworkPath ?? saasRoot,\n },\n ctx.log,\n );\n }\n return true;\n }\n\n private async syncProviderRuntimeArtifacts(ctx: CommandContext, saasRoot: string, envNames: string[]): Promise<boolean> {\n const environmentName = resolveProviderArtifactEnvironmentName(envNames, ctx.activeEnv?.name);\n ctx.log.info(chalk.dim(` Provider runtime artifacts: generated for environment '${environmentName}'.`));\n // The frameworkPath lets the sync declare and link the system-of-record facet library (#2013).\n const result = await syncProviderRuntimeArtifactsForApp(ctx.log, saasRoot, environmentName, {\n frameworkPath: ctx.cliContext.resolvedHomes.framework.repositoryRoot ?? null,\n });\n if (!result.success) return false;\n // #3787: the frontend CSP is DERIVED from these artifacts (a browser provider's origins: PostHog's ingest host, a\n // Sentry DSN host), so it is regenerated for the same environment in the same step, as `wildo dev start` and\n // `wildo dev sync-csp` do. Until then a provider declared and synced here reached the browser blocked by a CSP that\n // still lacked its origins, and only a separate command nothing named would refresh it.\n try {\n const csp = await CspSyncService.sync({ saasRoot, envName: environmentName, env: process.env });\n for (const service of csp.services) {\n const changed = [service.generatedArtifactOutOfDate ? service.generatedArtifactPath : null, ...service.outOfDateNginxFiles]\n .filter((part): part is string => part !== null);\n if (changed.length > 0) ctx.log.info(` ${chalk.cyan('CSP')} ${service.serviceKey} (${environmentName}) updated ${changed.join(', ')}`);\n }\n } catch (error) {\n ctx.log.error(` Frontend CSP not refreshed for '${environmentName}': ${ErrorUtils.extractErrorMessage(error)}. Run \\`wildo dev sync-csp --env ${environmentName}\\`.`);\n return false;\n }\n return true;\n }\n}\n"]}