@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
@@ -2,7 +2,9 @@ import { CreationConsoleAnswerAction, CreationConsoleQuestionKind, parseCreation
2
2
  import { MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';
3
3
  import { ApplicationCreatorInputAnswerStanding, playbookInstanceId } from '@wildo-ai/saas-specifications/application-creation';
4
4
  import { INTERVIEW_ANSWER_PROPOSER_REF } from '@wildo-ai/application-creation-runtime';
5
- import { CompanionClient } from './companion-client.service.js';
5
+ import { getFrameworkKnowledgePlaybook } from '@wildo-ai/framework-knowledge';
6
+ import { CompanionClient, CompanionRefusalError, CompanionRequestTimeoutError } from './companion-client.service.js';
7
+ import { PulseFailure, describePulseFailure } from './console-fast-path.js';
6
8
  import { GitHelper } from './git-helper.service.js';
7
9
  import { CompanionRequestRetryPolicy } from './companion.schemas.js';
8
10
  /**
@@ -23,6 +25,8 @@ export const CreationConsoleClient = {
23
25
  */
24
26
  readFeedOnce: async (options) => readJsonOnce('/api/companion/creation/feed', options),
25
27
  readPulseOnce: async (options) => readJsonOnce('/api/companion/creation/pulse', options),
28
+ /** The eligibility board, as {@link PlaybookStanding} rows — what `wildo creation why` explains an unrun playbook from. */
29
+ readPlaybookBoard: (options) => CompanionClient.get('/api/companion/playbooks', options),
26
30
  readQuestions: (options) => CompanionClient.get('/api/companion/creation/questions', options),
27
31
  answer: (options, request) => CompanionClient.post('/api/companion/creation/questions/answer', request, options),
28
32
  /* Interview depth and proposed answers (#2129). Proposing writes nothing; depth is a dossier write. */
@@ -43,7 +47,11 @@ export const CreationConsoleClient = {
43
47
  derivePersona: (options, roleRef) => CompanionClient.post('/api/companion/expert-personas/derive', { roleRef }, options),
44
48
  acceptPersona: (options, roleRef) => CompanionClient.post('/api/companion/expert-personas/accept', { roleRef }, options),
45
49
  deliberate: (options, request) => CompanionClient.post('/api/companion/deliberations/run', request, options),
50
+ /* The logo (#2411): deliberate then accept in one call; refused over an accepted mark unless `redraw`. */
51
+ brandLogo: (options, redraw) => CompanionClient.post('/api/companion/brand/logo', redraw ? { redraw: true } : {}, options),
46
52
  acceptRun: (options, runId, force) => CompanionClient.post(`/api/companion/runs/writes/${encodeURIComponent(runId)}/accept`, force ? { force: true } : {}, options),
53
+ /* The creator's recorded answers, committed on their own (#2332). */
54
+ acceptDossier: (options) => CompanionClient.post('/api/companion/creation/dossier/accept', {}, options),
47
55
  };
48
56
  /**
49
57
  * Whether a feed line is the one a console REFERENCE names — a question id, a line id, a run id, a
@@ -54,6 +62,64 @@ export function feedLineNamesReference(line, reference) {
54
62
  return line.questionId === reference || line.lineId === reference || line.targetResourceId === reference
55
63
  || line.target?.runId === reference || line.taskRef === reference || line.playbookRef === reference;
56
64
  }
65
+ export function locateInterviewInQueue(playbookRef, unansweredQuestionRefs, queue) {
66
+ const compiled = getFrameworkKnowledgePlaybook(playbookRef)?.playbook;
67
+ const sharedByRef = new Map((compiled?.method?.elicitation?.questions ?? [])
68
+ .filter((question) => question.sameDecisionAs !== undefined)
69
+ .map((question) => [question.ref, question.sameDecisionAs]));
70
+ const asked = new Set(queue.questions
71
+ .filter((question) => question.kind === CreationConsoleQuestionKind.INTERVIEW && question.instanceKey === null && question.playbookRef !== null)
72
+ .flatMap((question) => question.fields.map((field) => `${question.playbookRef}#${field.ref}`)));
73
+ const askedNow = [];
74
+ const notAskedYet = [];
75
+ for (const ref of unansweredQuestionRefs) {
76
+ const shared = sharedByRef.get(ref);
77
+ if (asked.has(`${playbookRef}#${ref}`))
78
+ askedNow.push(ref);
79
+ else if (shared && asked.has(`${shared.playbookRef}#${shared.questionRef}`))
80
+ askedNow.push(`${ref} (asked as ${shared.playbookRef}#${shared.questionRef})`);
81
+ else
82
+ notAskedYet.push(ref);
83
+ }
84
+ return { askedNow, notAskedYet };
85
+ }
86
+ /**
87
+ * Where a playbook stands NOW: what holds it (from the board), and where each unanswered interview question
88
+ * stands (from the queue, see {@link locateInterviewInQueue}).
89
+ *
90
+ * The unmet preconditions lead when it cannot run. Saying its questions waited on the person sent them to
91
+ * `wildo creation answer`, which refuses a question the queue is not asking (app-creation-test-005,
92
+ * 2026-10-03). `interview` absent means the queue could not be read: the questions are then named without a
93
+ * claim about whether they are asked.
94
+ */
95
+ export function describePlaybookStanding(standing, hasRecentRun, interview) {
96
+ const unanswered = standing.unansweredQuestionRefs ?? [];
97
+ const onRecord = standing.wouldReplace ?? [];
98
+ const history = hasRecentRun ? '' : onRecord.length > 0 ? `, no recent run (on record: ${onRecord.join(', ')})` : ', no recent run and nothing on record';
99
+ const askedNow = interview?.askedNow ?? [];
100
+ const state = !standing.eligible ? 'blocked' : unanswered.length > 0 ? 'waiting for you' : 'eligible: nothing holds it';
101
+ const out = [`playbook ${standing.playbookRef} — ${state}${history}`];
102
+ if (!standing.eligible) {
103
+ for (const reason of standing.unmet.length > 0 ? standing.unmet : ['not eligible, and the board gave no reason'])
104
+ out.push(` unmet: ${reason}`);
105
+ }
106
+ if (unanswered.length === 0)
107
+ return out;
108
+ out.push(` its interview: ${unanswered.length} question(s) unanswered — ${unanswered.join(', ')}`);
109
+ if (interview === undefined) {
110
+ out.push(' could not read the question queue, so whether they are asked now is not known: wildo creation questions');
111
+ return out;
112
+ }
113
+ if (askedNow.length > 0)
114
+ out.push(` asked now: ${askedNow.join(', ')} → wildo creation questions`);
115
+ if (interview.notAskedYet.length > 0) {
116
+ out.push(standing.eligible
117
+ // Eligible and still not queued is a disagreement this command cannot explain; it says so rather than guess.
118
+ ? ` not in the question queue, although it can run: ${interview.notAskedYet.join(', ')}`
119
+ : ` not asked yet: ${interview.notAskedYet.join(', ')} — the queue asks ${interview.notAskedYet.length === 1 ? 'it' : 'them'} once nothing above holds this playbook`);
120
+ }
121
+ return out;
122
+ }
57
123
  /** One round of a playbook loop in words: what ran and what it landed or hit, what was refused, or why it stopped. */
58
124
  export function describeLoopStep(step) {
59
125
  const lines = [`round ${step.iteration}${step.stopRationale ? ` — stopped: ${step.stopRationale}` : ''}`];
@@ -67,8 +133,9 @@ export function describeLoopStep(step) {
67
133
  }
68
134
  async function readJsonOnce(path, options) {
69
135
  const response = await CompanionClient.request(path, { method: 'GET' }, options, CompanionRequestRetryPolicy.NO_RETRY);
136
+ // Typed, so a caller can tell "it answered no" from "nothing is there" without reading the message.
70
137
  if (!response.ok)
71
- throw new Error(`Companion API ${path}: ${response.status} ${response.statusText}`);
138
+ throw new CompanionRefusalError(`Companion API ${path}: ${response.status} ${response.statusText}`, response.status);
72
139
  return await response.json();
73
140
  }
74
141
  /**
@@ -86,27 +153,38 @@ export function describeFeedLineCompact(line) {
86
153
  * event. The first successful feed read only establishes what already happened (the session-start brief
87
154
  * reported it). A companion that cannot be reached is said once, and its return once. Runs until
88
155
  * `shouldStop` answers true (the command passes a function that never does).
156
+ *
157
+ * "Cannot be reached" has three meanings, and only one of them may say "start it" (#2394). Nothing
158
+ * listening means the companion is not running. A request that TIMES OUT means a process accepted the
159
+ * connection and did not answer in time: running and busy. An HTTP error status means it answered and
160
+ * said no, while starting or in diagnostics: running too. Telling a person or a supervisor to start a
161
+ * running companion ended in a restart that killed the runs it was busy with. On app-creation-test-005
162
+ * the monitor flipped to "not reachable" every one to two minutes through a build wave, on one live pid.
163
+ * The wording is the pulse's (`describePulseFailure`), so `wildo creation pulse` says the same thing.
89
164
  */
90
165
  export async function watchCreationEvents(port) {
91
166
  let seen = null;
92
167
  let lastPulseKey = null;
93
168
  let lastFeedAt = Number.NEGATIVE_INFINITY;
94
- let down = false;
169
+ /** Why the last pulse failed, or `null` while the companion answers. */
170
+ let failure = null;
95
171
  while (!port.shouldStop()) {
96
172
  let pulseKey = null;
97
173
  try {
98
174
  const pulse = await port.readPulse();
99
175
  pulseKey = `${pulse.sequence}:${pulse.runsInFlight}`;
100
- if (down) {
101
- port.say('Dev companion is back.');
102
- down = false;
176
+ if (failure !== null) {
177
+ port.say(failure === PulseFailure.UNREACHABLE ? 'Dev companion is back.' : 'Dev companion is answering again.');
178
+ failure = null;
103
179
  lastPulseKey = null;
104
180
  }
105
181
  }
106
- catch {
107
- if (!down)
108
- port.say('Dev companion is not reachable; waiting for it (start it with `wildo local dev`).');
109
- down = true;
182
+ catch (error) {
183
+ const next = classifyCompanionRequestFailure(error);
184
+ // Said once per state: a companion going from busy to stopped (or back) is news, the same one twice is not.
185
+ if (next !== failure)
186
+ port.say(`Dev companion ${describePulseFailure(next)} Waiting for it.`);
187
+ failure = next;
110
188
  }
111
189
  if (pulseKey !== null && (pulseKey !== lastPulseKey || port.now() - lastFeedAt >= port.feedFallbackMs)) {
112
190
  try {
@@ -130,6 +208,25 @@ export async function watchCreationEvents(port) {
130
208
  await port.sleep(port.pulseIntervalMs);
131
209
  }
132
210
  }
211
+ /**
212
+ * Why a request to the companion failed, in the pulse's vocabulary, so the watcher and `wildo creation
213
+ * pulse` give the same advice (#2394 review L1). A timeout — including one that fires while the body is
214
+ * read, after the headers — means a process is there and busy; an HTTP error status, or a body that does
215
+ * not parse, means it is there and answered something unusable; anything else (a refused or reset
216
+ * connection, no endpoint, no token) means nothing is listening.
217
+ */
218
+ export function classifyCompanionRequestFailure(error) {
219
+ if (error instanceof CompanionRequestTimeoutError)
220
+ return PulseFailure.SLOW;
221
+ if (error instanceof Error && (error.name === 'TimeoutError' || error.name === 'AbortError'))
222
+ return PulseFailure.SLOW;
223
+ if (error instanceof CompanionRefusalError)
224
+ return PulseFailure.REFUSED;
225
+ // `response.json()` on a body that is not JSON: it answered, so it is running.
226
+ if (error instanceof SyntaxError)
227
+ return PulseFailure.REFUSED;
228
+ return PulseFailure.UNREACHABLE;
229
+ }
133
230
  /** The Home sections whose lines are EVENTS a follower waits for; suggestions move with every edit and are not. */
134
231
  const FOLLOWED_SECTIONS = new Set([WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeSection.ASKED]);
135
232
  /**
@@ -197,6 +294,11 @@ export function describeFeedLine(line) {
197
294
  out.push(` ${error}`);
198
295
  break;
199
296
  }
297
+ case WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED:
298
+ // `subject` is when the build resumes; the task is the one whose run met the limit (#2388).
299
+ out.push(`PAUSED coding agent usage limit reached — resumes at ${line.subject ?? 'its reset'}${when}`);
300
+ out.push(` met by build task ${line.taskRef ?? line.targetResourceId}; no attempt is counted, and the build continues on its own`);
301
+ break;
200
302
  case WorkbenchCreationHomeLineKind.CLARIFICATION:
201
303
  out.push(`ASKED playbook ${subject} stopped on questions only you can answer${when}`);
202
304
  break;
@@ -293,8 +395,19 @@ export function describeQuestion(question) {
293
395
  out.push(` [${field.ref}] ${field.question}`);
294
396
  if (field.why)
295
397
  out.push(` why: ${field.why}`);
296
- if (field.options.length > 0)
398
+ if (field.options.length > 0 && field.optionDetails !== undefined) {
399
+ // A computed option is a summary; what it summarizes is printed under it, so it is never chosen blind (#2337).
400
+ out.push(' options:');
401
+ field.options.forEach((option, index) => {
402
+ out.push(` - ${option}`);
403
+ const detail = field.optionDetails?.[index];
404
+ if (detail)
405
+ out.push(` ${detail}`);
406
+ });
407
+ }
408
+ else if (field.options.length > 0) {
297
409
  out.push(` options: ${field.options.join(' | ')}`);
410
+ }
298
411
  }
299
412
  for (const command of describeAnswerCommand(question))
300
413
  out.push(` → ${command}`);
@@ -1 +1 @@
1
- {"version":3,"file":"creation-console.service.js","sourceRoot":"","sources":["../../../../../../src/services/companion/creation-console.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAU9B,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAA6B,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACjH,OAAO,EAAE,qCAAqC,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC/H,OAA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ationConsole_AnswerRequest,\n type CreationConsole_Feed,\n type CreationConsole_FeedLine,\n type CreationConsole_ProposalRequest,\n type CreationConsole_ProposalResponse,\n type CreationConsole_Pulse,\n type CreationConsole_Question,\n type CreationConsole_QuestionQueue,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n} from '@wildo-ai/platform-core-shared';\n\nimport { ApplicationInterviewDepth, MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';\nimport { ApplicationCreatorInputAnswerStanding, playbookInstanceId } from '@wildo-ai/saas-specifications/application-creation';\nimport { INTERVIEW_ANSWER_PROPOSER_REF } from '@wildo-ai/application-creation-runtime';\n\nimport { CompanionClient } from './companion-client.service';\nimport type { CreationRunReport } from './creation-run-report.models';\nimport type { ConsoleAcceptOutcome } from './build-console.service';\nimport { GitHelper } from './git-helper.service';\nimport { CompanionRequestRetryPolicy, type CompanionClientOptions } from './companion.schemas';\n\n/**\n * The CREATION CONSOLE on the CLI side — how a coding-agent session (or a person at a terminal)\n * follows what the companion did and answers what it asks.\n *\n * The companion is the master of creation; the console drives it and the workbench shows its state.\n * Everything here reads the companion's `/api/companion/creation/*` routes, which serve the SAME\n * creation-plane rows the workbench renders and answer through the SAME services — so this module\n * holds transport and wording only, never a fact of its own.\n */\nexport const CreationConsoleClient = {\n readFeed: (options: CompanionClientOptions): Promise<CreationConsole_Feed> =>\n CompanionClient.get<CreationConsole_Feed>('/api/companion/creation/feed', options),\n\n /**\n * The feed and the pulse in ONE attempt each (#1657): a background watcher and a session-start hook\n * must learn at once that the companion is down, not after the safe-read retries a person's command\n * gets. A refusal and a failed connection both throw, as `get` does.\n */\n readFeedOnce: async (options: CompanionClientOptions): Promise<CreationConsole_Feed> =>\n readJsonOnce<CreationConsole_Feed>('/api/companion/creation/feed', options),\n readPulseOnce: async (options: CompanionClientOptions): Promise<CreationConsole_Pulse> =>\n readJsonOnce<CreationConsole_Pulse>('/api/companion/creation/pulse', options),\n\n readQuestions: (options: CompanionClientOptions): Promise<CreationConsole_QuestionQueue> =>\n CompanionClient.get<CreationConsole_QuestionQueue>('/api/companion/creation/questions', options),\n\n answer: (options: CompanionClientOptions, request: CreationConsole_AnswerRequest): Promise<CreationConsole_AnswerOutcome> =>\n CompanionClient.post<CreationConsole_AnswerOutcome>('/api/companion/creation/questions/answer', request, options),\n\n /* Interview depth and proposed answers (#2129). Proposing writes nothing; depth is a dossier write. */\n setInterviewDepth: (options: CompanionClientOptions, interviewDepth: ApplicationInterviewDepth) =>\n CompanionClient.post<{ readonly interviewDepth: string; readonly packageRelativePath: string }>('/api/companion/creation/interview/depth', { interviewDepth }, options),\n proposeInterviewAnswers: (options: CompanionClientOptions, request: CreationConsole_ProposalRequest): Promise<CreationConsole_ProposalResponse> =>\n CompanionClient.post<CreationConsole_ProposalResponse>('/api/companion/creation/interview/proposals', request, options),\n\n /* The write register (#1652): what each playbook run wrote, its diff, revert and accept. */\n writes: (options: CompanionClientOptions) =>\n CompanionClient.get<{ readonly runs: ReadonlyArray<{ readonly runId: string; readonly playbookRef: string; readonly at: string; readonly files: ReadonlyArray<{ readonly path: string; readonly existedBefore: boolean }> }> }>('/api/companion/runs/writes', options),\n diff: (options: CompanionClientOptions, runId: string) =>\n CompanionClient.get<{ readonly runId: string; readonly playbookRef: string; readonly at: string; readonly files: ReadonlyArray<{ readonly path: string; readonly diverged: boolean; readonly diff: string }> }>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/diff`, options),\n revert: (options: CompanionClientOptions, runId: string, force: boolean) =>\n // `refusedLaterRun` (#1614, #1666): files a LATER run landed on, never reverted — not even under force.\n // Both refusal lists OPTIONAL: a companion older than a field omits it, and the renderer reads it so.\n CompanionClient.post<{\n readonly reverted: readonly string[];\n readonly refusedDiverged?: readonly string[];\n readonly refusedLaterRun?: ReadonlyArray<{ readonly path: string; readonly runId: string }>;\n }>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/revert`, force ? { force: true } : {}, options),\n /* The run report and the intervention ledger (#2231): read-only, plus the one thing it asks — a reason. */\n report: (options: CompanionClientOptions): Promise<CreationRunReport> =>\n CompanionClient.get<CreationRunReport>('/api/companion/creation/report', options),\n stateInterventionReason: (options: CompanionClientOptions, interventionId: string, reason: string) =>\n CompanionClient.post<{ readonly interventionId: string; readonly statedAt: string }>(\n `/api/companion/creation/interventions/${encodeURIComponent(interventionId)}/reason`, { reason }, options),\n loop: (options: CompanionClientOptions, request: { readonly goal: string; readonly maximumIterations: number; readonly fanOut?: number; readonly skipPreflight?: boolean }) =>\n CompanionClient.post<ConsoleLoopResult>('/api/companion/playbooks/loop', request, options),\n /* Reviewer charters and deliberations (#1656): the console door to what `journey-run` taught as raw routes. */\n derivePersona: (options: CompanionClientOptions, roleRef: string) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/expert-personas/derive', { roleRef }, options),\n acceptPersona: (options: CompanionClientOptions, roleRef: string) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/expert-personas/accept', { roleRef }, options),\n deliberate: (options: CompanionClientOptions, request: Record<string, unknown>) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/deliberations/run', request, options),\n acceptRun: (options: CompanionClientOptions, runId: string, force: boolean) =>\n CompanionClient.post<ConsoleAcceptOutcome>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/accept`, force ? { force: true } : {}, options),\n};\n\n/**\n * Whether a feed line is the one a console REFERENCE names — a question id, a line id, a run id, a\n * build task or a playbook. Every identifier the console prints resolves through this one predicate,\n * so `wildo creation why` and `wildo workbench open` accept exactly the same references.\n */\nexport function feedLineNamesReference(line: CreationConsole_FeedLine, reference: string): boolean {\n return line.questionId === reference || line.lineId === reference || line.targetResourceId === reference\n || line.target?.runId === reference || line.taskRef === reference || line.playbookRef === reference;\n}\n\n/** What `POST /playbooks/loop` answers — only the fields the console prints; `--json` prints the rest. */\nexport interface ConsoleLoopResult {\n readonly stoppedBecause: string;\n readonly steps: ReadonlyArray<{\n readonly iteration: number;\n readonly lanes: ReadonlyArray<{ readonly playbookRef: string; readonly rationale: string; readonly landed?: readonly string[]; readonly failure?: string }>;\n readonly droppedLanes: ReadonlyArray<{ readonly playbookRef: string; readonly reason: string }>;\n readonly stopRationale?: string;\n }>;\n}\n\n/** One round of a playbook loop in words: what ran and what it landed or hit, what was refused, or why it stopped. */\nexport function describeLoopStep(step: ConsoleLoopResult['steps'][number]): string[] {\n const lines = [`round ${step.iteration}${step.stopRationale ? ` — stopped: ${step.stopRationale}` : ''}`];\n for (const lane of step.lanes) {\n lines.push(` ${lane.playbookRef} — ${lane.failure ? `failed: ${lane.failure}` : `landed ${lane.landed?.join(', ') || 'nothing'}`}`);\n lines.push(` why this one: ${lane.rationale}`);\n }\n for (const dropped of step.droppedLanes) lines.push(` not run: ${dropped.playbookRef} — ${dropped.reason}`);\n return lines;\n}\n\nasync function readJsonOnce<T>(path: string, options: CompanionClientOptions): Promise<T> {\n const response = await CompanionClient.request(path, { method: 'GET' }, options, CompanionRequestRetryPolicy.NO_RETRY);\n if (!response.ok) throw new Error(`Companion API ${path}: ${response.status} ${response.statusText}`);\n return await response.json() as T;\n}\n\n/**\n * One feed line as ONE line of text — what the background watcher prints, because each line it prints\n * becomes one notification in the session (#1657). The same words as {@link describeFeedLine}, joined.\n */\nexport function describeFeedLineCompact(line: CreationConsole_FeedLine): string {\n return describeFeedLine(line).map((text) => text.trim()).join(' · ');\n}\n\n/**\n * The console's PUSH loop (#1657), behind `wildo creation watch` — separated from the command so its\n * behaviour is pinned without a companion or a clock.\n *\n * Polls the pulse; reads the feed when the pulse moved or `feedFallbackMs` passed; says ONE line per new\n * event. The first successful feed read only establishes what already happened (the session-start brief\n * reported it). A companion that cannot be reached is said once, and its return once. Runs until\n * `shouldStop` answers true (the command passes a function that never does).\n */\nexport async function watchCreationEvents(port: {\n readonly readPulse: () => Promise<CreationConsole_Pulse>;\n readonly readFeed: () => Promise<CreationConsole_Feed>;\n readonly say: (text: string) => void;\n readonly sleep: (ms: number) => Promise<void>;\n readonly now: () => number;\n readonly shouldStop: () => boolean;\n readonly pulseIntervalMs: number;\n readonly feedFallbackMs: number;\n}): Promise<void> {\n let seen: Set<string> | null = null;\n let lastPulseKey: string | null = null;\n let lastFeedAt = Number.NEGATIVE_INFINITY;\n let down = false;\n while (!port.shouldStop()) {\n let pulseKey: string | null = null;\n try {\n const pulse = await port.readPulse();\n pulseKey = `${pulse.sequence}:${pulse.runsInFlight}`;\n if (down) {\n port.say('Dev companion is back.');\n down = false;\n lastPulseKey = null;\n }\n } catch {\n if (!down) port.say('Dev companion is not reachable; waiting for it (start it with `wildo local dev`).');\n down = true;\n }\n if (pulseKey !== null && (pulseKey !== lastPulseKey || port.now() - lastFeedAt >= port.feedFallbackMs)) {\n try {\n const feed = await port.readFeed();\n lastFeedAt = port.now();\n if (seen === null) {\n seen = new Set(feed.lines.map(feedLineSignature));\n } else {\n for (const line of newFollowedLines(feed.lines, seen)) {\n seen.add(feedLineSignature(line));\n port.say(describeFeedLineCompact(line));\n }\n }\n lastPulseKey = pulseKey;\n } catch {\n /* The pulse answered and the feed did not: try again next tick without announcing anything. */\n }\n }\n await port.sleep(port.pulseIntervalMs);\n }\n}\n\n/** The Home sections whose lines are EVENTS a follower waits for; suggestions move with every edit and are not. */\nconst FOLLOWED_SECTIONS: ReadonlySet<string> = new Set([WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeSection.ASKED]);\n\n/**\n * A line's SIGNATURE — what makes it \"the same line\" to a follower. A line whose facts changed (a\n * dispatch that became acceptable, a run that failed) is news again; the attached row is excluded,\n * because its timestamps move on every read without anything having happened.\n */\nexport function feedLineSignature(line: CreationConsole_FeedLine): string {\n return JSON.stringify([line.lineId, line.at, line.failed, line.acceptable, line.needsAnswers, line.stuckReason, line.questionId]);\n}\n\n/**\n * The followed lines that are NEW since `seen` — the one comparison `--follow` makes. `seen` is the\n * set of signatures already printed, so a line printed once is never printed twice, however often\n * the feed is read.\n */\nexport function newFollowedLines(lines: readonly CreationConsole_FeedLine[], seen: ReadonlySet<string>): CreationConsole_FeedLine[] {\n return lines.filter((line) => FOLLOWED_SECTIONS.has(line.section) && !seen.has(feedLineSignature(line)));\n}\n\nfunction stringField(row: Record<string, unknown> | null, field: string): string | null {\n const value = row?.[field];\n return typeof value === 'string' && value.length > 0 ? value : null;\n}\n\n/**\n * One feed line in words. The kind vocabulary is the companion's (`WorkbenchCreationHomeLineKind`);\n * an unknown kind is printed as its raw value rather than guessed at, so a newer companion's line is\n * visibly unfamiliar instead of quietly misdescribed.\n */\nexport function describeFeedLine(line: CreationConsole_FeedLine): string[] {\n const subject = line.playbookRef ?? line.taskRef ?? line.subject ?? line.targetResourceId;\n const when = line.at ? ` (${line.at})` : '';\n const out: string[] = [];\n switch (line.kind) {\n case WorkbenchCreationHomeLineKind.RUN_COMPLETED: {\n out.push(`${line.failed ? 'REFUSED' : 'completed'} playbook ${subject}${when}`);\n const verdict = stringField(line.target, 'judgeOverall');\n if (verdict) out.push(` judge: ${verdict}`);\n /* The criteria that did not pass are what a console acts on; a PASS needs no rationale read out. */\n const criteria = line.target?.judgeCriteria;\n if (Array.isArray(criteria)) {\n for (const criterion of criteria as { criterionRef?: unknown; verdict?: unknown; rationale?: unknown }[]) {\n if (criterion.verdict === MetaWorkflow_EvaluationVerdict.PASS || typeof criterion.criterionRef !== 'string') continue;\n out.push(` ${String(criterion.verdict)} ${criterion.criterionRef}: ${String(criterion.rationale ?? '')}`);\n }\n }\n const skipped = stringField(line.target, 'judgeSkipped');\n if (skipped) out.push(` judge did not run: ${skipped}`);\n const error = stringField(line.target, 'error');\n if (error) out.push(` ${error}`);\n break;\n }\n case WorkbenchCreationHomeLineKind.RUN_INTERRUPTED:\n out.push(`interrupted playbook ${subject}${when} — running it again resumes it`);\n break;\n case WorkbenchCreationHomeLineKind.DISPATCH_SETTLED: {\n const objective = stringField(line.target, 'objective');\n out.push(`${line.failed ? 'FAILED' : 'finished'} build task ${subject}${when}${objective ? ` — ${objective}` : ''}`);\n if (line.acceptable) out.push(` its writes wait to be committed → wildo build accept ${line.taskRef ?? subject}`);\n const error = stringField(line.target, 'error');\n if (error) out.push(` ${error}`);\n break;\n }\n case WorkbenchCreationHomeLineKind.CLARIFICATION:\n out.push(`ASKED playbook ${subject} stopped on questions only you can answer${when}`);\n break;\n case WorkbenchCreationHomeLineKind.PARKED_QUESTION:\n out.push(`ASKED the coding run for ${subject} is parked on a question${when}`);\n break;\n case WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT:\n out.push(`ASKED governed document ${subject} still needs facts (answer them in the workbench)`);\n break;\n case WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN:\n out.push(`ASKED the build plan is stuck at ${subject}: ${line.stuckReason ?? 'no reason recorded'}`);\n break;\n case WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN:\n out.push(`next build task ${line.taskRef ?? subject}${line.subject ? ` — ${line.subject}` : ''}`);\n break;\n case WorkbenchCreationHomeLineKind.PRODUCE_MISSING:\n out.push(`next playbook ${subject} would produce a missing artifact${line.needsAnswers ? ' (it has questions for you first)' : ''}`);\n break;\n case WorkbenchCreationHomeLineKind.REFRESH_STALE:\n out.push(`next playbook ${subject} would refresh a stale artifact${line.needsAnswers ? ' (it has questions for you first)' : ''}`);\n break;\n default:\n out.push(`${line.kind} ${subject}${when}`);\n }\n if (line.questionId) out.push(` question: ${line.questionId} → wildo creation questions`);\n return out;\n}\n\n/** The `wildo creation answer` invocation that answers a question, for a reader to copy. */\nexport function describeAnswerCommand(question: CreationConsole_Question): string[] {\n if (question.actions.length === 0) return [];\n const revision = question.revision !== null ? ` --revision ${question.revision}` : '';\n const commands: string[] = [];\n if (question.actions.includes(CreationConsoleAnswerAction.ANSWER)) {\n commands.push(question.fields.length === 1\n /*\n * `--person` in the hint: the command is copied by agents as often as by people, and from inside an\n * agent session an unattributed answer is refused (#1658). For a person at a terminal it names what\n * the default would have been anyway.\n */\n ? `wildo creation answer ${question.questionId}${revision} --person \"<answer>\"`\n : `wildo creation answer ${question.questionId}${revision} --person --answer ${question.fields.map((field) => `${field.ref}=\"<answer>\"`).join(' ')}`);\n }\n /* An interview question the person does not know (#2129): have it proposed, then keep the proposal as an assumption. */\n if (question.kind === CreationConsoleQuestionKind.INTERVIEW && question.proposable === true && question.assumedAnswer === null && question.playbookRef !== null) {\n commands.push(`wildo creation propose ${question.playbookRef}${question.instanceKey ? ` --instance ${question.instanceKey}` : ''} --question ${question.fields[0]!.ref}`);\n }\n if (question.actions.includes(CreationConsoleAnswerAction.DECLINE)) commands.push(`wildo creation answer ${question.questionId}${revision} --decline`);\n if (question.actions.includes(CreationConsoleAnswerAction.CANCEL)) commands.push(`wildo creation answer ${question.questionId}${revision} --cancel`);\n return commands;\n}\n\nconst QUESTION_KIND_WORDS: Readonly<Record<CreationConsoleQuestionKind, string>> = {\n [CreationConsoleQuestionKind.CLARIFICATION]: 'a playbook run stopped to ask',\n [CreationConsoleQuestionKind.PARKED_CODING_QUESTION]: 'a coding run is parked on a question',\n [CreationConsoleQuestionKind.INTERVIEW]: 'a step can run once this is answered',\n [CreationConsoleQuestionKind.GOVERNANCE_FACT]: 'a drafted governed document needs this fact — answer it in the workbench',\n};\n\n/** One queued question in words, followed by the command(s) that answer it. */\nexport function describeQuestion(question: CreationConsole_Question): string[] {\n const step = question.playbookRef === null ? null : playbookInstanceId(question.playbookRef, question.instanceKey ?? undefined);\n const about = step ?? question.taskRef ?? question.definitionRef ?? '';\n const out: string[] = [`${question.questionId} — ${QUESTION_KIND_WORDS[question.kind]}${about ? ` (${about})` : ''}`];\n if (question.producingFamily) out.push(` producing: ${question.producingFamily}`);\n if (question.dryRun === true) out.push(' dry run: answering writes nothing');\n if (question.routedToUserId) out.push(' asked of the person who started its run: only they may answer it — in the workbench, signed in as them');\n if (question.resumable === false) out.push(' the run cannot re-enter its session: answering starts a new one that restates the task');\n if (question.affectsFamilies.length > 0) out.push(` an answer reaches: ${question.affectsFamilies.join(', ')}`);\n if (question.kind === CreationConsoleQuestionKind.INTERVIEW) {\n /* #2129: whether a simple interview asks it, and whether a proposal can stand in when the person does not know. */\n if (question.askedInSimpleInterview === false) out.push(' detail: a simple interview proposes it instead of asking');\n if (question.proposable === false) out.push(' only the person can answer it: it is never proposed');\n if (question.regulatedDomain === true) {\n // Only ever assumed on review (an unattended round never assumes one), so a kept one is named when revisited.\n out.push(question.assumedAnswer !== null\n ? ' regulated domain: kept on review — name it to the person when revisiting it'\n : ' regulated domain: name any proposed answer to the person before keeping it');\n }\n if (question.assumedAnswer !== null) out.push(` assumed (to revisit): ${question.assumedAnswer} — answering records the person's own answer in its place`);\n if (question.assumptionRationale) out.push(` because: ${question.assumptionRationale}`);\n }\n for (const field of question.fields) {\n out.push(` [${field.ref}] ${field.question}`);\n if (field.why) out.push(` why: ${field.why}`);\n if (field.options.length > 0) out.push(` options: ${field.options.join(' | ')}`);\n }\n for (const command of describeAnswerCommand(question)) out.push(` → ${command}`);\n return out;\n}\n\n/**\n * Build the answer request from the CLI's inputs. Throws a sentence when the inputs do not make one\n * request — the companion refuses the same things, but a refusal before the round trip names the\n * flag to change.\n *\n * `value` is the positional answer, for a question with ONE field; `pairs` are `--answer ref=value`.\n */\n/** Parse `ref=value` tokens; `flag` names the flag in the error. */\nfunction parseAnswerPairs(pairs: readonly string[], flag: string): { ref: string; value: string }[] {\n return pairs.map((pair) => {\n const separator = pair.indexOf('=');\n if (separator <= 0) {\n /* The flags are variadic: an answer typed AFTER one is taken as one more pair — the likelier cause of a pair with no ref. */\n throw new Error(`\"${pair}\" is not ref=value. \\`${flag}\\` takes every token after it, so give a positional answer BEFORE \\`${flag}\\`, `\n + `or answer every question with \\`${flag} ref=value\\`.`);\n }\n return { ref: pair.slice(0, separator), value: pair.slice(separator + 1) };\n });\n}\n\n/**\n * The only author an agent may record for an answer it DERIVED itself. A derived answer is by\n * definition not the person's, so the prefix is enforced rather than trusted.\n */\nexport const AGENT_ANSWER_AUTHOR_PREFIX = 'agent:';\n\nexport function buildAnswerRequest(input: {\n readonly questionId: string;\n readonly revision?: string;\n readonly value?: string;\n /** `--answer ref=value`: answers the PERSON gave (authored by `answeredByRef`). */\n readonly pairs: readonly string[];\n /** `--derived ref=value`: answers an AGENT derived on its own (authored by `derivedByRef`). */\n readonly derivedPairs?: readonly string[];\n readonly derivedByRef?: string;\n /**\n * The positional answer is a PROPOSAL the person let stand because they did not know (#2129): recorded as\n * ASSUMED, authored by the companion's proposer, with the proposer's reason. Interview questions only.\n */\n readonly assumed?: boolean;\n readonly assumptionRationale?: string;\n readonly decline: boolean;\n readonly cancel: boolean;\n /** The author of the person's answers — and the request's default author. */\n readonly answeredByRef?: string;\n /** The question as the queue serves it, to resolve a positional answer's field ref. */\n readonly question: CreationConsole_Question | null;\n}): CreationConsole_AnswerRequest {\n const parsed = parseCreationConsoleQuestionId(input.questionId);\n if (!parsed) throw new Error(`\"${input.questionId}\" is not a question id — copy one from \\`wildo creation questions\\`.`);\n if (input.decline && input.cancel) throw new Error('Pass --decline or --cancel, not both.');\n const base = {\n questionId: input.questionId,\n ...(input.revision ? { revision: input.revision } : {}),\n ...(input.answeredByRef ? { answeredByRef: input.answeredByRef } : {}),\n };\n const personAnswers = parseAnswerPairs(input.pairs, '--answer');\n const derived = parseAnswerPairs(input.derivedPairs ?? [], '--derived');\n if (derived.length > 0) {\n if (!input.derivedByRef?.startsWith(AGENT_ANSWER_AUTHOR_PREFIX) || input.derivedByRef.length === AGENT_ANSWER_AUTHOR_PREFIX.length) {\n throw new Error(`A derived answer names the agent that derived it: --derived-by ${AGENT_ANSWER_AUTHOR_PREFIX}<name>.`);\n }\n }\n if (input.assumptionRationale !== undefined && input.assumed !== true) throw new Error('--rationale explains an assumption: pass it with --assumed.');\n if (input.assumed === true) {\n if (parsed.kind !== CreationConsoleQuestionKind.INTERVIEW) {\n throw new Error('--assumed records a proposed interview answer; only interview questions take one. A playbook round takes --decline to let the run decide.');\n }\n if (input.value === undefined || personAnswers.length > 0 || derived.length > 0 || input.decline || input.cancel) {\n throw new Error('--assumed takes the proposed answer positionally, and nothing else: wildo creation answer <questionId> --assumed \"<value>\" --rationale \"<why>\".');\n }\n if (!input.question) throw new Error(`Nothing waits under \"${input.questionId}\" now — read \\`wildo creation questions\\` again.`);\n return {\n ...base,\n action: CreationConsoleAnswerAction.ANSWER,\n answers: [{\n ref: input.question.fields[0]!.ref,\n value: input.value,\n /* The proposer is the author: the person let it stand, they did not decide it. */\n answeredByRef: INTERVIEW_ANSWER_PROPOSER_REF,\n standing: ApplicationCreatorInputAnswerStanding.ASSUMED,\n ...(input.assumptionRationale !== undefined ? { assumptionRationale: input.assumptionRationale } : {}),\n }],\n };\n }\n if (input.cancel) {\n if (input.value !== undefined || personAnswers.length > 0 || derived.length > 0) throw new Error('--cancel carries no answer.');\n return { ...base, action: CreationConsoleAnswerAction.CANCEL };\n }\n if (input.value !== undefined) {\n if (personAnswers.length > 0 || derived.length > 0) throw new Error('Give the answer either positionally or with --answer / --derived, not both.');\n if (!input.question) throw new Error(`Nothing waits under \"${input.questionId}\" now — read \\`wildo creation questions\\` again.`);\n if (input.question.fields.length !== 1) {\n throw new Error(`\"${input.questionId}\" asks ${input.question.fields.length} questions; answer each with --answer ${input.question.fields.map((field) => `${field.ref}=…`).join(' ')}.`);\n }\n personAnswers.push({ ref: input.question.fields[0]!.ref, value: input.value });\n }\n /* Each answer carries its author, so a round an agent and the person answered together records both (#1658). */\n const answers = [\n ...personAnswers.map((answer) => ({ ...answer, ...(input.answeredByRef ? { answeredByRef: input.answeredByRef } : {}) })),\n ...derived.map((answer) => ({ ...answer, answeredByRef: input.derivedByRef! })),\n ];\n if (answers.some((answer) => answer.value.trim().length === 0)) throw new Error('An answer cannot be empty.');\n if (new Set(answers.map((answer) => answer.ref)).size !== answers.length) throw new Error('Each question is answered once.');\n if (input.decline) {\n /* \"These I answered, decide the rest\" — the run decides only what is left unanswered. */\n return { ...base, action: CreationConsoleAnswerAction.DECLINE, ...(answers.length > 0 ? { answers } : {}) };\n }\n if (answers.length === 0) throw new Error('No answer given: pass it positionally, with --answer / --derived ref=value, or use --decline / --cancel.');\n return { ...base, action: CreationConsoleAnswerAction.ANSWER, answers };\n}\n\n/**\n * Whether this process was started by a coding agent (Claude Code sets `CLAUDECODE=1`; agents following\n * the emerging cross-agent convention set `AI_AGENT`). Used for ONE decision: an answer sent from inside\n * an agent session must say whose it is, because there the git identity is the person's and the typist\n * is the agent — defaulting would record the agent's derivation as the person's decision (#1658).\n */\nexport function isRunningInsideCodingAgent(env: NodeJS.ProcessEnv = process.env): boolean {\n return env.CLAUDECODE === '1' || (typeof env.AI_AGENT === 'string' && env.AI_AGENT.trim().length > 0);\n}\n\n/**\n * Who answers, when the caller does not say: the workspace's git identity — the author of the commit\n * that will accept the answer, which is the provenance this repository already trusts for an\n * acceptance (`one-source-of-truth.md` rule 7). `null` when git has none configured.\n *\n * PREFIXED `git:`, like the `agent:<name>` an agent answering on its own sends, because the same\n * `answeredByRef` field also holds the workbench's signed-in user ids: a reader of the dossier can then\n * tell which door an answer came through and what kind of identity it names.\n */\nexport async function readGitIdentity(repositoryRoot: string): Promise<string | null> {\n try {\n const { stdout } = await GitHelper.runGit(repositoryRoot, ['config', 'user.email']);\n const email = stdout.trim();\n return email.length > 0 ? `git:${email}` : null;\n } catch {\n return null;\n }\n}\n\n/**\n * A proposal response in words (#2129): each proposed answer, why, and the command that keeps it as an\n * assumption. What could not be proposed is named, for the person to answer.\n */\nexport function describeInterviewProposals(response: CreationConsole_ProposalResponse): string[] {\n const out: string[] = [];\n if (response.proposals.length === 0 && response.unproposed.length === 0) {\n return [`Nothing to propose for ${response.playbookRef}: every question it would propose is answered, or no interview depth is chosen yet (wildo creation depth).`];\n }\n for (const proposal of response.proposals) {\n out.push(`[${proposal.questionRef}] ${proposal.question}${proposal.regulatedDomain ? ' (REGULATED DOMAIN — name it to the person before keeping it)' : ''}`, ` proposed: ${proposal.value}`, ` because: ${proposal.rationale}`);\n if (proposal.questionId !== null) {\n out.push(` → keep it: wildo creation answer ${proposal.questionId} --assumed ${JSON.stringify(proposal.value)} --rationale ${JSON.stringify(proposal.rationale)}`);\n }\n }\n for (const missing of response.unproposed) out.push(`[${missing.questionRef}] could not be proposed (${missing.reason}) — ask the person.`);\n return out;\n}\n"]}
1
+ {"version":3,"file":"creation-console.service.js","sourceRoot":"","sources":["../../../../src/services/companion/creation-console.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAU9B,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAA6B,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACjH,OAAO,EAAE,qCAAqC,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC/H,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAA+B,MAAM,qBAAqB,CAAC;AAS/F;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAE,CAAC,OAA+B,EAAiC,EAAE,CAC3E,eAAe,CAAC,GAAG,CAAuB,8BAA8B,EAAE,OAAO,CAAC;IAEpF;;;;OAIG;IACH,YAAY,EAAE,KAAK,EAAE,OAA+B,EAAiC,EAAE,CACrF,YAAY,CAAuB,8BAA8B,EAAE,OAAO,CAAC;IAC7E,aAAa,EAAE,KAAK,EAAE,OAA+B,EAAkC,EAAE,CACvF,YAAY,CAAwB,+BAA+B,EAAE,OAAO,CAAC;IAE/E,2HAA2H;IAC3H,iBAAiB,EAAE,CAAC,OAA+B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AAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,QAA0C;IACnF,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,CAAC,0BAA0B,QAAQ,CAAC,WAAW,4GAA4G,CAAC,CAAC;IACtK,CAAC;IACD,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC1C,GAAG,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,WAAW,KAAK,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,gEAAgE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,eAAe,QAAQ,CAAC,KAAK,EAAE,EAAE,cAAc,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;QACnO,IAAI,QAAQ,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,sCAAsC,QAAQ,CAAC,UAAU,cAAc,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtK,CAAC;IACH,CAAC;IACD,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,UAAU;QAAE,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,WAAW,4BAA4B,OAAO,CAAC,MAAM,qBAAqB,CAAC,CAAC;IAC5I,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {\n CreationConsoleAnswerAction,\n CreationConsoleQuestionKind,\n parseCreationConsoleQuestionId,\n type CreationConsole_AnswerOutcome,\n type CreationConsole_AnswerRequest,\n type CreationConsole_Feed,\n type CreationConsole_FeedLine,\n type CreationConsole_ProposalRequest,\n type CreationConsole_ProposalResponse,\n type CreationConsole_Pulse,\n type CreationConsole_Question,\n type CreationConsole_QuestionQueue,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n} from '@wildo-ai/platform-core-shared';\n\nimport { ApplicationInterviewDepth, MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';\nimport { ApplicationCreatorInputAnswerStanding, playbookInstanceId } from '@wildo-ai/saas-specifications/application-creation';\nimport { INTERVIEW_ANSWER_PROPOSER_REF } from '@wildo-ai/application-creation-runtime';\nimport { getFrameworkKnowledgePlaybook } from '@wildo-ai/framework-knowledge';\n\nimport { CompanionClient, CompanionRefusalError, CompanionRequestTimeoutError } from './companion-client.service';\nimport { PulseFailure, describePulseFailure } from './console-fast-path';\nimport type { CreationRunReport } from './creation-run-report.models';\nimport type { ConsoleAcceptOutcome } from './build-console.service';\nimport { GitHelper } from './git-helper.service';\nimport { CompanionRequestRetryPolicy, type CompanionClientOptions } from './companion.schemas';\n\n/** What `POST /brand/logo` answers: the panel's winner, what was promoted into the specification, and its warnings. */\nexport interface ConsoleBrandLogoOutcome {\n readonly redrawn: boolean;\n readonly deliberation: { readonly recordPath: string; readonly staged: { readonly winnerRef: string }; readonly warnings: readonly string[] };\n readonly accept: { readonly promotedFiles: readonly string[]; readonly resolvedAssetsModulePath: string; readonly warnings: readonly string[] };\n}\n\n/**\n * The CREATION CONSOLE on the CLI side — how a coding-agent session (or a person at a terminal)\n * follows what the companion did and answers what it asks.\n *\n * The companion is the master of creation; the console drives it and the workbench shows its state.\n * Everything here reads the companion's `/api/companion/creation/*` routes, which serve the SAME\n * creation-plane rows the workbench renders and answer through the SAME services — so this module\n * holds transport and wording only, never a fact of its own.\n */\nexport const CreationConsoleClient = {\n readFeed: (options: CompanionClientOptions): Promise<CreationConsole_Feed> =>\n CompanionClient.get<CreationConsole_Feed>('/api/companion/creation/feed', options),\n\n /**\n * The feed and the pulse in ONE attempt each (#1657): a background watcher and a session-start hook\n * must learn at once that the companion is down, not after the safe-read retries a person's command\n * gets. A refusal and a failed connection both throw, as `get` does.\n */\n readFeedOnce: async (options: CompanionClientOptions): Promise<CreationConsole_Feed> =>\n readJsonOnce<CreationConsole_Feed>('/api/companion/creation/feed', options),\n readPulseOnce: async (options: CompanionClientOptions): Promise<CreationConsole_Pulse> =>\n readJsonOnce<CreationConsole_Pulse>('/api/companion/creation/pulse', options),\n\n /** The eligibility board, as {@link PlaybookStanding} rows — what `wildo creation why` explains an unrun playbook from. */\n readPlaybookBoard: (options: CompanionClientOptions): Promise<{ readonly playbooks: readonly PlaybookStanding[] }> =>\n CompanionClient.get<{ readonly playbooks: readonly PlaybookStanding[] }>('/api/companion/playbooks', options),\n\n readQuestions: (options: CompanionClientOptions): Promise<CreationConsole_QuestionQueue> =>\n CompanionClient.get<CreationConsole_QuestionQueue>('/api/companion/creation/questions', options),\n\n answer: (options: CompanionClientOptions, request: CreationConsole_AnswerRequest): Promise<CreationConsole_AnswerOutcome> =>\n CompanionClient.post<CreationConsole_AnswerOutcome>('/api/companion/creation/questions/answer', request, options),\n\n /* Interview depth and proposed answers (#2129). Proposing writes nothing; depth is a dossier write. */\n setInterviewDepth: (options: CompanionClientOptions, interviewDepth: ApplicationInterviewDepth) =>\n CompanionClient.post<{ readonly interviewDepth: string; readonly packageRelativePath: string }>('/api/companion/creation/interview/depth', { interviewDepth }, options),\n proposeInterviewAnswers: (options: CompanionClientOptions, request: CreationConsole_ProposalRequest): Promise<CreationConsole_ProposalResponse> =>\n CompanionClient.post<CreationConsole_ProposalResponse>('/api/companion/creation/interview/proposals', request, options),\n\n /* The write register (#1652): what each playbook run wrote, its diff, revert and accept. */\n writes: (options: CompanionClientOptions) =>\n CompanionClient.get<{ readonly runs: ReadonlyArray<{ readonly runId: string; readonly playbookRef: string; readonly at: string; readonly files: ReadonlyArray<{ readonly path: string; readonly existedBefore: boolean }> }> }>('/api/companion/runs/writes', options),\n diff: (options: CompanionClientOptions, runId: string) =>\n CompanionClient.get<{ readonly runId: string; readonly playbookRef: string; readonly at: string; readonly files: ReadonlyArray<{ readonly path: string; readonly diverged: boolean; readonly diff: string }> }>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/diff`, options),\n revert: (options: CompanionClientOptions, runId: string, force: boolean) =>\n // `refusedLaterRun` (#1614, #1666): files a LATER run landed on, never reverted — not even under force.\n // Both refusal lists OPTIONAL: a companion older than a field omits it, and the renderer reads it so.\n CompanionClient.post<{\n readonly reverted: readonly string[];\n readonly refusedDiverged?: readonly string[];\n readonly refusedLaterRun?: ReadonlyArray<{ readonly path: string; readonly runId: string }>;\n }>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/revert`, force ? { force: true } : {}, options),\n /* The run report and the intervention ledger (#2231): read-only, plus the one thing it asks — a reason. */\n report: (options: CompanionClientOptions): Promise<CreationRunReport> =>\n CompanionClient.get<CreationRunReport>('/api/companion/creation/report', options),\n stateInterventionReason: (options: CompanionClientOptions, interventionId: string, reason: string) =>\n CompanionClient.post<{ readonly interventionId: string; readonly statedAt: string }>(\n `/api/companion/creation/interventions/${encodeURIComponent(interventionId)}/reason`, { reason }, options),\n loop: (options: CompanionClientOptions, request: { readonly goal: string; readonly maximumIterations: number; readonly fanOut?: number; readonly skipPreflight?: boolean }) =>\n CompanionClient.post<ConsoleLoopResult>('/api/companion/playbooks/loop', request, options),\n /* Reviewer charters and deliberations (#1656): the console door to what `journey-run` taught as raw routes. */\n derivePersona: (options: CompanionClientOptions, roleRef: string) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/expert-personas/derive', { roleRef }, options),\n acceptPersona: (options: CompanionClientOptions, roleRef: string) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/expert-personas/accept', { roleRef }, options),\n deliberate: (options: CompanionClientOptions, request: Record<string, unknown>) =>\n CompanionClient.post<Record<string, unknown>>('/api/companion/deliberations/run', request, options),\n /* The logo (#2411): deliberate then accept in one call; refused over an accepted mark unless `redraw`. */\n brandLogo: (options: CompanionClientOptions, redraw: boolean) =>\n CompanionClient.post<ConsoleBrandLogoOutcome>('/api/companion/brand/logo', redraw ? { redraw: true } : {}, options),\n acceptRun: (options: CompanionClientOptions, runId: string, force: boolean) =>\n CompanionClient.post<ConsoleAcceptOutcome>(`/api/companion/runs/writes/${encodeURIComponent(runId)}/accept`, force ? { force: true } : {}, options),\n /* The creator's recorded answers, committed on their own (#2332). */\n acceptDossier: (options: CompanionClientOptions) =>\n CompanionClient.post<ConsoleAcceptOutcome>('/api/companion/creation/dossier/accept', {}, options),\n};\n\n/**\n * Whether a feed line is the one a console REFERENCE names — a question id, a line id, a run id, a\n * build task or a playbook. Every identifier the console prints resolves through this one predicate,\n * so `wildo creation why` and `wildo workbench open` accept exactly the same references.\n */\nexport function feedLineNamesReference(line: CreationConsole_FeedLine, reference: string): boolean {\n return line.questionId === reference || line.lineId === reference || line.targetResourceId === reference\n || line.target?.runId === reference || line.taskRef === reference || line.playbookRef === reference;\n}\n\n/** One playbook's row on the eligibility board (`GET /playbooks`) — only the fields `wildo creation why` reads. */\nexport interface PlaybookStanding {\n readonly playbookRef: string;\n readonly eligible: boolean;\n readonly unmet: readonly string[];\n /** The interview questions the dossier does not answer yet. Absent from a companion older than the dossier. */\n readonly unansweredQuestionRefs?: readonly string[];\n /** Output families already on record. */\n readonly wouldReplace?: readonly string[];\n}\n\n/**\n * Where a playbook's unanswered interview questions stand in the companion's question queue: asked NOW, or not\n * asked until the playbook can run.\n *\n * Read from the queue, never inferred from the board: the dossier asks a question while ANY step reading it can\n * run, so a question a held playbook shares with a runnable one (`sameDecisionAs`) is already asked, under the\n * owning step's name. The share is resolved through this CLI's compiled catalog, the one map from a playbook's\n * own question ref to the decision it shares. Interview items of an opened instance are not the playbook's own\n * and are not matched.\n */\nexport interface InterviewQueueStanding {\n /** In `wildo creation questions` now, as `<ref>` or `<ref> (asked as <owner>#<ownerRef>)`. */\n readonly askedNow: readonly string[];\n /** Asked of no one until the playbook itself can run. */\n readonly notAskedYet: readonly string[];\n}\n\nexport function locateInterviewInQueue(\n playbookRef: string,\n unansweredQuestionRefs: readonly string[],\n queue: Pick<CreationConsole_QuestionQueue, 'questions'>,\n): InterviewQueueStanding {\n const compiled = getFrameworkKnowledgePlaybook(playbookRef)?.playbook as\n | { method?: { elicitation?: { questions?: readonly { ref: string; sameDecisionAs?: { playbookRef: string; questionRef: string } }[] } } }\n | undefined;\n const sharedByRef = new Map((compiled?.method?.elicitation?.questions ?? [])\n .filter((question) => question.sameDecisionAs !== undefined)\n .map((question) => [question.ref, question.sameDecisionAs!]));\n const asked = new Set(queue.questions\n .filter((question) => question.kind === CreationConsoleQuestionKind.INTERVIEW && question.instanceKey === null && question.playbookRef !== null)\n .flatMap((question) => question.fields.map((field) => `${question.playbookRef}#${field.ref}`)));\n const askedNow: string[] = [];\n const notAskedYet: string[] = [];\n for (const ref of unansweredQuestionRefs) {\n const shared = sharedByRef.get(ref);\n if (asked.has(`${playbookRef}#${ref}`)) askedNow.push(ref);\n else if (shared && asked.has(`${shared.playbookRef}#${shared.questionRef}`)) askedNow.push(`${ref} (asked as ${shared.playbookRef}#${shared.questionRef})`);\n else notAskedYet.push(ref);\n }\n return { askedNow, notAskedYet };\n}\n\n/**\n * Where a playbook stands NOW: what holds it (from the board), and where each unanswered interview question\n * stands (from the queue, see {@link locateInterviewInQueue}).\n *\n * The unmet preconditions lead when it cannot run. Saying its questions waited on the person sent them to\n * `wildo creation answer`, which refuses a question the queue is not asking (app-creation-test-005,\n * 2026-10-03). `interview` absent means the queue could not be read: the questions are then named without a\n * claim about whether they are asked.\n */\nexport function describePlaybookStanding(standing: PlaybookStanding, hasRecentRun: boolean, interview: InterviewQueueStanding | undefined): string[] {\n const unanswered = standing.unansweredQuestionRefs ?? [];\n const onRecord = standing.wouldReplace ?? [];\n const history = hasRecentRun ? '' : onRecord.length > 0 ? `, no recent run (on record: ${onRecord.join(', ')})` : ', no recent run and nothing on record';\n const askedNow = interview?.askedNow ?? [];\n const state = !standing.eligible ? 'blocked' : unanswered.length > 0 ? 'waiting for you' : 'eligible: nothing holds it';\n const out = [`playbook ${standing.playbookRef} — ${state}${history}`];\n if (!standing.eligible) {\n for (const reason of standing.unmet.length > 0 ? standing.unmet : ['not eligible, and the board gave no reason']) out.push(` unmet: ${reason}`);\n }\n if (unanswered.length === 0) return out;\n out.push(` its interview: ${unanswered.length} question(s) unanswered — ${unanswered.join(', ')}`);\n if (interview === undefined) {\n out.push(' could not read the question queue, so whether they are asked now is not known: wildo creation questions');\n return out;\n }\n if (askedNow.length > 0) out.push(` asked now: ${askedNow.join(', ')} → wildo creation questions`);\n if (interview.notAskedYet.length > 0) {\n out.push(standing.eligible\n // Eligible and still not queued is a disagreement this command cannot explain; it says so rather than guess.\n ? ` not in the question queue, although it can run: ${interview.notAskedYet.join(', ')}`\n : ` not asked yet: ${interview.notAskedYet.join(', ')} — the queue asks ${interview.notAskedYet.length === 1 ? 'it' : 'them'} once nothing above holds this playbook`);\n }\n return out;\n}\n\n/** What `POST /playbooks/loop` answers — only the fields the console prints; `--json` prints the rest. */\nexport interface ConsoleLoopResult {\n readonly stoppedBecause: string;\n readonly steps: ReadonlyArray<{\n readonly iteration: number;\n readonly lanes: ReadonlyArray<{ readonly playbookRef: string; readonly rationale: string; readonly landed?: readonly string[]; readonly failure?: string }>;\n readonly droppedLanes: ReadonlyArray<{ readonly playbookRef: string; readonly reason: string }>;\n readonly stopRationale?: string;\n }>;\n}\n\n/** One round of a playbook loop in words: what ran and what it landed or hit, what was refused, or why it stopped. */\nexport function describeLoopStep(step: ConsoleLoopResult['steps'][number]): string[] {\n const lines = [`round ${step.iteration}${step.stopRationale ? ` — stopped: ${step.stopRationale}` : ''}`];\n for (const lane of step.lanes) {\n lines.push(` ${lane.playbookRef} — ${lane.failure ? `failed: ${lane.failure}` : `landed ${lane.landed?.join(', ') || 'nothing'}`}`);\n lines.push(` why this one: ${lane.rationale}`);\n }\n for (const dropped of step.droppedLanes) lines.push(` not run: ${dropped.playbookRef} — ${dropped.reason}`);\n return lines;\n}\n\nasync function readJsonOnce<T>(path: string, options: CompanionClientOptions): Promise<T> {\n const response = await CompanionClient.request(path, { method: 'GET' }, options, CompanionRequestRetryPolicy.NO_RETRY);\n // Typed, so a caller can tell \"it answered no\" from \"nothing is there\" without reading the message.\n if (!response.ok) throw new CompanionRefusalError(`Companion API ${path}: ${response.status} ${response.statusText}`, response.status);\n return await response.json() as T;\n}\n\n/**\n * One feed line as ONE line of text — what the background watcher prints, because each line it prints\n * becomes one notification in the session (#1657). The same words as {@link describeFeedLine}, joined.\n */\nexport function describeFeedLineCompact(line: CreationConsole_FeedLine): string {\n return describeFeedLine(line).map((text) => text.trim()).join(' · ');\n}\n\n/**\n * The console's PUSH loop (#1657), behind `wildo creation watch` — separated from the command so its\n * behaviour is pinned without a companion or a clock.\n *\n * Polls the pulse; reads the feed when the pulse moved or `feedFallbackMs` passed; says ONE line per new\n * event. The first successful feed read only establishes what already happened (the session-start brief\n * reported it). A companion that cannot be reached is said once, and its return once. Runs until\n * `shouldStop` answers true (the command passes a function that never does).\n *\n * \"Cannot be reached\" has three meanings, and only one of them may say \"start it\" (#2394). Nothing\n * listening means the companion is not running. A request that TIMES OUT means a process accepted the\n * connection and did not answer in time: running and busy. An HTTP error status means it answered and\n * said no, while starting or in diagnostics: running too. Telling a person or a supervisor to start a\n * running companion ended in a restart that killed the runs it was busy with. On app-creation-test-005\n * the monitor flipped to \"not reachable\" every one to two minutes through a build wave, on one live pid.\n * The wording is the pulse's (`describePulseFailure`), so `wildo creation pulse` says the same thing.\n */\nexport async function watchCreationEvents(port: {\n readonly readPulse: () => Promise<CreationConsole_Pulse>;\n readonly readFeed: () => Promise<CreationConsole_Feed>;\n readonly say: (text: string) => void;\n readonly sleep: (ms: number) => Promise<void>;\n readonly now: () => number;\n readonly shouldStop: () => boolean;\n readonly pulseIntervalMs: number;\n readonly feedFallbackMs: number;\n}): Promise<void> {\n let seen: Set<string> | null = null;\n let lastPulseKey: string | null = null;\n let lastFeedAt = Number.NEGATIVE_INFINITY;\n /** Why the last pulse failed, or `null` while the companion answers. */\n let failure: PulseFailure | null = null;\n while (!port.shouldStop()) {\n let pulseKey: string | null = null;\n try {\n const pulse = await port.readPulse();\n pulseKey = `${pulse.sequence}:${pulse.runsInFlight}`;\n if (failure !== null) {\n port.say(failure === PulseFailure.UNREACHABLE ? 'Dev companion is back.' : 'Dev companion is answering again.');\n failure = null;\n lastPulseKey = null;\n }\n } catch (error) {\n const next = classifyCompanionRequestFailure(error);\n // Said once per state: a companion going from busy to stopped (or back) is news, the same one twice is not.\n if (next !== failure) port.say(`Dev companion ${describePulseFailure(next)} Waiting for it.`);\n failure = next;\n }\n if (pulseKey !== null && (pulseKey !== lastPulseKey || port.now() - lastFeedAt >= port.feedFallbackMs)) {\n try {\n const feed = await port.readFeed();\n lastFeedAt = port.now();\n if (seen === null) {\n seen = new Set(feed.lines.map(feedLineSignature));\n } else {\n for (const line of newFollowedLines(feed.lines, seen)) {\n seen.add(feedLineSignature(line));\n port.say(describeFeedLineCompact(line));\n }\n }\n lastPulseKey = pulseKey;\n } catch {\n /* The pulse answered and the feed did not: try again next tick without announcing anything. */\n }\n }\n await port.sleep(port.pulseIntervalMs);\n }\n}\n\n/**\n * Why a request to the companion failed, in the pulse's vocabulary, so the watcher and `wildo creation\n * pulse` give the same advice (#2394 review L1). A timeout — including one that fires while the body is\n * read, after the headers — means a process is there and busy; an HTTP error status, or a body that does\n * not parse, means it is there and answered something unusable; anything else (a refused or reset\n * connection, no endpoint, no token) means nothing is listening.\n */\nexport function classifyCompanionRequestFailure(error: unknown): PulseFailure {\n if (error instanceof CompanionRequestTimeoutError) return PulseFailure.SLOW;\n if (error instanceof Error && (error.name === 'TimeoutError' || error.name === 'AbortError')) return PulseFailure.SLOW;\n if (error instanceof CompanionRefusalError) return PulseFailure.REFUSED;\n // `response.json()` on a body that is not JSON: it answered, so it is running.\n if (error instanceof SyntaxError) return PulseFailure.REFUSED;\n return PulseFailure.UNREACHABLE;\n}\n\n/** The Home sections whose lines are EVENTS a follower waits for; suggestions move with every edit and are not. */\nconst FOLLOWED_SECTIONS: ReadonlySet<string> = new Set([WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeSection.ASKED]);\n\n/**\n * A line's SIGNATURE — what makes it \"the same line\" to a follower. A line whose facts changed (a\n * dispatch that became acceptable, a run that failed) is news again; the attached row is excluded,\n * because its timestamps move on every read without anything having happened.\n */\nexport function feedLineSignature(line: CreationConsole_FeedLine): string {\n return JSON.stringify([line.lineId, line.at, line.failed, line.acceptable, line.needsAnswers, line.stuckReason, line.questionId]);\n}\n\n/**\n * The followed lines that are NEW since `seen` — the one comparison `--follow` makes. `seen` is the\n * set of signatures already printed, so a line printed once is never printed twice, however often\n * the feed is read.\n */\nexport function newFollowedLines(lines: readonly CreationConsole_FeedLine[], seen: ReadonlySet<string>): CreationConsole_FeedLine[] {\n return lines.filter((line) => FOLLOWED_SECTIONS.has(line.section) && !seen.has(feedLineSignature(line)));\n}\n\nfunction stringField(row: Record<string, unknown> | null, field: string): string | null {\n const value = row?.[field];\n return typeof value === 'string' && value.length > 0 ? value : null;\n}\n\n/**\n * One feed line in words. The kind vocabulary is the companion's (`WorkbenchCreationHomeLineKind`);\n * an unknown kind is printed as its raw value rather than guessed at, so a newer companion's line is\n * visibly unfamiliar instead of quietly misdescribed.\n */\nexport function describeFeedLine(line: CreationConsole_FeedLine): string[] {\n const subject = line.playbookRef ?? line.taskRef ?? line.subject ?? line.targetResourceId;\n const when = line.at ? ` (${line.at})` : '';\n const out: string[] = [];\n switch (line.kind) {\n case WorkbenchCreationHomeLineKind.RUN_COMPLETED: {\n out.push(`${line.failed ? 'REFUSED' : 'completed'} playbook ${subject}${when}`);\n const verdict = stringField(line.target, 'judgeOverall');\n if (verdict) out.push(` judge: ${verdict}`);\n /* The criteria that did not pass are what a console acts on; a PASS needs no rationale read out. */\n const criteria = line.target?.judgeCriteria;\n if (Array.isArray(criteria)) {\n for (const criterion of criteria as { criterionRef?: unknown; verdict?: unknown; rationale?: unknown }[]) {\n if (criterion.verdict === MetaWorkflow_EvaluationVerdict.PASS || typeof criterion.criterionRef !== 'string') continue;\n out.push(` ${String(criterion.verdict)} ${criterion.criterionRef}: ${String(criterion.rationale ?? '')}`);\n }\n }\n const skipped = stringField(line.target, 'judgeSkipped');\n if (skipped) out.push(` judge did not run: ${skipped}`);\n const error = stringField(line.target, 'error');\n if (error) out.push(` ${error}`);\n break;\n }\n case WorkbenchCreationHomeLineKind.RUN_INTERRUPTED:\n out.push(`interrupted playbook ${subject}${when} — running it again resumes it`);\n break;\n case WorkbenchCreationHomeLineKind.DISPATCH_SETTLED: {\n const objective = stringField(line.target, 'objective');\n out.push(`${line.failed ? 'FAILED' : 'finished'} build task ${subject}${when}${objective ? ` — ${objective}` : ''}`);\n if (line.acceptable) out.push(` its writes wait to be committed → wildo build accept ${line.taskRef ?? subject}`);\n const error = stringField(line.target, 'error');\n if (error) out.push(` ${error}`);\n break;\n }\n case WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED:\n // `subject` is when the build resumes; the task is the one whose run met the limit (#2388).\n out.push(`PAUSED coding agent usage limit reached — resumes at ${line.subject ?? 'its reset'}${when}`);\n out.push(` met by build task ${line.taskRef ?? line.targetResourceId}; no attempt is counted, and the build continues on its own`);\n break;\n case WorkbenchCreationHomeLineKind.CLARIFICATION:\n out.push(`ASKED playbook ${subject} stopped on questions only you can answer${when}`);\n break;\n case WorkbenchCreationHomeLineKind.PARKED_QUESTION:\n out.push(`ASKED the coding run for ${subject} is parked on a question${when}`);\n break;\n case WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT:\n out.push(`ASKED governed document ${subject} still needs facts (answer them in the workbench)`);\n break;\n case WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN:\n out.push(`ASKED the build plan is stuck at ${subject}: ${line.stuckReason ?? 'no reason recorded'}`);\n break;\n case WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN:\n out.push(`next build task ${line.taskRef ?? subject}${line.subject ? ` — ${line.subject}` : ''}`);\n break;\n case WorkbenchCreationHomeLineKind.PRODUCE_MISSING:\n out.push(`next playbook ${subject} would produce a missing artifact${line.needsAnswers ? ' (it has questions for you first)' : ''}`);\n break;\n case WorkbenchCreationHomeLineKind.REFRESH_STALE:\n out.push(`next playbook ${subject} would refresh a stale artifact${line.needsAnswers ? ' (it has questions for you first)' : ''}`);\n break;\n default:\n out.push(`${line.kind} ${subject}${when}`);\n }\n if (line.questionId) out.push(` question: ${line.questionId} → wildo creation questions`);\n return out;\n}\n\n/** The `wildo creation answer` invocation that answers a question, for a reader to copy. */\nexport function describeAnswerCommand(question: CreationConsole_Question): string[] {\n if (question.actions.length === 0) return [];\n const revision = question.revision !== null ? ` --revision ${question.revision}` : '';\n const commands: string[] = [];\n if (question.actions.includes(CreationConsoleAnswerAction.ANSWER)) {\n commands.push(question.fields.length === 1\n /*\n * `--person` in the hint: the command is copied by agents as often as by people, and from inside an\n * agent session an unattributed answer is refused (#1658). For a person at a terminal it names what\n * the default would have been anyway.\n */\n ? `wildo creation answer ${question.questionId}${revision} --person \"<answer>\"`\n : `wildo creation answer ${question.questionId}${revision} --person --answer ${question.fields.map((field) => `${field.ref}=\"<answer>\"`).join(' ')}`);\n }\n /* An interview question the person does not know (#2129): have it proposed, then keep the proposal as an assumption. */\n if (question.kind === CreationConsoleQuestionKind.INTERVIEW && question.proposable === true && question.assumedAnswer === null && question.playbookRef !== null) {\n commands.push(`wildo creation propose ${question.playbookRef}${question.instanceKey ? ` --instance ${question.instanceKey}` : ''} --question ${question.fields[0]!.ref}`);\n }\n if (question.actions.includes(CreationConsoleAnswerAction.DECLINE)) commands.push(`wildo creation answer ${question.questionId}${revision} --decline`);\n if (question.actions.includes(CreationConsoleAnswerAction.CANCEL)) commands.push(`wildo creation answer ${question.questionId}${revision} --cancel`);\n return commands;\n}\n\nconst QUESTION_KIND_WORDS: Readonly<Record<CreationConsoleQuestionKind, string>> = {\n [CreationConsoleQuestionKind.CLARIFICATION]: 'a playbook run stopped to ask',\n [CreationConsoleQuestionKind.PARKED_CODING_QUESTION]: 'a coding run is parked on a question',\n [CreationConsoleQuestionKind.INTERVIEW]: 'a step can run once this is answered',\n [CreationConsoleQuestionKind.GOVERNANCE_FACT]: 'a drafted governed document needs this fact — answer it in the workbench',\n};\n\n/** One queued question in words, followed by the command(s) that answer it. */\nexport function describeQuestion(question: CreationConsole_Question): string[] {\n const step = question.playbookRef === null ? null : playbookInstanceId(question.playbookRef, question.instanceKey ?? undefined);\n const about = step ?? question.taskRef ?? question.definitionRef ?? '';\n const out: string[] = [`${question.questionId} — ${QUESTION_KIND_WORDS[question.kind]}${about ? ` (${about})` : ''}`];\n if (question.producingFamily) out.push(` producing: ${question.producingFamily}`);\n if (question.dryRun === true) out.push(' dry run: answering writes nothing');\n if (question.routedToUserId) out.push(' asked of the person who started its run: only they may answer it — in the workbench, signed in as them');\n if (question.resumable === false) out.push(' the run cannot re-enter its session: answering starts a new one that restates the task');\n if (question.affectsFamilies.length > 0) out.push(` an answer reaches: ${question.affectsFamilies.join(', ')}`);\n if (question.kind === CreationConsoleQuestionKind.INTERVIEW) {\n /* #2129: whether a simple interview asks it, and whether a proposal can stand in when the person does not know. */\n if (question.askedInSimpleInterview === false) out.push(' detail: a simple interview proposes it instead of asking');\n if (question.proposable === false) out.push(' only the person can answer it: it is never proposed');\n if (question.regulatedDomain === true) {\n // Only ever assumed on review (an unattended round never assumes one), so a kept one is named when revisited.\n out.push(question.assumedAnswer !== null\n ? ' regulated domain: kept on review — name it to the person when revisiting it'\n : ' regulated domain: name any proposed answer to the person before keeping it');\n }\n if (question.assumedAnswer !== null) out.push(` assumed (to revisit): ${question.assumedAnswer} — answering records the person's own answer in its place`);\n if (question.assumptionRationale) out.push(` because: ${question.assumptionRationale}`);\n }\n for (const field of question.fields) {\n out.push(` [${field.ref}] ${field.question}`);\n if (field.why) out.push(` why: ${field.why}`);\n if (field.options.length > 0 && field.optionDetails !== undefined) {\n // A computed option is a summary; what it summarizes is printed under it, so it is never chosen blind (#2337).\n out.push(' options:');\n field.options.forEach((option, index) => {\n out.push(` - ${option}`);\n const detail = field.optionDetails?.[index];\n if (detail) out.push(` ${detail}`);\n });\n } else if (field.options.length > 0) {\n out.push(` options: ${field.options.join(' | ')}`);\n }\n }\n for (const command of describeAnswerCommand(question)) out.push(` → ${command}`);\n return out;\n}\n\n/**\n * Build the answer request from the CLI's inputs. Throws a sentence when the inputs do not make one\n * request — the companion refuses the same things, but a refusal before the round trip names the\n * flag to change.\n *\n * `value` is the positional answer, for a question with ONE field; `pairs` are `--answer ref=value`.\n */\n/** Parse `ref=value` tokens; `flag` names the flag in the error. */\nfunction parseAnswerPairs(pairs: readonly string[], flag: string): { ref: string; value: string }[] {\n return pairs.map((pair) => {\n const separator = pair.indexOf('=');\n if (separator <= 0) {\n /* The flags are variadic: an answer typed AFTER one is taken as one more pair — the likelier cause of a pair with no ref. */\n throw new Error(`\"${pair}\" is not ref=value. \\`${flag}\\` takes every token after it, so give a positional answer BEFORE \\`${flag}\\`, `\n + `or answer every question with \\`${flag} ref=value\\`.`);\n }\n return { ref: pair.slice(0, separator), value: pair.slice(separator + 1) };\n });\n}\n\n/**\n * The only author an agent may record for an answer it DERIVED itself. A derived answer is by\n * definition not the person's, so the prefix is enforced rather than trusted.\n */\nexport const AGENT_ANSWER_AUTHOR_PREFIX = 'agent:';\n\nexport function buildAnswerRequest(input: {\n readonly questionId: string;\n readonly revision?: string;\n readonly value?: string;\n /** `--answer ref=value`: answers the PERSON gave (authored by `answeredByRef`). */\n readonly pairs: readonly string[];\n /** `--derived ref=value`: answers an AGENT derived on its own (authored by `derivedByRef`). */\n readonly derivedPairs?: readonly string[];\n readonly derivedByRef?: string;\n /**\n * The positional answer is a PROPOSAL the person let stand because they did not know (#2129): recorded as\n * ASSUMED, authored by the companion's proposer, with the proposer's reason. Interview questions only.\n */\n readonly assumed?: boolean;\n readonly assumptionRationale?: string;\n readonly decline: boolean;\n readonly cancel: boolean;\n /** The author of the person's answers — and the request's default author. */\n readonly answeredByRef?: string;\n /** The question as the queue serves it, to resolve a positional answer's field ref. */\n readonly question: CreationConsole_Question | null;\n}): CreationConsole_AnswerRequest {\n const parsed = parseCreationConsoleQuestionId(input.questionId);\n if (!parsed) throw new Error(`\"${input.questionId}\" is not a question id — copy one from \\`wildo creation questions\\`.`);\n if (input.decline && input.cancel) throw new Error('Pass --decline or --cancel, not both.');\n const base = {\n questionId: input.questionId,\n ...(input.revision ? { revision: input.revision } : {}),\n ...(input.answeredByRef ? { answeredByRef: input.answeredByRef } : {}),\n };\n const personAnswers = parseAnswerPairs(input.pairs, '--answer');\n const derived = parseAnswerPairs(input.derivedPairs ?? [], '--derived');\n if (derived.length > 0) {\n if (!input.derivedByRef?.startsWith(AGENT_ANSWER_AUTHOR_PREFIX) || input.derivedByRef.length === AGENT_ANSWER_AUTHOR_PREFIX.length) {\n throw new Error(`A derived answer names the agent that derived it: --derived-by ${AGENT_ANSWER_AUTHOR_PREFIX}<name>.`);\n }\n }\n if (input.assumptionRationale !== undefined && input.assumed !== true) throw new Error('--rationale explains an assumption: pass it with --assumed.');\n if (input.assumed === true) {\n if (parsed.kind !== CreationConsoleQuestionKind.INTERVIEW) {\n throw new Error('--assumed records a proposed interview answer; only interview questions take one. A playbook round takes --decline to let the run decide.');\n }\n if (input.value === undefined || personAnswers.length > 0 || derived.length > 0 || input.decline || input.cancel) {\n throw new Error('--assumed takes the proposed answer positionally, and nothing else: wildo creation answer <questionId> --assumed \"<value>\" --rationale \"<why>\".');\n }\n if (!input.question) throw new Error(`Nothing waits under \"${input.questionId}\" now — read \\`wildo creation questions\\` again.`);\n return {\n ...base,\n action: CreationConsoleAnswerAction.ANSWER,\n answers: [{\n ref: input.question.fields[0]!.ref,\n value: input.value,\n /* The proposer is the author: the person let it stand, they did not decide it. */\n answeredByRef: INTERVIEW_ANSWER_PROPOSER_REF,\n standing: ApplicationCreatorInputAnswerStanding.ASSUMED,\n ...(input.assumptionRationale !== undefined ? { assumptionRationale: input.assumptionRationale } : {}),\n }],\n };\n }\n if (input.cancel) {\n if (input.value !== undefined || personAnswers.length > 0 || derived.length > 0) throw new Error('--cancel carries no answer.');\n return { ...base, action: CreationConsoleAnswerAction.CANCEL };\n }\n if (input.value !== undefined) {\n if (personAnswers.length > 0 || derived.length > 0) throw new Error('Give the answer either positionally or with --answer / --derived, not both.');\n if (!input.question) throw new Error(`Nothing waits under \"${input.questionId}\" now — read \\`wildo creation questions\\` again.`);\n if (input.question.fields.length !== 1) {\n throw new Error(`\"${input.questionId}\" asks ${input.question.fields.length} questions; answer each with --answer ${input.question.fields.map((field) => `${field.ref}=…`).join(' ')}.`);\n }\n personAnswers.push({ ref: input.question.fields[0]!.ref, value: input.value });\n }\n /* Each answer carries its author, so a round an agent and the person answered together records both (#1658). */\n const answers = [\n ...personAnswers.map((answer) => ({ ...answer, ...(input.answeredByRef ? { answeredByRef: input.answeredByRef } : {}) })),\n ...derived.map((answer) => ({ ...answer, answeredByRef: input.derivedByRef! })),\n ];\n if (answers.some((answer) => answer.value.trim().length === 0)) throw new Error('An answer cannot be empty.');\n if (new Set(answers.map((answer) => answer.ref)).size !== answers.length) throw new Error('Each question is answered once.');\n if (input.decline) {\n /* \"These I answered, decide the rest\" — the run decides only what is left unanswered. */\n return { ...base, action: CreationConsoleAnswerAction.DECLINE, ...(answers.length > 0 ? { answers } : {}) };\n }\n if (answers.length === 0) throw new Error('No answer given: pass it positionally, with --answer / --derived ref=value, or use --decline / --cancel.');\n return { ...base, action: CreationConsoleAnswerAction.ANSWER, answers };\n}\n\n/**\n * Whether this process was started by a coding agent (Claude Code sets `CLAUDECODE=1`; agents following\n * the emerging cross-agent convention set `AI_AGENT`). Used for ONE decision: an answer sent from inside\n * an agent session must say whose it is, because there the git identity is the person's and the typist\n * is the agent — defaulting would record the agent's derivation as the person's decision (#1658).\n */\nexport function isRunningInsideCodingAgent(env: NodeJS.ProcessEnv = process.env): boolean {\n return env.CLAUDECODE === '1' || (typeof env.AI_AGENT === 'string' && env.AI_AGENT.trim().length > 0);\n}\n\n/**\n * Who answers, when the caller does not say: the workspace's git identity — the author of the commit\n * that will accept the answer, which is the provenance this repository already trusts for an\n * acceptance (`one-source-of-truth.md` rule 7). `null` when git has none configured.\n *\n * PREFIXED `git:`, like the `agent:<name>` an agent answering on its own sends, because the same\n * `answeredByRef` field also holds the workbench's signed-in user ids: a reader of the dossier can then\n * tell which door an answer came through and what kind of identity it names.\n */\nexport async function readGitIdentity(repositoryRoot: string): Promise<string | null> {\n try {\n const { stdout } = await GitHelper.runGit(repositoryRoot, ['config', 'user.email']);\n const email = stdout.trim();\n return email.length > 0 ? `git:${email}` : null;\n } catch {\n return null;\n }\n}\n\n/**\n * A proposal response in words (#2129): each proposed answer, why, and the command that keeps it as an\n * assumption. What could not be proposed is named, for the person to answer.\n */\nexport function describeInterviewProposals(response: CreationConsole_ProposalResponse): string[] {\n const out: string[] = [];\n if (response.proposals.length === 0 && response.unproposed.length === 0) {\n return [`Nothing to propose for ${response.playbookRef}: every question it would propose is answered, or no interview depth is chosen yet (wildo creation depth).`];\n }\n for (const proposal of response.proposals) {\n out.push(`[${proposal.questionRef}] ${proposal.question}${proposal.regulatedDomain ? ' (REGULATED DOMAIN — name it to the person before keeping it)' : ''}`, ` proposed: ${proposal.value}`, ` because: ${proposal.rationale}`);\n if (proposal.questionId !== null) {\n out.push(` → keep it: wildo creation answer ${proposal.questionId} --assumed ${JSON.stringify(proposal.value)} --rationale ${JSON.stringify(proposal.rationale)}`);\n }\n }\n for (const missing of response.unproposed) out.push(`[${missing.questionRef}] could not be proposed (${missing.reason}) — ask the person.`);\n return out;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"creation-run-report.models.d.ts","sourceRoot":"","sources":["../../../../../../src/services/companion/creation-run-report.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAE5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C,wBAAwB,EAAE,MAAM,CAAC;YAC1C,QAAQ,CAAC,mCAAmC,CAAC,EAAE,MAAM,CAAC;YACtD,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC;SACjD,CAAC;KACH,CAAC;IACF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED,uHAAuH;AACvH,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"creation-run-report.models.js","sourceRoot":"","sources":["../../../../../../src/services/companion/creation-run-report.models.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlaybookSpend } from '@wildo-ai/application-creation-runtime';\n\nimport type { CreationRunTrackerRead } from '../tracker/creation-run-tracker.service';\n\n/**\n * What `GET /api/companion/creation/report` answers (#2231), as far as `wildo creation report` prints it.\n *\n * Declared here rather than imported, as `wildo context journey` declares the shapes it reads: the CLI\n * holds no copy of the companion's vocabularies. An intervention's `kind` is the companion's own value\n * and is printed as it arrives, so a kind added there needs no edit here.\n */\nexport interface CreationRunReport {\n readonly generatedAt: string;\n /** The application, by slug. Absent from a companion older than #2287, which leaves the tracker unread. */\n readonly application?: { readonly slug: string };\n readonly interventions: readonly CreationRunReportIntervention[];\n readonly independence: {\n readonly interventions: number;\n readonly landedUnits: number;\n readonly interventionsPerLandedUnit: number | null;\n readonly landedBuildTasks: number;\n readonly interventionsPerLandedBuildTask: number | null;\n readonly byLane: readonly { readonly lane: string; readonly interventions: number; readonly landed: number; readonly interventionsPerLanding: number | null }[];\n };\n readonly spend: {\n readonly playbookRuns: readonly {\n readonly runId: string;\n readonly playbookRef: string;\n readonly instanceKey?: string;\n readonly startedAt: string;\n readonly finishedAt?: string;\n readonly status: string;\n readonly spend?: PlaybookSpend;\n }[];\n readonly codingRuns: readonly {\n readonly runTaskId: string;\n readonly taskRef: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly tokens?: { readonly totalTokens?: number; readonly cacheReadTokens?: number };\n readonly cost?: { readonly amount: number; readonly currency: string };\n }[];\n /** Build generation steps, each with what its row records it spent (#2232). Absent from a companion older than it. */\n readonly generationSteps?: readonly {\n readonly runTaskId: string;\n readonly taskRef: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly spend?: PlaybookSpend;\n }[];\n readonly loopSelections: readonly { readonly runId: string; readonly startedAt: string; readonly cost?: Readonly<Record<string, number>> }[];\n readonly total: {\n readonly cost: Readonly<Record<string, number>>;\n readonly totalTokens?: number;\n readonly codingRunsWithoutReportedCost: number;\n readonly playbookRunsWithoutSpend: number;\n readonly generationStepsWithoutRecordedSpend?: number;\n readonly codingRunsPossiblyCountedTwice: number;\n };\n };\n readonly notChecked: readonly string[];\n}\n\nexport interface CreationRunReportIntervention {\n readonly id: string;\n readonly kind: string;\n readonly at: string;\n readonly targets: readonly { readonly lane: string; readonly task?: string }[];\n readonly summary: string;\n readonly evidence: string;\n readonly reason?: { readonly text: string; readonly source: string };\n}\n\n/** What `wildo creation report` prints: the companion's report, and what the tracker holds against the run (#2287). */\nexport interface CreationRunReportWithTracker extends CreationRunReport {\n readonly tracker: CreationRunTrackerRead;\n}\n"]}
1
+ {"version":3,"file":"creation-run-report.models.js","sourceRoot":"","sources":["../../../../src/services/companion/creation-run-report.models.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlaybookSpend } from '@wildo-ai/application-creation-runtime';\n\nimport type { CreationRunTrackerRead } from '../tracker/creation-run-tracker.service';\n\n/**\n * What `GET /api/companion/creation/report` answers (#2231), as far as `wildo creation report` prints it.\n *\n * Declared here rather than imported, as `wildo context journey` declares the shapes it reads: the CLI\n * holds no copy of the companion's vocabularies. An intervention's `kind` is the companion's own value\n * and is printed as it arrives, so a kind added there needs no edit here.\n */\nexport interface CreationRunReport {\n readonly generatedAt: string;\n /** The application, by slug. Absent from a companion older than #2287, which leaves the tracker unread. */\n readonly application?: { readonly slug: string };\n readonly interventions: readonly CreationRunReportIntervention[];\n readonly independence: {\n readonly interventions: number;\n readonly landedUnits: number;\n readonly interventionsPerLandedUnit: number | null;\n readonly landedBuildTasks: number;\n readonly interventionsPerLandedBuildTask: number | null;\n readonly byLane: readonly { readonly lane: string; readonly interventions: number; readonly landed: number; readonly interventionsPerLanding: number | null }[];\n };\n readonly spend: {\n readonly playbookRuns: readonly {\n readonly runId: string;\n readonly playbookRef: string;\n readonly instanceKey?: string;\n readonly startedAt: string;\n readonly finishedAt?: string;\n readonly status: string;\n readonly spend?: PlaybookSpend;\n }[];\n readonly codingRuns: readonly {\n readonly runTaskId: string;\n readonly taskRef: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly tokens?: { readonly totalTokens?: number; readonly cacheReadTokens?: number };\n readonly cost?: { readonly amount: number; readonly currency: string };\n }[];\n /** Build generation steps, each with what its row records it spent (#2232). Absent from a companion older than it. */\n readonly generationSteps?: readonly {\n readonly runTaskId: string;\n readonly taskRef: string;\n readonly startedAt: string;\n readonly settledAt?: string;\n readonly spend?: PlaybookSpend;\n }[];\n readonly loopSelections: readonly { readonly runId: string; readonly startedAt: string; readonly cost?: Readonly<Record<string, number>> }[];\n readonly total: {\n readonly cost: Readonly<Record<string, number>>;\n readonly totalTokens?: number;\n readonly codingRunsWithoutReportedCost: number;\n readonly playbookRunsWithoutSpend: number;\n readonly generationStepsWithoutRecordedSpend?: number;\n readonly codingRunsPossiblyCountedTwice: number;\n };\n };\n readonly notChecked: readonly string[];\n}\n\nexport interface CreationRunReportIntervention {\n readonly id: string;\n readonly kind: string;\n readonly at: string;\n readonly targets: readonly { readonly lane: string; readonly task?: string }[];\n readonly summary: string;\n readonly evidence: string;\n readonly reason?: { readonly text: string; readonly source: string };\n}\n\n/** What `wildo creation report` prints: the companion's report, and what the tracker holds against the run (#2287). */\nexport interface CreationRunReportWithTracker extends CreationRunReport {\n readonly tracker: CreationRunTrackerRead;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"git-helper.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/companion/git-helper.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,eAAO,MAAM,SAAS;iBACD,MAAM,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;kBAKnE,MAAM,UAAU,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;qBAKrC,MAAM,iBAAiB,MAAM,mBAAmB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAShG;;;;;OAKG;+BAEQ,MAAM,eACF,MAAM,QACb,MAAM,GACX,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,CAAA;KAAE,CAAC;IAOzE,yDAAyD;2BAClC,MAAM,KAAK,MAAM,GAAG,MAAM;sBAMzB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;oBAIxB,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAKhE,CAAC"}
1
+ {"version":3,"file":"git-helper.service.d.ts","sourceRoot":"","sources":["../../../../src/services/companion/git-helper.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,eAAO,MAAM,SAAS;iBACD,MAAM,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;kBAKnE,MAAM,UAAU,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;qBAKrC,MAAM,iBAAiB,MAAM,mBAAmB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAShG;;;;;OAKG;+BAEQ,MAAM,eACF,MAAM,QACb,MAAM,GACX,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,CAAA;KAAE,CAAC;IAOzE,yDAAyD;2BAClC,MAAM,KAAK,MAAM,GAAG,MAAM;sBAMzB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;oBAIxB,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAKhE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"git-helper.service.js","sourceRoot":"","sources":["../../../../../../src/services/companion/git-helper.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,IAAc;QACvC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,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AAI,EAAE,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACpF,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY;QAC5B,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,OAAe;QAC3C,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["/**\n * GitHelperService — git operations for the CLI companion tooling.\n *\n * Provides git plumbing helpers: head resolution, ancestry checks,\n * base commit resolution for 3-way merges, staging, and committing.\n */\n\nimport { execFile as _execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nimport path from 'node:path';\n\nconst execFile = promisify(_execFile);\n\nexport const GitHelper = {\n async runGit(repo: string, args: string[]): Promise<{ stdout: string; stderr: string }> {\n const { stdout, stderr } = await execFile('git', ['-C', repo, ...args]);\n return { stdout: stdout.toString(), stderr: stderr?.toString() ?? '' };\n },\n\n async gitHead(repo: string, branch: string): Promise<string> {\n const { stdout } = await GitHelper.runGit(repo, ['rev-parse', branch]);\n return stdout.trim();\n },\n\n async isAncestor(repo: string, maybeAncestor: string, maybeDescendant: string): Promise<boolean> {\n try {\n await GitHelper.runGit(repo, ['merge-base', '--is-ancestor', maybeAncestor, maybeDescendant]);\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Decide which base commit to use when applying changes.\n * - If currentHead === oldHead → base = currentHead (exact snapshot)\n * - If oldHead is ancestor of currentHead → base = currentHead (fast-forward)\n * - Else diverged → base = currentHead (need per-file 3-way during apply)\n */\n async resolveBaseCommit(\n oldHead: string,\n currentHead: string,\n repo: string,\n ): Promise<{ base: string; mode: 'equal' | 'fast-forward' | 'diverged' }> {\n if (currentHead === oldHead) return { base: currentHead, mode: 'equal' };\n const ff = await GitHelper.isAncestor(repo, oldHead, currentHead);\n if (ff) return { base: currentHead, mode: 'fast-forward' };\n return { base: currentHead, mode: 'diverged' };\n },\n\n /** Ensure a relative path stays within the repo root. */\n assertWithinRepo(repo: string, p: string): string {\n const abs = path.resolve(repo, p);\n if (!abs.startsWith(path.resolve(repo))) throw new Error(`Path escapes repo: ${p}`);\n return abs;\n },\n\n async gitStageAll(repo: string): Promise<void> {\n await GitHelper.runGit(repo, ['add', '-A']);\n },\n\n async gitCommit(repo: string, message: string): Promise<string> {\n await GitHelper.runGit(repo, ['commit', '-m', message]);\n const { stdout } = await GitHelper.runGit(repo, ['rev-parse', 'HEAD']);\n return stdout.trim();\n },\n};\n"]}
1
+ {"version":3,"file":"git-helper.service.js","sourceRoot":"","sources":["../../../../src/services/companion/git-helper.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,IAAc;QACvC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,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AAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACpF,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY;QAC5B,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,OAAe;QAC3C,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACF,CAAC","sourcesContent":["/**\n * GitHelperService — git operations for the CLI companion tooling.\n *\n * Provides git plumbing helpers: head resolution, ancestry checks,\n * base commit resolution for 3-way merges, staging, and committing.\n */\n\nimport { execFile as _execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nimport path from 'node:path';\n\nconst execFile = promisify(_execFile);\n\nexport const GitHelper = {\n async runGit(repo: string, args: string[]): Promise<{ stdout: string; stderr: string }> {\n const { stdout, stderr } = await execFile('git', ['-C', repo, ...args]);\n return { stdout: stdout.toString(), stderr: stderr?.toString() ?? '' };\n },\n\n async gitHead(repo: string, branch: string): Promise<string> {\n const { stdout } = await GitHelper.runGit(repo, ['rev-parse', branch]);\n return stdout.trim();\n },\n\n async isAncestor(repo: string, maybeAncestor: string, maybeDescendant: string): Promise<boolean> {\n try {\n await GitHelper.runGit(repo, ['merge-base', '--is-ancestor', maybeAncestor, maybeDescendant]);\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Decide which base commit to use when applying changes.\n * - If currentHead === oldHead → base = currentHead (exact snapshot)\n * - If oldHead is ancestor of currentHead → base = currentHead (fast-forward)\n * - Else diverged → base = currentHead (need per-file 3-way during apply)\n */\n async resolveBaseCommit(\n oldHead: string,\n currentHead: string,\n repo: string,\n ): Promise<{ base: string; mode: 'equal' | 'fast-forward' | 'diverged' }> {\n if (currentHead === oldHead) return { base: currentHead, mode: 'equal' };\n const ff = await GitHelper.isAncestor(repo, oldHead, currentHead);\n if (ff) return { base: currentHead, mode: 'fast-forward' };\n return { base: currentHead, mode: 'diverged' };\n },\n\n /** Ensure a relative path stays within the repo root. */\n assertWithinRepo(repo: string, p: string): string {\n const abs = path.resolve(repo, p);\n if (!abs.startsWith(path.resolve(repo))) throw new Error(`Path escapes repo: ${p}`);\n return abs;\n },\n\n async gitStageAll(repo: string): Promise<void> {\n await GitHelper.runGit(repo, ['add', '-A']);\n },\n\n async gitCommit(repo: string, message: string): Promise<string> {\n await GitHelper.runGit(repo, ['commit', '-m', message]);\n const { stdout } = await GitHelper.runGit(repo, ['rev-parse', 'HEAD']);\n return stdout.trim();\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"local-companion-authority.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/companion/local-companion-authority.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EAAE,2BAA2B,EAAE,KAAK,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAI3H;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;CAChD;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBpG;AAED;;;;GAIG;AACH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,oBAAoB,EAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,WAAW,EACjB,WAAW,GAAE,2BAAkE,GAC9E,OAAO,CAAC,QAAQ,CAAC,CAMnB"}
1
+ {"version":3,"file":"local-companion-authority.service.d.ts","sourceRoot":"","sources":["../../../../src/services/companion/local-companion-authority.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EAAE,2BAA2B,EAAE,KAAK,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAI3H;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;CAChD;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBpG;AAED;;;;GAIG;AACH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,oBAAoB,EAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,WAAW,EACjB,WAAW,GAAE,2BAAkE,GAC9E,OAAO,CAAC,QAAQ,CAAC,CAMnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-companion-authority.service.js","sourceRoot":"","sources":["../../../../../../src/services/companion/local-companion-authority.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,qEAAqE,CAAC;AAC1H,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAC;AAC/H,OAAO,EAAE,2BAA2B,EAA+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AE,KAAK,EAAE;KAC7C,EAAE,WAAW,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,6BAA6B,CAAC,KAAa;IAClD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,KAAK,IAAI,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5G,IACE,GAAG,CAAC,QAAQ,KAAK,OAAO;WACrB,CAAC,UAAU;WACX,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;WACrB,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;WACvB,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;WACvB,GAAG,CAAC,QAAQ,KAAK,GAAG;WACpB,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;WACrB,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;WACnB,GAAG,CAAC,MAAM,KAAK,KAAK;QACvB,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACzG,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { CommandContext } from '~wildo-cli/kernel/types';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { COMPANION_TOKEN_HEADER, readCompanionTokenNoFollow } from '~wildo-cli/services/companion/companion-local-token.utils';\nimport { CompanionRequestRetryPolicy, type CompanionClientOptions } from '~wildo-cli/services/companion/companion.schemas';\n\nconst LOCAL_COMPANION_TIMEOUT_MS = 10_000;\n\n/**\n * Resolved, canonical local companion destination. It deliberately carries\n * no credential: token bytes stay inside {@link requestAuthorizedLocalCompanion}.\n */\nexport interface LocalCompanionTarget {\n readonly appRoot: string;\n readonly origin: string;\n readonly clientOptions: CompanionClientOptions;\n}\n\n/**\n * Resolve the configured companion only when it is exactly one loopback HTTP\n * origin. CLI callers share this boundary rather than independently parsing\n * app-local addresses and slowly weakening machine-local authority rules.\n */\nexport async function resolveLocalCompanionTarget(ctx: CommandContext): Promise<LocalCompanionTarget> {\n const appRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!appRoot) throw new Error('Local companion commands require a targeted SaaS application.');\n const addresses = await loadAppLocalRuntimeServiceAddresses(appRoot);\n const companion = addresses?.devCompanion;\n const rawOrigin = companion?.url ?? (companion?.port ? `http://${companion.host ?? 'localhost'}:${companion.port}` : null);\n if (!rawOrigin) throw new Error('The targeted application does not declare a local dev-companion address.');\n const origin = assertCanonicalLoopbackOrigin(rawOrigin);\n /*\n * `appRoot` rides in the client options — not as a credential (it is a path), but as the ONE thing\n * `CompanionClient` needs to find one. It is what makes a caller that issues a bare\n * `CompanionClient.request(..., target.clientOptions)` authorized anyway: before this, the only\n * authorized sender was `requestAuthorizedLocalCompanion` below, and remembering to call it was\n * the whole contract. It had zero callers.\n */\n return { appRoot, origin, clientOptions: { appRoot, baseUrl: origin, timeoutMs: LOCAL_COMPANION_TIMEOUT_MS } };\n}\n\n/**\n * Perform one authorized local-companion operation without exposing the token\n * to a command/service caller. The read is no-follow, permission-checked and\n * inode-stable so a symlink or replacement cannot redirect authority.\n */\nexport async function requestAuthorizedLocalCompanion(\n target: LocalCompanionTarget,\n path: string,\n init: RequestInit,\n retryPolicy: CompanionRequestRetryPolicy = CompanionRequestRetryPolicy.NO_RETRY,\n): Promise<Response> {\n const token = await readCompanionTokenNoFollow(target.appRoot);\n return CompanionClient.request(path, init, {\n ...target.clientOptions,\n headers: { [COMPANION_TOKEN_HEADER]: token },\n }, retryPolicy);\n}\n\nfunction assertCanonicalLoopbackOrigin(value: string): string {\n const url = new URL(value);\n const hostname = url.hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n const isLoopback = hostname === 'localhost' || hostname === '::1' || /^127(?:\\.\\d{1,3}){3}$/.test(hostname);\n if (\n url.protocol !== 'http:'\n || !isLoopback\n || url.port.length === 0\n || url.username.length > 0\n || url.password.length > 0\n || url.pathname !== '/'\n || url.search.length > 0\n || url.hash.length > 0\n || url.origin !== value\n ) throw new Error('Dev-companion address must be one exact loopback HTTP origin with an explicit port.');\n return value;\n}\n"]}
1
+ {"version":3,"file":"local-companion-authority.service.js","sourceRoot":"","sources":["../../../../src/services/companion/local-companion-authority.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,qEAAqE,CAAC;AAC1H,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAC;AAC/H,OAAO,EAAE,2BAA2B,EAA+B,MAAM,iDAAiD,CAAC;AAE3H,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAY1C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,GAAmB;IACnE,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC;IACjE,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC/F,MAAM,SAAS,GAAG,MAAM,mCAAmC,CAAC,OAAO,CAAC,CAAC;IACrE,MAAM,SAAS,GAAG,SAAS,EAAE,YAAY,CAAC;IAC1C,MAAM,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,SAAS,CAAC,IAAI,IAAI,WAAW,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3H,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,0E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AAC,MAAM,GAAG,CAAC;WACrB,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;WACnB,GAAG,CAAC,MAAM,KAAK,KAAK;QACvB,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACzG,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { CommandContext } from '~wildo-cli/kernel/types';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { COMPANION_TOKEN_HEADER, readCompanionTokenNoFollow } from '~wildo-cli/services/companion/companion-local-token.utils';\nimport { CompanionRequestRetryPolicy, type CompanionClientOptions } from '~wildo-cli/services/companion/companion.schemas';\n\nconst LOCAL_COMPANION_TIMEOUT_MS = 10_000;\n\n/**\n * Resolved, canonical local companion destination. It deliberately carries\n * no credential: token bytes stay inside {@link requestAuthorizedLocalCompanion}.\n */\nexport interface LocalCompanionTarget {\n readonly appRoot: string;\n readonly origin: string;\n readonly clientOptions: CompanionClientOptions;\n}\n\n/**\n * Resolve the configured companion only when it is exactly one loopback HTTP\n * origin. CLI callers share this boundary rather than independently parsing\n * app-local addresses and slowly weakening machine-local authority rules.\n */\nexport async function resolveLocalCompanionTarget(ctx: CommandContext): Promise<LocalCompanionTarget> {\n const appRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!appRoot) throw new Error('Local companion commands require a targeted SaaS application.');\n const addresses = await loadAppLocalRuntimeServiceAddresses(appRoot);\n const companion = addresses?.devCompanion;\n const rawOrigin = companion?.url ?? (companion?.port ? `http://${companion.host ?? 'localhost'}:${companion.port}` : null);\n if (!rawOrigin) throw new Error('The targeted application does not declare a local dev-companion address.');\n const origin = assertCanonicalLoopbackOrigin(rawOrigin);\n /*\n * `appRoot` rides in the client options — not as a credential (it is a path), but as the ONE thing\n * `CompanionClient` needs to find one. It is what makes a caller that issues a bare\n * `CompanionClient.request(..., target.clientOptions)` authorized anyway: before this, the only\n * authorized sender was `requestAuthorizedLocalCompanion` below, and remembering to call it was\n * the whole contract. It had zero callers.\n */\n return { appRoot, origin, clientOptions: { appRoot, baseUrl: origin, timeoutMs: LOCAL_COMPANION_TIMEOUT_MS } };\n}\n\n/**\n * Perform one authorized local-companion operation without exposing the token\n * to a command/service caller. The read is no-follow, permission-checked and\n * inode-stable so a symlink or replacement cannot redirect authority.\n */\nexport async function requestAuthorizedLocalCompanion(\n target: LocalCompanionTarget,\n path: string,\n init: RequestInit,\n retryPolicy: CompanionRequestRetryPolicy = CompanionRequestRetryPolicy.NO_RETRY,\n): Promise<Response> {\n const token = await readCompanionTokenNoFollow(target.appRoot);\n return CompanionClient.request(path, init, {\n ...target.clientOptions,\n headers: { [COMPANION_TOKEN_HEADER]: token },\n }, retryPolicy);\n}\n\nfunction assertCanonicalLoopbackOrigin(value: string): string {\n const url = new URL(value);\n const hostname = url.hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n const isLoopback = hostname === 'localhost' || hostname === '::1' || /^127(?:\\.\\d{1,3}){3}$/.test(hostname);\n if (\n url.protocol !== 'http:'\n || !isLoopback\n || url.port.length === 0\n || url.username.length > 0\n || url.password.length > 0\n || url.pathname !== '/'\n || url.search.length > 0\n || url.hash.length > 0\n || url.origin !== value\n ) throw new Error('Dev-companion address must be one exact loopback HTTP origin with an explicit port.');\n return value;\n}\n"]}