@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":"workbench-browser-launcher.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/companion/workbench-browser-launcher.service.ts"],"names":[],"mappings":"AAEA,gFAAgF;AAChF,eAAO,MAAM,wBAAwB;cACzB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBjC,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAQpJ"}
1
+ {"version":3,"file":"workbench-browser-launcher.service.d.ts","sourceRoot":"","sources":["../../../../src/services/companion/workbench-browser-launcher.service.ts"],"names":[],"mappings":"AAEA,gFAAgF;AAChF,eAAO,MAAM,wBAAwB;cACzB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBjC,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAQpJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"workbench-browser-launcher.service.js","sourceRoot":"","sources":["../../../../../../src/services/companion/workbench-browser-launcher.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,gFAAgF;AAChF,MAAM,CAAC,MAAM,wBAAwB,GAAG;I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C;AAC9C,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAClE,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,KAAK,KAAK,IAAI,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACxG,CAAC","sourcesContent":["import { spawn } from 'node:child_process';\n\n/** OS adapter kept outside command logic so tests never open a real browser. */\nexport const WorkbenchBrowserLauncher = {\n open(url: string): Promise<void> {\n const parsed = new URL(url);\n if (parsed.protocol !== 'http:' || !isLoopbackHostname(parsed.hostname)) {\n throw new Error('Workbench browser launcher accepts only loopback HTTP URLs.');\n }\n\n const { command, args } = resolveWorkbenchBrowserLaunch(process.platform, url);\n return new Promise((resolve, reject) => {\n const child = spawn(command, args, { detached: true, stdio: 'ignore' });\n child.once('error', reject);\n child.once('spawn', () => {\n child.unref();\n resolve();\n });\n });\n },\n};\n\nexport function resolveWorkbenchBrowserLaunch(platform: NodeJS.Platform, url: string): { readonly command: string; readonly args: readonly string[] } {\n if (platform === 'darwin') return { command: 'open', args: [url] };\n if (platform === 'win32') {\n // Avoid `cmd.exe /c start`: even a loopback URL is data and must never be\n // interpreted as command text. rundll32 receives it as one argv value.\n return { command: 'rundll32.exe', args: ['url.dll,FileProtocolHandler', url] };\n }\n return { command: 'xdg-open', args: [url] };\n}\n\nfunction isLoopbackHostname(hostname: string): boolean {\n const normalized = hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n return normalized === 'localhost' || normalized === '::1' || /^127(?:\\.\\d{1,3}){3}$/.test(normalized);\n}\n"]}
1
+ {"version":3,"file":"workbench-browser-launcher.service.js","sourceRoot":"","sources":["../../../../src/services/companion/workbench-browser-launcher.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,gFAAgF;AAChF,MAAM,CA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AC,GAAG,CAAC,EAAE,CAAC;AAC9C,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAClE,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,KAAK,KAAK,IAAI,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACxG,CAAC","sourcesContent":["import { spawn } from 'node:child_process';\n\n/** OS adapter kept outside command logic so tests never open a real browser. */\nexport const WorkbenchBrowserLauncher = {\n open(url: string): Promise<void> {\n const parsed = new URL(url);\n if (parsed.protocol !== 'http:' || !isLoopbackHostname(parsed.hostname)) {\n throw new Error('Workbench browser launcher accepts only loopback HTTP URLs.');\n }\n\n const { command, args } = resolveWorkbenchBrowserLaunch(process.platform, url);\n return new Promise((resolve, reject) => {\n const child = spawn(command, args, { detached: true, stdio: 'ignore' });\n child.once('error', reject);\n child.once('spawn', () => {\n child.unref();\n resolve();\n });\n });\n },\n};\n\nexport function resolveWorkbenchBrowserLaunch(platform: NodeJS.Platform, url: string): { readonly command: string; readonly args: readonly string[] } {\n if (platform === 'darwin') return { command: 'open', args: [url] };\n if (platform === 'win32') {\n // Avoid `cmd.exe /c start`: even a loopback URL is data and must never be\n // interpreted as command text. rundll32 receives it as one argv value.\n return { command: 'rundll32.exe', args: ['url.dll,FileProtocolHandler', url] };\n }\n return { command: 'xdg-open', args: [url] };\n}\n\nfunction isLoopbackHostname(hostname: string): boolean {\n const normalized = hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n return normalized === 'localhost' || normalized === '::1' || /^127(?:\\.\\d{1,3}){3}$/.test(normalized);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"workbench-cli.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/companion/workbench-cli.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA2B9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB;gBACZ,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4BhE,yFAAyF;oBACnE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAIvD,CAAC"}
1
+ {"version":3,"file":"workbench-cli.service.d.ts","sourceRoot":"","sources":["../../../../src/services/companion/workbench-cli.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA2B9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB;gBACZ,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4BhE,yFAAyF;oBACnE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAIvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"workbench-cli.service.js","sourceRoot":"","sources":["../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EAAE,SAAS,CAAC,MAAM;YACjC,aAAa,EAAE,SAAS,CAAC,MAAM,KAAK,GAAG;YACvC,cAAc,EAAE,SAAS,CAAC,MAAM,KAAK,GAAG;SACzC,CAAC;IACJ,CAAC;IAED,yFAAyF;IACzF,KAAK,CAAC,UAAU,CAAC,GAAmB;QAClC,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;QACtD,OAAO,GAAG,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;IACpD,CAAC;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAEzC;;;;;;GAMG;AACH,KAAK,UAAU,cAAc,CAAC,MAAc;IAC1C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC3I,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACvB,CAAC;AACH,CAAC","sourcesContent":["import type { CommandContext } from '~wildo-cli/kernel/types';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { CompanionRequestRetryPolicy } from '~wildo-cli/services/companion/companion.schemas';\nimport { resolveLocalCompanionTarget } from '~wildo-cli/services/companion/local-companion-authority.service';\nimport { WORKBENCH_PORT_OFFSET_FROM_COMPANION } from '~wildo-cli/services/application/application-dev-port-offsets';\n\n/**\n * The workbench is its OWN origin, derived from the companion's.\n *\n * It used to be `'/workbench/'` ON the companion, from a design in which the companion served the\n * bundle. That design was rejected — an operator surface must not die with the thing it observes,\n * and no static file serving exists in the companion at all — so the route was deleted. The path\n * constant outlived it, which meant `status` reported `workbenchReady: false` unconditionally and\n * `open` opened a 404 page. Measured 2026-08-30 against a healthy companion: `/health/ready` 200,\n * an introspection resource route 200, `HEAD /workbench/` **404**.\n *\n * Deriving from the companion rather than reading a second address is deliberate: the workbench is\n * the companion's surface, they are allocated as a pair, and a caller that has resolved one has\n * already done the work of finding the application.\n */\nfunction deriveWorkbenchOrigin(companionOrigin: string): string {\n const companionUrl = new URL(companionOrigin);\n const workbenchUrl = new URL(companionUrl.toString());\n workbenchUrl.port = String(Number(companionUrl.port) + WORKBENCH_PORT_OFFSET_FROM_COMPANION);\n return workbenchUrl.origin;\n}\n\n/**\n * Open and inspect the local application-creation workbench.\n *\n * ## Why there is no launch ticket\n *\n * This used to mint a one-use secret, hand it to the browser in a URL fragment, and exchange it for an\n * `HttpOnly` session cookie with a CSRF token — about 1,500 lines of companion code plus a launch-ticket\n * and operator-session contract.\n *\n * The workbench is a LOCAL development surface bound to loopback, whose purpose is to show a creator what\n * their application-creation run is doing and take their feedback. Access is free by design. A credential\n * exchange between a developer's own CLI and their own companion, on their own machine, protected nothing\n * an attacker who already has that machine could not take anyway — and it cost a whole subsystem plus a\n * contract asserting its own trustworthiness in literals nothing read.\n *\n * If this surface is ever exposed beyond loopback, that is a real authentication problem and needs a real\n * answer (the application's own auth), not a ticket handshake reinstated here.\n */\nexport interface WorkbenchCliStatusV1 {\n readonly companionOrigin: string;\n /** Where the workbench dev server is expected — derived from {@link companionOrigin}. */\n readonly workbenchOrigin: string;\n readonly semanticReadinessStatus: number;\n /**\n * HTTP status from the workbench's own origin, or `0` when the connection was refused.\n *\n * Named `workbenchStaticStatus` until 2026-08-30, from the design in which the companion served a\n * STATIC bundle. Nothing static is served anywhere now, so the old name described a mechanism that\n * had been deleted — and it is a field a reader uses to decide what to check next.\n */\n readonly workbenchStatus: number;\n readonly semanticReady: boolean;\n readonly workbenchReady: boolean;\n}\n\nexport const WorkbenchCliService = {\n async status(ctx: CommandContext): Promise<WorkbenchCliStatusV1> {\n const target = await resolveLocalCompanionTarget(ctx);\n const workbenchOrigin = deriveWorkbenchOrigin(target.origin);\n\n /*\n * Two DIFFERENT processes, so two independent probes — and reporting them separately is the\n * point of this command. The companion can be healthy while the workbench is not started, and\n * the workbench can be serving while the companion is mid-restart; collapsing them into one\n * \"ready\" would hide exactly the state an operator is asking about.\n *\n * The workbench probe is a plain fetch rather than `CompanionClient`: that client carries the\n * companion's retry policy and authority assumptions, and the workbench is a Vite dev server\n * that owes it neither.\n */\n const [readiness, workbench] = await Promise.all([\n CompanionClient.request('/health/ready', { method: 'GET', redirect: 'manual' }, target.clientOptions, CompanionRequestRetryPolicy.SAFE_READ),\n probeWorkbench(workbenchOrigin),\n ]);\n return {\n companionOrigin: target.origin,\n workbenchOrigin,\n semanticReadinessStatus: readiness.status,\n workbenchStatus: workbench.status,\n semanticReady: readiness.status === 200,\n workbenchReady: workbench.status === 200,\n };\n },\n\n /** Where the workbench lives. There is nothing to issue — it is opened, not unlocked. */\n async resolveUrl(ctx: CommandContext): Promise<string> {\n const target = await resolveLocalCompanionTarget(ctx);\n return `${deriveWorkbenchOrigin(target.origin)}/`;\n },\n};\n\n/**\n * One workbench origin probe.\n *\n * 5s, because this answers a `status` command and the answer is only useful while the operator is\n * still looking at their terminal. The function already treats a refusal as status 0 rather than an\n * error — a dev server that accepts the socket and then says nothing deserves the same treatment,\n * and without a deadline it instead hangs the command that exists to report on it.\n */\nconst WORKBENCH_PROBE_TIMEOUT_MS = 5_000;\n\n/**\n * Probe the workbench's own origin.\n *\n * A connection refusal is the ORDINARY answer when the dev server is not started, so it is reported\n * as status 0 rather than thrown: `status` exists to tell an operator which of the two processes is\n * up, and a command that throws when one is down cannot answer its own question.\n */\nasync function probeWorkbench(origin: string): Promise<{ status: number }> {\n try {\n const response = await fetch(`${origin}/`, { method: 'GET', redirect: 'manual', signal: AbortSignal.timeout(WORKBENCH_PROBE_TIMEOUT_MS) });\n return { status: response.status };\n } catch {\n return { status: 0 };\n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,eAAe;YACf,uBAAuB,EAAE,SAAS,CAAC,MAAM;YACzC,eAAe,EAAE,SAAS,CAAC,MAAM;YACjC,aAAa,EAAE,SAAS,CAAC,MAAM,KAAK,GAAG;YACvC,cAAc,EAAE,SAAS,CAAC,MAAM,KAAK,GAAG;SACzC,CAAC;IACJ,CAAC;IAED,yFAAyF;IACzF,KAAK,CAAC,UAAU,CAAC,GAAmB;QAClC,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;QACtD,OAAO,GAAG,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;IACpD,CAAC;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAEzC;;;;;;GAMG;AACH,KAAK,UAAU,cAAc,CAAC,MAAc;IAC1C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC3I,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACvB,CAAC;AACH,CAAC","sourcesContent":["import type { CommandContext } from '~wildo-cli/kernel/types';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { CompanionRequestRetryPolicy } from '~wildo-cli/services/companion/companion.schemas';\nimport { resolveLocalCompanionTarget } from '~wildo-cli/services/companion/local-companion-authority.service';\nimport { WORKBENCH_PORT_OFFSET_FROM_COMPANION } from '~wildo-cli/services/application/application-dev-port-offsets';\n\n/**\n * The workbench is its OWN origin, derived from the companion's.\n *\n * It used to be `'/workbench/'` ON the companion, from a design in which the companion served the\n * bundle. That design was rejected — an operator surface must not die with the thing it observes,\n * and no static file serving exists in the companion at all — so the route was deleted. The path\n * constant outlived it, which meant `status` reported `workbenchReady: false` unconditionally and\n * `open` opened a 404 page. Measured 2026-08-30 against a healthy companion: `/health/ready` 200,\n * an introspection resource route 200, `HEAD /workbench/` **404**.\n *\n * Deriving from the companion rather than reading a second address is deliberate: the workbench is\n * the companion's surface, they are allocated as a pair, and a caller that has resolved one has\n * already done the work of finding the application.\n */\nfunction deriveWorkbenchOrigin(companionOrigin: string): string {\n const companionUrl = new URL(companionOrigin);\n const workbenchUrl = new URL(companionUrl.toString());\n workbenchUrl.port = String(Number(companionUrl.port) + WORKBENCH_PORT_OFFSET_FROM_COMPANION);\n return workbenchUrl.origin;\n}\n\n/**\n * Open and inspect the local application-creation workbench.\n *\n * ## Why there is no launch ticket\n *\n * This used to mint a one-use secret, hand it to the browser in a URL fragment, and exchange it for an\n * `HttpOnly` session cookie with a CSRF token — about 1,500 lines of companion code plus a launch-ticket\n * and operator-session contract.\n *\n * The workbench is a LOCAL development surface bound to loopback, whose purpose is to show a creator what\n * their application-creation run is doing and take their feedback. Access is free by design. A credential\n * exchange between a developer's own CLI and their own companion, on their own machine, protected nothing\n * an attacker who already has that machine could not take anyway — and it cost a whole subsystem plus a\n * contract asserting its own trustworthiness in literals nothing read.\n *\n * If this surface is ever exposed beyond loopback, that is a real authentication problem and needs a real\n * answer (the application's own auth), not a ticket handshake reinstated here.\n */\nexport interface WorkbenchCliStatusV1 {\n readonly companionOrigin: string;\n /** Where the workbench dev server is expected — derived from {@link companionOrigin}. */\n readonly workbenchOrigin: string;\n readonly semanticReadinessStatus: number;\n /**\n * HTTP status from the workbench's own origin, or `0` when the connection was refused.\n *\n * Named `workbenchStaticStatus` until 2026-08-30, from the design in which the companion served a\n * STATIC bundle. Nothing static is served anywhere now, so the old name described a mechanism that\n * had been deleted — and it is a field a reader uses to decide what to check next.\n */\n readonly workbenchStatus: number;\n readonly semanticReady: boolean;\n readonly workbenchReady: boolean;\n}\n\nexport const WorkbenchCliService = {\n async status(ctx: CommandContext): Promise<WorkbenchCliStatusV1> {\n const target = await resolveLocalCompanionTarget(ctx);\n const workbenchOrigin = deriveWorkbenchOrigin(target.origin);\n\n /*\n * Two DIFFERENT processes, so two independent probes — and reporting them separately is the\n * point of this command. The companion can be healthy while the workbench is not started, and\n * the workbench can be serving while the companion is mid-restart; collapsing them into one\n * \"ready\" would hide exactly the state an operator is asking about.\n *\n * The workbench probe is a plain fetch rather than `CompanionClient`: that client carries the\n * companion's retry policy and authority assumptions, and the workbench is a Vite dev server\n * that owes it neither.\n */\n const [readiness, workbench] = await Promise.all([\n CompanionClient.request('/health/ready', { method: 'GET', redirect: 'manual' }, target.clientOptions, CompanionRequestRetryPolicy.SAFE_READ),\n probeWorkbench(workbenchOrigin),\n ]);\n return {\n companionOrigin: target.origin,\n workbenchOrigin,\n semanticReadinessStatus: readiness.status,\n workbenchStatus: workbench.status,\n semanticReady: readiness.status === 200,\n workbenchReady: workbench.status === 200,\n };\n },\n\n /** Where the workbench lives. There is nothing to issue — it is opened, not unlocked. */\n async resolveUrl(ctx: CommandContext): Promise<string> {\n const target = await resolveLocalCompanionTarget(ctx);\n return `${deriveWorkbenchOrigin(target.origin)}/`;\n },\n};\n\n/**\n * One workbench origin probe.\n *\n * 5s, because this answers a `status` command and the answer is only useful while the operator is\n * still looking at their terminal. The function already treats a refusal as status 0 rather than an\n * error — a dev server that accepts the socket and then says nothing deserves the same treatment,\n * and without a deadline it instead hangs the command that exists to report on it.\n */\nconst WORKBENCH_PROBE_TIMEOUT_MS = 5_000;\n\n/**\n * Probe the workbench's own origin.\n *\n * A connection refusal is the ORDINARY answer when the dev server is not started, so it is reported\n * as status 0 rather than thrown: `status` exists to tell an operator which of the two processes is\n * up, and a command that throws when one is down cannot answer its own question.\n */\nasync function probeWorkbench(origin: string): Promise<{ status: number }> {\n try {\n const response = await fetch(`${origin}/`, { method: 'GET', redirect: 'manual', signal: AbortSignal.timeout(WORKBENCH_PROBE_TIMEOUT_MS) });\n return { status: response.status };\n } catch {\n return { status: 0 };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"data-retention-schedule.generator.d.ts","sourceRoot":"","sources":["../../../../../../src/services/compliance/data-retention-schedule.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAA0D,KAAK,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAElI,uFAAuF;AACvF,eAAO,MAAM,+CAA+C,QAA4D,CAAC;AAEzH,iHAAiH;AACjH,eAAO,MAAM,0CAA0C,mCAAmC,CAAC;AAE3F,qBAAa,oCAAqC,SAAQ,KAAK;CAAG;AAElE;;;;GAIG;AACH,wBAAsB,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAe1H;AAED,mJAAmJ;AACnJ,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,4BAA4B,GAAG,SAAS,GAAG,MAAM,CAyC5G;AAED,6FAA6F;AAC7F,wBAAsB,mCAAmC,CAAC,KAAK,EAAE;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAgB5F"}
1
+ {"version":3,"file":"data-retention-schedule.generator.d.ts","sourceRoot":"","sources":["../../../../src/services/compliance/data-retention-schedule.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAA0D,KAAK,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAElI,uFAAuF;AACvF,eAAO,MAAM,+CAA+C,QAA4D,CAAC;AAEzH,iHAAiH;AACjH,eAAO,MAAM,0CAA0C,mCAAmC,CAAC;AAE3F,qBAAa,oCAAqC,SAAQ,KAAK;CAAG;AAElE;;;;GAIG;AACH,wBAAsB,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAe1H;AAED,mJAAmJ;AACnJ,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,4BAA4B,GAAG,SAAS,GAAG,MAAM,CAyC5G;AAED,6FAA6F;AAC7F,wBAAsB,mCAAmC,CAAC,KAAK,EAAE;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAgB5F"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-retention-schedule.generator.js","sourceRoot":"","sources":["../../../../../../src/services/compliance/data-retention-schedule.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,kCAAkC,EAAE,kBAAkB,EAAqC,MAAM,uBAAuB,CAAC;AAElI,uFAAuF;AACvF,MAAM,CAAC,MAAM,+CAA+C,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC;AAEzH,iHAAiH;AACj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AAO,EAAE,+CAA+C,CAAC,CAAC;IAClF,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,MAAM,OAAO,GAAG,QAAQ,KAAK,OAAO,CAAC;IACrC,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACrC,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,SAAS,EAAE,OAAO,EAAE,CAAC;AAC7D,CAAC;AAED,kFAAkF;AAClF,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;AACxF,CAAC","sourcesContent":["/**\n * Carries an application's DECLARED retention schedule into its RUNTIME config (#1613).\n *\n * ## The gap this closes\n *\n * `dataRetention` is declared in `wildo.saas.config.ts` — how long each class of data is kept, and why.\n * Until #1613 it reached only the compliance documents and the risk layer, so a privacy notice stated a\n * period nothing enforced. The runtime half is `compliance.dataRetention`, which the retention-class sweep\n * reads at every run, and from which `auditTrail.archiveAfterDays` and `tenantTeardown.retentionWindowDays`\n * derive when unset.\n *\n * ## Why a generator, copied from `wildo config service-consent`\n *\n * The declaration file is not a runtime dependency of the backend, and a hand-copy into\n * `saas-config.backend.ts` is a second source that drifts — the stale copy would be a period the notice\n * publishes and the sweep does not apply, or the reverse. So the declaration is projected into\n * `backend-api/src/data-retention.generated.ts`, composed by `saas-config.backend.ts`, with `--check` for\n * CI. `.ts` rather than JSON because `DataRetentionClass` is a nominal enum, so the module references\n * members rather than bare strings.\n *\n * ## Absent stays absent\n *\n * An application that declares no schedule gets a module exporting `undefined`, never an empty record:\n * both enforce nothing, but \"decided nothing\" is the operator's answer and the runtime must not\n * manufacture a positive statement from it.\n */\n\nimport { existsSync } from 'node:fs';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\n\nimport { loadSaasConfig } from '@wildo-ai/platform-config-lib';\nimport { ApplicationRetentionScheduleSchema, DataRetentionClass, type ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\n\n/** Where the generated module lands, beside the other generated compliance modules. */\nexport const DATA_RETENTION_SCHEDULE_GENERATED_RELATIVE_PATH = join('backend-api', 'src', 'data-retention.generated.ts');\n\n/** The constant the application's `saas-config.backend.ts` imports and assigns to `compliance.dataRetention`. */\nexport const DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT = 'generatedDataRetentionSchedule';\n\nexport class DataRetentionScheduleGenerationError extends Error {}\n\n/**\n * Read and VALIDATE the declared schedule. A declaration that does not parse is refused rather than\n * projected: a malformed schedule written into the runtime would fail the application at startup, far\n * from the file the author must fix.\n */\nexport async function loadDeclaredDataRetentionSchedule(appRoot: string): Promise<ApplicationRetentionSchedule | undefined> {\n const configPath = join(appRoot, 'wildo.saas.config.ts');\n const config = await loadSaasConfig(configPath);\n if (config === null) {\n throw new DataRetentionScheduleGenerationError(`Could not load ${configPath}, so the declared retention schedule is unknown.`);\n }\n const declared = (config as { dataRetention?: unknown }).dataRetention;\n if (declared === undefined) return undefined;\n const parsed = ApplicationRetentionScheduleSchema.safeParse(declared);\n if (!parsed.success) {\n throw new DataRetentionScheduleGenerationError(\n `dataRetention in ${configPath} is invalid: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`,\n );\n }\n return parsed.data;\n}\n\n/** Render the committed generated module. PURE, so it is pinned directly. Classes in enum order, so a reorder in the declaration is not a diff. */\nexport function renderDataRetentionScheduleModule(schedule: ApplicationRetentionSchedule | undefined): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config data-retention`. DO NOT EDIT BY HAND — re-run it to regenerate.',\n ' *',\n ' * The runtime projection of `dataRetention` in `wildo.saas.config.ts`. Composed into',\n ' * `compliance.dataRetention` by `saas-config.backend.ts`, where the retention-class sweep reads it at',\n ' * every run (#1613). `undefined` means the application declared no schedule.',\n ' */',\n ].join('\\n');\n\n if (schedule === undefined) {\n return [\n \"import type { ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT}: ApplicationRetentionSchedule | undefined = undefined;`,\n '',\n ].join('\\n');\n }\n\n const body: string[] = [];\n for (const [member, value] of Object.entries(DataRetentionClass)) {\n const period = schedule[value];\n if (!period) continue;\n body.push(` [DataRetentionClass.${member}]: {`);\n body.push(` retentionDays: ${period.retentionDays},`);\n body.push(` rationale: ${quote(period.rationale)},`);\n body.push(' },');\n }\n return [\n \"import { ApplicationRetentionScheduleSchema, DataRetentionClass, type ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\",\n '',\n header,\n // Parsed at load, so a hand edit that breaks the schema's own rules (a zero period, an empty rationale)\n // fails at startup instead of reaching the sweep as a period nobody declared.\n `export const ${DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT}: ApplicationRetentionSchedule | undefined = ApplicationRetentionScheduleSchema.parse({`,\n ...body,\n '});',\n '',\n ].join('\\n');\n}\n\n/** Write the module into `<appRoot>/backend-api/src/`. Returns whether the bytes changed. */\nexport async function generateDataRetentionScheduleModule(input: {\n readonly appRoot: string;\n readonly dryRun?: boolean;\n}): Promise<{ readonly path: string; readonly declared: boolean; readonly changed: boolean }> {\n if (!existsSync(join(input.appRoot, 'backend-api'))) {\n throw new DataRetentionScheduleGenerationError(\n `No backend-api/ package under ${input.appRoot}, so there is no runtime config to carry the retention schedule into.`,\n );\n }\n const schedule = await loadDeclaredDataRetentionSchedule(input.appRoot);\n const content = renderDataRetentionScheduleModule(schedule);\n const path = join(input.appRoot, DATA_RETENTION_SCHEDULE_GENERATED_RELATIVE_PATH);\n const previous = existsSync(path) ? await readFile(path, 'utf-8') : undefined;\n const changed = previous !== content;\n if (changed && input.dryRun !== true) {\n await mkdir(dirname(path), { recursive: true });\n await writeFile(path, content, 'utf-8');\n }\n return { path, declared: schedule !== undefined, changed };\n}\n\n/** Single-quote a string literal for the generated source, escaping as needed. */\nfunction quote(value: string): string {\n return `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\").replace(/\\n/g, '\\\\n')}'`;\n}\n"]}
1
+ {"version":3,"file":"data-retention-schedule.generator.js","sourceRoot":"","sources":["../../../../src/services/compliance/data-retention-schedule.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,kCAAkC,EAAE,kBAAkB,EAAqC,MAAM,uBAAuB,CAAC;AAElI,uFAAuF;AACvF,MAAM,CAAC,MAAM,+CAA+C,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC;AAEzH,iHAAiH;AACjH,MAAM,CAAC,MAAM,0CAA0C,GAAG,gCAAgC,CAAC;AAE3F,MAAM,OAAO,oCAAqC,SAAQ,KAAK;CAAG;AAElE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,OAAe;IACrE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC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IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACrC,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,SAAS,EAAE,OAAO,EAAE,CAAC;AAC7D,CAAC;AAED,kFAAkF;AAClF,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;AACxF,CAAC","sourcesContent":["/**\n * Carries an application's DECLARED retention schedule into its RUNTIME config (#1613).\n *\n * ## The gap this closes\n *\n * `dataRetention` is declared in `wildo.saas.config.ts` — how long each class of data is kept, and why.\n * Until #1613 it reached only the compliance documents and the risk layer, so a privacy notice stated a\n * period nothing enforced. The runtime half is `compliance.dataRetention`, which the retention-class sweep\n * reads at every run, and from which `auditTrail.archiveAfterDays` and `tenantTeardown.retentionWindowDays`\n * derive when unset.\n *\n * ## Why a generator, copied from `wildo config service-consent`\n *\n * The declaration file is not a runtime dependency of the backend, and a hand-copy into\n * `saas-config.backend.ts` is a second source that drifts — the stale copy would be a period the notice\n * publishes and the sweep does not apply, or the reverse. So the declaration is projected into\n * `backend-api/src/data-retention.generated.ts`, composed by `saas-config.backend.ts`, with `--check` for\n * CI. `.ts` rather than JSON because `DataRetentionClass` is a nominal enum, so the module references\n * members rather than bare strings.\n *\n * ## Absent stays absent\n *\n * An application that declares no schedule gets a module exporting `undefined`, never an empty record:\n * both enforce nothing, but \"decided nothing\" is the operator's answer and the runtime must not\n * manufacture a positive statement from it.\n */\n\nimport { existsSync } from 'node:fs';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\n\nimport { loadSaasConfig } from '@wildo-ai/platform-config-lib';\nimport { ApplicationRetentionScheduleSchema, DataRetentionClass, type ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\n\n/** Where the generated module lands, beside the other generated compliance modules. */\nexport const DATA_RETENTION_SCHEDULE_GENERATED_RELATIVE_PATH = join('backend-api', 'src', 'data-retention.generated.ts');\n\n/** The constant the application's `saas-config.backend.ts` imports and assigns to `compliance.dataRetention`. */\nexport const DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT = 'generatedDataRetentionSchedule';\n\nexport class DataRetentionScheduleGenerationError extends Error {}\n\n/**\n * Read and VALIDATE the declared schedule. A declaration that does not parse is refused rather than\n * projected: a malformed schedule written into the runtime would fail the application at startup, far\n * from the file the author must fix.\n */\nexport async function loadDeclaredDataRetentionSchedule(appRoot: string): Promise<ApplicationRetentionSchedule | undefined> {\n const configPath = join(appRoot, 'wildo.saas.config.ts');\n const config = await loadSaasConfig(configPath);\n if (config === null) {\n throw new DataRetentionScheduleGenerationError(`Could not load ${configPath}, so the declared retention schedule is unknown.`);\n }\n const declared = (config as { dataRetention?: unknown }).dataRetention;\n if (declared === undefined) return undefined;\n const parsed = ApplicationRetentionScheduleSchema.safeParse(declared);\n if (!parsed.success) {\n throw new DataRetentionScheduleGenerationError(\n `dataRetention in ${configPath} is invalid: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`,\n );\n }\n return parsed.data;\n}\n\n/** Render the committed generated module. PURE, so it is pinned directly. Classes in enum order, so a reorder in the declaration is not a diff. */\nexport function renderDataRetentionScheduleModule(schedule: ApplicationRetentionSchedule | undefined): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config data-retention`. DO NOT EDIT BY HAND — re-run it to regenerate.',\n ' *',\n ' * The runtime projection of `dataRetention` in `wildo.saas.config.ts`. Composed into',\n ' * `compliance.dataRetention` by `saas-config.backend.ts`, where the retention-class sweep reads it at',\n ' * every run (#1613). `undefined` means the application declared no schedule.',\n ' */',\n ].join('\\n');\n\n if (schedule === undefined) {\n return [\n \"import type { ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT}: ApplicationRetentionSchedule | undefined = undefined;`,\n '',\n ].join('\\n');\n }\n\n const body: string[] = [];\n for (const [member, value] of Object.entries(DataRetentionClass)) {\n const period = schedule[value];\n if (!period) continue;\n body.push(` [DataRetentionClass.${member}]: {`);\n body.push(` retentionDays: ${period.retentionDays},`);\n body.push(` rationale: ${quote(period.rationale)},`);\n body.push(' },');\n }\n return [\n \"import { ApplicationRetentionScheduleSchema, DataRetentionClass, type ApplicationRetentionSchedule } from '@wildo-ai/saas-models';\",\n '',\n header,\n // Parsed at load, so a hand edit that breaks the schema's own rules (a zero period, an empty rationale)\n // fails at startup instead of reaching the sweep as a period nobody declared.\n `export const ${DATA_RETENTION_SCHEDULE_GENERATED_CONSTANT}: ApplicationRetentionSchedule | undefined = ApplicationRetentionScheduleSchema.parse({`,\n ...body,\n '});',\n '',\n ].join('\\n');\n}\n\n/** Write the module into `<appRoot>/backend-api/src/`. Returns whether the bytes changed. */\nexport async function generateDataRetentionScheduleModule(input: {\n readonly appRoot: string;\n readonly dryRun?: boolean;\n}): Promise<{ readonly path: string; readonly declared: boolean; readonly changed: boolean }> {\n if (!existsSync(join(input.appRoot, 'backend-api'))) {\n throw new DataRetentionScheduleGenerationError(\n `No backend-api/ package under ${input.appRoot}, so there is no runtime config to carry the retention schedule into.`,\n );\n }\n const schedule = await loadDeclaredDataRetentionSchedule(input.appRoot);\n const content = renderDataRetentionScheduleModule(schedule);\n const path = join(input.appRoot, DATA_RETENTION_SCHEDULE_GENERATED_RELATIVE_PATH);\n const previous = existsSync(path) ? await readFile(path, 'utf-8') : undefined;\n const changed = previous !== content;\n if (changed && input.dryRun !== true) {\n await mkdir(dirname(path), { recursive: true });\n await writeFile(path, content, 'utf-8');\n }\n return { path, declared: schedule !== undefined, changed };\n}\n\n/** Single-quote a string literal for the generated source, escaping as needed. */\nfunction quote(value: string): string {\n return `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\").replace(/\\n/g, '\\\\n')}'`;\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Does the backend configuration actually CARRY what a generated compliance module holds?
3
3
  *
4
- * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention` and `wildo config
5
- * subject-data-recipients` write modules into
4
+ * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention`, `wildo config
5
+ * subject-data-recipients` and `wildo config legal-notice` write modules into
6
6
  * `backend-api/src/`, and the `document-releases` and `service-consent` validate domains check that
7
7
  * each module is CURRENT. Neither checked that anything imports it. A module can therefore be
8
8
  * byte-for-byte current while `saas-config.backend.ts` never assigns it — and then the running
@@ -41,7 +41,9 @@ export declare enum GeneratedComplianceConfigField {
41
41
  /** The retention schedule the retention-class sweep enforces (#1613). */
42
42
  DATA_RETENTION = "dataRetention",
43
43
  /** Who else holds a data subject's data — what a subject export lists and a subject erasure accounts for (#1710). */
44
- SUBJECT_DATA_RECIPIENTS = "subjectDataRecipients"
44
+ SUBJECT_DATA_RECIPIENTS = "subjectDataRecipients",
45
+ /** The legal notice (imprint) the `/legal-notice` page renders (#2588). */
46
+ LEGAL_NOTICE = "legalNotice"
45
47
  }
46
48
  /** One generated constant and the configuration field it must reach. */
47
49
  export interface GeneratedComplianceBinding {
@@ -1 +1 @@
1
- {"version":3,"file":"generated-compliance-module-wiring.d.ts","sourceRoot":"","sources":["../../../../../../src/services/compliance/generated-compliance-module-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AASH,mHAAmH;AAGnH,2FAA2F;AAC3F,oBAAY,8BAA8B;IACxC,uFAAuF;IACvF,0BAA0B,6BAA6B;IACvD,8DAA8D;IAC9D,gBAAgB,oBAAoB;IACpC,8CAA8C;IAC9C,2BAA2B,8BAA8B;IACzD,yEAAyE;IACzE,cAAc,kBAAkB;IAChC,qHAAqH;IACrH,uBAAuB,0BAA0B;CAClD;AAED,wEAAwE;AACxE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,8BAA8B,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,8BAA+B,SAAQ,KAAK;CAAG;AAY5D;;;;;GAKG;AACH,wBAAsB,sCAAsC,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACzD,uEAAuE;IACvE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACjE,GAAG,OAAO,CAAC,SAAS,0BAA0B,EAAE,CAAC,CAiBjD;AAED,0GAA0G;AAC1G,wBAAgB,0CAA0C,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,0BAA0B,EAAE,GAAG,MAAM,CAMvI"}
1
+ {"version":3,"file":"generated-compliance-module-wiring.d.ts","sourceRoot":"","sources":["../../../../src/services/compliance/generated-compliance-module-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AASH,mHAAmH;AAGnH,2FAA2F;AAC3F,oBAAY,8BAA8B;IACxC,uFAAuF;IACvF,0BAA0B,6BAA6B;IACvD,8DAA8D;IAC9D,gBAAgB,oBAAoB;IACpC,8CAA8C;IAC9C,2BAA2B,8BAA8B;IACzD,yEAAyE;IACzE,cAAc,kBAAkB;IAChC,qHAAqH;IACrH,uBAAuB,0BAA0B;IACjD,2EAA2E;IAC3E,YAAY,gBAAgB;CAC7B;AAED,wEAAwE;AACxE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,8BAA8B,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,8BAA+B,SAAQ,KAAK;CAAG;AAY5D;;;;;GAKG;AACH,wBAAsB,sCAAsC,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACzD,uEAAuE;IACvE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACjE,GAAG,OAAO,CAAC,SAAS,0BAA0B,EAAE,CAAC,CAiBjD;AAED,0GAA0G;AAC1G,wBAAgB,0CAA0C,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,0BAA0B,EAAE,GAAG,MAAM,CAMvI"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Does the backend configuration actually CARRY what a generated compliance module holds?
3
3
  *
4
- * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention` and `wildo config
5
- * subject-data-recipients` write modules into
4
+ * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention`, `wildo config
5
+ * subject-data-recipients` and `wildo config legal-notice` write modules into
6
6
  * `backend-api/src/`, and the `document-releases` and `service-consent` validate domains check that
7
7
  * each module is CURRENT. Neither checked that anything imports it. A module can therefore be
8
8
  * byte-for-byte current while `saas-config.backend.ts` never assigns it — and then the running
@@ -48,6 +48,8 @@ export var GeneratedComplianceConfigField;
48
48
  GeneratedComplianceConfigField["DATA_RETENTION"] = "dataRetention";
49
49
  /** Who else holds a data subject's data — what a subject export lists and a subject erasure accounts for (#1710). */
50
50
  GeneratedComplianceConfigField["SUBJECT_DATA_RECIPIENTS"] = "subjectDataRecipients";
51
+ /** The legal notice (imprint) the `/legal-notice` page renders (#2588). */
52
+ GeneratedComplianceConfigField["LEGAL_NOTICE"] = "legalNotice";
51
53
  })(GeneratedComplianceConfigField || (GeneratedComplianceConfigField = {}));
52
54
  export class GeneratedComplianceWiringError extends Error {
53
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generated-compliance-module-wiring.js","sourceRoot":"","sources":["../../../../../../src/services/compliance/generated-compliance-module-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,mHAAmH;AAGnH,2FAA2F;AAC3F,MAAM,CAAN,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,uFAAuF;IACvF,yFAAuD,CAAA;IACvD,8DAA8D;IAC9D,sEAAoC,CAAA;IACpC,8CAA8C;IAC9C,2FAAyD,CAAA;IACzD,yEAAyE;IACzE,kEAAgC,CAAA;IAChC,qHAAqH;IACrH,mFAAiD,CAAA;AACnD,CAAC,EAXW,8BAA8B,KAA9B,8BAA8B,QAWzC;AAQD,MAAM,OAAO,8BAA+B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CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvG,OAAO,GAAG,4BAA4B,mBAAmB,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,cAAc,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;UAC7H,YAAY,SAAS,YAAY,SAAS,gBAAgB,WAAW,wBAAwB,CAAC;AACpG,CAAC","sourcesContent":["/**\n * Does the backend configuration actually CARRY what a generated compliance module holds?\n *\n * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention` and `wildo config\n * subject-data-recipients` write modules into\n * `backend-api/src/`, and the `document-releases` and `service-consent` validate domains check that\n * each module is CURRENT. Neither checked that anything imports it. A module can therefore be\n * byte-for-byte current while `saas-config.backend.ts` never assigns it — and then the running\n * application serves no public privacy or terms document, offers no acceptance control at\n * registration and enforces no consent gate, with every check green.\n *\n * That is not hypothetical wiring trivia: an application that adopts governed documents later (Wonder\n * Todos holds a compliance programme and no release yet) gets the module the day its first draft\n * lands, and nothing in `saas-config.backend.ts` names it.\n *\n * ## Why the comparison is by VALUE, not by reading the import text\n *\n * The question is whether the RUNNING configuration carries the value, and a configuration can import\n * the constant and still assign something else, or assign it through a helper module. So both sides are\n * loaded the way a process would load them — the generated module through `tsImport`, the backend\n * configuration through `loadConfig` — and compared structurally with key order ignored. Both parse\n * through the same schema, so a carried value compares equal and an uncarried one cannot.\n *\n * ## Why an EMPTY value owes nothing\n *\n * A module exporting `[]` or `undefined` changes nothing when it is not carried: the runtime default is\n * the same empty value. Refusing it would turn every application with nothing to publish red over an\n * import that could not change a byte of behaviour — the same reason both domains PASS when no module\n * exists at all. It also means the backend configuration is not loaded for an application that has\n * nothing to carry.\n */\n\nimport { existsSync } from 'node:fs';\nimport { basename, join } from 'node:path';\n\nimport { loadConfig } from '@wildo-ai/platform-config-lib';\nimport { BACKEND_CONFIG_RELATIVE_PATH } from '~wildo-cli/services/application/backend-config.paths';\nimport { tsImport } from 'tsx/esm/api';\n\n/** The backend configuration every generated compliance module is carried by. Relative to the application root. */\n\n\n/** The `compliance` field a generated constant must reach in the backend configuration. */\nexport enum GeneratedComplianceConfigField {\n /** The consent surfaces the registration control and the interaction recorder read. */\n GOVERNED_DOCUMENT_RELEASES = 'governedDocumentReleases',\n /** The documents the public privacy and terms pages serve. */\n PUBLIC_DOCUMENTS = 'publicDocuments',\n /** The consent gate's runtime requirement. */\n SERVICE_CONSENT_REQUIREMENT = 'serviceConsentRequirement',\n /** The retention schedule the retention-class sweep enforces (#1613). */\n DATA_RETENTION = 'dataRetention',\n /** Who else holds a data subject's data — what a subject export lists and a subject erasure accounts for (#1710). */\n SUBJECT_DATA_RECIPIENTS = 'subjectDataRecipients',\n}\n\n/** One generated constant and the configuration field it must reach. */\nexport interface GeneratedComplianceBinding {\n readonly field: GeneratedComplianceConfigField;\n readonly constantName: string;\n}\n\nexport class GeneratedComplianceWiringError extends Error {}\n\n/** Recursively key-sorted JSON, so two structurally equal values compare equal whatever order produced them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, nested: unknown) => {\n if (nested === null || typeof nested !== 'object' || Array.isArray(nested)) return nested;\n return Object.fromEntries(Object.keys(nested).sort().map((key) => [key, (nested as Record<string, unknown>)[key]]));\n });\n}\n\nconst owesCarrying = (value: unknown): boolean => value !== undefined && value !== null && !(Array.isArray(value) && value.length === 0);\n\n/**\n * The bindings whose generated value is NOT what the backend configuration carries.\n *\n * Throws when a value is owed and the backend configuration cannot be found or loaded: an unknowable\n * answer is not a pass, which is how both validate domains already treat a generator that cannot load.\n */\nexport async function findUncarriedGeneratedComplianceValues(input: {\n readonly appRoot: string;\n readonly modulePath: string;\n readonly bindings: readonly GeneratedComplianceBinding[];\n /** Test seams; production loads both files the way a process would. */\n readonly loadModuleExports?: (path: string) => Promise<Record<string, unknown>>;\n readonly loadBackendConfig?: (path: string) => Promise<unknown>;\n}): Promise<readonly GeneratedComplianceBinding[]> {\n const loadModuleExports = input.loadModuleExports\n ?? (async (path: string) => (await tsImport(path, { parentURL: import.meta.url })) as Record<string, unknown>);\n const moduleExports = await loadModuleExports(input.modulePath);\n const owed = input.bindings.filter((binding) => owesCarrying(moduleExports[binding.constantName]));\n if (owed.length === 0) return [];\n\n const backendConfigPath = join(input.appRoot, BACKEND_CONFIG_RELATIVE_PATH);\n if (!existsSync(backendConfigPath)) {\n throw new GeneratedComplianceWiringError(\n `${basename(input.modulePath)} holds values to carry, and there is no ${BACKEND_CONFIG_RELATIVE_PATH} to carry them.`,\n );\n }\n const loadBackendConfig = input.loadBackendConfig ?? ((path: string) => loadConfig<unknown>(path));\n const backendConfig = (await loadBackendConfig(backendConfigPath)) as { compliance?: Record<string, unknown> } | undefined;\n const compliance = backendConfig?.compliance ?? {};\n return owed.filter((binding) => canonicalJson(compliance[binding.field]) !== canonicalJson(moduleExports[binding.constantName]));\n}\n\n/** The remedy, naming the exact import and assignments — so the gate output alone is enough to fix it. */\nexport function describeUncarriedGeneratedComplianceValues(modulePath: string, uncarried: readonly GeneratedComplianceBinding[]): string {\n const specifier = `./${basename(modulePath).replace(/\\.ts$/u, '.js')}`;\n const constants = uncarried.map((binding) => binding.constantName).join(', ');\n const assignments = uncarried.map((binding) => `${binding.field}: ${binding.constantName}`).join(', ');\n return `${BACKEND_CONFIG_RELATIVE_PATH} does not carry ${uncarried.map((binding) => `compliance.${binding.field}`).join(', ')}. `\n + `Import { ${constants} } from '${specifier}' and assign ${assignments} under \\`compliance\\`.`;\n}\n"]}
1
+ {"version":3,"file":"generated-compliance-module-wiring.js","sourceRoot":"","sources":["../../../../src/services/compliance/generated-compliance-module-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO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AK,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACnI,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,0CAA0C,CAAC,UAAkB,EAAE,SAAgD;IAC7H,MAAM,SAAS,GAAG,KAAK,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IACvE,MAAM,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvG,OAAO,GAAG,4BAA4B,mBAAmB,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,cAAc,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;UAC7H,YAAY,SAAS,YAAY,SAAS,gBAAgB,WAAW,wBAAwB,CAAC;AACpG,CAAC","sourcesContent":["/**\n * Does the backend configuration actually CARRY what a generated compliance module holds?\n *\n * `wildo config document-releases`, `wildo config service-consent`, `wildo config data-retention`, `wildo config\n * subject-data-recipients` and `wildo config legal-notice` write modules into\n * `backend-api/src/`, and the `document-releases` and `service-consent` validate domains check that\n * each module is CURRENT. Neither checked that anything imports it. A module can therefore be\n * byte-for-byte current while `saas-config.backend.ts` never assigns it — and then the running\n * application serves no public privacy or terms document, offers no acceptance control at\n * registration and enforces no consent gate, with every check green.\n *\n * That is not hypothetical wiring trivia: an application that adopts governed documents later (Wonder\n * Todos holds a compliance programme and no release yet) gets the module the day its first draft\n * lands, and nothing in `saas-config.backend.ts` names it.\n *\n * ## Why the comparison is by VALUE, not by reading the import text\n *\n * The question is whether the RUNNING configuration carries the value, and a configuration can import\n * the constant and still assign something else, or assign it through a helper module. So both sides are\n * loaded the way a process would load them — the generated module through `tsImport`, the backend\n * configuration through `loadConfig` — and compared structurally with key order ignored. Both parse\n * through the same schema, so a carried value compares equal and an uncarried one cannot.\n *\n * ## Why an EMPTY value owes nothing\n *\n * A module exporting `[]` or `undefined` changes nothing when it is not carried: the runtime default is\n * the same empty value. Refusing it would turn every application with nothing to publish red over an\n * import that could not change a byte of behaviour — the same reason both domains PASS when no module\n * exists at all. It also means the backend configuration is not loaded for an application that has\n * nothing to carry.\n */\n\nimport { existsSync } from 'node:fs';\nimport { basename, join } from 'node:path';\n\nimport { loadConfig } from '@wildo-ai/platform-config-lib';\nimport { BACKEND_CONFIG_RELATIVE_PATH } from '~wildo-cli/services/application/backend-config.paths';\nimport { tsImport } from 'tsx/esm/api';\n\n/** The backend configuration every generated compliance module is carried by. Relative to the application root. */\n\n\n/** The `compliance` field a generated constant must reach in the backend configuration. */\nexport enum GeneratedComplianceConfigField {\n /** The consent surfaces the registration control and the interaction recorder read. */\n GOVERNED_DOCUMENT_RELEASES = 'governedDocumentReleases',\n /** The documents the public privacy and terms pages serve. */\n PUBLIC_DOCUMENTS = 'publicDocuments',\n /** The consent gate's runtime requirement. */\n SERVICE_CONSENT_REQUIREMENT = 'serviceConsentRequirement',\n /** The retention schedule the retention-class sweep enforces (#1613). */\n DATA_RETENTION = 'dataRetention',\n /** Who else holds a data subject's data — what a subject export lists and a subject erasure accounts for (#1710). */\n SUBJECT_DATA_RECIPIENTS = 'subjectDataRecipients',\n /** The legal notice (imprint) the `/legal-notice` page renders (#2588). */\n LEGAL_NOTICE = 'legalNotice',\n}\n\n/** One generated constant and the configuration field it must reach. */\nexport interface GeneratedComplianceBinding {\n readonly field: GeneratedComplianceConfigField;\n readonly constantName: string;\n}\n\nexport class GeneratedComplianceWiringError extends Error {}\n\n/** Recursively key-sorted JSON, so two structurally equal values compare equal whatever order produced them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, nested: unknown) => {\n if (nested === null || typeof nested !== 'object' || Array.isArray(nested)) return nested;\n return Object.fromEntries(Object.keys(nested).sort().map((key) => [key, (nested as Record<string, unknown>)[key]]));\n });\n}\n\nconst owesCarrying = (value: unknown): boolean => value !== undefined && value !== null && !(Array.isArray(value) && value.length === 0);\n\n/**\n * The bindings whose generated value is NOT what the backend configuration carries.\n *\n * Throws when a value is owed and the backend configuration cannot be found or loaded: an unknowable\n * answer is not a pass, which is how both validate domains already treat a generator that cannot load.\n */\nexport async function findUncarriedGeneratedComplianceValues(input: {\n readonly appRoot: string;\n readonly modulePath: string;\n readonly bindings: readonly GeneratedComplianceBinding[];\n /** Test seams; production loads both files the way a process would. */\n readonly loadModuleExports?: (path: string) => Promise<Record<string, unknown>>;\n readonly loadBackendConfig?: (path: string) => Promise<unknown>;\n}): Promise<readonly GeneratedComplianceBinding[]> {\n const loadModuleExports = input.loadModuleExports\n ?? (async (path: string) => (await tsImport(path, { parentURL: import.meta.url })) as Record<string, unknown>);\n const moduleExports = await loadModuleExports(input.modulePath);\n const owed = input.bindings.filter((binding) => owesCarrying(moduleExports[binding.constantName]));\n if (owed.length === 0) return [];\n\n const backendConfigPath = join(input.appRoot, BACKEND_CONFIG_RELATIVE_PATH);\n if (!existsSync(backendConfigPath)) {\n throw new GeneratedComplianceWiringError(\n `${basename(input.modulePath)} holds values to carry, and there is no ${BACKEND_CONFIG_RELATIVE_PATH} to carry them.`,\n );\n }\n const loadBackendConfig = input.loadBackendConfig ?? ((path: string) => loadConfig<unknown>(path));\n const backendConfig = (await loadBackendConfig(backendConfigPath)) as { compliance?: Record<string, unknown> } | undefined;\n const compliance = backendConfig?.compliance ?? {};\n return owed.filter((binding) => canonicalJson(compliance[binding.field]) !== canonicalJson(moduleExports[binding.constantName]));\n}\n\n/** The remedy, naming the exact import and assignments — so the gate output alone is enough to fix it. */\nexport function describeUncarriedGeneratedComplianceValues(modulePath: string, uncarried: readonly GeneratedComplianceBinding[]): string {\n const specifier = `./${basename(modulePath).replace(/\\.ts$/u, '.js')}`;\n const constants = uncarried.map((binding) => binding.constantName).join(', ');\n const assignments = uncarried.map((binding) => `${binding.field}: ${binding.constantName}`).join(', ');\n return `${BACKEND_CONFIG_RELATIVE_PATH} does not carry ${uncarried.map((binding) => `compliance.${binding.field}`).join(', ')}. `\n + `Import { ${constants} } from '${specifier}' and assign ${assignments} under \\`compliance\\`.`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"governed-document-releases.generator.d.ts","sourceRoot":"","sources":["../../../../../../src/services/compliance/governed-document-releases.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAQH,OAAO,EAWL,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAE7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAIL,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACxC,MAAM,yCAAyC,CAAC;AAGjD,uFAAuF;AACvF,eAAO,MAAM,6CAA6C,sCAAsC,CAAC;AAEjG,uFAAuF;AACvF,eAAO,MAAM,qDAAqD,6BAA6B,CAAC;AAEhG,4HAA4H;AAC5H,eAAO,MAAM,wCAAwC,QAAqE,CAAC;AAE3H,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,6BAA6B,CAAC;AAS9E,qBAAa,uCAAwC,SAAQ,KAAK;CAAG;AAErE,wGAAwG;AACxG,MAAM,WAAW,6BAA6B;IAC5C,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,mFAAmF;IACnF,QAAQ,CAAC,YAAY,EAAE,SAAS,kCAAkC,EAAE,CAAC;IACrE,sFAAsF;IACtF,QAAQ,CAAC,MAAM,E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oB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAsB,sCAAsC,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,wCAAwC,CAAC,CA8CpD"}
1
+ {"version":3,"file":"governed-document-releases.generator.d.ts","sourceRoot":"","sources":["../../../../src/services/compliance/governed-document-releases.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAQH,OAAO,EAWL,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAE7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAIL,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACxC,MAAM,yCAAyC,CAAC;AAGjD,uFAAuF;AACvF,eAAO,MAAM,6CAA6C,sCAAsC,CAAC;AAEjG,uFAAuF;AACvF,eAAO,MAAM,qDAAqD,6BAA6B,CAAC;AAEhG,4HAA4H;AAC5H,eAAO,MAAM,wCAAwC,QAAqE,CAAC;AAE3H,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,6BAA6B,CAAC;AAS9E,qBAAa,uCAAwC,SAAQ,KAAK;CAAG;A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CAAoC,CAClD,QAAQ,EAAE,SAAS,kCAAkC,EAAE,EACvD,eAAe,EAAE,SAAS,8BAA8B,EAAE,GACzD,MAAM,CAyCR;AAED,MAAM,WAAW,wCAAwC;IACvD,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAsB,sCAAsC,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,wCAAwC,CAAC,CA8CpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"governed-document-releases.generator.js","sourceRoot":"","sources":["../../../../../../src/services/compliance/governed-document-releases.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,gCAAgC,EAAE,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AAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAClE,CAAC","sourcesContent":["/**\n * Records an application's governed-document releases as DATA, and carries them — with the drafts of\n * documents never released — into its RUNTIME config (issues #860, #968).\n *\n * ## Two gaps, one command\n *\n * **#860 — nothing connected specifications to the runtime.** A release is composed in the\n * application's specifications package, and the running application reads it from\n * `compliance.governedDocumentReleases` (the registration consent control and the interaction\n * recorder) and `compliance.publicDocuments` (the public privacy and terms pages). No package in either\n * example application depends on its own `specifications` package, so the values were hand-copied, and\n * a copy nobody refreshed was a legal statement a person could be bound by.\n *\n * **#968 — a release's text was never frozen.** A release carries the text it publishes, but an\n * application that composes its releases from the live draft on every import re-captures today's\n * draft into every release. So the application declares its release DECISIONS\n * (`documentReleaseCompositions`), and this command composes each decision whose release identity is\n * not yet RECORDED and appends the finished record to `recorded-releases.generated.ts`. A recorded\n * release is never recomposed: editing the draft afterwards changes nothing about it, and publishing\n * new text is a new composition with the next `releaseVersion`. That file IS the release; git is its\n * history.\n *\n * ## Why these shapes, copied from `brandAssets` rather than invented\n *\n * `wildo brand propagate` already reads a specification SSOT and writes a `*.generated.ts` module that\n * `saas-config.backend.ts` imports. Same two ends, same boundary, same answer.\n *\n * ## The PROJECTIONS are the part that must not be skipped\n *\n * The runtime module reaches an unauthenticated browser. A full release also carries `governanceScope`\n * and `approvalDecisions` — internal custody detail. `projectGovernedDocumentInteractionSurface` and\n * `projectGovernedDocumentPublicRelease` are allow-lists, and both run on every release before a byte\n * of the runtime module is written. A draft's public text is itself an allow-list projection\n * (`projectComplianceDocumentCandidatePublicContent`): no fact refs, no source policies, no `closedBy`.\n */\n\nimport { existsSync } from 'node:fs';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\n\nimport { resolvePlaybookOutputLandingTarget } from '@wildo-ai/application-creation-runtime';\nimport { resolvePackageCompanionEntryPath } from '@wildo-ai/platform-config-lib';\nimport {\n GovernedDocumentClass,\n GovernedDocumentInteractionKind,\n GovernedDocumentPublicationChannelKind,\n GovernedDocumentPublicDocumentKind,\n GovernedDocumentPublicDocumentSchema,\n GovernedDocumentReleaseApprovalState,\n PUBLIC_GOVERNED_DOCUMENT_REFS,\n governedDocumentReleaseIdentityKey,\n projectGovernedDocumentInteractionSurface,\n projectGovernedDocumentPublicRelease,\n type GovernedDocumentInteractionSurface,\n type GovernedDocumentPublicDocument,\n type GovernedDocumentRelease,\n describeCaughtError,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationSpecificationFamilySemanticSchemaRef,\n type ApplicationComplianceDocumentCandidateSet,\n type ComplianceDocumentCandidate,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport {\n composeGovernedDocumentRelease,\n GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH,\n projectComplianceDocumentCandidatePublicContent,\n type AssuranceDocumentPublicationVariant,\n type GovernedDocumentReleaseComposition,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { tsImport } from 'tsx/esm/api';\n\n/** The consent-surface constant the application's `saas-config.backend.ts` imports. */\nexport const GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT = 'generatedGovernedDocumentReleases';\n\n/** The public-document constant the application's `saas-config.backend.ts` imports. */\nexport const GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT = 'generatedPublicDocuments';\n\n/** Where recorded releases land. Relative to the SPECIFICATIONS package root, inside the release-set family's directory. */\nexport const RECORDED_DOCUMENT_RELEASES_RELATIVE_PATH = join('src', 'document-releases', 'recorded-releases.generated.ts');\n\n/** The constant the application's `document-releases/index.ts` builds its release set from. */\nexport const RECORDED_DOCUMENT_RELEASES_CONSTANT = 'recordedDocumentReleases';\n\n/*\n * The constant prefix every landing run uses — the companion's playbook runner and its controller\n * both pass `'application'`, and a draft set is only ever written by landing. Named once here so the\n * placement this command reads is the placement landing writes.\n */\nconst LANDED_CONSTANT_PREFIX = 'application';\n\nexport class GovernedDocumentReleasesGenerationError extends Error {}\n\n/** Everything the command needs from the specifications package, loaded through the companion entry. */\nexport interface GovernedDocumentReleaseInputs {\n /** The releases already recorded — what `documentReleaseSet` holds. */\n readonly releases: readonly GovernedDocumentRelease[];\n /** The release decisions the application declared; empty when it declares none. */\n readonly compositions: readonly GovernedDocumentReleaseComposition[];\n /** Every draft the application holds, read from the draft set's landing placement. */\n readonly drafts: readonly ComplianceDocumentCandidate[];\n /** The locale × jurisdiction combinations the application publishes in. */\n readonly publishedVariants: readonly AssuranceDocumentPublicationVariant[];\n}\n\n/**\n * Read the release set, the release decisions, the publication variants and the drafts.\n *\n * Through the ONE door the companion already opens — `resolvePackageCompanionEntryPath`, which reads the\n * specifications package's `./companion` export — except for the drafts, which companion exports\n * deliberately do not carry (a draft is not accepted application truth). Those are read from the\n * placement landing writes them to, resolved by landing's own resolver so the two cannot disagree.\n *\n * ## It reads SOURCE, and the reason is a release it nearly dropped\n *\n * `resolvePackageCompanionEntryPath` returns the DIST unless asked for `moduleResolution:\n * 'framework-source'`. The first run against Wonder CRM took the default and read ONE release where the\n * application composed TWO — the dist predated the service terms by an hour and no watcher refreshed\n * it. So source wins whenever it exists; a published-package layout still resolves through its export\n * map, where the dist IS the truth.\n *\n * ABSENT vs FAILED are kept apart. An application declaring no releases genuinely holds none. A package\n * that cannot be LOADED is not \"no releases\" — reporting it as empty would silently strip every release\n * from the running application — so it throws.\n */\nexport async function loadGovernedDocumentReleaseInputs(specificationsPackageRoot: string): Promise<GovernedDocumentReleaseInputs> {\n const entryPath = resolvePackageCompanionEntryPath(specificationsPackageRoot, undefined, { moduleResolution: 'framework-source' });\n const exports = await importDefaultSurface<{\n documentReleaseSet?: { releases?: readonly GovernedDocumentRelease[] };\n documentReleaseCompositions?: readonly GovernedDocumentReleaseComposition[];\n documentPublicationSpecification?: { variants?: readonly AssuranceDocumentPublicationVariant[] };\n }>(entryPath, 'the specifications companion entry');\n\n return {\n releases: exports.documentReleaseSet?.releases ?? [],\n compositions: exports.documentReleaseCompositions ?? [],\n drafts: await loadDrafts(specificationsPackageRoot),\n publishedVariants: exports.documentPublicationSpecification?.variants ?? [],\n };\n}\n\nasync function loadDrafts(specificationsPackageRoot: string): Promise<readonly ComplianceDocumentCandidate[]> {\n const target = resolvePlaybookOutputLandingTarget({\n family: 'compliance-document-candidate-set',\n schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE_SET,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n });\n const path = join(specificationsPackageRoot, target.packageRelativePath);\n if (!existsSync(path)) return [];\n let loaded: Record<string, unknown>;\n try {\n loaded = await tsImport(path, { parentURL: import.meta.url }) as Record<string, unknown>;\n } catch (error) {\n throw new GovernedDocumentReleasesGenerationError(\n `Could not load the draft set at ${path}, so which documents have drafts is unknown. `\n + `Cause: ${describeCaughtError(error)}`,\n );\n }\n const set = loaded[target.exportedConstantName] as ApplicationComplianceDocumentCandidateSet | undefined;\n if (set === undefined) {\n throw new GovernedDocumentReleasesGenerationError(\n `The draft set at ${path} does not export ${target.exportedConstantName} — the constant landing writes — so its drafts cannot be read.`,\n );\n }\n return set.candidates;\n}\n\nasync function importDefaultSurface<T>(path: string, label: string): Promise<T> {\n let loaded: { default?: unknown };\n try {\n loaded = await tsImport(path, { parentURL: import.meta.url }) as typeof loaded;\n } catch (error) {\n throw new GovernedDocumentReleasesGenerationError(\n `Could not load ${label} at ${path}, so the composed releases are unknown. `\n + 'Refusing to write an empty module in their place — that would silently remove every release from the '\n + `running application. Cause: ${describeCaughtError(error)}`,\n );\n }\n if (!loaded.default || typeof loaded.default !== 'object') {\n throw new GovernedDocumentReleasesGenerationError(`${label} at ${path} must default-export one typed object surface.`);\n }\n return loaded.default as T;\n}\n\n/**\n * Compose every release decision whose identity is not yet recorded, and append it. PURE.\n *\n * A recorded identity is never recomposed — that is the whole of the freezing. A decision that does\n * not compose (its candidate drafts another document, its variant is not published, …) is an ISSUE: the\n * record would be false, so nothing is written. An ADVISORY (unapproved, draft-only lane) records\n * anyway, because a workflow never blocks the mechanism.\n */\nexport function recordPendingDocumentReleases(\n recorded: readonly GovernedDocumentRelease[],\n compositions: readonly GovernedDocumentReleaseComposition[],\n): { readonly releases: readonly GovernedDocumentRelease[]; readonly recordedNow: readonly string[] } {\n const known = new Set(recorded.map((release) => governedDocumentReleaseIdentityKey(release.identity)));\n const releases = [...recorded];\n const recordedNow: string[] = [];\n for (const composition of compositions) {\n const key = governedDocumentReleaseIdentityKey(composition.identity);\n if (known.has(key)) continue;\n const { release, issues } = composeGovernedDocumentRelease(composition);\n if (release === undefined) {\n throw new GovernedDocumentReleasesGenerationError(\n `The release decision ${key} does not compose, so it cannot be recorded: ${issues.map((issue) => issue.message).join('; ')}`,\n );\n }\n releases.push(release);\n known.add(key);\n recordedNow.push(key);\n }\n return { releases, recordedNow };\n}\n\n/**\n * What the public pages may serve: every release published to the public web, and — for a PUBLIC\n * document the application holds no release of — its latest draft (#968 decision 5). PURE.\n *\n * Releases are filtered by their own `publicationChannelKinds` (derived from the accepted definition),\n * drafts by the public document refs a page serves, because a candidate carries no channel. A draft's\n * language and jurisdictions come from the draft when it states both, otherwise from the application's\n * single declared variant; with several variants and none stated there is no honest choice, so the\n * draft is reported rather than rendered in a language nobody picked.\n */\nexport function projectGovernedDocumentPublicDocuments(input: {\n readonly releases: readonly GovernedDocumentRelease[];\n readonly drafts: readonly ComplianceDocumentCandidate[];\n readonly publishedVariants: readonly AssuranceDocumentPublicationVariant[];\n}): { readonly documents: readonly GovernedDocumentPublicDocument[]; readonly unrenderedDrafts: readonly string[] } {\n const documents: GovernedDocumentPublicDocument[] = [];\n const releasedDocumentRefs = new Set(input.releases.map((release) => release.identity.document.documentRef as string));\n for (const release of input.releases) {\n if (!release.publicationChannelKinds.includes(GovernedDocumentPublicationChannelKind.PUBLIC_WEB)) continue;\n documents.push(GovernedDocumentPublicDocumentSchema.parse({\n schemaVersion: 1,\n kind: GovernedDocumentPublicDocumentKind.RELEASED,\n release: projectGovernedDocumentPublicRelease(release),\n content: release.content,\n approvalState: release.approvalState,\n }));\n }\n\n const publicRefs = new Set<string>(Object.values(PUBLIC_GOVERNED_DOCUMENT_REFS));\n const unrenderedDrafts: string[] = [];\n for (const draft of input.drafts) {\n if (!publicRefs.has(draft.documentRef) || releasedDocumentRefs.has(draft.documentRef)) continue;\n const publication = draft.locale !== undefined && draft.jurisdictionRefs !== undefined\n ? { locale: draft.locale, jurisdictionRefs: [...draft.jurisdictionRefs].sort() }\n : input.publishedVariants.length === 1\n ? input.publishedVariants[0]!\n : undefined;\n if (publication === undefined) {\n unrenderedDrafts.push(\n `${draft.documentRef}: the draft states no locale and jurisdictions and the application declares `\n + `${input.publishedVariants.length} publication variants, so no language can be chosen for it`,\n );\n continue;\n }\n documents.push(GovernedDocumentPublicDocumentSchema.parse({\n schemaVersion: 1,\n kind: GovernedDocumentPublicDocumentKind.UNRELEASED_DRAFT,\n documentRef: draft.documentRef,\n content: projectComplianceDocumentCandidatePublicContent(draft, publication),\n }));\n }\n return { documents, unrenderedDrafts };\n}\n\n/**\n * Render the recorded-releases data module. PURE.\n *\n * PARSED, not annotated, because a release's refs are zod BRANDS and a string literal is not assignable\n * to one; `GovernedDocumentReleaseSchema` mints them and re-validates at load, so a hand edit that breaks\n * a record fails on import instead of reaching a page. The data is JSON, not enum member references: a\n * release is mostly prose, and `parse` takes `unknown`, so member references would buy no type safety.\n */\nexport function renderRecordedDocumentReleasesModule(releases: readonly GovernedDocumentRelease[]): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config document-releases`. DO NOT EDIT BY HAND.',\n ' *',\n ' * The governed-document releases this application has RECORDED. Each was composed once, from the',\n ' * draft as it stood, when its decision in `compositions.ts` was first recorded — and is never',\n ' * recomposed, so editing a draft changes no recorded release. Publishing new text is a new',\n ' * composition with the next `releaseVersion`; the history of a release is the history of this file.',\n ' */',\n ].join('\\n');\n if (releases.length === 0) {\n return [\n \"import type { GovernedDocumentRelease } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${RECORDED_DOCUMENT_RELEASES_CONSTANT}: GovernedDocumentRelease[] = [];`,\n '',\n ].join('\\n');\n }\n return [\n \"import { GovernedDocumentReleaseSchema, type GovernedDocumentRelease } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${RECORDED_DOCUMENT_RELEASES_CONSTANT}: GovernedDocumentRelease[] = GovernedDocumentReleaseSchema.array().parse(`\n + `${JSON.stringify(releases, null, 2)});`,\n '',\n ].join('\\n');\n}\n\n/**\n * Render the committed runtime module. PURE — no filesystem, so it is pinned directly.\n *\n * Consent surfaces keep enum MEMBER references (the #860 shape, readable in review); public documents\n * are JSON inside `GovernedDocumentPublicDocumentSchema.array().parse(…)`, because they are mostly prose\n * and the schema mints every brand and enum type at load. Imports are emitted only for what is used.\n */\nexport function renderGovernedDocumentReleasesModule(\n surfaces: readonly GovernedDocumentInteractionSurface[],\n publicDocuments: readonly GovernedDocumentPublicDocument[],\n): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config document-releases`. DO NOT EDIT BY HAND — re-run it to regenerate.',\n ' *',\n ' * The runtime projection of the governed-document releases this application recorded in',\n ' * `specifications/src/document-releases/`, and of the drafts of public documents it never released.',\n ' * `saas-config.backend.ts` composes the first constant into `compliance.governedDocumentReleases`',\n ' * (the registration consent control and the interaction recorder) and the second into',\n ' * `compliance.publicDocuments` (the public privacy and terms pages) — wildo-ai/wildo-ai#54, #860, #968.',\n ' *',\n ' * Every entry is a PROJECTION: `governanceScope` and `approvalDecisions` are withheld because this',\n ' * value reaches an unauthenticated browser.',\n ' */',\n ].join('\\n');\n\n const valueImports: string[] = [];\n const typeImports = ['type GovernedDocumentInteractionSurface', 'type GovernedDocumentPublicDocument'];\n if (surfaces.length > 0) {\n valueImports.push('GovernedDocumentClass', 'GovernedDocumentInteractionKind', 'GovernedDocumentInteractionSurfaceSchema', 'GovernedDocumentReleaseApprovalState');\n }\n if (publicDocuments.length > 0) valueImports.push('GovernedDocumentPublicDocumentSchema');\n const names = [...valueImports.sort(), ...typeImports];\n const imports = valueImports.length === 0\n ? \"import type { GovernedDocumentInteractionSurface, GovernedDocumentPublicDocument } from '@wildo-ai/saas-models';\"\n : ['import {', ...names.map((name) => ` ${name},`), \"} from '@wildo-ai/saas-models';\"].join('\\n');\n\n const surfacesDeclaration = surfaces.length === 0\n ? `export const ${GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT}: GovernedDocumentInteractionSurface[] = [];`\n : [\n `export const ${GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT}: GovernedDocumentInteractionSurface[] = GovernedDocumentInteractionSurfaceSchema.array().parse([`,\n surfaces.map(renderSurface).join('\\n'),\n ']);',\n ].join('\\n');\n\n const publicDocumentsDeclaration = publicDocuments.length === 0\n ? `export const ${GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT}: GovernedDocumentPublicDocument[] = [];`\n : `export const ${GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT}: GovernedDocumentPublicDocument[] = GovernedDocumentPublicDocumentSchema.array().parse(`\n + `${JSON.stringify(publicDocuments, null, 2)});`;\n\n return [imports, '', header, surfacesDeclaration, '', publicDocumentsDeclaration, ''].join('\\n');\n}\n\nexport interface GovernedDocumentReleasesGenerationResult {\n /** The runtime module, under the application root. */\n readonly path: string;\n /** The recorded-releases data module, under the specifications package. */\n readonly recordedReleasesPath: string;\n readonly surfaceCount: number;\n readonly publicDocumentCount: number;\n /** Release identities composed and recorded by THIS run (or that a dry run would record). */\n readonly recordedNow: readonly string[];\n /** Drafts of public documents that could not be rendered, with the reason. */\n readonly unrenderedDrafts: readonly string[];\n /** Whether either module's bytes differ from what is on disk. */\n readonly changed: boolean;\n}\n\n/**\n * Record pending releases, then write both modules. With `dryRun`, write nothing and report whether\n * anything would change — which is what `--check` and the `document-releases` validate domain ask.\n *\n * The recorded-releases module is written only when there is something to record or it already exists,\n * so an application that declares no release decisions gets no file it never asked for.\n */\nexport async function generateGovernedDocumentReleasesModule(input: {\n readonly appRoot: string;\n readonly specificationsPackageRoot: string;\n readonly dryRun?: boolean;\n}): Promise<GovernedDocumentReleasesGenerationResult> {\n const backendDir = join(input.appRoot, 'backend-api');\n if (!existsSync(backendDir)) {\n throw new GovernedDocumentReleasesGenerationError(\n `No backend-api/ package under ${input.appRoot}, so there is no runtime config to carry the releases into.`,\n );\n }\n const inputs = await loadGovernedDocumentReleaseInputs(input.specificationsPackageRoot);\n const { releases, recordedNow } = recordPendingDocumentReleases(inputs.releases, inputs.compositions);\n\n const recordedReleasesPath = join(input.specificationsPackageRoot, RECORDED_DOCUMENT_RELEASES_RELATIVE_PATH);\n const recordedContent = renderRecordedDocumentReleasesModule(releases);\n const recordedPrevious = existsSync(recordedReleasesPath) ? await readFile(recordedReleasesPath, 'utf-8') : undefined;\n const wantsRecordedFile = recordedPrevious !== undefined || inputs.compositions.length > 0;\n const recordedChanged = wantsRecordedFile && recordedPrevious !== recordedContent;\n\n const surfaces = releases.map((release) => projectGovernedDocumentInteractionSurface(release));\n const { documents, unrenderedDrafts } = projectGovernedDocumentPublicDocuments({\n releases,\n drafts: inputs.drafts,\n publishedVariants: inputs.publishedVariants,\n });\n const content = renderGovernedDocumentReleasesModule(surfaces, documents);\n const path = join(input.appRoot, GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH);\n const previous = existsSync(path) ? await readFile(path, 'utf-8') : undefined;\n const moduleChanged = previous !== content;\n\n if (input.dryRun !== true) {\n if (recordedChanged) {\n await mkdir(dirname(recordedReleasesPath), { recursive: true });\n await writeFile(recordedReleasesPath, recordedContent, 'utf-8');\n }\n if (moduleChanged) {\n await mkdir(dirname(path), { recursive: true });\n await writeFile(path, content, 'utf-8');\n }\n }\n return {\n path,\n recordedReleasesPath,\n surfaceCount: surfaces.length,\n publicDocumentCount: documents.length,\n recordedNow,\n unrenderedDrafts,\n changed: moduleChanged || recordedChanged,\n };\n}\n\n/*\n * The three enums are declared with member NAME === string VALUE, so `Enum.<value>` is a valid\n * member reference — the same property the brand renderer relies on. Asserted rather than assumed:\n * a value that is not a member would render a reference to nothing, and the application's typecheck\n * would then report it far from here.\n */\nfunction memberRef(enumName: string, enumObject: Record<string, string>, value: string): string {\n if (enumObject[value] !== value) {\n throw new GovernedDocumentReleasesGenerationError(`${value} is not a member of ${enumName}, so it cannot be rendered as ${enumName}.${value}.`);\n }\n return `${enumName}.${value}`;\n}\n\nfunction renderSurface(surface: GovernedDocumentInteractionSurface): string {\n const { identity } = surface;\n const lines = [\n ' {',\n ' schemaVersion: 1,',\n ' identity: {',\n ` document: { documentRef: ${quote(identity.document.documentRef)}, documentVersion: ${identity.document.documentVersion} },`,\n ` releaseId: ${quote(identity.releaseId)},`,\n ` releaseVersion: ${identity.releaseVersion},`,\n ' },',\n ` documentClass: ${memberRef('GovernedDocumentClass', GovernedDocumentClass, surface.documentClass)},`,\n ` locale: ${quote(surface.locale)},`,\n ` jurisdictionRefs: [${surface.jurisdictionRefs.map(quote).join(', ')}],`,\n ` allowedInteractionKinds: [${surface.allowedInteractionKinds\n .map((kind) => memberRef('GovernedDocumentInteractionKind', GovernedDocumentInteractionKind, kind))\n .join(', ')}],`,\n ` approvalState: ${memberRef('GovernedDocumentReleaseApprovalState', GovernedDocumentReleaseApprovalState, surface.approvalState)},`,\n ` effectiveAt: ${quote(surface.effectiveAt)},`,\n ];\n if (surface.expiresAt !== undefined) lines.push(` expiresAt: ${quote(surface.expiresAt)},`);\n /*\n * WHICH interactions this release says a person must perform AGAIN (#1258, Step 2), projected from its materiality\n * decision. Rendered only when there is something to say, like `expiresAt`: the schema defaults it to nothing renewed,\n * so an empty list is what its absence already means and would only add noise to every existing application's file.\n *\n * It has to be rendered AT ALL, because this file is the only way the runtime ever sees a surface: a projection that\n * carries the field and a renderer that drops it produce an application in which no release is ever material, and\n * nobody is ever asked again — with every unit test green, since each builds its surface by hand.\n */\n if (surface.renewedInteractionKinds.length > 0) {\n lines.push(` renewedInteractionKinds: [${surface.renewedInteractionKinds\n .map((kind) => memberRef('GovernedDocumentInteractionKind', GovernedDocumentInteractionKind, kind))\n .join(', ')}],`);\n }\n lines.push(' },');\n return lines.join('\\n');\n}\n\n/** Single-quote a string literal for the generated source, escaping as needed. */\nfunction quote(value: string): string {\n return `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`;\n}\n"]}
1
+ {"version":3,"file":"governed-document-releases.generator.js","sourceRoot":"","sources":["../../../../src/services/compliance/governed-document-releases.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,sCAAsC,EACtC,kCAAkC,EAClC,oCAAoC,EACpC,oCAAoC,EACpC,6BAA6B,EAC7B,kCAAkC,EAClC,yCAAyC,EACzC,oCAAoC,EAIpC,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,+CAA+C,GAGhD,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,8BAA8B,EAC9B,kDAAkD,EAClD,+CAA+C,GAGhD,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,uFAAuF;AACvF,MAAM,CAAC,MAAM,6CAA6C,GAAG,mCAAmC,CAAC;AAEj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IAAI;QACjB,sBAAsB,SAAS,CAAC,sCAAsC,EAAE,oCAAoC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG;QACvI,oBAAoB,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG;KAClD,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/F;;;;;;;;OAQG;IACH,IAAI,OAAO,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/C,KAAK,CAAC,IAAI,CAAC,iCAAiC,OAAO,CAAC,uBAAuB;aACxE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,iCAAiC,EAAE,+BAA+B,EAAE,IAAI,CAAC,CAAC;aAClG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,kFAAkF;AAClF,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAClE,CAAC","sourcesContent":["/**\n * Records an application's governed-document releases as DATA, and carries them — with the drafts of\n * documents never released — into its RUNTIME config (issues #860, #968).\n *\n * ## Two gaps, one command\n *\n * **#860 — nothing connected specifications to the runtime.** A release is composed in the\n * application's specifications package, and the running application reads it from\n * `compliance.governedDocumentReleases` (the registration consent control and the interaction\n * recorder) and `compliance.publicDocuments` (the public privacy and terms pages). No package in either\n * example application depends on its own `specifications` package, so the values were hand-copied, and\n * a copy nobody refreshed was a legal statement a person could be bound by.\n *\n * **#968 — a release's text was never frozen.** A release carries the text it publishes, but an\n * application that composes its releases from the live draft on every import re-captures today's\n * draft into every release. So the application declares its release DECISIONS\n * (`documentReleaseCompositions`), and this command composes each decision whose release identity is\n * not yet RECORDED and appends the finished record to `recorded-releases.generated.ts`. A recorded\n * release is never recomposed: editing the draft afterwards changes nothing about it, and publishing\n * new text is a new composition with the next `releaseVersion`. That file IS the release; git is its\n * history.\n *\n * ## Why these shapes, copied from `brandAssets` rather than invented\n *\n * `wildo brand propagate` already reads a specification SSOT and writes a `*.generated.ts` module that\n * `saas-config.backend.ts` imports. Same two ends, same boundary, same answer.\n *\n * ## The PROJECTIONS are the part that must not be skipped\n *\n * The runtime module reaches an unauthenticated browser. A full release also carries `governanceScope`\n * and `approvalDecisions` — internal custody detail. `projectGovernedDocumentInteractionSurface` and\n * `projectGovernedDocumentPublicRelease` are allow-lists, and both run on every release before a byte\n * of the runtime module is written. A draft's public text is itself an allow-list projection\n * (`projectComplianceDocumentCandidatePublicContent`): no fact refs, no source policies, no `closedBy`.\n */\n\nimport { existsSync } from 'node:fs';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\n\nimport { resolvePlaybookOutputLandingTarget } from '@wildo-ai/application-creation-runtime';\nimport { resolvePackageCompanionEntryPath } from '@wildo-ai/platform-config-lib';\nimport {\n GovernedDocumentClass,\n GovernedDocumentInteractionKind,\n GovernedDocumentPublicationChannelKind,\n GovernedDocumentPublicDocumentKind,\n GovernedDocumentPublicDocumentSchema,\n GovernedDocumentReleaseApprovalState,\n PUBLIC_GOVERNED_DOCUMENT_REFS,\n governedDocumentReleaseIdentityKey,\n projectGovernedDocumentInteractionSurface,\n projectGovernedDocumentPublicRelease,\n type GovernedDocumentInteractionSurface,\n type GovernedDocumentPublicDocument,\n type GovernedDocumentRelease,\n describeCaughtError,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationSpecificationFamilySemanticSchemaRef,\n type ApplicationComplianceDocumentCandidateSet,\n type ComplianceDocumentCandidate,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport {\n composeGovernedDocumentRelease,\n GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH,\n projectComplianceDocumentCandidatePublicContent,\n type AssuranceDocumentPublicationVariant,\n type GovernedDocumentReleaseComposition,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { tsImport } from 'tsx/esm/api';\n\n/** The consent-surface constant the application's `saas-config.backend.ts` imports. */\nexport const GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT = 'generatedGovernedDocumentReleases';\n\n/** The public-document constant the application's `saas-config.backend.ts` imports. */\nexport const GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT = 'generatedPublicDocuments';\n\n/** Where recorded releases land. Relative to the SPECIFICATIONS package root, inside the release-set family's directory. */\nexport const RECORDED_DOCUMENT_RELEASES_RELATIVE_PATH = join('src', 'document-releases', 'recorded-releases.generated.ts');\n\n/** The constant the application's `document-releases/index.ts` builds its release set from. */\nexport const RECORDED_DOCUMENT_RELEASES_CONSTANT = 'recordedDocumentReleases';\n\n/*\n * The constant prefix every landing run uses — the companion's playbook runner and its controller\n * both pass `'application'`, and a draft set is only ever written by landing. Named once here so the\n * placement this command reads is the placement landing writes.\n */\nconst LANDED_CONSTANT_PREFIX = 'application';\n\nexport class GovernedDocumentReleasesGenerationError extends Error {}\n\n/** Everything the command needs from the specifications package, loaded through the companion entry. */\nexport interface GovernedDocumentReleaseInputs {\n /** The releases already recorded — what `documentReleaseSet` holds. */\n readonly releases: readonly GovernedDocumentRelease[];\n /** The release decisions the application declared; empty when it declares none. */\n readonly compositions: readonly GovernedDocumentReleaseComposition[];\n /** Every draft the application holds, read from the draft set's landing placement. */\n readonly drafts: readonly ComplianceDocumentCandidate[];\n /** The locale × jurisdiction combinations the application publishes in. */\n readonly publishedVariants: readonly AssuranceDocumentPublicationVariant[];\n}\n\n/**\n * Read the release set, the release decisions, the publication variants and the drafts.\n *\n * Through the ONE door the companion already opens — `resolvePackageCompanionEntryPath`, which reads the\n * specifications package's `./companion` export — except for the drafts, which companion exports\n * deliberately do not carry (a draft is not accepted application truth). Those are read from the\n * placement landing writes them to, resolved by landing's own resolver so the two cannot disagree.\n *\n * ## It reads SOURCE, and the reason is a release it nearly dropped\n *\n * `resolvePackageCompanionEntryPath` returns the DIST unless asked for `moduleResolution:\n * 'framework-source'`. The first run against Wonder CRM took the default and read ONE release where the\n * application composed TWO — the dist predated the service terms by an hour and no watcher refreshed\n * it. So source wins whenever it exists; a published-package layout still resolves through its export\n * map, where the dist IS the truth.\n *\n * ABSENT vs FAILED are kept apart. An application declaring no releases genuinely holds none. A package\n * that cannot be LOADED is not \"no releases\" — reporting it as empty would silently strip every release\n * from the running application — so it throws.\n */\nexport async function loadGovernedDocumentReleaseInputs(specificationsPackageRoot: string): Promise<GovernedDocumentReleaseInputs> {\n const entryPath = resolvePackageCompanionEntryPath(specificationsPackageRoot, undefined, { moduleResolution: 'framework-source' });\n const exports = await importDefaultSurface<{\n documentReleaseSet?: { releases?: readonly GovernedDocumentRelease[] };\n documentReleaseCompositions?: readonly GovernedDocumentReleaseComposition[];\n documentPublicationSpecification?: { variants?: readonly AssuranceDocumentPublicationVariant[] };\n }>(entryPath, 'the specifications companion entry');\n\n return {\n releases: exports.documentReleaseSet?.releases ?? [],\n compositions: exports.documentReleaseCompositions ?? [],\n drafts: await loadDrafts(specificationsPackageRoot),\n publishedVariants: exports.documentPublicationSpecification?.variants ?? [],\n };\n}\n\nasync function loadDrafts(specificationsPackageRoot: string): Promise<readonly ComplianceDocumentCandidate[]> {\n const target = resolvePlaybookOutputLandingTarget({\n family: 'compliance-document-candidate-set',\n schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE_SET,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n });\n const path = join(specificationsPackageRoot, target.packageRelativePath);\n if (!existsSync(path)) return [];\n let loaded: Record<string, unknown>;\n try {\n loaded = await tsImport(path, { parentURL: import.meta.url }) as Record<string, unknown>;\n } catch (error) {\n throw new GovernedDocumentReleasesGenerationError(\n `Could not load the draft set at ${path}, so which documents have drafts is unknown. `\n + `Cause: ${describeCaughtError(error)}`,\n );\n }\n const set = loaded[target.exportedConstantName] as ApplicationComplianceDocumentCandidateSet | undefined;\n if (set === undefined) {\n throw new GovernedDocumentReleasesGenerationError(\n `The draft set at ${path} does not export ${target.exportedConstantName} — the constant landing writes — so its drafts cannot be read.`,\n );\n }\n return set.candidates;\n}\n\nasync function importDefaultSurface<T>(path: string, label: string): Promise<T> {\n let loaded: { default?: unknown };\n try {\n loaded = await tsImport(path, { parentURL: import.meta.url }) as typeof loaded;\n } catch (error) {\n throw new GovernedDocumentReleasesGenerationError(\n `Could not load ${label} at ${path}, so the composed releases are unknown. `\n + 'Refusing to write an empty module in their place — that would silently remove every release from the '\n + `running application. Cause: ${describeCaughtError(error)}`,\n );\n }\n if (!loaded.default || typeof loaded.default !== 'object') {\n throw new GovernedDocumentReleasesGenerationError(`${label} at ${path} must default-export one typed object surface.`);\n }\n return loaded.default as T;\n}\n\n/**\n * Compose every release decision whose identity is not yet recorded, and append it. PURE.\n *\n * A recorded identity is never recomposed — that is the whole of the freezing. A decision that does\n * not compose (its candidate drafts another document, its variant is not published, …) is an ISSUE: the\n * record would be false, so nothing is written. An ADVISORY (unapproved, draft-only lane) records\n * anyway, because a workflow never blocks the mechanism.\n */\nexport function recordPendingDocumentReleases(\n recorded: readonly GovernedDocumentRelease[],\n compositions: readonly GovernedDocumentReleaseComposition[],\n): { readonly releases: readonly GovernedDocumentRelease[]; readonly recordedNow: readonly string[] } {\n const known = new Set(recorded.map((release) => governedDocumentReleaseIdentityKey(release.identity)));\n const releases = [...recorded];\n const recordedNow: string[] = [];\n for (const composition of compositions) {\n const key = governedDocumentReleaseIdentityKey(composition.identity);\n if (known.has(key)) continue;\n const { release, issues } = composeGovernedDocumentRelease(composition);\n if (release === undefined) {\n throw new GovernedDocumentReleasesGenerationError(\n `The release decision ${key} does not compose, so it cannot be recorded: ${issues.map((issue) => issue.message).join('; ')}`,\n );\n }\n releases.push(release);\n known.add(key);\n recordedNow.push(key);\n }\n return { releases, recordedNow };\n}\n\n/**\n * What the public pages may serve: every release published to the public web, and — for a PUBLIC\n * document the application holds no release of — its latest draft (#968 decision 5). PURE.\n *\n * Releases are filtered by their own `publicationChannelKinds` (derived from the accepted definition),\n * drafts by the public document refs a page serves, because a candidate carries no channel. A draft's\n * language and jurisdictions come from the draft when it states both, otherwise from the application's\n * single declared variant; with several variants and none stated there is no honest choice, so the\n * draft is reported rather than rendered in a language nobody picked.\n */\nexport function projectGovernedDocumentPublicDocuments(input: {\n readonly releases: readonly GovernedDocumentRelease[];\n readonly drafts: readonly ComplianceDocumentCandidate[];\n readonly publishedVariants: readonly AssuranceDocumentPublicationVariant[];\n}): { readonly documents: readonly GovernedDocumentPublicDocument[]; readonly unrenderedDrafts: readonly string[] } {\n const documents: GovernedDocumentPublicDocument[] = [];\n const releasedDocumentRefs = new Set(input.releases.map((release) => release.identity.document.documentRef as string));\n for (const release of input.releases) {\n if (!release.publicationChannelKinds.includes(GovernedDocumentPublicationChannelKind.PUBLIC_WEB)) continue;\n documents.push(GovernedDocumentPublicDocumentSchema.parse({\n schemaVersion: 1,\n kind: GovernedDocumentPublicDocumentKind.RELEASED,\n release: projectGovernedDocumentPublicRelease(release),\n content: release.content,\n approvalState: release.approvalState,\n }));\n }\n\n const publicRefs = new Set<string>(Object.values(PUBLIC_GOVERNED_DOCUMENT_REFS));\n const unrenderedDrafts: string[] = [];\n for (const draft of input.drafts) {\n if (!publicRefs.has(draft.documentRef) || releasedDocumentRefs.has(draft.documentRef)) continue;\n const publication = draft.locale !== undefined && draft.jurisdictionRefs !== undefined\n ? { locale: draft.locale, jurisdictionRefs: [...draft.jurisdictionRefs].sort() }\n : input.publishedVariants.length === 1\n ? input.publishedVariants[0]!\n : undefined;\n if (publication === undefined) {\n unrenderedDrafts.push(\n `${draft.documentRef}: the draft states no locale and jurisdictions and the application declares `\n + `${input.publishedVariants.length} publication variants, so no language can be chosen for it`,\n );\n continue;\n }\n documents.push(GovernedDocumentPublicDocumentSchema.parse({\n schemaVersion: 1,\n kind: GovernedDocumentPublicDocumentKind.UNRELEASED_DRAFT,\n documentRef: draft.documentRef,\n content: projectComplianceDocumentCandidatePublicContent(draft, publication),\n }));\n }\n return { documents, unrenderedDrafts };\n}\n\n/**\n * Render the recorded-releases data module. PURE.\n *\n * PARSED, not annotated, because a release's refs are zod BRANDS and a string literal is not assignable\n * to one; `GovernedDocumentReleaseSchema` mints them and re-validates at load, so a hand edit that breaks\n * a record fails on import instead of reaching a page. The data is JSON, not enum member references: a\n * release is mostly prose, and `parse` takes `unknown`, so member references would buy no type safety.\n */\nexport function renderRecordedDocumentReleasesModule(releases: readonly GovernedDocumentRelease[]): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config document-releases`. DO NOT EDIT BY HAND.',\n ' *',\n ' * The governed-document releases this application has RECORDED. Each was composed once, from the',\n ' * draft as it stood, when its decision in `compositions.ts` was first recorded — and is never',\n ' * recomposed, so editing a draft changes no recorded release. Publishing new text is a new',\n ' * composition with the next `releaseVersion`; the history of a release is the history of this file.',\n ' */',\n ].join('\\n');\n if (releases.length === 0) {\n return [\n \"import type { GovernedDocumentRelease } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${RECORDED_DOCUMENT_RELEASES_CONSTANT}: GovernedDocumentRelease[] = [];`,\n '',\n ].join('\\n');\n }\n return [\n \"import { GovernedDocumentReleaseSchema, type GovernedDocumentRelease } from '@wildo-ai/saas-models';\",\n '',\n header,\n `export const ${RECORDED_DOCUMENT_RELEASES_CONSTANT}: GovernedDocumentRelease[] = GovernedDocumentReleaseSchema.array().parse(`\n + `${JSON.stringify(releases, null, 2)});`,\n '',\n ].join('\\n');\n}\n\n/**\n * Render the committed runtime module. PURE — no filesystem, so it is pinned directly.\n *\n * Consent surfaces keep enum MEMBER references (the #860 shape, readable in review); public documents\n * are JSON inside `GovernedDocumentPublicDocumentSchema.array().parse(…)`, because they are mostly prose\n * and the schema mints every brand and enum type at load. Imports are emitted only for what is used.\n */\nexport function renderGovernedDocumentReleasesModule(\n surfaces: readonly GovernedDocumentInteractionSurface[],\n publicDocuments: readonly GovernedDocumentPublicDocument[],\n): string {\n const header = [\n '/**',\n ' * GENERATED by `wildo config document-releases`. DO NOT EDIT BY HAND — re-run it to regenerate.',\n ' *',\n ' * The runtime projection of the governed-document releases this application recorded in',\n ' * `specifications/src/document-releases/`, and of the drafts of public documents it never released.',\n ' * `saas-config.backend.ts` composes the first constant into `compliance.governedDocumentReleases`',\n ' * (the registration consent control and the interaction recorder) and the second into',\n ' * `compliance.publicDocuments` (the public privacy and terms pages) — wildo-ai/wildo-ai#54, #860, #968.',\n ' *',\n ' * Every entry is a PROJECTION: `governanceScope` and `approvalDecisions` are withheld because this',\n ' * value reaches an unauthenticated browser.',\n ' */',\n ].join('\\n');\n\n const valueImports: string[] = [];\n const typeImports = ['type GovernedDocumentInteractionSurface', 'type GovernedDocumentPublicDocument'];\n if (surfaces.length > 0) {\n valueImports.push('GovernedDocumentClass', 'GovernedDocumentInteractionKind', 'GovernedDocumentInteractionSurfaceSchema', 'GovernedDocumentReleaseApprovalState');\n }\n if (publicDocuments.length > 0) valueImports.push('GovernedDocumentPublicDocumentSchema');\n const names = [...valueImports.sort(), ...typeImports];\n const imports = valueImports.length === 0\n ? \"import type { GovernedDocumentInteractionSurface, GovernedDocumentPublicDocument } from '@wildo-ai/saas-models';\"\n : ['import {', ...names.map((name) => ` ${name},`), \"} from '@wildo-ai/saas-models';\"].join('\\n');\n\n const surfacesDeclaration = surfaces.length === 0\n ? `export const ${GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT}: GovernedDocumentInteractionSurface[] = [];`\n : [\n `export const ${GOVERNED_DOCUMENT_RELEASES_GENERATED_CONSTANT}: GovernedDocumentInteractionSurface[] = GovernedDocumentInteractionSurfaceSchema.array().parse([`,\n surfaces.map(renderSurface).join('\\n'),\n ']);',\n ].join('\\n');\n\n const publicDocumentsDeclaration = publicDocuments.length === 0\n ? `export const ${GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT}: GovernedDocumentPublicDocument[] = [];`\n : `export const ${GOVERNED_DOCUMENT_PUBLIC_DOCUMENTS_GENERATED_CONSTANT}: GovernedDocumentPublicDocument[] = GovernedDocumentPublicDocumentSchema.array().parse(`\n + `${JSON.stringify(publicDocuments, null, 2)});`;\n\n return [imports, '', header, surfacesDeclaration, '', publicDocumentsDeclaration, ''].join('\\n');\n}\n\nexport interface GovernedDocumentReleasesGenerationResult {\n /** The runtime module, under the application root. */\n readonly path: string;\n /** The recorded-releases data module, under the specifications package. */\n readonly recordedReleasesPath: string;\n readonly surfaceCount: number;\n readonly publicDocumentCount: number;\n /** Release identities composed and recorded by THIS run (or that a dry run would record). */\n readonly recordedNow: readonly string[];\n /** Drafts of public documents that could not be rendered, with the reason. */\n readonly unrenderedDrafts: readonly string[];\n /** Whether either module's bytes differ from what is on disk. */\n readonly changed: boolean;\n}\n\n/**\n * Record pending releases, then write both modules. With `dryRun`, write nothing and report whether\n * anything would change — which is what `--check` and the `document-releases` validate domain ask.\n *\n * The recorded-releases module is written only when there is something to record or it already exists,\n * so an application that declares no release decisions gets no file it never asked for.\n */\nexport async function generateGovernedDocumentReleasesModule(input: {\n readonly appRoot: string;\n readonly specificationsPackageRoot: string;\n readonly dryRun?: boolean;\n}): Promise<GovernedDocumentReleasesGenerationResult> {\n const backendDir = join(input.appRoot, 'backend-api');\n if (!existsSync(backendDir)) {\n throw new GovernedDocumentReleasesGenerationError(\n `No backend-api/ package under ${input.appRoot}, so there is no runtime config to carry the releases into.`,\n );\n }\n const inputs = await loadGovernedDocumentReleaseInputs(input.specificationsPackageRoot);\n const { releases, recordedNow } = recordPendingDocumentReleases(inputs.releases, inputs.compositions);\n\n const recordedReleasesPath = join(input.specificationsPackageRoot, RECORDED_DOCUMENT_RELEASES_RELATIVE_PATH);\n const recordedContent = renderRecordedDocumentReleasesModule(releases);\n const recordedPrevious = existsSync(recordedReleasesPath) ? await readFile(recordedReleasesPath, 'utf-8') : undefined;\n const wantsRecordedFile = recordedPrevious !== undefined || inputs.compositions.length > 0;\n const recordedChanged = wantsRecordedFile && recordedPrevious !== recordedContent;\n\n const surfaces = releases.map((release) => projectGovernedDocumentInteractionSurface(release));\n const { documents, unrenderedDrafts } = projectGovernedDocumentPublicDocuments({\n releases,\n drafts: inputs.drafts,\n publishedVariants: inputs.publishedVariants,\n });\n const content = renderGovernedDocumentReleasesModule(surfaces, documents);\n const path = join(input.appRoot, GOVERNED_DOCUMENT_RELEASES_GENERATED_RELATIVE_PATH);\n const previous = existsSync(path) ? await readFile(path, 'utf-8') : undefined;\n const moduleChanged = previous !== content;\n\n if (input.dryRun !== true) {\n if (recordedChanged) {\n await mkdir(dirname(recordedReleasesPath), { recursive: true });\n await writeFile(recordedReleasesPath, recordedContent, 'utf-8');\n }\n if (moduleChanged) {\n await mkdir(dirname(path), { recursive: true });\n await writeFile(path, content, 'utf-8');\n }\n }\n return {\n path,\n recordedReleasesPath,\n surfaceCount: surfaces.length,\n publicDocumentCount: documents.length,\n recordedNow,\n unrenderedDrafts,\n changed: moduleChanged || recordedChanged,\n };\n}\n\n/*\n * The three enums are declared with member NAME === string VALUE, so `Enum.<value>` is a valid\n * member reference — the same property the brand renderer relies on. Asserted rather than assumed:\n * a value that is not a member would render a reference to nothing, and the application's typecheck\n * would then report it far from here.\n */\nfunction memberRef(enumName: string, enumObject: Record<string, string>, value: string): string {\n if (enumObject[value] !== value) {\n throw new GovernedDocumentReleasesGenerationError(`${value} is not a member of ${enumName}, so it cannot be rendered as ${enumName}.${value}.`);\n }\n return `${enumName}.${value}`;\n}\n\nfunction renderSurface(surface: GovernedDocumentInteractionSurface): string {\n const { identity } = surface;\n const lines = [\n ' {',\n ' schemaVersion: 1,',\n ' identity: {',\n ` document: { documentRef: ${quote(identity.document.documentRef)}, documentVersion: ${identity.document.documentVersion} },`,\n ` releaseId: ${quote(identity.releaseId)},`,\n ` releaseVersion: ${identity.releaseVersion},`,\n ' },',\n ` documentClass: ${memberRef('GovernedDocumentClass', GovernedDocumentClass, surface.documentClass)},`,\n ` locale: ${quote(surface.locale)},`,\n ` jurisdictionRefs: [${surface.jurisdictionRefs.map(quote).join(', ')}],`,\n ` allowedInteractionKinds: [${surface.allowedInteractionKinds\n .map((kind) => memberRef('GovernedDocumentInteractionKind', GovernedDocumentInteractionKind, kind))\n .join(', ')}],`,\n ` approvalState: ${memberRef('GovernedDocumentReleaseApprovalState', GovernedDocumentReleaseApprovalState, surface.approvalState)},`,\n ` effectiveAt: ${quote(surface.effectiveAt)},`,\n ];\n if (surface.expiresAt !== undefined) lines.push(` expiresAt: ${quote(surface.expiresAt)},`);\n /*\n * WHICH interactions this release says a person must perform AGAIN (#1258, Step 2), projected from its materiality\n * decision. Rendered only when there is something to say, like `expiresAt`: the schema defaults it to nothing renewed,\n * so an empty list is what its absence already means and would only add noise to every existing application's file.\n *\n * It has to be rendered AT ALL, because this file is the only way the runtime ever sees a surface: a projection that\n * carries the field and a renderer that drops it produce an application in which no release is ever material, and\n * nobody is ever asked again — with every unit test green, since each builds its surface by hand.\n */\n if (surface.renewedInteractionKinds.length > 0) {\n lines.push(` renewedInteractionKinds: [${surface.renewedInteractionKinds\n .map((kind) => memberRef('GovernedDocumentInteractionKind', GovernedDocumentInteractionKind, kind))\n .join(', ')}],`);\n }\n lines.push(' },');\n return lines.join('\\n');\n}\n\n/** Single-quote a string literal for the generated source, escaping as needed. */\nfunction quote(value: string): string {\n return `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`;\n}\n"]}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Carries an application's LEGAL NOTICE (imprint) into its RUNTIME config (#2588).
3
+ *
4
+ * ## The gap this closes
5
+ *
6
+ * An information-society service provider established in the EU, the EEA, the UK or Switzerland must keep its identity easily,
7
+ * directly and permanently accessible (Directive 2000/31/EC Art. 5(1); EEA Joint Committee Decision 091/2000; in the UK
8
+ * SI 2002/2013 reg. 6(1)). The particulars are
9
+ * declared in `operatorComplianceIdentity` in `wildo.saas.config.ts`, which is not a runtime dependency of the
10
+ * backend, so they are projected into `backend-api/src/legal-notice.generated.ts`, composed by `saas-config.backend.ts`
11
+ * into `compliance.legalNotice`, which the application's `/legal-notice` page renders.
12
+ * spec-cite: Directive 2000/31/EC Art. 5(1); EEA Joint Committee Decision 091/2000; SI 2002/2013 reg. 6(1)
13
+ *
14
+ * Copied from `wildo config service-consent`: same two ends, same `--check`, same reason a hand-copy is refused (a stale
15
+ * copy is a legal statement the declaration no longer makes).
16
+ *
17
+ * ## Absent stays absent
18
+ *
19
+ * An operator for whom no researched regime applies (established outside the EU, the EEA, the UK and Switzerland), or that has not
20
+ * declared where it is established, gets a module exporting `undefined`: the application publishes no notice. The projection never invents a particular: an undeclared one is absent here and
21
+ * MARKED on the page.
22
+ */
23
+ import { type LegalNotice } from '@wildo-ai/saas-models';
24
+ /** The constant the application's `saas-config.backend.ts` imports. */
25
+ export declare const LEGAL_NOTICE_GENERATED_CONSTANT = "generatedLegalNotice";
26
+ export declare class LegalNoticeGenerationError extends Error {
27
+ }
28
+ /**
29
+ * Read and VALIDATE the declared identity, then project the notice. An identity that does not parse is refused rather
30
+ * than projected: a malformed notice written into the runtime would fail the application at startup, far from the file
31
+ * the author must fix.
32
+ */
33
+ export declare function loadDeclaredLegalNotice(appRoot: string): Promise<LegalNotice | undefined>;
34
+ /** Render the committed generated module. PURE, so it is pinned directly. */
35
+ export declare function renderLegalNoticeModule(notice: LegalNotice | undefined): string;
36
+ /** Write the module into `<appRoot>/backend-api/src/`. Returns whether the bytes changed. */
37
+ export declare function generateLegalNoticeModule(input: {
38
+ readonly appRoot: string;
39
+ readonly dryRun?: boolean;
40
+ }): Promise<{
41
+ readonly path: string;
42
+ readonly owed: boolean;
43
+ readonly changed: boolean;
44
+ }>;
45
+ //# sourceMappingURL=legal-notice.generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legal-notice.generator.d.ts","sourceRoot":"","sources":["../../../../src/services/compliance/legal-notice.generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,OAAO,EAAyG,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGhK,uEAAuE;AACvE,eAAO,MAAM,+BAA+B,yBAAyB,CAAC;AAEtE,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAExD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAc/F;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CA4B/E;AAED,6FAA6F;AAC7F,wBAAsB,yBAAyB,CAAC,KAAK,EAAE;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAcxF"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Carries an application's LEGAL NOTICE (imprint) into its RUNTIME config (#2588).
3
+ *
4
+ * ## The gap this closes
5
+ *
6
+ * An information-society service provider established in the EU, the EEA, the UK or Switzerland must keep its identity easily,
7
+ * directly and permanently accessible (Directive 2000/31/EC Art. 5(1); EEA Joint Committee Decision 091/2000; in the UK
8
+ * SI 2002/2013 reg. 6(1)). The particulars are
9
+ * declared in `operatorComplianceIdentity` in `wildo.saas.config.ts`, which is not a runtime dependency of the
10
+ * backend, so they are projected into `backend-api/src/legal-notice.generated.ts`, composed by `saas-config.backend.ts`
11
+ * into `compliance.legalNotice`, which the application's `/legal-notice` page renders.
12
+ * spec-cite: Directive 2000/31/EC Art. 5(1); EEA Joint Committee Decision 091/2000; SI 2002/2013 reg. 6(1)
13
+ *
14
+ * Copied from `wildo config service-consent`: same two ends, same `--check`, same reason a hand-copy is refused (a stale
15
+ * copy is a legal statement the declaration no longer makes).
16
+ *
17
+ * ## Absent stays absent
18
+ *
19
+ * An operator for whom no researched regime applies (established outside the EU, the EEA, the UK and Switzerland), or that has not
20
+ * declared where it is established, gets a module exporting `undefined`: the application publishes no notice. The projection never invents a particular: an undeclared one is absent here and
21
+ * MARKED on the page.
22
+ */
23
+ import { existsSync } from 'node:fs';
24
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
25
+ import { dirname, join } from 'node:path';
26
+ import { loadSaasConfig } from '@wildo-ai/platform-config-lib';
27
+ import { ApplicationOperatorComplianceIdentitySchema, LEGAL_NOTICE_GENERATED_RELATIVE_PATH, projectLegalNotice } from '@wildo-ai/saas-models';
28
+ /** The constant the application's `saas-config.backend.ts` imports. */
29
+ export const LEGAL_NOTICE_GENERATED_CONSTANT = 'generatedLegalNotice';
30
+ export class LegalNoticeGenerationError extends Error {
31
+ }
32
+ /**
33
+ * Read and VALIDATE the declared identity, then project the notice. An identity that does not parse is refused rather
34
+ * than projected: a malformed notice written into the runtime would fail the application at startup, far from the file
35
+ * the author must fix.
36
+ */
37
+ export async function loadDeclaredLegalNotice(appRoot) {
38
+ const configPath = join(appRoot, 'wildo.saas.config.ts');
39
+ const config = await loadSaasConfig(configPath);
40
+ if (config === null) {
41
+ throw new LegalNoticeGenerationError(`Could not load ${configPath}, so the legal notice is unknown.`);
42
+ }
43
+ if (config.operatorComplianceIdentity === undefined)
44
+ return undefined;
45
+ const parsed = ApplicationOperatorComplianceIdentitySchema.safeParse(config.operatorComplianceIdentity);
46
+ if (!parsed.success) {
47
+ throw new LegalNoticeGenerationError(`operatorComplianceIdentity in ${configPath} is invalid: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`);
48
+ }
49
+ return projectLegalNotice(parsed.data);
50
+ }
51
+ /** Render the committed generated module. PURE, so it is pinned directly. */
52
+ export function renderLegalNoticeModule(notice) {
53
+ const header = [
54
+ '/**',
55
+ ' * GENERATED by `wildo config legal-notice`. DO NOT EDIT BY HAND — re-run it to regenerate.',
56
+ ' *',
57
+ ' * The legal notice (imprint) projected from `operatorComplianceIdentity` in `wildo.saas.config.ts`. Composed into',
58
+ ' * `compliance.legalNotice` by `saas-config.backend.ts` and rendered at `/legal-notice` (#2588). `undefined` means',
59
+ ' * the application publishes no notice: no regime `legalNoticeOwed` knows applies to where the operator is',
60
+ ' * established, or it has not declared where it is established yet.',
61
+ ' */',
62
+ ].join('\n');
63
+ if (notice === undefined) {
64
+ return [
65
+ "import type { LegalNotice } from '@wildo-ai/saas-models';",
66
+ '',
67
+ header,
68
+ `export const ${LEGAL_NOTICE_GENERATED_CONSTANT}: LegalNotice | undefined = undefined;`,
69
+ '',
70
+ ].join('\n');
71
+ }
72
+ return [
73
+ "import { LegalNoticeSchema, type LegalNotice } from '@wildo-ai/saas-models';",
74
+ '',
75
+ header,
76
+ // Parsed at load, so a hand edit that breaks the schema (an invalid e-mail, an unknown field) fails at startup.
77
+ `export const ${LEGAL_NOTICE_GENERATED_CONSTANT}: LegalNotice | undefined = LegalNoticeSchema.parse(${JSON.stringify(notice, null, 2)});`,
78
+ '',
79
+ ].join('\n');
80
+ }
81
+ /** Write the module into `<appRoot>/backend-api/src/`. Returns whether the bytes changed. */
82
+ export async function generateLegalNoticeModule(input) {
83
+ if (!existsSync(join(input.appRoot, 'backend-api'))) {
84
+ throw new LegalNoticeGenerationError(`No backend-api/ package under ${input.appRoot}, so there is no runtime config to carry the legal notice into.`);
85
+ }
86
+ const notice = await loadDeclaredLegalNotice(input.appRoot);
87
+ const content = renderLegalNoticeModule(notice);
88
+ const path = join(input.appRoot, LEGAL_NOTICE_GENERATED_RELATIVE_PATH);
89
+ const previous = existsSync(path) ? await readFile(path, 'utf-8') : undefined;
90
+ const changed = previous !== content;
91
+ if (changed && input.dryRun !== true) {
92
+ await mkdir(dirname(path), { recursive: true });
93
+ await writeFile(path, content, 'utf-8');
94
+ }
95
+ return { path, owed: notice !== undefined, changed };
96
+ }
97
+ //# sourceMappingURL=legal-notice.generator.js.map