@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":"report.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/report.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,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE3G,OAAO,EAAE,4BAA4B,EAA+B,MAAM,0DAA0D,CAAC;AAErI,OAAO,EAAE,iCAAiC,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE/F,0EAA0E;AAC1E,MAAM,aAAa,GAAG,CAAC,KAAoB,EAAE,GAAW,EAAU,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAC;AAEhI,MAAM,YAAY,GAAG,CAAC,IAAsC,EAAU,EAAE;IACtE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CA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,EAAE,2BAA2B,EAAE,OAAO,EAAE,KAAK,EAAE;YACnF,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4EAA4E,EAAE;SAC9H;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACjJ,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,YAAY,EAAE,wCAAwC;YACtD,SAAS,EAAE,uBAAuB;YAClC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAyC,EAAE;gBAC7D,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC3D,oGAAoG;gBACpG,MAAM,OAAO,GAA2B,MAAM,CAAC,WAAW;oBACxD,CAAC,CAAC,MAAM,4BAA4B,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC/F,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,EAAE,yDAAyD,EAAE,CAAC;gBAChI,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC;YAChC,CAAC;YACD,MAAM,EAAE,uBAAuB;SAChC,CAAC,CAAC;IACL,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 { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\nimport type { CreationRunReport, CreationRunReportWithTracker } from '~wildo-cli/services/companion/creation-run-report.models';\nimport { readCreationRunTrackerIssues, type CreationRunTrackerRead } from '~wildo-cli/services/tracker/creation-run-tracker.service';\n\nimport { describeBuildTaskAttemptInHistory, formatRunSpend } from '../context/journey.command';\n\n/** A ratio, or what it is when there is none: no landing to divide by. */\nconst describeRatio = (ratio: number | null, per: string): string => (ratio === null ? `no ${per} yet` : `${ratio} per ${per}`);\n\nconst describeCost = (cost: Readonly<Record<string, number>>): string => {\n const entries = Object.entries(cost);\n return entries.length > 0 ? entries.map(([currency, amount]) => `${amount} ${currency}`).join(', ') : 'no cost reported';\n};\n\n/**\n * The report in words (#2231). Pure, so what a person reads is pinned rather than implied.\n *\n * Interventions first, because they are what the report is FOR: the measure of whether the next run needs a\n * person less. An entry with no reason says how to give one — that is the only question the ledger asks.\n */\nexport function renderCreationRunReport(report: CreationRunReport & { readonly tracker?: CreationRunTrackerRead }): string[] {\n const lines: string[] = [`Creation run report (${report.generatedAt})`, ''];\n const independence = report.independence;\n lines.push(`Independence: ${independence.interventions} intervention(s) over ${independence.landedUnits} landed unit(s) — ${describeRatio(independence.interventionsPerLandedUnit, 'landed unit')}`);\n lines.push(` build: ${describeRatio(independence.interventionsPerLandedBuildTask, 'landed task')} (${independence.landedBuildTasks} task(s) landed)`);\n for (const lane of independence.byLane) {\n lines.push(` ${lane.lane}: ${lane.interventions} intervention(s), ${lane.landed} landed — ${describeRatio(lane.interventionsPerLanding, 'landing')}`);\n }\n\n lines.push('', `Interventions (${report.interventions.length}), oldest first:`);\n if (report.interventions.length === 0) lines.push(' none — nobody stepped in.');\n for (const intervention of report.interventions) {\n lines.push(` ${intervention.at} ${intervention.kind} ${intervention.summary}`);\n lines.push(` unblocked: ${intervention.targets.map((target) => (target.task ? `${target.lane} / ${target.task}` : target.lane)).join(', ')}`);\n lines.push(` from: ${intervention.evidence}`);\n lines.push(intervention.reason\n ? ` why: ${intervention.reason.text} (${intervention.reason.source})`\n : ` why: not given — wildo creation reason ${intervention.id} \"<why>\"`);\n }\n\n const total = report.spend.total;\n lines.push('', `Spend, each run counted once: ${describeCost(total.cost)}${total.totalTokens !== undefined ? ` · ${total.totalTokens.toLocaleString('en-US')} tokens reported` : ''}`);\n const floors = [\n ...(total.codingRunsWithoutReportedCost > 0 ? [`the agent reported no cost for ${total.codingRunsWithoutReportedCost} coding run(s)`] : []),\n ...(total.playbookRunsWithoutSpend > 0 ? [`${total.playbookRunsWithoutSpend} playbook run(s) recorded no spend`] : []),\n ...((total.generationStepsWithoutRecordedSpend ?? 0) > 0 ? [`${total.generationStepsWithoutRecordedSpend} generation step(s) recorded no spend`] : []),\n ];\n if (floors.length > 0) lines.push(` a floor: ${floors.join('; ')}`);\n if (total.codingRunsPossiblyCountedTwice > 0) {\n lines.push(` may count ${total.codingRunsPossiblyCountedTwice} coding run(s) twice: they ran inside a playbook run recorded before its coding part was`);\n }\n lines.push(` Coding runs (${report.spend.codingRuns.length}):`);\n for (const run of report.spend.codingRuns) lines.push(` ${run.startedAt} ${run.taskRef} · ${describeBuildTaskAttemptInHistory(run)}`);\n const steps = report.spend.generationSteps ?? [];\n if (steps.length > 0) {\n lines.push(` Generation steps (${steps.length}):`);\n for (const step of steps) lines.push(` ${step.startedAt} ${step.taskRef} · ${step.spend ? formatRunSpend(step.spend) : 'spend not recorded'}`);\n }\n lines.push(` Playbook runs (${report.spend.playbookRuns.length}), each with its children:`);\n for (const run of report.spend.playbookRuns) {\n const ref = run.instanceKey ? `${run.playbookRef}@${run.instanceKey}` : run.playbookRef;\n lines.push(` ${run.startedAt} ${ref} (${run.status}) · ${run.spend ? formatRunSpend(run.spend) : 'spend not recorded'}`);\n }\n const loops = report.spend.loopSelections.filter((loop) => loop.cost !== undefined);\n if (loops.length > 0) {\n lines.push(` Unattended-loop selections (${loops.length}):`);\n for (const loop of loops) lines.push(` ${loop.startedAt} ${describeCost(loop.cost ?? {})}`);\n }\n\n /*\n * What the TRACKER holds against the run (#2287): issues whose `**Creation run:**` field names this application.\n * \"Not read\" is said with its reason, never printed as \"nothing filed\".\n */\n if (report.tracker) {\n const tracker = report.tracker;\n if ('reason' in tracker) {\n lines.push('', `Filed against this run: not read from ${tracker.repository} — ${tracker.reason}`);\n } else {\n const defects = tracker.issues.filter((issue) => issue.kind === 'defect').length;\n lines.push('', `Filed against this run (${tracker.issues.length}, of which ${defects} defect(s)), from ${tracker.repository}:`);\n if (tracker.issues.length === 0) lines.push(` none carries \\`**Creation run:** ${report.application?.slug ?? '<slug>'}\\``);\n for (const issue of tracker.issues) lines.push(` #${issue.number} ${issue.state.toLowerCase()}${issue.kind ? ` ${issue.kind}` : ''} — ${issue.title}`);\n }\n }\n\n if (report.notChecked.length > 0) {\n lines.push('', 'Not checked:');\n for (const gap of report.notChecked) lines.push(` - ${gap}`);\n }\n return lines;\n}\n\n/**\n * `wildo creation report` — the creation run report (#2231): every intervention a person made and what it\n * unblocked, the spend of every run (coding runs included, #2232), the independence score, and the issues\n * filed against the run on the tracker (#2287). Derived on every read; nothing in the lane reads it.\n */\nexport default class CreationReportCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation report',\n description: 'The creation run report: interventions per lane and what each unblocked, spend per run, and the independence score.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n json: { type: 'boolean', description: 'Emit the report document.', default: false },\n 'tracker-repo': { type: 'string', description: 'The repository the run\\'s issues are filed in (default: the framework\\'s).' },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const repository = typeof ctx.flags['tracker-repo'] === 'string' && ctx.flags['tracker-repo'].length > 0 ? ctx.flags['tracker-repo'] : undefined;\n return runConsoleVerb(ctx, {\n failureLabel: 'Could not read the creation run report',\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: async (options): Promise<CreationRunReportWithTracker> => {\n const report = await CreationConsoleClient.report(options);\n // Read HERE, on the host, where `gh` is signed in: the companion holds no tracker identity (#2287).\n const tracker: CreationRunTrackerRead = report.application\n ? await readCreationRunTrackerIssues(report.application.slug, repository ? { repository } : {})\n : { read: false, repository: repository ?? 'the tracker', reason: 'this companion does not name its application; update it' };\n return { ...report, tracker };\n },\n render: renderCreationRunReport,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"report.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/report.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,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE3G,OAAO,EAAE,4BAA4B,EAA+B,MAAM,0DAA0D,CAAC;AAErI,OAAO,EAAE,iCAAiC,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE/F,0EAA0E;AAC1E,MAAM,aAAa,GAAG,CAAC,KAAoB,EAAE,GAAW,EAAU,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAC;AAEhI,MAAM,YAAY,GAAG,CAAC,IAAsC,EAAU,EAAE;IACtE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,GAA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} from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\nimport type { CreationRunReport, CreationRunReportWithTracker } from '~wildo-cli/services/companion/creation-run-report.models';\nimport { readCreationRunTrackerIssues, type CreationRunTrackerRead } from '~wildo-cli/services/tracker/creation-run-tracker.service';\n\nimport { describeBuildTaskAttemptInHistory, formatRunSpend } from '../context/journey.command';\n\n/** A ratio, or what it is when there is none: no landing to divide by. */\nconst describeRatio = (ratio: number | null, per: string): string => (ratio === null ? `no ${per} yet` : `${ratio} per ${per}`);\n\nconst describeCost = (cost: Readonly<Record<string, number>>): string => {\n const entries = Object.entries(cost);\n return entries.length > 0 ? entries.map(([currency, amount]) => `${amount} ${currency}`).join(', ') : 'no cost reported';\n};\n\n/**\n * The report in words (#2231). Pure, so what a person reads is pinned rather than implied.\n *\n * Interventions first, because they are what the report is FOR: the measure of whether the next run needs a\n * person less. An entry with no reason says how to give one — that is the only question the ledger asks.\n */\nexport function renderCreationRunReport(report: CreationRunReport & { readonly tracker?: CreationRunTrackerRead }): string[] {\n const lines: string[] = [`Creation run report (${report.generatedAt})`, ''];\n const independence = report.independence;\n lines.push(`Independence: ${independence.interventions} intervention(s) over ${independence.landedUnits} landed unit(s) — ${describeRatio(independence.interventionsPerLandedUnit, 'landed unit')}`);\n lines.push(` build: ${describeRatio(independence.interventionsPerLandedBuildTask, 'landed task')} (${independence.landedBuildTasks} task(s) landed)`);\n for (const lane of independence.byLane) {\n lines.push(` ${lane.lane}: ${lane.interventions} intervention(s), ${lane.landed} landed — ${describeRatio(lane.interventionsPerLanding, 'landing')}`);\n }\n\n lines.push('', `Interventions (${report.interventions.length}), oldest first:`);\n if (report.interventions.length === 0) lines.push(' none — nobody stepped in.');\n for (const intervention of report.interventions) {\n lines.push(` ${intervention.at} ${intervention.kind} ${intervention.summary}`);\n lines.push(` unblocked: ${intervention.targets.map((target) => (target.task ? `${target.lane} / ${target.task}` : target.lane)).join(', ')}`);\n lines.push(` from: ${intervention.evidence}`);\n lines.push(intervention.reason\n ? ` why: ${intervention.reason.text} (${intervention.reason.source})`\n : ` why: not given — wildo creation reason ${intervention.id} \"<why>\"`);\n }\n\n const total = report.spend.total;\n lines.push('', `Spend, each run counted once: ${describeCost(total.cost)}${total.totalTokens !== undefined ? ` · ${total.totalTokens.toLocaleString('en-US')} tokens reported` : ''}`);\n const floors = [\n ...(total.codingRunsWithoutReportedCost > 0 ? [`the agent reported no cost for ${total.codingRunsWithoutReportedCost} coding run(s)`] : []),\n ...(total.playbookRunsWithoutSpend > 0 ? [`${total.playbookRunsWithoutSpend} playbook run(s) recorded no spend`] : []),\n ...((total.generationStepsWithoutRecordedSpend ?? 0) > 0 ? [`${total.generationStepsWithoutRecordedSpend} generation step(s) recorded no spend`] : []),\n ];\n if (floors.length > 0) lines.push(` a floor: ${floors.join('; ')}`);\n if (total.codingRunsPossiblyCountedTwice > 0) {\n lines.push(` may count ${total.codingRunsPossiblyCountedTwice} coding run(s) twice: they ran inside a playbook run recorded before its coding part was`);\n }\n lines.push(` Coding runs (${report.spend.codingRuns.length}):`);\n for (const run of report.spend.codingRuns) lines.push(` ${run.startedAt} ${run.taskRef} · ${describeBuildTaskAttemptInHistory(run)}`);\n const steps = report.spend.generationSteps ?? [];\n if (steps.length > 0) {\n lines.push(` Generation steps (${steps.length}):`);\n for (const step of steps) lines.push(` ${step.startedAt} ${step.taskRef} · ${step.spend ? formatRunSpend(step.spend) : 'spend not recorded'}`);\n }\n lines.push(` Playbook runs (${report.spend.playbookRuns.length}), each with its children:`);\n for (const run of report.spend.playbookRuns) {\n const ref = run.instanceKey ? `${run.playbookRef}@${run.instanceKey}` : run.playbookRef;\n lines.push(` ${run.startedAt} ${ref} (${run.status}) · ${run.spend ? formatRunSpend(run.spend) : 'spend not recorded'}`);\n }\n const loops = report.spend.loopSelections.filter((loop) => loop.cost !== undefined);\n if (loops.length > 0) {\n lines.push(` Unattended-loop selections (${loops.length}):`);\n for (const loop of loops) lines.push(` ${loop.startedAt} ${describeCost(loop.cost ?? {})}`);\n }\n\n /*\n * What the TRACKER holds against the run (#2287): issues whose `**Creation run:**` field names this application.\n * \"Not read\" is said with its reason, never printed as \"nothing filed\".\n */\n if (report.tracker) {\n const tracker = report.tracker;\n if ('reason' in tracker) {\n lines.push('', `Filed against this run: not read from ${tracker.repository} — ${tracker.reason}`);\n } else {\n const defects = tracker.issues.filter((issue) => issue.kind === 'defect').length;\n lines.push('', `Filed against this run (${tracker.issues.length}, of which ${defects} defect(s)), from ${tracker.repository}:`);\n if (tracker.issues.length === 0) lines.push(` none carries \\`**Creation run:** ${report.application?.slug ?? '<slug>'}\\``);\n for (const issue of tracker.issues) lines.push(` #${issue.number} ${issue.state.toLowerCase()}${issue.kind ? ` ${issue.kind}` : ''} — ${issue.title}`);\n }\n }\n\n if (report.notChecked.length > 0) {\n lines.push('', 'Not checked:');\n for (const gap of report.notChecked) lines.push(` - ${gap}`);\n }\n return lines;\n}\n\n/**\n * `wildo creation report` — the creation run report (#2231): every intervention a person made and what it\n * unblocked, the spend of every run (coding runs included, #2232), the independence score, and the issues\n * filed against the run on the tracker (#2287). Derived on every read; nothing in the lane reads it.\n */\nexport default class CreationReportCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation report',\n description: 'The creation run report: interventions per lane and what each unblocked, spend per run, and the independence score.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n json: { type: 'boolean', description: 'Emit the report document.', default: false },\n 'tracker-repo': { type: 'string', description: 'The repository the run\\'s issues are filed in (default: the framework\\'s).' },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const repository = typeof ctx.flags['tracker-repo'] === 'string' && ctx.flags['tracker-repo'].length > 0 ? ctx.flags['tracker-repo'] : undefined;\n return runConsoleVerb(ctx, {\n failureLabel: 'Could not read the creation run report',\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: async (options): Promise<CreationRunReportWithTracker> => {\n const report = await CreationConsoleClient.report(options);\n // Read HERE, on the host, where `gh` is signed in: the companion holds no tracker identity (#2287).\n const tracker: CreationRunTrackerRead = report.application\n ? await readCreationRunTrackerIssues(report.application.slug, repository ? { repository } : {})\n : { read: false, repository: repository ?? 'the tracker', reason: 'this companion does not name its application; update it' };\n return { ...report, tracker };\n },\n render: renderCreationRunReport,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"revert.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/revert.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;AAI1F;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAUxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAcvD"}
1
+ {"version":3,"file":"revert.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/revert.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;AAI1F;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAUxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAcvD"}
@@ -1 +1 @@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,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;YACzF,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;gBACnB,YAAY,OAAO,CAAC,QAAQ,CAAC,MAAM,eAAe,KAAK,GAAG;gBAC1D,kGAAkG;gBAClG,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,IAAI,8CAA8C,CAAC;gBAC/G,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,KAAK,CAAC,IAAI,gBAAgB,KAAK,CAAC,KAAK,mCAAmC,CAAC;aACvI;SACF,CAAC,CAAC;IACL,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 { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_WRITE_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/**\n * `wildo creation revert <runId>` — restore what one playbook run overwrote (#1652). A file edited since\n * the run is refused by name unless `--force`, so a human edit is never destroyed silently.\n *\n * A file a LATER run landed on is refused even under `--force` (#1614): its earlier bytes would destroy\n * that run's work. Each is named with the run to revert first (#1666), because otherwise\n * \"Reverted 0 file(s)\" reads as though the run wrote nothing.\n */\nexport default class CreationRevertCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation revert',\n description: 'Undo one playbook run: restore the files it wrote to what they were before.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'runId', description: 'The run, as `wildo creation writes` lists it', required: true }],\n flags: {\n force: { type: 'boolean', description: 'Also revert files edited since the run, discarding those edits.', default: false },\n json: { type: 'boolean', description: 'Emit the outcome document.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const runId = String(ctx.args.runId ?? '');\n return runConsoleVerb(ctx, {\n failureLabel: `Could not revert ${runId}`,\n timeoutMs: CONSOLE_WRITE_TIMEOUT_MS,\n call: (options) => CreationConsoleClient.revert(options, runId, ctx.flags.force === true),\n render: (outcome) => [\n `Reverted ${outcome.reverted.length} file(s) of ${runId}.`,\n // `?? []`: a companion older than the field omits it, and the revert has already happened by now.\n ...(outcome.refusedDiverged ?? []).map((path) => ` kept: ${path} — edited since the run (--force reverts it)`),\n ...(outcome.refusedLaterRun ?? []).map((entry) => ` kept: ${entry.path} — holds run ${entry.runId}'s landing; revert that run first`),\n ],\n });\n }\n}\n"]}
1
+ {"version":3,"file":"revert.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/revert.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,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE5G;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IACnD,IAAI,GAAgB;QAC3B,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,6EAA6E;QAC1F,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,8CAA8C,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACtG,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iEAAiE,EAAE,OAAO,EAAE,KAAK,EAAE;YAC1H,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,4BAA4B,EAAE,OAAO,EAAE,KAAK,EAAE;SACrF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,YAAY,EAAE,oBAAoB,KAAK,EAAE;YACzC,SAAS,EAAE,wBAAwB;YACnC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;YACzF,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;gBACnB,YAAY,OAAO,CAAC,QAAQ,CAAC,MAAM,eAAe,KAAK,GAAG;gBAC1D,kGAAkG;gBAClG,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,IAAI,8CAA8C,CAAC;gBAC/G,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,KAAK,CAAC,IAAI,gBAAgB,KAAK,CAAC,KAAK,mCAAmC,CAAC;aACvI;SACF,CAAC,CAAC;IACL,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 { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_WRITE_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/**\n * `wildo creation revert <runId>` — restore what one playbook run overwrote (#1652). A file edited since\n * the run is refused by name unless `--force`, so a human edit is never destroyed silently.\n *\n * A file a LATER run landed on is refused even under `--force` (#1614): its earlier bytes would destroy\n * that run's work. Each is named with the run to revert first (#1666), because otherwise\n * \"Reverted 0 file(s)\" reads as though the run wrote nothing.\n */\nexport default class CreationRevertCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation revert',\n description: 'Undo one playbook run: restore the files it wrote to what they were before.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'runId', description: 'The run, as `wildo creation writes` lists it', required: true }],\n flags: {\n force: { type: 'boolean', description: 'Also revert files edited since the run, discarding those edits.', default: false },\n json: { type: 'boolean', description: 'Emit the outcome document.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const runId = String(ctx.args.runId ?? '');\n return runConsoleVerb(ctx, {\n failureLabel: `Could not revert ${runId}`,\n timeoutMs: CONSOLE_WRITE_TIMEOUT_MS,\n call: (options) => CreationConsoleClient.revert(options, runId, ctx.flags.force === true),\n render: (outcome) => [\n `Reverted ${outcome.reverted.length} file(s) of ${runId}.`,\n // `?? []`: a companion older than the field omits it, and the revert has already happened by now.\n ...(outcome.refusedDiverged ?? []).map((path) => ` kept: ${path} — edited since the run (--force reverts it)`),\n ...(outcome.refusedLaterRun ?? []).map((entry) => ` kept: ${entry.path} — holds run ${entry.runId}'s landing; revert that run first`),\n ],\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"run.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/run.command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgB1F;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAaxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmCvD"}
1
+ {"version":3,"file":"run.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/run.command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgB1F;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAaxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmCvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"run.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/run.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AACnH,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAA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AI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAC5B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,UAAU,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9F,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC,CAAC;YAC7F,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,WAAW,KAAK,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,wBAAwB,CAAC,KAAK,CAAC,EAAE,CAAC;QACvE,CAAC;IACH,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\n\nimport { 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 { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { CompanionClient, companionFailureExitCode } from '~wildo-cli/services/companion/companion-client.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { resolveContextOptions } from '../context/context-command.utils';\nimport { SKIP_PREFLIGHT_FLAG, admitCreationRunAfterPreflight } from '~wildo-cli/services/application/creation-preflight.service';\n\n/** What `POST /api/companion/playbooks/:ref/run` answers for a detached submission — only the fields printed here. */\ninterface DetachedPlaybookRunSubmission {\n readonly runId: string;\n readonly playbookRef: string;\n}\n\n/** Submission returns once the run is OPENED; the run itself continues in the companion. */\nconst SUBMIT_TIMEOUT_MS = 60_000;\n\n/**\n * `wildo creation run <playbookRef>` — ask the companion to run one playbook, and return at once.\n *\n * The console's way IN, beside `feed` (what happened) and `answer` (what it asks): the companion runs\n * the playbook — composing its brief, dispatching coding workers, running its judge — and the console\n * follows it with `wildo creation feed --follow --exit-on-change`. A run that needs the creator's\n * answers first is refused with the questions named; `wildo creation questions` lists them.\n *\n * It runs the creation preflight first and refuses on a FAIL before contacting the companion (#2229).\n */\nexport default class CreationRunCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation run',\n description: 'Ask the companion to run one playbook, then follow it with `wildo creation feed --follow`.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'playbookRef', description: 'The playbook to run, as `wildo context journey` names it', required: true }],\n flags: {\n brief: { type: 'string', description: 'What the creator wants from this run, in their words — joins the run\\'s brief.' },\n instance: { type: 'string', description: 'Run an opened instance of the step (its key, e.g. enterprise-segment) instead of the step itself.' },\n 'dry-run': { type: 'boolean', description: 'Run the whole pipe (generation, validation, judge) and write nothing.', default: false },\n json: { type: 'boolean', description: 'Emit the companion\\'s submission document.', default: false },\n [SKIP_PREFLIGHT_FLAG]: { type: 'boolean', description: 'Start even when `wildo creation preflight` reports a FAIL.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) return { success: false };\n const playbookRef = ctx.args.playbookRef;\n if (typeof playbookRef !== 'string' || playbookRef.length === 0) {\n ctx.log.error('Usage: wildo creation run <playbookRef> [--instance <key>] [--brief \"<what you want>\"] [--dry-run]');\n return { success: false };\n }\n // Before the companion is contacted, so a refusal composes no brief and calls no model (#2229).\n if (!await admitCreationRunAfterPreflight(ctx, 'wildo creation run')) return { success: false };\n try {\n const options = await resolveContextOptions(ctx, SUBMIT_TIMEOUT_MS);\n const submission = await CompanionClient.post<DetachedPlaybookRunSubmission>(\n `/api/companion/playbooks/${encodeURIComponent(playbookRef)}/run`,\n {\n async: true,\n ...(typeof ctx.flags.instance === 'string' && ctx.flags.instance.length > 0 ? { instanceKey: ctx.flags.instance } : {}),\n ...(typeof ctx.flags.brief === 'string' && ctx.flags.brief.trim().length > 0 ? { creatorBrief: ctx.flags.brief } : {}),\n ...(ctx.flags['dry-run'] === true ? { dryRun: true } : {}),\n // The same decision reaches the companion's own gate, which would otherwise refuse what this one let past.\n ...(ctx.flags[SKIP_PREFLIGHT_FLAG] === true ? { skipPreflight: true } : {}),\n },\n options,\n );\n if (ctx.flags.json === true) {\n ctx.log.info(JSON.stringify(submission));\n } else {\n ctx.log.success(`Submitted ${chalk.bold(submission.playbookRef)} (run ${submission.runId}).`);\n ctx.log.info(chalk.dim(' Follow it with: wildo creation feed --follow --exit-on-change'));\n }\n return { success: true };\n } catch (error) {\n ctx.log.error(`Could not run ${playbookRef}: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false, exitCode: companionFailureExitCode(error) };\n }\n }\n}\n"]}
1
+ {"version":3,"file":"run.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/run.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AACnH,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,mBA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,CAAC;aAC5E,EACD,OAAO,CACR,CAAC;YACF,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAC5B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,UAAU,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9F,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC,CAAC;YAC7F,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,WAAW,KAAK,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,wBAAwB,CAAC,KAAK,CAAC,EAAE,CAAC;QACvE,CAAC;IACH,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\n\nimport { 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 { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { CompanionClient, companionFailureExitCode } from '~wildo-cli/services/companion/companion-client.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { resolveContextOptions } from '../context/context-command.utils';\nimport { SKIP_PREFLIGHT_FLAG, admitCreationRunAfterPreflight } from '~wildo-cli/services/application/creation-preflight.service';\n\n/** What `POST /api/companion/playbooks/:ref/run` answers for a detached submission — only the fields printed here. */\ninterface DetachedPlaybookRunSubmission {\n readonly runId: string;\n readonly playbookRef: string;\n}\n\n/** Submission returns once the run is OPENED; the run itself continues in the companion. */\nconst SUBMIT_TIMEOUT_MS = 60_000;\n\n/**\n * `wildo creation run <playbookRef>` — ask the companion to run one playbook, and return at once.\n *\n * The console's way IN, beside `feed` (what happened) and `answer` (what it asks): the companion runs\n * the playbook — composing its brief, dispatching coding workers, running its judge — and the console\n * follows it with `wildo creation feed --follow --exit-on-change`. A run that needs the creator's\n * answers first is refused with the questions named; `wildo creation questions` lists them.\n *\n * It runs the creation preflight first and refuses on a FAIL before contacting the companion (#2229).\n */\nexport default class CreationRunCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation run',\n description: 'Ask the companion to run one playbook, then follow it with `wildo creation feed --follow`.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'playbookRef', description: 'The playbook to run, as `wildo context journey` names it', required: true }],\n flags: {\n brief: { type: 'string', description: 'What the creator wants from this run, in their words — joins the run\\'s brief.' },\n instance: { type: 'string', description: 'Run an opened instance of the step (its key, e.g. enterprise-segment) instead of the step itself.' },\n 'dry-run': { type: 'boolean', description: 'Run the whole pipe (generation, validation, judge) and write nothing.', default: false },\n json: { type: 'boolean', description: 'Emit the companion\\'s submission document.', default: false },\n [SKIP_PREFLIGHT_FLAG]: { type: 'boolean', description: 'Start even when `wildo creation preflight` reports a FAIL.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) return { success: false };\n const playbookRef = ctx.args.playbookRef;\n if (typeof playbookRef !== 'string' || playbookRef.length === 0) {\n ctx.log.error('Usage: wildo creation run <playbookRef> [--instance <key>] [--brief \"<what you want>\"] [--dry-run]');\n return { success: false };\n }\n // Before the companion is contacted, so a refusal composes no brief and calls no model (#2229).\n if (!await admitCreationRunAfterPreflight(ctx, 'wildo creation run')) return { success: false };\n try {\n const options = await resolveContextOptions(ctx, SUBMIT_TIMEOUT_MS);\n const submission = await CompanionClient.post<DetachedPlaybookRunSubmission>(\n `/api/companion/playbooks/${encodeURIComponent(playbookRef)}/run`,\n {\n async: true,\n ...(typeof ctx.flags.instance === 'string' && ctx.flags.instance.length > 0 ? { instanceKey: ctx.flags.instance } : {}),\n ...(typeof ctx.flags.brief === 'string' && ctx.flags.brief.trim().length > 0 ? { creatorBrief: ctx.flags.brief } : {}),\n ...(ctx.flags['dry-run'] === true ? { dryRun: true } : {}),\n // The same decision reaches the companion's own gate, which would otherwise refuse what this one let past.\n ...(ctx.flags[SKIP_PREFLIGHT_FLAG] === true ? { skipPreflight: true } : {}),\n },\n options,\n );\n if (ctx.flags.json === true) {\n ctx.log.info(JSON.stringify(submission));\n } else {\n ctx.log.success(`Submitted ${chalk.bold(submission.playbookRef)} (run ${submission.runId}).`);\n ctx.log.info(chalk.dim(' Follow it with: wildo creation feed --follow --exit-on-change'));\n }\n return { success: true };\n } catch (error) {\n ctx.log.error(`Could not run ${playbookRef}: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false, exitCode: companionFailureExitCode(error) };\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"statusline.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/statusline.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;AAG1F;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,WAAW;IAChE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAKxB;IAEI,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAIxD"}
1
+ {"version":3,"file":"statusline.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/statusline.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;AAG1F;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,WAAW;IAChE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAKxB;IAEI,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAIxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"statusline.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/statusline.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,eAAe,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAEtG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,WAAW;IACvD,IAAI,GAAgB;QAC3B,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sEAAsE;QACnF,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,aAAa;KAC3C,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,IAAoB;QAC5B,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC3E,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3E,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 { ConsoleFastVerb, runConsoleFastVerb } from '~wildo-cli/services/companion/console-fast-path';\n\n/**\n * `wildo creation statusline` — the Claude Code status line: the state of the dev companion in one line.\n *\n * Normally answered by the FAST PATH in `bin/wildo.ts`, before the kernel loads (#1657); this entry exists\n * so the verb is listed by `wildo help` and answers `--help`, and it runs the very same function if the\n * kernel is reached anyway.\n */\nexport default class CreationStatusLineCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation statusline',\n description: 'Claude Code status line: the state of the dev companion in one line.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.UNINITIALIZED,\n };\n\n async run(_ctx: CommandContext): Promise<CommandResult> {\n const exitCode = await runConsoleFastVerb(ConsoleFastVerb.STATUS_LINE, []);\n return exitCode === 0 ? { success: true } : { success: false, exitCode };\n }\n}\n"]}
1
+ {"version":3,"file":"statusline.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/statusline.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,eAAe,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAEtG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,WAAW;IACvD,IAAI,GAAgB;QAC3B,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sEAAsE;QACnF,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,aAAa;KAC3C,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,IAAoB;QAC5B,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC3E,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3E,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 { ConsoleFastVerb, runConsoleFastVerb } from '~wildo-cli/services/companion/console-fast-path';\n\n/**\n * `wildo creation statusline` — the Claude Code status line: the state of the dev companion in one line.\n *\n * Normally answered by the FAST PATH in `bin/wildo.ts`, before the kernel loads (#1657); this entry exists\n * so the verb is listed by `wildo help` and answers `--help`, and it runs the very same function if the\n * kernel is reached anyway.\n */\nexport default class CreationStatusLineCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation statusline',\n description: 'Claude Code status line: the state of the dev companion in one line.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.UNINITIALIZED,\n };\n\n async run(_ctx: CommandContext): Promise<CommandResult> {\n const exitCode = await runConsoleFastVerb(ConsoleFastVerb.STATUS_LINE, []);\n return exitCode === 0 ? { success: true } : { success: false, exitCode };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"watch.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/watch.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;AAe1F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAKxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAgBvD"}
1
+ {"version":3,"file":"watch.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/watch.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;AAe1F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAKxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAgBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"watch.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/watch.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,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,wCAAwC,EAAE,MAAM,8DAA8D,CAAC;AACxH,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAEpH,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAChC,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAClD,IAAI,GAAgB;QAC3B,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,2FAA2F;QACxG,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;KACtC,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACxD,MAAM,WAAW,GAAG,MAAM,wCAAwC,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;QACzF,MAAM,YAAY,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QACrE,MAAM,mBAAmB,CAAC;YACxB,SAAS,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,aAAa,CAAC,YAAY,CAAC;YAClE,QAAQ,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,YAAY,CAAC,WAAW,CAAC;YAC/D,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;YACrD,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAChE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YACrB,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK;YACvB,eAAe,EAAE,iBAAiB;YAClC,cAAc,EAAE,yBAAyB;SAC1C,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,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 { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { resolveCompanionClientOptionsFromContext } from '~wildo-cli/services/companion/companion-client-options.utils';\nimport { CreationConsoleClient, watchCreationEvents } from '~wildo-cli/services/companion/creation-console.service';\n\nconst PULSE_INTERVAL_MS = 3_000;\n/** The feed is re-read at least this often, so a change no invalidation announced still arrives. */\nconst FEED_FALLBACK_INTERVAL_MS = 60_000;\n/**\n * The pulse derives nothing, so a companion that takes longer than this is not answering — it is hung\n * or still booting, and the watcher says so rather than sitting silent. The feed is a real derivation.\n */\nconst PULSE_TIMEOUT_MS = 4_000;\nconst FEED_TIMEOUT_MS = 30_000;\n\n/**\n * `wildo creation watch` — the console's PUSH (#1657): a long-running process that prints ONE line per\n * new event — a run finished or was refused, a dispatch settled, a question was asked.\n *\n * The `wildo` Claude Code plugin runs it as a background MONITOR, where every line it prints becomes a\n * notification in the session, idle or not. So it prints nothing but events: what already happened\n * when it started is the session-start brief's to report, and it stays quiet about a companion that is\n * down except to say so once, and once more when it is back.\n *\n * It polls the PULSE, which the companion answers without deriving anything, and reads the feed only\n * when the pulse moved — or every minute, for a change nothing announced. Reading the feed also\n * refreshes the counts every hook and status line show.\n */\nexport default class CreationWatchCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation watch',\n description: 'Print one line per new event from the dev companion, until stopped — the console\\'s push.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) return { success: false };\n const feedOptions = await resolveCompanionClientOptionsFromContext(ctx, FEED_TIMEOUT_MS);\n const pulseOptions = { ...feedOptions, timeoutMs: PULSE_TIMEOUT_MS };\n await watchCreationEvents({\n readPulse: () => CreationConsoleClient.readPulseOnce(pulseOptions),\n readFeed: () => CreationConsoleClient.readFeedOnce(feedOptions),\n say: (text) => { process.stdout.write(`${text}\\n`); },\n sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),\n now: () => Date.now(),\n shouldStop: () => false,\n pulseIntervalMs: PULSE_INTERVAL_MS,\n feedFallbackMs: FEED_FALLBACK_INTERVAL_MS,\n });\n return { success: true };\n }\n}\n"]}
1
+ {"version":3,"file":"watch.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/watch.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,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,wCAAwC,EAAE,MAAM,8DAA8D,CAAC;AACxH,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAEpH,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAChC,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAClD,IAAI,GAAgB;QAC3B,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,2FAA2F;QACxG,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;KACtC,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACxD,MAAM,WAAW,GAAG,MAAM,wCAAwC,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;QACzF,MAAM,YAAY,GAAG,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QACrE,MAAM,mBAAmB,CAAC;YACxB,SAAS,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,aAAa,CAAC,YAAY,CAAC;YAClE,QAAQ,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,YAAY,CAAC,WAAW,CAAC;YAC/D,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;YACrD,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAChE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YACrB,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK;YACvB,eAAe,EAAE,iBAAiB;YAClC,cAAc,EAAE,yBAAyB;SAC1C,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,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 { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { resolveCompanionClientOptionsFromContext } from '~wildo-cli/services/companion/companion-client-options.utils';\nimport { CreationConsoleClient, watchCreationEvents } from '~wildo-cli/services/companion/creation-console.service';\n\nconst PULSE_INTERVAL_MS = 3_000;\n/** The feed is re-read at least this often, so a change no invalidation announced still arrives. */\nconst FEED_FALLBACK_INTERVAL_MS = 60_000;\n/**\n * The pulse derives nothing, so a companion that takes longer than this is not answering — it is hung\n * or still booting, and the watcher says so rather than sitting silent. The feed is a real derivation.\n */\nconst PULSE_TIMEOUT_MS = 4_000;\nconst FEED_TIMEOUT_MS = 30_000;\n\n/**\n * `wildo creation watch` — the console's PUSH (#1657): a long-running process that prints ONE line per\n * new event — a run finished or was refused, a dispatch settled, a question was asked.\n *\n * The `wildo` Claude Code plugin runs it as a background MONITOR, where every line it prints becomes a\n * notification in the session, idle or not. So it prints nothing but events: what already happened\n * when it started is the session-start brief's to report, and it stays quiet about a companion that is\n * down except to say so once, and once more when it is back.\n *\n * It polls the PULSE, which the companion answers without deriving anything, and reads the feed only\n * when the pulse moved — or every minute, for a change nothing announced. Reading the feed also\n * refreshes the counts every hook and status line show.\n */\nexport default class CreationWatchCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation watch',\n description: 'Print one line per new event from the dev companion, until stopped — the console\\'s push.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) return { success: false };\n const feedOptions = await resolveCompanionClientOptionsFromContext(ctx, FEED_TIMEOUT_MS);\n const pulseOptions = { ...feedOptions, timeoutMs: PULSE_TIMEOUT_MS };\n await watchCreationEvents({\n readPulse: () => CreationConsoleClient.readPulseOnce(pulseOptions),\n readFeed: () => CreationConsoleClient.readFeedOnce(feedOptions),\n say: (text) => { process.stdout.write(`${text}\\n`); },\n sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),\n now: () => Date.now(),\n shouldStop: () => false,\n pulseIntervalMs: PULSE_INTERVAL_MS,\n feedFallbackMs: FEED_FALLBACK_INTERVAL_MS,\n });\n return { success: true };\n }\n}\n"]}
@@ -6,7 +6,9 @@ import type { CommandContext, CommandMeta, CommandResult } from '../../kernel/ty
6
6
  *
7
7
  * A build task is explained from its own record (status, stuck reason, what it waits on, what its
8
8
  * landing probes did not find, how its last attempt ended). A playbook run is explained from its feed
9
- * line, which already carries its error and the judge criteria that did not pass. Nothing is inferred.
9
+ * line, which already carries its error and the judge criteria that did not pass. A playbook ref is also
10
+ * explained from the eligibility board — its unmet preconditions and its unanswered interview — so a
11
+ * playbook that has never run, or is held now, has an answer too. Nothing is inferred.
10
12
  */
11
13
  export default class CreationWhyCommand extends BaseCommand {
12
14
  readonly meta: CommandMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"why.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/why.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;AAK1F;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAkBvD"}
1
+ {"version":3,"file":"why.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/why.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;AAK1F;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAoCvD"}
@@ -2,7 +2,7 @@ import { WorkspaceScope } from '@wildo-ai/platform-config-lib';
2
2
  import { BaseCommand } from '../../kernel/base-command.js';
3
3
  import { CommandCategory } from '../../kernel/types.js';
4
4
  import { BuildConsoleClient, describeBuildTaskWhy } from '../../services/companion/build-console.service.js';
5
- import { CreationConsoleClient, describeFeedLine, feedLineNamesReference } from '../../services/companion/creation-console.service.js';
5
+ import { CreationConsoleClient, describeFeedLine, describePlaybookStanding, feedLineNamesReference, locateInterviewInQueue } from '../../services/companion/creation-console.service.js';
6
6
  import { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '../../services/companion/console-verb.utils.js';
7
7
  /**
8
8
  * `wildo creation why <taskRef|runId|playbookRef>` — why a build task has not landed, or how a playbook
@@ -10,12 +10,14 @@ import { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '../../services/companio
10
10
  *
11
11
  * A build task is explained from its own record (status, stuck reason, what it waits on, what its
12
12
  * landing probes did not find, how its last attempt ended). A playbook run is explained from its feed
13
- * line, which already carries its error and the judge criteria that did not pass. Nothing is inferred.
13
+ * line, which already carries its error and the judge criteria that did not pass. A playbook ref is also
14
+ * explained from the eligibility board — its unmet preconditions and its unanswered interview — so a
15
+ * playbook that has never run, or is held now, has an answer too. Nothing is inferred.
14
16
  */
15
17
  export default class CreationWhyCommand extends BaseCommand {
16
18
  meta = {
17
19
  name: 'creation why',
18
- description: 'Why a build task has not landed, or how a playbook run ended.',
20
+ description: 'Why a build task has not landed, how a playbook run ended, or what holds a playbook now.',
19
21
  category: CommandCategory.Local,
20
22
  minimumScope: WorkspaceScope.SAAS_APP,
21
23
  args: [{ name: 'ref', description: 'A build task ref, a playbook run id, or a playbook ref', required: true }],
@@ -30,15 +32,32 @@ export default class CreationWhyCommand extends BaseCommand {
30
32
  const tasks = await BuildConsoleClient.tasks(options);
31
33
  const task = tasks.records?.tasks.find((candidate) => candidate.taskRef === ref) ?? null;
32
34
  if (task)
33
- return { task, lines: null };
34
- const feed = await CreationConsoleClient.readFeed(options);
35
+ return { task, lines: null, standing: null, interview: null };
36
+ /*
37
+ * The board and the queue only ADD to the answer, so a failed read of either leaves the feed's answer
38
+ * standing rather than failing a `why <runId>` that needs only the feed.
39
+ */
40
+ const [feed, board, queue] = await Promise.all([
41
+ CreationConsoleClient.readFeed(options),
42
+ CreationConsoleClient.readPlaybookBoard(options).catch(() => null),
43
+ CreationConsoleClient.readQuestions(options).catch(() => null),
44
+ ]);
35
45
  const lines = feed.lines.filter((line) => feedLineNamesReference(line, ref));
46
+ const standing = board?.playbooks.find((entry) => entry.playbookRef === ref) ?? null;
36
47
  /* An unknown reference is a failure an agent must be able to branch on, not a sentence on a success. */
37
- if (lines.length === 0)
38
- throw new Error(`nothing is recorded under "${ref}" — not a build task, and no recent run or question names it. List them with: wildo build tasks · wildo creation feed`);
39
- return { task: null, lines };
48
+ if (lines.length === 0 && standing === null) {
49
+ const scope = board === null ? 'not a build task, and no recent run or question names it (the playbook board could not be read)' : 'not a build task, not a playbook, and no recent run or question names it';
50
+ throw new Error(`nothing is recorded under "${ref}" — ${scope}. List them with: wildo build tasks · wildo creation feed · wildo context journey`);
51
+ }
52
+ const interview = standing !== null && queue !== null ? locateInterviewInQueue(ref, standing.unansweredQuestionRefs ?? [], queue) : null;
53
+ return { task: null, lines, standing, interview };
40
54
  },
41
- render: (result) => (result.task ? describeBuildTaskWhy(result.task) : result.lines.flatMap(describeFeedLine)),
55
+ render: (result) => (result.task
56
+ ? describeBuildTaskWhy(result.task)
57
+ : [
58
+ ...result.lines.flatMap(describeFeedLine),
59
+ ...(result.standing ? describePlaybookStanding(result.standing, result.lines.length > 0, result.interview ?? undefined) : []),
60
+ ]),
42
61
  });
43
62
  }
44
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"why.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/why.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,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,gBAAg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,CAAC,CAAC;gBAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC7E,wGAAwG;gBACxG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,uHAAuH,CAAC,CAAC;gBAClM,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAC/B,CAAC;YACD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;SAC/G,CAAC,CAAC;IACL,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 { BuildConsoleClient, describeBuildTaskWhy } from '~wildo-cli/services/companion/build-console.service';\nimport { CreationConsoleClient, describeFeedLine, feedLineNamesReference } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/**\n * `wildo creation why <taskRef|runId|playbookRef>` — why a build task has not landed, or how a playbook\n * run ended (#1652).\n *\n * A build task is explained from its own record (status, stuck reason, what it waits on, what its\n * landing probes did not find, how its last attempt ended). A playbook run is explained from its feed\n * line, which already carries its error and the judge criteria that did not pass. Nothing is inferred.\n */\nexport default class CreationWhyCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation why',\n description: 'Why a build task has not landed, or how a playbook run ended.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'ref', description: 'A build task ref, a playbook run id, or a playbook ref', required: true }],\n flags: { json: { type: 'boolean', description: 'Emit the record the answer is read from.', default: false } },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const ref = String(ctx.args.ref ?? '');\n return runConsoleVerb(ctx, {\n failureLabel: `Could not explain ${ref}`,\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: async (options) => {\n const tasks = await BuildConsoleClient.tasks(options);\n const task = tasks.records?.tasks.find((candidate) => candidate.taskRef === ref) ?? null;\n if (task) return { task, lines: null };\n const feed = await CreationConsoleClient.readFeed(options);\n const lines = feed.lines.filter((line) => feedLineNamesReference(line, ref));\n /* An unknown reference is a failure an agent must be able to branch on, not a sentence on a success. */\n if (lines.length === 0) throw new Error(`nothing is recorded under \"${ref}\" — not a build task, and no recent run or question names it. List them with: wildo build tasks · wildo creation feed`);\n return { task: null, lines };\n },\n render: (result) => (result.task ? describeBuildTaskWhy(result.task) : result.lines.flatMap(describeFeedLine)),\n });\n }\n}\n"]}
1
+ {"version":3,"file":"why.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/why.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,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAC3L,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE3G;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAm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C,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;oBACzC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9H,CAAC;SACL,CAAC,CAAC;IACL,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 { BuildConsoleClient, describeBuildTaskWhy } from '~wildo-cli/services/companion/build-console.service';\nimport { CreationConsoleClient, describeFeedLine, describePlaybookStanding, feedLineNamesReference, locateInterviewInQueue } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/**\n * `wildo creation why <taskRef|runId|playbookRef>` — why a build task has not landed, or how a playbook\n * run ended (#1652).\n *\n * A build task is explained from its own record (status, stuck reason, what it waits on, what its\n * landing probes did not find, how its last attempt ended). A playbook run is explained from its feed\n * line, which already carries its error and the judge criteria that did not pass. A playbook ref is also\n * explained from the eligibility board — its unmet preconditions and its unanswered interview — so a\n * playbook that has never run, or is held now, has an answer too. Nothing is inferred.\n */\nexport default class CreationWhyCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation why',\n description: 'Why a build task has not landed, how a playbook run ended, or what holds a playbook now.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'ref', description: 'A build task ref, a playbook run id, or a playbook ref', required: true }],\n flags: { json: { type: 'boolean', description: 'Emit the record the answer is read from.', default: false } },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const ref = String(ctx.args.ref ?? '');\n return runConsoleVerb(ctx, {\n failureLabel: `Could not explain ${ref}`,\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: async (options) => {\n const tasks = await BuildConsoleClient.tasks(options);\n const task = tasks.records?.tasks.find((candidate) => candidate.taskRef === ref) ?? null;\n if (task) return { task, lines: null, standing: null, interview: null };\n /*\n * The board and the queue only ADD to the answer, so a failed read of either leaves the feed's answer\n * standing rather than failing a `why <runId>` that needs only the feed.\n */\n const [feed, board, queue] = await Promise.all([\n CreationConsoleClient.readFeed(options),\n CreationConsoleClient.readPlaybookBoard(options).catch(() => null),\n CreationConsoleClient.readQuestions(options).catch(() => null),\n ]);\n const lines = feed.lines.filter((line) => feedLineNamesReference(line, ref));\n const standing = board?.playbooks.find((entry) => entry.playbookRef === ref) ?? null;\n /* An unknown reference is a failure an agent must be able to branch on, not a sentence on a success. */\n if (lines.length === 0 && standing === null) {\n const scope = board === null ? 'not a build task, and no recent run or question names it (the playbook board could not be read)' : 'not a build task, not a playbook, and no recent run or question names it';\n throw new Error(`nothing is recorded under \"${ref}\" — ${scope}. List them with: wildo build tasks · wildo creation feed · wildo context journey`);\n }\n const interview = standing !== null && queue !== null ? locateInterviewInQueue(ref, standing.unansweredQuestionRefs ?? [], queue) : null;\n return { task: null, lines, standing, interview };\n },\n render: (result) => (result.task\n ? describeBuildTaskWhy(result.task)\n : [\n ...result.lines.flatMap(describeFeedLine),\n ...(result.standing ? describePlaybookStanding(result.standing, result.lines.length > 0, result.interview ?? undefined) : []),\n ]),\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"writes.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/creation/writes.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;AAI1F,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAMxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAavD"}
1
+ {"version":3,"file":"writes.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/writes.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;AAI1F,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAMxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAavD"}
@@ -1 +1 @@
1
- {"version":3,"file":"writes.command.js","sourceRoot":"","sources":["../../../../../../src/commands/creation/writes.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,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE3G,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IACnD,IAAI,GAAgB;QAC3B,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,gFAAgF;QAC7F,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;KAC9F,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,YAAY,EAAE,mCAAmC;YACjD,SAAS,EAAE,uBAAuB;YAClC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC;YACxD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;gBAC1C,CAAC,CAAC,CAAC,2CAA2C,CAAC;gBAC/C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;oBAC7B,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,EAAE,EAAE;oBAC7C,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;iBAC7F,CAAC;SACL,CAAC,CAAC;IACL,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 { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/** `wildo creation writes` — which files each playbook run wrote, newest first (#1652). */\nexport default class CreationWritesCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation writes',\n description: 'Which files each playbook run wrote — the runs you can diff, accept or revert.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: { json: { type: 'boolean', description: 'Emit the write register.', default: false } },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runConsoleVerb(ctx, {\n failureLabel: 'Could not read the write register',\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: (options) => CreationConsoleClient.writes(options),\n render: (result) => result.runs.length === 0\n ? ['No playbook run has written anything yet.']\n : result.runs.flatMap((run) => [\n `${run.runId} ${run.playbookRef} ${run.at}`,\n ...run.files.map((file) => ` ${file.existedBefore ? 'changed' : 'added '} ${file.path}`),\n ]),\n });\n }\n}\n"]}
1
+ {"version":3,"file":"writes.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/writes.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,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAE3G,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IACnD,IAAI,GAAgB;QAC3B,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,gFAAgF;QAC7F,QAAQ,EAAE,eAAe,CAAC,KAAK;QAC/B,YAAY,EAAE,cAAc,CAAC,QAAQ;QACrC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;KAC9F,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,YAAY,EAAE,mCAAmC;YACjD,SAAS,EAAE,uBAAuB;YAClC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC;YACxD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;gBAC1C,CAAC,CAAC,CAAC,2CAA2C,CAAC;gBAC/C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;oBAC7B,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,EAAE,EAAE;oBAC7C,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;iBAC7F,CAAC;SACL,CAAC,CAAC;IACL,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 { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, runConsoleVerb } from '~wildo-cli/services/companion/console-verb.utils';\n\n/** `wildo creation writes` — which files each playbook run wrote, newest first (#1652). */\nexport default class CreationWritesCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation writes',\n description: 'Which files each playbook run wrote — the runs you can diff, accept or revert.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: { json: { type: 'boolean', description: 'Emit the write register.', default: false } },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runConsoleVerb(ctx, {\n failureLabel: 'Could not read the write register',\n timeoutMs: CONSOLE_READ_TIMEOUT_MS,\n call: (options) => CreationConsoleClient.writes(options),\n render: (result) => result.runs.length === 0\n ? ['No playbook run has written anything yet.']\n : result.runs.flatMap((run) => [\n `${run.runId} ${run.playbookRef} ${run.at}`,\n ...run.files.map((file) => ` ${file.existedBefore ? 'changed' : 'added '} ${file.path}`),\n ]),\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"db-schema-plan-migration.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/db-schema-plan-migration.utils.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAIpC,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GAAG,0BAA0B,GAAG,IAAI,CAWpC"}
1
+ {"version":3,"file":"db-schema-plan-migration.utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/db-schema-plan-migration.utils.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AAIpC,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GAAG,0BAA0B,GAAG,IAAI,CAWpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"db-schema-plan-migration.utils.js","sourceRoot":"","sources":["../../../../../../src/commands/db/db-schema-plan-migration.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GAGnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAQlI;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAOxC;IACC,MAAM,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,MAAM,YAAY,GAAG,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACpG,MAAM,UAAU,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;IAClF,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;IAC/E,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,EAAE,YAAY,CAAC,CAAC;IACjE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC/E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AACjC,CAAC","sourcesContent":["/**\n * Writing a schema-plan migration: render the SQL that carries the accepted plan to the current one, and\n * advance the lockfile.\n *\n * Separate from `db-schema-plan.utils.ts` because it is the one schema-plan helper that needs\n * `@wildo-ai/saas-backend-lib` at run time (the plan differ and the SQL renderer). Keeping it apart keeps\n * that module, which `wildo secrets` reaches, free of the engine backend.\n */\nimport { mkdirSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n diffSchemaPlanLockfiles,\n renderMigrationSql,\n type SchemaPlanChange,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\n\nimport { LOCKFILE_RELATIVE_PATH, MIGRATIONS_RELATIVE_DIR, migrationTimestamp } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\n/** What {@link writeSchemaPlanMigration} wrote, for the caller to report. */\nexport interface SchemaPlanMigrationWritten {\n readonly folderName: string;\n readonly changes: readonly SchemaPlanChange[];\n}\n\n/**\n * Render the migration that carries `accepted` to `current`, and advance the lockfile — in ONE call.\n *\n * The two writes are here together deliberately: a migration folder without its advanced lockfile (or\n * the reverse) is the two-artifact drift the whole design exists to prevent, and it is exactly what a\n * second implementation of this step would eventually produce. `wildo db generate` and `wildo init`'s\n * INITIAL migration (a PostgreSQL application's tables exist only once a migration creates them, so a\n * scaffolded one ships with its first migration) are both callers.\n *\n * Returns `null` when the two plans agree — a clean plan is a legitimate outcome, not a failure. The\n * renderer's own refusals (a primary-key MOVE or DROP) are thrown through verbatim: they carry their\n * reasoning, and this function has nothing truer to say about them.\n */\nexport function writeSchemaPlanMigration(input: {\n saasRoot: string;\n name: string;\n accepted: SchemaPlanLockfile;\n current: SchemaPlanLockfile;\n currentJson: string;\n now?: Date;\n}): SchemaPlanMigrationWritten | null {\n const changes = diffSchemaPlanLockfiles(input.accepted, input.current);\n if (changes.length === 0) return null;\n\n const migrationSql = renderMigrationSql({ changes, previous: input.accepted, next: input.current });\n const folderName = `${migrationTimestamp(input.now ?? new Date())}_${input.name}`;\n const migrationDir = join(input.saasRoot, MIGRATIONS_RELATIVE_DIR, folderName);\n mkdirSync(migrationDir, { recursive: true });\n writeFileSync(join(migrationDir, 'migration.sql'), migrationSql);\n writeFileSync(join(input.saasRoot, LOCKFILE_RELATIVE_PATH), input.currentJson);\n return { folderName, changes };\n}\n"]}
1
+ {"version":3,"file":"db-schema-plan-migration.utils.js","sourceRoot":"","sources":["../../../../src/commands/db/db-schema-plan-migration.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GAGnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAQlI;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAOxC;IACC,MAAM,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,MAAM,YAAY,GAAG,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACpG,MAAM,UAAU,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;IAClF,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;IAC/E,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,EAAE,YAAY,CAAC,CAAC;IACjE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC/E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AACjC,CAAC","sourcesContent":["/**\n * Writing a schema-plan migration: render the SQL that carries the accepted plan to the current one, and\n * advance the lockfile.\n *\n * Separate from `db-schema-plan.utils.ts` because it is the one schema-plan helper that needs\n * `@wildo-ai/saas-backend-lib` at run time (the plan differ and the SQL renderer). Keeping it apart keeps\n * that module, which `wildo secrets` reaches, free of the engine backend.\n */\nimport { mkdirSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n diffSchemaPlanLockfiles,\n renderMigrationSql,\n type SchemaPlanChange,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\n\nimport { LOCKFILE_RELATIVE_PATH, MIGRATIONS_RELATIVE_DIR, migrationTimestamp } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\n/** What {@link writeSchemaPlanMigration} wrote, for the caller to report. */\nexport interface SchemaPlanMigrationWritten {\n readonly folderName: string;\n readonly changes: readonly SchemaPlanChange[];\n}\n\n/**\n * Render the migration that carries `accepted` to `current`, and advance the lockfile — in ONE call.\n *\n * The two writes are here together deliberately: a migration folder without its advanced lockfile (or\n * the reverse) is the two-artifact drift the whole design exists to prevent, and it is exactly what a\n * second implementation of this step would eventually produce. `wildo db generate` and `wildo init`'s\n * INITIAL migration (a PostgreSQL application's tables exist only once a migration creates them, so a\n * scaffolded one ships with its first migration) are both callers.\n *\n * Returns `null` when the two plans agree — a clean plan is a legitimate outcome, not a failure. The\n * renderer's own refusals (a primary-key MOVE or DROP) are thrown through verbatim: they carry their\n * reasoning, and this function has nothing truer to say about them.\n */\nexport function writeSchemaPlanMigration(input: {\n saasRoot: string;\n name: string;\n accepted: SchemaPlanLockfile;\n current: SchemaPlanLockfile;\n currentJson: string;\n now?: Date;\n}): SchemaPlanMigrationWritten | null {\n const changes = diffSchemaPlanLockfiles(input.accepted, input.current);\n if (changes.length === 0) return null;\n\n const migrationSql = renderMigrationSql({ changes, previous: input.accepted, next: input.current });\n const folderName = `${migrationTimestamp(input.now ?? new Date())}_${input.name}`;\n const migrationDir = join(input.saasRoot, MIGRATIONS_RELATIVE_DIR, folderName);\n mkdirSync(migrationDir, { recursive: true });\n writeFileSync(join(migrationDir, 'migration.sql'), migrationSql);\n writeFileSync(join(input.saasRoot, LOCKFILE_RELATIVE_PATH), input.currentJson);\n return { folderName, changes };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"db-schema-plan.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/db-schema-plan.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,QAA6D,CAAC;AACjG,eAAO,MAAM,uBAAuB,QAAoC,CAAC;AACzE,eAAO,MAAM,8BAA8B,QAA6D,CAAC;AAEzG;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAuB1C;AAED;;;;GAIG;AACH,QAAA,MAAM,uBAAuB,wCAAyC,CA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M,UAAU,kBAAkB,CAAC,GAAS;IAC1C,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtE,OAAO,GAAG,GAAG,CAAC,cAAc,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,EAAE;UACjF,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Shared plumbing for the `wildo db *` command family.\n *\n * ONE implementation of \"compute the application's CURRENT schema-plan lockfile\", because two\n * commands (`diff`, `generate`) computing it independently is how the diff you reviewed and the\n * migration you generated come from different models. See `diff.command.ts` for the architecture\n * rationale (spawned runner inside backend-api's node_modules — pnpm resolution universe).\n */\n\nimport { spawnSync } from 'node:child_process';\nimport { randomUUID } from 'node:crypto';\nimport { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'fs';\nimport { join, resolve } from 'path';\n/*\n * TYPES only. This module is imported by `wildo secrets` (through `application-secret-owners.service`) for\n * the backend-workspace helpers, and a runtime import of `@wildo-ai/saas-backend-lib` here made every\n * secrets command load the whole engine backend (~6 s). The one function that needs the engine at run\n * time, `writeSchemaPlanMigration`, lives in `db-schema-plan-migration.utils.ts`.\n */\nimport type { SchemaPlanLockfile } from '@wildo-ai/saas-backend-lib';\nimport type { CommandContext } from '~wildo-cli/kernel/types';\n\n/** Beside the migrations folder — the lockfile IS that folder's accepted-state marker. */\nexport const LOCKFILE_RELATIVE_PATH = join('backend-api', 'migrations', 'schema-plan.lock.json');\nexport const MIGRATIONS_RELATIVE_DIR = join('backend-api', 'migrations');\nexport const MODULES_REGISTRY_RELATIVE_PATH = join('backend-api', 'dist', 'modules-registry.backend.js');\n\n/**\n * The runner is REGENERATED on every invocation rather than shipped as a file, so it can never\n * drift from the command that spawns it — and it is written INSIDE `backend-api/node_modules/`\n * (`.wildo-db-diff/runner.mjs`), which is the load-bearing part: under pnpm's strict layout, a\n * module resolves only what its OWN walk-up reaches, and `.wildo-saas/tmp/` reaches the workspace\n * root's node_modules where `reflect-metadata` and the engine are NOT linked (measured — the first\n * location tried). From inside backend-api's node_modules the runner shares exactly the resolution\n * universe of the modules-registry it imports.\n */\nexport function buildRunnerSource(): string {\n return `// GENERATED by \\`wildo db diff\\` — regenerated on every run; safe to delete.\nimport 'reflect-metadata';\nimport { pathToFileURL } from 'node:url';\nimport { writeFileSync } from 'node:fs';\n\nconst modulesRegistry = await import(pathToFileURL(process.env.WILDO_DB_DIFF_MODULES_REGISTRY).href);\nconst engine = await import('@wildo-ai/saas-backend-lib');\n\nconst initConfig = modulesRegistry.buildApplicationInitializationConfig();\nconst { resourceConfigurations, planner } = await engine.createStandaloneSchemaPlanning({\n customSharedResourceConfigurations: initConfig.sharedResourceConfigurations,\n customSharedResourceFieldIdentifiers: initConfig.sharedResourceFieldIdentifiers,\n customSharedResourceRelationships: initConfig.sharedResourceRelationships,\n customBackendResourceConfigurations: initConfig.backendResourceConfigurations,\n customBackendResourceFieldIdentifiers: initConfig.backendResourceFieldIdentifiers,\n customBackendResourceRelationships: initConfig.backendResourceRelationships,\n});\nconst lockfile = engine.buildSchemaPlanLockfile({ resourceConfigurations, planner });\n// A FILE, not stdout: the logger and the registry's own warnings write to stdout, and JSON fished\n// out of a log stream is a parser bug waiting for its first warning.\nwriteFileSync(process.env.WILDO_DB_DIFF_OUTPUT, engine.renderSchemaPlanLockfileJson(lockfile));\n`;\n}\n\n/**\n * The application packages whose COMPILED output the schema-plan runner imports, and where each keeps its sources.\n * `backend-api/dist/modules-registry.backend.js` is the entry, and it reaches the resource model through\n * `shared-lib`'s dist, so both must be current for the plan to describe the model a developer or an agent edited.\n */\nconst COMPILED_MODEL_PACKAGES = ['shared-lib', 'backend-api'] as const;\n\n/** Where `wildo local dev`'s per-package compile observer records what the compiler did. */\nconst COMPILE_OBSERVATIONS_RELATIVE_DIR = join('.wildo-saas', 'runtime-signals', 'compilers');\n\n/** The two instants an observation carries that answer \"did the compiler finish, and did it finish well?\". */\ninterface ObservedPackageCompile {\n readonly lastSuccessfulCompileMs: number | null;\n readonly lastFailureMs: number | null;\n}\n\n/** `Date.parse` that answers `null` rather than `NaN`, so a missing and an unparseable instant read the same. */\nfunction parseInstantMs(value: unknown): number | null {\n if (typeof value !== 'string') return null;\n const parsed = Date.parse(value);\n return Number.isNaN(parsed) ? null : parsed;\n}\n\n/**\n * What the local-dev compile observer last recorded for one application package, or `undefined` when nothing\n * observed it (no `wildo local dev`, or an application whose packages another tool builds).\n *\n * Matched on `packageRoot`, never on the package NAME: the name is the application's to choose and differs per\n * application, while the path is the one fact the observer and this command already agree on.\n */\nfunction readObservedPackageCompile(saasRoot: string, packageDirectory: string): ObservedPackageCompile | undefined {\n const directory = join(saasRoot, COMPILE_OBSERVATIONS_RELATIVE_DIR);\n if (!existsSync(directory)) return undefined;\n const packageRoot = resolve(saasRoot, packageDirectory);\n for (const entry of readdirSync(directory)) {\n if (!entry.endsWith('.json')) continue;\n try {\n const observation = JSON.parse(readFileSync(join(directory, entry), 'utf-8')) as Record<string, unknown>;\n if (typeof observation.packageRoot !== 'string' || resolve(observation.packageRoot) !== packageRoot) continue;\n return {\n lastSuccessfulCompileMs: parseInstantMs(observation.lastSuccessfulCompileAt),\n lastFailureMs: parseInstantMs(observation.lastFailureAt),\n };\n } catch {\n continue; // A half-written status file is not evidence in either direction.\n }\n }\n return undefined;\n}\n\n/** Newest mtime of any file with one of `extensions` under `directory` (dotted dirs and node_modules skipped), or 0. */\nfunction newestMtimeMs(directory: string, extensions: readonly string[], skip: readonly string[]): number {\n if (!existsSync(directory)) return 0;\n let newest = 0;\n const walk = (current: string): void => {\n for (const entry of readdirSync(current, { withFileTypes: true })) {\n if (entry.name === 'node_modules' || entry.name.startsWith('.') || skip.includes(entry.name)) continue;\n const path = join(current, entry.name);\n if (entry.isDirectory()) {\n walk(path);\n continue;\n }\n if (!extensions.some((extension) => entry.name.endsWith(extension))) continue;\n const mtime = statSync(path).mtimeMs;\n if (mtime > newest) newest = mtime;\n }\n };\n walk(directory);\n return newest;\n}\n\n/** Whether the compiled model the runner imports is current, and if not, which package is behind. */\nexport type CompiledModelCurrency =\n | { current: true }\n | {\n current: false;\n stalePackage: (typeof COMPILED_MODEL_PACKAGES)[number];\n newestSourceMs: number;\n newestCompiledMs: number;\n /** Set when the observer recorded a FAILED compile after its last success: waiting cannot fix that one. */\n observedCompileFailedMs?: number;\n };\n\n/**\n * Is the compiled model CURRENT enough to plan from?\n *\n * ## Why every schema-plan answer needs this, not only the development door\n *\n * The plan is computed from `dist`, so a dist older than its sources answers about a model that no longer exists —\n * and it answers CONFIDENTLY. On 2026-09-14 an application-creation build loop enriched a contact schema; the\n * package's watcher had died, `shared-lib/dist` still described the old contact, and `wildo db diff --check` reported\n * \"in sync\". The build loop reads exactly that answer to decide whether a migration is owed, so the migration step\n * was marked landed with drift on disk (#403). The development door already skipped on a stale model; `diff` and\n * `generate` did not.\n *\n * ## Per package, newest against newest\n *\n * Each package's newest compiled file is compared with ITS OWN newest source. Comparing one backend file against\n * every source would read a shared-lib-only schema edit as stale forever, because it does not re-emit that backend\n * file. Conservative in one direction only: a false \"stale\" costs a refused plan and a sentence naming the package;\n * a false \"current\" authors, or waives, a migration for a model nobody has. A package with sources and no compiled\n * output is stale.\n */\nexport function assessCompiledModelCurrency(saasRoot: string): CompiledModelCurrency {\n for (const packageDirectory of COMPILED_MODEL_PACKAGES) {\n const newestSourceMs = newestMtimeMs(join(saasRoot, packageDirectory, 'src'), ['.ts', '.tsx'], ['dist', '__tests__']);\n if (newestSourceMs === 0) continue;\n const newestCompiledMs = newestMtimeMs(join(saasRoot, packageDirectory, 'dist'), ['.js', '.d.ts'], []);\n if (newestCompiledMs >= newestSourceMs) continue;\n // No compiled output at all is stale whatever any observer says — there is nothing to plan from.\n if (newestCompiledMs === 0) {\n return { current: false, stalePackage: packageDirectory, newestSourceMs, newestCompiledMs };\n }\n /*\n * An emitted file's mtime CANNOT rise for a compile that re-emitted nothing — a comment-only edit, or a file\n * re-typed to byte-identical JavaScript — so the mtime basis alone refuses such a package forever, and the\n * remedy it names (\"wait for the watcher\") can never arrive. Measured 2026-09-16 on Wonder CRM: the build\n * lane's `database-migrations` step could not ask its question while `shared-lib` was compiled, successful and\n * genuinely current, because the file the coding run touched produced identical output.\n *\n * The observer's record is the compiler FINISHING, which is the fact the mtimes were standing in for. It\n * cannot reopen the #403 hole this guard exists for: a watcher that died BEFORE the edit has its last success\n * earlier than the newest source, so that case stays stale here. A compile that failed after its last success\n * is stale too, and says so — \"wait for the watcher\" is the wrong instruction for a red compiler.\n */\n const observed = readObservedPackageCompile(saasRoot, packageDirectory);\n const successMs = observed?.lastSuccessfulCompileMs ?? null;\n const failureMs = observed?.lastFailureMs ?? null;\n const failedSinceThatSuccess = successMs !== null && failureMs !== null && failureMs > successMs;\n if (successMs !== null && successMs >= newestSourceMs && !failedSinceThatSuccess) continue;\n return {\n current: false,\n stalePackage: packageDirectory,\n newestSourceMs,\n newestCompiledMs,\n ...(failedSinceThatSuccess && failureMs !== null ? { observedCompileFailedMs: failureMs } : {}),\n };\n }\n return { current: true };\n}\n\n/** One sentence naming the stale package, shared by every door that refuses on it. */\nexport function describeStaleCompiledModel(staleness: Extract<CompiledModelCurrency, { current: false }>): string {\n const compiled = staleness.newestCompiledMs === 0 ? 'has no compiled output' : `was compiled at ${new Date(staleness.newestCompiledMs).toISOString()}`;\n const base = `${staleness.stalePackage}/dist is older than its sources (newest source ${new Date(staleness.newestSourceMs).toISOString()}; dist ${compiled}), `\n + 'so the schema plan it describes is not the model that was edited. This is NOT drift: ';\n return staleness.observedCompileFailedMs === undefined\n ? `${base}wait for the watcher to rebuild (or rebuild the package) and ask again.`\n : `${base}that package's last compile FAILED at ${new Date(staleness.observedCompileFailedMs).toISOString()} — `\n + 'read its compiler output and fix the build; waiting will not clear this one.';\n}\n\n/** Spawn the app-workspace runner; returns the canonical lockfile JSON, or undefined on failure. */\nexport function computeCurrentLockfileJson(ctx: CommandContext, saasRoot: string): string | undefined {\n // Refuse a stale model before planning from it (#403) — every `wildo db` answer comes through here.\n const currency = assessCompiledModelCurrency(saasRoot);\n if (currency.current === false) {\n ctx.log.error(`Cannot compute the current schema plan: ${describeStaleCompiledModel(currency)}`);\n return undefined;\n }\n\n const modulesRegistryPath = join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH);\n if (!existsSync(modulesRegistryPath)) {\n ctx.log.error(\n `Cannot compute the current schema plan: ${modulesRegistryPath} does not exist.\\n`\n + ' The app backend must be BUILT (its dist is what the runner imports). Under `wildo local dev` the '\n + 'watcher maintains it; otherwise build backend-api first.',\n );\n return undefined;\n }\n\n const run = runInApplicationBackendWorkspace({\n saasRoot,\n directoryName: '.wildo-db-diff',\n runnerSource: buildRunnerSource(),\n env: { WILDO_DB_DIFF_MODULES_REGISTRY: modulesRegistryPath },\n outputEnvKey: 'WILDO_DB_DIFF_OUTPUT',\n outputFileName: 'lockfile.json',\n // Registry construction over ~90 resources is seconds; minutes means a hung import.\n timeoutMs: 300_000,\n });\n if ('failure' in run) {\n ctx.log.error(`The schema-plan runner failed inside the app workspace:\\n${run.failure}`);\n return undefined;\n }\n return run.output;\n}\n\n/**\n * Run a generated ES module INSIDE the application backend's resolution universe and read back the one file\n * it writes — the step `wildo db` plans through and `wildo secrets` reads the declared inbound endpoints\n * through (#1637). One implementation, so the placement reasoning below is not re-derived per caller.\n *\n * Inside `backend-api/node_modules` ON PURPOSE — see `diff.command.ts`. Gitignored by nature, removed in\n * `finally`, regenerated per run.\n *\n * ONE DIRECTORY PER RUN. A shared directory let two concurrent runs in one application (two sessions, or\n * `check:schema-plan-drift` beside a `db generate`) delete each other's runner and output mid-run, surfacing\n * as `ENOENT … lockfile.json` — a failure that names neither cause. Resolution is unchanged: from a\n * subdirectory, Node's walk-up still reaches backend-api's node_modules, which is the only thing this\n * placement exists for.\n *\n * The answer travels through a FILE, never stdout: the logger and the registry's own warnings write to\n * stdout, and JSON fished out of a log stream is a parser bug waiting for its first warning.\n */\nexport function runInApplicationBackendWorkspace(input: {\n readonly saasRoot: string;\n /** A dot-directory under `backend-api/node_modules`, naming the caller so a leftover says whose it is. */\n readonly directoryName: string;\n readonly runnerSource: string;\n /** Variables the runner reads, beside the one naming its output file. */\n readonly env: Readonly<Record<string, string>>;\n /** The variable carrying the output file's path to the runner. */\n readonly outputEnvKey: string;\n readonly outputFileName: string;\n readonly timeoutMs: number;\n}): { readonly output: string } | { readonly failure: string } {\n const runnerDir = join(input.saasRoot, 'backend-api', 'node_modules', input.directoryName, `${process.pid}-${randomUUID()}`);\n mkdirSync(runnerDir, { recursive: true });\n const runnerPath = join(runnerDir, 'runner.mjs');\n const outputPath = join(runnerDir, input.outputFileName);\n writeFileSync(runnerPath, input.runnerSource);\n rmSync(outputPath, { force: true });\n\n try {\n const result = spawnSync(process.execPath, [runnerPath], {\n cwd: join(input.saasRoot, 'backend-api'),\n env: { ...process.env, ...input.env, [input.outputEnvKey]: outputPath },\n encoding: 'utf-8',\n timeout: input.timeoutMs,\n });\n if (result.status !== 0 || !existsSync(outputPath)) {\n return { failure: (result.stderr ?? '').slice(-2000) || (result.stdout ?? '').slice(-2000) || `exit status ${result.status}` };\n }\n return { output: readFileSync(outputPath, 'utf-8') };\n } finally {\n rmSync(runnerDir, { recursive: true, force: true });\n }\n}\n\n/**\n * The sortable prefix every migration folder carries: `20260916T113045_<name>`.\n *\n * UTC and second-resolution, so two machines generating on the same day sort the same way and a\n * reviewer reads the order off the directory listing.\n */\nexport function migrationTimestamp(now: Date): string {\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${now.getUTCFullYear()}${pad(now.getUTCMonth() + 1)}${pad(now.getUTCDate())}`\n + `T${pad(now.getUTCHours())}${pad(now.getUTCMinutes())}${pad(now.getUTCSeconds())}`;\n}\n"]}
1
+ {"version":3,"file":"db-schema-plan.utils.js","sourceRoot":"","sources":["../../../../src/commands/db/db-schema-plan.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACvG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAUrC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,uBAAuB,CAAC,CAAC;AACjG,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,6BAA6B,CAAC,CAAC;AAEzG;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,CAAC,YAAY,EAAE,aAAa,CAAU,CAAC;AAEvE,4FAA4F;AAC5F,MAAM,iCAAiC,GAAG,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;AAQ9F,iHAAiH;AACjH,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,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OAAO,EAAE,KAAK,CAAC,SAAS;SACzB,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACnD,OAAO,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;QACjI,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;IACvD,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAS;IAC1C,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtE,OAAO,GAAG,GAAG,CAAC,cAAc,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,EAAE;UACjF,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Shared plumbing for the `wildo db *` command family.\n *\n * ONE implementation of \"compute the application's CURRENT schema-plan lockfile\", because two\n * commands (`diff`, `generate`) computing it independently is how the diff you reviewed and the\n * migration you generated come from different models. See `diff.command.ts` for the architecture\n * rationale (spawned runner inside backend-api's node_modules — pnpm resolution universe).\n */\n\nimport { spawnSync } from 'node:child_process';\nimport { randomUUID } from 'node:crypto';\nimport { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'fs';\nimport { join, resolve } from 'path';\n/*\n * TYPES only. This module is imported by `wildo secrets` (through `application-secret-owners.service`) for\n * the backend-workspace helpers, and a runtime import of `@wildo-ai/saas-backend-lib` here made every\n * secrets command load the whole engine backend (~6 s). The one function that needs the engine at run\n * time, `writeSchemaPlanMigration`, lives in `db-schema-plan-migration.utils.ts`.\n */\nimport type { SchemaPlanLockfile } from '@wildo-ai/saas-backend-lib';\nimport type { CommandContext } from '~wildo-cli/kernel/types';\n\n/** Beside the migrations folder — the lockfile IS that folder's accepted-state marker. */\nexport const LOCKFILE_RELATIVE_PATH = join('backend-api', 'migrations', 'schema-plan.lock.json');\nexport const MIGRATIONS_RELATIVE_DIR = join('backend-api', 'migrations');\nexport const MODULES_REGISTRY_RELATIVE_PATH = join('backend-api', 'dist', 'modules-registry.backend.js');\n\n/**\n * The runner is REGENERATED on every invocation rather than shipped as a file, so it can never\n * drift from the command that spawns it — and it is written INSIDE `backend-api/node_modules/`\n * (`.wildo-db-diff/runner.mjs`), which is the load-bearing part: under pnpm's strict layout, a\n * module resolves only what its OWN walk-up reaches, and `.wildo-saas/tmp/` reaches the workspace\n * root's node_modules where `reflect-metadata` and the engine are NOT linked (measured — the first\n * location tried). From inside backend-api's node_modules the runner shares exactly the resolution\n * universe of the modules-registry it imports.\n */\nexport function buildRunnerSource(): string {\n return `// GENERATED by \\`wildo db diff\\` — regenerated on every run; safe to delete.\nimport 'reflect-metadata';\nimport { pathToFileURL } from 'node:url';\nimport { writeFileSync } from 'node:fs';\n\nconst modulesRegistry = await import(pathToFileURL(process.env.WILDO_DB_DIFF_MODULES_REGISTRY).href);\nconst engine = await import('@wildo-ai/saas-backend-lib');\n\nconst initConfig = modulesRegistry.buildApplicationInitializationConfig();\nconst { resourceConfigurations, planner } = await engine.createStandaloneSchemaPlanning({\n customSharedResourceConfigurations: initConfig.sharedResourceConfigurations,\n customSharedResourceFieldIdentifiers: initConfig.sharedResourceFieldIdentifiers,\n customSharedResourceRelationships: initConfig.sharedResourceRelationships,\n customBackendResourceConfigurations: initConfig.backendResourceConfigurations,\n customBackendResourceFieldIdentifiers: initConfig.backendResourceFieldIdentifiers,\n customBackendResourceRelationships: initConfig.backendResourceRelationships,\n});\nconst lockfile = engine.buildSchemaPlanLockfile({ resourceConfigurations, planner });\n// A FILE, not stdout: the logger and the registry's own warnings write to stdout, and JSON fished\n// out of a log stream is a parser bug waiting for its first warning.\nwriteFileSync(process.env.WILDO_DB_DIFF_OUTPUT, engine.renderSchemaPlanLockfileJson(lockfile));\n`;\n}\n\n/**\n * The application packages whose COMPILED output the schema-plan runner imports, and where each keeps its sources.\n * `backend-api/dist/modules-registry.backend.js` is the entry, and it reaches the resource model through\n * `shared-lib`'s dist, so both must be current for the plan to describe the model a developer or an agent edited.\n */\nconst COMPILED_MODEL_PACKAGES = ['shared-lib', 'backend-api'] as const;\n\n/** Where `wildo local dev`'s per-package compile observer records what the compiler did. */\nconst COMPILE_OBSERVATIONS_RELATIVE_DIR = join('.wildo-saas', 'runtime-signals', 'compilers');\n\n/** The two instants an observation carries that answer \"did the compiler finish, and did it finish well?\". */\ninterface ObservedPackageCompile {\n readonly lastSuccessfulCompileMs: number | null;\n readonly lastFailureMs: number | null;\n}\n\n/** `Date.parse` that answers `null` rather than `NaN`, so a missing and an unparseable instant read the same. */\nfunction parseInstantMs(value: unknown): number | null {\n if (typeof value !== 'string') return null;\n const parsed = Date.parse(value);\n return Number.isNaN(parsed) ? null : parsed;\n}\n\n/**\n * What the local-dev compile observer last recorded for one application package, or `undefined` when nothing\n * observed it (no `wildo local dev`, or an application whose packages another tool builds).\n *\n * Matched on `packageRoot`, never on the package NAME: the name is the application's to choose and differs per\n * application, while the path is the one fact the observer and this command already agree on.\n */\nfunction readObservedPackageCompile(saasRoot: string, packageDirectory: string): ObservedPackageCompile | undefined {\n const directory = join(saasRoot, COMPILE_OBSERVATIONS_RELATIVE_DIR);\n if (!existsSync(directory)) return undefined;\n const packageRoot = resolve(saasRoot, packageDirectory);\n for (const entry of readdirSync(directory)) {\n if (!entry.endsWith('.json')) continue;\n try {\n const observation = JSON.parse(readFileSync(join(directory, entry), 'utf-8')) as Record<string, unknown>;\n if (typeof observation.packageRoot !== 'string' || resolve(observation.packageRoot) !== packageRoot) continue;\n return {\n lastSuccessfulCompileMs: parseInstantMs(observation.lastSuccessfulCompileAt),\n lastFailureMs: parseInstantMs(observation.lastFailureAt),\n };\n } catch {\n continue; // A half-written status file is not evidence in either direction.\n }\n }\n return undefined;\n}\n\n/** Newest mtime of any file with one of `extensions` under `directory` (dotted dirs and node_modules skipped), or 0. */\nfunction newestMtimeMs(directory: string, extensions: readonly string[], skip: readonly string[]): number {\n if (!existsSync(directory)) return 0;\n let newest = 0;\n const walk = (current: string): void => {\n for (const entry of readdirSync(current, { withFileTypes: true })) {\n if (entry.name === 'node_modules' || entry.name.startsWith('.') || skip.includes(entry.name)) continue;\n const path = join(current, entry.name);\n if (entry.isDirectory()) {\n walk(path);\n continue;\n }\n if (!extensions.some((extension) => entry.name.endsWith(extension))) continue;\n const mtime = statSync(path).mtimeMs;\n if (mtime > newest) newest = mtime;\n }\n };\n walk(directory);\n return newest;\n}\n\n/** Whether the compiled model the runner imports is current, and if not, which package is behind. */\nexport type CompiledModelCurrency =\n | { current: true }\n | {\n current: false;\n stalePackage: (typeof COMPILED_MODEL_PACKAGES)[number];\n newestSourceMs: number;\n newestCompiledMs: number;\n /** Set when the observer recorded a FAILED compile after its last success: waiting cannot fix that one. */\n observedCompileFailedMs?: number;\n };\n\n/**\n * Is the compiled model CURRENT enough to plan from?\n *\n * ## Why every schema-plan answer needs this, not only the development door\n *\n * The plan is computed from `dist`, so a dist older than its sources answers about a model that no longer exists —\n * and it answers CONFIDENTLY. On 2026-09-14 an application-creation build loop enriched a contact schema; the\n * package's watcher had died, `shared-lib/dist` still described the old contact, and `wildo db diff --check` reported\n * \"in sync\". The build loop reads exactly that answer to decide whether a migration is owed, so the migration step\n * was marked landed with drift on disk (#403). The development door already skipped on a stale model; `diff` and\n * `generate` did not.\n *\n * ## Per package, newest against newest\n *\n * Each package's newest compiled file is compared with ITS OWN newest source. Comparing one backend file against\n * every source would read a shared-lib-only schema edit as stale forever, because it does not re-emit that backend\n * file. Conservative in one direction only: a false \"stale\" costs a refused plan and a sentence naming the package;\n * a false \"current\" authors, or waives, a migration for a model nobody has. A package with sources and no compiled\n * output is stale.\n */\nexport function assessCompiledModelCurrency(saasRoot: string): CompiledModelCurrency {\n for (const packageDirectory of COMPILED_MODEL_PACKAGES) {\n const newestSourceMs = newestMtimeMs(join(saasRoot, packageDirectory, 'src'), ['.ts', '.tsx'], ['dist', '__tests__']);\n if (newestSourceMs === 0) continue;\n const newestCompiledMs = newestMtimeMs(join(saasRoot, packageDirectory, 'dist'), ['.js', '.d.ts'], []);\n if (newestCompiledMs >= newestSourceMs) continue;\n // No compiled output at all is stale whatever any observer says — there is nothing to plan from.\n if (newestCompiledMs === 0) {\n return { current: false, stalePackage: packageDirectory, newestSourceMs, newestCompiledMs };\n }\n /*\n * An emitted file's mtime CANNOT rise for a compile that re-emitted nothing — a comment-only edit, or a file\n * re-typed to byte-identical JavaScript — so the mtime basis alone refuses such a package forever, and the\n * remedy it names (\"wait for the watcher\") can never arrive. Measured 2026-09-16 on Wonder CRM: the build\n * lane's `database-migrations` step could not ask its question while `shared-lib` was compiled, successful and\n * genuinely current, because the file the coding run touched produced identical output.\n *\n * The observer's record is the compiler FINISHING, which is the fact the mtimes were standing in for. It\n * cannot reopen the #403 hole this guard exists for: a watcher that died BEFORE the edit has its last success\n * earlier than the newest source, so that case stays stale here. A compile that failed after its last success\n * is stale too, and says so — \"wait for the watcher\" is the wrong instruction for a red compiler.\n */\n const observed = readObservedPackageCompile(saasRoot, packageDirectory);\n const successMs = observed?.lastSuccessfulCompileMs ?? null;\n const failureMs = observed?.lastFailureMs ?? null;\n const failedSinceThatSuccess = successMs !== null && failureMs !== null && failureMs > successMs;\n if (successMs !== null && successMs >= newestSourceMs && !failedSinceThatSuccess) continue;\n return {\n current: false,\n stalePackage: packageDirectory,\n newestSourceMs,\n newestCompiledMs,\n ...(failedSinceThatSuccess && failureMs !== null ? { observedCompileFailedMs: failureMs } : {}),\n };\n }\n return { current: true };\n}\n\n/** One sentence naming the stale package, shared by every door that refuses on it. */\nexport function describeStaleCompiledModel(staleness: Extract<CompiledModelCurrency, { current: false }>): string {\n const compiled = staleness.newestCompiledMs === 0 ? 'has no compiled output' : `was compiled at ${new Date(staleness.newestCompiledMs).toISOString()}`;\n const base = `${staleness.stalePackage}/dist is older than its sources (newest source ${new Date(staleness.newestSourceMs).toISOString()}; dist ${compiled}), `\n + 'so the schema plan it describes is not the model that was edited. This is NOT drift: ';\n return staleness.observedCompileFailedMs === undefined\n ? `${base}wait for the watcher to rebuild (or rebuild the package) and ask again.`\n : `${base}that package's last compile FAILED at ${new Date(staleness.observedCompileFailedMs).toISOString()} — `\n + 'read its compiler output and fix the build; waiting will not clear this one.';\n}\n\n/** Spawn the app-workspace runner; returns the canonical lockfile JSON, or undefined on failure. */\nexport function computeCurrentLockfileJson(ctx: CommandContext, saasRoot: string): string | undefined {\n // Refuse a stale model before planning from it (#403) — every `wildo db` answer comes through here.\n const currency = assessCompiledModelCurrency(saasRoot);\n if (currency.current === false) {\n ctx.log.error(`Cannot compute the current schema plan: ${describeStaleCompiledModel(currency)}`);\n return undefined;\n }\n\n const modulesRegistryPath = join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH);\n if (!existsSync(modulesRegistryPath)) {\n ctx.log.error(\n `Cannot compute the current schema plan: ${modulesRegistryPath} does not exist.\\n`\n + ' The app backend must be BUILT (its dist is what the runner imports). Under `wildo local dev` the '\n + 'watcher maintains it; otherwise build backend-api first.',\n );\n return undefined;\n }\n\n const run = runInApplicationBackendWorkspace({\n saasRoot,\n directoryName: '.wildo-db-diff',\n runnerSource: buildRunnerSource(),\n env: { WILDO_DB_DIFF_MODULES_REGISTRY: modulesRegistryPath },\n outputEnvKey: 'WILDO_DB_DIFF_OUTPUT',\n outputFileName: 'lockfile.json',\n // Registry construction over ~90 resources is seconds; minutes means a hung import.\n timeoutMs: 300_000,\n });\n if ('failure' in run) {\n ctx.log.error(`The schema-plan runner failed inside the app workspace:\\n${run.failure}`);\n return undefined;\n }\n return run.output;\n}\n\n/**\n * Run a generated ES module INSIDE the application backend's resolution universe and read back the one file\n * it writes — the step `wildo db` plans through and `wildo secrets` reads the declared inbound endpoints\n * through (#1637). One implementation, so the placement reasoning below is not re-derived per caller.\n *\n * Inside `backend-api/node_modules` ON PURPOSE — see `diff.command.ts`. Gitignored by nature, removed in\n * `finally`, regenerated per run.\n *\n * ONE DIRECTORY PER RUN. A shared directory let two concurrent runs in one application (two sessions, or\n * `check:schema-plan-drift` beside a `db generate`) delete each other's runner and output mid-run, surfacing\n * as `ENOENT … lockfile.json` — a failure that names neither cause. Resolution is unchanged: from a\n * subdirectory, Node's walk-up still reaches backend-api's node_modules, which is the only thing this\n * placement exists for.\n *\n * The answer travels through a FILE, never stdout: the logger and the registry's own warnings write to\n * stdout, and JSON fished out of a log stream is a parser bug waiting for its first warning.\n */\nexport function runInApplicationBackendWorkspace(input: {\n readonly saasRoot: string;\n /** A dot-directory under `backend-api/node_modules`, naming the caller so a leftover says whose it is. */\n readonly directoryName: string;\n readonly runnerSource: string;\n /** Variables the runner reads, beside the one naming its output file. */\n readonly env: Readonly<Record<string, string>>;\n /** The variable carrying the output file's path to the runner. */\n readonly outputEnvKey: string;\n readonly outputFileName: string;\n readonly timeoutMs: number;\n}): { readonly output: string } | { readonly failure: string } {\n const runnerDir = join(input.saasRoot, 'backend-api', 'node_modules', input.directoryName, `${process.pid}-${randomUUID()}`);\n mkdirSync(runnerDir, { recursive: true });\n const runnerPath = join(runnerDir, 'runner.mjs');\n const outputPath = join(runnerDir, input.outputFileName);\n writeFileSync(runnerPath, input.runnerSource);\n rmSync(outputPath, { force: true });\n\n try {\n const result = spawnSync(process.execPath, [runnerPath], {\n cwd: join(input.saasRoot, 'backend-api'),\n env: { ...process.env, ...input.env, [input.outputEnvKey]: outputPath },\n encoding: 'utf-8',\n timeout: input.timeoutMs,\n });\n if (result.status !== 0 || !existsSync(outputPath)) {\n return { failure: (result.stderr ?? '').slice(-2000) || (result.stdout ?? '').slice(-2000) || `exit status ${result.status}` };\n }\n return { output: readFileSync(outputPath, 'utf-8') };\n } finally {\n rmSync(runnerDir, { recursive: true, force: true });\n }\n}\n\n/**\n * The sortable prefix every migration folder carries: `20260916T113045_<name>`.\n *\n * UTC and second-resolution, so two machines generating on the same day sort the same way and a\n * reviewer reads the order off the directory listing.\n */\nexport function migrationTimestamp(now: Date): string {\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${now.getUTCFullYear()}${pad(now.getUTCMonth() + 1)}${pad(now.getUTCDate())}`\n + `T${pad(now.getUTCHours())}${pad(now.getUTCMinutes())}${pad(now.getUTCSeconds())}`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"diff.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/diff.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAYH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAW1F,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAgBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAsEtD,OAAO,CAAC,qBAAqB;IA6B7B,OAAO,CAAC,YAAY;CAYrB"}
1
+ {"version":3,"file":"diff.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/diff.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAYH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAW1F,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAgBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAsEtD,OAAO,CAAC,qBAAqB;IA6B7B,OAAO,CAAC,YAAY;CAYrB"}