@wildo-ai/dev-companion 1.1.8 → 1.1.9

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 (325) hide show
  1. package/bin/companion-supervisor.d.mts +33 -0
  2. package/bin/companion-supervisor.mjs +174 -0
  3. package/bin/wildo-dev-companion-supervised.mjs +16 -0
  4. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  5. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +8 -2
  6. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  8. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +8 -2
  9. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +1 -1
  11. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  12. package/dist/esm/brand/services/brand-accept.companion.service.js +9 -11
  13. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  14. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +21 -0
  15. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -1
  16. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +33 -1
  17. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -1
  18. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +41 -2
  19. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  20. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +43 -1
  21. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  22. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +57 -1
  23. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  24. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +75 -1
  25. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  26. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +90 -5
  27. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  28. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +242 -22
  29. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  30. package/dist/esm/companion-api/companion-api.schemas.d.ts +23 -2
  31. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  32. package/dist/esm/companion-api/companion-api.schemas.js +13 -2
  33. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  34. package/dist/esm/companion-api/controllers/companion.controller.d.ts +63 -7
  35. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  36. package/dist/esm/companion-api/controllers/companion.controller.js +315 -39
  37. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  38. package/dist/esm/core/config/primary-language.companion.utils.d.ts +5 -4
  39. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  40. package/dist/esm/core/config/primary-language.companion.utils.js +5 -4
  41. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  42. package/dist/esm/core/context/application-module-generations.companion.d.ts +103 -0
  43. package/dist/esm/core/context/application-module-generations.companion.d.ts.map +1 -0
  44. package/dist/esm/core/context/application-module-generations.companion.js +313 -0
  45. package/dist/esm/core/context/application-module-generations.companion.js.map +1 -0
  46. package/dist/esm/core/context/companion-package-loaders.companion.d.ts +19 -19
  47. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  48. package/dist/esm/core/context/companion-package-loaders.companion.js +52 -40
  49. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  50. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  51. package/dist/esm/core/inject/models/container.js +4 -0
  52. package/dist/esm/core/inject/models/container.js.map +1 -1
  53. package/dist/esm/core/inject/models/service-types.d.ts +4 -0
  54. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  55. package/dist/esm/core/inject/models/service-types.js +4 -0
  56. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  57. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +15 -1
  58. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -1
  59. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +38 -3
  60. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -1
  61. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +21 -0
  62. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -1
  63. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +64 -25
  64. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -1
  65. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  66. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +2 -0
  67. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  68. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +0 -28
  69. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  70. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +192 -19
  71. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  72. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  73. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +27 -5
  74. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  75. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +47 -0
  76. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -0
  77. package/dist/esm/core/introspection/resources/launch-blockers.companion.js +98 -0
  78. package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -0
  79. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +6 -1
  80. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  81. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +20 -1
  82. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  83. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts +34 -8
  84. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  85. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +61 -12
  86. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
  87. package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts +44 -0
  88. package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts.map +1 -0
  89. package/dist/esm/core/introspection/services/introspection-input-closure.companion.js +104 -0
  90. package/dist/esm/core/introspection/services/introspection-input-closure.companion.js.map +1 -0
  91. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +41 -22
  92. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  93. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +64 -47
  94. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  95. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts +7 -1
  96. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
  97. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js +13 -4
  98. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js.map +1 -1
  99. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  100. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +7 -0
  101. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  102. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
  103. package/dist/esm/core/runtime/companion-env-file.d.ts +39 -9
  104. package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -1
  105. package/dist/esm/core/runtime/companion-env-file.js +75 -16
  106. package/dist/esm/core/runtime/companion-env-file.js.map +1 -1
  107. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +7 -3
  108. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  109. package/dist/esm/core/runtime/services/start-companion-application.service.js +29 -11
  110. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  111. package/dist/esm/core/utils/bounded-concurrency.utils.d.ts +17 -0
  112. package/dist/esm/core/utils/bounded-concurrency.utils.d.ts.map +1 -0
  113. package/dist/esm/core/utils/bounded-concurrency.utils.js +37 -0
  114. package/dist/esm/core/utils/bounded-concurrency.utils.js.map +1 -0
  115. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +10 -1
  116. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -1
  117. package/dist/esm/core/utils/derived-input-signature.companion.utils.js +9 -2
  118. package/dist/esm/core/utils/derived-input-signature.companion.utils.js.map +1 -1
  119. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
  120. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +2 -0
  121. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
  122. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
  123. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +66 -6
  124. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
  125. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts +0 -17
  126. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  127. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +10 -4
  128. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  129. package/dist/esm/email/services/email-template.companion.service.d.ts +6 -1
  130. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  131. package/dist/esm/email/services/email-template.companion.service.js +4 -1
  132. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  133. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  134. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +8 -2
  135. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  136. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  137. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +8 -2
  138. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  139. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  140. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +7 -7
  141. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  142. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
  143. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +41 -1
  144. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
  145. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  146. package/dist/esm/i18n/resources/workbenchAspects.en.js +7 -0
  147. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  148. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +5 -0
  149. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -1
  150. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +5 -0
  151. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -1
  152. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +1 -1
  153. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  154. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +2 -1
  155. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
  156. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +46 -0
  157. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
  158. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +12 -0
  159. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
  160. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +266 -0
  161. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  162. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +91 -5
  163. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  164. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +41 -0
  165. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  166. package/dist/esm/i18n/system_enums/application-creation.en.js +45 -1
  167. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  168. package/dist/esm/i18n/system_enums/localization.en.d.ts +82 -0
  169. package/dist/esm/i18n/system_enums/localization.en.d.ts.map +1 -0
  170. package/dist/esm/i18n/system_enums/localization.en.js +82 -0
  171. package/dist/esm/i18n/system_enums/localization.en.js.map +1 -0
  172. package/dist/esm/i18n/system_enums/risk-register.en.d.ts +1 -0
  173. package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -1
  174. package/dist/esm/i18n/system_enums/risk-register.en.js +1 -0
  175. package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -1
  176. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +10 -0
  177. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
  178. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +13 -0
  179. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
  180. package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts +43 -0
  181. package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts.map +1 -0
  182. package/dist/esm/i18n-labelling/models/labelling-progress.models.js +34 -0
  183. package/dist/esm/i18n-labelling/models/labelling-progress.models.js.map +1 -0
  184. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +8 -0
  185. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  186. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +97 -56
  187. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  188. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +18 -0
  189. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  190. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +269 -153
  191. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  192. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts +41 -0
  193. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts.map +1 -0
  194. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js +47 -0
  195. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js.map +1 -0
  196. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts +12 -0
  197. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  198. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -2
  199. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
  200. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts +89 -0
  201. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts.map +1 -0
  202. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js +229 -0
  203. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js.map +1 -0
  204. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +67 -1
  205. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -1
  206. package/dist/esm/meta-workflows/models/build-task-rearm.models.js +64 -0
  207. package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -1
  208. package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts +308 -0
  209. package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts.map +1 -0
  210. package/dist/esm/meta-workflows/models/creation-intervention.models.js +365 -0
  211. package/dist/esm/meta-workflows/models/creation-intervention.models.js.map +1 -0
  212. package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts +61 -0
  213. package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts.map +1 -0
  214. package/dist/esm/meta-workflows/models/generation-step-progress.models.js +58 -0
  215. package/dist/esm/meta-workflows/models/generation-step-progress.models.js.map +1 -0
  216. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +10 -6
  217. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  218. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +11 -6
  219. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  220. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +3 -0
  221. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
  222. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +8 -1
  223. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
  224. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +26 -0
  225. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  226. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +66 -10
  227. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  228. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +13 -0
  229. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -0
  230. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +33 -0
  231. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -0
  232. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts +145 -0
  233. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts.map +1 -0
  234. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js +179 -0
  235. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js.map +1 -0
  236. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +376 -17
  237. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  238. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +805 -39
  239. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  240. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +93 -7
  241. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  242. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +142 -25
  243. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  244. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +120 -3
  245. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  246. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +325 -16
  247. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  248. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
  249. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +15 -6
  250. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
  251. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -1
  252. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +10 -11
  253. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -1
  254. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
  255. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +10 -11
  256. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
  257. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts +82 -0
  258. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -0
  259. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +291 -0
  260. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -0
  261. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts +60 -0
  262. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts.map +1 -0
  263. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js +66 -0
  264. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js.map +1 -0
  265. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +53 -0
  266. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -0
  267. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +164 -0
  268. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -0
  269. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts +37 -0
  270. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts.map +1 -0
  271. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js +52 -0
  272. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js.map +1 -0
  273. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -14
  274. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
  275. package/dist/esm/meta-workflows/services/dossier.companion.service.js +180 -28
  276. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
  277. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +2 -3
  278. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  279. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +2 -8
  280. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  281. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts +67 -0
  282. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts.map +1 -0
  283. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js +64 -0
  284. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js.map +1 -0
  285. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -1
  286. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +11 -3
  287. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -1
  288. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +92 -4
  289. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  290. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +328 -7
  291. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  292. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +105 -6
  293. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  294. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +309 -39
  295. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  296. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +62 -1
  297. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -1
  298. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +152 -2
  299. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -1
  300. package/package.json +22 -18
  301. package/dist/esm/.tsbuildinfo +0 -1
  302. package/dist/esm/__tests__/asset-noop.d.ts +0 -3
  303. package/dist/esm/__tests__/asset-noop.d.ts.map +0 -1
  304. package/dist/esm/__tests__/asset-noop.js +0 -2
  305. package/dist/esm/__tests__/asset-noop.js.map +0 -1
  306. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts +0 -2
  307. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +0 -1
  308. package/dist/esm/__tests__/chdir-dogfood-app.setup.js +0 -44
  309. package/dist/esm/__tests__/chdir-dogfood-app.setup.js.map +0 -1
  310. package/dist/esm/__tests__/internal-test-view.d.ts +0 -39
  311. package/dist/esm/__tests__/internal-test-view.d.ts.map +0 -1
  312. package/dist/esm/__tests__/internal-test-view.js +0 -2
  313. package/dist/esm/__tests__/internal-test-view.js.map +0 -1
  314. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +0 -50
  315. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +0 -1
  316. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +0 -157
  317. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +0 -1
  318. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts +0 -8
  319. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +0 -1
  320. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +0 -43
  321. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +0 -1
  322. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +0 -79
  323. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +0 -1
  324. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +0 -193
  325. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-generation-step.companion.service.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-generation-step.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,qCAAqC,GAEtC,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAuB,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE/G,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAGhG,OAAO,EAAE,uBAAuB,EAAsB,MAAM,oDAAoD,CAAC;AAEjH,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,qCAAqC,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACxI,OAAO,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EACL,qCAAqC,GAEtC,MAAM,wEAAwE,CAAC;AAChF,OAAO,EACL,qCAAqC,GAEtC,MAAM,wEAAwE,CAAC;AAChF,OAAO,EACL,6BAA6B,GAG9B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,gCAAgC,GAEjC,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACL,2BAA2B,GAE5B,MAAM,qDAAqD,CAAC;AAG7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,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CAAA;AAxXY,8CAA8C;IAD1D,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,WAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;IACpD,WAAA,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IAClD,WAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;iEAN+B,gCAAgC;QACzB,qCAAqC;QACrC,qCAAqC;QACxC,6BAA6B;QACxB,gCAAgC;QAC1C,2BAA2B;GAZpG,8CAA8C,CAwX1D","sourcesContent":["import * as path from 'node:path';\nimport {\n ApplicationSchemaPlanObligation,\n SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH,\n assessApplicationSchemaPlanObligation,\n type ApplicationSchemaPlanObligationAssessment,\n} from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { stat } from 'node:fs/promises';\nimport { existsSync, readdirSync } from 'node:fs';\nimport { inject, injectable } from 'inversify';\n\nimport type { AppConfigurationService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError, executeBoundedSubprocess } from '@wildo-ai/saas-backend-lib';\nimport type { PropagateBrandAssetsOutcome } from '@wildo-ai/application-creation-runtime';\nimport { propagateAcceptedBrand } from '../../brand/services/brand-propagation.companion.utils';\nimport type { TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { BuildPlanTaskTargetKind, type BuildPlanTask } from '@wildo-ai/saas-specifications/application-creation';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { getCompanionConfiguredPrimaryLanguage, getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils';\nimport { signDerivedInputs } from '../../core/utils/derived-input-signature.companion.utils';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport {\n LabellizeOrchestratorCompanionService,\n type LabellizeRunResult,\n} from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport {\n TranslateOrchestratorCompanionService,\n type TranslateRunResult,\n} from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport {\n EmailTemplateCompanionService,\n type GenerateEmailTemplatesResult,\n type TranslateEmailTemplateLabelsResult,\n} from '../../email/services/email-template.companion.service';\nimport {\n LogoDeliberationCompanionService,\n type LogoDeliberationResult,\n} from '../../brand/services/logo-deliberation.companion.service';\nimport {\n BrandAcceptCompanionService,\n type BrandAcceptResult,\n} from '../../brand/services/brand-accept.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\n\n/**\n * The companion generation steps this host can EXECUTE.\n *\n * The values are the `generationStepRef` slugs a build plan authors on a\n * `COMPANION_GENERATION_STEP` target — the closed vocabulary this enum is the\n * named home of. A build plan may only reference steps that exist here: an\n * unknown ref refuses by name (below) instead of silently parking the build,\n * which is exactly how the first generation step ever authored\n * (`i18n-labels`) stalled the Wonder Todos build plan — the vocabulary\n * existed in `_core`, and nothing executed it.\n *\n * Seeds join this enum WHEN a seed-generation pipeline exists to execute —\n * adding the value without one would let a build plan dispatch a step that can\n * only fail; the unknown-ref refusal below is the honest answer until then.\n * The executor is the integration point, not a new lane per step.\n */\nexport enum ApplicationBuildGenerationStep {\n I18N_LABELS = 'i18n-labels',\n EMAIL_TEMPLATES = 'email-templates',\n /**\n * The brand mark: an expert panel derives creative directions, images are generated, a vision\n * judge scores them, and the winner is promoted into the specifications SSOT.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it. That pipeline was fully built and reachable only by a human issuing\n * `POST /brand/{generate,deliberate,accept}-logo`, so an application could acquire a considered\n * mark only if someone drove it by hand (issue #220). Hand-supplying a logo stays available and\n * unchanged; what this adds is the journey's own path to one.\n */\n LOGO = 'logo',\n /**\n * `wildo db generate` — turn the drift between the application's resource model and its accepted\n * schema plan into a committed migration, so a PostgreSQL-backed application's tables exist.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it. The pipeline is the CLI's own generate door, which already owns every hard part\n * (the planner, the risk vocabulary, the refusals) and advances the lockfile in the same\n * invocation that writes the migration.\n *\n * Without a lockfile `wildo db generate` treats the whole model as the INITIAL migration and writes\n * the baseline beside it. That is exactly what a PostgreSQL application with no baseline owes, and\n * exactly wrong for a MongoDB-backed one, where it would author a table set nothing uses — so the\n * application's DECLARED store decides (#1144, `ApplicationSchemaPlanObligation`): the step runs\n * for an accepted plan or an owed baseline, and REFUSES for a MongoDB store or an unreadable\n * declaration. See `executeGenerationStep`.\n */\n DATABASE_MIGRATIONS = 'database-migrations',\n /**\n * `wildo docs publish` — derive, render, measure, validate and write the application's customer\n * documentation portal, so the chapters its build authored are something a reader can reach.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it — and it is the same shape {@link LOGO} joined in: the pipeline was fully built and\n * reachable ONLY by a human, through `POST /technical-doc/publish-managed` or the `wildo docs\n * publish` command that calls it. Measured on the first end-to-end journey run (#1273): the plan\n * carried SIX `DOCUMENTATION_CHAPTER` tasks, the engine's own derivation refused with *\"Application\n * content remains absent until the app-creator owns an accepted authoring artifact\"*, an agent\n * built that artifact — and nothing published it. `technical-doc` could not even typecheck, because\n * `src/pages/search.tsx` imports a search index the publish is what writes, so\n * `check:technical-doc-typecheck` was red for the whole build and failed a documentation task on a\n * red it did not cause, at $19.33.\n *\n * The step is DERIVED by the dispatch host rather than authored by the decomposer, for the reason\n * {@link DATABASE_MIGRATIONS} is: an application owes it as a consequence of what its plan\n * contains — here, any documentation chapter — rather than as a decision the plan makes. See\n * `withHostDerivedDocumentationPublicationStep`.\n *\n * It runs AFTER the chapters and after `i18n-labels`, and the second is not optional: publication\n * resolves the application's organization-role documentation and refuses without the primary-locale\n * label — *\"requires primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role\n * labels before publishing documentation\"*. Running it early fails on exactly that.\n */\n DOCUMENTATION_PUBLICATION = 'documentation-publication',\n}\n\n/** The compiled registry `wildo db` imports to compute the current plan. Absent ⇒ the plan cannot be computed. */\nconst MODULES_REGISTRY_RELATIVE_PATH = 'backend-api/dist/modules-registry.backend.js';\n\n/** Bounds on the `wildo db generate` subprocess. Generous: it spawns a runner that imports the whole app registry. */\nconst MIGRATION_GENERATION_TIMEOUT_MS = 10 * 60 * 1000;\n\n/**\n * How a generation step proves it did its work.\n *\n * Two kinds, because the obvious single answer does not fit every step. Most steps write FILES\n * whose paths are known before they run, and \"landed\" means those files are committed. A migration\n * step cannot: its artifact is `backend-api/migrations/<timestamp>_<name>/migration.sql`, and the\n * timestamp is minted DURING the run.\n *\n * The tempting substitutes were both rejected, and the reasons are worth keeping:\n *\n * - the accepted lockfile — once a plan is accepted it ALREADY EXISTS before every later run of the\n * step, so \"is it committed?\" is trivially true and the step would land having done nothing. That is precisely the directory-prefix shortcut this service's `LOGO` case warns about.\n * - an empty path list — legal, and it makes the dispatch host SKIP the landed check entirely, so a\n * step that generated nothing would read as complete.\n *\n * So the migration step's evidence is not a file at all: it is the STATE the step exists to reach —\n * the model and the accepted plan agree. That is what `wildo db diff --check` answers.\n */\nexport enum ApplicationBuildGenerationStepLandedKind {\n /** Landed when every named path is committed. The shape every file-writing step uses. */\n COMMITTED_PATHS = 'committed_paths',\n /** Landed when the resource model and the accepted schema plan agree. */\n SCHEMA_PLAN_IN_SYNC = 'schema_plan_in_sync',\n}\n\n/** What the dispatch host must evaluate to decide whether a generation-step task has landed. */\nexport type ApplicationBuildGenerationStepLandedCondition =\n | { readonly kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS; readonly paths: readonly string[] }\n | { readonly kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC };\n\n/**\n * What `wildo db diff --check` could tell the host about the resource model versus the accepted schema plan.\n *\n * THREE answers, not two. A boolean merged the two failures that lead to opposite places (found in review,\n * 2026-09-13): DRIFTED means the migration step has work and must run first; UNANSWERABLE means the check did not\n * report drift and did not pass — no accepted plan and an undeterminable store declaration, no built backend registry, a compiled model older than its\n * sources (`assessCompiledModelCurrency`, #403: before it, a dead watcher's stale dist answered IN_SYNC and landed\n * this step with drift on disk), a CLI that could not import\n * it or could not be spawned, a timeout, a lockfile that fails strict parsing, or an ENGINE planner-contract\n * mismatch (whose remedy is `wildo db generate --accept-planner-contract`, not a rebuild) — and\n * running the step then only throws. Read as one \"not in sync\", an unanswerable check put a step that can\n * only fail at the head of the build queue on every dispatch, so no other task could run.\n *\n * Only IN_SYNC ever lands the step: an unanswered question must not land a migration step either.\n */\nexport enum SchemaPlanSyncState {\n /** The model and the accepted plan agree: the migration step has landed. */\n IN_SYNC = 'in_sync',\n /** The check ran and reported ungenerated changes: the migration step has work to do. */\n DRIFTED = 'drifted',\n /** The check neither passed nor reported drift (see above for the causes); running the step now would refuse or fail. */\n UNANSWERABLE = 'unanswerable',\n}\n\n/**\n * The line `wildo db diff --check` prints when, and only when, it found drift. The CLI exits non-zero for\n * drift and for every could-not-ask failure alike, so this text is the one thing that separates them. A COPY\n * of the message in the CLI's `commands/db/diff.command.ts`, pinned to it by a source-parity test.\n */\nexport const SCHEMA_PLAN_DRIFT_OUTPUT_MARKER = 'ungenerated schema change(s)';\n\n/** Classify a failed `wildo db diff --check`: DRIFTED when the CLI said so, UNANSWERABLE otherwise. */\nexport function classifySchemaPlanCheckFailure(error: unknown): SchemaPlanSyncState {\n const details = (error as { details?: { stdout?: unknown; stderr?: unknown } } | null | undefined)?.details;\n const output = `${typeof details?.stdout === 'string' ? details.stdout : ''}\\n${typeof details?.stderr === 'string' ? details.stderr : ''}`;\n return output.includes(SCHEMA_PLAN_DRIFT_OUTPUT_MARKER) ? SchemaPlanSyncState.DRIFTED : SchemaPlanSyncState.UNANSWERABLE;\n}\n\n/**\n * The SSOT module `brand-accept` rewrites when it promotes a winner.\n *\n * Restated here rather than imported because it is a module-private constant of the brand service;\n * the two must agree, and the pin in this lane's tests is what says so.\n */\nconst BRAND_RESOLVED_ASSETS_MODULE = 'resolved-assets.generated.ts';\n\n/** A build plan referenced a generation step this companion cannot execute. Named, so the plan author sees the vocabulary. */\nexport class ApplicationBuildUnknownGenerationStepError extends Error {\n public constructor(taskRef: string, generationStepRef: string) {\n super(\n `Build task ${taskRef} references generation step \"${generationStepRef}\", which this companion cannot execute. `\n + `Known steps: ${Object.values(ApplicationBuildGenerationStep).join(', ')}.`,\n );\n }\n}\n\n/** What one executed i18n-labels step did — the per-pipeline results, verbatim. */\nexport interface ApplicationBuildI18nLabelsStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.I18N_LABELS;\n /** Primary-locale label generation (incremental — fresh units are skipped by the freshness lock). */\n readonly labellize: LabellizeRunResult;\n /** Translation into the other enabled locales; absent when the app enables only its primary locale. */\n readonly translate?: TranslateRunResult;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/** What one executed email-templates step did — the per-pipeline results, verbatim. */\nexport interface ApplicationBuildEmailTemplatesStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.EMAIL_TEMPLATES;\n /** Primary-locale template + labels generation (incremental — existing template+labels pairs are skipped). */\n readonly emailGenerate: GenerateEmailTemplatesResult;\n /** Label translation into the other enabled locales; absent when the app enables only its primary locale. */\n readonly emailTranslate?: TranslateEmailTemplateLabelsResult;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed logo step did.\n *\n * `deliberation`/`accept` are absent when the step was SKIPPED because the application already has\n * an accepted mark — see the executor for why skipping is the incremental answer here rather than\n * the freshness lock the text pipelines use.\n */\nexport interface ApplicationBuildLogoStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.LOGO;\n /** The expert-panel deliberation that derived directions, generated marks and picked a winner. */\n readonly deliberation?: LogoDeliberationResult;\n /** Promotion of that winner into `specifications/src/brand/` — images plus the rewritten SSOT. */\n readonly accept?: BrandAcceptResult;\n /** True when an accepted mark already existed and no model was called. */\n readonly skippedBecauseAlreadyAccepted: boolean;\n /**\n * The accepted mark copied to every surface that serves it — the app's public folder and runtime\n * config, the documentation portal, the website's icons and Open Graph image. Runs on BOTH branches:\n * a surface composed after the mark was accepted (a website added later) still receives it.\n */\n readonly propagation?: PropagateBrandAssetsOutcome;\n /** Why propagation could not run. Never fails the step: the mark is accepted either way. */\n readonly propagationError?: string;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed `database-migrations` step did.\n *\n * `evidencePaths` is present for symmetry with its siblings and carries the MUTATION SCOPE, not the\n * landed evidence — this step lands on `SCHEMA_PLAN_IN_SYNC`, never on a path.\n */\nexport interface ApplicationBuildDatabaseMigrationsStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.DATABASE_MIGRATIONS;\n /** True when the plan was already in sync and `wildo db generate` had nothing to write. */\n readonly skippedBecauseAlreadyInSync: boolean;\n /** The migration folder names present after the run that were not present before it. Usually 0 or 1. */\n readonly generatedMigrationFolders: readonly string[];\n /** The generator's own output tail — it names the tables and the risk of each change. */\n readonly outputTail: string;\n /** MUTATION SCOPE, not landed evidence. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed `documentation-publication` step did.\n *\n * `published` is the publish service's own report — output count and root — kept whole rather than\n * projected, because the step's value to a reader is \"what did it write\", and this lane has no\n * second opinion about that.\n */\nexport interface ApplicationBuildDocumentationPublicationStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION;\n /** The publish service's report. */\n readonly published: unknown;\n /** The rendered search index, which is both this step's mutation scope and its landed evidence. */\n readonly evidencePaths: readonly string[];\n}\n\n/** One executed generation step's result, discriminated by the step it ran. */\nexport type ApplicationBuildGenerationStepRunResult =\n | ApplicationBuildI18nLabelsStepRunResult\n | ApplicationBuildEmailTemplatesStepRunResult\n | ApplicationBuildLogoStepRunResult\n | ApplicationBuildDatabaseMigrationsStepRunResult\n | ApplicationBuildDocumentationPublicationStepRunResult;\n\n/**\n * The identity allowlist for the `wildo db generate` subprocess.\n *\n * PATH is the load-bearing entry: the CLI is a GLOBAL install and is deliberately NOT linked into an\n * application's `node_modules/.bin` — verified on both dogfood applications — so it is reachable\n * only through PATH. Kept to the same minimal set the verification hook uses rather than passing the\n * companion's whole environment.\n */\nfunction buildMigrationSubprocessEnv(): NodeJS.ProcessEnv {\n const env: NodeJS.ProcessEnv = {};\n for (const key of ['PATH', 'HOME', 'USER', 'LOGNAME', 'SHELL', 'TERM']) {\n const value = process.env[key];\n if (value !== undefined) env[key] = value;\n }\n return env;\n}\n\n/** Migration folder names currently on disk (not the lockfile beside them). */\nfunction listMigrationFolders(saasRoot: string): readonly string[] {\n const migrationsRoot = path.join(saasRoot, 'backend-api', 'migrations');\n if (!existsSync(migrationsRoot)) return [];\n return readdirSync(migrationsRoot, { withFileTypes: true })\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name)\n .sort();\n}\n\n/**\n * Execute companion-owned generation steps of a build plan, and answer which\n * files each step is responsible for.\n *\n * A `COMPANION_GENERATION_STEP` is deterministic in its ROUTING and its\n * PLACEMENT — which pipeline runs and where the files land is decided by\n * code, never by a coding agent (`application-build-task-coding-policy`\n * refuses to compose a coding contract for one). The CONTENT may still come\n * from a model (labels are generated text), which is exactly the directive's\n * bucket-3 shape: a companion-owned generation step interleaved by the build\n * loop.\n *\n * ## Landed evidence, and why it is planner-derived\n *\n * The build lane's landed answer is GIT: a task has landed when the files it\n * produces are committed. A generation step's target carries only its\n * `generationStepRef` — no paths — so the file set must be DERIVED. For\n * `i18n-labels` it is the labelling planner's unit inventory crossed with the\n * app's enabled locales: exactly the files the pipelines write, re-derivable\n * after a restart, a fresh clone, or a branch switch. Deliberately NOT the\n * whole i18n directory: that is already committed on any app with history, and\n * a directory-prefix check would report the step landed without it ever\n * having run for the units it still owes.\n */\n/**\n * The last schema-plan sync answer per application root, valid while its input signature holds.\n *\n * Module-level rather than per-instance so two service instances resolving landing concurrently — a\n * board read and a `/build/next` — share one 8-9 s subprocess instead of spawning two.\n */\nconst schemaPlanSyncStateCache = new Map<string, { signature: string; state: SchemaPlanSyncState }>();\n\n/** Answers still being computed, so concurrent callers at the same signature await one subprocess. */\nconst schemaPlanSyncStateInFlight = new Map<string, { signature: string | null; compute: Promise<SchemaPlanSyncState> }>();\n\n/**\n * The files that decide the schema-plan sync answer: the compiled MODEL and the ACCEPTED PLAN.\n *\n * Exported so the freshness loop below signs exactly what the resolver signs. Two copies of this list\n * would let the loop refresh on a change the resolver ignores, or miss one it honours.\n */\nexport function signSchemaPlanInputs(saasRoot: string): string | null {\n return signDerivedInputs(\n [path.join(saasRoot, 'backend-api', 'dist'), path.join(saasRoot, 'infrastructure'), ...resolveEngineDistRoots(saasRoot)],\n [path.join(saasRoot, SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH)],\n );\n}\n\n/**\n * The compiled ENGINE the backend resolves: every `@wildo-ai/*` package's `dist` under\n * `backend-api/node_modules`. The engine declares resources (the planner plans them) and owns the\n * planner, so an engine change moves the schema plan without touching either app-local input.\n *\n * Signed since 2026-09-25. It used to be the one unsigned input, on the premise that an engine change\n * respawns the companion and empties this cache. On scratch-journey the companion ran from 12:20Z\n * while engine resources landed in the app's injected snapshot at 13:04Z and 13:41Z: its supervisor\n * was paused and did not restart it. The cache kept answering IN_SYNC, and the build plan reported the\n * migrations step LANDED with 16 changes owed. Walking all six packages there costs about 80 ms,\n * against about 8.5 s to re-derive. The enumeration is total, so a package that starts declaring\n * resources is covered the day it does.\n */\nfunction resolveEngineDistRoots(saasRoot: string): readonly string[] {\n const scope = path.join(saasRoot, 'backend-api', 'node_modules', '@wildo-ai');\n if (!existsSync(scope)) return [];\n return readdirSync(scope)\n .sort()\n .map((name) => path.join(scope, name, 'dist'))\n .filter((dist) => existsSync(dist));\n}\n\n/**\n * The cached schema-plan sync answer for one application root.\n *\n * Module-level rather than a class member because it never used instance state, and because the\n * COMPANION BOOT path warms it (`startIntrospectionFreshnessPlane`). Reaching it through the service\n * would drag the labelling, email and brand service graph into the boot graph to answer a question\n * about two files — and a boot path that fails closed needs the companion it just stopped\n * (`continuity-drift-and-cas-basis.md` Rule 3).\n */\nexport async function resolveSchemaPlanSyncState(saasRoot: string): Promise<SchemaPlanSyncState> {\n /*\n * The answer costs a `wildo db diff --check` SUBPROCESS, which boots the CLI and imports the\n * application's compiled modules registry: measured 8-14 s on `examples/wonder-todos`, 2026-09-18,\n * of which ~5.5 s is the registry import alone. It is asked on every landing resolution — so on\n * every creation-board refresh and every `/build/next` — and it was the single largest remaining\n * cost of both.\n *\n * Nothing about that answer can change unless the MODEL or the ACCEPTED PLAN changes, and both are\n * files. So it is re-derived when they move and reused when they do not: ~17 ms to sign against\n * ~8500 ms to re-run. A TTL is not used here for the same reason the specifications loader has\n * none — this state decides whether the migration step is offered, so drift must surface at the\n * next read rather than at the next expiry.\n *\n * The ENGINE reaches the application through node_modules rather than through either app-local path,\n * so its compiled packages are signed as well (see `resolveEngineDistRoots`). This used to rely on an\n * engine change respawning the companion; one survived an engine change on 2026-09-25 and served a\n * stale IN_SYNC. The answer is still NOT persisted to disk across restarts (#1350).\n */\n const signature = signSchemaPlanInputs(saasRoot);\n if (signature !== null) {\n const cached = schemaPlanSyncStateCache.get(saasRoot);\n if (cached?.signature === signature) return cached.state;\n const inFlight = schemaPlanSyncStateInFlight.get(saasRoot);\n if (inFlight?.signature === signature) return inFlight.compute;\n }\n\n const compute = computeSchemaPlanSyncState(saasRoot);\n schemaPlanSyncStateInFlight.set(saasRoot, { signature, compute });\n try {\n const state = await compute;\n if (signature !== null) schemaPlanSyncStateCache.set(saasRoot, { signature, state });\n return state;\n } finally {\n // A failed derivation caches nothing, so the next caller retries rather than inheriting it.\n if (schemaPlanSyncStateInFlight.get(saasRoot)?.compute === compute) {\n schemaPlanSyncStateInFlight.delete(saasRoot);\n }\n }\n}\n\nasync function computeSchemaPlanSyncState(saasRoot: string): Promise<SchemaPlanSyncState> {\n const { obligation } = await assessApplicationSchemaPlanObligation(saasRoot);\n if (obligation === ApplicationSchemaPlanObligation.NOT_OWED || obligation === ApplicationSchemaPlanObligation.UNDETERMINED) {\n return SchemaPlanSyncState.UNANSWERABLE;\n }\n if (!existsSync(path.join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH))) return SchemaPlanSyncState.UNANSWERABLE;\n if (obligation === ApplicationSchemaPlanObligation.BASELINE_OWED) {\n /*\n * No baseline yet, so the whole model is ungenerated: that is DRIFT, and the step has work. But\n * `diff --check` refuses outright without a lockfile, so it cannot tell drift from could-not-ask\n * here. Plain `wildo db diff` can: it computes the model (refusing a stale or unloadable one, #403)\n * and, with no lockfile, reports the table count and succeeds. Only a computable model is drift.\n */\n try {\n await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'diff'],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n return SchemaPlanSyncState.DRIFTED;\n } catch {\n return SchemaPlanSyncState.UNANSWERABLE;\n }\n }\n try {\n await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'diff', '--check'],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n return SchemaPlanSyncState.IN_SYNC;\n } catch (error) {\n // Drift is named in the CLI's own output; an absent CLI or a runner that could not import the\n // registry is not, and must not put the step at the head of the queue.\n return classifySchemaPlanCheckFailure(error);\n }\n}\n\n@injectable()\nexport class ApplicationBuildGenerationStepCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly planner: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellize: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translate: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplates: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberation: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAccept: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDoc: TechnicalDocCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildGenerationStep');\n }\n\n /**\n * The app-root-relative files this task's generation step is responsible\n * for. The landed check treats the task as landed when EVERY one of them is\n * committed — same doctrine as every coding task, same reader\n * (`isWorktreePathCommitted`).\n */\n public async resolveGenerationStepEvidencePaths(task: BuildPlanTask): Promise<readonly string[]> {\n const generationStepRef = this.requireGenerationStepRef(task);\n switch (generationStepRef) {\n case ApplicationBuildGenerationStep.I18N_LABELS: {\n const i18nRoot = this.resolveI18nRelativeRoot();\n const locales = this.resolveEnabledLocales();\n const units = await this.planner.planAllUnits();\n return units.flatMap((unit) =>\n locales.map((locale) => path.posix.join(i18nRoot, unit.filePathHint.bucket, `${unit.filePathHint.slug}.${locale}.ts`)),\n );\n }\n case ApplicationBuildGenerationStep.EMAIL_TEMPLATES:\n // Placement is the email domain's authority; this lane only crosses it with the enabled locales.\n return this.emailTemplates.resolveExpectedArtifactRelativePaths(this.resolveEnabledLocales());\n case ApplicationBuildGenerationStep.LOGO:\n /*\n * The SSOT MODULE alone, deliberately — not the asset images beside it.\n *\n * Evidence must be derivable BEFORE the step runs, and the image filenames cannot be: they\n * are named after whichever mark the panel picks. The module can, and it is the honest\n * marker either way — `brand-accept` writes it only when a winner is promoted, so it is\n * absent on an application that has never accepted a logo and present exactly when one has.\n *\n * This is NOT the directory-prefix shortcut this class's docblock warns about. That check\n * would pass on any app whose `specifications/` is committed at all; this file exists only\n * as a consequence of the step's own work.\n */\n return [path.posix.join('specifications', 'src', 'brand', BRAND_RESOLVED_ASSETS_MODULE)];\n case ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION:\n /*\n * The rendered portal's own index, which the publish is what writes.\n *\n * Honest evidence by the same test {@link LOGO} passes and `DATABASE_MIGRATIONS` fails: this\n * file exists ONLY as a consequence of this step's work. `technical-doc/src/pages/search.tsx`\n * imports it directly, which is why an unpublished application cannot even typecheck that\n * package — so its absence is exactly the state the step exists to leave behind, and its\n * presence is exactly the state the step produces.\n *\n * Deliberately the index rather than the `docusaurus/` output tree: the rendered page set is\n * named after whichever chapters the plan carries, so it cannot be derived BEFORE the step\n * runs, and evidence that cannot be derived in advance is not evidence.\n */\n return [path.posix.join('technical-doc', 'src', 'generated', 'consumer-documentation', 'indexes', 'search.json')];\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS:\n /*\n * ⚠ MUTATION SCOPE ONLY — this path is NOT this step's landed evidence, and using it as\n * such would be the defect the landed-kind vocabulary above exists to prevent: the lockfile\n * already exists before the step runs, so a landed check over it passes having verified\n * nothing.\n *\n * It is named here because the dispatch host derives the task's writable roots from these\n * paths' DIRECTORIES, and `backend-api/migrations/` is exactly right: the step writes the\n * new migration folder and rewrites the lockfile, and nothing else.\n *\n * `resolveGenerationStepLandedCondition` is the only landed authority, and for this step it\n * answers SCHEMA_PLAN_IN_SYNC.\n */\n return [SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH];\n default:\n throw new ApplicationBuildUnknownGenerationStepError(task.taskRef, generationStepRef);\n }\n }\n\n /**\n * How this task proves it landed — the ONLY landed authority for a generation step.\n *\n * Split from {@link resolveGenerationStepEvidencePaths} because that method answers a different\n * question (which paths may this task write?) and the two answers diverge for exactly one step.\n * Reading landing off the evidence paths would land the migration step on a file that predates it.\n */\n public async resolveGenerationStepLandedCondition(\n task: BuildPlanTask,\n ): Promise<ApplicationBuildGenerationStepLandedCondition> {\n const generationStepRef = this.requireGenerationStepRef(task);\n if (generationStepRef === ApplicationBuildGenerationStep.DATABASE_MIGRATIONS) {\n return { kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC };\n }\n return {\n kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS,\n paths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n\n /**\n * Does this application owe migrations, and has it accepted a schema plan yet?\n *\n * The population the `database-migrations` step belongs to, and the fact the dispatch host derives\n * that step from when a build plan omits it (#1027). It reads BOTH the lockfile and the authored\n * `applicationDatabase.engine` (#1144). The lockfile alone was the marker until then, on the premise\n * that the foundation playbook writes a PostgreSQL application's baseline — it never did, so a\n * journey-built PostgreSQL application had no lockfile, was offered no migration step, and booted\n * into tables nothing had created. See {@link ApplicationSchemaPlanObligation}.\n */\n public async assessSchemaPlanObligation(): Promise<ApplicationSchemaPlanObligationAssessment> {\n return assessApplicationSchemaPlanObligation(this.companionContext.saasRoot);\n }\n\n /**\n * Does the resource model agree with the accepted schema plan — and if not, is that DRIFT, or could the\n * question not be asked? See {@link SchemaPlanSyncState} for why those two must never be merged.\n *\n * Only IN_SYNC lands the migration step, so an unknown answer can never land a task that generated\n * nothing. Re-running over a clean plan is harmless (`wildo db generate` reports nothing to generate);\n * running it where the check is unanswerable only throws, which is why the caller passes over it.\n */\n public async readSchemaPlanSyncState(): Promise<SchemaPlanSyncState> {\n return resolveSchemaPlanSyncState(this.companionContext.saasRoot);\n }\n\n /**\n * Run the task's generation step. Incremental by construction: both\n * pipelines consult the freshness lock and skip fresh units, so re-running\n * an already-satisfied step costs a plan read, not a model call.\n */\n public async executeGenerationStep(\n task: BuildPlanTask,\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildGenerationStepRunResult> {\n const generationStepRef = this.requireGenerationStepRef(task);\n switch (generationStepRef) {\n case ApplicationBuildGenerationStep.I18N_LABELS: {\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const targetLocales = this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);\n this.logDebug('Running the i18n-labels generation step', {\n taskRef: task.taskRef,\n primaryLocale,\n targetLocales,\n });\n const labellizeResult = await this.labellize.labellize({}, session);\n const translateResult = targetLocales.length > 0\n ? await this.translate.translate({ targetLocales }, session)\n : undefined;\n return {\n generationStepRef,\n labellize: labellizeResult,\n ...(translateResult ? { translate: translateResult } : {}),\n evidencePaths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n case ApplicationBuildGenerationStep.EMAIL_TEMPLATES: {\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const targetLocales = this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);\n this.logDebug('Running the email-templates generation step', {\n taskRef: task.taskRef,\n primaryLocale,\n targetLocales,\n });\n const emailGenerate = await this.emailTemplates.generateTemplates({}, session);\n const emailTranslate = targetLocales.length > 0\n ? await this.emailTemplates.translateEmailTemplateLabels({ targetLocales: [...targetLocales] }, session)\n : undefined;\n return {\n generationStepRef,\n emailGenerate,\n ...(emailTranslate ? { emailTranslate } : {}),\n evidencePaths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n case ApplicationBuildGenerationStep.LOGO: {\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n /*\n * Incremental, but by PRESENCE rather than by the freshness lock the text pipelines use.\n *\n * Those pipelines skip per UNIT, because a label is cheap and units come and go. A logo\n * deliberation is a panel of three experts, N generated images and a vision judge — the\n * most expensive step in this enum by a wide margin — and an application has exactly one\n * accepted mark. So the honest unit of freshness is \"is there an accepted mark\", and the\n * answer is the same file the landed check reads. Re-running a satisfied step costs a\n * `stat`, not a model call.\n *\n * Replacing an existing mark stays a deliberate act through the brand routes; a build must\n * never quietly redraw an application's identity because it ran again.\n */\n if (await this.hasAcceptedBrandMark()) {\n this.logDebug('Skipping the logo generation step — an accepted mark already exists', {\n taskRef: task.taskRef,\n });\n return { generationStepRef, skippedBecauseAlreadyAccepted: true, evidencePaths, ...(await propagateAcceptedBrand(this.companionContext.saasRoot, this.logger)) };\n }\n\n this.logDebug('Running the logo generation step', { taskRef: task.taskRef });\n const deliberation = await this.logoDeliberation.run({});\n /*\n * `run` stages its winner as the standard single-candidate manifest `accept` expects, which\n * is why the two compose with no adapter: the staged manifest IS the hand-off. An identity\n * pin re-asserting that the manifest still held the winner went with the digest fences — a\n * single-candidate staging area written one await earlier has nothing else it could hold.\n */\n const accept = await this.brandAccept.accept({});\n return {\n generationStepRef,\n deliberation,\n accept,\n skippedBecauseAlreadyAccepted: false,\n evidencePaths,\n // The accept propagated the mark it promoted; carried here so the step's record says so.\n ...(accept.propagation !== undefined ? { propagation: accept.propagation } : {}),\n ...(accept.propagationError !== undefined ? { propagationError: accept.propagationError } : {}),\n };\n }\n case ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION: {\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n /*\n * The backend service key the publish derives its OpenAPI documents from, picked the way\n * every other companion caller picks it: the one declared service that is not a frontend.\n * `runForeignKeyResolutionVerification` resolves it identically, and the controller's own\n * `pickResourcesRegistryCarrierServiceKey` answers the same question for the HTTP door.\n */\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey === undefined) {\n throw new Error('Cannot publish documentation: this application declares no backend service to derive its API documents from.');\n }\n this.logDebug('Running the documentation publication step', { taskRef: task.taskRef, backendServiceKey });\n /*\n * NOT skipped when the tree already exists, unlike the logo step beside it.\n *\n * A logo is accepted once and must never be silently redrawn. A documentation portal is a\n * PROJECTION of the application's current configuration, resources and authored chapters —\n * every one of which the build is still changing — so a published tree is stale the moment a\n * later task lands, and re-publishing is how it stays true. The publish is idempotent by\n * construction (it re-derives and rewrites), and `wildo docs publish` exists precisely\n * because the committed tree drifted silently whenever nobody re-ran it.\n */\n const published = await this.technicalDoc.publishManagedDocumentation({ backendServiceKey });\n return { generationStepRef, published, evidencePaths };\n }\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS: {\n const saasRoot = this.companionContext.saasRoot;\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n\n /*\n * With no accepted plan, `wildo db generate` renders the WHOLE model as the INITIAL migration and\n * writes the baseline in the same invocation. That is exactly what a PostgreSQL application with no\n * baseline owes (#1144): its tables exist only once a migration creates them. It is exactly wrong\n * for a MongoDB-backed application, where it would author a table set nothing uses — so the\n * DECLARED store decides, and anything but a PostgreSQL declaration refuses.\n *\n * `wildo db diff --update-lockfile` was the baseline this refusal used to prescribe. It writes the\n * lockfile and NO migration, so it would accept a plan whose tables were never created.\n */\n const assessment = await this.assessSchemaPlanObligation();\n if (assessment.obligation === ApplicationSchemaPlanObligation.NOT_OWED) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but this application has no accepted schema `\n + `plan (${SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH} is absent) and does not declare PostgreSQL in ${assessment.declaredIn}. `\n + 'A MongoDB-backed application owes no migrations; remove this step from the build plan.',\n );\n }\n if (assessment.obligation === ApplicationSchemaPlanObligation.UNDETERMINED) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but this application has no accepted schema `\n + `plan and its store could not be determined: ${assessment.reason}. Generating without knowing the store `\n + 'could author tables for a MongoDB-backed application.',\n );\n }\n /*\n * The plan is computed by IMPORTING the compiled backend registry, so an unbuilt tree cannot\n * produce one. Generating from a stale or absent model would author a migration for a model\n * nobody has — worse than not generating, because it then gets applied.\n */\n if (!existsSync(path.join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH))) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but ${MODULES_REGISTRY_RELATIVE_PATH} does not `\n + 'exist. The schema plan is computed by importing the compiled backend registry; build backend-api first.',\n );\n }\n\n const before = listMigrationFolders(saasRoot);\n this.logDebug('Running the database-migrations generation step', { taskRef: task.taskRef });\n /*\n * The migration LABEL comes from the task ref, so the folder is traceable back to the task\n * that produced it. Sanitised to the kebab-case shape `--name` accepts; the CLI still owns\n * the timestamp prefix, which is why the resulting path cannot be predicted here.\n */\n const label = task.taskRef.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 60)\n || 'build-plan-migration';\n const result = await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'generate', '--name', label],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n const after = listMigrationFolders(saasRoot);\n const generatedMigrationFolders = after.filter((folder) => !before.includes(folder));\n return {\n generationStepRef,\n // A clean plan is a legitimate outcome, not a failure: the resources this task follows may\n // have been migrated by an earlier one. The generator reports \"nothing to generate\".\n skippedBecauseAlreadyInSync: generatedMigrationFolders.length === 0,\n generatedMigrationFolders,\n outputTail: `${result.stdout}${result.stderr}`.slice(-2000),\n evidencePaths,\n };\n }\n default:\n throw new ApplicationBuildUnknownGenerationStepError(task.taskRef, generationStepRef);\n }\n }\n\n /**\n * Does this application already carry an accepted brand mark?\n *\n * Presence of the SSOT module is the whole test. It is written only by a promotion, so its\n * existence means a winner was chosen — and its ABSENCE is what makes the step run. Reading the\n * module's contents to count assets was considered and rejected: it would need the specifications\n * package evaluated, which is a far heavier question than \"has this step ever succeeded\", and the\n * landed check next door already keys on the same file.\n */\n private async hasAcceptedBrandMark(): Promise<boolean> {\n const ssotModulePath = path.resolve(\n this.companionContext.saasRoot,\n 'specifications',\n 'src',\n 'brand',\n BRAND_RESOLVED_ASSETS_MODULE,\n );\n try {\n await stat(ssotModulePath);\n return true;\n } catch {\n return false;\n }\n }\n\n private requireGenerationStepRef(task: BuildPlanTask): string {\n const target = task.target;\n if (target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n throw new Error(`Build task ${task.taskRef} is not a companion generation step.`);\n }\n return target.generationStepRef;\n }\n\n /**\n * The locales this application ENABLES — `appPreferences.languages.enabledLanguages`,\n * always including the primary. This is the \"every configured locale\" the\n * build task's objective speaks of; an app that enables only its primary\n * locale gets no translate pass and no foreign-locale evidence.\n */\n private resolveEnabledLocales(): readonly AvailableLanguage[] {\n return getCompanionServedLanguages(this.appConfigService.config);\n }\n\n /** `<backend service path>/src/engine/i18n`, app-root relative — the same tree the orchestrators write into. */\n private resolveI18nRelativeRoot(): string {\n const backendService = Object.values(this.companionContext.backendServices)[0];\n if (!backendService) {\n throw new Error('No backend service configured for per-unit i18n output.');\n }\n return path.posix.join(backendService.path, 'src/engine/i18n');\n }\n}\n"]}
1
+ {"version":3,"file":"application-build-generation-step.companion.service.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-generation-step.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,qCAAqC,GAEtC,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,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AC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AA7cY,8CAA8C;IAD1D,UAAU,EAAE;IAOR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,WAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;IACpD,WAAA,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IAClD,WAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IAMnD,YAAA,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IAAE,YAAA,QAAQ,EAAE,CAAA;iEAZoB,gCAAgC;QACzB,qCAAqC;QACrC,qCAAqC;QACxC,6BAA6B;QACxB,gCAAgC;QAC1C,2BAA2B;GAdpG,8CAA8C,CA6c1D","sourcesContent":["import * as path from 'node:path';\nimport {\n ApplicationSchemaPlanObligation,\n SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH,\n assessApplicationSchemaPlanObligation,\n type ApplicationSchemaPlanObligationAssessment,\n} from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { stat } from 'node:fs/promises';\nimport { existsSync, readdirSync } from 'node:fs';\nimport { inject, injectable, optional } from 'inversify';\n\nimport type { AppConfigurationService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError, executeBoundedSubprocess } from '@wildo-ai/saas-backend-lib';\nimport { NO_PLAYBOOK_SPEND_METER, type PlaybookSpend, type PropagateBrandAssetsOutcome } from '@wildo-ai/application-creation-runtime';\nimport { propagateAcceptedBrand } from '../../brand/services/brand-propagation.companion.utils';\nimport type { TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { BRAND_RESOLVED_ASSETS_MODULE_FILE, BuildPlanTaskTargetKind, type BuildPlanTask } from '@wildo-ai/saas-specifications/application-creation';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { getCompanionConfiguredPrimaryLanguage, getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils';\nimport { signDerivedInputs } from '../../core/utils/derived-input-signature.companion.utils';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport {\n LabellizeOrchestratorCompanionService,\n type LabellizeRunResult,\n} from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport {\n TranslateOrchestratorCompanionService,\n type TranslateRunResult,\n} from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport {\n EmailTemplateCompanionService,\n type GenerateEmailTemplatesResult,\n type TranslateEmailTemplateLabelsResult,\n} from '../../email/services/email-template.companion.service';\nimport {\n LogoDeliberationCompanionService,\n type LogoDeliberationResult,\n} from '../../brand/services/logo-deliberation.companion.service';\nimport {\n BrandAcceptCompanionService,\n type BrandAcceptResult,\n} from '../../brand/services/brand-accept.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport type { LabellingProgressReporter } from '../../i18n-labelling/models/labelling-progress.models';\nimport { GenerationStepProgressTracker, type GenerationStepProgress } from '../models/generation-step-progress.models';\nimport { PlaybookSpendMeasuredUnit, type PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service';\n\n/**\n * The companion generation steps this host can EXECUTE.\n *\n * The values are the `generationStepRef` slugs a build plan authors on a\n * `COMPANION_GENERATION_STEP` target — the closed vocabulary this enum is the\n * named home of. A build plan may only reference steps that exist here: an\n * unknown ref refuses by name (below) instead of silently parking the build,\n * which is exactly how the first generation step ever authored\n * (`i18n-labels`) stalled the Wonder Todos build plan — the vocabulary\n * existed in `_core`, and nothing executed it.\n *\n * Seeds join this enum WHEN a seed-generation pipeline exists to execute —\n * adding the value without one would let a build plan dispatch a step that can\n * only fail; the unknown-ref refusal below is the honest answer until then.\n * The executor is the integration point, not a new lane per step.\n */\nexport enum ApplicationBuildGenerationStep {\n /**\n * The application's labels in its PRIMARY locale — the `labellize` pipeline, and nothing else.\n *\n * It used to translate as well, into every other enabled locale, in the same step. That made \"the\n * labels exist\" and \"every translation is done\" one graph node, and everything that needs only the\n * first waited for the second. Measured on app-creation-test-004 (2026-10-01, #2204): the English\n * labels existed within minutes, translation into four locales then ran for hours at about one\n * file every two minutes per locale, and the documentation portal — which reads primary-locale\n * labels only — stayed dark the whole time. A hand-run `wildo docs publish` succeeded at once.\n *\n * Translation is now {@link I18N_TRANSLATIONS}, its own node, which the dispatch host derives after\n * this one. A step that needs labels to EXIST depends on this step; nothing depends on translation.\n */\n I18N_LABELS = 'i18n-labels',\n /**\n * The application's labels translated into every enabled locale other than the primary — the\n * `translate` pipeline. Split out of {@link I18N_LABELS} (#2204) so translation stops gating the\n * steps that need only the primary locale.\n *\n * DERIVED by the dispatch host rather than authored, for the reason {@link DATABASE_MIGRATIONS} is:\n * the obligation follows from what the application declares (more than one enabled locale) and\n * from the plan carrying a labels step, not from a decision the plan makes. A plan MAY author it,\n * and then the host derives nothing. See `withHostDerivedTranslationStep`.\n *\n * Nothing downstream waits on it, by design: the documentation portal reads primary-locale labels\n * only (#1993 is the issue for translating it), and the website and the application read their\n * label files at run time, so a translation landing is picked up without any republish step.\n */\n I18N_TRANSLATIONS = 'i18n-translations',\n EMAIL_TEMPLATES = 'email-templates',\n /**\n * The brand mark: an expert panel derives creative directions, images are generated, a vision\n * judge scores them, and the winner is promoted into the specifications SSOT.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it. That pipeline was fully built and reachable only by a human issuing\n * `POST /brand/{generate,deliberate,accept}-logo`, so an application could acquire a considered\n * mark only if someone drove it by hand (issue #220). Hand-supplying a logo stays available and\n * unchanged; what this adds is the journey's own path to one.\n */\n LOGO = 'logo',\n /**\n * `wildo db generate` — turn the drift between the application's resource model and its accepted\n * schema plan into a committed migration, so a PostgreSQL-backed application's tables exist.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it. The pipeline is the CLI's own generate door, which already owns every hard part\n * (the planner, the risk vocabulary, the refusals) and advances the lockfile in the same\n * invocation that writes the migration.\n *\n * Without a lockfile `wildo db generate` treats the whole model as the INITIAL migration and writes\n * the baseline beside it. That is exactly what a PostgreSQL application with no baseline owes, and\n * exactly wrong for a MongoDB-backed one, where it would author a table set nothing uses — so the\n * application's DECLARED store decides (#1144, `ApplicationSchemaPlanObligation`): the step runs\n * for an accepted plan or an owed baseline, and REFUSES for a MongoDB store or an unreadable\n * declaration. See `executeGenerationStep`.\n */\n DATABASE_MIGRATIONS = 'database-migrations',\n /**\n * `wildo docs publish` — derive, render, measure, validate and write the application's customer\n * documentation portal, so the chapters its build authored are something a reader can reach.\n *\n * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to\n * execute it — and it is the same shape {@link LOGO} joined in: the pipeline was fully built and\n * reachable ONLY by a human, through `POST /technical-doc/publish-managed` or the `wildo docs\n * publish` command that calls it. Measured on the first end-to-end journey run (#1273): the plan\n * carried SIX `DOCUMENTATION_CHAPTER` tasks, the engine's own derivation refused with *\"Application\n * content remains absent until the app-creator owns an accepted authoring artifact\"*, an agent\n * built that artifact — and nothing published it. `technical-doc` could not even typecheck, because\n * `src/pages/search.tsx` imports a search index the publish is what writes, so\n * `check:technical-doc-typecheck` was red for the whole build and failed a documentation task on a\n * red it did not cause, at $19.33.\n *\n * The step is DERIVED by the dispatch host rather than authored by the decomposer, for the reason\n * {@link DATABASE_MIGRATIONS} is: an application owes it as a consequence of what its plan\n * contains — here, any documentation chapter — rather than as a decision the plan makes. See\n * `withHostDerivedDocumentationPublicationStep`.\n *\n * It runs AFTER the chapters and after `i18n-labels`, and the second is not optional: publication\n * resolves the application's organization-role documentation and refuses without the primary-locale\n * label — *\"requires primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role\n * labels before publishing documentation\"*. Running it early fails on exactly that.\n *\n * It does NOT wait for {@link I18N_TRANSLATIONS}: the primary locale is all it reads (#2204).\n */\n DOCUMENTATION_PUBLICATION = 'documentation-publication',\n}\n\n/** The compiled registry `wildo db` imports to compute the current plan. Absent ⇒ the plan cannot be computed. */\nconst MODULES_REGISTRY_RELATIVE_PATH = 'backend-api/dist/modules-registry.backend.js';\n\n/** Bounds on the `wildo db generate` subprocess. Generous: it spawns a runner that imports the whole app registry. */\nconst MIGRATION_GENERATION_TIMEOUT_MS = 10 * 60 * 1000;\n\n/**\n * How a generation step proves it did its work.\n *\n * Two kinds, because the obvious single answer does not fit every step. Most steps write FILES\n * whose paths are known before they run, and \"landed\" means those files are committed. A migration\n * step cannot: its artifact is `backend-api/migrations/<timestamp>_<name>/migration.sql`, and the\n * timestamp is minted DURING the run.\n *\n * The tempting substitutes were both rejected, and the reasons are worth keeping:\n *\n * - the accepted lockfile — once a plan is accepted it ALREADY EXISTS before every later run of the\n * step, so \"is it committed?\" is trivially true and the step would land having done nothing. That is precisely the directory-prefix shortcut this service's `LOGO` case warns about.\n * - an empty path list — legal, and it makes the dispatch host SKIP the landed check entirely, so a\n * step that generated nothing would read as complete.\n *\n * So the migration step's evidence is not a file at all: it is the STATE the step exists to reach —\n * the model and the accepted plan agree. That is what `wildo db diff --check` answers.\n */\nexport enum ApplicationBuildGenerationStepLandedKind {\n /** Landed when every named path is committed. The shape every file-writing step uses. */\n COMMITTED_PATHS = 'committed_paths',\n /** Landed when the resource model and the accepted schema plan agree. */\n SCHEMA_PLAN_IN_SYNC = 'schema_plan_in_sync',\n /**\n * Landed by construction: the application owes this step nothing. Today that is an `i18n-translations`\n * step on an application whose only enabled locale is the primary (#2204 review). The host never\n * DERIVES that step there, but a plan may AUTHOR it, and its evidence list is empty — and an empty\n * `COMMITTED_PATHS` list never lands, so the step would be ready forever and the plan never finish.\n * An honest \"nothing is owed\" is a landing, not a missing proof.\n */\n NOT_OWED = 'not_owed',\n}\n\n/** What the dispatch host must evaluate to decide whether a generation-step task has landed. */\nexport type ApplicationBuildGenerationStepLandedCondition =\n | { readonly kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS; readonly paths: readonly string[] }\n | { readonly kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC }\n | { readonly kind: ApplicationBuildGenerationStepLandedKind.NOT_OWED };\n\n/**\n * What `wildo db diff --check` could tell the host about the resource model versus the accepted schema plan.\n *\n * THREE answers, not two. A boolean merged the two failures that lead to opposite places (found in review,\n * 2026-09-13): DRIFTED means the migration step has work and must run first; UNANSWERABLE means the check did not\n * report drift and did not pass — no accepted plan and an undeterminable store declaration, no built backend registry, a compiled model older than its\n * sources (`assessCompiledModelCurrency`, #403: before it, a dead watcher's stale dist answered IN_SYNC and landed\n * this step with drift on disk), a CLI that could not import\n * it or could not be spawned, a timeout, a lockfile that fails strict parsing, or an ENGINE planner-contract\n * mismatch (whose remedy is `wildo db generate --accept-planner-contract`, not a rebuild) — and\n * running the step then only throws. Read as one \"not in sync\", an unanswerable check put a step that can\n * only fail at the head of the build queue on every dispatch, so no other task could run.\n *\n * Only IN_SYNC ever lands the step: an unanswered question must not land a migration step either.\n */\nexport enum SchemaPlanSyncState {\n /** The model and the accepted plan agree: the migration step has landed. */\n IN_SYNC = 'in_sync',\n /** The check ran and reported ungenerated changes: the migration step has work to do. */\n DRIFTED = 'drifted',\n /** The check neither passed nor reported drift (see above for the causes); running the step now would refuse or fail. */\n UNANSWERABLE = 'unanswerable',\n}\n\n/**\n * The line `wildo db diff --check` prints when, and only when, it found drift. The CLI exits non-zero for\n * drift and for every could-not-ask failure alike, so this text is the one thing that separates them. A COPY\n * of the message in the CLI's `commands/db/diff.command.ts`, pinned to it by a source-parity test.\n */\nexport const SCHEMA_PLAN_DRIFT_OUTPUT_MARKER = 'ungenerated schema change(s)';\n\n/** Classify a failed `wildo db diff --check`: DRIFTED when the CLI said so, UNANSWERABLE otherwise. */\nexport function classifySchemaPlanCheckFailure(error: unknown): SchemaPlanSyncState {\n const details = (error as { details?: { stdout?: unknown; stderr?: unknown } } | null | undefined)?.details;\n const output = `${typeof details?.stdout === 'string' ? details.stdout : ''}\\n${typeof details?.stderr === 'string' ? details.stderr : ''}`;\n return output.includes(SCHEMA_PLAN_DRIFT_OUTPUT_MARKER) ? SchemaPlanSyncState.DRIFTED : SchemaPlanSyncState.UNANSWERABLE;\n}\n\n/**\n * The SSOT module `brand-accept` writes when it promotes a winner — the shared definition the brief's landing and the\n * accept step read too (#2237), so the three cannot disagree about the file.\n */\nconst BRAND_RESOLVED_ASSETS_MODULE = BRAND_RESOLVED_ASSETS_MODULE_FILE;\n\n/** A build plan referenced a generation step this companion cannot execute. Named, so the plan author sees the vocabulary. */\nexport class ApplicationBuildUnknownGenerationStepError extends Error {\n public constructor(taskRef: string, generationStepRef: string) {\n super(\n `Build task ${taskRef} references generation step \"${generationStepRef}\", which this companion cannot execute. `\n + `Known steps: ${Object.values(ApplicationBuildGenerationStep).join(', ')}.`,\n );\n }\n}\n\n/** What one executed i18n-labels step did — the pipeline's result, verbatim. */\nexport interface ApplicationBuildI18nLabelsStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.I18N_LABELS;\n /** Primary-locale label generation (incremental — fresh units are skipped by the freshness lock). */\n readonly labellize: LabellizeRunResult;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/** What one executed i18n-translations step did — the pipeline's result, verbatim. */\nexport interface ApplicationBuildI18nTranslationsStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.I18N_TRANSLATIONS;\n /** The locales it translated into: every enabled locale but the primary. */\n readonly targetLocales: readonly string[];\n /** Translation into those locales; absent when there were none (an authored step on a one-locale app). */\n readonly translate?: TranslateRunResult;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/** What one executed email-templates step did — the per-pipeline results, verbatim. */\nexport interface ApplicationBuildEmailTemplatesStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.EMAIL_TEMPLATES;\n /** Primary-locale template + labels generation (incremental — existing template+labels pairs are skipped). */\n readonly emailGenerate: GenerateEmailTemplatesResult;\n /** Label translation into the other enabled locales; absent when the app enables only its primary locale. */\n readonly emailTranslate?: TranslateEmailTemplateLabelsResult;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed logo step did.\n *\n * `deliberation`/`accept` are absent when the step was SKIPPED because the application already has\n * an accepted mark — see the executor for why skipping is the incremental answer here rather than\n * the freshness lock the text pipelines use.\n */\nexport interface ApplicationBuildLogoStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.LOGO;\n /** The expert-panel deliberation that derived directions, generated marks and picked a winner. */\n readonly deliberation?: LogoDeliberationResult;\n /** Promotion of that winner into `specifications/src/brand/` — images plus the rewritten SSOT. */\n readonly accept?: BrandAcceptResult;\n /** True when an accepted mark already existed and no model was called. */\n readonly skippedBecauseAlreadyAccepted: boolean;\n /**\n * The accepted mark copied to every surface that serves it — the app's public folder and runtime\n * config, the documentation portal, the website's icons and Open Graph image. Runs on BOTH branches:\n * a surface composed after the mark was accepted (a website added later) still receives it.\n */\n readonly propagation?: PropagateBrandAssetsOutcome;\n /** Why propagation could not run. Never fails the step: the mark is accepted either way. */\n readonly propagationError?: string;\n /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed `database-migrations` step did.\n *\n * `evidencePaths` is present for symmetry with its siblings and carries the MUTATION SCOPE, not the\n * landed evidence — this step lands on `SCHEMA_PLAN_IN_SYNC`, never on a path.\n */\nexport interface ApplicationBuildDatabaseMigrationsStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.DATABASE_MIGRATIONS;\n /** True when the plan was already in sync and `wildo db generate` had nothing to write. */\n readonly skippedBecauseAlreadyInSync: boolean;\n /** The migration folder names present after the run that were not present before it. Usually 0 or 1. */\n readonly generatedMigrationFolders: readonly string[];\n /** The generator's own output tail — it names the tables and the risk of each change. */\n readonly outputTail: string;\n /** MUTATION SCOPE, not landed evidence. */\n readonly evidencePaths: readonly string[];\n}\n\n/**\n * What one executed `documentation-publication` step did.\n *\n * `published` is the publish service's own report — output count and root — kept whole rather than\n * projected, because the step's value to a reader is \"what did it write\", and this lane has no\n * second opinion about that.\n */\nexport interface ApplicationBuildDocumentationPublicationStepRunResult {\n readonly generationStepRef: ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION;\n /** The publish service's report. */\n readonly published: unknown;\n /** The rendered search index, which is both this step's mutation scope and its landed evidence. */\n readonly evidencePaths: readonly string[];\n}\n\n/** One executed generation step's result, discriminated by the step it ran. */\nexport type ApplicationBuildGenerationStepRunResult =\n | ApplicationBuildI18nLabelsStepRunResult\n | ApplicationBuildI18nTranslationsStepRunResult\n | ApplicationBuildEmailTemplatesStepRunResult\n | ApplicationBuildLogoStepRunResult\n | ApplicationBuildDatabaseMigrationsStepRunResult\n | ApplicationBuildDocumentationPublicationStepRunResult;\n\n/** A step's result with what its model calls spent (#2232) — what the step's row records. */\nexport type MeasuredGenerationStepRunResult = ApplicationBuildGenerationStepRunResult & { readonly spend: PlaybookSpend };\n\n/**\n * The identity allowlist for the `wildo db generate` subprocess.\n *\n * PATH is the load-bearing entry: the CLI is a GLOBAL install and is deliberately NOT linked into an\n * application's `node_modules/.bin` — verified on both dogfood applications — so it is reachable\n * only through PATH. Kept to the same minimal set the verification hook uses rather than passing the\n * companion's whole environment.\n */\nfunction buildMigrationSubprocessEnv(): NodeJS.ProcessEnv {\n const env: NodeJS.ProcessEnv = {};\n for (const key of ['PATH', 'HOME', 'USER', 'LOGNAME', 'SHELL', 'TERM']) {\n const value = process.env[key];\n if (value !== undefined) env[key] = value;\n }\n return env;\n}\n\n/** Migration folder names currently on disk (not the lockfile beside them). */\nfunction listMigrationFolders(saasRoot: string): readonly string[] {\n const migrationsRoot = path.join(saasRoot, 'backend-api', 'migrations');\n if (!existsSync(migrationsRoot)) return [];\n return readdirSync(migrationsRoot, { withFileTypes: true })\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name)\n .sort();\n}\n\n/**\n * Execute companion-owned generation steps of a build plan, and answer which\n * files each step is responsible for.\n *\n * A `COMPANION_GENERATION_STEP` is deterministic in its ROUTING and its\n * PLACEMENT — which pipeline runs and where the files land is decided by\n * code, never by a coding agent (`application-build-task-coding-policy`\n * refuses to compose a coding contract for one). The CONTENT may still come\n * from a model (labels are generated text), which is exactly the directive's\n * bucket-3 shape: a companion-owned generation step interleaved by the build\n * loop.\n *\n * ## Landed evidence, and why it is planner-derived\n *\n * The build lane's landed answer is GIT: a task has landed when the files it\n * produces are committed. A generation step's target carries only its\n * `generationStepRef` — no paths — so the file set must be DERIVED. For\n * `i18n-labels` it is the labelling planner's unit inventory in the primary\n * locale, and for `i18n-translations` the same inventory crossed with every\n * other enabled locale: exactly the files the pipelines write, re-derivable\n * after a restart, a fresh clone, or a branch switch. Deliberately NOT the\n * whole i18n directory: that is already committed on any app with history, and\n * a directory-prefix check would report the step landed without it ever\n * having run for the units it still owes.\n */\n/**\n * The last schema-plan sync answer per application root, valid while its input signature holds.\n *\n * Module-level rather than per-instance so two service instances resolving landing concurrently — a\n * board read and a `/build/next` — share one 8-9 s subprocess instead of spawning two.\n */\nconst schemaPlanSyncStateCache = new Map<string, { signature: string; state: SchemaPlanSyncState }>();\n\n/** Answers still being computed, so concurrent callers at the same signature await one subprocess. */\nconst schemaPlanSyncStateInFlight = new Map<string, { signature: string | null; compute: Promise<SchemaPlanSyncState> }>();\n\n/**\n * The files that decide the schema-plan sync answer: the compiled MODEL and the ACCEPTED PLAN.\n *\n * Exported so the freshness loop below signs exactly what the resolver signs. Two copies of this list\n * would let the loop refresh on a change the resolver ignores, or miss one it honours.\n */\nexport function signSchemaPlanInputs(saasRoot: string): string | null {\n return signDerivedInputs(\n [path.join(saasRoot, 'backend-api', 'dist'), path.join(saasRoot, 'infrastructure'), ...resolveEngineDistRoots(saasRoot)],\n [path.join(saasRoot, SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH)],\n );\n}\n\n/**\n * The compiled ENGINE the backend resolves: every `@wildo-ai/*` package's `dist` under\n * `backend-api/node_modules`. The engine declares resources (the planner plans them) and owns the\n * planner, so an engine change moves the schema plan without touching either app-local input.\n *\n * Signed since 2026-09-25. It used to be the one unsigned input, on the premise that an engine change\n * respawns the companion and empties this cache. On scratch-journey the companion ran from 12:20Z\n * while engine resources landed in the app's injected snapshot at 13:04Z and 13:41Z: its supervisor\n * was paused and did not restart it. The cache kept answering IN_SYNC, and the build plan reported the\n * migrations step LANDED with 16 changes owed. Walking all six packages there costs about 80 ms,\n * against about 8.5 s to re-derive. The enumeration is total, so a package that starts declaring\n * resources is covered the day it does.\n */\nfunction resolveEngineDistRoots(saasRoot: string): readonly string[] {\n const scope = path.join(saasRoot, 'backend-api', 'node_modules', '@wildo-ai');\n if (!existsSync(scope)) return [];\n return readdirSync(scope)\n .sort()\n .map((name) => path.join(scope, name, 'dist'))\n .filter((dist) => existsSync(dist));\n}\n\n/**\n * The cached schema-plan sync answer for one application root.\n *\n * Module-level rather than a class member because it never used instance state, and because the\n * COMPANION BOOT path warms it (`startIntrospectionFreshnessPlane`). Reaching it through the service\n * would drag the labelling, email and brand service graph into the boot graph to answer a question\n * about two files — and a boot path that fails closed needs the companion it just stopped\n * (`continuity-drift-and-cas-basis.md` Rule 3).\n */\nexport async function resolveSchemaPlanSyncState(saasRoot: string): Promise<SchemaPlanSyncState> {\n /*\n * The answer costs a `wildo db diff --check` SUBPROCESS, which boots the CLI and imports the\n * application's compiled modules registry: measured 8-14 s on `examples/wonder-todos`, 2026-09-18,\n * of which ~5.5 s is the registry import alone. It is asked on every landing resolution — so on\n * every creation-board refresh and every `/build/next` — and it was the single largest remaining\n * cost of both.\n *\n * Nothing about that answer can change unless the MODEL or the ACCEPTED PLAN changes, and both are\n * files. So it is re-derived when they move and reused when they do not: ~17 ms to sign against\n * ~8500 ms to re-run. A TTL is not used here for the same reason the specifications loader has\n * none — this state decides whether the migration step is offered, so drift must surface at the\n * next read rather than at the next expiry.\n *\n * The ENGINE reaches the application through node_modules rather than through either app-local path,\n * so its compiled packages are signed as well (see `resolveEngineDistRoots`). This used to rely on an\n * engine change respawning the companion; one survived an engine change on 2026-09-25 and served a\n * stale IN_SYNC. The answer is still NOT persisted to disk across restarts (#1350).\n */\n const signature = signSchemaPlanInputs(saasRoot);\n if (signature !== null) {\n const cached = schemaPlanSyncStateCache.get(saasRoot);\n if (cached?.signature === signature) return cached.state;\n const inFlight = schemaPlanSyncStateInFlight.get(saasRoot);\n if (inFlight?.signature === signature) return inFlight.compute;\n }\n\n const compute = computeSchemaPlanSyncState(saasRoot);\n schemaPlanSyncStateInFlight.set(saasRoot, { signature, compute });\n try {\n const state = await compute;\n if (signature !== null) schemaPlanSyncStateCache.set(saasRoot, { signature, state });\n return state;\n } finally {\n // A failed derivation caches nothing, so the next caller retries rather than inheriting it.\n if (schemaPlanSyncStateInFlight.get(saasRoot)?.compute === compute) {\n schemaPlanSyncStateInFlight.delete(saasRoot);\n }\n }\n}\n\nasync function computeSchemaPlanSyncState(saasRoot: string): Promise<SchemaPlanSyncState> {\n const { obligation } = await assessApplicationSchemaPlanObligation(saasRoot);\n if (obligation === ApplicationSchemaPlanObligation.NOT_OWED || obligation === ApplicationSchemaPlanObligation.UNDETERMINED) {\n return SchemaPlanSyncState.UNANSWERABLE;\n }\n if (!existsSync(path.join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH))) return SchemaPlanSyncState.UNANSWERABLE;\n if (obligation === ApplicationSchemaPlanObligation.BASELINE_OWED) {\n /*\n * No baseline yet, so the whole model is ungenerated: that is DRIFT, and the step has work. But\n * `diff --check` refuses outright without a lockfile, so it cannot tell drift from could-not-ask\n * here. Plain `wildo db diff` can: it computes the model (refusing a stale or unloadable one, #403)\n * and, with no lockfile, reports the table count and succeeds. Only a computable model is drift.\n */\n try {\n await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'diff'],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n return SchemaPlanSyncState.DRIFTED;\n } catch {\n return SchemaPlanSyncState.UNANSWERABLE;\n }\n }\n try {\n await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'diff', '--check'],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n return SchemaPlanSyncState.IN_SYNC;\n } catch (error) {\n // Drift is named in the CLI's own output; an absent CLI or a runner that could not import the\n // registry is not, and must not put the step at the head of the queue.\n return classifySchemaPlanCheckFailure(error);\n }\n}\n\n@injectable()\nexport class ApplicationBuildGenerationStepCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n /** The running step of each task, by task ref — runtime state only, see {@link GenerationStepProgress}. */\n private readonly progressByTaskRef = new Map<string, GenerationStepProgressTracker>();\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly planner: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellize: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translate: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplates: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberation: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAccept: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDoc: TechnicalDocCompanionService,\n /*\n * What each step's model calls spent (#2232): a labels or translations pass is model calls, and nothing\n * recorded them when the step ran outside a playbook. Optional so a harness that builds this service\n * positionally need not hand one in; without it a step's spend is NOT OBSERVED, never zero.\n */\n @inject(COMPANION_SERVICE_TYPES.PlaybookSpendMeter) @optional() private readonly spendMeter?: PlaybookSpendMeterCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildGenerationStep');\n }\n\n /** What each executed step spent, by the task object it ran — read by the step's row writer (`spentByGenerationStep`). */\n private readonly stepSpendByTask = new WeakMap<BuildPlanTask, PlaybookSpend>();\n\n /**\n * What the generation step last executed for `task` spent (#2232), however it ended — for its row when the run\n * ends FAILED. Keyed by the TASK the dispatcher handed in, not by the thrown error: the step can succeed and\n * something after it still throw (the acceptance commit, a lost file lock), and the step's spend is real either\n * way. `undefined` when no step ran for that task object.\n */\n public spentByGenerationStep(task: BuildPlanTask): PlaybookSpend | undefined {\n return this.stepSpendByTask.get(task);\n }\n\n /**\n * The app-root-relative files this task's generation step is responsible\n * for. The landed check treats the task as landed when EVERY one of them is\n * committed — same doctrine as every coding task, same reader\n * (`isWorktreePathCommitted`).\n */\n public async resolveGenerationStepEvidencePaths(task: BuildPlanTask): Promise<readonly string[]> {\n const generationStepRef = this.requireGenerationStepRef(task);\n switch (generationStepRef) {\n case ApplicationBuildGenerationStep.I18N_LABELS:\n return this.resolveLabelUnitPaths([getCompanionConfiguredPrimaryLanguage(this.appConfigService.config)]);\n case ApplicationBuildGenerationStep.I18N_TRANSLATIONS:\n // Every unit in every TARGET locale. Empty on a one-locale application, which is why the host\n // derives this step only when there is a target (an empty list never lands).\n return this.resolveLabelUnitPaths(this.resolveTranslationTargetLocales());\n case ApplicationBuildGenerationStep.EMAIL_TEMPLATES:\n // Placement is the email domain's authority; this lane only crosses it with the enabled locales.\n return this.emailTemplates.resolveExpectedArtifactRelativePaths(this.resolveEnabledLocales());\n case ApplicationBuildGenerationStep.LOGO:\n /*\n * The SSOT MODULE alone, deliberately — not the asset images beside it.\n *\n * Evidence must be derivable BEFORE the step runs, and the image filenames cannot be: they\n * are named after whichever mark the panel picks. The module can, and it is the honest\n * marker either way — `brand-accept` writes it only when a winner is promoted, so it is\n * absent on an application that has never accepted a logo and present exactly when one has.\n *\n * This is NOT the directory-prefix shortcut this class's docblock warns about. That check\n * would pass on any app whose `specifications/` is committed at all; this file exists only\n * as a consequence of the step's own work.\n */\n return [path.posix.join('specifications', 'src', 'brand', BRAND_RESOLVED_ASSETS_MODULE)];\n case ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION:\n /*\n * The rendered portal's own index, which the publish is what writes.\n *\n * Honest evidence by the same test {@link LOGO} passes and `DATABASE_MIGRATIONS` fails: this\n * file exists ONLY as a consequence of this step's work. `technical-doc/src/pages/search.tsx`\n * imports it directly, which is why an unpublished application cannot even typecheck that\n * package — so its absence is exactly the state the step exists to leave behind, and its\n * presence is exactly the state the step produces.\n *\n * Deliberately the index rather than the `docusaurus/` output tree: the rendered page set is\n * named after whichever chapters the plan carries, so it cannot be derived BEFORE the step\n * runs, and evidence that cannot be derived in advance is not evidence.\n */\n return [path.posix.join('technical-doc', 'src', 'generated', 'consumer-documentation', 'indexes', 'search.json')];\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS:\n /*\n * ⚠ MUTATION SCOPE ONLY — this path is NOT this step's landed evidence, and using it as\n * such would be the defect the landed-kind vocabulary above exists to prevent: the lockfile\n * already exists before the step runs, so a landed check over it passes having verified\n * nothing.\n *\n * It is named here because the dispatch host derives the task's writable roots from these\n * paths' DIRECTORIES, and `backend-api/migrations/` is exactly right: the step writes the\n * new migration folder and rewrites the lockfile, and nothing else.\n *\n * `resolveGenerationStepLandedCondition` is the only landed authority, and for this step it\n * answers SCHEMA_PLAN_IN_SYNC.\n */\n return [SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH];\n default:\n throw new ApplicationBuildUnknownGenerationStepError(task.taskRef, generationStepRef);\n }\n }\n\n /**\n * How this task proves it landed — the ONLY landed authority for a generation step.\n *\n * Split from {@link resolveGenerationStepEvidencePaths} because that method answers a different\n * question (which paths may this task write?) and the two answers diverge for exactly one step.\n * Reading landing off the evidence paths would land the migration step on a file that predates it.\n */\n public async resolveGenerationStepLandedCondition(\n task: BuildPlanTask,\n ): Promise<ApplicationBuildGenerationStepLandedCondition> {\n const generationStepRef = this.requireGenerationStepRef(task);\n if (generationStepRef === ApplicationBuildGenerationStep.DATABASE_MIGRATIONS) {\n return { kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC };\n }\n if (generationStepRef === ApplicationBuildGenerationStep.I18N_TRANSLATIONS && this.resolveTranslationTargetLocales().length === 0) {\n return { kind: ApplicationBuildGenerationStepLandedKind.NOT_OWED };\n }\n return {\n kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS,\n paths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n\n /**\n * Does this application owe migrations, and has it accepted a schema plan yet?\n *\n * The population the `database-migrations` step belongs to, and the fact the dispatch host derives\n * that step from when a build plan omits it (#1027). It reads BOTH the lockfile and the authored\n * `applicationDatabase.engine` (#1144). The lockfile alone was the marker until then, on the premise\n * that the foundation playbook writes a PostgreSQL application's baseline — it never did, so a\n * journey-built PostgreSQL application had no lockfile, was offered no migration step, and booted\n * into tables nothing had created. See {@link ApplicationSchemaPlanObligation}.\n */\n public async assessSchemaPlanObligation(): Promise<ApplicationSchemaPlanObligationAssessment> {\n return assessApplicationSchemaPlanObligation(this.companionContext.saasRoot);\n }\n\n /**\n * Does the resource model agree with the accepted schema plan — and if not, is that DRIFT, or could the\n * question not be asked? See {@link SchemaPlanSyncState} for why those two must never be merged.\n *\n * Only IN_SYNC lands the migration step, so an unknown answer can never land a task that generated\n * nothing. Re-running over a clean plan is harmless (`wildo db generate` reports nothing to generate);\n * running it where the check is unanswerable only throws, which is why the caller passes over it.\n */\n public async readSchemaPlanSyncState(): Promise<SchemaPlanSyncState> {\n return resolveSchemaPlanSyncState(this.companionContext.saasRoot);\n }\n\n /**\n * Run the task's generation step. Incremental by construction: both\n * pipelines consult the freshness lock and skip fresh units, so re-running\n * an already-satisfied step costs a plan read, not a model call.\n *\n * While it runs, its progress is readable through {@link readGenerationStepProgress} (#2215); it is\n * dropped when the step settles, however it ends.\n */\n public async executeGenerationStep(\n task: BuildPlanTask,\n session?: CompanionExecutionSessionContext,\n ): Promise<MeasuredGenerationStepRunResult> {\n const tracker = new GenerationStepProgressTracker(this.requireGenerationStepRef(task));\n this.progressByTaskRef.set(task.taskRef, tracker);\n try {\n /*\n * Measured AS a generation step (#2232): its spend goes on its own row, and every enclosing measurement (a\n * build-dispatch playbook run) tallies it in `generationSteps`, so a total over both counts it once.\n */\n const measured = this.spendMeter\n ? await this.spendMeter.measure(() => this.runGenerationStep(task, tracker.reporter, session), { as: PlaybookSpendMeasuredUnit.GENERATION_STEP })\n : await NO_PLAYBOOK_SPEND_METER.measure(() => this.runGenerationStep(task, tracker.reporter, session));\n this.stepSpendByTask.set(task, measured.spend);\n if (measured.settled.status === 'rejected') throw measured.settled.reason;\n return { ...measured.settled.value, spend: measured.spend };\n } finally {\n // Only our own tracker: a second run of the same task that started meanwhile keeps its own.\n if (this.progressByTaskRef.get(task.taskRef) === tracker) this.progressByTaskRef.delete(task.taskRef);\n }\n }\n\n /**\n * How far the task's generation step has got, while it runs (#2215). `undefined` when no step of that\n * task is running in this companion — the step settled, never ran, or ran before a restart.\n */\n public readGenerationStepProgress(taskRef: string): GenerationStepProgress | undefined {\n return this.progressByTaskRef.get(taskRef)?.snapshot();\n }\n\n private async runGenerationStep(\n task: BuildPlanTask,\n progress: LabellingProgressReporter,\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildGenerationStepRunResult> {\n const generationStepRef = this.requireGenerationStepRef(task);\n switch (generationStepRef) {\n case ApplicationBuildGenerationStep.I18N_LABELS: {\n this.logDebug('Running the i18n-labels generation step', {\n taskRef: task.taskRef,\n primaryLocale: getCompanionConfiguredPrimaryLanguage(this.appConfigService.config),\n });\n const labellizeResult = await this.labellize.labellize({ progress }, session);\n return {\n generationStepRef,\n labellize: labellizeResult,\n evidencePaths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n case ApplicationBuildGenerationStep.I18N_TRANSLATIONS: {\n const targetLocales = this.resolveTranslationTargetLocales();\n this.logDebug('Running the i18n-translations generation step', { taskRef: task.taskRef, targetLocales });\n const translateResult = targetLocales.length > 0\n ? await this.translate.translate({ targetLocales: [...targetLocales], progress }, session)\n : undefined;\n return {\n generationStepRef,\n targetLocales,\n ...(translateResult ? { translate: translateResult } : {}),\n evidencePaths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n case ApplicationBuildGenerationStep.EMAIL_TEMPLATES: {\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n const targetLocales = this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);\n this.logDebug('Running the email-templates generation step', {\n taskRef: task.taskRef,\n primaryLocale,\n targetLocales,\n });\n const emailGenerate = await this.emailTemplates.generateTemplates({}, session);\n const emailTranslate = targetLocales.length > 0\n ? await this.emailTemplates.translateEmailTemplateLabels({ targetLocales: [...targetLocales] }, session, { progress })\n : undefined;\n return {\n generationStepRef,\n emailGenerate,\n ...(emailTranslate ? { emailTranslate } : {}),\n evidencePaths: await this.resolveGenerationStepEvidencePaths(task),\n };\n }\n case ApplicationBuildGenerationStep.LOGO: {\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n /*\n * Incremental, but by PRESENCE rather than by the freshness lock the text pipelines use.\n *\n * Those pipelines skip per UNIT, because a label is cheap and units come and go. A logo\n * deliberation is a panel of three experts, N generated images and a vision judge — the\n * most expensive step in this enum by a wide margin — and an application has exactly one\n * accepted mark. So the honest unit of freshness is \"is there an accepted mark\", and the\n * answer is the same file the landed check reads. Re-running a satisfied step costs a\n * `stat`, not a model call.\n *\n * Replacing an existing mark stays a deliberate act through the brand routes; a build must\n * never quietly redraw an application's identity because it ran again.\n */\n if (await this.hasAcceptedBrandMark()) {\n this.logDebug('Skipping the logo generation step — an accepted mark already exists', {\n taskRef: task.taskRef,\n });\n return { generationStepRef, skippedBecauseAlreadyAccepted: true, evidencePaths, ...(await propagateAcceptedBrand(this.companionContext.saasRoot, this.logger)) };\n }\n\n this.logDebug('Running the logo generation step', { taskRef: task.taskRef });\n const deliberation = await this.logoDeliberation.run({});\n /*\n * `run` stages its winner as the standard single-candidate manifest `accept` expects, which\n * is why the two compose with no adapter: the staged manifest IS the hand-off. An identity\n * pin re-asserting that the manifest still held the winner went with the digest fences — a\n * single-candidate staging area written one await earlier has nothing else it could hold.\n */\n const accept = await this.brandAccept.accept({});\n return {\n generationStepRef,\n deliberation,\n accept,\n skippedBecauseAlreadyAccepted: false,\n evidencePaths,\n // The accept propagated the mark it promoted; carried here so the step's record says so.\n ...(accept.propagation !== undefined ? { propagation: accept.propagation } : {}),\n ...(accept.propagationError !== undefined ? { propagationError: accept.propagationError } : {}),\n };\n }\n case ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION: {\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n /*\n * The backend service key the publish derives its OpenAPI documents from, picked the way\n * every other companion caller picks it: the one declared service that is not a frontend.\n * `runForeignKeyResolutionVerification` resolves it identically, and the controller's own\n * `pickResourcesRegistryCarrierServiceKey` answers the same question for the HTTP door.\n */\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey === undefined) {\n throw new Error('Cannot publish documentation: this application declares no backend service to derive its API documents from.');\n }\n this.logDebug('Running the documentation publication step', { taskRef: task.taskRef, backendServiceKey });\n /*\n * NOT skipped when the tree already exists, unlike the logo step beside it.\n *\n * A logo is accepted once and must never be silently redrawn. A documentation portal is a\n * PROJECTION of the application's current configuration, resources and authored chapters —\n * every one of which the build is still changing — so a published tree is stale the moment a\n * later task lands, and re-publishing is how it stays true. The publish is idempotent by\n * construction (it re-derives and rewrites), and `wildo docs publish` exists precisely\n * because the committed tree drifted silently whenever nobody re-ran it.\n */\n const published = await this.technicalDoc.publishManagedDocumentation({ backendServiceKey });\n return { generationStepRef, published, evidencePaths };\n }\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS: {\n const saasRoot = this.companionContext.saasRoot;\n const evidencePaths = await this.resolveGenerationStepEvidencePaths(task);\n\n /*\n * With no accepted plan, `wildo db generate` renders the WHOLE model as the INITIAL migration and\n * writes the baseline in the same invocation. That is exactly what a PostgreSQL application with no\n * baseline owes (#1144): its tables exist only once a migration creates them. It is exactly wrong\n * for a MongoDB-backed application, where it would author a table set nothing uses — so the\n * DECLARED store decides, and anything but a PostgreSQL declaration refuses.\n *\n * `wildo db diff --update-lockfile` was the baseline this refusal used to prescribe. It writes the\n * lockfile and NO migration, so it would accept a plan whose tables were never created.\n */\n const assessment = await this.assessSchemaPlanObligation();\n if (assessment.obligation === ApplicationSchemaPlanObligation.NOT_OWED) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but this application has no accepted schema `\n + `plan (${SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH} is absent) and does not declare PostgreSQL in ${assessment.declaredIn}. `\n + 'A MongoDB-backed application owes no migrations; remove this step from the build plan.',\n );\n }\n if (assessment.obligation === ApplicationSchemaPlanObligation.UNDETERMINED) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but this application has no accepted schema `\n + `plan and its store could not be determined: ${assessment.reason}. Generating without knowing the store `\n + 'could author tables for a MongoDB-backed application.',\n );\n }\n /*\n * The plan is computed by IMPORTING the compiled backend registry, so an unbuilt tree cannot\n * produce one. Generating from a stale or absent model would author a migration for a model\n * nobody has — worse than not generating, because it then gets applied.\n */\n if (!existsSync(path.join(saasRoot, MODULES_REGISTRY_RELATIVE_PATH))) {\n throw new Error(\n `Build task ${task.taskRef} runs the database-migrations step, but ${MODULES_REGISTRY_RELATIVE_PATH} does not `\n + 'exist. The schema plan is computed by importing the compiled backend registry; build backend-api first.',\n );\n }\n\n const before = listMigrationFolders(saasRoot);\n this.logDebug('Running the database-migrations generation step', { taskRef: task.taskRef });\n /*\n * The migration LABEL comes from the task ref, so the folder is traceable back to the task\n * that produced it. Sanitised to the kebab-case shape `--name` accepts; the CLI still owns\n * the timestamp prefix, which is why the resulting path cannot be predicted here.\n */\n const label = task.taskRef.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 60)\n || 'build-plan-migration';\n const result = await executeBoundedSubprocess({\n command: 'wildo',\n args: ['db', 'generate', '--name', label],\n cwd: saasRoot,\n env: buildMigrationSubprocessEnv(),\n timeoutMs: MIGRATION_GENERATION_TIMEOUT_MS,\n });\n const after = listMigrationFolders(saasRoot);\n const generatedMigrationFolders = after.filter((folder) => !before.includes(folder));\n return {\n generationStepRef,\n // A clean plan is a legitimate outcome, not a failure: the resources this task follows may\n // have been migrated by an earlier one. The generator reports \"nothing to generate\".\n skippedBecauseAlreadyInSync: generatedMigrationFolders.length === 0,\n generatedMigrationFolders,\n outputTail: `${result.stdout}${result.stderr}`.slice(-2000),\n evidencePaths,\n };\n }\n default:\n throw new ApplicationBuildUnknownGenerationStepError(task.taskRef, generationStepRef);\n }\n }\n\n /**\n * Does this application already carry an accepted brand mark?\n *\n * Presence of the SSOT module is the whole test. It is written only by a promotion, so its\n * existence means a winner was chosen — and its ABSENCE is what makes the step run. Reading the\n * module's contents to count assets was considered and rejected: it would need the specifications\n * package evaluated, which is a far heavier question than \"has this step ever succeeded\", and the\n * landed check next door already keys on the same file.\n */\n private async hasAcceptedBrandMark(): Promise<boolean> {\n const ssotModulePath = path.resolve(\n this.companionContext.saasRoot,\n 'specifications',\n 'src',\n 'brand',\n BRAND_RESOLVED_ASSETS_MODULE,\n );\n try {\n await stat(ssotModulePath);\n return true;\n } catch {\n return false;\n }\n }\n\n private requireGenerationStepRef(task: BuildPlanTask): string {\n const target = task.target;\n if (target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n throw new Error(`Build task ${task.taskRef} is not a companion generation step.`);\n }\n return target.generationStepRef;\n }\n\n /**\n * The locales this application ENABLES — `appPreferences.languages.enabledLanguages`,\n * always including the primary. This is the \"every configured locale\" the\n * build task's objective speaks of; an app that enables only its primary\n * locale gets no translate pass and no foreign-locale evidence.\n */\n private resolveEnabledLocales(): readonly AvailableLanguage[] {\n return getCompanionServedLanguages(this.appConfigService.config);\n }\n\n /**\n * The locales the `i18n-translations` step translates into: every enabled locale but the primary.\n *\n * Public because the dispatch host derives that step only when this is non-empty — on a one-locale\n * application the step owes nothing and its evidence list would be empty, and an empty list never\n * lands, so a derived step there would be ready forever.\n */\n public resolveTranslationTargetLocales(): readonly AvailableLanguage[] {\n const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);\n return this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);\n }\n\n /** Every labelling unit's file, in each of the given locales — exactly the files the pipelines write. */\n private async resolveLabelUnitPaths(locales: readonly string[]): Promise<readonly string[]> {\n if (locales.length === 0) return [];\n const i18nRoot = this.resolveI18nRelativeRoot();\n const units = await this.planner.planAllUnits();\n return units.flatMap((unit) =>\n locales.map((locale) => path.posix.join(i18nRoot, unit.filePathHint.bucket, `${unit.filePathHint.slug}.${locale}.ts`)),\n );\n }\n\n /** `<backend service path>/src/engine/i18n`, app-root relative — the same tree the orchestrators write into. */\n private resolveI18nRelativeRoot(): string {\n const backendService = Object.values(this.companionContext.backendServices)[0];\n if (!backendService) {\n throw new Error('No backend service configured for per-unit i18n output.');\n }\n return path.posix.join(backendService.path, 'src/engine/i18n');\n }\n}\n"]}
@@ -117,6 +117,40 @@ export declare function buildPlanTaskLandedProbePaths(probe: BuildPlanTaskLanded
117
117
  export declare function buildPlanTaskLandedProbeWritablePaths(probe: BuildPlanTaskLandedProbe): readonly string[];
118
118
  /** The build-task checks whose coverage is stated, in the order a task runs them. */
119
119
  export declare const BUILD_TASK_COVERED_CHECK_REFS: readonly string[];
120
+ /**
121
+ * Whole-application questions a typecheck cannot answer, asked ONLY at the end of a build (#2228): does each optional
122
+ * site BUILD (`astro build`, `docusaurus build`), and does the configuration pass the checks the backend runs at
123
+ * startup. Never per task: a site build takes minutes, and a task already owes its package's typecheck, which is
124
+ * the fast half of the same question. An absent package answers "nothing to build" in the executor.
125
+ */
126
+ export declare const APPLICATION_ASSEMBLY_ONLY_CHECK_REFS: readonly string[];
127
+ /**
128
+ * Does the WHOLE application assemble? The checks that answer it (#2222): the typecheck of every workspace package
129
+ * the application can have, the package typecheck of every workers/minions package it has, and the schema-plan
130
+ * gate — derived from {@link CHECK_COVERAGE} and the workspace, never listed.
131
+ *
132
+ * It was a list of four (specifications, shared-lib, backend-api, frontend) in `bottom_up.assemble-verify`, and the
133
+ * list went stale the day #1490 added `website` and `technical-doc` packages: `app-creation-test-004` built a
134
+ * website that did not compile and no end-of-build question could see it. Derived from the coverage table, a
135
+ * package added there is asked about here with nobody remembering to. A package the application does not have
136
+ * answers "nothing to typecheck" in the executor, so naming every one is always safe.
137
+ *
138
+ * `packageDirectories` are the application's workers/minions package directories (`workers/reminders`, …), listed
139
+ * by `resolveApplicationAssemblyCheckRefs`; `nonTypeScriptPackages` the ones with no TypeScript (a Rust worker).
140
+ */
141
+ export declare function deriveApplicationAssemblyCheckRefs(packageDirectories: readonly string[], nonTypeScriptPackages?: readonly string[]): string[];
142
+ /**
143
+ * The boundary of a REPAIR of one failing end-of-build check (#2283): where it may write and what it must pass,
144
+ * derived from the check alone, never chosen by a model.
145
+ *
146
+ * - **Scope**: the check's coverage, widened to every workspace entry exactly as a build task's is (#1268), since a
147
+ * compile error in one package is often fixed in another. `.wildo-saas/` stays prohibited, and so does the generated
148
+ * documentation tree when the repair touches `technical-doc/`: the publication step owns it and would overwrite a
149
+ * hand edit, as it does for a documentation task.
150
+ * - **Checks**: what the coverage obliges ({@link deriveRequiredCheckRefs}), then the failing check itself, last, so
151
+ * the run's own verification asks the question again. A check with no known coverage still requires itself.
152
+ */
153
+ export declare function resolveAssemblyRepairCodingPolicy(checkRef: string, applicationWorkspaceEntries: readonly string[], nonTypeScriptPackages?: readonly string[]): ApplicationBuildTaskCodingPolicy;
120
154
  /**
121
155
  * The checks a task that writes `writtenPathPrefixes` must pass (#1540): every check whose coverage one
122
156
  * of those paths can reach, plus the package typecheck of every workers/minions package it writes.
@@ -166,6 +200,15 @@ export declare enum BuildPlanTaskLandedProbeKind {
166
200
  COMMITTED_FILE_DECLARES = "COMMITTED_FILE_DECLARES",
167
201
  /** Any one of several candidate files declares each named symbol — a product whose home is not a single known path. */
168
202
  ANY_COMMITTED_FILE_DECLARES = "ANY_COMMITTED_FILE_DECLARES",
203
+ /**
204
+ * Every COMMITTED label pack among `paths` carries a key under `keyPrefix`, and at least one pack is committed
205
+ * (#2216) — a website section's words, which it must add to each locale's pack. `paths` is total over the
206
+ * language vocabulary (`website/src/i18n/<locale>.json`, the name the website's own pack loader reads), so no
207
+ * locale is guessed and a pack the application does not have is simply not committed. Every committed pack,
208
+ * because the website build refuses a locale missing a key its sections read: a section with words in one
209
+ * language only would land on a site that does not build.
210
+ */
211
+ COMMITTED_LABEL_PACKS_DECLARE = "COMMITTED_LABEL_PACKS_DECLARE",
169
212
  /**
170
213
  * The RESOLVED shell surface carries what the placement plan decided for it (#1538): every subject
171
214
  * the plan PLACED on that surface is present by identity, no subject the plan DECLINED is, and every
@@ -221,6 +264,10 @@ export type BuildPlanTaskLandedProbe = {
221
264
  */
222
265
  readonly writablePaths: readonly string[];
223
266
  readonly site: ProductDeclarationSite;
267
+ } | {
268
+ readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE;
269
+ readonly paths: readonly string[];
270
+ readonly keyPrefix: string;
224
271
  } | {
225
272
  readonly kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN;
226
273
  readonly surface: PlacementSurface;
@@ -248,6 +295,12 @@ export declare function inboundChannelHandlerFileStem(handlerRef: string): strin
248
295
  * `inbound/mail-intake.inbound-channel-handler`.
249
296
  */
250
297
  export declare function inboundChannelHandlerImportTail(handlerRef: string): string;
298
+ /**
299
+ * The file a data seed lives in, without its extension — DERIVED from the seed's key, never chosen (#2234):
300
+ * `crm:demo-customers` → `seeds/crm.demo-customers.seed`. `:` becomes `.` because a file name cannot carry `:` on
301
+ * every platform. The `seeding-authoring` skill states the same rule, so the agent writes the file landing reads.
302
+ */
303
+ export declare function dataSeedFileStem(seedKey: string): string;
251
304
  /**
252
305
  * The skills a task's PRODUCTS require, whatever the decomposer wrote (#1832, #1835). A task producing an inbound
253
306
  * channel handler is authored with `inbound-channels`: the skill carries the handler contract, the file-name rule
@@ -282,7 +335,19 @@ export declare enum ProductDeclarationRelation {
282
335
  * objects: a bare word match on a short key (`pro`, `team`) is satisfied by the scaffold's own
283
336
  * `CUSTOM_PRODUCT_CATALOG` identifier and its prose, so an EMPTY catalogue would read as landed (#1835).
284
337
  */
285
- PROPERTY_VALUE = "property-value"
338
+ PROPERTY_VALUE = "property-value",
339
+ /**
340
+ * Each declaration is the exact string value of a named property inside an entry of a named LIST — written
341
+ * inline in the list's literal, or bound to a `const` the list names (#2216). A relation between the name, the
342
+ * object that declares it and the list that makes it count.
343
+ *
344
+ * For a product that exists only once something INCLUDES it: a website section is rendered, registered and
345
+ * label-audited from its page's `<PAGE>_SECTIONS` array, so one defined and never appended renders nothing.
346
+ * The page task writes that file with the list EMPTY and, from the brief it is given, a comment naming every
347
+ * section in reading order. Read as a set, all 18 sections of `app-creation-test-004` were landed by that
348
+ * comment before any section existed.
349
+ */
350
+ PROPERTY_VALUE_IN_LIST = "property-value-in-list"
286
351
  }
287
352
  export type ProductDeclarationSite = {
288
353
  readonly relation: ProductDeclarationRelation.SET;
@@ -295,6 +360,10 @@ export type ProductDeclarationSite = {
295
360
  } | {
296
361
  readonly relation: ProductDeclarationRelation.PROPERTY_VALUE;
297
362
  readonly propertyName: string;
363
+ } | {
364
+ readonly relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST;
365
+ readonly propertyName: string;
366
+ readonly listName: string;
298
367
  };
299
368
  /**
300
369
  * The declaration site of every product kind (#1539). TOTAL over the vocabulary: the `never` arm makes
@@ -311,8 +380,18 @@ export type ProductDeclarationSite = {
311
380
  * independent — a schema is a set of fields — so the set reading is the true one.
312
381
  */
313
382
  export declare function productDeclarationSite(product: BuildPlanTask['produces'][number]): ProductDeclarationSite;
314
- /** Does the committed text declare these refs at the site the product names? The one question every declaration probe asks. */
315
- export declare function declarationsAppearAt(text: string, declarations: readonly string[], site: ProductDeclarationSite): boolean;
383
+ /**
384
+ * Does the committed text declare these refs at the site the product names? The one question every declaration
385
+ * probe asks.
386
+ *
387
+ * `sourcePath`, when the file is a script source, blanks its comments BEFORE any relation reads it (#2216). A
388
+ * structural question must never be answered by prose, and for a SET that used to be exactly what happened: the
389
+ * whole-word matcher counted a JSDoc that NAMED a product as the product. The file a probe reads is often written
390
+ * by a sibling task with every ref of the plan in its brief — the website page task wrote all 18 section refs of
391
+ * `app-creation-test-004` into its sections file's header and every section read landed. The relations that
392
+ * already blanked their own input (`PROPERTY_VALUE`, `KEY_AT_OBJECT_PATH`) are unchanged by the second pass.
393
+ */
394
+ export declare function declarationsAppearAt(text: string, declarations: readonly string[], site: ProductDeclarationSite, sourcePath?: string): boolean;
316
395
  /**
317
396
  * Is every declaration the exact string value of `propertyName` somewhere in the comment-blanked text?
318
397
  *
@@ -321,6 +400,38 @@ export declare function declarationsAppearAt(text: string, declarations: readonl
321
400
  * `productKey: 'team'` does not count as `key: 'team'`.
322
401
  */
323
402
  export declare function declarationsAppearAsPropertyValues(text: string, declarations: readonly string[], propertyName: string): boolean;
403
+ /**
404
+ * Is every declaration the exact string value of `propertyName` in an ENTRY of the array bound to `listName`?
405
+ * An entry declares it inline (`[defineWebsiteSection({ sectionRef: 'home-hero' })]`) or through a `const` the
406
+ * list names (`const HOME_HERO = defineWebsiteSection({ sectionRef: 'home-hero' })` … `[HOME_HERO]`) — the
407
+ * second is how every section skill and the `add-website` scaffold write it (#2216).
408
+ *
409
+ * Membership is what makes the product real: a page renders, registers and label-audits exactly what its list
410
+ * holds, so a section defined and never appended is not a section. A name in a comment, or in another list,
411
+ * counts for nothing.
412
+ *
413
+ * Lexical, like every matcher here, and blind in the honest direction: a value it cannot see — one computed by a
414
+ * helper, a list built by a function call, a binding imported from another file — reads as NOT landed, which costs
415
+ * a run that finds the work done; it never reads an empty list as full.
416
+ *
417
+ * Known residual, shared with {@link blankComments}: an apostrophe in JSX TEXT (`<p>Don't</p>`) opens a "string" to
418
+ * a lexer that knows no JSX, so quote parity can flip for the rest of the file. A section file keeps its words in
419
+ * label packs rather than JSX text, which is why this has not been worth a parser; if it ever bites, the answer is
420
+ * the introspection subprocess, not a smarter regex.
421
+ */
422
+ export declare function declarationsAppearAsListedPropertyValues(text: string, declarations: readonly string[], propertyName: string, listName: string): boolean;
423
+ /**
424
+ * Every label pack a website CAN have — one per member of the language vocabulary, named as the website's own pack
425
+ * loader names them (`website/src/i18n/<locale>.json`). Total over the enum, so a locale added tomorrow is probed
426
+ * with nobody remembering to.
427
+ */
428
+ export declare const WEBSITE_LABEL_PACK_PATHS: readonly string[];
429
+ /**
430
+ * Does every committed pack carry a key under `keyPrefix`, and is at least one pack committed? `texts` is one entry
431
+ * per candidate path, `undefined` where the path is not committed (#2216). A KEY, not a mention: the prefix must
432
+ * open a quoted string that a colon follows, so a value that happens to contain it does not count.
433
+ */
434
+ export declare function labelPacksDeclareKeyPrefix(texts: readonly (string | undefined)[], keyPrefix: string): boolean;
324
435
  /**
325
436
  * Is every declaration a property KEY of the object at `objectPath`? The first segment may sit at any
326
437
  * depth (the path starts inside a call such as `defineSaaSProviders({ scopes })`); every later segment
@@ -359,6 +470,12 @@ export declare function declarationsAppearAsKeysAt(text: string, declarations: r
359
470
  * keyed to the one prefix the website-plan family actually uses.
360
471
  */
361
472
  export declare function websitePageIdentity(pageRef: string): string;
473
+ /**
474
+ * The name of a page's ordered sections list — `HOME_SECTIONS` for `page-home` — which the page renders, registers
475
+ * and label-audits. ONE derivation for the two sides that must agree on it: the page task's brief, which tells the
476
+ * agent to export it, and the section probe, which lands a section only once it is an entry of it (#2216).
477
+ */
478
+ export declare function websitePageSectionsListName(pageRef: string): string;
362
479
  /**
363
480
  * A resource custom view's ref, as the TREE spells it.
364
481
  *
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-task-coding-policy.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-task-coding-policy.companion.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,gBAAgB,EAGhB,KAAK,aAAa,EAKlB,KAAK,gBAAgB,EAGtB,MAAM,oDAAoD,CAAC;AAS5D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED,4FAA4F;AAC5F,qBAAa,uCAAwC,SAAQ,KAAK;aAC7B,OAAO,EAAE,MAAM;aAAkB,iBAAiB,EAAE,MAAM;gBAA1D,OAAO,EAAE,MAAM,EAAkB,iBAAiB,EAAE,MAAM;CAI9F;AA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d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-task-coding-policy.companion.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,gBAAgB,EAGhB,KAAK,aAAa,EAKlB,KAAK,gBAAgB,EAKtB,MAAM,oDAAoD,CAAC;AAU5D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED,4FAA4F;AAC5F,qBAAa,uCAAwC,SAAQ,KAAK;aAC7B,OAAO,EAAE,MAAM;aAAkB,iBAAiB,EAAE,MAAM;gBAA1D,OAAO,EAAE,MAAM,EAAkB,iBAAiB,EAAE,MAAM;CAI9F;AAoED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wCAAwC,CACtD,2BAA2B,EAAE,SAAS,MAAM,EAAE,GAC7C,SAAS,MAAM,EAAE,CAInB;AAmED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,aAAa,EACnB,2BAA2B,EAAE,SAAS,MAAM,EAAE,GAC7C,gCAAgC,CAuBlC;AAuED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CASrF;AAED,qGAAqG;AACrG,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,MAAM,EAAE,CAkBhG;AAED;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,MAAM,EAAE,CAoBxG;AAwED,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAAgC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