@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":"application-creation-readiness.service.js","sourceRoot":"","sources":["../../../../../../src/services/application/application-creation-readiness.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,EACL,0CAA0C,EAC1C,UAAU,EACV,cAAc,GACf,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mCAAmC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAE3H,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGzG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAEhH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,wCAAwC,EAAE,MAAM,6EAA6E,CAAC;AACvI,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAA+D;IACvF,EAAE,UAAU,EAAE,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,iEAAiE,EAAE;IACjH,EAAE,UAAU,EAAE,gBAAgB,CAAC,eAAe,EAAE,KAAK,EAAE,iEAAiE,EAAE;CAC3H,CAAC;AAEF,SAAS,IAAI,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CAAC;IACD,IAAI,sBAAsB,KAAK,IAAI,EAAE,CAAC;QACpC,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,CAAC;QACrF,OAAO,CAAC,IAAI,CAAC,GAAG,iCAAiC,CAAC,aAAa,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,4BAA4B,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC;IAC7J,CAAC;IAED,8CAA8C;IAC9C,EAAE;IACF,oGAAoG;IACpG,8FAA8F;IAC9F,kDAAkD;IAClD,MAAM,iBAAiB,GAAG,wBAAwB,EAAE,CAAC;IACrD,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,4BAA4B,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1G,OAAO,CAAC,IAAI,CAAC,IAAI,CACf,qCAAqC,EACrC,MAAM,iBAAiB,uFAAuF,EAC9G,0HAA0H,CAC3H,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Can this application START the application-creation journey?\n *\n * ## Why this is its own family, beside the stack checks\n *\n * `wildo local doctor` answers \"is the stack up\" — containers, ports, platform health, companion\n * readiness. That is a different question from \"will the journey run\", and the second one has\n * preconditions of its own. Measured on a freshly created application, 2026-09-18, each of these was\n * discovered by HITTING it, in this order, and the second one only after an operator had answered a\n * fifteen-question interview on the board:\n *\n * | what refused | what the operator saw |\n * |---|---|\n * | provider discovery yielded 0 contributions | \"no companion export contributes it for that runtime\" |\n * | no `AI_LLM` capability, no provider scoped | `agent_provider_not_enabled`, 400, context stripped |\n * | (next) the provider's secret absent | \"API key not found for …\" |\n * | (next) no coding agent scoped | the same refusal, one phase later |\n *\n * Every one is knowable before anything runs. That is the whole point: Paul's ask was \"we need to do\n * not be surprised at runtime\".\n *\n * ## The rule each check obeys\n *\n * **A check earns its place only by corresponding to a refusal that EXISTS in the runtime**, and it\n * must evaluate the same predicate that refusal evaluates, from the same sources. A check invented\n * from what seems prudent becomes a second description of the contract, and a second description can\n * disagree with the first — at which point a green line means nothing and a red one wastes a day.\n *\n * So: capability-and-scope is read the way `ExternalProvidersRegistry.isProviderEnabled` reads it,\n * and the required secrets are taken from the DISCOVERED contribution's own `secretsContractShape`\n * rather than from a list of environment-variable names kept here. A provider added to the engine\n * tomorrow is checked correctly by this file without being mentioned in it.\n *\n * ## What the creation preflight added (#2229)\n *\n * The capability lines ask whether SOME provider serves a capability; the runtime refuses per AGENT, on the\n * provider that agent pins. So the lane's pinned providers are checked one `(provider, protocol)` pair at a\n * time — the playbook lane, the logo step's image generation and judge, the expert-persona agents — from\n * `CREATION_LANE_PROVIDER_REQUIREMENTS`, the table those agents read their `providerRef` from; and the billing\n * provider's key is checked the way the backend's boot reads it. `evaluateProviderProtocolReadiness` is the one\n * predicate both use. This file is half of the preflight; `creation-preflight.service.ts` joins it with the host\n * checks for `wildo creation preflight`, `wildo local doctor` and the gate on `wildo creation run` / `loop`.\n */\n\nimport { existsSync } from 'fs';\n\nimport {\n discoverSaasProviderCompanionContributions,\n loadConfig,\n loadSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { DiscoveredProviderCompanionContribution } from '@wildo-ai/platform-config-lib';\nimport { CREATION_LANE_PROVIDER_REQUIREMENTS, CreationLaneProviderConsumer } from '@wildo-ai/application-creation-runtime';\nimport type { CreationLaneProviderRequirement } from '@wildo-ai/application-creation-runtime';\nimport { BUILTIN_PROVIDER_PROTOCOL, EngineCapability, describeCaughtError } from '@wildo-ai/saas-models';\nimport type { BuiltinProviderProtocol } from '@wildo-ai/saas-models';\n\nimport { LocalPreconditionCheckStatus } from '~wildo-cli/services/deployment/local-precondition-checks.schemas';\nimport type { LocalPreconditionCheckResult } from '~wildo-cli/services/deployment/local-precondition-checks.schemas';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { resolveLocalDefaultsPath } from '~wildo-cli/services/credentials/local-defaults.service';\nimport { resolveEnvironmentProviderConfigurations } from '~wildo-cli/services/application/environment-provider-configurations.service';\nimport { BACKEND_CONFIG_RELATIVE_PATH } from '~wildo-cli/services/application/backend-config.paths';\nimport { WORKSPACE_CONFIG_NAMES } from '@wildo-ai/platform-config-lib';\nimport { join } from 'path';\n\n/**\n * The capabilities the journey cannot run without, and WHICH PHASE stops when one is absent.\n *\n * Named per capability rather than checked as one lump, because they fail at different moments and\n * the distinction is the operator's whole interest: without the LLM nothing generates and the very\n * first playbook refuses; without the coding agent the top-down half completes and the BUILD phase\n * refuses, which is much later and much more expensive to discover.\n */\nconst JOURNEY_CAPABILITIES: readonly { capability: EngineCapability; phase: string }[] = [\n { capability: EngineCapability.AI_LLM, phase: 'every playbook that composes content — the journey cannot start' },\n { capability: EngineCapability.AI_CODING_AGENT, phase: 'the build phase — the top-down half runs, then dispatch refuses' },\n];\n\nfunction pass(name: string, detail: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.PASS, detail };\n}\n\nfunction fail(name: string, detail: string, fix: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.FAIL, detail, fix };\n}\n\nfunction warn(name: string, detail: string, fix: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.WARN, detail, fix };\n}\n\n/**\n * The process a provider must reach for a refusal to be avoided — both a `providers.scopes.<host>` key and the\n * `runtimeTargets[].kind` a contribution names for it, which spell the same two words.\n *\n * semantic-literal-boundary: the values are `wildo.saas.config.ts` scope keys and companion runtime-target kinds,\n * owned by platform-config-lib's config schema; this enum names the two this file asks about.\n */\nexport enum CreationProviderHost {\n /** The dev companion: it runs the creation journey and every agent of the lane. */\n COMPANION = 'companion',\n /** The application's backend: it resolves the billing provider at boot. */\n BACKEND = 'backend',\n}\n\n/**\n * Where the key a protocol call needs is named, which differs by refusal and must not be merged.\n *\n * `getProviderApiKey` (an agent's LLM or image call) reads the protocol configuration's `authConfig.secretRef`,\n * so an application that overrides it in `providerConfigurations` moves the key. `resolveBillingProvider` reads\n * the runtime contract's own `secretRef` and honours no override. Checking the billing key through the\n * override would report a key the backend never reads.\n */\nexport enum ProviderKeySource {\n CONFIGURED_AUTH_SECRET_REF = 'configured-auth-secret-ref',\n RUNTIME_CONTRACT_SECRET_REF = 'runtime-contract-secret-ref',\n}\n\n/** Why a provider protocol would be refused, in the order the runtime asks. */\nexport enum ProviderProtocolRefusal {\n /** Not under `providers.scopes.<host>`: the host's registry never loads it, so `isProviderEnabled` is false. */\n NOT_SCOPED = 'not-scoped',\n /** Scoped, but no installed package contributes it for that host: `wildo config sync` refuses, and the host cannot boot. */\n NOT_CONTRIBUTED = 'not-contributed',\n /** Loaded, but the module binds no such protocol: `provider.protocols.includes(kind)` is false. */\n PROTOCOL_NOT_BOUND = 'protocol-not-bound',\n /** `providerConfigurations.<ref>.<protocol>.enabled` is `false` for this environment. */\n DISABLED = 'disabled',\n /** Everything holds except the key: `getProviderApiKey` / the billing secret read returns nothing. */\n SECRET_MISSING = 'secret-missing',\n}\n\nexport type ProviderProtocolReadiness =\n | { readonly ready: true; readonly keyEnvVarNames: readonly string[] }\n | { readonly ready: false; readonly refusal: ProviderProtocolRefusal; readonly detail: string; readonly fix: string };\n\ntype ProviderScopes = Record<string, { providers?: Record<string, unknown>; selection?: Record<string, { primary?: string } | undefined> } | undefined>;\ntype ProtocolConfiguration = { enabled?: boolean; authConfig?: { secretRef?: string } };\n\n/**\n * Would `providerRef` serve `protocol` on `host`, and does that host hold its key — evaluated the way the runtime\n * evaluates it, from the sources the runtime reads.\n *\n * The runtime predicate, piece by piece:\n *\n * | runtime | here |\n * |---|---|\n * | `hasProvider(ref)` — the host's registry holds only the refs its provider-runtime artifact lists, which `wildo config sync` writes from `providers.scopes.<host>` | `ref` under that scope, AND a discovered contribution targeting that host |\n * | `provider.protocols.includes(kind)` — the module's bindings, NOT the scope's authored `protocols` | the contribution's `protocols`, projected from those same bindings |\n * | `getProviderConfiguration(ref, kind).enabled !== false` — application config overlaid by the environment's | `resolveEnvironmentProviderConfigurations`, the overlay `wildo config sync` stores |\n * | the key — `authConfig.secretRef` (default: the binding's contract) or the billing contract's `secretRef`, read from the process env | `protocolSecretRefs` (or an override) read from `secrets.json > providerEnv`, which is what reaches that env |\n *\n * A contribution emitted before `protocolSecretRefs` existed names no per-protocol key, and then every REQUIRED\n * entry of its secrets shape is asked for — stricter than the runtime for a provider with several keys, and the\n * reason the field was added.\n */\nexport function evaluateProviderProtocolReadiness(input: {\n readonly providerRef: string;\n readonly protocol: BuiltinProviderProtocol;\n readonly host: CreationProviderHost;\n readonly keySource: ProviderKeySource;\n readonly scopes: ProviderScopes;\n readonly contributions: readonly DiscoveredProviderCompanionContribution[];\n readonly providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n readonly providerEnv: Readonly<Record<string, string>>;\n}): ProviderProtocolReadiness {\n const { providerRef, protocol, host } = input;\n const configFile = WORKSPACE_CONFIG_NAMES.SAAS;\n\n if (input.scopes[host]?.providers?.[providerRef] === undefined) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.NOT_SCOPED,\n detail: `${providerRef} is not scoped under providers.scopes.${host}, so the ${host}'s registry never loads it.`,\n fix: `Add ${providerRef} under providers.scopes.${host}.providers in ${configFile}, then run \\`wildo config sync\\`.`,\n };\n }\n\n const contribution = input.contributions.find((candidate) => candidate.ref === providerRef\n && candidate.runtimeTargets.some((target) => target.kind === host));\n if (!contribution) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.NOT_CONTRIBUTED,\n detail: `${providerRef} is scoped for the ${host}, but no installed package contributes it for that runtime.`,\n fix: 'Install the package that ships it (a dependency of a declared service), then `pnpm install` and `wildo config sync`.',\n };\n }\n\n if (!contribution.protocols.includes(protocol)) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.PROTOCOL_NOT_BOUND,\n detail: `${providerRef} binds no ${protocol} (it binds ${contribution.protocols.join(', ') || 'nothing'}).`,\n fix: `Nothing in ${configFile} can add a binding a provider does not declare: point the step at a provider that binds ${protocol}.`,\n };\n }\n\n const configured = input.providerConfigurations[providerRef]?.[protocol] as ProtocolConfiguration | undefined;\n if (configured?.enabled === false) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.DISABLED,\n detail: `providerConfigurations.${providerRef}.${protocol}.enabled is false for this environment.`,\n fix: `Remove that \\`enabled: false\\` from ${configFile} or from this environment's infrastructure config.`,\n };\n }\n\n const keyEnvVarNames = ((): string[] => {\n const override = input.keySource === ProviderKeySource.CONFIGURED_AUTH_SECRET_REF ? configured?.authConfig?.secretRef : undefined;\n if (override) return [override];\n if (contribution.protocolSecretRefs !== undefined) {\n const ref = contribution.protocolSecretRefs[protocol];\n return ref === undefined ? [] : [ref];\n }\n return (contribution.secretsContractShape ?? []).filter((entry) => entry.required).map((entry) => entry.envVarName);\n })();\n const missing = keyEnvVarNames.filter((name) => !(input.providerEnv[name] ?? '').trim());\n if (missing.length > 0) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.SECRET_MISSING,\n detail: `${providerRef} serves ${protocol} on the ${host}, but ${missing.join(', ')} has no value.`,\n fix: `Add ${missing.join(', ')} to providerEnv in this environment's secrets.json — or capture keys once with `\n + '`wildo local-defaults capture --from <an app that has them>` so every later application adopts them.',\n };\n }\n return { ready: true, keyEnvVarNames };\n}\n\n/**\n * The creation lane's provider requirements, one line per `(provider, protocol)` pair.\n *\n * Grouped because two consumers can need the same pair (the playbook lane and the logo judge both call\n * `openai` over `LLM_PROVIDER`), and one refusal reported twice reads as two problems. Each line still names\n * every consumer that stops, since which steps a missing key takes out is the operator's whole interest.\n */\nfunction collectCreationLaneProviderChecks(input: {\n scopes: ProviderScopes;\n contributions: readonly DiscoveredProviderCompanionContribution[];\n providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n providerEnv: Readonly<Record<string, string>>;\n}): LocalPreconditionCheckResult[] {\n const groups = new Map<string, { requirement: CreationLaneProviderRequirement; consumers: CreationLaneProviderConsumer[] }>();\n for (const consumer of Object.values(CreationLaneProviderConsumer)) {\n const requirement = CREATION_LANE_PROVIDER_REQUIREMENTS[consumer];\n const key = `${requirement.providerRef} ${requirement.protocol}`;\n const group = groups.get(key) ?? { requirement, consumers: [] };\n group.consumers.push(consumer);\n groups.set(key, group);\n }\n\n return [...groups.entries()].map(([key, { requirement, consumers }]) => {\n const name = `app-creation: ${key} (${consumers.join(', ')})`;\n const readiness = evaluateProviderProtocolReadiness({\n providerRef: requirement.providerRef,\n protocol: requirement.protocol,\n host: CreationProviderHost.COMPANION,\n keySource: ProviderKeySource.CONFIGURED_AUTH_SECRET_REF,\n ...input,\n });\n // Literal comparison, not truthiness: this package compiles without `strictNullChecks`, under which\n // `if (readiness.ready)` does not narrow the union to its refusal member.\n if (readiness.ready === false) {\n const stops = consumers.map((consumer) => CREATION_LANE_PROVIDER_REQUIREMENTS[consumer].stops).join('; ');\n return fail(name, `${readiness.detail} Stops: ${stops}.`, readiness.fix);\n }\n const keyState = readiness.keyEnvVarNames.length === 0 ? 'no key required' : `${readiness.keyEnvVarNames.join(', ')} present`;\n return pass(name, `${requirement.providerRef} serves ${requirement.protocol} on the companion; ${keyState}.`);\n });\n}\n\n/** The backend's own `billing` block, as `saas-config.backend.ts` authors it — what the boot reads. */\nexport interface BackendBillingDeclaration {\n readonly enabled?: boolean;\n readonly providerRef?: string;\n}\n\n/**\n * Reads `billing` from the application backend's `saas-config.backend.ts`, the object the backend boots with.\n *\n * `null` when the file does not exist (an application with no backend yet). Throws when it exists and cannot be\n * loaded, which the caller reports rather than reading as \"billing off\".\n */\nexport async function readBackendBillingDeclaration(saasRoot: string): Promise<BackendBillingDeclaration | null> {\n const path = join(saasRoot, BACKEND_CONFIG_RELATIVE_PATH);\n if (!existsSync(path)) return null;\n const backendConfig = await loadConfig<{ billing?: BackendBillingDeclaration }>(path);\n return backendConfig?.billing ?? {};\n}\n\n/**\n * The billing checks — two, because two different refusals exist and they read different sources.\n *\n * 1. **The required-capability floor** (`assertRequiredCapabilityFloor`): BILLING enabled in `engineCapabilities`\n * with no provider serving it, and the backend does not start. It reads no secret. Mirrored as \"no\n * backend-scoped provider declares BILLING\".\n * 2. **The billing provider's key** (`resolveBillingProvider`, `SECRET_MISSING`): read only when the BACKEND's own\n * `billing.enabled` is true (`initializeBillingServices` runs under that and nothing else), for the provider\n * `billing.providerRef` names, from its runtime contract's `secretRef`. Mirrored from those same fields of\n * `saas-config.backend.ts`, never from the capability: nothing forces the capability and `billing.enabled` to\n * agree, and an application with the capability on and backend billing off boots without any Stripe key.\n *\n * That last state is common in a creation run — the capability is declared at definition time, the backend switch\n * is wired by the build — so it gets a WARN naming the key the switch will need, not a FAIL the runtime would not\n * raise. The webhook signing secret is never asked for: no boot refusal reads it.\n */\nasync function collectBillingProviderChecks(input: {\n saasRoot: string;\n enabled: Record<string, { enabled?: boolean }>;\n scopes: ProviderScopes;\n contributions: readonly DiscoveredProviderCompanionContribution[];\n providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n providerEnv: Readonly<Record<string, string>>;\n readBackendBilling?: (saasRoot: string) => Promise<BackendBillingDeclaration | null>;\n}): Promise<LocalPreconditionCheckResult[]> {\n const results: LocalPreconditionCheckResult[] = [];\n const stops = 'the application backend — it refuses to start, so the run cannot verify what it built';\n const backendProviders = Object.keys(input.scopes[CreationProviderHost.BACKEND]?.providers ?? {});\n // Both halves of the runtime's resolution: the scope entry SELECTS the capability (its own `engineCapabilities`,\n // which defaults to none) and the provider's module DECLARES it. A `stripe: {}` scope entry serves nothing.\n const backendScope = input.scopes[CreationProviderHost.BACKEND]?.providers ?? {};\n const billingCapable = backendProviders.filter((ref) => ((backendScope[ref] as { engineCapabilities?: readonly string[] } | undefined)\n ?.engineCapabilities ?? []).includes(EngineCapability.BILLING)\n && input.contributions.some((contribution) => contribution.ref === ref\n && contribution.runtimeTargets.some((target) => target.kind === CreationProviderHost.BACKEND)\n && contribution.engineCapabilities.includes(EngineCapability.BILLING)));\n const capabilityOn = input.enabled[EngineCapability.BILLING]?.enabled === true;\n\n if (capabilityOn && billingCapable.length === 0) {\n results.push(fail(\n 'app-creation: billing capability',\n `BILLING is enabled and no backend-scoped provider serves it, so the required-capability floor refuses the backend. Stops: ${stops}.`,\n `Scope a billing provider under providers.scopes.backend in ${WORKSPACE_CONFIG_NAMES.SAAS} with engineCapabilities: [BILLING] `\n + '(e.g. stripe), or disable BILLING.',\n ));\n }\n\n let backendBilling: BackendBillingDeclaration | null;\n try {\n backendBilling = await (input.readBackendBilling ?? readBackendBillingDeclaration)(input.saasRoot);\n } catch (error) {\n if (capabilityOn || billingCapable.length > 0) {\n results.push(warn(\n 'app-creation: billing provider',\n `${BACKEND_CONFIG_RELATIVE_PATH} could not be loaded, so whether the backend turns billing on is unknown: ${describeCaughtError(error)}`,\n 'Fix what it names; the billing key cannot be checked until the backend configuration loads.',\n ));\n }\n return results;\n }\n\n const shared = { ...input, protocol: BUILTIN_PROVIDER_PROTOCOL.BILLING_PROVIDER, host: CreationProviderHost.BACKEND, keySource: ProviderKeySource.RUNTIME_CONTRACT_SECRET_REF };\n\n if (backendBilling?.enabled === true) {\n const providerRef = backendBilling.providerRef;\n if (!providerRef) {\n results.push(fail(\n 'app-creation: billing provider',\n `billing.enabled is true in ${BACKEND_CONFIG_RELATIVE_PATH} and billing.providerRef is unset. Stops: ${stops}.`,\n `Set billing.providerRef (e.g. 'stripe') in ${BACKEND_CONFIG_RELATIVE_PATH}, or set billing.enabled to false.`,\n ));\n return results;\n }\n const name = `app-creation: billing provider (${providerRef})`;\n const readiness = evaluateProviderProtocolReadiness({ ...shared, providerRef });\n results.push(readiness.ready === false\n ? fail(name, `${readiness.detail} Stops: ${stops}.`, readiness.fix)\n : pass(name, `Backend billing is on; ${providerRef} serves BILLING on the backend; ${readiness.keyEnvVarNames.join(', ') || 'no key required'} present.`));\n return results;\n }\n\n // Declared, not yet switched on: say what the switch will need, without refusing anything today.\n if (capabilityOn && billingCapable.length > 0) {\n const providerRef = billingCapable[0];\n const readiness = evaluateProviderProtocolReadiness({ ...shared, providerRef });\n if (readiness.ready === false) {\n results.push(warn(\n `app-creation: billing provider (${providerRef})`,\n `BILLING is declared but ${BACKEND_CONFIG_RELATIVE_PATH} does not turn billing on yet, so nothing refuses today. `\n + `When the build sets billing.enabled, the backend refuses to start: ${readiness.detail}`,\n readiness.fix,\n ));\n }\n }\n return results;\n}\n\nexport async function collectApplicationCreationReadinessChecks(input: {\n saasRoot: string;\n envName: string;\n /** Test seam; production loads `saas-config.backend.ts` the way the backend does. */\n readBackendBilling?: (saasRoot: string) => Promise<BackendBillingDeclaration | null>;\n}): Promise<LocalPreconditionCheckResult[]> {\n const results: LocalPreconditionCheckResult[] = [];\n const configPath = join(input.saasRoot, WORKSPACE_CONFIG_NAMES.SAAS);\n\n const saasConfig = await loadSaasConfig(configPath).catch(() => null);\n if (!saasConfig) {\n return [fail(\n 'app-creation: application configuration',\n `Could not load ${WORKSPACE_CONFIG_NAMES.SAAS}.`,\n 'Fix the configuration first — nothing below can be evaluated without it.',\n )];\n }\n\n // ── 1. Does discovery see any provider at all? ──\n //\n // A zero here is the state in which EVERY provider an application authors is refused with\n // \"no companion export contributes it for that runtime\", and nothing else reports it: discovery\n // returns an empty array for a broken walk and for an application with no providers alike (#1305).\n const { contributions, unreadableOwners } = await discoverSaasProviderCompanionContributions({\n saasRoot: input.saasRoot,\n saasConfig: saasConfig as never,\n }).catch(() => ({ contributions: [], unreadableOwners: [] }));\n\n /*\n * An owner that DECLARES a companion door and could not be read is the difference between \"this\n * application has no providers\" and \"the walk failed\" — the two used to be one answer, which is\n * what let a zero contribution count read as legitimate (#1305). Named here even when discovery\n * otherwise succeeded, because a broken package silently removes whatever it would have\n * contributed, and the provider that goes missing is refused somewhere else entirely.\n */\n const unreadable = unreadableOwners.length === 0\n ? ''\n : ` ${unreadableOwners.length} owner(s) declare a companion door that could not be read: `\n + `${unreadableOwners.map((owner) => owner.ownerLabel).join(', ')}.`;\n\n results.push(contributions.length > 0\n ? (unreadableOwners.length === 0\n ? pass('app-creation: provider discovery', `${contributions.length} provider contribution(s) discovered.`)\n : warn(\n 'app-creation: provider discovery',\n `${contributions.length} provider contribution(s) discovered, but${unreadable}`,\n 'Build or reinstall those packages — whatever they contribute is missing, and the provider will be refused elsewhere.',\n ))\n : fail(\n 'app-creation: provider discovery',\n `No provider contributions were discovered, so every provider this application declares will be refused.${unreadable}`,\n unreadableOwners.length > 0\n ? 'Build or reinstall the packages named above — the walk reached them and could not read them.'\n : 'Check that a provider package (@wildo-ai/external-connectors-private, or a provider installed with '\n + '`wildo registry add wildo/providers/<ref>`) is a dependency of a declared service and is installed — then re-run `pnpm install`.',\n ));\n\n const enabled = (saasConfig as { engineCapabilities?: Record<string, { enabled?: boolean }> }).engineCapabilities ?? {};\n const scopes = ((saasConfig as { providers?: { scopes?: ProviderScopes } }).providers?.scopes ?? {}) as ProviderScopes;\n /*\n * The companion scope ONLY. This accepted `backend` too until 2026-10-02, on the reasoning that a provider the\n * backend runs is \"genuinely enabled for the application\". It is not enabled for the process that refuses: the\n * creation journey runs in the companion, whose registry holds only the refs of its own provider-runtime artifact,\n * which `wildo config sync` writes from `providers.scopes.companion` alone (`filterRegistryByProviderRuntime`). A\n * backend-only provider therefore passed this line and was refused at the first agent call (#2229).\n */\n const companionScoped = new Set(Object.keys(scopes[CreationProviderHost.COMPANION]?.providers ?? {}));\n const secrets = EnvironmentUtils.loadSecretsJson(input.envName);\n const providerEnv = (secrets as { providerEnv?: Record<string, string> } | null)?.providerEnv ?? {};\n\n // ── 2/3. Per capability: enabled, scoped, and its secrets present ──\n for (const { capability, phase } of JOURNEY_CAPABILITIES) {\n const name = `app-creation: ${capability}`;\n\n if (enabled[capability]?.enabled !== true) {\n results.push(fail(\n name,\n `The application does not enable ${capability}. Stops: ${phase}.`,\n `Add [EngineCapability.${capability}]: { enabled: true } to engineCapabilities in ${WORKSPACE_CONFIG_NAMES.SAAS}, `\n + 'and scope a provider that declares it.',\n ));\n continue;\n }\n\n /*\n * The provider must be BOTH scoped by the application and discovered as declaring the capability.\n * Scoped-but-undiscovered is exactly what `config sync` refuses; discovered-but-unscoped is what\n * `isProviderEnabled` refuses at dispatch. Requiring both is what makes a green line mean the\n * runtime predicate will hold.\n */\n const usable = contributions.filter((contribution) => companionScoped.has(contribution.ref)\n && contribution.runtimeTargets.some((target) => target.kind === CreationProviderHost.COMPANION)\n && contribution.engineCapabilities.includes(capability));\n\n if (usable.length === 0) {\n const scopedRefs = [...companionScoped];\n results.push(fail(\n name,\n `${capability} is enabled but no scoped provider supplies it${scopedRefs.length > 0 ? ` (scoped: ${scopedRefs.join(', ')})` : ' — no provider is scoped at all'}. `\n + `Stops: ${phase}.`,\n `Scope a provider declaring ${capability} under providers.scopes.companion in ${WORKSPACE_CONFIG_NAMES.SAAS}.`,\n ));\n continue;\n }\n\n /*\n * ONE usable provider is enough, and getting this wrong was a false positive on the first run.\n *\n * A capability is satisfied by resolving ONE provider — `isProviderEnabled` is asked about a\n * single ref — so requiring every scoped provider to be credentialed reports a healthy\n * application as broken. Measured: Wonder Todos scopes `anthropic`, `google` and `openai` for\n * AI_LLM and holds no `GOOGLE_API_KEY`; it is the dogfood application and the journey runs there.\n * A check that fails on a working application is worse than no check, because it teaches its\n * reader to skim the line that one day means something.\n *\n * Required secrets come from each contribution's own `secretsContractShape`, so a provider added\n * to the engine tomorrow is evaluated correctly without this file naming it.\n */\n const missingFor = (contribution: typeof usable[number]): string[] => (contribution.secretsContractShape ?? [])\n .filter((entry) => entry.required && !(providerEnv[entry.envVarName] ?? '').trim())\n .map((entry) => entry.envVarName);\n\n const ready = usable.filter((contribution) => missingFor(contribution).length === 0);\n const unready = usable.filter((contribution) => missingFor(contribution).length > 0);\n\n if (ready.length > 0) {\n // The uncredentialed ones are NAMED rather than ignored — selecting one of them would still\n // refuse — but they do not fail the check, because the capability is satisfied.\n const aside = unready.length === 0\n ? ''\n : ` (${unready.map((c) => `${c.ref} lacks ${missingFor(c).join('/')}`).join('; ')} — usable only if selected)`;\n results.push(pass(name, `Supplied by ${ready.map((c) => c.ref).join(', ')}; required secrets present.${aside}`));\n continue;\n }\n\n const missing = [...new Set(usable.flatMap(missingFor))];\n results.push(fail(\n name,\n `${usable.map((c) => c.ref).join(', ')} supplies ${capability} but NO scoped provider has its required secret(s): `\n + `${missing.join(', ')}. Stops: ${phase}.`,\n 'Add them to providerEnv in this environment\\'s secrets.json — or capture them once with '\n + '`wildo local-defaults capture --from <an app that has them>` so every later application adopts them.',\n ));\n }\n\n // ── 3a/3b. The providers the lane's agents PIN, and the billing provider's key ──\n //\n // The capability lines above ask whether SOME provider serves AI_LLM. The runtime asks a narrower\n // question: each agent names its provider, and `isProviderEnabled(<that ref>, <its protocol>)` plus its key\n // decide the call. These lines ask exactly that, for the refs the agents read from the same table (#2229).\n let providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>> | null;\n try {\n providerConfigurations = await resolveEnvironmentProviderConfigurations({\n saasRoot: input.saasRoot,\n applicationProviderConfigurations: (saasConfig as { providerConfigurations?: Record<string, Record<string, unknown> | undefined> })\n .providerConfigurations,\n environmentName: input.envName,\n });\n } catch (error) {\n providerConfigurations = null;\n results.push(fail(\n 'app-creation: provider configurations',\n `The provider configuration for ${input.envName} could not be resolved: ${describeCaughtError(error)}`,\n 'Fix the configuration it names — the provider checks below cannot be evaluated without it.',\n ));\n }\n if (providerConfigurations !== null) {\n const providerInput = { scopes, contributions, providerConfigurations, providerEnv };\n results.push(...collectCreationLaneProviderChecks(providerInput));\n results.push(...await collectBillingProviderChecks({ saasRoot: input.saasRoot, enabled, readBackendBilling: input.readBackendBilling, ...providerInput }));\n }\n\n // ── 4. The machine's shared provider keys ──\n //\n // ADVISORY, and only reported when something above is already missing its secrets: this file is how\n // a SECOND application gets its keys without anyone copying values between JSON files, so its\n // absence explains a gap rather than being a gap.\n const localDefaultsPath = resolveLocalDefaultsPath();\n if (!existsSync(localDefaultsPath) && results.some((r) => r.status === LocalPreconditionCheckStatus.FAIL)) {\n results.push(warn(\n 'app-creation: machine provider keys',\n `No ${localDefaultsPath} on this machine, so a newly created application mints everything and adopts nothing.`,\n 'Run `wildo local-defaults capture --from <an application that works>` once; later applications adopt it at `wildo init`.',\n ));\n }\n\n return results;\n}\n"]}
1
+ {"version":3,"file":"application-creation-readiness.service.js","sourceRoot":"","sources":["../../../../src/services/application/application-creation-readiness.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,EACL,0CAA0C,EAC1C,UAAU,EACV,cAAc,GACf,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mCAAmC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAE3H,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGzG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAEhH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,wCAAwC,EAAE,MAAM,6EAA6E,CAAC;AACvI,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAA+D;IACvF,E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AG,IAAI,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,CACf,uCAAuC,EACvC,kCAAkC,KAAK,CAAC,OAAO,2BAA2B,mBAAmB,CAAC,KAAK,CAAC,EAAE,EACtG,4FAA4F,CAC7F,CAAC,CAAC;IACL,CAAC;IACD,IAAI,sBAAsB,KAAK,IAAI,EAAE,CAAC;QACpC,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,CAAC;QACrF,OAAO,CAAC,IAAI,CAAC,GAAG,iCAAiC,CAAC,aAAa,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,4BAA4B,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC;IAC7J,CAAC;IAED,8CAA8C;IAC9C,EAAE;IACF,oGAAoG;IACpG,8FAA8F;IAC9F,kDAAkD;IAClD,MAAM,iBAAiB,GAAG,wBAAwB,EAAE,CAAC;IACrD,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,4BAA4B,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1G,OAAO,CAAC,IAAI,CAAC,IAAI,CACf,qCAAqC,EACrC,MAAM,iBAAiB,uFAAuF,EAC9G,0HAA0H,CAC3H,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Can this application START the application-creation journey?\n *\n * ## Why this is its own family, beside the stack checks\n *\n * `wildo local doctor` answers \"is the stack up\" — containers, ports, platform health, companion\n * readiness. That is a different question from \"will the journey run\", and the second one has\n * preconditions of its own. Measured on a freshly created application, 2026-09-18, each of these was\n * discovered by HITTING it, in this order, and the second one only after an operator had answered a\n * fifteen-question interview on the board:\n *\n * | what refused | what the operator saw |\n * |---|---|\n * | provider discovery yielded 0 contributions | \"no companion export contributes it for that runtime\" |\n * | no `AI_LLM` capability, no provider scoped | `agent_provider_not_enabled`, 400, context stripped |\n * | (next) the provider's secret absent | \"API key not found for …\" |\n * | (next) no coding agent scoped | the same refusal, one phase later |\n *\n * Every one is knowable before anything runs. That is the whole point: Paul's ask was \"we need to do\n * not be surprised at runtime\".\n *\n * ## The rule each check obeys\n *\n * **A check earns its place only by corresponding to a refusal that EXISTS in the runtime**, and it\n * must evaluate the same predicate that refusal evaluates, from the same sources. A check invented\n * from what seems prudent becomes a second description of the contract, and a second description can\n * disagree with the first — at which point a green line means nothing and a red one wastes a day.\n *\n * So: capability-and-scope is read the way `ExternalProvidersRegistry.isProviderEnabled` reads it,\n * and the required secrets are taken from the DISCOVERED contribution's own `secretsContractShape`\n * rather than from a list of environment-variable names kept here. A provider added to the engine\n * tomorrow is checked correctly by this file without being mentioned in it.\n *\n * ## What the creation preflight added (#2229)\n *\n * The capability lines ask whether SOME provider serves a capability; the runtime refuses per AGENT, on the\n * provider that agent pins. So the lane's pinned providers are checked one `(provider, protocol)` pair at a\n * time — the playbook lane, the logo step's image generation and judge, the expert-persona agents — from\n * `CREATION_LANE_PROVIDER_REQUIREMENTS`, the table those agents read their `providerRef` from; and the billing\n * provider's key is checked the way the backend's boot reads it. `evaluateProviderProtocolReadiness` is the one\n * predicate both use. This file is half of the preflight; `creation-preflight.service.ts` joins it with the host\n * checks for `wildo creation preflight`, `wildo local doctor` and the gate on `wildo creation run` / `loop`.\n */\n\nimport { existsSync } from 'fs';\n\nimport {\n discoverSaasProviderCompanionContributions,\n loadConfig,\n loadSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { DiscoveredProviderCompanionContribution } from '@wildo-ai/platform-config-lib';\nimport { CREATION_LANE_PROVIDER_REQUIREMENTS, CreationLaneProviderConsumer } from '@wildo-ai/application-creation-runtime';\nimport type { CreationLaneProviderRequirement } from '@wildo-ai/application-creation-runtime';\nimport { BUILTIN_PROVIDER_PROTOCOL, EngineCapability, describeCaughtError } from '@wildo-ai/saas-models';\nimport type { BuiltinProviderProtocol } from '@wildo-ai/saas-models';\n\nimport { LocalPreconditionCheckStatus } from '~wildo-cli/services/deployment/local-precondition-checks.schemas';\nimport type { LocalPreconditionCheckResult } from '~wildo-cli/services/deployment/local-precondition-checks.schemas';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { resolveLocalDefaultsPath } from '~wildo-cli/services/credentials/local-defaults.service';\nimport { resolveEnvironmentProviderConfigurations } from '~wildo-cli/services/application/environment-provider-configurations.service';\nimport { BACKEND_CONFIG_RELATIVE_PATH } from '~wildo-cli/services/application/backend-config.paths';\nimport { WORKSPACE_CONFIG_NAMES } from '@wildo-ai/platform-config-lib';\nimport { join } from 'path';\n\n/**\n * The capabilities the journey cannot run without, and WHICH PHASE stops when one is absent.\n *\n * Named per capability rather than checked as one lump, because they fail at different moments and\n * the distinction is the operator's whole interest: without the LLM nothing generates and the very\n * first playbook refuses; without the coding agent the top-down half completes and the BUILD phase\n * refuses, which is much later and much more expensive to discover.\n */\nconst JOURNEY_CAPABILITIES: readonly { capability: EngineCapability; phase: string }[] = [\n { capability: EngineCapability.AI_LLM, phase: 'every playbook that composes content — the journey cannot start' },\n { capability: EngineCapability.AI_CODING_AGENT, phase: 'the build phase — the top-down half runs, then dispatch refuses' },\n];\n\nfunction pass(name: string, detail: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.PASS, detail };\n}\n\nfunction fail(name: string, detail: string, fix: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.FAIL, detail, fix };\n}\n\nfunction warn(name: string, detail: string, fix: string): LocalPreconditionCheckResult {\n return { name, status: LocalPreconditionCheckStatus.WARN, detail, fix };\n}\n\n/**\n * The process a provider must reach for a refusal to be avoided — both a `providers.scopes.<host>` key and the\n * `runtimeTargets[].kind` a contribution names for it, which spell the same two words.\n *\n * semantic-literal-boundary: the values are `wildo.saas.config.ts` scope keys and companion runtime-target kinds,\n * owned by platform-config-lib's config schema; this enum names the two this file asks about.\n */\nexport enum CreationProviderHost {\n /** The dev companion: it runs the creation journey and every agent of the lane. */\n COMPANION = 'companion',\n /** The application's backend: it resolves the billing provider at boot. */\n BACKEND = 'backend',\n}\n\n/**\n * Where the key a protocol call needs is named, which differs by refusal and must not be merged.\n *\n * `getProviderApiKey` (an agent's LLM or image call) reads the protocol configuration's `authConfig.secretRef`,\n * so an application that overrides it in `providerConfigurations` moves the key. `resolveBillingProvider` reads\n * the runtime contract's own `secretRef` and honours no override. Checking the billing key through the\n * override would report a key the backend never reads.\n */\nexport enum ProviderKeySource {\n CONFIGURED_AUTH_SECRET_REF = 'configured-auth-secret-ref',\n RUNTIME_CONTRACT_SECRET_REF = 'runtime-contract-secret-ref',\n}\n\n/** Why a provider protocol would be refused, in the order the runtime asks. */\nexport enum ProviderProtocolRefusal {\n /** Not under `providers.scopes.<host>`: the host's registry never loads it, so `isProviderEnabled` is false. */\n NOT_SCOPED = 'not-scoped',\n /** Scoped, but no installed package contributes it for that host: `wildo config sync` refuses, and the host cannot boot. */\n NOT_CONTRIBUTED = 'not-contributed',\n /** Loaded, but the module binds no such protocol: `provider.protocols.includes(kind)` is false. */\n PROTOCOL_NOT_BOUND = 'protocol-not-bound',\n /** `providerConfigurations.<ref>.<protocol>.enabled` is `false` for this environment. */\n DISABLED = 'disabled',\n /** Everything holds except the key: `getProviderApiKey` / the billing secret read returns nothing. */\n SECRET_MISSING = 'secret-missing',\n}\n\nexport type ProviderProtocolReadiness =\n | { readonly ready: true; readonly keyEnvVarNames: readonly string[] }\n | { readonly ready: false; readonly refusal: ProviderProtocolRefusal; readonly detail: string; readonly fix: string };\n\ntype ProviderScopes = Record<string, { providers?: Record<string, unknown>; selection?: Record<string, { primary?: string } | undefined> } | undefined>;\ntype ProtocolConfiguration = { enabled?: boolean; authConfig?: { secretRef?: string } };\n\n/**\n * Would `providerRef` serve `protocol` on `host`, and does that host hold its key — evaluated the way the runtime\n * evaluates it, from the sources the runtime reads.\n *\n * The runtime predicate, piece by piece:\n *\n * | runtime | here |\n * |---|---|\n * | `hasProvider(ref)` — the host's registry holds only the refs its provider-runtime artifact lists, which `wildo config sync` writes from `providers.scopes.<host>` | `ref` under that scope, AND a discovered contribution targeting that host |\n * | `provider.protocols.includes(kind)` — the module's bindings, NOT the scope's authored `protocols` | the contribution's `protocols`, projected from those same bindings |\n * | `getProviderConfiguration(ref, kind).enabled !== false` — application config overlaid by the environment's | `resolveEnvironmentProviderConfigurations`, the overlay `wildo config sync` stores |\n * | the key — `authConfig.secretRef` (default: the binding's contract) or the billing contract's `secretRef`, read from the process env | `protocolSecretRefs` (or an override) read from `secrets.json > providerEnv`, which is what reaches that env |\n *\n * A contribution emitted before `protocolSecretRefs` existed names no per-protocol key, and then every REQUIRED\n * entry of its secrets shape is asked for — stricter than the runtime for a provider with several keys, and the\n * reason the field was added.\n */\nexport function evaluateProviderProtocolReadiness(input: {\n readonly providerRef: string;\n readonly protocol: BuiltinProviderProtocol;\n readonly host: CreationProviderHost;\n readonly keySource: ProviderKeySource;\n readonly scopes: ProviderScopes;\n readonly contributions: readonly DiscoveredProviderCompanionContribution[];\n readonly providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n readonly providerEnv: Readonly<Record<string, string>>;\n}): ProviderProtocolReadiness {\n const { providerRef, protocol, host } = input;\n const configFile = WORKSPACE_CONFIG_NAMES.SAAS;\n\n if (input.scopes[host]?.providers?.[providerRef] === undefined) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.NOT_SCOPED,\n detail: `${providerRef} is not scoped under providers.scopes.${host}, so the ${host}'s registry never loads it.`,\n fix: `Add ${providerRef} under providers.scopes.${host}.providers in ${configFile}, then run \\`wildo config sync\\`.`,\n };\n }\n\n const contribution = input.contributions.find((candidate) => candidate.ref === providerRef\n && candidate.runtimeTargets.some((target) => target.kind === host));\n if (!contribution) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.NOT_CONTRIBUTED,\n detail: `${providerRef} is scoped for the ${host}, but no installed package contributes it for that runtime.`,\n fix: 'Install the package that ships it (a dependency of a declared service), then `pnpm install` and `wildo config sync`.',\n };\n }\n\n if (!contribution.protocols.includes(protocol)) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.PROTOCOL_NOT_BOUND,\n detail: `${providerRef} binds no ${protocol} (it binds ${contribution.protocols.join(', ') || 'nothing'}).`,\n fix: `Nothing in ${configFile} can add a binding a provider does not declare: point the step at a provider that binds ${protocol}.`,\n };\n }\n\n const configured = input.providerConfigurations[providerRef]?.[protocol] as ProtocolConfiguration | undefined;\n if (configured?.enabled === false) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.DISABLED,\n detail: `providerConfigurations.${providerRef}.${protocol}.enabled is false for this environment.`,\n fix: `Remove that \\`enabled: false\\` from ${configFile} or from this environment's infrastructure config.`,\n };\n }\n\n const keyEnvVarNames = ((): string[] => {\n const override = input.keySource === ProviderKeySource.CONFIGURED_AUTH_SECRET_REF ? configured?.authConfig?.secretRef : undefined;\n if (override) return [override];\n if (contribution.protocolSecretRefs !== undefined) {\n const ref = contribution.protocolSecretRefs[protocol];\n return ref === undefined ? [] : [ref];\n }\n return (contribution.secretsContractShape ?? []).filter((entry) => entry.required).map((entry) => entry.envVarName);\n })();\n const missing = keyEnvVarNames.filter((name) => !(input.providerEnv[name] ?? '').trim());\n if (missing.length > 0) {\n return {\n ready: false,\n refusal: ProviderProtocolRefusal.SECRET_MISSING,\n detail: `${providerRef} serves ${protocol} on the ${host}, but ${missing.join(', ')} has no value.`,\n fix: `Add ${missing.join(', ')} to providerEnv in this environment's secrets.json — or capture keys once with `\n + '`wildo local-defaults capture --from <an app that has them>` so every later application adopts them.',\n };\n }\n return { ready: true, keyEnvVarNames };\n}\n\n/**\n * The creation lane's provider requirements, one line per `(provider, protocol)` pair.\n *\n * Grouped because two consumers can need the same pair (the playbook lane and the logo judge both call\n * `openai` over `LLM_PROVIDER`), and one refusal reported twice reads as two problems. Each line still names\n * every consumer that stops, since which steps a missing key takes out is the operator's whole interest.\n */\nfunction collectCreationLaneProviderChecks(input: {\n scopes: ProviderScopes;\n contributions: readonly DiscoveredProviderCompanionContribution[];\n providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n providerEnv: Readonly<Record<string, string>>;\n}): LocalPreconditionCheckResult[] {\n const groups = new Map<string, { requirement: CreationLaneProviderRequirement; consumers: CreationLaneProviderConsumer[] }>();\n for (const consumer of Object.values(CreationLaneProviderConsumer)) {\n const requirement = CREATION_LANE_PROVIDER_REQUIREMENTS[consumer];\n const key = `${requirement.providerRef} ${requirement.protocol}`;\n const group = groups.get(key) ?? { requirement, consumers: [] };\n group.consumers.push(consumer);\n groups.set(key, group);\n }\n\n return [...groups.entries()].map(([key, { requirement, consumers }]) => {\n const name = `app-creation: ${key} (${consumers.join(', ')})`;\n const readiness = evaluateProviderProtocolReadiness({\n providerRef: requirement.providerRef,\n protocol: requirement.protocol,\n host: CreationProviderHost.COMPANION,\n keySource: ProviderKeySource.CONFIGURED_AUTH_SECRET_REF,\n ...input,\n });\n // Literal comparison, not truthiness: this package compiles without `strictNullChecks`, under which\n // `if (readiness.ready)` does not narrow the union to its refusal member.\n if (readiness.ready === false) {\n const stops = consumers.map((consumer) => CREATION_LANE_PROVIDER_REQUIREMENTS[consumer].stops).join('; ');\n return fail(name, `${readiness.detail} Stops: ${stops}.`, readiness.fix);\n }\n const keyState = readiness.keyEnvVarNames.length === 0 ? 'no key required' : `${readiness.keyEnvVarNames.join(', ')} present`;\n return pass(name, `${requirement.providerRef} serves ${requirement.protocol} on the companion; ${keyState}.`);\n });\n}\n\n/** The backend's own `billing` block, as `saas-config.backend.ts` authors it — what the boot reads. */\nexport interface BackendBillingDeclaration {\n readonly enabled?: boolean;\n readonly providerRef?: string;\n}\n\n/**\n * Reads `billing` from the application backend's `saas-config.backend.ts`, the object the backend boots with.\n *\n * `null` when the file does not exist (an application with no backend yet). Throws when it exists and cannot be\n * loaded, which the caller reports rather than reading as \"billing off\".\n */\nexport async function readBackendBillingDeclaration(saasRoot: string): Promise<BackendBillingDeclaration | null> {\n const path = join(saasRoot, BACKEND_CONFIG_RELATIVE_PATH);\n if (!existsSync(path)) return null;\n const backendConfig = await loadConfig<{ billing?: BackendBillingDeclaration }>(path);\n return backendConfig?.billing ?? {};\n}\n\n/**\n * The billing checks — two, because two different refusals exist and they read different sources.\n *\n * 1. **The required-capability floor** (`assertRequiredCapabilityFloor`): BILLING enabled in `engineCapabilities`\n * with no provider serving it, and the backend does not start. It reads no secret. Mirrored as \"no\n * backend-scoped provider declares BILLING\".\n * 2. **The billing provider's key** (`resolveBillingProvider`, `SECRET_MISSING`): read only when the BACKEND's own\n * `billing.enabled` is true (`initializeBillingServices` runs under that and nothing else), for the provider\n * `billing.providerRef` names, from its runtime contract's `secretRef`. Mirrored from those same fields of\n * `saas-config.backend.ts`, never from the capability: nothing forces the capability and `billing.enabled` to\n * agree, and an application with the capability on and backend billing off boots without any Stripe key.\n *\n * That last state is common in a creation run — the capability is declared at definition time, the backend switch\n * is wired by the build — so it gets a WARN naming the key the switch will need, not a FAIL the runtime would not\n * raise. The webhook signing secret is never asked for: no boot refusal reads it.\n */\nasync function collectBillingProviderChecks(input: {\n saasRoot: string;\n enabled: Record<string, { enabled?: boolean }>;\n scopes: ProviderScopes;\n contributions: readonly DiscoveredProviderCompanionContribution[];\n providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;\n providerEnv: Readonly<Record<string, string>>;\n readBackendBilling?: (saasRoot: string) => Promise<BackendBillingDeclaration | null>;\n}): Promise<LocalPreconditionCheckResult[]> {\n const results: LocalPreconditionCheckResult[] = [];\n const stops = 'the application backend — it refuses to start, so the run cannot verify what it built';\n const backendProviders = Object.keys(input.scopes[CreationProviderHost.BACKEND]?.providers ?? {});\n // Both halves of the runtime's resolution: the scope entry SELECTS the capability (its own `engineCapabilities`,\n // which defaults to none) and the provider's module DECLARES it. A `stripe: {}` scope entry serves nothing.\n const backendScope = input.scopes[CreationProviderHost.BACKEND]?.providers ?? {};\n const billingCapable = backendProviders.filter((ref) => ((backendScope[ref] as { engineCapabilities?: readonly string[] } | undefined)\n ?.engineCapabilities ?? []).includes(EngineCapability.BILLING)\n && input.contributions.some((contribution) => contribution.ref === ref\n && contribution.runtimeTargets.some((target) => target.kind === CreationProviderHost.BACKEND)\n && contribution.engineCapabilities.includes(EngineCapability.BILLING)));\n const capabilityOn = input.enabled[EngineCapability.BILLING]?.enabled === true;\n\n if (capabilityOn && billingCapable.length === 0) {\n results.push(fail(\n 'app-creation: billing capability',\n `BILLING is enabled and no backend-scoped provider serves it, so the required-capability floor refuses the backend. Stops: ${stops}.`,\n `Scope a billing provider under providers.scopes.backend in ${WORKSPACE_CONFIG_NAMES.SAAS} with engineCapabilities: [BILLING] `\n + '(e.g. stripe), or disable BILLING.',\n ));\n }\n\n let backendBilling: BackendBillingDeclaration | null;\n try {\n backendBilling = await (input.readBackendBilling ?? readBackendBillingDeclaration)(input.saasRoot);\n } catch (error) {\n if (capabilityOn || billingCapable.length > 0) {\n results.push(warn(\n 'app-creation: billing provider',\n `${BACKEND_CONFIG_RELATIVE_PATH} could not be loaded, so whether the backend turns billing on is unknown: ${describeCaughtError(error)}`,\n 'Fix what it names; the billing key cannot be checked until the backend configuration loads.',\n ));\n }\n return results;\n }\n\n const shared = { ...input, protocol: BUILTIN_PROVIDER_PROTOCOL.BILLING_PROVIDER, host: CreationProviderHost.BACKEND, keySource: ProviderKeySource.RUNTIME_CONTRACT_SECRET_REF };\n\n if (backendBilling?.enabled === true) {\n const providerRef = backendBilling.providerRef;\n if (!providerRef) {\n results.push(fail(\n 'app-creation: billing provider',\n `billing.enabled is true in ${BACKEND_CONFIG_RELATIVE_PATH} and billing.providerRef is unset. Stops: ${stops}.`,\n `Set billing.providerRef (e.g. 'stripe') in ${BACKEND_CONFIG_RELATIVE_PATH}, or set billing.enabled to false.`,\n ));\n return results;\n }\n const name = `app-creation: billing provider (${providerRef})`;\n const readiness = evaluateProviderProtocolReadiness({ ...shared, providerRef });\n results.push(readiness.ready === false\n ? fail(name, `${readiness.detail} Stops: ${stops}.`, readiness.fix)\n : pass(name, `Backend billing is on; ${providerRef} serves BILLING on the backend; ${readiness.keyEnvVarNames.join(', ') || 'no key required'} present.`));\n return results;\n }\n\n // Declared, not yet switched on: say what the switch will need, without refusing anything today.\n if (capabilityOn && billingCapable.length > 0) {\n const providerRef = billingCapable[0];\n const readiness = evaluateProviderProtocolReadiness({ ...shared, providerRef });\n if (readiness.ready === false) {\n results.push(warn(\n `app-creation: billing provider (${providerRef})`,\n `BILLING is declared but ${BACKEND_CONFIG_RELATIVE_PATH} does not turn billing on yet, so nothing refuses today. `\n + `When the build sets billing.enabled, the backend refuses to start: ${readiness.detail}`,\n readiness.fix,\n ));\n }\n }\n return results;\n}\n\nexport async function collectApplicationCreationReadinessChecks(input: {\n saasRoot: string;\n envName: string;\n /** Test seam; production loads `saas-config.backend.ts` the way the backend does. */\n readBackendBilling?: (saasRoot: string) => Promise<BackendBillingDeclaration | null>;\n}): Promise<LocalPreconditionCheckResult[]> {\n const results: LocalPreconditionCheckResult[] = [];\n const configPath = join(input.saasRoot, WORKSPACE_CONFIG_NAMES.SAAS);\n\n const saasConfig = await loadSaasConfig(configPath).catch(() => null);\n if (!saasConfig) {\n return [fail(\n 'app-creation: application configuration',\n `Could not load ${WORKSPACE_CONFIG_NAMES.SAAS}.`,\n 'Fix the configuration first — nothing below can be evaluated without it.',\n )];\n }\n\n // ── 1. Does discovery see any provider at all? ──\n //\n // A zero here is the state in which EVERY provider an application authors is refused with\n // \"no companion export contributes it for that runtime\", and nothing else reports it: discovery\n // returns an empty array for a broken walk and for an application with no providers alike (#1305).\n const { contributions, unreadableOwners } = await discoverSaasProviderCompanionContributions({\n saasRoot: input.saasRoot,\n saasConfig: saasConfig as never,\n }).catch(() => ({ contributions: [], unreadableOwners: [] }));\n\n /*\n * An owner that DECLARES a companion door and could not be read is the difference between \"this\n * application has no providers\" and \"the walk failed\" — the two used to be one answer, which is\n * what let a zero contribution count read as legitimate (#1305). Named here even when discovery\n * otherwise succeeded, because a broken package silently removes whatever it would have\n * contributed, and the provider that goes missing is refused somewhere else entirely.\n */\n const unreadable = unreadableOwners.length === 0\n ? ''\n : ` ${unreadableOwners.length} owner(s) declare a companion door that could not be read: `\n + `${unreadableOwners.map((owner) => owner.ownerLabel).join(', ')}.`;\n\n results.push(contributions.length > 0\n ? (unreadableOwners.length === 0\n ? pass('app-creation: provider discovery', `${contributions.length} provider contribution(s) discovered.`)\n : warn(\n 'app-creation: provider discovery',\n `${contributions.length} provider contribution(s) discovered, but${unreadable}`,\n 'Build or reinstall those packages — whatever they contribute is missing, and the provider will be refused elsewhere.',\n ))\n : fail(\n 'app-creation: provider discovery',\n `No provider contributions were discovered, so every provider this application declares will be refused.${unreadable}`,\n unreadableOwners.length > 0\n ? 'Build or reinstall the packages named above — the walk reached them and could not read them.'\n : 'Check that a provider package (@wildo-ai/external-connectors-private, or a provider installed with '\n + '`wildo registry add wildo/providers/<ref>`) is a dependency of a declared service and is installed — then re-run `pnpm install`.',\n ));\n\n const enabled = (saasConfig as { engineCapabilities?: Record<string, { enabled?: boolean }> }).engineCapabilities ?? {};\n const scopes = ((saasConfig as { providers?: { scopes?: ProviderScopes } }).providers?.scopes ?? {}) as ProviderScopes;\n /*\n * The companion scope ONLY. This accepted `backend` too until 2026-10-02, on the reasoning that a provider the\n * backend runs is \"genuinely enabled for the application\". It is not enabled for the process that refuses: the\n * creation journey runs in the companion, whose registry holds only the refs of its own provider-runtime artifact,\n * which `wildo config sync` writes from `providers.scopes.companion` alone (`filterRegistryByProviderRuntime`). A\n * backend-only provider therefore passed this line and was refused at the first agent call (#2229).\n */\n const companionScoped = new Set(Object.keys(scopes[CreationProviderHost.COMPANION]?.providers ?? {}));\n const secrets = EnvironmentUtils.loadSecretsJson(input.envName);\n const providerEnv = (secrets as { providerEnv?: Record<string, string> } | null)?.providerEnv ?? {};\n\n // ── 2/3. Per capability: enabled, scoped, and its secrets present ──\n for (const { capability, phase } of JOURNEY_CAPABILITIES) {\n const name = `app-creation: ${capability}`;\n\n if (enabled[capability]?.enabled !== true) {\n results.push(fail(\n name,\n `The application does not enable ${capability}. Stops: ${phase}.`,\n `Add [EngineCapability.${capability}]: { enabled: true } to engineCapabilities in ${WORKSPACE_CONFIG_NAMES.SAAS}, `\n + 'and scope a provider that declares it.',\n ));\n continue;\n }\n\n /*\n * The provider must be BOTH scoped by the application and discovered as declaring the capability.\n * Scoped-but-undiscovered is exactly what `config sync` refuses; discovered-but-unscoped is what\n * `isProviderEnabled` refuses at dispatch. Requiring both is what makes a green line mean the\n * runtime predicate will hold.\n */\n const usable = contributions.filter((contribution) => companionScoped.has(contribution.ref)\n && contribution.runtimeTargets.some((target) => target.kind === CreationProviderHost.COMPANION)\n && contribution.engineCapabilities.includes(capability));\n\n if (usable.length === 0) {\n const scopedRefs = [...companionScoped];\n results.push(fail(\n name,\n `${capability} is enabled but no scoped provider supplies it${scopedRefs.length > 0 ? ` (scoped: ${scopedRefs.join(', ')})` : ' — no provider is scoped at all'}. `\n + `Stops: ${phase}.`,\n `Scope a provider declaring ${capability} under providers.scopes.companion in ${WORKSPACE_CONFIG_NAMES.SAAS}.`,\n ));\n continue;\n }\n\n /*\n * ONE usable provider is enough, and getting this wrong was a false positive on the first run.\n *\n * A capability is satisfied by resolving ONE provider — `isProviderEnabled` is asked about a\n * single ref — so requiring every scoped provider to be credentialed reports a healthy\n * application as broken. Measured: Wonder Todos scopes `anthropic`, `google` and `openai` for\n * AI_LLM and holds no `GOOGLE_API_KEY`; it is the dogfood application and the journey runs there.\n * A check that fails on a working application is worse than no check, because it teaches its\n * reader to skim the line that one day means something.\n *\n * Required secrets come from each contribution's own `secretsContractShape`, so a provider added\n * to the engine tomorrow is evaluated correctly without this file naming it.\n */\n const missingFor = (contribution: typeof usable[number]): string[] => (contribution.secretsContractShape ?? [])\n .filter((entry) => entry.required && !(providerEnv[entry.envVarName] ?? '').trim())\n .map((entry) => entry.envVarName);\n\n const ready = usable.filter((contribution) => missingFor(contribution).length === 0);\n const unready = usable.filter((contribution) => missingFor(contribution).length > 0);\n\n if (ready.length > 0) {\n // The uncredentialed ones are NAMED rather than ignored — selecting one of them would still\n // refuse — but they do not fail the check, because the capability is satisfied.\n const aside = unready.length === 0\n ? ''\n : ` (${unready.map((c) => `${c.ref} lacks ${missingFor(c).join('/')}`).join('; ')} — usable only if selected)`;\n results.push(pass(name, `Supplied by ${ready.map((c) => c.ref).join(', ')}; required secrets present.${aside}`));\n continue;\n }\n\n const missing = [...new Set(usable.flatMap(missingFor))];\n results.push(fail(\n name,\n `${usable.map((c) => c.ref).join(', ')} supplies ${capability} but NO scoped provider has its required secret(s): `\n + `${missing.join(', ')}. Stops: ${phase}.`,\n 'Add them to providerEnv in this environment\\'s secrets.json — or capture them once with '\n + '`wildo local-defaults capture --from <an app that has them>` so every later application adopts them.',\n ));\n }\n\n // ── 3a/3b. The providers the lane's agents PIN, and the billing provider's key ──\n //\n // The capability lines above ask whether SOME provider serves AI_LLM. The runtime asks a narrower\n // question: each agent names its provider, and `isProviderEnabled(<that ref>, <its protocol>)` plus its key\n // decide the call. These lines ask exactly that, for the refs the agents read from the same table (#2229).\n let providerConfigurations: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>> | null;\n try {\n providerConfigurations = await resolveEnvironmentProviderConfigurations({\n saasRoot: input.saasRoot,\n applicationProviderConfigurations: (saasConfig as { providerConfigurations?: Record<string, Record<string, unknown> | undefined> })\n .providerConfigurations,\n environmentName: input.envName,\n });\n } catch (error) {\n providerConfigurations = null;\n results.push(fail(\n 'app-creation: provider configurations',\n `The provider configuration for ${input.envName} could not be resolved: ${describeCaughtError(error)}`,\n 'Fix the configuration it names — the provider checks below cannot be evaluated without it.',\n ));\n }\n if (providerConfigurations !== null) {\n const providerInput = { scopes, contributions, providerConfigurations, providerEnv };\n results.push(...collectCreationLaneProviderChecks(providerInput));\n results.push(...await collectBillingProviderChecks({ saasRoot: input.saasRoot, enabled, readBackendBilling: input.readBackendBilling, ...providerInput }));\n }\n\n // ── 4. The machine's shared provider keys ──\n //\n // ADVISORY, and only reported when something above is already missing its secrets: this file is how\n // a SECOND application gets its keys without anyone copying values between JSON files, so its\n // absence explains a gap rather than being a gap.\n const localDefaultsPath = resolveLocalDefaultsPath();\n if (!existsSync(localDefaultsPath) && results.some((r) => r.status === LocalPreconditionCheckStatus.FAIL)) {\n results.push(warn(\n 'app-creation: machine provider keys',\n `No ${localDefaultsPath} on this machine, so a newly created application mints everything and adopts nothing.`,\n 'Run `wildo local-defaults capture --from <an application that works>` once; later applications adopt it at `wildo init`.',\n ));\n }\n\n return results;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-dependency-alignment.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/application/application-dependency-alignment.service.ts"],"names":[],"mappings":"AA6CA,8FAA8F;AAC9F,eAAO,MAAM,0CAA0C,2CAA2C,CAAC;AAKnG,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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BAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,mBAAmB,EAAE,MAAM,EAAE,CAAA;CAAE,CA0BtD"}
1
+ {"version":3,"file":"application-dependency-alignment.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/application-dependency-alignment.service.ts"],"names":[],"mappings":"AA6CA,8FAA8F;AAC9F,eAAO,MAAM,0CAA0C,2CAA2C,CAAC;AAKnG,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,oBAAY,+BAA+B;IACzC,oGAAoG;IACpG,gBAAgB,qBAAqB;IACrC,6FAA6F;IAC7F,cAAc,mBAAmB;IACjC,sGAAsG;IACtG,YAAY,iBAAiB;IAC7B,uFAAuF;IACvF,oBAAoB,yBAAyB;CAC9C;AAED,MAAM,WAAW,2BAA2B;IAC1C,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,+BAA+B,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MA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aAAa,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAuB3H;;;;;OAKG;IACH,MAAM,CAAC,uBAAuB,CAAC,KAAK,EAAE;QACpC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACxC,aAAa,EAAE,MAAM,EAAE,CAAC;KACzB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAoC5B;;;;;;;;;OASG;IACH,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE;IAQxD,oFAAoF;IACpF,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO;IAIjE,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAgCrC,OAAO,CAAC,MAAM,CAAC,oBAAoB;IA8CnC,OAAO,CAAC,MAAM,CAAC,YAAY;IAK3B,4FAA4F;IAC5F,MAAM,CAAC,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAO9E;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,qBAAqB,EAAE,MAAM,GAAG,MAAM,EAAE,CAiBpF;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,mBAAmB,EAAE,MAAM,EAAE,CAAA;CAAE,CA0BtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-dependency-alignment.service.js","sourceRoot":"","sources":["../../../../../../src/services/application/application-dependency-alignment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EA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,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtE,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC9B,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,GAAa,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;iBAChE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;iBACpG,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;iBAC1B,IAAI,EAAE,CAAC;QACZ,CAAC;QAAC,MAAM,CAAC;YACP,gEAAgE;QAClE,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * ApplicationDependencyAlignmentService — align a STANDALONE application's dependency pins and\n * engine peer declarations against the `@wildo-ai/*` packages it actually has installed (issue #222).\n *\n * ## The problem this closes\n *\n * `wildo init` bakes three derived things into an application: the `@wildo-ai/*` version pins, the\n * third-party pins propagated from the framework's root `pnpm.overrides`, and the engine peer\n * declarations every workspace package must carry. All three are computed from the framework\n * CHECKOUT, at scaffold time. A standalone application has no checkout afterwards, so nothing\n * re-derives them: an application moved to a newer framework keeps the OLD third-party versions and\n * the OLD peer obligations — and the peer half cannot be corrected by reinstalling, because an\n * undeclared peer's resolution is sticky (issue #167).\n *\n * ## Why nothing new has to be published\n *\n * The publish lane already substitutes the framework's root override into every published manifest —\n * exact for `dependencies`, caret-widened for `peerDependencies`. So the pin set and the peer closure\n * are recoverable from the installed packages themselves. Measured against the real 1.1.1 packages in\n * a scaffolded application: of 150 recoverable propagated names, **143 reproduce the framework's own\n * root override exactly**; 5 differ only exact-vs-caret (names that appear ONLY as peers, where the\n * caret is the publish lane's deliberate widening for a consumer); and 2 differ by a major because\n * the framework's root moved AFTER 1.1.1 shipped — which is the point, not a defect. An application\n * aligns to the framework version it HAS, the only contract it can honour.\n *\n * That is why this service reads `node_modules` rather than a published manifest of pins: the data\n * cannot drift from the packages it describes, because it IS them.\n *\n * ## What it deliberately does NOT do\n *\n * It never changes a `@wildo-ai/*` version. Which framework release to adopt is the operator's\n * decision; everything else follows mechanically from it. The flow is:\n *\n * 1. bump the `@wildo-ai/*` entries in the application's `pnpm.overrides`\n * 2. `pnpm install` (the new pin set cannot be read until the new version is on disk)\n * 3. `wildo align-deps --write`\n * 4. `pnpm install`\n *\n * `wildo update` runs that flow for a release upgrade (`update.command.ts`): the operator's decision\n * is its `--to <version>` / `--tag`, its step 1 is the bump, and its step 3 is the install → this\n * service → install. Use `align-deps` on its own only for the first alignment after `wildo init`.\n */\nimport { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs';\nimport { dirname, join, relative } from 'path';\n\n/** Where an application declares the names its own toolchain owns. Seeded by `wildo init`. */\nexport const APPLICATION_DEPENDENCY_EXCLUSIONS_RELATIVE = '.wildo-saas/dependency-exclusions.json';\n\nconst FRAMEWORK_SCOPE_PREFIX = '@wildo-ai/';\nconst EXACT_SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+$/;\n\ninterface PackageManifest {\n name?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n peerDependenciesMeta?: Record<string, { optional?: boolean }>;\n optionalDependencies?: Record<string, string>;\n pnpm?: { overrides?: Record<string, string> };\n}\n\n/**\n * What is wrong with one manifest entry, and therefore what `--write` will do about it.\n *\n * The four are not degrees of the same thing — they split on TWO axes that need different repairs:\n * whether the name belongs in `pnpm.overrides` or in the importer's own dependency list, and whether\n * it is ABSENT or present-and-wrong. `peer-pinned-in-place` is the one that reads oddly and matters\n * most: the peer IS declared, but at a concrete version rather than `\"*\"`, so the framework's override\n * cannot reach it and a later pin bump silently will not land.\n */\nexport enum ApplicationAlignmentFindingKind {\n /** The framework pins this name and the application's `pnpm.overrides` does not carry it at all. */\n OVERRIDE_MISSING = 'override-missing',\n /** The application overrides the name, at a version the installed framework does not pin. */\n OVERRIDE_DRIFT = 'override-drift',\n /** A required engine peer the importer never declares, so `autoInstallPeers` resolves it unpinned. */\n PEER_MISSING = 'peer-missing',\n /** The peer is declared with a concrete version, which the override cannot rewrite. */\n PEER_PINNED_IN_PLACE = 'peer-pinned-in-place',\n}\n\nexport interface ApplicationAlignmentFinding {\n /** Application-root-relative path of the manifest that needs the change. */\n manifestRelativePath: string;\n kind: ApplicationAlignmentFindingKind;\n name: string;\n current?: string;\n desired: string;\n}\n\nexport interface ApplicationAlignmentResult {\n /** `@wildo-ai/*` packages whose installed manifest was read, with the version found. */\n installedFrameworkPackages: Array<{ name: string; version: string }>;\n /** Third-party names the installed engine pins, after exclusions. */\n derivedOverrides: Record<string, string>;\n /** Per framework package, the transitive REQUIRED peers a consumer must declare. */\n enginePeerClosure: Record<string, string[]>;\n excludedNames: string[];\n findings: ApplicationAlignmentFinding[];\n /**\n * Workspace member patterns this reader cannot expand (`dir/**`, an interior `*`, a `!exclusion`).\n * The packages they cover were NOT aligned; a caller reports them rather than calling the run clean.\n */\n unsupportedWorkspacePatterns: string[];\n written: boolean;\n}\n\nexport class ApplicationDependencyAlignmentService {\n /**\n * Compute (and optionally apply) the alignment for one application root.\n *\n * Reading is total and writing is per-manifest: a `--check` run touches nothing, and a `--write`\n * run rewrites only the manifests that actually have findings.\n */\n static align(input: { applicationRoot: string; write: boolean }): ApplicationAlignmentResult {\n const { members: workspaceMembers, unsupportedPatterns: unsupportedWorkspacePatterns } =\n ApplicationDependencyAlignmentService.discoverWorkspaceMembers(input.applicationRoot);\n const installed = ApplicationDependencyAlignmentService.readInstalledFrameworkManifests({\n applicationRoot: input.applicationRoot,\n workspaceMembers,\n });\n if (installed.size === 0) {\n throw new Error(\n 'No @wildo-ai/* package could be resolved from this application — run `pnpm install` first. '\n + 'Alignment derives every pin from the framework packages the application HAS installed, so '\n + 'an empty node_modules would silently produce an empty pin set.',\n );\n }\n\n const excludedNames = ApplicationDependencyAlignmentService.readExclusions(input.applicationRoot);\n const derivedOverrides = ApplicationDependencyAlignmentService.deriveOverrides({ installed, excludedNames });\n const enginePeerClosure = ApplicationDependencyAlignmentService.deriveEnginePeerClosure({ installed, excludedNames });\n\n const findings: ApplicationAlignmentFinding[] = [];\n findings.push(...ApplicationDependencyAlignmentService.reconcileRootOverrides({\n applicationRoot: input.applicationRoot, derivedOverrides, write: input.write,\n }));\n for (const member of workspaceMembers) {\n findings.push(...ApplicationDependencyAlignmentService.reconcileMemberPeers({\n applicationRoot: input.applicationRoot, member, enginePeerClosure, write: input.write,\n }));\n }\n\n return {\n installedFrameworkPackages: [...installed.entries()]\n .map(([name, manifest]) => ({ name, version: (manifest as { version?: string }).version ?? 'unknown' }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n derivedOverrides,\n enginePeerClosure,\n excludedNames,\n findings,\n unsupportedWorkspacePatterns,\n written: input.write && findings.length > 0,\n };\n }\n\n /**\n * The application's own workspace members, plus its root (`.`).\n *\n * GENERATED drops are skipped: `.wildo-saas/wildo-dev-companion` has its manifest written by the\n * companion delivery on every start, so a declaration reconciled into it is erased.\n *\n * A member may be a GLOB, and one kind always is: `wildo registry add` wires a provider module as\n * `providers/<ref>/*`, one member per facet package. Reading members as literal paths dropped every\n * glob (no directory is literally named `*`), so an installed provider package was never aligned\n * (#2019 review). {@link expandWorkspaceMemberPatterns} expands them with the framework reader's semantics.\n */\n static discoverWorkspaceMembers(applicationRoot: string): { members: string[]; unsupportedPatterns: string[] } {\n const { members, unsupportedPatterns } = expandWorkspaceMemberPatterns(\n applicationRoot,\n readWorkspacePackagePatterns(join(applicationRoot, 'pnpm-workspace.yaml')),\n );\n return {\n members: [...new Set(['.', ...members])]\n .filter((member) => !member.startsWith('.wildo-saas/'))\n .filter((member) => existsSync(join(applicationRoot, member, 'package.json'))),\n unsupportedPatterns,\n };\n }\n\n /**\n * Every `@wildo-ai/*` manifest the application can resolve, keyed by package name.\n *\n * Resolution goes through `createRequire` from each workspace member rather than by walking\n * `node_modules/.pnpm`: the virtual store's directory naming is a pnpm implementation detail, while\n * `require.resolve` is the contract every runtime in the application already uses. A member that\n * cannot resolve a name simply contributes nothing — under pnpm's isolated layout only a package's\n * own declared dependencies are reachable from it, and that is exactly the set that matters.\n */\n static readInstalledFrameworkManifests(input: {\n applicationRoot: string;\n workspaceMembers: string[];\n }): Map<string, PackageManifest> {\n const found = new Map<string, PackageManifest>();\n const candidateNames = new Set<string>();\n\n for (const member of input.workspaceMembers) {\n const manifest = ApplicationDependencyAlignmentService.readManifest(\n join(input.applicationRoot, member, 'package.json'),\n );\n if (!manifest) continue;\n for (const field of ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) candidateNames.add(name);\n }\n }\n }\n // The root `pnpm.overrides` names every framework package the scaffolder pinned, including ones\n // no member declares directly — they are still installed, and their peers still land on the app.\n const rootManifest = ApplicationDependencyAlignmentService.readManifest(join(input.applicationRoot, 'package.json'));\n for (const name of Object.keys(rootManifest?.pnpm?.overrides ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) candidateNames.add(name);\n }\n\n // A framework package's own `@wildo-ai/*` dependencies are followed too: the closure is\n // transitive, and an application need never name `presets-components` to inherit its peers.\n const pending = [...candidateNames];\n while (pending.length > 0) {\n const name = pending.pop() as string;\n if (found.has(name)) continue;\n const manifest = ApplicationDependencyAlignmentService.resolveFrameworkManifest({\n applicationRoot: input.applicationRoot,\n workspaceMembers: input.workspaceMembers,\n name,\n });\n if (!manifest) continue;\n found.set(name, manifest);\n for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const dependencyName of Object.keys(manifest[field] ?? {})) {\n if (dependencyName.startsWith(FRAMEWORK_SCOPE_PREFIX) && !found.has(dependencyName)) pending.push(dependencyName);\n }\n }\n }\n return found;\n }\n\n /**\n * Find a framework package's manifest by walking `node_modules` upward from each workspace member,\n * which is Node's own package-DIRECTORY lookup.\n *\n * NOT `require.resolve('<name>/package.json')`, which was the first attempt and does not work: a\n * published `@wildo-ai/*` package declares an `exports` map, and an exports map that does not list\n * `./package.json` makes that specifier unresolvable. Measured on a freshly scaffolded application —\n * every one of the twenty packages was installed and every resolve threw, so the service reported\n * \"no framework package installed\" on a perfectly healthy tree. A directory walk asks the question\n * actually being asked (where does this package LIVE) and is unaffected by what a package exports.\n */\n private static resolveFrameworkManifest(input: {\n applicationRoot: string;\n workspaceMembers: string[];\n name: string;\n }): PackageManifest | null {\n for (const member of input.workspaceMembers) {\n let directory = join(input.applicationRoot, member);\n for (;;) {\n const candidate = join(directory, 'node_modules', input.name, 'package.json');\n if (existsSync(candidate)) return JSON.parse(readFileSync(candidate, 'utf8')) as PackageManifest;\n const parent = dirname(directory);\n if (parent === directory || !parent.startsWith(input.applicationRoot)) break;\n directory = parent;\n }\n }\n return null;\n }\n\n /**\n * The third-party pin set the installed engine implies.\n *\n * When a name appears with several specifiers the EXACT one wins. That is not arbitrary: the\n * publish lane writes the tested version exactly into `dependencies` and widens it to a caret in\n * `peerDependencies`, so both describe the same version and the exact form is the one the framework\n * actually ran. Measured, it reproduces the framework's own root override for 143 of 150 names.\n *\n * ## Only a name the framework's ROOT pins is pinned — never a package's own private dependency\n *\n * The propagation contract (`toolchain-installation-baseline.md`) moves exactly the names the framework\n * root pins, and a manifest says which those are: the publish lane writes a root pin EXACT into\n * `dependencies` and as a caret into `peerDependencies`, and source form writes it `*`. A dependency\n * the root does NOT pin keeps the range its package authored — `platform-config-lib`'s `jiti ^2.6.1`.\n * This used to pin every such range application-wide, and an override reaches every edge that names\n * the package: on 2026-09-24 it forced jiti 2 onto Docusaurus (which loads its config through jiti 1),\n * the documentation site could no longer read `export default config`, and the failed service tore the\n * whole dev stack down on start. So a name is pinned when some framework package declares it exact,\n * `*`, or as a peer; a name only ever declared as a private range stays that package's business.\n */\n static deriveOverrides(input: { installed: Map<string, PackageManifest>; excludedNames: string[] }): Record<string, string> {\n const candidates = new Map<string, Set<string>>();\n const rootPinned = new Set<string>();\n for (const manifest of input.installed.values()) {\n for (const field of ['dependencies', 'peerDependencies'] as const) {\n for (const [name, specifier] of Object.entries(manifest[field] ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n if (ApplicationDependencyAlignmentService.isExcluded(name, input.excludedNames)) continue;\n if (!candidates.has(name)) candidates.set(name, new Set());\n (candidates.get(name) as Set<string>).add(specifier);\n if (field === 'peerDependencies' || specifier === '*' || EXACT_SEMVER_PATTERN.test(specifier)) rootPinned.add(name);\n }\n }\n }\n const overrides: Record<string, string> = {};\n for (const [name, specifiers] of candidates) {\n if (!rootPinned.has(name)) continue;\n const exact = [...specifiers].find((specifier) => EXACT_SEMVER_PATTERN.test(specifier));\n overrides[name] = exact ?? [...specifiers][0];\n }\n return Object.fromEntries(Object.keys(overrides).sort().map((name) => [name, overrides[name]]));\n }\n\n /**\n * Per framework package, the transitive REQUIRED peers a consumer must declare.\n *\n * Optional peers (`peerDependenciesMeta`) are excluded — an optional peer is not an obligation, and\n * `saas-technical-doc` / `saas-website` use that field to say exactly this.\n */\n static deriveEnginePeerClosure(input: {\n installed: Map<string, PackageManifest>;\n excludedNames: string[];\n }): Record<string, string[]> {\n const closureOf = new Map<string, Set<string>>();\n\n const walk = (packageName: string, visiting: Set<string>): Set<string> => {\n const cached = closureOf.get(packageName);\n if (cached) return cached;\n const manifest = input.installed.get(packageName);\n if (!manifest || visiting.has(packageName)) return new Set();\n visiting.add(packageName);\n\n const peers = new Set<string>();\n const optional = manifest.peerDependenciesMeta ?? {};\n for (const name of Object.keys(manifest.peerDependencies ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n if (optional[name]?.optional) continue;\n if (ApplicationDependencyAlignmentService.isExcluded(name, input.excludedNames)) continue;\n peers.add(name);\n }\n for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const dependencyName of Object.keys(manifest[field] ?? {})) {\n if (!dependencyName.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n for (const inherited of walk(dependencyName, visiting)) peers.add(inherited);\n }\n }\n visiting.delete(packageName);\n closureOf.set(packageName, peers);\n return peers;\n };\n\n const result: Record<string, string[]> = {};\n for (const packageName of [...input.installed.keys()].sort()) {\n result[packageName] = [...walk(packageName, new Set())].sort();\n }\n return result;\n }\n\n /**\n * Names this application's own toolchain owns, which alignment must never pin.\n *\n * APPLICATION-owned on purpose. The framework's equivalent list is a judgement about a typical\n * application's stack — `esbuild` follows vite, `express` follows webpack-dev-server, `mime`\n * follows express — and pinning those names was measured to break the docs toolchain. A real\n * application knows its own stack better than the framework does, so the list is seeded at\n * `wildo init` and owned from there. An absent file means no exclusions, which is honest for an\n * application that has never declared any.\n */\n static readExclusions(applicationRoot: string): string[] {\n const path = join(applicationRoot, APPLICATION_DEPENDENCY_EXCLUSIONS_RELATIVE);\n if (!existsSync(path)) return [];\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as { excludedNames?: Record<string, string> | string[] };\n const names = Array.isArray(parsed.excludedNames) ? parsed.excludedNames : Object.keys(parsed.excludedNames ?? {});\n return [...names].sort();\n }\n\n /** A key ending in `*` is a prefix match (`@astrojs/*`); anything else is exact. */\n static isExcluded(name: string, excludedNames: string[]): boolean {\n return excludedNames.some((key) => (key.endsWith('*') ? name.startsWith(key.slice(0, -1)) : key === name));\n }\n\n private static reconcileRootOverrides(input: {\n applicationRoot: string;\n derivedOverrides: Record<string, string>;\n write: boolean;\n }): ApplicationAlignmentFinding[] {\n const manifestPath = join(input.applicationRoot, 'package.json');\n const manifest = ApplicationDependencyAlignmentService.readManifest(manifestPath);\n if (!manifest) return [];\n const current = manifest.pnpm?.overrides ?? {};\n\n const findings: ApplicationAlignmentFinding[] = [];\n for (const [name, desired] of Object.entries(input.derivedOverrides)) {\n const existing = current[name];\n if (existing === desired) continue;\n findings.push({\n manifestRelativePath: 'package.json',\n kind: existing === undefined ? ApplicationAlignmentFindingKind.OVERRIDE_MISSING : ApplicationAlignmentFindingKind.OVERRIDE_DRIFT,\n name,\n current: existing,\n desired,\n });\n }\n if (!findings.length || !input.write) return findings;\n\n // MERGE, never replace: the application's `@wildo-ai/*` pins, and any pin it authored itself,\n // are not this service's to decide — only the names the installed engine implies are.\n const merged = { ...current, ...input.derivedOverrides };\n manifest.pnpm = { ...(manifest.pnpm ?? {}), overrides: Object.fromEntries(Object.keys(merged).sort().map((k) => [k, merged[k]])) };\n writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n return findings;\n }\n\n private static reconcileMemberPeers(input: {\n applicationRoot: string;\n member: string;\n enginePeerClosure: Record<string, string[]>;\n write: boolean;\n }): ApplicationAlignmentFinding[] {\n const manifestPath = join(input.applicationRoot, input.member, 'package.json');\n const manifest = ApplicationDependencyAlignmentService.readManifest(manifestPath);\n if (!manifest) return [];\n\n const required = new Set<string>();\n for (const field of ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) {\n if (!name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n for (const peerName of input.enginePeerClosure[name] ?? []) required.add(peerName);\n }\n }\n // A name already declared as a real dependency needs no peer entry — the override reaches it there.\n for (const field of ['dependencies', 'devDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) required.delete(name);\n }\n\n const peers = { ...(manifest.peerDependencies ?? {}) };\n const findings: ApplicationAlignmentFinding[] = [];\n const relativePath = input.member === '.' ? 'package.json' : `${relative('.', join(input.member, 'package.json'))}`;\n for (const name of [...required].sort()) {\n if (peers[name] === '*') continue;\n findings.push({\n manifestRelativePath: relativePath,\n kind: name in peers ? ApplicationAlignmentFindingKind.PEER_PINNED_IN_PLACE : ApplicationAlignmentFindingKind.PEER_MISSING,\n name,\n current: peers[name],\n desired: '*',\n });\n }\n if (!findings.length || !input.write) return findings;\n\n // `\"*\"` and never a version: the pin lives in `pnpm.overrides`, so a later framework bump reaches\n // the application without touching this block. Nothing is removed — a name the closure does not\n // require may still be the application's own.\n for (const finding of findings) peers[finding.name] = '*';\n manifest.peerDependencies = Object.fromEntries(Object.keys(peers).sort().map((name) => [name, peers[name]]));\n writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n return findings;\n }\n\n private static readManifest(path: string): PackageManifest | null {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf8')) as PackageManifest;\n }\n\n /** Exposed for the scaffolder's exclusion seeding, which reads the framework's own list. */\n static readFrameworkExclusions(frameworkPath: string): Record<string, string> {\n const path = join(frameworkPath, 'scripts', 'app-dependency-alignment', 'propagated-engine-overrides.json');\n if (!existsSync(path)) return {};\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as { deliberatelyExcluded?: Record<string, string> };\n return parsed.deliberatelyExcluded ?? {};\n }\n\n}\n\n/**\n * The raw member patterns of a workspace file's `packages:` block, in authored order; `[]` when the file\n * is absent. Scoped to that block, as `scripts/pnpm-workspace-members.mjs` is: a scan of every `- ` line\n * also reads `onlyBuiltDependencies:` and the other list blocks as members.\n */\nexport function readWorkspacePackagePatterns(workspaceManifestPath: string): string[] {\n if (!existsSync(workspaceManifestPath)) return [];\n const patterns: string[] = [];\n let inPackages = false;\n for (const rawLine of readFileSync(workspaceManifestPath, 'utf8').split(/\\r?\\n/)) {\n if (/^packages:\\s*$/.test(rawLine)) {\n inPackages = true;\n continue;\n }\n // A new top-level key ends the block; comments and list items do not.\n if (inPackages && /^\\S/.test(rawLine)) break;\n if (!inPackages) continue;\n const item = rawLine.match(/^\\s*-\\s*['\"]?([^'\"#]+?)['\"]?\\s*(#.*)?$/);\n const pattern = item?.[1]?.trim();\n if (pattern) patterns.push(pattern);\n }\n return patterns;\n}\n\n/**\n * Expand `pnpm-workspace.yaml` member patterns into member directories, relative to the root.\n *\n * The same semantics as the framework's one reader, `scripts/pnpm-workspace-members.mjs` (#362),\n * which this published CLI cannot import (it ships without the framework's `scripts/`): a LITERAL\n * path, and ONE trailing `dir/*` level whose children count only when they hold a `package.json`\n * (pnpm's own rule, and what keeps `dist/` and `node_modules/` out). Anything else, such as `dir/**`,\n * an interior `*` or a `!exclusion`, comes back in `unsupportedPatterns` for the caller to report,\n * because a member silently dropped makes every package it covers look aligned.\n */\nexport function expandWorkspaceMemberPatterns(\n root: string,\n patterns: readonly string[],\n): { members: string[]; unsupportedPatterns: string[] } {\n const members: string[] = [];\n const unsupportedPatterns: string[] = [];\n for (const raw of patterns) {\n const pattern = raw.replace(/^\\.\\//, '').replace(/\\/+$/, '');\n if (!pattern.includes('*') && !pattern.startsWith('!')) {\n members.push(pattern === '' ? '.' : pattern);\n continue;\n }\n const parent = pattern.endsWith('/*') ? pattern.slice(0, -2) : null;\n if (parent === null || parent.includes('*') || parent.startsWith('!')) {\n unsupportedPatterns.push(raw);\n continue;\n }\n let children: string[] = [];\n try {\n children = readdirSync(join(root, parent), { withFileTypes: true })\n .filter((entry) => entry.isDirectory() && existsSync(join(root, parent, entry.name, 'package.json')))\n .map((entry) => entry.name)\n .sort();\n } catch {\n // An absent parent directory expands to no members, as in pnpm.\n }\n members.push(...children.map((name) => (parent === '' ? name : `${parent}/${name}`)));\n }\n return { members, unsupportedPatterns };\n}\n"]}
1
+ {"version":3,"file":"application-dependency-alignment.service.js","sourceRoot":"","sources":["../../../../src/services/application/application-dependency-alignment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE/C,8FAA8F;AAC9F,MAAM,CAAC,MAAM,0CAA0C,GAAG,wCAAwC,CAAC;AAEnG,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAC5C,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAY/C;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,+BASX;AATD,WAAY,+BAA+B;IACzC,oGAAoG;IACpG,wEAAqC,CAAA;IACrC,6FAA6F;IAC7F,oEAAiC,CAAA;IACjC,sGAAsG;IACtG,gEAA6B,CAAA;IAC7B,uFAAuF;IACvF,gFAA6C,CAAA;AAC/C,CAAC,EATW,+BAA+B,KAA/B,+BAA+B,QAS1C;AA4BD,MAAM,OAAO,qCAAqC;IAChD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,KAAkD;QAC7D,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,GACpF,qCAAqC,CAAC,wBAAwB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxF,MAAM,SAAS,GAAG,qCAAqC,CAAC,+BAA+B,CAAC;YACtF,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,gBAAgB;SACjB,CAAC,CAAC;QACH,IAAI,SAAS,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AAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * ApplicationDependencyAlignmentService — align a STANDALONE application's dependency pins and\n * engine peer declarations against the `@wildo-ai/*` packages it actually has installed (issue #222).\n *\n * ## The problem this closes\n *\n * `wildo init` bakes three derived things into an application: the `@wildo-ai/*` version pins, the\n * third-party pins propagated from the framework's root `pnpm.overrides`, and the engine peer\n * declarations every workspace package must carry. All three are computed from the framework\n * CHECKOUT, at scaffold time. A standalone application has no checkout afterwards, so nothing\n * re-derives them: an application moved to a newer framework keeps the OLD third-party versions and\n * the OLD peer obligations — and the peer half cannot be corrected by reinstalling, because an\n * undeclared peer's resolution is sticky (issue #167).\n *\n * ## Why nothing new has to be published\n *\n * The publish lane already substitutes the framework's root override into every published manifest —\n * exact for `dependencies`, caret-widened for `peerDependencies`. So the pin set and the peer closure\n * are recoverable from the installed packages themselves. Measured against the real 1.1.1 packages in\n * a scaffolded application: of 150 recoverable propagated names, **143 reproduce the framework's own\n * root override exactly**; 5 differ only exact-vs-caret (names that appear ONLY as peers, where the\n * caret is the publish lane's deliberate widening for a consumer); and 2 differ by a major because\n * the framework's root moved AFTER 1.1.1 shipped — which is the point, not a defect. An application\n * aligns to the framework version it HAS, the only contract it can honour.\n *\n * That is why this service reads `node_modules` rather than a published manifest of pins: the data\n * cannot drift from the packages it describes, because it IS them.\n *\n * ## What it deliberately does NOT do\n *\n * It never changes a `@wildo-ai/*` version. Which framework release to adopt is the operator's\n * decision; everything else follows mechanically from it. The flow is:\n *\n * 1. bump the `@wildo-ai/*` entries in the application's `pnpm.overrides`\n * 2. `pnpm install` (the new pin set cannot be read until the new version is on disk)\n * 3. `wildo align-deps --write`\n * 4. `pnpm install`\n *\n * `wildo update` runs that flow for a release upgrade (`update.command.ts`): the operator's decision\n * is its `--to <version>` / `--tag`, its step 1 is the bump, and its step 3 is the install → this\n * service → install. Use `align-deps` on its own only for the first alignment after `wildo init`.\n */\nimport { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs';\nimport { dirname, join, relative } from 'path';\n\n/** Where an application declares the names its own toolchain owns. Seeded by `wildo init`. */\nexport const APPLICATION_DEPENDENCY_EXCLUSIONS_RELATIVE = '.wildo-saas/dependency-exclusions.json';\n\nconst FRAMEWORK_SCOPE_PREFIX = '@wildo-ai/';\nconst EXACT_SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+$/;\n\ninterface PackageManifest {\n name?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n peerDependenciesMeta?: Record<string, { optional?: boolean }>;\n optionalDependencies?: Record<string, string>;\n pnpm?: { overrides?: Record<string, string> };\n}\n\n/**\n * What is wrong with one manifest entry, and therefore what `--write` will do about it.\n *\n * The four are not degrees of the same thing — they split on TWO axes that need different repairs:\n * whether the name belongs in `pnpm.overrides` or in the importer's own dependency list, and whether\n * it is ABSENT or present-and-wrong. `peer-pinned-in-place` is the one that reads oddly and matters\n * most: the peer IS declared, but at a concrete version rather than `\"*\"`, so the framework's override\n * cannot reach it and a later pin bump silently will not land.\n */\nexport enum ApplicationAlignmentFindingKind {\n /** The framework pins this name and the application's `pnpm.overrides` does not carry it at all. */\n OVERRIDE_MISSING = 'override-missing',\n /** The application overrides the name, at a version the installed framework does not pin. */\n OVERRIDE_DRIFT = 'override-drift',\n /** A required engine peer the importer never declares, so `autoInstallPeers` resolves it unpinned. */\n PEER_MISSING = 'peer-missing',\n /** The peer is declared with a concrete version, which the override cannot rewrite. */\n PEER_PINNED_IN_PLACE = 'peer-pinned-in-place',\n}\n\nexport interface ApplicationAlignmentFinding {\n /** Application-root-relative path of the manifest that needs the change. */\n manifestRelativePath: string;\n kind: ApplicationAlignmentFindingKind;\n name: string;\n current?: string;\n desired: string;\n}\n\nexport interface ApplicationAlignmentResult {\n /** `@wildo-ai/*` packages whose installed manifest was read, with the version found. */\n installedFrameworkPackages: Array<{ name: string; version: string }>;\n /** Third-party names the installed engine pins, after exclusions. */\n derivedOverrides: Record<string, string>;\n /** Per framework package, the transitive REQUIRED peers a consumer must declare. */\n enginePeerClosure: Record<string, string[]>;\n excludedNames: string[];\n findings: ApplicationAlignmentFinding[];\n /**\n * Workspace member patterns this reader cannot expand (`dir/**`, an interior `*`, a `!exclusion`).\n * The packages they cover were NOT aligned; a caller reports them rather than calling the run clean.\n */\n unsupportedWorkspacePatterns: string[];\n written: boolean;\n}\n\nexport class ApplicationDependencyAlignmentService {\n /**\n * Compute (and optionally apply) the alignment for one application root.\n *\n * Reading is total and writing is per-manifest: a `--check` run touches nothing, and a `--write`\n * run rewrites only the manifests that actually have findings.\n */\n static align(input: { applicationRoot: string; write: boolean }): ApplicationAlignmentResult {\n const { members: workspaceMembers, unsupportedPatterns: unsupportedWorkspacePatterns } =\n ApplicationDependencyAlignmentService.discoverWorkspaceMembers(input.applicationRoot);\n const installed = ApplicationDependencyAlignmentService.readInstalledFrameworkManifests({\n applicationRoot: input.applicationRoot,\n workspaceMembers,\n });\n if (installed.size === 0) {\n throw new Error(\n 'No @wildo-ai/* package could be resolved from this application — run `pnpm install` first. '\n + 'Alignment derives every pin from the framework packages the application HAS installed, so '\n + 'an empty node_modules would silently produce an empty pin set.',\n );\n }\n\n const excludedNames = ApplicationDependencyAlignmentService.readExclusions(input.applicationRoot);\n const derivedOverrides = ApplicationDependencyAlignmentService.deriveOverrides({ installed, excludedNames });\n const enginePeerClosure = ApplicationDependencyAlignmentService.deriveEnginePeerClosure({ installed, excludedNames });\n\n const findings: ApplicationAlignmentFinding[] = [];\n findings.push(...ApplicationDependencyAlignmentService.reconcileRootOverrides({\n applicationRoot: input.applicationRoot, derivedOverrides, write: input.write,\n }));\n for (const member of workspaceMembers) {\n findings.push(...ApplicationDependencyAlignmentService.reconcileMemberPeers({\n applicationRoot: input.applicationRoot, member, enginePeerClosure, write: input.write,\n }));\n }\n\n return {\n installedFrameworkPackages: [...installed.entries()]\n .map(([name, manifest]) => ({ name, version: (manifest as { version?: string }).version ?? 'unknown' }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n derivedOverrides,\n enginePeerClosure,\n excludedNames,\n findings,\n unsupportedWorkspacePatterns,\n written: input.write && findings.length > 0,\n };\n }\n\n /**\n * The application's own workspace members, plus its root (`.`).\n *\n * GENERATED drops are skipped: `.wildo-saas/wildo-dev-companion` has its manifest written by the\n * companion delivery on every start, so a declaration reconciled into it is erased.\n *\n * A member may be a GLOB, and one kind always is: `wildo registry add` wires a provider module as\n * `providers/<ref>/*`, one member per facet package. Reading members as literal paths dropped every\n * glob (no directory is literally named `*`), so an installed provider package was never aligned\n * (#2019 review). {@link expandWorkspaceMemberPatterns} expands them with the framework reader's semantics.\n */\n static discoverWorkspaceMembers(applicationRoot: string): { members: string[]; unsupportedPatterns: string[] } {\n const { members, unsupportedPatterns } = expandWorkspaceMemberPatterns(\n applicationRoot,\n readWorkspacePackagePatterns(join(applicationRoot, 'pnpm-workspace.yaml')),\n );\n return {\n members: [...new Set(['.', ...members])]\n .filter((member) => !member.startsWith('.wildo-saas/'))\n .filter((member) => existsSync(join(applicationRoot, member, 'package.json'))),\n unsupportedPatterns,\n };\n }\n\n /**\n * Every `@wildo-ai/*` manifest the application can resolve, keyed by package name.\n *\n * Resolution goes through `createRequire` from each workspace member rather than by walking\n * `node_modules/.pnpm`: the virtual store's directory naming is a pnpm implementation detail, while\n * `require.resolve` is the contract every runtime in the application already uses. A member that\n * cannot resolve a name simply contributes nothing — under pnpm's isolated layout only a package's\n * own declared dependencies are reachable from it, and that is exactly the set that matters.\n */\n static readInstalledFrameworkManifests(input: {\n applicationRoot: string;\n workspaceMembers: string[];\n }): Map<string, PackageManifest> {\n const found = new Map<string, PackageManifest>();\n const candidateNames = new Set<string>();\n\n for (const member of input.workspaceMembers) {\n const manifest = ApplicationDependencyAlignmentService.readManifest(\n join(input.applicationRoot, member, 'package.json'),\n );\n if (!manifest) continue;\n for (const field of ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) candidateNames.add(name);\n }\n }\n }\n // The root `pnpm.overrides` names every framework package the scaffolder pinned, including ones\n // no member declares directly — they are still installed, and their peers still land on the app.\n const rootManifest = ApplicationDependencyAlignmentService.readManifest(join(input.applicationRoot, 'package.json'));\n for (const name of Object.keys(rootManifest?.pnpm?.overrides ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) candidateNames.add(name);\n }\n\n // A framework package's own `@wildo-ai/*` dependencies are followed too: the closure is\n // transitive, and an application need never name `presets-components` to inherit its peers.\n const pending = [...candidateNames];\n while (pending.length > 0) {\n const name = pending.pop() as string;\n if (found.has(name)) continue;\n const manifest = ApplicationDependencyAlignmentService.resolveFrameworkManifest({\n applicationRoot: input.applicationRoot,\n workspaceMembers: input.workspaceMembers,\n name,\n });\n if (!manifest) continue;\n found.set(name, manifest);\n for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const dependencyName of Object.keys(manifest[field] ?? {})) {\n if (dependencyName.startsWith(FRAMEWORK_SCOPE_PREFIX) && !found.has(dependencyName)) pending.push(dependencyName);\n }\n }\n }\n return found;\n }\n\n /**\n * Find a framework package's manifest by walking `node_modules` upward from each workspace member,\n * which is Node's own package-DIRECTORY lookup.\n *\n * NOT `require.resolve('<name>/package.json')`, which was the first attempt and does not work: a\n * published `@wildo-ai/*` package declares an `exports` map, and an exports map that does not list\n * `./package.json` makes that specifier unresolvable. Measured on a freshly scaffolded application —\n * every one of the twenty packages was installed and every resolve threw, so the service reported\n * \"no framework package installed\" on a perfectly healthy tree. A directory walk asks the question\n * actually being asked (where does this package LIVE) and is unaffected by what a package exports.\n */\n private static resolveFrameworkManifest(input: {\n applicationRoot: string;\n workspaceMembers: string[];\n name: string;\n }): PackageManifest | null {\n for (const member of input.workspaceMembers) {\n let directory = join(input.applicationRoot, member);\n for (;;) {\n const candidate = join(directory, 'node_modules', input.name, 'package.json');\n if (existsSync(candidate)) return JSON.parse(readFileSync(candidate, 'utf8')) as PackageManifest;\n const parent = dirname(directory);\n if (parent === directory || !parent.startsWith(input.applicationRoot)) break;\n directory = parent;\n }\n }\n return null;\n }\n\n /**\n * The third-party pin set the installed engine implies.\n *\n * When a name appears with several specifiers the EXACT one wins. That is not arbitrary: the\n * publish lane writes the tested version exactly into `dependencies` and widens it to a caret in\n * `peerDependencies`, so both describe the same version and the exact form is the one the framework\n * actually ran. Measured, it reproduces the framework's own root override for 143 of 150 names.\n *\n * ## Only a name the framework's ROOT pins is pinned — never a package's own private dependency\n *\n * The propagation contract (`toolchain-installation-baseline.md`) moves exactly the names the framework\n * root pins, and a manifest says which those are: the publish lane writes a root pin EXACT into\n * `dependencies` and as a caret into `peerDependencies`, and source form writes it `*`. A dependency\n * the root does NOT pin keeps the range its package authored — `platform-config-lib`'s `jiti ^2.6.1`.\n * This used to pin every such range application-wide, and an override reaches every edge that names\n * the package: on 2026-09-24 it forced jiti 2 onto Docusaurus (which loads its config through jiti 1),\n * the documentation site could no longer read `export default config`, and the failed service tore the\n * whole dev stack down on start. So a name is pinned when some framework package declares it exact,\n * `*`, or as a peer; a name only ever declared as a private range stays that package's business.\n */\n static deriveOverrides(input: { installed: Map<string, PackageManifest>; excludedNames: string[] }): Record<string, string> {\n const candidates = new Map<string, Set<string>>();\n const rootPinned = new Set<string>();\n for (const manifest of input.installed.values()) {\n for (const field of ['dependencies', 'peerDependencies'] as const) {\n for (const [name, specifier] of Object.entries(manifest[field] ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n if (ApplicationDependencyAlignmentService.isExcluded(name, input.excludedNames)) continue;\n if (!candidates.has(name)) candidates.set(name, new Set());\n (candidates.get(name) as Set<string>).add(specifier);\n if (field === 'peerDependencies' || specifier === '*' || EXACT_SEMVER_PATTERN.test(specifier)) rootPinned.add(name);\n }\n }\n }\n const overrides: Record<string, string> = {};\n for (const [name, specifiers] of candidates) {\n if (!rootPinned.has(name)) continue;\n const exact = [...specifiers].find((specifier) => EXACT_SEMVER_PATTERN.test(specifier));\n overrides[name] = exact ?? [...specifiers][0];\n }\n return Object.fromEntries(Object.keys(overrides).sort().map((name) => [name, overrides[name]]));\n }\n\n /**\n * Per framework package, the transitive REQUIRED peers a consumer must declare.\n *\n * Optional peers (`peerDependenciesMeta`) are excluded — an optional peer is not an obligation, and\n * `saas-technical-doc` / `saas-website` use that field to say exactly this.\n */\n static deriveEnginePeerClosure(input: {\n installed: Map<string, PackageManifest>;\n excludedNames: string[];\n }): Record<string, string[]> {\n const closureOf = new Map<string, Set<string>>();\n\n const walk = (packageName: string, visiting: Set<string>): Set<string> => {\n const cached = closureOf.get(packageName);\n if (cached) return cached;\n const manifest = input.installed.get(packageName);\n if (!manifest || visiting.has(packageName)) return new Set();\n visiting.add(packageName);\n\n const peers = new Set<string>();\n const optional = manifest.peerDependenciesMeta ?? {};\n for (const name of Object.keys(manifest.peerDependencies ?? {})) {\n if (name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n if (optional[name]?.optional) continue;\n if (ApplicationDependencyAlignmentService.isExcluded(name, input.excludedNames)) continue;\n peers.add(name);\n }\n for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const dependencyName of Object.keys(manifest[field] ?? {})) {\n if (!dependencyName.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n for (const inherited of walk(dependencyName, visiting)) peers.add(inherited);\n }\n }\n visiting.delete(packageName);\n closureOf.set(packageName, peers);\n return peers;\n };\n\n const result: Record<string, string[]> = {};\n for (const packageName of [...input.installed.keys()].sort()) {\n result[packageName] = [...walk(packageName, new Set())].sort();\n }\n return result;\n }\n\n /**\n * Names this application's own toolchain owns, which alignment must never pin.\n *\n * APPLICATION-owned on purpose. The framework's equivalent list is a judgement about a typical\n * application's stack — `esbuild` follows vite, `express` follows webpack-dev-server, `mime`\n * follows express — and pinning those names was measured to break the docs toolchain. A real\n * application knows its own stack better than the framework does, so the list is seeded at\n * `wildo init` and owned from there. An absent file means no exclusions, which is honest for an\n * application that has never declared any.\n */\n static readExclusions(applicationRoot: string): string[] {\n const path = join(applicationRoot, APPLICATION_DEPENDENCY_EXCLUSIONS_RELATIVE);\n if (!existsSync(path)) return [];\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as { excludedNames?: Record<string, string> | string[] };\n const names = Array.isArray(parsed.excludedNames) ? parsed.excludedNames : Object.keys(parsed.excludedNames ?? {});\n return [...names].sort();\n }\n\n /** A key ending in `*` is a prefix match (`@astrojs/*`); anything else is exact. */\n static isExcluded(name: string, excludedNames: string[]): boolean {\n return excludedNames.some((key) => (key.endsWith('*') ? name.startsWith(key.slice(0, -1)) : key === name));\n }\n\n private static reconcileRootOverrides(input: {\n applicationRoot: string;\n derivedOverrides: Record<string, string>;\n write: boolean;\n }): ApplicationAlignmentFinding[] {\n const manifestPath = join(input.applicationRoot, 'package.json');\n const manifest = ApplicationDependencyAlignmentService.readManifest(manifestPath);\n if (!manifest) return [];\n const current = manifest.pnpm?.overrides ?? {};\n\n const findings: ApplicationAlignmentFinding[] = [];\n for (const [name, desired] of Object.entries(input.derivedOverrides)) {\n const existing = current[name];\n if (existing === desired) continue;\n findings.push({\n manifestRelativePath: 'package.json',\n kind: existing === undefined ? ApplicationAlignmentFindingKind.OVERRIDE_MISSING : ApplicationAlignmentFindingKind.OVERRIDE_DRIFT,\n name,\n current: existing,\n desired,\n });\n }\n if (!findings.length || !input.write) return findings;\n\n // MERGE, never replace: the application's `@wildo-ai/*` pins, and any pin it authored itself,\n // are not this service's to decide — only the names the installed engine implies are.\n const merged = { ...current, ...input.derivedOverrides };\n manifest.pnpm = { ...(manifest.pnpm ?? {}), overrides: Object.fromEntries(Object.keys(merged).sort().map((k) => [k, merged[k]])) };\n writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n return findings;\n }\n\n private static reconcileMemberPeers(input: {\n applicationRoot: string;\n member: string;\n enginePeerClosure: Record<string, string[]>;\n write: boolean;\n }): ApplicationAlignmentFinding[] {\n const manifestPath = join(input.applicationRoot, input.member, 'package.json');\n const manifest = ApplicationDependencyAlignmentService.readManifest(manifestPath);\n if (!manifest) return [];\n\n const required = new Set<string>();\n for (const field of ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) {\n if (!name.startsWith(FRAMEWORK_SCOPE_PREFIX)) continue;\n for (const peerName of input.enginePeerClosure[name] ?? []) required.add(peerName);\n }\n }\n // A name already declared as a real dependency needs no peer entry — the override reaches it there.\n for (const field of ['dependencies', 'devDependencies', 'optionalDependencies'] as const) {\n for (const name of Object.keys(manifest[field] ?? {})) required.delete(name);\n }\n\n const peers = { ...(manifest.peerDependencies ?? {}) };\n const findings: ApplicationAlignmentFinding[] = [];\n const relativePath = input.member === '.' ? 'package.json' : `${relative('.', join(input.member, 'package.json'))}`;\n for (const name of [...required].sort()) {\n if (peers[name] === '*') continue;\n findings.push({\n manifestRelativePath: relativePath,\n kind: name in peers ? ApplicationAlignmentFindingKind.PEER_PINNED_IN_PLACE : ApplicationAlignmentFindingKind.PEER_MISSING,\n name,\n current: peers[name],\n desired: '*',\n });\n }\n if (!findings.length || !input.write) return findings;\n\n // `\"*\"` and never a version: the pin lives in `pnpm.overrides`, so a later framework bump reaches\n // the application without touching this block. Nothing is removed — a name the closure does not\n // require may still be the application's own.\n for (const finding of findings) peers[finding.name] = '*';\n manifest.peerDependencies = Object.fromEntries(Object.keys(peers).sort().map((name) => [name, peers[name]]));\n writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf8');\n return findings;\n }\n\n private static readManifest(path: string): PackageManifest | null {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf8')) as PackageManifest;\n }\n\n /** Exposed for the scaffolder's exclusion seeding, which reads the framework's own list. */\n static readFrameworkExclusions(frameworkPath: string): Record<string, string> {\n const path = join(frameworkPath, 'scripts', 'app-dependency-alignment', 'propagated-engine-overrides.json');\n if (!existsSync(path)) return {};\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as { deliberatelyExcluded?: Record<string, string> };\n return parsed.deliberatelyExcluded ?? {};\n }\n\n}\n\n/**\n * The raw member patterns of a workspace file's `packages:` block, in authored order; `[]` when the file\n * is absent. Scoped to that block, as `scripts/pnpm-workspace-members.mjs` is: a scan of every `- ` line\n * also reads `onlyBuiltDependencies:` and the other list blocks as members.\n */\nexport function readWorkspacePackagePatterns(workspaceManifestPath: string): string[] {\n if (!existsSync(workspaceManifestPath)) return [];\n const patterns: string[] = [];\n let inPackages = false;\n for (const rawLine of readFileSync(workspaceManifestPath, 'utf8').split(/\\r?\\n/)) {\n if (/^packages:\\s*$/.test(rawLine)) {\n inPackages = true;\n continue;\n }\n // A new top-level key ends the block; comments and list items do not.\n if (inPackages && /^\\S/.test(rawLine)) break;\n if (!inPackages) continue;\n const item = rawLine.match(/^\\s*-\\s*['\"]?([^'\"#]+?)['\"]?\\s*(#.*)?$/);\n const pattern = item?.[1]?.trim();\n if (pattern) patterns.push(pattern);\n }\n return patterns;\n}\n\n/**\n * Expand `pnpm-workspace.yaml` member patterns into member directories, relative to the root.\n *\n * The same semantics as the framework's one reader, `scripts/pnpm-workspace-members.mjs` (#362),\n * which this published CLI cannot import (it ships without the framework's `scripts/`): a LITERAL\n * path, and ONE trailing `dir/*` level whose children count only when they hold a `package.json`\n * (pnpm's own rule, and what keeps `dist/` and `node_modules/` out). Anything else, such as `dir/**`,\n * an interior `*` or a `!exclusion`, comes back in `unsupportedPatterns` for the caller to report,\n * because a member silently dropped makes every package it covers look aligned.\n */\nexport function expandWorkspaceMemberPatterns(\n root: string,\n patterns: readonly string[],\n): { members: string[]; unsupportedPatterns: string[] } {\n const members: string[] = [];\n const unsupportedPatterns: string[] = [];\n for (const raw of patterns) {\n const pattern = raw.replace(/^\\.\\//, '').replace(/\\/+$/, '');\n if (!pattern.includes('*') && !pattern.startsWith('!')) {\n members.push(pattern === '' ? '.' : pattern);\n continue;\n }\n const parent = pattern.endsWith('/*') ? pattern.slice(0, -2) : null;\n if (parent === null || parent.includes('*') || parent.startsWith('!')) {\n unsupportedPatterns.push(raw);\n continue;\n }\n let children: string[] = [];\n try {\n children = readdirSync(join(root, parent), { withFileTypes: true })\n .filter((entry) => entry.isDirectory() && existsSync(join(root, parent, entry.name, 'package.json')))\n .map((entry) => entry.name)\n .sort();\n } catch {\n // An absent parent directory expands to no members, as in pnpm.\n }\n members.push(...children.map((name) => (parent === '' ? name : `${parent}/${name}`)));\n }\n return { members, unsupportedPatterns };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-dev-port-offsets.d.ts","sourceRoot":"","sources":["../../../../../../src/services/application/application-dev-port-offsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,QAAgD,CAAC"}
1
+ {"version":3,"file":"application-dev-port-offsets.d.ts","sourceRoot":"","sources":["../../../../src/services/application/application-dev-port-offsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,QAAgD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-dev-port-offsets.js","sourceRoot":"","sources":["../../../../../../src/services/application/application-dev-port-offsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,qBAAqB,GAAG,qBAAqB,CAAC","sourcesContent":["/**\n * Port offsets for the two DEVELOPMENT surfaces that sit beside an application's service block.\n *\n * ## Why these are exported rather than module-private\n *\n * They were private constants in `saas-skeleton.service.ts`, which made the scaffolder the only code\n * that could know them — so anything else needing a companion or workbench address had to re-derive\n * it as a literal. That is the defect shape `.claude/rules/invariant-call-site-enumeration.md` #13\n * records: a policy expressed as a module-private constant reaches exactly one site, every other site\n * hard-codes the same number, and a grep for the constant returns 1/1 and reports the invariant fully\n * applied. Both the scaffolder (which ALLOCATES these ports) and the workbench CLI (which must FIND\n * one) now read the same declaration.\n *\n * An application's own runtime services live in a stride-10 block from the port base. These two do\n * not: they are development tools for building and observing the application, with no deployed\n * counterpart the block is sized for.\n */\n\n/** The dev companion: the application's build-time brain, at base + 100. */\nexport const COMPANION_PORT_OFFSET = 100;\n\n/**\n * The application-creation workbench, immediately BESIDE the companion it observes.\n *\n * Adjacency is the point — a reader who knows one port knows the other, and\n * {@link WORKBENCH_PORT_OFFSET_FROM_COMPANION} lets a caller holding only the companion's address\n * reach the workbench without knowing the port base at all.\n */\nexport const WORKBENCH_PORT_OFFSET = 101;\n\n/**\n * The workbench's distance from the companion.\n *\n * DERIVED, never written as `1`: a caller that hard-codes the gap keeps working right up until one\n * of the two offsets moves, and then points confidently at the wrong process.\n */\nexport const WORKBENCH_PORT_OFFSET_FROM_COMPANION = WORKBENCH_PORT_OFFSET - COMPANION_PORT_OFFSET;\n"]}
1
+ {"version":3,"file":"application-dev-port-offsets.js","sourceRoot":"","sources":["../../../../src/services/application/application-dev-port-offsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,qBAAqB,GAAG,qBAAqB,CAAC","sourcesContent":["/**\n * Port offsets for the two DEVELOPMENT surfaces that sit beside an application's service block.\n *\n * ## Why these are exported rather than module-private\n *\n * They were private constants in `saas-skeleton.service.ts`, which made the scaffolder the only code\n * that could know them — so anything else needing a companion or workbench address had to re-derive\n * it as a literal. That is the defect shape `.claude/rules/invariant-call-site-enumeration.md` #13\n * records: a policy expressed as a module-private constant reaches exactly one site, every other site\n * hard-codes the same number, and a grep for the constant returns 1/1 and reports the invariant fully\n * applied. Both the scaffolder (which ALLOCATES these ports) and the workbench CLI (which must FIND\n * one) now read the same declaration.\n *\n * An application's own runtime services live in a stride-10 block from the port base. These two do\n * not: they are development tools for building and observing the application, with no deployed\n * counterpart the block is sized for.\n */\n\n/** The dev companion: the application's build-time brain, at base + 100. */\nexport const COMPANION_PORT_OFFSET = 100;\n\n/**\n * The application-creation workbench, immediately BESIDE the companion it observes.\n *\n * Adjacency is the point — a reader who knows one port knows the other, and\n * {@link WORKBENCH_PORT_OFFSET_FROM_COMPANION} lets a caller holding only the companion's address\n * reach the workbench without knowing the port base at all.\n */\nexport const WORKBENCH_PORT_OFFSET = 101;\n\n/**\n * The workbench's distance from the companion.\n *\n * DERIVED, never written as `1`: a caller that hard-codes the gap keeps working right up until one\n * of the two offsets moves, and then points confidently at the wrong process.\n */\nexport const WORKBENCH_PORT_OFFSET_FROM_COMPANION = WORKBENCH_PORT_OFFSET - COMPANION_PORT_OFFSET;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-initialization-verification.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/application/application-initialization-verification.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAU5G,+FAA+F;AAC/F,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,SAAiC,GAAG,MAAM,CAgB1H;AAED,MAAM,WAAW,0CAA0C;IACzD,GAAG,EAAE,gCAAgC,CAAC;IACtC,WAAW,EAAE,sBAAsB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,0BAA0B,CAAC;IAC/C,yGAAyG;IACzG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,4CAA4C;WAC1C,cAAc,CACzB,KAAK,EAAE,0CAA0C,GAChD,OAAO,CAAC,IAAI,CAAC;IA+DhB;;;;;;;;;;;;;;;;;OAiBG;mBACkB,oCAAoC;CA0B1D"}
1
+ {"version":3,"file":"application-initialization-verification.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/application-initialization-verification.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAU5G,+FAA+F;AAC/F,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,SAAiC,GAAG,MAAM,CAgB1H;AAED,MAAM,WAAW,0CAA0C;IACzD,GAAG,EAAE,gCAAgC,CAAC;IACtC,WAAW,EAAE,sBAAsB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,0BAA0B,CAAC;IAC/C,yGAAyG;IACzG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,4CAA4C;WAC1C,cAAc,CACzB,KAAK,EAAE,0CAA0C,GAChD,OAAO,CAAC,IAAI,CAAC;IA+DhB;;;;;;;;;;;;;;;;;OAiBG;mBACkB,oCAAoC;CA0B1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-initialization-verification.service.js","sourceRoot":"","sources":["../../../../../../src/services/application/application-initialization-verification.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAG5F,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAC1H,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAClE,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,kCAAkC,CAAC,UAAkB,EAAE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;IAChH,MAAM,SAAS,GAAG,uBAAuB,CAAC,qBAAqB,CAAC;IAChE,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,aAAa,C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OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;kBAC7E,2DAA2D,KAAK,CAAC,OAAO,EAAE,CAC7E,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import { sign } from 'node:crypto';\nimport { PlatformApplicationType } from '@wildo-ai/saas-backend-lib';\nimport { WildoHeaderKeys } from '@wildo-ai/saas-models';\nimport { APPS_MANAGER_APPLICATION_CONFIG_PATH } from '@wildo-ai/platform-config-lib';\nimport type { AdminAppManagedDeclaration } from '@wildo-ai/platform-config-lib';\nimport { AppBootstrapService } from '~wildo-cli/services/application/app-bootstrap.service';\nimport type { PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { AddressPerspective, ServiceAddressResolver } from '~wildo-cli/services/catalog/service-address-resolver.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\n\nconst VERIFICATION_TIMEOUT_MS = 15_000;\n\nfunction encodeJwtPart(value: unknown): string {\n return Buffer.from(JSON.stringify(value)).toString('base64url');\n}\n\n/** Sign the exact PLATFORM_TO_PLATFORM token apps-manager must accept after initialization. */\nexport function signAppsManagerInitializationProbe(privateKey: string, nowSeconds = Math.floor(Date.now() / 1_000)): string {\n const serviceId = PlatformApplicationType.PLATFORM_APPS_MANAGER;\n const header = encodeJwtPart({ alg: 'ES256', typ: 'JWT' });\n const payload = encodeJwtPart({\n iss: serviceId,\n sub: serviceId,\n aud: serviceId,\n iat: nowSeconds,\n exp: nowSeconds + 60,\n });\n const signingInput = `${header}.${payload}`;\n const signature = sign('sha256', Buffer.from(signingInput), {\n key: privateKey,\n dsaEncoding: 'ieee-p1363',\n }).toString('base64url');\n return `${signingInput}.${signature}`;\n}\n\nexport interface ApplicationInitializationVerificationInput {\n env: PlatformEnvironmentConfiguration;\n credentials: PlatformEnvSecretsJson;\n appSlug: string;\n /**\n * The declaration this initialization was performed against, i.e. the current\n * `wildo.saas.config.ts` projection.\n *\n * REQUIRED, deliberately. This is the only input that lets the postcondition COMPARE rather than\n * merely assert existence, and an optional field is one a caller silently omits — which is how\n * issue #97's \"managed application config verified\" came to pass against a document that\n * contradicted the authored source in an operator-visible way.\n */\n managedDeclaration: AdminAppManagedDeclaration;\n /** Test/diagnostic override. Normal callers derive this from the registered service address resolver. */\n appsManagerUrl?: string;\n}\n\n/**\n * Executable postcondition for a complete platform + application initialization generation. Health and\n * successful writes are insufficient: this crosses the real JWT verification door and reads the exact app\n * config that generated runtimes will consume.\n *\n * It then asks the harder question — is that config the same GENERATION as the declaration this\n * initialization was performed against? A postcondition that only proves a document EXISTS cannot fail\n * on the defect it is named after, and a verification that cannot fail is worse than none because it\n * actively discourages looking (issue #97: the stored provider configuration had been frozen at\n * registration for a day while every run reported the config coherent).\n */\nexport class ApplicationInitializationVerificationService {\n static async assertCoherent(\n input: ApplicationInitializationVerificationInput,\n ): Promise<void> {\n const appsManagerUrl = input.appsManagerUrl ?? (() => {\n const addressContext = ServiceAddressResolver.fromEnvironment(\n input.env,\n AddressPerspective.HOST_FACING,\n );\n return ServiceAddressResolver.resolve(addressContext).platform.appsManager.url;\n })();\n const token = signAppsManagerInitializationProbe(input.credentials.platform.appsManager.privateKey);\n const url = `${appsManagerUrl.replace(/\\/$/, '')}${APPS_MANAGER_APPLICATION_CONFIG_PATH}`;\n\n let response: Response;\n try {\n response = await fetch(url, {\n method: 'GET',\n headers: {\n [WildoHeaderKeys.AUTHORIZATION]: `Bearer ${token}`,\n [WildoHeaderKeys.SERVICE_ID]: PlatformApplicationType.PLATFORM_APPS_MANAGER,\n [WildoHeaderKeys.TARGET_APP_SLUG]: input.appSlug,\n },\n signal: AbortSignal.timeout(VERIFICATION_TIMEOUT_MS),\n });\n } catch (error) {\n throw new Error(\n `Initialization verification could not reach apps-manager at ${url}: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n }\n\n let body: unknown;\n try {\n body = await response.json();\n } catch {\n body = null;\n }\n\n if (!response.ok) {\n const diagnosis = response.status === 401\n ? 'The platform-owned apps-manager signing key and DB-persisted verification key are not one generation.'\n : 'The registered application-config postcondition did not answer successfully.';\n throw new Error(\n `Initialization verification failed with HTTP ${response.status}. ${diagnosis} Body: ${JSON.stringify(body).slice(0, 500)}`,\n );\n }\n\n const outer = body && typeof body === 'object' ? body as Record<string, unknown> : {};\n const candidate = outer.data && typeof outer.data === 'object'\n ? outer.data as Record<string, unknown>\n : outer;\n if (candidate.appSlug !== input.appSlug) {\n throw new Error(\n `Initialization verification read appSlug '${String(candidate.appSlug)}', expected '${input.appSlug}'.`,\n );\n }\n const frontends = candidate.frontendServices;\n if (!frontends || typeof frontends !== 'object' || Array.isArray(frontends) || Object.keys(frontends).length === 0) {\n throw new Error(\n `Initialization verification read '${input.appSlug}' without a non-empty managed frontendServices projection.`,\n );\n }\n\n await ApplicationInitializationVerificationService.assertStoredConfigMatchesDeclaration(input);\n }\n\n /**\n * Ask apps-manager what a declaration reapply WOULD change. An empty `updatedFields` is the\n * coherence proof; a non-empty one names the exact stale slices.\n *\n * The comparison is deliberately NOT re-implemented here. `reapplyManagedDeclaration` is the one\n * owner of the declaration projection, so asking IT the question means the check can never vouch\n * for a projection it no longer describes — the call-site divergence\n * `.claude/rules/invariant-call-site-enumeration.md` exists to prevent.\n *\n * This runs AFTER the projection has been converged — by `/initialize` on a normal registration,\n * or by `DegradedRegistrationDeclarationConvergenceService` when registration degraded and never\n * called `/initialize` (until 2026-10-01 nothing covered that path, and an ordinary\n * `engineCapabilities` edit stopped `wildo local dev` here). So on a LOCAL start drift here is not\n * \"the operator forgot to reapply\" — it is the convergence having failed to hold, which is a defect\n * worth stopping on rather than warning about. The one exception is a degraded NON-local start: the\n * convergence step deliberately leaves a remote environment alone, so drift there is the\n * operator's to apply, and the remedy below is the right one.\n */\n private static async assertStoredConfigMatchesDeclaration(\n input: ApplicationInitializationVerificationInput,\n ): Promise<void> {\n let preview: { updatedFields: string[] };\n try {\n preview = await AppBootstrapService.reapplyApplicationDeclaration(input.env, input.credentials, {\n appSlug: input.appSlug,\n managedDeclaration: input.managedDeclaration,\n dryRun: true,\n });\n } catch (error) {\n throw new Error(\n `Initialization verification could not compare the stored config for '${input.appSlug}' against `\n + `wildo.saas.config.ts: ${ErrorUtils.extractErrorMessage(error)}. `\n + 'The comparison is not optional — an initialization that cannot be compared is not verified.',\n );\n }\n\n if (preview.updatedFields.length > 0) {\n throw new Error(\n `Initialization verification found the stored config for '${input.appSlug}' out of generation with `\n + `wildo.saas.config.ts. Stale slice(s): ${preview.updatedFields.join(', ')}. `\n + `Apply them with: wildo config reapply-declaration --app ${input.appSlug}`,\n );\n }\n }\n}\n"]}
1
+ {"version":3,"file":"application-initialization-verification.service.js","sourceRoot":"","sources":["../../../../src/services/application/application-initialization-verification.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAG5F,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAC1H,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAClE,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,kCAAkC,CAAC,UAAkB,EAAE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GA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,KAAK,CAAC,IAAI;kBAClE,6FAA6F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CACb,4DAA4D,KAAK,CAAC,OAAO,2BAA2B;kBAClG,yCAAyC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;kBAC7E,2DAA2D,KAAK,CAAC,OAAO,EAAE,CAC7E,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import { sign } from 'node:crypto';\nimport { PlatformApplicationType } from '@wildo-ai/saas-backend-lib';\nimport { WildoHeaderKeys } from '@wildo-ai/saas-models';\nimport { APPS_MANAGER_APPLICATION_CONFIG_PATH } from '@wildo-ai/platform-config-lib';\nimport type { AdminAppManagedDeclaration } from '@wildo-ai/platform-config-lib';\nimport { AppBootstrapService } from '~wildo-cli/services/application/app-bootstrap.service';\nimport type { PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport type { PlatformEnvironmentConfiguration } from '~wildo-cli/services/environment/environment.schemas';\nimport { AddressPerspective, ServiceAddressResolver } from '~wildo-cli/services/catalog/service-address-resolver.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\n\nconst VERIFICATION_TIMEOUT_MS = 15_000;\n\nfunction encodeJwtPart(value: unknown): string {\n return Buffer.from(JSON.stringify(value)).toString('base64url');\n}\n\n/** Sign the exact PLATFORM_TO_PLATFORM token apps-manager must accept after initialization. */\nexport function signAppsManagerInitializationProbe(privateKey: string, nowSeconds = Math.floor(Date.now() / 1_000)): string {\n const serviceId = PlatformApplicationType.PLATFORM_APPS_MANAGER;\n const header = encodeJwtPart({ alg: 'ES256', typ: 'JWT' });\n const payload = encodeJwtPart({\n iss: serviceId,\n sub: serviceId,\n aud: serviceId,\n iat: nowSeconds,\n exp: nowSeconds + 60,\n });\n const signingInput = `${header}.${payload}`;\n const signature = sign('sha256', Buffer.from(signingInput), {\n key: privateKey,\n dsaEncoding: 'ieee-p1363',\n }).toString('base64url');\n return `${signingInput}.${signature}`;\n}\n\nexport interface ApplicationInitializationVerificationInput {\n env: PlatformEnvironmentConfiguration;\n credentials: PlatformEnvSecretsJson;\n appSlug: string;\n /**\n * The declaration this initialization was performed against, i.e. the current\n * `wildo.saas.config.ts` projection.\n *\n * REQUIRED, deliberately. This is the only input that lets the postcondition COMPARE rather than\n * merely assert existence, and an optional field is one a caller silently omits — which is how\n * issue #97's \"managed application config verified\" came to pass against a document that\n * contradicted the authored source in an operator-visible way.\n */\n managedDeclaration: AdminAppManagedDeclaration;\n /** Test/diagnostic override. Normal callers derive this from the registered service address resolver. */\n appsManagerUrl?: string;\n}\n\n/**\n * Executable postcondition for a complete platform + application initialization generation. Health and\n * successful writes are insufficient: this crosses the real JWT verification door and reads the exact app\n * config that generated runtimes will consume.\n *\n * It then asks the harder question — is that config the same GENERATION as the declaration this\n * initialization was performed against? A postcondition that only proves a document EXISTS cannot fail\n * on the defect it is named after, and a verification that cannot fail is worse than none because it\n * actively discourages looking (issue #97: the stored provider configuration had been frozen at\n * registration for a day while every run reported the config coherent).\n */\nexport class ApplicationInitializationVerificationService {\n static async assertCoherent(\n input: ApplicationInitializationVerificationInput,\n ): Promise<void> {\n const appsManagerUrl = input.appsManagerUrl ?? (() => {\n const addressContext = ServiceAddressResolver.fromEnvironment(\n input.env,\n AddressPerspective.HOST_FACING,\n );\n return ServiceAddressResolver.resolve(addressContext).platform.appsManager.url;\n })();\n const token = signAppsManagerInitializationProbe(input.credentials.platform.appsManager.privateKey);\n const url = `${appsManagerUrl.replace(/\\/$/, '')}${APPS_MANAGER_APPLICATION_CONFIG_PATH}`;\n\n let response: Response;\n try {\n response = await fetch(url, {\n method: 'GET',\n headers: {\n [WildoHeaderKeys.AUTHORIZATION]: `Bearer ${token}`,\n [WildoHeaderKeys.SERVICE_ID]: PlatformApplicationType.PLATFORM_APPS_MANAGER,\n [WildoHeaderKeys.TARGET_APP_SLUG]: input.appSlug,\n },\n signal: AbortSignal.timeout(VERIFICATION_TIMEOUT_MS),\n });\n } catch (error) {\n throw new Error(\n `Initialization verification could not reach apps-manager at ${url}: ${ErrorUtils.extractErrorMessage(error)}`,\n );\n }\n\n let body: unknown;\n try {\n body = await response.json();\n } catch {\n body = null;\n }\n\n if (!response.ok) {\n const diagnosis = response.status === 401\n ? 'The platform-owned apps-manager signing key and DB-persisted verification key are not one generation.'\n : 'The registered application-config postcondition did not answer successfully.';\n throw new Error(\n `Initialization verification failed with HTTP ${response.status}. ${diagnosis} Body: ${JSON.stringify(body).slice(0, 500)}`,\n );\n }\n\n const outer = body && typeof body === 'object' ? body as Record<string, unknown> : {};\n const candidate = outer.data && typeof outer.data === 'object'\n ? outer.data as Record<string, unknown>\n : outer;\n if (candidate.appSlug !== input.appSlug) {\n throw new Error(\n `Initialization verification read appSlug '${String(candidate.appSlug)}', expected '${input.appSlug}'.`,\n );\n }\n const frontends = candidate.frontendServices;\n if (!frontends || typeof frontends !== 'object' || Array.isArray(frontends) || Object.keys(frontends).length === 0) {\n throw new Error(\n `Initialization verification read '${input.appSlug}' without a non-empty managed frontendServices projection.`,\n );\n }\n\n await ApplicationInitializationVerificationService.assertStoredConfigMatchesDeclaration(input);\n }\n\n /**\n * Ask apps-manager what a declaration reapply WOULD change. An empty `updatedFields` is the\n * coherence proof; a non-empty one names the exact stale slices.\n *\n * The comparison is deliberately NOT re-implemented here. `reapplyManagedDeclaration` is the one\n * owner of the declaration projection, so asking IT the question means the check can never vouch\n * for a projection it no longer describes — the call-site divergence\n * `.claude/rules/invariant-call-site-enumeration.md` exists to prevent.\n *\n * This runs AFTER the projection has been converged — by `/initialize` on a normal registration,\n * or by `DegradedRegistrationDeclarationConvergenceService` when registration degraded and never\n * called `/initialize` (until 2026-10-01 nothing covered that path, and an ordinary\n * `engineCapabilities` edit stopped `wildo local dev` here). So on a LOCAL start drift here is not\n * \"the operator forgot to reapply\" — it is the convergence having failed to hold, which is a defect\n * worth stopping on rather than warning about. The one exception is a degraded NON-local start: the\n * convergence step deliberately leaves a remote environment alone, so drift there is the\n * operator's to apply, and the remedy below is the right one.\n */\n private static async assertStoredConfigMatchesDeclaration(\n input: ApplicationInitializationVerificationInput,\n ): Promise<void> {\n let preview: { updatedFields: string[] };\n try {\n preview = await AppBootstrapService.reapplyApplicationDeclaration(input.env, input.credentials, {\n appSlug: input.appSlug,\n managedDeclaration: input.managedDeclaration,\n dryRun: true,\n });\n } catch (error) {\n throw new Error(\n `Initialization verification could not compare the stored config for '${input.appSlug}' against `\n + `wildo.saas.config.ts: ${ErrorUtils.extractErrorMessage(error)}. `\n + 'The comparison is not optional — an initialization that cannot be compared is not verified.',\n );\n }\n\n if (preview.updatedFields.length > 0) {\n throw new Error(\n `Initialization verification found the stored config for '${input.appSlug}' out of generation with `\n + `wildo.saas.config.ts. Stale slice(s): ${preview.updatedFields.join(', ')}. `\n + `Apply them with: wildo config reapply-declaration --app ${input.appSlug}`,\n );\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-root.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/services/application/application-root.utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQzE"}
1
+ {"version":3,"file":"application-root.utils.d.ts","sourceRoot":"","sources":["../../../../src/services/application/application-root.utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-root.utils.js","sourceRoot":"","sources":["../../../../../../src/services/application/application-root.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,cAAsB;IACxD,IAAI,SAAS,GAAG,cAAc,CAAC;IAC/B,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;QACtE,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACtC,SAAS,GAAG,MAAM,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import { existsSync } from 'fs';\nimport { dirname, join } from 'path';\n\nexport const SAAS_CONFIG_MARKER = 'wildo.saas.config.ts';\n\n/**\n * Walk up from a directory to the nearest application root (the directory\n * carrying `wildo.saas.config.ts`) — the same rule every dev script and the\n * config loaders use. Shared here so app-scoped commands (`compose`,\n * `config mutate`, …) resolve the root identically.\n */\nexport function findApplicationRoot(startDirectory: string): string | null {\n let directory = startDirectory;\n while (true) {\n if (existsSync(join(directory, SAAS_CONFIG_MARKER))) return directory;\n const parent = dirname(directory);\n if (parent === directory) return null;\n directory = parent;\n }\n}\n"]}
1
+ {"version":3,"file":"application-root.utils.js","sourceRoot":"","sources":["../../../../src/services/application/application-root.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,cAAsB;IACxD,IAAI,SAAS,GAAG,cAAc,CAAC;IAC/B,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;QACtE,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACtC,SAAS,GAAG,MAAM,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import { existsSync } from 'fs';\nimport { dirname, join } from 'path';\n\nexport const SAAS_CONFIG_MARKER = 'wildo.saas.config.ts';\n\n/**\n * Walk up from a directory to the nearest application root (the directory\n * carrying `wildo.saas.config.ts`) — the same rule every dev script and the\n * config loaders use. Shared here so app-scoped commands (`compose`,\n * `config mutate`, …) resolve the root identically.\n */\nexport function findApplicationRoot(startDirectory: string): string | null {\n let directory = startDirectory;\n while (true) {\n if (existsSync(join(directory, SAAS_CONFIG_MARKER))) return directory;\n const parent = dirname(directory);\n if (parent === directory) return null;\n directory = parent;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-runtime-bootstrap.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/application/application-runtime-bootstrap.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAElG,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAM5G,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,gCAAgC,CAAC;IACtC,WAAW,EAAE,sBAAsB,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iCAAiC;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,kCAAkC;WAChC,UAAU,CACrB,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC;IAyJ7C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAoCtC"}
1
+ {"version":3,"file":"application-runtime-bootstrap.service.d.ts","sourceRoot":"","sources":["../../../../src/services/application/application-runtime-bootstrap.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAElG,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AAM5G,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,gCAAgC,CAAC;IACtC,WAAW,EAAE,sBAAsB,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iCAAiC;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,kCAAkC;WAChC,UAAU,CACrB,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC;IAyJ7C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAoCtC"}