@wildo-ai/wildo-cli 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  27. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  28. package/dist/src/commands/generate/email-command.utils.js +5 -0
  29. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  30. package/dist/src/commands/init.command.d.ts +14 -0
  31. package/dist/src/commands/init.command.d.ts.map +1 -1
  32. package/dist/src/commands/init.command.js +36 -5
  33. package/dist/src/commands/init.command.js.map +1 -1
  34. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  35. package/dist/src/commands/local/deregister.command.js +4 -0
  36. package/dist/src/commands/local/deregister.command.js.map +1 -1
  37. package/dist/src/commands/local/dev.command.d.ts +6 -0
  38. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  39. package/dist/src/commands/local/dev.command.js +72 -0
  40. package/dist/src/commands/local/dev.command.js.map +1 -1
  41. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  42. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  43. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  44. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  45. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  46. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  47. package/dist/src/commands/local/jobs-run.command.js +92 -0
  48. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  49. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  50. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  51. package/dist/src/commands/local/jobs.command.js +59 -0
  52. package/dist/src/commands/local/jobs.command.js.map +1 -0
  53. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  54. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  55. package/dist/src/commands/local/tunnel.command.js +274 -0
  56. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  57. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  58. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  59. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  60. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  61. package/dist/src/commands/registry/update.command.js +1 -0
  62. package/dist/src/commands/registry/update.command.js.map +1 -1
  63. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  64. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  65. package/dist/src/commands/seal/verify.command.js +62 -1
  66. package/dist/src/commands/seal/verify.command.js.map +1 -1
  67. package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
  68. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  69. package/dist/src/services/application/app-bootstrap.service.js +49 -3
  70. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  71. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  72. package/dist/src/services/application/app-runtime-targets.service.js +9 -1
  73. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  74. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  75. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  76. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  77. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  78. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  79. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  80. package/dist/src/services/application/local-tunnel.service.js +294 -0
  81. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  82. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  83. package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
  84. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  85. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  86. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.js +26 -2
  88. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  89. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  90. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  92. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  93. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  94. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  95. package/dist/src/services/companion/build-console.service.js +54 -4
  96. package/dist/src/services/companion/build-console.service.js.map +1 -1
  97. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  98. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  99. package/dist/src/services/companion/creation-console.service.js +14 -2
  100. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  102. package/dist/src/services/companion/creation-drive.service.js +5 -2
  103. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  104. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  105. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  107. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  108. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  109. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  110. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  111. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  112. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  113. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  114. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  115. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  116. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  117. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  118. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  119. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  120. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  121. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  122. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  123. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  124. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  125. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  126. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  127. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  128. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
  129. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  130. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
  131. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  132. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  133. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  134. package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
  135. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  136. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  137. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  138. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  139. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  140. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
  142. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  143. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  144. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  145. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  146. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  147. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  148. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  149. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  150. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  151. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  152. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  153. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  154. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  155. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  156. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
  157. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  158. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
  159. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  160. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  161. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  162. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  163. package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
  164. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  165. package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
  166. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  167. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  168. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  169. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  170. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  171. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  172. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  173. package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
  174. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  175. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  176. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  177. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  178. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  179. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  180. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  181. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  182. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  183. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  184. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  185. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  186. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  187. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  188. package/dist/src/services/environment/environment-setup.service.js +17 -6
  189. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  190. package/dist/src/services/environment/environment.service.d.ts +4 -3
  191. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  192. package/dist/src/services/environment/environment.service.js +0 -1
  193. package/dist/src/services/environment/environment.service.js.map +1 -1
  194. package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
  195. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  196. package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
  197. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  198. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  199. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  200. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  201. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  202. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  203. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  204. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  205. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  206. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  207. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  208. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  209. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  210. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  211. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  212. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  213. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  214. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  215. package/dist/src/services/registry/module-install.service.js +1 -0
  216. package/dist/src/services/registry/module-install.service.js.map +1 -1
  217. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  218. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  219. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  220. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  221. package/dist/src/services/security/csp-sync.service.js +21 -2
  222. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/framework-root-package.json +3 -3
  225. package/package.json +23 -23
  226. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  227. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
  228. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  229. package/templates/infra/registry-host/docker-compose.yml +9 -2
  230. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  231. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  232. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  233. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  234. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  235. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  236. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  237. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  238. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  239. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  240. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  241. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  242. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  243. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  244. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  245. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  246. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  247. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  248. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  249. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  250. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  251. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  252. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  253. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  254. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  255. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  256. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  257. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  258. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  259. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  260. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  261. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  262. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  263. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  264. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  265. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  266. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  267. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  268. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  269. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  270. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  271. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  272. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  273. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  274. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  275. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  276. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  277. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  278. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  279. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  280. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  282. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  283. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  284. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  285. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  286. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  287. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  288. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  289. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  290. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  291. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  292. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  293. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  294. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  295. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  296. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  297. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  298. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  299. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  300. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  301. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  302. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  303. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  304. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  305. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  306. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  307. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  308. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  309. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  310. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  311. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  312. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  313. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  314. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  315. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  316. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  317. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  318. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  319. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  320. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  321. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  322. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  323. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  324. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  325. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  326. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  327. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  328. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  329. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  330. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  331. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  332. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  333. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  334. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  335. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  336. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  337. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  338. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  339. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  340. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  341. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  342. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  343. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  344. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  345. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  346. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  347. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  348. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  349. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  350. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  351. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  352. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  353. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  354. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  355. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  356. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  357. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  358. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  359. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  360. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  361. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  362. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  363. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  364. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  365. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  366. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  367. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  368. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  369. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  370. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  371. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  372. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  373. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  374. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  375. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  376. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  377. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  378. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  379. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  380. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  381. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  382. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  383. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  384. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  385. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  386. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  387. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  388. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  390. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  391. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  392. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  393. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  394. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  395. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  396. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  397. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  398. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  399. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  400. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  401. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  402. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  403. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  404. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  405. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  406. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  407. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  408. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  409. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  410. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  411. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  412. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  413. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  414. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  415. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  416. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  417. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  418. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  419. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  420. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  421. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  422. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  423. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  424. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  425. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  426. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  427. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  428. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  429. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  430. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  431. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  432. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  433. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  434. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  435. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  436. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  437. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  438. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  439. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  440. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  441. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  442. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  443. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  444. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  445. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  446. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  447. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  448. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  449. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  450. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  451. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  452. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  453. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  454. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  455. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  456. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  457. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  458. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  459. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  460. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  461. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  462. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  463. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  464. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  465. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  466. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  467. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  468. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  469. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  470. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  471. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  472. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  473. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  474. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  475. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  476. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  477. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  478. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  479. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  480. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  481. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  482. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  483. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  484. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  485. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  486. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  487. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  488. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  489. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  490. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  491. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  492. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  493. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  494. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  495. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  496. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  497. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  498. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  499. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  500. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  501. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  502. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  503. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  504. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  505. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  506. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  507. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  508. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  509. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  510. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  511. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  512. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  513. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  514. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  515. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  516. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  517. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  518. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  519. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  520. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  521. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  522. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  523. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  524. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  525. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  526. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  527. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  528. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  529. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  530. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  531. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  532. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  533. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  534. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  535. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  536. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  537. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  538. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  539. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  540. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  541. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  542. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  543. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  544. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  545. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  546. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  547. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  548. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  549. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  550. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  551. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  552. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  553. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  554. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  555. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  556. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  557. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  558. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  559. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  560. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  561. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  562. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  563. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  564. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  565. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  566. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  567. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  568. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  569. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  570. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  571. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  572. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  573. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  574. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  575. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  576. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  577. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  578. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  579. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  580. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  581. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  582. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  583. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  584. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  585. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  586. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  587. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  588. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  589. package/wildo-framework.info.json +1 -1
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The run annotations a release step writes for GitHub Actions to collect (#3699). Shared by `wildo fwk publish all` and
3
+ * the publish steps it runs as subprocesses (`wildo fwk publish docker`, #3063), so a step reports through the same
4
+ * title the release's Slack report reads without loading another command module.
5
+ */
6
+ /** The title of the run annotation a release raises when a step it does not depend on did not complete. */
7
+ export const RELEASE_INCOMPLETE_ANNOTATION_TITLE = 'Release incomplete';
8
+ /**
9
+ * A GitHub Actions warning annotation for `message`, or null outside Actions (#3699).
10
+ *
11
+ * The provider modules are a step the release does not depend on, so their failure is a warning and the run stays
12
+ * green. A warning only LOGGED is invisible to everything that reports a run: release 1.1.13 published 3 of 48 modules
13
+ * and its Slack message read as a clean release, because `post-release-slack.mjs` lists the run's annotations and a log
14
+ * line is not one. Printed as a workflow command it becomes an annotation, and the report names it.
15
+ *
16
+ * The message is escaped as the runner requires (`%`, CR and LF), so a multi-line cause stays one annotation.
17
+ */
18
+ export function githubWarningAnnotation(title, message, env = process.env) {
19
+ if (env.GITHUB_ACTIONS !== 'true')
20
+ return null;
21
+ const escapeData = (value) => value.replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A');
22
+ const escapeProperty = (value) => escapeData(value).replace(/:/g, '%3A').replace(/,/g, '%2C');
23
+ return `::warning title=${escapeProperty(title)}::${escapeData(message)}`;
24
+ }
25
+ //# sourceMappingURL=github-actions-annotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-actions-annotation.js","sourceRoot":"","sources":["../../../../src/services/framework/github-actions-annotation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,mCAAmC,GAAG,oBAAoB,CAAC;AAExE;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAa,EAAE,OAAe,EAAE,MAAyB,OAAO,CAAC,GAAG;IAC1G,IAAI,GAAG,CAAC,cAAc,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACrH,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9G,OAAO,mBAAmB,cAAc,CAAC,KAAK,CAAC,KAAK,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AAC5E,CAAC","sourcesContent":["/**\n * The run annotations a release step writes for GitHub Actions to collect (#3699). Shared by `wildo fwk publish all` and\n * the publish steps it runs as subprocesses (`wildo fwk publish docker`, #3063), so a step reports through the same\n * title the release's Slack report reads without loading another command module.\n */\n\n/** The title of the run annotation a release raises when a step it does not depend on did not complete. */\nexport const RELEASE_INCOMPLETE_ANNOTATION_TITLE = 'Release incomplete';\n\n/**\n * A GitHub Actions warning annotation for `message`, or null outside Actions (#3699).\n *\n * The provider modules are a step the release does not depend on, so their failure is a warning and the run stays\n * green. A warning only LOGGED is invisible to everything that reports a run: release 1.1.13 published 3 of 48 modules\n * and its Slack message read as a clean release, because `post-release-slack.mjs` lists the run's annotations and a log\n * line is not one. Printed as a workflow command it becomes an annotation, and the report names it.\n *\n * The message is escaped as the runner requires (`%`, CR and LF), so a multi-line cause stays one annotation.\n */\nexport function githubWarningAnnotation(title: string, message: string, env: NodeJS.ProcessEnv = process.env): string | null {\n if (env.GITHUB_ACTIONS !== 'true') return null;\n const escapeData = (value: string): string => value.replace(/%/g, '%25').replace(/\\r/g, '%0D').replace(/\\n/g, '%0A');\n const escapeProperty = (value: string): string => escapeData(value).replace(/:/g, '%3A').replace(/,/g, '%2C');\n return `::warning title=${escapeProperty(title)}::${escapeData(message)}`;\n}\n"]}
@@ -0,0 +1,43 @@
1
+ import { type readRegistryHostTemplates } from '../../../services/framework/registry-host/registry-host.service';
2
+ /** The script on the host; also the deploy key's forced command. */
3
+ export declare const REGISTRY_HOST_UPGRADE_SCRIPT = "/opt/wildo-registry/upgrade-image.sh";
4
+ /** The comment that names the release's deploy key in `authorized_keys`, so authorizing again replaces it. */
5
+ export declare const REGISTRY_HOST_CI_KEY_COMMENT = "wildo-release-ci";
6
+ /** The deployed files whose digests `upgrade-image.sh --inspect` reports, in its order. */
7
+ export declare const REGISTRY_HOST_UPGRADE_COMPARED_FILES: readonly ["docker-compose.yml", "Caddyfile", "upgrade-image.sh"];
8
+ /** A tag the release publishes, and the only shape the host script accepts (`^[0-9]+\.[0-9]+\.[0-9]+$` there too). */
9
+ export declare function isRegistryHostReleaseTag(tag: string): boolean;
10
+ /** What `upgrade-image.sh --inspect` reports. A file the host does not have is `null`. */
11
+ export interface RegistryHostInspection {
12
+ readonly image: string;
13
+ readonly files: Readonly<Record<string, string | null>>;
14
+ readonly envKeys: readonly string[];
15
+ }
16
+ /** Parse `--inspect`'s lines; throws on an answer missing its image or key list, which no healthy host gives. */
17
+ export declare function parseRegistryHostInspection(stdout: string): RegistryHostInspection;
18
+ /**
19
+ * The `.env` variable NAMES this checkout's `deploy` writes. Computed from throwaway secrets, so it needs none of the real
20
+ * ones and runs in CI: the set is fixed by `buildRegistryHostEnv`, never by the values.
21
+ */
22
+ export declare function registryHostEnvKeyNames(): string[];
23
+ /**
24
+ * Why moving the image alone would leave the registry wrong: each file the host runs that differs from this checkout's,
25
+ * and each variable this checkout's `deploy` writes that the host's `.env` lacks. Empty means the upgrade is enough.
26
+ */
27
+ export declare function upgradeBlockers(input: {
28
+ inspection: RegistryHostInspection;
29
+ templates: ReturnType<typeof readRegistryHostTemplates>;
30
+ envKeyNames: readonly string[];
31
+ }): string[];
32
+ /**
33
+ * The `authorized_keys` line for the release's deploy key: the forced command (whatever the client asks, sshd runs the
34
+ * upgrade script and passes the request in SSH_ORIGINAL_COMMAND) and `restrict` (no forwarding, no PTY, no agent).
35
+ * Refuses anything but one public key, so a private key or a pasted options string can never reach the file.
36
+ */
37
+ export declare function buildRegistryHostCiAuthorizedKeyLine(publicKey: string): string;
38
+ /**
39
+ * The remote script that installs (or, with `revoke`, removes) the release's deploy key, reading the line from stdin:
40
+ * every existing line carrying the CI comment goes first, so authorizing again replaces the key rather than adding one.
41
+ */
42
+ export declare function buildAuthorizeCiRemoteScript(revoke: boolean): string;
43
+ //# sourceMappingURL=registry-host-upgrade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-host-upgrade.d.ts","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host-upgrade.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAiD,KAAK,yBAAyB,EAAE,MAAM,mEAAmE,CAAC;AAElK,oEAAoE;AACpE,eAAO,MAAM,4BAA4B,yCAAgD,CAAC;AAE1F,8GAA8G;AAC9G,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAE/D,2FAA2F;AAC3F,eAAO,MAAM,oCAAoC,kEAAmE,CAAC;AAErH,sHAAsH;AACtH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,0FAA0F;AAC1F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,iHAAiH;AACjH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAclF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAGlD;AAOD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,UAAU,EAAE,sBAAsB,CAAC;IACnC,SAAS,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IACxD,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC,GAAG,MAAM,EAAE,CAWX;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAI9E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAYpE"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Moving the public module registry to the platform image a release just published, from the release itself (#3795).
3
+ *
4
+ * The registry server validates every module manifest it receives with its OWN schema. A release that publishes
5
+ * modules written against a newer engine therefore needs the server on that engine first: release 1.1.13 published
6
+ * `providers/openai-moderation`, whose `OUTPUT_MODERATION` capability the 1.1.11 server did not know, and was answered
7
+ * `400 VALIDATION`. A dry run cannot see that; it never asks the server to validate.
8
+ *
9
+ * ## Why an image-only upgrade, and not `deploy`
10
+ *
11
+ * `wildo fwk registry-host deploy` rewrites the host's `.env` from the framework secrets file: every database, broker and
12
+ * signing secret, the administrator and the backup keys. Running it from CI would mean copying that whole set into
13
+ * GitHub. Moving the image needs none of it: the host already holds its `.env`, and only `PLATFORM_IMAGE` changes. So
14
+ * the host carries `upgrade-image.sh` (written by `deploy`), and the release reaches it with a key that can run that
15
+ * script and nothing else (an `authorized_keys` forced command, `authorize-ci`).
16
+ *
17
+ * ## What it refuses to do
18
+ *
19
+ * A release whose registry needs more than an image (a changed compose file or Caddyfile, a new `.env` variable, such as
20
+ * the key vault's recovery token 1.1.13 introduced) is not upgraded: it is reported, naming the full `deploy` an
21
+ * operator runs by hand. `upgradeBlockers` decides that by comparing the host's `--inspect` answer (file digests and the
22
+ * `.env` KEY NAMES, never a value) with what this checkout would deploy.
23
+ */
24
+ import { createHash } from 'node:crypto';
25
+ import { PlatformEnvSecretsJson_Schema } from '../../../services/credentials/credentials.schemas.js';
26
+ import { provisionFrameworkManagedSecrets } from '../../../services/credentials/framework-managed-secrets.js';
27
+ import { buildRegistryHostEnv, REGISTRY_HOST_DIRECTORY } from '../../../services/framework/registry-host/registry-host.service.js';
28
+ /** The script on the host; also the deploy key's forced command. */
29
+ export const REGISTRY_HOST_UPGRADE_SCRIPT = `${REGISTRY_HOST_DIRECTORY}/upgrade-image.sh`;
30
+ /** The comment that names the release's deploy key in `authorized_keys`, so authorizing again replaces it. */
31
+ export const REGISTRY_HOST_CI_KEY_COMMENT = 'wildo-release-ci';
32
+ /** The deployed files whose digests `upgrade-image.sh --inspect` reports, in its order. */
33
+ export const REGISTRY_HOST_UPGRADE_COMPARED_FILES = ['docker-compose.yml', 'Caddyfile', 'upgrade-image.sh'];
34
+ /** A tag the release publishes, and the only shape the host script accepts (`^[0-9]+\.[0-9]+\.[0-9]+$` there too). */
35
+ export function isRegistryHostReleaseTag(tag) {
36
+ return /^\d+\.\d+\.\d+$/.test(tag);
37
+ }
38
+ /** Parse `--inspect`'s lines; throws on an answer missing its image or key list, which no healthy host gives. */
39
+ export function parseRegistryHostInspection(stdout) {
40
+ let image = null;
41
+ let envKeys = null;
42
+ const files = {};
43
+ for (const line of stdout.split('\n').map((entry) => entry.trim()).filter(Boolean)) {
44
+ if (line.startsWith('image '))
45
+ image = line.slice('image '.length).trim();
46
+ else if (line.startsWith('env-keys'))
47
+ envKeys = line.slice('env-keys'.length).trim().split(/\s+/).filter(Boolean);
48
+ else if (line.startsWith('file ')) {
49
+ const [, name, digest] = line.split(/\s+/);
50
+ if (name)
51
+ files[name] = digest && digest !== 'absent' ? digest : null;
52
+ }
53
+ }
54
+ if (image === null || envKeys === null)
55
+ throw new Error(`The registry host answered --inspect without an image or a key list:\n${stdout.trim()}`);
56
+ return { image, files, envKeys };
57
+ }
58
+ /**
59
+ * The `.env` variable NAMES this checkout's `deploy` writes. Computed from throwaway secrets, so it needs none of the real
60
+ * ones and runs in CI: the set is fixed by `buildRegistryHostEnv`, never by the values.
61
+ */
62
+ export function registryHostEnvKeyNames() {
63
+ const { secrets } = provisionFrameworkManagedSecrets({ admin: { email: 'key-names@wildo.invalid', firstName: 'Key', lastName: 'Names' } });
64
+ return Object.keys(buildRegistryHostEnv({ platformImage: 'unused', secrets: PlatformEnvSecretsJson_Schema.parse(secrets) }));
65
+ }
66
+ /** The sha256 of a template, as the host's `sha256sum` prints it. */
67
+ function digest(content) {
68
+ return createHash('sha256').update(content).digest('hex');
69
+ }
70
+ /**
71
+ * Why moving the image alone would leave the registry wrong: each file the host runs that differs from this checkout's,
72
+ * and each variable this checkout's `deploy` writes that the host's `.env` lacks. Empty means the upgrade is enough.
73
+ */
74
+ export function upgradeBlockers(input) {
75
+ const blockers = [];
76
+ for (const file of REGISTRY_HOST_UPGRADE_COMPARED_FILES) {
77
+ const onHost = input.inspection.files[file] ?? null;
78
+ if (onHost === null)
79
+ blockers.push(`the host has no ${file}`);
80
+ else if (onHost !== digest(input.templates[file]))
81
+ blockers.push(`${file} on the host differs from this checkout's`);
82
+ }
83
+ const present = new Set(input.inspection.envKeys);
84
+ const missing = input.envKeyNames.filter((name) => !present.has(name));
85
+ if (missing.length > 0)
86
+ blockers.push(`the host's .env lacks ${missing.join(', ')}`);
87
+ return blockers;
88
+ }
89
+ /**
90
+ * The `authorized_keys` line for the release's deploy key: the forced command (whatever the client asks, sshd runs the
91
+ * upgrade script and passes the request in SSH_ORIGINAL_COMMAND) and `restrict` (no forwarding, no PTY, no agent).
92
+ * Refuses anything but one public key, so a private key or a pasted options string can never reach the file.
93
+ */
94
+ export function buildRegistryHostCiAuthorizedKeyLine(publicKey) {
95
+ const match = /^(ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521|ssh-rsa) ([A-Za-z0-9+/]+={0,3})(?: .*)?$/.exec(publicKey.trim());
96
+ if (!match || publicKey.trim().includes('\n'))
97
+ throw new Error('Expected one SSH public key (`ssh-ed25519 AAAA… comment`), as `ssh-keygen` writes it to the .pub file.');
98
+ return `command="${REGISTRY_HOST_UPGRADE_SCRIPT}",restrict ${match[1]} ${match[2]} ${REGISTRY_HOST_CI_KEY_COMMENT}`;
99
+ }
100
+ /**
101
+ * The remote script that installs (or, with `revoke`, removes) the release's deploy key, reading the line from stdin:
102
+ * every existing line carrying the CI comment goes first, so authorizing again replaces the key rather than adding one.
103
+ */
104
+ export function buildAuthorizeCiRemoteScript(revoke) {
105
+ return [
106
+ 'set -eu',
107
+ 'umask 077',
108
+ 'mkdir -p ~/.ssh',
109
+ 'touch ~/.ssh/authorized_keys',
110
+ `grep -v ' ${REGISTRY_HOST_CI_KEY_COMMENT}$' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.next || true`,
111
+ ...(revoke ? [] : ['cat >> ~/.ssh/authorized_keys.next']),
112
+ 'cat ~/.ssh/authorized_keys.next > ~/.ssh/authorized_keys',
113
+ 'rm -f ~/.ssh/authorized_keys.next',
114
+ `grep -c ' ${REGISTRY_HOST_CI_KEY_COMMENT}$' ~/.ssh/authorized_keys || true`,
115
+ ].join('\n');
116
+ }
117
+ //# sourceMappingURL=registry-host-upgrade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-host-upgrade.js","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAgC,MAAM,2DAA2D,CAAC;AAC3I,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAkC,MAAM,mEAAmE,CAAC;AAElK,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,uBAAuB,mBAAmB,CAAC;AAE1F,8GAA8G;AAC9G,MAAM,CAAC,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;AAE/D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,CAAU,CAAC;AAErH,sHAAsH;AACtH,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AASD,iHAAiH;AACjH,MAAM,UAAU,2BAA2B,CAAC,MAAc;IACxD,IAAI,KA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AC,yBAAyB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAAC,SAAiB;IACpE,MAAM,KAAK,GAAG,oHAAoH,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1J,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;IACzK,OAAO,YAAY,4BAA4B,cAAc,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,4BAA4B,EAAE,CAAC;AACtH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAAe;IAC1D,OAAO;QACL,SAAS;QACT,WAAW;QACX,iBAAiB;QACjB,8BAA8B;QAC9B,aAAa,4BAA4B,iEAAiE;QAC1G,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC;QACzD,0DAA0D;QAC1D,mCAAmC;QACnC,aAAa,4BAA4B,mCAAmC;KAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["/**\n * Moving the public module registry to the platform image a release just published, from the release itself (#3795).\n *\n * The registry server validates every module manifest it receives with its OWN schema. A release that publishes\n * modules written against a newer engine therefore needs the server on that engine first: release 1.1.13 published\n * `providers/openai-moderation`, whose `OUTPUT_MODERATION` capability the 1.1.11 server did not know, and was answered\n * `400 VALIDATION`. A dry run cannot see that; it never asks the server to validate.\n *\n * ## Why an image-only upgrade, and not `deploy`\n *\n * `wildo fwk registry-host deploy` rewrites the host's `.env` from the framework secrets file: every database, broker and\n * signing secret, the administrator and the backup keys. Running it from CI would mean copying that whole set into\n * GitHub. Moving the image needs none of it: the host already holds its `.env`, and only `PLATFORM_IMAGE` changes. So\n * the host carries `upgrade-image.sh` (written by `deploy`), and the release reaches it with a key that can run that\n * script and nothing else (an `authorized_keys` forced command, `authorize-ci`).\n *\n * ## What it refuses to do\n *\n * A release whose registry needs more than an image (a changed compose file or Caddyfile, a new `.env` variable, such as\n * the key vault's recovery token 1.1.13 introduced) is not upgraded: it is reported, naming the full `deploy` an\n * operator runs by hand. `upgradeBlockers` decides that by comparing the host's `--inspect` answer (file digests and the\n * `.env` KEY NAMES, never a value) with what this checkout would deploy.\n */\nimport { createHash } from 'node:crypto';\nimport { PlatformEnvSecretsJson_Schema } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { provisionFrameworkManagedSecrets, type PlatformEnvSecretsDraft } from '~wildo-cli/services/credentials/framework-managed-secrets';\nimport { buildRegistryHostEnv, REGISTRY_HOST_DIRECTORY, type readRegistryHostTemplates } from '~wildo-cli/services/framework/registry-host/registry-host.service';\n\n/** The script on the host; also the deploy key's forced command. */\nexport const REGISTRY_HOST_UPGRADE_SCRIPT = `${REGISTRY_HOST_DIRECTORY}/upgrade-image.sh`;\n\n/** The comment that names the release's deploy key in `authorized_keys`, so authorizing again replaces it. */\nexport const REGISTRY_HOST_CI_KEY_COMMENT = 'wildo-release-ci';\n\n/** The deployed files whose digests `upgrade-image.sh --inspect` reports, in its order. */\nexport const REGISTRY_HOST_UPGRADE_COMPARED_FILES = ['docker-compose.yml', 'Caddyfile', 'upgrade-image.sh'] as const;\n\n/** A tag the release publishes, and the only shape the host script accepts (`^[0-9]+\\.[0-9]+\\.[0-9]+$` there too). */\nexport function isRegistryHostReleaseTag(tag: string): boolean {\n return /^\\d+\\.\\d+\\.\\d+$/.test(tag);\n}\n\n/** What `upgrade-image.sh --inspect` reports. A file the host does not have is `null`. */\nexport interface RegistryHostInspection {\n readonly image: string;\n readonly files: Readonly<Record<string, string | null>>;\n readonly envKeys: readonly string[];\n}\n\n/** Parse `--inspect`'s lines; throws on an answer missing its image or key list, which no healthy host gives. */\nexport function parseRegistryHostInspection(stdout: string): RegistryHostInspection {\n let image: string | null = null;\n let envKeys: string[] | null = null;\n const files: Record<string, string | null> = {};\n for (const line of stdout.split('\\n').map((entry) => entry.trim()).filter(Boolean)) {\n if (line.startsWith('image ')) image = line.slice('image '.length).trim();\n else if (line.startsWith('env-keys')) envKeys = line.slice('env-keys'.length).trim().split(/\\s+/).filter(Boolean);\n else if (line.startsWith('file ')) {\n const [, name, digest] = line.split(/\\s+/);\n if (name) files[name] = digest && digest !== 'absent' ? digest : null;\n }\n }\n if (image === null || envKeys === null) throw new Error(`The registry host answered --inspect without an image or a key list:\\n${stdout.trim()}`);\n return { image, files, envKeys };\n}\n\n/**\n * The `.env` variable NAMES this checkout's `deploy` writes. Computed from throwaway secrets, so it needs none of the real\n * ones and runs in CI: the set is fixed by `buildRegistryHostEnv`, never by the values.\n */\nexport function registryHostEnvKeyNames(): string[] {\n const { secrets } = provisionFrameworkManagedSecrets({ admin: { email: 'key-names@wildo.invalid', firstName: 'Key', lastName: 'Names' } } as PlatformEnvSecretsDraft);\n return Object.keys(buildRegistryHostEnv({ platformImage: 'unused', secrets: PlatformEnvSecretsJson_Schema.parse(secrets) }));\n}\n\n/** The sha256 of a template, as the host's `sha256sum` prints it. */\nfunction digest(content: string): string {\n return createHash('sha256').update(content).digest('hex');\n}\n\n/**\n * Why moving the image alone would leave the registry wrong: each file the host runs that differs from this checkout's,\n * and each variable this checkout's `deploy` writes that the host's `.env` lacks. Empty means the upgrade is enough.\n */\nexport function upgradeBlockers(input: {\n inspection: RegistryHostInspection;\n templates: ReturnType<typeof readRegistryHostTemplates>;\n envKeyNames: readonly string[];\n}): string[] {\n const blockers: string[] = [];\n for (const file of REGISTRY_HOST_UPGRADE_COMPARED_FILES) {\n const onHost = input.inspection.files[file] ?? null;\n if (onHost === null) blockers.push(`the host has no ${file}`);\n else if (onHost !== digest(input.templates[file])) blockers.push(`${file} on the host differs from this checkout's`);\n }\n const present = new Set(input.inspection.envKeys);\n const missing = input.envKeyNames.filter((name) => !present.has(name));\n if (missing.length > 0) blockers.push(`the host's .env lacks ${missing.join(', ')}`);\n return blockers;\n}\n\n/**\n * The `authorized_keys` line for the release's deploy key: the forced command (whatever the client asks, sshd runs the\n * upgrade script and passes the request in SSH_ORIGINAL_COMMAND) and `restrict` (no forwarding, no PTY, no agent).\n * Refuses anything but one public key, so a private key or a pasted options string can never reach the file.\n */\nexport function buildRegistryHostCiAuthorizedKeyLine(publicKey: string): string {\n const match = /^(ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521|ssh-rsa) ([A-Za-z0-9+/]+={0,3})(?: .*)?$/.exec(publicKey.trim());\n if (!match || publicKey.trim().includes('\\n')) throw new Error('Expected one SSH public key (`ssh-ed25519 AAAA… comment`), as `ssh-keygen` writes it to the .pub file.');\n return `command=\"${REGISTRY_HOST_UPGRADE_SCRIPT}\",restrict ${match[1]} ${match[2]} ${REGISTRY_HOST_CI_KEY_COMMENT}`;\n}\n\n/**\n * The remote script that installs (or, with `revoke`, removes) the release's deploy key, reading the line from stdin:\n * every existing line carrying the CI comment goes first, so authorizing again replaces the key rather than adding one.\n */\nexport function buildAuthorizeCiRemoteScript(revoke: boolean): string {\n return [\n 'set -eu',\n 'umask 077',\n 'mkdir -p ~/.ssh',\n 'touch ~/.ssh/authorized_keys',\n `grep -v ' ${REGISTRY_HOST_CI_KEY_COMMENT}$' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.next || true`,\n ...(revoke ? [] : ['cat >> ~/.ssh/authorized_keys.next']),\n 'cat ~/.ssh/authorized_keys.next > ~/.ssh/authorized_keys',\n 'rm -f ~/.ssh/authorized_keys.next',\n `grep -c ' ${REGISTRY_HOST_CI_KEY_COMMENT}$' ~/.ssh/authorized_keys || true`,\n ].join('\\n');\n}\n"]}
@@ -14,7 +14,7 @@ export declare const REGISTRY_HOST_ENVIRONMENT_ID = "registry";
14
14
  /** Where the compose project lives on the host. */
15
15
  export declare const REGISTRY_HOST_DIRECTORY = "/opt/wildo-registry";
16
16
  /** The template files deployed as-is, relative to the framework's `templates/infra/registry-host/`. */
17
- export declare const REGISTRY_HOST_TEMPLATE_FILES: readonly ["docker-compose.yml", "Caddyfile", "backup.sh", "restore-check.sh", "wildo-registry-backup.service", "wildo-registry-backup.timer"];
17
+ export declare const REGISTRY_HOST_TEMPLATE_FILES: readonly ["docker-compose.yml", "Caddyfile", "backup.sh", "restore-check.sh", "upgrade-image.sh", "wildo-registry-backup.service", "wildo-registry-backup.timer"];
18
18
  /** The systemd units of the nightly backup, installed into /etc/systemd/system. */
19
19
  export declare const REGISTRY_BACKUP_SYSTEMD_UNITS: readonly ["wildo-registry-backup.service", "wildo-registry-backup.timer"];
20
20
  /** restic, pinned: the backup's format and the restore's. A bump is a deliberate change, recorded here. */
@@ -1 +1 @@
1
- {"version":3,"file":"registry-host.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host.service.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAEL,KAAK,gCAAgC,EAMrC,KAAK,gCAAgC,EAErC,KAAK,sBAAsB,EAe5B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAiC,KAAK,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAYjI;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAUjH;AAED,oHAAoH;AACpH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,gCAAgC,GAAG,IAAI,CAEzG;AAED,qHAAqH;AACrH,eAAO,MAAM,4BAA4B,aAAa,CAAC;AACvD,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,wBAAwB,C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;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAO5E;AAED,qEAAqE;AACrE,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAM9H;AAKD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAa1E;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAWvF;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAI9E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,gCAAgC,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,sBAAsB,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAkB5J"}
1
+ {"version":3,"file":"registry-host.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host.service.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAEL,KAAK,gCAAgC,EAMrC,KAAK,gCAAgC,EAErC,KAAK,sBAAsB,EAe5B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAiC,KAAK,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAYjI;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAUjH;AAED,oHAAoH;AACpH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM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BAAsB,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgGxF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAO5E;AAED,qEAAqE;AACrE,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAM9H;AAKD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAa1E;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAWvF;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAI9E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,gCAAgC,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,sBAAsB,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAkB5J"}
@@ -63,6 +63,8 @@ export const REGISTRY_HOST_TEMPLATE_FILES = [
63
63
  'Caddyfile',
64
64
  'backup.sh',
65
65
  'restore-check.sh',
66
+ // The image-only upgrade a release runs, and the forced command of its deploy key (#3795, registry-host-upgrade.ts).
67
+ 'upgrade-image.sh',
66
68
  'wildo-registry-backup.service',
67
69
  'wildo-registry-backup.timer',
68
70
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"registry-host.service.js","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB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AAE;KAClC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,2GAA2G,CAAC,CAAC;IAC5H,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,qFAAqF,CAAC,CAAC;QAC5I,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC","sourcesContent":["/**\n * The public module registry's host (#2135): what `wildo fwk registry-host` writes there, and the secrets behind it.\n *\n * The host runs `templates/infra/registry-host/docker-compose.yml`: the registry, the apps-manager it needs (storage\n * credentials and API keys come from it), PostgreSQL, Valkey, RabbitMQ, MinIO and a Caddy TLS edge. This module renders\n * the `.env` that file reads and keeps the secrets in it stable across deploys.\n *\n * ## Secrets\n *\n * Generated once, by the same registry of framework-managed materials every platform uses\n * (`provisionFrameworkManagedSecrets`), and kept in the gitignored framework secrets file under `registryHost`. A\n * redeploy reuses them: PostgreSQL, RabbitMQ and the signing keys hold state that a new password would lock out.\n * Only what is missing is ever generated. The host's `.env` (0600) is the other copy.\n *\n * The administrator apps-manager seeds at INIT is an operator identity, never generated: it is taken from flags,\n * else from the stored secrets, else from this machine's git identity, the person running the deploy.\n */\nimport { execFileSync } from 'node:child_process';\nimport { z } from 'zod';\nimport { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { parse as parseYaml } from 'yaml';\nimport {\n APPS_MANAGER_ADMIN_SECRET_HEADER,\n type WildoFrameworkRegistryHostBackup,\n APPS_MANAGER_API_PREFIX,\n DEFAULT_PUBLIC_REGISTRY_URL,\n FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY,\n REGISTRY_KEYS_ADMIN_PATH,\n WildoFrameworkModuleRegistryHostSchema,\n type WildoFrameworkModuleRegistryHost,\n RegistryKeyMintRequestSchema,\n type RegistryKeyMintRequest,\n PLATFORM_DEFAULT_PORTS,\n PLATFORM_POSTGRES_DATABASE,\n PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n PlatformAdminEnvKeys,\n PlatformInfrastructureEnvKeys,\n PlatformIngressEnvKeys,\n PlatformProcessEnvKeys,\n PlatformSecurityEnvKeys,\n PlatformServiceUrlEnvKeys,\n PlatformWildoServices,\n ApplicationBackendBootstrapEnvKeys,\n buildRuntimeResponseVerificationKeySet,\n STORAGE_DEFAULTS,\n resolveFrameworkLayout,\n} from '@wildo-ai/platform-config-lib';\nimport { ApplicationBackendDataEnvKeys } from '@wildo-ai/platform-core-shared';\nimport { PersistenceAdapter } from '@wildo-ai/saas-models';\nimport { PLATFORM_INIT_MEMORY, PLATFORM_SERVICE_CATALOG } from '~wildo-cli/services/catalog/service-catalog.schemas';\nimport { PlatformEnvSecretsJson_Schema, type PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { provisionFrameworkManagedSecrets, type PlatformEnvSecretsDraft } from '~wildo-cli/services/credentials/framework-managed-secrets';\nimport {\n MINIO_CREDENTIAL_ENV_KEYS,\n POSTGRESQL_CREDENTIAL_ENV_KEYS,\n RABBITMQ_CREDENTIAL_ENV_KEYS,\n VALKEY_CREDENTIAL_ENV_KEYS,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport { encodeComposeEnvValue } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { FrameworkReleaseService } from '~wildo-cli/services/framework/framework-release.service';\nimport { DEV_COMPILE_STATUS_RELATIVE } from '~wildo-cli/services/framework/dev-compile-status.paths';\n\n/**\n * One section of the gitignored framework secrets file, read raw and validated ALONE. Not through the whole-file\n * schema: a malformed section must name itself, not break every command that parses the file (the `providers.slack`\n * lesson in framework-secrets.schemas.ts). `null` when the section is absent.\n */\nexport function loadFrameworkSecretsSection<T>(frameworkRoot: string, key: string, schema: z.ZodType<T>): T | null {\n const secretsPath = FrameworkReleaseService.resolveFrameworkSecretsPath(frameworkRoot);\n if (!existsSync(secretsPath)) return null;\n const section = (JSON.parse(readFileSync(secretsPath, 'utf8')) as Record<string, unknown>)[key];\n if (section === undefined) return null;\n const parsed = schema.safeParse(section);\n if (!parsed.success) {\n throw new Error(`${key} in ${secretsPath} is malformed: ${parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`).join('; ')}`);\n }\n return parsed.data;\n}\n\n/** How to reach the registry host: `moduleRegistryHost`, never tracked config (the address is the CDN's origin). */\nexport function loadRegistryHostConnection(frameworkRoot: string): WildoFrameworkModuleRegistryHost | null {\n return loadFrameworkSecretsSection(frameworkRoot, FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY, WildoFrameworkModuleRegistryHostSchema);\n}\n\n/** The platform environment id the host's services run under. Not `local`, which would claim a developer machine. */\nexport const REGISTRY_HOST_ENVIRONMENT_ID = 'registry';\n/** Where the compose project lives on the host. */\nexport const REGISTRY_HOST_DIRECTORY = '/opt/wildo-registry';\n/** The key under which the framework secrets file holds this host's secrets. */\nconst FRAMEWORK_SECRETS_SECTION = 'registryHost';\n/** The template files deployed as-is, relative to the framework's `templates/infra/registry-host/`. */\nexport const REGISTRY_HOST_TEMPLATE_FILES = [\n 'docker-compose.yml',\n 'Caddyfile',\n 'backup.sh',\n 'restore-check.sh',\n 'wildo-registry-backup.service',\n 'wildo-registry-backup.timer',\n] as const;\n/** The systemd units of the nightly backup, installed into /etc/systemd/system. */\nexport const REGISTRY_BACKUP_SYSTEMD_UNITS = ['wildo-registry-backup.service', 'wildo-registry-backup.timer'] as const;\n/** restic, pinned: the backup's format and the restore's. A bump is a deliberate change, recorded here. */\nexport const REGISTRY_BACKUP_RESTIC_IMAGE = 'restic/restic:0.18.1';\n\n/** The public name the registry is served under: the address every CLI resolves `--registry public` to. */\nexport function registryHostDomain(): string {\n return new URL(DEFAULT_PUBLIC_REGISTRY_URL).hostname;\n}\n\n/**\n * The platform's public domain: the registry's name without its first label (`registry.wildo.ai` → `wildo.ai`).\n * apps-manager documents `WILDO_PUBLIC_DOMAIN` as runtime-agnostic, `wildo.ai` for production, and requires it outside\n * `local`; on this host it builds no URL, because the host serves no application.\n */\nexport function registryHostPublicDomain(): string {\n return registryHostDomain().split('.').slice(1).join('.');\n}\n\nexport interface RegistryHostAdminIdentity {\n readonly email: string;\n readonly firstName: string;\n readonly lastName: string;\n}\n\nexport interface RegistryHostSecretsResult {\n readonly secrets: PlatformEnvSecretsJson;\n /** Flattened keys generated by this call; empty when everything was already stored. */\n readonly generatedKeys: readonly string[];\n}\n\n/** The git identity of this machine, as the administrator identity when none is stored or given. */\nexport function gitAdminIdentity(frameworkRoot: string): Partial<RegistryHostAdminIdentity> {\n const read = (key: string): string | undefined => {\n try {\n return execFileSync('git', ['config', key], { cwd: frameworkRoot, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim() || undefined;\n } catch {\n return undefined;\n }\n };\n const [firstName, ...rest] = (read('user.name') ?? '').split(/\\s+/).filter((part) => part.length > 0);\n return { email: read('user.email'), firstName, lastName: rest.length > 0 ? rest.join(' ') : undefined };\n}\n\n/**\n * The host's secrets: the stored ones, completed with whatever is missing. `persist: false` (a dry run) generates in\n * memory and writes nothing, so a later real run generates its own.\n */\nexport function resolveRegistryHostSecrets(input: {\n frameworkRoot: string;\n /** Given by the operator: wins over what is stored. */\n admin: Partial<RegistryHostAdminIdentity>;\n /** Used only for a field neither given nor stored (the machine's git identity). */\n fallbackAdmin?: Partial<RegistryHostAdminIdentity>;\n persist: boolean;\n}): RegistryHostSecretsResult {\n const secretsPath = FrameworkReleaseService.resolveFrameworkSecretsPath(input.frameworkRoot);\n // RAW JSON, as `saveFrameworkNpmPublishToken` reads it: every other section must survive the write-back.\n const file: Record<string, unknown> = existsSync(secretsPath) ? (JSON.parse(readFileSync(secretsPath, 'utf8')) as Record<string, unknown>) : {};\n const stored = (file[FRAMEWORK_SECRETS_SECTION] ?? {}) as PlatformEnvSecretsDraft;\n const draft = JSON.parse(JSON.stringify(stored)) as PlatformEnvSecretsDraft;\n\n const admin = { ...draft.admin } as Record<string, string | undefined>;\n for (const field of ['email', 'firstName', 'lastName'] as const) {\n const given = input.admin[field]?.trim();\n if (given) admin[field] = given;\n else if (!admin[field]?.trim() && input.fallbackAdmin?.[field]?.trim()) admin[field] = input.fallbackAdmin[field]!.trim();\n }\n const missing = (['email', 'firstName', 'lastName'] as const).filter((field) => !admin[field]);\n if (missing.length > 0) {\n throw new Error(\n `The registry host's administrator has no ${missing.join(', ')}. Pass --adminEmail, --adminFirstName and --adminLastName `\n + '(they are stored after the first deploy), or set this checkout\\'s git user.name and user.email.',\n );\n }\n draft.admin = admin as PlatformEnvSecretsDraft['admin'];\n\n const { secrets, mintedKeys } = provisionFrameworkManagedSecrets(draft);\n const identityChanged = JSON.stringify(stored.admin ?? {}) !== JSON.stringify(admin);\n const parsed = PlatformEnvSecretsJson_Schema.parse(secrets);\n if (input.persist && (mintedKeys.length > 0 || identityChanged)) {\n mkdirSync(dirname(secretsPath), { recursive: true });\n writeFileSync(secretsPath, `${JSON.stringify({ ...file, [FRAMEWORK_SECRETS_SECTION]: secrets }, null, 2)}\\n`, { mode: 0o600 });\n // `mode` applies only when the write CREATES the file; a secrets file that already existed keeps its own.\n chmodSync(secretsPath, 0o600);\n }\n return { secrets: parsed, generatedKeys: mintedKeys };\n}\n\n/** The image every platform service on the host runs, and the domain and contact the TLS edge uses. */\nexport interface RegistryHostEnvInput {\n readonly platformImage: string;\n readonly secrets: PlatformEnvSecretsJson;\n}\n\n/**\n * Every variable `templates/infra/registry-host/docker-compose.yml` reads. Container-internal addresses are the compose\n * service names on the one internal network.\n */\nexport function buildRegistryHostEnv(input: RegistryHostEnvInput): Record<string, string> {\n const { secrets } = input;\n const responseSigning = secrets.platform.appsManagerResponseSigning;\n const keyEncryptionRoot = secrets.platform.keyEncryptionRoot;\n if (!secrets.postgresql || !secrets.valkey || !secrets.platform.crontabsBatchesManager || !responseSigning || !keyEncryptionRoot?.current) {\n throw new Error(\n 'The registry host secrets are incomplete (postgresql, valkey, the crontabs keypair, the apps-manager response keys or the key-encryption root); this is a provisioning bug.',\n );\n }\n const appsManager = PLATFORM_SERVICE_CATALOG[PlatformWildoServices.APPS_MANAGER].memory;\n const registry = PLATFORM_SERVICE_CATALOG[PlatformWildoServices.MODULE_REGISTRY].memory;\n const pgUser = encodeURIComponent(secrets.postgresql.adminUser);\n const pgPassword = encodeURIComponent(secrets.postgresql.adminPassword);\n const sslMode = 'disable'; // the internal network only; nothing leaves the machine\n return {\n PLATFORM_IMAGE: input.platformImage,\n REGISTRY_DOMAIN: registryHostDomain(),\n // Let's Encrypt's expiry notices go to the person who deploys: the administrator.\n TLS_EMAIL: secrets.admin.email,\n\n INIT_MEM_LIMIT_MB: String(PLATFORM_INIT_MEMORY.containerLimitMb),\n INIT_HEAP_CEILING_MB: String(PLATFORM_INIT_MEMORY.heapCeilingMb),\n APPS_MANAGER_MEM_LIMIT_MB: String(appsManager.containerLimitMb),\n APPS_MANAGER_HEAP_CEILING_MB: String(appsManager.heapCeilingMb),\n MODULE_REGISTRY_MEM_LIMIT_MB: String(registry.containerLimitMb),\n MODULE_REGISTRY_HEAP_CEILING_MB: String(registry.heapCeilingMb),\n\n [PlatformProcessEnvKeys.PLATFORM_ENVIRONMENT_ID]: REGISTRY_HOST_ENVIRONMENT_ID,\n [PlatformProcessEnvKeys.APPLICATION_ENV]: 'production',\n [PlatformIngressEnvKeys.WILDO_PUBLIC_DOMAIN]: registryHostPublicDomain(),\n\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_USER]: secrets.postgresql.adminUser,\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_PASSWORD]: secrets.postgresql.adminPassword,\n // The container's initdb database. apps-manager creates the platform's own database itself at INIT.\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_DATABASE]: PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n [PlatformInfrastructureEnvKeys.PG_HOST]: 'postgresql',\n [PlatformInfrastructureEnvKeys.PG_PORT]: '5432',\n [PlatformInfrastructureEnvKeys.PG_ADMIN_USER]: secrets.postgresql.adminUser,\n [PlatformInfrastructureEnvKeys.PG_ADMIN_PASSWORD]: secrets.postgresql.adminPassword,\n [PlatformInfrastructureEnvKeys.PG_ADMIN_DATABASE]: PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n [PlatformInfrastructureEnvKeys.PG_SSL_MODE]: sslMode,\n [PlatformInfrastructureEnvKeys.PG_CONNECT_URL]: `postgresql://${pgUser}:${pgPassword}@postgresql:5432/${encodeURIComponent(PLATFORM_POSTGRES_DATABASE)}?sslmode=${sslMode}`,\n [ApplicationBackendDataEnvKeys.DATABASE_DEFAULT_ADAPTER]: PersistenceAdapter.POSTGRESQL,\n\n [VALKEY_CREDENTIAL_ENV_KEYS.PASSWORD]: secrets.valkey.adminPassword,\n [PlatformInfrastructureEnvKeys.REDIS_HOST]: 'valkey',\n [PlatformInfrastructureEnvKeys.REDIS_PORT]: '6379',\n [PlatformInfrastructureEnvKeys.REDIS_ADMIN_USER]: secrets.valkey.adminUser,\n [PlatformInfrastructureEnvKeys.REDIS_ADMIN_PASSWORD]: secrets.valkey.adminPassword,\n\n [RABBITMQ_CREDENTIAL_ENV_KEYS.DEFAULT_USER]: secrets.rabbitmq.adminUsername,\n [RABBITMQ_CREDENTIAL_ENV_KEYS.DEFAULT_PASS]: secrets.rabbitmq.adminPassword,\n [RABBITMQ_CREDENTIAL_ENV_KEYS.ERLANG_COOKIE]: secrets.rabbitmq.erlangCookie,\n [PlatformInfrastructureEnvKeys.RABBITMQ_HOST]: 'rabbitmq',\n [PlatformInfrastructureEnvKeys.RABBITMQ_PORT]: '5672',\n [PlatformInfrastructureEnvKeys.RABBITMQ_MANAGEMENT_PORT]: '15672',\n [PlatformInfrastructureEnvKeys.RABBITMQ_ADMIN_USERNAME]: secrets.rabbitmq.adminUsername,\n [PlatformInfrastructureEnvKeys.RABBITMQ_ADMIN_PASSWORD]: secrets.rabbitmq.adminPassword,\n\n [MINIO_CREDENTIAL_ENV_KEYS.ROOT_USER]: secrets.storage.accessKey,\n [MINIO_CREDENTIAL_ENV_KEYS.ROOT_PASSWORD]: secrets.storage.secretKey,\n [PlatformInfrastructureEnvKeys.STORAGE_PROVIDER]: STORAGE_DEFAULTS.PROVIDER,\n [PlatformInfrastructureEnvKeys.STORAGE_ENDPOINT]: 'minio',\n [PlatformInfrastructureEnvKeys.STORAGE_PORT]: '9000',\n [PlatformInfrastructureEnvKeys.STORAGE_USE_SSL]: 'false',\n [PlatformInfrastructureEnvKeys.STORAGE_BUCKET]: STORAGE_DEFAULTS.BUCKET,\n [PlatformInfrastructureEnvKeys.STORAGE_ACCESS_KEY]: secrets.storage.accessKey,\n [PlatformInfrastructureEnvKeys.STORAGE_SECRET_KEY]: secrets.storage.secretKey,\n\n [PlatformServiceUrlEnvKeys.PLATFORM_APPS_MANAGER_URL]: `http://platform-apps-manager:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}`,\n // No crontabs manager runs here, but every platform service's env schema requires a URL for it.\n [PlatformServiceUrlEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_URL]: `http://platform-crontabs-batches-manager:${PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER}`,\n [PlatformServiceUrlEnvKeys.PLATFORM_MODULE_REGISTRY_URL]: `http://platform-module-registry:${PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY}`,\n\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_PRIVATE_KEY]: secrets.platform.appsManager.privateKey,\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_PUBLIC_KEY]: secrets.platform.appsManager.publicKey,\n // #2921, #2898 — apps-manager signs its answers to application runtimes and platform services with this key, and checks at startup that it is in the published set.\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY]: responseSigning.privateKey,\n [ApplicationBackendBootstrapEnvKeys.PLATFORM_APPS_MANAGER_RESPONSE_VERIFICATION_KEYS]: buildRuntimeResponseVerificationKeySet([\n responseSigning.publicKey,\n responseSigning.nextPublicKey,\n ]),\n // #2891 — apps-manager seals every LOCAL private key under this root; the previous one only until the re-seal.\n [PlatformSecurityEnvKeys.PLATFORM_KEY_ENCRYPTION_ROOT]: keyEncryptionRoot.current,\n [PlatformSecurityEnvKeys.PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT]:\n keyEncryptionRoot.previous && keyEncryptionRoot.previous !== keyEncryptionRoot.current ? keyEncryptionRoot.previous : '',\n [PlatformSecurityEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY]: secrets.platform.crontabsBatchesManager.privateKey,\n [PlatformSecurityEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY]: secrets.platform.crontabsBatchesManager.publicKey,\n [PlatformSecurityEnvKeys.PLATFORM_APPLICATION_PRIMARY_SECRET]: secrets.platform.primarySecret,\n [PlatformSecurityEnvKeys.PLATFORM_ADMIN_SECRET]: secrets.platform.adminSecret,\n\n [PlatformAdminEnvKeys.ADMIN_EMAIL]: secrets.admin.email,\n [PlatformAdminEnvKeys.ADMIN_PASSWORD]: secrets.admin.password,\n [PlatformAdminEnvKeys.ADMIN_FIRST_NAME]: secrets.admin.firstName,\n [PlatformAdminEnvKeys.ADMIN_LAST_NAME]: secrets.admin.lastName,\n };\n}\n\n/**\n * The `.env` file content. Encoded once, by the same encoder as the platform's `.env.wildo-platform`. A `$` is refused:\n * Compose interpolates it inside an env file, so a value carrying one would arrive changed. Generated material never\n * contains one; an operator-typed value could.\n */\nexport function serializeRegistryHostEnv(env: Record<string, string>): string {\n const lines = ['# Written by `wildo fwk registry-host deploy`. Rewritten on every deploy; do not edit here.'];\n for (const [key, value] of Object.entries(env)) {\n if (value.includes('$')) throw new Error(`${key} contains \"$\", which Docker Compose would interpolate. Change the value.`);\n lines.push(`${key}=${encodeComposeEnvValue(value)}`);\n }\n return `${lines.join('\\n')}\\n`;\n}\n\n/** The deployed template files, read from the framework checkout. */\nexport function readRegistryHostTemplates(frameworkRoot: string): Record<(typeof REGISTRY_HOST_TEMPLATE_FILES)[number], string> {\n const directory = join(resolveFrameworkLayout(frameworkRoot).templatesHome, 'infra', 'registry-host');\n return Object.fromEntries(REGISTRY_HOST_TEMPLATE_FILES.map((file) => [file, readFileSync(join(directory, file), 'utf8')])) as Record<\n (typeof REGISTRY_HOST_TEMPLATE_FILES)[number],\n string\n >;\n}\n\n/** The checkout trees whose compiled output the platform image runs (`Dockerfile.platform-base` copies the checkout). */\nconst IMAGE_RUNTIME_PACKAGE_ROOTS = ['engine/', 'platform/platform-core/', 'platform/platform-back-office/'] as const;\n\n/**\n * The packages whose compiled output is not settled, so an image built from this checkout now would ship it: any\n * package the image runs that the dev watchers record as not `ready`, or as carrying a current failure. In a checkout\n * several sessions compile at once, this is the difference between shipping the tree and shipping a half-compiled one\n * (#2135 review M3). Without the watchers' record nothing is proven, and every package is reported unsettled.\n */\nexport function findUnsettledImagePackages(frameworkRoot: string): string[] {\n let status: { packages?: Record<string, { relativePackageRoot?: string; status?: string; currentFailureDiagnostic?: unknown }> };\n try {\n status = JSON.parse(readFileSync(join(frameworkRoot, DEV_COMPILE_STATUS_RELATIVE), 'utf8')) as typeof status;\n } catch {\n return [`(no compile record at ${DEV_COMPILE_STATUS_RELATIVE}: start the dev watchers, which own every dist)`];\n }\n return Object.entries(status.packages ?? {})\n .filter(([, record]) => IMAGE_RUNTIME_PACKAGE_ROOTS.some((root) => (record.relativePackageRoot ?? '').startsWith(root)))\n // semantic-literal-boundary: `ready` is the orchestrator's status vocabulary, owned by a plain .mjs script this package cannot import\n .filter(([, record]) => record.status !== 'ready' || Boolean(record.currentFailureDiagnostic))\n .map(([name, record]) => `${name} (${record.status ?? 'unknown'})`)\n .sort();\n}\n\n/**\n * The command, run ON the host, that mints a registry key through apps-manager's admin door (`/admin/registry/keys`).\n *\n * The door listens only on the host's loopback (`127.0.0.1:5151`), so the request is made there, over SSH, with no\n * tunnel. The admin secret never appears in an argument vector, on either machine: the host reads it from its own\n * `.env`, and `curl` receives the header on stdin (`-H @-`). The request body names no secret and is passed as data.\n */\nexport function buildRegistryHostKeyMintCommand(request: RegistryKeyMintRequest): string {\n const body = JSON.stringify(RegistryKeyMintRequestSchema.parse(request));\n const url = `http://127.0.0.1:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}${APPS_MANAGER_API_PREFIX}${REGISTRY_KEYS_ADMIN_PATH}`;\n const quote = (value: string) => `'${value.replaceAll(\"'\", `'\\\\''`)}'`;\n return [\n `cd ${quote(REGISTRY_HOST_DIRECTORY)}`,\n // An unquoted alphanumeric value in the compose env file; quotes are stripped in case an encoder ever adds them.\n `secret=$(sed -n 's/^${PlatformSecurityEnvKeys.PLATFORM_ADMIN_SECRET}=//p' .env | sed 's/^\"//;s/\"$//')`,\n 'test -n \"$secret\"',\n `printf '%s: %s\\\\n' ${quote(APPS_MANAGER_ADMIN_SECRET_HEADER)} \"$secret\" | curl -sS --fail-with-body -X POST ${quote(url)} -H @- -H 'content-type: application/json' --data ${quote(body)}`,\n ].join(' && ');\n}\n\n/**\n * The object store client image the backup mirrors buckets with: the compose file's own `minio-init` image, so the\n * backup always speaks to the store with the client the stack itself runs, and changes when the store changes.\n */\nexport function registryHostObjectStoreClientImage(composeYaml: string): string {\n const image = (parseYaml(composeYaml) as { services?: Record<string, { image?: string }> }).services?.['minio-init']?.image;\n if (!image) throw new Error('The registry host compose file has no `minio-init` image, which the backup mirrors buckets with.');\n return image;\n}\n\n/**\n * The backup job's settings (`/opt/wildo-registry/backup.env`, 0600). Read twice on the host, by bash (`. backup.env`)\n * and by `docker run --env-file`, which disagree about quoting, so a value either reads identically in both or is\n * refused: no whitespace, quotes, `$`, backticks, backslashes or `#`.\n */\nexport function buildRegistryHostBackupEnv(input: { backup: WildoFrameworkRegistryHostBackup; heartbeatUrl: string; objectStoreClientImage: string }): string {\n const values: Record<string, string> = {\n RESTIC_REPOSITORY: `s3:${input.backup.endpoint.replace(/\\/+$/, '')}/${input.backup.bucket}/registry`,\n RESTIC_PASSWORD: input.backup.resticPassword,\n AWS_ACCESS_KEY_ID: input.backup.accessKey,\n AWS_SECRET_ACCESS_KEY: input.backup.secretKey,\n AWS_DEFAULT_REGION: input.backup.scalewayRegion,\n HEARTBEAT_URL: input.heartbeatUrl,\n MC_IMAGE: input.objectStoreClientImage,\n RESTIC_IMAGE: REGISTRY_BACKUP_RESTIC_IMAGE,\n BACKUP_HOST: registryHostDomain(),\n };\n const lines = ['# Written by `wildo fwk registry-host deploy` for backup.sh. Rewritten on every deploy; do not edit here.'];\n for (const [key, value] of Object.entries(values)) {\n if (/[\\s\"'$`\\\\#]/.test(value)) throw new Error(`${key} has a character backup.env cannot carry for both of its readers; change the value.`);\n lines.push(`${key}=${value}`);\n }\n return `${lines.join('\\n')}\\n`;\n}\n"]}
1
+ {"version":3,"file":"registry-host.service.js","sourceRoot":"","sources":["../../../../../src/services/framework/registry-host/registry-host.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,gCAAgC,EAEhC,uBAAuB,EACvB,2BAA2B,EAC3B,0CAA0C,EAC1C,wBAAwB,EACxB,sCAAsC,EAEtC,4BAA4B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AAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC","sourcesContent":["/**\n * The public module registry's host (#2135): what `wildo fwk registry-host` writes there, and the secrets behind it.\n *\n * The host runs `templates/infra/registry-host/docker-compose.yml`: the registry, the apps-manager it needs (storage\n * credentials and API keys come from it), PostgreSQL, Valkey, RabbitMQ, MinIO and a Caddy TLS edge. This module renders\n * the `.env` that file reads and keeps the secrets in it stable across deploys.\n *\n * ## Secrets\n *\n * Generated once, by the same registry of framework-managed materials every platform uses\n * (`provisionFrameworkManagedSecrets`), and kept in the gitignored framework secrets file under `registryHost`. A\n * redeploy reuses them: PostgreSQL, RabbitMQ and the signing keys hold state that a new password would lock out.\n * Only what is missing is ever generated. The host's `.env` (0600) is the other copy.\n *\n * The administrator apps-manager seeds at INIT is an operator identity, never generated: it is taken from flags,\n * else from the stored secrets, else from this machine's git identity, the person running the deploy.\n */\nimport { execFileSync } from 'node:child_process';\nimport { z } from 'zod';\nimport { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { parse as parseYaml } from 'yaml';\nimport {\n APPS_MANAGER_ADMIN_SECRET_HEADER,\n type WildoFrameworkRegistryHostBackup,\n APPS_MANAGER_API_PREFIX,\n DEFAULT_PUBLIC_REGISTRY_URL,\n FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY,\n REGISTRY_KEYS_ADMIN_PATH,\n WildoFrameworkModuleRegistryHostSchema,\n type WildoFrameworkModuleRegistryHost,\n RegistryKeyMintRequestSchema,\n type RegistryKeyMintRequest,\n PLATFORM_DEFAULT_PORTS,\n PLATFORM_POSTGRES_DATABASE,\n PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n PlatformAdminEnvKeys,\n PlatformInfrastructureEnvKeys,\n PlatformIngressEnvKeys,\n PlatformProcessEnvKeys,\n PlatformSecurityEnvKeys,\n PlatformServiceUrlEnvKeys,\n PlatformWildoServices,\n ApplicationBackendBootstrapEnvKeys,\n buildRuntimeResponseVerificationKeySet,\n STORAGE_DEFAULTS,\n resolveFrameworkLayout,\n} from '@wildo-ai/platform-config-lib';\nimport { ApplicationBackendDataEnvKeys } from '@wildo-ai/platform-core-shared';\nimport { PersistenceAdapter } from '@wildo-ai/saas-models';\nimport { PLATFORM_INIT_MEMORY, PLATFORM_SERVICE_CATALOG } from '~wildo-cli/services/catalog/service-catalog.schemas';\nimport { PlatformEnvSecretsJson_Schema, type PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { provisionFrameworkManagedSecrets, type PlatformEnvSecretsDraft } from '~wildo-cli/services/credentials/framework-managed-secrets';\nimport {\n MINIO_CREDENTIAL_ENV_KEYS,\n POSTGRESQL_CREDENTIAL_ENV_KEYS,\n RABBITMQ_CREDENTIAL_ENV_KEYS,\n VALKEY_CREDENTIAL_ENV_KEYS,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport { encodeComposeEnvValue } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { FrameworkReleaseService } from '~wildo-cli/services/framework/framework-release.service';\nimport { DEV_COMPILE_STATUS_RELATIVE } from '~wildo-cli/services/framework/dev-compile-status.paths';\n\n/**\n * One section of the gitignored framework secrets file, read raw and validated ALONE. Not through the whole-file\n * schema: a malformed section must name itself, not break every command that parses the file (the `providers.slack`\n * lesson in framework-secrets.schemas.ts). `null` when the section is absent.\n */\nexport function loadFrameworkSecretsSection<T>(frameworkRoot: string, key: string, schema: z.ZodType<T>): T | null {\n const secretsPath = FrameworkReleaseService.resolveFrameworkSecretsPath(frameworkRoot);\n if (!existsSync(secretsPath)) return null;\n const section = (JSON.parse(readFileSync(secretsPath, 'utf8')) as Record<string, unknown>)[key];\n if (section === undefined) return null;\n const parsed = schema.safeParse(section);\n if (!parsed.success) {\n throw new Error(`${key} in ${secretsPath} is malformed: ${parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`).join('; ')}`);\n }\n return parsed.data;\n}\n\n/** How to reach the registry host: `moduleRegistryHost`, never tracked config (the address is the CDN's origin). */\nexport function loadRegistryHostConnection(frameworkRoot: string): WildoFrameworkModuleRegistryHost | null {\n return loadFrameworkSecretsSection(frameworkRoot, FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY, WildoFrameworkModuleRegistryHostSchema);\n}\n\n/** The platform environment id the host's services run under. Not `local`, which would claim a developer machine. */\nexport const REGISTRY_HOST_ENVIRONMENT_ID = 'registry';\n/** Where the compose project lives on the host. */\nexport const REGISTRY_HOST_DIRECTORY = '/opt/wildo-registry';\n/** The key under which the framework secrets file holds this host's secrets. */\nconst FRAMEWORK_SECRETS_SECTION = 'registryHost';\n/** The template files deployed as-is, relative to the framework's `templates/infra/registry-host/`. */\nexport const REGISTRY_HOST_TEMPLATE_FILES = [\n 'docker-compose.yml',\n 'Caddyfile',\n 'backup.sh',\n 'restore-check.sh',\n // The image-only upgrade a release runs, and the forced command of its deploy key (#3795, registry-host-upgrade.ts).\n 'upgrade-image.sh',\n 'wildo-registry-backup.service',\n 'wildo-registry-backup.timer',\n] as const;\n/** The systemd units of the nightly backup, installed into /etc/systemd/system. */\nexport const REGISTRY_BACKUP_SYSTEMD_UNITS = ['wildo-registry-backup.service', 'wildo-registry-backup.timer'] as const;\n/** restic, pinned: the backup's format and the restore's. A bump is a deliberate change, recorded here. */\nexport const REGISTRY_BACKUP_RESTIC_IMAGE = 'restic/restic:0.18.1';\n\n/** The public name the registry is served under: the address every CLI resolves `--registry public` to. */\nexport function registryHostDomain(): string {\n return new URL(DEFAULT_PUBLIC_REGISTRY_URL).hostname;\n}\n\n/**\n * The platform's public domain: the registry's name without its first label (`registry.wildo.ai` → `wildo.ai`).\n * apps-manager documents `WILDO_PUBLIC_DOMAIN` as runtime-agnostic, `wildo.ai` for production, and requires it outside\n * `local`; on this host it builds no URL, because the host serves no application.\n */\nexport function registryHostPublicDomain(): string {\n return registryHostDomain().split('.').slice(1).join('.');\n}\n\nexport interface RegistryHostAdminIdentity {\n readonly email: string;\n readonly firstName: string;\n readonly lastName: string;\n}\n\nexport interface RegistryHostSecretsResult {\n readonly secrets: PlatformEnvSecretsJson;\n /** Flattened keys generated by this call; empty when everything was already stored. */\n readonly generatedKeys: readonly string[];\n}\n\n/** The git identity of this machine, as the administrator identity when none is stored or given. */\nexport function gitAdminIdentity(frameworkRoot: string): Partial<RegistryHostAdminIdentity> {\n const read = (key: string): string | undefined => {\n try {\n return execFileSync('git', ['config', key], { cwd: frameworkRoot, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim() || undefined;\n } catch {\n return undefined;\n }\n };\n const [firstName, ...rest] = (read('user.name') ?? '').split(/\\s+/).filter((part) => part.length > 0);\n return { email: read('user.email'), firstName, lastName: rest.length > 0 ? rest.join(' ') : undefined };\n}\n\n/**\n * The host's secrets: the stored ones, completed with whatever is missing. `persist: false` (a dry run) generates in\n * memory and writes nothing, so a later real run generates its own.\n */\nexport function resolveRegistryHostSecrets(input: {\n frameworkRoot: string;\n /** Given by the operator: wins over what is stored. */\n admin: Partial<RegistryHostAdminIdentity>;\n /** Used only for a field neither given nor stored (the machine's git identity). */\n fallbackAdmin?: Partial<RegistryHostAdminIdentity>;\n persist: boolean;\n}): RegistryHostSecretsResult {\n const secretsPath = FrameworkReleaseService.resolveFrameworkSecretsPath(input.frameworkRoot);\n // RAW JSON, as `saveFrameworkNpmPublishToken` reads it: every other section must survive the write-back.\n const file: Record<string, unknown> = existsSync(secretsPath) ? (JSON.parse(readFileSync(secretsPath, 'utf8')) as Record<string, unknown>) : {};\n const stored = (file[FRAMEWORK_SECRETS_SECTION] ?? {}) as PlatformEnvSecretsDraft;\n const draft = JSON.parse(JSON.stringify(stored)) as PlatformEnvSecretsDraft;\n\n const admin = { ...draft.admin } as Record<string, string | undefined>;\n for (const field of ['email', 'firstName', 'lastName'] as const) {\n const given = input.admin[field]?.trim();\n if (given) admin[field] = given;\n else if (!admin[field]?.trim() && input.fallbackAdmin?.[field]?.trim()) admin[field] = input.fallbackAdmin[field]!.trim();\n }\n const missing = (['email', 'firstName', 'lastName'] as const).filter((field) => !admin[field]);\n if (missing.length > 0) {\n throw new Error(\n `The registry host's administrator has no ${missing.join(', ')}. Pass --adminEmail, --adminFirstName and --adminLastName `\n + '(they are stored after the first deploy), or set this checkout\\'s git user.name and user.email.',\n );\n }\n draft.admin = admin as PlatformEnvSecretsDraft['admin'];\n\n const { secrets, mintedKeys } = provisionFrameworkManagedSecrets(draft);\n const identityChanged = JSON.stringify(stored.admin ?? {}) !== JSON.stringify(admin);\n const parsed = PlatformEnvSecretsJson_Schema.parse(secrets);\n if (input.persist && (mintedKeys.length > 0 || identityChanged)) {\n mkdirSync(dirname(secretsPath), { recursive: true });\n writeFileSync(secretsPath, `${JSON.stringify({ ...file, [FRAMEWORK_SECRETS_SECTION]: secrets }, null, 2)}\\n`, { mode: 0o600 });\n // `mode` applies only when the write CREATES the file; a secrets file that already existed keeps its own.\n chmodSync(secretsPath, 0o600);\n }\n return { secrets: parsed, generatedKeys: mintedKeys };\n}\n\n/** The image every platform service on the host runs, and the domain and contact the TLS edge uses. */\nexport interface RegistryHostEnvInput {\n readonly platformImage: string;\n readonly secrets: PlatformEnvSecretsJson;\n}\n\n/**\n * Every variable `templates/infra/registry-host/docker-compose.yml` reads. Container-internal addresses are the compose\n * service names on the one internal network.\n */\nexport function buildRegistryHostEnv(input: RegistryHostEnvInput): Record<string, string> {\n const { secrets } = input;\n const responseSigning = secrets.platform.appsManagerResponseSigning;\n const keyEncryptionRoot = secrets.platform.keyEncryptionRoot;\n if (!secrets.postgresql || !secrets.valkey || !secrets.platform.crontabsBatchesManager || !responseSigning || !keyEncryptionRoot?.current) {\n throw new Error(\n 'The registry host secrets are incomplete (postgresql, valkey, the crontabs keypair, the apps-manager response keys or the key-encryption root); this is a provisioning bug.',\n );\n }\n const appsManager = PLATFORM_SERVICE_CATALOG[PlatformWildoServices.APPS_MANAGER].memory;\n const registry = PLATFORM_SERVICE_CATALOG[PlatformWildoServices.MODULE_REGISTRY].memory;\n const pgUser = encodeURIComponent(secrets.postgresql.adminUser);\n const pgPassword = encodeURIComponent(secrets.postgresql.adminPassword);\n const sslMode = 'disable'; // the internal network only; nothing leaves the machine\n return {\n PLATFORM_IMAGE: input.platformImage,\n REGISTRY_DOMAIN: registryHostDomain(),\n // Let's Encrypt's expiry notices go to the person who deploys: the administrator.\n TLS_EMAIL: secrets.admin.email,\n\n INIT_MEM_LIMIT_MB: String(PLATFORM_INIT_MEMORY.containerLimitMb),\n INIT_HEAP_CEILING_MB: String(PLATFORM_INIT_MEMORY.heapCeilingMb),\n APPS_MANAGER_MEM_LIMIT_MB: String(appsManager.containerLimitMb),\n APPS_MANAGER_HEAP_CEILING_MB: String(appsManager.heapCeilingMb),\n MODULE_REGISTRY_MEM_LIMIT_MB: String(registry.containerLimitMb),\n MODULE_REGISTRY_HEAP_CEILING_MB: String(registry.heapCeilingMb),\n\n [PlatformProcessEnvKeys.PLATFORM_ENVIRONMENT_ID]: REGISTRY_HOST_ENVIRONMENT_ID,\n [PlatformProcessEnvKeys.APPLICATION_ENV]: 'production',\n [PlatformIngressEnvKeys.WILDO_PUBLIC_DOMAIN]: registryHostPublicDomain(),\n\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_USER]: secrets.postgresql.adminUser,\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_PASSWORD]: secrets.postgresql.adminPassword,\n // The container's initdb database. apps-manager creates the platform's own database itself at INIT.\n [POSTGRESQL_CREDENTIAL_ENV_KEYS.ADMIN_DATABASE]: PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n [PlatformInfrastructureEnvKeys.PG_HOST]: 'postgresql',\n [PlatformInfrastructureEnvKeys.PG_PORT]: '5432',\n [PlatformInfrastructureEnvKeys.PG_ADMIN_USER]: secrets.postgresql.adminUser,\n [PlatformInfrastructureEnvKeys.PG_ADMIN_PASSWORD]: secrets.postgresql.adminPassword,\n [PlatformInfrastructureEnvKeys.PG_ADMIN_DATABASE]: PLATFORM_POSTGRES_MAINTENANCE_DATABASE,\n [PlatformInfrastructureEnvKeys.PG_SSL_MODE]: sslMode,\n [PlatformInfrastructureEnvKeys.PG_CONNECT_URL]: `postgresql://${pgUser}:${pgPassword}@postgresql:5432/${encodeURIComponent(PLATFORM_POSTGRES_DATABASE)}?sslmode=${sslMode}`,\n [ApplicationBackendDataEnvKeys.DATABASE_DEFAULT_ADAPTER]: PersistenceAdapter.POSTGRESQL,\n\n [VALKEY_CREDENTIAL_ENV_KEYS.PASSWORD]: secrets.valkey.adminPassword,\n [PlatformInfrastructureEnvKeys.REDIS_HOST]: 'valkey',\n [PlatformInfrastructureEnvKeys.REDIS_PORT]: '6379',\n [PlatformInfrastructureEnvKeys.REDIS_ADMIN_USER]: secrets.valkey.adminUser,\n [PlatformInfrastructureEnvKeys.REDIS_ADMIN_PASSWORD]: secrets.valkey.adminPassword,\n\n [RABBITMQ_CREDENTIAL_ENV_KEYS.DEFAULT_USER]: secrets.rabbitmq.adminUsername,\n [RABBITMQ_CREDENTIAL_ENV_KEYS.DEFAULT_PASS]: secrets.rabbitmq.adminPassword,\n [RABBITMQ_CREDENTIAL_ENV_KEYS.ERLANG_COOKIE]: secrets.rabbitmq.erlangCookie,\n [PlatformInfrastructureEnvKeys.RABBITMQ_HOST]: 'rabbitmq',\n [PlatformInfrastructureEnvKeys.RABBITMQ_PORT]: '5672',\n [PlatformInfrastructureEnvKeys.RABBITMQ_MANAGEMENT_PORT]: '15672',\n [PlatformInfrastructureEnvKeys.RABBITMQ_ADMIN_USERNAME]: secrets.rabbitmq.adminUsername,\n [PlatformInfrastructureEnvKeys.RABBITMQ_ADMIN_PASSWORD]: secrets.rabbitmq.adminPassword,\n\n [MINIO_CREDENTIAL_ENV_KEYS.ROOT_USER]: secrets.storage.accessKey,\n [MINIO_CREDENTIAL_ENV_KEYS.ROOT_PASSWORD]: secrets.storage.secretKey,\n [PlatformInfrastructureEnvKeys.STORAGE_PROVIDER]: STORAGE_DEFAULTS.PROVIDER,\n [PlatformInfrastructureEnvKeys.STORAGE_ENDPOINT]: 'minio',\n [PlatformInfrastructureEnvKeys.STORAGE_PORT]: '9000',\n [PlatformInfrastructureEnvKeys.STORAGE_USE_SSL]: 'false',\n [PlatformInfrastructureEnvKeys.STORAGE_BUCKET]: STORAGE_DEFAULTS.BUCKET,\n [PlatformInfrastructureEnvKeys.STORAGE_ACCESS_KEY]: secrets.storage.accessKey,\n [PlatformInfrastructureEnvKeys.STORAGE_SECRET_KEY]: secrets.storage.secretKey,\n\n [PlatformServiceUrlEnvKeys.PLATFORM_APPS_MANAGER_URL]: `http://platform-apps-manager:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}`,\n // No crontabs manager runs here, but every platform service's env schema requires a URL for it.\n [PlatformServiceUrlEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_URL]: `http://platform-crontabs-batches-manager:${PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER}`,\n [PlatformServiceUrlEnvKeys.PLATFORM_MODULE_REGISTRY_URL]: `http://platform-module-registry:${PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY}`,\n\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_PRIVATE_KEY]: secrets.platform.appsManager.privateKey,\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_PUBLIC_KEY]: secrets.platform.appsManager.publicKey,\n // #2921, #2898 — apps-manager signs its answers to application runtimes and platform services with this key, and checks at startup that it is in the published set.\n [PlatformSecurityEnvKeys.PLATFORM_APPS_MANAGER_RESPONSE_SIGNING_PRIVATE_KEY]: responseSigning.privateKey,\n [ApplicationBackendBootstrapEnvKeys.PLATFORM_APPS_MANAGER_RESPONSE_VERIFICATION_KEYS]: buildRuntimeResponseVerificationKeySet([\n responseSigning.publicKey,\n responseSigning.nextPublicKey,\n ]),\n // #2891 — apps-manager seals every LOCAL private key under this root; the previous one only until the re-seal.\n [PlatformSecurityEnvKeys.PLATFORM_KEY_ENCRYPTION_ROOT]: keyEncryptionRoot.current,\n [PlatformSecurityEnvKeys.PLATFORM_KEY_ENCRYPTION_PREVIOUS_ROOT]:\n keyEncryptionRoot.previous && keyEncryptionRoot.previous !== keyEncryptionRoot.current ? keyEncryptionRoot.previous : '',\n [PlatformSecurityEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_PRIVATE_KEY]: secrets.platform.crontabsBatchesManager.privateKey,\n [PlatformSecurityEnvKeys.PLATFORM_CRONTABS_BATCHES_MANAGER_PUBLIC_KEY]: secrets.platform.crontabsBatchesManager.publicKey,\n [PlatformSecurityEnvKeys.PLATFORM_APPLICATION_PRIMARY_SECRET]: secrets.platform.primarySecret,\n [PlatformSecurityEnvKeys.PLATFORM_ADMIN_SECRET]: secrets.platform.adminSecret,\n\n [PlatformAdminEnvKeys.ADMIN_EMAIL]: secrets.admin.email,\n [PlatformAdminEnvKeys.ADMIN_PASSWORD]: secrets.admin.password,\n [PlatformAdminEnvKeys.ADMIN_FIRST_NAME]: secrets.admin.firstName,\n [PlatformAdminEnvKeys.ADMIN_LAST_NAME]: secrets.admin.lastName,\n };\n}\n\n/**\n * The `.env` file content. Encoded once, by the same encoder as the platform's `.env.wildo-platform`. A `$` is refused:\n * Compose interpolates it inside an env file, so a value carrying one would arrive changed. Generated material never\n * contains one; an operator-typed value could.\n */\nexport function serializeRegistryHostEnv(env: Record<string, string>): string {\n const lines = ['# Written by `wildo fwk registry-host deploy`. Rewritten on every deploy; do not edit here.'];\n for (const [key, value] of Object.entries(env)) {\n if (value.includes('$')) throw new Error(`${key} contains \"$\", which Docker Compose would interpolate. Change the value.`);\n lines.push(`${key}=${encodeComposeEnvValue(value)}`);\n }\n return `${lines.join('\\n')}\\n`;\n}\n\n/** The deployed template files, read from the framework checkout. */\nexport function readRegistryHostTemplates(frameworkRoot: string): Record<(typeof REGISTRY_HOST_TEMPLATE_FILES)[number], string> {\n const directory = join(resolveFrameworkLayout(frameworkRoot).templatesHome, 'infra', 'registry-host');\n return Object.fromEntries(REGISTRY_HOST_TEMPLATE_FILES.map((file) => [file, readFileSync(join(directory, file), 'utf8')])) as Record<\n (typeof REGISTRY_HOST_TEMPLATE_FILES)[number],\n string\n >;\n}\n\n/** The checkout trees whose compiled output the platform image runs (`Dockerfile.platform-base` copies the checkout). */\nconst IMAGE_RUNTIME_PACKAGE_ROOTS = ['engine/', 'platform/platform-core/', 'platform/platform-back-office/'] as const;\n\n/**\n * The packages whose compiled output is not settled, so an image built from this checkout now would ship it: any\n * package the image runs that the dev watchers record as not `ready`, or as carrying a current failure. In a checkout\n * several sessions compile at once, this is the difference between shipping the tree and shipping a half-compiled one\n * (#2135 review M3). Without the watchers' record nothing is proven, and every package is reported unsettled.\n */\nexport function findUnsettledImagePackages(frameworkRoot: string): string[] {\n let status: { packages?: Record<string, { relativePackageRoot?: string; status?: string; currentFailureDiagnostic?: unknown }> };\n try {\n status = JSON.parse(readFileSync(join(frameworkRoot, DEV_COMPILE_STATUS_RELATIVE), 'utf8')) as typeof status;\n } catch {\n return [`(no compile record at ${DEV_COMPILE_STATUS_RELATIVE}: start the dev watchers, which own every dist)`];\n }\n return Object.entries(status.packages ?? {})\n .filter(([, record]) => IMAGE_RUNTIME_PACKAGE_ROOTS.some((root) => (record.relativePackageRoot ?? '').startsWith(root)))\n // semantic-literal-boundary: `ready` is the orchestrator's status vocabulary, owned by a plain .mjs script this package cannot import\n .filter(([, record]) => record.status !== 'ready' || Boolean(record.currentFailureDiagnostic))\n .map(([name, record]) => `${name} (${record.status ?? 'unknown'})`)\n .sort();\n}\n\n/**\n * The command, run ON the host, that mints a registry key through apps-manager's admin door (`/admin/registry/keys`).\n *\n * The door listens only on the host's loopback (`127.0.0.1:5151`), so the request is made there, over SSH, with no\n * tunnel. The admin secret never appears in an argument vector, on either machine: the host reads it from its own\n * `.env`, and `curl` receives the header on stdin (`-H @-`). The request body names no secret and is passed as data.\n */\nexport function buildRegistryHostKeyMintCommand(request: RegistryKeyMintRequest): string {\n const body = JSON.stringify(RegistryKeyMintRequestSchema.parse(request));\n const url = `http://127.0.0.1:${PLATFORM_DEFAULT_PORTS.APPS_MANAGER}${APPS_MANAGER_API_PREFIX}${REGISTRY_KEYS_ADMIN_PATH}`;\n const quote = (value: string) => `'${value.replaceAll(\"'\", `'\\\\''`)}'`;\n return [\n `cd ${quote(REGISTRY_HOST_DIRECTORY)}`,\n // An unquoted alphanumeric value in the compose env file; quotes are stripped in case an encoder ever adds them.\n `secret=$(sed -n 's/^${PlatformSecurityEnvKeys.PLATFORM_ADMIN_SECRET}=//p' .env | sed 's/^\"//;s/\"$//')`,\n 'test -n \"$secret\"',\n `printf '%s: %s\\\\n' ${quote(APPS_MANAGER_ADMIN_SECRET_HEADER)} \"$secret\" | curl -sS --fail-with-body -X POST ${quote(url)} -H @- -H 'content-type: application/json' --data ${quote(body)}`,\n ].join(' && ');\n}\n\n/**\n * The object store client image the backup mirrors buckets with: the compose file's own `minio-init` image, so the\n * backup always speaks to the store with the client the stack itself runs, and changes when the store changes.\n */\nexport function registryHostObjectStoreClientImage(composeYaml: string): string {\n const image = (parseYaml(composeYaml) as { services?: Record<string, { image?: string }> }).services?.['minio-init']?.image;\n if (!image) throw new Error('The registry host compose file has no `minio-init` image, which the backup mirrors buckets with.');\n return image;\n}\n\n/**\n * The backup job's settings (`/opt/wildo-registry/backup.env`, 0600). Read twice on the host, by bash (`. backup.env`)\n * and by `docker run --env-file`, which disagree about quoting, so a value either reads identically in both or is\n * refused: no whitespace, quotes, `$`, backticks, backslashes or `#`.\n */\nexport function buildRegistryHostBackupEnv(input: { backup: WildoFrameworkRegistryHostBackup; heartbeatUrl: string; objectStoreClientImage: string }): string {\n const values: Record<string, string> = {\n RESTIC_REPOSITORY: `s3:${input.backup.endpoint.replace(/\\/+$/, '')}/${input.backup.bucket}/registry`,\n RESTIC_PASSWORD: input.backup.resticPassword,\n AWS_ACCESS_KEY_ID: input.backup.accessKey,\n AWS_SECRET_ACCESS_KEY: input.backup.secretKey,\n AWS_DEFAULT_REGION: input.backup.scalewayRegion,\n HEARTBEAT_URL: input.heartbeatUrl,\n MC_IMAGE: input.objectStoreClientImage,\n RESTIC_IMAGE: REGISTRY_BACKUP_RESTIC_IMAGE,\n BACKUP_HOST: registryHostDomain(),\n };\n const lines = ['# Written by `wildo fwk registry-host deploy` for backup.sh. Rewritten on every deploy; do not edit here.'];\n for (const [key, value] of Object.entries(values)) {\n if (/[\\s\"'$`\\\\#]/.test(value)) throw new Error(`${key} has a character backup.env cannot carry for both of its readers; change the value.`);\n lines.push(`${key}=${value}`);\n }\n return `${lines.join('\\n')}\\n`;\n}\n"]}
@@ -74,6 +74,7 @@ export interface ProtectedWritePlan {
74
74
  * | recorded by this module? | on disk | action |
75
75
  * |---|---|---|
76
76
  * | yes, untouched | yes | overwrite |
77
+ * | yes, edited or unknown, and byte-identical to the new version | yes | overwrite (a no-op), recording the new hash |
77
78
  * | yes, edited or unknown | yes | keep (or `--force`: back up, then overwrite) |
78
79
  * | yes | no (deleted) | not recreated (`restoreMissing` or `--force`: recreate) |
79
80
  * | no, another module owns it | yes | overwrite, with the fan-out's overlap warning |
@@ -87,6 +88,13 @@ export declare function planProtectedWrite(args: {
87
88
  saasRoot: string;
88
89
  moduleId: string;
89
90
  stagedPaths: readonly string[];
91
+ /**
92
+ * Where the new version is staged: each staged path is read from `<extractDir>/<path>`. An edited file whose bytes
93
+ * already equal the new version's is not a conflict: there is nothing of the application's to keep, and keeping it
94
+ * would carry the OLD install hash forward, so every later update would report it edited again (#3816: Wonder Todos'
95
+ * Teams `backend.exports.ts` carried, by hand, the exact change 1.2.1 ships, and `update` kept it as "changed").
96
+ */
97
+ extractDir: string;
90
98
  /** The module's current entry; absent for a first install. */
91
99
  recorded?: Pick<RegistryModulesLockEntry, 'files' | 'installedFileHashes'>;
92
100
  force: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"installed-file-state.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/registry/installed-file-state.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAsB,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGlG;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,yFAAyF;IACzF,SAAS,cAAc;IACvB,6GAA6G;IAC7G,MAAM,WAAW;IACjB;;;OAGG;IACH,OAAO,YAAY;IACnB,8EAA8E;IAC9E,OAAO,YAAY;CACpB;AAED,uEAAuE;AACvE,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,kBAAkB,CAAoE,CAAC;AAEjJ,yEAAyE;AACzE,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE;AAED,gEAAgE;AAChE,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAM7H;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG1I;AAED,yDAAyD;AACzD,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,EAC5D,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAa7B;AAED,6EAA6E;AAC7E,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,OAAO,GAAG,qBAAqB,CAAC,GACrE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,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,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CAChG,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAuC9B;AAED,qHAAqH;AACrH,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uGAAuG;IACvG,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wFAAwF;IACxF,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;IAC7D,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBhC;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;CAClE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAWlC"}
@@ -104,6 +104,7 @@ export function describeProtectedFile(appRelativePath, state, verb) {
104
104
  * | recorded by this module? | on disk | action |
105
105
  * |---|---|---|
106
106
  * | yes, untouched | yes | overwrite |
107
+ * | yes, edited or unknown, and byte-identical to the new version | yes | overwrite (a no-op), recording the new hash |
107
108
  * | yes, edited or unknown | yes | keep (or `--force`: back up, then overwrite) |
108
109
  * | yes | no (deleted) | not recreated (`restoreMissing` or `--force`: recreate) |
109
110
  * | no, another module owns it | yes | overwrite, with the fan-out's overlap warning |
@@ -121,7 +122,7 @@ export async function planProtectedWrite(args) {
121
122
  for (const stagedPath of stagedPaths) {
122
123
  if (recordedSet.has(stagedPath)) {
123
124
  const state = await classifyInstalledFile(saasRoot, recorded, stagedPath);
124
- if (PROTECTED_INSTALLED_FILE_STATES.has(state)) {
125
+ if (PROTECTED_INSTALLED_FILE_STATES.has(state) && !(await matchesStagedFile(saasRoot, args.extractDir, stagedPath))) {
125
126
  if (force) {
126
127
  plan.forced.push({ path: stagedPath, backup: await backupApplicationFile(saasRoot, stagedPath, backupDirectory) });
127
128
  }
@@ -196,6 +197,13 @@ export async function nextInstalledFileHashes(args) {
196
197
  }
197
198
  return hashes;
198
199
  }
200
+ /** Whether the application's file is byte-identical to the staged one (both regular files). */
201
+ async function matchesStagedFile(saasRoot, extractDir, appRelativePath) {
202
+ const stagedPath = path.join(extractDir, ...appRelativePath.split('/'));
203
+ if (!(await isExistingFile(stagedPath)))
204
+ return false;
205
+ return (await sha256OfFile(resolveRecordedModuleFile(saasRoot, appRelativePath))) === (await sha256OfFile(stagedPath));
206
+ }
199
207
  async function isExistingFile(absolutePath) {
200
208
  try {
201
209
  return (await fs.stat(absolutePath)).isFile();