@wildo-ai/dev-companion 1.1.3 → 1.1.4

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 (549) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/__tests__/asset-noop.d.ts.map +1 -1
  3. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
  4. package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
  5. package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.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 +9 -3
  9. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  10. package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
  11. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
  12. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  13. package/dist/esm/brand/services/brand-accept.companion.service.js +10 -48
  14. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  15. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
  16. package/dist/esm/brand/services/logo-deliberation.companion.service.js +2 -8
  17. package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
  18. package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
  19. package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
  20. package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
  21. package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
  22. package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
  23. package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
  24. package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
  25. package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
  26. package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
  27. package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
  28. package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
  29. package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
  30. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +52 -2
  31. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +45 -0
  33. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +45 -5
  35. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  36. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +192 -13
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +12 -22
  39. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +151 -82
  41. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +30 -4
  43. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  44. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +30 -4
  45. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  46. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +16 -0
  47. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +17 -0
  49. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  50. package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
  51. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
  52. package/dist/esm/companion-api/companion-api.schemas.d.ts +57 -57
  53. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  54. package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
  55. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
  56. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
  57. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +98 -0
  58. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
  59. package/dist/esm/companion-api/controllers/companion.controller.d.ts +33 -5
  60. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  61. package/dist/esm/companion-api/controllers/companion.controller.js +150 -40
  62. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  63. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +8 -1
  64. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
  65. package/dist/esm/core/auth/companion-auth-floor.companion.service.js +8 -1
  66. package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
  67. package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
  68. package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
  69. package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
  70. package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
  71. package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
  72. package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
  73. package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
  74. package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
  75. package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
  76. package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
  77. package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
  78. package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
  80. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
  81. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
  82. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
  83. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
  84. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
  85. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
  86. package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
  87. package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
  88. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  89. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
  90. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  91. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  92. package/dist/esm/core/context/companion-context.d.ts.map +1 -1
  93. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  94. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  95. package/dist/esm/core/inject/models/container.js +0 -7
  96. package/dist/esm/core/inject/models/container.js.map +1 -1
  97. package/dist/esm/core/inject/models/service-types.d.ts +0 -1
  98. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  99. package/dist/esm/core/inject/models/service-types.js +0 -1
  100. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  101. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  102. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  103. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  104. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +8 -4
  105. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  106. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  107. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +8 -1
  108. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  109. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  110. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  111. package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
  112. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  113. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +42 -1
  114. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  115. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  116. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  117. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
  118. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +4 -9
  120. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  121. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  122. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  124. package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
  125. package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
  126. package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
  127. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  128. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +3 -2
  129. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  130. package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
  131. package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
  133. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
  135. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
  137. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +0 -21
  139. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +39 -1
  141. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
  142. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  143. package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
  144. package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
  145. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +41 -2
  146. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  147. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +178 -41
  148. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  149. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  150. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
  151. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
  152. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
  153. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
  154. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
  155. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
  156. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
  157. package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
  158. package/dist/esm/core/runtime/companion-startup-assembly.js +5 -0
  159. package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
  160. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  161. package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
  162. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +16 -13
  163. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  164. package/dist/esm/core/runtime/services/start-companion-application.service.js +70 -45
  165. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  166. package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
  167. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  168. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +9 -2
  169. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  170. package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
  171. package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
  172. package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
  173. package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
  174. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
  175. package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
  176. package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
  177. package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
  178. package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
  180. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
  181. package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
  182. package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
  183. package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
  184. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
  185. package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
  186. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  187. package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
  188. package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
  189. package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
  190. package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
  191. package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
  192. package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
  193. package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
  194. package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
  195. package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
  196. package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
  197. package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
  198. package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
  199. package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
  200. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
  201. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
  202. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
  203. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
  204. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
  205. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
  206. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
  207. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
  208. package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
  209. package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
  210. package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
  211. package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
  212. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
  213. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
  214. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
  215. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
  216. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
  217. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
  218. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
  219. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
  220. package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
  221. package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
  222. package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
  223. package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
  224. package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
  225. package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
  226. package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
  227. package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
  228. package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
  229. package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
  230. package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
  231. package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
  232. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
  233. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
  234. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
  235. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
  236. package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
  237. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
  238. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +4 -4
  239. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
  240. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  241. package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
  242. package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
  243. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  244. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
  245. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  246. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  247. package/dist/esm/deliberations/services/deliberation.companion.service.js +0 -5
  248. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  249. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
  250. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +0 -2
  251. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
  252. package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
  253. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  254. package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
  255. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  256. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
  257. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
  258. package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
  259. package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
  260. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  261. package/dist/esm/email/services/email-template.companion.service.js +23 -1
  262. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  263. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  264. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  265. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +82 -3
  266. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  267. package/dist/esm/executions/services/companion-executions.companion.service.js +128 -6
  268. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  269. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  270. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
  271. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  272. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  273. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
  274. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  275. package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
  276. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +9 -24
  277. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  278. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +11 -60
  279. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  280. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
  281. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
  282. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
  283. package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
  285. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  286. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
  287. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  289. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
  290. package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
  291. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
  293. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  294. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  295. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
  296. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
  297. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  298. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  299. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  301. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
  302. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
  303. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
  305. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
  306. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
  307. package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  311. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
  314. package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
  315. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
  317. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
  318. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
  319. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
  321. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
  322. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
  323. package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
  325. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
  326. package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
  327. package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
  329. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  330. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
  331. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
  333. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
  334. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  336. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
  337. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  338. package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
  339. package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
  340. package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
  341. package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
  342. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
  344. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  345. package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
  346. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
  347. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
  348. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
  349. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
  350. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
  352. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
  353. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
  354. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
  355. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
  356. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
  357. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
  359. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
  360. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
  361. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
  363. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
  364. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
  365. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  367. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
  368. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
  369. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
  371. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  372. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
  373. package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
  375. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
  376. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
  377. package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
  379. package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
  380. package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
  381. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  382. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
  383. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
  384. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
  385. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
  386. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
  387. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
  388. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
  389. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
  391. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
  392. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
  393. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  395. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
  396. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
  397. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
  399. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
  400. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
  401. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
  403. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
  404. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
  405. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
  407. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  408. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  409. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
  411. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
  412. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
  413. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
  414. package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
  415. package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
  416. package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
  417. package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
  419. package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
  420. package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
  421. package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
  422. package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
  423. package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
  424. package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
  425. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  426. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -1
  427. package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
  428. package/dist/esm/i18n/index.d.ts.map +1 -1
  429. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  430. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
  431. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
  432. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  433. package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
  434. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  435. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  436. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  437. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
  438. package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
  439. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +58 -0
  440. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +35 -0
  442. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  443. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  444. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
  445. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  446. package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
  447. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +55 -1
  448. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  449. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +178 -73
  450. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  451. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +3 -3
  452. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  453. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +16 -5
  454. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  455. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +35 -2
  456. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  457. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +68 -29
  458. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  459. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  460. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +126 -35
  461. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  462. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
  463. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
  464. package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
  465. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
  466. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
  467. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
  468. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
  469. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
  470. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
  471. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
  472. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
  473. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  474. package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
  475. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +104 -0
  476. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  477. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +163 -18
  478. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  479. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
  480. package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
  481. package/dist/esm/index.d.ts.map +1 -1
  482. package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
  483. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +82 -3
  484. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  485. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +210 -54
  486. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  487. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +27 -1
  488. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  489. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +38 -5
  490. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  491. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +49 -0
  492. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
  493. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +95 -0
  494. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
  495. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  496. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +9 -4
  498. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  499. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
  500. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +25 -6
  501. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  502. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +82 -25
  503. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  504. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +83 -2
  505. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  506. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +197 -4
  507. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  508. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  509. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
  510. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  511. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +1 -1
  512. package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
  513. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +44 -3
  515. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  516. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +346 -42
  517. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  518. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
  519. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +117 -2
  520. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
  521. package/dist/esm/technical-doc/services/technical-doc.companion.service.js +260 -69
  522. package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
  523. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +7 -1
  524. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
  525. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +179 -10
  526. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
  527. package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
  528. package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
  529. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
  530. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  531. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
  532. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  533. package/package.json +17 -17
  534. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
  535. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
  536. package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
  537. package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
  538. package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
  539. package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
  540. package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
  541. package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
  542. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +0 -19
  543. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +0 -1
  544. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +0 -19
  545. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +0 -1
  546. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
  547. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
  548. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
  549. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
@@ -83,17 +83,36 @@ export declare class ApplicationBuildDispatchCompanionService {
83
83
  private readonly logDebug;
84
84
  constructor(logger: LoggerService, companionContext: CompanionContext, dispatch: CodingAgentDispatchCompanionService, git: GitChangeSetCompanionService, generationSteps: ApplicationBuildGenerationStepCompanionService, introspection: CompanionIntrospectionService);
85
85
  /** What the next run would be, without running it. Pure read — nothing is locked, created or started. */
86
- describeNextBuildTask(input?: {
87
- readonly maximumTokenBudget?: number;
88
- }): Promise<ApplicationBuildDispatchPlan>;
86
+ describeNextBuildTask(): Promise<ApplicationBuildDispatchPlan>;
89
87
  /**
90
88
  * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding
91
89
  * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the
92
90
  * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.
93
91
  */
94
- dispatchNextBuildTask(input?: {
95
- readonly maximumTokenBudget?: number;
96
- }, session?: CompanionExecutionSessionContext): Promise<ApplicationBuildDispatchResult>;
92
+ /**
93
+ * The last few DETACHED dispatch outcomes, newest first — the observation channel the synchronous
94
+ * door lacked. Measured 2026-09-04: a 40+-minute i18n generation step outlived the HTTP request's
95
+ * 30-minute ceiling, the response died with the socket, and the only signals left were file
96
+ * mtimes and a lock file whose EXISTENCE turned out to mean nothing — the operator was blind for
97
+ * half the run. In-memory by design: the step's real product is files on disk (durable in git),
98
+ * and this record is the run's NARRATIVE, not its truth.
99
+ */
100
+ private readonly lastDetachedDispatches;
101
+ readDetachedDispatches(): readonly {
102
+ taskRef: string;
103
+ startedAt: string;
104
+ finishedAt?: string;
105
+ ok?: boolean;
106
+ error?: string;
107
+ }[];
108
+ /**
109
+ * Fire the next ready build task WITHOUT holding an HTTP request over it. Returns the selected
110
+ * plan immediately; the outcome lands in {@link readDetachedDispatches} and, for a coding task,
111
+ * in the durable actor-task row it already writes. The same single-flight properties hold — this
112
+ * is the same `dispatchNextBuildTask`, minus the requirement that a socket survive it.
113
+ */
114
+ submitBuildDispatchDetached(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildDispatchPlan>;
115
+ dispatchNextBuildTask(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildDispatchResult>;
97
116
  /**
98
117
  * Reconstruct the answerable state for a parked coding task whose IN-PROCESS
99
118
  * state was lost to a companion restart, by RE-SELECTING it from the build plan.
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-dispatch.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAO9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAahE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAG5H,OAAO,EACL,mCAAmC,EACnC,KAAK,wBAAwB,EAC9B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAC1G,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,uDAAuD,CAAC;AAC9G,OAAO,EACL,8CAA8C,EAC9C,KAAK,uCAAuC,EAC7C,MAAM,uDAAuD,CAAC;AAO/D,kFAAkF;AAElF,qBAAa,oCAAqC,SAAQ,KAAK;CAAG;AAClE,qBAAa,kCAAmC,SAAQ,KAAK;CAAG;AAEhE,+GAA+G;AAC/G,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,SAAS,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G;IACU,oCAAoC,CAC/C,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,gCAAgC,GAChD,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;YAyC7B,oBAAoB;IAoElC;;;;;;;;;;;OAWG;IACH;;;;OAIG;IACU,6BAA6B,IAAI,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAWhI;;;;;;;;;;;;;;OAcG;IACU,sBAAsB,IAAI,OAAO,CAAC,SAAS;QACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;QACjC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;QAC9C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;KAClD,EAAE,CAAC;YAoBU,qBAAqB;IAenC,4FAA4F;YAC9E,aAAa;IAyB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH;;;;;;;OAOG;IACH,OAAO,CAAC,qCAAqC;YAiB/B,mBAAmB;CA+GlC"}
1
+ {"version":3,"file":"application-build-dispatch.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAO9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAahE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAG5H,OAAO,EACL,mCAAmC,EACnC,KAAK,wBAAwB,EAC9B,MAAM,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QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAWhI;;;;;;;;;;;;;;OAcG;IACU,sBAAsB,IAAI,OAAO,CAAC,SAAS;QACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;QACjC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;QAC9C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;KAClD,EAAE,CAAC;YAoBU,qBAAqB;IAiCnC,4FAA4F;YAC9E,aAAa;IAiC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH;;;;;;;OAOG;IACH,OAAO,CAAC,qCAAqC;YAgB/B,mBAAmB;CA4GlC"}
@@ -14,8 +14,7 @@ import { inject, injectable } from 'inversify';
14
14
  import { WorkbenchBuildPlanTaskStatus } from '@wildo-ai/platform-core-shared';
15
15
  import { composeBuildTaskCodingContract, slugifyRegistryIdentifier, } from '@wildo-ai/application-creation-runtime';
16
16
  import { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';
17
- import { MetaWorkflow_ContextSourceRole } from '@wildo-ai/saas-models/meta-workflows';
18
- import { BuildPlanTaskGraphSchema, BuildPlanTaskTargetKind, selectReadyBuildPlanTasks, validateBuildPlanTaskGraph, } from '@wildo-ai/saas-specifications/application-creation';
17
+ import { BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES, BuildPlanTaskGraphSchema, BuildPlanTaskTargetKind, selectReadyBuildPlanTasks, validateBuildPlanTaskGraph, } from '@wildo-ai/saas-specifications/application-creation';
19
18
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
20
19
  import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service.js';
21
20
  import { loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion.js';
@@ -23,7 +22,7 @@ import { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.com
23
22
  import { CodingAgentDispatchCompanionService, } from '../../claude-cli/services/coding-agent-dispatch.companion.service.js';
24
23
  import { resolveApplicationCodingTaskVerificationPlans, } from '../../claude-cli/models/coding-agent-dispatch.models.js';
25
24
  import { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service.js';
26
- import { ApplicationBuildGenerationStepCompanionService, } from './application-build-generation-step.companion.service.js';
25
+ import { ApplicationBuildGenerationStepCompanionService, ApplicationBuildGenerationStepLandedKind, } from './application-build-generation-step.companion.service.js';
27
26
  import { resolveBuildPlanTaskCodingPolicy, resolveBuildTaskLandedEvidencePaths, } from './application-build-task-coding-policy.companion.service.js';
28
27
  /** No build plan, or nothing left to do. Named so the transport can say which. */
29
28
  export class ApplicationBuildPlanUnavailableError extends Error {
@@ -80,16 +79,53 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
80
79
  this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');
81
80
  }
82
81
  /** What the next run would be, without running it. Pure read — nothing is locked, created or started. */
83
- async describeNextBuildTask(input = {}) {
84
- return (await this.prepareNextBuildTask(input)).plan;
82
+ async describeNextBuildTask() {
83
+ return (await this.prepareNextBuildTask()).plan;
85
84
  }
86
85
  /**
87
86
  * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding
88
87
  * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the
89
88
  * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.
90
89
  */
91
- async dispatchNextBuildTask(input = {}, session) {
92
- const prepared = await this.prepareNextBuildTask(input);
90
+ /**
91
+ * The last few DETACHED dispatch outcomes, newest first — the observation channel the synchronous
92
+ * door lacked. Measured 2026-09-04: a 40+-minute i18n generation step outlived the HTTP request's
93
+ * 30-minute ceiling, the response died with the socket, and the only signals left were file
94
+ * mtimes and a lock file whose EXISTENCE turned out to mean nothing — the operator was blind for
95
+ * half the run. In-memory by design: the step's real product is files on disk (durable in git),
96
+ * and this record is the run's NARRATIVE, not its truth.
97
+ */
98
+ lastDetachedDispatches = [];
99
+ readDetachedDispatches() {
100
+ return [...this.lastDetachedDispatches];
101
+ }
102
+ /**
103
+ * Fire the next ready build task WITHOUT holding an HTTP request over it. Returns the selected
104
+ * plan immediately; the outcome lands in {@link readDetachedDispatches} and, for a coding task,
105
+ * in the durable actor-task row it already writes. The same single-flight properties hold — this
106
+ * is the same `dispatchNextBuildTask`, minus the requirement that a socket survive it.
107
+ */
108
+ submitBuildDispatchDetached(session) {
109
+ return this.prepareNextBuildTask().then((prepared) => {
110
+ const record = {
111
+ taskRef: prepared.plan.taskRef,
112
+ startedAt: new Date().toISOString(),
113
+ };
114
+ this.lastDetachedDispatches.unshift(record);
115
+ this.lastDetachedDispatches.splice(5);
116
+ void this.dispatchNextBuildTask(session)
117
+ .then(() => { record.finishedAt = new Date().toISOString(); record.ok = true; })
118
+ .catch((error) => {
119
+ record.finishedAt = new Date().toISOString();
120
+ record.ok = false;
121
+ record.error = error instanceof Error ? error.message.slice(0, 400) : String(error).slice(0, 400);
122
+ this.logDebug('Detached build dispatch failed', { taskRef: record.taskRef, error: record.error });
123
+ });
124
+ return prepared.plan;
125
+ });
126
+ }
127
+ async dispatchNextBuildTask(session) {
128
+ const prepared = await this.prepareNextBuildTask();
93
129
  if (prepared.kind === 'GENERATION_STEP') {
94
130
  this.logDebug('Running a companion generation step', {
95
131
  taskRef: prepared.plan.taskRef,
@@ -152,7 +188,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
152
188
  // would spend a model call to build context nothing reads.
153
189
  contextSources: [this.buildTaskSelfDescriptionContextSource(task, graph.tasks.length)],
154
190
  objectiveRef: 'application-creation:objective/build-plan',
155
- maximumTokenBudget: DEFAULT_CONTEXT_TOKEN_BUDGET,
156
191
  });
157
192
  }
158
193
  catch {
@@ -171,7 +206,7 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
171
206
  parkedAt: new Date().toISOString(),
172
207
  };
173
208
  }
174
- async prepareNextBuildTask(input) {
209
+ async prepareNextBuildTask() {
175
210
  const graph = await this.readBuildPlan();
176
211
  const landedTaskRefs = await this.resolveLandedTaskRefs(graph.tasks);
177
212
  const ready = selectReadyBuildPlanTasks(graph, landedTaskRefs);
@@ -213,7 +248,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
213
248
  boundary,
214
249
  contextSources: await this.buildContextSources(task, graph.tasks.length),
215
250
  objectiveRef: 'application-creation:objective/build-plan',
216
- maximumTokenBudget: input.maximumTokenBudget ?? DEFAULT_CONTEXT_TOKEN_BUDGET,
217
251
  });
218
252
  const plan = {
219
253
  taskRef: task.taskRef,
@@ -293,11 +327,32 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
293
327
  async resolveLandedTaskRefs(tasks) {
294
328
  const landed = new Set();
295
329
  for (const task of tasks) {
296
- const evidencePaths = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP
297
- // Planner-derived: the exact unit files the step's pipelines write (see that service's JSDoc for
298
- // why a directory prefix would be dishonest here).
299
- ? await this.generationSteps.resolveGenerationStepEvidencePaths(task)
300
- : resolveBuildTaskLandedEvidencePaths(task);
330
+ if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {
331
+ /*
332
+ * A generation step declares HOW it proves it landed, because not every step proves it with
333
+ * files. Most name the exact unit files their pipelines write (see that service's JSDoc for
334
+ * why a directory prefix would be dishonest). The migration step cannot — its artifact is
335
+ * `backend-api/migrations/<timestamp>_<name>/migration.sql` and the timestamp is minted
336
+ * during the run — so it lands on the STATE it exists to reach instead.
337
+ *
338
+ * Read the condition, never the evidence paths: for the migration step those name the
339
+ * accepted lockfile, which predates the step, so landing on it would pass having verified
340
+ * nothing.
341
+ */
342
+ const condition = await this.generationSteps.resolveGenerationStepLandedCondition(task);
343
+ if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {
344
+ if (await this.generationSteps.isSchemaPlanInSync())
345
+ landed.add(task.taskRef);
346
+ continue;
347
+ }
348
+ if (condition.paths.length === 0)
349
+ continue;
350
+ const committedPaths = await Promise.all(condition.paths.map((path) => this.git.isWorktreePathCommitted(path)));
351
+ if (committedPaths.every(Boolean))
352
+ landed.add(task.taskRef);
353
+ continue;
354
+ }
355
+ const evidencePaths = resolveBuildTaskLandedEvidencePaths(task);
301
356
  if (evidencePaths.length === 0)
302
357
  continue;
303
358
  const committed = await Promise.all(evidencePaths.map((path) => this.git.isWorktreePathCommitted(path)));
@@ -317,11 +372,19 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
317
372
  if (!parsed.success) {
318
373
  throw new ApplicationBuildPlanUnavailableError(`The application's build plan does not satisfy its schema: ${parsed.error.issues.slice(0, 3).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}`);
319
374
  }
320
- // Semantic validation too, not just the shape: a graph with a dangling prerequisite would let
321
- // `selectReadyBuildPlanTasks` report a task ready whose dependency can never land.
375
+ // Semantic validation too, not just the shape: a graph whose ordering is unsound would let
376
+ // `selectReadyBuildPlanTasks` report a task ready before the work it depends on can have landed.
377
+ //
378
+ // Gated on the FLOOR codes, not on `findings.length > 0` as it was until 2026-09-09. That older
379
+ // reading made this gate disagree with the landing gate about the same graph: an authoring
380
+ // warning — a resource stage whose predecessor is absent from the plan, which is legitimate when
381
+ // the tree already carries that stage — landed happily at the semantic authority and then made
382
+ // the whole plan permanently undispatchable HERE, with the refusal naming a warning. One
383
+ // classification, named once in `_core` beside the codes.
322
384
  const findings = validateBuildPlanTaskGraph(parsed.data);
323
- if (findings.length > 0) {
324
- throw new ApplicationBuildPlanUnavailableError(`The application's build plan fails semantic validation: ${findings.slice(0, 3).map((finding) => finding.message).join('; ')}`);
385
+ const blocking = findings.filter((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));
386
+ if (blocking.length > 0) {
387
+ throw new ApplicationBuildPlanUnavailableError(`The application's build plan fails semantic validation: ${blocking.slice(0, 3).map((finding) => finding.message).join('; ')}`);
325
388
  }
326
389
  return parsed.data;
327
390
  }
@@ -365,7 +428,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
365
428
  return {
366
429
  sourceRef: 'application-creation:context/build-task',
367
430
  originRef: 'application-creation:origin/build-plan',
368
- role: MetaWorkflow_ContextSourceRole.MANDATORY,
369
431
  content: {
370
432
  taskRef: task.taskRef,
371
433
  objective: task.objective,
@@ -390,7 +452,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
390
452
  sources.push({
391
453
  sourceRef: 'application-creation:context/live-queries',
392
454
  originRef: 'application-creation:origin/dev-companion',
393
- role: MetaWorkflow_ContextSourceRole.MANDATORY,
394
455
  content: {
395
456
  guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '
396
457
  + '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '
@@ -417,7 +478,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
417
478
  sources.push({
418
479
  sourceRef: 'application-creation:context/workspace-truth',
419
480
  originRef: 'application-creation:origin/resources-registry-introspection',
420
- role: MetaWorkflow_ContextSourceRole.MANDATORY,
421
481
  content: {
422
482
  allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),
423
483
  ...(targetModule
@@ -462,7 +522,6 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
462
522
  sources.push({
463
523
  sourceRef: 'application-creation:context/domain-plan-slice',
464
524
  originRef: 'application-creation:origin/domain-plan',
465
- role: MetaWorkflow_ContextSourceRole.MANDATORY,
466
525
  content: {
467
526
  targetModule: targetPlanModule,
468
527
  ...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),
@@ -492,6 +551,4 @@ ApplicationBuildDispatchCompanionService = __decorate([
492
551
  CompanionIntrospectionService])
493
552
  ], ApplicationBuildDispatchCompanionService);
494
553
  export { ApplicationBuildDispatchCompanionService };
495
- /** Context ceiling for one dispatch. Stated here because only the host knows what the agent can accept. */
496
- const DEFAULT_CONTEXT_TOKEN_BUDGET = 120_000;
497
554
  //# sourceMappingURL=application-build-dispatch.companion.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-dispatch.companion.service.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,GAG3B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAC5H,OAAO,EAAE,kCAAkC,EAAE,MAAM,wDAAwD,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EACL,mCAAmC,GAEpC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EACL,6CAA6C,GAE9C,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAE1G,OAAO,EACL,8CAA8C,GAE/C,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAEL,gCAAgC,EACh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AC,CAAA;IACnD,WAAA,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;uDAHkC,mCAAmC;QAC/C,4BAA4B;QACT,8CAA8C;QACtD,6BAA6B;GAT1G,wCAAwC,CA2cpD;;AAED,2GAA2G;AAC3G,MAAM,4BAA4B,GAAG,OAAO,CAAC","sourcesContent":["import { inject, injectable } from 'inversify';\nimport { WorkbenchBuildPlanTaskStatus } from '@wildo-ai/platform-core-shared';\n\nimport {\n composeBuildTaskCodingContract,\n slugifyRegistryIdentifier,\n type BuildTaskContextSource,\n} from '@wildo-ai/application-creation-runtime';\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport { MetaWorkflow_ContextSourceRole } from '@wildo-ai/saas-models/meta-workflows';\nimport {\n BuildPlanTaskGraphSchema,\n BuildPlanTaskTargetKind,\n selectReadyBuildPlanTasks,\n validateBuildPlanTaskGraph,\n type ApplicationCodingTaskContract,\n type BuildPlanTask,\n} 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 { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.companion';\nimport {\n CodingAgentDispatchCompanionService,\n type ParkedCodingSessionState,\n} from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n resolveApplicationCodingTaskVerificationPlans,\n type ApplicationCodingTaskRunAdmission,\n} from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport {\n ApplicationBuildGenerationStepCompanionService,\n type ApplicationBuildGenerationStepRunResult,\n} from './application-build-generation-step.companion.service';\nimport {\n ApplicationBuildTaskNotACodingTaskError,\n resolveBuildPlanTaskCodingPolicy,\n resolveBuildTaskLandedEvidencePaths,\n} from './application-build-task-coding-policy.companion.service';\n\n/** No build plan, or nothing left to do. Named so the transport can say which. */\n\nexport class ApplicationBuildPlanUnavailableError extends Error {}\nexport class ApplicationBuildPlanExhaustedError extends Error {}\n\n/** What the next dispatch WOULD be. Returned unconfirmed, so a creator sees the scope before anything runs. */\nexport interface ApplicationBuildDispatchPlan {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n /**\n * Present exactly when the next task is a companion generation step. A build plan INTERLEAVES two\n * executors — coding tasks for a coding agent, and companion generation steps (labels, seeds, emails)\n * the companion runs itself — and this route serves BOTH: `dispatch-next` routes by the task's own\n * `target.kind`. (An earlier version refused generation steps by name; now that an executor exists,\n * the refusal would be a hole in the build lane, not a boundary.)\n */\n readonly generationStepRef?: string;\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredChecks: readonly string[];\n readonly installedSkillRefs: readonly string[];\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n}\n\n/**\n * One dispatched build task's outcome — exactly one of the two executor results is present, matching the\n * plan's `targetKind`. `admission` for a coding run; `generationStep` for a companion generation step.\n */\nexport interface ApplicationBuildDispatchResult {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n}\n\n/**\n * Dispatch the next ready build-plan task to a coding agent.\n *\n * ## The chain, and who owns each link\n *\n * | link | owner |\n * |---|---|\n * | which tasks have landed | GIT — a task has landed when the files it produces are committed |\n * | which are READY | `selectReadyBuildPlanTasks` in `_core` — pure, prerequisite-closed |\n * | what a task may touch | `resolveBuildPlanTaskCodingPolicy` — the ONLY place a `target.kind` becomes paths |\n * | the contract | `composeBuildTaskCodingContract` in the runtime — pure, schema-pinned |\n * | the run | `CodingAgentDispatchCompanionService` — mutation lock, git baseline, change-set capture |\n *\n * Nothing in that chain is decided by a model. The agent is handed a task and a boundary; it does not\n * choose either.\n *\n * ## There is no confirmation flag, and that was a correction\n *\n * `dispatchNextBuildTask` ran only when the caller also passed `confirmWorkspaceMutation: true`. It was\n * removed the day it was written, because it protected nothing the mechanism does not already protect:\n * the scope is derived from the task's CLOSED `target.kind` and cannot be widened, the mutation lock\n * admits one workspace-mutating run at a time, the run is bracketed by a git baseline snapshot and a\n * change-set capture so every touched path is visible and revertible, the required checks gate the\n * result, and nothing is ACCEPTED until a human commits.\n *\n * A caller that posts to this route is asking for a coding run — that IS the route. Making them say so\n * twice is the acceptance ceremony this whole migration exists to remove, and a field that feels like a\n * control while enforcing nothing is the exact failure mode recorded in the plan's objective.\n *\n * What was genuinely useful in it — seeing the scope before committing to a run — is a READ, and lives at\n * `describeNextBuildTask` below.\n */\n@injectable()\nexport class ApplicationBuildDispatchCompanionService {\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(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly dispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BuildGenerationStepService) private readonly generationSteps: ApplicationBuildGenerationStepCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');\n }\n\n /** What the next run would be, without running it. Pure read — nothing is locked, created or started. */\n public async describeNextBuildTask(input: { readonly maximumTokenBudget?: number } = {}): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTask(input)).plan;\n }\n\n /**\n * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding\n * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the\n * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.\n */\n public async dispatchNextBuildTask(\n input: { readonly maximumTokenBudget?: number } = {},\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildDispatchResult> {\n const prepared = await this.prepareNextBuildTask(input);\n if (prepared.kind === 'GENERATION_STEP') {\n this.logDebug('Running a companion generation step', {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef,\n });\n const generationStep = await this.generationSteps.executeGenerationStep(prepared.task, session);\n return { plan: prepared.plan, generationStep };\n }\n this.logDebug('Dispatching a build task to the coding agent', {\n taskRef: prepared.plan.taskRef,\n allowedPathPrefixes: prepared.plan.allowedPathPrefixes,\n });\n /*\n * The churn gate, and deliberately NOT the retry (#265): a coding turn MUTATES the workspace, so\n * a kill mid-turn leaves a change-set the attribution machinery must reconcile — re-dispatching\n * blind on top of that is how two half-runs interleave. The gate raises the odds the turn never\n * meets the respawn; a killed coding run stays what it is today, a visibly aborted task an\n * operator re-dispatches deliberately.\n */\n await waitForDevCompileQuiet({\n frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot,\n log: (message, context) => this.logDebug(message, { taskRef: prepared.plan.taskRef, ...context }),\n });\n const admission = await this.dispatch.runApplicationCodingTask(prepared.contract as ApplicationCodingTaskContract);\n return { plan: prepared.plan, admission };\n }\n\n /**\n * Reconstruct the answerable state for a parked coding task whose IN-PROCESS\n * state was lost to a companion restart, by RE-SELECTING it from the build plan.\n *\n * The durable row still names its build-plan `taskRef` and carries the persisted\n * `suspension`; from those this re-composes the same bounded contract (mutation\n * scope + verification plan come from the task and its coding policy, unchanged\n * by a restart) against a DETERMINISTIC self-description context — the resume\n * discards context anyway, since the agent's persisted session holds the real\n * one. A fresh baseline is captured for the change-set the resume will produce.\n *\n * Returns `null` when the task cannot be answered this way: not a parked coding\n * row, the agent does not support resume, the build task no longer exists, or it\n * is not a coding target. The caller then refuses rather than starting an\n * unrelated or unbounded run.\n */\n public async reconstructParkedCodingTaskForResume(\n taskId: string,\n sessionContext?: CompanionExecutionSessionContext,\n ): Promise<ParkedCodingSessionState | null> {\n const meta = await this.dispatch.loadPersistedParkedCodingTask(taskId, sessionContext);\n if (!meta || !meta.suspension.resumable) return null;\n\n const graph = await this.readBuildPlan();\n const task = graph.tasks.find((entry) => entry.taskRef === meta.taskRef);\n if (!task || task.target === undefined || task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n return null;\n }\n\n let contract: ApplicationCodingTaskContract;\n try {\n const boundary = resolveBuildPlanTaskCodingPolicy(task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0]);\n contract = composeBuildTaskCodingContract({\n task,\n boundary,\n // The deterministic self-description only: a resume does not re-send the\n // task prompt, so re-running the full live-query/introspection assembly\n // would spend a model call to build context nothing reads.\n contextSources: [this.buildTaskSelfDescriptionContextSource(task, graph.tasks.length)],\n objectiveRef: 'application-creation:objective/build-plan',\n maximumTokenBudget: DEFAULT_CONTEXT_TOKEN_BUDGET,\n });\n } catch {\n // A task that no longer composes to a bounded run (empty scope, no checks,\n // wrong target) is not answerable — refuse rather than resume unbounded.\n return null;\n }\n\n const verificationPlans = resolveApplicationCodingTaskVerificationPlans(contract.verificationIntent.requiredChecks);\n const baseline = await this.git.captureWorktreeSnapshot();\n return {\n durableTask: meta.durableTask,\n task: contract,\n verificationPlans,\n baseline,\n suspension: meta.suspension,\n parkedAt: new Date().toISOString(),\n };\n }\n\n private async prepareNextBuildTask(input: {\n readonly maximumTokenBudget?: number;\n }): Promise<\n | { readonly kind: 'CODING'; readonly plan: ApplicationBuildDispatchPlan; readonly contract: ReturnType<typeof composeBuildTaskCodingContract> }\n | { readonly kind: 'GENERATION_STEP'; readonly plan: ApplicationBuildDispatchPlan; readonly task: BuildPlanTask }\n > {\n const graph = await this.readBuildPlan();\n const landedTaskRefs = await this.resolveLandedTaskRefs(graph.tasks);\n\n const ready = selectReadyBuildPlanTasks(graph, landedTaskRefs);\n if (ready.length === 0) {\n throw new ApplicationBuildPlanExhaustedError(\n `Every task in the build plan has landed, or none is ready: ${graph.tasks.length} task(s), `\n + `${landedTaskRefs.size} landed.`,\n );\n }\n /*\n * The FIRST ready task, in graph order — routed by its own `target.kind`, never reordered.\n *\n * Deliberately not a choice among the ready set: the graph already encodes the ordering its author\n * intended, and something picking among ready tasks would be a second scheduler disagreeing with the\n * first. (An earlier version skipped generation steps to find a coding task and refused when none\n * remained — correct while no executor existed, a hole in the lane once one did: the first authored\n * generation step parked the Wonder Todos build behind a named 409 forever.)\n */\n const task = ready[0]!;\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n const evidencePaths = await this.generationSteps.resolveGenerationStepEvidencePaths(task);\n const evidenceRoots = [...new Set(evidencePaths.map((evidencePath) => `${evidencePath.split('/').slice(0, -1).join('/')}/`))].sort();\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target.kind,\n generationStepRef: task.target.generationStepRef,\n allowedPathPrefixes: evidenceRoots,\n prohibitedPathPrefixes: [],\n // The pipelines validate their own output; skills are a coding agent's channel, not this executor's.\n requiredChecks: [],\n installedSkillRefs: [],\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n };\n return { kind: 'GENERATION_STEP', plan, task };\n }\n const boundary = resolveBuildPlanTaskCodingPolicy(task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0]);\n const contract = composeBuildTaskCodingContract({\n task,\n boundary,\n contextSources: await this.buildContextSources(task, graph.tasks.length),\n objectiveRef: 'application-creation:objective/build-plan',\n maximumTokenBudget: input.maximumTokenBudget ?? DEFAULT_CONTEXT_TOKEN_BUDGET,\n });\n\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target!.kind,\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n };\n\n return { kind: 'CODING', plan, contract };\n }\n\n /**\n * Which tasks have landed, read from GIT.\n *\n * A task has landed when every file it PRODUCES is committed — tracked, and with HEAD, index and worktree\n * in agreement. Not \"the file exists\": an untracked or half-edited file is work in progress, and treating\n * it as landed would let the next task build on something nobody accepted.\n *\n * This replaced a replay of a journal stream that had no writer anywhere, so the answer was permanently\n * \"nothing has landed\" and the loop could never advance past its first task. Git also answers correctly\n * after a restart, on a fresh clone, and on the other side of a branch switch — none of which an\n * in-memory journal can.\n */\n /**\n * How far the current build plan's execution has progressed — the eligibility board's input for the\n * \"plan complete ⇒ re-decompose is sequencing, not a live option\" gate. `undefined` when the\n * application has no (valid) build plan: absence of a plan is not zero-of-zero progress.\n */\n public async resolveBuildExecutionProgress(): Promise<{ readonly totalTasks: number; readonly landedTasks: number } | undefined> {\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n const landed = await this.resolveLandedTaskRefs(plan.tasks);\n return { totalTasks: plan.tasks.length, landedTasks: landed.size };\n }\n\n /**\n * Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`\n * rows (`workbench-creation-board-resources.md`, Phase 2).\n *\n * `status` is computed per read, never stored: `landed` = the task's evidence paths are all\n * committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite\n * landed and it has not, `blocked` = otherwise. Exactly one holds.\n *\n * An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan\n * file legitimately does not exist until build-decompose runs, so \"nothing there yet\" is the\n * true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather\n * than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that\n * SAME class for a plan that exists and fails schema or semantic validation — and flattening an\n * invalid plan into an empty board would be \"could not look\" wearing \"nothing there\".\n */\n public async describeBuildPlanBoard(): Promise<readonly {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly functionalTopic: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n readonly prerequisiteTaskRefs: readonly string[];\n }[]> {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n if (authored === undefined || authored === null) return [];\n\n const plan = await this.readBuildPlan();\n const landed = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, landed).map((task) => task.taskRef));\n return plan.tasks.map((task) => ({\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: String(task.target?.kind ?? ''),\n functionalTopic: String(task.functionalTopic),\n status: landed.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n }));\n }\n\n private async resolveLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<ReadonlySet<string>> {\n const landed = new Set<string>();\n for (const task of tasks) {\n const evidencePaths = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n // Planner-derived: the exact unit files the step's pipelines write (see that service's JSDoc for\n // why a directory prefix would be dishonest here).\n ? await this.generationSteps.resolveGenerationStepEvidencePaths(task)\n : resolveBuildTaskLandedEvidencePaths(task);\n if (evidencePaths.length === 0) continue;\n const committed = await Promise.all(evidencePaths.map((path) => this.git.isWorktreePathCommitted(path)));\n if (committed.every(Boolean)) landed.add(task.taskRef);\n }\n return landed;\n }\n\n /** The application's accepted build plan, validated before anything is selected from it. */\n private async readBuildPlan(): ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync> {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n if (authored === undefined || authored === null) {\n throw new ApplicationBuildPlanUnavailableError(\n 'This application has no build plan. Run the build-decompose playbook first.',\n );\n }\n const parsed = BuildPlanTaskGraphSchema.safeParse(authored);\n if (!parsed.success) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan does not satisfy its schema: ${parsed.error.issues.slice(0, 3).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}`,\n );\n }\n // Semantic validation too, not just the shape: a graph with a dangling prerequisite would let\n // `selectReadyBuildPlanTasks` report a task ready whose dependency can never land.\n const findings = validateBuildPlanTaskGraph(parsed.data);\n if (findings.length > 0) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan fails semantic validation: ${findings.slice(0, 3).map((finding) => finding.message).join('; ')}`,\n );\n }\n return parsed.data;\n }\n\n /**\n * What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).\n *\n * Widened 2026-09-02 from \"the task itself and nothing else yet\" to the lean mandatory core the\n * epic's re-analysis decided, and deliberately no further: everything an agent might need beyond\n * its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the\n * `live-queries` source below points at. Anticipating everything here would be the planner trap\n * (#254) re-entering through the push door. Everything is model-safe by construction — the\n * application's own accepted build plan, its own live registry, its own domain plan — and the\n * contract's composer re-asserts `SAFE_FOR_MODEL` on every source regardless.\n *\n * ## Failure posture: best-effort on the derived sources, deliberately\n *\n * The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no\n * workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has\n * tools (it can read the tree, and the door), so a missing derived source degrades speed rather\n * than truth — while refusing the dispatch because a subprocess hiccuped would block the build on\n * context the run could recover for itself. So: the TASK is always present, the derived sources\n * are added when their reads succeed, and a failed read is a WARN naming what was omitted.\n *\n * ## No new cache, verified rather than assumed\n *\n * The re-analysis asked for the introspection read to be cached across a 55-task plan. It already\n * is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,\n * keyed on the observed workspace state — asking again after nothing changed is a cache hit, and\n * a landed task invalidates it by changing the sources it hashes. Adding a second cache here would\n * be a copy that can only ever disagree.\n */\n /**\n * The task's own DETERMINISTIC self-description — no introspection, no LLM.\n *\n * The first (and mandatory) context source of every coding task, extracted so\n * a RESUME can rebuild a schema-valid contract without re-running the expensive\n * live-query / module-introspection assembly whose output a resume discards\n * anyway (the agent's session already holds the real context).\n */\n private buildTaskSelfDescriptionContextSource(task: BuildPlanTask, totalTasks: number): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/build-task',\n originRef: 'application-creation:origin/build-plan',\n role: MetaWorkflow_ContextSourceRole.MANDATORY,\n content: {\n taskRef: task.taskRef,\n objective: task.objective,\n target: task.target,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n positionInPlan: `one of ${totalTasks} tasks in the application's accepted build plan`,\n },\n };\n }\n\n private async buildContextSources(task: BuildPlanTask, totalTasks: number): Promise<readonly BuildTaskContextSource[]> {\n const sources: BuildTaskContextSource[] = [this.buildTaskSelfDescriptionContextSource(task, totalTasks)];\n\n /*\n * The DOOR MENU — tier-0 of the pull half: the live-query ids and the two commands that expand\n * them. Ids only, not descriptions: `wildo context list` IS the descriptions, one command away,\n * and rendering ~27 descriptions into every dispatch prompt would spend the budget this source\n * exists to save. Read from the same catalog the CLI menu serves, so it cannot drift from what\n * the companion actually answers.\n */\n const catalog = this.introspection.describeCatalog();\n sources.push({\n sourceRef: 'application-creation:context/live-queries',\n originRef: 'application-creation:origin/dev-companion',\n role: MetaWorkflow_ContextSourceRole.MANDATORY,\n content: {\n guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '\n + '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '\n + '`wildo context journey` shows the creation journey; `wildo context coherence` the cross-family coherence report.',\n behaviorIds: catalog.behaviors.map((behavior) => behavior.behaviorId),\n },\n });\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const resourceRef = task.target && 'resourceRef' in task.target ? task.target.resourceRef : undefined;\n\n // WORKSPACE TRUTH, sliced to the target: the target module's real resources and present schema\n // fields, plus the exact list of every module id (counts stay exact — a slice that hid the\n // population would under-report, and an agent that invents a module id dispatches a no-op).\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (result.success) {\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const targetModule = moduleRef === undefined\n ? undefined\n : modules.find((sharedModule) => slugifyRegistryIdentifier(sharedModule.moduleId) === moduleRef);\n sources.push({\n sourceRef: 'application-creation:context/workspace-truth',\n originRef: 'application-creation:origin/resources-registry-introspection',\n role: MetaWorkflow_ContextSourceRole.MANDATORY,\n content: {\n allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),\n ...(targetModule\n ? {\n targetModule: {\n moduleId: targetModule.moduleId,\n resources: targetModule.resourceTypes.map((resourceType) => ({\n resourceType,\n slugRef: slugifyRegistryIdentifier(resourceType),\n presentSchemaFields: snapshot.resourceSchemaFields?.[resourceType] ?? [],\n })),\n },\n }\n : {}),\n note: 'A resource listed here already EXISTS as a registered skeleton — its task is enrichment, not creation. '\n + 'A domain-plan resource NOT listed here does not exist yet. Full registry: `wildo context info resources-registry`.',\n },\n });\n } else {\n this.logDebug('Workspace-truth source omitted from the dispatch context (introspection failed)', { taskRef: task.taskRef });\n }\n }\n } catch (error) {\n this.logger.warn('Workspace-truth source omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });\n }\n\n // THE DOMAIN-PLAN SLICE for the target: WHAT this task's objective enriches toward, in the\n // application's own accepted words — the module semantics and, for a relationship task, the\n // relationship drafts touching the target. Absent plan (older app, or foundation not run) is\n // simply absent; nothing here invents a fallback.\n try {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const domainPlan = (exports as { domainPlanSpecification?: unknown }).domainPlanSpecification as {\n modules?: ReadonlyArray<{ relatedModuleId: string; mainResources?: readonly string[]; supportingResources?: readonly string[] }>;\n relationships?: ReadonlyArray<{ relationshipRef: string; sourceResourceRef: string; targetResourceRef: string }>;\n } | undefined;\n const planModules = domainPlan?.modules ?? [];\n const targetPlanModule = moduleRef === undefined\n ? undefined\n : planModules.find((planModule) => slugifyRegistryIdentifier(planModule.relatedModuleId) === moduleRef);\n if (targetPlanModule) {\n const moduleResourceSlugs = new Set(\n [...(targetPlanModule.mainResources ?? []), ...(targetPlanModule.supportingResources ?? [])]\n .map((resourceType) => slugifyRegistryIdentifier(resourceType)),\n );\n sources.push({\n sourceRef: 'application-creation:context/domain-plan-slice',\n originRef: 'application-creation:origin/domain-plan',\n role: MetaWorkflow_ContextSourceRole.MANDATORY,\n content: {\n targetModule: targetPlanModule,\n ...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),\n relationshipsTouchingModule: (domainPlan?.relationships ?? []).filter((relationship) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.sourceResourceRef))\n || moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.targetResourceRef))),\n },\n });\n }\n } catch (error) {\n this.logger.warn('Domain-plan slice omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });\n }\n\n return sources;\n }\n}\n\n/** Context ceiling for one dispatch. Stated here because only the host knows what the agent can accept. */\nconst DEFAULT_CONTEXT_TOKEN_BUDGET = 120_000;\n"]}
1
+ {"version":3,"file":"application-build-dispatch.companion.service.js","sourceRoot":"","sources":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AE,CAAC,CAAC;QAC3H,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AA3gBY,wCAAwC;IADpD,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;uDAHkC,mCAAmC;QAC/C,4BAA4B;QACT,8CAA8C;QACtD,6BAA6B;GAT1G,wCAAwC,CA2gBpD","sourcesContent":["import { inject, injectable } from 'inversify';\nimport { WorkbenchBuildPlanTaskStatus } from '@wildo-ai/platform-core-shared';\n\nimport {\n composeBuildTaskCodingContract,\n slugifyRegistryIdentifier,\n type BuildTaskContextSource,\n} from '@wildo-ai/application-creation-runtime';\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport {\n BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES,\n BuildPlanTaskGraphSchema,\n BuildPlanTaskTargetKind,\n selectReadyBuildPlanTasks,\n validateBuildPlanTaskGraph,\n type ApplicationCodingTaskContract,\n type BuildPlanTask,\n} 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 { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.companion';\nimport {\n CodingAgentDispatchCompanionService,\n type ParkedCodingSessionState,\n} from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n resolveApplicationCodingTaskVerificationPlans,\n type ApplicationCodingTaskRunAdmission,\n} from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport {\n ApplicationBuildGenerationStepCompanionService,\n ApplicationBuildGenerationStepLandedKind,\n type ApplicationBuildGenerationStepRunResult,\n} from './application-build-generation-step.companion.service';\nimport {\n ApplicationBuildTaskNotACodingTaskError,\n resolveBuildPlanTaskCodingPolicy,\n resolveBuildTaskLandedEvidencePaths,\n} from './application-build-task-coding-policy.companion.service';\n\n/** No build plan, or nothing left to do. Named so the transport can say which. */\n\nexport class ApplicationBuildPlanUnavailableError extends Error {}\nexport class ApplicationBuildPlanExhaustedError extends Error {}\n\n/** What the next dispatch WOULD be. Returned unconfirmed, so a creator sees the scope before anything runs. */\nexport interface ApplicationBuildDispatchPlan {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n /**\n * Present exactly when the next task is a companion generation step. A build plan INTERLEAVES two\n * executors — coding tasks for a coding agent, and companion generation steps (labels, seeds, emails)\n * the companion runs itself — and this route serves BOTH: `dispatch-next` routes by the task's own\n * `target.kind`. (An earlier version refused generation steps by name; now that an executor exists,\n * the refusal would be a hole in the build lane, not a boundary.)\n */\n readonly generationStepRef?: string;\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredChecks: readonly string[];\n readonly installedSkillRefs: readonly string[];\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n}\n\n/**\n * One dispatched build task's outcome — exactly one of the two executor results is present, matching the\n * plan's `targetKind`. `admission` for a coding run; `generationStep` for a companion generation step.\n */\nexport interface ApplicationBuildDispatchResult {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n}\n\n/**\n * Dispatch the next ready build-plan task to a coding agent.\n *\n * ## The chain, and who owns each link\n *\n * | link | owner |\n * |---|---|\n * | which tasks have landed | GIT — a task has landed when the files it produces are committed |\n * | which are READY | `selectReadyBuildPlanTasks` in `_core` — pure, prerequisite-closed |\n * | what a task may touch | `resolveBuildPlanTaskCodingPolicy` — the ONLY place a `target.kind` becomes paths |\n * | the contract | `composeBuildTaskCodingContract` in the runtime — pure, schema-pinned |\n * | the run | `CodingAgentDispatchCompanionService` — mutation lock, git baseline, change-set capture |\n *\n * Nothing in that chain is decided by a model. The agent is handed a task and a boundary; it does not\n * choose either.\n *\n * ## There is no confirmation flag, and that was a correction\n *\n * `dispatchNextBuildTask` ran only when the caller also passed `confirmWorkspaceMutation: true`. It was\n * removed the day it was written, because it protected nothing the mechanism does not already protect:\n * the scope is derived from the task's CLOSED `target.kind` and cannot be widened, the mutation lock\n * admits one workspace-mutating run at a time, the run is bracketed by a git baseline snapshot and a\n * change-set capture so every touched path is visible and revertible, the required checks gate the\n * result, and nothing is ACCEPTED until a human commits.\n *\n * A caller that posts to this route is asking for a coding run — that IS the route. Making them say so\n * twice is the acceptance ceremony this whole migration exists to remove, and a field that feels like a\n * control while enforcing nothing is the exact failure mode recorded in the plan's objective.\n *\n * What was genuinely useful in it — seeing the scope before committing to a run — is a READ, and lives at\n * `describeNextBuildTask` below.\n */\n@injectable()\nexport class ApplicationBuildDispatchCompanionService {\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(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly dispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BuildGenerationStepService) private readonly generationSteps: ApplicationBuildGenerationStepCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');\n }\n\n /** What the next run would be, without running it. Pure read — nothing is locked, created or started. */\n public async describeNextBuildTask(): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTask()).plan;\n }\n\n /**\n * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding\n * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the\n * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.\n */\n /**\n * The last few DETACHED dispatch outcomes, newest first — the observation channel the synchronous\n * door lacked. Measured 2026-09-04: a 40+-minute i18n generation step outlived the HTTP request's\n * 30-minute ceiling, the response died with the socket, and the only signals left were file\n * mtimes and a lock file whose EXISTENCE turned out to mean nothing — the operator was blind for\n * half the run. In-memory by design: the step's real product is files on disk (durable in git),\n * and this record is the run's NARRATIVE, not its truth.\n */\n private readonly lastDetachedDispatches: Array<{\n readonly taskRef: string;\n readonly startedAt: string;\n finishedAt?: string;\n ok?: boolean;\n error?: string;\n }> = [];\n\n public readDetachedDispatches(): readonly { taskRef: string; startedAt: string; finishedAt?: string; ok?: boolean; error?: string }[] {\n return [...this.lastDetachedDispatches];\n }\n\n /**\n * Fire the next ready build task WITHOUT holding an HTTP request over it. Returns the selected\n * plan immediately; the outcome lands in {@link readDetachedDispatches} and, for a coding task,\n * in the durable actor-task row it already writes. The same single-flight properties hold — this\n * is the same `dispatchNextBuildTask`, minus the requirement that a socket survive it.\n */\n public submitBuildDispatchDetached(\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildDispatchPlan> {\n return this.prepareNextBuildTask().then((prepared) => {\n const record: { taskRef: string; startedAt: string; finishedAt?: string; ok?: boolean; error?: string } = {\n taskRef: prepared.plan.taskRef,\n startedAt: new Date().toISOString(),\n };\n this.lastDetachedDispatches.unshift(record);\n this.lastDetachedDispatches.splice(5);\n void this.dispatchNextBuildTask(session)\n .then(() => { record.finishedAt = new Date().toISOString(); record.ok = true; })\n .catch((error) => {\n record.finishedAt = new Date().toISOString(); record.ok = false;\n record.error = error instanceof Error ? error.message.slice(0, 400) : String(error).slice(0, 400);\n this.logDebug('Detached build dispatch failed', { taskRef: record.taskRef, error: record.error });\n });\n return prepared.plan;\n });\n }\n\n public async dispatchNextBuildTask(\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildDispatchResult> {\n const prepared = await this.prepareNextBuildTask();\n if (prepared.kind === 'GENERATION_STEP') {\n this.logDebug('Running a companion generation step', {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef,\n });\n const generationStep = await this.generationSteps.executeGenerationStep(prepared.task, session);\n return { plan: prepared.plan, generationStep };\n }\n this.logDebug('Dispatching a build task to the coding agent', {\n taskRef: prepared.plan.taskRef,\n allowedPathPrefixes: prepared.plan.allowedPathPrefixes,\n });\n /*\n * The churn gate, and deliberately NOT the retry (#265): a coding turn MUTATES the workspace, so\n * a kill mid-turn leaves a change-set the attribution machinery must reconcile — re-dispatching\n * blind on top of that is how two half-runs interleave. The gate raises the odds the turn never\n * meets the respawn; a killed coding run stays what it is today, a visibly aborted task an\n * operator re-dispatches deliberately.\n */\n await waitForDevCompileQuiet({\n frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot,\n log: (message, context) => this.logDebug(message, { taskRef: prepared.plan.taskRef, ...context }),\n });\n const admission = await this.dispatch.runApplicationCodingTask(prepared.contract as ApplicationCodingTaskContract);\n return { plan: prepared.plan, admission };\n }\n\n /**\n * Reconstruct the answerable state for a parked coding task whose IN-PROCESS\n * state was lost to a companion restart, by RE-SELECTING it from the build plan.\n *\n * The durable row still names its build-plan `taskRef` and carries the persisted\n * `suspension`; from those this re-composes the same bounded contract (mutation\n * scope + verification plan come from the task and its coding policy, unchanged\n * by a restart) against a DETERMINISTIC self-description context — the resume\n * discards context anyway, since the agent's persisted session holds the real\n * one. A fresh baseline is captured for the change-set the resume will produce.\n *\n * Returns `null` when the task cannot be answered this way: not a parked coding\n * row, the agent does not support resume, the build task no longer exists, or it\n * is not a coding target. The caller then refuses rather than starting an\n * unrelated or unbounded run.\n */\n public async reconstructParkedCodingTaskForResume(\n taskId: string,\n sessionContext?: CompanionExecutionSessionContext,\n ): Promise<ParkedCodingSessionState | null> {\n const meta = await this.dispatch.loadPersistedParkedCodingTask(taskId, sessionContext);\n if (!meta || !meta.suspension.resumable) return null;\n\n const graph = await this.readBuildPlan();\n const task = graph.tasks.find((entry) => entry.taskRef === meta.taskRef);\n if (!task || task.target === undefined || task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n return null;\n }\n\n let contract: ApplicationCodingTaskContract;\n try {\n const boundary = resolveBuildPlanTaskCodingPolicy(task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0]);\n contract = composeBuildTaskCodingContract({\n task,\n boundary,\n // The deterministic self-description only: a resume does not re-send the\n // task prompt, so re-running the full live-query/introspection assembly\n // would spend a model call to build context nothing reads.\n contextSources: [this.buildTaskSelfDescriptionContextSource(task, graph.tasks.length)],\n objectiveRef: 'application-creation:objective/build-plan',\n });\n } catch {\n // A task that no longer composes to a bounded run (empty scope, no checks,\n // wrong target) is not answerable — refuse rather than resume unbounded.\n return null;\n }\n\n const verificationPlans = resolveApplicationCodingTaskVerificationPlans(contract.verificationIntent.requiredChecks);\n const baseline = await this.git.captureWorktreeSnapshot();\n return {\n durableTask: meta.durableTask,\n task: contract,\n verificationPlans,\n baseline,\n suspension: meta.suspension,\n parkedAt: new Date().toISOString(),\n };\n }\n\n private async prepareNextBuildTask(): Promise<\n | { readonly kind: 'CODING'; readonly plan: ApplicationBuildDispatchPlan; readonly contract: ReturnType<typeof composeBuildTaskCodingContract> }\n | { readonly kind: 'GENERATION_STEP'; readonly plan: ApplicationBuildDispatchPlan; readonly task: BuildPlanTask }\n > {\n const graph = await this.readBuildPlan();\n const landedTaskRefs = await this.resolveLandedTaskRefs(graph.tasks);\n\n const ready = selectReadyBuildPlanTasks(graph, landedTaskRefs);\n if (ready.length === 0) {\n throw new ApplicationBuildPlanExhaustedError(\n `Every task in the build plan has landed, or none is ready: ${graph.tasks.length} task(s), `\n + `${landedTaskRefs.size} landed.`,\n );\n }\n /*\n * The FIRST ready task, in graph order — routed by its own `target.kind`, never reordered.\n *\n * Deliberately not a choice among the ready set: the graph already encodes the ordering its author\n * intended, and something picking among ready tasks would be a second scheduler disagreeing with the\n * first. (An earlier version skipped generation steps to find a coding task and refused when none\n * remained — correct while no executor existed, a hole in the lane once one did: the first authored\n * generation step parked the Wonder Todos build behind a named 409 forever.)\n */\n const task = ready[0]!;\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n const evidencePaths = await this.generationSteps.resolveGenerationStepEvidencePaths(task);\n const evidenceRoots = [...new Set(evidencePaths.map((evidencePath) => `${evidencePath.split('/').slice(0, -1).join('/')}/`))].sort();\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target.kind,\n generationStepRef: task.target.generationStepRef,\n allowedPathPrefixes: evidenceRoots,\n prohibitedPathPrefixes: [],\n // The pipelines validate their own output; skills are a coding agent's channel, not this executor's.\n requiredChecks: [],\n installedSkillRefs: [],\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n };\n return { kind: 'GENERATION_STEP', plan, task };\n }\n const boundary = resolveBuildPlanTaskCodingPolicy(task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0]);\n const contract = composeBuildTaskCodingContract({\n task,\n boundary,\n contextSources: await this.buildContextSources(task, graph.tasks.length),\n objectiveRef: 'application-creation:objective/build-plan',\n });\n\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target!.kind,\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n };\n\n return { kind: 'CODING', plan, contract };\n }\n\n /**\n * Which tasks have landed, read from GIT.\n *\n * A task has landed when every file it PRODUCES is committed — tracked, and with HEAD, index and worktree\n * in agreement. Not \"the file exists\": an untracked or half-edited file is work in progress, and treating\n * it as landed would let the next task build on something nobody accepted.\n *\n * This replaced a replay of a journal stream that had no writer anywhere, so the answer was permanently\n * \"nothing has landed\" and the loop could never advance past its first task. Git also answers correctly\n * after a restart, on a fresh clone, and on the other side of a branch switch — none of which an\n * in-memory journal can.\n */\n /**\n * How far the current build plan's execution has progressed — the eligibility board's input for the\n * \"plan complete ⇒ re-decompose is sequencing, not a live option\" gate. `undefined` when the\n * application has no (valid) build plan: absence of a plan is not zero-of-zero progress.\n */\n public async resolveBuildExecutionProgress(): Promise<{ readonly totalTasks: number; readonly landedTasks: number } | undefined> {\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n const landed = await this.resolveLandedTaskRefs(plan.tasks);\n return { totalTasks: plan.tasks.length, landedTasks: landed.size };\n }\n\n /**\n * Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`\n * rows (`workbench-creation-board-resources.md`, Phase 2).\n *\n * `status` is computed per read, never stored: `landed` = the task's evidence paths are all\n * committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite\n * landed and it has not, `blocked` = otherwise. Exactly one holds.\n *\n * An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan\n * file legitimately does not exist until build-decompose runs, so \"nothing there yet\" is the\n * true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather\n * than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that\n * SAME class for a plan that exists and fails schema or semantic validation — and flattening an\n * invalid plan into an empty board would be \"could not look\" wearing \"nothing there\".\n */\n public async describeBuildPlanBoard(): Promise<readonly {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly functionalTopic: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n readonly prerequisiteTaskRefs: readonly string[];\n }[]> {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n if (authored === undefined || authored === null) return [];\n\n const plan = await this.readBuildPlan();\n const landed = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, landed).map((task) => task.taskRef));\n return plan.tasks.map((task) => ({\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: String(task.target?.kind ?? ''),\n functionalTopic: String(task.functionalTopic),\n status: landed.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n }));\n }\n\n private async resolveLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<ReadonlySet<string>> {\n const landed = new Set<string>();\n for (const task of tasks) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A generation step declares HOW it proves it landed, because not every step proves it with\n * files. Most name the exact unit files their pipelines write (see that service's JSDoc for\n * why a directory prefix would be dishonest). The migration step cannot — its artifact is\n * `backend-api/migrations/<timestamp>_<name>/migration.sql` and the timestamp is minted\n * during the run — so it lands on the STATE it exists to reach instead.\n *\n * Read the condition, never the evidence paths: for the migration step those name the\n * accepted lockfile, which predates the step, so landing on it would pass having verified\n * nothing.\n */\n const condition = await this.generationSteps.resolveGenerationStepLandedCondition(task);\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {\n if (await this.generationSteps.isSchemaPlanInSync()) landed.add(task.taskRef);\n continue;\n }\n if (condition.paths.length === 0) continue;\n const committedPaths = await Promise.all(condition.paths.map((path) => this.git.isWorktreePathCommitted(path)));\n if (committedPaths.every(Boolean)) landed.add(task.taskRef);\n continue;\n }\n const evidencePaths = resolveBuildTaskLandedEvidencePaths(task);\n if (evidencePaths.length === 0) continue;\n const committed = await Promise.all(evidencePaths.map((path) => this.git.isWorktreePathCommitted(path)));\n if (committed.every(Boolean)) landed.add(task.taskRef);\n }\n return landed;\n }\n\n /** The application's accepted build plan, validated before anything is selected from it. */\n private async readBuildPlan(): ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync> {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n if (authored === undefined || authored === null) {\n throw new ApplicationBuildPlanUnavailableError(\n 'This application has no build plan. Run the build-decompose playbook first.',\n );\n }\n const parsed = BuildPlanTaskGraphSchema.safeParse(authored);\n if (!parsed.success) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan does not satisfy its schema: ${parsed.error.issues.slice(0, 3).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}`,\n );\n }\n // Semantic validation too, not just the shape: a graph whose ordering is unsound would let\n // `selectReadyBuildPlanTasks` report a task ready before the work it depends on can have landed.\n //\n // Gated on the FLOOR codes, not on `findings.length > 0` as it was until 2026-09-09. That older\n // reading made this gate disagree with the landing gate about the same graph: an authoring\n // warning — a resource stage whose predecessor is absent from the plan, which is legitimate when\n // the tree already carries that stage — landed happily at the semantic authority and then made\n // the whole plan permanently undispatchable HERE, with the refusal naming a warning. One\n // classification, named once in `_core` beside the codes.\n const findings = validateBuildPlanTaskGraph(parsed.data);\n const blocking = findings.filter((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));\n if (blocking.length > 0) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan fails semantic validation: ${blocking.slice(0, 3).map((finding) => finding.message).join('; ')}`,\n );\n }\n return parsed.data;\n }\n\n /**\n * What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).\n *\n * Widened 2026-09-02 from \"the task itself and nothing else yet\" to the lean mandatory core the\n * epic's re-analysis decided, and deliberately no further: everything an agent might need beyond\n * its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the\n * `live-queries` source below points at. Anticipating everything here would be the planner trap\n * (#254) re-entering through the push door. Everything is model-safe by construction — the\n * application's own accepted build plan, its own live registry, its own domain plan — and the\n * contract's composer re-asserts `SAFE_FOR_MODEL` on every source regardless.\n *\n * ## Failure posture: best-effort on the derived sources, deliberately\n *\n * The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no\n * workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has\n * tools (it can read the tree, and the door), so a missing derived source degrades speed rather\n * than truth — while refusing the dispatch because a subprocess hiccuped would block the build on\n * context the run could recover for itself. So: the TASK is always present, the derived sources\n * are added when their reads succeed, and a failed read is a WARN naming what was omitted.\n *\n * ## No new cache, verified rather than assumed\n *\n * The re-analysis asked for the introspection read to be cached across a 55-task plan. It already\n * is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,\n * keyed on the observed workspace state — asking again after nothing changed is a cache hit, and\n * a landed task invalidates it by changing the sources it hashes. Adding a second cache here would\n * be a copy that can only ever disagree.\n */\n /**\n * The task's own DETERMINISTIC self-description — no introspection, no LLM.\n *\n * The first (and mandatory) context source of every coding task, extracted so\n * a RESUME can rebuild a schema-valid contract without re-running the expensive\n * live-query / module-introspection assembly whose output a resume discards\n * anyway (the agent's session already holds the real context).\n */\n private buildTaskSelfDescriptionContextSource(task: BuildPlanTask, totalTasks: number): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/build-task',\n originRef: 'application-creation:origin/build-plan',\n content: {\n taskRef: task.taskRef,\n objective: task.objective,\n target: task.target,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n positionInPlan: `one of ${totalTasks} tasks in the application's accepted build plan`,\n },\n };\n }\n\n private async buildContextSources(task: BuildPlanTask, totalTasks: number): Promise<readonly BuildTaskContextSource[]> {\n const sources: BuildTaskContextSource[] = [this.buildTaskSelfDescriptionContextSource(task, totalTasks)];\n\n /*\n * The DOOR MENU — tier-0 of the pull half: the live-query ids and the two commands that expand\n * them. Ids only, not descriptions: `wildo context list` IS the descriptions, one command away,\n * and rendering ~27 descriptions into every dispatch prompt would spend the budget this source\n * exists to save. Read from the same catalog the CLI menu serves, so it cannot drift from what\n * the companion actually answers.\n */\n const catalog = this.introspection.describeCatalog();\n sources.push({\n sourceRef: 'application-creation:context/live-queries',\n originRef: 'application-creation:origin/dev-companion',\n content: {\n guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '\n + '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '\n + '`wildo context journey` shows the creation journey; `wildo context coherence` the cross-family coherence report.',\n behaviorIds: catalog.behaviors.map((behavior) => behavior.behaviorId),\n },\n });\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const resourceRef = task.target && 'resourceRef' in task.target ? task.target.resourceRef : undefined;\n\n // WORKSPACE TRUTH, sliced to the target: the target module's real resources and present schema\n // fields, plus the exact list of every module id (counts stay exact — a slice that hid the\n // population would under-report, and an agent that invents a module id dispatches a no-op).\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (result.success) {\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const targetModule = moduleRef === undefined\n ? undefined\n : modules.find((sharedModule) => slugifyRegistryIdentifier(sharedModule.moduleId) === moduleRef);\n sources.push({\n sourceRef: 'application-creation:context/workspace-truth',\n originRef: 'application-creation:origin/resources-registry-introspection',\n content: {\n allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),\n ...(targetModule\n ? {\n targetModule: {\n moduleId: targetModule.moduleId,\n resources: targetModule.resourceTypes.map((resourceType) => ({\n resourceType,\n slugRef: slugifyRegistryIdentifier(resourceType),\n presentSchemaFields: snapshot.resourceSchemaFields?.[resourceType] ?? [],\n })),\n },\n }\n : {}),\n note: 'A resource listed here already EXISTS as a registered skeleton — its task is enrichment, not creation. '\n + 'A domain-plan resource NOT listed here does not exist yet. Full registry: `wildo context info resources-registry`.',\n },\n });\n } else {\n this.logDebug('Workspace-truth source omitted from the dispatch context (introspection failed)', { taskRef: task.taskRef });\n }\n }\n } catch (error) {\n this.logger.warn('Workspace-truth source omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });\n }\n\n // THE DOMAIN-PLAN SLICE for the target: WHAT this task's objective enriches toward, in the\n // application's own accepted words — the module semantics and, for a relationship task, the\n // relationship drafts touching the target. Absent plan (older app, or foundation not run) is\n // simply absent; nothing here invents a fallback.\n try {\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\n const domainPlan = (exports as { domainPlanSpecification?: unknown }).domainPlanSpecification as {\n modules?: ReadonlyArray<{ relatedModuleId: string; mainResources?: readonly string[]; supportingResources?: readonly string[] }>;\n relationships?: ReadonlyArray<{ relationshipRef: string; sourceResourceRef: string; targetResourceRef: string }>;\n } | undefined;\n const planModules = domainPlan?.modules ?? [];\n const targetPlanModule = moduleRef === undefined\n ? undefined\n : planModules.find((planModule) => slugifyRegistryIdentifier(planModule.relatedModuleId) === moduleRef);\n if (targetPlanModule) {\n const moduleResourceSlugs = new Set(\n [...(targetPlanModule.mainResources ?? []), ...(targetPlanModule.supportingResources ?? [])]\n .map((resourceType) => slugifyRegistryIdentifier(resourceType)),\n );\n sources.push({\n sourceRef: 'application-creation:context/domain-plan-slice',\n originRef: 'application-creation:origin/domain-plan',\n content: {\n targetModule: targetPlanModule,\n ...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),\n relationshipsTouchingModule: (domainPlan?.relationships ?? []).filter((relationship) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.sourceResourceRef))\n || moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.targetResourceRef))),\n },\n });\n }\n } catch (error) {\n this.logger.warn('Domain-plan slice omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });\n }\n\n return sources;\n }\n}\n"]}
@@ -37,8 +37,55 @@ export declare enum ApplicationBuildGenerationStep {
37
37
  * mark only if someone drove it by hand (issue #220). Hand-supplying a logo stays available and
38
38
  * unchanged; what this adds is the journey's own path to one.
39
39
  */
40
- LOGO = "logo"
40
+ LOGO = "logo",
41
+ /**
42
+ * `wildo db generate` — turn the drift between the application's resource model and its accepted
43
+ * schema plan into a committed migration, so a PostgreSQL-backed application's tables exist.
44
+ *
45
+ * Added under the rule this enum's docblock states — a value joins WHEN a pipeline exists to
46
+ * execute it. The pipeline is the CLI's own generate door, which already owns every hard part
47
+ * (the planner, the risk vocabulary, the refusals) and advances the lockfile in the same
48
+ * invocation that writes the migration.
49
+ *
50
+ * The step is a NO-OP on an application with no accepted plan, and it REFUSES rather than
51
+ * guessing — see `executeGenerationStep`. That is deliberate: without a lockfile
52
+ * `wildo db generate` treats the whole model as an INITIAL migration, which on a MongoDB-backed
53
+ * application would author a table set nothing uses.
54
+ */
55
+ DATABASE_MIGRATIONS = "database-migrations"
56
+ }
57
+ /**
58
+ * How a generation step proves it did its work.
59
+ *
60
+ * Two kinds, because the obvious single answer does not fit every step. Most steps write FILES
61
+ * whose paths are known before they run, and "landed" means those files are committed. A migration
62
+ * step cannot: its artifact is `backend-api/migrations/<timestamp>_<name>/migration.sql`, and the
63
+ * timestamp is minted DURING the run.
64
+ *
65
+ * The tempting substitutes were both rejected, and the reasons are worth keeping:
66
+ *
67
+ * - the accepted lockfile — it ALREADY EXISTS before the step runs (the foundation playbook writes
68
+ * the baseline), so "is it committed?" is trivially true and the step would land having done
69
+ * nothing. That is precisely the directory-prefix shortcut this service's `LOGO` case warns about.
70
+ * - an empty path list — legal, and it makes the dispatch host SKIP the landed check entirely, so a
71
+ * step that generated nothing would read as complete.
72
+ *
73
+ * So the migration step's evidence is not a file at all: it is the STATE the step exists to reach —
74
+ * the model and the accepted plan agree. That is what `wildo db diff --check` answers.
75
+ */
76
+ export declare enum ApplicationBuildGenerationStepLandedKind {
77
+ /** Landed when every named path is committed. The shape every file-writing step uses. */
78
+ COMMITTED_PATHS = "committed_paths",
79
+ /** Landed when the resource model and the accepted schema plan agree. */
80
+ SCHEMA_PLAN_IN_SYNC = "schema_plan_in_sync"
41
81
  }
82
+ /** What the dispatch host must evaluate to decide whether a generation-step task has landed. */
83
+ export type ApplicationBuildGenerationStepLandedCondition = {
84
+ readonly kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS;
85
+ readonly paths: readonly string[];
86
+ } | {
87
+ readonly kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC;
88
+ };
42
89
  /** A build plan referenced a generation step this companion cannot execute. Named, so the plan author sees the vocabulary. */
43
90
  export declare class ApplicationBuildUnknownGenerationStepError extends Error {
44
91
  constructor(taskRef: string, generationStepRef: string);
@@ -81,8 +128,25 @@ export interface ApplicationBuildLogoStepRunResult {
81
128
  /** The app-root-relative files this step is responsible for — the same paths the landed check reads. */
82
129
  readonly evidencePaths: readonly string[];
83
130
  }
131
+ /**
132
+ * What one executed `database-migrations` step did.
133
+ *
134
+ * `evidencePaths` is present for symmetry with its siblings and carries the MUTATION SCOPE, not the
135
+ * landed evidence — this step lands on `SCHEMA_PLAN_IN_SYNC`, never on a path.
136
+ */
137
+ export interface ApplicationBuildDatabaseMigrationsStepRunResult {
138
+ readonly generationStepRef: ApplicationBuildGenerationStep.DATABASE_MIGRATIONS;
139
+ /** True when the plan was already in sync and `wildo db generate` had nothing to write. */
140
+ readonly skippedBecauseAlreadyInSync: boolean;
141
+ /** The migration folder names present after the run that were not present before it. Usually 0 or 1. */
142
+ readonly generatedMigrationFolders: readonly string[];
143
+ /** The generator's own output tail — it names the tables and the risk of each change. */
144
+ readonly outputTail: string;
145
+ /** MUTATION SCOPE, not landed evidence. */
146
+ readonly evidencePaths: readonly string[];
147
+ }
84
148
  /** One executed generation step's result, discriminated by the step it ran. */
85
- export type ApplicationBuildGenerationStepRunResult = ApplicationBuildI18nLabelsStepRunResult | ApplicationBuildEmailTemplatesStepRunResult | ApplicationBuildLogoStepRunResult;
149
+ export type ApplicationBuildGenerationStepRunResult = ApplicationBuildI18nLabelsStepRunResult | ApplicationBuildEmailTemplatesStepRunResult | ApplicationBuildLogoStepRunResult | ApplicationBuildDatabaseMigrationsStepRunResult;
86
150
  /**
87
151
  * Execute companion-owned generation steps of a build plan, and answer which
88
152
  * files each step is responsible for.
@@ -126,6 +190,23 @@ export declare class ApplicationBuildGenerationStepCompanionService {
126
190
  * (`isWorktreePathCommitted`).
127
191
  */
128
192
  resolveGenerationStepEvidencePaths(task: BuildPlanTask): Promise<readonly string[]>;
193
+ /**
194
+ * How this task proves it landed — the ONLY landed authority for a generation step.
195
+ *
196
+ * Split from {@link resolveGenerationStepEvidencePaths} because that method answers a different
197
+ * question (which paths may this task write?) and the two answers diverge for exactly one step.
198
+ * Reading landing off the evidence paths would land the migration step on a file that predates it.
199
+ */
200
+ resolveGenerationStepLandedCondition(task: BuildPlanTask): Promise<ApplicationBuildGenerationStepLandedCondition>;
201
+ /**
202
+ * Does the resource model agree with the accepted schema plan?
203
+ *
204
+ * FAIL-CLOSED on every uncertainty, and the direction matters: an unknown answer must read as NOT
205
+ * in sync, so the task stays ready and runs again. The opposite bias would land a migration task
206
+ * that never generated anything. Re-running costs nothing — `wildo db generate` over a clean plan
207
+ * reports "nothing to generate" and exits 0.
208
+ */
209
+ isSchemaPlanInSync(): Promise<boolean>;
129
210
  /**
130
211
  * Run the task's generation step. Incremental by construction: both
131
212
  * pipelines consult the freshness lock and skip fresh units, so re-running