@wildo-ai/wildo-cli 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  27. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  28. package/dist/src/commands/generate/email-command.utils.js +5 -0
  29. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  30. package/dist/src/commands/init.command.d.ts +14 -0
  31. package/dist/src/commands/init.command.d.ts.map +1 -1
  32. package/dist/src/commands/init.command.js +36 -5
  33. package/dist/src/commands/init.command.js.map +1 -1
  34. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  35. package/dist/src/commands/local/deregister.command.js +4 -0
  36. package/dist/src/commands/local/deregister.command.js.map +1 -1
  37. package/dist/src/commands/local/dev.command.d.ts +6 -0
  38. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  39. package/dist/src/commands/local/dev.command.js +72 -0
  40. package/dist/src/commands/local/dev.command.js.map +1 -1
  41. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  42. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  43. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  44. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  45. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  46. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  47. package/dist/src/commands/local/jobs-run.command.js +92 -0
  48. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  49. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  50. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  51. package/dist/src/commands/local/jobs.command.js +59 -0
  52. package/dist/src/commands/local/jobs.command.js.map +1 -0
  53. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  54. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  55. package/dist/src/commands/local/tunnel.command.js +274 -0
  56. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  57. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  58. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  59. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  60. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  61. package/dist/src/commands/registry/update.command.js +1 -0
  62. package/dist/src/commands/registry/update.command.js.map +1 -1
  63. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  64. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  65. package/dist/src/commands/seal/verify.command.js +62 -1
  66. package/dist/src/commands/seal/verify.command.js.map +1 -1
  67. package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
  68. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  69. package/dist/src/services/application/app-bootstrap.service.js +49 -3
  70. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  71. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  72. package/dist/src/services/application/app-runtime-targets.service.js +9 -1
  73. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  74. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  75. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  76. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  77. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  78. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  79. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  80. package/dist/src/services/application/local-tunnel.service.js +294 -0
  81. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  82. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  83. package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
  84. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  85. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  86. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.js +26 -2
  88. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  89. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  90. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  92. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  93. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  94. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  95. package/dist/src/services/companion/build-console.service.js +54 -4
  96. package/dist/src/services/companion/build-console.service.js.map +1 -1
  97. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  98. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  99. package/dist/src/services/companion/creation-console.service.js +14 -2
  100. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  102. package/dist/src/services/companion/creation-drive.service.js +5 -2
  103. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  104. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  105. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  107. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  108. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  109. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  110. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  111. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  112. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  113. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  114. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  115. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  116. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  117. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  118. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  119. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  120. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  121. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  122. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  123. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  124. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  125. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  126. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  127. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  128. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
  129. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  130. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
  131. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  132. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  133. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  134. package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
  135. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  136. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  137. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  138. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  139. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  140. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
  142. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  143. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  144. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  145. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  146. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  147. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  148. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  149. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  150. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  151. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  152. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  153. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  154. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  155. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  156. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
  157. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  158. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
  159. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  160. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  161. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  162. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  163. package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
  164. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  165. package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
  166. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  167. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  168. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  169. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  170. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  171. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  172. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  173. package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
  174. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  175. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  176. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  177. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  178. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  179. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  180. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  181. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  182. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  183. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  184. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  185. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  186. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  187. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  188. package/dist/src/services/environment/environment-setup.service.js +17 -6
  189. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  190. package/dist/src/services/environment/environment.service.d.ts +4 -3
  191. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  192. package/dist/src/services/environment/environment.service.js +0 -1
  193. package/dist/src/services/environment/environment.service.js.map +1 -1
  194. package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
  195. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  196. package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
  197. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  198. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  199. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  200. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  201. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  202. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  203. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  204. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  205. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  206. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  207. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  208. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  209. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  210. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  211. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  212. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  213. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  214. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  215. package/dist/src/services/registry/module-install.service.js +1 -0
  216. package/dist/src/services/registry/module-install.service.js.map +1 -1
  217. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  218. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  219. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  220. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  221. package/dist/src/services/security/csp-sync.service.js +21 -2
  222. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/framework-root-package.json +3 -3
  225. package/package.json +23 -23
  226. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  227. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
  228. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  229. package/templates/infra/registry-host/docker-compose.yml +9 -2
  230. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  231. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  232. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  233. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  234. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  235. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  236. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  237. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  238. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  239. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  240. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  241. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  242. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  243. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  244. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  245. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  246. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  247. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  248. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  249. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  250. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  251. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  252. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  253. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  254. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  255. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  256. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  257. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  258. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  259. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  260. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  261. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  262. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  263. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  264. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  265. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  266. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  267. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  268. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  269. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  270. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  271. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  272. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  273. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  274. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  275. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  276. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  277. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  278. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  279. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  280. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  282. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  283. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  284. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  285. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  286. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  287. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  288. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  289. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  290. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  291. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  292. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  293. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  294. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  295. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  296. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  297. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  298. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  299. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  300. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  301. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  302. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  303. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  304. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  305. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  306. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  307. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  308. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  309. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  310. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  311. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  312. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  313. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  314. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  315. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  316. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  317. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  318. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  319. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  320. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  321. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  322. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  323. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  324. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  325. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  326. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  327. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  328. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  329. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  330. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  331. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  332. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  333. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  334. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  335. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  336. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  337. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  338. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  339. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  340. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  341. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  342. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  343. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  344. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  345. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  346. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  347. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  348. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  349. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  350. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  351. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  352. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  353. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  354. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  355. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  356. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  357. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  358. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  359. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  360. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  361. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  362. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  363. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  364. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  365. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  366. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  367. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  368. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  369. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  370. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  371. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  372. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  373. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  374. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  375. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  376. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  377. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  378. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  379. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  380. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  381. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  382. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  383. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  384. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  385. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  386. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  387. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  388. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  390. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  391. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  392. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  393. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  394. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  395. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  396. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  397. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  398. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  399. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  400. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  401. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  402. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  403. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  404. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  405. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  406. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  407. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  408. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  409. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  410. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  411. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  412. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  413. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  414. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  415. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  416. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  417. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  418. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  419. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  420. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  421. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  422. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  423. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  424. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  425. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  426. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  427. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  428. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  429. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  430. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  431. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  432. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  433. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  434. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  435. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  436. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  437. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  438. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  439. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  440. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  441. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  442. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  443. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  444. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  445. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  446. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  447. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  448. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  449. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  450. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  451. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  452. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  453. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  454. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  455. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  456. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  457. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  458. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  459. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  460. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  461. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  462. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  463. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  464. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  465. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  466. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  467. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  468. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  469. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  470. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  471. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  472. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  473. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  474. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  475. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  476. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  477. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  478. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  479. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  480. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  481. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  482. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  483. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  484. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  485. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  486. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  487. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  488. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  489. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  490. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  491. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  492. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  493. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  494. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  495. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  496. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  497. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  498. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  499. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  500. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  501. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  502. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  503. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  504. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  505. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  506. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  507. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  508. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  509. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  510. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  511. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  512. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  513. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  514. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  515. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  516. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  517. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  518. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  519. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  520. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  521. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  522. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  523. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  524. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  525. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  526. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  527. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  528. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  529. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  530. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  531. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  532. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  533. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  534. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  535. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  536. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  537. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  538. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  539. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  540. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  541. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  542. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  543. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  544. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  545. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  546. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  547. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  548. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  549. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  550. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  551. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  552. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  553. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  554. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  555. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  556. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  557. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  558. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  559. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  560. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  561. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  562. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  563. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  564. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  565. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  566. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  567. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  568. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  569. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  570. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  571. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  572. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  573. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  574. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  575. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  576. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  577. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  578. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  579. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  580. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  581. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  582. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  583. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  584. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  585. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  586. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  587. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  588. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  589. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"installed-file-state.utils.js","sourceRoot":"","sources":["../../../../src/services/registry/installed-file-state.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kB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S,CAAC;YACnF,IAAI,OAAO,KAAK,SAAS;gBAAE,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;YACnD,SAAS;QACX,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,YAAoB;IAChD,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACrE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * Which installed module files the application changed (#2016).\n *\n * Paul, 2026-09-29: a module copied into an application (the shadcn model) is the application's to edit,\n * so updating it needs \"hash matching … with warning for potential override of the end user\". The\n * installer records the SHA-256 of every file it writes (`installedFileHashes` on the lockfile entry);\n * `update`, `remove` and `repair` compare the file on disk to that hash before touching it.\n *\n * The same shape as Debian and RPM conffile handling: a file the administrator never touched is replaced;\n * one they changed is kept, with a notice.\n */\n\nimport { createHash } from 'node:crypto';\nimport { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { Sha256DigestSchema, type RegistryModulesLockEntry } from '@wildo-ai/platform-config-lib';\nimport { resolveRecordedModuleFile } from './boundary-fanout.utils';\n\n/**\n * What the application has done to one installed file, measured against the hash the installer\n * recorded when it wrote it.\n */\nexport enum InstalledFileState {\n /** On disk and byte-identical to what the installer wrote: safe to replace or delete. */\n UNTOUCHED = 'untouched',\n /** On disk and different from what the installer wrote: the application changed it. Kept, with a warning. */\n EDITED = 'edited',\n /**\n * On disk, but no valid hash was recorded for it, so whether it changed cannot be known. Treated as\n * EDITED (kept, with a warning): a missing fingerprint may only make a command more careful.\n */\n UNKNOWN = 'unknown',\n /** Recorded, but not on disk: the application deleted it (or it was lost). */\n MISSING = 'missing',\n}\n\n/** States a command must not overwrite or delete without `--force`. */\nexport const PROTECTED_INSTALLED_FILE_STATES: ReadonlySet<InstalledFileState> = new Set([InstalledFileState.EDITED, InstalledFileState.UNKNOWN]);\n\n/** `sha256:<hex>` of a file's bytes, in the lockfile's digest format. */\nexport async function sha256OfFile(absolutePath: string): Promise<string> {\n return `sha256:${createHash('sha256').update(await fs.readFile(absolutePath)).digest('hex')}`;\n}\n\n/** The hash of each written file, as the installer wrote it. */\nexport async function hashWrittenFiles(saasRoot: string, appRelativePaths: readonly string[]): Promise<Record<string, string>> {\n const hashes: Record<string, string> = {};\n for (const appRelativePath of appRelativePaths) {\n hashes[appRelativePath] = await sha256OfFile(path.resolve(saasRoot, appRelativePath));\n }\n return hashes;\n}\n\n/** The recorded hash of one file, or `undefined` when none was recorded or it is malformed. */\nexport function recordedFileHash(entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>, appRelativePath: string): string | undefined {\n const recorded = entry.installedFileHashes?.[appRelativePath];\n return recorded !== undefined && Sha256DigestSchema.safeParse(recorded).success ? recorded : undefined;\n}\n\n/** Classify one recorded file of an installed module. */\nexport async function classifyInstalledFile(\n saasRoot: string,\n entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>,\n appRelativePath: string,\n): Promise<InstalledFileState> {\n const absolutePath = resolveRecordedModuleFile(saasRoot, appRelativePath);\n let isFile: boolean;\n try {\n isFile = (await fs.stat(absolutePath)).isFile();\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return InstalledFileState.MISSING;\n throw error;\n }\n if (!isFile) return InstalledFileState.UNKNOWN;\n const recorded = recordedFileHash(entry, appRelativePath);\n if (recorded === undefined) return InstalledFileState.UNKNOWN;\n return (await sha256OfFile(absolutePath)) === recorded ? InstalledFileState.UNTOUCHED : InstalledFileState.EDITED;\n}\n\n/** Classify every recorded file of an installed module, in `files` order. */\nexport async function classifyInstalledFiles(\n saasRoot: string,\n entry: Pick<RegistryModulesLockEntry, 'files' | 'installedFileHashes'>,\n): Promise<Map<string, InstalledFileState>> {\n const states = new Map<string, InstalledFileState>();\n for (const appRelativePath of entry.files) states.set(appRelativePath, await classifyInstalledFile(saasRoot, entry, appRelativePath));\n return states;\n}\n\n/**\n * Where `--force` keeps the application's version of a file before overwriting or deleting it:\n * `.wildo-saas/tmp/registry-backups/<moduleId>/<timestamp>/`. A per-run directory, so two forced runs\n * never overwrite each other's backups.\n */\nexport function registryForceBackupDirectory(saasRoot: string, moduleId: string, now: Date = new Date()): string {\n return path.join(saasRoot, '.wildo-saas', 'tmp', 'registry-backups', ...moduleId.split('/'), now.toISOString().replace(/[:.]/g, '-'));\n}\n\n/** Copy one application file into a force-backup directory, keeping its application-relative path. */\nexport async function backupApplicationFile(saasRoot: string, appRelativePath: string, backupDirectory: string): Promise<string> {\n const destination = path.join(backupDirectory, ...appRelativePath.split('/'));\n await fs.mkdir(path.dirname(destination), { recursive: true });\n await fs.copyFile(path.resolve(saasRoot, appRelativePath), destination);\n return destination;\n}\n\n/** One human line for a protected file a command left in place. */\nexport function describeProtectedFile(appRelativePath: string, state: InstalledFileState, verb: string): string {\n return state === InstalledFileState.UNKNOWN\n ? `kept ${appRelativePath}: no install hash is recorded for it, so whether you changed it cannot be told. Not ${verb}; pass --force to ${verb} it (a backup is kept).`\n : `kept ${appRelativePath}: you changed it since it was installed. Not ${verb}; pass --force to ${verb} it (a backup is kept), or merge the new version by hand.`;\n}\n\n/** A recorded file a command left in place, and why. */\nexport interface KeptInstalledFile {\n path: string;\n state: InstalledFileState;\n}\n\n/** What a write (add, update, repair) will do to each file the new version ships, decided before it writes. */\nexport interface ProtectedWritePlan {\n /** Passed to the fan-out as `skipPaths`: files that stay as the application has them. */\n skip: Set<string>;\n /** Recorded files the application changed (or that carry no hash): not overwritten. */\n kept: KeptInstalledFile[];\n /** Recorded files the application deleted: not recreated. */\n notRestored: string[];\n /** Files overwritten under `--force`, each with the backup of the application's version. */\n forced: Array<{ path: string; backup: string }>;\n}\n\n/**\n * Decide, per file the new version ships, whether a write may overwrite what is on disk (#2016):\n *\n * | recorded by this module? | on disk | action |\n * |---|---|---|\n * | yes, untouched | yes | overwrite |\n * | yes, edited or unknown | yes | keep (or `--force`: back up, then overwrite) |\n * | yes | no (deleted) | not recreated (`restoreMissing` or `--force`: recreate) |\n * | no, another module owns it | yes | overwrite, with the fan-out's overlap warning |\n * | no, NO module owns it | yes | refuse, nothing written (or `--force`: back up, then overwrite) |\n * | no | no | create |\n *\n * The refusal is collected across every file and thrown before anything is written: a new version\n * must never silently replace a file the application authored itself.\n */\nexport async function planProtectedWrite(args: {\n saasRoot: string;\n moduleId: string;\n stagedPaths: readonly string[];\n /** The module's current entry; absent for a first install. */\n recorded?: Pick<RegistryModulesLockEntry, 'files' | 'installedFileHashes'>;\n force: boolean;\n /** `repair` recreates missing files: that is what it is for. */\n restoreMissing: boolean;\n backupDirectory: string;\n /** Who else owns a path; injected so the plan can be tested without a lockfile. */\n findOtherOwners: (paths: readonly string[]) => Promise<ReadonlyMap<string, readonly string[]>>;\n}): Promise<ProtectedWritePlan> {\n const { saasRoot, moduleId, stagedPaths, recorded, force, restoreMissing, backupDirectory } = args;\n const recordedSet = new Set(recorded?.files ?? []);\n const plan: ProtectedWritePlan = { skip: new Set(), kept: [], notRestored: [], forced: [] };\n const unrecordedPresent: string[] = [];\n\n for (const stagedPath of stagedPaths) {\n if (recordedSet.has(stagedPath)) {\n const state = await classifyInstalledFile(saasRoot, recorded!, stagedPath);\n if (PROTECTED_INSTALLED_FILE_STATES.has(state)) {\n if (force) {\n plan.forced.push({ path: stagedPath, backup: await backupApplicationFile(saasRoot, stagedPath, backupDirectory) });\n } else {\n plan.skip.add(stagedPath);\n plan.kept.push({ path: stagedPath, state });\n }\n } else if (state === InstalledFileState.MISSING && !restoreMissing && !force) {\n plan.skip.add(stagedPath);\n plan.notRestored.push(stagedPath);\n }\n continue;\n }\n if (await isExistingFile(path.resolve(saasRoot, stagedPath))) unrecordedPresent.push(stagedPath);\n }\n\n if (unrecordedPresent.length > 0) {\n const owners = await args.findOtherOwners(unrecordedPresent);\n const unowned = unrecordedPresent.filter((candidate) => (owners.get(candidate) ?? []).length === 0);\n if (unowned.length > 0 && !force) {\n throw new Error(\n `Refusing to install \"${moduleId}\": it would overwrite ${unowned.length} file(s) the application has and no module installed `\n + `(${unowned.join(', ')}). Nothing was written. Move them aside, or pass --force to overwrite them (a backup is kept).`,\n );\n }\n for (const candidate of unowned) {\n plan.forced.push({ path: candidate, backup: await backupApplicationFile(saasRoot, candidate, backupDirectory) });\n }\n }\n return plan;\n}\n\n/** What a removal (remove, or an update dropping files) will do to each recorded file, decided before it deletes. */\nexport interface ProtectedRemovalPlan {\n /** Untouched files, or edited ones under `--force`: delete these. */\n remove: string[];\n /** Files the application changed (or that carry no hash): left in place, now the application's own. */\n kept: KeptInstalledFile[];\n /** Files already gone. */\n gone: string[];\n /** Files deleted under `--force`, each with the backup of the application's version. */\n forced: Array<{ path: string; backup: string }>;\n}\n\n/**\n * Decide, per recorded file about to leave the module, whether it may be deleted (#2016). An edited\n * file is kept and becomes the application's own; `--force` deletes it after a backup.\n */\nexport async function planProtectedRemoval(args: {\n saasRoot: string;\n entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>;\n paths: readonly string[];\n force: boolean;\n backupDirectory: string;\n}): Promise<ProtectedRemovalPlan> {\n const plan: ProtectedRemovalPlan = { remove: [], kept: [], gone: [], forced: [] };\n for (const recordedPath of args.paths) {\n const state = await classifyInstalledFile(args.saasRoot, args.entry, recordedPath);\n if (state === InstalledFileState.MISSING) {\n plan.gone.push(recordedPath);\n } else if (state === InstalledFileState.UNTOUCHED) {\n plan.remove.push(recordedPath);\n } else if (args.force) {\n plan.forced.push({ path: recordedPath, backup: await backupApplicationFile(args.saasRoot, recordedPath, args.backupDirectory) });\n plan.remove.push(recordedPath);\n } else {\n plan.kept.push({ path: recordedPath, state });\n }\n }\n return plan;\n}\n\n/**\n * The `installedFileHashes` to record after a write: the hash of what was WRITTEN for every file the\n * write touched, and the PREVIOUS recorded hash for every file it kept.\n *\n * Carrying the previous hash is the whole point for a kept file: recording the hash of the\n * application's edited content would make the next update see it as untouched and overwrite it.\n */\nexport async function nextInstalledFileHashes(args: {\n saasRoot: string;\n ownedFiles: readonly string[];\n skipped: ReadonlySet<string>;\n previous?: Pick<RegistryModulesLockEntry, 'installedFileHashes'>;\n}): Promise<Record<string, string>> {\n const hashes: Record<string, string> = {};\n for (const owned of args.ownedFiles) {\n if (args.skipped.has(owned)) {\n const carried = args.previous ? recordedFileHash(args.previous, owned) : undefined;\n if (carried !== undefined) hashes[owned] = carried;\n continue;\n }\n hashes[owned] = await sha256OfFile(path.resolve(args.saasRoot, owned));\n }\n return hashes;\n}\n\nasync function isExistingFile(absolutePath: string): Promise<boolean> {\n try {\n return (await fs.stat(absolutePath)).isFile();\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false;\n throw error;\n }\n}\n"]}
1
+ {"version":3,"file":"installed-file-state.utils.js","sourceRoot":"","sources":["../../../../src/services/registry/installed-file-state.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAiC,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAYX;AAZD,WAAY,kBAAkB;IAC5B,yFAAyF;IACzF,6CAAuB,CAAA;IACvB,6GAA6G;IAC7G,uCAAiB,CAAA;IACjB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AAC,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,+FAA+F;AAC/F,KAAK,UAAU,iBAAiB,CAAC,QAAgB,EAAE,UAAkB,EAAE,eAAuB;IAC5F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACxE,IAAI,CAAC,CAAC,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,CAAC,MAAM,YAAY,CAAC,yBAAyB,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;AACzH,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,YAAoB;IAChD,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACrE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * Which installed module files the application changed (#2016).\n *\n * Paul, 2026-09-29: a module copied into an application (the shadcn model) is the application's to edit,\n * so updating it needs \"hash matching … with warning for potential override of the end user\". The\n * installer records the SHA-256 of every file it writes (`installedFileHashes` on the lockfile entry);\n * `update`, `remove` and `repair` compare the file on disk to that hash before touching it.\n *\n * The same shape as Debian and RPM conffile handling: a file the administrator never touched is replaced;\n * one they changed is kept, with a notice.\n */\n\nimport { createHash } from 'node:crypto';\nimport { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { Sha256DigestSchema, type RegistryModulesLockEntry } from '@wildo-ai/platform-config-lib';\nimport { resolveRecordedModuleFile } from './boundary-fanout.utils';\n\n/**\n * What the application has done to one installed file, measured against the hash the installer\n * recorded when it wrote it.\n */\nexport enum InstalledFileState {\n /** On disk and byte-identical to what the installer wrote: safe to replace or delete. */\n UNTOUCHED = 'untouched',\n /** On disk and different from what the installer wrote: the application changed it. Kept, with a warning. */\n EDITED = 'edited',\n /**\n * On disk, but no valid hash was recorded for it, so whether it changed cannot be known. Treated as\n * EDITED (kept, with a warning): a missing fingerprint may only make a command more careful.\n */\n UNKNOWN = 'unknown',\n /** Recorded, but not on disk: the application deleted it (or it was lost). */\n MISSING = 'missing',\n}\n\n/** States a command must not overwrite or delete without `--force`. */\nexport const PROTECTED_INSTALLED_FILE_STATES: ReadonlySet<InstalledFileState> = new Set([InstalledFileState.EDITED, InstalledFileState.UNKNOWN]);\n\n/** `sha256:<hex>` of a file's bytes, in the lockfile's digest format. */\nexport async function sha256OfFile(absolutePath: string): Promise<string> {\n return `sha256:${createHash('sha256').update(await fs.readFile(absolutePath)).digest('hex')}`;\n}\n\n/** The hash of each written file, as the installer wrote it. */\nexport async function hashWrittenFiles(saasRoot: string, appRelativePaths: readonly string[]): Promise<Record<string, string>> {\n const hashes: Record<string, string> = {};\n for (const appRelativePath of appRelativePaths) {\n hashes[appRelativePath] = await sha256OfFile(path.resolve(saasRoot, appRelativePath));\n }\n return hashes;\n}\n\n/** The recorded hash of one file, or `undefined` when none was recorded or it is malformed. */\nexport function recordedFileHash(entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>, appRelativePath: string): string | undefined {\n const recorded = entry.installedFileHashes?.[appRelativePath];\n return recorded !== undefined && Sha256DigestSchema.safeParse(recorded).success ? recorded : undefined;\n}\n\n/** Classify one recorded file of an installed module. */\nexport async function classifyInstalledFile(\n saasRoot: string,\n entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>,\n appRelativePath: string,\n): Promise<InstalledFileState> {\n const absolutePath = resolveRecordedModuleFile(saasRoot, appRelativePath);\n let isFile: boolean;\n try {\n isFile = (await fs.stat(absolutePath)).isFile();\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return InstalledFileState.MISSING;\n throw error;\n }\n if (!isFile) return InstalledFileState.UNKNOWN;\n const recorded = recordedFileHash(entry, appRelativePath);\n if (recorded === undefined) return InstalledFileState.UNKNOWN;\n return (await sha256OfFile(absolutePath)) === recorded ? InstalledFileState.UNTOUCHED : InstalledFileState.EDITED;\n}\n\n/** Classify every recorded file of an installed module, in `files` order. */\nexport async function classifyInstalledFiles(\n saasRoot: string,\n entry: Pick<RegistryModulesLockEntry, 'files' | 'installedFileHashes'>,\n): Promise<Map<string, InstalledFileState>> {\n const states = new Map<string, InstalledFileState>();\n for (const appRelativePath of entry.files) states.set(appRelativePath, await classifyInstalledFile(saasRoot, entry, appRelativePath));\n return states;\n}\n\n/**\n * Where `--force` keeps the application's version of a file before overwriting or deleting it:\n * `.wildo-saas/tmp/registry-backups/<moduleId>/<timestamp>/`. A per-run directory, so two forced runs\n * never overwrite each other's backups.\n */\nexport function registryForceBackupDirectory(saasRoot: string, moduleId: string, now: Date = new Date()): string {\n return path.join(saasRoot, '.wildo-saas', 'tmp', 'registry-backups', ...moduleId.split('/'), now.toISOString().replace(/[:.]/g, '-'));\n}\n\n/** Copy one application file into a force-backup directory, keeping its application-relative path. */\nexport async function backupApplicationFile(saasRoot: string, appRelativePath: string, backupDirectory: string): Promise<string> {\n const destination = path.join(backupDirectory, ...appRelativePath.split('/'));\n await fs.mkdir(path.dirname(destination), { recursive: true });\n await fs.copyFile(path.resolve(saasRoot, appRelativePath), destination);\n return destination;\n}\n\n/** One human line for a protected file a command left in place. */\nexport function describeProtectedFile(appRelativePath: string, state: InstalledFileState, verb: string): string {\n return state === InstalledFileState.UNKNOWN\n ? `kept ${appRelativePath}: no install hash is recorded for it, so whether you changed it cannot be told. Not ${verb}; pass --force to ${verb} it (a backup is kept).`\n : `kept ${appRelativePath}: you changed it since it was installed. Not ${verb}; pass --force to ${verb} it (a backup is kept), or merge the new version by hand.`;\n}\n\n/** A recorded file a command left in place, and why. */\nexport interface KeptInstalledFile {\n path: string;\n state: InstalledFileState;\n}\n\n/** What a write (add, update, repair) will do to each file the new version ships, decided before it writes. */\nexport interface ProtectedWritePlan {\n /** Passed to the fan-out as `skipPaths`: files that stay as the application has them. */\n skip: Set<string>;\n /** Recorded files the application changed (or that carry no hash): not overwritten. */\n kept: KeptInstalledFile[];\n /** Recorded files the application deleted: not recreated. */\n notRestored: string[];\n /** Files overwritten under `--force`, each with the backup of the application's version. */\n forced: Array<{ path: string; backup: string }>;\n}\n\n/**\n * Decide, per file the new version ships, whether a write may overwrite what is on disk (#2016):\n *\n * | recorded by this module? | on disk | action |\n * |---|---|---|\n * | yes, untouched | yes | overwrite |\n * | yes, edited or unknown, and byte-identical to the new version | yes | overwrite (a no-op), recording the new hash |\n * | yes, edited or unknown | yes | keep (or `--force`: back up, then overwrite) |\n * | yes | no (deleted) | not recreated (`restoreMissing` or `--force`: recreate) |\n * | no, another module owns it | yes | overwrite, with the fan-out's overlap warning |\n * | no, NO module owns it | yes | refuse, nothing written (or `--force`: back up, then overwrite) |\n * | no | no | create |\n *\n * The refusal is collected across every file and thrown before anything is written: a new version\n * must never silently replace a file the application authored itself.\n */\nexport async function planProtectedWrite(args: {\n saasRoot: string;\n moduleId: string;\n stagedPaths: readonly string[];\n /**\n * Where the new version is staged: each staged path is read from `<extractDir>/<path>`. An edited file whose bytes\n * already equal the new version's is not a conflict: there is nothing of the application's to keep, and keeping it\n * would carry the OLD install hash forward, so every later update would report it edited again (#3816: Wonder Todos'\n * Teams `backend.exports.ts` carried, by hand, the exact change 1.2.1 ships, and `update` kept it as \"changed\").\n */\n extractDir: string;\n /** The module's current entry; absent for a first install. */\n recorded?: Pick<RegistryModulesLockEntry, 'files' | 'installedFileHashes'>;\n force: boolean;\n /** `repair` recreates missing files: that is what it is for. */\n restoreMissing: boolean;\n backupDirectory: string;\n /** Who else owns a path; injected so the plan can be tested without a lockfile. */\n findOtherOwners: (paths: readonly string[]) => Promise<ReadonlyMap<string, readonly string[]>>;\n}): Promise<ProtectedWritePlan> {\n const { saasRoot, moduleId, stagedPaths, recorded, force, restoreMissing, backupDirectory } = args;\n const recordedSet = new Set(recorded?.files ?? []);\n const plan: ProtectedWritePlan = { skip: new Set(), kept: [], notRestored: [], forced: [] };\n const unrecordedPresent: string[] = [];\n\n for (const stagedPath of stagedPaths) {\n if (recordedSet.has(stagedPath)) {\n const state = await classifyInstalledFile(saasRoot, recorded!, stagedPath);\n if (PROTECTED_INSTALLED_FILE_STATES.has(state) && !(await matchesStagedFile(saasRoot, args.extractDir, stagedPath))) {\n if (force) {\n plan.forced.push({ path: stagedPath, backup: await backupApplicationFile(saasRoot, stagedPath, backupDirectory) });\n } else {\n plan.skip.add(stagedPath);\n plan.kept.push({ path: stagedPath, state });\n }\n } else if (state === InstalledFileState.MISSING && !restoreMissing && !force) {\n plan.skip.add(stagedPath);\n plan.notRestored.push(stagedPath);\n }\n continue;\n }\n if (await isExistingFile(path.resolve(saasRoot, stagedPath))) unrecordedPresent.push(stagedPath);\n }\n\n if (unrecordedPresent.length > 0) {\n const owners = await args.findOtherOwners(unrecordedPresent);\n const unowned = unrecordedPresent.filter((candidate) => (owners.get(candidate) ?? []).length === 0);\n if (unowned.length > 0 && !force) {\n throw new Error(\n `Refusing to install \"${moduleId}\": it would overwrite ${unowned.length} file(s) the application has and no module installed `\n + `(${unowned.join(', ')}). Nothing was written. Move them aside, or pass --force to overwrite them (a backup is kept).`,\n );\n }\n for (const candidate of unowned) {\n plan.forced.push({ path: candidate, backup: await backupApplicationFile(saasRoot, candidate, backupDirectory) });\n }\n }\n return plan;\n}\n\n/** What a removal (remove, or an update dropping files) will do to each recorded file, decided before it deletes. */\nexport interface ProtectedRemovalPlan {\n /** Untouched files, or edited ones under `--force`: delete these. */\n remove: string[];\n /** Files the application changed (or that carry no hash): left in place, now the application's own. */\n kept: KeptInstalledFile[];\n /** Files already gone. */\n gone: string[];\n /** Files deleted under `--force`, each with the backup of the application's version. */\n forced: Array<{ path: string; backup: string }>;\n}\n\n/**\n * Decide, per recorded file about to leave the module, whether it may be deleted (#2016). An edited\n * file is kept and becomes the application's own; `--force` deletes it after a backup.\n */\nexport async function planProtectedRemoval(args: {\n saasRoot: string;\n entry: Pick<RegistryModulesLockEntry, 'installedFileHashes'>;\n paths: readonly string[];\n force: boolean;\n backupDirectory: string;\n}): Promise<ProtectedRemovalPlan> {\n const plan: ProtectedRemovalPlan = { remove: [], kept: [], gone: [], forced: [] };\n for (const recordedPath of args.paths) {\n const state = await classifyInstalledFile(args.saasRoot, args.entry, recordedPath);\n if (state === InstalledFileState.MISSING) {\n plan.gone.push(recordedPath);\n } else if (state === InstalledFileState.UNTOUCHED) {\n plan.remove.push(recordedPath);\n } else if (args.force) {\n plan.forced.push({ path: recordedPath, backup: await backupApplicationFile(args.saasRoot, recordedPath, args.backupDirectory) });\n plan.remove.push(recordedPath);\n } else {\n plan.kept.push({ path: recordedPath, state });\n }\n }\n return plan;\n}\n\n/**\n * The `installedFileHashes` to record after a write: the hash of what was WRITTEN for every file the\n * write touched, and the PREVIOUS recorded hash for every file it kept.\n *\n * Carrying the previous hash is the whole point for a kept file: recording the hash of the\n * application's edited content would make the next update see it as untouched and overwrite it.\n */\nexport async function nextInstalledFileHashes(args: {\n saasRoot: string;\n ownedFiles: readonly string[];\n skipped: ReadonlySet<string>;\n previous?: Pick<RegistryModulesLockEntry, 'installedFileHashes'>;\n}): Promise<Record<string, string>> {\n const hashes: Record<string, string> = {};\n for (const owned of args.ownedFiles) {\n if (args.skipped.has(owned)) {\n const carried = args.previous ? recordedFileHash(args.previous, owned) : undefined;\n if (carried !== undefined) hashes[owned] = carried;\n continue;\n }\n hashes[owned] = await sha256OfFile(path.resolve(args.saasRoot, owned));\n }\n return hashes;\n}\n\n/** Whether the application's file is byte-identical to the staged one (both regular files). */\nasync function matchesStagedFile(saasRoot: string, extractDir: string, appRelativePath: string): Promise<boolean> {\n const stagedPath = path.join(extractDir, ...appRelativePath.split('/'));\n if (!(await isExistingFile(stagedPath))) return false;\n return (await sha256OfFile(resolveRecordedModuleFile(saasRoot, appRelativePath))) === (await sha256OfFile(stagedPath));\n}\n\nasync function isExistingFile(absolutePath: string): Promise<boolean> {\n try {\n return (await fs.stat(absolutePath)).isFile();\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false;\n throw error;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"module-install.service.d.ts","sourceRoot":"","sources":["../../../../src/services/registry/module-install.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAuD,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACnI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AAIpC,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErD,kHAAkH;AAClH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,mHAAmH;IACnH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,gBAAgB;AACxB,mHAAmH;AACnH,KAAK,EAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpH,OAAO,CAAC,cAAc,CAAC,CAuCzB;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,iGAAiG;IACjG,QAAQ,CAAC,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAC;IAClD,uFAAuF;IACvF,QAAQ,CAAC,0BAA0B,EAAE,SAAS,MAAM,EAAE,CAAC;IACvD,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,wGAAwG;IACxG,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;CAChC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA6GhC"}
1
+ {"version":3,"file":"module-install.service.d.ts","sourceRoot":"","sources":["../../../../src/services/registry/module-install.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAuD,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACnI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AAIpC,6CAA6C;AAC7C,MAAM,MAAM,gBA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AO,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;CAChC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA8GhC"}
@@ -118,6 +118,7 @@ export async function installAcquiredModule(input) {
118
118
  // #2016: never silently replace a file the application authored itself.
119
119
  const writePlan = await planProtectedWrite({
120
120
  saasRoot,
121
+ extractDir: paths.extractDir,
121
122
  moduleId: parsed.moduleId,
122
123
  stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),
123
124
  force: input.force,
@@ -1 +1 @@
1
- {"version":3,"file":"module-install.service.js","sourceRoot":"","sources":["../../../../src/services/registry/module-install.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAiC,MAAM,+BAA+B,CAAC;AAEnI,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,GAElC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1H,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACzH,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClI,O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mBAAmB,CAAC,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC;QACpH,CAAC;QACD,OAAO,GAAG;YACR,OAAO;YACP,eAAe,EAAE,oBAAoB,KAAK,SAAS;YACnD,aAAa,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;YACjE,qBAAqB,EAAE,mBAAmB,CAAC,qBAAqB;YAChE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC;YAC/F,KAAK;SACN,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,QAAQ,+BAA+B,CAAC,CAAC;IAC7G,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Installing a registry module into an application: the pipeline `wildo registry add` runs, as a service, so the\n * one other door that installs a module — `wildo init --blueprint`, for the modules a blueprint REFERENCES (#2879) —\n * runs exactly the same steps and writes exactly the same lockfile entry.\n *\n * Two halves, because they have different preconditions:\n *\n * - `acquireModuleForInstall` RESOLVES a spec to one version and fetches its bytes: from the framework checkout for a\n * `wildo/...` spec inside a checkout (#2015), from the registry otherwise, integrity-checked against the digest the\n * registry resolved. It needs only a command context and a registry; nothing is written into the application.\n * - `installAcquiredModule` writes it: stage, check the staged manifest against the request and the host's\n * requirements, fan the files out inside the manifest's boundaries without silently replacing an application file\n * (#2016), register the module in the host's registries (#1755), and record the lockfile entry — all under the\n * workspace mutation lock, rolled back if the lockfile write fails.\n *\n * What stays with each caller is what differs between them: `registry add` runs `pnpm install` and the provider sync\n * right after, while `wildo init` installs before its own `pnpm install` and leaves the sync to `wildo config sync`.\n */\n\nimport { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { RegistryLockfileService, RegistryServerClient } from '@wildo-ai/wildo-module-client';\nimport { DEFAULT_REGISTRY_ID, ModuleDistribution, ModuleKind, type RegistryModulesLockEntry } from '@wildo-ai/platform-config-lib';\nimport type { CommandContext } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { RegistryCredentialsService } from './registry-credentials.service';\nimport {\n assertModuleEntryUnchangedUnderLock,\n resolveRegistryUrlForCommand,\n withRegistryWorkspaceMutationLock,\n type ParsedModuleSpec,\n} from './registry-command.utils';\nimport { fanOutToSaasSource, readStagedManifest, rollbackFanOut, validatedStagedAppFiles } from './boundary-fanout.utils';\nimport { nextInstalledFileHashes, planProtectedWrite, registryForceBackupDirectory } from './installed-file-state.utils';\nimport { findResourceConfigurationFiles } from './migration-obligation.utils';\nimport { deriveProviderRegistration, registerModuleForInstall, rollbackInstallRegistration } from './module-registration.service';\nimport { reportRegistrationOutcome } from './provider-wiring.service';\nimport { moduleArtifactPaths } from './module-artifact-files.utils';\nimport { localCheckoutRootFor, resolveLocalCheckoutModule } from './local-checkout-module-source.service';\nimport {\n describeAcquisition,\n lockEntryProvenance,\n moduleRequirementsOriginOf,\n stageModuleAcquisition,\n type ModuleAcquisition,\n} from './module-acquisition.utils';\nimport { checkModuleRequirements } from './module-requirements.service';\nimport { assertStagedManifestMatchesRequest } from './artifact-trust.utils';\n\n/** The operator log an install writes to. */\nexport type ModuleInstallLog = CommandContext['log'];\n\n/** A resolved, fetched module version, ready to install, and the registry credential that fetched it (if any). */\nexport interface AcquiredModule {\n readonly parsed: ParsedModuleSpec;\n readonly acquisition: ModuleAcquisition;\n /** The registry URL whose stored credential was used, so the caller can mark it used once the install succeeds. */\n readonly credentialUrl?: string;\n}\n\n/**\n * Resolve `parsed` to one version and fetch it. Inside a framework checkout, a `wildo/...` spec with no registry flag\n * is served by the checkout itself (#2015); anything else comes from the registry `registryFlag` resolves to.\n */\nexport async function acquireModuleForInstall(\n ctx: CommandContext,\n parsed: ParsedModuleSpec,\n /** `saasRoot` is the application whose registry configuration applies; absent before one exists (`wildo init`). */\n input: { readonly registryFlag?: string | undefined; readonly saasRoot?: string | undefined; readonly label: string },\n): Promise<AcquiredModule> {\n const localCheckoutRoot = localCheckoutRootFor(ctx, { domain: parsed.domain, ...(input.registryFlag === undefined ? {} : { registryFlag: input.registryFlag }) });\n if (localCheckoutRoot !== undefined) {\n const local = await resolveLocalCheckoutModule({ frameworkRoot: localCheckoutRoot, domain: parsed.domain, moduleId: parsed.moduleId, range: parsed.range });\n return { parsed, acquisition: { distribution: ModuleDistribution.LOCAL_CHECKOUT, version: local.version, local } };\n }\n const resolved = await resolveRegistryUrlForCommand(ctx, { ...(input.registryFlag === undefined ? {} : { flag: input.registryFlag }), ...(input.saasRoot === undefined ? {} : { saasRoot: input.saasRoot }) });\n ctx.log.info(`[${input.label}] resolving ${parsed.moduleId}@${parsed.range} on ${resolved.url} (${resolved.source})`);\n const credential = await RegistryCredentialsService.get(resolved.url);\n const clientOptions = { baseUrl: resolved.url, authToken: credential?.rawToken };\n // Resolve the range to one exact version and its digest.\n const { version, artifactDigest, yanked } = await RegistryServerClient.resolve(clientOptions, {\n domain: parsed.domain,\n moduleId: parsed.moduleId,\n range: parsed.range,\n });\n if (yanked) {\n // Only an exact pin reaches a yanked release (#1758); install it, but say so.\n ctx.log.warn(` ${parsed.moduleId}@${version} is YANKED (${yanked.yankedAt}${yanked.reason ? `: ${yanked.reason}` : ''}). Installing the pinned release; pick a live one with a range.`);\n }\n // Download the bytes, verified against the resolved digest (KD-9: a mismatch throws).\n const { bytes } = await RegistryServerClient.download(clientOptions, {\n domain: parsed.domain,\n moduleId: parsed.moduleId,\n version,\n expectedDigest: artifactDigest,\n });\n ctx.log.info(` downloaded → ${bytes.byteLength} bytes`);\n return {\n parsed,\n acquisition: {\n distribution: ModuleDistribution.REGISTRY,\n version,\n artifactDigest,\n bytes,\n registry: { url: resolved.url, id: resolved.id ?? DEFAULT_REGISTRY_ID },\n },\n ...(credential ? { credentialUrl: resolved.url } : {}),\n };\n}\n\n/** What an install did that its caller acts on afterwards. */\nexport interface ModuleInstallOutcome {\n readonly version: string;\n /** A provider module was installed: its packages must be installed before anything discovers them. */\n readonly changedProvider: boolean;\n /** The provider ships skills (#2026). */\n readonly carriesSkills: boolean;\n /** The install-script names this install newly allowed (#2801), rebuilt after `pnpm install`. */\n readonly allowedInstallScripts: readonly string[];\n /** The module's resource configuration files, for the migration obligation (#1757). */\n readonly resourceConfigurationFiles: readonly string[];\n /** The lockfile entry written. */\n readonly entry: RegistryModulesLockEntry;\n}\n\n/**\n * Install an acquired module into `saasRoot`, under the workspace mutation lock. Refuses a module that is already\n * installed (it moves only through `update`) and a blueprint (#2861). Throws, having rolled the files and the\n * registration back, when the lockfile cannot be written.\n */\nexport async function installAcquiredModule(input: {\n readonly saasRoot: string;\n readonly frameworkRoot: string | null;\n readonly acquired: AcquiredModule;\n /** Overwrite application files no module installed, keeping a backup (`wildo registry add --force`). */\n readonly force: boolean;\n readonly log: ModuleInstallLog;\n}): Promise<ModuleInstallOutcome> {\n const { saasRoot, acquired, log } = input;\n const { parsed, acquisition } = acquired;\n const version = acquisition.version;\n log.info(` resolved → ${describeAcquisition(parsed.moduleId, acquisition)}`);\n let outcome: ModuleInstallOutcome | undefined;\n await withRegistryWorkspaceMutationLock(saasRoot, async () => {\n // Decided before the lock (\"not installed\"); re-confirmed under it.\n await assertModuleEntryUnchangedUnderLock(saasRoot, parsed.moduleId, undefined);\n // Stage the version where the fan-out reads it (the extracted artifact, or the checkout copy).\n const paths = moduleArtifactPaths(saasRoot, parsed.domain, parsed.moduleId, version);\n const stagedCount = await stageModuleAcquisition(acquisition, paths, saasRoot);\n log.success(` staged ${stagedCount} file(s) → ${path.relative(saasRoot, paths.extractDir)}/`);\n\n // The staged manifest is the source of truth for the boundary allow-list (KD-12).\n const stagedManifest = await readStagedManifest(paths.extractDir);\n assertStagedManifestMatchesRequest(stagedManifest, { moduleId: parsed.moduleId, version });\n // #2861: a blueprint is applied by `wildo init --blueprint`, never installed into an existing application. Its\n // staged copy can never become an install, so it does not stay in the application's generated tree.\n if (stagedManifest.kind === ModuleKind.BLUEPRINT) {\n await fs.rm(paths.extractDir, { recursive: true, force: true });\n await fs.rm(paths.zip, { force: true });\n throw new Error(`${stagedManifest.id} is a blueprint: it starts a new application with \\`wildo init --blueprint\\` and is never installed into an existing one.`);\n }\n for (const notice of await checkModuleRequirements(saasRoot, stagedManifest, moduleRequirementsOriginOf(acquisition))) log.warn(notice);\n // #2014: a provider module is wired into THIS application's own runtimes. Derived before a single file is\n // written, so a refusal (no backend service to own a backend facet) leaves the application untouched.\n const providerRegistration = stagedManifest.kind === ModuleKind.PROVIDER ? await deriveProviderRegistration(saasRoot, stagedManifest) : undefined;\n // M9 backup dir: sibling to `extractDir` so the fan-out walker doesn't traverse it. Cleaned up after a\n // successful fan-out.\n await fs.rm(paths.backupDir, { recursive: true, force: true });\n // #2016: never silently replace a file the application authored itself.\n const writePlan = await planProtectedWrite({\n saasRoot,\n moduleId: parsed.moduleId,\n stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),\n force: input.force,\n restoreMissing: false,\n backupDirectory: registryForceBackupDirectory(saasRoot, parsed.moduleId),\n findOtherOwners: (candidates) => RegistryLockfileService.findFileOwners({ saasRoot, paths: candidates, excludeModuleId: parsed.moduleId }),\n });\n for (const forced of writePlan.forced) log.warn(` overwrote ${forced.path} (--force); the application's version is at ${path.relative(saasRoot, forced.backup)}`);\n const fanOut = await fanOutToSaasSource({\n saasRoot,\n extractDir: paths.extractDir,\n manifest: stagedManifest,\n moduleId: parsed.moduleId,\n backupDir: paths.backupDir,\n skipPaths: writePlan.skip,\n });\n log.success(` wrote ${fanOut.writtenFiles.length} app source file(s) per manifest.boundaries`);\n for (const warning of fanOut.overlapWarnings) {\n log.warn(` [overlap] \"${warning.path}\" was also claimed by \"${warning.otherModuleId}\" — overwritten by ${parsed.moduleId}.`);\n }\n\n // #1755: register the module in the host's registries (or mark why it is not).\n const registrationOutcome = registerModuleForInstall(saasRoot, input.frameworkRoot, stagedManifest, undefined, providerRegistration);\n reportRegistrationOutcome(log, registrationOutcome, saasRoot);\n\n // The lockfile entry; `files[]` records the application paths so `remove` can clean them up symmetrically. If its\n // write fails after the fan-out succeeded, the application source is rolled back so a half-applied install does\n // not leak into the repository.\n const entry: RegistryModulesLockEntry = {\n moduleId: parsed.moduleId,\n ...lockEntryProvenance(acquisition),\n domain: parsed.domain,\n version,\n requestedRange: parsed.range,\n installedAt: new Date().toISOString(),\n files: fanOut.ownedFiles,\n installedFileHashes: await nextInstalledFileHashes({ saasRoot, ownedFiles: fanOut.ownedFiles, skipped: writePlan.skip }),\n source: 'install',\n ...(registrationOutcome.registration ? { registration: registrationOutcome.registration } : {}),\n };\n try {\n await RegistryLockfileService.upsertEntry(saasRoot, entry);\n } catch (lockErr) {\n log.error(` lockfile write failed — rolling back ${fanOut.writtenFiles.length} fan-out file(s).`);\n // `rollbackFanOut` swallows per-file errors itself; this guard stays for a future change that lets them out.\n try {\n rollbackInstallRegistration(saasRoot, registrationOutcome.snapshots);\n await rollbackFanOut({ saasRoot, result: fanOut });\n } catch (rbErr) {\n log.error(` rollback failed: ${ErrorUtils.extractErrorMessage(rbErr)} — SaaS source may be in a partially-applied state.`);\n }\n // Drop the artifact dir and backup so the install can be retried cleanly. Each cleanup is best-effort: a cleanup\n // failure must never mask the lockfile error that is being surfaced.\n await fs.rm(paths.extractDir, { recursive: true, force: true }).catch(() => {});\n await fs.rm(paths.backupDir, { recursive: true, force: true }).catch(() => {});\n await fs.rm(paths.zip, { force: true }).catch(() => {});\n throw lockErr;\n }\n // Successful install: the backup is no longer needed once the lockfile records the new entry.\n await fs.rm(paths.backupDir, { recursive: true, force: true }).catch(() => {});\n log.success(' lockfile updated');\n if (registrationOutcome.registration) {\n log.success(` registered in the application's module registries (${registrationOutcome.registration.moduleId})`);\n }\n outcome = {\n version,\n changedProvider: providerRegistration !== undefined,\n carriesSkills: (stagedManifest.provider?.skills?.length ?? 0) > 0,\n allowedInstallScripts: registrationOutcome.allowedInstallScripts,\n resourceConfigurationFiles: await findResourceConfigurationFiles(saasRoot, fanOut.writtenFiles),\n entry,\n };\n });\n if (outcome === undefined) throw new Error(`The install of ${parsed.moduleId} finished without an outcome.`);\n return outcome;\n}\n"]}
1
+ {"version":3,"file":"module-install.service.js","sourceRoot":"","sources":["../../../../src/services/registry/module-install.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAiC,MAAM,+BAA+B,CAAC;AAEnI,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,GAElC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1H,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACzH,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClI,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAC1G,OAAO,EACL,mBAA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,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;YACjE,qBAAqB,EAAE,mBAAmB,CAAC,qBAAqB;YAChE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC;YAC/F,KAAK;SACN,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,QAAQ,+BAA+B,CAAC,CAAC;IAC7G,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Installing a registry module into an application: the pipeline `wildo registry add` runs, as a service, so the\n * one other door that installs a module — `wildo init --blueprint`, for the modules a blueprint REFERENCES (#2879) —\n * runs exactly the same steps and writes exactly the same lockfile entry.\n *\n * Two halves, because they have different preconditions:\n *\n * - `acquireModuleForInstall` RESOLVES a spec to one version and fetches its bytes: from the framework checkout for a\n * `wildo/...` spec inside a checkout (#2015), from the registry otherwise, integrity-checked against the digest the\n * registry resolved. It needs only a command context and a registry; nothing is written into the application.\n * - `installAcquiredModule` writes it: stage, check the staged manifest against the request and the host's\n * requirements, fan the files out inside the manifest's boundaries without silently replacing an application file\n * (#2016), register the module in the host's registries (#1755), and record the lockfile entry — all under the\n * workspace mutation lock, rolled back if the lockfile write fails.\n *\n * What stays with each caller is what differs between them: `registry add` runs `pnpm install` and the provider sync\n * right after, while `wildo init` installs before its own `pnpm install` and leaves the sync to `wildo config sync`.\n */\n\nimport { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { RegistryLockfileService, RegistryServerClient } from '@wildo-ai/wildo-module-client';\nimport { DEFAULT_REGISTRY_ID, ModuleDistribution, ModuleKind, type RegistryModulesLockEntry } from '@wildo-ai/platform-config-lib';\nimport type { CommandContext } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { RegistryCredentialsService } from './registry-credentials.service';\nimport {\n assertModuleEntryUnchangedUnderLock,\n resolveRegistryUrlForCommand,\n withRegistryWorkspaceMutationLock,\n type ParsedModuleSpec,\n} from './registry-command.utils';\nimport { fanOutToSaasSource, readStagedManifest, rollbackFanOut, validatedStagedAppFiles } from './boundary-fanout.utils';\nimport { nextInstalledFileHashes, planProtectedWrite, registryForceBackupDirectory } from './installed-file-state.utils';\nimport { findResourceConfigurationFiles } from './migration-obligation.utils';\nimport { deriveProviderRegistration, registerModuleForInstall, rollbackInstallRegistration } from './module-registration.service';\nimport { reportRegistrationOutcome } from './provider-wiring.service';\nimport { moduleArtifactPaths } from './module-artifact-files.utils';\nimport { localCheckoutRootFor, resolveLocalCheckoutModule } from './local-checkout-module-source.service';\nimport {\n describeAcquisition,\n lockEntryProvenance,\n moduleRequirementsOriginOf,\n stageModuleAcquisition,\n type ModuleAcquisition,\n} from './module-acquisition.utils';\nimport { checkModuleRequirements } from './module-requirements.service';\nimport { assertStagedManifestMatchesRequest } from './artifact-trust.utils';\n\n/** The operator log an install writes to. */\nexport type ModuleInstallLog = CommandContext['log'];\n\n/** A resolved, fetched module version, ready to install, and the registry credential that fetched it (if any). */\nexport interface AcquiredModule {\n readonly parsed: ParsedModuleSpec;\n readonly acquisition: ModuleAcquisition;\n /** The registry URL whose stored credential was used, so the caller can mark it used once the install succeeds. */\n readonly credentialUrl?: string;\n}\n\n/**\n * Resolve `parsed` to one version and fetch it. Inside a framework checkout, a `wildo/...` spec with no registry flag\n * is served by the checkout itself (#2015); anything else comes from the registry `registryFlag` resolves to.\n */\nexport async function acquireModuleForInstall(\n ctx: CommandContext,\n parsed: ParsedModuleSpec,\n /** `saasRoot` is the application whose registry configuration applies; absent before one exists (`wildo init`). */\n input: { readonly registryFlag?: string | undefined; readonly saasRoot?: string | undefined; readonly label: string },\n): Promise<AcquiredModule> {\n const localCheckoutRoot = localCheckoutRootFor(ctx, { domain: parsed.domain, ...(input.registryFlag === undefined ? {} : { registryFlag: input.registryFlag }) });\n if (localCheckoutRoot !== undefined) {\n const local = await resolveLocalCheckoutModule({ frameworkRoot: localCheckoutRoot, domain: parsed.domain, moduleId: parsed.moduleId, range: parsed.range });\n return { parsed, acquisition: { distribution: ModuleDistribution.LOCAL_CHECKOUT, version: local.version, local } };\n }\n const resolved = await resolveRegistryUrlForCommand(ctx, { ...(input.registryFlag === undefined ? {} : { flag: input.registryFlag }), ...(input.saasRoot === undefined ? {} : { saasRoot: input.saasRoot }) });\n ctx.log.info(`[${input.label}] resolving ${parsed.moduleId}@${parsed.range} on ${resolved.url} (${resolved.source})`);\n const credential = await RegistryCredentialsService.get(resolved.url);\n const clientOptions = { baseUrl: resolved.url, authToken: credential?.rawToken };\n // Resolve the range to one exact version and its digest.\n const { version, artifactDigest, yanked } = await RegistryServerClient.resolve(clientOptions, {\n domain: parsed.domain,\n moduleId: parsed.moduleId,\n range: parsed.range,\n });\n if (yanked) {\n // Only an exact pin reaches a yanked release (#1758); install it, but say so.\n ctx.log.warn(` ${parsed.moduleId}@${version} is YANKED (${yanked.yankedAt}${yanked.reason ? `: ${yanked.reason}` : ''}). Installing the pinned release; pick a live one with a range.`);\n }\n // Download the bytes, verified against the resolved digest (KD-9: a mismatch throws).\n const { bytes } = await RegistryServerClient.download(clientOptions, {\n domain: parsed.domain,\n moduleId: parsed.moduleId,\n version,\n expectedDigest: artifactDigest,\n });\n ctx.log.info(` downloaded → ${bytes.byteLength} bytes`);\n return {\n parsed,\n acquisition: {\n distribution: ModuleDistribution.REGISTRY,\n version,\n artifactDigest,\n bytes,\n registry: { url: resolved.url, id: resolved.id ?? DEFAULT_REGISTRY_ID },\n },\n ...(credential ? { credentialUrl: resolved.url } : {}),\n };\n}\n\n/** What an install did that its caller acts on afterwards. */\nexport interface ModuleInstallOutcome {\n readonly version: string;\n /** A provider module was installed: its packages must be installed before anything discovers them. */\n readonly changedProvider: boolean;\n /** The provider ships skills (#2026). */\n readonly carriesSkills: boolean;\n /** The install-script names this install newly allowed (#2801), rebuilt after `pnpm install`. */\n readonly allowedInstallScripts: readonly string[];\n /** The module's resource configuration files, for the migration obligation (#1757). */\n readonly resourceConfigurationFiles: readonly string[];\n /** The lockfile entry written. */\n readonly entry: RegistryModulesLockEntry;\n}\n\n/**\n * Install an acquired module into `saasRoot`, under the workspace mutation lock. Refuses a module that is already\n * installed (it moves only through `update`) and a blueprint (#2861). Throws, having rolled the files and the\n * registration back, when the lockfile cannot be written.\n */\nexport async function installAcquiredModule(input: {\n readonly saasRoot: string;\n readonly frameworkRoot: string | null;\n readonly acquired: AcquiredModule;\n /** Overwrite application files no module installed, keeping a backup (`wildo registry add --force`). */\n readonly force: boolean;\n readonly log: ModuleInstallLog;\n}): Promise<ModuleInstallOutcome> {\n const { saasRoot, acquired, log } = input;\n const { parsed, acquisition } = acquired;\n const version = acquisition.version;\n log.info(` resolved → ${describeAcquisition(parsed.moduleId, acquisition)}`);\n let outcome: ModuleInstallOutcome | undefined;\n await withRegistryWorkspaceMutationLock(saasRoot, async () => {\n // Decided before the lock (\"not installed\"); re-confirmed under it.\n await assertModuleEntryUnchangedUnderLock(saasRoot, parsed.moduleId, undefined);\n // Stage the version where the fan-out reads it (the extracted artifact, or the checkout copy).\n const paths = moduleArtifactPaths(saasRoot, parsed.domain, parsed.moduleId, version);\n const stagedCount = await stageModuleAcquisition(acquisition, paths, saasRoot);\n log.success(` staged ${stagedCount} file(s) → ${path.relative(saasRoot, paths.extractDir)}/`);\n\n // The staged manifest is the source of truth for the boundary allow-list (KD-12).\n const stagedManifest = await readStagedManifest(paths.extractDir);\n assertStagedManifestMatchesRequest(stagedManifest, { moduleId: parsed.moduleId, version });\n // #2861: a blueprint is applied by `wildo init --blueprint`, never installed into an existing application. Its\n // staged copy can never become an install, so it does not stay in the application's generated tree.\n if (stagedManifest.kind === ModuleKind.BLUEPRINT) {\n await fs.rm(paths.extractDir, { recursive: true, force: true });\n await fs.rm(paths.zip, { force: true });\n throw new Error(`${stagedManifest.id} is a blueprint: it starts a new application with \\`wildo init --blueprint\\` and is never installed into an existing one.`);\n }\n for (const notice of await checkModuleRequirements(saasRoot, stagedManifest, moduleRequirementsOriginOf(acquisition))) log.warn(notice);\n // #2014: a provider module is wired into THIS application's own runtimes. Derived before a single file is\n // written, so a refusal (no backend service to own a backend facet) leaves the application untouched.\n const providerRegistration = stagedManifest.kind === ModuleKind.PROVIDER ? await deriveProviderRegistration(saasRoot, stagedManifest) : undefined;\n // M9 backup dir: sibling to `extractDir` so the fan-out walker doesn't traverse it. Cleaned up after a\n // successful fan-out.\n await fs.rm(paths.backupDir, { recursive: true, force: true });\n // #2016: never silently replace a file the application authored itself.\n const writePlan = await planProtectedWrite({\n saasRoot,\n extractDir: paths.extractDir,\n moduleId: parsed.moduleId,\n stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),\n force: input.force,\n restoreMissing: false,\n backupDirectory: registryForceBackupDirectory(saasRoot, parsed.moduleId),\n findOtherOwners: (candidates) => RegistryLockfileService.findFileOwners({ saasRoot, paths: candidates, excludeModuleId: parsed.moduleId }),\n });\n for (const forced of writePlan.forced) log.warn(` overwrote ${forced.path} (--force); the application's version is at ${path.relative(saasRoot, forced.backup)}`);\n const fanOut = await fanOutToSaasSource({\n saasRoot,\n extractDir: paths.extractDir,\n manifest: stagedManifest,\n moduleId: parsed.moduleId,\n backupDir: paths.backupDir,\n skipPaths: writePlan.skip,\n });\n log.success(` wrote ${fanOut.writtenFiles.length} app source file(s) per manifest.boundaries`);\n for (const warning of fanOut.overlapWarnings) {\n log.warn(` [overlap] \"${warning.path}\" was also claimed by \"${warning.otherModuleId}\" — overwritten by ${parsed.moduleId}.`);\n }\n\n // #1755: register the module in the host's registries (or mark why it is not).\n const registrationOutcome = registerModuleForInstall(saasRoot, input.frameworkRoot, stagedManifest, undefined, providerRegistration);\n reportRegistrationOutcome(log, registrationOutcome, saasRoot);\n\n // The lockfile entry; `files[]` records the application paths so `remove` can clean them up symmetrically. If its\n // write fails after the fan-out succeeded, the application source is rolled back so a half-applied install does\n // not leak into the repository.\n const entry: RegistryModulesLockEntry = {\n moduleId: parsed.moduleId,\n ...lockEntryProvenance(acquisition),\n domain: parsed.domain,\n version,\n requestedRange: parsed.range,\n installedAt: new Date().toISOString(),\n files: fanOut.ownedFiles,\n installedFileHashes: await nextInstalledFileHashes({ saasRoot, ownedFiles: fanOut.ownedFiles, skipped: writePlan.skip }),\n source: 'install',\n ...(registrationOutcome.registration ? { registration: registrationOutcome.registration } : {}),\n };\n try {\n await RegistryLockfileService.upsertEntry(saasRoot, entry);\n } catch (lockErr) {\n log.error(` lockfile write failed — rolling back ${fanOut.writtenFiles.length} fan-out file(s).`);\n // `rollbackFanOut` swallows per-file errors itself; this guard stays for a future change that lets them out.\n try {\n rollbackInstallRegistration(saasRoot, registrationOutcome.snapshots);\n await rollbackFanOut({ saasRoot, result: fanOut });\n } catch (rbErr) {\n log.error(` rollback failed: ${ErrorUtils.extractErrorMessage(rbErr)} — SaaS source may be in a partially-applied state.`);\n }\n // Drop the artifact dir and backup so the install can be retried cleanly. Each cleanup is best-effort: a cleanup\n // failure must never mask the lockfile error that is being surfaced.\n await fs.rm(paths.extractDir, { recursive: true, force: true }).catch(() => {});\n await fs.rm(paths.backupDir, { recursive: true, force: true }).catch(() => {});\n await fs.rm(paths.zip, { force: true }).catch(() => {});\n throw lockErr;\n }\n // Successful install: the backup is no longer needed once the lockfile records the new entry.\n await fs.rm(paths.backupDir, { recursive: true, force: true }).catch(() => {});\n log.success(' lockfile updated');\n if (registrationOutcome.registration) {\n log.success(` registered in the application's module registries (${registrationOutcome.registration.moduleId})`);\n }\n outcome = {\n version,\n changedProvider: providerRegistration !== undefined,\n carriesSkills: (stagedManifest.provider?.skills?.length ?? 0) > 0,\n allowedInstallScripts: registrationOutcome.allowedInstallScripts,\n resourceConfigurationFiles: await findResourceConfigurationFiles(saasRoot, fanOut.writtenFiles),\n entry,\n };\n });\n if (outcome === undefined) throw new Error(`The install of ${parsed.moduleId} finished without an outcome.`);\n return outcome;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-module-scaffold.service.d.ts","sourceRoot":"","sources":["../../../../src/services/registry/provider-module-scaffold.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAA2C,6BAA6B,EAAE,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAGvJ,OAAO,EAQL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACxB,MAAM,mEAAmE,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AAEvE,uDAAuD;AACvD,oBAAY,oBAAoB;IAC9B,mEAAmE;IACnE,OAAO,YAAY;IACnB,+EAA+E;IAC/E,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,sGAAsG;IACtG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uGAAuG;IACvG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+FAA+F;IAC/F,QAAQ,CAAC,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAA;KAAE,CAAC;IACjL,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,2FAA2F;IAC3F,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,Y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C,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACxJ;AA4CD,uHAAuH;AACvH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAC;CAC7E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,GAAG,eAAe,EAAE,CA8I5H;AAgVD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,0BAA0B,CAAC;IAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAA;CAAE,CAAC,CAWhM;AAED,iHAAiH;AACjH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB,CA8D1F"}
1
+ {"version":3,"file":"provider-module-scaffold.service.d.ts","sourceRoot":"","sources":["../../../../src/services/registry/provider-module-scaffold.service.ts"],"names":[],"mappings":"AAAA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EAAE,aAAa,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACxJ;AA4CD,uHAAuH;AACvH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAC;CAC7E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,GAAG,eAAe,EAAE,CA8I5H;AAoVD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,0BAA0B,CAAC;IAAC,MAAM,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAA;CAAE,CAAC,CAWhM;AAED,iHAAiH;AACjH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB,CA8D1F"}
@@ -509,6 +509,7 @@ function renderCompanionExports(input) {
509
509
  * \`wildo registry add\` rewrites to the installing application's scope.
510
510
  */
511
511
  import { describeProviderConnectionParameterNames, describeProviderVendorRegistrationSteps } from '@wildo-ai/external-connectors-models';
512
+ import { describeProviderProtocolSecretSlots } from '@wildo-ai/saas-models';
512
513
  import type { ProviderCompanionContribution, RuntimeOwnerCompanionExports } from '@wildo-ai/saas-models';
513
514
  import { ${name} } from './backend.exports.js';
514
515
 
@@ -529,6 +530,9 @@ export const providerContributions: ProviderCompanionContribution[] = [
529
530
  engineCapabilities: [],
530
531
  providerCapabilities: [],
531
532
  protocols: module.protocols.map((binding) => binding.protocol),
533
+ // Which arm reads which secret (#2054), so \`wildo secrets\` attributes a slot only to a runtime whose scope enables an
534
+ // arm reading it (#3837).
535
+ protocolSecretSlots: describeProviderProtocolSecretSlots(module.secretsContract, module.protocols),
532
536
  secretsContractShape: Object.entries(module.secretsContract)
533
537
  .map(([slug, entry]) => ({ slug, envVarName: entry.envVarName, required: entry.required, description: entry.description }))
534
538
  .sort((a, b) => a.slug.localeCompare(b.slug)),