@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":"reinit.command.js","sourceRoot":"","sources":["../../../../../../src/commands/local/reinit.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAC7H,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,MAAM,wEAAwE,CAAC;AAC7J,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAEnG,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IAChD,IAAI,GAAgB;QAC3B,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,6GAA6G;QAC/G,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,qBAAqB,EAAE,8EAA8E;QACrG,KAAK,EAAE;Y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CAAC,GAAyB;gBACrD,GAAG,EAAE,GAAG,CAAC,GAAG;aACb,CAAC,CAAC;YAEH,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,uJAAuJ,CAAC,CAAC;YACzK,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,8GAA8G,CAAC,CAAC,CAAC;YACxI,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CACX,wBAAwB,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * local reinit — Honest \"wipe + restart\" of the local app runtime.\n *\n * Slice 5 (F-15) — this command is destructively equivalent to running\n * `wildo local reset` followed by `wildo local init` in one go,\n * in framework-developer context. It:\n * 1. Refreshes the platform's generated `.env` files for the active env.\n * 2. Resets the runtime state — the SAME wipe as `wildo local reset`:\n * - Compose: `docker compose down -v` then `rm -rf` of\n * `<saas-root>/.wildo-saas/local_data/<svc>/` for every service.\n * - K8s: scale workloads to zero → delete all PVCs → delete static\n * `Retain`-policy local PVs → `rm -rf` the on-host bind-mount\n * tree (Kind hostPath-mapped under `/mnt/local-data/`).\n * Fail-CLOSED — a partial wipe is worse than a loud failure.\n * 3. Bootstraps from scratch (re-apply infra, wait for readiness).\n * 4. Runs registered platform INIT and waits for every platform service.\n * 5. Registers the app by slug and regenerates every runtime env target.\n *\n * The pre-Slice-5 wording said \"rebuild config\", which was a lie — every\n * Mongo journal, PG datadir, and ClamAV signature DB on disk is also\n * wiped. The confirmation prompt now enumerates the absolute on-host\n * directories that will be `rm -rf`'d so the operator can SEE the\n * destructive scope before confirming (mirrors the M-8 pattern from\n * `wildo local reset`).\n *\n * Refuses fail-loud when `--non-interactive && !--force` — there is no\n * safe way to confirm a destructive op in a non-interactive shell\n * without explicit operator opt-in.\n */\n\nimport { confirm } from '@inquirer/prompts';\nimport chalk from 'chalk';\nimport { join } from 'path';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { WildoLocationType, WorkspaceScope } from '@wildo-ai/platform-config-lib';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { LocalAppReinitService } from '~wildo-cli/services/application/local-app-reinit.service';\nimport { buildLocalDataVolumeDeclarations, getDockerComposeLocalDataServices } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\n\nexport default class LocalReinitCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local reinit',\n description:\n 'Wipe local data, initialize the registered platform, register the app, and materialize every runtime target',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n unavailabilityMessage: '`wildo local reinit` requires a targeted app root with wildo.saas.config.ts.',\n flags: {\n force: {\n type: 'boolean',\n description: 'Skip the destructive-confirmation prompt (still wipes all local_data/)',\n default: false,\n },\n app: {\n type: 'string',\n description: 'Application slug to reinitialize when the current app workspace exposes multiple app targets',\n default: undefined,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const force = ctx.flags.force === true;\n\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n // A hosted application's reinit would wipe its HOST's data. Its own clean-room state is its database\n // on the host's server, which `wildo local init` re-registers without touching anything shared.\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.WIPE_BACKING_SERVICE_DATA,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n\n if (!force && !ctx.globalFlags.nonInteractive) {\n /*\n * Slice 5 (F-15) — enumerate what will be permanently deleted so the operator can SEE the\n * destructive scope before confirming. Mirrors the MEDIUM-8 pattern shipped on\n * `wildo local reset`, and the wipe path is the same one for both runtimes.\n *\n * It must name BOTH halves. Backing-service data lives on the host under `local_data/` or in\n * named volumes, depending on `localDataStorage`, and the reinit wipes both unconditionally.\n * Listing only the directories would understate the scope in exactly the mode where the\n * directories are EMPTY — a destructive prompt describing the half that holds nothing.\n */\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (saasRoot) {\n try {\n const localDataRoot = EnvironmentPaths.resolveScopedLocalDataDir(saasRoot);\n const services = getDockerComposeLocalDataServices(env);\n ctx.log.info(chalk.yellow('\\n The following on-host directories will be permanently deleted:'));\n for (const service of services) {\n ctx.log.info(chalk.yellow(` - ${join(localDataRoot, service)}`));\n }\n ctx.log.info(chalk.yellow('\\n …and the following Docker volumes:'));\n // `mongot: true` enumerates what MAY exist rather than what this render emits, which is\n // what the wipe does too: `wipeLocalDataVolumesForCompose` covers every service in the\n // data list, mongot included. A destructive prompt should over-list, never under-list.\n const volumes = buildLocalDataVolumeDeclarations(env, saasRoot, { mongot: true });\n if (volumes.length === 0) {\n ctx.log.info(chalk.dim(' (none — this environment keeps its data on the host)'));\n } else {\n for (const volume of volumes) {\n ctx.log.info(chalk.yellow(` - ${volume.name}`));\n }\n }\n ctx.log.info('');\n } catch {\n // best-effort enumeration only; never block the prompt because\n // we couldn't resolve a path.\n }\n }\n const proceed = await confirm({\n message: chalk.yellow(\n 'Reinitialize the local app runtime? This will WIPE every directory listed above (Mongo, Postgres, Valkey, RabbitMQ, MinIO, ClamAV — whichever apply), then re-apply infra and regenerate backend env files. You will lose all local backing-service data.',\n ),\n default: false,\n });\n if (!proceed) {\n ctx.log.info('Cancelled.');\n return { success: true };\n }\n }\n\n if (!force && ctx.globalFlags.nonInteractive) {\n ctx.log.error(\n 'Cannot run destructive `local reinit` (wipes `<saas-root>/.wildo-saas/local_data/`) in non-interactive mode. Use --force to override.',\n );\n return { success: false };\n }\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo local reinit` requires a targeted app root with wildo.saas.config.ts.');\n return { success: false };\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath || !(ctx.preferences?.isFrameworkDeveloper ?? false)) {\n ctx.log.error('`wildo local reinit` requires framework-developer context so Wildo can refresh framework service env files and scoped local runtime state.');\n return { success: false };\n }\n\n try {\n await LocalAppReinitService.reinitialize({\n env,\n frameworkPath,\n saasRoot,\n isFrameworkDeveloper: true,\n requestedAppSlug: ctx.flags.app as string | undefined,\n log: ctx.log,\n });\n\n ctx.log.success('\\n Local app runtime reinitialized successfully (local_data wiped + platform initialized + app registered + all runtime env targets materialized).\\n');\n ctx.log.info(chalk.dim(' Next step: run `wildo local dev`; initialization is complete and startup will reconcile it idempotently.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(\n `Local reinit failed: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n}\n"]}
1
+ {"version":3,"file":"reinit.command.js","sourceRoot":"","sources":["../../../../src/commands/local/reinit.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;A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honest \"wipe + restart\" of the local app runtime.\n *\n * Slice 5 (F-15) — this command is destructively equivalent to running\n * `wildo local reset` followed by `wildo local init` in one go,\n * in framework-developer context. It:\n * 1. Refreshes the platform's generated `.env` files for the active env.\n * 2. Resets the runtime state — the SAME wipe as `wildo local reset`:\n * - Compose: `docker compose down -v` then `rm -rf` of\n * `<saas-root>/.wildo-saas/local_data/<svc>/` for every service.\n * - K8s: scale workloads to zero → delete all PVCs → delete static\n * `Retain`-policy local PVs → `rm -rf` the on-host bind-mount\n * tree (Kind hostPath-mapped under `/mnt/local-data/`).\n * Fail-CLOSED — a partial wipe is worse than a loud failure.\n * 3. Bootstraps from scratch (re-apply infra, wait for readiness).\n * 4. Runs registered platform INIT and waits for every platform service.\n * 5. Registers the app by slug and regenerates every runtime env target.\n *\n * The pre-Slice-5 wording said \"rebuild config\", which was a lie — every\n * Mongo journal, PG datadir, and ClamAV signature DB on disk is also\n * wiped. The confirmation prompt now enumerates the absolute on-host\n * directories that will be `rm -rf`'d so the operator can SEE the\n * destructive scope before confirming (mirrors the M-8 pattern from\n * `wildo local reset`).\n *\n * Refuses fail-loud when `--non-interactive && !--force` — there is no\n * safe way to confirm a destructive op in a non-interactive shell\n * without explicit operator opt-in.\n */\n\nimport { confirm } from '@inquirer/prompts';\nimport chalk from 'chalk';\nimport { join } from 'path';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { WildoLocationType, WorkspaceScope } from '@wildo-ai/platform-config-lib';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { LocalAppReinitService } from '~wildo-cli/services/application/local-app-reinit.service';\nimport { buildLocalDataVolumeDeclarations, getDockerComposeLocalDataServices } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\n\nexport default class LocalReinitCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local reinit',\n description:\n 'Wipe local data, initialize the registered platform, register the app, and materialize every runtime target',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n unavailabilityMessage: '`wildo local reinit` requires a targeted app root with wildo.saas.config.ts.',\n flags: {\n force: {\n type: 'boolean',\n description: 'Skip the destructive-confirmation prompt (still wipes all local_data/)',\n default: false,\n },\n app: {\n type: 'string',\n description: 'Application slug to reinitialize when the current app workspace exposes multiple app targets',\n default: undefined,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const force = ctx.flags.force === true;\n\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n // A hosted application's reinit would wipe its HOST's data. Its own clean-room state is its database\n // on the host's server, which `wildo local init` re-registers without touching anything shared.\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.WIPE_BACKING_SERVICE_DATA,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n\n if (!force && !ctx.globalFlags.nonInteractive) {\n /*\n * Slice 5 (F-15) — enumerate what will be permanently deleted so the operator can SEE the\n * destructive scope before confirming. Mirrors the MEDIUM-8 pattern shipped on\n * `wildo local reset`, and the wipe path is the same one for both runtimes.\n *\n * It must name BOTH halves. Backing-service data lives on the host under `local_data/` or in\n * named volumes, depending on `localDataStorage`, and the reinit wipes both unconditionally.\n * Listing only the directories would understate the scope in exactly the mode where the\n * directories are EMPTY — a destructive prompt describing the half that holds nothing.\n */\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (saasRoot) {\n try {\n const localDataRoot = EnvironmentPaths.resolveScopedLocalDataDir(saasRoot);\n const services = getDockerComposeLocalDataServices(env);\n ctx.log.info(chalk.yellow('\\n The following on-host directories will be permanently deleted:'));\n for (const service of services) {\n ctx.log.info(chalk.yellow(` - ${join(localDataRoot, service)}`));\n }\n ctx.log.info(chalk.yellow('\\n …and the following Docker volumes:'));\n // `mongot: true` enumerates what MAY exist rather than what this render emits, which is\n // what the wipe does too: `wipeLocalDataVolumesForCompose` covers every service in the\n // data list, mongot included. A destructive prompt should over-list, never under-list.\n const volumes = buildLocalDataVolumeDeclarations(env, saasRoot, { mongot: true });\n if (volumes.length === 0) {\n ctx.log.info(chalk.dim(' (none — this environment keeps its data on the host)'));\n } else {\n for (const volume of volumes) {\n ctx.log.info(chalk.yellow(` - ${volume.name}`));\n }\n }\n ctx.log.info('');\n } catch {\n // best-effort enumeration only; never block the prompt because\n // we couldn't resolve a path.\n }\n }\n const proceed = await confirm({\n message: chalk.yellow(\n 'Reinitialize the local app runtime? This will WIPE every directory listed above (Mongo, Postgres, Valkey, RabbitMQ, MinIO, ClamAV — whichever apply), then re-apply infra and regenerate backend env files. You will lose all local backing-service data.',\n ),\n default: false,\n });\n if (!proceed) {\n ctx.log.info('Cancelled.');\n return { success: true };\n }\n }\n\n if (!force && ctx.globalFlags.nonInteractive) {\n ctx.log.error(\n 'Cannot run destructive `local reinit` (wipes `<saas-root>/.wildo-saas/local_data/`) in non-interactive mode. Use --force to override.',\n );\n return { success: false };\n }\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo local reinit` requires a targeted app root with wildo.saas.config.ts.');\n return { success: false };\n }\n\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkPath || !(ctx.preferences?.isFrameworkDeveloper ?? false)) {\n ctx.log.error('`wildo local reinit` requires framework-developer context so Wildo can refresh framework service env files and scoped local runtime state.');\n return { success: false };\n }\n\n try {\n await LocalAppReinitService.reinitialize({\n env,\n frameworkPath,\n saasRoot,\n isFrameworkDeveloper: true,\n requestedAppSlug: ctx.flags.app as string | undefined,\n log: ctx.log,\n });\n\n ctx.log.success('\\n Local app runtime reinitialized successfully (local_data wiped + platform initialized + app registered + all runtime env targets materialized).\\n');\n ctx.log.info(chalk.dim(' Next step: run `wildo local dev`; initialization is complete and startup will reconcile it idempotently.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(\n `Local reinit failed: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reset.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local/reset.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAwB1F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAkBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAuGxC,YAAY;YA6CZ,QAAQ;CA+DvB"}
1
+ {"version":3,"file":"reset.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local/reset.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAwB1F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,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,yCAAyC,CAAC,OAAO,CAAC,CAAC;YACxF,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,IAAI,iDAAiD,CAAC,CAAC;YAC7F,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QAED,sFAAsF;QACtF,iFAAiF;QACjF,gFAAgF;QAChF,iFAAiF;QACjF,4EAA4E;QAC5E,gFAAgF;QAChF,kEAAkE;QAClE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC,CAAC;QACtE,kCAAkC,CAAC,GAAG,CAAC,CAAC;QACxC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;QAExD;;;;;;;;;;;;;;;;WAgBG;QACH,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACzE,8BAA8B,CAAC,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;CACF","sourcesContent":["/**\n * local reset — Stop services and wipe local data; leave the environment stopped and empty.\n *\n * Destructive operation that:\n * 1. Stops all infrastructure and platform microservices\n * - Compose: `docker compose down -v` (the `-v` removes the named\n * volumes this render declares — every one of them under the\n * `DOCKER_VOLUME` storage mode, and any legacy leftovers otherwise).\n * - K8s: `kubectlScaleAllWorkloadsToZero` then\n * `kubectlDeleteAllPersistentVolumeClaims` so pods release the\n * host bind mounts before we attempt to wipe them.\n * 2. Wipes backing-service data in BOTH the places it can live, fail-CLOSED\n * so a partial wipe surfaces here instead of corrupting the next `up`:\n * - the host-side `local_data/<svc>/` subdirs, via\n * `wipeLocalDataServiceDirsForCompose(env)` — still the single\n * source-of-truth for the Kind k8s lane, which hostPath-mounts that\n * same tree at `/mnt/local-data/<svc>/`;\n * - the named data volumes, via `wipeLocalDataVolumesForCompose(env)`.\n * Both run whatever the environment's `localDataStorage` currently says,\n * because an environment re-authored from one mode to the other still\n * holds data in the half it no longer uses — and the volume half has no\n * visible directory in which to notice that.\n * 3. Clears platform init state and every application identity derived from\n * the destroyed platform database\n * 4. Returns stopped and empty. Invoke `wildo local init` separately\n * when initialization and application registration are wanted afterward.\n *\n * Prompts confirmation unless --force is passed; refuses fail-loud when\n * `--non-interactive && !--force` (no way to safely confirm a destructive\n * op in a non-interactive shell without explicit operator opt-in).\n *\n * Slice 4 second-pass-2 review fix (MEDIUM-5) — the previous header said\n * step 2 was \"Removes Docker volumes (Docker) or scales to zero (K8s)\",\n * which conflated two different things and lied about the Compose story\n * (no named volumes to remove post-Slice-4; the real persistence wipe\n * happens in step 2's host bind-mount tree). Header now matches the body.\n */\n\nimport { confirm } from '@inquirer/prompts';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { join } from 'path';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport {\n getDockerComposeLocalDataServices,\n wipeLocalDataServiceDirsForCompose,\n wipeLocalDataVolumesForCompose,\n} from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { K8sOperations } from '~wildo-cli/services/deployment/k8s/k8s-operations.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { LocalRuntimeProcessCleanupService } from '~wildo-cli/services/deployment/local-runtime-process-cleanup.service';\nimport { K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\nimport {\n SharedPlatformAccess,\n SharedPlatformIntent,\n decideSharedPlatformAccess,\n} from '~wildo-cli/services/deployment/local-dev-session-lease.service';\n\nexport default class LocalResetCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local reset',\n description: 'Stop services and wipe local data; initialization is a separate step',\n category: CommandCategory.Local,\n flags: {\n force: { type: 'boolean', description: 'Skip confirmation prompt', default: false },\n /*\n * Deliberately NOT folded into `--force`, which only means \"do not ask me\". Taking a live\n * session's platform is a different decision from skipping a prompt, and `config sync` already\n * records what happens when one flag carries two meanings (`--force` vs `--rotate-secrets`).\n */\n 'accept-foreign-platform-owner': {\n type: 'boolean',\n description:\n 'Destroy the shared local platform and its volumes even though a running `wildo local dev` session owns it.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const force = ctx.flags.force === true;\n\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n // Refused BEFORE the confirmation prompt: listing the host's data directories for deletion from a\n // hosted application would ask the operator to confirm the destruction of another application's data.\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.WIPE_BACKING_SERVICE_DATA,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n /*\n * DISRUPT, and the most destructive lane #1126 covers: this stops the shared `wildo-*` containers,\n * takes their volumes and then `rm -rf`s the on-host data directories. Under a foreign `wildo local\n * dev` owner that is not an interruption of the other session, it is the deletion of its data.\n *\n * Checked HERE — before the confirmation prompt and before anything is stopped — because a refusal\n * that arrives mid-`stopServices` has already done half the damage, and because asking an operator\n * to confirm a destruction that is about to be refused teaches them to answer prompts without\n * reading them.\n */\n const platformAccess = decideSharedPlatformAccess({\n frameworkRoot: ctx.cliContext.resolvedHomes.framework.repositoryRoot,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.DISRUPT,\n infraRunning: true,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (platformAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${platformAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to destroy it anyway.');\n return { success: false };\n }\n if (platformAccess.message) ctx.log.warn(` ${platformAccess.message}`);\n\n if (!force && !ctx.globalFlags.nonInteractive) {\n // Slice 4 second-pass-3 review fix (MEDIUM-8) — enumerate the on-host\n // directories that will be `rm -rf`'d so the operator can SEE the\n // destructive scope before confirming. Previously the prompt only\n // mentioned \"wipe data\" abstractly, which let operators conflate\n // \"stop containers\" (recoverable) with \"delete on-host data files\"\n // (NOT recoverable). Listing the absolute paths makes the blast\n // radius explicit and matches the actual wipe loop in `wipeData()`.\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (saasRoot) {\n try {\n const localDataRoot = EnvironmentPaths.resolveScopedLocalDataDir(saasRoot);\n const services = getDockerComposeLocalDataServices(env);\n ctx.log.info(chalk.yellow('\\n The following on-host directories will be permanently deleted:'));\n for (const service of services) {\n ctx.log.info(chalk.yellow(` - ${join(localDataRoot, service)}`));\n }\n ctx.log.info('');\n } catch {\n // best-effort enumeration only; never block the prompt because\n // we couldn't resolve a path.\n }\n }\n const proceed = await confirm({\n message: chalk.yellow(\n 'Full reset? This will stop all services, wipe the directories listed above, and clear every database-derived runtime identity. Run `wildo local dev` afterward to initialize and register the project.',\n ),\n default: false,\n });\n if (!proceed) {\n ctx.log.info('Cancelled.');\n return { success: true };\n }\n }\n\n if (!force && ctx.globalFlags.nonInteractive) {\n ctx.log.error('Cannot run destructive reset in non-interactive mode. Use --force to override.');\n return { success: false };\n }\n\n try {\n await this.stopServices(ctx);\n await this.wipeData(ctx);\n EnvironmentUtils.clearPlatformInitialized(env.name);\n EnvironmentUtils.clearApplicationRuntimeIdentities(env.name);\n ctx.log.success(` Platform init state cleared for environment \"${env.name}\".`);\n ctx.log.info(chalk.dim(' Next step: run `wildo local dev` to initialize the platform, register the app, and start its runtimes.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(`Reset failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private async stopServices(ctx: CommandContext): Promise<void> {\n const env = ctx.activeEnv!;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n\n ctx.log.info(chalk.cyan('\\n Stopping graph-supervised local runtime processes...\\n'));\n await LocalRuntimeProcessCleanupService.stop(\n [frameworkPath, saasRoot].filter((root): root is string => Boolean(root)),\n ctx.log,\n );\n\n if (isFrameworkDeveloper && frameworkPath) {\n ctx.log.info(chalk.cyan('\\n Stopping platform microservices...\\n'));\n try {\n await PlatformLifecycle.stop(env, ctx.log);\n ctx.log.success('\\n Platform microservices stopped.\\n');\n } catch (err) {\n ctx.log.warn(`Error stopping platform microservices: ${ErrorUtils.extractErrorMessage(err)}`);\n }\n }\n\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n ctx.log.info(chalk.cyan(`\\n Scaling down all deployments in ${namespace}...\\n`));\n const scaleResult = K8sOperations.kubectlScaleAllWorkloadsToZero(namespace, context);\n if (!scaleResult.success) {\n throw new Error(scaleResult.error ?? `Failed to scale workloads to zero in namespace \"${namespace}\"`);\n }\n ctx.log.success('\\n Infrastructure services scaled to 0.\\n');\n } else {\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n ctx.log.info(chalk.cyan('\\n Stopping infrastructure services (Docker Compose)...\\n'));\n // `-v` removes the named volumes THIS render declares — under `DOCKER_VOLUME` that is\n // where the data lives, plus any leftovers from a previous mode. It does NOT touch the\n // on-host tree under `<saas-root>/.wildo-saas/local_data/`, and it cannot see volumes the\n // current render no longer declares. Both gaps are closed in `wipeData()` below, which\n // runs the host wipe and the volume wipe unconditionally. Log copy says only what `-v`\n // actually did, so operators don't believe the data is already gone.\n DockerUtils.runDockerCompose(infraCtx, ['down', '-v'], { inherit: true });\n ctx.log.success('\\n Infrastructure containers stopped (declared volumes pruned; the remaining backing-service data is wiped in the next step).\\n');\n }\n }\n\n private async wipeData(ctx: CommandContext): Promise<void> {\n const env = ctx.activeEnv!;\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n ctx.log.info(chalk.cyan(`\\n Deleting persistent volume claims in ${namespace}...\\n`));\n const deleteResult = K8sOperations.kubectlDeleteAllPersistentVolumeClaims(namespace, context);\n if (!deleteResult.success) {\n throw new Error(deleteResult.error ?? `Failed to delete persistent volume claims in namespace \"${namespace}\"`);\n }\n ctx.log.success('\\n Persistent volume claims deleted.\\n');\n\n // Slice 4 second-pass-3 review fix (HIGH-1) — Slice 4's static PVs are\n // declared with `Retain` + a hard-coded `claimRef`. PVC deletion alone\n // moves them to `Released` (not `Available`) with the stale `claimRef.uid`\n // intact, which silently blocks the next bring-up: the re-created PVC has\n // a new UID, never binds to the Released PV, and pods stay Pending.\n // Deleting the PVs here lets `kubectl apply -f storage/` recreate them as\n // Available on the next `up`. The on-host data under\n // `/mnt/local-data/<svc>/` is wiped explicitly below by\n // `wipeLocalDataServiceDirsForCompose` (single source-of-truth for both\n // runtimes), so PV deletion does NOT cause data loss — it just resets\n // the cluster-side handle.\n ctx.log.info(chalk.cyan(` Deleting static local PersistentVolumes...\\n`));\n const pvDeleteResult = K8sOperations.kubectlDeleteStaticLocalPersistentVolumes(context);\n if (!pvDeleteResult.success) {\n throw new Error(pvDeleteResult.error ?? 'Failed to delete static local PersistentVolumes');\n }\n ctx.log.success(' Static local PersistentVolumes deleted.\\n');\n }\n\n // Slice 4 (4.4) — Compose AND K8s share the same `<saasRoot>/.wildo-saas/local_data/`\n // tree (Compose binds it directly; Kind hostPath mounts it at /mnt/local-data/).\n // Removing volumes / PVCs above only releases the runtime handles — the on-host\n // data files persist until we explicitly `rm -rf` them, so we MUST wipe here for\n // both runtimes or the next `wildo local up` resurrects stale on-host state\n // (corrupt Mongo journal, stale PG datadir, leftover ClamAV signature DB, ...).\n // Fail-closed (D6) — a partial wipe is worse than a loud failure.\n ctx.log.info(chalk.cyan('\\n Wiping local_data subdirectories...\\n'));\n wipeLocalDataServiceDirsForCompose(env);\n ctx.log.success(' local_data subdirectories wiped.\\n');\n\n /*\n * The other half of backing-service data: the named volumes a `DOCKER_VOLUME` environment\n * keeps it in. `docker compose down -v` above already removes the volumes THIS render\n * declares, so on the ordinary path this finds nothing left and says so — it is here for the\n * two cases `-v` cannot cover, both of which leave data behind silently:\n *\n * - the environment was re-authored to `HOST_PATH` after running under `DOCKER_VOLUME`, so\n * the current compose file no longer declares the volumes that still hold the old data;\n * - `down -v` could not run to completion (no compose file rendered yet, a partial stack).\n *\n * Unconditional on mode for exactly that reason, and fail-closed like the host wipe: a reset\n * that leaves a Mongo dataset in a volume nobody mentions is the shape that corrupts the next\n * `up` with no visible directory to notice it in.\n *\n * K8s runtime included deliberately — an environment that ran compose before switching to Kind\n * has those volumes too, and nothing else will ever remove them.\n */\n ctx.log.info(chalk.cyan(' Removing backing-service data volumes...\\n'));\n wipeLocalDataVolumesForCompose(env);\n ctx.log.success(' Backing-service data volumes removed.\\n');\n }\n}\n"]}
1
+ {"version":3,"file":"reset.command.js","sourceRoot":"","sources":["../../../../src/commands/local/reset.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAC7H,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAC;AAC1F,OAAO,KAAK,iBAAiB,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,MAAM,sEAAsE,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACrI,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,GA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C,OAAO,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,IAAI,iDAAiD,CAAC,CAAC;YAC7F,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QAED,sFAAsF;QACtF,iFAAiF;QACjF,gFAAgF;QAChF,iFAAiF;QACjF,4EAA4E;QAC5E,gFAAgF;QAChF,kEAAkE;QAClE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC,CAAC;QACtE,kCAAkC,CAAC,GAAG,CAAC,CAAC;QACxC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;QAExD;;;;;;;;;;;;;;;;WAgBG;QACH,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACzE,8BAA8B,CAAC,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;CACF","sourcesContent":["/**\n * local reset — Stop services and wipe local data; leave the environment stopped and empty.\n *\n * Destructive operation that:\n * 1. Stops all infrastructure and platform microservices\n * - Compose: `docker compose down -v` (the `-v` removes the named\n * volumes this render declares — every one of them under the\n * `DOCKER_VOLUME` storage mode, and any legacy leftovers otherwise).\n * - K8s: `kubectlScaleAllWorkloadsToZero` then\n * `kubectlDeleteAllPersistentVolumeClaims` so pods release the\n * host bind mounts before we attempt to wipe them.\n * 2. Wipes backing-service data in BOTH the places it can live, fail-CLOSED\n * so a partial wipe surfaces here instead of corrupting the next `up`:\n * - the host-side `local_data/<svc>/` subdirs, via\n * `wipeLocalDataServiceDirsForCompose(env)` — still the single\n * source-of-truth for the Kind k8s lane, which hostPath-mounts that\n * same tree at `/mnt/local-data/<svc>/`;\n * - the named data volumes, via `wipeLocalDataVolumesForCompose(env)`.\n * Both run whatever the environment's `localDataStorage` currently says,\n * because an environment re-authored from one mode to the other still\n * holds data in the half it no longer uses — and the volume half has no\n * visible directory in which to notice that.\n * 3. Clears platform init state and every application identity derived from\n * the destroyed platform database\n * 4. Returns stopped and empty. Invoke `wildo local init` separately\n * when initialization and application registration are wanted afterward.\n *\n * Prompts confirmation unless --force is passed; refuses fail-loud when\n * `--non-interactive && !--force` (no way to safely confirm a destructive\n * op in a non-interactive shell without explicit operator opt-in).\n *\n * Slice 4 second-pass-2 review fix (MEDIUM-5) — the previous header said\n * step 2 was \"Removes Docker volumes (Docker) or scales to zero (K8s)\",\n * which conflated two different things and lied about the Compose story\n * (no named volumes to remove post-Slice-4; the real persistence wipe\n * happens in step 2's host bind-mount tree). Header now matches the body.\n */\n\nimport { confirm } from '@inquirer/prompts';\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { join } from 'path';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport {\n getDockerComposeLocalDataServices,\n wipeLocalDataServiceDirsForCompose,\n wipeLocalDataVolumesForCompose,\n} from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { K8sOperations } from '~wildo-cli/services/deployment/k8s/k8s-operations.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { LocalRuntimeProcessCleanupService } from '~wildo-cli/services/deployment/local-runtime-process-cleanup.service';\nimport { K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\nimport {\n SharedPlatformAccess,\n SharedPlatformIntent,\n decideSharedPlatformAccess,\n} from '~wildo-cli/services/deployment/local-dev-session-lease.service';\n\nexport default class LocalResetCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local reset',\n description: 'Stop services and wipe local data; initialization is a separate step',\n category: CommandCategory.Local,\n flags: {\n force: { type: 'boolean', description: 'Skip confirmation prompt', default: false },\n /*\n * Deliberately NOT folded into `--force`, which only means \"do not ask me\". Taking a live\n * session's platform is a different decision from skipping a prompt, and `config sync` already\n * records what happens when one flag carries two meanings (`--force` vs `--rotate-secrets`).\n */\n 'accept-foreign-platform-owner': {\n type: 'boolean',\n description:\n 'Destroy the shared local platform and its volumes even though a running `wildo local dev` session owns it.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const force = ctx.flags.force === true;\n\n const env = ctx.activeEnv;\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n // Refused BEFORE the confirmation prompt: listing the host's data directories for deletion from a\n // hosted application would ask the operator to confirm the destruction of another application's data.\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.WIPE_BACKING_SERVICE_DATA,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n /*\n * DISRUPT, and the most destructive lane #1126 covers: this stops the shared `wildo-*` containers,\n * takes their volumes and then `rm -rf`s the on-host data directories. Under a foreign `wildo local\n * dev` owner that is not an interruption of the other session, it is the deletion of its data.\n *\n * Checked HERE — before the confirmation prompt and before anything is stopped — because a refusal\n * that arrives mid-`stopServices` has already done half the damage, and because asking an operator\n * to confirm a destruction that is about to be refused teaches them to answer prompts without\n * reading them.\n */\n const platformAccess = decideSharedPlatformAccess({\n frameworkRoot: ctx.cliContext.resolvedHomes.framework.repositoryRoot,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.DISRUPT,\n infraRunning: true,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (platformAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${platformAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to destroy it anyway.');\n return { success: false };\n }\n if (platformAccess.message) ctx.log.warn(` ${platformAccess.message}`);\n\n if (!force && !ctx.globalFlags.nonInteractive) {\n // Slice 4 second-pass-3 review fix (MEDIUM-8) — enumerate the on-host\n // directories that will be `rm -rf`'d so the operator can SEE the\n // destructive scope before confirming. Previously the prompt only\n // mentioned \"wipe data\" abstractly, which let operators conflate\n // \"stop containers\" (recoverable) with \"delete on-host data files\"\n // (NOT recoverable). Listing the absolute paths makes the blast\n // radius explicit and matches the actual wipe loop in `wipeData()`.\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (saasRoot) {\n try {\n const localDataRoot = EnvironmentPaths.resolveScopedLocalDataDir(saasRoot);\n const services = getDockerComposeLocalDataServices(env);\n ctx.log.info(chalk.yellow('\\n The following on-host directories will be permanently deleted:'));\n for (const service of services) {\n ctx.log.info(chalk.yellow(` - ${join(localDataRoot, service)}`));\n }\n ctx.log.info('');\n } catch {\n // best-effort enumeration only; never block the prompt because\n // we couldn't resolve a path.\n }\n }\n const proceed = await confirm({\n message: chalk.yellow(\n 'Full reset? This will stop all services, wipe the directories listed above, and clear every database-derived runtime identity. Run `wildo local dev` afterward to initialize and register the project.',\n ),\n default: false,\n });\n if (!proceed) {\n ctx.log.info('Cancelled.');\n return { success: true };\n }\n }\n\n if (!force && ctx.globalFlags.nonInteractive) {\n ctx.log.error('Cannot run destructive reset in non-interactive mode. Use --force to override.');\n return { success: false };\n }\n\n try {\n await this.stopServices(ctx);\n await this.wipeData(ctx);\n EnvironmentUtils.clearPlatformInitialized(env.name);\n EnvironmentUtils.clearApplicationRuntimeIdentities(env.name);\n ctx.log.success(` Platform init state cleared for environment \"${env.name}\".`);\n ctx.log.info(chalk.dim(' Next step: run `wildo local dev` to initialize the platform, register the app, and start its runtimes.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(`Reset failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private async stopServices(ctx: CommandContext): Promise<void> {\n const env = ctx.activeEnv!;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n\n ctx.log.info(chalk.cyan('\\n Stopping graph-supervised local runtime processes...\\n'));\n await LocalRuntimeProcessCleanupService.stop(\n [frameworkPath, saasRoot].filter((root): root is string => Boolean(root)),\n ctx.log,\n );\n\n if (isFrameworkDeveloper && frameworkPath) {\n ctx.log.info(chalk.cyan('\\n Stopping platform microservices...\\n'));\n try {\n await PlatformLifecycle.stop(env, ctx.log);\n ctx.log.success('\\n Platform microservices stopped.\\n');\n } catch (err) {\n ctx.log.warn(`Error stopping platform microservices: ${ErrorUtils.extractErrorMessage(err)}`);\n }\n }\n\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n ctx.log.info(chalk.cyan(`\\n Scaling down all deployments in ${namespace}...\\n`));\n const scaleResult = K8sOperations.kubectlScaleAllWorkloadsToZero(namespace, context);\n if (!scaleResult.success) {\n throw new Error(scaleResult.error ?? `Failed to scale workloads to zero in namespace \"${namespace}\"`);\n }\n ctx.log.success('\\n Infrastructure services scaled to 0.\\n');\n } else {\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n ctx.log.info(chalk.cyan('\\n Stopping infrastructure services (Docker Compose)...\\n'));\n // `-v` removes the named volumes THIS render declares — under `DOCKER_VOLUME` that is\n // where the data lives, plus any leftovers from a previous mode. It does NOT touch the\n // on-host tree under `<saas-root>/.wildo-saas/local_data/`, and it cannot see volumes the\n // current render no longer declares. Both gaps are closed in `wipeData()` below, which\n // runs the host wipe and the volume wipe unconditionally. Log copy says only what `-v`\n // actually did, so operators don't believe the data is already gone.\n DockerUtils.runDockerCompose(infraCtx, ['down', '-v'], { inherit: true });\n ctx.log.success('\\n Infrastructure containers stopped (declared volumes pruned; the remaining backing-service data is wiped in the next step).\\n');\n }\n }\n\n private async wipeData(ctx: CommandContext): Promise<void> {\n const env = ctx.activeEnv!;\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n ctx.log.info(chalk.cyan(`\\n Deleting persistent volume claims in ${namespace}...\\n`));\n const deleteResult = K8sOperations.kubectlDeleteAllPersistentVolumeClaims(namespace, context);\n if (!deleteResult.success) {\n throw new Error(deleteResult.error ?? `Failed to delete persistent volume claims in namespace \"${namespace}\"`);\n }\n ctx.log.success('\\n Persistent volume claims deleted.\\n');\n\n // Slice 4 second-pass-3 review fix (HIGH-1) — Slice 4's static PVs are\n // declared with `Retain` + a hard-coded `claimRef`. PVC deletion alone\n // moves them to `Released` (not `Available`) with the stale `claimRef.uid`\n // intact, which silently blocks the next bring-up: the re-created PVC has\n // a new UID, never binds to the Released PV, and pods stay Pending.\n // Deleting the PVs here lets `kubectl apply -f storage/` recreate them as\n // Available on the next `up`. The on-host data under\n // `/mnt/local-data/<svc>/` is wiped explicitly below by\n // `wipeLocalDataServiceDirsForCompose` (single source-of-truth for both\n // runtimes), so PV deletion does NOT cause data loss — it just resets\n // the cluster-side handle.\n ctx.log.info(chalk.cyan(` Deleting static local PersistentVolumes...\\n`));\n const pvDeleteResult = K8sOperations.kubectlDeleteStaticLocalPersistentVolumes(context);\n if (!pvDeleteResult.success) {\n throw new Error(pvDeleteResult.error ?? 'Failed to delete static local PersistentVolumes');\n }\n ctx.log.success(' Static local PersistentVolumes deleted.\\n');\n }\n\n // Slice 4 (4.4) — Compose AND K8s share the same `<saasRoot>/.wildo-saas/local_data/`\n // tree (Compose binds it directly; Kind hostPath mounts it at /mnt/local-data/).\n // Removing volumes / PVCs above only releases the runtime handles — the on-host\n // data files persist until we explicitly `rm -rf` them, so we MUST wipe here for\n // both runtimes or the next `wildo local up` resurrects stale on-host state\n // (corrupt Mongo journal, stale PG datadir, leftover ClamAV signature DB, ...).\n // Fail-closed (D6) — a partial wipe is worse than a loud failure.\n ctx.log.info(chalk.cyan('\\n Wiping local_data subdirectories...\\n'));\n wipeLocalDataServiceDirsForCompose(env);\n ctx.log.success(' local_data subdirectories wiped.\\n');\n\n /*\n * The other half of backing-service data: the named volumes a `DOCKER_VOLUME` environment\n * keeps it in. `docker compose down -v` above already removes the volumes THIS render\n * declares, so on the ordinary path this finds nothing left and says so — it is here for the\n * two cases `-v` cannot cover, both of which leave data behind silently:\n *\n * - the environment was re-authored to `HOST_PATH` after running under `DOCKER_VOLUME`, so\n * the current compose file no longer declares the volumes that still hold the old data;\n * - `down -v` could not run to completion (no compose file rendered yet, a partial stack).\n *\n * Unconditional on mode for exactly that reason, and fail-closed like the host wipe: a reset\n * that leaves a Mongo dataset in a volume nobody mentions is the shape that corrupts the next\n * `up` with no visible directory to notice it in.\n *\n * K8s runtime included deliberately — an environment that ran compose before switching to Kind\n * has those volumes too, and nothing else will ever remove them.\n */\n ctx.log.info(chalk.cyan(' Removing backing-service data volumes...\\n'));\n wipeLocalDataVolumesForCompose(env);\n ctx.log.success(' Backing-service data volumes removed.\\n');\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"restore.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local/restore.command.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAsDvD"}
1
+ {"version":3,"file":"restore.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local/restore.command.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAsDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"restore.command.js","sourceRoot":"","sources":["../../../../../../src/commands/local/restore.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,C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QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC1F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo local restore` — return a withdrawn application to service (#1556).\n *\n * Clears the deregistration mark and RE-MINTS the credentials the withdrawal revoked, with the values the\n * platform recorded (#1307), so the application's stored secrets stay true and it can boot on them. A\n * restore that could not re-mint one fails and names it; running it again retries, and it re-mints even an\n * application that is already active.\n *\n * It deliberately does not re-create the cron schedule: that schedule is derived from the application's\n * own code, only the application knows what is in it, and its next boot syncs the whole set. A restore\n * that tried to rebuild one would be guessing.\n */\nimport chalk from 'chalk';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { AppBootstrapService } from '~wildo-cli/services/application/app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '~wildo-cli/services/application/app-runtime-targets.service';\n\nexport default class LocalRestoreCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local restore',\n description: 'Return a withdrawn application to service and re-mint its credentials; its schedule returns at the next boot',\n category: CommandCategory.Local,\n flags: {\n app: { type: 'string', description: 'Application slug (defaults to the single resolved app)', default: undefined },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo local restore` requires a targeted app root with wildo.saas.config.ts.');\n return { success: false };\n }\n\n const envName = ctx.activeEnv?.name;\n if (!envName) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n const env = EnvironmentRegistry.get(envName);\n if (!env) {\n ctx.log.error(`Environment '${envName}' not found. Run 'wildo init' first.`);\n return { success: false };\n }\n\n const credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return { success: false };\n }\n\n const requestedAppSlug = ctx.flags.app as string | undefined;\n const runtimeTarget = await AppRuntimeTargetsService.resolve(saasRoot, { environmentName: envName, requestedAppSlug });\n if (!runtimeTarget) {\n ctx.log.error(\n requestedAppSlug\n ? `Application '${requestedAppSlug}' not found under ${saasRoot}.`\n : `No application could be resolved from ${saasRoot}. Pass --app <slug> to disambiguate.`,\n );\n return { success: false };\n }\n\n const appSlug = runtimeTarget.appSlug;\n\n try {\n const result = await AppBootstrapService.restoreApplication(env, credentials, { appSlug });\n\n if (result.alreadyActive) {\n ctx.log.info(` '${appSlug}' was not withdrawn; its credentials were re-checked.`);\n return { success: true };\n }\n\n ctx.log.success(` Restored '${appSlug}' and re-minted ${result.ensuredCredentials.length} credential(s).`);\n ctx.log.info(chalk.dim(' Start it to re-establish its cron schedule — the platform does not rebuild one.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(`Failed to restore '${appSlug}': ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n}\n"]}
1
+ {"version":3,"file":"restore.command.js","sourceRoot":"","sources":["../../../../src/commands/local/restore.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EA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AqF,CAAC,CAAC,CAAC;YAC/G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC1F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo local restore` — return a withdrawn application to service (#1556).\n *\n * Clears the deregistration mark and RE-MINTS the credentials the withdrawal revoked, with the values the\n * platform recorded (#1307), so the application's stored secrets stay true and it can boot on them. A\n * restore that could not re-mint one fails and names it; running it again retries, and it re-mints even an\n * application that is already active.\n *\n * It deliberately does not re-create the cron schedule: that schedule is derived from the application's\n * own code, only the application knows what is in it, and its next boot syncs the whole set. A restore\n * that tried to rebuild one would be guessing.\n */\nimport chalk from 'chalk';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { AppBootstrapService } from '~wildo-cli/services/application/app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '~wildo-cli/services/application/app-runtime-targets.service';\n\nexport default class LocalRestoreCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local restore',\n description: 'Return a withdrawn application to service and re-mint its credentials; its schedule returns at the next boot',\n category: CommandCategory.Local,\n flags: {\n app: { type: 'string', description: 'Application slug (defaults to the single resolved app)', default: undefined },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('`wildo local restore` requires a targeted app root with wildo.saas.config.ts.');\n return { success: false };\n }\n\n const envName = ctx.activeEnv?.name;\n if (!envName) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n const env = EnvironmentRegistry.get(envName);\n if (!env) {\n ctx.log.error(`Environment '${envName}' not found. Run 'wildo init' first.`);\n return { success: false };\n }\n\n const credentials = EnvironmentUtils.loadSecretsJson(envName);\n if (!credentials) {\n ctx.log.error(`No secrets for '${envName}'. Run 'wildo init' first.`);\n return { success: false };\n }\n\n const requestedAppSlug = ctx.flags.app as string | undefined;\n const runtimeTarget = await AppRuntimeTargetsService.resolve(saasRoot, { environmentName: envName, requestedAppSlug });\n if (!runtimeTarget) {\n ctx.log.error(\n requestedAppSlug\n ? `Application '${requestedAppSlug}' not found under ${saasRoot}.`\n : `No application could be resolved from ${saasRoot}. Pass --app <slug> to disambiguate.`,\n );\n return { success: false };\n }\n\n const appSlug = runtimeTarget.appSlug;\n\n try {\n const result = await AppBootstrapService.restoreApplication(env, credentials, { appSlug });\n\n if (result.alreadyActive) {\n ctx.log.info(` '${appSlug}' was not withdrawn; its credentials were re-checked.`);\n return { success: true };\n }\n\n ctx.log.success(` Restored '${appSlug}' and re-minted ${result.ensuredCredentials.length} credential(s).`);\n ctx.log.info(chalk.dim(' Start it to re-establish its cron schedule — the platform does not rebuild one.\\n'));\n return { success: true };\n } catch (error) {\n ctx.log.error(`Failed to restore '${appSlug}': ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"smoke.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local/smoke.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CASxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA0BvD"}
1
+ {"version":3,"file":"smoke.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local/smoke.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CASxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA0BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"smoke.command.js","sourceRoot":"","sources":["../../../../../../src/commands/local/smoke.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,mEAAmE,CAAC;AAE/I,4GAA4G;AAC5G,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IAC/C,IAAI,GAAgB;QAC3B,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mHAAmH;QAChI,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,IAAI,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AI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;gBAClE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;gBACpD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;oBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,KAAK,EAAE,CAAC,CAAC;gBACxE,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,YAAY;oBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;gBAC1F,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,aAAa;oBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,YAAY,EAAE,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,KAAK,8BAA8B,CAAC,MAAM;YAC7D,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;YACnB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,KAAK,8BAA8B,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5G,CAAC;CACF","sourcesContent":["import { WorkspaceScope } from '@wildo-ai/platform-config-lib';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { ApplicationBrowserSmokeOutcome, runApplicationBrowserSmoke } from '~wildo-cli/services/application/application-browser-smoke.service';\n\n/** Enough to reach every page a first navigation offers, few enough to stay a smoke rather than a crawl. */\nconst DEFAULT_MAXIMUM_PAGES = 40;\n\n/**\n * `wildo local smoke` — does the RUNNING application render in a browser? (#2228)\n *\n * Signs in with the application's own administrator, visits every in-application page the rendered navigation offers,\n * and fails on a crash (an uncaught page error or the engine's error-boundary capture) or an API answer of 500 or\n * above. Other console errors are reported, never failing. See `application-browser-smoke.service.ts` for why.\n *\n * Exit codes carry the distinction a caller branches on, the creation console's convention: 0 passed, 1 failed (the\n * application is broken), 2 could not ask (no address, no credential, no Playwright, no browser, nothing listening).\n * The companion's end-of-build verification runs it with `--json` and reports exit 2 as a check that could not run.\n */\nexport default class LocalSmokeCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local smoke',\n description: 'Sign in to the running application and render every page its navigation offers; fail on a crash or a server error',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n json: { type: 'boolean', description: 'Print the result as JSON.', default: false },\n 'max-pages': { type: 'string', description: `The most pages to visit (default ${DEFAULT_MAXIMUM_PAGES})` },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app?.declarationRoot;\n if (saasRoot === undefined) {\n ctx.log.error('Run `wildo local smoke` from an application root.');\n return { success: false, exitCode: 2 };\n }\n const requested = Number(ctx.flags['max-pages']);\n const maximumPages = Number.isSafeInteger(requested) && requested > 0 ? requested : DEFAULT_MAXIMUM_PAGES;\n const result = await runApplicationBrowserSmoke({ saasRoot, maximumPages });\n\n if (ctx.flags.json === true) {\n process.stdout.write(`${JSON.stringify(result)}\\n`);\n } else {\n ctx.log.info(`${result.outcome}: ${result.summary}`);\n for (const page of result.pages) {\n const broken = page.crashes.length + page.serverErrors.length > 0;\n ctx.log.info(` ${broken ? '✗' : '✓'} ${page.url}`);\n for (const crash of page.crashes) ctx.log.info(` crash: ${crash}`);\n for (const serverError of page.serverErrors) ctx.log.info(` server: ${serverError}`);\n for (const consoleError of page.consoleErrors) ctx.log.info(` console: ${consoleError}`);\n }\n }\n return result.outcome === ApplicationBrowserSmokeOutcome.PASSED\n ? { success: true }\n : { success: false, exitCode: result.outcome === ApplicationBrowserSmokeOutcome.COULD_NOT_ASK ? 2 : 1 };\n }\n}\n"]}
1
+ {"version":3,"file":"smoke.command.js","sourceRoot":"","sources":["../../../../src/commands/local/smoke.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,mEAAmE,CAAC;AAE/I,4GAA4G;AAC5G,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IAC/C,IAAI,GAAgB;QAC3B,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mHAAmH;QAChI,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,2BAA2B,EAAE,OAAO,EAAE,KAAK,EAAE;YACnF,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oCAAoC,qBAAqB,GAAG,EAAE;SAC3G;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,eAAe,CAAC;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;YACnE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,CAAC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I,CAAC,kBAAkB,YAAY,EAAE,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,KAAK,8BAA8B,CAAC,MAAM;YAC7D,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;YACnB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,KAAK,8BAA8B,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5G,CAAC;CACF","sourcesContent":["import { WorkspaceScope } from '@wildo-ai/platform-config-lib';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { ApplicationBrowserSmokeOutcome, runApplicationBrowserSmoke } from '~wildo-cli/services/application/application-browser-smoke.service';\n\n/** Enough to reach every page a first navigation offers, few enough to stay a smoke rather than a crawl. */\nconst DEFAULT_MAXIMUM_PAGES = 40;\n\n/**\n * `wildo local smoke` — does the RUNNING application render in a browser? (#2228)\n *\n * Signs in with the application's own administrator, visits every in-application page the rendered navigation offers,\n * and fails on a crash (an uncaught page error or the engine's error-boundary capture) or an API answer of 500 or\n * above. Other console errors are reported, never failing. See `application-browser-smoke.service.ts` for why.\n *\n * Exit codes carry the distinction a caller branches on, the creation console's convention: 0 passed, 1 failed (the\n * application is broken), 2 could not ask (no address, no credential, no Playwright, no browser, nothing listening).\n * The companion's end-of-build verification runs it with `--json` and reports exit 2 as a check that could not run.\n */\nexport default class LocalSmokeCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local smoke',\n description: 'Sign in to the running application and render every page its navigation offers; fail on a crash or a server error',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n json: { type: 'boolean', description: 'Print the result as JSON.', default: false },\n 'max-pages': { type: 'string', description: `The most pages to visit (default ${DEFAULT_MAXIMUM_PAGES})` },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app?.declarationRoot;\n if (saasRoot === undefined) {\n ctx.log.error('Run `wildo local smoke` from an application root.');\n return { success: false, exitCode: 2 };\n }\n const requested = Number(ctx.flags['max-pages']);\n const maximumPages = Number.isSafeInteger(requested) && requested > 0 ? requested : DEFAULT_MAXIMUM_PAGES;\n const result = await runApplicationBrowserSmoke({ saasRoot, maximumPages });\n\n if (ctx.flags.json === true) {\n process.stdout.write(`${JSON.stringify(result)}\\n`);\n } else {\n ctx.log.info(`${result.outcome}: ${result.summary}`);\n for (const page of result.pages) {\n const broken = page.crashes.length + page.serverErrors.length > 0;\n ctx.log.info(` ${broken ? '✗' : '✓'} ${page.url}`);\n for (const crash of page.crashes) ctx.log.info(` crash: ${crash}`);\n for (const serverError of page.serverErrors) ctx.log.info(` server: ${serverError}`);\n for (const consoleError of page.consoleErrors) ctx.log.info(` console: ${consoleError}`);\n }\n }\n return result.outcome === ApplicationBrowserSmokeOutcome.PASSED\n ? { success: true }\n : { success: false, exitCode: result.outcome === ApplicationBrowserSmokeOutcome.COULD_NOT_ASK ? 2 : 1 };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"status.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local/status.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAO1F,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAIxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAwBtD,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,MAAM;CA4Bf"}
1
+ {"version":3,"file":"status.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local/status.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAO1F,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAIxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAwBtD,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,MAAM;CA4Bf"}
@@ -1 +1 @@
1
- {"version":3,"file":"status.command.js","sourceRoot":"","sources":["../../../../../../src/commands/local/status.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,KAAK,iBAAiB,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAErI,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IAChD,IAAI,GAAgB;QAC3B,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,4DAA4D;QACzE,QAAQ,EAAE,eAAe,CAAC,KAAK;KAChC,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GA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,KAAK,CAAC;QAC5E,MAAM,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,cAAc,CAAC;QAE5E,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,2CAA2C,SAAS,MAAM,CAAC,CAAC,CAAC;QAErF,QAAQ,CACN,sBAAsB,OAAO,iBAAiB,SAAS,UAAU,EACjE,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;QAEF,IAAI,oBAAoB,IAAI,aAAa,EAAE,CAAC;YAC1C,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAChD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC,CAAC;gBAC1D,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;oBACvB,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;oBAC3D,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC1F,CAAC;YACH,CAAC;QACH,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\n\nexport default class LocalStatusCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local status',\n description: 'Show local platform infrastructure and microservice status',\n category: CommandCategory.Local,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv;\n\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n try {\n if (env?.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return this.runK8s(ctx);\n }\n return this.runDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Failed to get status: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private runDockerCompose(ctx: CommandContext): CommandResult {\n const env = ctx.activeEnv!;\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n ctx.log.info(chalk.cyan('\\n Infrastructure status (Docker Compose):\\n'));\n DockerUtils.runDockerCompose(infraCtx, ['ps'], { inherit: true });\n\n if (isFrameworkDeveloper && frameworkPath) {\n const status = PlatformLifecycle.getStatus(env);\n if (status.length > 0) {\n ctx.log.info(chalk.cyan('\\n Platform microservices:\\n'));\n for (const s of status) {\n const icon = s.running ? chalk.green('✓') : chalk.red('✗');\n ctx.log.info(` ${icon} ${s.name} (pid ${s.pid}) ${s.running ? 'running' : 'stopped'}`);\n }\n }\n }\n\n ctx.log.info('');\n return { success: true };\n }\n\n private runK8s(ctx: CommandContext): CommandResult {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n ctx.log.info(chalk.cyan(`\\n Infrastructure status (Kubernetes — ${namespace}):\\n`));\n\n execSync(\n `kubectl --context=\"${context}\" get pods -n ${namespace} -o wide`,\n { stdio: 'inherit' },\n );\n\n if (isFrameworkDeveloper && frameworkPath) {\n const status = PlatformLifecycle.getStatus(env);\n if (status.length > 0) {\n ctx.log.info(chalk.cyan('\\n Platform microservices:\\n'));\n for (const s of status) {\n const icon = s.running ? chalk.green('✓') : chalk.red('✗');\n ctx.log.info(` ${icon} ${s.name} (pid ${s.pid}) ${s.running ? 'running' : 'stopped'}`);\n }\n }\n }\n\n ctx.log.info('');\n return { success: true };\n }\n}\n"]}
1
+ {"version":3,"file":"status.command.js","sourceRoot":"","sources":["../../../../src/commands/local/status.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,KAAK,iBAAiB,MAAM,2DAA2D,CAAC;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AAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC1F,CAAC;YACH,CAAC;QACH,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { K8S_LOCAL_DEFAULTS, KIND_CLUSTER_DEFAULTS, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\n\nexport default class LocalStatusCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local status',\n description: 'Show local platform infrastructure and microservice status',\n category: CommandCategory.Local,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv;\n\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n try {\n if (env?.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return this.runK8s(ctx);\n }\n return this.runDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Failed to get status: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private runDockerCompose(ctx: CommandContext): CommandResult {\n const env = ctx.activeEnv!;\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n ctx.log.info(chalk.cyan('\\n Infrastructure status (Docker Compose):\\n'));\n DockerUtils.runDockerCompose(infraCtx, ['ps'], { inherit: true });\n\n if (isFrameworkDeveloper && frameworkPath) {\n const status = PlatformLifecycle.getStatus(env);\n if (status.length > 0) {\n ctx.log.info(chalk.cyan('\\n Platform microservices:\\n'));\n for (const s of status) {\n const icon = s.running ? chalk.green('✓') : chalk.red('✗');\n ctx.log.info(` ${icon} ${s.name} (pid ${s.pid}) ${s.running ? 'running' : 'stopped'}`);\n }\n }\n }\n\n ctx.log.info('');\n return { success: true };\n }\n\n private runK8s(ctx: CommandContext): CommandResult {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n\n ctx.log.info(chalk.cyan(`\\n Infrastructure status (Kubernetes — ${namespace}):\\n`));\n\n execSync(\n `kubectl --context=\"${context}\" get pods -n ${namespace} -o wide`,\n { stdio: 'inherit' },\n );\n\n if (isFrameworkDeveloper && frameworkPath) {\n const status = PlatformLifecycle.getStatus(env);\n if (status.length > 0) {\n ctx.log.info(chalk.cyan('\\n Platform microservices:\\n'));\n for (const s of status) {\n const icon = s.running ? chalk.green('✓') : chalk.red('✗');\n ctx.log.info(` ${icon} ${s.name} (pid ${s.pid}) ${s.running ? 'running' : 'stopped'}`);\n }\n }\n }\n\n ctx.log.info('');\n return { success: true };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"up.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local/up.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAwH1F,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,QAAQ,CAAC,IAAI,EAAE,WAAW,CA6BxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAwCxC,UAAU;IAyDxB;;;;;;;;OAQG;YACW,8BAA8B;YA+B9B,oBAAoB;IAqDlC,OAAO,CAAC,UAAU;YAuCJ,gBAAgB;YAoFhB,MAAM;CAmGrB"}
1
+ {"version":3,"file":"up.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local/up.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAwH1F,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,QAAQ,CAAC,IAAI,EAAE,WAAW,CA6BxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAwCxC,UAAU;IAyDxB;;;;;;;;OAQG;YACW,8BAA8B;YA+B9B,oBAAoB;IAqDlC,OAAO,CAAC,UAAU;YAuCJ,gBAAgB;YAoFhB,MAAM;CAmGrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"up.command.js","sourceRoot":"","sources":["../../../../../../src/commands/local/up.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,WA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AC;QAED,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;QAE1D,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;QAClH,CAAC;QAED,IAAI,CAAC,SAAS,IAAI,4BAA4B,IAAI,aAAa,EAAE,CAAC;YAChE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,iDAAiD,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * local up — Start local backing infrastructure and prepare local runtime state.\n *\n * For framework developers, the CLI refreshes service env files but leaves\n * native platform microservices under manual control.\n *\n * IMPLEMENTATION: DONE — infra start via Docker/K8s plus framework-runtime prep.\n * Supports --infra-only, --rebuild (rebuild platform Docker images before starting).\n * Remote env not supported.\n */\n\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { join } from 'path';\nimport { existsSync } from 'fs';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport { ensureLocalDataServiceDirsForComposeRender, usesDockerVolumeLocalData } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { adoptHostLocalDataIntoVolumes, describeUnadoptedHostLocalData } from '~wildo-cli/services/deployment/docker/local-data-adoption.service';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { RuntimeBootstrap } from '~wildo-cli/services/environment/runtime-bootstrap.service';\nimport { K8sOperations } from '~wildo-cli/services/deployment/k8s/k8s-operations.service';\nimport { pruneLegacyLocalApplicationResources } from '~wildo-cli/services/deployment/k8s/local-k8s-application-pruning.service';\nimport { waitForLocalK8sInfraReady } from '~wildo-cli/services/deployment/k8s/k8s-local-infra-readiness.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { DEFAULT_PLATFORM_IMAGE_TAG, PLATFORM_IMAGE_NAME, buildLocalComposeConvergeArgs } from '~wildo-cli/services/environment/platform-runtime.schemas';\nimport {\n SharedPlatformAccess,\n SharedPlatformIntent,\n decideSharedPlatformAccess,\n} from '~wildo-cli/services/deployment/local-dev-session-lease.service';\nimport { PLATFORM_SERVICE_CATALOG, getDeployableInfraServicesForK8s } from '~wildo-cli/services/catalog/service-catalog.schemas';\nimport {\n getFrameworkDeveloperManualPlatformStartupMessage,\n shouldDeployPlatformServicesInRuntime,\n shouldRunPlatformServicesNatively,\n} from '~wildo-cli/services/deployment/platform-runtime-policy.service';\nimport {\n K8S_LOCAL_DEFAULTS,\n KIND_CLUSTER_DEFAULTS,\n WildoDeploymentRuntime,\n WildoLocationType,\n} from '@wildo-ai/platform-config-lib';\n\n/**\n * Slice 4 second-pass-3 review fix (MEDIUM-7) — surface the on-host\n * location of the backing-service data — the host tree or the named volumes — on every\n * `local up` so first-time operators understand WHERE persistence\n * actually lives. Same path is shared between Compose (direct bind\n * mount source) and K8s (Kind extraMount → `/mnt/local-data/`), so we\n * intentionally show the host path in both cases — it is what an\n * operator backs up, .gitignores, or wipes with `wildo local reset`.\n */\n/**\n * Say where this environment's backing-service data actually IS, and — when it is somewhere else —\n * say so before the stack comes up looking empty.\n *\n * Under `DOCKER_VOLUME` the `local_data/` path is not the answer, so printing it unconditionally\n * would point an operator at a directory nothing mounts. Worse, an environment that has just\n * switched modes still HAS its old data there while the stack reads empty volumes: nothing was\n * deleted, but it reads exactly like data loss, and the remedy is not guessable. Naming both, with\n * the command that adopts the old data, is the difference between a surprise and a choice.\n */\nfunction logLocalDataLocationHint(ctx: CommandContext, env: PlatformEnvironmentConfiguration): void {\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (!saasRoot) return;\n try {\n if (usesDockerVolumeLocalData(env)) {\n ctx.log.info(chalk.dim(' Local data: Docker volumes (`docker volume ls | grep wildo-local-data-`)'));\n } else {\n ctx.log.info(chalk.dim(` Local data: ${EnvironmentPaths.resolveScopedLocalDataDir(saasRoot)}`));\n }\n reportUnadoptedHostLocalData(ctx, env);\n } catch {\n /*\n * Best-effort, and the guard covers the PROBE as well as the path resolution.\n *\n * Both read the filesystem and the Docker daemon, so both can fail for reasons that have\n * nothing to do with whether the stack should start — and this whole function only ever prints.\n * An earlier revision called the probe after the catch, which turned a hint into something that\n * could fail `local up` outright. A notice must never be load-bearing.\n */\n }\n}\n\nfunction reportUnadoptedHostLocalData(ctx: CommandContext, env: PlatformEnvironmentConfiguration): void {\n const unadopted = describeUnadoptedHostLocalData(env);\n if (unadopted.length === 0) return;\n ctx.log.warn(\n chalk.yellow(\n `\\n ${unadopted.length} backing service(s) still hold data on the host that this environment no longer mounts:`,\n ),\n );\n for (const finding of unadopted) {\n ctx.log.warn(chalk.yellow(` - ${finding.service}: ${finding.hostPath}`));\n }\n ctx.log.warn(\n chalk.yellow(\n ' Nothing was deleted — this environment now keeps data in Docker volumes, and those start empty.\\n'\n + ' Run `wildo local down` then `wildo local up --adopt-host-data` to copy it across, or\\n'\n + ' `wildo local init` to provision a clean stack and leave the old data where it is.\\n',\n ),\n );\n}\n\n/**\n * Copy host data into the volumes, on explicit request.\n *\n * Gated on the flag AND on the stack being stopped by the caller, because copying a live Postgres\n * datadir into a volume the server has open corrupts it rather than moving it. Fail-closed: a\n * partial adoption that reported success would start and behave as though rows had vanished.\n */\nfunction adoptHostDataIfRequested(ctx: CommandContext, env: PlatformEnvironmentConfiguration): boolean {\n if (!ctx.flags['adopt-host-data']) return true;\n const findings = describeUnadoptedHostLocalData(env);\n if (findings.length === 0) {\n ctx.log.info(chalk.dim(' --adopt-host-data: nothing to adopt (no host data outside the volumes).'));\n return true;\n }\n ctx.log.info(chalk.cyan(`\\n Adopting ${findings.length} host data directory/ies into this environment's volumes...\\n`));\n try {\n adoptHostLocalDataIntoVolumes(findings, ctx.log);\n } catch (error) {\n ctx.log.error(`Failed to adopt host data into volumes: ${ErrorUtils.extractErrorMessage(error)}`);\n return false;\n }\n ctx.log.success(' Host data adopted.\\n');\n return true;\n}\n\nexport default class LocalUpCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local up',\n description: 'Start local platform infrastructure and microservices',\n category: CommandCategory.Local,\n flags: {\n 'infra-only': { type: 'boolean', description: 'Start only infrastructure, not platform microservices', default: false },\n rebuild: {\n type: 'boolean',\n description:\n 'Rebuild the platform Docker image from source, then force-recreate services. Without this flag the existing platform image is reused (containers are still started fresh).',\n default: false,\n },\n 'adopt-host-data': {\n type: 'boolean',\n description:\n 'Before starting, copy this application\\'s existing `local_data/<service>/` contents into the Docker '\n + 'volumes this environment now reads. Only for an environment that has just moved from host-path to '\n + 'volume storage, and only with the stack stopped — copying into a volume a running database has open '\n + 'corrupts it. Skips any service whose volume already holds data.',\n default: false,\n },\n 'accept-foreign-platform-owner': {\n type: 'boolean',\n description:\n 'Take the shared local platform from a running `wildo local dev` session that owns it. Its processes keep '\n + 'running against a substrate this app root defines — which is what re-homing means, so state it deliberately.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv;\n\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.CONVERGE_BACKING_SERVICES,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n\n const rebuild = ctx.flags.rebuild === true;\n if (rebuild) {\n const rebuildResult = await this.runRebuild(ctx);\n return rebuildResult;\n }\n\n try {\n if (env?.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return await this.runK8s(ctx);\n }\n return await this.runDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Failed to start services: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private async runRebuild(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const frameworkLayout = ctx.cliContext.resolvedHomes.framework.layout;\n if (!frameworkLayout) {\n ctx.log.error(\n 'No framework path configured. Re-run the CLI install script, or set `frameworkPath` in your machine preferences.',\n );\n return { success: false };\n }\n /*\n * `--rebuild` compiles the platform image FROM SOURCE, so it needs the engine — a framework\n * checkout. An npm-installed CLI resolves a framework-assets root (templates, marker) that has\n * the Dockerfile but no `engine/` to build, and the failure would surface deep inside `docker\n * build` as a missing COPY path. Refuse here, naming the lane that applies: app-creator mode\n * pulls the published `docker.io/wildoai/wildo-platform:<version>` image on plain `local up`.\n */\n if (!ctx.cliContext.hasFrameworkWorkspace && !(ctx.preferences?.isFrameworkDeveloper ?? false)) {\n ctx.log.error(\n '`--rebuild` builds the platform image from the framework source and needs a framework checkout. '\n + 'This CLI is not running from one: run `wildo local up` without `--rebuild` to use the published '\n + 'platform image for this framework version.',\n );\n return { success: false };\n }\n\n try {\n const imageTag = `${PLATFORM_IMAGE_NAME}:${DEFAULT_PLATFORM_IMAGE_TAG}`;\n const platformDockerfilePath = frameworkLayout.platformBaseDockerfilePath;\n\n if (!existsSync(platformDockerfilePath)) {\n ctx.log.error(`Platform Dockerfile not found at ${platformDockerfilePath}.`);\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan('\\n Rebuilding platform Docker image...\\n'));\n\n // Host-native build, deliberately without `--platform`: this image is for the daemon on\n // THIS machine. The published image is the multi-platform one\n // (`FRAMEWORK_DOCKER_IMAGE_PLATFORMS`, `wildo fwk publish docker`); forcing amd64 here put\n // every Apple Silicon developer under emulation for no reason.\n execSync(\n `docker build -f \"${platformDockerfilePath}\" -t ${imageTag} \"${frameworkLayout.repositoryRoot}\"`,\n { cwd: frameworkLayout.repositoryRoot, stdio: 'inherit' },\n );\n\n ctx.log.success(' Platform image rebuilt.\\n');\n\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return this.restartK8s(ctx, imageTag);\n }\n return await this.restartDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Rebuild failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n /**\n * Self-healing pre-flight (Fix P/R/S/T) — must run BEFORE\n * `ContextManager.resolveInfraContext` because that helper fail-loud-checks\n * the rendered docker-compose file, which the bootstrap may have to\n * render here from the authored infra descriptor. See\n * `runtime-bootstrap.service.ts` header for the full rationale. Returns\n * `true` on success, `false` on a logged failure (so callers can short-\n * circuit with `success: false`).\n */\n private async bootstrapLocalRuntimeArtifacts(\n ctx: CommandContext,\n env: NonNullable<CommandContext['activeEnv']>,\n frameworkPath: string | null,\n isFrameworkDeveloper: boolean,\n ): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n // No targeted app — skip the preflight and let `resolveInfraContext`\n // surface its own \"missing artifact\" error downstream. The preflight\n // exists to self-heal on behalf of an authored app; without one,\n // there is no authored infra descriptor to project.\n return true;\n }\n try {\n await RuntimeBootstrap.ensureLocalRuntimeArtifacts({\n env,\n saasRoot,\n frameworkPath,\n isFrameworkDeveloper,\n log: ctx.log,\n });\n return true;\n } catch (err) {\n ctx.log.error(\n `Failed to bootstrap local runtime artifacts: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return false;\n }\n }\n\n private async restartDockerCompose(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n ctx.log.info(chalk.cyan(' Restarting services (Docker Compose)...\\n'));\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n // Slice 4 second-pass-3 review fix (LOW-4) — same dedicated error frame\n // as `runDockerCompose` so an ensure-local-data failure surfaces with\n // its own label rather than being interleaved with `docker compose up`\n // output.\n if (!adoptHostDataIfRequested(ctx, env)) return { success: false };\n try {\n ensureLocalDataServiceDirsForComposeRender(env);\n } catch (err) {\n ctx.log.error(\n `Failed to pre-create local_data directories before docker compose up --force-recreate: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return { success: false };\n }\n logLocalDataLocationHint(ctx, env);\n /*\n * DISRUPT, not CONVERGE (#1126): `--force-recreate` replaces the shared containers whether or not\n * they are already running, so there is no state in which attaching is an option. Under a foreign\n * owner this is the 2026-08-25 incident verbatim — a live session's substrate swapped out beneath it.\n */\n const restartAccess = decideSharedPlatformAccess({\n frameworkRoot: ctx.cliContext.resolvedHomes.framework.repositoryRoot,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.DISRUPT,\n infraRunning: true,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (restartAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${restartAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to take it anyway.');\n return { success: false };\n }\n if (restartAccess.message) ctx.log.warn(` ${restartAccess.message}`);\n // `--remove-orphans`: every application renders its compose under the same\n // project name (`wildo-local`) over its OWN backing-service data (its own\n // `local_data/` tree, or its own per-application data volumes), so a\n // converge that touches only THIS app's services leaves the previous app's\n // extras running on the previous app's data. See the full rationale on\n // `DockerComposeReadinessService.startAndWait`.\n DockerUtils.runDockerCompose(infraCtx, buildLocalComposeConvergeArgs('--force-recreate'), { inherit: true });\n ctx.log.success('\\n Services restarted.\\n');\n return { success: true };\n }\n\n private restartK8s(ctx: CommandContext, imageTag: string): CommandResult {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const includePlatformServices = shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper);\n\n const cleanupResult = pruneLegacyLocalApplicationResources(namespace, context);\n if (!cleanupResult.success) {\n ctx.log.error(cleanupResult.error ?? 'Failed to remove retired local application resources.');\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(' Loading image into Kind cluster...\\n'));\n execSync(\n `kind load docker-image ${imageTag} --name ${KIND_CLUSTER_DEFAULTS.CLUSTER_NAME}`,\n { stdio: 'inherit' },\n );\n\n if (includePlatformServices) {\n const platformDeployments = Object.values(PLATFORM_SERVICE_CATALOG)\n .map(service => service.containerName)\n .join(' ');\n\n ctx.log.info(chalk.cyan(' Rolling restart of platform deployments...\\n'));\n execSync(\n `kubectl --context=\"${context}\" -n ${namespace} rollout restart deployment ${platformDeployments}`,\n { stdio: 'inherit' },\n );\n } else {\n ctx.log.info(\n chalk.dim(' Skipping in-cluster rollout restart because platform services run outside the local K8s runtime.\\n'),\n );\n }\n\n ctx.log.success('\\n Services restarted.\\n');\n return { success: true };\n }\n\n private async runDockerCompose(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const infraOnly = ctx.flags.infraOnly === true || ctx.flags['infra-only'] === true;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const runsPlatformServicesNatively = shouldRunPlatformServicesNatively(env, isFrameworkDeveloper);\n\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n\n if (runsPlatformServicesNatively && frameworkPath) {\n try {\n PlatformLifecycle.prepareFrameworkDeveloperPlatformRuntime(env, frameworkPath, ctx.log);\n } catch (error) {\n ctx.log.error(\n `Failed to refresh framework platform env files: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n\n // Slice 4 second-pass-3 review fix (LOW-4) — frame ensure-local-data\n // failures with their own clear error label so operators can tell at a\n // glance whether the failure was the bind-source pre-create step or\n // `docker compose up` itself.\n if (!adoptHostDataIfRequested(ctx, env)) return { success: false };\n try {\n ensureLocalDataServiceDirsForComposeRender(env);\n } catch (err) {\n ctx.log.error(\n `Failed to pre-create local_data directories before docker compose up: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return { success: false };\n }\n logLocalDataLocationHint(ctx, env);\n\n /*\n * CONVERGE under a foreign owner is an ATTACH, never a re-home (#1126). `wildo local up` means\n * \"make the shared stack run\", and under a live owner whose containers are up it already does —\n * so the honest answer is to say whose it is and change nothing. Converging would recreate every\n * shared container under THIS app's config and reap the owner's extras as orphans, which is how a\n * running `wildo local dev` lost postgresql/clamav/immudb/otel-collector and then failed to boot.\n */\n let infraRunning = false;\n try {\n infraRunning = DockerUtils.runDockerCompose(infraCtx, ['ps', '-q']).trim().length > 0;\n } catch {\n infraRunning = false;\n }\n const platformAccess = decideSharedPlatformAccess({\n frameworkRoot: frameworkPath,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.CONVERGE,\n infraRunning,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (platformAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${platformAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to take it anyway.');\n return { success: false };\n }\n if (platformAccess.access === SharedPlatformAccess.ATTACH) {\n ctx.log.info(chalk.cyan(`\\n ${platformAccess.message}\\n`));\n return { success: true };\n }\n if (platformAccess.message) ctx.log.warn(` ${platformAccess.message}`);\n\n ctx.log.info(chalk.cyan('\\n Starting infrastructure services (Docker Compose)...\\n'));\n // `--remove-orphans` — see the rationale on `DockerComposeReadinessService.startAndWait`:\n // one shared project name across every application, per-application data dirs.\n DockerUtils.runDockerCompose(infraCtx, buildLocalComposeConvergeArgs(), { inherit: true });\n ctx.log.success('\\n Infrastructure services started.\\n');\n\n if (!infraOnly && runsPlatformServicesNatively && frameworkPath) {\n ctx.log.info(`\\n${getFrameworkDeveloperManualPlatformStartupMessage(frameworkPath)}`);\n }\n\n return { success: true };\n }\n\n private async runK8s(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const manifestsBase = join(EnvironmentPaths.resolveInfraDir(env.name), 'manifests');\n const infraOnly = ctx.flags.infraOnly === true || ctx.flags['infra-only'] === true;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const includePlatformServices = shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper);\n const runsPlatformServicesNatively = shouldRunPlatformServicesNatively(env, isFrameworkDeveloper);\n\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n\n if (runsPlatformServicesNatively && frameworkPath) {\n try {\n PlatformLifecycle.prepareFrameworkDeveloperPlatformRuntime(env, frameworkPath, ctx.log);\n } catch (error) {\n ctx.log.error(\n `Failed to refresh framework platform env files: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n\n if (!existsSync(manifestsBase)) {\n ctx.log.error(`K8s manifests not found at ${manifestsBase}. Run 'wildo config sync' to generate them.`);\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(`\\n Starting infrastructure services (Kubernetes — ${namespace})...\\n`));\n logLocalDataLocationHint(ctx, env);\n\n const cleanupResult = pruneLegacyLocalApplicationResources(namespace, context);\n if (!cleanupResult.success) {\n ctx.log.error(cleanupResult.error ?? 'Failed to remove retired local application resources.');\n return { success: false };\n }\n\n // Slice 4 second-pass-3 review fix (MEDIUM-3) — defensive Job delete\n // before re-apply (same rationale as `phaseInfraDeploy` and\n // `dev/start.command.ts`). K8s Jobs are effectively immutable, so a\n // future template edit to `mongodb-init` would otherwise wedge\n // `kubectl apply` with `field is immutable`.\n const deployable = getDeployableInfraServicesForK8s(env);\n if (deployable.includes('mongodb')) {\n const jobDeleteResult = K8sOperations.kubectlDeleteJob('mongodb-init', namespace, context);\n if (!jobDeleteResult.success) {\n ctx.log.warn(\n ` Warning: failed to clear previous mongodb-init Job before re-apply: ${jobDeleteResult.error}`,\n );\n }\n }\n\n // Local Kind keeps app development on the host machine, so never replay a\n // stale in-cluster application manifest directory here.\n const dirs = [\n 'cluster',\n 'storage',\n 'internal',\n ...(includePlatformServices ? ['platform'] : []),\n ];\n for (const dir of dirs) {\n const dirPath = join(manifestsBase, dir);\n if (!existsSync(dirPath)) continue;\n const result = K8sOperations.kubectlApply(dirPath, { namespace, context });\n if (!result.success) {\n ctx.log.error(`Failed to apply ${dir}: ${result.error}`);\n return { success: false };\n }\n ctx.log.info(` ${chalk.green('✓')} ${dir} applied`);\n }\n\n // Slice 4 second-pass-3 review fix (MEDIUM-1) — wait for rollouts and\n // the `mongodb-init` Job here too. `wildo local up` previously\n // returned success the moment apply returned, so any operator who\n // ran `wildo local up && wildo dev start` immediately would race the\n // dev script against still-warming infra. Sharing the helper means\n // all four bring-up seams (`bootstrap`, `dev start`, `local up`,\n // `local reinit`) have the same readiness contract.\n const ready = await waitForLocalK8sInfraReady(env, namespace, ctx.log, context);\n if (!ready) {\n return { success: false };\n }\n\n ctx.log.success('\\n Infrastructure services started.\\n');\n\n if (!includePlatformServices) {\n ctx.log.info(' Platform manifests skipped because local framework developers run platform services natively.');\n }\n\n if (!infraOnly && runsPlatformServicesNatively && frameworkPath) {\n ctx.log.info(`\\n${getFrameworkDeveloperManualPlatformStartupMessage(frameworkPath)}`);\n }\n\n return { success: true };\n }\n}\n"]}
1
+ {"version":3,"file":"up.command.js","sourceRoot":"","sources":["../../../../src/commands/local/up.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAC7H,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EAAE,0CAA0C,EAAE,yBAAyB,EAAE,MAAM,wEAAwE,CAAC;AAC/J,OAAO,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,MAAM,mEAAmE,CAAC;AAElJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EA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AE,OAAO,EAAE,CAAC,CAAC;YAC3E,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,GAAG,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAC5B,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,sEAAsE;QACtE,+DAA+D;QAC/D,kEAAkE;QAClE,qEAAqE;QACrE,mEAAmE;QACnE,iEAAiE;QACjE,oDAAoD;QACpD,MAAM,KAAK,GAAG,MAAM,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAChF,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;QAE1D,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;QAClH,CAAC;QAED,IAAI,CAAC,SAAS,IAAI,4BAA4B,IAAI,aAAa,EAAE,CAAC;YAChE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,iDAAiD,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * local up — Start local backing infrastructure and prepare local runtime state.\n *\n * For framework developers, the CLI refreshes service env files but leaves\n * native platform microservices under manual control.\n *\n * IMPLEMENTATION: DONE — infra start via Docker/K8s plus framework-runtime prep.\n * Supports --infra-only, --rebuild (rebuild platform Docker images before starting).\n * Remote env not supported.\n */\n\nimport chalk from 'chalk';\nimport { execSync } from 'child_process';\nimport { join } from 'path';\nimport { existsSync } from 'fs';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { InfrastructureHost, SharedInfrastructureAction } from '~wildo-cli/services/environment/infrastructure-host.service';\nimport { ContextManager } from '~wildo-cli/services/context/context-manager.service';\nimport { DockerUtils } from '~wildo-cli/services/deployment/docker/docker.service';\nimport { ensureLocalDataServiceDirsForComposeRender, usesDockerVolumeLocalData } from '~wildo-cli/services/deployment/docker/docker-compose-generator.service';\nimport { adoptHostLocalDataIntoVolumes, describeUnadoptedHostLocalData } from '~wildo-cli/services/deployment/docker/local-data-adoption.service';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { RuntimeBootstrap } from '~wildo-cli/services/environment/runtime-bootstrap.service';\nimport { K8sOperations } from '~wildo-cli/services/deployment/k8s/k8s-operations.service';\nimport { pruneLegacyLocalApplicationResources } from '~wildo-cli/services/deployment/k8s/local-k8s-application-pruning.service';\nimport { waitForLocalK8sInfraReady } from '~wildo-cli/services/deployment/k8s/k8s-local-infra-readiness.service';\nimport * as PlatformLifecycle from '~wildo-cli/services/deployment/platform-lifecycle.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { DEFAULT_PLATFORM_IMAGE_TAG, PLATFORM_IMAGE_NAME, buildLocalComposeConvergeArgs } from '~wildo-cli/services/environment/platform-runtime.schemas';\nimport {\n SharedPlatformAccess,\n SharedPlatformIntent,\n decideSharedPlatformAccess,\n} from '~wildo-cli/services/deployment/local-dev-session-lease.service';\nimport { PLATFORM_SERVICE_CATALOG, getDeployableInfraServicesForK8s } from '~wildo-cli/services/catalog/service-catalog.schemas';\nimport {\n getFrameworkDeveloperManualPlatformStartupMessage,\n shouldDeployPlatformServicesInRuntime,\n shouldRunPlatformServicesNatively,\n} from '~wildo-cli/services/deployment/platform-runtime-policy.service';\nimport {\n K8S_LOCAL_DEFAULTS,\n KIND_CLUSTER_DEFAULTS,\n WildoDeploymentRuntime,\n WildoLocationType,\n} from '@wildo-ai/platform-config-lib';\n\n/**\n * Slice 4 second-pass-3 review fix (MEDIUM-7) — surface the on-host\n * location of the backing-service data — the host tree or the named volumes — on every\n * `local up` so first-time operators understand WHERE persistence\n * actually lives. Same path is shared between Compose (direct bind\n * mount source) and K8s (Kind extraMount → `/mnt/local-data/`), so we\n * intentionally show the host path in both cases — it is what an\n * operator backs up, .gitignores, or wipes with `wildo local reset`.\n */\n/**\n * Say where this environment's backing-service data actually IS, and — when it is somewhere else —\n * say so before the stack comes up looking empty.\n *\n * Under `DOCKER_VOLUME` the `local_data/` path is not the answer, so printing it unconditionally\n * would point an operator at a directory nothing mounts. Worse, an environment that has just\n * switched modes still HAS its old data there while the stack reads empty volumes: nothing was\n * deleted, but it reads exactly like data loss, and the remedy is not guessable. Naming both, with\n * the command that adopts the old data, is the difference between a surprise and a choice.\n */\nfunction logLocalDataLocationHint(ctx: CommandContext, env: PlatformEnvironmentConfiguration): void {\n const saasRoot = EnvironmentRegistry.getSaasRoot();\n if (!saasRoot) return;\n try {\n if (usesDockerVolumeLocalData(env)) {\n ctx.log.info(chalk.dim(' Local data: Docker volumes (`docker volume ls | grep wildo-local-data-`)'));\n } else {\n ctx.log.info(chalk.dim(` Local data: ${EnvironmentPaths.resolveScopedLocalDataDir(saasRoot)}`));\n }\n reportUnadoptedHostLocalData(ctx, env);\n } catch {\n /*\n * Best-effort, and the guard covers the PROBE as well as the path resolution.\n *\n * Both read the filesystem and the Docker daemon, so both can fail for reasons that have\n * nothing to do with whether the stack should start — and this whole function only ever prints.\n * An earlier revision called the probe after the catch, which turned a hint into something that\n * could fail `local up` outright. A notice must never be load-bearing.\n */\n }\n}\n\nfunction reportUnadoptedHostLocalData(ctx: CommandContext, env: PlatformEnvironmentConfiguration): void {\n const unadopted = describeUnadoptedHostLocalData(env);\n if (unadopted.length === 0) return;\n ctx.log.warn(\n chalk.yellow(\n `\\n ${unadopted.length} backing service(s) still hold data on the host that this environment no longer mounts:`,\n ),\n );\n for (const finding of unadopted) {\n ctx.log.warn(chalk.yellow(` - ${finding.service}: ${finding.hostPath}`));\n }\n ctx.log.warn(\n chalk.yellow(\n ' Nothing was deleted — this environment now keeps data in Docker volumes, and those start empty.\\n'\n + ' Run `wildo local down` then `wildo local up --adopt-host-data` to copy it across, or\\n'\n + ' `wildo local init` to provision a clean stack and leave the old data where it is.\\n',\n ),\n );\n}\n\n/**\n * Copy host data into the volumes, on explicit request.\n *\n * Gated on the flag AND on the stack being stopped by the caller, because copying a live Postgres\n * datadir into a volume the server has open corrupts it rather than moving it. Fail-closed: a\n * partial adoption that reported success would start and behave as though rows had vanished.\n */\nfunction adoptHostDataIfRequested(ctx: CommandContext, env: PlatformEnvironmentConfiguration): boolean {\n if (!ctx.flags['adopt-host-data']) return true;\n const findings = describeUnadoptedHostLocalData(env);\n if (findings.length === 0) {\n ctx.log.info(chalk.dim(' --adopt-host-data: nothing to adopt (no host data outside the volumes).'));\n return true;\n }\n ctx.log.info(chalk.cyan(`\\n Adopting ${findings.length} host data directory/ies into this environment's volumes...\\n`));\n try {\n adoptHostLocalDataIntoVolumes(findings, ctx.log);\n } catch (error) {\n ctx.log.error(`Failed to adopt host data into volumes: ${ErrorUtils.extractErrorMessage(error)}`);\n return false;\n }\n ctx.log.success(' Host data adopted.\\n');\n return true;\n}\n\nexport default class LocalUpCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local up',\n description: 'Start local platform infrastructure and microservices',\n category: CommandCategory.Local,\n flags: {\n 'infra-only': { type: 'boolean', description: 'Start only infrastructure, not platform microservices', default: false },\n rebuild: {\n type: 'boolean',\n description:\n 'Rebuild the platform Docker image from source, then force-recreate services. Without this flag the existing platform image is reused (containers are still started fresh).',\n default: false,\n },\n 'adopt-host-data': {\n type: 'boolean',\n description:\n 'Before starting, copy this application\\'s existing `local_data/<service>/` contents into the Docker '\n + 'volumes this environment now reads. Only for an environment that has just moved from host-path to '\n + 'volume storage, and only with the stack stopped — copying into a volume a running database has open '\n + 'corrupts it. Skips any service whose volume already holds data.',\n default: false,\n },\n 'accept-foreign-platform-owner': {\n type: 'boolean',\n description:\n 'Take the shared local platform from a running `wildo local dev` session that owns it. Its processes keep '\n + 'running against a substrate this app root defines — which is what re-homing means, so state it deliberately.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv;\n\n if (!env) {\n ctx.log.error('No active environment. Run `wildo init` first.');\n return { success: false };\n }\n\n if (env.locationType === WildoLocationType.REMOTE) {\n ctx.log.error('Remote environment operations are not yet supported. Local environments only.');\n return { success: false };\n }\n\n const hostedRefusal = await InfrastructureHost.describeRefusal(\n ctx.cliContext.resolvedHomes.app.declarationRoot,\n env,\n SharedInfrastructureAction.CONVERGE_BACKING_SERVICES,\n );\n if (hostedRefusal !== null) {\n ctx.log.error(hostedRefusal);\n return { success: false };\n }\n\n const rebuild = ctx.flags.rebuild === true;\n if (rebuild) {\n const rebuildResult = await this.runRebuild(ctx);\n return rebuildResult;\n }\n\n try {\n if (env?.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return await this.runK8s(ctx);\n }\n return await this.runDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Failed to start services: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private async runRebuild(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const frameworkLayout = ctx.cliContext.resolvedHomes.framework.layout;\n if (!frameworkLayout) {\n ctx.log.error(\n 'No framework path configured. Re-run the CLI install script, or set `frameworkPath` in your machine preferences.',\n );\n return { success: false };\n }\n /*\n * `--rebuild` compiles the platform image FROM SOURCE, so it needs the engine — a framework\n * checkout. An npm-installed CLI resolves a framework-assets root (templates, marker) that has\n * the Dockerfile but no `engine/` to build, and the failure would surface deep inside `docker\n * build` as a missing COPY path. Refuse here, naming the lane that applies: app-creator mode\n * pulls the published `docker.io/wildoai/wildo-platform:<version>` image on plain `local up`.\n */\n if (!ctx.cliContext.hasFrameworkWorkspace && !(ctx.preferences?.isFrameworkDeveloper ?? false)) {\n ctx.log.error(\n '`--rebuild` builds the platform image from the framework source and needs a framework checkout. '\n + 'This CLI is not running from one: run `wildo local up` without `--rebuild` to use the published '\n + 'platform image for this framework version.',\n );\n return { success: false };\n }\n\n try {\n const imageTag = `${PLATFORM_IMAGE_NAME}:${DEFAULT_PLATFORM_IMAGE_TAG}`;\n const platformDockerfilePath = frameworkLayout.platformBaseDockerfilePath;\n\n if (!existsSync(platformDockerfilePath)) {\n ctx.log.error(`Platform Dockerfile not found at ${platformDockerfilePath}.`);\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan('\\n Rebuilding platform Docker image...\\n'));\n\n // Host-native build, deliberately without `--platform`: this image is for the daemon on\n // THIS machine. The published image is the multi-platform one\n // (`FRAMEWORK_DOCKER_IMAGE_PLATFORMS`, `wildo fwk publish docker`); forcing amd64 here put\n // every Apple Silicon developer under emulation for no reason.\n execSync(\n `docker build -f \"${platformDockerfilePath}\" -t ${imageTag} \"${frameworkLayout.repositoryRoot}\"`,\n { cwd: frameworkLayout.repositoryRoot, stdio: 'inherit' },\n );\n\n ctx.log.success(' Platform image rebuilt.\\n');\n\n if (env.runtime === WildoDeploymentRuntime.KUBERNETES) {\n return this.restartK8s(ctx, imageTag);\n }\n return await this.restartDockerCompose(ctx);\n } catch (error) {\n ctx.log.error(`Rebuild failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n /**\n * Self-healing pre-flight (Fix P/R/S/T) — must run BEFORE\n * `ContextManager.resolveInfraContext` because that helper fail-loud-checks\n * the rendered docker-compose file, which the bootstrap may have to\n * render here from the authored infra descriptor. See\n * `runtime-bootstrap.service.ts` header for the full rationale. Returns\n * `true` on success, `false` on a logged failure (so callers can short-\n * circuit with `success: false`).\n */\n private async bootstrapLocalRuntimeArtifacts(\n ctx: CommandContext,\n env: NonNullable<CommandContext['activeEnv']>,\n frameworkPath: string | null,\n isFrameworkDeveloper: boolean,\n ): Promise<boolean> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n // No targeted app — skip the preflight and let `resolveInfraContext`\n // surface its own \"missing artifact\" error downstream. The preflight\n // exists to self-heal on behalf of an authored app; without one,\n // there is no authored infra descriptor to project.\n return true;\n }\n try {\n await RuntimeBootstrap.ensureLocalRuntimeArtifacts({\n env,\n saasRoot,\n frameworkPath,\n isFrameworkDeveloper,\n log: ctx.log,\n });\n return true;\n } catch (err) {\n ctx.log.error(\n `Failed to bootstrap local runtime artifacts: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return false;\n }\n }\n\n private async restartDockerCompose(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n ctx.log.info(chalk.cyan(' Restarting services (Docker Compose)...\\n'));\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n // Slice 4 second-pass-3 review fix (LOW-4) — same dedicated error frame\n // as `runDockerCompose` so an ensure-local-data failure surfaces with\n // its own label rather than being interleaved with `docker compose up`\n // output.\n if (!adoptHostDataIfRequested(ctx, env)) return { success: false };\n try {\n ensureLocalDataServiceDirsForComposeRender(env);\n } catch (err) {\n ctx.log.error(\n `Failed to pre-create local_data directories before docker compose up --force-recreate: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return { success: false };\n }\n logLocalDataLocationHint(ctx, env);\n /*\n * DISRUPT, not CONVERGE (#1126): `--force-recreate` replaces the shared containers whether or not\n * they are already running, so there is no state in which attaching is an option. Under a foreign\n * owner this is the 2026-08-25 incident verbatim — a live session's substrate swapped out beneath it.\n */\n const restartAccess = decideSharedPlatformAccess({\n frameworkRoot: ctx.cliContext.resolvedHomes.framework.repositoryRoot,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.DISRUPT,\n infraRunning: true,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (restartAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${restartAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to take it anyway.');\n return { success: false };\n }\n if (restartAccess.message) ctx.log.warn(` ${restartAccess.message}`);\n // `--remove-orphans`: every application renders its compose under the same\n // project name (`wildo-local`) over its OWN backing-service data (its own\n // `local_data/` tree, or its own per-application data volumes), so a\n // converge that touches only THIS app's services leaves the previous app's\n // extras running on the previous app's data. See the full rationale on\n // `DockerComposeReadinessService.startAndWait`.\n DockerUtils.runDockerCompose(infraCtx, buildLocalComposeConvergeArgs('--force-recreate'), { inherit: true });\n ctx.log.success('\\n Services restarted.\\n');\n return { success: true };\n }\n\n private restartK8s(ctx: CommandContext, imageTag: string): CommandResult {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const includePlatformServices = shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper);\n\n const cleanupResult = pruneLegacyLocalApplicationResources(namespace, context);\n if (!cleanupResult.success) {\n ctx.log.error(cleanupResult.error ?? 'Failed to remove retired local application resources.');\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(' Loading image into Kind cluster...\\n'));\n execSync(\n `kind load docker-image ${imageTag} --name ${KIND_CLUSTER_DEFAULTS.CLUSTER_NAME}`,\n { stdio: 'inherit' },\n );\n\n if (includePlatformServices) {\n const platformDeployments = Object.values(PLATFORM_SERVICE_CATALOG)\n .map(service => service.containerName)\n .join(' ');\n\n ctx.log.info(chalk.cyan(' Rolling restart of platform deployments...\\n'));\n execSync(\n `kubectl --context=\"${context}\" -n ${namespace} rollout restart deployment ${platformDeployments}`,\n { stdio: 'inherit' },\n );\n } else {\n ctx.log.info(\n chalk.dim(' Skipping in-cluster rollout restart because platform services run outside the local K8s runtime.\\n'),\n );\n }\n\n ctx.log.success('\\n Services restarted.\\n');\n return { success: true };\n }\n\n private async runDockerCompose(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const infraOnly = ctx.flags.infraOnly === true || ctx.flags['infra-only'] === true;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const runsPlatformServicesNatively = shouldRunPlatformServicesNatively(env, isFrameworkDeveloper);\n\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n\n const infraCtx = ContextManager.resolveInfraContext(env.name);\n\n if (runsPlatformServicesNatively && frameworkPath) {\n try {\n PlatformLifecycle.prepareFrameworkDeveloperPlatformRuntime(env, frameworkPath, ctx.log);\n } catch (error) {\n ctx.log.error(\n `Failed to refresh framework platform env files: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n\n // Slice 4 second-pass-3 review fix (LOW-4) — frame ensure-local-data\n // failures with their own clear error label so operators can tell at a\n // glance whether the failure was the bind-source pre-create step or\n // `docker compose up` itself.\n if (!adoptHostDataIfRequested(ctx, env)) return { success: false };\n try {\n ensureLocalDataServiceDirsForComposeRender(env);\n } catch (err) {\n ctx.log.error(\n `Failed to pre-create local_data directories before docker compose up: ${ErrorUtils.extractErrorMessage(err)}`,\n );\n return { success: false };\n }\n logLocalDataLocationHint(ctx, env);\n\n /*\n * CONVERGE under a foreign owner is an ATTACH, never a re-home (#1126). `wildo local up` means\n * \"make the shared stack run\", and under a live owner whose containers are up it already does —\n * so the honest answer is to say whose it is and change nothing. Converging would recreate every\n * shared container under THIS app's config and reap the owner's extras as orphans, which is how a\n * running `wildo local dev` lost postgresql/clamav/immudb/otel-collector and then failed to boot.\n */\n let infraRunning = false;\n try {\n infraRunning = DockerUtils.runDockerCompose(infraCtx, ['ps', '-q']).trim().length > 0;\n } catch {\n infraRunning = false;\n }\n const platformAccess = decideSharedPlatformAccess({\n frameworkRoot: frameworkPath,\n saasRoot: ctx.cliContext.resolvedHomes.app.declarationRoot ?? process.cwd(),\n intent: SharedPlatformIntent.CONVERGE,\n infraRunning,\n acknowledgedForeignOwner: ctx.flags['accept-foreign-platform-owner'] === true,\n });\n if (platformAccess.access === SharedPlatformAccess.REFUSE) {\n ctx.log.error(` ${platformAccess.message}`);\n ctx.log.info(' Pass `--accept-foreign-platform-owner` to take it anyway.');\n return { success: false };\n }\n if (platformAccess.access === SharedPlatformAccess.ATTACH) {\n ctx.log.info(chalk.cyan(`\\n ${platformAccess.message}\\n`));\n return { success: true };\n }\n if (platformAccess.message) ctx.log.warn(` ${platformAccess.message}`);\n\n ctx.log.info(chalk.cyan('\\n Starting infrastructure services (Docker Compose)...\\n'));\n // `--remove-orphans` — see the rationale on `DockerComposeReadinessService.startAndWait`:\n // one shared project name across every application, per-application data dirs.\n DockerUtils.runDockerCompose(infraCtx, buildLocalComposeConvergeArgs(), { inherit: true });\n ctx.log.success('\\n Infrastructure services started.\\n');\n\n if (!infraOnly && runsPlatformServicesNatively && frameworkPath) {\n ctx.log.info(`\\n${getFrameworkDeveloperManualPlatformStartupMessage(frameworkPath)}`);\n }\n\n return { success: true };\n }\n\n private async runK8s(ctx: CommandContext): Promise<CommandResult> {\n const env = ctx.activeEnv!;\n const namespace = env.kubernetes?.namespace ?? K8S_LOCAL_DEFAULTS.NAMESPACE;\n const context = KIND_CLUSTER_DEFAULTS.KUBECTL_CONTEXT;\n const manifestsBase = join(EnvironmentPaths.resolveInfraDir(env.name), 'manifests');\n const infraOnly = ctx.flags.infraOnly === true || ctx.flags['infra-only'] === true;\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n const includePlatformServices = shouldDeployPlatformServicesInRuntime(env, isFrameworkDeveloper);\n const runsPlatformServicesNatively = shouldRunPlatformServicesNatively(env, isFrameworkDeveloper);\n\n const bootstrapped = await this.bootstrapLocalRuntimeArtifacts(ctx, env, frameworkPath, isFrameworkDeveloper);\n if (!bootstrapped) {\n return { success: false };\n }\n\n if (runsPlatformServicesNatively && frameworkPath) {\n try {\n PlatformLifecycle.prepareFrameworkDeveloperPlatformRuntime(env, frameworkPath, ctx.log);\n } catch (error) {\n ctx.log.error(\n `Failed to refresh framework platform env files: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n return { success: false };\n }\n }\n\n if (!existsSync(manifestsBase)) {\n ctx.log.error(`K8s manifests not found at ${manifestsBase}. Run 'wildo config sync' to generate them.`);\n return { success: false };\n }\n\n ctx.log.info(chalk.cyan(`\\n Starting infrastructure services (Kubernetes — ${namespace})...\\n`));\n logLocalDataLocationHint(ctx, env);\n\n const cleanupResult = pruneLegacyLocalApplicationResources(namespace, context);\n if (!cleanupResult.success) {\n ctx.log.error(cleanupResult.error ?? 'Failed to remove retired local application resources.');\n return { success: false };\n }\n\n // Slice 4 second-pass-3 review fix (MEDIUM-3) — defensive Job delete\n // before re-apply (same rationale as `phaseInfraDeploy` and\n // `dev/start.command.ts`). K8s Jobs are effectively immutable, so a\n // future template edit to `mongodb-init` would otherwise wedge\n // `kubectl apply` with `field is immutable`.\n const deployable = getDeployableInfraServicesForK8s(env);\n if (deployable.includes('mongodb')) {\n const jobDeleteResult = K8sOperations.kubectlDeleteJob('mongodb-init', namespace, context);\n if (!jobDeleteResult.success) {\n ctx.log.warn(\n ` Warning: failed to clear previous mongodb-init Job before re-apply: ${jobDeleteResult.error}`,\n );\n }\n }\n\n // Local Kind keeps app development on the host machine, so never replay a\n // stale in-cluster application manifest directory here.\n const dirs = [\n 'cluster',\n 'storage',\n 'internal',\n ...(includePlatformServices ? ['platform'] : []),\n ];\n for (const dir of dirs) {\n const dirPath = join(manifestsBase, dir);\n if (!existsSync(dirPath)) continue;\n const result = K8sOperations.kubectlApply(dirPath, { namespace, context });\n if (!result.success) {\n ctx.log.error(`Failed to apply ${dir}: ${result.error}`);\n return { success: false };\n }\n ctx.log.info(` ${chalk.green('✓')} ${dir} applied`);\n }\n\n // Slice 4 second-pass-3 review fix (MEDIUM-1) — wait for rollouts and\n // the `mongodb-init` Job here too. `wildo local up` previously\n // returned success the moment apply returned, so any operator who\n // ran `wildo local up && wildo dev start` immediately would race the\n // dev script against still-warming infra. Sharing the helper means\n // all four bring-up seams (`bootstrap`, `dev start`, `local up`,\n // `local reinit`) have the same readiness contract.\n const ready = await waitForLocalK8sInfraReady(env, namespace, ctx.log, context);\n if (!ready) {\n return { success: false };\n }\n\n ctx.log.success('\\n Infrastructure services started.\\n');\n\n if (!includePlatformServices) {\n ctx.log.info(' Platform manifests skipped because local framework developers run platform services natively.');\n }\n\n if (!infraOnly && runsPlatformServicesNatively && frameworkPath) {\n ctx.log.info(`\\n${getFrameworkDeveloperManualPlatformStartupMessage(frameworkPath)}`);\n }\n\n return { success: true };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"capture.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/local-defaults/capture.command.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAsB1F,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,WAAW;IAClE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAoBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA2DvD"}
1
+ {"version":3,"file":"capture.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/local-defaults/capture.command.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAsB1F,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,WAAW;IAClE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAoBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA2DvD"}