@wildo-ai/wildo-cli 1.1.9 → 1.1.10

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 (833) hide show
  1. package/dist/bin/wildo.d.ts.map +1 -1
  2. package/dist/bin/wildo.js +0 -0
  3. package/dist/bin/wildo.js.map +1 -1
  4. package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
  5. package/dist/src/commands/acp/probe.command.js.map +1 -1
  6. package/dist/src/commands/align-deps.command.d.ts.map +1 -1
  7. package/dist/src/commands/align-deps.command.js.map +1 -1
  8. package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
  9. package/dist/src/commands/assets/sync.command.js.map +1 -1
  10. package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
  11. package/dist/src/commands/brand/propagate.command.js.map +1 -1
  12. package/dist/src/commands/build/accept.command.d.ts.map +1 -1
  13. package/dist/src/commands/build/accept.command.js.map +1 -1
  14. package/dist/src/commands/build/dispatches.command.d.ts.map +1 -1
  15. package/dist/src/commands/build/dispatches.command.js.map +1 -1
  16. package/dist/src/commands/build/next.command.d.ts.map +1 -1
  17. package/dist/src/commands/build/next.command.js.map +1 -1
  18. package/dist/src/commands/build/rearm.command.d.ts.map +1 -1
  19. package/dist/src/commands/build/rearm.command.js.map +1 -1
  20. package/dist/src/commands/build/run.command.d.ts.map +1 -1
  21. package/dist/src/commands/build/run.command.js.map +1 -1
  22. package/dist/src/commands/build/tasks.command.d.ts.map +1 -1
  23. package/dist/src/commands/build/tasks.command.js.map +1 -1
  24. package/dist/src/commands/compose.command.d.ts.map +1 -1
  25. package/dist/src/commands/compose.command.js.map +1 -1
  26. package/dist/src/commands/config/check-resources.command.d.ts +50 -0
  27. package/dist/src/commands/config/check-resources.command.d.ts.map +1 -0
  28. package/dist/src/commands/config/check-resources.command.js +121 -0
  29. package/dist/src/commands/config/check-resources.command.js.map +1 -0
  30. package/dist/src/commands/config/data-retention.command.d.ts.map +1 -1
  31. package/dist/src/commands/config/data-retention.command.js.map +1 -1
  32. package/dist/src/commands/config/document-releases.command.d.ts.map +1 -1
  33. package/dist/src/commands/config/document-releases.command.js.map +1 -1
  34. package/dist/src/commands/config/legal-notice.command.d.ts +17 -0
  35. package/dist/src/commands/config/legal-notice.command.d.ts.map +1 -0
  36. package/dist/src/commands/config/legal-notice.command.js +59 -0
  37. package/dist/src/commands/config/legal-notice.command.js.map +1 -0
  38. package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
  39. package/dist/src/commands/config/mutate.command.js.map +1 -1
  40. package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
  41. package/dist/src/commands/config/reapply-declaration.command.js.map +1 -1
  42. package/dist/src/commands/config/service-consent.command.d.ts.map +1 -1
  43. package/dist/src/commands/config/service-consent.command.js.map +1 -1
  44. package/dist/src/commands/config/subject-data-recipients.command.d.ts.map +1 -1
  45. package/dist/src/commands/config/subject-data-recipients.command.js.map +1 -1
  46. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  47. package/dist/src/commands/config/sync.command.js.map +1 -1
  48. package/dist/src/commands/config/validate.command.d.ts +8 -0
  49. package/dist/src/commands/config/validate.command.d.ts.map +1 -1
  50. package/dist/src/commands/config/validate.command.js +65 -4
  51. package/dist/src/commands/config/validate.command.js.map +1 -1
  52. package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -1
  53. package/dist/src/commands/context/assurance-basis.command.js.map +1 -1
  54. package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
  55. package/dist/src/commands/context/coherence.command.js.map +1 -1
  56. package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
  57. package/dist/src/commands/context/context-command.utils.js.map +1 -1
  58. package/dist/src/commands/context/elements.command.d.ts.map +1 -1
  59. package/dist/src/commands/context/elements.command.js.map +1 -1
  60. package/dist/src/commands/context/health.command.d.ts.map +1 -1
  61. package/dist/src/commands/context/health.command.js.map +1 -1
  62. package/dist/src/commands/context/info.command.d.ts.map +1 -1
  63. package/dist/src/commands/context/info.command.js.map +1 -1
  64. package/dist/src/commands/context/journey.command.d.ts +8 -2
  65. package/dist/src/commands/context/journey.command.d.ts.map +1 -1
  66. package/dist/src/commands/context/journey.command.js +102 -12
  67. package/dist/src/commands/context/journey.command.js.map +1 -1
  68. package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -1
  69. package/dist/src/commands/context/jurisdictions.command.js.map +1 -1
  70. package/dist/src/commands/context/launch-blockers.command.d.ts +2 -1
  71. package/dist/src/commands/context/launch-blockers.command.d.ts.map +1 -1
  72. package/dist/src/commands/context/launch-blockers.command.js +3 -2
  73. package/dist/src/commands/context/launch-blockers.command.js.map +1 -1
  74. package/dist/src/commands/context/list.command.d.ts.map +1 -1
  75. package/dist/src/commands/context/list.command.js.map +1 -1
  76. package/dist/src/commands/context/pipelines.command.d.ts.map +1 -1
  77. package/dist/src/commands/context/pipelines.command.js.map +1 -1
  78. package/dist/src/commands/context/workspace.command.d.ts.map +1 -1
  79. package/dist/src/commands/context/workspace.command.js.map +1 -1
  80. package/dist/src/commands/creation/accept.command.d.ts +4 -0
  81. package/dist/src/commands/creation/accept.command.d.ts.map +1 -1
  82. package/dist/src/commands/creation/accept.command.js +29 -4
  83. package/dist/src/commands/creation/accept.command.js.map +1 -1
  84. package/dist/src/commands/creation/answer.command.d.ts.map +1 -1
  85. package/dist/src/commands/creation/answer.command.js.map +1 -1
  86. package/dist/src/commands/creation/brand-logo.command.d.ts +18 -0
  87. package/dist/src/commands/creation/brand-logo.command.d.ts.map +1 -0
  88. package/dist/src/commands/creation/brand-logo.command.js +43 -0
  89. package/dist/src/commands/creation/brand-logo.command.js.map +1 -0
  90. package/dist/src/commands/creation/brief.command.d.ts.map +1 -1
  91. package/dist/src/commands/creation/brief.command.js.map +1 -1
  92. package/dist/src/commands/creation/deliberate.command.d.ts +2 -2
  93. package/dist/src/commands/creation/deliberate.command.d.ts.map +1 -1
  94. package/dist/src/commands/creation/deliberate.command.js +2 -2
  95. package/dist/src/commands/creation/deliberate.command.js.map +1 -1
  96. package/dist/src/commands/creation/depth.command.d.ts.map +1 -1
  97. package/dist/src/commands/creation/depth.command.js +1 -1
  98. package/dist/src/commands/creation/depth.command.js.map +1 -1
  99. package/dist/src/commands/creation/diff.command.d.ts.map +1 -1
  100. package/dist/src/commands/creation/diff.command.js.map +1 -1
  101. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  102. package/dist/src/commands/creation/feed.command.js.map +1 -1
  103. package/dist/src/commands/creation/loop.command.d.ts.map +1 -1
  104. package/dist/src/commands/creation/loop.command.js.map +1 -1
  105. package/dist/src/commands/creation/persona.command.d.ts +3 -2
  106. package/dist/src/commands/creation/persona.command.d.ts.map +1 -1
  107. package/dist/src/commands/creation/persona.command.js +10 -3
  108. package/dist/src/commands/creation/persona.command.js.map +1 -1
  109. package/dist/src/commands/creation/preflight.command.d.ts.map +1 -1
  110. package/dist/src/commands/creation/preflight.command.js.map +1 -1
  111. package/dist/src/commands/creation/prompt-hook.command.d.ts.map +1 -1
  112. package/dist/src/commands/creation/prompt-hook.command.js.map +1 -1
  113. package/dist/src/commands/creation/propose.command.d.ts.map +1 -1
  114. package/dist/src/commands/creation/propose.command.js.map +1 -1
  115. package/dist/src/commands/creation/pulse.command.d.ts.map +1 -1
  116. package/dist/src/commands/creation/pulse.command.js.map +1 -1
  117. package/dist/src/commands/creation/questions.command.d.ts.map +1 -1
  118. package/dist/src/commands/creation/questions.command.js.map +1 -1
  119. package/dist/src/commands/creation/reason.command.d.ts.map +1 -1
  120. package/dist/src/commands/creation/reason.command.js.map +1 -1
  121. package/dist/src/commands/creation/report.command.d.ts.map +1 -1
  122. package/dist/src/commands/creation/report.command.js.map +1 -1
  123. package/dist/src/commands/creation/revert.command.d.ts.map +1 -1
  124. package/dist/src/commands/creation/revert.command.js.map +1 -1
  125. package/dist/src/commands/creation/run.command.d.ts.map +1 -1
  126. package/dist/src/commands/creation/run.command.js.map +1 -1
  127. package/dist/src/commands/creation/statusline.command.d.ts.map +1 -1
  128. package/dist/src/commands/creation/statusline.command.js.map +1 -1
  129. package/dist/src/commands/creation/watch.command.d.ts.map +1 -1
  130. package/dist/src/commands/creation/watch.command.js.map +1 -1
  131. package/dist/src/commands/creation/why.command.d.ts +3 -1
  132. package/dist/src/commands/creation/why.command.d.ts.map +1 -1
  133. package/dist/src/commands/creation/why.command.js +28 -9
  134. package/dist/src/commands/creation/why.command.js.map +1 -1
  135. package/dist/src/commands/creation/writes.command.d.ts.map +1 -1
  136. package/dist/src/commands/creation/writes.command.js.map +1 -1
  137. package/dist/src/commands/db/db-schema-plan-migration.utils.d.ts.map +1 -1
  138. package/dist/src/commands/db/db-schema-plan-migration.utils.js.map +1 -1
  139. package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
  140. package/dist/src/commands/db/db-schema-plan.utils.js.map +1 -1
  141. package/dist/src/commands/db/diff.command.d.ts.map +1 -1
  142. package/dist/src/commands/db/diff.command.js.map +1 -1
  143. package/dist/src/commands/db/generate.command.d.ts.map +1 -1
  144. package/dist/src/commands/db/generate.command.js.map +1 -1
  145. package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
  146. package/dist/src/commands/db/migrate.command.js.map +1 -1
  147. package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
  148. package/dist/src/commands/db/resolve.command.js.map +1 -1
  149. package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
  150. package/dist/src/commands/dev/charts-audit.command.js.map +1 -1
  151. package/dist/src/commands/dev/design-tokens-generate.command.d.ts.map +1 -1
  152. package/dist/src/commands/dev/design-tokens-generate.command.js.map +1 -1
  153. package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
  154. package/dist/src/commands/dev/design-tokens-init.command.js.map +1 -1
  155. package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
  156. package/dist/src/commands/dev/design-tokens-validate.command.js.map +1 -1
  157. package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
  158. package/dist/src/commands/dev/force-stop.command.js.map +1 -1
  159. package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
  160. package/dist/src/commands/dev/resources.command.js.map +1 -1
  161. package/dist/src/commands/dev/start.command.d.ts.map +1 -1
  162. package/dist/src/commands/dev/start.command.js.map +1 -1
  163. package/dist/src/commands/dev/stop-all.command.d.ts.map +1 -1
  164. package/dist/src/commands/dev/stop-all.command.js.map +1 -1
  165. package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
  166. package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
  167. package/dist/src/commands/docs/publish.command.d.ts.map +1 -1
  168. package/dist/src/commands/docs/publish.command.js.map +1 -1
  169. package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
  170. package/dist/src/commands/frontend/publish.command.js.map +1 -1
  171. package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
  172. package/dist/src/commands/fwk/audit.command.js.map +1 -1
  173. package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
  174. package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
  175. package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
  176. package/dist/src/commands/fwk/generate-docs.command.js.map +1 -1
  177. package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -1
  178. package/dist/src/commands/fwk/generate-providers.command.js.map +1 -1
  179. package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
  180. package/dist/src/commands/fwk/graph.command.js.map +1 -1
  181. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  182. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  183. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  184. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  185. package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
  186. package/dist/src/commands/fwk/publish-npm.command.js.map +1 -1
  187. package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
  188. package/dist/src/commands/fwk/version-bump.command.js.map +1 -1
  189. package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
  190. package/dist/src/commands/fwk/version-set.command.js.map +1 -1
  191. package/dist/src/commands/fwk/version-show.command.d.ts.map +1 -1
  192. package/dist/src/commands/fwk/version-show.command.js.map +1 -1
  193. package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
  194. package/dist/src/commands/fwk/version-sync.command.js.map +1 -1
  195. package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
  196. package/dist/src/commands/fwk/what-touches.command.js.map +1 -1
  197. package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
  198. package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
  199. package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
  200. package/dist/src/commands/fwk/wt-tail.command.js.map +1 -1
  201. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  202. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  203. package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
  204. package/dist/src/commands/generate/email-preview.command.js.map +1 -1
  205. package/dist/src/commands/generate/email-status.command.d.ts.map +1 -1
  206. package/dist/src/commands/generate/email-status.command.js.map +1 -1
  207. package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
  208. package/dist/src/commands/generate/email-test-send.command.js.map +1 -1
  209. package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
  210. package/dist/src/commands/generate/email-translate.command.js.map +1 -1
  211. package/dist/src/commands/generate/email.command.d.ts.map +1 -1
  212. package/dist/src/commands/generate/email.command.js.map +1 -1
  213. package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
  214. package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
  215. package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
  216. package/dist/src/commands/generate/labels-plan.command.js.map +1 -1
  217. package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
  218. package/dist/src/commands/generate/labels.command.js.map +1 -1
  219. package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
  220. package/dist/src/commands/generate/translate.command.js.map +1 -1
  221. package/dist/src/commands/help.command.d.ts.map +1 -1
  222. package/dist/src/commands/help.command.js.map +1 -1
  223. package/dist/src/commands/init.command.d.ts.map +1 -1
  224. package/dist/src/commands/init.command.js.map +1 -1
  225. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  226. package/dist/src/commands/local/deregister.command.js.map +1 -1
  227. package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
  228. package/dist/src/commands/local/dev-status.command.js.map +1 -1
  229. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  230. package/dist/src/commands/local/dev.command.js.map +1 -1
  231. package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
  232. package/dist/src/commands/local/doctor.command.js.map +1 -1
  233. package/dist/src/commands/local/down.command.d.ts.map +1 -1
  234. package/dist/src/commands/local/down.command.js.map +1 -1
  235. package/dist/src/commands/local/init.command.d.ts.map +1 -1
  236. package/dist/src/commands/local/init.command.js.map +1 -1
  237. package/dist/src/commands/local/logs.command.d.ts.map +1 -1
  238. package/dist/src/commands/local/logs.command.js.map +1 -1
  239. package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
  240. package/dist/src/commands/local/reinit.command.js.map +1 -1
  241. package/dist/src/commands/local/reset.command.d.ts.map +1 -1
  242. package/dist/src/commands/local/reset.command.js.map +1 -1
  243. package/dist/src/commands/local/restore.command.d.ts.map +1 -1
  244. package/dist/src/commands/local/restore.command.js.map +1 -1
  245. package/dist/src/commands/local/smoke.command.d.ts.map +1 -1
  246. package/dist/src/commands/local/smoke.command.js.map +1 -1
  247. package/dist/src/commands/local/status.command.d.ts.map +1 -1
  248. package/dist/src/commands/local/status.command.js.map +1 -1
  249. package/dist/src/commands/local/up.command.d.ts.map +1 -1
  250. package/dist/src/commands/local/up.command.js.map +1 -1
  251. package/dist/src/commands/local-defaults/capture.command.d.ts.map +1 -1
  252. package/dist/src/commands/local-defaults/capture.command.js.map +1 -1
  253. package/dist/src/commands/lock/check.command.d.ts.map +1 -1
  254. package/dist/src/commands/lock/check.command.js.map +1 -1
  255. package/dist/src/commands/market/generate.command.d.ts.map +1 -1
  256. package/dist/src/commands/market/generate.command.js.map +1 -1
  257. package/dist/src/commands/market/market-command.utils.d.ts.map +1 -1
  258. package/dist/src/commands/market/market-command.utils.js.map +1 -1
  259. package/dist/src/commands/prefs/set.command.d.ts.map +1 -1
  260. package/dist/src/commands/prefs/set.command.js.map +1 -1
  261. package/dist/src/commands/providers/show.command.d.ts.map +1 -1
  262. package/dist/src/commands/providers/show.command.js.map +1 -1
  263. package/dist/src/commands/registry/add.command.d.ts.map +1 -1
  264. package/dist/src/commands/registry/add.command.js.map +1 -1
  265. package/dist/src/commands/registry/info.command.d.ts.map +1 -1
  266. package/dist/src/commands/registry/info.command.js.map +1 -1
  267. package/dist/src/commands/registry/key.command.d.ts.map +1 -1
  268. package/dist/src/commands/registry/key.command.js.map +1 -1
  269. package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
  270. package/dist/src/commands/registry/lockfile-smoke.command.js.map +1 -1
  271. package/dist/src/commands/registry/login.command.d.ts.map +1 -1
  272. package/dist/src/commands/registry/login.command.js.map +1 -1
  273. package/dist/src/commands/registry/logout.command.d.ts.map +1 -1
  274. package/dist/src/commands/registry/logout.command.js.map +1 -1
  275. package/dist/src/commands/registry/outdated.command.d.ts.map +1 -1
  276. package/dist/src/commands/registry/outdated.command.js.map +1 -1
  277. package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
  278. package/dist/src/commands/registry/ping.command.js.map +1 -1
  279. package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
  280. package/dist/src/commands/registry/publish.command.js.map +1 -1
  281. package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -1
  282. package/dist/src/commands/registry/registry-transport.constants.js.map +1 -1
  283. package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
  284. package/dist/src/commands/registry/remove.command.js.map +1 -1
  285. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  286. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  287. package/dist/src/commands/registry/search.command.d.ts.map +1 -1
  288. package/dist/src/commands/registry/search.command.js.map +1 -1
  289. package/dist/src/commands/registry/status.command.d.ts.map +1 -1
  290. package/dist/src/commands/registry/status.command.js.map +1 -1
  291. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  292. package/dist/src/commands/registry/update.command.js.map +1 -1
  293. package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
  294. package/dist/src/commands/registry/whoami.command.js.map +1 -1
  295. package/dist/src/commands/registry/yank.command.d.ts.map +1 -1
  296. package/dist/src/commands/registry/yank.command.js.map +1 -1
  297. package/dist/src/commands/remote/create.command.d.ts.map +1 -1
  298. package/dist/src/commands/remote/create.command.js.map +1 -1
  299. package/dist/src/commands/remote/list.command.d.ts.map +1 -1
  300. package/dist/src/commands/remote/list.command.js.map +1 -1
  301. package/dist/src/commands/remote/status.command.d.ts.map +1 -1
  302. package/dist/src/commands/remote/status.command.js.map +1 -1
  303. package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
  304. package/dist/src/commands/remote/sync.command.js.map +1 -1
  305. package/dist/src/commands/secrets/github.command.d.ts.map +1 -1
  306. package/dist/src/commands/secrets/github.command.js.map +1 -1
  307. package/dist/src/commands/secrets/list.command.d.ts.map +1 -1
  308. package/dist/src/commands/secrets/list.command.js.map +1 -1
  309. package/dist/src/commands/secrets/set.command.d.ts.map +1 -1
  310. package/dist/src/commands/secrets/set.command.js.map +1 -1
  311. package/dist/src/commands/secrets/unset.command.d.ts.map +1 -1
  312. package/dist/src/commands/secrets/unset.command.js.map +1 -1
  313. package/dist/src/commands/setup.command.d.ts.map +1 -1
  314. package/dist/src/commands/setup.command.js.map +1 -1
  315. package/dist/src/commands/update.command.d.ts.map +1 -1
  316. package/dist/src/commands/update.command.js.map +1 -1
  317. package/dist/src/commands/version.command.d.ts.map +1 -1
  318. package/dist/src/commands/version.command.js.map +1 -1
  319. package/dist/src/commands/website/audit.command.d.ts.map +1 -1
  320. package/dist/src/commands/website/audit.command.js.map +1 -1
  321. package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
  322. package/dist/src/commands/workbench/open.command.js.map +1 -1
  323. package/dist/src/commands/workbench/parallelism.command.d.ts.map +1 -1
  324. package/dist/src/commands/workbench/parallelism.command.js.map +1 -1
  325. package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
  326. package/dist/src/commands/workbench/status.command.js.map +1 -1
  327. package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
  328. package/dist/src/infrastructure/errors/error.utils.js.map +1 -1
  329. package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
  330. package/dist/src/infrastructure/io/file.utils.js.map +1 -1
  331. package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
  332. package/dist/src/infrastructure/io/io.schemas.js.map +1 -1
  333. package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
  334. package/dist/src/infrastructure/io/template-processor.js.map +1 -1
  335. package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
  336. package/dist/src/infrastructure/logger/logger.service.js.map +1 -1
  337. package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
  338. package/dist/src/infrastructure/process/spawn.utils.js.map +1 -1
  339. package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
  340. package/dist/src/infrastructure/ui/formatting.service.js.map +1 -1
  341. package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
  342. package/dist/src/infrastructure/ui/interaction-engine.service.js.map +1 -1
  343. package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
  344. package/dist/src/infrastructure/ui/markdown-renderer.service.js.map +1 -1
  345. package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
  346. package/dist/src/infrastructure/ui/ui.schemas.js.map +1 -1
  347. package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
  348. package/dist/src/infrastructure/utils/string.utils.js.map +1 -1
  349. package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
  350. package/dist/src/infrastructure/validation/validator.service.js.map +1 -1
  351. package/dist/src/kernel/base-command.d.ts.map +1 -1
  352. package/dist/src/kernel/base-command.js.map +1 -1
  353. package/dist/src/kernel/bootstrap.d.ts.map +1 -1
  354. package/dist/src/kernel/bootstrap.js.map +1 -1
  355. package/dist/src/kernel/command-index-cache.d.ts.map +1 -1
  356. package/dist/src/kernel/command-index-cache.js.map +1 -1
  357. package/dist/src/kernel/command-registry.d.ts.map +1 -1
  358. package/dist/src/kernel/command-registry.js.map +1 -1
  359. package/dist/src/kernel/command-runner.d.ts.map +1 -1
  360. package/dist/src/kernel/command-runner.js.map +1 -1
  361. package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
  362. package/dist/src/kernel/command-scope-utils.js.map +1 -1
  363. package/dist/src/kernel/flag-utils.d.ts.map +1 -1
  364. package/dist/src/kernel/flag-utils.js.map +1 -1
  365. package/dist/src/kernel/hooks.d.ts.map +1 -1
  366. package/dist/src/kernel/hooks.js.map +1 -1
  367. package/dist/src/kernel/logger.d.ts.map +1 -1
  368. package/dist/src/kernel/logger.js.map +1 -1
  369. package/dist/src/kernel/types.d.ts.map +1 -1
  370. package/dist/src/kernel/types.js.map +1 -1
  371. package/dist/src/main.d.ts.map +1 -1
  372. package/dist/src/main.js.map +1 -1
  373. package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
  374. package/dist/src/modules/domain/credentials/admin-user.module.js.map +1 -1
  375. package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -1
  376. package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -1
  377. package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts.map +1 -1
  378. package/dist/src/modules/domain/credentials/creation-essentials.module.js.map +1 -1
  379. package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
  380. package/dist/src/modules/domain/credentials/module.types.js.map +1 -1
  381. package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
  382. package/dist/src/modules/domain/environment/database-config.module.js.map +1 -1
  383. package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
  384. package/dist/src/modules/domain/environment/module.types.js.map +1 -1
  385. package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
  386. package/dist/src/modules/domain/environment/paths-config.module.js.map +1 -1
  387. package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
  388. package/dist/src/modules/domain/environment/runtime-selector.module.js.map +1 -1
  389. package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
  390. package/dist/src/modules/domain/environment/runtime-semantics.module.js.map +1 -1
  391. package/dist/src/modules/domain/module.types.d.ts.map +1 -1
  392. package/dist/src/modules/domain/module.types.js.map +1 -1
  393. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  394. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  395. package/dist/src/services/application/app-env.service.d.ts.map +1 -1
  396. package/dist/src/services/application/app-env.service.js.map +1 -1
  397. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
  398. package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
  399. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  400. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  401. package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
  402. package/dist/src/services/application/app-schema-bootstrap.service.js.map +1 -1
  403. package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
  404. package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
  405. package/dist/src/services/application/application-browser-smoke.service.d.ts.map +1 -1
  406. package/dist/src/services/application/application-browser-smoke.service.js.map +1 -1
  407. package/dist/src/services/application/application-creation-readiness.service.d.ts.map +1 -1
  408. package/dist/src/services/application/application-creation-readiness.service.js.map +1 -1
  409. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  410. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  411. package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
  412. package/dist/src/services/application/application-dev-port-offsets.js.map +1 -1
  413. package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
  414. package/dist/src/services/application/application-initialization-verification.service.js.map +1 -1
  415. package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
  416. package/dist/src/services/application/application-root.utils.js.map +1 -1
  417. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
  418. package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
  419. package/dist/src/services/application/backend-config.paths.d.ts.map +1 -1
  420. package/dist/src/services/application/backend-config.paths.js.map +1 -1
  421. package/dist/src/services/application/composition-provider-plan.service.d.ts.map +1 -1
  422. package/dist/src/services/application/composition-provider-plan.service.js.map +1 -1
  423. package/dist/src/services/application/creation-host-readiness.service.d.ts.map +1 -1
  424. package/dist/src/services/application/creation-host-readiness.service.js.map +1 -1
  425. package/dist/src/services/application/creation-preflight.service.d.ts.map +1 -1
  426. package/dist/src/services/application/creation-preflight.service.js.map +1 -1
  427. package/dist/src/services/application/degraded-registration-declaration-convergence.service.d.ts.map +1 -1
  428. package/dist/src/services/application/degraded-registration-declaration-convergence.service.js.map +1 -1
  429. package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
  430. package/dist/src/services/application/dev-orchestrator.service.js.map +1 -1
  431. package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
  432. package/dist/src/services/application/dev-schema-drift.service.js.map +1 -1
  433. package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
  434. package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
  435. package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
  436. package/dist/src/services/application/existing-app-bootstrap.service.js.map +1 -1
  437. package/dist/src/services/application/frontend-provider-source.service.d.ts.map +1 -1
  438. package/dist/src/services/application/frontend-provider-source.service.js.map +1 -1
  439. package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts.map +1 -1
  440. package/dist/src/services/application/frontend-public-config-secret-screen.service.js.map +1 -1
  441. package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
  442. package/dist/src/services/application/local-app-reinit.service.js.map +1 -1
  443. package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
  444. package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
  445. package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -1
  446. package/dist/src/services/application/provider-package-links.service.js.map +1 -1
  447. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  448. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  449. package/dist/src/services/application/saas-scaffold.service.d.ts.map +1 -1
  450. package/dist/src/services/application/saas-scaffold.service.js.map +1 -1
  451. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  452. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  453. package/dist/src/services/application/stored-declaration-currency.service.d.ts.map +1 -1
  454. package/dist/src/services/application/stored-declaration-currency.service.js.map +1 -1
  455. package/dist/src/services/application/systems-of-record-library.service.d.ts.map +1 -1
  456. package/dist/src/services/application/systems-of-record-library.service.js.map +1 -1
  457. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  458. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  459. package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
  460. package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
  461. package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
  462. package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
  463. package/dist/src/services/coding-agents/coding-agent-login.service.d.ts.map +1 -1
  464. package/dist/src/services/coding-agents/coding-agent-login.service.js.map +1 -1
  465. package/dist/src/services/companion/build-console.service.d.ts +62 -2
  466. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  467. package/dist/src/services/companion/build-console.service.js +70 -5
  468. package/dist/src/services/companion/build-console.service.js.map +1 -1
  469. package/dist/src/services/companion/companion-client-options.utils.d.ts.map +1 -1
  470. package/dist/src/services/companion/companion-client-options.utils.js.map +1 -1
  471. package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
  472. package/dist/src/services/companion/companion-client.service.js.map +1 -1
  473. package/dist/src/services/companion/companion-health-hint.utils.d.ts.map +1 -1
  474. package/dist/src/services/companion/companion-health-hint.utils.js.map +1 -1
  475. package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
  476. package/dist/src/services/companion/companion-lifecycle.service.js.map +1 -1
  477. package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -1
  478. package/dist/src/services/companion/companion-local-token.utils.js.map +1 -1
  479. package/dist/src/services/companion/companion.schemas.d.ts.map +1 -1
  480. package/dist/src/services/companion/companion.schemas.js.map +1 -1
  481. package/dist/src/services/companion/console-fast-path.d.ts +21 -3
  482. package/dist/src/services/companion/console-fast-path.d.ts.map +1 -1
  483. package/dist/src/services/companion/console-fast-path.js +57 -12
  484. package/dist/src/services/companion/console-fast-path.js.map +1 -1
  485. package/dist/src/services/companion/console-verb.utils.d.ts.map +1 -1
  486. package/dist/src/services/companion/console-verb.utils.js.map +1 -1
  487. package/dist/src/services/companion/creation-console.service.d.ts +76 -0
  488. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  489. package/dist/src/services/companion/creation-console.service.js +124 -11
  490. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  491. package/dist/src/services/companion/creation-run-report.models.d.ts.map +1 -1
  492. package/dist/src/services/companion/creation-run-report.models.js.map +1 -1
  493. package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
  494. package/dist/src/services/companion/git-helper.service.js.map +1 -1
  495. package/dist/src/services/companion/local-companion-authority.service.d.ts.map +1 -1
  496. package/dist/src/services/companion/local-companion-authority.service.js.map +1 -1
  497. package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
  498. package/dist/src/services/companion/workbench-browser-launcher.service.js.map +1 -1
  499. package/dist/src/services/companion/workbench-cli.service.d.ts.map +1 -1
  500. package/dist/src/services/companion/workbench-cli.service.js.map +1 -1
  501. package/dist/src/services/compliance/data-retention-schedule.generator.d.ts.map +1 -1
  502. package/dist/src/services/compliance/data-retention-schedule.generator.js.map +1 -1
  503. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts +5 -3
  504. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts.map +1 -1
  505. package/dist/src/services/compliance/generated-compliance-module-wiring.js +4 -2
  506. package/dist/src/services/compliance/generated-compliance-module-wiring.js.map +1 -1
  507. package/dist/src/services/compliance/governed-document-releases.generator.d.ts.map +1 -1
  508. package/dist/src/services/compliance/governed-document-releases.generator.js.map +1 -1
  509. package/dist/src/services/compliance/legal-notice.generator.d.ts +45 -0
  510. package/dist/src/services/compliance/legal-notice.generator.d.ts.map +1 -0
  511. package/dist/src/services/compliance/legal-notice.generator.js +97 -0
  512. package/dist/src/services/compliance/legal-notice.generator.js.map +1 -0
  513. package/dist/src/services/compliance/service-consent-requirement.generator.d.ts.map +1 -1
  514. package/dist/src/services/compliance/service-consent-requirement.generator.js.map +1 -1
  515. package/dist/src/services/compliance/subject-data-recipients.generator.d.ts.map +1 -1
  516. package/dist/src/services/compliance/subject-data-recipients.generator.js.map +1 -1
  517. package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
  518. package/dist/src/services/context/context-manager.service.js.map +1 -1
  519. package/dist/src/services/context/context.schemas.d.ts.map +1 -1
  520. package/dist/src/services/context/context.schemas.js.map +1 -1
  521. package/dist/src/services/context/machine-preferences.writer.d.ts.map +1 -1
  522. package/dist/src/services/context/machine-preferences.writer.js.map +1 -1
  523. package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
  524. package/dist/src/services/context/state-manager.service.js.map +1 -1
  525. package/dist/src/services/credentials/application-secret-owners.service.d.ts.map +1 -1
  526. package/dist/src/services/credentials/application-secret-owners.service.js.map +1 -1
  527. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  528. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  529. package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
  530. package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
  531. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  532. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  533. package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
  534. package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
  535. package/dist/src/services/credentials/credentials.service.d.ts.map +1 -1
  536. package/dist/src/services/credentials/credentials.service.js.map +1 -1
  537. package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
  538. package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
  539. package/dist/src/services/credentials/local-defaults.service.d.ts.map +1 -1
  540. package/dist/src/services/credentials/local-defaults.service.js.map +1 -1
  541. package/dist/src/services/credentials/local-secrets-store.service.d.ts.map +1 -1
  542. package/dist/src/services/credentials/local-secrets-store.service.js.map +1 -1
  543. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  544. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  545. package/dist/src/services/credentials/provider-secret-format.d.ts.map +1 -1
  546. package/dist/src/services/credentials/provider-secret-format.js.map +1 -1
  547. package/dist/src/services/credentials/remote-secrets-store.service.d.ts.map +1 -1
  548. package/dist/src/services/credentials/remote-secrets-store.service.js.map +1 -1
  549. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  550. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  551. package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
  552. package/dist/src/services/credentials/secrets-provisioning.service.js.map +1 -1
  553. package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
  554. package/dist/src/services/credentials/secrets-reader.service.js.map +1 -1
  555. package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
  556. package/dist/src/services/credentials/secrets-rotation.service.js.map +1 -1
  557. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  558. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  559. package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
  560. package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
  561. package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
  562. package/dist/src/services/data-services/data-services.service.js.map +1 -1
  563. package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
  564. package/dist/src/services/deployment/apps-manager-diagnostics.service.js.map +1 -1
  565. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  566. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  567. package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
  568. package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
  569. package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts.map +1 -1
  570. package/dist/src/services/deployment/docker/backing-service-health-watch.js.map +1 -1
  571. package/dist/src/services/deployment/docker/compose-service-health.d.ts.map +1 -1
  572. package/dist/src/services/deployment/docker/compose-service-health.js.map +1 -1
  573. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  574. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  575. package/dist/src/services/deployment/docker/docker-compose-readiness.service.d.ts.map +1 -1
  576. package/dist/src/services/deployment/docker/docker-compose-readiness.service.js.map +1 -1
  577. package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
  578. package/dist/src/services/deployment/docker/docker.schemas.js.map +1 -1
  579. package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
  580. package/dist/src/services/deployment/docker/docker.service.js.map +1 -1
  581. package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts.map +1 -1
  582. package/dist/src/services/deployment/docker/local-data-adoption.service.js.map +1 -1
  583. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
  584. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  585. package/dist/src/services/deployment/infra-writer.service.d.ts.map +1 -1
  586. package/dist/src/services/deployment/infra-writer.service.js.map +1 -1
  587. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts.map +1 -1
  588. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js.map +1 -1
  589. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
  590. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
  591. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.d.ts.map +1 -1
  592. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.js.map +1 -1
  593. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  594. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  595. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  596. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  597. package/dist/src/services/deployment/k8s/k8s-operations.service.d.ts.map +1 -1
  598. package/dist/src/services/deployment/k8s/k8s-operations.service.js.map +1 -1
  599. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  600. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  601. package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
  602. package/dist/src/services/deployment/k8s/k8s.schemas.js.map +1 -1
  603. package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
  604. package/dist/src/services/deployment/k8s/kind.service.js.map +1 -1
  605. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
  606. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.js.map +1 -1
  607. package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
  608. package/dist/src/services/deployment/local-dev-observer-lifecycle.js.map +1 -1
  609. package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
  610. package/dist/src/services/deployment/local-dev-output-boundary.js.map +1 -1
  611. package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
  612. package/dist/src/services/deployment/local-dev-session-lease.service.js.map +1 -1
  613. package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
  614. package/dist/src/services/deployment/local-dev-shutdown-coordinator.js.map +1 -1
  615. package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
  616. package/dist/src/services/deployment/local-infrastructure-initialization.service.js.map +1 -1
  617. package/dist/src/services/deployment/local-precondition-checks.schemas.d.ts.map +1 -1
  618. package/dist/src/services/deployment/local-precondition-checks.schemas.js.map +1 -1
  619. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  620. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  621. package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
  622. package/dist/src/services/deployment/local-runtime-process-cleanup.service.js.map +1 -1
  623. package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
  624. package/dist/src/services/deployment/platform-lifecycle.service.js.map +1 -1
  625. package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
  626. package/dist/src/services/deployment/platform-runtime-policy.service.js.map +1 -1
  627. package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
  628. package/dist/src/services/deployment/version-compare.utils.js.map +1 -1
  629. package/dist/src/services/design-tokens/design-tokens-command.service.d.ts.map +1 -1
  630. package/dist/src/services/design-tokens/design-tokens-command.service.js.map +1 -1
  631. package/dist/src/services/design-tokens/design-tokens-config.service.d.ts.map +1 -1
  632. package/dist/src/services/design-tokens/design-tokens-config.service.js.map +1 -1
  633. package/dist/src/services/design-tokens/design-tokens-config.template.d.ts.map +1 -1
  634. package/dist/src/services/design-tokens/design-tokens-config.template.js.map +1 -1
  635. package/dist/src/services/design-tokens/design-tokens-css-block.service.d.ts.map +1 -1
  636. package/dist/src/services/design-tokens/design-tokens-css-block.service.js.map +1 -1
  637. package/dist/src/services/design-tokens/design-tokens-paths.service.d.ts.map +1 -1
  638. package/dist/src/services/design-tokens/design-tokens-paths.service.js.map +1 -1
  639. package/dist/src/services/design-tokens/design-tokens.constants.d.ts.map +1 -1
  640. package/dist/src/services/design-tokens/design-tokens.constants.js.map +1 -1
  641. package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
  642. package/dist/src/services/design-tokens/design-tokens.models.js.map +1 -1
  643. package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts.map +1 -1
  644. package/dist/src/services/environment/application-backing-service-addressing.utils.js.map +1 -1
  645. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  646. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  647. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  648. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  649. package/dist/src/services/environment/env-sync.service.d.ts.map +1 -1
  650. package/dist/src/services/environment/env-sync.service.js.map +1 -1
  651. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  652. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  653. package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
  654. package/dist/src/services/environment/environment-hydration.utils.js.map +1 -1
  655. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  656. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  657. package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
  658. package/dist/src/services/environment/environment-paths.service.js.map +1 -1
  659. package/dist/src/services/environment/environment-registry.service.d.ts.map +1 -1
  660. package/dist/src/services/environment/environment-registry.service.js.map +1 -1
  661. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  662. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  663. package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
  664. package/dist/src/services/environment/environment.schemas.js.map +1 -1
  665. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  666. package/dist/src/services/environment/environment.service.js.map +1 -1
  667. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.d.ts.map +1 -1
  668. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.js.map +1 -1
  669. package/dist/src/services/environment/infrastructure-host.service.d.ts.map +1 -1
  670. package/dist/src/services/environment/infrastructure-host.service.js.map +1 -1
  671. package/dist/src/services/environment/platform-engine-change.utils.d.ts.map +1 -1
  672. package/dist/src/services/environment/platform-engine-change.utils.js.map +1 -1
  673. package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
  674. package/dist/src/services/environment/platform-runtime-state.service.js.map +1 -1
  675. package/dist/src/services/environment/platform-runtime.schemas.d.ts.map +1 -1
  676. package/dist/src/services/environment/platform-runtime.schemas.js.map +1 -1
  677. package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
  678. package/dist/src/services/environment/runtime-bootstrap.service.js.map +1 -1
  679. package/dist/src/services/framework/application-claude-settings.d.ts +39 -5
  680. package/dist/src/services/framework/application-claude-settings.d.ts.map +1 -1
  681. package/dist/src/services/framework/application-claude-settings.js +100 -25
  682. package/dist/src/services/framework/application-claude-settings.js.map +1 -1
  683. package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -1
  684. package/dist/src/services/framework/application-rule-imports.js.map +1 -1
  685. package/dist/src/services/framework/claude-plugin-compiler.d.ts.map +1 -1
  686. package/dist/src/services/framework/claude-plugin-compiler.js +3 -2
  687. package/dist/src/services/framework/claude-plugin-compiler.js.map +1 -1
  688. package/dist/src/services/framework/dev-compile-status.paths.d.ts.map +1 -1
  689. package/dist/src/services/framework/dev-compile-status.paths.js.map +1 -1
  690. package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
  691. package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
  692. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  693. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  694. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.d.ts.map +1 -1
  695. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.js.map +1 -1
  696. package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
  697. package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
  698. package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
  699. package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
  700. package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
  701. package/dist/src/services/framework/framework-knowledge-scan.constants.js.map +1 -1
  702. package/dist/src/services/framework/framework-npm-publish.service.d.ts.map +1 -1
  703. package/dist/src/services/framework/framework-npm-publish.service.js.map +1 -1
  704. package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
  705. package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
  706. package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
  707. package/dist/src/services/framework/framework-release.service.js.map +1 -1
  708. package/dist/src/services/framework/framework-update.service.d.ts.map +1 -1
  709. package/dist/src/services/framework/framework-update.service.js.map +1 -1
  710. package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
  711. package/dist/src/services/framework/framework-version.service.js.map +1 -1
  712. package/dist/src/services/framework/frontend-component-catalog.generator.d.ts.map +1 -1
  713. package/dist/src/services/framework/frontend-component-catalog.generator.js.map +1 -1
  714. package/dist/src/services/framework/frontend-library-root-exports.d.ts.map +1 -1
  715. package/dist/src/services/framework/frontend-library-root-exports.js.map +1 -1
  716. package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
  717. package/dist/src/services/framework/installed-framework-assets.service.js.map +1 -1
  718. package/dist/src/services/framework/npm-registry-output.d.ts.map +1 -1
  719. package/dist/src/services/framework/npm-registry-output.js.map +1 -1
  720. package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
  721. package/dist/src/services/framework/package-install.service.js.map +1 -1
  722. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -1
  723. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -1
  724. package/dist/src/services/framework/provider-transposition/api-version-settlement.d.ts.map +1 -1
  725. package/dist/src/services/framework/provider-transposition/api-version-settlement.js.map +1 -1
  726. package/dist/src/services/framework/provider-transposition/base-url-settlement.d.ts.map +1 -1
  727. package/dist/src/services/framework/provider-transposition/base-url-settlement.js.map +1 -1
  728. package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -1
  729. package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -1
  730. package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -1
  731. package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -1
  732. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -1
  733. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -1
  734. package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -1
  735. package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -1
  736. package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -1
  737. package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -1
  738. package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts.map +1 -1
  739. package/dist/src/services/framework/provider-transposition/request-helper-url.js.map +1 -1
  740. package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -1
  741. package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -1
  742. package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts.map +1 -1
  743. package/dist/src/services/framework/provider-transposition/source-static-evaluator.js.map +1 -1
  744. package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -1
  745. package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -1
  746. package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -1
  747. package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -1
  748. package/dist/src/services/frontend/cloudflare-cdn.service.d.ts.map +1 -1
  749. package/dist/src/services/frontend/cloudflare-cdn.service.js.map +1 -1
  750. package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
  751. package/dist/src/services/frontend/frontend-dist-uploader.service.js.map +1 -1
  752. package/dist/src/services/frontend/frontend-publish.service.d.ts.map +1 -1
  753. package/dist/src/services/frontend/frontend-publish.service.js.map +1 -1
  754. package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
  755. package/dist/src/services/generation/domain-generator.service.js.map +1 -1
  756. package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
  757. package/dist/src/services/generation/generator.schemas.js.map +1 -1
  758. package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
  759. package/dist/src/services/generation/operation-generator.service.js.map +1 -1
  760. package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
  761. package/dist/src/services/generation/resource-generator.service.js.map +1 -1
  762. package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
  763. package/dist/src/services/generation/template-registry.service.js.map +1 -1
  764. package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
  765. package/dist/src/services/registry/artifact-extractor.utils.js.map +1 -1
  766. package/dist/src/services/registry/artifact-trust.utils.d.ts.map +1 -1
  767. package/dist/src/services/registry/artifact-trust.utils.js.map +1 -1
  768. package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
  769. package/dist/src/services/registry/boundary-fanout.utils.js.map +1 -1
  770. package/dist/src/services/registry/git-ignored-paths.utils.d.ts.map +1 -1
  771. package/dist/src/services/registry/git-ignored-paths.utils.js.map +1 -1
  772. package/dist/src/services/registry/index.d.ts.map +1 -1
  773. package/dist/src/services/registry/index.js.map +1 -1
  774. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  775. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  776. package/dist/src/services/registry/local-checkout-module-source.service.d.ts.map +1 -1
  777. package/dist/src/services/registry/local-checkout-module-source.service.js.map +1 -1
  778. package/dist/src/services/registry/migration-obligation.utils.d.ts.map +1 -1
  779. package/dist/src/services/registry/migration-obligation.utils.js.map +1 -1
  780. package/dist/src/services/registry/module-acquisition.utils.d.ts.map +1 -1
  781. package/dist/src/services/registry/module-acquisition.utils.js.map +1 -1
  782. package/dist/src/services/registry/module-artifact-files.utils.d.ts.map +1 -1
  783. package/dist/src/services/registry/module-artifact-files.utils.js.map +1 -1
  784. package/dist/src/services/registry/module-registration.service.d.ts.map +1 -1
  785. package/dist/src/services/registry/module-registration.service.js.map +1 -1
  786. package/dist/src/services/registry/module-requirements.service.d.ts.map +1 -1
  787. package/dist/src/services/registry/module-requirements.service.js.map +1 -1
  788. package/dist/src/services/registry/provider-install-step.d.ts.map +1 -1
  789. package/dist/src/services/registry/provider-install-step.js.map +1 -1
  790. package/dist/src/services/registry/provider-module-checks.service.d.ts.map +1 -1
  791. package/dist/src/services/registry/provider-module-checks.service.js.map +1 -1
  792. package/dist/src/services/registry/provider-module-identity.service.d.ts.map +1 -1
  793. package/dist/src/services/registry/provider-module-identity.service.js.map +1 -1
  794. package/dist/src/services/registry/provider-wiring.service.d.ts.map +1 -1
  795. package/dist/src/services/registry/provider-wiring.service.js.map +1 -1
  796. package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
  797. package/dist/src/services/registry/registry-command.utils.js.map +1 -1
  798. package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
  799. package/dist/src/services/registry/registry-config-resolver.service.js.map +1 -1
  800. package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
  801. package/dist/src/services/registry/registry-credentials.service.js.map +1 -1
  802. package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
  803. package/dist/src/services/registry/saas-root-required.error.js.map +1 -1
  804. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  805. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  806. package/dist/src/services/tools/utility-tools.service.d.ts.map +1 -1
  807. package/dist/src/services/tools/utility-tools.service.js.map +1 -1
  808. package/dist/src/services/tracker/creation-run-tracker.service.d.ts.map +1 -1
  809. package/dist/src/services/tracker/creation-run-tracker.service.js.map +1 -1
  810. package/dist/src/services/website/website-label-pack-audit.service.d.ts.map +1 -1
  811. package/dist/src/services/website/website-label-pack-audit.service.js.map +1 -1
  812. package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
  813. package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
  814. package/dist/src/services/website/website-workspace.service.d.ts.map +1 -1
  815. package/dist/src/services/website/website-workspace.service.js.map +1 -1
  816. package/dist/tsconfig.build.tsbuildinfo +1 -0
  817. package/dist/tsconfig.tsbuildinfo +1 -0
  818. package/package.json +17 -17
  819. package/templates/saas/i18n/email/email-template-definitions.ts +5 -1
  820. package/templates/saas/scenarios/add-locale/files/website/src/i18n/__localePath__.json.hbs +21 -1
  821. package/templates/saas/scenarios/add-locale/files/website/src/pages/__localePath__/index.astro +1 -0
  822. package/templates/saas/scenarios/add-marketing-page/files/website/src/pages/__pageRef__.astro.hbs +1 -0
  823. package/templates/saas/scenarios/add-module/scenario.json +5 -0
  824. package/templates/saas/scenarios/add-website/files/website/src/components/FooterComponent.tsx.hbs +14 -6
  825. package/templates/saas/scenarios/add-website/files/website/src/content/llms.txt.hbs +3 -3
  826. package/templates/saas/scenarios/add-website/files/website/src/i18n/en.json.hbs +4 -0
  827. package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
  828. package/templates/saas/scenarios/add-website/files/website/src/pages/llms.txt.ts +3 -1
  829. package/templates/saas/scenarios/add-website/files/website/src/styles/website.css +14 -0
  830. package/templates/saas/skeleton/backend-api/src/engine/email/email-template-definitions.ts +5 -1
  831. package/templates/saas/skeleton/shared-lib/src/engine/roles.ts +10 -2
  832. package/templates/saas/skeleton/specifications/src/companion-exports.ts +28 -3
  833. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.schemas.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/credentials.schemas.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,0FAA0F;AAC1F,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,8BAA8B,EAC9B,oBAAoB,EACpB,oBAAoB,EACpB,mCAAmC,EACnC,gCAAgC,EAChC,cAAc,EACd,mCAAmC,EACnC,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,qCAAqC,EACrC,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAiClH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,6EAAiD,CAAA;IACjD,qFAAyD,CAAA;IACzD,mFAAuD,CAAA;IACvD,mFAAuD,CAAA;AACzD,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,sFAAuD,CAAA;IACvD,8FAA+D,CAAA;IAC/D,4FAA6D,CAAA;IAC7D,4FAA6D,CAAA;AAC/D,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CAAC,QAAQ,KAAK,OAAO,EACvD,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC;YACrC,OAAO,EAAE,sGAAsG;SAChH,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAC3D,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACjB,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/C,CAAC","sourcesContent":["// Boundary adapter: Zod schemas validate user-facing files (secrets.json, config.json)\n// against domain enums. This import direction (validation → domain types) is intentional.\nimport z from \"zod\";\nimport {\n APPLICATION_BACKEND_SENSITIVE_ENV_KEYS,\n ApplicationCreationVerificationConfigSchema,\n BackingServicesEnvConfigSchema,\n BackingServiceSource,\n WildoCdnConfigSchema,\n WildoSystemsOfRecordEnvConfigSchema,\n WildoPlatformStorageConfigSchema,\n DatabaseEngine,\n PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS,\n WildoAuthConfigSchema,\n WildoDeploymentRuntime,\n WildoKubernetesConfigSchema,\n WildoLocationType,\n WildoLocalDataStorage,\n WildoLoggingConfigSchema,\n WildoObservabilityConfigSchema,\n WildoDocumentationSiteConfigSchema,\n WildoProviderSelectionOverridesSchema,\n WildoRemoteProviderSchema,\n} from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport { PROVIDER_SENSITIVE_ENV_KEYS } from '~wildo-cli/services/credentials/provider-env-vars.utils';\nimport { LiveEnvKeySet, memoiseOverCatalogue } from '~wildo-cli/services/credentials/composed-provider-catalogue';\n\n\n// ============================================================================\n// Default credential usernames (not secrets — safe to store as constants)\n// ============================================================================\n\n// ---------------------------------------------------------------------------\n// Credential input types (shared between modules and services)\n// ---------------------------------------------------------------------------\n\nexport interface AdminUserInput {\n email: string;\n firstName: string;\n lastName: string;\n /**\n * Optional operator-supplied initial password.\n *\n * When `undefined`, the secrets writer auto-generates a 16-char password\n * (preserving the historical zero-friction local-setup UX where the\n * generated password is printed at the end of `wildo setup`).\n *\n * When provided (today only via the `WILDO_INIT_ADMIN_PASSWORD` env-var\n * seed in {@link platformAdminUserModule}), the explicit value is\n * threaded into `Wildo_Application_Secrets.admin.password` and reused\n * by every downstream consumer (`secrets-writer`, `env-vars-builder`,\n * `k8s-bootstrap`, `app-bootstrap.service`). This is the single\n * non-interactive entry-point for CI flows that need a deterministic\n * admin password.\n */\n password?: string;\n}\n\n/**\n * CLI-namespaced env-var contract for non-interactive / CI-driven seeding\n * of the platform admin identity collected by `wildo setup` and by\n * `wildo init`, which mints the application's own `local` secrets.json\n * (issue #155) and reads these same seeds when no `--admin-*` flag is given.\n *\n * Why a CLI-specific namespace (`WILDO_INIT_ADMIN_*`) instead of reusing\n * the apps-manager runtime contract (`ADMIN_EMAIL` / `ADMIN_PASSWORD` /\n * `ADMIN_FIRST_NAME` / `ADMIN_LAST_NAME`):\n *\n * - The apps-manager keys describe the **running platform process's**\n * admin user (consumed by `init-mode-startup.apps-manager.service.ts`\n * in INIT mode) — they are runtime config for a long-lived service.\n *\n * - These keys describe the **operator running the CLI scaffold** —\n * one-shot input for the local setup wizard. Conflating them risks\n * accidentally seeding a CI runner's apps-manager process with the\n * developer's personal credentials (or vice-versa).\n *\n * Contract semantics (per Slice 2 / 2.3 design decision, TARGETED scope):\n * - Email / first name / last name: env value, when present, is used as\n * the prompt default. The operator can still override interactively.\n * - Password: env value, when present, is threaded directly into\n * `AdminUserInput.password` (skipping the auto-generator). When\n * absent, the secrets writer auto-generates a 16-char password — this\n * preserves the historical UX and is intentional.\n */\nexport enum WildoCliInitAdminEnvKeys {\n WILDO_INIT_ADMIN_EMAIL = 'WILDO_INIT_ADMIN_EMAIL',\n WILDO_INIT_ADMIN_FIRSTNAME = 'WILDO_INIT_ADMIN_FIRSTNAME',\n WILDO_INIT_ADMIN_LASTNAME = 'WILDO_INIT_ADMIN_LASTNAME',\n WILDO_INIT_ADMIN_PASSWORD = 'WILDO_INIT_ADMIN_PASSWORD',\n}\n\n/**\n * The same one-shot CLI contract, for the SECOND administrator (#575).\n *\n * A separate enum rather than four more members on {@link WildoCliInitAdminEnvKeys}, because the two\n * identities have different provenance rules and a shared enum would hide that. The admin's fields\n * are always operator-authored; the approver's are operator-authored on a REMOTE environment and\n * DERIVED from the admin on a local one. Reading them from one vocabulary invites a caller to treat\n * a derived value and a stated one as interchangeable, which is the whole distinction\n * {@link resolveApproverIdentity} exists to keep.\n *\n * Unlike the admin keys the PASSWORD is not optional-with-a-generator here: locally the approver\n * shares the admin's password by construction, and remotely a generated password nobody was told\n * about would produce an approver who cannot sign in — an account that exists and cannot act is\n * worse than a refusal, because the refusal is the part that gets fixed.\n */\nexport enum WildoCliInitApproverEnvKeys {\n WILDO_INIT_APPROVER_EMAIL = 'WILDO_INIT_APPROVER_EMAIL',\n WILDO_INIT_APPROVER_FIRSTNAME = 'WILDO_INIT_APPROVER_FIRSTNAME',\n WILDO_INIT_APPROVER_LASTNAME = 'WILDO_INIT_APPROVER_LASTNAME',\n WILDO_INIT_APPROVER_PASSWORD = 'WILDO_INIT_APPROVER_PASSWORD',\n}\n\nexport interface ProviderKeysInput {\n /**\n * Provider secrets keyed by their exact env-var name (e.g. `OPENAI_API_KEY`,\n * `STRIPE_SECRET_KEY`), collected in the interactive `wildo setup` flow from\n * the registry-derived provider selection. This is the single map for ALL\n * provider secrets — there are no per-provider convenience fields; the setup\n * UX and the backend registry both address providers by env-var name.\n */\n providerEnv?: Record<string, string>;\n /**\n * GitHub ORGANIZATION integration (source-control), distinct from the GitHub\n * OAuth2 provider secret: these feed the `github` block of `secrets.json`,\n * not `providerEnv`.\n */\n githubOrgUrl?: string;\n githubAdminUser?: string;\n githubAdminToken?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Default credential usernames (not secrets — safe to store as constants)\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME = {\n MONGODB_ROOT_USER: 'wildo',\n VALKEY_ADMIN_USER: 'default',\n PG_ADMIN_USER: 'wildo_admin',\n RABBITMQ_ADMIN_USERNAME: 'wildo',\n MINIO_ACCESS_KEY: 'wildo',\n} as const;\n\n\n// ============================================================================\n// Sensitive env var classification\n// ============================================================================\n\n/**\n * Env var keys classified as sensitive (credentials, passwords, API keys).\n * Used to separate secret values from plain-text config when generating\n * deployment artifacts (K8s Secret vs ConfigMap, Docker env_file, etc.).\n *\n * Infrastructure keys are listed explicitly. Provider credentials come from the COMPOSED\n * provider catalogue via `PROVIDER_SENSITIVE_ENV_KEYS` — engine tier plus every provider\n * package discovery has registered.\n *\n * A LIVE view rather than a `new Set([...])` snapshot, and the difference is load-bearing\n * (#329): this module is evaluated on the CLI's first touch of the credential layer, which is\n * always before an application's provider packages have been discovered. A snapshot would have\n * frozen the answer at \"engine providers only\", so a package-shipped provider's API key would\n * have been classified as plain config and written into a Kubernetes `ConfigMap`. The static\n * halves are still snapshotted — they are compile-time constants and cannot move.\n */\nconst STATIC_SENSITIVE_ENV_KEYS: ReadonlySet<string> = new Set([\n // Shared platform runtime env contract secrets\n ...PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS,\n // Shared app-backend env contract secrets\n ...APPLICATION_BACKEND_SENSITIVE_ENV_KEYS,\n]);\n\nexport const SENSITIVE_ENV_KEYS: ReadonlySet<string> = new LiveEnvKeySet(\n // Memoised against the composition generation rather than rebuilt per `.has()`: the K8s secrets\n // generator asks this once per environment variable, and the union is only ever invalidated by a\n // registration.\n memoiseOverCatalogue(() => new Set([...STATIC_SENSITIVE_ENV_KEYS, ...PROVIDER_SENSITIVE_ENV_KEYS])),\n);\n\n// ============================================================================\n// Zod schemas for secrets.json and config.json (CLI validation)\n// ============================================================================\n\nexport const PlatformEnvSecretsJson_Schema = z\n .object({\n mongodb: z.object({\n rootUser: z.string(),\n rootPassword: z.string(),\n }).optional(),\n valkey: z.object({\n adminUser: z.string(),\n adminPassword: z.string(),\n }).optional(),\n postgresql: z.object({\n adminUser: z.string(),\n adminPassword: z.string(),\n }),\n rabbitmq: z.object({\n adminUsername: z.string(),\n adminPassword: z.string(),\n erlangCookie: z.string(),\n }),\n storage: z.object({\n accessKey: z.string(),\n secretKey: z.string(),\n }),\n platform: z.object({\n primarySecret: z.string(),\n /** Dedicated shared secret for admin operations (CLI ↔ apps-manager). */\n adminSecret: z.string(),\n appsManager: z.object({\n privateKey: z.string(),\n publicKey: z.string(),\n }),\n /**\n * The crontabs-batches-manager's dedicated P2P signing keypair (per-service, mirrors\n * `appsManager`). Private half → crontabs (signs every SCHEDULED_CRON / MINION_TICK job\n * token); public half → apps-manager, which distributes it into each app's\n * `PLATFORM_CRONTABS_BATCHES_MANAGER` verify slot. Declared in\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS` and therefore minted both at setup and by the\n * idempotent provisioning self-heal (`wildo local dev` / `wildo local up` preflight,\n * `wildo config sync`), so an environment predating the keypair acquires it on the\n * next command. `.optional()` at the schema layer (mirrors `immudb`) so a secrets.json\n * predating this fix still PARSES — but unlike immudb there is NO graceful degradation:\n * the crontabs config + apps-manager distribution FAIL-LOUD when it is absent (a missing\n * key silently dead-lettered every scheduled tick before this fix).\n */\n crontabsBatchesManager: z.object({\n privateKey: z.string(),\n publicKey: z.string(),\n }).optional(),\n }),\n /**\n * The APPLICATION's own operator secret — distinct from `platform` above, which is the\n * PLATFORM's, and which an application must never hold.\n *\n * One field, and a section of its own rather than a key under `platform`, because the tier is\n * the whole point: `resolveForbiddenPlatformCredentials` refuses to emit any platform-tier\n * credential into an application-tier env, and this value must go INTO that env. Filing it\n * under `platform` would have made it unemittable by the very guard that protects the boundary.\n *\n * `.optional()` for the reason `crontabsBatchesManager` and `immudb` are: a `secrets.json`\n * written before this existed must still PARSE. Unlike an identity it IS mintable, so it is\n * declared in `FRAMEWORK_MANAGED_SECRET_MATERIALS` and the idempotent self-heal fills it on the\n * next command — an environment predating it acquires one without an operator typing anything.\n */\n application: z.object({\n /**\n * Gates the data-seeding and external-data admin surfaces. 48 bytes, minted, rotatable.\n *\n * MINTED rather than operator-authored, and the trade is worth stating. The external-data\n * controller's header defends an unset default — *\"so a fresh deployment never accidentally\n * exposes a door that reaches a third party's production system\"* — and that reasoning was\n * written when there was NO channel to author it, so \"unset\" was the only reachable state.\n * With a channel, the choice is between a door nobody can open and a door behind 48 bytes of\n * entropy. The direct analogue one tier up settles it: `platform.adminSecret` is minted at the\n * same length for the same kind of surface. Reversible — remove this from the materials\n * registry and absent-by-default returns, since every consumer already answers 503 on absence.\n */\n adminSecret: z.string(),\n }).optional(),\n admin: z.object({\n email: z.string(),\n password: z.string(),\n firstName: z.string(),\n lastName: z.string(),\n }),\n /**\n * The SECOND platform administrator — the one who approves an application-wide access grant.\n *\n * Not a nicety. `applicationAccessGrantApproverIsDistinct` refuses `operator === approver` and\n * refuses an ABSENT approver, and the application-scoped grant has deliberately no\n * auto-approval branch — the schema states why: this grant names no tenant, so *\"a grant that\n * could approve itself would make the two-person rule ceremonial\"*. A deployment with one\n * administrator therefore cannot use the widest read the system offers, at all. The refusal was\n * built and the party who discharges it never was (#575).\n *\n * `.optional()` for the reason `crontabsBatchesManager` and `immudb` are: a `secrets.json`\n * written before this existed must still PARSE. Unlike a generated keypair it cannot be\n * self-healed into place, because an identity is not mintable — see the note on\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS`' `ADMIN_PASSWORD` material, which is careful to declare\n * only the password so that provisioning never invents an admin identity. An environment\n * predating this acquires an approver by re-running setup, or by authoring the block.\n *\n * Locally this is DERIVED from `admin` (see `resolveApproverIdentity`) and shares its password,\n * which makes the two-person rule ceremonial there — deliberately, because the alternative is a\n * developer who cannot exercise an application-wide read at all. That is exactly why a\n * non-local environment gets no derivation and must state the approver itself.\n */\n approver: z.object({\n email: z.string(),\n password: z.string(),\n firstName: z.string(),\n lastName: z.string(),\n }).optional(),\n atlas: z.object({\n apiPublicKey: z.string(),\n apiPrivateKey: z.string(),\n }).optional(),\n /**\n * immudb state-signing keypair — the cryptographic whole-server-substitution defense\n * for the tamper-evident audit store (`COMPLIANCE_AUDIT_TRAIL`). Auto-generated (ECDSA\n * P-256) from the `FRAMEWORK_MANAGED_SECRET_MATERIALS` registry — at setup for a new\n * environment, and by the idempotent provisioning self-heal for an existing one; the two\n * halves flow to DIFFERENT places and MUST NOT be conflated:\n *\n * - `stateSigningPrivateKey` (SEC1 \"EC PRIVATE KEY\" PEM) — mounted into the SELF-hosted\n * immudb server (`--signingKey`, immudb `x509.ParseECPrivateKey`) so it signs its\n * `ImmutableState`. SERVER-side ONLY: rides the k8s `immudb-secret` / the compose\n * local-data key file. NEVER injected into `providerEnv` or any app-pod env.\n * - `stateSigningPublicKey` (SPKI PEM) — pinned by the audit client via the\n * `IMMUDB_STATE_PUBLIC_KEY` provider secret; the client verifies the server's signed\n * state against it (immudb-verified-kv-client `verifyImmutableStateSignature`). A\n * substituted immudb cannot forge the signature without the private key, so substitution\n * is cryptographically caught. Public material — safe to deliver to every app runtime.\n *\n * Optional at the schema layer (mirrors mongodb/valkey): a secrets.json that lacks it\n * still validates, and immudb then runs UNSIGNED (client warns \"signing OFF\") — graceful\n * degradation, not a hard failure. That path now only survives for a CI-reconstructed\n * secrets.json (`reconstructSecretsFromEnv`, which publishes no immudb material); a\n * file-backed environment is provisioned automatically on the next CLI command.\n */\n immudb: z.object({\n stateSigningPrivateKey: z.string(),\n stateSigningPublicKey: z.string(),\n /**\n * #1696 — the self-hosted immudb server's built-in `immudb` SYSADMIN password, a PLATFORM secret. The\n * server is initialised with it (compose `IMMUDB_ADMIN_PASSWORD`, the k8s `immudb-secret`), and\n * apps-manager — the only runtime that receives it (`IMMUDB_ADMIN_PASSWORD` in its env) — logs in with it\n * to give each application its OWN database and its OWN `READ_WRITE` user. No application holds it.\n *\n * Until #1696 the server's admin password was COPIED from the owning application's operator-authored\n * `providerEnv.IMMUDB_PASSWORD`, which is also the credential every application's audit sink logged in\n * with — so every hosted application held the sysadmin of every application's audit data. Minted here,\n * it is no application's value.\n *\n * Its own material (`IMMUDB_ADMIN_PASSWORD`) rather than a third key on the state-signing keypair, so an\n * environment that predates it acquires only this key and its keypair is never re-minted. `.optional()` so\n * a `secrets.json` written before it still parses; the self-heal fills it on the next CLI command.\n */\n adminPassword: z.string().optional(),\n }).optional(),\n /**\n * Issue #74 — the SCRAM password `mongot` authenticates to mongod with, as a\n * `searchCoordinator`-roled user in mongod's `admin` database. Auto-generated from the\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS` registry.\n *\n * Only the password lives here. The USERNAME is a framework-owned service identity\n * (`MONGOT_SYNC_SOURCE.USERNAME`), so it is a code constant rather than a stored value —\n * storing it would create a second place a rename has to reach.\n *\n * Both deployment lanes read THIS one value, which is the point: mongot never receives a\n * password directly, it reads a FILE, and the user it authenticates as is created by the\n * `mongodb-init` step. Three consumers of one secret is exactly the shape that drifts if\n * each lane mints its own — the immudb admin password was that defect one datastore over\n * (contract stated, k8s lane implemented, compose lane silently on the packaged default).\n *\n * `.optional()` mirrors mongodb/valkey/immudb so a secrets.json predating this parses; a\n * file-backed environment acquires it on the next self-heal, and an environment that\n * self-hosts no mongod never needs it.\n */\n mongot: z.object({\n syncSourcePassword: z.string(),\n }).optional(),\n /**\n * Protocol-aware provider credentials keyed by the actual process env var\n * name that should be injected into runtime services.\n */\n providerEnv: z.record(z.string(), z.string()).optional(),\n /**\n * System-of-record credentials, keyed by the DERIVED environment-variable name\n * (`WILDO_SOR_<NAME>__<SLOT>`, #1055).\n *\n * ## Why it is flat, and not a tree keyed by instance (R5)\n *\n * A per-instance tree would be the obvious shape and it breaks two mechanisms. The CI secret\n * reconstruction walks a STATIC table of secret paths, and `isOptionalSecretPath` THROWS on a\n * `z.record` node — so an instance-keyed section listed there crashes `wildo config sync --domain\n * cicd`. And `envVarSuffixForSecretPath` is not injective, so two instances of one vendor would\n * collapse onto one CI input. Flat-by-variable-name is the shape `providerEnv` already uses for\n * the same reason, and per-instance structure is recovered by PARSING the key — which the `__`\n * delimiter makes unambiguous.\n *\n * ## Why it is not `providerEnv` itself\n *\n * That map is attributed to a PROVIDER's secrets contract by `filterProviderEnvToScope`, and a\n * system of record is deliberately not a provider (D10). Sharing the map would make every\n * instance's credential look like a provider key to the scoping logic — and be silently dropped by\n * it once the vendor leaves `providers.scopes`.\n *\n * ## Why it must be DECLARED here at all\n *\n * `wildo config sync --rotate-secrets` and `wildo setup` re-write `secrets.json` THROUGH this\n * schema. An undeclared section is not preserved — it is deleted. Declaring it is the whole\n * mechanism that stops an operator's ERP credentials disappearing on the next rotation; rotation\n * itself never touches the section, because it is registry-driven and these are not\n * framework-managed secrets.\n */\n systemsOfRecordEnv: z.record(z.string(), z.string()).optional(),\n /**\n * Verification secrets of the application's INBOUND endpoints (`POST /webhooks/app/{endpointKey}`,\n * #1596), keyed by the DERIVED variable name `WILDO_INBOUND_<ENDPOINT_KEY>__SECRET`\n * (`deriveInboundEndpointSecretEnvVarName` in `@wildo-ai/saas-models`).\n *\n * Flat and keyed by variable name for the reasons `systemsOfRecordEnv` gives above: the key space is\n * open (one key per endpoint the application declares) and the endpoint is recovered by parsing the\n * name. Not `providerEnv`, because an inbound endpoint is the application's own and not a provider's,\n * so `filterProviderEnvToScope` would drop it.\n *\n * Delivered to the application BACKEND only — the one runtime that mounts the endpoint — and stripped\n * from every minion, which would otherwise hold a signing secret it cannot use. Rotation leaves it\n * alone: the SENDER holds the same secret, so changing it here alone breaks every delivery.\n */\n inboundEndpointEnv: z.record(z.string(), z.string()).optional(),\n github: z.object({\n orgUrl: z.string().optional(),\n adminUser: z.string().optional(),\n adminToken: z.string().optional(),\n }).optional(),\n });\nexport type PlatformEnvSecretsJson = z.infer<typeof PlatformEnvSecretsJson_Schema>;\n\n/**\n * Who a credential belongs to when several applications share one environment's infrastructure.\n *\n * An application HOSTED on another's infrastructure (`infrastructureHost`) reads every shared credential\n * from its host's `secrets.json` and keeps only its own in its file — so there is exactly one copy of a\n * shared credential, held by the one application that runs the thing it opens.\n */\nexport enum SecretOwner {\n /**\n * The identity of a shared container or platform service: backing-service admin credentials, the\n * platform's secrets and signing keypairs, the immudb and mongot material, the platform's Atlas and\n * GitHub access. Held by the infrastructure host only.\n */\n SHARED_INFRASTRUCTURE = 'shared-infrastructure',\n /**\n * Material only this application uses: its own operator-door secret, its provider API keys, and the\n * administrator and approver identities its registration seeds as its first users.\n */\n APPLICATION = 'application',\n}\n\n/**\n * Owner of every top-level `secrets.json` section. Total over the schema by type, so a section added\n * tomorrow does not compile until somebody decides whether a hosted application may hold its own copy.\n *\n * `admin` and `approver` are APPLICATION although the platform's own INIT also reads them: a hosted\n * application never runs platform INIT (that is its host's), and the only thing it does with them is\n * seed its OWN first administrator and approver at registration.\n */\nexport const SECRETS_SECTION_OWNERSHIP: Readonly<Record<keyof PlatformEnvSecretsJson, SecretOwner>> = {\n mongodb: SecretOwner.SHARED_INFRASTRUCTURE,\n valkey: SecretOwner.SHARED_INFRASTRUCTURE,\n postgresql: SecretOwner.SHARED_INFRASTRUCTURE,\n rabbitmq: SecretOwner.SHARED_INFRASTRUCTURE,\n storage: SecretOwner.SHARED_INFRASTRUCTURE,\n platform: SecretOwner.SHARED_INFRASTRUCTURE,\n application: SecretOwner.APPLICATION,\n admin: SecretOwner.APPLICATION,\n approver: SecretOwner.APPLICATION,\n atlas: SecretOwner.SHARED_INFRASTRUCTURE,\n immudb: SecretOwner.SHARED_INFRASTRUCTURE,\n mongot: SecretOwner.SHARED_INFRASTRUCTURE,\n providerEnv: SecretOwner.APPLICATION,\n /*\n * APPLICATION. These are the credentials for the external systems THIS application reads from, keyed by the\n * instance names its own saas config declares. A hosted application authors its own systems of record (or\n * `{ enabled: false }`), so inheriting its host's would hand it a credential to somebody else's ERP.\n */\n systemsOfRecordEnv: SecretOwner.APPLICATION,\n /* APPLICATION: the secrets of endpoints THIS application's own handlers declare, agreed with its own senders. */\n inboundEndpointEnv: SecretOwner.APPLICATION,\n github: SecretOwner.SHARED_INFRASTRUCTURE,\n};\n\n/**\n * The sections of `secrets` a hosted application holds itself — everything else is its host's. Absent\n * sections stay absent; nothing is defaulted.\n */\nexport function projectApplicationOwnedSecrets(secrets: Partial<PlatformEnvSecretsJson>): Partial<PlatformEnvSecretsJson> {\n const projected: Record<string, unknown> = {};\n for (const [section, owner] of Object.entries(SECRETS_SECTION_OWNERSHIP)) {\n const value = (secrets as Record<string, unknown>)[section];\n if (owner === SecretOwner.APPLICATION && value !== undefined) {\n projected[section] = value;\n }\n }\n return projected as Partial<PlatformEnvSecretsJson>;\n}\n\nconst PlatformEnvStorageConfig_Schema = z.object({\n provider: z.enum(['minio']),\n useSsl: z.boolean(),\n bucket: z.string(),\n});\n\nconst PlatformEnvPostgresqlConfig_Schema = z.object({\n database: z.string(),\n sslMode: z.string(),\n});\n\n/**\n * Slice 6 / F-20 — typed external-service binding for ClamAV (managed\n * antivirus scanner): the validate command reads `host` through this\n * schema, so a typo at the persisted-config layer fails at parse time.\n */\nexport const ClamavExternalServiceSchema = z.object({\n host: z.string().min(1),\n port: z.number().int().positive().optional(),\n tls: z.boolean().optional(),\n});\nexport type ClamavExternalServiceConfig = z.infer<typeof ClamavExternalServiceSchema>;\n\n/**\n * Slice 3 deep-review H-1 (2026-04-13): use `z.strictObject` (not `z.object`)\n * at the root so that unknown top-level keys in a persisted\n * `environments/<env>/config.json` fail-closed at parse time instead of\n * being silently stripped. Today the loader (`environment-registry.service`)\n * uses `safeParse` and treats a parse failure as a cache miss, so this\n * change does not crash the CLI at boot — but it does ensure that\n * `wildo config validate` (which calls `parse`) catches a typoed root key\n * as a hard error, matching the strict posture of `WildoSaasConfigSchema`.\n */\nexport const PlatformEnvConfigJson_Schema = z.strictObject({\n type: z.enum(WildoLocationType),\n runtime: z.enum(WildoDeploymentRuntime),\n runtimeEnvironment: z.enum(RuntimeEnvironment).optional(),\n /**\n * Where this environment's self-hosted backing services keep their data — a Docker named volume\n * or a host bind mount under `local_data/<service>/`.\n *\n * `.optional()` because this is a STRICT schema read back from a `config.json` written before the\n * field existed, and a parse failure is treated as a cache miss that silently discards the whole\n * record. Absence is read through `resolveLocalDataStorage`, which derives it from `locationType`\n * — so an environment provisioned before this field keeps a correct answer rather than an empty\n * one, and does not have to be re-synced to get it.\n */\n localDataStorage: z.enum(WildoLocalDataStorage).optional(),\n database: z.object({\n engine: z.enum(DatabaseEngine),\n source: z.enum(BackingServiceSource),\n /**\n * Slice 4.B.0 (2026-05-07): managed-brand identifier when\n * `source === MANAGED`. For Mongo: `'atlas'`. For Postgres:\n * one of `'aws-rds' | 'gcp-cloud-sql' | 'azure-database' |\n * 'supabase' | 'neon' | 'render'`. Generalized from the\n * pre-reshape source-only model where `'atlas'` was a `source`\n * value.\n */\n provider: z.string().min(1).optional(),\n }),\n /**\n * Which declared backing store the APPLICATION's own resources persist to — mirrored from the\n * authored `applicationDatabase` in `wildo.infra.<env>.config.ts`.\n *\n * Distinct from `database` directly above, which is the PLATFORM's engine. The two move\n * independently: a PostgreSQL platform can host a MongoDB application and vice versa.\n *\n * Written RESOLVED by the current CLI (absence in the infra config means PostgreSQL, #1571). OPTIONAL\n * only so an older `config.json` still parses; a reader of an absent value resolves it through\n * `resolveApplicationDatabaseEngine`, never through a default of its own.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n }).optional(),\n infrastructure: z.object({\n storage: PlatformEnvStorageConfig_Schema,\n postgresql: PlatformEnvPostgresqlConfig_Schema,\n }),\n /**\n * Authored backing-services snapshot, mirrored from the parsed\n * `wildo.infra.<env>.config.ts`. Carries per-service overrides\n * (host/port/name/vhost/endpoint/bucket/database) that the\n * `ServiceAddressResolver`, docker-compose generator, and env-vars-builder\n * use to honor the author's intent. When omitted (legacy generated\n * configs), all consumers fall back to catalog defaults.\n *\n * Persisted shape matches the author shape 1:1 — the canonical contract\n * lives in `BackingServicesEnvConfigSchema` so a future CLI run that\n * re-syncs from infra config produces a stable JSON snapshot.\n */\n backingServices: BackingServicesEnvConfigSchema.optional(),\n /**\n * Authored `serviceAuth` policy snapshot, mirrored from the parsed\n * `wildo.infra.<env>.config.ts`. This is the SOURCE OF TRUTH for\n * platform-managed JWT TTLs (`accessTokenExpirationMinutes` /\n * `refreshTokenExpirationDays`) seeded into every `Wildo_Application_Config`\n * at apps-manager init time. Authored value > schema default (15 / 30).\n * When the field is absent at parse time, the apps-manager init defaults\n * flow falls back to `WildoAuthConfigSchema.parse({})` so the runtime\n * backend always receives a fully-defined `jwt` block.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /**\n * Authored logging posture snapshot mirrored from `wildo.infra.<env>.config.ts`\n * (Slice 3.5). Persisted so the runtime contract survives a\n * `wildo config sync` cycle: `env-vars-builder` reads it back to emit\n * `LOG_LEVEL` / `LOG_FORMATTED_CONSOLE_ERRORS` for every long-running\n * platform/application process, and `LoggerService.loadConfiguration`\n * consumes the env vars at boot. Missing => LoggerService keeps its\n * built-in defaults (level `debug`, pino-pretty auto-detect by\n * `APPLICATION_ENV`).\n */\n logging: WildoLoggingConfigSchema.optional(),\n /**\n * Authored OTLP telemetry posture mirrored from `wildo.infra.<env>.config.ts`\n * (Slice 2 Phase 5). Persisted so `env-vars-builder` can project `OTEL_*` for the\n * `--import` preload across a `wildo config sync` cycle. Missing => telemetry off.\n */\n observability: WildoObservabilityConfigSchema.optional(),\n /**\n * Authored per-environment external-provider SELECTION override mirrored\n * from `wildo.infra.<env>.config.ts` (2026-07-10). Persisted so\n * `env-vars-builder` can project `WILDO_PROVIDER_SELECTION_OVERRIDES` across\n * a `wildo config sync` cycle; `ExternalProvidersRegistryBackendService`\n * reads it at capability-resolution time. Missing => the app-wide\n * `wildo.saas.config.ts` selection applies unchanged.\n */\n providerSelection: WildoProviderSelectionOverridesSchema.optional(),\n /**\n * Authored per-environment DOCUMENTATION-SITE origins mirrored from\n * `wildo.infra.<env>.config.ts`. Persisted so `env-vars-builder` can project\n * `WILDO_DOCS_API_BASE_URL` / `WILDO_DOCS_APP_URL` /\n * `WILDO_DOCS_FRONTEND_SERVICE_NAME` across a `wildo config sync` cycle; the\n * application`s `docusaurus.config.ts` reads them and refuses a PRODUCTION build\n * when unset. Missing => the docs config falls back to its local dev defaults.\n */\n documentationSite: WildoDocumentationSiteConfigSchema.optional(),\n /**\n * Generated snapshot of the local authored application-creation verification\n * posture. Env generation consumes this snapshot; `.env` is only its sink.\n */\n applicationCreationVerification: ApplicationCreationVerificationConfigSchema.optional(),\n /**\n * Public domain (`WildoInfraEnvConfig.publicDomain`) — the\n * runtime-agnostic external hostname browsers and reverse proxies\n * resolve. Required at the persisted-config layer because the\n * authored schema requires it; a hand-edited config that drops the\n * field fails Zod parse with a clear error instead of silently\n * defaulting at read time.\n */\n publicDomain: z.string().min(1),\n /**\n * Per-service public subdomain map (`WildoInfraEnvConfig.serviceHosts`) —\n * mirrored from the authored infra config. `<serviceKey> → subdomain chain`\n * (or `''` for apex) under `publicDomain`. Consumed by the K8s application\n * endpoint builder + ingress generator via `buildServicePublicHost`. Optional\n * — an unauthored key falls back to `<serviceKey>.<publicDomain>`.\n */\n serviceHosts: z.record(z.string().min(1), z.string()).optional(),\n /**\n * Per-service CDN publish config (`WildoInfraEnvConfig.cdn`) — mirrored from\n * the authored infra config. `<serviceKey> → {enabled, bucket?, bucketPrefix?,\n * vendor}`. Reuses the authoritative `WildoCdnConfigSchema` from config-lib\n * (single source of truth — no loose re-declaration). Optional: an unmapped\n * or `enabled: false` service is nginx-pod-served (the default). Consumed by\n * the deploy render (nginx-skip) + `wildo frontend publish`.\n */\n cdn: z.record(z.string().min(1), WildoCdnConfigSchema).optional(),\n /**\n * The platform tier's own bucket, remote-only (`WildoInfraEnvConfig.platformStorage`, #1112). Rendered into the\n * platform services' env through `resolvePlatformObjectStorageBucket`; absent means the fixed platform bucket.\n */\n /**\n * WHERE each declared system of record lives in this environment, mirrored from the authored\n * `wildo.infra.<env>.config.ts` (#1055). The schema is imported from `platform-config-lib` — the\n * single source — rather than re-declared here.\n *\n * This schema is STRICT, which is why it is the fourth place a new infra field has to be added and\n * not the third: the input schema, the `defineInfraEnvConfig` transform and the `config.json`\n * builder all carry it, and a key none of them agreed on fails the parse here. That is the good\n * failure — the one this section is guarding against is the opposite, a field written by the builder\n * and silently dropped because nothing declared it.\n */\n systemsOfRecord: WildoSystemsOfRecordEnvConfigSchema.optional(),\n platformStorage: WildoPlatformStorageConfigSchema.optional(),\n kubernetes: WildoKubernetesConfigSchema.optional(),\n remoteProvider: WildoRemoteProviderSchema.optional(),\n /**\n * The application whose infrastructure this environment runs on, when it is HOSTED\n * (`WildoInfraEnvConfig.infrastructureHost`, resolved: absolute paths). Absent means this application OWNS\n * its infrastructure. Every CLI action on SHARED infrastructure reads it — through\n * `EnvironmentRegistry.resolveInfrastructureHost` / `InfrastructureHost.resolve` — and leaves that action to the host.\n */\n infrastructureHost: z.strictObject({\n applicationRoot: z.string().min(1),\n infraConfigPath: z.string().min(1),\n }).optional(),\n atlas: z.object({\n apiBaseUrl: z.string(),\n projectId: z.string(),\n clusterName: z.string(),\n }).optional(),\n externalServices: z\n .object({\n mongodb: z.object({ provider: z.string() }),\n valkey: z.object({ provider: z.string() }).optional(),\n storage: z.object({ provider: z.string() }),\n rabbitmq: z.object({ provider: z.string() }),\n /**\n * Optional ClamAV external-service binding (managed antivirus\n * scanner). Slice 6 / F-20: typed `host`/`port`/`tls` so the\n * validate path no longer needs an untyped cast and a downstream\n * wiring change cannot bypass schema enforcement.\n */\n clamav: ClamavExternalServiceSchema.optional(),\n })\n .optional(),\n /**\n * STRICT on purpose (5.3 review): this object is hand-edit-only for most slots (the wizard\n * authors only the Atlas mongodb entry), and every consumer does a direct property read — so a\n * typo key (`postgres`, `postgresQL`) used to be silently STRIPPED and degrade into an\n * empty-connection boot failure three layers from the misspelling. Rejecting unknown keys turns\n * the typo into a named parse error at the file that contains it.\n */\n externalEndpoints: z\n .strictObject({\n mongodb: z.object({ connectionUrl: z.string() }).optional(),\n /**\n * MANAGED PostgreSQL platform endpoint (RDS/Neon/Cloud SQL…) — the PG mirror of the\n * `mongodb.connectionUrl` slot above. Read by `emitPlatformPostgresEnv` when the platform's\n * `database.engine === POSTGRESQL` with `source: MANAGED`; a full URL for the same reason\n * Atlas is (an external endpoint's address, credentials and TLS posture arrive as one\n * opaque value the environment cannot derive).\n */\n postgresql: z.object({ connectionUrl: z.string() }).optional(),\n valkey: z.object({ host: z.string(), port: z.number() }).optional(),\n rabbitmq: z.object({ host: z.string(), port: z.number() }).optional(),\n storage: z.object({ endpoint: z.string(), port: z.number() }).optional(),\n })\n .optional(),\n}).superRefine((config, ctx) => {\n if (config.type === WildoLocationType.REMOTE && !config.runtimeEnvironment) {\n ctx.addIssue({\n code: \"custom\",\n path: ['runtimeEnvironment'],\n message: 'runtimeEnvironment is required for remote environments',\n });\n }\n if (\n config.type === WildoLocationType.REMOTE\n && config.runtime === WildoDeploymentRuntime.KUBERNETES\n && !config.kubernetes\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['kubernetes'],\n message: 'kubernetes config is required for remote Kubernetes environments',\n });\n }\n if (\n config.type === WildoLocationType.REMOTE\n && config.runtime === WildoDeploymentRuntime.KUBERNETES\n && !config.remoteProvider\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['remoteProvider'],\n message: 'remoteProvider is required for remote Kubernetes environments',\n });\n }\n if (config.externalEndpoints?.storage) {\n ctx.addIssue({\n code: \"custom\",\n path: ['externalEndpoints', 'storage'],\n message: 'externalEndpoints.storage is not supported yet; only managed MinIO wiring is currently supported',\n });\n }\n if (\n config.externalServices?.storage\n && config.externalServices.storage.provider !== 'minio'\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['externalServices', 'storage'],\n message: 'externalServices.storage must use provider \"minio\"; only managed MinIO wiring is currently supported',\n });\n }\n});\nexport type PlatformEnvConfigJson = z.infer<typeof PlatformEnvConfigJson_Schema>;\n\n/**\n * Generated `application-runtime-identity.json` — a per-env record mapping an\n * app slug to its apps-manager-minted `APPLICATION_ID` (a Mongo `_id`, NOT\n * derivable offline from the slug).\n *\n * Written by the credential-fetching bootstrap flows (see\n * `AppBootstrapService.prepareApplicationEnvTargets`) so the OFFLINE\n * docker-compose render paths — `wildo config sync --domain manifest` (which\n * runs LAST in a full sync and re-renders the compose file) and the\n * `wildo local up` self-heal — can bake the correct `APPLICATION_ID` literal\n * into each per-app minion/worker service without re-contacting apps-manager.\n *\n * Kept OUT of `config.json` on purpose: `config.json`\n * ({@link PlatformEnvConfigJson}) is the app-agnostic PLATFORM infra config,\n * whereas this is app-runtime IDENTITY. Keyed by slug so multiple apps sharing\n * one env-scope each resolve their own id.\n */\nexport const ApplicationRuntimeIdentityJson_Schema = z.record(\n z.string().min(1),\n z.object({ applicationId: z.string().min(1) }),\n);\nexport type ApplicationRuntimeIdentityJson = z.infer<typeof ApplicationRuntimeIdentityJson_Schema>;\n"]}
1
+ {"version":3,"file":"credentials.schemas.js","sourceRoot":"","sources":["../../../../src/services/credentials/credentials.schemas.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,0FAA0F;AAC1F,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,8BAA8B,EAC9B,oBAAoB,EACpB,oBAAoB,EACpB,mCAAmC,EACnC,gCAAgC,EAChC,cAAc,EACd,mCAAmC,EACnC,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,qCAAqC,EACrC,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,2BA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WACpD,CAAC,MAAM,CAAC,cAAc,EACzB,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,gBAAgB,CAAC;YACxB,OAAO,EAAE,+DAA+D;SACzE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,MAAM,CAAC,iBAAiB,EAAE,OAAO,EAAE,CAAC;QACtC,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC;YACtC,OAAO,EAAE,kGAAkG;SAC5G,CAAC,CAAC;IACL,CAAC;IACD,IACE,MAAM,CAAC,gBAAgB,EAAE,OAAO;WAC7B,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,EACvD,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC;YACrC,OAAO,EAAE,sGAAsG;SAChH,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAC3D,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACjB,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/C,CAAC","sourcesContent":["// Boundary adapter: Zod schemas validate user-facing files (secrets.json, config.json)\n// against domain enums. This import direction (validation → domain types) is intentional.\nimport z from \"zod\";\nimport {\n APPLICATION_BACKEND_SENSITIVE_ENV_KEYS,\n ApplicationCreationVerificationConfigSchema,\n BackingServicesEnvConfigSchema,\n BackingServiceSource,\n WildoCdnConfigSchema,\n WildoSystemsOfRecordEnvConfigSchema,\n WildoPlatformStorageConfigSchema,\n DatabaseEngine,\n PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS,\n WildoAuthConfigSchema,\n WildoDeploymentRuntime,\n WildoKubernetesConfigSchema,\n WildoLocationType,\n WildoLocalDataStorage,\n WildoLoggingConfigSchema,\n WildoObservabilityConfigSchema,\n WildoDocumentationSiteConfigSchema,\n WildoProviderSelectionOverridesSchema,\n WildoRemoteProviderSchema,\n} from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport { PROVIDER_SENSITIVE_ENV_KEYS } from '~wildo-cli/services/credentials/provider-env-vars.utils';\nimport { LiveEnvKeySet, memoiseOverCatalogue } from '~wildo-cli/services/credentials/composed-provider-catalogue';\n\n\n// ============================================================================\n// Default credential usernames (not secrets — safe to store as constants)\n// ============================================================================\n\n// ---------------------------------------------------------------------------\n// Credential input types (shared between modules and services)\n// ---------------------------------------------------------------------------\n\nexport interface AdminUserInput {\n email: string;\n firstName: string;\n lastName: string;\n /**\n * Optional operator-supplied initial password.\n *\n * When `undefined`, the secrets writer auto-generates a 16-char password\n * (preserving the historical zero-friction local-setup UX where the\n * generated password is printed at the end of `wildo setup`).\n *\n * When provided (today only via the `WILDO_INIT_ADMIN_PASSWORD` env-var\n * seed in {@link platformAdminUserModule}), the explicit value is\n * threaded into `Wildo_Application_Secrets.admin.password` and reused\n * by every downstream consumer (`secrets-writer`, `env-vars-builder`,\n * `k8s-bootstrap`, `app-bootstrap.service`). This is the single\n * non-interactive entry-point for CI flows that need a deterministic\n * admin password.\n */\n password?: string;\n}\n\n/**\n * CLI-namespaced env-var contract for non-interactive / CI-driven seeding\n * of the platform admin identity collected by `wildo setup` and by\n * `wildo init`, which mints the application's own `local` secrets.json\n * (issue #155) and reads these same seeds when no `--admin-*` flag is given.\n *\n * Why a CLI-specific namespace (`WILDO_INIT_ADMIN_*`) instead of reusing\n * the apps-manager runtime contract (`ADMIN_EMAIL` / `ADMIN_PASSWORD` /\n * `ADMIN_FIRST_NAME` / `ADMIN_LAST_NAME`):\n *\n * - The apps-manager keys describe the **running platform process's**\n * admin user (consumed by `init-mode-startup.apps-manager.service.ts`\n * in INIT mode) — they are runtime config for a long-lived service.\n *\n * - These keys describe the **operator running the CLI scaffold** —\n * one-shot input for the local setup wizard. Conflating them risks\n * accidentally seeding a CI runner's apps-manager process with the\n * developer's personal credentials (or vice-versa).\n *\n * Contract semantics (per Slice 2 / 2.3 design decision, TARGETED scope):\n * - Email / first name / last name: env value, when present, is used as\n * the prompt default. The operator can still override interactively.\n * - Password: env value, when present, is threaded directly into\n * `AdminUserInput.password` (skipping the auto-generator). When\n * absent, the secrets writer auto-generates a 16-char password — this\n * preserves the historical UX and is intentional.\n */\nexport enum WildoCliInitAdminEnvKeys {\n WILDO_INIT_ADMIN_EMAIL = 'WILDO_INIT_ADMIN_EMAIL',\n WILDO_INIT_ADMIN_FIRSTNAME = 'WILDO_INIT_ADMIN_FIRSTNAME',\n WILDO_INIT_ADMIN_LASTNAME = 'WILDO_INIT_ADMIN_LASTNAME',\n WILDO_INIT_ADMIN_PASSWORD = 'WILDO_INIT_ADMIN_PASSWORD',\n}\n\n/**\n * The same one-shot CLI contract, for the SECOND administrator (#575).\n *\n * A separate enum rather than four more members on {@link WildoCliInitAdminEnvKeys}, because the two\n * identities have different provenance rules and a shared enum would hide that. The admin's fields\n * are always operator-authored; the approver's are operator-authored on a REMOTE environment and\n * DERIVED from the admin on a local one. Reading them from one vocabulary invites a caller to treat\n * a derived value and a stated one as interchangeable, which is the whole distinction\n * {@link resolveApproverIdentity} exists to keep.\n *\n * Unlike the admin keys the PASSWORD is not optional-with-a-generator here: locally the approver\n * shares the admin's password by construction, and remotely a generated password nobody was told\n * about would produce an approver who cannot sign in — an account that exists and cannot act is\n * worse than a refusal, because the refusal is the part that gets fixed.\n */\nexport enum WildoCliInitApproverEnvKeys {\n WILDO_INIT_APPROVER_EMAIL = 'WILDO_INIT_APPROVER_EMAIL',\n WILDO_INIT_APPROVER_FIRSTNAME = 'WILDO_INIT_APPROVER_FIRSTNAME',\n WILDO_INIT_APPROVER_LASTNAME = 'WILDO_INIT_APPROVER_LASTNAME',\n WILDO_INIT_APPROVER_PASSWORD = 'WILDO_INIT_APPROVER_PASSWORD',\n}\n\nexport interface ProviderKeysInput {\n /**\n * Provider secrets keyed by their exact env-var name (e.g. `OPENAI_API_KEY`,\n * `STRIPE_SECRET_KEY`), collected in the interactive `wildo setup` flow from\n * the registry-derived provider selection. This is the single map for ALL\n * provider secrets — there are no per-provider convenience fields; the setup\n * UX and the backend registry both address providers by env-var name.\n */\n providerEnv?: Record<string, string>;\n /**\n * GitHub ORGANIZATION integration (source-control), distinct from the GitHub\n * OAuth2 provider secret: these feed the `github` block of `secrets.json`,\n * not `providerEnv`.\n */\n githubOrgUrl?: string;\n githubAdminUser?: string;\n githubAdminToken?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Default credential usernames (not secrets — safe to store as constants)\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME = {\n MONGODB_ROOT_USER: 'wildo',\n VALKEY_ADMIN_USER: 'default',\n PG_ADMIN_USER: 'wildo_admin',\n RABBITMQ_ADMIN_USERNAME: 'wildo',\n MINIO_ACCESS_KEY: 'wildo',\n} as const;\n\n\n// ============================================================================\n// Sensitive env var classification\n// ============================================================================\n\n/**\n * Env var keys classified as sensitive (credentials, passwords, API keys).\n * Used to separate secret values from plain-text config when generating\n * deployment artifacts (K8s Secret vs ConfigMap, Docker env_file, etc.).\n *\n * Infrastructure keys are listed explicitly. Provider credentials come from the COMPOSED\n * provider catalogue via `PROVIDER_SENSITIVE_ENV_KEYS` — engine tier plus every provider\n * package discovery has registered.\n *\n * A LIVE view rather than a `new Set([...])` snapshot, and the difference is load-bearing\n * (#329): this module is evaluated on the CLI's first touch of the credential layer, which is\n * always before an application's provider packages have been discovered. A snapshot would have\n * frozen the answer at \"engine providers only\", so a package-shipped provider's API key would\n * have been classified as plain config and written into a Kubernetes `ConfigMap`. The static\n * halves are still snapshotted — they are compile-time constants and cannot move.\n */\nconst STATIC_SENSITIVE_ENV_KEYS: ReadonlySet<string> = new Set([\n // Shared platform runtime env contract secrets\n ...PLATFORM_RUNTIME_SENSITIVE_ENV_KEYS,\n // Shared app-backend env contract secrets\n ...APPLICATION_BACKEND_SENSITIVE_ENV_KEYS,\n]);\n\nexport const SENSITIVE_ENV_KEYS: ReadonlySet<string> = new LiveEnvKeySet(\n // Memoised against the composition generation rather than rebuilt per `.has()`: the K8s secrets\n // generator asks this once per environment variable, and the union is only ever invalidated by a\n // registration.\n memoiseOverCatalogue(() => new Set([...STATIC_SENSITIVE_ENV_KEYS, ...PROVIDER_SENSITIVE_ENV_KEYS])),\n);\n\n// ============================================================================\n// Zod schemas for secrets.json and config.json (CLI validation)\n// ============================================================================\n\nexport const PlatformEnvSecretsJson_Schema = z\n .object({\n mongodb: z.object({\n rootUser: z.string(),\n rootPassword: z.string(),\n }).optional(),\n valkey: z.object({\n adminUser: z.string(),\n adminPassword: z.string(),\n }).optional(),\n postgresql: z.object({\n adminUser: z.string(),\n adminPassword: z.string(),\n }),\n rabbitmq: z.object({\n adminUsername: z.string(),\n adminPassword: z.string(),\n erlangCookie: z.string(),\n }),\n storage: z.object({\n accessKey: z.string(),\n secretKey: z.string(),\n }),\n platform: z.object({\n primarySecret: z.string(),\n /** Dedicated shared secret for admin operations (CLI ↔ apps-manager). */\n adminSecret: z.string(),\n appsManager: z.object({\n privateKey: z.string(),\n publicKey: z.string(),\n }),\n /**\n * The crontabs-batches-manager's dedicated P2P signing keypair (per-service, mirrors\n * `appsManager`). Private half → crontabs (signs every SCHEDULED_CRON / MINION_TICK job\n * token); public half → apps-manager, which distributes it into each app's\n * `PLATFORM_CRONTABS_BATCHES_MANAGER` verify slot. Declared in\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS` and therefore minted both at setup and by the\n * idempotent provisioning self-heal (`wildo local dev` / `wildo local up` preflight,\n * `wildo config sync`), so an environment predating the keypair acquires it on the\n * next command. `.optional()` at the schema layer (mirrors `immudb`) so a secrets.json\n * predating this fix still PARSES — but unlike immudb there is NO graceful degradation:\n * the crontabs config + apps-manager distribution FAIL-LOUD when it is absent (a missing\n * key silently dead-lettered every scheduled tick before this fix).\n */\n crontabsBatchesManager: z.object({\n privateKey: z.string(),\n publicKey: z.string(),\n }).optional(),\n }),\n /**\n * The APPLICATION's own operator secret — distinct from `platform` above, which is the\n * PLATFORM's, and which an application must never hold.\n *\n * One field, and a section of its own rather than a key under `platform`, because the tier is\n * the whole point: `resolveForbiddenPlatformCredentials` refuses to emit any platform-tier\n * credential into an application-tier env, and this value must go INTO that env. Filing it\n * under `platform` would have made it unemittable by the very guard that protects the boundary.\n *\n * `.optional()` for the reason `crontabsBatchesManager` and `immudb` are: a `secrets.json`\n * written before this existed must still PARSE. Unlike an identity it IS mintable, so it is\n * declared in `FRAMEWORK_MANAGED_SECRET_MATERIALS` and the idempotent self-heal fills it on the\n * next command — an environment predating it acquires one without an operator typing anything.\n */\n application: z.object({\n /**\n * Gates the data-seeding and external-data admin surfaces. 48 bytes, minted, rotatable.\n *\n * MINTED rather than operator-authored, and the trade is worth stating. The external-data\n * controller's header defends an unset default — *\"so a fresh deployment never accidentally\n * exposes a door that reaches a third party's production system\"* — and that reasoning was\n * written when there was NO channel to author it, so \"unset\" was the only reachable state.\n * With a channel, the choice is between a door nobody can open and a door behind 48 bytes of\n * entropy. The direct analogue one tier up settles it: `platform.adminSecret` is minted at the\n * same length for the same kind of surface. Reversible — remove this from the materials\n * registry and absent-by-default returns, since every consumer already answers 503 on absence.\n */\n adminSecret: z.string(),\n }).optional(),\n admin: z.object({\n email: z.string(),\n password: z.string(),\n firstName: z.string(),\n lastName: z.string(),\n }),\n /**\n * The SECOND platform administrator — the one who approves an application-wide access grant.\n *\n * Not a nicety. `applicationAccessGrantApproverIsDistinct` refuses `operator === approver` and\n * refuses an ABSENT approver, and the application-scoped grant has deliberately no\n * auto-approval branch — the schema states why: this grant names no tenant, so *\"a grant that\n * could approve itself would make the two-person rule ceremonial\"*. A deployment with one\n * administrator therefore cannot use the widest read the system offers, at all. The refusal was\n * built and the party who discharges it never was (#575).\n *\n * `.optional()` for the reason `crontabsBatchesManager` and `immudb` are: a `secrets.json`\n * written before this existed must still PARSE. Unlike a generated keypair it cannot be\n * self-healed into place, because an identity is not mintable — see the note on\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS`' `ADMIN_PASSWORD` material, which is careful to declare\n * only the password so that provisioning never invents an admin identity. An environment\n * predating this acquires an approver by re-running setup, or by authoring the block.\n *\n * Locally this is DERIVED from `admin` (see `resolveApproverIdentity`) and shares its password,\n * which makes the two-person rule ceremonial there — deliberately, because the alternative is a\n * developer who cannot exercise an application-wide read at all. That is exactly why a\n * non-local environment gets no derivation and must state the approver itself.\n */\n approver: z.object({\n email: z.string(),\n password: z.string(),\n firstName: z.string(),\n lastName: z.string(),\n }).optional(),\n atlas: z.object({\n apiPublicKey: z.string(),\n apiPrivateKey: z.string(),\n }).optional(),\n /**\n * immudb state-signing keypair — the cryptographic whole-server-substitution defense\n * for the tamper-evident audit store (`COMPLIANCE_AUDIT_TRAIL`). Auto-generated (ECDSA\n * P-256) from the `FRAMEWORK_MANAGED_SECRET_MATERIALS` registry — at setup for a new\n * environment, and by the idempotent provisioning self-heal for an existing one; the two\n * halves flow to DIFFERENT places and MUST NOT be conflated:\n *\n * - `stateSigningPrivateKey` (SEC1 \"EC PRIVATE KEY\" PEM) — mounted into the SELF-hosted\n * immudb server (`--signingKey`, immudb `x509.ParseECPrivateKey`) so it signs its\n * `ImmutableState`. SERVER-side ONLY: rides the k8s `immudb-secret` / the compose\n * local-data key file. NEVER injected into `providerEnv` or any app-pod env.\n * - `stateSigningPublicKey` (SPKI PEM) — pinned by the audit client via the\n * `IMMUDB_STATE_PUBLIC_KEY` provider secret; the client verifies the server's signed\n * state against it (immudb-verified-kv-client `verifyImmutableStateSignature`). A\n * substituted immudb cannot forge the signature without the private key, so substitution\n * is cryptographically caught. Public material — safe to deliver to every app runtime.\n *\n * Optional at the schema layer (mirrors mongodb/valkey): a secrets.json that lacks it\n * still validates, and immudb then runs UNSIGNED (client warns \"signing OFF\") — graceful\n * degradation, not a hard failure. That path now only survives for a CI-reconstructed\n * secrets.json (`reconstructSecretsFromEnv`, which publishes no immudb material); a\n * file-backed environment is provisioned automatically on the next CLI command.\n */\n immudb: z.object({\n stateSigningPrivateKey: z.string(),\n stateSigningPublicKey: z.string(),\n /**\n * #1696 — the self-hosted immudb server's built-in `immudb` SYSADMIN password, a PLATFORM secret. The\n * server is initialised with it (compose `IMMUDB_ADMIN_PASSWORD`, the k8s `immudb-secret`), and\n * apps-manager — the only runtime that receives it (`IMMUDB_ADMIN_PASSWORD` in its env) — logs in with it\n * to give each application its OWN database and its OWN `READ_WRITE` user. No application holds it.\n *\n * Until #1696 the server's admin password was COPIED from the owning application's operator-authored\n * `providerEnv.IMMUDB_PASSWORD`, which is also the credential every application's audit sink logged in\n * with — so every hosted application held the sysadmin of every application's audit data. Minted here,\n * it is no application's value.\n *\n * Its own material (`IMMUDB_ADMIN_PASSWORD`) rather than a third key on the state-signing keypair, so an\n * environment that predates it acquires only this key and its keypair is never re-minted. `.optional()` so\n * a `secrets.json` written before it still parses; the self-heal fills it on the next CLI command.\n */\n adminPassword: z.string().optional(),\n }).optional(),\n /**\n * Issue #74 — the SCRAM password `mongot` authenticates to mongod with, as a\n * `searchCoordinator`-roled user in mongod's `admin` database. Auto-generated from the\n * `FRAMEWORK_MANAGED_SECRET_MATERIALS` registry.\n *\n * Only the password lives here. The USERNAME is a framework-owned service identity\n * (`MONGOT_SYNC_SOURCE.USERNAME`), so it is a code constant rather than a stored value —\n * storing it would create a second place a rename has to reach.\n *\n * Both deployment lanes read THIS one value, which is the point: mongot never receives a\n * password directly, it reads a FILE, and the user it authenticates as is created by the\n * `mongodb-init` step. Three consumers of one secret is exactly the shape that drifts if\n * each lane mints its own — the immudb admin password was that defect one datastore over\n * (contract stated, k8s lane implemented, compose lane silently on the packaged default).\n *\n * `.optional()` mirrors mongodb/valkey/immudb so a secrets.json predating this parses; a\n * file-backed environment acquires it on the next self-heal, and an environment that\n * self-hosts no mongod never needs it.\n */\n mongot: z.object({\n syncSourcePassword: z.string(),\n }).optional(),\n /**\n * Protocol-aware provider credentials keyed by the actual process env var\n * name that should be injected into runtime services.\n */\n providerEnv: z.record(z.string(), z.string()).optional(),\n /**\n * System-of-record credentials, keyed by the DERIVED environment-variable name\n * (`WILDO_SOR_<NAME>__<SLOT>`, #1055).\n *\n * ## Why it is flat, and not a tree keyed by instance (R5)\n *\n * A per-instance tree would be the obvious shape and it breaks two mechanisms. The CI secret\n * reconstruction walks a STATIC table of secret paths, and `isOptionalSecretPath` THROWS on a\n * `z.record` node — so an instance-keyed section listed there crashes `wildo config sync --domain\n * cicd`. And `envVarSuffixForSecretPath` is not injective, so two instances of one vendor would\n * collapse onto one CI input. Flat-by-variable-name is the shape `providerEnv` already uses for\n * the same reason, and per-instance structure is recovered by PARSING the key — which the `__`\n * delimiter makes unambiguous.\n *\n * ## Why it is not `providerEnv` itself\n *\n * That map is attributed to a PROVIDER's secrets contract by `filterProviderEnvToScope`, and a\n * system of record is deliberately not a provider (D10). Sharing the map would make every\n * instance's credential look like a provider key to the scoping logic — and be silently dropped by\n * it once the vendor leaves `providers.scopes`.\n *\n * ## Why it must be DECLARED here at all\n *\n * `wildo config sync --rotate-secrets` and `wildo setup` re-write `secrets.json` THROUGH this\n * schema. An undeclared section is not preserved — it is deleted. Declaring it is the whole\n * mechanism that stops an operator's ERP credentials disappearing on the next rotation; rotation\n * itself never touches the section, because it is registry-driven and these are not\n * framework-managed secrets.\n */\n systemsOfRecordEnv: z.record(z.string(), z.string()).optional(),\n /**\n * Verification secrets of the application's INBOUND endpoints (`POST /webhooks/app/{endpointKey}`,\n * #1596), keyed by the DERIVED variable name `WILDO_INBOUND_<ENDPOINT_KEY>__SECRET`\n * (`deriveInboundEndpointSecretEnvVarName` in `@wildo-ai/saas-models`).\n *\n * Flat and keyed by variable name for the reasons `systemsOfRecordEnv` gives above: the key space is\n * open (one key per endpoint the application declares) and the endpoint is recovered by parsing the\n * name. Not `providerEnv`, because an inbound endpoint is the application's own and not a provider's,\n * so `filterProviderEnvToScope` would drop it.\n *\n * Delivered to the application BACKEND only — the one runtime that mounts the endpoint — and stripped\n * from every minion, which would otherwise hold a signing secret it cannot use. Rotation leaves it\n * alone: the SENDER holds the same secret, so changing it here alone breaks every delivery.\n */\n inboundEndpointEnv: z.record(z.string(), z.string()).optional(),\n github: z.object({\n orgUrl: z.string().optional(),\n adminUser: z.string().optional(),\n adminToken: z.string().optional(),\n }).optional(),\n });\nexport type PlatformEnvSecretsJson = z.infer<typeof PlatformEnvSecretsJson_Schema>;\n\n/**\n * Who a credential belongs to when several applications share one environment's infrastructure.\n *\n * An application HOSTED on another's infrastructure (`infrastructureHost`) reads every shared credential\n * from its host's `secrets.json` and keeps only its own in its file — so there is exactly one copy of a\n * shared credential, held by the one application that runs the thing it opens.\n */\nexport enum SecretOwner {\n /**\n * The identity of a shared container or platform service: backing-service admin credentials, the\n * platform's secrets and signing keypairs, the immudb and mongot material, the platform's Atlas and\n * GitHub access. Held by the infrastructure host only.\n */\n SHARED_INFRASTRUCTURE = 'shared-infrastructure',\n /**\n * Material only this application uses: its own operator-door secret, its provider API keys, and the\n * administrator and approver identities its registration seeds as its first users.\n */\n APPLICATION = 'application',\n}\n\n/**\n * Owner of every top-level `secrets.json` section. Total over the schema by type, so a section added\n * tomorrow does not compile until somebody decides whether a hosted application may hold its own copy.\n *\n * `admin` and `approver` are APPLICATION although the platform's own INIT also reads them: a hosted\n * application never runs platform INIT (that is its host's), and the only thing it does with them is\n * seed its OWN first administrator and approver at registration.\n */\nexport const SECRETS_SECTION_OWNERSHIP: Readonly<Record<keyof PlatformEnvSecretsJson, SecretOwner>> = {\n mongodb: SecretOwner.SHARED_INFRASTRUCTURE,\n valkey: SecretOwner.SHARED_INFRASTRUCTURE,\n postgresql: SecretOwner.SHARED_INFRASTRUCTURE,\n rabbitmq: SecretOwner.SHARED_INFRASTRUCTURE,\n storage: SecretOwner.SHARED_INFRASTRUCTURE,\n platform: SecretOwner.SHARED_INFRASTRUCTURE,\n application: SecretOwner.APPLICATION,\n admin: SecretOwner.APPLICATION,\n approver: SecretOwner.APPLICATION,\n atlas: SecretOwner.SHARED_INFRASTRUCTURE,\n immudb: SecretOwner.SHARED_INFRASTRUCTURE,\n mongot: SecretOwner.SHARED_INFRASTRUCTURE,\n providerEnv: SecretOwner.APPLICATION,\n /*\n * APPLICATION. These are the credentials for the external systems THIS application reads from, keyed by the\n * instance names its own saas config declares. A hosted application authors its own systems of record (or\n * `{ enabled: false }`), so inheriting its host's would hand it a credential to somebody else's ERP.\n */\n systemsOfRecordEnv: SecretOwner.APPLICATION,\n /* APPLICATION: the secrets of endpoints THIS application's own handlers declare, agreed with its own senders. */\n inboundEndpointEnv: SecretOwner.APPLICATION,\n github: SecretOwner.SHARED_INFRASTRUCTURE,\n};\n\n/**\n * The sections of `secrets` a hosted application holds itself — everything else is its host's. Absent\n * sections stay absent; nothing is defaulted.\n */\nexport function projectApplicationOwnedSecrets(secrets: Partial<PlatformEnvSecretsJson>): Partial<PlatformEnvSecretsJson> {\n const projected: Record<string, unknown> = {};\n for (const [section, owner] of Object.entries(SECRETS_SECTION_OWNERSHIP)) {\n const value = (secrets as Record<string, unknown>)[section];\n if (owner === SecretOwner.APPLICATION && value !== undefined) {\n projected[section] = value;\n }\n }\n return projected as Partial<PlatformEnvSecretsJson>;\n}\n\nconst PlatformEnvStorageConfig_Schema = z.object({\n provider: z.enum(['minio']),\n useSsl: z.boolean(),\n bucket: z.string(),\n});\n\nconst PlatformEnvPostgresqlConfig_Schema = z.object({\n database: z.string(),\n sslMode: z.string(),\n});\n\n/**\n * Slice 6 / F-20 — typed external-service binding for ClamAV (managed\n * antivirus scanner): the validate command reads `host` through this\n * schema, so a typo at the persisted-config layer fails at parse time.\n */\nexport const ClamavExternalServiceSchema = z.object({\n host: z.string().min(1),\n port: z.number().int().positive().optional(),\n tls: z.boolean().optional(),\n});\nexport type ClamavExternalServiceConfig = z.infer<typeof ClamavExternalServiceSchema>;\n\n/**\n * Slice 3 deep-review H-1 (2026-04-13): use `z.strictObject` (not `z.object`)\n * at the root so that unknown top-level keys in a persisted\n * `environments/<env>/config.json` fail-closed at parse time instead of\n * being silently stripped. Today the loader (`environment-registry.service`)\n * uses `safeParse` and treats a parse failure as a cache miss, so this\n * change does not crash the CLI at boot — but it does ensure that\n * `wildo config validate` (which calls `parse`) catches a typoed root key\n * as a hard error, matching the strict posture of `WildoSaasConfigSchema`.\n */\nexport const PlatformEnvConfigJson_Schema = z.strictObject({\n type: z.enum(WildoLocationType),\n runtime: z.enum(WildoDeploymentRuntime),\n runtimeEnvironment: z.enum(RuntimeEnvironment).optional(),\n /**\n * Where this environment's self-hosted backing services keep their data — a Docker named volume\n * or a host bind mount under `local_data/<service>/`.\n *\n * `.optional()` because this is a STRICT schema read back from a `config.json` written before the\n * field existed, and a parse failure is treated as a cache miss that silently discards the whole\n * record. Absence is read through `resolveLocalDataStorage`, which derives it from `locationType`\n * — so an environment provisioned before this field keeps a correct answer rather than an empty\n * one, and does not have to be re-synced to get it.\n */\n localDataStorage: z.enum(WildoLocalDataStorage).optional(),\n database: z.object({\n engine: z.enum(DatabaseEngine),\n source: z.enum(BackingServiceSource),\n /**\n * Slice 4.B.0 (2026-05-07): managed-brand identifier when\n * `source === MANAGED`. For Mongo: `'atlas'`. For Postgres:\n * one of `'aws-rds' | 'gcp-cloud-sql' | 'azure-database' |\n * 'supabase' | 'neon' | 'render'`. Generalized from the\n * pre-reshape source-only model where `'atlas'` was a `source`\n * value.\n */\n provider: z.string().min(1).optional(),\n }),\n /**\n * Which declared backing store the APPLICATION's own resources persist to — mirrored from the\n * authored `applicationDatabase` in `wildo.infra.<env>.config.ts`.\n *\n * Distinct from `database` directly above, which is the PLATFORM's engine. The two move\n * independently: a PostgreSQL platform can host a MongoDB application and vice versa.\n *\n * Written RESOLVED by the current CLI (absence in the infra config means PostgreSQL, #1571). OPTIONAL\n * only so an older `config.json` still parses; a reader of an absent value resolves it through\n * `resolveApplicationDatabaseEngine`, never through a default of its own.\n */\n applicationDatabase: z.object({\n engine: z.enum(DatabaseEngine),\n }).optional(),\n infrastructure: z.object({\n storage: PlatformEnvStorageConfig_Schema,\n postgresql: PlatformEnvPostgresqlConfig_Schema,\n }),\n /**\n * Authored backing-services snapshot, mirrored from the parsed\n * `wildo.infra.<env>.config.ts`. Carries per-service overrides\n * (host/port/name/vhost/endpoint/bucket/database) that the\n * `ServiceAddressResolver`, docker-compose generator, and env-vars-builder\n * use to honor the author's intent. When omitted (legacy generated\n * configs), all consumers fall back to catalog defaults.\n *\n * Persisted shape matches the author shape 1:1 — the canonical contract\n * lives in `BackingServicesEnvConfigSchema` so a future CLI run that\n * re-syncs from infra config produces a stable JSON snapshot.\n */\n backingServices: BackingServicesEnvConfigSchema.optional(),\n /**\n * Authored `serviceAuth` policy snapshot, mirrored from the parsed\n * `wildo.infra.<env>.config.ts`. This is the SOURCE OF TRUTH for\n * platform-managed JWT TTLs (`accessTokenExpirationMinutes` /\n * `refreshTokenExpirationDays`) seeded into every `Wildo_Application_Config`\n * at apps-manager init time. Authored value > schema default (15 / 30).\n * When the field is absent at parse time, the apps-manager init defaults\n * flow falls back to `WildoAuthConfigSchema.parse({})` so the runtime\n * backend always receives a fully-defined `jwt` block.\n */\n serviceAuth: WildoAuthConfigSchema.optional(),\n /**\n * Authored logging posture snapshot mirrored from `wildo.infra.<env>.config.ts`\n * (Slice 3.5). Persisted so the runtime contract survives a\n * `wildo config sync` cycle: `env-vars-builder` reads it back to emit\n * `LOG_LEVEL` / `LOG_FORMATTED_CONSOLE_ERRORS` for every long-running\n * platform/application process, and `LoggerService.loadConfiguration`\n * consumes the env vars at boot. Missing => LoggerService keeps its\n * built-in defaults (level `debug`, pino-pretty auto-detect by\n * `APPLICATION_ENV`).\n */\n logging: WildoLoggingConfigSchema.optional(),\n /**\n * Authored OTLP telemetry posture mirrored from `wildo.infra.<env>.config.ts`\n * (Slice 2 Phase 5). Persisted so `env-vars-builder` can project `OTEL_*` for the\n * `--import` preload across a `wildo config sync` cycle. Missing => telemetry off.\n */\n observability: WildoObservabilityConfigSchema.optional(),\n /**\n * Authored per-environment external-provider SELECTION override mirrored\n * from `wildo.infra.<env>.config.ts` (2026-07-10). Persisted so\n * `env-vars-builder` can project `WILDO_PROVIDER_SELECTION_OVERRIDES` across\n * a `wildo config sync` cycle; `ExternalProvidersRegistryBackendService`\n * reads it at capability-resolution time. Missing => the app-wide\n * `wildo.saas.config.ts` selection applies unchanged.\n */\n providerSelection: WildoProviderSelectionOverridesSchema.optional(),\n /**\n * Authored per-environment DOCUMENTATION-SITE origins mirrored from\n * `wildo.infra.<env>.config.ts`. Persisted so `env-vars-builder` can project\n * `WILDO_DOCS_API_BASE_URL` / `WILDO_DOCS_APP_URL` /\n * `WILDO_DOCS_FRONTEND_SERVICE_NAME` across a `wildo config sync` cycle; the\n * application`s `docusaurus.config.ts` reads them and refuses a PRODUCTION build\n * when unset. Missing => the docs config falls back to its local dev defaults.\n */\n documentationSite: WildoDocumentationSiteConfigSchema.optional(),\n /**\n * Generated snapshot of the local authored application-creation verification\n * posture. Env generation consumes this snapshot; `.env` is only its sink.\n */\n applicationCreationVerification: ApplicationCreationVerificationConfigSchema.optional(),\n /**\n * Public domain (`WildoInfraEnvConfig.publicDomain`) — the\n * runtime-agnostic external hostname browsers and reverse proxies\n * resolve. Required at the persisted-config layer because the\n * authored schema requires it; a hand-edited config that drops the\n * field fails Zod parse with a clear error instead of silently\n * defaulting at read time.\n */\n publicDomain: z.string().min(1),\n /**\n * Per-service public subdomain map (`WildoInfraEnvConfig.serviceHosts`) —\n * mirrored from the authored infra config. `<serviceKey> → subdomain chain`\n * (or `''` for apex) under `publicDomain`. Consumed by the K8s application\n * endpoint builder + ingress generator via `buildServicePublicHost`. Optional\n * — an unauthored key falls back to `<serviceKey>.<publicDomain>`.\n */\n serviceHosts: z.record(z.string().min(1), z.string()).optional(),\n /**\n * Per-service CDN publish config (`WildoInfraEnvConfig.cdn`) — mirrored from\n * the authored infra config. `<serviceKey> → {enabled, bucket?, bucketPrefix?,\n * vendor}`. Reuses the authoritative `WildoCdnConfigSchema` from config-lib\n * (single source of truth — no loose re-declaration). Optional: an unmapped\n * or `enabled: false` service is nginx-pod-served (the default). Consumed by\n * the deploy render (nginx-skip) + `wildo frontend publish`.\n */\n cdn: z.record(z.string().min(1), WildoCdnConfigSchema).optional(),\n /**\n * The platform tier's own bucket, remote-only (`WildoInfraEnvConfig.platformStorage`, #1112). Rendered into the\n * platform services' env through `resolvePlatformObjectStorageBucket`; absent means the fixed platform bucket.\n */\n /**\n * WHERE each declared system of record lives in this environment, mirrored from the authored\n * `wildo.infra.<env>.config.ts` (#1055). The schema is imported from `platform-config-lib` — the\n * single source — rather than re-declared here.\n *\n * This schema is STRICT, which is why it is the fourth place a new infra field has to be added and\n * not the third: the input schema, the `defineInfraEnvConfig` transform and the `config.json`\n * builder all carry it, and a key none of them agreed on fails the parse here. That is the good\n * failure — the one this section is guarding against is the opposite, a field written by the builder\n * and silently dropped because nothing declared it.\n */\n systemsOfRecord: WildoSystemsOfRecordEnvConfigSchema.optional(),\n platformStorage: WildoPlatformStorageConfigSchema.optional(),\n kubernetes: WildoKubernetesConfigSchema.optional(),\n remoteProvider: WildoRemoteProviderSchema.optional(),\n /**\n * The application whose infrastructure this environment runs on, when it is HOSTED\n * (`WildoInfraEnvConfig.infrastructureHost`, resolved: absolute paths). Absent means this application OWNS\n * its infrastructure. Every CLI action on SHARED infrastructure reads it — through\n * `EnvironmentRegistry.resolveInfrastructureHost` / `InfrastructureHost.resolve` — and leaves that action to the host.\n */\n infrastructureHost: z.strictObject({\n applicationRoot: z.string().min(1),\n infraConfigPath: z.string().min(1),\n }).optional(),\n atlas: z.object({\n apiBaseUrl: z.string(),\n projectId: z.string(),\n clusterName: z.string(),\n }).optional(),\n externalServices: z\n .object({\n mongodb: z.object({ provider: z.string() }),\n valkey: z.object({ provider: z.string() }).optional(),\n storage: z.object({ provider: z.string() }),\n rabbitmq: z.object({ provider: z.string() }),\n /**\n * Optional ClamAV external-service binding (managed antivirus\n * scanner). Slice 6 / F-20: typed `host`/`port`/`tls` so the\n * validate path no longer needs an untyped cast and a downstream\n * wiring change cannot bypass schema enforcement.\n */\n clamav: ClamavExternalServiceSchema.optional(),\n })\n .optional(),\n /**\n * STRICT on purpose (5.3 review): this object is hand-edit-only for most slots (the wizard\n * authors only the Atlas mongodb entry), and every consumer does a direct property read — so a\n * typo key (`postgres`, `postgresQL`) used to be silently STRIPPED and degrade into an\n * empty-connection boot failure three layers from the misspelling. Rejecting unknown keys turns\n * the typo into a named parse error at the file that contains it.\n */\n externalEndpoints: z\n .strictObject({\n mongodb: z.object({ connectionUrl: z.string() }).optional(),\n /**\n * MANAGED PostgreSQL platform endpoint (RDS/Neon/Cloud SQL…) — the PG mirror of the\n * `mongodb.connectionUrl` slot above. Read by `emitPlatformPostgresEnv` when the platform's\n * `database.engine === POSTGRESQL` with `source: MANAGED`; a full URL for the same reason\n * Atlas is (an external endpoint's address, credentials and TLS posture arrive as one\n * opaque value the environment cannot derive).\n */\n postgresql: z.object({ connectionUrl: z.string() }).optional(),\n valkey: z.object({ host: z.string(), port: z.number() }).optional(),\n rabbitmq: z.object({ host: z.string(), port: z.number() }).optional(),\n storage: z.object({ endpoint: z.string(), port: z.number() }).optional(),\n })\n .optional(),\n}).superRefine((config, ctx) => {\n if (config.type === WildoLocationType.REMOTE && !config.runtimeEnvironment) {\n ctx.addIssue({\n code: \"custom\",\n path: ['runtimeEnvironment'],\n message: 'runtimeEnvironment is required for remote environments',\n });\n }\n if (\n config.type === WildoLocationType.REMOTE\n && config.runtime === WildoDeploymentRuntime.KUBERNETES\n && !config.kubernetes\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['kubernetes'],\n message: 'kubernetes config is required for remote Kubernetes environments',\n });\n }\n if (\n config.type === WildoLocationType.REMOTE\n && config.runtime === WildoDeploymentRuntime.KUBERNETES\n && !config.remoteProvider\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['remoteProvider'],\n message: 'remoteProvider is required for remote Kubernetes environments',\n });\n }\n if (config.externalEndpoints?.storage) {\n ctx.addIssue({\n code: \"custom\",\n path: ['externalEndpoints', 'storage'],\n message: 'externalEndpoints.storage is not supported yet; only managed MinIO wiring is currently supported',\n });\n }\n if (\n config.externalServices?.storage\n && config.externalServices.storage.provider !== 'minio'\n ) {\n ctx.addIssue({\n code: \"custom\",\n path: ['externalServices', 'storage'],\n message: 'externalServices.storage must use provider \"minio\"; only managed MinIO wiring is currently supported',\n });\n }\n});\nexport type PlatformEnvConfigJson = z.infer<typeof PlatformEnvConfigJson_Schema>;\n\n/**\n * Generated `application-runtime-identity.json` — a per-env record mapping an\n * app slug to its apps-manager-minted `APPLICATION_ID` (a Mongo `_id`, NOT\n * derivable offline from the slug).\n *\n * Written by the credential-fetching bootstrap flows (see\n * `AppBootstrapService.prepareApplicationEnvTargets`) so the OFFLINE\n * docker-compose render paths — `wildo config sync --domain manifest` (which\n * runs LAST in a full sync and re-renders the compose file) and the\n * `wildo local up` self-heal — can bake the correct `APPLICATION_ID` literal\n * into each per-app minion/worker service without re-contacting apps-manager.\n *\n * Kept OUT of `config.json` on purpose: `config.json`\n * ({@link PlatformEnvConfigJson}) is the app-agnostic PLATFORM infra config,\n * whereas this is app-runtime IDENTITY. Keyed by slug so multiple apps sharing\n * one env-scope each resolve their own id.\n */\nexport const ApplicationRuntimeIdentityJson_Schema = z.record(\n z.string().min(1),\n z.object({ applicationId: z.string().min(1) }),\n);\nexport type ApplicationRuntimeIdentityJson = z.infer<typeof ApplicationRuntimeIdentityJson_Schema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/credentials/credentials.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,sBAAsB,EAAkC,MAAM,qDAAqD,CAAC;AAIpJ,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAGvG,OAAO,EACL,oBAAoB,EACpB,cAAc,EAKf,MAAM,+BAA+B,CAAC;AAGvC,UAAU,eAAe;IACvB,QAAQ,EAAE;QACR,MAAM,EAAE,cAAc,CAAC;QACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B;;sEAE8D;QAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,kBAAkB;IAM/B,MAAM,CAAC,gBAAgB,CACrB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,sBAAsB,GAClC,IAAI;IAmBP,MAAM,CAAC,eAAe,CACpB,GAAG,EAAE,gCAAgC,EACrC,SAAS,EAAE,eAAe,GACzB,IAAI;CA2HN"}
1
+ {"version":3,"file":"credentials.service.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/credentials.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,sBAAsB,EAAkC,MAAM,qDAAqD,CAAC;AAIpJ,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAGvG,OAAO,EACL,oBAAoB,EACpB,cAAc,EAKf,MAAM,+BAA+B,CAAC;AAGvC,UAAU,eAAe;IACvB,QAAQ,EAAE;QACR,MAAM,EAAE,cAAc,CAAC;QACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B;;sEAE8D;QAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,kBAAkB;IAM/B,MAAM,CAAC,gBAAgB,CACrB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,sBAAsB,GAClC,IAAI;IAmBP,MAAM,CAAC,eAAe,CACpB,GAAG,EAAE,gCAAgC,EACrC,SAAS,EAAE,eAAe,GACzB,IAAI;CA2HN"}
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.service.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/credentials.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAiD,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AACpJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAEnG,OAAO,EAAE,+BAA+B,EAAE,2CAA2C,EAAE,yCAAyC,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAExO,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EACL,oBAAoB,EAEpB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AAkBvC,MAAM,OAAO,kBAAkB;IAE/B,+EAA+E;IAC/E,eAAe;IACf,+EAA+E;IAE/E,MAAM,CAAC,gBAAgB,CACrB,OAAe,EACf,WAAmC;QAEnC,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACxD,SAAS,CAAC,qBAAqB,CAAC,GAAG,CAAC,C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B,EAAE,OAAO,IAAI,SAAS,CAAC,kBAAkB;gBACxD,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,CAAC,kBAAkB,EAAE,EAAE;gBAC9D,CAAC,CAAC,SAAS;SACd,CAAC;QAEF,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxD,SAAS,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC;QACrC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAClF,gBAAgB,CAAC,eAAe,EAAE,CAAC;IACrC,CAAC;CAGA","sourcesContent":["import { writeFileSync } from \"fs\";\nimport { join } from \"path\";\nimport { FILE_NAMES } from '~wildo-cli/infrastructure/io/io.schemas';\nimport { PlatformEnvConfigJson, PlatformEnvSecretsJson, projectApplicationOwnedSecrets } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\n\nimport { PLATFORM_DATA_SERVICES_PROVIDER, DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION, DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION, DEFAULT_PLATFORM_ATLAS_CONFIGURATION } from '~wildo-cli/services/data-services/data-services.schemas';\nimport { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { FileUtils } from '~wildo-cli/infrastructure/io/file.utils';\nimport {\n BackingServiceSource,\n DatabaseEngine,\n K8S_LOCAL_DEFAULTS,\n PUBLIC_DOMAIN_DEFAULTS,\n WildoDeploymentRuntime,\n WildoLocationType,\n} from '@wildo-ai/platform-config-lib';\n\n\ninterface DatabaseAnswers {\n database: {\n engine: DatabaseEngine;\n source?: BackingServiceSource;\n /** Slice 4.B.0 (2026-05-07): managed-brand identifier (e.g.\n * `'atlas'` for Mongo Atlas, `'aws-rds'` / `'supabase'` /\n * `'neon'` / etc. for Postgres). Set when source=managed. */\n provider?: string;\n };\n atlasConnectionUrl?: string;\n atlasProjectId?: string;\n atlasClusterName?: string;\n atlasApiBaseUrl?: string;\n}\n\nexport class ConfigSecretsUtils {\n\n// ============================================================================\n// secrets.json\n// ============================================================================\n\nstatic writeSecretsJson(\n envName: string,\n credentials: PlatformEnvSecretsJson,\n): void {\n const dir = EnvironmentUtils.resolveSecretsDir(envName);\n FileUtils.ensureDirectoryExists(dir);\n /*\n * A HOSTED environment's file holds only its application-owned sections. The caller's object is the\n * EFFECTIVE secrets (the host's shared credentials overlaid by this application's own), so writing it\n * verbatim would copy every shared credential into a second file that nothing reads and that silently\n * diverges the moment the host rotates. This is the single writer, so the projection happens here.\n */\n const hosted = EnvironmentRegistry.resolveInfrastructureHost(envName, EnvironmentUtils.resolveConfigDir(envName)) !== null;\n const persisted = hosted ? projectApplicationOwnedSecrets(credentials) : credentials;\n writeFileSync(join(dir, FILE_NAMES.SECRETS_JSON), JSON.stringify(persisted, null, 2));\n EnvironmentUtils.invalidateCache();\n}\n\n// ============================================================================\n// config.json\n// ============================================================================\n\nstatic writeConfigJson(\n env: PlatformEnvironmentConfiguration,\n dbAnswers: DatabaseAnswers,\n): void {\n const runtime = env.runtime;\n const locationType = env.locationType;\n const source = dbAnswers.database.source ?? BackingServiceSource.SELF;\n // Slice 4.B.0 (2026-05-07): Atlas detection through (source=MANAGED,\n // provider='atlas'). Pre-reshape: `source === ATLAS`.\n const isAtlas = source === BackingServiceSource.MANAGED\n && dbAnswers.database.provider === 'atlas';\n\n const kubernetesConfig =\n runtime === WildoDeploymentRuntime.KUBERNETES\n ? locationType === WildoLocationType.LOCAL\n ? {\n namespace: env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE,\n }\n : env.kubernetes\n ? {\n namespace: env.kubernetes.namespace,\n }\n : undefined\n : undefined;\n\n if (\n runtime === WildoDeploymentRuntime.KUBERNETES\n && locationType === WildoLocationType.REMOTE\n && !kubernetesConfig\n ) {\n throw new Error(\n `Remote Kubernetes environment \"${env.name}\" is missing explicit kubernetes namespace metadata`,\n );\n }\n\n // `publicDomain` is required at the persisted-config layer (mirrors\n // the schema-required `WildoInfraEnvConfig.publicDomain`). Resolve it\n // from the in-memory environment first; for the local-K8s init path\n // (where the upstream env may not yet carry a value) fall back to the\n // canonical write-time default. There is intentionally no remote\n // default — remote envs must author the apex explicitly.\n const publicDomain =\n env.publicDomain\n ?? (\n runtime === WildoDeploymentRuntime.KUBERNETES && locationType === WildoLocationType.LOCAL\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_K8S\n : runtime === WildoDeploymentRuntime.DOCKER_COMPOSE && locationType === WildoLocationType.LOCAL\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_COMPOSE\n : undefined\n );\n\n if (!publicDomain) {\n throw new Error(\n `Environment \"${env.name}\" is missing top-level publicDomain metadata`,\n );\n }\n\n const remoteProvider =\n locationType === WildoLocationType.REMOTE\n && env.remoteProvider?.registryEndpoint\n ? {\n provider: env.remoteProvider.provider,\n registryEndpoint: env.remoteProvider.registryEndpoint,\n region: env.remoteProvider.region,\n }\n : undefined;\n\n if (\n runtime === WildoDeploymentRuntime.KUBERNETES\n && locationType === WildoLocationType.REMOTE\n && !remoteProvider?.registryEndpoint\n ) {\n throw new Error(\n `Remote Kubernetes environment \"${env.name}\" is missing remoteProvider.registryEndpoint metadata`,\n );\n }\n\n const config: PlatformEnvConfigJson = {\n type: locationType,\n runtime,\n runtimeEnvironment: env.runtimeEnvironment,\n // Carried by BOTH `config.json` writers; the authored projection is the other.\n infrastructureHost: env.infrastructureHost,\n database: {\n engine: dbAnswers.database.engine,\n source,\n },\n infrastructure: {\n storage: {\n provider: DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION.PROVIDER,\n useSsl: false,\n bucket: DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION.BUCKET,\n },\n postgresql: {\n database: DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION.DATABASE,\n sslMode: DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION.SSL_MODE,\n },\n },\n publicDomain,\n kubernetes: kubernetesConfig,\n remoteProvider,\n atlas: isAtlas && dbAnswers.atlasProjectId\n ? {\n apiBaseUrl: dbAnswers.atlasApiBaseUrl ?? DEFAULT_PLATFORM_ATLAS_CONFIGURATION.DEFAULT_API_BASE_URL,\n projectId: dbAnswers.atlasProjectId,\n clusterName: dbAnswers.atlasClusterName ?? DEFAULT_PLATFORM_ATLAS_CONFIGURATION.DEFAULT_CLUSTER_NAME,\n }\n : undefined,\n externalServices: {\n mongodb: { provider: isAtlas ? PLATFORM_DATA_SERVICES_PROVIDER.ATLAS : PLATFORM_DATA_SERVICES_PROVIDER.SELF_MANAGED },\n valkey: { provider: PLATFORM_DATA_SERVICES_PROVIDER.VALKEY_SELF },\n storage: { provider: PLATFORM_DATA_SERVICES_PROVIDER.MINIO },\n rabbitmq: { provider: PLATFORM_DATA_SERVICES_PROVIDER.SELF_MANAGED },\n },\n externalEndpoints: isAtlas && dbAnswers.atlasConnectionUrl\n ? { mongodb: { connectionUrl: dbAnswers.atlasConnectionUrl } }\n : undefined,\n };\n\n const dir = EnvironmentUtils.resolveConfigDir(env.name);\n FileUtils.ensureDirectoryExists(dir);\n writeFileSync(join(dir, FILE_NAMES.CONFIG_JSON), JSON.stringify(config, null, 2));\n EnvironmentUtils.invalidateCache();\n}\n\n\n}\n"]}
1
+ {"version":3,"file":"credentials.service.js","sourceRoot":"","sources":["../../../../src/services/credentials/credentials.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE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astructure/io/io.schemas';\nimport { PlatformEnvConfigJson, PlatformEnvSecretsJson, projectApplicationOwnedSecrets } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\n\nimport { PLATFORM_DATA_SERVICES_PROVIDER, DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION, DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION, DEFAULT_PLATFORM_ATLAS_CONFIGURATION } from '~wildo-cli/services/data-services/data-services.schemas';\nimport { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { FileUtils } from '~wildo-cli/infrastructure/io/file.utils';\nimport {\n BackingServiceSource,\n DatabaseEngine,\n K8S_LOCAL_DEFAULTS,\n PUBLIC_DOMAIN_DEFAULTS,\n WildoDeploymentRuntime,\n WildoLocationType,\n} from '@wildo-ai/platform-config-lib';\n\n\ninterface DatabaseAnswers {\n database: {\n engine: DatabaseEngine;\n source?: BackingServiceSource;\n /** Slice 4.B.0 (2026-05-07): managed-brand identifier (e.g.\n * `'atlas'` for Mongo Atlas, `'aws-rds'` / `'supabase'` /\n * `'neon'` / etc. for Postgres). Set when source=managed. */\n provider?: string;\n };\n atlasConnectionUrl?: string;\n atlasProjectId?: string;\n atlasClusterName?: string;\n atlasApiBaseUrl?: string;\n}\n\nexport class ConfigSecretsUtils {\n\n// ============================================================================\n// secrets.json\n// ============================================================================\n\nstatic writeSecretsJson(\n envName: string,\n credentials: PlatformEnvSecretsJson,\n): void {\n const dir = EnvironmentUtils.resolveSecretsDir(envName);\n FileUtils.ensureDirectoryExists(dir);\n /*\n * A HOSTED environment's file holds only its application-owned sections. The caller's object is the\n * EFFECTIVE secrets (the host's shared credentials overlaid by this application's own), so writing it\n * verbatim would copy every shared credential into a second file that nothing reads and that silently\n * diverges the moment the host rotates. This is the single writer, so the projection happens here.\n */\n const hosted = EnvironmentRegistry.resolveInfrastructureHost(envName, EnvironmentUtils.resolveConfigDir(envName)) !== null;\n const persisted = hosted ? projectApplicationOwnedSecrets(credentials) : credentials;\n writeFileSync(join(dir, FILE_NAMES.SECRETS_JSON), JSON.stringify(persisted, null, 2));\n EnvironmentUtils.invalidateCache();\n}\n\n// ============================================================================\n// config.json\n// ============================================================================\n\nstatic writeConfigJson(\n env: PlatformEnvironmentConfiguration,\n dbAnswers: DatabaseAnswers,\n): void {\n const runtime = env.runtime;\n const locationType = env.locationType;\n const source = dbAnswers.database.source ?? BackingServiceSource.SELF;\n // Slice 4.B.0 (2026-05-07): Atlas detection through (source=MANAGED,\n // provider='atlas'). Pre-reshape: `source === ATLAS`.\n const isAtlas = source === BackingServiceSource.MANAGED\n && dbAnswers.database.provider === 'atlas';\n\n const kubernetesConfig =\n runtime === WildoDeploymentRuntime.KUBERNETES\n ? locationType === WildoLocationType.LOCAL\n ? {\n namespace: env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE,\n }\n : env.kubernetes\n ? {\n namespace: env.kubernetes.namespace,\n }\n : undefined\n : undefined;\n\n if (\n runtime === WildoDeploymentRuntime.KUBERNETES\n && locationType === WildoLocationType.REMOTE\n && !kubernetesConfig\n ) {\n throw new Error(\n `Remote Kubernetes environment \"${env.name}\" is missing explicit kubernetes namespace metadata`,\n );\n }\n\n // `publicDomain` is required at the persisted-config layer (mirrors\n // the schema-required `WildoInfraEnvConfig.publicDomain`). Resolve it\n // from the in-memory environment first; for the local-K8s init path\n // (where the upstream env may not yet carry a value) fall back to the\n // canonical write-time default. There is intentionally no remote\n // default — remote envs must author the apex explicitly.\n const publicDomain =\n env.publicDomain\n ?? (\n runtime === WildoDeploymentRuntime.KUBERNETES && locationType === WildoLocationType.LOCAL\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_K8S\n : runtime === WildoDeploymentRuntime.DOCKER_COMPOSE && locationType === WildoLocationType.LOCAL\n ? PUBLIC_DOMAIN_DEFAULTS.LOCAL_COMPOSE\n : undefined\n );\n\n if (!publicDomain) {\n throw new Error(\n `Environment \"${env.name}\" is missing top-level publicDomain metadata`,\n );\n }\n\n const remoteProvider =\n locationType === WildoLocationType.REMOTE\n && env.remoteProvider?.registryEndpoint\n ? {\n provider: env.remoteProvider.provider,\n registryEndpoint: env.remoteProvider.registryEndpoint,\n region: env.remoteProvider.region,\n }\n : undefined;\n\n if (\n runtime === WildoDeploymentRuntime.KUBERNETES\n && locationType === WildoLocationType.REMOTE\n && !remoteProvider?.registryEndpoint\n ) {\n throw new Error(\n `Remote Kubernetes environment \"${env.name}\" is missing remoteProvider.registryEndpoint metadata`,\n );\n }\n\n const config: PlatformEnvConfigJson = {\n type: locationType,\n runtime,\n runtimeEnvironment: env.runtimeEnvironment,\n // Carried by BOTH `config.json` writers; the authored projection is the other.\n infrastructureHost: env.infrastructureHost,\n database: {\n engine: dbAnswers.database.engine,\n source,\n },\n infrastructure: {\n storage: {\n provider: DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION.PROVIDER,\n useSsl: false,\n bucket: DEFAULT_PLATFORM_FILE_STORAGE_CONFIGURATION.BUCKET,\n },\n postgresql: {\n database: DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION.DATABASE,\n sslMode: DEFAULT_PLATFORM_POSTGRESQL_CONFIGURATION.SSL_MODE,\n },\n },\n publicDomain,\n kubernetes: kubernetesConfig,\n remoteProvider,\n atlas: isAtlas && dbAnswers.atlasProjectId\n ? {\n apiBaseUrl: dbAnswers.atlasApiBaseUrl ?? DEFAULT_PLATFORM_ATLAS_CONFIGURATION.DEFAULT_API_BASE_URL,\n projectId: dbAnswers.atlasProjectId,\n clusterName: dbAnswers.atlasClusterName ?? DEFAULT_PLATFORM_ATLAS_CONFIGURATION.DEFAULT_CLUSTER_NAME,\n }\n : undefined,\n externalServices: {\n mongodb: { provider: isAtlas ? PLATFORM_DATA_SERVICES_PROVIDER.ATLAS : PLATFORM_DATA_SERVICES_PROVIDER.SELF_MANAGED },\n valkey: { provider: PLATFORM_DATA_SERVICES_PROVIDER.VALKEY_SELF },\n storage: { provider: PLATFORM_DATA_SERVICES_PROVIDER.MINIO },\n rabbitmq: { provider: PLATFORM_DATA_SERVICES_PROVIDER.SELF_MANAGED },\n },\n externalEndpoints: isAtlas && dbAnswers.atlasConnectionUrl\n ? { mongodb: { connectionUrl: dbAnswers.atlasConnectionUrl } }\n : undefined,\n };\n\n const dir = EnvironmentUtils.resolveConfigDir(env.name);\n FileUtils.ensureDirectoryExists(dir);\n writeFileSync(join(dir, FILE_NAMES.CONFIG_JSON), JSON.stringify(config, null, 2));\n EnvironmentUtils.invalidateCache();\n}\n\n\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"framework-managed-secrets.d.ts","sourceRoot":"","sources":["../../../../../../src/services/credentials/framework-managed-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH,OAAO,EAEL,WAAW,EACX,KAAK,sBAAsB,EAC5B,MAAM,qDAAqD,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxG,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC/C,sBAAsB,CAAC,CAAC,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,oBAAY,iCAAiC;IAC3C,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,2BAA2B,gCAAgC;IAC3D,yBAAyB,8BAA8B;IACvD,sBAAsB,2BAA2B;IACjD,yBAAyB,8BAA8B;IACvD,uBAAuB,4BAA4B;IACnD,qBAAqB,0BAA0B;IAC/C,mGAAmG;IACnG,wBAAwB,6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WAAW,yCAAyC;IACxD,mEAAmE;IACnE,OAAO,EAAE,sBAAsB,CAAC;IAChC,sFAAsF;IACtF,UAAU,EAAE,iCAAiC,EAAE,CAAC;IAChD,6EAA6E;IAC7E,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,uBAAuB,EAChC,KAAK,CAAC,EAAE,4BAA4B,GACnC,yCAAyC,CAsB3C;AAED,wDAAwD;AACxD,MAAM,WAAW,qCAAqC;IACpD,mDAAmD;IACnD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gEAAgE;IAChE,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uBAAuB,EAChC,KAAK,CAAC,EAAE,4BAA4B,GACnC,qCAAqC,CAoBvC"}
1
+ {"version":3,"file":"framework-managed-secrets.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/framework-managed-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH,OAAO,EAEL,WAAW,EACX,KAAK,sBAAsB,EAC5B,MAAM,qDAAqD,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxG,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC/C,sBAAsB,CAAC,CAAC,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,oBAAY,iCAAiC;IAC3C,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,2BAA2B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,iCAAiC,EAAE,WAAW,CAAC,CAgBxH,CAAC;AAEF,wGAAwG;AACxG,MAAM,WAAW,4BAA4B;IAC3C,MAAM,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;CACnC;AAMD,MAAM,WAAW,yCAAyC;IACxD,mEAAmE;IACnE,OAAO,EAAE,sBAAsB,CAAC;IAChC,sFAAsF;IACtF,UAAU,EAAE,iCAAiC,EAAE,CAAC;IAChD,6EAA6E;IAC7E,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,uBAAuB,EAChC,KAAK,CAAC,EAAE,4BAA4B,GACnC,yCAAyC,CAsB3C;AAED,wDAAwD;AACxD,MAAM,WAAW,qCAAqC;IACpD,mDAAmD;IACnD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gEAAgE;IAChE,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uBAAuB,EAChC,KAAK,CAAC,EAAE,4BAA4B,GACnC,qCAAqC,CAoBvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"framework-managed-secrets.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/framework-managed-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EACL,yDAAyD,EACzD,WAAW,GAEZ,MAAM,qDAAqD,CAAC;AAmB7D;;;;GAIG;AACH,MAAM,CAAN,IAAY,iCAkBX;AAlBD,WAAY,iCAAiC;IAC3C,wFAAmD,CAAA;IACnD,wFAAmD,CAAA;IACnD,gGAA2D,CAAA;IAC3D,4FAAuD,CAAA;IACvD,sFAAiD,CAAA;IACjD,4FAAu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C;AAChF,CAAC;AAUD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAgC,EAChC,KAAoC;IAEpC,MAAM,EAAE,UAAU,EAAE,GAAG,gCAAgC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAEzC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,qBAAqB,GAAa,EAAE,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,kCAAkC,EAAE,CAAC;QAC1D,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAAC;YAAE,SAAS;QAClD,kFAAkF;QAClF,oFAAoF;QACpF,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;QACzC,qBAAqB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;AAChD,CAAC","sourcesContent":["/**\n * framework-managed-secrets — the ONE named source of truth for every piece of\n * credential material the framework generates for itself (as opposed to material an\n * operator types: admin identity, provider API keys, GitHub tokens, Atlas API keys).\n *\n * WHY this exists (root cause). Framework-generated material used to be minted in\n * exactly one place — `buildCredentials()`, which runs ONLY during the interactive\n * `wildo setup` of a BRAND-NEW environment. Every environment created before a given\n * material was introduced therefore never acquired it, and nothing ever backfilled it.\n * Worse, the list of \"what counts as auto-generated\" was hand-duplicated across four\n * sites that each drifted independently:\n *\n * 1. `buildCredentials()` — minted immudb + crontabs keypairs\n * 2. `SecretsRotation.rotate()` — rotated NEITHER of them\n * 3. `SecretsReader.AUTO_GENERATED_KEYS` — knew immudb, not crontabs\n * 4. (no backfill path existed at all)\n *\n * That produced two silent, security-relevant degradations in the wild:\n *\n * - the crontabs-batches-manager P2P signing keypair was absent, so crontabs signed\n * job tokens with a fallback key and every scheduled tick dead-lettered; and\n * - the immudb state-signing keypair was absent, so the self-hosted immudb ran\n * WITHOUT `--signingKey` and the audit client logged \"state-signature pinning is\n * OFF\" — a whole-server substitution of the tamper-evident audit store was not\n * cryptographically detectable.\n *\n * The fix is structural, not per-material: declare each material ONCE here, derive\n * minting / provisioning / rotation / classification from that declaration, and run the\n * idempotent {@link provisionFrameworkManagedSecrets} on the paths that already\n * regenerate derived artifacts. A material added in the future is then live in every\n * environment on the next `wildo local dev` / `wildo config sync`, with no per-material\n * migration to remember.\n *\n * ## Provisioning is ADDITIVE — it is not rotation\n *\n * Provisioning mints ONLY material that is absent (or blank) and never touches material\n * that is already present. That makes it safe to run unattended on every self-heal:\n * nothing that an existing deployment depends on can change underneath it. Rotation\n * ({@link rotateFrameworkManagedSecrets}) is the destructive counterpart and stays\n * behind the explicit `wildo config sync --rotate-secrets` opt-in.\n *\n * ## Identity halves vs secret halves\n *\n * A material can own more than one key. `identityKeys` are non-secret constants (service\n * usernames) written at provisioning time and PRESERVED across rotation; `secretKeys`\n * are the generated-secret halves — they are what rotation regenerates, what the CLI\n * masks on display, and what `SecretsReader.isAutoGenerated()` reports.\n */\n\nimport { CredentialGenerator } from '@wildo-ai/platform-config-lib';\n\nimport {\n DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME,\n SecretOwner,\n type PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\n\n/**\n * `secrets.json` as it exists BEFORE framework-managed material has been provisioned:\n * every framework-owned branch may be absent or partially filled, while the\n * operator-typed branches (`admin` identity, `providerEnv`, `systemsOfRecordEnv`, `inboundEndpointEnv`, `atlas`,\n * `github`) carry\n * whatever the caller already knows.\n *\n * One level of partiality is deliberate and sufficient: a material provisions its whole\n * leaf object at once (e.g. `platform.appsManager` is written as a complete keypair),\n * so no material ever observes a half-filled nested object.\n */\nexport type PlatformEnvSecretsDraft = {\n [K in keyof PlatformEnvSecretsJson]?: NonNullable<PlatformEnvSecretsJson[K]> extends Record<string, unknown>\n ? Partial<NonNullable<PlatformEnvSecretsJson[K]>>\n : PlatformEnvSecretsJson[K];\n};\n\n/**\n * Closed vocabulary of framework-generated credential materials. A material is the unit\n * of provisioning: the smallest set of keys that MUST be minted together (a keypair's two\n * halves are useless apart, a username is useless without its password).\n */\nexport enum FrameworkManagedSecretMaterialRef {\n MONGODB_ROOT_CREDENTIAL = 'mongodb-root-credential',\n VALKEY_ADMIN_CREDENTIAL = 'valkey-admin-credential',\n POSTGRESQL_ADMIN_CREDENTIAL = 'postgresql-admin-credential',\n RABBITMQ_ADMIN_CREDENTIAL = 'rabbitmq-admin-credential',\n RABBITMQ_ERLANG_COOKIE = 'rabbitmq-erlang-cookie',\n STORAGE_ACCESS_CREDENTIAL = 'storage-access-credential',\n PLATFORM_PRIMARY_SECRET = 'platform-primary-secret',\n PLATFORM_ADMIN_SECRET = 'platform-admin-secret',\n /** The APPLICATION's operator-door secret (#586) — a different tier from PLATFORM_ADMIN_SECRET. */\n APPLICATION_ADMIN_SECRET = 'application-admin-secret',\n PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR = 'platform-apps-manager-signing-keypair',\n PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR = 'platform-crontabs-batches-manager-signing-keypair',\n IMMUDB_STATE_SIGNING_KEYPAIR = 'immudb-state-signing-keypair',\n /** #1696 — the self-hosted immudb server's sysadmin password, held by the platform and apps-manager only. */\n IMMUDB_ADMIN_PASSWORD = 'immudb-admin-password',\n MONGOT_SYNC_SOURCE_CREDENTIAL = 'mongot-sync-source-credential',\n ADMIN_PASSWORD = 'admin-password',\n}\n\n/**\n * Declaration of one framework-generated credential material.\n *\n * Every material is rotatable — that IS the contract of \"auto-generated\" (the operator\n * never typed it, so regenerating it costs only a redeploy). Should a future material\n * ever be genuinely un-rotatable, add an explicit policy axis here rather than silently\n * omitting it from {@link rotateFrameworkManagedSecrets} — a silent omission is exactly\n * the drift this registry exists to prevent.\n */\nexport interface FrameworkManagedSecretMaterial {\n readonly ref: FrameworkManagedSecretMaterialRef;\n /** Non-secret identity keys (service usernames) — written on provisioning, preserved on rotation. */\n readonly identityKeys: readonly string[];\n /** Generated-secret keys — written on provisioning AND regenerated on rotation. */\n readonly secretKeys: readonly string[];\n /** Why this material exists, in one line (surfaced by CLI reporting). */\n readonly purpose: string;\n /** True when every key this material owns is present and non-blank. */\n isProvisioned(secrets: PlatformEnvSecretsDraft): boolean;\n /** Write the COMPLETE material (identity + secret halves). Called only when not provisioned. */\n provision(secrets: PlatformEnvSecretsDraft): void;\n /** Regenerate the secret halves in place, preserving identity halves. */\n rotate(secrets: PlatformEnvSecretsDraft): void;\n}\n\n/**\n * A password immudb accepts: 24 characters of the shared charset plus a fixed tail that supplies the uppercase\n * letter, digit and special character immudb requires (see the `IMMUDB_ADMIN_PASSWORD` material).\n */\nexport function generateImmudbAdminPassword(): string {\n return `${CredentialGenerator.generatePassword(24)}Aa1-`;\n}\n\n/** A string counts as present only when it carries actual material — `''` is as broken as absent. */\nfunction isFilled(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nexport const FRAMEWORK_MANAGED_SECRET_MATERIALS = [\n {\n ref: FrameworkManagedSecretMaterialRef.MONGODB_ROOT_CREDENTIAL,\n identityKeys: ['mongodb.rootUser'],\n secretKeys: ['mongodb.rootPassword'],\n purpose: 'Root credential for the self-hosted MongoDB backing service.',\n isProvisioned: (s) => isFilled(s.mongodb?.rootUser) && isFilled(s.mongodb?.rootPassword),\n provision: (s) => {\n s.mongodb = {\n rootUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.MONGODB_ROOT_USER,\n rootPassword: CredentialGenerator.generatePassword(24),\n };\n },\n rotate: (s) => {\n if (s.mongodb) s.mongodb.rootPassword = CredentialGenerator.generatePassword(24);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.VALKEY_ADMIN_CREDENTIAL,\n identityKeys: ['valkey.adminUser'],\n secretKeys: ['valkey.adminPassword'],\n purpose: 'Admin credential for the self-hosted Valkey/Redis backing service.',\n isProvisioned: (s) => isFilled(s.valkey?.adminUser) && isFilled(s.valkey?.adminPassword),\n provision: (s) => {\n s.valkey = {\n adminUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.VALKEY_ADMIN_USER,\n adminPassword: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.valkey) s.valkey.adminPassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.POSTGRESQL_ADMIN_CREDENTIAL,\n identityKeys: ['postgresql.adminUser'],\n secretKeys: ['postgresql.adminPassword'],\n purpose: 'Admin credential for the self-hosted PostgreSQL backing service.',\n isProvisioned: (s) => isFilled(s.postgresql?.adminUser) && isFilled(s.postgresql?.adminPassword),\n provision: (s) => {\n s.postgresql = {\n adminUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.PG_ADMIN_USER,\n adminPassword: CredentialGenerator.generatePassword(24),\n };\n },\n rotate: (s) => {\n if (s.postgresql) s.postgresql.adminPassword = CredentialGenerator.generatePassword(24);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.RABBITMQ_ADMIN_CREDENTIAL,\n identityKeys: ['rabbitmq.adminUsername'],\n secretKeys: ['rabbitmq.adminPassword'],\n purpose: 'Admin credential for the self-hosted RabbitMQ broker.',\n isProvisioned: (s) => isFilled(s.rabbitmq?.adminUsername) && isFilled(s.rabbitmq?.adminPassword),\n provision: (s) => {\n s.rabbitmq = {\n ...s.rabbitmq,\n adminUsername: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.RABBITMQ_ADMIN_USERNAME,\n adminPassword: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.rabbitmq) s.rabbitmq.adminPassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n // Separate material from the admin credential: the Erlang cookie is the CLUSTER\n // membership secret, not a login. It is provisioned/rotated independently so a\n // secrets.json that carries one but not the other self-heals to a complete broker\n // configuration instead of being silently half-configured.\n ref: FrameworkManagedSecretMaterialRef.RABBITMQ_ERLANG_COOKIE,\n identityKeys: [],\n secretKeys: ['rabbitmq.erlangCookie'],\n purpose: 'Erlang cluster cookie shared by every RabbitMQ node.',\n isProvisioned: (s) => isFilled(s.rabbitmq?.erlangCookie),\n provision: (s) => {\n s.rabbitmq = { ...s.rabbitmq, erlangCookie: CredentialGenerator.generateErlangCookie() };\n },\n rotate: (s) => {\n if (s.rabbitmq) s.rabbitmq.erlangCookie = CredentialGenerator.generateErlangCookie();\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.STORAGE_ACCESS_CREDENTIAL,\n identityKeys: ['storage.accessKey'],\n secretKeys: ['storage.secretKey'],\n purpose: 'Access key pair for the self-hosted MinIO object storage.',\n isProvisioned: (s) => isFilled(s.storage?.accessKey) && isFilled(s.storage?.secretKey),\n provision: (s) => {\n s.storage = {\n accessKey: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.MINIO_ACCESS_KEY,\n secretKey: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.storage) s.storage.secretKey = CredentialGenerator.generatePassword(32);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_PRIMARY_SECRET,\n identityKeys: [],\n secretKeys: ['platform.primarySecret'],\n purpose: 'Primary shared platform secret.',\n isProvisioned: (s) => isFilled(s.platform?.primarySecret),\n provision: (s) => {\n s.platform = { ...s.platform, primarySecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.platform) s.platform.primarySecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_ADMIN_SECRET,\n identityKeys: [],\n secretKeys: ['platform.adminSecret'],\n purpose: 'Dedicated shared secret for admin operations (CLI <-> apps-manager).',\n isProvisioned: (s) => isFilled(s.platform?.adminSecret),\n provision: (s) => {\n s.platform = { ...s.platform, adminSecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.platform) s.platform.adminSecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.APPLICATION_ADMIN_SECRET,\n identityKeys: [],\n secretKeys: ['application.adminSecret'],\n purpose: \"Gates the application's own operator doors (data-seeding admin, external-data admin).\",\n isProvisioned: (s) => isFilled(s.application?.adminSecret),\n provision: (s) => {\n s.application = { ...s.application, adminSecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.application) s.application.adminSecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: ['platform.appsManager.privateKey', 'platform.appsManager.publicKey'],\n purpose: \"apps-manager's P2P signing keypair (signs the JWTs it hands to every app).\",\n isProvisioned: (s) =>\n isFilled(s.platform?.appsManager?.privateKey) && isFilled(s.platform?.appsManager?.publicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform = {\n ...s.platform,\n appsManager: { privateKey: keys.privateKey, publicKey: keys.publicKey },\n };\n },\n rotate: (s) => {\n if (!s.platform?.appsManager) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform.appsManager.privateKey = keys.privateKey;\n s.platform.appsManager.publicKey = keys.publicKey;\n },\n },\n {\n // Historically absent from `buildCredentials`, which is exactly why crontabs signed\n // every SCHEDULED_CRON / MINION_TICK token with a fallback key and apps handed out an\n // empty verify key — dead-lettering every tick. Declared here so an environment that\n // predates the keypair acquires it on the next self-heal.\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: [\n 'platform.crontabsBatchesManager.privateKey',\n 'platform.crontabsBatchesManager.publicKey',\n ],\n purpose: \"crontabs-batches-manager's P2P signing keypair (signs every scheduled job token).\",\n isProvisioned: (s) =>\n isFilled(s.platform?.crontabsBatchesManager?.privateKey)\n && isFilled(s.platform?.crontabsBatchesManager?.publicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform = {\n ...s.platform,\n crontabsBatchesManager: { privateKey: keys.privateKey, publicKey: keys.publicKey },\n };\n },\n rotate: (s) => {\n if (!s.platform?.crontabsBatchesManager) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform.crontabsBatchesManager.privateKey = keys.privateKey;\n s.platform.crontabsBatchesManager.publicKey = keys.publicKey;\n },\n },\n {\n // The cryptographic whole-server-substitution defense for the tamper-evident audit\n // store. The PRIVATE half (SEC1 \"EC PRIVATE KEY\" PEM — the exact format immudb's\n // `--signingKey` parses) is mounted into the SELF-hosted immudb server ONLY; the\n // PUBLIC half (SPKI PEM) rides `IMMUDB_STATE_PUBLIC_KEY` into every app runtime so\n // the audit client can verify the server's signed `ImmutableState`. Absent material\n // means immudb runs UNSIGNED and the client degrades to \"pinning is OFF\".\n ref: FrameworkManagedSecretMaterialRef.IMMUDB_STATE_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: ['immudb.stateSigningPrivateKey', 'immudb.stateSigningPublicKey'],\n purpose: 'immudb state-signing keypair (audit-store whole-server-substitution defense).',\n isProvisioned: (s) =>\n isFilled(s.immudb?.stateSigningPrivateKey) && isFilled(s.immudb?.stateSigningPublicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n // Spread: the section also holds `adminPassword` (its own material). Replacing the section would erase a\n // provisioned admin password and re-mint it on the same pass — a silent change of the server's sysadmin\n // credential, which immudb only adopts on a fresh data dir.\n s.immudb = { ...s.immudb, stateSigningPrivateKey: keys.privateKey, stateSigningPublicKey: keys.publicKey };\n },\n rotate: (s) => {\n if (!s.immudb) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.immudb.stateSigningPrivateKey = keys.privateKey;\n s.immudb.stateSigningPublicKey = keys.publicKey;\n },\n },\n {\n // #1696 — the self-hosted immudb server's built-in `immudb` SYSADMIN password. The server is initialised with\n // it, and apps-manager alone logs in with it to mint each application's own database and `READ_WRITE` user. It\n // replaces the copy of the owning application's `providerEnv.IMMUDB_PASSWORD`, which made the sysadmin\n // credential an APPLICATION value every audit sink held.\n //\n // NOT adopted from that operator value, deliberately. Every environment measured on 2026-09-29 carried immudb's\n // PACKAGED DEFAULT there, a public credential; adopting it would make the platform's admin secret the default,\n // and for a MANAGED immudb that key is the vendor's credential, which must never become a platform secret. So\n // the value is always generated. An existing data dir keeps the password it was initialised with: apps-manager\n // moves one still on the packaged default onto this value at its first admin login (the SERVER moves, this\n // secret does not; `ImmudbAdminManagerService`, audited). One initialised from a real secret needs its sysadmin\n // password set once (`immuadmin user changepassword immudb`) or a fresh data dir, and registration names that.\n //\n // immudb's password rule is 8 to 32 characters with at least one uppercase letter, one digit and one special\n // character; the shared charset (alphanumerics + `_+-`) guarantees none of those, so a fixed `Aa1-` tail does.\n // The 24 random characters carry the entropy; the tail only satisfies the rule.\n // spec-cite: immudb v1.11.1 `pkg/auth/passwords.go`\n // (https://raw.githubusercontent.com/codenotary/immudb/v1.11.1/pkg/auth/passwords.go, fetched 2026-09-29).\n ref: FrameworkManagedSecretMaterialRef.IMMUDB_ADMIN_PASSWORD,\n identityKeys: [],\n secretKeys: ['immudb.adminPassword'],\n purpose: \"The self-hosted immudb server's sysadmin password (held by apps-manager only).\",\n isProvisioned: (s) => isFilled(s.immudb?.adminPassword),\n provision: (s) => {\n s.immudb = { ...s.immudb, adminPassword: generateImmudbAdminPassword() };\n },\n // Rotation writes a new value here and in apps-manager's env on the next render; the RUNNING server keeps its\n // old sysadmin password (immudb adopts the variable only on a fresh data dir), and that old value is a real\n // secret apps-manager no longer holds, so its packaged-default adoption does not apply: a rotation owes a\n // one-time `immuadmin user changepassword immudb`.\n rotate: (s) => {\n if (s.immudb) s.immudb.adminPassword = generateImmudbAdminPassword();\n },\n },\n {\n // Issue #74 — the SCRAM password `mongot` (the MongoDB 8.2 Search / Vector Search\n // sidecar) authenticates to mongod with. Declared as its OWN material rather than as a\n // third key on MONGODB_ROOT_CREDENTIAL, because `provision` REPLACES the whole section:\n // widening the root material's `isProvisioned` would make every existing environment\n // report unprovisioned and then re-mint `mongodb.rootPassword` on the next self-heal,\n // silently rotating the credential a running stack is already authenticated with.\n // Separate material ⇒ an environment that predates mongot acquires only what it lacks —\n // the same reasoning recorded on the crontabs-batches-manager keypair above.\n //\n // No identity key: the username is the code constant `MONGOT_SYNC_SOURCE.USERNAME`.\n // Alphanumeric + `_+-` (the shared password charset) is safe unquoted in the mongosh\n // `--eval` string, in a YAML scalar, and in a shell heredoc — all three of which this\n // value passes through before it reaches mongot.\n ref: FrameworkManagedSecretMaterialRef.MONGOT_SYNC_SOURCE_CREDENTIAL,\n identityKeys: [],\n secretKeys: ['mongot.syncSourcePassword'],\n purpose: \"mongot's SCRAM credential against mongod (the `searchCoordinator` sync-source user).\",\n isProvisioned: (s) => isFilled(s.mongot?.syncSourcePassword),\n provision: (s) => {\n s.mongot = { syncSourcePassword: CredentialGenerator.generatePassword(32) };\n },\n rotate: (s) => {\n if (s.mongot) s.mongot.syncSourcePassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n /*\n * The seeded administrators' password. The operator MAY type one at setup; when they do not,\n * the framework generates it. Only the password is framework-managed — the identity fields\n * (email / first / last name) are operator-authored and are NOT declared here, so provisioning\n * never invents an administrator identity.\n *\n * ## WHICH application's copy actually seeds anything — read this before calling it a defect\n *\n * An environment has ONE platform administrator, and the credential that seeds it comes from the\n * application that OWNS that environment's platform: its `secrets.json` is what generates\n * `platform-apps-manager/.env`, and apps-manager seeds from that env contract at INIT.\n *\n * A HOSTED application — one declaring `infrastructureHost` — therefore mints an `admin.password`\n * here that seeds NOTHING, because it owns no platform. Its administrator is the HOST's, and\n * signing in to it uses the host's credential. Verified on the dogfood pair, 2026-09-18: the\n * platform env's `ADMIN_PASSWORD` is byte-identical to Wonder Todos' own `admin.password` (the\n * owner), while a hosted application's differs and yields a zero-length access token.\n *\n * This is the intended behaviour (Paul, 2026-09-18), not a mismatch to repair. Do NOT change the\n * seeding to read a hosted application's own value: one environment has one platform\n * administrator, and giving a hosted application a second one would be inventing an identity the\n * platform does not have. The material is declared unconditionally because the SAME application\n * may own its platform in one environment and be hosted in another, and the value has to exist\n * for the environment where it owns.\n *\n * ONE MATERIAL, TWO ACCOUNTS, and that is the local convention rather than an oversight (#575).\n * An application-wide access grant is approved by a SECOND administrator — the two-person rule\n * refuses an approver who is its own requester — so a platform provisions two. Locally the\n * approver is sub-addressed from the administrator (`ada+approver@…`, same mailbox) and SHARES\n * this password, which makes the two-person rule ceremonial there. That is the accepted trade:\n * the alternative is a developer who cannot exercise an application-wide read at all. A remote\n * deployment states its approver, including a password of its own, and `provision` below fills\n * only what is empty, so a stated password is never overwritten.\n *\n * `s.approver` may legitimately be absent — the block is `.optional()` so a `secrets.json`\n * written before it existed still parses — and this material must then behave exactly as it\n * always did rather than conjuring an approver with no identity behind it.\n */\n ref: FrameworkManagedSecretMaterialRef.ADMIN_PASSWORD,\n identityKeys: [],\n /*\n * `admin.password` ONLY, even though `provision` also fills `approver.password`.\n *\n * A declared key is a promise that the key EXISTS after provisioning — the registry's own pins\n * read every declared key back and require it populated and rotatable, and they are what caught\n * the first version of this. `approver` is `.optional()` so a `secrets.json` predating it still\n * parses, so `approver.password` cannot make that promise. The four approver paths reach a\n * CI-reconstructed secrets file through `OPERATOR_TYPED_SECRET_PATHS` instead, which is the\n * honest home: remotely the approver's password IS operator-typed, and locally it is copied from\n * the administrator's rather than minted on its own.\n */\n secretKeys: ['admin.password'],\n purpose: 'Password of the seeded platform administrators (when not operator-supplied).',\n isProvisioned: (s) => isFilled(s.admin?.password) && (s.approver === undefined || isFilled(s.approver.password)),\n provision: (s) => {\n // Reuse an already-provisioned administrator password rather than minting a second one, so\n // that a run which only has to fill the approver's half does not silently rotate the\n // administrator's — a \"provisioning\" pass that changes a working credential is an outage.\n const password = isFilled(s.admin?.password) ? s.admin!.password! : CredentialGenerator.generatePassword(16);\n s.admin = { ...s.admin, password };\n if (s.approver !== undefined && !isFilled(s.approver.password)) {\n s.approver = { ...s.approver, password };\n }\n },\n rotate: (s) => {\n // Both to the SAME new value, preserving the shared-password convention across a rotation:\n // the local approver exists so one developer can sign both legs, and a rotation that split\n // them would leave that developer hunting a second password for no gain. Rotation is an\n // explicit operator act, so overwriting a stated remote password here is its job, not a\n // surprise.\n const password = CredentialGenerator.generatePassword(16);\n if (s.admin) s.admin.password = password;\n if (s.approver) s.approver.password = password;\n },\n },\n] as const satisfies readonly FrameworkManagedSecretMaterial[];\n\n/**\n * Compile-time assertion: every {@link FrameworkManagedSecretMaterialRef} member MUST be declared\n * in {@link FRAMEWORK_MANAGED_SECRET_MATERIALS}. Omitting one produces\n * `Type '\"…\"' is not assignable to type 'never'` pointing here.\n *\n * The enum was a closed vocabulary with no mechanical link to the list that realises it: the\n * annotation `readonly FrameworkManagedSecretMaterial[]` widened every `ref` back to the enum, so\n * declaring twelve of thirteen materials type-checked perfectly. `as const satisfies` keeps each\n * `ref` at its literal member type, which is what makes the `Exclude` below able to see a gap —\n * the same shape as `_AssertExhaustivePlatformServiceCoverage` in\n * `platform-infrastructure-manager.apps-manager.platform.service.ts`.\n *\n * This is the registry EVERY derived answer now reads — minting, rotation, auto-generated\n * classification, and (since the CI mapping was derived from it) which GitHub Secret a pipeline\n * must carry. A material declared here and forgotten there was exactly how the crontabs signing\n * keypair, the immudb state-signing keypair and the mongot sync-source credential were absent from\n * `FIXED_MAPPINGS`: minted on a developer machine, and silently never reconstructed in CI.\n */\ntype _DeclaredFrameworkManagedSecretMaterialRef = (typeof FRAMEWORK_MANAGED_SECRET_MATERIALS)[number]['ref'];\ntype _AssertExhaustiveFrameworkManagedSecretMaterialCoverage =\n Exclude<FrameworkManagedSecretMaterialRef, _DeclaredFrameworkManagedSecretMaterialRef> extends never ? true : never;\nconst _assertExhaustiveFrameworkManagedSecretMaterialCoverage: _AssertExhaustiveFrameworkManagedSecretMaterialCoverage = true;\nvoid _assertExhaustiveFrameworkManagedSecretMaterialCoverage;\n\n/**\n * Every generated-secret key across all materials, in declaration order. This is the\n * derived answer to \"is this key auto-generated?\" — consumed by `SecretsReader` for\n * masking and rotation reporting so that list can no longer drift from what is actually\n * minted. Identity keys (service usernames) are deliberately excluded: they are\n * non-secret constants, not generated material.\n */\nexport const FRAMEWORK_MANAGED_SECRET_KEYS: readonly string[] = FRAMEWORK_MANAGED_SECRET_MATERIALS\n .flatMap((material) => material.secretKeys);\n\n/** Outcome of {@link provisionFrameworkManagedSecrets}. */\n/**\n * Owner of every framework-managed material, total over the vocabulary by type. A hosted application\n * provisions and rotates only its APPLICATION materials: minting a shared one would create a second copy of\n * a credential its host already holds — one the running containers were never given.\n */\nexport const FRAMEWORK_MANAGED_SECRET_MATERIAL_OWNERSHIP: Readonly<Record<FrameworkManagedSecretMaterialRef, SecretOwner>> = {\n [FrameworkManagedSecretMaterialRef.MONGODB_ROOT_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.VALKEY_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.POSTGRESQL_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.RABBITMQ_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.RABBITMQ_ERLANG_COOKIE]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.STORAGE_ACCESS_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_PRIMARY_SECRET]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_ADMIN_SECRET]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.APPLICATION_ADMIN_SECRET]: SecretOwner.APPLICATION,\n [FrameworkManagedSecretMaterialRef.PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.IMMUDB_STATE_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.IMMUDB_ADMIN_PASSWORD]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.MONGOT_SYNC_SOURCE_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.ADMIN_PASSWORD]: SecretOwner.APPLICATION,\n};\n\n/** Restricts provisioning or rotation to the materials of the given owners. Omitted: every material. */\nexport interface FrameworkManagedSecretsScope {\n owners?: ReadonlySet<SecretOwner>;\n}\n\nfunction isMaterialInScope(material: FrameworkManagedSecretMaterial, scope: FrameworkManagedSecretsScope | undefined): boolean {\n return scope?.owners === undefined || scope.owners.has(FRAMEWORK_MANAGED_SECRET_MATERIAL_OWNERSHIP[material.ref]);\n}\n\nexport interface FrameworkManagedSecretsProvisioningResult {\n /** The same object that was passed in, now guaranteed complete. */\n secrets: PlatformEnvSecretsJson;\n /** Materials that were absent and have just been minted (empty ⇒ nothing changed). */\n mintedRefs: FrameworkManagedSecretMaterialRef[];\n /** Flattened keys written by `mintedRefs`, for operator-facing reporting. */\n mintedKeys: string[];\n}\n\n/**\n * Mint every framework-managed material that is absent (or blank) from `secrets`,\n * leaving everything already present untouched, and return what changed.\n *\n * IDEMPOTENT AND ADDITIVE by construction — running it twice mints nothing the second\n * time, and it can never invalidate a credential a running deployment already uses.\n * That is what makes it safe on unattended self-heal paths (`wildo local dev` /\n * `wildo local up` preflight, `wildo config sync`), unlike\n * {@link rotateFrameworkManagedSecrets}.\n *\n * Serves two callers with one code path:\n * - `buildCredentials()` passes a draft holding only operator-typed answers, and gets\n * back a complete `secrets.json`;\n * - the self-heal paths pass an already-parsed `secrets.json` and get back the same\n * object with the gaps filled.\n *\n * The returned `secrets` is narrowed to the complete `PlatformEnvSecretsJson` shape only\n * after a runtime completeness assertion over the registry — the narrowing is therefore\n * proven, not assumed. A material whose `provision()` fails to satisfy its own\n * `isProvisioned()` is a registry authoring bug and throws loudly here rather than\n * writing a half-provisioned secrets.json to disk.\n */\nexport function provisionFrameworkManagedSecrets(\n secrets: PlatformEnvSecretsDraft,\n scope?: FrameworkManagedSecretsScope,\n): FrameworkManagedSecretsProvisioningResult {\n const mintedRefs: FrameworkManagedSecretMaterialRef[] = [];\n const mintedKeys: string[] = [];\n\n for (const material of FRAMEWORK_MANAGED_SECRET_MATERIALS) {\n if (!isMaterialInScope(material, scope)) continue;\n if (material.isProvisioned(secrets)) continue;\n\n material.provision(secrets);\n\n if (!material.isProvisioned(secrets)) {\n throw new Error(\n `Framework-managed secret material '${material.ref}' did not satisfy its own provisioning check. `\n + 'This is a registry authoring bug in framework-managed-secrets.ts, not an environment problem.',\n );\n }\n\n mintedRefs.push(material.ref);\n mintedKeys.push(...material.identityKeys, ...material.secretKeys);\n }\n\n return { secrets: secrets as PlatformEnvSecretsJson, mintedRefs, mintedKeys };\n}\n\n/** Outcome of {@link rotateFrameworkManagedSecrets}. */\nexport interface FrameworkManagedSecretsRotationResult {\n /** Generated-secret keys that were regenerated. */\n rotatedKeys: string[];\n /** Identity keys deliberately preserved (service usernames). */\n preservedIdentityKeys: string[];\n}\n\n/**\n * Regenerate the secret half of every framework-managed material, preserving identity\n * halves (service usernames) and every operator-typed value (admin identity, provider\n * API keys, GitHub tokens, Atlas API keys) — those are simply not in the registry.\n *\n * DESTRUCTIVE: every rotated credential must be redeployed to the services that hold\n * the other end. Callers gate this behind an explicit operator opt-in.\n *\n * Any material still absent is provisioned first, so a rotation of a partially\n * provisioned environment yields a COMPLETE secrets.json rather than silently skipping\n * the gaps (the previous hand-written rotation skipped whatever it had not been taught\n * about, which is how the immudb and crontabs keypairs stayed missing through rotations).\n */\nexport function rotateFrameworkManagedSecrets(\n secrets: PlatformEnvSecretsDraft,\n scope?: FrameworkManagedSecretsScope,\n): FrameworkManagedSecretsRotationResult {\n const { mintedKeys } = provisionFrameworkManagedSecrets(secrets, scope);\n const mintedKeySet = new Set(mintedKeys);\n\n const rotatedKeys: string[] = [];\n const preservedIdentityKeys: string[] = [];\n\n for (const material of FRAMEWORK_MANAGED_SECRET_MATERIALS) {\n if (!isMaterialInScope(material, scope)) continue;\n // A material minted moments ago by the provisioning pass above is already fresh —\n // rotating it again would only burn entropy and confuse the operator-facing report.\n const wasJustMinted = material.secretKeys.every((key) => mintedKeySet.has(key));\n if (!wasJustMinted) {\n material.rotate(secrets);\n }\n rotatedKeys.push(...material.secretKeys);\n preservedIdentityKeys.push(...material.identityKeys);\n }\n\n return { rotatedKeys, preservedIdentityKeys };\n}\n"]}
1
+ {"version":3,"file":"framework-managed-secrets.js","sourceRoot":"","sources":["../../../../src/services/credentials/framework-managed-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EACL,yDAAyD,EACzD,WAAW,G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,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAiC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAChF,CAAC;AAUD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAAgC,EAChC,KAAoC;IAEpC,MAAM,EAAE,UAAU,EAAE,GAAG,gCAAgC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAEzC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,qBAAqB,GAAa,EAAE,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,kCAAkC,EAAE,CAAC;QAC1D,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAAC;YAAE,SAAS;QAClD,kFAAkF;QAClF,oFAAoF;QACpF,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;QACzC,qBAAqB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;AAChD,CAAC","sourcesContent":["/**\n * framework-managed-secrets — the ONE named source of truth for every piece of\n * credential material the framework generates for itself (as opposed to material an\n * operator types: admin identity, provider API keys, GitHub tokens, Atlas API keys).\n *\n * WHY this exists (root cause). Framework-generated material used to be minted in\n * exactly one place — `buildCredentials()`, which runs ONLY during the interactive\n * `wildo setup` of a BRAND-NEW environment. Every environment created before a given\n * material was introduced therefore never acquired it, and nothing ever backfilled it.\n * Worse, the list of \"what counts as auto-generated\" was hand-duplicated across four\n * sites that each drifted independently:\n *\n * 1. `buildCredentials()` — minted immudb + crontabs keypairs\n * 2. `SecretsRotation.rotate()` — rotated NEITHER of them\n * 3. `SecretsReader.AUTO_GENERATED_KEYS` — knew immudb, not crontabs\n * 4. (no backfill path existed at all)\n *\n * That produced two silent, security-relevant degradations in the wild:\n *\n * - the crontabs-batches-manager P2P signing keypair was absent, so crontabs signed\n * job tokens with a fallback key and every scheduled tick dead-lettered; and\n * - the immudb state-signing keypair was absent, so the self-hosted immudb ran\n * WITHOUT `--signingKey` and the audit client logged \"state-signature pinning is\n * OFF\" — a whole-server substitution of the tamper-evident audit store was not\n * cryptographically detectable.\n *\n * The fix is structural, not per-material: declare each material ONCE here, derive\n * minting / provisioning / rotation / classification from that declaration, and run the\n * idempotent {@link provisionFrameworkManagedSecrets} on the paths that already\n * regenerate derived artifacts. A material added in the future is then live in every\n * environment on the next `wildo local dev` / `wildo config sync`, with no per-material\n * migration to remember.\n *\n * ## Provisioning is ADDITIVE — it is not rotation\n *\n * Provisioning mints ONLY material that is absent (or blank) and never touches material\n * that is already present. That makes it safe to run unattended on every self-heal:\n * nothing that an existing deployment depends on can change underneath it. Rotation\n * ({@link rotateFrameworkManagedSecrets}) is the destructive counterpart and stays\n * behind the explicit `wildo config sync --rotate-secrets` opt-in.\n *\n * ## Identity halves vs secret halves\n *\n * A material can own more than one key. `identityKeys` are non-secret constants (service\n * usernames) written at provisioning time and PRESERVED across rotation; `secretKeys`\n * are the generated-secret halves — they are what rotation regenerates, what the CLI\n * masks on display, and what `SecretsReader.isAutoGenerated()` reports.\n */\n\nimport { CredentialGenerator } from '@wildo-ai/platform-config-lib';\n\nimport {\n DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME,\n SecretOwner,\n type PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\n\n/**\n * `secrets.json` as it exists BEFORE framework-managed material has been provisioned:\n * every framework-owned branch may be absent or partially filled, while the\n * operator-typed branches (`admin` identity, `providerEnv`, `systemsOfRecordEnv`, `inboundEndpointEnv`, `atlas`,\n * `github`) carry\n * whatever the caller already knows.\n *\n * One level of partiality is deliberate and sufficient: a material provisions its whole\n * leaf object at once (e.g. `platform.appsManager` is written as a complete keypair),\n * so no material ever observes a half-filled nested object.\n */\nexport type PlatformEnvSecretsDraft = {\n [K in keyof PlatformEnvSecretsJson]?: NonNullable<PlatformEnvSecretsJson[K]> extends Record<string, unknown>\n ? Partial<NonNullable<PlatformEnvSecretsJson[K]>>\n : PlatformEnvSecretsJson[K];\n};\n\n/**\n * Closed vocabulary of framework-generated credential materials. A material is the unit\n * of provisioning: the smallest set of keys that MUST be minted together (a keypair's two\n * halves are useless apart, a username is useless without its password).\n */\nexport enum FrameworkManagedSecretMaterialRef {\n MONGODB_ROOT_CREDENTIAL = 'mongodb-root-credential',\n VALKEY_ADMIN_CREDENTIAL = 'valkey-admin-credential',\n POSTGRESQL_ADMIN_CREDENTIAL = 'postgresql-admin-credential',\n RABBITMQ_ADMIN_CREDENTIAL = 'rabbitmq-admin-credential',\n RABBITMQ_ERLANG_COOKIE = 'rabbitmq-erlang-cookie',\n STORAGE_ACCESS_CREDENTIAL = 'storage-access-credential',\n PLATFORM_PRIMARY_SECRET = 'platform-primary-secret',\n PLATFORM_ADMIN_SECRET = 'platform-admin-secret',\n /** The APPLICATION's operator-door secret (#586) — a different tier from PLATFORM_ADMIN_SECRET. */\n APPLICATION_ADMIN_SECRET = 'application-admin-secret',\n PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR = 'platform-apps-manager-signing-keypair',\n PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR = 'platform-crontabs-batches-manager-signing-keypair',\n IMMUDB_STATE_SIGNING_KEYPAIR = 'immudb-state-signing-keypair',\n /** #1696 — the self-hosted immudb server's sysadmin password, held by the platform and apps-manager only. */\n IMMUDB_ADMIN_PASSWORD = 'immudb-admin-password',\n MONGOT_SYNC_SOURCE_CREDENTIAL = 'mongot-sync-source-credential',\n ADMIN_PASSWORD = 'admin-password',\n}\n\n/**\n * Declaration of one framework-generated credential material.\n *\n * Every material is rotatable — that IS the contract of \"auto-generated\" (the operator\n * never typed it, so regenerating it costs only a redeploy). Should a future material\n * ever be genuinely un-rotatable, add an explicit policy axis here rather than silently\n * omitting it from {@link rotateFrameworkManagedSecrets} — a silent omission is exactly\n * the drift this registry exists to prevent.\n */\nexport interface FrameworkManagedSecretMaterial {\n readonly ref: FrameworkManagedSecretMaterialRef;\n /** Non-secret identity keys (service usernames) — written on provisioning, preserved on rotation. */\n readonly identityKeys: readonly string[];\n /** Generated-secret keys — written on provisioning AND regenerated on rotation. */\n readonly secretKeys: readonly string[];\n /** Why this material exists, in one line (surfaced by CLI reporting). */\n readonly purpose: string;\n /** True when every key this material owns is present and non-blank. */\n isProvisioned(secrets: PlatformEnvSecretsDraft): boolean;\n /** Write the COMPLETE material (identity + secret halves). Called only when not provisioned. */\n provision(secrets: PlatformEnvSecretsDraft): void;\n /** Regenerate the secret halves in place, preserving identity halves. */\n rotate(secrets: PlatformEnvSecretsDraft): void;\n}\n\n/**\n * A password immudb accepts: 24 characters of the shared charset plus a fixed tail that supplies the uppercase\n * letter, digit and special character immudb requires (see the `IMMUDB_ADMIN_PASSWORD` material).\n */\nexport function generateImmudbAdminPassword(): string {\n return `${CredentialGenerator.generatePassword(24)}Aa1-`;\n}\n\n/** A string counts as present only when it carries actual material — `''` is as broken as absent. */\nfunction isFilled(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nexport const FRAMEWORK_MANAGED_SECRET_MATERIALS = [\n {\n ref: FrameworkManagedSecretMaterialRef.MONGODB_ROOT_CREDENTIAL,\n identityKeys: ['mongodb.rootUser'],\n secretKeys: ['mongodb.rootPassword'],\n purpose: 'Root credential for the self-hosted MongoDB backing service.',\n isProvisioned: (s) => isFilled(s.mongodb?.rootUser) && isFilled(s.mongodb?.rootPassword),\n provision: (s) => {\n s.mongodb = {\n rootUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.MONGODB_ROOT_USER,\n rootPassword: CredentialGenerator.generatePassword(24),\n };\n },\n rotate: (s) => {\n if (s.mongodb) s.mongodb.rootPassword = CredentialGenerator.generatePassword(24);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.VALKEY_ADMIN_CREDENTIAL,\n identityKeys: ['valkey.adminUser'],\n secretKeys: ['valkey.adminPassword'],\n purpose: 'Admin credential for the self-hosted Valkey/Redis backing service.',\n isProvisioned: (s) => isFilled(s.valkey?.adminUser) && isFilled(s.valkey?.adminPassword),\n provision: (s) => {\n s.valkey = {\n adminUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.VALKEY_ADMIN_USER,\n adminPassword: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.valkey) s.valkey.adminPassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.POSTGRESQL_ADMIN_CREDENTIAL,\n identityKeys: ['postgresql.adminUser'],\n secretKeys: ['postgresql.adminPassword'],\n purpose: 'Admin credential for the self-hosted PostgreSQL backing service.',\n isProvisioned: (s) => isFilled(s.postgresql?.adminUser) && isFilled(s.postgresql?.adminPassword),\n provision: (s) => {\n s.postgresql = {\n adminUser: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.PG_ADMIN_USER,\n adminPassword: CredentialGenerator.generatePassword(24),\n };\n },\n rotate: (s) => {\n if (s.postgresql) s.postgresql.adminPassword = CredentialGenerator.generatePassword(24);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.RABBITMQ_ADMIN_CREDENTIAL,\n identityKeys: ['rabbitmq.adminUsername'],\n secretKeys: ['rabbitmq.adminPassword'],\n purpose: 'Admin credential for the self-hosted RabbitMQ broker.',\n isProvisioned: (s) => isFilled(s.rabbitmq?.adminUsername) && isFilled(s.rabbitmq?.adminPassword),\n provision: (s) => {\n s.rabbitmq = {\n ...s.rabbitmq,\n adminUsername: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.RABBITMQ_ADMIN_USERNAME,\n adminPassword: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.rabbitmq) s.rabbitmq.adminPassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n // Separate material from the admin credential: the Erlang cookie is the CLUSTER\n // membership secret, not a login. It is provisioned/rotated independently so a\n // secrets.json that carries one but not the other self-heals to a complete broker\n // configuration instead of being silently half-configured.\n ref: FrameworkManagedSecretMaterialRef.RABBITMQ_ERLANG_COOKIE,\n identityKeys: [],\n secretKeys: ['rabbitmq.erlangCookie'],\n purpose: 'Erlang cluster cookie shared by every RabbitMQ node.',\n isProvisioned: (s) => isFilled(s.rabbitmq?.erlangCookie),\n provision: (s) => {\n s.rabbitmq = { ...s.rabbitmq, erlangCookie: CredentialGenerator.generateErlangCookie() };\n },\n rotate: (s) => {\n if (s.rabbitmq) s.rabbitmq.erlangCookie = CredentialGenerator.generateErlangCookie();\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.STORAGE_ACCESS_CREDENTIAL,\n identityKeys: ['storage.accessKey'],\n secretKeys: ['storage.secretKey'],\n purpose: 'Access key pair for the self-hosted MinIO object storage.',\n isProvisioned: (s) => isFilled(s.storage?.accessKey) && isFilled(s.storage?.secretKey),\n provision: (s) => {\n s.storage = {\n accessKey: DEFAULT_PLATFORM_ENV_INTERNAL_SERVICE_CREDENTIAL_USERNAME.MINIO_ACCESS_KEY,\n secretKey: CredentialGenerator.generatePassword(32),\n };\n },\n rotate: (s) => {\n if (s.storage) s.storage.secretKey = CredentialGenerator.generatePassword(32);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_PRIMARY_SECRET,\n identityKeys: [],\n secretKeys: ['platform.primarySecret'],\n purpose: 'Primary shared platform secret.',\n isProvisioned: (s) => isFilled(s.platform?.primarySecret),\n provision: (s) => {\n s.platform = { ...s.platform, primarySecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.platform) s.platform.primarySecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_ADMIN_SECRET,\n identityKeys: [],\n secretKeys: ['platform.adminSecret'],\n purpose: 'Dedicated shared secret for admin operations (CLI <-> apps-manager).',\n isProvisioned: (s) => isFilled(s.platform?.adminSecret),\n provision: (s) => {\n s.platform = { ...s.platform, adminSecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.platform) s.platform.adminSecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.APPLICATION_ADMIN_SECRET,\n identityKeys: [],\n secretKeys: ['application.adminSecret'],\n purpose: \"Gates the application's own operator doors (data-seeding admin, external-data admin).\",\n isProvisioned: (s) => isFilled(s.application?.adminSecret),\n provision: (s) => {\n s.application = { ...s.application, adminSecret: CredentialGenerator.generateSecret(48) };\n },\n rotate: (s) => {\n if (s.application) s.application.adminSecret = CredentialGenerator.generateSecret(48);\n },\n },\n {\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: ['platform.appsManager.privateKey', 'platform.appsManager.publicKey'],\n purpose: \"apps-manager's P2P signing keypair (signs the JWTs it hands to every app).\",\n isProvisioned: (s) =>\n isFilled(s.platform?.appsManager?.privateKey) && isFilled(s.platform?.appsManager?.publicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform = {\n ...s.platform,\n appsManager: { privateKey: keys.privateKey, publicKey: keys.publicKey },\n };\n },\n rotate: (s) => {\n if (!s.platform?.appsManager) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform.appsManager.privateKey = keys.privateKey;\n s.platform.appsManager.publicKey = keys.publicKey;\n },\n },\n {\n // Historically absent from `buildCredentials`, which is exactly why crontabs signed\n // every SCHEDULED_CRON / MINION_TICK token with a fallback key and apps handed out an\n // empty verify key — dead-lettering every tick. Declared here so an environment that\n // predates the keypair acquires it on the next self-heal.\n ref: FrameworkManagedSecretMaterialRef.PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: [\n 'platform.crontabsBatchesManager.privateKey',\n 'platform.crontabsBatchesManager.publicKey',\n ],\n purpose: \"crontabs-batches-manager's P2P signing keypair (signs every scheduled job token).\",\n isProvisioned: (s) =>\n isFilled(s.platform?.crontabsBatchesManager?.privateKey)\n && isFilled(s.platform?.crontabsBatchesManager?.publicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform = {\n ...s.platform,\n crontabsBatchesManager: { privateKey: keys.privateKey, publicKey: keys.publicKey },\n };\n },\n rotate: (s) => {\n if (!s.platform?.crontabsBatchesManager) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.platform.crontabsBatchesManager.privateKey = keys.privateKey;\n s.platform.crontabsBatchesManager.publicKey = keys.publicKey;\n },\n },\n {\n // The cryptographic whole-server-substitution defense for the tamper-evident audit\n // store. The PRIVATE half (SEC1 \"EC PRIVATE KEY\" PEM — the exact format immudb's\n // `--signingKey` parses) is mounted into the SELF-hosted immudb server ONLY; the\n // PUBLIC half (SPKI PEM) rides `IMMUDB_STATE_PUBLIC_KEY` into every app runtime so\n // the audit client can verify the server's signed `ImmutableState`. Absent material\n // means immudb runs UNSIGNED and the client degrades to \"pinning is OFF\".\n ref: FrameworkManagedSecretMaterialRef.IMMUDB_STATE_SIGNING_KEYPAIR,\n identityKeys: [],\n secretKeys: ['immudb.stateSigningPrivateKey', 'immudb.stateSigningPublicKey'],\n purpose: 'immudb state-signing keypair (audit-store whole-server-substitution defense).',\n isProvisioned: (s) =>\n isFilled(s.immudb?.stateSigningPrivateKey) && isFilled(s.immudb?.stateSigningPublicKey),\n provision: (s) => {\n const keys = CredentialGenerator.generateECKeyPair();\n // Spread: the section also holds `adminPassword` (its own material). Replacing the section would erase a\n // provisioned admin password and re-mint it on the same pass — a silent change of the server's sysadmin\n // credential, which immudb only adopts on a fresh data dir.\n s.immudb = { ...s.immudb, stateSigningPrivateKey: keys.privateKey, stateSigningPublicKey: keys.publicKey };\n },\n rotate: (s) => {\n if (!s.immudb) return;\n const keys = CredentialGenerator.generateECKeyPair();\n s.immudb.stateSigningPrivateKey = keys.privateKey;\n s.immudb.stateSigningPublicKey = keys.publicKey;\n },\n },\n {\n // #1696 — the self-hosted immudb server's built-in `immudb` SYSADMIN password. The server is initialised with\n // it, and apps-manager alone logs in with it to mint each application's own database and `READ_WRITE` user. It\n // replaces the copy of the owning application's `providerEnv.IMMUDB_PASSWORD`, which made the sysadmin\n // credential an APPLICATION value every audit sink held.\n //\n // NOT adopted from that operator value, deliberately. Every environment measured on 2026-09-29 carried immudb's\n // PACKAGED DEFAULT there, a public credential; adopting it would make the platform's admin secret the default,\n // and for a MANAGED immudb that key is the vendor's credential, which must never become a platform secret. So\n // the value is always generated. An existing data dir keeps the password it was initialised with: apps-manager\n // moves one still on the packaged default onto this value at its first admin login (the SERVER moves, this\n // secret does not; `ImmudbAdminManagerService`, audited). One initialised from a real secret needs its sysadmin\n // password set once (`immuadmin user changepassword immudb`) or a fresh data dir, and registration names that.\n //\n // immudb's password rule is 8 to 32 characters with at least one uppercase letter, one digit and one special\n // character; the shared charset (alphanumerics + `_+-`) guarantees none of those, so a fixed `Aa1-` tail does.\n // The 24 random characters carry the entropy; the tail only satisfies the rule.\n // spec-cite: immudb v1.11.1 `pkg/auth/passwords.go`\n // (https://raw.githubusercontent.com/codenotary/immudb/v1.11.1/pkg/auth/passwords.go, fetched 2026-09-29).\n ref: FrameworkManagedSecretMaterialRef.IMMUDB_ADMIN_PASSWORD,\n identityKeys: [],\n secretKeys: ['immudb.adminPassword'],\n purpose: \"The self-hosted immudb server's sysadmin password (held by apps-manager only).\",\n isProvisioned: (s) => isFilled(s.immudb?.adminPassword),\n provision: (s) => {\n s.immudb = { ...s.immudb, adminPassword: generateImmudbAdminPassword() };\n },\n // Rotation writes a new value here and in apps-manager's env on the next render; the RUNNING server keeps its\n // old sysadmin password (immudb adopts the variable only on a fresh data dir), and that old value is a real\n // secret apps-manager no longer holds, so its packaged-default adoption does not apply: a rotation owes a\n // one-time `immuadmin user changepassword immudb`.\n rotate: (s) => {\n if (s.immudb) s.immudb.adminPassword = generateImmudbAdminPassword();\n },\n },\n {\n // Issue #74 — the SCRAM password `mongot` (the MongoDB 8.2 Search / Vector Search\n // sidecar) authenticates to mongod with. Declared as its OWN material rather than as a\n // third key on MONGODB_ROOT_CREDENTIAL, because `provision` REPLACES the whole section:\n // widening the root material's `isProvisioned` would make every existing environment\n // report unprovisioned and then re-mint `mongodb.rootPassword` on the next self-heal,\n // silently rotating the credential a running stack is already authenticated with.\n // Separate material ⇒ an environment that predates mongot acquires only what it lacks —\n // the same reasoning recorded on the crontabs-batches-manager keypair above.\n //\n // No identity key: the username is the code constant `MONGOT_SYNC_SOURCE.USERNAME`.\n // Alphanumeric + `_+-` (the shared password charset) is safe unquoted in the mongosh\n // `--eval` string, in a YAML scalar, and in a shell heredoc — all three of which this\n // value passes through before it reaches mongot.\n ref: FrameworkManagedSecretMaterialRef.MONGOT_SYNC_SOURCE_CREDENTIAL,\n identityKeys: [],\n secretKeys: ['mongot.syncSourcePassword'],\n purpose: \"mongot's SCRAM credential against mongod (the `searchCoordinator` sync-source user).\",\n isProvisioned: (s) => isFilled(s.mongot?.syncSourcePassword),\n provision: (s) => {\n s.mongot = { syncSourcePassword: CredentialGenerator.generatePassword(32) };\n },\n rotate: (s) => {\n if (s.mongot) s.mongot.syncSourcePassword = CredentialGenerator.generatePassword(32);\n },\n },\n {\n /*\n * The seeded administrators' password. The operator MAY type one at setup; when they do not,\n * the framework generates it. Only the password is framework-managed — the identity fields\n * (email / first / last name) are operator-authored and are NOT declared here, so provisioning\n * never invents an administrator identity.\n *\n * ## WHICH application's copy actually seeds anything — read this before calling it a defect\n *\n * An environment has ONE platform administrator, and the credential that seeds it comes from the\n * application that OWNS that environment's platform: its `secrets.json` is what generates\n * `platform-apps-manager/.env`, and apps-manager seeds from that env contract at INIT.\n *\n * A HOSTED application — one declaring `infrastructureHost` — therefore mints an `admin.password`\n * here that seeds NOTHING, because it owns no platform. Its administrator is the HOST's, and\n * signing in to it uses the host's credential. Verified on the dogfood pair, 2026-09-18: the\n * platform env's `ADMIN_PASSWORD` is byte-identical to Wonder Todos' own `admin.password` (the\n * owner), while a hosted application's differs and yields a zero-length access token.\n *\n * This is the intended behaviour (Paul, 2026-09-18), not a mismatch to repair. Do NOT change the\n * seeding to read a hosted application's own value: one environment has one platform\n * administrator, and giving a hosted application a second one would be inventing an identity the\n * platform does not have. The material is declared unconditionally because the SAME application\n * may own its platform in one environment and be hosted in another, and the value has to exist\n * for the environment where it owns.\n *\n * ONE MATERIAL, TWO ACCOUNTS, and that is the local convention rather than an oversight (#575).\n * An application-wide access grant is approved by a SECOND administrator — the two-person rule\n * refuses an approver who is its own requester — so a platform provisions two. Locally the\n * approver is sub-addressed from the administrator (`ada+approver@…`, same mailbox) and SHARES\n * this password, which makes the two-person rule ceremonial there. That is the accepted trade:\n * the alternative is a developer who cannot exercise an application-wide read at all. A remote\n * deployment states its approver, including a password of its own, and `provision` below fills\n * only what is empty, so a stated password is never overwritten.\n *\n * `s.approver` may legitimately be absent — the block is `.optional()` so a `secrets.json`\n * written before it existed still parses — and this material must then behave exactly as it\n * always did rather than conjuring an approver with no identity behind it.\n */\n ref: FrameworkManagedSecretMaterialRef.ADMIN_PASSWORD,\n identityKeys: [],\n /*\n * `admin.password` ONLY, even though `provision` also fills `approver.password`.\n *\n * A declared key is a promise that the key EXISTS after provisioning — the registry's own pins\n * read every declared key back and require it populated and rotatable, and they are what caught\n * the first version of this. `approver` is `.optional()` so a `secrets.json` predating it still\n * parses, so `approver.password` cannot make that promise. The four approver paths reach a\n * CI-reconstructed secrets file through `OPERATOR_TYPED_SECRET_PATHS` instead, which is the\n * honest home: remotely the approver's password IS operator-typed, and locally it is copied from\n * the administrator's rather than minted on its own.\n */\n secretKeys: ['admin.password'],\n purpose: 'Password of the seeded platform administrators (when not operator-supplied).',\n isProvisioned: (s) => isFilled(s.admin?.password) && (s.approver === undefined || isFilled(s.approver.password)),\n provision: (s) => {\n // Reuse an already-provisioned administrator password rather than minting a second one, so\n // that a run which only has to fill the approver's half does not silently rotate the\n // administrator's — a \"provisioning\" pass that changes a working credential is an outage.\n const password = isFilled(s.admin?.password) ? s.admin!.password! : CredentialGenerator.generatePassword(16);\n s.admin = { ...s.admin, password };\n if (s.approver !== undefined && !isFilled(s.approver.password)) {\n s.approver = { ...s.approver, password };\n }\n },\n rotate: (s) => {\n // Both to the SAME new value, preserving the shared-password convention across a rotation:\n // the local approver exists so one developer can sign both legs, and a rotation that split\n // them would leave that developer hunting a second password for no gain. Rotation is an\n // explicit operator act, so overwriting a stated remote password here is its job, not a\n // surprise.\n const password = CredentialGenerator.generatePassword(16);\n if (s.admin) s.admin.password = password;\n if (s.approver) s.approver.password = password;\n },\n },\n] as const satisfies readonly FrameworkManagedSecretMaterial[];\n\n/**\n * Compile-time assertion: every {@link FrameworkManagedSecretMaterialRef} member MUST be declared\n * in {@link FRAMEWORK_MANAGED_SECRET_MATERIALS}. Omitting one produces\n * `Type '\"…\"' is not assignable to type 'never'` pointing here.\n *\n * The enum was a closed vocabulary with no mechanical link to the list that realises it: the\n * annotation `readonly FrameworkManagedSecretMaterial[]` widened every `ref` back to the enum, so\n * declaring twelve of thirteen materials type-checked perfectly. `as const satisfies` keeps each\n * `ref` at its literal member type, which is what makes the `Exclude` below able to see a gap —\n * the same shape as `_AssertExhaustivePlatformServiceCoverage` in\n * `platform-infrastructure-manager.apps-manager.platform.service.ts`.\n *\n * This is the registry EVERY derived answer now reads — minting, rotation, auto-generated\n * classification, and (since the CI mapping was derived from it) which GitHub Secret a pipeline\n * must carry. A material declared here and forgotten there was exactly how the crontabs signing\n * keypair, the immudb state-signing keypair and the mongot sync-source credential were absent from\n * `FIXED_MAPPINGS`: minted on a developer machine, and silently never reconstructed in CI.\n */\ntype _DeclaredFrameworkManagedSecretMaterialRef = (typeof FRAMEWORK_MANAGED_SECRET_MATERIALS)[number]['ref'];\ntype _AssertExhaustiveFrameworkManagedSecretMaterialCoverage =\n Exclude<FrameworkManagedSecretMaterialRef, _DeclaredFrameworkManagedSecretMaterialRef> extends never ? true : never;\nconst _assertExhaustiveFrameworkManagedSecretMaterialCoverage: _AssertExhaustiveFrameworkManagedSecretMaterialCoverage = true;\nvoid _assertExhaustiveFrameworkManagedSecretMaterialCoverage;\n\n/**\n * Every generated-secret key across all materials, in declaration order. This is the\n * derived answer to \"is this key auto-generated?\" — consumed by `SecretsReader` for\n * masking and rotation reporting so that list can no longer drift from what is actually\n * minted. Identity keys (service usernames) are deliberately excluded: they are\n * non-secret constants, not generated material.\n */\nexport const FRAMEWORK_MANAGED_SECRET_KEYS: readonly string[] = FRAMEWORK_MANAGED_SECRET_MATERIALS\n .flatMap((material) => material.secretKeys);\n\n/** Outcome of {@link provisionFrameworkManagedSecrets}. */\n/**\n * Owner of every framework-managed material, total over the vocabulary by type. A hosted application\n * provisions and rotates only its APPLICATION materials: minting a shared one would create a second copy of\n * a credential its host already holds — one the running containers were never given.\n */\nexport const FRAMEWORK_MANAGED_SECRET_MATERIAL_OWNERSHIP: Readonly<Record<FrameworkManagedSecretMaterialRef, SecretOwner>> = {\n [FrameworkManagedSecretMaterialRef.MONGODB_ROOT_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.VALKEY_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.POSTGRESQL_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.RABBITMQ_ADMIN_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.RABBITMQ_ERLANG_COOKIE]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.STORAGE_ACCESS_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_PRIMARY_SECRET]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_ADMIN_SECRET]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.APPLICATION_ADMIN_SECRET]: SecretOwner.APPLICATION,\n [FrameworkManagedSecretMaterialRef.PLATFORM_APPS_MANAGER_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.PLATFORM_CRONTABS_BATCHES_MANAGER_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.IMMUDB_STATE_SIGNING_KEYPAIR]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.IMMUDB_ADMIN_PASSWORD]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.MONGOT_SYNC_SOURCE_CREDENTIAL]: SecretOwner.SHARED_INFRASTRUCTURE,\n [FrameworkManagedSecretMaterialRef.ADMIN_PASSWORD]: SecretOwner.APPLICATION,\n};\n\n/** Restricts provisioning or rotation to the materials of the given owners. Omitted: every material. */\nexport interface FrameworkManagedSecretsScope {\n owners?: ReadonlySet<SecretOwner>;\n}\n\nfunction isMaterialInScope(material: FrameworkManagedSecretMaterial, scope: FrameworkManagedSecretsScope | undefined): boolean {\n return scope?.owners === undefined || scope.owners.has(FRAMEWORK_MANAGED_SECRET_MATERIAL_OWNERSHIP[material.ref]);\n}\n\nexport interface FrameworkManagedSecretsProvisioningResult {\n /** The same object that was passed in, now guaranteed complete. */\n secrets: PlatformEnvSecretsJson;\n /** Materials that were absent and have just been minted (empty ⇒ nothing changed). */\n mintedRefs: FrameworkManagedSecretMaterialRef[];\n /** Flattened keys written by `mintedRefs`, for operator-facing reporting. */\n mintedKeys: string[];\n}\n\n/**\n * Mint every framework-managed material that is absent (or blank) from `secrets`,\n * leaving everything already present untouched, and return what changed.\n *\n * IDEMPOTENT AND ADDITIVE by construction — running it twice mints nothing the second\n * time, and it can never invalidate a credential a running deployment already uses.\n * That is what makes it safe on unattended self-heal paths (`wildo local dev` /\n * `wildo local up` preflight, `wildo config sync`), unlike\n * {@link rotateFrameworkManagedSecrets}.\n *\n * Serves two callers with one code path:\n * - `buildCredentials()` passes a draft holding only operator-typed answers, and gets\n * back a complete `secrets.json`;\n * - the self-heal paths pass an already-parsed `secrets.json` and get back the same\n * object with the gaps filled.\n *\n * The returned `secrets` is narrowed to the complete `PlatformEnvSecretsJson` shape only\n * after a runtime completeness assertion over the registry — the narrowing is therefore\n * proven, not assumed. A material whose `provision()` fails to satisfy its own\n * `isProvisioned()` is a registry authoring bug and throws loudly here rather than\n * writing a half-provisioned secrets.json to disk.\n */\nexport function provisionFrameworkManagedSecrets(\n secrets: PlatformEnvSecretsDraft,\n scope?: FrameworkManagedSecretsScope,\n): FrameworkManagedSecretsProvisioningResult {\n const mintedRefs: FrameworkManagedSecretMaterialRef[] = [];\n const mintedKeys: string[] = [];\n\n for (const material of FRAMEWORK_MANAGED_SECRET_MATERIALS) {\n if (!isMaterialInScope(material, scope)) continue;\n if (material.isProvisioned(secrets)) continue;\n\n material.provision(secrets);\n\n if (!material.isProvisioned(secrets)) {\n throw new Error(\n `Framework-managed secret material '${material.ref}' did not satisfy its own provisioning check. `\n + 'This is a registry authoring bug in framework-managed-secrets.ts, not an environment problem.',\n );\n }\n\n mintedRefs.push(material.ref);\n mintedKeys.push(...material.identityKeys, ...material.secretKeys);\n }\n\n return { secrets: secrets as PlatformEnvSecretsJson, mintedRefs, mintedKeys };\n}\n\n/** Outcome of {@link rotateFrameworkManagedSecrets}. */\nexport interface FrameworkManagedSecretsRotationResult {\n /** Generated-secret keys that were regenerated. */\n rotatedKeys: string[];\n /** Identity keys deliberately preserved (service usernames). */\n preservedIdentityKeys: string[];\n}\n\n/**\n * Regenerate the secret half of every framework-managed material, preserving identity\n * halves (service usernames) and every operator-typed value (admin identity, provider\n * API keys, GitHub tokens, Atlas API keys) — those are simply not in the registry.\n *\n * DESTRUCTIVE: every rotated credential must be redeployed to the services that hold\n * the other end. Callers gate this behind an explicit operator opt-in.\n *\n * Any material still absent is provisioned first, so a rotation of a partially\n * provisioned environment yields a COMPLETE secrets.json rather than silently skipping\n * the gaps (the previous hand-written rotation skipped whatever it had not been taught\n * about, which is how the immudb and crontabs keypairs stayed missing through rotations).\n */\nexport function rotateFrameworkManagedSecrets(\n secrets: PlatformEnvSecretsDraft,\n scope?: FrameworkManagedSecretsScope,\n): FrameworkManagedSecretsRotationResult {\n const { mintedKeys } = provisionFrameworkManagedSecrets(secrets, scope);\n const mintedKeySet = new Set(mintedKeys);\n\n const rotatedKeys: string[] = [];\n const preservedIdentityKeys: string[] = [];\n\n for (const material of FRAMEWORK_MANAGED_SECRET_MATERIALS) {\n if (!isMaterialInScope(material, scope)) continue;\n // A material minted moments ago by the provisioning pass above is already fresh —\n // rotating it again would only burn entropy and confuse the operator-facing report.\n const wasJustMinted = material.secretKeys.every((key) => mintedKeySet.has(key));\n if (!wasJustMinted) {\n material.rotate(secrets);\n }\n rotatedKeys.push(...material.secretKeys);\n preservedIdentityKeys.push(...material.identityKeys);\n }\n\n return { rotatedKeys, preservedIdentityKeys };\n}\n"]}