@wildo-ai/dev-companion 1.1.5 → 1.1.6

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 (596) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  3. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +0 -1
  4. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
  5. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +0 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  8. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +8 -0
  9. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.js +6 -0
  11. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  12. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts +21 -0
  13. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts.map +1 -0
  14. package/dist/esm/brand/services/brand-propagation.companion.utils.js +33 -0
  15. package/dist/esm/brand/services/brand-propagation.companion.utils.js.map +1 -0
  16. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +69 -1
  17. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  18. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +84 -3
  19. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  20. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +8 -4
  21. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  22. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +9 -5
  23. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  24. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +1 -1
  25. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -1
  26. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +4 -0
  27. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -1
  28. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +25 -3
  29. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -1
  30. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +159 -11
  31. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +424 -41
  33. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +333 -60
  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 +1029 -185
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +8 -2
  39. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +8 -2
  41. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts +20 -0
  43. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts.map +1 -0
  44. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js +29 -0
  45. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js.map +1 -0
  46. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +11 -0
  47. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +60 -7
  49. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  50. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +5 -4
  51. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  52. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +13 -4
  53. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  54. package/dist/esm/companion-api/companion-api.schemas.d.ts +193 -2
  55. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  56. package/dist/esm/companion-api/companion-api.schemas.js +20 -1
  57. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  58. package/dist/esm/companion-api/companion-error-guidance.models.d.ts +25 -0
  59. package/dist/esm/companion-api/companion-error-guidance.models.d.ts.map +1 -0
  60. package/dist/esm/companion-api/companion-error-guidance.models.js +26 -0
  61. package/dist/esm/companion-api/companion-error-guidance.models.js.map +1 -0
  62. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts +44 -0
  63. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts.map +1 -0
  64. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js +111 -0
  65. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js.map +1 -0
  66. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +6 -14
  67. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -1
  68. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +6 -14
  69. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -1
  70. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts +12 -0
  71. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts.map +1 -0
  72. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js +20 -0
  73. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js.map +1 -0
  74. package/dist/esm/companion-api/controllers/companion.controller.d.ts +104 -14
  75. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  76. package/dist/esm/companion-api/controllers/companion.controller.js +516 -122
  77. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  78. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +6 -38
  80. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  81. package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
  82. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  83. package/dist/esm/core/config/primary-language.companion.utils.js +19 -0
  84. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  85. package/dist/esm/core/context/companion-package-loaders.companion.js +1 -39
  86. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  87. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  88. package/dist/esm/core/inject/models/container.js +4 -0
  89. package/dist/esm/core/inject/models/container.js.map +1 -1
  90. package/dist/esm/core/inject/models/service-types.d.ts +4 -0
  91. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  92. package/dist/esm/core/inject/models/service-types.js +4 -0
  93. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  94. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  95. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +16 -0
  96. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
  97. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +1 -1
  98. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  99. package/dist/esm/core/introspection/models/companion-introspection.models.js +6 -0
  100. package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
  101. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts +41 -0
  102. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts.map +1 -0
  103. package/dist/esm/core/introspection/resources/application-secrets.companion.js +155 -0
  104. package/dist/esm/core/introspection/resources/application-secrets.companion.js.map +1 -0
  105. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +76 -0
  106. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -0
  107. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +197 -0
  108. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -0
  109. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +47 -0
  110. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -0
  111. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +199 -0
  112. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -0
  113. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +42 -0
  114. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  115. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +173 -22
  116. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  117. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +78 -90
  118. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +288 -25
  120. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  121. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +22 -36
  122. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +49 -13
  124. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
  125. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +1 -1
  126. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  127. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +10 -15
  128. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
  129. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +2 -0
  130. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  131. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts +4 -0
  133. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.js.map +1 -1
  135. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +77 -9
  137. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +45 -3
  139. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +8 -1
  141. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  142. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +3 -2
  143. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  144. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +8 -3
  145. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
  146. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +30 -1
  147. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  148. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +128 -20
  149. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  150. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +13 -0
  151. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  152. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +21 -17
  153. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  154. package/dist/esm/core/runtime/companion-endpoint-record.d.ts +8 -0
  155. package/dist/esm/core/runtime/companion-endpoint-record.d.ts.map +1 -0
  156. package/dist/esm/core/runtime/companion-endpoint-record.js +23 -0
  157. package/dist/esm/core/runtime/companion-endpoint-record.js.map +1 -0
  158. package/dist/esm/core/runtime/companion-env-file.d.ts +30 -0
  159. package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -0
  160. package/dist/esm/core/runtime/companion-env-file.js +53 -0
  161. package/dist/esm/core/runtime/companion-env-file.js.map +1 -0
  162. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +5 -0
  163. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  164. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +11 -0
  165. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  166. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts +56 -0
  167. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts.map +1 -0
  168. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js +97 -0
  169. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js.map +1 -0
  170. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +43 -3
  171. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  172. package/dist/esm/core/runtime/services/start-companion-application.service.js +127 -22
  173. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  174. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +11 -1
  175. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  176. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +42 -19
  177. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  178. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/resource-specification-context.factory.js +10 -1
  180. package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
  181. package/dist/esm/core/traceability/companion-traceability.models.d.ts +1 -7
  182. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  183. package/dist/esm/core/traceability/companion-traceability.models.js +3 -5
  184. package/dist/esm/core/traceability/companion-traceability.models.js.map +1 -1
  185. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
  186. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +15 -14
  187. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
  188. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +0 -23
  189. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
  190. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +251 -50
  191. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
  192. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  193. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +0 -2
  194. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  195. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  196. package/dist/esm/deliberations/services/deliberation.companion.service.js +3 -2
  197. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  198. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  199. package/dist/esm/email/models/email-template.actors-system.definitions.js +0 -1
  200. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  201. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -3
  202. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  203. package/dist/esm/email/services/email-template.companion.service.js +53 -255
  204. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  205. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts +12 -0
  206. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  207. package/dist/esm/email/utils/email-labels-file-source.utils.js +62 -3
  208. package/dist/esm/email/utils/email-labels-file-source.utils.js.map +1 -1
  209. package/dist/esm/email/utils/email-labels-tree.utils.d.ts +52 -0
  210. package/dist/esm/email/utils/email-labels-tree.utils.d.ts.map +1 -0
  211. package/dist/esm/email/utils/email-labels-tree.utils.js +261 -0
  212. package/dist/esm/email/utils/email-labels-tree.utils.js.map +1 -0
  213. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +2 -0
  214. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -1
  215. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +21 -1
  216. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -1
  217. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
  218. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  219. package/dist/esm/executions/services/companion-executions.companion.service.js +187 -46
  220. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  221. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  222. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +0 -1
  223. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  224. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  225. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +0 -1
  226. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  227. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  228. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +10 -0
  229. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  230. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +1 -8
  231. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  232. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +2 -9
  233. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
  234. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -0
  235. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  236. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +3 -1
  237. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
  238. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts +32 -0
  239. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts.map +1 -0
  240. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js +32 -0
  241. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js.map +1 -0
  242. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +0 -1
  243. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  244. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +0 -1
  245. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
  246. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +0 -7
  247. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  248. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +0 -7
  249. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
  250. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +30 -4
  251. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -1
  252. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +31 -5
  253. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -1
  254. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +0 -2
  255. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  256. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +0 -2
  257. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
  258. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -0
  259. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  260. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +5 -1
  261. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
  262. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +1 -15
  263. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  264. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +1 -15
  265. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
  266. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +0 -3
  267. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  268. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +0 -3
  269. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  270. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +49 -16
  271. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  272. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +49 -16
  273. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  274. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +0 -5
  275. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  276. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +0 -5
  277. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
  278. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +3 -0
  279. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
  280. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +4 -1
  281. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
  282. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +7 -1
  283. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +8 -2
  285. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
  286. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +1 -0
  287. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +2 -1
  289. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
  290. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +1 -0
  291. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +2 -1
  293. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
  294. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts +12 -0
  295. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts.map +1 -0
  296. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js +12 -0
  297. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js.map +1 -0
  298. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -0
  299. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +2 -1
  301. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
  302. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +10 -0
  303. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +11 -1
  305. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -1
  306. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +8 -0
  307. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +9 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +3 -0
  311. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +4 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  314. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +2 -1
  315. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +3 -2
  317. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  318. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +6 -0
  319. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +7 -1
  321. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
  322. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +1 -0
  323. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +2 -1
  325. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
  326. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +0 -2
  327. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/progression_milestone_tracker.en.js +0 -2
  329. package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
  330. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +1 -0
  331. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +123 -19
  333. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
  334. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +12 -0
  336. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -1
  337. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts +25 -0
  338. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts.map +1 -0
  339. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js +26 -0
  340. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js.map +1 -0
  341. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +26 -3
  342. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/errors_messages/errors-messages.en.js +25 -3
  344. package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -1
  345. package/dist/esm/i18n/index.d.ts +10 -8
  346. package/dist/esm/i18n/index.d.ts.map +1 -1
  347. package/dist/esm/i18n/index.js +10 -8
  348. package/dist/esm/i18n/index.js.map +1 -1
  349. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +10 -0
  350. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +2 -0
  352. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
  353. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts +97 -0
  354. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts.map +1 -0
  355. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js +60 -0
  356. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js.map +1 -0
  357. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/resources/workbenchAspects.en.js +6 -0
  359. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  360. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +5 -0
  361. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +1 -0
  363. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -1
  364. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +24 -0
  365. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +8 -0
  367. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -1
  368. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +30 -0
  369. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +9 -0
  371. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
  372. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +17 -4
  373. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +32 -4
  375. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -1
  376. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +8 -2
  377. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +6 -2
  379. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -1
  380. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +18 -7
  381. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -1
  382. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +17 -7
  383. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -1
  384. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +28 -3
  385. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  386. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +13 -3
  387. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
  388. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +3 -2
  389. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +8 -2
  391. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
  392. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +118 -8
  393. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +42 -16
  395. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  396. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +12 -2
  397. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +16 -2
  399. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -1
  400. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +10 -0
  401. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/system_enums/application-creation.en.js +11 -0
  403. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  404. package/dist/esm/i18n/system_enums/processor-register.en.d.ts +6 -0
  405. package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/system_enums/processor-register.en.js +6 -0
  407. package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -1
  408. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +4 -1
  409. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +5 -1
  411. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
  412. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts +46 -0
  413. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts.map +1 -0
  414. package/dist/esm/i18n/system_enums/workbench-secrets.en.js +46 -0
  415. package/dist/esm/i18n/system_enums/workbench-secrets.en.js.map +1 -0
  416. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +8 -0
  417. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +13 -0
  419. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -1
  420. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts +61 -0
  421. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts.map +1 -0
  422. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js +22 -0
  423. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js.map +1 -0
  424. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +105 -24
  425. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  426. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +55 -24
  427. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  428. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  429. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +0 -2
  430. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  431. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts +48 -0
  432. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -0
  433. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +145 -0
  434. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -0
  435. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +70 -18
  436. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  437. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +330 -113
  438. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  439. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +45 -0
  440. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +208 -6
  442. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  443. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +11 -2
  444. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  445. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +101 -18
  446. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  447. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +64 -1
  448. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  449. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +393 -70
  450. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  451. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +9 -5
  452. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  453. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  454. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts +54 -0
  455. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts.map +1 -0
  456. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js +74 -0
  457. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js.map +1 -0
  458. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +3 -3
  459. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
  460. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts +24 -0
  461. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts.map +1 -0
  462. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js +34 -0
  463. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js.map +1 -0
  464. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -1
  465. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +5 -1
  466. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -1
  467. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts +76 -0
  468. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts.map +1 -0
  469. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js +110 -0
  470. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js.map +1 -0
  471. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts +17 -0
  472. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts.map +1 -0
  473. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js +23 -0
  474. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js.map +1 -0
  475. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +36 -3
  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 +77 -5
  478. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  479. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts +38 -0
  480. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts.map +1 -0
  481. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js +66 -0
  482. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js.map +1 -0
  483. package/dist/esm/index.d.ts.map +1 -1
  484. package/dist/esm/index.js +9 -3
  485. package/dist/esm/index.js.map +1 -1
  486. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -1
  487. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +0 -1
  488. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -1
  489. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  490. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +1 -3
  491. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  492. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts +11 -0
  493. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts.map +1 -0
  494. package/dist/esm/meta-workflows/models/application-line-catalog.models.js +17 -0
  495. package/dist/esm/meta-workflows/models/application-line-catalog.models.js.map +1 -0
  496. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +0 -1
  498. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  499. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +1 -1
  500. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
  501. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +14 -0
  502. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -1
  503. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +18 -0
  504. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -1
  505. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts +14 -0
  506. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts.map +1 -0
  507. package/dist/esm/meta-workflows/models/human-decision-settler.models.js +18 -0
  508. package/dist/esm/meta-workflows/models/human-decision-settler.models.js.map +1 -0
  509. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +31 -23
  510. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  511. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +36 -5
  512. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  513. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +1 -3
  515. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  516. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +19 -0
  517. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
  518. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +38 -6
  519. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
  520. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +48 -3
  521. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  522. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +61 -8
  523. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  524. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +15 -1
  525. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -1
  526. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +50 -5
  527. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -1
  528. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +52 -9
  529. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  530. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +131 -59
  531. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  532. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts +19 -0
  533. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts.map +1 -0
  534. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js +36 -0
  535. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js.map +1 -0
  536. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +9 -0
  537. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  538. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +41 -17
  539. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  540. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +42 -2
  541. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  542. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +121 -4
  543. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  544. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +32 -0
  545. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -0
  546. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +161 -0
  547. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -0
  548. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +2 -0
  549. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -1
  550. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +1 -0
  551. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -1
  552. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +3 -2
  553. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
  554. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +12 -3
  555. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
  556. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -1
  557. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
  558. package/dist/esm/meta-workflows/services/dossier.companion.service.js +227 -30
  559. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
  560. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +29 -2
  561. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  562. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +68 -5
  563. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  564. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts +40 -0
  565. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts.map +1 -0
  566. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js +91 -0
  567. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js.map +1 -0
  568. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts +25 -0
  569. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts.map +1 -0
  570. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js +40 -0
  571. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js.map +1 -0
  572. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts +90 -0
  573. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -0
  574. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +307 -0
  575. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -0
  576. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +29 -0
  577. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  578. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +44 -4
  579. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  580. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +360 -47
  581. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  582. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +1424 -246
  583. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  584. package/package.json +17 -17
  585. package/dist/esm/__time-gov.probe.d.mts +0 -0
  586. package/dist/esm/__time-gov.probe.d.mts.map +0 -0
  587. package/dist/esm/__time-gov.probe.mjs.map +0 -0
  588. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
  589. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
  590. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
  591. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -0
  592. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -0
  593. package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -0
  594. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
  595. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
  596. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"companion.controller.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EACL,gCAAgC,EAChC,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,0CAA0C,EAC1C,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,mCAAmC,EACnC,oCAAoC,EACpC,qCAAqC,GAEtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,2BAA2B,EAC3B,eAAe,EACf,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,GAE3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AAErG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,qCAAq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B,CAAC,CAAA;IACjD,YAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,YAAA,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,YAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,YAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;qCA3BN,aAAa;QACM,0BAA0B;QAC1B,mBAAmB,UAGkB,gCAAgC;QACtB,qCAAqC;QAC9C,wCAAwC;QAC/B,qCAAqC;QACrD,6BAA6B;QACvB,gCAAgC;QAC1C,2BAA2B,YAEV,uCAAuC;QACzC,wCAAwC;QACzC,kCAAkC;QAC1C,8BAA8B;QAC1B,gCAAgC;QAC1C,2BAA2B;QACvB,6BAA6B;QAC/B,4BAA4B;QAC5B,4BAA4B;QACjB,6BAA6B;QAC5C,mCAAmC;QAC/B,4BAA4B;QACd,mCAAmC;QAC/B,qCAAqC;QAC7D,kCAAkC;GA7B9G,mBAAmB,CA65G/B;;AAED,eAAe,mBAAmB,CAAC","sourcesContent":["import { injectable, inject } from 'inversify';\nimport type { Request, Response, NextFunction } from 'express';\nimport {\n AbstractControllerBackendService,\n LoggerService,\n ErrorBuilderBackendService,\n ErrorHandlerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n CompanionActorTasksListQuerySchema,\n CompanionCreateActorTaskRequestSchema,\n CompanionCreateActorExecutionRequestSchema,\n CompanionLandGovernanceFactsRequestSchema,\n CompanionCreateFlowExecutionRequestSchema,\n CompanionExecutionsListQuerySchema,\n CompanionIntrospectionRequestSchema,\n CompanionRearmBuildTaskRequestSchema,\n CompanionUpdateActorTaskRequestSchema,\n type FileUpdateRequest,\n} from '../companion-api.schemas';\nimport {\n ErrorType,\n ErrorCustomMessageReference,\n AppFrontendType,\n computeChartRegistrationAlignment,\n ChartRegistrationBackendRefsProvenance,\n normalizeChartExecutionRef,\n type FrontendChartRegistrationRef,\n} from '@wildo-ai/saas-models';\nimport { loadBackendCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { DossierCompanionService } from '../../meta-workflows/services/dossier.companion.service';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport { LabellizeOrchestratorCompanionService } from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport { TranslateOrchestratorCompanionService } from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport { EmailTemplateCompanionService } from '../../email/services/email-template.companion.service';\nimport { PlaybookRunAlreadyInFlightError, PlaybookNotReadyError, PlaybookRunCompanionService, UnknownPlaybookError } from '../../meta-workflows/services/playbook-run.companion.service';\nimport { CreationPlaneProjectionCompanionService } from '../../core/introspection/resources/creation-plane-projection.companion.service';\nimport { FoundationExecutionError } from '../../meta-workflows/services/foundation-executor.companion.service';\nimport { SuspendedPlaybookRunNotFoundError } from '../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { PlaybookClarificationAction } from '@wildo-ai/application-creation-runtime';\nimport {\n ExecutionTraceNotFoundError,\n ExecutionTraceReadCompanionService,\n} from '../../meta-workflows/services/execution-trace-read.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildPlanUnavailableError,\n type ApplicationBuildWaveResult,\n} from '../../meta-workflows/services/application-build-dispatch.companion.service';\nimport { ApplicationBuildTaskNotACodingTaskError } from '../../meta-workflows/services/application-build-task-coding-policy.companion.service';\nimport { NothingToRearmError } from '../../meta-workflows/models/build-task-rearm.models';\nimport { ApplicationBuildUnknownGenerationStepError } from '../../meta-workflows/services/application-build-generation-step.companion.service';\nimport { PlaybookRunWriteRegisterCompanionService, PlaybookRunWriteRecordNotFoundError } from '../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport {\n composeGovernanceQuestionnaires,\n GovernanceQuestionnaireError,\n landGovernanceFactDeclarations,\n PlaybookElicitationError,\n PlaybookGenerationError,\n PlaybookClarificationError,\n type GovernanceFactDeclarationInput,\n type PlaybookElicitationAnswer,\n} from '@wildo-ai/application-creation-runtime';\nimport { MarketGenerationCompanionService } from '../../market/services/market-generation.companion.service';\nimport { LogoGenerationCompanionService } from '../../brand/services/logo-generation.companion.service';\nimport { LogoDeliberationCompanionService } from '../../brand/services/logo-deliberation.companion.service';\nimport { BrandAcceptCompanionService } from '../../brand/services/brand-accept.companion.service';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { ExpertWorkDomain, FlowsActors_Status } from '@wildo-ai/saas-models';\nimport { BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';\nimport { TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n WorkspaceElementKind,\n WorkspaceElementOperation,\n getWorkspaceResource,\n mapWorkspaceElements,\n relatedWorkspaceResources,\n} from '../../core/introspection/workspace-element-index.companion';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n ResearchAgentDispatchCompanionService,\n ResearchAgentUnavailableError,\n} from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n COMPANION_TOKEN_HEADER,\n CompanionAuthFloorCompanionService,\n} from '../../core/auth/companion-auth-floor.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityLevel, isTraceExemptProbe } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { companionRequestIsAdmittedByTokenFloor } from './companion-token-floor.policy';\nimport { SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME } from '../../core/specifications/specification-context-factory.models';\nimport { INTROSPECTION_INPUT_VALIDATION_ERROR_NAME } from '../../core/introspection/models/companion-introspection.models';\nimport { StructuredDataCatalogAuditService } from '../../core/catalogs/structured-data-catalog-audit.service';\nimport {\n assertCompanionAvailableLanguage,\n assertEmailTemplateTestSendSucceeded,\n parseCompanionTargetLocales,\n} from './companion-i18n-api-contract.utils';\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\n\n/**\n * Dev-companion HTTP surface mounted under {@link getCustomMountBasePath}\n * (`/api/companion`). Hosts labelling, email-template authoring, file\n * operations, persisted executions, meta/introspection, and market generation\n * routes.\n *\n * ── OD-4.a ─ `/api/companion/email-templates/*` routing contract ─────────────\n *\n * The `email-templates/*` route group (`generate`, `preview`, `test-send`,\n * `status`, `translate`) targets the **filesystem-based** template registry\n * exposed via {@link EmailTemplateCompanionService}, which delegates every\n * read through the in-memory `EmailTemplateRegistryBackendService`\n * (file: `engine/saas-backend-lib/src/notifications/email/services/email-template-registry.backend.service.ts`).\n *\n * It does NOT — and must never — reach for the deleted DB-backed\n * `EMAIL_TEMPLATES` core resource. That `CoreResourceType` member, its\n * resource-config, repository, registry wiring, presets, schemas, header /\n * footer sibling, and all event-triggered batch coupling were removed in\n * Steps 4 / 5 / 6 of the email-templates deprecation\n * (`.cursor/plans/email-templates-deprecate-db-backed.md`).\n *\n * The `/email-templates/*` path segment therefore reflects the **conceptual\n * surface** the operator interacts with — the developer-facing template\n * authoring flow — not a persistence layer. Renaming the routes would break\n * existing companion-frontend wiring and provides no semantic gain. The\n * filesystem-only contract is pinned by\n * `src/email/services/__tests__/email-template-preview.companion.service.test.ts`,\n * which fails fast if the preview path ever drifts back toward a DB-backed\n * lookup.\n */\n@injectable()\nexport class CompanionController extends AbstractControllerBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly labellingPlannerService: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellizeOrchestratorService: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly runWriteRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translateOrchestratorService: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplateService: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.MarketGenerationService) private readonly marketGenerationService: MarketGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunService) private readonly playbookRunService: PlaybookRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossierService: DossierCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService) private readonly creationPlaneProjection: CreationPlaneProjectionCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatchService: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService) private readonly executionTraceReadService: ExecutionTraceReadCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoGenerationService) private readonly logoGenerationService: LogoGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberationService: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAcceptService: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonaService: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DeliberationService) private readonly deliberationService: DeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDocService: TechnicalDocCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executionsService: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceabilityService: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatchService: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchAgentDispatchService: ResearchAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AuthFloorService) private readonly authFloorService: CompanionAuthFloorCompanionService,\n ) {\n super(logger, errorBuilder, errorHandler, 'CompanionController');\n }\n\n protected setupRoutes(): void {\n /*\n * The P-29b token floor, and it is registered FIRST on purpose — ahead of the trace middleware.\n *\n * An unauthorized caller must not be able to open a trace session: `attachRequestTraceSession`\n * allocates a session directory per non-exempt request, so gating after it would let anyone who\n * can reach the port spend disk and evict live sessions without ever passing a single handler.\n * Refuse first, then trace what was admitted.\n */\n this.router.use(this.enforceLocalTokenFloor.bind(this));\n\n this.router.use(this.attachRequestTraceSession.bind(this));\n\n // Health\n this.router.get('/', this.asyncHandler(this.health.bind(this)));\n this.logRouteRegistration('get', '/', 'Companion health');\n\n // ── Labelling (per-unit, lock-file-tracked) ────────────────────\n // The decentralized labelling pipeline:\n // 1. /labelling/plan → list units (components, resources, themes, …)\n // 2. /labelling/labellize → primary-language labels per unit\n // 3. /labelling/translate → per-unit per-locale translations\n //\n // There is intentionally no aggregate step. Per-unit files are the\n // runtime source of truth — apps load them via\n // `scanCustomLabelsDirectory` from `@wildo-ai/saas-backend-lib`,\n // which walks the per-unit tree at module load. Keeping things\n // separated is the contract.\n this.router.get('/labelling/plan', this.asyncHandler(this.labellingPlan.bind(this)));\n this.logRouteRegistration('get', '/labelling/plan', 'List planned labelling units');\n\n this.router.post('/labelling/labellize', this.asyncHandler(this.labellingLabellize.bind(this)));\n this.logRouteRegistration('post', '/labelling/labellize', 'Run per-unit labellize for primary locale');\n\n this.router.post('/labelling/translate', this.asyncHandler(this.labellingTranslate.bind(this)));\n this.logRouteRegistration('post', '/labelling/translate', 'Run per-unit per-locale translation');\n\n // ── Email templates ────────────────────────────────────────────\n // OD-4.a: every route in this block resolves through the\n // **filesystem-based** `EmailTemplateRegistryBackendService` via\n // `EmailTemplateCompanionService` — never through a DB repository for the\n // (deleted) `EMAIL_TEMPLATES` core resource. See the class JSDoc above.\n this.router.post('/email-templates/generate', this.asyncHandler(this.emailTemplatesGenerate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/generate', 'Generate email templates');\n\n this.router.post('/email-templates/preview', this.asyncHandler(this.emailTemplatesPreview.bind(this)));\n this.logRouteRegistration('post', '/email-templates/preview', 'Preview email template');\n\n this.router.post('/email-templates/test-send', this.asyncHandler(this.emailTemplatesTestSend.bind(this)));\n this.logRouteRegistration('post', '/email-templates/test-send', 'Send test email from template');\n\n this.router.get('/email-templates/status', this.asyncHandler(this.emailTemplatesStatus.bind(this)));\n this.logRouteRegistration('get', '/email-templates/status', 'Get email template filesystem status');\n\n this.router.post('/email-templates/translate', this.asyncHandler(this.emailTemplatesTranslate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/translate', 'Translate email templates');\n\n // ── File operations ────────────────────────────────────────────\n this.router.post('/files/update', this.asyncHandler(this.updateFiles.bind(this)));\n this.logRouteRegistration('post', '/files/update', 'Update files');\n\n this.router.get('/file', this.asyncHandler(this.getFile.bind(this)));\n this.logRouteRegistration('get', '/file', 'Get single file');\n\n this.router.get('/files/list', this.asyncHandler(this.listFiles.bind(this)));\n this.logRouteRegistration('get', '/files/list', 'List files in directory');\n\n // ── Persisted executions ────────────────────────────────────────\n this.router.post('/executions/actors', this.asyncHandler(this.createActorExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/actors', 'Persist actor execution');\n\n this.router.get('/executions/actors', this.asyncHandler(this.listActorExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/actors', 'List persisted actor executions');\n\n this.router.get('/executions/actors/:executionId', this.asyncHandler(this.getActorExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/actors/:executionId', 'Read persisted actor execution');\n\n this.router.post('/executions/flows', this.asyncHandler(this.createFlowExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/flows', 'Persist flow execution');\n\n this.router.get('/executions/flows', this.asyncHandler(this.listFlowExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/flows', 'List persisted flow executions');\n\n this.router.get('/executions/flows/:executionId', this.asyncHandler(this.getFlowExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/flows/:executionId', 'Read persisted flow execution');\n\n this.router.post('/tasks/actors', this.asyncHandler(this.createActorTask.bind(this)));\n this.logRouteRegistration('post', '/tasks/actors', 'Persist actor task');\n\n this.router.get('/tasks/actors', this.asyncHandler(this.listActorTasks.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors', 'List persisted actor tasks');\n\n this.router.get('/tasks/actors/:taskId', this.asyncHandler(this.getActorTask.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors/:taskId', 'Read persisted actor task');\n\n this.router.patch('/tasks/actors/:taskId', this.asyncHandler(this.updateActorTask.bind(this)));\n this.logRouteRegistration('patch', '/tasks/actors/:taskId', 'Update persisted actor task');\n\n // ── Meta / introspection ───────────────────────────────────────\n this.router.get('/_meta/resources-registry', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry', 'Get resources registry');\n\n this.router.get('/_meta/resources-registry/app/:appSlug', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry/app/:appSlug', 'Get resources registry for specific app');\n\n this.router.post('/_meta/introspect', this.asyncHandler(this.requestIntrospection.bind(this)));\n this.logRouteRegistration('post', '/_meta/introspect', 'Execute companion introspection behavior');\n\n this.router.get('/_meta/introspect/behaviors', this.asyncHandler(this.listIntrospectionBehaviors.bind(this)));\n this.logRouteRegistration('get', '/_meta/introspect/behaviors', 'List companion introspection behaviors (the live-context menu)');\n\n this.router.post('/charts/audit', this.asyncHandler(this.chartsAudit.bind(this)));\n this.logRouteRegistration('post', '/charts/audit', 'Audit chart registration alignment (frontend chartViews vs backend registry)');\n\n this.router.get('/_meta/website/structured-data-audit', this.asyncHandler(this.getWebsiteStructuredDataAudit.bind(this)));\n this.logRouteRegistration(\n 'get',\n '/_meta/website/structured-data-audit',\n 'Audit website structured-data emissions against the merged Schema.org catalog',\n );\n\n // ── Coding-agent status (typed Flows/Actors coding path) ───────\n // The raw POST /coding-agent/dispatch endpoint (caller-composed prompt)\n // was deleted at the first-activation hard cut: every coding run now\n // enters through the typed `runApplicationCodingTask` wrapper on the\n // episode runtime. The GET status probe stays open (read-only routes\n // keep the DD-6 posture).\n this.router.get('/coding-agent/status', this.asyncHandler(this.codingAgentStatus.bind(this)));\n this.router.post('/coding-agent/cancel', this.asyncHandler(this.codingAgentCancel.bind(this)));\n // Interactive lane: answer a parked question (resume the same session), and\n // stream a run's live frames. The respond door is a WRITE (it resumes a\n // workspace-mutating run); the events stream is read-only.\n this.router.post('/coding-agent/session/respond', this.asyncHandler(this.codingAgentRespond.bind(this)));\n this.router.get('/coding-agent/session/events', this.codingAgentSessionEvents.bind(this));\n this.logRouteRegistration(\n 'get',\n '/coding-agent/status',\n 'Coding-agent dispatch readiness (does NOT guarantee CLI binary presence or auth)',\n );\n this.logRouteRegistration('post', '/coding-agent/session/respond', 'Answer a parked coding task question and resume the same session');\n this.logRouteRegistration('get', '/coding-agent/session/events', 'Server-sent live frames for an active coding session (taskId query)');\n\n // ── Prompt (TODO) ──────────────────────────────────────────────\n this.router.post('/prompt', this.asyncHandler(this.buildPrompt.bind(this)));\n this.logRouteRegistration('post', '/prompt', 'Build prompt from template and context');\n\n // ── Playbooks (application-creation, P2) ─────────────────────────\n // One compiled Framework Knowledge playbook, run end to end: brief the model against each declared\n // family's own schema, then write the answers as specification FILES. It writes and stops. Acceptance\n // is a commit (`.claude/rules/one-source-of-truth.md`, rules 2 and 3), made by a person or — under the\n // autonomy posture — by the companion before the next build baseline, authored as itself (#1534).\n this.router.get('/build/next', this.asyncHandler(this.describeNextBuildTask.bind(this)));\n this.logRouteRegistration('get', '/build/next', 'What the next ready build-plan run would be (either executor) — read-only');\n this.router.post('/build/dispatch-next', this.asyncHandler(this.dispatchNextBuildTask.bind(this)));\n this.router.get('/build/dispatches', this.asyncHandler(this.readBuildDispatches.bind(this)));\n this.logRouteRegistration('get', '/build/dispatches', 'How far each recent detached build dispatch got (newest first) — a generation step finishes here; a coding run is admitted here and finishes in its actor-task row');\n this.logRouteRegistration('post', '/build/dispatch-next', 'Run the next ready build-plan task (coding agent or companion generation step)');\n this.router.get('/build/tasks', this.asyncHandler(this.readBuildTaskRecords.bind(this)));\n this.logRouteRegistration('get', '/build/tasks', 'Every build-plan task in one read: its attempts, why it has not landed, and what its unmet probes searched for (#1521)');\n this.router.post('/build/tasks/:taskRef/rearm', this.asyncHandler(this.rearmBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/rearm', 'Put a build task back in the queue after the reason it did not land was fixed, recording why on its completed runs (#1535)');\n // ── Execution traces (what actually happened) ────────────────────\n this.router.get('/traces', this.asyncHandler(this.listExecutionTraces.bind(this)));\n this.logRouteRegistration('get', '/traces', 'Recent execution sessions');\n this.router.get('/traces/:sessionId', this.asyncHandler(this.readExecutionTrace.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId', 'One session: every event in order, and its step artifacts');\n this.router.get('/traces/:sessionId/usage', this.asyncHandler(this.readExecutionTraceUsage.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/usage', 'What one session SPENT, in tokens — summed from the agent-call usage already in its events');\n this.router.get('/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', this.asyncHandler(this.readExecutionTraceArtifact.bind(this)));\n // The trace sessions one actor task ran in — the alias the coding lane already writes, read (#1328).\n this.router.get('/trace-aliases/actor-task/:taskId', this.asyncHandler(this.listActorTaskTraceSessions.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', 'One artifact body — the brief the model saw, or the answer it gave');\n\n this.router.post('/research', this.asyncHandler(this.runResearchTask.bind(this)));\n this.logRouteRegistration('post', '/research', 'Run one READ-ONLY research objective and return the evidence it found (no writes, no lock)');\n this.router.get('/workspace/elements', this.asyncHandler(this.readWorkspaceElements.bind(this)));\n this.logRouteRegistration('get', '/workspace/elements', \"The application's OWN CODE truth by resource — map | get | related, instead of a 43KB registry read\");\n this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));\n this.logRouteRegistration('get', '/playbooks/coherence', 'Cross-family coherence of the CURRENT working tree — what is stated with nothing behind it, and what references something absent');\n this.router.get('/playbooks', this.asyncHandler(this.listPlaybooks.bind(this)));\n this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));\n this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');\n this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));\n /*\n * Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the\n * ordering discipline this router already keeps: a literal segment that a parameterised route\n * could swallow goes first. `suspended` is one segment against that route's two, so nothing\n * shadows it today — the placement is to keep the rule visible rather than to fix a collision.\n */\n this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));\n this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');\n this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));\n this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');\n this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');\n this.router.get('/playbooks/:playbookRef/decision', this.asyncHandler(this.readPlaybookElicitationDecision.bind(this)));\n this.logRouteRegistration('get', '/playbooks/:playbookRef/decision', \"The interview this playbook declares, as a decision payload — null when it asks nothing\");\n this.router.post('/playbooks/:playbookRef/run', this.asyncHandler(this.runPlaybook.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/run', 'Run one playbook and land its outputs as specification files (body dryRun:true tests the pipe, writes nothing)');\n this.router.post('/playbooks/runs/:runId/resume', this.asyncHandler(this.resumePlaybookRun.bind(this)));\n this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\\'s questions and continue it (action: accept | decline | cancel)');\n this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\\'s evaluation treatment (the judge value-eval bench; nothing lands)');\n /*\n * The governed-document questions a HUMAN must answer (#192).\n *\n * Read-only and derived from the engine catalog, so it needs no application state and answers the\n * same for every caller. It exists because the blueprint's question surface had no consumer at all:\n * the questions were compiled into the reference docs shipped to application builders and rendered\n * by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on\n * them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.\n */\n this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));\n this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');\n this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));\n this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\\'s human-established facts as the document-facts-authored family');\n this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));\n this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');\n this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/revert', 'Restore the pre-images of one run (refuses files a human edited since; body force:true overrides)');\n this.router.get('/runs/writes/:runId/diff', this.asyncHandler(this.readRunWritesDiff.bind(this)));\n this.logRouteRegistration('get', '/runs/writes/:runId/diff', 'What one run CHANGED, per file — a unified diff from the register, so it is the run\\'s own change rather than everything uncommitted');\n\n // ── Market (Market generation, Phase 4.2) ───────────────────────\n this.router.post('/market/generate', this.asyncHandler(this.marketGenerate.bind(this)));\n this.router.post('/brand/generate-logo', this.asyncHandler(this.brandGenerateLogo.bind(this)));\n this.router.post('/brand/deliberate-logo', this.asyncHandler(this.brandDeliberateLogo.bind(this)));\n this.router.post('/brand/accept-logo', this.asyncHandler(this.brandAcceptLogo.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/market/generate',\n 'Render a market generation message template + invoke generation agent',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/deliberate-logo',\n 'Art-director brief → per-direction generation → expert-panel deliberation → stage the winner',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/accept-logo',\n 'Judge + promote a staged logo candidate into the specification SSOT (accept review point)',\n );\n\n // ── Expert personas (agentic deliberation system) ────────────────\n this.router.post('/expert-personas/derive', this.asyncHandler(this.expertPersonaDerive.bind(this)));\n this.router.post('/expert-personas/accept', this.asyncHandler(this.expertPersonaAccept.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/expert-personas/derive',\n 'Derive an app-specific expert-persona charter proposal from a framework role template + the spec artifacts',\n );\n this.logRouteRegistration(\n 'post',\n '/expert-personas/accept',\n 'Promote a staged expert-persona charter proposal into specifications/src/personas/ (committed SSOT)',\n );\n\n // ── Deliberations (agentic deliberation system, Step 3) ──────────\n this.router.post('/deliberations/run', this.asyncHandler(this.deliberationRun.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/deliberations/run',\n 'Run a charter-built expert-panel deliberation over TEXT candidates (rubric → rounds → synthesis)',\n );\n\n // ── Technical documentation (saas-technical-doc.md Step 3) ─────\n this.router.post(\n '/technical-doc/generate-openapi',\n this.asyncHandler(this.technicalDocGenerateOpenApi.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/generate-openapi',\n 'Generate consumer API OpenAPI documents on demand',\n );\n this.router.post('/technical-doc/publish-openapi', this.asyncHandler(this.technicalDocPublishOpenApi.bind(this)));\n this.logRouteRegistration('post', '/technical-doc/publish-openapi', 'Publish generated OpenAPI files into the stable API-reference tree');\n\n // ── Technical documentation source-based derivation (decision D14) ──\n this.router.post(\n '/technical-doc/derive-bundles',\n this.asyncHandler(this.technicalDocDeriveBundles.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/derive-bundles',\n 'Derive the source-based documentation evidence snapshot + authorized bundles (read-only)',\n );\n\n // ── Technical documentation generation (synchronizes src/generated/consumer-documentation/) ──\n this.router.post(\n '/technical-doc/publish-managed',\n this.asyncHandler(this.technicalDocPublishManaged.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/publish-managed',\n 'Derive, render, measure, validate and publish the complete managed documentation tree',\n );\n\n // ── Module Registry (KD-6 — companion owns SaaS-app source mutations) ──\n // Phase 2 wires the route shape; the actual ts-morph + filesystem\n // mutation work lands in Phase 5 (install/update/remove) + Phase 6\n // (publish). Until those land, every handler returns a\n // `RegistryRouteResultSchema`-shaped not-implemented envelope so\n // CLI clients (`RegistryCompanionClient`) parse the response\n // uniformly.\n this.router.post(\n '/registry/install',\n this.asyncHandler(this.registryInstallNotImplemented.bind(this)),\n );\n this.logRouteRegistration('post', '/registry/install', 'Module-registry install (Phase 5)');\n\n this.router.post(\n '/registry/update',\n this.asyncHandler(this.registryUpdateNotImplemented.bind(this)),\n );\n this.logRouteRegistration('post', '/registry/update', 'Module-registry update (Phase 5)');\n\n this.router.post(\n '/registry/remove',\n this.asyncHandler(this.registryRemoveNotImplemented.bind(this)),\n );\n this.logRouteRegistration('post', '/registry/remove', 'Module-registry remove (Phase 5)');\n\n this.router.post(\n '/registry/publish',\n this.asyncHandler(this.registryPublishNotImplemented.bind(this)),\n );\n this.logRouteRegistration('post', '/registry/publish', 'Module-registry publish (Phase 6)');\n }\n\n public getCustomMountBasePath(): string { return '/api/companion'; }\n\n /**\n * The P-29b local-token floor, finally applied (issue: the gate that was minted and never mounted).\n *\n * `CompanionAuthFloorCompanionService` has minted a 0600 machine-local token on every companion boot\n * since P-29 landed, and `isValidToken` / `buildUnauthorizedError` were written for a middleware that\n * was deleted along with the one endpoint it guarded. Nothing replaced it, so from that day the\n * loopback bind was the ENTIRE protection for every mutating route on this controller — coding\n * dispatch, playbook runs, run-write revert, registry install, every LLM call that spends money.\n *\n * What the token adds over the loopback bind is narrow and worth stating, because the floor's own\n * JSDoc is careful about what it does NOT prove: it is not evidence of human presence, and it does\n * not stop a same-uid process that can read the file. What it stops is a caller that can reach the\n * port but cannot read the filesystem — the shape of a page in the operator's browser, or any other\n * process on the machine sending a request it did not earn the right to send.\n *\n * Fails CLOSED in every direction: a missing header, an unparsable header, a token from a previous\n * boot, and an uninitialized floor (`expectedTokenDigest === null`) all refuse.\n *\n * `req.path` is mount-relative here (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and\n * excludes the query string — the same coordinate `attachRequestTraceSession` already compares\n * against. A path variant that the exemption list does not match exactly (a trailing slash, say)\n * refuses, which is the safe direction: it also matches no route.\n *\n * ## Where the access DECISION is recorded, and why not in a store\n *\n * assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — every REFUSAL on the local control\n * plane leaves a record unconditionally; admissions leave one at the configured traceability level.\n *\n * The asymmetry is stated rather than smoothed over, because the two halves have different\n * guarantees and a marker a sweep will trust must not claim the weaker one is the stronger:\n *\n * - **Refusals — unconditional.** Recorded by the error pipeline, not by this method.\n * `ErrorType.AUTHENTICATION` declares `backendActions: [LOG, RECORD_METRICS]`\n * (`errors.shared.definitions.ts`), so `buildUnauthorizedError` emits a `warn` carrying the\n * method, the path, the correlation id and the trace id. Measured on a live companion,\n * 2026-09-10: one refusal, one log line, full context — which is also the ONLY place that context\n * survives, since `sanitizeErrorForClient` strips it from the response.\n * - **Admissions — level-dependent.** `attachRequestTraceSession` runs one middleware later and\n * opens a session for every admitted request (its exemptions, `/`, `/health` and\n * `/coding-agent/status`, are GET-only), but `createApiRequestSession` builds an IN-MEMORY\n * context: nothing reaches disk until the first event passes the level gate, and\n * `CompanionTraceabilityLevel.NONE` exists. At `NONE` an admitted mutating request persists\n * nothing here. That is a defensible default for a development daemon and it is not a claim that\n * admissions are always recorded.\n * - **The ORDER is deliberate**: refuse first, then trace what was admitted, so an unauthorized\n * caller cannot spend a session directory. It is pinned — see the mounting suite.\n *\n * A separate durable audit STORE was considered and refused. One existed until the digest\n * demolition: `.wildo-saas/state/audit/companion-security-events/` still holds 212\n * `LOCAL_CONTROL_PLANE_ACCESS_DECIDED` records, each with an `eventDigest`, and the type is gone\n * from the source tree. Rebuilding it would reintroduce exactly what\n * `.claude/rules/one-source-of-truth.md` Rule 0 puts out at this stage, for a loopback development\n * daemon with no deployed counterpart — and\n * `.claude/rules/application-creation-directive.md` is explicit that a record nobody reads is a\n * record we do not write. If a companion ever faces something other than this machine, that is the\n * decision to revisit, and the marker above is what a sweep will find.\n */\n private enforceLocalTokenFloor(req: Request, _res: Response, next: NextFunction): void {\n const admitted = companionRequestIsAdmittedByTokenFloor(\n { method: req.method, path: req.path, presentedToken: req.headers[COMPANION_TOKEN_HEADER] },\n (presented) => this.authFloorService.isValidToken(presented),\n );\n if (admitted) {\n next();\n return;\n }\n next(this.authFloorService.buildUnauthorizedError(`${req.method} ${req.path}`));\n }\n\n private attachRequestTraceSession(req: Request, res: Response, next: NextFunction): void {\n // Polled probes are infrastructure noise, not build-time work — see\n // `isTraceExemptProbe` for the full rationale (session-dir spam + live-\n // session eviction under the always-on traceability default).\n if (isTraceExemptProbe(req.method, req.path, ['/', '/health', '/coding-agent/status'])) {\n next();\n return;\n }\n const sessionContext = this.traceabilityService.createApiRequestSession({\n method: req.method,\n routePath: req.path,\n urlPath: req.originalUrl || req.url,\n ip: req.ip,\n userAgent: req.get('user-agent') ?? undefined,\n });\n\n res.locals.companionTraceSession = sessionContext;\n let didFinish = false;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n query: req.query,\n },\n });\n\n res.on('finish', () => {\n didFinish = true;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish ${req.method.toUpperCase()} ${req.path} with ${res.statusCode}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n res.on('close', () => {\n if (didFinish) {\n return;\n }\n\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-close',\n summary: `Connection closed before finish for ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n\n // Everything this request starts runs under its session — including a detached run that\n // outlives the response, and model calls whose caller named no session (#1264).\n this.traceabilityService.runWithActiveSession(sessionContext, () => next());\n }\n\n private getTraceSession(res: Response): CompanionExecutionSessionContext | undefined {\n return res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n }\n\n private createTraceStep(\n res: Response,\n kind: string,\n label: string,\n ) {\n const session = this.getTraceSession(res);\n return session\n ? this.traceabilityService.createStep(session, { kind, label })\n : undefined;\n }\n\n private async traceSessionEvent(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n type: string,\n summary: string,\n payload?: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.traceEvent({\n session,\n minimumLevel,\n type,\n summary,\n ...(payload !== undefined ? { payload } : {}),\n ...(step ? { step } : {}),\n });\n }\n\n private async traceSessionArtifact(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n fileName: string,\n content: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.writeArtifact({\n session,\n minimumLevel,\n fileName,\n content,\n ...(step ? { step } : {}),\n });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // HEALTH\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async health(_req: Request, res: Response, _next: NextFunction) {\n this.jsonSuccess(res, { status: 'ok', service: 'dev-companion' });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // LABELLING (per-unit, lock-file-tracked)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async labellingPlan(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * WITH completeness. This used to call `planAllUnits()`, which returns `.units` and DROPS the\n * planner's own incompleteness report — so a plan that silently suppressed whole families\n * answered exactly like a complete one.\n *\n * That is not hypothetical: milestone labels were never planned for ANY application (#1405).\n * The planner read `MilestoneDefinitionRegistry`, which IS bound here — its only production\n * writer is `startApplication()`, which the companion never runs, so it answered `[]` forever\n * while a bound-but-empty read was treated as an authoritative \"no milestones\". The family is\n * now planned from the introspection snapshot. The consequence reached a user — a celebration\n * with no milestone words falls back\n * to the notification centre's generic `defaultSuccess`, and the progression tracker renders\n * `milestones.<ref>.title` as a raw key — and the one mechanism that knew why was reporting it\n * into a value nobody read.\n */\n const plan = await this.labellingPlannerService.planAllUnitsWithCompleteness();\n const summary = plan.units.map((u) => ({\n id: u.id,\n category: u.category,\n displayLabel: u.displayLabel,\n bucket: u.filePathHint.bucket,\n slug: u.filePathHint.slug,\n chunkCount: u.chunks.length,\n keyCount: u.chunks.reduce((sum, c) => sum + c.keys.length, 0),\n }));\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: summary,\n incompleteness: plan.incompleteness,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Audit chart-registration alignment: compares every frontend\n * `chartViews[].chartDefinition.ref` (materialized in the FRONTEND subprocess)\n * against the backend-registered chart refs (from the merged backend modules).\n * Returns the two-channel report — `unregisteredFrontendCharts` (each a\n * guaranteed runtime `chart_not_found` 404) + `orphanBackendCharts` (backend-only\n * charts, valid for API/programmatic use). The CLI renders + gates on it.\n */\n private async chartsAudit(_req: Request, res: Response, next: NextFunction) {\n try {\n // Frontend side — the chart authoring surface, readable only in the frontend subprocess.\n const appFrontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!appFrontendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'chart-registration audit: no SAAS_APP frontend service found.' },\n });\n }\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: appFrontendServiceKey,\n behavior: 'chart-registration-refs',\n });\n if (!result.success) {\n const message = 'error' in result ? result.error.message : 'unknown error';\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `chart-registration-refs introspection failed: ${message}` },\n });\n }\n const frontendChartRefs =\n (result.data as { frontendChartRegistrationRefs?: FrontendChartRegistrationRef[] })\n .frontendChartRegistrationRefs ?? [];\n\n // Backend side — the EFFECTIVE set the backend registers, not the module declarations.\n //\n // `buildApplicationInitializationConfig()` is the same pure builder backend startup uses; it\n // assembles configuration and starts nothing, and its `chartDefinitions` is the array\n // `StartApplicationBackendService` hands to `ChartRegistry.registerChart`. That matters\n // because the assembly does `overrides.chartDefinitions ?? backendRegistry.chartDefinitions`\n // — a REPLACE — so `mergeBackendDomainModules(...)`, which this route used until 2026-09-09,\n // is a different population the moment an application supplies that override: a dropped chart\n // read as ALIGNED and 404'd at runtime.\n //\n // It is also what the contract asks for in as many words (\"tooling must not reconstruct\n // selected runtime capabilities from lower-level registries or naming conventions\"), so the\n // previous composition was violating the surface it was calling.\n const backendExports = await loadBackendCompanionExports(this.companionContext);\n if (typeof backendExports.buildApplicationInitializationConfig !== 'function') {\n // REFUSE rather than fall back to the declarations. A fallback here would answer about a\n // population this route cannot vouch for, under a route whose whole output is a verdict —\n // and it would do so silently, which is the defect this change removes.\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'chart-registration audit: the application\\'s backend companion-exports declare no '\n + '`buildApplicationInitializationConfig`, so the effective registered chart set cannot be '\n + 'read. Add it to `backendCompanionExports` (it is a REQUIRED member of '\n + '`BackendCompanionExports`) and re-run.',\n },\n });\n }\n const backendRegisteredRefs = (backendExports.buildApplicationInitializationConfig().chartDefinitions ?? [])\n .map((definition) => normalizeChartExecutionRef(definition.ref));\n\n this.jsonSuccess(\n res,\n computeChartRegistrationAlignment({\n frontendChartRefs,\n backendRegisteredRefs,\n backendRefsProvenance: ChartRegistrationBackendRefsProvenance.EFFECTIVE_INITIALIZATION_CONFIG,\n }),\n );\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingLabellize(req: Request, res: Response, next: NextFunction) {\n try {\n const { forceRegenerate, unitIds } = req.body || {};\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n const result = await this.labellizeOrchestratorService.labellize({\n forceRegenerate: forceRegenerate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, forceRetranslate, unitIds } = req.body || {};\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n if (forceRetranslate !== undefined && typeof forceRetranslate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRetranslate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n const result = await this.translateOrchestratorService.translate({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Validate a locale string against `AvailableLanguage`. Without this,\n * the orchestrators would happily write `<bucket>/<slug>.xx.ts`\n * files for arbitrary input and create unbounded locale entries in\n * the lock file.\n */\n private assertAvailableLanguage(value: string, fieldName: string): AvailableLanguage {\n return assertCompanionAvailableLanguage(value, fieldName, this.errorBuilder);\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // EMAIL TEMPLATES\n //\n // OD-4.a: All handlers in this block delegate to\n // `EmailTemplateCompanionService`, which exclusively reads from the in-memory\n // `EmailTemplateRegistryBackendService` (file-based template + per-locale\n // labels, refreshed via dynamic `import()` of the compiled `dist/`\n // artifacts). The deleted DB-backed `EMAIL_TEMPLATES` core resource is NOT\n // a fallback. See the `CompanionController` class JSDoc for the full\n // contract and the deprecation plan reference.\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async emailTemplatesGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n this.logDebug('emailTemplatesGenerate');\n const { forceRegenerate, templateRefs, locales } = req.body || {};\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (locales !== undefined && (!Array.isArray(locales) || locales.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'locales must be an array of locale strings when provided' },\n },\n );\n }\n\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.generateTemplates({\n forceRegenerate,\n templateRefs,\n locales,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesPreview(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, mockContext } = req.body || {};\n\n if (!templateRef || typeof templateRef !== 'string' || !locale || typeof locale !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef and locale are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.previewTemplate({\n templateRef,\n locale: validatedLocale,\n mockContext,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTestSend(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, recipientEmail, mockContext } = req.body || {};\n\n if (\n !templateRef || typeof templateRef !== 'string'\n || !locale || typeof locale !== 'string'\n || !recipientEmail || typeof recipientEmail !== 'string'\n ) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef, locale, and recipientEmail are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.testSend({\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n mockContext,\n }, this.getTraceSession(res));\n\n assertEmailTemplateTestSendSucceeded(result, {\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n }, this.errorBuilder);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesStatus(req: Request, res: Response, next: NextFunction) {\n try {\n const templateRefs = typeof req.query.templateRefs === 'string'\n ? req.query.templateRefs.split(',').map((value) => value.trim()).filter(Boolean)\n : undefined;\n\n const result = await this.emailTemplateService.getTemplateStatus(\n templateRefs,\n this.getTraceSession(res),\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, templateRefs, dryRun } = req.body || {};\n this.logDebug('emailTemplatesTranslate', { targetLocales, templateRefs, dryRun });\n\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (dryRun !== undefined && typeof dryRun !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'dryRun must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.translateEmailTemplateLabels({\n targetLocales: validatedTargets,\n templateRefs,\n dryRun: !!dryRun,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // FILE OPERATIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Single source of truth for the SaaS app root consumed by file operations.\n *\n * Always returns `this.companionContext.saasRoot`. Earlier revisions used\n * `process.env.COMPANION_WORKSPACE_ROOT || this.companionContext.saasRoot`,\n * which let a stale env var (from a parent shell, prior session, or leaked\n * Vitest worker) silently override the trusted CompanionContext snapshot.\n * `COMPANION_WORKSPACE_ROOT` is now only used as a BOOTSTRAP seed for\n * subprocess consumers that have no CompanionContext (see\n * `applyTrustedHomesToChildProcess` and the code-compliance scripts) —\n * never as a runtime override inside services that already hold a resolved\n * context.\n */\n private getWorkspaceRoot(): string {\n return this.companionContext.saasRoot;\n }\n\n private resolveRequestedPath(filePath: string): string {\n return path.resolve(this.getWorkspaceRoot(), filePath);\n }\n\n private async updateFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'update-files');\n try {\n this.logDebug('updateFiles');\n const { files } = req.body;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-start',\n 'Start file update request',\n {\n fileCount: Array.isArray(files) ? files.length : 0,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-request.json',\n req.body ?? {},\n traceStep,\n );\n \n if (!files || !Array.isArray(files)) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Request body must contain a \"files\" array' }\n }\n );\n }\n\n const results: { success: boolean; updatedFiles: string[]; errors: { path: string; message: string }[] } = {\n success: true,\n updatedFiles: [],\n errors: [],\n };\n\n for (const file of files as FileUpdateRequest[]) {\n try {\n const absolutePath = this.resolveRequestedPath(file.path);\n \n if (file.createDirectories !== false) {\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n }\n \n const encoding = (file.encoding || 'utf-8') as BufferEncoding;\n await fs.writeFile(absolutePath, file.content, { encoding });\n \n results.updatedFiles.push(file.path);\n } catch (error) {\n results.success = false;\n results.errors.push({\n path: file.path,\n message: describeCaughtError(error),\n });\n }\n }\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n results.success ? 'file-update-success' : 'file-update-mixed-result',\n results.success\n ? `Updated ${results.updatedFiles.length} files`\n : `Updated ${results.updatedFiles.length} files with ${results.errors.length} failures`,\n {\n updatedCount: results.updatedFiles.length,\n errorCount: results.errors.length,\n success: results.success,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-result.json',\n results,\n traceStep,\n );\n this.jsonSuccess(res, results);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-failure',\n 'Workspace file update failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFile(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'get-file');\n try {\n this.logDebug('getFile');\n const filePath = req.query.path as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-start',\n 'Start file read request',\n { filePath },\n traceStep,\n );\n \n if (!filePath) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"path\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(filePath);\n const content = await fs.readFile(absolutePath, 'utf-8');\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-success',\n `Read file ${filePath}`,\n {\n filePath,\n contentLength: content.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-read-result.json',\n {\n filePath,\n content,\n encoding: 'utf-8',\n },\n traceStep,\n );\n this.jsonSuccess(res, { content, encoding: 'utf-8' });\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-failure',\n 'Workspace file read failed',\n {\n error: describeCaughtError(e),\n filePath: req.query.path,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'list-files');\n try {\n this.logDebug('listFiles');\n const directory = req.query.directory as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-start',\n 'Start workspace directory listing request',\n { directory },\n traceStep,\n );\n \n if (!directory) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"directory\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(directory);\n const entries = await fs.readdir(absolutePath, { withFileTypes: true });\n \n const files = entries.map(entry => ({\n name: entry.name,\n isDirectory: entry.isDirectory(),\n path: path.join(directory, entry.name),\n }));\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-success',\n `Listed workspace directory ${directory}`,\n {\n directory,\n entryCount: files.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-list-result.json',\n {\n directory,\n files,\n },\n traceStep,\n );\n this.jsonSuccess(res, files);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-failure',\n 'Workspace directory listing failed',\n {\n error: describeCaughtError(e),\n directory: req.query.directory,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // CODING-AGENT STATUS (typed Flows/Actors coding path)\n // ─────────────────────────────────────────────────────────────────────────────\n // The P-29 token middleware that used to live HERE guarded only the raw\n // POST /coding-agent/dispatch endpoint; it was deleted with that endpoint\n // at the first-activation hard cut, and for as long as it stayed deleted\n // `CompanionAuthFloorCompanionService`'s token half had no consumer at all.\n // It is back, and deliberately not here: `enforceLocalTokenFloor` is a\n // router-level middleware registered first in `setupRoutes`, so it covers\n // every mutating route on the mount rather than the one endpoint whose\n // author happened to remember it. Per-route gating is what let the floor\n // die with a single deletion.\n // The OTHER half of the same auth floor is unchanged and enforced at\n // startup before the server listens: the fail-closed loopback assertion,\n // with no override, which is why the companion must never bind beyond this\n // machine.\n\n /**\n * Stop the in-flight coding run.\n *\n * Answers 200 with the task that was signalled, or 200 with\n * `cancelled: false` when nothing is running — an operator asking to stop a\n * run that already finished has not made an error, and a 404 would read like\n * a broken route rather than an empty queue.\n *\n * The run terminalises normally with stop reason `cancelled` and its captured\n * change set, so what the agent had already written stays visible.\n */\n private async codingAgentCancel(_req: Request, res: Response, next: NextFunction) {\n try {\n const cancelled = this.codingAgentDispatchService.cancelActiveApplicationCodingTask();\n this.jsonSuccess(res, cancelled ? { cancelled: true, ...cancelled } : { cancelled: false });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * Answer a coding task that parked on a question, resuming the SAME agent\n * session. A WRITE: it re-enters a workspace-mutating run behind the shared\n * worktree lock, so it is serialized with every other coding run.\n */\n private async codingAgentRespond(req: Request, res: Response, next: NextFunction) {\n try {\n const { taskId, answer } = (req.body ?? {}) as { taskId?: unknown; answer?: unknown };\n if (typeof taskId !== 'string' || typeof answer !== 'string') {\n // A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a\n // plain `new Error` here surfaced as the latter and logged at critical\n // severity (found by the live surface probe, 2026-09-04).\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Both `taskId` and `answer` (strings) are required.' },\n });\n }\n // ONE door since #1359: the parked run is an actor-system execution waiting on a decision,\n // with its contract and baseline on the checkpoint, so answering it is the same call whether\n // this process parked it or a previous one did. The service refuses (409) when nothing\n // answerable waits under the id.\n const admission = await this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer);\n this.jsonSuccess(res, admission);\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stream one active coding session's live frames as Server-Sent Events.\n *\n * Frames flow only while the run is active, so the current pending question\n * (if any) is sent first as a `snapshot` event — a subscriber that attaches\n * after a park still learns what is being asked. Read-only.\n */\n private codingAgentSessionEvents(req: Request, res: Response): void {\n const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';\n if (!taskId) {\n res.status(400).json({ error: 'A `taskId` query parameter is required.' });\n return;\n }\n res.setHeader('Content-Type', 'text/event-stream');\n res.setHeader('Cache-Control', 'no-cache, no-transform');\n res.setHeader('Connection', 'keep-alive');\n res.flushHeaders?.();\n\n const send = (event: string, data: unknown): void => {\n res.write(`event: ${event}\\ndata: ${JSON.stringify(data)}\\n\\n`);\n };\n\n // The pending question up front, so a late subscriber is not blind to a park\n // that already happened.\n // Read from the actor plane, so it is asynchronous; a failed read costs the late subscriber its\n // snapshot and nothing else — the live frames below do not depend on it.\n void this.codingAgentDispatchService.listPendingCodingQuestions()\n .then((questions) => send('snapshot', { pendingQuestion: questions.find((q) => q.taskId === taskId) ?? null }))\n .catch(() => send('snapshot', { pendingQuestion: null }));\n\n const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {\n send(frame.channel, frame.payload);\n });\n // A heartbeat keeps intermediaries from closing an idle stream during a long\n // quiet stretch of a run.\n const heartbeat = setInterval(() => res.write(': keep-alive\\n\\n'), 15_000);\n heartbeat.unref?.();\n req.on('close', () => {\n clearInterval(heartbeat);\n unsubscribe();\n });\n }\n\n /**\n * What is running, and what died leaving something resumable.\n *\n * A composite is a minutes-long operation — 780s for a five-iteration run — and until now nothing\n * could report that one was in progress. On 2026-08-29 a parallel session published a single file\n * 32 seconds after a research turn had succeeded; the companion restarted correctly and the run\n * died. That session had no way to know, and no way to find out (#125).\n *\n * Two fields because they answer two different questions:\n *\n * - `running` comes from MEMORY, and is the only evidence of a run still inside its first\n * iteration — the most expensive moment to interrupt, and one no checkpoint has reached yet.\n * - `interrupted` comes from DISK, and lists runs whose process is gone. A checkpoint outlives its\n * run only when the process was taken away, because a run that concludes consumes its own.\n *\n * Deliberately NOT a lock. `CLAUDE.md` is explicit that sessions are independent and shared-file\n * collisions are accepted; a run that refused to let someone save a file would be worse than one\n * that loses an iteration.\n */\n private async readPlaybookRunsInFlight(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readRunsInFlight());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.\n *\n * The read that makes a suspension survivable. A run that stops at a clarification answers 200 with\n * its `runId`, and until this existed that response was the ONLY place the id lived: reload the\n * page and the run stayed suspended on disk with nobody able to name it. A resume affordance can\n * now be rebuilt from server state rather than from the browser's memory of one response.\n */\n private async readSuspendedPlaybookRuns(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /compliance/governance-questions` — what a person still has to decide.\n *\n * `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats\n * an unknown document as \"no such document\", and a host loading several refs should not lose the\n * ones that exist because one was mistyped.\n */\n private async readGovernanceQuestions(req: Request, res: Response, next: NextFunction) {\n try {\n const raw = req.query.definitionRef;\n const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);\n this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.\n *\n * The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question\n * the questionnaire asks carries a human authority, and the derived family refuses those by type.\n *\n * It does NOT commit. The landed file is a working edit until a human commits it\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.\n *\n * `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set\n * would produce before a person commits to it.\n */\n private async landGovernanceFacts(req: Request, res: Response, next: NextFunction) {\n try {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n /*\n * `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through\n * `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message\n * sanitized to the literal \"internal\" — so a deliberate, well-worded refusal would answer 500\n * saying nothing. Found by making a test double reproduce the real sanitization rather than\n * passing errors through.\n */\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n }));\n return;\n }\n /*\n * The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service\n * that owns the question catalog; this refuses a body that is not a request at all, which\n * previously reached the service and threw a `TypeError` reported as a 500.\n *\n * `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own\n * catch and goes out through the generic path as INTERNAL with its message sanitized to\n * \"internal\" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and\n * throwing would have moved the defect rather than fixed it. Caught by mutating the guard away\n * and watching the pin stay green.\n */\n const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message:\n 'This is not a governance-fact landing request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const payload = parsed.data;\n /*\n * The authored facts as LANDED, for the merge (#1454, Step 6): the new answers replace their own\n * facts and every other declaration is kept. Read through the same aggregate every reader uses,\n * so what this landing merges into is what the dossier showed the person.\n */\n const current = await this.dossierService.readAuthoredDocumentFacts();\n const result = await landGovernanceFactDeclarations({\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in\n // VALUES, never in the names of landed exports.\n constantPrefix: 'application',\n answers: payload as unknown as GovernanceFactDeclarationInput,\n ...(current === undefined ? {} : { current }),\n ...(req.query.dryRun === undefined ? {} : { dryRun: true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n /*\n * A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.\n *\n * Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered\n * question, a review with no reviewer, \"does not apply\" on a question that does not offer it —\n * and those sentences are the whole product of that boundary. Left to `jsonError` they are\n * classified INTERNAL and SANITIZED to the literal string \"internal\", so the caller gets a 500\n * that says nothing. Measured against the live companion on 2026-09-03, minutes after the\n * route shipped: `POST` with an empty body answered `{\"type\":\"INTERNAL\",\"message\":\"internal\"}`.\n *\n * Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed\n * interview is something the caller must change, never something that went wrong here.\n */\n if (e instanceof GovernanceQuestionnaireError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private async codingAgentStatus(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.codingAgentDispatchService.getStatus());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PERSISTED EXECUTIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async createActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorExecution(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateFlowExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createFlowExecution(payload, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFlowExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listFlowExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getFlowExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorTask(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorTasks(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionActorTasksListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorTasks(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorTask(taskId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async updateActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const payload = CompanionUpdateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.updateActorTask(taskId, payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The generic actor-plane WRITE doors (`POST /executions/actors`, `POST /tasks/actors`,\n * `PATCH /tasks/actors/:taskId`) drop the creation boards, because the boards read actor-plane rows\n * no file signature can see (#1310, sixth review F2): a coding task's status or memory moves the\n * loop guard, the attempt budget and the in-flight set. The build lane announces its own writes\n * through `announceRunStateChanged`; these doors write the same rows on anyone's behalf, so they\n * cannot know which writes matter and drop the boards after every one. The cost is a recompute a\n * watching tab would pay on its next read anyway.\n */\n private invalidateCreationBoardsAfterActorPlaneWrite(): void {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // META / INTROSPECTION\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Get resources registry, optionally scoped to a specific app.\n */\n private async getResourcesRegistry(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'resources-registry');\n let mappedFailureAlreadyTraced = false;\n try {\n const appSlug = req.params.appSlug;\n this.logDebug('getResourcesRegistry', { appSlug: appSlug ?? 'all' });\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-start',\n 'Resolve companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickResourcesRegistryCarrierServiceKey(),\n behavior: 'resources-registry',\n });\n\n if (!result.success) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-upstream-failure',\n 'Companion resources registry introspection returned a failure result',\n {\n appSlug: appSlug ?? null,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: 'error' in result ? result.error : undefined,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = 'error' in result\n ? result.error.message\n : 'Companion resources-registry introspection failed.';\n\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failureMessage,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-result.json',\n result.data ?? null,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-success',\n 'Resolved companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n this.jsonSuccess(res, result.data ?? null);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-failure',\n 'Failed to resolve companion resources registry',\n {\n appSlug: req.params.appSlug ?? null,\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private pickResourcesRegistryCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the companion resources-registry behavior.',\n },\n });\n }\n\n return backendServiceKey;\n }\n\n private async getWebsiteStructuredDataAudit(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(\n res,\n 'meta-introspection',\n 'website-structured-data-audit',\n );\n try {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-start',\n 'Run website structured-data reconciliation against the merged Schema.org catalog',\n {},\n traceStep,\n );\n\n const report = await StructuredDataCatalogAuditService.audit(this.companionContext);\n const warningCount = report.result.findings.length;\n const responseBody = {\n status: warningCount === 0 ? 'passed-with-zero-findings' : 'completed-with-warnings',\n warningCount,\n warnings: report.result.findings,\n report,\n };\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'website-structured-data-audit-result.json',\n responseBody,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n warningCount === 0\n ? 'website-structured-data-audit-success'\n : 'website-structured-data-audit-warnings',\n warningCount === 0\n ? 'Website structured-data audit completed with zero findings'\n : 'Website structured-data audit completed with warning findings',\n {\n pageCount: report.pageCount,\n sectionCount: report.sectionCount,\n warningCount,\n },\n traceStep,\n );\n\n this.jsonSuccess(res, responseBody);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-failure',\n 'Failed to run website structured-data audit',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Is this failure the CALLER's fault (400) rather than the companion's (500)?\n *\n * Decided by the ERROR NAME, for any behavior. It used to be gated on one behavior id\n * (`specification-context-parts`), which is the hand-kept-list shape: the next parameterised behavior\n * inherited 500 INTERNAL for a malformed input, sanitized to \"internal\", and its own refusal message —\n * written to name the fix — reached nobody. Measured on the first live `wildo context elements` run\n * (#1459), where `get` with both `refs` and `aspectKeys` answered 500 and the CLI suggested the\n * companion might be down.\n *\n * `ZodError` stays gated on that behavior deliberately: elsewhere a Zod failure is usually the\n * APPLICATION's own data failing its schema, which is not the caller's input and must not read as a\n * bad request. A handler that wants the 400 says so by throwing\n * {@link IntrospectionInputValidationError}.\n */\n private isValidationIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): boolean {\n if (result.success) return false;\n if (result.error?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) return true;\n\n const effectiveBehavior = requestedBehavior ?? result.behavior;\n if (effectiveBehavior !== 'specification-context-parts') return false;\n return result.error?.name === 'ZodError'\n || result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;\n }\n\n /**\n * `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).\n *\n * Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a\n * `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never\n * re-derives the \"first backend service\" rule.\n */\n private listIntrospectionBehaviors(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.companionIntrospectionService.describeCatalog());\n } catch (error) {\n next(error);\n }\n }\n\n private async requestIntrospection(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');\n let mappedFailureAlreadyTraced = false;\n try {\n const { serviceKey, behavior, input } = CompanionIntrospectionRequestSchema.parse(req.body ?? {});\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-start',\n `Resolve companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-request.json',\n { serviceKey, behavior, input },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey,\n behavior,\n input,\n });\n\n if (!result.success && 'error' in result) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-upstream-failure',\n `Companion introspection behavior ${behavior} returned a failure result`,\n {\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: result.error,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = result.error.message;\n const errorType = this.isValidationIntrospectionFailure(result, behavior)\n ? ErrorType.VALIDATION\n : ErrorType.INTERNAL;\n const customMessageReference = errorType === ErrorType.VALIDATION\n ? ErrorCustomMessageReference.VALIDATION\n : ErrorCustomMessageReference.INTERNAL;\n\n throw this.errorBuilder.buildError(\n errorType,\n undefined,\n {\n customMessageReference,\n context: {\n message: failureMessage,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-success',\n `Resolved companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n },\n traceStep,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-failure',\n 'Companion introspection request failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n /*\n * The caller-input contract holds for a PARENT-side throw too, and it did not until now.\n *\n * `isValidationIntrospectionFailure` above reads a failure RESULT — the shape a subprocess\n * error comes back in, with its name carried across the boundary as a string. But resolution\n * runs in this process, BEFORE any subprocess: an unknown service key, an unknown behavior, a\n * behavior asked of the wrong service kind all throw here and reached `jsonError` unclassified,\n * so a perfectly actionable message (\"Unknown SaaS service key ... This application declares:\n * ...\") was sanitized to a bodyless 500 INTERNAL. The CLI's health hint is gated on a 4xx, so\n * it then fired on a companion that is demonstrably up and sent the reader to check a process\n * instead of their own argument — the exact failure #1459 fixed on the result path, arriving\n * through the door nobody had enumerated.\n *\n * Matched by NAME rather than `instanceof` for the same reason the name exists: it is the one\n * property that survives every boundary this error can cross.\n */\n if ((e as { name?: string })?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) {\n this.jsonError(\n res,\n this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: (e as Error).message },\n },\n ) as any,\n next,\n );\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PROMPT (TODO)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async buildPrompt(_req: Request, res: Response, _next: NextFunction) {\n try {\n this.jsonSuccess(res, { prompt: 'Not implemented yet', message: 'Prompt building service is not yet available' });\n } catch (e) {\n this.jsonError(res, e as any, _next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // MARKET (Market generation, Phase 4.2)\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * POST /api/companion/market/generate\n *\n * Body: `MarketGenerationRequest`\n * - `templateRef` (required) — `MarketMessageTemplate.ref`\n * - `icpRef`, `featureRef`, `benefitRef`, `channelRef`, `objectionRef` —\n * resolved against the snapshot; their inclusion must match the\n * template's `requiredInputs`.\n * - `outputLanguage` — defaults to \"English\" inside the renderer when\n * omitted; honored verbatim when provided.\n *\n * The handler is intentionally thin — `MarketGenerationCompanionService`\n * owns the introspection + LLM orchestration. We only do\n * minimal-shape validation here so the operator gets a clean\n * 400 instead of a confusing 500 when `templateRef` is missing.\n */\n /**\n * `GET /playbooks/coherence` — the questions no single family answers about itself.\n *\n * Returns both the structured findings and the rendered markdown: the first for a workbench, the\n * second because the intended reader is a human deciding whether to commit, and prose is what they\n * read. It REPORTS — a coverage gap is frequently a deliberate decision — so there is no verdict\n * field and nothing here refuses.\n */\n /**\n * `POST /research` — one read-only research turn.\n *\n * Deliberately NOT under `/playbooks`: research is a capability, and binding it to the playbook\n * lane before a playbook consumes it would make the first consumer's shape the contract. It is\n * reachable on its own so the lane can be exercised and measured before anything is choreographed\n * around it.\n */\n private async runResearchTask(req: Request, res: Response, next: NextFunction) {\n try {\n const objective = (req.body ?? {}).objective;\n if (typeof objective !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`objective` is required and must be a string.' },\n });\n }\n const evidenceScope = (req.body ?? {}).evidenceScope;\n const result = await this.researchAgentDispatchService.runResearchTask({\n objective,\n ...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),\n });\n // The whole result, including the permission decisions: a thin answer has two very different\n // causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.\n res.json(result);\n } catch (error) {\n if (error instanceof ResearchAgentUnavailableError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /workspace/elements` — the application's own code truth, by resource (#1437).\n *\n * It could only be read WHOLE: `resources-registry` answers 43 KB, `resource-specifications`\n * 227 KB, and no filter on the pull door reached a module, a resource, a field, a relationship or\n * an operation. A build task targets ONE resource.\n *\n * The narrowing is HERE rather than in the derivation, and that is the design: the projection\n * behind it costs ~35 s and the introspection cache keys on a behavior's input, so a filter pushed\n * down would make every distinct question a fresh subprocess. One derivation, cached, sliced many\n * times — and two slices of one projection cannot disagree about an application being edited.\n *\n * Every answer carries its FRESHNESS, which is the third thing #1437 asks for and the one a\n * caller cannot reconstruct: the registry once reported 15 resources as a held derivation while\n * the specification set and the compiled dist both had 16.\n */\n private async readWorkspaceElements(req: Request, res: Response, next: NextFunction) {\n try {\n const operation = String(req.query.op ?? WorkspaceElementOperation.MAP);\n const serviceKey = typeof req.query.serviceKey === 'string' && req.query.serviceKey.length > 0\n ? req.query.serviceKey\n : this.companionIntrospectionService.describeCatalog().defaultBackendServiceKey;\n if (serviceKey === null) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application declares no backend service to introspect.' },\n });\n }\n const { index, freshness } = await readWorkspaceElements(this.companionIntrospectionService, serviceKey);\n const answeredWith = { freshness: describeWorkspaceFreshness(freshness), held: freshness.held, ageMs: freshness.ageMs };\n const readList = (value: unknown): string[] | undefined => {\n if (typeof value === 'string') return value.split(',').map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n return Array.isArray(value) ? value.map(String) : undefined;\n };\n\n if (operation === WorkspaceElementOperation.MAP) {\n const kinds = readList(req.query.kinds) as WorkspaceElementKind[] | undefined;\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.MAP,\n lines: mapWorkspaceElements(index, {\n ...(kinds ? { kinds } : {}),\n ...(readList(req.query.resources) ? { resourceTypes: readList(req.query.resources)! } : {}),\n }),\n });\n return;\n }\n\n const resourceType = typeof req.query.resource === 'string' ? req.query.resource : '';\n if (resourceType.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`resource\\` is required for op=${operation}. Ask op=map first for the refs this application has.` },\n });\n }\n\n if (operation === WorkspaceElementOperation.GET) {\n const resource = getWorkspaceResource(index, resourceType);\n if (resource === undefined) {\n // NOT an empty resource: \"does not exist\" and \"exists and holds nothing\" are different\n // answers, and a creation task depends on which one it got.\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No resource \\`${resourceType}\\` is registered in this application. Ask op=map for what is.` },\n });\n }\n res.json({ ...answeredWith, op: WorkspaceElementOperation.GET, resource });\n return;\n }\n\n if (operation === WorkspaceElementOperation.RELATED) {\n const hops = Number(req.query.hops ?? 1);\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.RELATED,\n ...relatedWorkspaceResources(index, resourceType, { hops: Number.isFinite(hops) ? hops : 1 }),\n });\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `Unknown op \\`${operation}\\`. One of: ${Object.values(WorkspaceElementOperation).join(', ')}.` },\n });\n } catch (error) {\n next(error);\n }\n }\n\n private async readCoherenceReport(_req: Request, res: Response, next: NextFunction) {\n try {\n const { report, markdown } = await this.playbookRunService.buildCoherenceReport();\n res.json({ ...report, markdown });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/loop` — chain playbooks unattended.\n *\n * `maximumIterations` is required and bounded: an unattended loop over a developer's source tree must\n * have a ceiling the CALLER chose, not one this handler picked on their behalf.\n */\n private async runPlaybookLoop(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const goal = typeof body.goal === 'string' && body.goal.trim().length > 0 ? body.goal.trim() : null;\n if (!goal) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`goal` is required and must be a non-empty string.' },\n });\n }\n const maximumIterations = Number(body.maximumIterations);\n if (!Number.isSafeInteger(maximumIterations) || maximumIterations < 1 || maximumIterations > 20) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`maximumIterations` is required and must be an integer between 1 and 20.' },\n });\n }\n const fanOut = body.fanOut === undefined ? undefined : Number(body.fanOut);\n if (fanOut !== undefined && (!Number.isSafeInteger(fanOut) || fanOut < 1 || fanOut > 5)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`fanOut` (lanes per iteration) must be an integer between 1 and 5 when provided.' },\n });\n }\n const result = await this.playbookRunService.runPlaybookLoop({\n goal,\n maximumIterations,\n ...(fanOut !== undefined ? { maximumLanesPerIteration: fanOut } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json({\n stoppedBecause: result.stoppedBecause,\n steps: result.steps,\n accepted: false,\n note: 'Any files written are working edits. Review `git status` and commit to accept them. '\n + 'Each iteration may run several output-disjoint lanes concurrently; every lane records its own revertible run.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n // 409: the caller is authorized and the payload is valid; the current STATE forbids a second run.\n // Caught on the BASE: a loop iteration can select a composite, so this route can be refused by\n // the choreography's single-flight guard as well as by the loop's own.\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * Read `elicitationAnswers` off an untrusted body without inventing anything.\n *\n * Shape only — whether the answers MATCH the playbook's declared questions is the runtime's contract to\n * enforce, and duplicating that check here would create a second description of the interview.\n */\n\n /**\n * The operator-facing sentence for a DISPATCH run.\n *\n * Extracted because the two call sites had drifted into two half-true copies, and a LIVE dry run\n * caught both: the note claimed \"Application CODE was written in the workspace\" on a run that\n * wrote nothing, and said \"to the coding agent\" for a task whose targetKind was\n * COMPANION_GENERATION_STEP -- which the COMPANION executes, not a coding agent. The dispatch\n * service routes by the task's own target kind and serves BOTH executors, so the message must read\n * it rather than assume one.\n *\n * No unit test caught either: they assert the service RESULT, and this is the controller's prose.\n */\n /**\n * What a `top_down.expert-personas` run did (#572), as a sentence — derived/waiting/refused counts and where\n * the charters went. The persona accept step writes with the filesystem, not the write register, so no\n * `POST /runs/writes/{runId}/revert` is offered: the remedy for a charter you do not want is `git`.\n */\n private describeStaffingOutcome(result: {\n readonly dryRun?: true;\n readonly roster: readonly unknown[];\n readonly alreadyCommitted: readonly string[];\n readonly derived: ReadonlyArray<{ readonly roleRef: string }>;\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n }): string {\n if (result.dryRun === true) {\n return `Dry run: the roster of ${result.roster.length} convened role(s) was computed and NOTHING was derived or written.`;\n }\n const parts = [\n `${result.derived.length} charter(s) derived and accepted into specifications/src/personas/ (${result.derived.map((entry) => entry.roleRef).join(', ') || 'none'})`,\n `${result.alreadyCommitted.length} already committed and left alone`,\n ];\n if (result.waiting.length > 0) {\n parts.push(`${result.waiting.length} waiting on families not yet landed (${result.waiting.map((entry) => `${entry.roleRef}: ${entry.missingFamilies.join('+')}`).join('; ')}) — re-run once they land`);\n }\n if (result.refused.length > 0) {\n parts.push(`${result.refused.length} refused (${result.refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; ')})`);\n }\n return `Staffed the expert panels: ${parts.join('; ')}. Review \\`git status\\` and commit to accept the charters; nothing here goes through the write register.`;\n }\n\n private describeDispatchOutcome(result: {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly remainingReadyTaskRefs: readonly string[];\n readonly dryRun?: true;\n } | { readonly wave: ApplicationBuildWaveResult }): string {\n if ('wave' in result) {\n // A parallel wave (#1528): what ran, how it settled, and what the end-of-wave repair committed.\n const { wave } = result;\n const settled = wave.outcomes.filter((outcome) => outcome !== null);\n const completed = settled.filter((outcome) => outcome!.status === FlowsActors_Status.COMPLETED).length;\n const reconciled = wave.reconciliation.filter((entry) => entry.committedPaths > 0).length;\n return `Ran a parallel build wave at degree ${wave.degree}: ${wave.dispatched.length} task(s) dispatched, `\n + `${completed} of ${settled.length} coding run(s) completed, ${reconciled} reconciled at the end of the wave. `\n + `It stopped taking tasks because: ${wave.stoppedFillingBecause}. Each run's row carries \\`concurrency\\` and \\`interferenceSuspected\\`.`;\n }\n const executor = result.targetKind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n ? \"the companion's own generation pipeline\"\n : 'the coding agent';\n const remainder = `${result.remainingReadyTaskRefs.length} further task(s) were ready and were NOT run: dispatch is single-flight, one task per run.`;\n if (result.dryRun === true) {\n return `Dry run: the next ready build task is \\`${result.taskRef}\\`, which would run on ${executor}. NOTHING was dispatched and nothing was written. ${remainder}`;\n }\n return `Dispatched build task \\`${result.taskRef}\\` to ${executor}. Work landed in the application WORKSPACE -- not the specifications package -- so review \\`git status\\` there and commit to accept it. ${remainder}`;\n }\n\n private readElicitationAnswers(value: unknown): readonly PlaybookElicitationAnswer[] | undefined {\n if (value === undefined || value === null) return undefined;\n if (!Array.isArray(value)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`elicitationAnswers` must be an array of { questionRef, answer }.' },\n });\n }\n return value.map((entry: unknown, index: number) => {\n const shaped = entry as { questionRef?: unknown; answer?: unknown } | null;\n if (typeof shaped?.questionRef !== 'string' || typeof shaped.answer !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `elicitationAnswers[${index}] must be { questionRef: string, answer: string }.` },\n });\n }\n return { questionRef: shaped.questionRef, answer: shaped.answer };\n });\n }\n\n /**\n * `GET /build/next` — what the next coding run would be.\n *\n * A read, deliberately separate from the action rather than a flag on it. Seeing the scope before\n * starting a run is genuinely useful; making the run itself demand a second \"yes\" is a ceremony that\n * enforces nothing the mutation scope, the lock and the change-set capture do not already enforce.\n */\n private async describeNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * SPREAD, so `plan` stays exactly where every existing reader already looks. There are THREE\n * answers, all 200: a `plan`; `plan: null` with `exhausted` (every task landed); and `plan: null`\n * with `stuckQueue` and a non-empty `stuckTasks` (every ready task is stuck, #1451 — this was a\n * 400 before). So `plan: null` alone does NOT mean finished; read `exhausted`. `stuckTasks` is\n * present beside a plan too, naming what the selection passed over.\n */\n const description = await this.buildDispatchService.describeNextBuildTaskOrExhaustion();\n res.json({ ...description, dispatched: false });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `GET /build/dispatches` — how far each recent dispatch got (`Workbench_BuildDispatchPhase`).\n *\n * EVERY dispatch, since #1274: the workbench fires through the `dispatch_next` resource operation\n * rather than through this route's `async` door, and the record used to be kept only by the latter.\n *\n * Not an outcome for a coding task: that dispatch settles at ADMITTED, and the run's result is the durable\n * actor-task row the record names (`codingTaskId`).\n */\n private async readBuildDispatches(_req: Request, res: Response, next: NextFunction) {\n try {\n // Read from the actor plane since #1359, so the narrative survives a companion restart.\n res.json({ dispatches: await this.buildDispatchService.readDetachedDispatches(this.getTraceSession(res)) });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /build/tasks` — every build-plan task in ONE read (#1521): its attempts newest first, the typed\n * reason dispatch passes over it, and for a task that ran without landing, exactly what each unmet\n * probe searched for and whether the working tree holds it. Composed from rows that already exist and\n * stored nowhere. `{ records: null }` when the application has no build plan — absence, not an empty\n * build.\n */\n private async readBuildTaskRecords(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ records: (await this.buildDispatchService.describeBuildTaskRecords(this.getTraceSession(res))) ?? null });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/rearm` — the door the \"completed but not landed\" guard was missing\n * (#1535). Records a re-arm on every completed run that still holds the task, so the next dispatch\n * offers it again. Refuses with 409, naming why, when there is nothing to re-arm.\n */\n private async rearmBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionRearmBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a re-arm request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const taskRef = String(req.params.taskRef);\n res.json(await this.buildDispatchService.rearmBuildTask(taskRef, parsed.data, this.getTraceSession(res)));\n } catch (error) {\n if (error instanceof NothingToRearmError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/dispatch-next` — run the next ready build-plan coding task.\n *\n * It runs. The boundary is the task's own `target.kind`, one workspace-mutating run is admitted at a\n * time, the change-set is captured around it, and the required checks gate the result. Under the\n * autonomy posture a working result is then committed by the loop, authored as the companion; under\n * GUIDED nothing is accepted until a person commits (#1534).\n */\n private async dispatchNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n // DETACHED mode: a generation step can outlive any reasonable HTTP ceiling (an i18n run\n // measured 40+ minutes against the 30-minute server cap, 2026-09-04), and a response that\n // dies with the socket leaves the operator blind. 202 + the selected plan now. A generation step's\n // outcome is readable at GET /build/dispatches; a coding task settles there at ADMITTED, and its\n // outcome is the durable actor-task row the record names.\n if (body.async === true) {\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res));\n res.status(202).json({ plan, dispatched: true, async: true, note: 'Running detached. GET /build/dispatches shows how far it got: a companion generation step reaches FINISHED there; a coding task reaches ADMITTED with a codingTaskId, and its outcome is that actor-task row (GET /coding-agent/status while it runs).' });\n return;\n }\n const result = await this.buildDispatchService.dispatchNextBuildTask(\n this.getTraceSession(res),\n );\n res.json({\n plan: result.plan,\n dispatched: true,\n ...(result.admission ? { admission: result.admission } : {}),\n ...(result.generationStep ? { generationStep: result.generationStep } : {}),\n note: result.generationStep\n ? 'The companion ran this generation step itself. Review `git status` and commit what you accept.'\n : 'A coding agent is running. Its change-set is captured; review `git status` and commit what you accept.',\n });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /** `GET /runs/writes` — the write register, newest first. Pre-images stay in the records; the listing is a summary. */\n private async judgePlaybookArtifacts(req: Request, res: Response, next: NextFunction) {\n try {\n const { playbookRef } = req.params;\n const body = req.body || {};\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n if (!Array.isArray(body.artifacts) || body.artifacts.length === 0\n || body.artifacts.some((entry: unknown) => typeof (entry as { family?: unknown })?.family !== 'string')) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`artifacts` must be a non-empty array of { family, value }.' },\n });\n }\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const result = await this.playbookRunService.judgeArtifacts({\n playbookRef,\n artifacts: body.artifacts,\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(result);\n } catch (error) {\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n private async listRunWrites(_req: Request, res: Response, next: NextFunction) {\n try {\n const records = await this.runWriteRegister.list();\n res.json({\n runs: records.map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n files: record.files.map((file) => ({ path: file.path, existedBefore: file.existedBefore })),\n })),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes/:runId/diff` — what one run changed, per file (#1274).\n *\n * A GET, so the board reaches it without the companion token: a browser bundle cannot read the\n * 0600 `companion.token`, and this is a pure read — nothing is locked, written or reverted.\n *\n * It sits beside the revert door on purpose. The board could already UNDO a run and could not SHOW\n * it, which is the wrong way round: the doctrine printed at the top of every board screen is that\n * acceptance is your own git commit, and a commit decision with nothing to inspect is not one.\n */\n private async readRunWritesDiff(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n this.jsonSuccess(res, await this.runWriteRegister.describeRunDiff(runId));\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /** `POST /runs/writes/:runId/revert` — restore one run's pre-images. Refuses human-edited files unless `force`. */\n private async revertRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const force = (req.body || {}).force === true;\n const outcome = await this.runWriteRegister.revert(runId, { force });\n res.json({\n ...outcome,\n note: outcome.refusedDiverged.length > 0\n ? 'Some files were edited after the run and were NOT reverted; pass force:true to revert them anyway.'\n : 'All of this run\\'s writes were reverted.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunWriteRecordNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * A missing or exhausted build plan is a bad request, not a broken host.\n *\n * Shared by the two BUILD routes and by the playbook run route, which reaches the same dispatch\n * through a playbook declaring `executor: CODING_AGENT` (#119). Falls through to `next(error)` for\n * anything else, so it is safe to call as the last arm of a catch.\n */\n private forwardBuildDispatchError(error: unknown, next: NextFunction): void {\n if (error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n || error instanceof ApplicationBuildTaskNotACodingTaskError\n /*\n * The one that carries the AGENT'S QUESTION. Absent from this list, every ready task being\n * parked answered a sanitized 500 \"internal\" — the operator was told nothing, about a state\n * whose entire remedy is reading what was asked and answering it.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof ApplicationBuildUnknownGenerationStepError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /** `GET /traces` — recent execution sessions, newest first. */\n private async listExecutionTraces(req: Request, res: Response, next: NextFunction) {\n try {\n const limit = Number(req.query.limit);\n const sessions = await this.executionTraceReadService.listSessions(\n Number.isSafeInteger(limit) && limit > 0 && limit <= 200 ? limit : undefined,\n );\n res.json({ sessions });\n } catch (error) { next(error); }\n }\n\n /**\n * `GET /traces/:sessionId` — one run, in order.\n *\n * Events carry what happened and why; artifacts are LISTED rather than inlined, because one model answer\n * can be tens of kilobytes and a session can hold several. Fetch a body when you want it.\n */\n private async readExecutionTrace(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.readSession(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /traces/:sessionId/usage` — what one session spent, in tokens (#1274).\n *\n * Derived, not stored: the agent-call trace sink already writes each call's usage into this\n * session's events, so nothing new is recorded to answer this. Tokens only — a currency figure\n * would need a per-model rate card this repository does not have, and a fabricated number where an\n * operator expects a measured one is the failure this board exists to avoid.\n */\n private async readExecutionTraceUsage(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.summarizeSessionUsage(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** `GET /traces/:sessionId/steps/:stepDirName/artifacts/:fileName` — one artifact body, verbatim. */\n private async readExecutionTraceArtifact(req: Request, res: Response, next: NextFunction) {\n try {\n const body = await this.executionTraceReadService.readArtifact(\n String(req.params.sessionId), String(req.params.stepDirName), String(req.params.fileName),\n );\n res.type('text/plain').send(body);\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /trace-aliases/actor-task/:taskId` — the trace sessions a coding run recorded into, latest first.\n *\n * Empty for a task the coding lane never ran: that is the ordinary case, not a failure, so it\n * answers `200 { sessionIds: [] }` rather than refusing.\n */\n private async listActorTaskTraceSessions(req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ sessionIds: await this.executionTraceReadService.listActorTaskSessionIds(String(req.params.taskId)) });\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** A missing trace is a bad request, not a broken host. */\n private forwardExecutionTraceError(error: unknown, next: NextFunction): void {\n if (error instanceof ExecutionTraceNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /**\n * The creation board's explicit Refresh (bridge window, `workbench-creation-board-resources.md`\n * Phase 2): drops EVERY derived board the projection caches, not only eligibility. Answers\n * `{invalidated: true}` at once rather than recomputing inline. For boards a workbench tab is\n * watching, the projection's publication pass re-derives them about 250 ms later in the background\n * and publishes whichever moved; an unwatched board is recomputed by the next read that wants it.\n */\n private async refreshPlaybookBoard(_req: Request, res: Response, next: NextFunction) {\n try {\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json({ invalidated: true });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks/:playbookRef/decision` — what this playbook asks a person, before it runs.\n *\n * Answers `{ decision: null }` for a playbook with no interview, so a caller may ask\n * unconditionally rather than first deciding from `requiresElicitation` whether the question is\n * worth asking.\n */\n private async readPlaybookElicitationDecision(req: Request, res: Response, next: NextFunction) {\n try {\n const decision = await this.playbookRunService.readPlaybookElicitationDecision(String(req.params['playbookRef']));\n res.json({ decision });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks` — the eligibility board.\n *\n * Deterministic: it reads the working tree and answers what can run now. This is the gate a model\n * may choose WITHIN and can never widen. It writes nothing, but it is not free of effects — a read\n * that finds the projection's inputs moved drops its caches, which schedules a publication pass to\n * the workbench (see below).\n *\n * Served from the creation-plane projection's CACHED board (#1310 item 5), the same derivation the\n * workbench's playbook list reads. It used to call the playbook service directly — no cache, no\n * single-flight — and measured 22–134 s per call, so a script polling it stacked full derivations\n * behind each other.\n *\n * The resource lane may lag an out-of-process edit by up to one 15 s sweep; this door does not. It\n * re-checks the input signature before reading (one ~60-110 ms walk), and a moved input drops both\n * the cached board and any derivation still in flight from before the move — so an edit an agent\n * made a moment ago is what this read computes against.\n */\n private async listPlaybooks(_req: Request, res: Response, next: NextFunction) {\n try {\n const board = await this.creationPlaneProjection.readFreshPlaybookEligibilityBoard();\n /*\n * No board-level `phase`. It reported a derived APPLICATION phase that was deleted on\n * 2026-09-04 — an application is not in a mode of reasoning, it holds artifacts produced by\n * several. Each row still carries the PLAYBOOK's own phase label, which is the only one that\n * was ever true.\n */\n res.json({\n eligibleCount: board.playbooks.filter((entry) => entry.eligible).length,\n playbooks: board.playbooks,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/run` — run one compiled playbook and land its outputs.\n *\n * The response reports the FILES that appeared and how many attempts each family took. It reports no\n * acceptance, because none happened in the run: under the autonomy posture the companion commits these\n * writes before the next build baseline (authored as itself), and under GUIDED a person does (#1534).\n */\n private async runPlaybook(req: Request, res: Response, next: NextFunction) {\n try {\n const playbookRef = req.params.playbookRef;\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n const body = req.body || {};\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const dryRun = body.dryRun === true;\n const runInput = {\n playbookRef,\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(dryRun ? { dryRun: true } : {}),\n };\n /*\n * `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for\n * the run's life, and the server's 30-minute ceiling is shorter than a choreography's own\n * bound — the connection died at exactly 1800s twice while the run completed server-side. The\n * outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.\n */\n if (body.async === true) {\n res.status(202).json(await this.playbookRunService.submitPlaybookRunDetached(runInput));\n return;\n }\n const result = await this.playbookRunService.runPlaybook(runInput);\n if ('status' in result) {\n // 200, not an error status: the run is HEALTHY and waiting. The creator answers through\n // POST /playbooks/runs/:runId/resume, which is the industry three-action model\n // (accept / decline / cancel) at the transport.\n res.json({\n ...result,\n accepted: false,\n note: 'The derivation stopped at a decision only you can make. Answer with '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume — `\n + '{ \"action\": \"accept\", \"answers\": [{ \"ref\": \"...\", \"answer\": \"...\" }] }, '\n + 'or \"decline\" to have it choose and state its assumption, or \"cancel\" to abandon the run. '\n + `Carry the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token — `\n + 'resume is a mutating route and the token floor refuses it without one. '\n + 'Nothing has been generated or written.',\n });\n return;\n }\n if ('scenarios' in result) {\n // The composite foundation executor: no landed families — the deliverable is the composed\n // application itself (config mutation + module/resource slices in the working tree).\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: dryRun\n ? 'Dry run: the foundation plan was derived and NOTHING was written.'\n : 'The application was composed from the domain plan. Review `git status` and commit to accept it.',\n });\n return;\n }\n /*\n * The WHOLE result, not a hand-picked list of it.\n *\n * This branch used to name five fields — `playbookRef`, `landed`, `generation`, `judge`,\n * `runId` — while the service returned ten, so `diagrams`, `decisions`, `reviewGuide`, `wired`\n * and `wiringSkipped` were computed on every run and dropped at the last hop. A creator never\n * saw which pictures were written, which decisions were recorded, what the playbook says a good\n * result is, or which families were deliberately not wired. Found by the first live run\n * (2026-08-28), not by any test: the service tests assert the service's return value, and\n * nothing asserted what the HTTP layer forwards.\n *\n * The service already returns the SLIM shape — pre-images and rendered bytes stay in the write\n * register — so spreading it is safe, and it is what both sibling branches above already do. A\n * hand-picked list is a second description of the response that silently drifts from the first\n * every time the service grows a field.\n */\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: 'assessed' in result\n ? 'Assessed — this playbook produces no artifact. Nothing was generated or written; the verdict and the review guide are above.'\n /*\n * A DISPATCH run wrote application CODE in the workspace, not a specification. The generic\n * note below would be false twice over: it names the wrong tree, and it offers a write-register\n * revert (`POST /runs/writes/{runId}/revert`) that has no record for this run — a remedy an\n * operator would try and find missing at the moment they need it.\n */\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n /*\n * A STAFFING run (#572) wrote charter modules through the persona accept step, not through the\n * write register — so the generic note's revert offer would point at a record that does not exist.\n */\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n : dryRun\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n : 'Files were written to the specifications package. Review `git status` and commit to accept them — or revert this run via POST /runs/writes/{runId}/revert.',\n });\n } catch (error) {\n /*\n * A SECOND composite, refused. 409 and not 500: the caller is authorized, the payload is valid,\n * and it is the companion's current STATE that forbids the run — the same answer the loop route\n * has always given, which this route needed the day `runChoreography` started refusing. Without\n * it a creator launching a second market analysis would get \"internal\" and no way to learn that\n * their own earlier run is what is in the way; the message names its ref and start time.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n // Refusals a creator must be able to READ, rather than a sanitized 500.\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookNotReadyError || error instanceof PlaybookElicitationError || error instanceof FoundationExecutionError) {\n // Readiness and a malformed interview are both bad requests: the caller must change what they sent\n // (supply the answers, or produce the missing input first). Neither has a \"proceed anyway\".\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A run whose model could not produce a valid family within its attempts. Its message names the family,\n * the attempt count and the LAST REJECTION — everything a creator needs to decide what to change.\n * It fell to `next(error)` and reached the caller as the bare token `validation`, measured 2026-09-13\n * on Wonder CRM's first compliance-conception run: the reason existed only in the trace.\n */\n if (error instanceof PlaybookGenerationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A DISPATCH refusal reaches here now, and it did not before.\n *\n * Wiring `executor: CODING_AGENT` to the build dispatch (#119) made this route a third caller\n * of `dispatchNextBuildTask`, whose refusals — an exhausted plan, a missing plan, an unknown\n * generation step — are bad requests carrying an actionable message. They were translated for\n * the two BUILD routes only, so through this one they fell to `next(error)` and reached the\n * creator as a sanitized 500 saying \"internal\".\n *\n * That is reachable today rather than hypothetically: a build plan whose tasks have all landed\n * throws `ApplicationBuildPlanExhaustedError`, and \"the build is finished\" is precisely the\n * state a creator running the playbook is most likely to be in.\n */\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /playbooks/runs/:runId/resume` — the creator's half of a mid-run clarification.\n *\n * Body: `{ action: 'accept' | 'decline' | 'cancel', answers?: [{ ref, answer }] }`. The vocabulary\n * is MCP elicitation's, because a creator answering a derivation's question is the same interaction\n * an MCP client mediates, and inventing a fourth verb for it would only make the two harder to\n * bridge later.\n */\n private async resumePlaybookRun(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const body = req.body || {};\n const rawAction = typeof body.action === 'string' ? body.action : PlaybookClarificationAction.ACCEPT;\n const action = Object.values(PlaybookClarificationAction).find((candidate) => candidate === rawAction);\n if (!action) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: `Unknown action \\`${rawAction}\\`. Expected one of: ${Object.values(PlaybookClarificationAction).join(', ')}.`,\n },\n });\n }\n if (body.answers !== undefined && (!Array.isArray(body.answers) || body.answers.some((entry: unknown) =>\n typeof entry !== 'object' || entry === null || typeof (entry as { ref?: unknown }).ref !== 'string'\n || typeof (entry as { answer?: unknown }).answer !== 'string'))) {\n throw new PlaybookClarificationError('Every clarification answer must contain string ref and answer fields.');\n }\n const answers: { ref: string; answer: string }[] = body.answers ?? [];\n if (action === PlaybookClarificationAction.ACCEPT && answers.length === 0) {\n // Refused rather than silently treated as a decline: \"I answered\" and \"you decide\" lead to\n // different artifacts, and a dropped answer would be invisible in both.\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Action `accept` requires at least one `{ ref, answer }` in `answers`. Use `decline` to have the derivation choose and state its assumption.' },\n });\n }\n const result = await this.playbookRunService.resumePlaybookRun({\n runId,\n action,\n ...(answers.length > 0 ? { answers } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n if ('status' in result && result.status === 'cancelled') {\n res.json({ ...result, note: 'The run was abandoned. Nothing was generated and nothing was written.' });\n return;\n }\n if ('status' in result) {\n res.json({\n ...result,\n accepted: false,\n note: 'Still waiting: the derivation has further questions. Answer them at '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume, `\n + `carrying the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token.`,\n });\n return;\n }\n if ('scenarios' in result) {\n res.json({ ...result, accepted: false, note: 'The application was composed. Review `git status` and commit to accept it.' });\n return;\n }\n // The whole result, for the same reason the run handler forwards it whole: a hand-picked\n // list is a second description of the response that drifts every time the service grows a\n // field. This branch had the same five-of-ten omission and nobody had noticed it either.\n res.json({\n ...result,\n accepted: false,\n note: 'assessed' in result\n ? 'Assessed — nothing was generated or written; the verdict and the review guide are above.'\n // Same correction as the run handler: a dispatch wrote CODE in the workspace, not a specification.\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n /*\n * A dry run stays a dry run after its answer: the checkpoint carries `dryRun`, and the\n * resumed result reports it. The run handler above says so; this branch did not, so an\n * answered dry run told the operator files were written when none were (2026-09-24).\n */\n : 'dryRun' in result && result.dryRun === true\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n if (error instanceof SuspendedPlaybookRunNotFoundError || error instanceof PlaybookClarificationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n private async marketGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const {\n templateRef,\n icpRef,\n featureRef,\n benefitRef,\n channelRef,\n objectionRef,\n outputLanguage,\n } = body;\n\n if (!templateRef || typeof templateRef !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`templateRef` is required and must be a non-empty string.' },\n },\n );\n }\n\n const optionalString = (key: string, value: unknown): string | undefined => {\n if (value === undefined || value === null) return undefined;\n if (typeof value !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${key}\\` must be a string when provided.` },\n },\n );\n }\n return value.length > 0 ? value : undefined;\n };\n\n // Thread the request session + a dedicated agent step into the LLM call so\n // the engine AgentCallTraceSink records the prompt/output/usage for this\n // market generation — the same observability every companion LLM\n // call gets. Best-effort: undefined when tracing is off (sink no-ops).\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', `market-generation-${templateRef}`);\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'market-generation-generate',\n attributes: { templateRef },\n }\n : undefined;\n\n const result = await this.marketGenerationService.generate({\n templateRef,\n icpRef: optionalString('icpRef', icpRef),\n featureRef: optionalString('featureRef', featureRef),\n benefitRef: optionalString('benefitRef', benefitRef),\n channelRef: optionalString('channelRef', channelRef),\n objectionRef: optionalString('objectionRef', objectionRef),\n outputLanguage: optionalString('outputLanguage', outputLanguage),\n }, traceContext);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/generate-logo` — generate the application logo\n * from the authored `BrandSnapshot`. Thin: `LogoGenerationCompanionService`\n * owns the flow (introspect `brand-render-prompt` → invoke the image agent →\n * persist the master + manifest). Body: optional `{ forceRegenerate }`.\n */\n private async brandGenerateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const forceRegenerate = (req.body || {}).forceRegenerate === true;\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-generation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-generation-generate',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoGenerationService.generate({ forceRegenerate }, traceContext);\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/deliberate-logo` — full logo DELIBERATION\n * (agentic deliberation system, Step 4): the art-director expert authors the\n * creative brief (N app-derived concept directions), one candidate generates\n * per direction, the expert panel (art-director + design-system-guardian +\n * brand-strategist) deliberates with regeneration-as-revision, and the winner\n * is staged as the single-candidate manifest the EXISTING\n * `POST /brand/accept-logo` review point promotes. Thin:\n * `LogoDeliberationCompanionService` owns the flow.\n *\n * Body (all optional): `{ directionCount?: number, roundBudget?: number,\n * shortlistSize?: number }` — positive integers; service defaults 4 / 2 / 1.\n */\n private async brandDeliberateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { directionCount, roundBudget, shortlistSize } = body;\n\n for (const [name, value] of Object.entries({ directionCount, roundBudget, shortlistSize })) {\n if (value !== undefined && (typeof value !== 'number' || !Number.isInteger(value) || value < 1)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${name}\\` must be a positive integer when provided.` },\n });\n }\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-deliberation',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoDeliberationService.run(\n {\n ...(typeof directionCount === 'number' ? { directionCount } : {}),\n ...(typeof roundBudget === 'number' ? { roundBudget } : {}),\n ...(typeof shortlistSize === 'number' ? { shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/derive` — derive an app-specific\n * expert-persona charter PROPOSAL (agentic deliberation system). Thin:\n * `ExpertPersonaCompanionService.derive` owns the flow (resolve shaping\n * inputs via introspection → invoke the derivation agent → stage the\n * proposal). Body: `{ roleRef: string }`. Every call derives; there is no\n * freshness cache to bypass.\n */\n private async expertPersonaDerive(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'expert-persona-derive');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'expert-persona-derive',\n attributes: {},\n }\n : undefined;\n\n const result = await this.expertPersonaService.derive(\n { roleRef },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/accept` — promote a STAGED charter\n * proposal into the committed SSOT (`specifications/src/personas/`). Thin:\n * `ExpertPersonaCompanionService.accept` owns the flow (human-edit\n * overwrite guard → fail-closed set validation → write generated charter\n * module + regenerate the aggregator). Body: `{ roleRef: string }`.\n */\n private async expertPersonaAccept(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n const result = await this.expertPersonaService.accept({ roleRef });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/deliberations/run` — run a charter-built expert-panel\n * deliberation over TEXT candidates (agentic deliberation system, Step 3).\n * Thin: `DeliberationCompanionService.run` composes the plan (narrowness\n * fail-closed, committed charters only) and the engine\n * `ActorsSystemBackendService.executeDeliberation` orchestrates\n * (rubric -> review rounds -> shortlist revisions -> synthesis). Body:\n * `{ workDomain, briefContext, candidates: [{ref, text}], reviewerRoleRefs,\n * coordinatorRoleRef, rubricDeriverRoleRef?, roundBudget?, shortlistSize? }`.\n */\n private async deliberationRun(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { workDomain, briefContext, candidates, reviewerRoleRefs, coordinatorRoleRef } = body;\n const knownDomains = new Set<string>(Object.values(ExpertWorkDomain));\n if (typeof workDomain !== 'string' || !knownDomains.has(workDomain)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`workDomain\\` must be one of [${[...knownDomains].join(', ')}].` },\n });\n }\n if (typeof briefContext !== 'string' || briefContext.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`briefContext` must be a non-empty string.' },\n });\n }\n if (!Array.isArray(candidates) || candidates.some((candidate: unknown) => {\n const entry = candidate as { ref?: unknown; text?: unknown };\n return typeof entry?.ref !== 'string' || entry.ref.length === 0\n || typeof entry?.text !== 'string' || entry.text.length === 0;\n })) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`candidates` must be an array of `{ ref, text }` with non-empty strings.' },\n });\n }\n if (!Array.isArray(reviewerRoleRefs) || reviewerRoleRefs.some((role: unknown) => typeof role !== 'string')\n || typeof coordinatorRoleRef !== 'string' || coordinatorRoleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`reviewerRoleRefs` must be a string array and `coordinatorRoleRef` a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'deliberation-run');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'deliberation-run',\n attributes: {},\n }\n : undefined;\n\n const result = await this.deliberationService.run(\n {\n workDomain: workDomain as ExpertWorkDomain,\n briefContext,\n candidates,\n reviewerRoleRefs,\n coordinatorRoleRef,\n ...(typeof body.rubricDeriverRoleRef === 'string' ? { rubricDeriverRoleRef: body.rubricDeriverRoleRef } : {}),\n ...(typeof body.roundBudget === 'number' ? { roundBudget: body.roundBudget } : {}),\n ...(typeof body.shortlistSize === 'number' ? { shortlistSize: body.shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/accept-logo` — the ACCEPT review point of the\n * brand/logo workflow. Thin: `BrandAcceptCompanionService` owns the flow\n * (read staged candidate → optionally run the `brand.logo.judge.agent`\n * review → promote the accepted candidate into the specification SSOT:\n * copy files into `specifications/src/brand/assets/` + rewrite\n * `resolved-assets.generated.ts`).\n *\n * Body (all optional): `{ runJudge?, requireJudgeAcceptance? }`. The staged\n * single-candidate manifest is what gets accepted; the judge\n * runs by default and its verdict is advisory (the human accept POST is the\n * authority) unless `requireJudgeAcceptance` gates on it.\n */\n private async brandAcceptLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { runJudge, requireJudgeAcceptance } = body;\n\n if (runJudge !== undefined && typeof runJudge !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runJudge` must be a boolean when provided.' },\n });\n }\n if (requireJudgeAcceptance !== undefined && typeof requireJudgeAcceptance !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`requireJudgeAcceptance` must be a boolean when provided.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-accept');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-accept-judge',\n attributes: {},\n }\n : undefined;\n\n const result = await this.brandAcceptService.accept(\n {\n ...(typeof runJudge === 'boolean' ? { runJudge } : {}),\n ...(typeof requireJudgeAcceptance === 'boolean' ? { requireJudgeAcceptance } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/generate-openapi` — on-demand\n * OpenAPI generation for the SaaS app. Returns the\n * `{ documents, stats, metadata }` shape produced by\n * {@link TechnicalDocCompanionService.generateOpenApiDocuments}\n * verbatim. The route deliberately accepts no request body\n * today: every input (`appSlug`, `appDisplayName`,\n * `publicMarketingTitle`, operations) is derived from the\n * loaded `WildoSaasConfig` + the `'openapi-generation-input'`\n * subprocess introspection. A future CLI flag (per-section\n * filter, custom version override) will plug in here as\n * optional body fields without breaking this no-body contract.\n */\n private async technicalDocGenerateOpenApi(req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.generateOpenApiDocuments();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async technicalDocPublishOpenApi(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.publishOpenApiReference());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/derive-bundles` — the trigger for the\n * source-based derivation introduced by decision **D14**.\n *\n * Until this route existed, `deriveApplicationDocumentationBundles` had NO\n * caller outside its own tests, so the whole D14 evidence path — the\n * environment evidence snapshot, the applicability gates and the two\n * authorized bundles — could only ever be verified behaviourally. That is why\n * the route earns its place despite duplicating no logic: it is the seam that\n * makes the decision observable on a running companion.\n *\n * **Read-only by construction.** It derives and returns; it writes nothing and\n * publishes nothing. The Phase 2A publication path\n * `backendServiceKey` is resolved the same way every other companion behavior\n * resolves it ({@link pickResourcesRegistryCarrierServiceKey}) rather than\n * accepted from the caller, so a request cannot name a service the application\n * does not declare. The derivation publishes framework-owned topics only; it\n * does not interpret application resource, workflow, or editorial declarations.\n */\n private async technicalDocDeriveBundles(_req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.deriveApplicationDocumentationBundles({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/publish-managed` — the operation that emits\n * `src/generated/consumer-documentation`, the generator-owned framework\n * documentation tree served by this application. Git owns history and rollback;\n * publication owns only validation and synchronization of the current bytes.\n *\n * Unlike `derive-bundles` this WRITES: it synchronizes a complete verified render into\n * one stable generated tree. It is exposed as its own route rather than folded into the\n * derivation for exactly that reason — a caller should never reach a publication by\n * asking for a read.\n *\n * `refuseProvisionalAssets` is the environment's call, so it is accepted per request\n * rather than defaulted here: a production run passes `true` and fails if any screenshot\n * is still a placeholder; development omits it and ships documentation ahead of its\n * pictures.\n */\n private async technicalDocPublishManaged(req: Request, res: Response, next: NextFunction) {\n try {\n const { refuseProvisionalAssets } = req.body || {};\n const result = await this.technicalDocService.publishManagedDocumentation({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n ...(refuseProvisionalAssets === undefined ? {} : { refuseProvisionalAssets: refuseProvisionalAssets === true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ── Module Registry handlers ───────────────────────────────────────────\n //\n // Phase 2 wires the route shape only — every handler returns a\n // `RegistryRouteResultSchema`-shaped envelope with `ok: false` and\n // a `message` pointing at the deferred phase. The CLI client\n // (`RegistryCompanionClient.{install,update,remove,publish}`)\n // parses the response uniformly, so the 501-equivalent UX is\n // surfaced as a regular error rather than an HTTP 501 the parser\n // chokes on. Phase 5 fills out install/update/remove with real\n // ts-morph + fs work; Phase 6 fills out publish.\n\n private async registryInstallNotImplemented(req: Request, res: Response) {\n this.jsonSuccess(res, {\n ok: false,\n filesTouched: [],\n message:\n 'Module-registry install is a Phase 5 deliverable. The route shape is wired; the AST + filesystem work lands when Phase 5 ships.',\n });\n }\n\n private async registryUpdateNotImplemented(req: Request, res: Response) {\n this.jsonSuccess(res, {\n ok: false,\n filesTouched: [],\n message: 'Module-registry update is a Phase 5 deliverable.',\n });\n }\n\n private async registryRemoveNotImplemented(req: Request, res: Response) {\n this.jsonSuccess(res, {\n ok: false,\n filesTouched: [],\n message: 'Module-registry remove is a Phase 5 deliverable.',\n });\n }\n\n private async registryPublishNotImplemented(req: Request, res: Response) {\n this.jsonSuccess(res, {\n ok: false,\n filesTouched: [],\n message: 'Module-registry publish is a Phase 6 deliverable.',\n });\n }\n}\n\nexport default CompanionController;\n"]}
1
+ {"version":3,"file":"companion.controller.js","sourceRoot":"","sources":["../../../../../src/companion-api/controllers/companion.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EACL,gCAAgC,EAChC,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAA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uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,YAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,YAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;IACpD,YAAA,MAAM,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAA;IACjD,YAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,YAAA,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,YAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,YAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,YAAA,MAAM,CAAC,uBAAuB,CAAC,2BAA2B,CAAC,CAAA;IAC3D,YAAA,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;qCA/Bb,aAAa;QACM,0BAA0B;QAC1B,mBAAmB,UAGkB,gCAAgC;QACtB,qCAAqC;QAC9C,wCAAwC;QAC/B,qCAAqC;QAE7F,2CAA2C;QACH,6BAA6B;QACvB,gCAAgC;QAC1C,2BAA2B,YAEV,uCAAuC;QACzC,wCAAwC;QACzC,kCAAkC;QAC1C,8BAA8B;QAC1B,gCAAgC;QAC1C,2BAA2B;QACvB,6BAA6B;QAC/B,4BAA4B;QAC5B,4BAA4B;QACjB,6BAA6B;QAC5C,mCAAmC;QAC/B,4BAA4B;QACd,mCAAmC;QAC/B,qCAAqC;QAC7D,kCAAkC;QACZ,oCAAoC;QAC5C,gCAAgC;GAjC1H,mBAAmB,CAwwH/B;;AAED,eAAe,mBAAmB,CAAC","sourcesContent":["import { injectable, inject } from 'inversify';\nimport type { Request, Response, NextFunction } from 'express';\nimport {\n AbstractControllerBackendService,\n LoggerService,\n ErrorBuilderBackendService,\n ErrorHandlerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n CompanionActorTasksListQuerySchema,\n CompanionCreateActorTaskRequestSchema,\n CompanionCreateActorExecutionRequestSchema,\n CompanionLandGovernanceFactsRequestSchema,\n CompanionCreateFlowExecutionRequestSchema,\n CompanionExecutionsListQuerySchema,\n CompanionIntrospectionRequestSchema,\n CompanionRearmBuildTaskRequestSchema,\n CompanionUpdateActorTaskRequestSchema,\n type FileUpdateRequest,\n} from '../companion-api.schemas';\nimport {\n ErrorType,\n ErrorCustomMessageReference,\n AppFrontendType,\n computeChartRegistrationAlignment,\n ChartRegistrationBackendRefsProvenance,\n normalizeChartExecutionRef,\n type FrontendChartRegistrationRef,\n} from '@wildo-ai/saas-models';\nimport { loadBackendCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { DossierCompanionService } from '../../meta-workflows/services/dossier.companion.service';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport { LabellizeOrchestratorCompanionService } from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport { TranslateOrchestratorCompanionService } from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport { EmailTemplateLabellingUnitsCompanionService } from '../../i18n-labelling/services/email-template-labelling-units.companion.service';\nimport { EMAIL_TEMPLATE_LABELLING_BUCKET } from '../../i18n-labelling/models/email-template-labelling-unit.models';\nimport { EmailTemplateCompanionService } from '../../email/services/email-template.companion.service';\nimport { PlaybookRunAlreadyInFlightError, PlaybookNotReadyError, PlaybookRunCompanionService, PlaybookRunLandingConflictError, UnknownPlaybookError } from '../../meta-workflows/services/playbook-run.companion.service';\nimport { PlaybookInstanceCompanionService, PlaybookInstanceRefusedError, PlaybookInstanceTreeBusyError } from '../../meta-workflows/services/playbook-instance.companion.service';\nimport { CREATION_PLANE_IDENTITY_FIELDS, CreationPlaneProjectionCompanionService } from '../../core/introspection/resources/creation-plane-projection.companion.service';\nimport { buildCreationConsoleFeed, creationPlaneBehaviorForResourceType } from '../../core/introspection/resources/creation-console-projection.companion';\nimport {\n CreationConsoleRefusal,\n CreationConsoleRefusalKind,\n answerCreationConsoleQuestion,\n readCreationConsoleQuestions,\n type CreationConsolePorts,\n} from '../../core/introspection/resources/creation-console-answer.companion';\nimport { translateCreationPlaneDispatchError } from '../../core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service';\nimport {\n CreationConsole_AnswerRequest_Schema,\n WorkbenchCreationPlaneBehavior,\n Workbench_PlaybookRunOutcomeStatus,\n type CreationConsole_Feed,\n type CreationConsole_Pulse,\n type CreationConsole_PulseSummary,\n type CreationConsole_QuestionQueue,\n summarizeCreationConsoleFeed,\n type Workbench_CreationHomeLine,\n} from '@wildo-ai/platform-core-shared';\nimport { FoundationExecutionError } from '../../meta-workflows/services/foundation-executor.companion.service';\nimport { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { CompanionErrorGuidanceKey } from '../companion-error-guidance.models';\nimport { CompanionFileRouteRefusal, confineCompanionFilePath } from './companion-file-route-confinement';\nimport {\n ExecutionTraceNotFoundError,\n ExecutionTraceReadCompanionService,\n} from '../../meta-workflows/services/execution-trace-read.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildPlanUnavailableError,\n type ApplicationBuildWaveResult,\n} from '../../meta-workflows/services/application-build-dispatch.companion.service';\nimport { ApplicationBuildTaskNotACodingTaskError } from '../../meta-workflows/services/application-build-task-coding-policy.companion.service';\nimport { NothingToRearmError } from '../../meta-workflows/models/build-task-rearm.models';\nimport { ApplicationBuildUnknownGenerationStepError } from '../../meta-workflows/services/application-build-generation-step.companion.service';\nimport { PlaybookRunWriteRegisterCompanionService, PlaybookRunWriteRecordNotFoundError } from '../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport {\n composeGovernanceQuestionnaires,\n GovernanceQuestionnaireError,\n landGovernanceFactDeclarations,\n PlaybookElicitationError,\n PlaybookGenerationError,\n PlaybookClarificationError,\n type GovernanceFactDeclarationInput,\n type PlaybookElicitationAnswer,\n} from '@wildo-ai/application-creation-runtime';\nimport { MarketGenerationCompanionService } from '../../market/services/market-generation.companion.service';\nimport { LogoGenerationCompanionService } from '../../brand/services/logo-generation.companion.service';\nimport { LogoDeliberationCompanionService } from '../../brand/services/logo-deliberation.companion.service';\nimport { BrandAcceptCompanionService } from '../../brand/services/brand-accept.companion.service';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { ExpertWorkDomain, FlowsActors_Status } from '@wildo-ai/saas-models';\nimport { ApplicationPlaybookInstanceClosureKind, ApplicationSpecificationFamily, BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';\nimport { TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n WorkspaceElementKind,\n WorkspaceElementOperation,\n getWorkspaceResource,\n mapWorkspaceElements,\n relatedWorkspaceResources,\n} from '../../core/introspection/workspace-element-index.companion';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n ResearchAgentDispatchCompanionService,\n ResearchAgentUnavailableError,\n} from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { AcceptedChangeCommitCompanionService, DecisionRecordActor } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport {\n COMPANION_TOKEN_HEADER,\n CompanionAuthFloorCompanionService,\n} from '../../core/auth/companion-auth-floor.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityLevel, isTraceExemptProbe } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { companionRequestIsAdmittedByTokenFloor } from './companion-token-floor.policy';\nimport { COMPANION_TRACE_EXEMPT_GET_PATHS } from './companion-trace-exemptions';\nimport { SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME } from '../../core/specifications/specification-context-factory.models';\nimport { INTROSPECTION_INPUT_VALIDATION_ERROR_NAME } from '../../core/introspection/models/companion-introspection.models';\nimport { StructuredDataCatalogAuditService } from '../../core/catalogs/structured-data-catalog-audit.service';\nimport {\n assertCompanionAvailableLanguage,\n assertEmailTemplateTestSendSucceeded,\n parseCompanionTargetLocales,\n} from './companion-i18n-api-contract.utils';\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * Dev-companion HTTP surface mounted under {@link getCustomMountBasePath}\n * (`/api/companion`). Hosts labelling, email-template authoring, file\n * operations, persisted executions, meta/introspection, and market generation\n * routes.\n *\n * ── OD-4.a ─ `/api/companion/email-templates/*` routing contract ─────────────\n *\n * The `email-templates/*` route group (`generate`, `preview`, `test-send`,\n * `status`, `translate`) targets the **filesystem-based** template registry\n * exposed via {@link EmailTemplateCompanionService}, which delegates every\n * read through the in-memory `EmailTemplateRegistryBackendService`\n * (file: `engine/saas-backend-lib/src/notifications/email/services/email-template-registry.backend.service.ts`).\n *\n * It does NOT — and must never — reach for the deleted DB-backed\n * `EMAIL_TEMPLATES` core resource. That `CoreResourceType` member, its\n * resource-config, repository, registry wiring, presets, schemas, header /\n * footer sibling, and all event-triggered batch coupling were removed in\n * Steps 4 / 5 / 6 of the email-templates deprecation\n * (`.cursor/plans/email-templates-deprecate-db-backed.md`).\n *\n * The `/email-templates/*` path segment therefore reflects the **conceptual\n * surface** the operator interacts with — the developer-facing template\n * authoring flow — not a persistence layer. Renaming the routes would break\n * existing companion-frontend wiring and provides no semantic gain. The\n * filesystem-only contract is pinned by\n * `src/email/services/__tests__/email-template-preview.companion.service.test.ts`,\n * which fails fast if the preview path ever drifts back toward a DB-backed\n * lookup.\n */\n@injectable()\nexport class CompanionController extends AbstractControllerBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly labellingPlannerService: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellizeOrchestratorService: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly runWriteRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translateOrchestratorService: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateLabellingUnitsService)\n private readonly emailTemplateLabellingUnitsService: EmailTemplateLabellingUnitsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplateService: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.MarketGenerationService) private readonly marketGenerationService: MarketGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunService) private readonly playbookRunService: PlaybookRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossierService: DossierCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService) private readonly creationPlaneProjection: CreationPlaneProjectionCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatchService: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService) private readonly executionTraceReadService: ExecutionTraceReadCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoGenerationService) private readonly logoGenerationService: LogoGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberationService: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAcceptService: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonaService: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DeliberationService) private readonly deliberationService: DeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDocService: TechnicalDocCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executionsService: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceabilityService: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatchService: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchAgentDispatchService: ResearchAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AuthFloorService) private readonly authFloorService: CompanionAuthFloorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommitService: AcceptedChangeCommitCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookInstanceService) private readonly playbookInstanceService: PlaybookInstanceCompanionService,\n ) {\n super(logger, errorBuilder, errorHandler, 'CompanionController');\n }\n\n protected setupRoutes(): void {\n /*\n * The P-29b token floor, and it is registered FIRST on purpose — ahead of the trace middleware.\n *\n * An unauthorized caller must not be able to open a trace session: `attachRequestTraceSession`\n * allocates a session directory per non-exempt request, so gating after it would let anyone who\n * can reach the port spend disk and evict live sessions without ever passing a single handler.\n * Refuse first, then trace what was admitted.\n */\n this.router.use(this.enforceLocalTokenFloor.bind(this));\n\n this.router.use(this.attachRequestTraceSession.bind(this));\n\n // Health\n this.router.get('/', this.asyncHandler(this.health.bind(this)));\n this.logRouteRegistration('get', '/', 'Companion health');\n\n // ── Labelling (per-unit, lock-file-tracked) ────────────────────\n // The decentralized labelling pipeline:\n // 1. /labelling/plan → list units (components, resources, themes, …)\n // 2. /labelling/labellize → primary-language labels per unit\n // 3. /labelling/translate → per-unit per-locale translations\n //\n // There is intentionally no aggregate step. Per-unit files are the\n // runtime source of truth — apps load them via\n // `scanCustomLabelsDirectory` from `@wildo-ai/saas-backend-lib`,\n // which walks the per-unit tree at module load. Keeping things\n // separated is the contract.\n this.router.get('/labelling/plan', this.asyncHandler(this.labellingPlan.bind(this)));\n this.logRouteRegistration('get', '/labelling/plan', 'List planned labelling units');\n\n // The translate pipeline's email lane (#1908): translate-only units, one per email template. A\n // separate listing from `/labelling/plan` because that plan is what LABELLIZE iterates, and an\n // email's primary words are authored, never labellized.\n this.router.get('/labelling/email-template-units', this.asyncHandler(this.labellingEmailTemplateUnits.bind(this)));\n this.logRouteRegistration('get', '/labelling/email-template-units', 'List translate-only email template units');\n\n this.router.post('/labelling/labellize', this.asyncHandler(this.labellingLabellize.bind(this)));\n this.logRouteRegistration('post', '/labelling/labellize', 'Run per-unit labellize for primary locale');\n\n this.router.post('/labelling/translate', this.asyncHandler(this.labellingTranslate.bind(this)));\n this.logRouteRegistration('post', '/labelling/translate', 'Run per-unit per-locale translation');\n\n // ── Email templates ────────────────────────────────────────────\n // OD-4.a: every route in this block resolves through the\n // **filesystem-based** `EmailTemplateRegistryBackendService` via\n // `EmailTemplateCompanionService` — never through a DB repository for the\n // (deleted) `EMAIL_TEMPLATES` core resource. See the class JSDoc above.\n this.router.post('/email-templates/generate', this.asyncHandler(this.emailTemplatesGenerate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/generate', 'Generate email templates');\n\n this.router.post('/email-templates/preview', this.asyncHandler(this.emailTemplatesPreview.bind(this)));\n this.logRouteRegistration('post', '/email-templates/preview', 'Preview email template');\n\n this.router.post('/email-templates/test-send', this.asyncHandler(this.emailTemplatesTestSend.bind(this)));\n this.logRouteRegistration('post', '/email-templates/test-send', 'Send test email from template');\n\n this.router.get('/email-templates/status', this.asyncHandler(this.emailTemplatesStatus.bind(this)));\n this.logRouteRegistration('get', '/email-templates/status', 'Get email template filesystem status');\n\n this.router.post('/email-templates/translate', this.asyncHandler(this.emailTemplatesTranslate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/translate', 'Translate email templates');\n\n // ── File operations ────────────────────────────────────────────\n this.router.post('/files/update', this.asyncHandler(this.updateFiles.bind(this)));\n this.logRouteRegistration('post', '/files/update', 'Update files');\n\n this.router.get('/file', this.asyncHandler(this.getFile.bind(this)));\n this.logRouteRegistration('get', '/file', 'Get single file');\n\n this.router.get('/files/list', this.asyncHandler(this.listFiles.bind(this)));\n this.logRouteRegistration('get', '/files/list', 'List files in directory');\n\n // ── Persisted executions ────────────────────────────────────────\n this.router.post('/executions/actors', this.asyncHandler(this.createActorExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/actors', 'Persist actor execution');\n\n this.router.get('/executions/actors', this.asyncHandler(this.listActorExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/actors', 'List persisted actor executions');\n\n this.router.get('/executions/actors/:executionId', this.asyncHandler(this.getActorExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/actors/:executionId', 'Read persisted actor execution');\n\n this.router.post('/executions/flows', this.asyncHandler(this.createFlowExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/flows', 'Persist flow execution');\n\n this.router.get('/executions/flows', this.asyncHandler(this.listFlowExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/flows', 'List persisted flow executions');\n\n this.router.get('/executions/flows/:executionId', this.asyncHandler(this.getFlowExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/flows/:executionId', 'Read persisted flow execution');\n\n this.router.post('/tasks/actors', this.asyncHandler(this.createActorTask.bind(this)));\n this.logRouteRegistration('post', '/tasks/actors', 'Persist actor task');\n\n this.router.get('/tasks/actors', this.asyncHandler(this.listActorTasks.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors', 'List persisted actor tasks');\n\n this.router.get('/tasks/actors/:taskId', this.asyncHandler(this.getActorTask.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors/:taskId', 'Read persisted actor task');\n\n this.router.patch('/tasks/actors/:taskId', this.asyncHandler(this.updateActorTask.bind(this)));\n this.logRouteRegistration('patch', '/tasks/actors/:taskId', 'Update persisted actor task');\n\n // ── Meta / introspection ───────────────────────────────────────\n this.router.get('/_meta/resources-registry', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry', 'Get resources registry');\n\n this.router.get('/_meta/resources-registry/app/:appSlug', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry/app/:appSlug', 'Get resources registry for specific app');\n\n this.router.post('/_meta/introspect', this.asyncHandler(this.requestIntrospection.bind(this)));\n this.logRouteRegistration('post', '/_meta/introspect', 'Execute companion introspection behavior');\n\n this.router.get('/_meta/introspect/behaviors', this.asyncHandler(this.listIntrospectionBehaviors.bind(this)));\n this.logRouteRegistration('get', '/_meta/introspect/behaviors', 'List companion introspection behaviors (the live-context menu)');\n\n this.router.post('/charts/audit', this.asyncHandler(this.chartsAudit.bind(this)));\n this.logRouteRegistration('post', '/charts/audit', 'Audit chart registration alignment (frontend chartViews vs backend registry)');\n\n this.router.get('/_meta/website/structured-data-audit', this.asyncHandler(this.getWebsiteStructuredDataAudit.bind(this)));\n this.logRouteRegistration(\n 'get',\n '/_meta/website/structured-data-audit',\n 'Audit website structured-data emissions against the merged Schema.org catalog',\n );\n\n // ── Coding-agent status (typed Flows/Actors coding path) ───────\n // The raw POST /coding-agent/dispatch endpoint (caller-composed prompt)\n // was deleted at the first-activation hard cut: every coding run now\n // enters through the typed `runApplicationCodingTask` wrapper on the\n // episode runtime. The GET status probe stays open (read-only routes\n // keep the DD-6 posture).\n this.router.get('/coding-agent/status', this.asyncHandler(this.codingAgentStatus.bind(this)));\n this.router.post('/coding-agent/cancel', this.asyncHandler(this.codingAgentCancel.bind(this)));\n // Interactive lane: answer a parked question (resume the same session), and\n // stream a run's live frames. The respond door is a WRITE (it resumes a\n // workspace-mutating run); the events stream is read-only.\n this.router.post('/coding-agent/session/respond', this.asyncHandler(this.codingAgentRespond.bind(this)));\n this.router.get('/coding-agent/session/events', this.codingAgentSessionEvents.bind(this));\n this.logRouteRegistration(\n 'get',\n '/coding-agent/status',\n 'Coding-agent dispatch readiness (does NOT guarantee CLI binary presence or auth)',\n );\n this.logRouteRegistration('post', '/coding-agent/session/respond', 'Answer a parked coding task question and resume the same session');\n this.logRouteRegistration('get', '/coding-agent/session/events', 'Server-sent live frames for an active coding session (taskId query)');\n\n // ── Prompt (TODO) ──────────────────────────────────────────────\n this.router.post('/prompt', this.asyncHandler(this.buildPrompt.bind(this)));\n this.logRouteRegistration('post', '/prompt', 'Build prompt from template and context');\n\n // ── Playbooks (application-creation, P2) ─────────────────────────\n // One compiled Framework Knowledge playbook, run end to end: brief the model against each declared\n // family's own schema, then write the answers as specification FILES. It writes and stops. Acceptance\n // is a commit (`.claude/rules/one-source-of-truth.md`, rules 2 and 3), made by a person or — under the\n // autonomy posture — by the companion before the next build baseline, authored as itself (#1534).\n this.router.get('/build/next', this.asyncHandler(this.describeNextBuildTask.bind(this)));\n this.logRouteRegistration('get', '/build/next', 'What the next ready build-plan run would be (either executor) — read-only');\n this.router.post('/build/dispatch-next', this.asyncHandler(this.dispatchNextBuildTask.bind(this)));\n this.router.get('/build/dispatches', this.asyncHandler(this.readBuildDispatches.bind(this)));\n this.logRouteRegistration('get', '/build/dispatches', 'How far each recent detached build dispatch got (newest first) — a generation step finishes here; a coding run is admitted here and finishes in its actor-task row');\n this.logRouteRegistration('post', '/build/dispatch-next', 'Run the next ready build-plan task (coding agent or companion generation step)');\n this.router.get('/build/tasks', this.asyncHandler(this.readBuildTaskRecords.bind(this)));\n this.logRouteRegistration('get', '/build/tasks', 'Every build-plan task in one read: its attempts, why it has not landed, and what its unmet probes searched for (#1521)');\n this.router.post('/build/tasks/:taskRef/rearm', this.asyncHandler(this.rearmBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/rearm', 'Put a build task back in the queue after the reason it did not land was fixed, recording why on its completed runs (#1535)');\n /*\n * The console's build verbs (#1652): dispatch a NAMED task, and accept (commit) what a finished\n * coding or playbook run wrote. Both existed only as workbench operations, which need a signed-in\n * person; these call the same services, so the two doors cannot diverge.\n */\n this.router.post('/build/tasks/:taskRef/dispatch', this.asyncHandler(this.dispatchNamedBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/dispatch', 'Run one named build-plan task (coding agent or generation step), whether or not it is next');\n this.router.post('/build/tasks/:taskRef/accept', this.asyncHandler(this.acceptBuildTaskRun.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/accept', 'Commit what the latest coding run of a task wrote (body force:true includes files edited since)');\n // ── Execution traces (what actually happened) ────────────────────\n this.router.get('/traces', this.asyncHandler(this.listExecutionTraces.bind(this)));\n this.logRouteRegistration('get', '/traces', 'Recent execution sessions');\n this.router.get('/traces/:sessionId', this.asyncHandler(this.readExecutionTrace.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId', 'One session: every event in order, and its step artifacts');\n this.router.get('/traces/:sessionId/usage', this.asyncHandler(this.readExecutionTraceUsage.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/usage', 'What one session SPENT, in tokens — summed from the agent-call usage already in its events');\n this.router.get('/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', this.asyncHandler(this.readExecutionTraceArtifact.bind(this)));\n // The trace sessions one actor task ran in — the alias the coding lane already writes, read (#1328).\n this.router.get('/trace-aliases/actor-task/:taskId', this.asyncHandler(this.listActorTaskTraceSessions.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', 'One artifact body — the brief the model saw, or the answer it gave');\n\n this.router.post('/research', this.asyncHandler(this.runResearchTask.bind(this)));\n this.logRouteRegistration('post', '/research', 'Run one READ-ONLY research objective and return the evidence it found (no writes, no lock)');\n this.router.get('/workspace/elements', this.asyncHandler(this.readWorkspaceElements.bind(this)));\n this.logRouteRegistration('get', '/workspace/elements', \"The application's OWN CODE truth by resource — map | get | related, instead of a 43KB registry read\");\n this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));\n this.logRouteRegistration('get', '/playbooks/coherence', 'Cross-family coherence of the CURRENT working tree — what is stated with nothing behind it, and what references something absent');\n this.router.get('/playbooks', this.asyncHandler(this.listPlaybooks.bind(this)));\n this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));\n this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');\n this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));\n /*\n * Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the\n * ordering discipline this router already keeps: a literal segment that a parameterised route\n * could swallow goes first. `suspended` is one segment against that route's two, so nothing\n * shadows it today — the placement is to keep the rule visible rather than to fix a collision.\n */\n this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));\n this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');\n this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));\n this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');\n this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');\n this.router.get('/playbooks/:playbookRef/decision', this.asyncHandler(this.readPlaybookElicitationDecision.bind(this)));\n this.logRouteRegistration('get', '/playbooks/:playbookRef/decision', \"The interview this playbook declares, as a decision payload — null when it asks nothing\");\n this.router.post('/playbooks/:playbookRef/instances', this.asyncHandler(this.openPlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances', 'Open a playbook instance for a purpose (body instanceKey, purpose): recorded in the dossier and committed at once (#1609)');\n this.router.post('/playbooks/:playbookRef/instances/:instanceKey/close', this.asyncHandler(this.closePlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances/:instanceKey/close', 'Close a playbook instance (body kind: completed|abandoned, reason): recorded and committed; abandoning cancels its waiting runs (#1608)');\n this.router.post('/playbooks/:playbookRef/run', this.asyncHandler(this.runPlaybook.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/run', 'Run one playbook and land its outputs as specification files (body dryRun:true tests the pipe, writes nothing)');\n this.router.post('/playbooks/runs/:runId/resume', this.asyncHandler(this.resumePlaybookRun.bind(this)));\n this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\\'s questions and continue it (action: accept | decline | cancel)');\n /*\n * The CREATION CONSOLE (2026-09-25): a coding-agent session drives creation and the workbench is\n * its dashboard, so the console needs the two things the workbench gets over the resource plane —\n * what the companion did, and every question it waits on — on the plane `wildo` speaks. Same rows,\n * same services; see `workbench-creation-console.custom.shared.schemas.ts`.\n */\n this.router.get('/creation/pulse', this.asyncHandler(this.readCreationConsolePulse.bind(this)));\n this.logRouteRegistration('get', '/creation/pulse', 'A cheap poll: a change cursor, the runs in flight, and what the last feed read counted — read the feed only when it moved');\n this.router.get('/creation/feed', this.asyncHandler(this.readCreationConsoleFeed.bind(this)));\n this.logRouteRegistration('get', '/creation/feed', 'What happened, what is asked of you, what could come next — Home\\'s lines with the row each points at');\n this.router.get('/creation/questions', this.asyncHandler(this.readCreationConsoleQuestionQueue.bind(this)));\n this.logRouteRegistration('get', '/creation/questions', 'Every question waiting on the person, as one queue (clarifications, parked coding runs, interview, governance facts)');\n this.router.post('/creation/questions/answer', this.asyncHandler(this.answerCreationConsoleQuestion.bind(this)));\n this.logRouteRegistration('post', '/creation/questions/answer', 'Answer, decline or cancel one queued question — routed to the service the workbench operation calls');\n this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\\'s evaluation treatment (the judge value-eval bench; nothing lands)');\n /*\n * The governed-document questions a HUMAN must answer (#192).\n *\n * Read-only and derived from the engine catalog, so it needs no application state and answers the\n * same for every caller. It exists because the blueprint's question surface had no consumer at all:\n * the questions were compiled into the reference docs shipped to application builders and rendered\n * by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on\n * them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.\n */\n this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));\n this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');\n this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));\n this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\\'s human-established facts as the document-facts-authored family');\n this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));\n this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');\n this.router.post('/runs/writes/:runId/accept', this.asyncHandler(this.acceptPlaybookRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/accept', 'Commit what one playbook run wrote (body force:true includes files edited since)');\n this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/revert', 'Restore the pre-images of one run (refuses files a human edited since, unless body force:true; always refuses files a later run landed on)');\n this.router.get('/runs/writes/:runId/diff', this.asyncHandler(this.readRunWritesDiff.bind(this)));\n this.logRouteRegistration('get', '/runs/writes/:runId/diff', 'What one run CHANGED, per file — a unified diff from the register, so it is the run\\'s own change rather than everything uncommitted');\n\n // ── Market (Market generation, Phase 4.2) ───────────────────────\n this.router.post('/market/generate', this.asyncHandler(this.marketGenerate.bind(this)));\n this.router.post('/brand/generate-logo', this.asyncHandler(this.brandGenerateLogo.bind(this)));\n this.router.post('/brand/deliberate-logo', this.asyncHandler(this.brandDeliberateLogo.bind(this)));\n this.router.post('/brand/accept-logo', this.asyncHandler(this.brandAcceptLogo.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/market/generate',\n 'Render a market generation message template + invoke generation agent',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/deliberate-logo',\n 'Art-director brief → per-direction generation → expert-panel deliberation → stage the winner',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/accept-logo',\n 'Judge + promote a staged logo candidate into the specification SSOT (accept review point)',\n );\n\n // ── Expert personas (agentic deliberation system) ────────────────\n this.router.post('/expert-personas/derive', this.asyncHandler(this.expertPersonaDerive.bind(this)));\n this.router.post('/expert-personas/accept', this.asyncHandler(this.expertPersonaAccept.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/expert-personas/derive',\n 'Derive an app-specific expert-persona charter proposal from a framework role template + the spec artifacts',\n );\n this.logRouteRegistration(\n 'post',\n '/expert-personas/accept',\n 'Promote a staged expert-persona charter proposal into specifications/src/personas/ (committed SSOT)',\n );\n\n // ── Deliberations (agentic deliberation system, Step 3) ──────────\n this.router.post('/deliberations/run', this.asyncHandler(this.deliberationRun.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/deliberations/run',\n 'Run a charter-built expert-panel deliberation over TEXT candidates (rubric → rounds → synthesis)',\n );\n\n // ── Technical documentation (saas-technical-doc.md Step 3) ─────\n this.router.post(\n '/technical-doc/generate-openapi',\n this.asyncHandler(this.technicalDocGenerateOpenApi.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/generate-openapi',\n 'Generate consumer API OpenAPI documents on demand',\n );\n this.router.post('/technical-doc/publish-openapi', this.asyncHandler(this.technicalDocPublishOpenApi.bind(this)));\n this.logRouteRegistration('post', '/technical-doc/publish-openapi', 'Publish generated OpenAPI files into the stable API-reference tree');\n\n // ── Technical documentation source-based derivation (decision D14) ──\n this.router.post(\n '/technical-doc/derive-bundles',\n this.asyncHandler(this.technicalDocDeriveBundles.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/derive-bundles',\n 'Derive the source-based documentation evidence snapshot + authorized bundles (read-only)',\n );\n\n // ── Technical documentation generation (synchronizes src/generated/consumer-documentation/) ──\n this.router.post(\n '/technical-doc/publish-managed',\n this.asyncHandler(this.technicalDocPublishManaged.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/publish-managed',\n 'Derive, render, measure, validate and publish the complete managed documentation tree',\n );\n\n }\n\n public getCustomMountBasePath(): string { return '/api/companion'; }\n\n /**\n * The P-29b local-token floor, finally applied (issue: the gate that was minted and never mounted).\n *\n * `CompanionAuthFloorCompanionService` has minted a 0600 machine-local token on every companion boot\n * since P-29 landed, and `isValidToken` / `buildUnauthorizedError` were written for a middleware that\n * was deleted along with the one endpoint it guarded. Nothing replaced it, so from that day the\n * loopback bind was the ENTIRE protection for every mutating route on this controller — coding\n * dispatch, playbook runs, run-write revert, every LLM call that spends money.\n *\n * What the token adds over the loopback bind is narrow and worth stating, because the floor's own\n * JSDoc is careful about what it does NOT prove: it is not evidence of human presence, and it does\n * not stop a same-uid process that can read the file. What it stops is a caller that can reach the\n * port but cannot read the filesystem — the shape of a page in the operator's browser, or any other\n * process on the machine sending a request it did not earn the right to send.\n *\n * Fails CLOSED in every direction: a missing header, an unparsable header, a token from a previous\n * boot, and an uninitialized floor (`expectedTokenDigest === null`) all refuse.\n *\n * `req.path` is mount-relative here (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and\n * excludes the query string — the same coordinate `attachRequestTraceSession` already compares\n * against. A path variant that the exemption list does not match exactly (a trailing slash, say)\n * refuses, which is the safe direction: it also matches no route.\n *\n * ## Where the access DECISION is recorded, and why not in a store\n *\n * assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — every REFUSAL on the local control\n * plane leaves a record unconditionally; admissions leave one at the configured traceability level.\n *\n * The asymmetry is stated rather than smoothed over, because the two halves have different\n * guarantees and a marker a sweep will trust must not claim the weaker one is the stronger:\n *\n * - **Refusals — unconditional.** Recorded by the error pipeline, not by this method.\n * `ErrorType.AUTHENTICATION` declares `backendActions: [LOG, RECORD_METRICS]`\n * (`errors.shared.definitions.ts`), so `buildUnauthorizedError` emits a `warn` carrying the\n * method, the path, the correlation id and the trace id. Measured on a live companion,\n * 2026-09-10: one refusal, one log line, full context — which is also the ONLY place that context\n * survives, since `sanitizeErrorForClient` strips it from the response.\n * - **Admissions — level-dependent.** `attachRequestTraceSession` runs one middleware later and\n * opens a session for every admitted request (its exemptions, `/`, `/health` and\n * `/coding-agent/status`, are GET-only), but `createApiRequestSession` builds an IN-MEMORY\n * context: nothing reaches disk until the first event passes the level gate, and\n * `CompanionTraceabilityLevel.NONE` exists. At `NONE` an admitted mutating request persists\n * nothing here. That is a defensible default for a development daemon and it is not a claim that\n * admissions are always recorded.\n * - **The ORDER is deliberate**: refuse first, then trace what was admitted, so an unauthorized\n * caller cannot spend a session directory. It is pinned — see the mounting suite.\n *\n * A separate durable audit STORE was considered and refused. One existed until the digest\n * demolition: `.wildo-saas/state/audit/companion-security-events/` still holds 212\n * `LOCAL_CONTROL_PLANE_ACCESS_DECIDED` records, each with an `eventDigest`, and the type is gone\n * from the source tree. Rebuilding it would reintroduce exactly what\n * `.claude/rules/one-source-of-truth.md` Rule 0 puts out at this stage, for a loopback development\n * daemon with no deployed counterpart — and\n * `.claude/rules/application-creation-directive.md` is explicit that a record nobody reads is a\n * record we do not write. If a companion ever faces something other than this machine, that is the\n * decision to revisit, and the marker above is what a sweep will find.\n */\n private enforceLocalTokenFloor(req: Request, _res: Response, next: NextFunction): void {\n const admitted = companionRequestIsAdmittedByTokenFloor(\n { method: req.method, path: req.path, presentedToken: req.headers[COMPANION_TOKEN_HEADER] },\n (presented) => this.authFloorService.isValidToken(presented),\n );\n if (admitted) {\n next();\n return;\n }\n next(this.authFloorService.buildUnauthorizedError(`${req.method} ${req.path}`));\n }\n\n private attachRequestTraceSession(req: Request, res: Response, next: NextFunction): void {\n // Polled probes are infrastructure noise, not build-time work — see\n // `isTraceExemptProbe` for the full rationale (session-dir spam + live-\n // session eviction under the always-on traceability default).\n if (isTraceExemptProbe(req.method, req.path, COMPANION_TRACE_EXEMPT_GET_PATHS)) {\n next();\n return;\n }\n const sessionContext = this.traceabilityService.createApiRequestSession({\n method: req.method,\n routePath: req.path,\n urlPath: req.originalUrl || req.url,\n ip: req.ip,\n userAgent: req.get('user-agent') ?? undefined,\n });\n\n res.locals.companionTraceSession = sessionContext;\n let didFinish = false;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n query: req.query,\n },\n });\n\n res.on('finish', () => {\n didFinish = true;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish ${req.method.toUpperCase()} ${req.path} with ${res.statusCode}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n res.on('close', () => {\n if (didFinish) {\n return;\n }\n\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-close',\n summary: `Connection closed before finish for ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n\n // Everything this request starts runs under its session — including a detached run that\n // outlives the response, and model calls whose caller named no session (#1264).\n this.traceabilityService.runWithActiveSession(sessionContext, () => next());\n }\n\n private getTraceSession(res: Response): CompanionExecutionSessionContext | undefined {\n return res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n }\n\n private createTraceStep(\n res: Response,\n kind: string,\n label: string,\n ) {\n const session = this.getTraceSession(res);\n return session\n ? this.traceabilityService.createStep(session, { kind, label })\n : undefined;\n }\n\n private async traceSessionEvent(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n type: string,\n summary: string,\n payload?: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.traceEvent({\n session,\n minimumLevel,\n type,\n summary,\n ...(payload !== undefined ? { payload } : {}),\n ...(step ? { step } : {}),\n });\n }\n\n private async traceSessionArtifact(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n fileName: string,\n content: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.writeArtifact({\n session,\n minimumLevel,\n fileName,\n content,\n ...(step ? { step } : {}),\n });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // HEALTH\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async health(_req: Request, res: Response, _next: NextFunction) {\n this.jsonSuccess(res, { status: 'ok', service: 'dev-companion' });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // LABELLING (per-unit, lock-file-tracked)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async labellingPlan(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * WITH completeness. This used to call `planAllUnits()`, which returns `.units` and DROPS the\n * planner's own incompleteness report — so a plan that silently suppressed whole families\n * answered exactly like a complete one.\n *\n * That is not hypothetical: milestone labels were never planned for ANY application (#1405).\n * The planner read `MilestoneDefinitionRegistry`, which IS bound here — its only production\n * writer is `startApplication()`, which the companion never runs, so it answered `[]` forever\n * while a bound-but-empty read was treated as an authoritative \"no milestones\". The family is\n * now planned from the introspection snapshot. The consequence reached a user — a celebration\n * with no milestone words falls back\n * to the notification centre's generic `defaultSuccess`, and the progression tracker renders\n * `milestones.<ref>.title` as a raw key — and the one mechanism that knew why was reporting it\n * into a value nobody read.\n */\n const plan = await this.labellingPlannerService.planAllUnitsWithCompleteness();\n const summary = plan.units.map((u) => ({\n id: u.id,\n category: u.category,\n displayLabel: u.displayLabel,\n bucket: u.filePathHint.bucket,\n slug: u.filePathHint.slug,\n chunkCount: u.chunks.length,\n keyCount: u.chunks.reduce((sum, c) => sum + c.keys.length, 0),\n }));\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: summary,\n incompleteness: plan.incompleteness,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Audit chart-registration alignment: compares every frontend\n * `chartViews[].chartDefinition.ref` (materialized in the FRONTEND subprocess)\n * against the backend-registered chart refs (from the merged backend modules).\n * Returns the two-channel report — `unregisteredFrontendCharts` (each a\n * guaranteed runtime `chart_not_found` 404) + `orphanBackendCharts` (backend-only\n * charts, valid for API/programmatic use). The CLI renders + gates on it.\n */\n private async chartsAudit(_req: Request, res: Response, next: NextFunction) {\n try {\n // Frontend side — the chart authoring surface, readable only in the frontend subprocess.\n const appFrontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!appFrontendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'chart-registration audit: no SAAS_APP frontend service found.' },\n });\n }\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: appFrontendServiceKey,\n behavior: 'chart-registration-refs',\n });\n if (!result.success) {\n const message = 'error' in result ? result.error.message : 'unknown error';\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: { message: `chart-registration-refs introspection failed: ${message}` },\n });\n }\n const frontendChartRefs =\n (result.data as { frontendChartRegistrationRefs?: FrontendChartRegistrationRef[] })\n .frontendChartRegistrationRefs ?? [];\n\n // Backend side — the EFFECTIVE set the backend registers, not the module declarations.\n //\n // `buildApplicationInitializationConfig()` is the same pure builder backend startup uses; it\n // assembles configuration and starts nothing, and its `chartDefinitions` is the array\n // `StartApplicationBackendService` hands to `ChartRegistry.registerChart`. That matters\n // because the assembly does `overrides.chartDefinitions ?? backendRegistry.chartDefinitions`\n // — a REPLACE — so `mergeBackendDomainModules(...)`, which this route used until 2026-09-09,\n // is a different population the moment an application supplies that override: a dropped chart\n // read as ALIGNED and 404'd at runtime.\n //\n // It is also what the contract asks for in as many words (\"tooling must not reconstruct\n // selected runtime capabilities from lower-level registries or naming conventions\"), so the\n // previous composition was violating the surface it was calling.\n const backendExports = await loadBackendCompanionExports(this.companionContext);\n if (typeof backendExports.buildApplicationInitializationConfig !== 'function') {\n // REFUSE rather than fall back to the declarations. A fallback here would answer about a\n // population this route cannot vouch for, under a route whose whole output is a verdict —\n // and it would do so silently, which is the defect this change removes.\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'chart-registration audit: the application\\'s backend companion-exports declare no '\n + '`buildApplicationInitializationConfig`, so the effective registered chart set cannot be '\n + 'read. Add it to `backendCompanionExports` (it is a REQUIRED member of '\n + '`BackendCompanionExports`) and re-run.',\n },\n });\n }\n const backendRegisteredRefs = (backendExports.buildApplicationInitializationConfig().chartDefinitions ?? [])\n .map((definition) => normalizeChartExecutionRef(definition.ref));\n\n this.jsonSuccess(\n res,\n computeChartRegistrationAlignment({\n frontendChartRefs,\n backendRegisteredRefs,\n backendRefsProvenance: ChartRegistrationBackendRefsProvenance.EFFECTIVE_INITIALIZATION_CONFIG,\n }),\n );\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The email lane's units, in the same summary shape `/labelling/plan` answers, so the CLI can split a\n * translate run into buckets without a second code path. `bucket` is the lane's named bucket;\n * `keyCount` is absent because an email's keys come from its source file at translate time.\n */\n private async labellingEmailTemplateUnits(_req: Request, res: Response, next: NextFunction) {\n try {\n const plan = await this.emailTemplateLabellingUnitsService.planEmailTemplateUnits();\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: plan.units.map((unit) => ({\n id: unit.id,\n category: unit.category,\n displayLabel: unit.displayLabel,\n bucket: EMAIL_TEMPLATE_LABELLING_BUCKET,\n slug: unit.templateRef,\n })),\n warnings: plan.warnings,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingLabellize(req: Request, res: Response, next: NextFunction) {\n try {\n const { forceRegenerate, unitIds } = req.body || {};\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n const result = await this.labellizeOrchestratorService.labellize({\n forceRegenerate: forceRegenerate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, forceRetranslate, unitIds } = req.body || {};\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n if (forceRetranslate !== undefined && typeof forceRetranslate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRetranslate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n const result = await this.translateOrchestratorService.translate({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Validate a locale string against `AvailableLanguage`. Without this,\n * the orchestrators would happily write `<bucket>/<slug>.xx.ts`\n * files for arbitrary input and create unbounded locale entries in\n * the lock file.\n */\n private assertAvailableLanguage(value: string, fieldName: string): AvailableLanguage {\n return assertCompanionAvailableLanguage(value, fieldName, this.errorBuilder);\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // EMAIL TEMPLATES\n //\n // OD-4.a: All handlers in this block delegate to\n // `EmailTemplateCompanionService`, which exclusively reads from the in-memory\n // `EmailTemplateRegistryBackendService` (file-based template + per-locale\n // labels, refreshed via dynamic `import()` of the compiled `dist/`\n // artifacts). The deleted DB-backed `EMAIL_TEMPLATES` core resource is NOT\n // a fallback. See the `CompanionController` class JSDoc for the full\n // contract and the deprecation plan reference.\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async emailTemplatesGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n this.logDebug('emailTemplatesGenerate');\n const { forceRegenerate, templateRefs, locales } = req.body || {};\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (locales !== undefined && (!Array.isArray(locales) || locales.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'locales must be an array of locale strings when provided' },\n },\n );\n }\n\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.generateTemplates({\n forceRegenerate,\n templateRefs,\n locales,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesPreview(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, mockContext } = req.body || {};\n\n if (!templateRef || typeof templateRef !== 'string' || !locale || typeof locale !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef and locale are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.previewTemplate({\n templateRef,\n locale: validatedLocale,\n mockContext,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTestSend(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, recipientEmail, mockContext } = req.body || {};\n\n if (\n !templateRef || typeof templateRef !== 'string'\n || !locale || typeof locale !== 'string'\n || !recipientEmail || typeof recipientEmail !== 'string'\n ) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef, locale, and recipientEmail are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.testSend({\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n mockContext,\n }, this.getTraceSession(res));\n\n assertEmailTemplateTestSendSucceeded(result, {\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n }, this.errorBuilder);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesStatus(req: Request, res: Response, next: NextFunction) {\n try {\n const templateRefs = typeof req.query.templateRefs === 'string'\n ? req.query.templateRefs.split(',').map((value) => value.trim()).filter(Boolean)\n : undefined;\n\n const result = await this.emailTemplateService.getTemplateStatus(\n templateRefs,\n this.getTraceSession(res),\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, templateRefs, dryRun } = req.body || {};\n this.logDebug('emailTemplatesTranslate', { targetLocales, templateRefs, dryRun });\n\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (dryRun !== undefined && typeof dryRun !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'dryRun must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.translateEmailTemplateLabels({\n targetLocales: validatedTargets,\n templateRefs,\n dryRun: !!dryRun,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // FILE OPERATIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Single source of truth for the SaaS app root consumed by file operations.\n *\n * Always returns `this.companionContext.saasRoot`. Earlier revisions used\n * `process.env.COMPANION_WORKSPACE_ROOT || this.companionContext.saasRoot`,\n * which let a stale env var (from a parent shell, prior session, or leaked\n * Vitest worker) silently override the trusted CompanionContext snapshot.\n * `COMPANION_WORKSPACE_ROOT` is now only used as a BOOTSTRAP seed for\n * subprocess consumers that have no CompanionContext (see\n * `applyTrustedHomesToChildProcess` and the code-compliance scripts) —\n * never as a runtime override inside services that already hold a resolved\n * context.\n */\n private getWorkspaceRoot(): string {\n return this.companionContext.saasRoot;\n }\n\n /**\n * The one resolver behind the generic file routes (read, list, write), and therefore the one place\n * they are confined: inside the application root, and never a secret-bearing path. See\n * `companion-file-route-confinement.ts` for why reads needed it even though the token floor leaves\n * them open. A refusal is AUTHORIZATION (403): the path is well-formed, the caller may not have it.\n */\n private resolveRequestedPath(filePath: string): string {\n const decision = confineCompanionFilePath(this.getWorkspaceRoot(), filePath);\n if (decision.admitted) return decision.absolutePath;\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,\n context: {\n refusal: decision.refusal,\n path: decision.relativePath,\n message:\n decision.refusal === CompanionFileRouteRefusal.SECRET_BEARING_PATH\n ? 'Secrets are not served by the file routes; use `wildo secrets` or the workbench secrets section.'\n : 'The file routes only reach files inside the application root.',\n },\n });\n }\n\n private async updateFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'update-files');\n try {\n this.logDebug('updateFiles');\n const { files } = req.body;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-start',\n 'Start file update request',\n {\n fileCount: Array.isArray(files) ? files.length : 0,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-request.json',\n req.body ?? {},\n traceStep,\n );\n \n if (!files || !Array.isArray(files)) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Request body must contain a \"files\" array' }\n }\n );\n }\n\n const results: { success: boolean; updatedFiles: string[]; errors: { path: string; message: string }[] } = {\n success: true,\n updatedFiles: [],\n errors: [],\n };\n\n for (const file of files as FileUpdateRequest[]) {\n try {\n const absolutePath = this.resolveRequestedPath(file.path);\n \n if (file.createDirectories !== false) {\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n }\n \n const encoding = (file.encoding || 'utf-8') as BufferEncoding;\n await fs.writeFile(absolutePath, file.content, { encoding });\n \n results.updatedFiles.push(file.path);\n } catch (error) {\n results.success = false;\n results.errors.push({\n path: file.path,\n message: describeCaughtError(error),\n });\n }\n }\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n results.success ? 'file-update-success' : 'file-update-mixed-result',\n results.success\n ? `Updated ${results.updatedFiles.length} files`\n : `Updated ${results.updatedFiles.length} files with ${results.errors.length} failures`,\n {\n updatedCount: results.updatedFiles.length,\n errorCount: results.errors.length,\n success: results.success,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-result.json',\n results,\n traceStep,\n );\n this.jsonSuccess(res, results);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-failure',\n 'Workspace file update failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFile(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'get-file');\n try {\n this.logDebug('getFile');\n const filePath = req.query.path as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-start',\n 'Start file read request',\n { filePath },\n traceStep,\n );\n \n if (!filePath) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"path\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(filePath);\n const content = await fs.readFile(absolutePath, 'utf-8');\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-success',\n `Read file ${filePath}`,\n {\n filePath,\n contentLength: content.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-read-result.json',\n {\n filePath,\n content,\n encoding: 'utf-8',\n },\n traceStep,\n );\n this.jsonSuccess(res, { content, encoding: 'utf-8' });\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-failure',\n 'Workspace file read failed',\n {\n error: describeCaughtError(e),\n filePath: req.query.path,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'list-files');\n try {\n this.logDebug('listFiles');\n const directory = req.query.directory as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-start',\n 'Start workspace directory listing request',\n { directory },\n traceStep,\n );\n \n if (!directory) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"directory\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(directory);\n const entries = await fs.readdir(absolutePath, { withFileTypes: true });\n \n const files = entries.map(entry => ({\n name: entry.name,\n isDirectory: entry.isDirectory(),\n path: path.join(directory, entry.name),\n }));\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-success',\n `Listed workspace directory ${directory}`,\n {\n directory,\n entryCount: files.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-list-result.json',\n {\n directory,\n files,\n },\n traceStep,\n );\n this.jsonSuccess(res, files);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-failure',\n 'Workspace directory listing failed',\n {\n error: describeCaughtError(e),\n directory: req.query.directory,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // CODING-AGENT STATUS (typed Flows/Actors coding path)\n // ─────────────────────────────────────────────────────────────────────────────\n // The P-29 token middleware that used to live HERE guarded only the raw\n // POST /coding-agent/dispatch endpoint; it was deleted with that endpoint\n // at the first-activation hard cut, and for as long as it stayed deleted\n // `CompanionAuthFloorCompanionService`'s token half had no consumer at all.\n // It is back, and deliberately not here: `enforceLocalTokenFloor` is a\n // router-level middleware registered first in `setupRoutes`, so it covers\n // every mutating route on the mount rather than the one endpoint whose\n // author happened to remember it. Per-route gating is what let the floor\n // die with a single deletion.\n // The OTHER half of the same auth floor is unchanged and enforced at\n // startup before the server listens: the fail-closed loopback assertion,\n // with no override, which is why the companion must never bind beyond this\n // machine.\n\n /**\n * Stop the in-flight coding run.\n *\n * Answers 200 with the task that was signalled, or 200 with\n * `cancelled: false` when nothing is running — an operator asking to stop a\n * run that already finished has not made an error, and a 404 would read like\n * a broken route rather than an empty queue.\n *\n * The run terminalises normally with stop reason `cancelled` and its captured\n * change set, so what the agent had already written stays visible.\n */\n private async codingAgentCancel(_req: Request, res: Response, next: NextFunction) {\n try {\n const cancelled = this.codingAgentDispatchService.cancelActiveApplicationCodingTask();\n this.jsonSuccess(res, cancelled ? { cancelled: true, ...cancelled } : { cancelled: false });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * Answer a coding task that parked on a question, resuming the SAME agent\n * session. A WRITE: it re-enters a workspace-mutating run behind the shared\n * worktree lock, so it is serialized with every other coding run.\n */\n private async codingAgentRespond(req: Request, res: Response, next: NextFunction) {\n try {\n const { taskId, answer, suspensionRef, answeredByRef } = (req.body ?? {}) as { taskId?: unknown; answer?: unknown; suspensionRef?: unknown; answeredByRef?: unknown };\n // An empty reference names no question: a malformed request (400), not a state conflict (#1581, R10-5).\n if (typeof taskId !== 'string' || typeof answer !== 'string' || typeof suspensionRef !== 'string' || suspensionRef.trim().length === 0) {\n // A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a\n // plain `new Error` here surfaced as the latter and logged at critical\n // severity (found by the live surface probe, 2026-09-04).\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`taskId`, `answer` and `suspensionRef` (strings) are required — `suspensionRef` names the question answered, as `pendingQuestions` carries it.' },\n });\n }\n // ONE door since #1359: the parked run is an actor-system execution waiting on a decision,\n // with its contract and baseline on the checkpoint, so answering it is the same call whether\n // this process parked it or a previous one did. The service refuses (409) when nothing\n // answerable waits under the id.\n // `suspensionRef` (from `pendingQuestions`) holds the answer to the question the caller read (#1581).\n // WHO answered, when the caller says (#1658) — recorded in CODING-ANSWERS.md; absent records nothing rather than a guess.\n const admission = await this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, undefined, {\n suspensionRef,\n ...(typeof answeredByRef === 'string' && answeredByRef.trim().length > 0 ? { answeredByRef: answeredByRef.trim() } : {}),\n });\n this.jsonSuccess(res, admission);\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stream one active coding session's live frames as Server-Sent Events.\n *\n * Frames flow only while the run is active, so the current pending question\n * (if any) is sent first as a `snapshot` event — a subscriber that attaches\n * after a park still learns what is being asked. Read-only.\n */\n private codingAgentSessionEvents(req: Request, res: Response): void {\n const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';\n if (!taskId) {\n res.status(400).json({ error: 'A `taskId` query parameter is required.' });\n return;\n }\n res.setHeader('Content-Type', 'text/event-stream');\n res.setHeader('Cache-Control', 'no-cache, no-transform');\n res.setHeader('Connection', 'keep-alive');\n res.flushHeaders?.();\n\n const send = (event: string, data: unknown): void => {\n res.write(`event: ${event}\\ndata: ${JSON.stringify(data)}\\n\\n`);\n };\n\n // The pending question up front, so a late subscriber is not blind to a park\n // that already happened.\n // Read from the actor plane, so it is asynchronous; a failed read costs the late subscriber its\n // snapshot and nothing else — the live frames below do not depend on it.\n void this.codingAgentDispatchService.listPendingCodingQuestions()\n .then((questions) => send('snapshot', { pendingQuestion: questions.find((q) => q.taskId === taskId) ?? null }))\n .catch(() => send('snapshot', { pendingQuestion: null }));\n\n const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {\n send(frame.channel, frame.payload);\n });\n // A heartbeat keeps intermediaries from closing an idle stream during a long\n // quiet stretch of a run.\n const heartbeat = setInterval(() => res.write(': keep-alive\\n\\n'), 15_000);\n heartbeat.unref?.();\n req.on('close', () => {\n clearInterval(heartbeat);\n unsubscribe();\n });\n }\n\n /**\n * What is running, and what died leaving something resumable.\n *\n * A composite is a minutes-long operation — 780s for a five-iteration run — and until now nothing\n * could report that one was in progress. On 2026-08-29 a parallel session published a single file\n * 32 seconds after a research turn had succeeded; the companion restarted correctly and the run\n * died. That session had no way to know, and no way to find out (#125).\n *\n * Two fields because they answer two different questions:\n *\n * - `running` comes from MEMORY, and is the only evidence of a run still inside its first\n * iteration — the most expensive moment to interrupt, and one no checkpoint has reached yet.\n * - `interrupted` comes from DISK, and lists runs whose process is gone. A checkpoint outlives its\n * run only when the process was taken away, because a run that concludes consumes its own.\n *\n * Deliberately NOT a lock. `CLAUDE.md` is explicit that sessions are independent and shared-file\n * collisions are accepted; a run that refused to let someone save a file would be worse than one\n * that loses an iteration.\n */\n private async readPlaybookRunsInFlight(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readRunsInFlight());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.\n *\n * The read that makes a suspension survivable. A run that stops at a clarification answers 200 with\n * its `runId`, and until this existed that response was the ONLY place the id lived: reload the\n * page and the run stayed suspended on disk with nobody able to name it. A resume affordance can\n * now be rebuilt from server state rather than from the browser's memory of one response.\n */\n private async readSuspendedPlaybookRuns(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /compliance/governance-questions` — what a person still has to decide.\n *\n * `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats\n * an unknown document as \"no such document\", and a host loading several refs should not lose the\n * ones that exist because one was mistyped.\n */\n private async readGovernanceQuestions(req: Request, res: Response, next: NextFunction) {\n try {\n const raw = req.query.definitionRef;\n const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);\n this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.\n *\n * The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question\n * the questionnaire asks carries a human authority, and the derived family refuses those by type.\n *\n * It does NOT commit. The landed file is a working edit until a human commits it\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.\n *\n * `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set\n * would produce before a person commits to it.\n */\n private async landGovernanceFacts(req: Request, res: Response, next: NextFunction) {\n try {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n /*\n * `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through\n * `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message\n * sanitized to the literal \"internal\" — so a deliberate, well-worded refusal would answer 500\n * saying nothing. Found by making a test double reproduce the real sanitization rather than\n * passing errors through.\n */\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n }));\n return;\n }\n /*\n * The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service\n * that owns the question catalog; this refuses a body that is not a request at all, which\n * previously reached the service and threw a `TypeError` reported as a 500.\n *\n * `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own\n * catch and goes out through the generic path as INTERNAL with its message sanitized to\n * \"internal\" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and\n * throwing would have moved the defect rather than fixed it. Caught by mutating the guard away\n * and watching the pin stay green.\n */\n const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message:\n 'This is not a governance-fact landing request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const payload = parsed.data;\n /*\n * The authored facts as LANDED, for the merge (#1454, Step 6): the new answers replace their own\n * facts and every other declaration is kept. Read through the same aggregate every reader uses,\n * so what this landing merges into is what the dossier showed the person.\n */\n const current = await this.dossierService.readAuthoredDocumentFacts();\n const result = await landGovernanceFactDeclarations({\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in\n // VALUES, never in the names of landed exports.\n constantPrefix: 'application',\n answers: payload as unknown as GovernanceFactDeclarationInput,\n ...(current === undefined ? {} : { current }),\n ...(req.query.dryRun === undefined ? {} : { dryRun: true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n /*\n * A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.\n *\n * Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered\n * question, a review with no reviewer, \"does not apply\" on a question that does not offer it —\n * and those sentences are the whole product of that boundary. Left to `jsonError` they are\n * classified INTERNAL and SANITIZED to the literal string \"internal\", so the caller gets a 500\n * that says nothing. Measured against the live companion on 2026-09-03, minutes after the\n * route shipped: `POST` with an empty body answered `{\"type\":\"INTERNAL\",\"message\":\"internal\"}`.\n *\n * Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed\n * interview is something the caller must change, never something that went wrong here.\n */\n if (e instanceof GovernanceQuestionnaireError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private async codingAgentStatus(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.codingAgentDispatchService.getStatus());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PERSISTED EXECUTIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async createActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorExecution(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateFlowExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createFlowExecution(payload, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFlowExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listFlowExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getFlowExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorTask(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorTasks(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionActorTasksListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorTasks(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorTask(taskId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async updateActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const payload = CompanionUpdateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.updateActorTask(taskId, payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The generic actor-plane WRITE doors (`POST /executions/actors`, `POST /tasks/actors`,\n * `PATCH /tasks/actors/:taskId`) drop the creation boards, because the boards read actor-plane rows\n * no file signature can see (#1310, sixth review F2): a coding task's status or memory moves the\n * loop guard, the attempt budget and the in-flight set. The build lane announces its own writes\n * through `announceRunStateChanged`; these doors write the same rows on anyone's behalf, so they\n * cannot know which writes matter and drop the boards after every one. The cost is a recompute a\n * watching tab would pay on its next read anyway.\n */\n private invalidateCreationBoardsAfterActorPlaneWrite(): void {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // META / INTROSPECTION\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Get resources registry, optionally scoped to a specific app.\n */\n private async getResourcesRegistry(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'resources-registry');\n let mappedFailureAlreadyTraced = false;\n try {\n const appSlug = req.params.appSlug;\n this.logDebug('getResourcesRegistry', { appSlug: appSlug ?? 'all' });\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-start',\n 'Resolve companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickResourcesRegistryCarrierServiceKey(),\n behavior: 'resources-registry',\n });\n\n if (!result.success) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-upstream-failure',\n 'Companion resources registry introspection returned a failure result',\n {\n appSlug: appSlug ?? null,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: 'error' in result ? result.error : undefined,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = 'error' in result\n ? result.error.message\n : 'Companion resources-registry introspection failed.';\n\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: failureMessage,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-result.json',\n result.data ?? null,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-success',\n 'Resolved companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n this.jsonSuccess(res, result.data ?? null);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-failure',\n 'Failed to resolve companion resources registry',\n {\n appSlug: req.params.appSlug ?? null,\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private pickResourcesRegistryCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the companion resources-registry behavior.',\n },\n });\n }\n\n return backendServiceKey;\n }\n\n private async getWebsiteStructuredDataAudit(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(\n res,\n 'meta-introspection',\n 'website-structured-data-audit',\n );\n try {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-start',\n 'Run website structured-data reconciliation against the merged Schema.org catalog',\n {},\n traceStep,\n );\n\n const report = await StructuredDataCatalogAuditService.audit(this.companionContext);\n const warningCount = report.result.findings.length;\n const responseBody = {\n status: warningCount === 0 ? 'passed-with-zero-findings' : 'completed-with-warnings',\n warningCount,\n warnings: report.result.findings,\n // Optional-field recommendations: information beside the warnings, never counted as one.\n // `?? []`: a result from an injected saas-website that predates the channel carries no key.\n recommendations: report.result.recommendations ?? [],\n report,\n };\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'website-structured-data-audit-result.json',\n responseBody,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n warningCount === 0\n ? 'website-structured-data-audit-success'\n : 'website-structured-data-audit-warnings',\n warningCount === 0\n ? 'Website structured-data audit completed with zero findings'\n : 'Website structured-data audit completed with warning findings',\n {\n pageCount: report.pageCount,\n sectionCount: report.sectionCount,\n warningCount,\n },\n traceStep,\n );\n\n this.jsonSuccess(res, responseBody);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-failure',\n 'Failed to run website structured-data audit',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Is this failure the CALLER's fault (400) rather than the companion's (500)?\n *\n * Decided by the ERROR NAME, for any behavior. It used to be gated on one behavior id\n * (`specification-context-parts`), which is the hand-kept-list shape: the next parameterised behavior\n * inherited 500 INTERNAL for a malformed input, sanitized to \"internal\", and its own refusal message —\n * written to name the fix — reached nobody. Measured on the first live `wildo context elements` run\n * (#1459), where `get` with both `refs` and `aspectKeys` answered 500 and the CLI suggested the\n * companion might be down.\n *\n * `ZodError` stays gated on that behavior deliberately: elsewhere a Zod failure is usually the\n * APPLICATION's own data failing its schema, which is not the caller's input and must not read as a\n * bad request. A handler that wants the 400 says so by throwing\n * {@link IntrospectionInputValidationError}.\n */\n private isValidationIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): boolean {\n if (result.success) return false;\n if (result.error?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) return true;\n\n const effectiveBehavior = requestedBehavior ?? result.behavior;\n if (effectiveBehavior !== 'specification-context-parts') return false;\n return result.error?.name === 'ZodError'\n || result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;\n }\n\n /**\n * `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).\n *\n * Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a\n * `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never\n * re-derives the \"first backend service\" rule.\n */\n private listIntrospectionBehaviors(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.companionIntrospectionService.describeCatalog());\n } catch (error) {\n next(error);\n }\n }\n\n private async requestIntrospection(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');\n let mappedFailureAlreadyTraced = false;\n try {\n const { serviceKey, behavior, input } = CompanionIntrospectionRequestSchema.parse(req.body ?? {});\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-start',\n `Resolve companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-request.json',\n { serviceKey, behavior, input },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey,\n behavior,\n input,\n });\n\n if (!result.success && 'error' in result) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-upstream-failure',\n `Companion introspection behavior ${behavior} returned a failure result`,\n {\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: result.error,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = result.error.message;\n const errorType = this.isValidationIntrospectionFailure(result, behavior)\n ? ErrorType.VALIDATION\n : ErrorType.INTERNAL;\n const customMessageReference = errorType === ErrorType.VALIDATION\n ? ErrorCustomMessageReference.VALIDATION\n : ErrorCustomMessageReference.INTERNAL;\n\n throw this.errorBuilder.buildError(\n errorType,\n undefined,\n {\n customMessageReference,\n context: {\n message: failureMessage,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-success',\n `Resolved companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n },\n traceStep,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-failure',\n 'Companion introspection request failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n /*\n * The caller-input contract holds for a PARENT-side throw too, and it did not until now.\n *\n * `isValidationIntrospectionFailure` above reads a failure RESULT — the shape a subprocess\n * error comes back in, with its name carried across the boundary as a string. But resolution\n * runs in this process, BEFORE any subprocess: an unknown service key, an unknown behavior, a\n * behavior asked of the wrong service kind all throw here and reached `jsonError` unclassified,\n * so a perfectly actionable message (\"Unknown SaaS service key ... This application declares:\n * ...\") was sanitized to a bodyless 500 INTERNAL. The CLI's health hint is gated on a 4xx, so\n * it then fired on a companion that is demonstrably up and sent the reader to check a process\n * instead of their own argument — the exact failure #1459 fixed on the result path, arriving\n * through the door nobody had enumerated.\n *\n * Matched by NAME rather than `instanceof` for the same reason the name exists: it is the one\n * property that survives every boundary this error can cross.\n */\n if ((e as { name?: string })?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) {\n this.jsonError(\n res,\n this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: (e as Error).message },\n },\n ) as any,\n next,\n );\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PROMPT (TODO)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async buildPrompt(_req: Request, res: Response, _next: NextFunction) {\n try {\n this.jsonSuccess(res, { prompt: 'Not implemented yet', message: 'Prompt building service is not yet available' });\n } catch (e) {\n this.jsonError(res, e as any, _next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // MARKET (Market generation, Phase 4.2)\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * POST /api/companion/market/generate\n *\n * Body: `MarketGenerationRequest`\n * - `templateRef` (required) — `MarketMessageTemplate.ref`\n * - `icpRef`, `featureRef`, `benefitRef`, `channelRef`, `objectionRef` —\n * resolved against the snapshot; their inclusion must match the\n * template's `requiredInputs`.\n * - `outputLanguage` — defaults to \"English\" inside the renderer when\n * omitted; honored verbatim when provided.\n *\n * The handler is intentionally thin — `MarketGenerationCompanionService`\n * owns the introspection + LLM orchestration. We only do\n * minimal-shape validation here so the operator gets a clean\n * 400 instead of a confusing 500 when `templateRef` is missing.\n */\n /**\n * `GET /playbooks/coherence` — the questions no single family answers about itself.\n *\n * Returns both the structured findings and the rendered markdown: the first for a workbench, the\n * second because the intended reader is a human deciding whether to commit, and prose is what they\n * read. It REPORTS — a coverage gap is frequently a deliberate decision — so there is no verdict\n * field and nothing here refuses.\n */\n /**\n * `POST /research` — one read-only research turn.\n *\n * Deliberately NOT under `/playbooks`: research is a capability, and binding it to the playbook\n * lane before a playbook consumes it would make the first consumer's shape the contract. It is\n * reachable on its own so the lane can be exercised and measured before anything is choreographed\n * around it.\n */\n private async runResearchTask(req: Request, res: Response, next: NextFunction) {\n try {\n const objective = (req.body ?? {}).objective;\n if (typeof objective !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`objective` is required and must be a string.' },\n });\n }\n const evidenceScope = (req.body ?? {}).evidenceScope;\n const result = await this.researchAgentDispatchService.runResearchTask({\n objective,\n ...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),\n });\n // The whole result, including the permission decisions: a thin answer has two very different\n // causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.\n res.json(result);\n } catch (error) {\n if (error instanceof ResearchAgentUnavailableError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /workspace/elements` — the application's own code truth, by resource (#1437).\n *\n * It could only be read WHOLE: `resources-registry` answers 43 KB, `resource-specifications`\n * 227 KB, and no filter on the pull door reached a module, a resource, a field, a relationship or\n * an operation. A build task targets ONE resource.\n *\n * The narrowing is HERE rather than in the derivation, and that is the design: the projection\n * behind it costs ~35 s and the introspection cache keys on a behavior's input, so a filter pushed\n * down would make every distinct question a fresh subprocess. One derivation, cached, sliced many\n * times — and two slices of one projection cannot disagree about an application being edited.\n *\n * Every answer carries its FRESHNESS, which is the third thing #1437 asks for and the one a\n * caller cannot reconstruct: the registry once reported 15 resources as a held derivation while\n * the specification set and the compiled dist both had 16.\n */\n private async readWorkspaceElements(req: Request, res: Response, next: NextFunction) {\n try {\n const operation = String(req.query.op ?? WorkspaceElementOperation.MAP);\n const serviceKey = typeof req.query.serviceKey === 'string' && req.query.serviceKey.length > 0\n ? req.query.serviceKey\n : this.companionIntrospectionService.describeCatalog().defaultBackendServiceKey;\n if (serviceKey === null) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application declares no backend service to introspect.' },\n });\n }\n const { index, freshness } = await readWorkspaceElements(this.companionIntrospectionService, serviceKey);\n const answeredWith = { freshness: describeWorkspaceFreshness(freshness), held: freshness.held, ageMs: freshness.ageMs };\n const readList = (value: unknown): string[] | undefined => {\n if (typeof value === 'string') return value.split(',').map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n return Array.isArray(value) ? value.map(String) : undefined;\n };\n\n if (operation === WorkspaceElementOperation.MAP) {\n const kinds = readList(req.query.kinds) as WorkspaceElementKind[] | undefined;\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.MAP,\n lines: mapWorkspaceElements(index, {\n ...(kinds ? { kinds } : {}),\n ...(readList(req.query.resources) ? { resourceTypes: readList(req.query.resources)! } : {}),\n }),\n });\n return;\n }\n\n const resourceType = typeof req.query.resource === 'string' ? req.query.resource : '';\n if (resourceType.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`resource\\` is required for op=${operation}. Ask op=map first for the refs this application has.` },\n });\n }\n\n if (operation === WorkspaceElementOperation.GET) {\n const resource = getWorkspaceResource(index, resourceType);\n if (resource === undefined) {\n // NOT an empty resource: \"does not exist\" and \"exists and holds nothing\" are different\n // answers, and a creation task depends on which one it got. The hint travels as GUIDANCE: a 404's\n // context is stripped before it leaves the companion (#1588).\n // In the words of the CLI verb that reaches this route, since that is the reader (#1588 review F5).\n const hint = `No resource \\`${resourceType}\\` is registered in this application. \\`wildo context workspace map\\` (op=map) lists the resources it has.`;\n throw this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.WORKSPACE_RESOURCE_NOT_REGISTERED, { explanation: hint },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: hint } });\n }\n res.json({ ...answeredWith, op: WorkspaceElementOperation.GET, resource });\n return;\n }\n\n if (operation === WorkspaceElementOperation.RELATED) {\n const hops = Number(req.query.hops ?? 1);\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.RELATED,\n ...relatedWorkspaceResources(index, resourceType, { hops: Number.isFinite(hops) ? hops : 1 }),\n });\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `Unknown op \\`${operation}\\`. One of: ${Object.values(WorkspaceElementOperation).join(', ')}.` },\n });\n } catch (error) {\n next(error);\n }\n }\n\n private async readCoherenceReport(_req: Request, res: Response, next: NextFunction) {\n try {\n const { report, markdown } = await this.playbookRunService.buildCoherenceReport();\n res.json({ ...report, markdown });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/loop` — chain playbooks unattended.\n *\n * `maximumIterations` is required and bounded: an unattended loop over a developer's source tree must\n * have a ceiling the CALLER chose, not one this handler picked on their behalf.\n */\n private async runPlaybookLoop(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const goal = typeof body.goal === 'string' && body.goal.trim().length > 0 ? body.goal.trim() : null;\n if (!goal) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`goal` is required and must be a non-empty string.' },\n });\n }\n const maximumIterations = Number(body.maximumIterations);\n if (!Number.isSafeInteger(maximumIterations) || maximumIterations < 1 || maximumIterations > 20) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`maximumIterations` is required and must be an integer between 1 and 20.' },\n });\n }\n const fanOut = body.fanOut === undefined ? undefined : Number(body.fanOut);\n if (fanOut !== undefined && (!Number.isSafeInteger(fanOut) || fanOut < 1 || fanOut > 5)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`fanOut` (lanes per iteration) must be an integer between 1 and 5 when provided.' },\n });\n }\n const result = await this.playbookRunService.runPlaybookLoop({\n goal,\n maximumIterations,\n ...(fanOut !== undefined ? { maximumLanesPerIteration: fanOut } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json({\n stoppedBecause: result.stoppedBecause,\n steps: result.steps,\n accepted: false,\n note: 'Any files written are working edits. Review `git status` and commit to accept them. '\n + 'Each iteration may run several output-disjoint lanes concurrently; every lane records its own revertible run.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n // 409: the caller is authorized and the payload is valid; the current STATE forbids a second run.\n // Caught on the BASE: a loop iteration can select a composite, so this route can be refused by\n // the choreography's single-flight guard as well as by the loop's own.\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * Read `elicitationAnswers` off an untrusted body without inventing anything.\n *\n * Shape only — whether the answers MATCH the playbook's declared questions is the runtime's contract to\n * enforce, and duplicating that check here would create a second description of the interview.\n */\n\n /**\n * The operator-facing sentence for a DISPATCH run.\n *\n * Extracted because the two call sites had drifted into two half-true copies, and a LIVE dry run\n * caught both: the note claimed \"Application CODE was written in the workspace\" on a run that\n * wrote nothing, and said \"to the coding agent\" for a task whose targetKind was\n * COMPANION_GENERATION_STEP -- which the COMPANION executes, not a coding agent. The dispatch\n * service routes by the task's own target kind and serves BOTH executors, so the message must read\n * it rather than assume one.\n *\n * No unit test caught either: they assert the service RESULT, and this is the controller's prose.\n */\n /**\n * What a `top_down.expert-personas` run did (#572), as a sentence — derived/waiting/refused counts and where\n * the charters went. The persona accept step writes with the filesystem, not the write register, so no\n * `POST /runs/writes/{runId}/revert` is offered: the remedy for a charter you do not want is `git`.\n */\n private describeStaffingOutcome(result: {\n readonly dryRun?: true;\n readonly roster: readonly unknown[];\n readonly alreadyCommitted: readonly string[];\n readonly derived: ReadonlyArray<{ readonly roleRef: string }>;\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n }): string {\n if (result.dryRun === true) {\n return `Dry run: the roster of ${result.roster.length} convened role(s) was computed and NOTHING was derived or written.`;\n }\n const parts = [\n `${result.derived.length} charter(s) derived and accepted into specifications/src/personas/ (${result.derived.map((entry) => entry.roleRef).join(', ') || 'none'})`,\n `${result.alreadyCommitted.length} already committed and left alone`,\n ];\n if (result.waiting.length > 0) {\n parts.push(`${result.waiting.length} waiting on families not yet landed (${result.waiting.map((entry) => `${entry.roleRef}: ${entry.missingFamilies.join('+')}`).join('; ')}) — re-run once they land`);\n }\n if (result.refused.length > 0) {\n parts.push(`${result.refused.length} refused (${result.refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; ')})`);\n }\n return `Staffed the expert panels: ${parts.join('; ')}. Review \\`git status\\` and commit to accept the charters; nothing here goes through the write register.`;\n }\n\n private describeDispatchOutcome(result: {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly remainingReadyTaskRefs: readonly string[];\n readonly dryRun?: true;\n } | { readonly wave: ApplicationBuildWaveResult }): string {\n if ('wave' in result) {\n // A parallel wave (#1528): what ran, how it settled, and what the end-of-wave repair committed.\n const { wave } = result;\n const settled = wave.outcomes.filter((outcome) => outcome !== null);\n const completed = settled.filter((outcome) => outcome!.status === FlowsActors_Status.COMPLETED).length;\n const reconciled = wave.reconciliation.filter((entry) => entry.committedPaths > 0).length;\n return `Ran a parallel build wave at degree ${wave.degree}: ${wave.dispatched.length} task(s) dispatched, `\n + `${completed} of ${settled.length} coding run(s) completed, ${reconciled} reconciled at the end of the wave. `\n + `It stopped taking tasks because: ${wave.stoppedFillingBecause}. Each run's row carries \\`concurrency\\` and \\`interferenceSuspected\\`.`;\n }\n const executor = result.targetKind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n ? \"the companion's own generation pipeline\"\n : 'the coding agent';\n const remainder = `${result.remainingReadyTaskRefs.length} further task(s) were ready and were NOT run: dispatch is single-flight, one task per run.`;\n if (result.dryRun === true) {\n return `Dry run: the next ready build task is \\`${result.taskRef}\\`, which would run on ${executor}. NOTHING was dispatched and nothing was written. ${remainder}`;\n }\n return `Dispatched build task \\`${result.taskRef}\\` to ${executor}. Work landed in the application WORKSPACE -- not the specifications package -- so review \\`git status\\` there and commit to accept it. ${remainder}`;\n }\n\n private readElicitationAnswers(value: unknown): readonly PlaybookElicitationAnswer[] | undefined {\n if (value === undefined || value === null) return undefined;\n if (!Array.isArray(value)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`elicitationAnswers` must be an array of { questionRef, answer }.' },\n });\n }\n return value.map((entry: unknown, index: number) => {\n const shaped = entry as { questionRef?: unknown; answer?: unknown } | null;\n if (typeof shaped?.questionRef !== 'string' || typeof shaped.answer !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `elicitationAnswers[${index}] must be { questionRef: string, answer: string }.` },\n });\n }\n return { questionRef: shaped.questionRef, answer: shaped.answer };\n });\n }\n\n /**\n * `GET /build/next` — what the next coding run would be.\n *\n * A read, deliberately separate from the action rather than a flag on it. Seeing the scope before\n * starting a run is genuinely useful; making the run itself demand a second \"yes\" is a ceremony that\n * enforces nothing the mutation scope, the lock and the change-set capture do not already enforce.\n */\n private async describeNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * SPREAD, so `plan` stays exactly where every existing reader already looks. There are THREE\n * answers, all 200: a `plan`; `plan: null` with `exhausted` (every task landed); and `plan: null`\n * with `stuckQueue` and a non-empty `stuckTasks` (every ready task is stuck, #1451 — this was a\n * 400 before). So `plan: null` alone does NOT mean finished; read `exhausted`. `stuckTasks` is\n * present beside a plan too, naming what the selection passed over.\n */\n const description = await this.buildDispatchService.describeNextBuildTaskOrExhaustion();\n res.json({ ...description, dispatched: false });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `GET /build/dispatches` — how far each recent dispatch got (`Workbench_BuildDispatchPhase`).\n *\n * EVERY dispatch, since #1274: the workbench fires through the `dispatch_next` resource operation\n * rather than through this route's `async` door, and the record used to be kept only by the latter.\n *\n * Not an outcome for a coding task: that dispatch settles at ADMITTED, and the run's result is the durable\n * actor-task row the record names (`codingTaskId`).\n */\n private async readBuildDispatches(_req: Request, res: Response, next: NextFunction) {\n try {\n // Read from the actor plane since #1359, so the narrative survives a companion restart.\n res.json({ dispatches: await this.buildDispatchService.readDetachedDispatches(this.getTraceSession(res)) });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /build/tasks` — every build-plan task in ONE read (#1521): its attempts newest first, the typed\n * reason dispatch passes over it, and for a task that ran without landing, exactly what each unmet\n * probe searched for and whether the working tree holds it. Composed from rows that already exist and\n * stored nowhere. `{ records: null }` when the application has no build plan — absence, not an empty\n * build.\n */\n private async readBuildTaskRecords(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ records: (await this.buildDispatchService.describeBuildTaskRecords(this.getTraceSession(res))) ?? null });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/rearm` — the door the \"completed but not landed\" guard was missing\n * (#1535). Records a re-arm on every completed run that still holds the task, so the next dispatch\n * offers it again. Refuses with 409, naming why, when there is nothing to re-arm.\n */\n private async rearmBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionRearmBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a re-arm request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const taskRef = String(req.params.taskRef);\n res.json(await this.buildDispatchService.rearmBuildTask(taskRef, parsed.data, this.getTraceSession(res)));\n } catch (error) {\n if (error instanceof NothingToRearmError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/dispatch-next` — run the next ready build-plan coding task.\n *\n * It runs. The boundary is the task's own `target.kind`, one workspace-mutating run is admitted at a\n * time, the change-set is captured around it, and the required checks gate the result. Under the\n * autonomy posture a working result is then committed by the loop, authored as the companion; under\n * GUIDED nothing is accepted until a person commits (#1534).\n */\n private async dispatchNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n // DETACHED mode: a generation step can outlive any reasonable HTTP ceiling (an i18n run\n // measured 40+ minutes against the 30-minute server cap, 2026-09-04), and a response that\n // dies with the socket leaves the operator blind. 202 + the selected plan now. A generation step's\n // outcome is readable at GET /build/dispatches; a coding task settles there at ADMITTED, and its\n // outcome is the durable actor-task row the record names.\n if (body.async === true) {\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res));\n res.status(202).json({ plan, dispatched: true, async: true, note: 'Running detached. `wildo build dispatches` shows how far it got: a companion generation step reaches FINISHED there; a coding task reaches ADMITTED, and `wildo creation feed --follow` reports how it settles.' });\n return;\n }\n const result = await this.buildDispatchService.dispatchNextBuildTask(\n this.getTraceSession(res),\n );\n res.json({\n plan: result.plan,\n dispatched: true,\n ...(result.admission ? { admission: result.admission } : {}),\n ...(result.generationStep ? { generationStep: result.generationStep } : {}),\n note: result.generationStep\n ? 'The companion ran this generation step itself. Review `git status` and commit what you accept.'\n : 'A coding agent is running. Its change-set is captured; review `git status` and commit what you accept.',\n });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /** `POST /playbooks/:playbookRef/judge` — judges SUPPLIED artifacts against a playbook's evaluation treatment; nothing lands. */\n private async judgePlaybookArtifacts(req: Request, res: Response, next: NextFunction) {\n try {\n const { playbookRef } = req.params;\n const body = req.body || {};\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n if (!Array.isArray(body.artifacts) || body.artifacts.length === 0\n || body.artifacts.some((entry: unknown) => typeof (entry as { family?: unknown })?.family !== 'string')) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`artifacts` must be a non-empty array of { family, value }.' },\n });\n }\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const result = await this.playbookRunService.judgeArtifacts({\n playbookRef,\n artifacts: body.artifacts,\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(result);\n } catch (error) {\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /** `GET /runs/writes` — the write register, newest first. Pre-images stay in the records; the listing is a summary. */\n private async listRunWrites(_req: Request, res: Response, next: NextFunction) {\n try {\n const records = await this.runWriteRegister.list();\n res.json({\n runs: records.map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n files: record.files.map((file) => ({ path: file.path, existedBefore: file.existedBefore })),\n })),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes/:runId/diff` — what one run changed, per file (#1274).\n *\n * A pure read — nothing is locked, written or reverted. The workbench does not call it: it reads the\n * same diff through the `read_diff` operation on the run-write-records resource, on the engine's\n * authenticated `/api/v1` plane. This route serves the token-holding callers.\n *\n * It sits beside the revert door on purpose. A run that can be UNDONE must also be SHOWN: acceptance\n * is your own git commit, and a commit decision with nothing to inspect is not one.\n */\n private async readRunWritesDiff(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n this.jsonSuccess(res, await this.runWriteRegister.describeRunDiff(runId));\n } catch (error) {\n /*\n * An unknown run is the caller's mistake and must say so. Passed through raw, it answered a\n * sanitized 500 with an empty body — what `wildo creation diff <typo>` then printed (#1652).\n * The shared translator is what revert and accept already answer with.\n */\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `POST /runs/writes/:runId/revert` — restore one run's pre-images. Refuses human-edited files unless\n * `force`, and ALWAYS refuses a file a later run landed on (#1614): revert the newest run first.\n */\n private async revertRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const force = (req.body || {}).force === true;\n const outcome = await this.runWriteRegister.revert(runId, { force });\n res.json({\n ...outcome,\n note: outcome.refusedLaterRun.length > 0\n // #1614: never forced, because it would destroy another run's work nobody asked to undo.\n ? `Some files hold a later run's landing and were NOT reverted, even with force: revert ${[...new Set(outcome.refusedLaterRun.map((entry) => entry.runId))].join(', ')} first.`\n : outcome.refusedDiverged.length > 0\n ? 'Some files were edited after the run and were NOT reverted; pass force:true to revert them anyway.'\n : 'All of this run\\'s writes were reverted.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunWriteRecordNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * A missing or exhausted build plan is a bad request, not a broken host.\n *\n * Shared by the two BUILD routes and by the playbook run route, which reaches the same dispatch\n * through a playbook declaring `executor: CODING_AGENT` (#119). Falls through to `next(error)` for\n * anything else, so it is safe to call as the last arm of a catch.\n */\n private forwardBuildDispatchError(error: unknown, next: NextFunction): void {\n if (error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n || error instanceof ApplicationBuildTaskNotACodingTaskError\n /*\n * The one that carries the AGENT'S QUESTION. Absent from this list, every ready task being\n * parked answered a sanitized 500 \"internal\" — the operator was told nothing, about a state\n * whose entire remedy is reading what was asked and answering it.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof ApplicationBuildUnknownGenerationStepError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /**\n * `POST /build/tasks/:taskRef/dispatch` — run ONE named build-plan task, the console's\n * `wildo build run <taskRef>`. DETACHED, like `POST /build/dispatch-next`: a coding run takes minutes,\n * and a console that held a socket over it would report nothing while it ran and a failure if the\n * socket broke. It answers 202 with the selected plan; the feed and `wildo build dispatches` say how\n * it went. Readiness is the service's to refuse — a task that is not ready is refused BEFORE the 202 —\n * and its refusals are translated as the workbench's `dispatch_task` operation translates them.\n */\n private async dispatchNamedBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res), { taskRef: String(req.params.taskRef) });\n res.status(202).json({ plan, dispatched: true, async: true });\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/accept` — commit the latest coding run's writes for a task\n * (`wildo build accept`). The subject line is the task's own objective, read from the build plan,\n * exactly as the workbench's `accept` operation composes it.\n */\n private async acceptBuildTaskRun(req: Request, res: Response, next: NextFunction) {\n try {\n const taskRef = String(req.params.taskRef);\n const task = (await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS))\n .find((row) => row.taskRef === taskRef);\n const objective = typeof task?.objective === 'string' ? task.objective : undefined;\n res.json(await this.acceptedChangeCommitService.acceptCodingRun({\n taskRef,\n ...(objective ? { subject: objective } : {}),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `POST /runs/writes/:runId/accept` — commit what one playbook run wrote (`wildo creation accept`). */\n private async acceptPlaybookRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.acceptedChangeCommitService.acceptPlaybookRun({\n runId: String(req.params.runId),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `GET /traces` — recent execution sessions, newest first. */\n private async listExecutionTraces(req: Request, res: Response, next: NextFunction) {\n try {\n const limit = Number(req.query.limit);\n const sessions = await this.executionTraceReadService.listSessions(\n Number.isSafeInteger(limit) && limit > 0 && limit <= 200 ? limit : undefined,\n );\n res.json({ sessions });\n } catch (error) { next(error); }\n }\n\n /**\n * `GET /traces/:sessionId` — one run, in order.\n *\n * Events carry what happened and why; artifacts are LISTED rather than inlined, because one model answer\n * can be tens of kilobytes and a session can hold several. Fetch a body when you want it.\n */\n private async readExecutionTrace(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.readSession(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /traces/:sessionId/usage` — what one session spent, in tokens (#1274).\n *\n * Derived, not stored: the agent-call trace sink already writes each call's usage into this\n * session's events, so nothing new is recorded to answer this. Tokens only — a currency figure\n * would need a per-model rate card this repository does not have, and a fabricated number where an\n * operator expects a measured one is the failure this board exists to avoid.\n */\n private async readExecutionTraceUsage(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.summarizeSessionUsage(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** `GET /traces/:sessionId/steps/:stepDirName/artifacts/:fileName` — one artifact body, verbatim. */\n private async readExecutionTraceArtifact(req: Request, res: Response, next: NextFunction) {\n try {\n const body = await this.executionTraceReadService.readArtifact(\n String(req.params.sessionId), String(req.params.stepDirName), String(req.params.fileName),\n );\n res.type('text/plain').send(body);\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /trace-aliases/actor-task/:taskId` — the trace sessions a coding run recorded into, latest first.\n *\n * Empty for a task the coding lane never ran: that is the ordinary case, not a failure, so it\n * answers `200 { sessionIds: [] }` rather than refusing.\n */\n private async listActorTaskTraceSessions(req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ sessionIds: await this.executionTraceReadService.listActorTaskSessionIds(String(req.params.taskId)) });\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** A missing trace is a bad request, not a broken host. */\n private forwardExecutionTraceError(error: unknown, next: NextFunction): void {\n if (error instanceof ExecutionTraceNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /**\n * The creation board's explicit Refresh (bridge window, `workbench-creation-board-resources.md`\n * Phase 2): drops EVERY derived board the projection caches, not only eligibility. Answers\n * `{invalidated: true}` at once rather than recomputing inline. For boards a workbench tab is\n * watching, the projection's publication pass re-derives them about 250 ms later in the background\n * and publishes whichever moved; an unwatched board is recomputed by the next read that wants it.\n */\n private async refreshPlaybookBoard(_req: Request, res: Response, next: NextFunction) {\n try {\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json({ invalidated: true });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks/:playbookRef/decision` — what this playbook asks a person, before it runs.\n *\n * Answers `{ decision: null }` for a playbook with no interview, so a caller may ask\n * unconditionally rather than first deciding from `requiresElicitation` whether the question is\n * worth asking.\n */\n private async readPlaybookElicitationDecision(req: Request, res: Response, next: NextFunction) {\n try {\n const decision = await this.playbookRunService.readPlaybookElicitationDecision(String(req.params['playbookRef']));\n res.json({ decision });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks` — the eligibility board.\n *\n * Deterministic: it reads the working tree and answers what can run now. This is the gate a model\n * may choose WITHIN and can never widen. It writes nothing, but it is not free of effects — a read\n * that finds the projection's inputs moved drops its caches, which schedules a publication pass to\n * the workbench (see below).\n *\n * Served from the creation-plane projection's CACHED board (#1310 item 5), the same derivation the\n * workbench's playbook list reads. It used to call the playbook service directly — no cache, no\n * single-flight — and measured 22–134 s per call, so a script polling it stacked full derivations\n * behind each other.\n *\n * The resource lane may lag an out-of-process edit by up to one 15 s sweep; this door does not. It\n * re-checks the input signature before reading (one ~60-110 ms walk), and a moved input drops both\n * the cached board and any derivation still in flight from before the move — so an edit an agent\n * made a moment ago is what this read computes against.\n */\n private async listPlaybooks(_req: Request, res: Response, next: NextFunction) {\n try {\n const board = await this.creationPlaneProjection.readFreshPlaybookEligibilityBoard();\n /*\n * No board-level `phase`. It reported a derived APPLICATION phase that was deleted on\n * 2026-09-04 — an application is not in a mode of reasoning, it holds artifacts produced by\n * several. Each row still carries the PLAYBOOK's own phase label, which is the only one that\n * was ever true.\n */\n res.json({\n eligibleCount: board.playbooks.filter((entry) => entry.eligible).length,\n // The application's main line (#1603): what decides which of these rows it may run at all.\n applicationLine: board.applicationLine,\n // What that line no longer uses but the workspace still holds: reported, never removed (#1604).\n applicationLineOrphans: board.applicationLineOrphans,\n // The derived active set (#1607): the line's root, each playbook's place in it, and the tree.\n ...(board.activeSet ? { activeSet: board.activeSet } : {}),\n playbooks: board.playbooks,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances` — open a playbook INSTANCE for a purpose (#1609).\n *\n * Recorded in the dossier's activation record and committed at once under the automatic posture, with the\n * purpose and the actor as commit trailers. This door is a person's (the workbench, the CLI), so its actor\n * is the creator; the conversation's tool records its own acts as the agent's.\n */\n private async openPlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n /* `neededFamilies` (#1608): what a secondary line needs back from the main line, each a family value. */\n /* ...and `refinedFamilies`: what a refinement line re-derives. Both are lists of family values. */\n const families = new Set<string>(Object.values(ApplicationSpecificationFamily));\n const isFamilyList = (value: unknown): boolean => Array.isArray(value) && value.every((family: unknown) => typeof family === 'string' && families.has(family));\n const malformed = (['neededFamilies', 'refinedFamilies'] as const).find((field) => body[field] !== undefined && !isFamilyList(body[field]));\n if (malformed !== undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"${malformed}\" must be a list of specification family values.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.openInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: typeof body.instanceKey === 'string' ? body.instanceKey : '',\n purpose: typeof body.purpose === 'string' ? body.purpose : '',\n ...(body.neededFamilies !== undefined ? { neededFamilies: body.neededFamilies as ApplicationSpecificationFamily[] } : {}),\n ...(body.refinedFamilies !== undefined ? { refinedFamilies: body.refinedFamilies as ApplicationSpecificationFamily[] } : {}),\n actor: DecisionRecordActor.CREATOR,\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n res.status(result.commitSha ? 201 : 200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances/:instanceKey/close` — close an instance (#1608): `completed` or\n * `abandoned`, with an optional reason. Recorded and committed; abandoning cancels its runs waiting on a person\n * and consumes its interrupted progress. 400 for an instance nobody opened or one already closed, 409 while a\n * coding run holds the tree.\n */\n private async closePlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const kind = Object.values(ApplicationPlaybookInstanceClosureKind).find((candidate) => candidate === body.kind);\n if (kind === undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"kind\" must be one of ${Object.values(ApplicationPlaybookInstanceClosureKind).join(', ')}.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.closeInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: String(req.params.instanceKey ?? ''),\n kind,\n ...(typeof body.reason === 'string' ? { reason: body.reason } : {}),\n actor: DecisionRecordActor.CREATOR,\n });\n res.status(200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/run` — run one compiled playbook and land its outputs.\n *\n * The response reports the FILES that appeared and how many attempts each family took. It reports no\n * acceptance, because none happened in the run: under the autonomy posture the companion commits these\n * writes before the next build baseline (authored as itself), and under GUIDED a person does (#1534).\n */\n private async runPlaybook(req: Request, res: Response, next: NextFunction) {\n try {\n const playbookRef = req.params.playbookRef;\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n const body = req.body || {};\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n /*\n * Per-run answers ONLY: this route files nothing in the dossier. The workbench's Run gate files the\n * answers the dossier still needed before it runs (`fileStillNeededAnswers`, #1454 review), and it\n * can because a signed-in person is there to record them against; this is the CLI/script door,\n * with no person to attribute an answer to, so its answers stay overrides of this run.\n */\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const dryRun = body.dryRun === true;\n // The playbook INSTANCE to run (#1609); the run refuses one that was never opened.\n const instanceKey = typeof body.instanceKey === 'string' && body.instanceKey.trim().length > 0 ? body.instanceKey.trim() : undefined;\n const runInput = {\n playbookRef,\n ...(instanceKey ? { instanceKey } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(dryRun ? { dryRun: true } : {}),\n };\n /*\n * `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for\n * the run's life, and the server's 30-minute ceiling is shorter than a choreography's own\n * bound — the connection died at exactly 1800s twice while the run completed server-side. The\n * outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.\n */\n if (body.async === true) {\n res.status(202).json(await this.playbookRunService.submitPlaybookRunDetached(runInput));\n return;\n }\n const result = await this.playbookRunService.runPlaybook(runInput);\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n // 200, not an error status: the run is HEALTHY and waiting. The creator answers through\n // POST /playbooks/runs/:runId/resume, which is the industry three-action model\n // (accept / decline / cancel) at the transport.\n res.json({\n ...result,\n accepted: false,\n note: 'The derivation stopped at a decision only you can make. Answer it with `wildo creation questions`, then '\n + '`wildo creation answer <questionId>` (or `/wildo:answer` in a Claude Code session). An HTTP client answers with '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume — `\n + `{ \"round\": ${result.round}, \"action\": \"accept\", \"answers\": [{ \"ref\": \"...\", \"answer\": \"...\" }] }, `\n + 'or \"decline\" to have it choose and state its assumption, or \"cancel\" to abandon the run. '\n + `Carry the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token — `\n + 'resume is a mutating route and the token floor refuses it without one. '\n + 'Nothing has been generated or written.',\n });\n return;\n }\n if ('scenarios' in result) {\n // The composite foundation executor: no landed families — the deliverable is the composed\n // application itself (config mutation + module/resource slices in the working tree).\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: dryRun\n ? 'Dry run: the foundation plan was derived and NOTHING was written.'\n : 'The application was composed from the domain plan. Review `git status` and commit to accept it.',\n });\n return;\n }\n /*\n * The WHOLE result, not a hand-picked list of it.\n *\n * This branch used to name five fields — `playbookRef`, `landed`, `generation`, `judge`,\n * `runId` — while the service returned ten, so `diagrams`, `decisions`, `reviewGuide`, `wired`\n * and `wiringSkipped` were computed on every run and dropped at the last hop. A creator never\n * saw which pictures were written, which decisions were recorded, what the playbook says a good\n * result is, or which families were deliberately not wired. Found by the first live run\n * (2026-08-28), not by any test: the service tests assert the service's return value, and\n * nothing asserted what the HTTP layer forwards.\n *\n * The service already returns the SLIM shape — pre-images and rendered bytes stay in the write\n * register — so spreading it is safe, and it is what both sibling branches above already do. A\n * hand-picked list is a second description of the response that silently drifts from the first\n * every time the service grows a field.\n */\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: 'assessed' in result\n ? 'Assessed — this playbook produces no artifact. Nothing was generated or written; the verdict and the review guide are above.'\n /*\n * A DISPATCH run wrote application CODE in the workspace, not a specification. The generic\n * note below would be false twice over: it names the wrong tree, and it offers a write-register\n * revert (`wildo creation revert <runId>`) that has no record for this run — a remedy an\n * operator would try and find missing at the moment they need it.\n */\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n /*\n * A STAFFING run (#572) wrote charter modules through the persona accept step, not through the\n * write register — so the generic note's revert offer would point at a record that does not exist.\n */\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n : dryRun\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n /*\n * Names the console VERBS, never the route (#1659 principle 2): this note is read by a\n * person or a Claude Code session, and the verbs are the surface both are given.\n */\n : 'runId' in result && typeof result.runId === 'string'\n ? `Files were written to the specifications package. Review them with \\`wildo creation diff ${result.runId}\\`, then accept with \\`wildo creation accept ${result.runId}\\` or undo with \\`wildo creation revert ${result.runId}\\`.`\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n /*\n * A SECOND composite, refused. 409 and not 500: the caller is authorized, the payload is valid,\n * and it is the companion's current STATE that forbids the run — the same answer the loop route\n * has always given, which this route needed the day `runChoreography` started refusing. Without\n * it a creator launching a second market analysis would get \"internal\" and no way to learn that\n * their own earlier run is what is in the way; the message names its ref and start time.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n // Refusals a creator must be able to READ, rather than a sanitized 500.\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookNotReadyError || error instanceof PlaybookElicitationError || error instanceof FoundationExecutionError) {\n // Readiness and a malformed interview are both bad requests: the caller must change what they sent\n // (supply the answers, or produce the missing input first). Neither has a \"proceed anyway\".\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A run whose model could not produce a valid family within its attempts. Its message names the family,\n * the attempt count and the LAST REJECTION — everything a creator needs to decide what to change.\n * It fell to `next(error)` and reached the caller as the bare token `validation`, measured 2026-09-13\n * on Wonder CRM's first compliance-conception run: the reason existed only in the trace.\n */\n if (error instanceof PlaybookGenerationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * The run's output file moved after the run read it, so it landed nothing rather than replace that\n * change (#1614). A CONFLICT, not a bad request: what was sent was valid, the working tree moved under\n * it, and the message names who moved it and that running the playbook again is the repair.\n */\n if (error instanceof PlaybookRunLandingConflictError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A DISPATCH refusal reaches here now, and it did not before.\n *\n * Wiring `executor: CODING_AGENT` to the build dispatch (#119) made this route a third caller\n * of `dispatchNextBuildTask`, whose refusals — an exhausted plan, a missing plan, an unknown\n * generation step — are bad requests carrying an actionable message. They were translated for\n * the two BUILD routes only, so through this one they fell to `next(error)` and reached the\n * creator as a sanitized 500 saying \"internal\".\n *\n * That is reachable today rather than hypothetically: a build plan whose tasks have all landed\n * throws `ApplicationBuildPlanExhaustedError`, and \"the build is finished\" is precisely the\n * state a creator running the playbook is most likely to be in.\n */\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /playbooks/runs/:runId/resume` — the creator's half of a mid-run clarification.\n *\n * Body: `{ round: number, action: 'accept' | 'decline' | 'cancel', answers?: [{ ref, answer }] }` —\n * `round` required: the round of questions this acts on, refused 409 once the run has moved past it\n * (#1584). The vocabulary\n * is MCP elicitation's, because a creator answering a derivation's question is the same interaction\n * an MCP client mediates, and inventing a fourth verb for it would only make the two harder to\n * bridge later.\n */\n private async resumePlaybookRun(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const body = req.body || {};\n // The round this answers — required, so an answer acts only on the round its caller read (#1584).\n if (typeof body.round !== 'number' || !Number.isInteger(body.round) || body.round < 1) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`round` (a positive integer) is required: the round of questions this answers, as the waiting run carries it.' },\n });\n }\n const round: number = body.round;\n /*\n * REQUIRED, as on the workbench's resume operation (#1785): a missing action used to mean ACCEPT, a\n * guess about which of three different answers the caller gave.\n */\n const rawAction: unknown = body.action;\n const action = Object.values(MetaWorkflow_ClarificationAction).find((candidate) => candidate === rawAction);\n if (!action) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: `${rawAction === undefined ? 'An `action` is required.' : `Unknown action \\`${String(rawAction)}\\`.`} Expected one of: ${Object.values(MetaWorkflow_ClarificationAction).join(', ')}.`,\n },\n });\n }\n if (body.answers !== undefined && (!Array.isArray(body.answers) || body.answers.some((entry: unknown) =>\n typeof entry !== 'object' || entry === null || typeof (entry as { ref?: unknown }).ref !== 'string'\n || typeof (entry as { answer?: unknown }).answer !== 'string'\n || !['undefined', 'string'].includes(typeof (entry as { answeredByRef?: unknown }).answeredByRef)))) {\n throw new PlaybookClarificationError('Every clarification answer must contain string ref and answer fields (and, optionally, a string answeredByRef).');\n }\n const answers: { ref: string; answer: string; answeredByRef?: string }[] = body.answers ?? [];\n // WHO answered (#1658): per answer, or for the whole request; absent records nothing rather than a guess.\n const answeredByRef = typeof body.answeredByRef === 'string' && body.answeredByRef.trim().length > 0 ? body.answeredByRef.trim() : undefined;\n if (action === MetaWorkflow_ClarificationAction.ACCEPT && answers.length === 0) {\n // Refused rather than silently treated as a decline: \"I answered\" and \"you decide\" lead to\n // different artifacts, and a dropped answer would be invisible in both.\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Action `accept` requires at least one `{ ref, answer }` in `answers`. Use `decline` to have the derivation choose and state its assumption.' },\n });\n }\n const result = await this.playbookRunService.resumePlaybookRun({\n runId,\n round,\n action,\n ...(answers.length > 0 ? { answers } : {}),\n ...(answeredByRef ? { answeredByRef } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.CANCELLED) {\n res.json({ ...result, note: 'The run was abandoned. Nothing was generated and nothing was written.' });\n return;\n }\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n res.json({\n ...result,\n accepted: false,\n note: `Still waiting: the derivation has further questions (round ${result.round}). Answer them with `\n + '`wildo creation answer <questionId>` (`wildo creation questions` names it), or, from an HTTP client, at '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume with \"round\": ${result.round} and an \"action\" `\n + '(accept, decline or cancel), '\n + `carrying the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token.`,\n });\n return;\n }\n if ('scenarios' in result) {\n res.json({ ...result, accepted: false, note: 'The application was composed. Review `git status` and commit to accept it.' });\n return;\n }\n // The whole result, for the same reason the run handler forwards it whole: a hand-picked\n // list is a second description of the response that drifts every time the service grows a\n // field. This branch had the same five-of-ten omission and nobody had noticed it either.\n res.json({\n ...result,\n accepted: false,\n note: 'assessed' in result\n ? 'Assessed — nothing was generated or written; the verdict and the review guide are above.'\n // Same correction as the run handler: a dispatch wrote CODE in the workspace, not a specification.\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n /*\n * A dry run stays a dry run after its answer: the checkpoint carries `dryRun`, and the\n * resumed result reports it. The run handler above says so; this branch did not, so an\n * answered dry run told the operator files were written when none were (2026-09-24).\n */\n : 'dryRun' in result && result.dryRun === true\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n if (error instanceof SupersededPlaybookRunQuestionError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n // No run is waiting under that id — a missing resource, 404, as the error class promises (#1584). Its\n // words travel as guidance: a 404's context is stripped before it reaches the client.\n if (error instanceof SuspendedPlaybookRunNotFoundError) {\n next(this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.SUSPENDED_PLAYBOOK_RUN_NOT_WAITING, { explanation: error.message },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: error.message } }));\n return;\n }\n if (error instanceof PlaybookClarificationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * The creation console's PORTS, bound to the same services the workbench's creation-plane operations\n * call — one binding, so the console's answer and the workbench's cannot reach different code. The\n * request's trace session travels with every call, as it does on the bespoke routes.\n */\n private creationConsolePorts(res: Response): CreationConsolePorts {\n const session = res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n return {\n deriveRows: (behavior) => this.creationPlaneProjection.deriveRows(behavior),\n resumePlaybookRun: (input) => this.playbookRunService.resumePlaybookRun({ ...input, ...(session ? { session } : {}) }),\n respondToParkedQuestion: (taskId, answer, suspensionRef, answeredByRef) =>\n this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, session, { suspensionRef, ...(answeredByRef ? { answeredByRef } : {}) }),\n cancelCodingRun: (taskId) => this.codingAgentDispatchService.cancelApplicationCodingTask(taskId, session),\n recordInterviewAnswer: (input) => this.dossierService.recordAnswer(input),\n invalidate: () => this.creationPlaneProjection.invalidateDerivedBoards(),\n };\n }\n\n /**\n * `GET /creation/feed` — Home's lines for a console: what happened (a run completed or was refused, a\n * dispatch settled), what is asked of the person, what could come next. Each line carries the row it\n * points at, so a run's verdict and error or a dispatch's outcome arrive in the same read, and the id\n * of the queued question it is about.\n *\n * Every board is read through the projection the workbench reads. That is NOT free on every poll: the\n * cached boards (eligibility, the build plan) answer from cache until an input moves, but Home also\n * re-derives the actor-plane boards it folds (runs, dispatches, waiting runs, parked questions) on each\n * read, and a read adopts the served rows as the publication baseline. Polled, it is therefore\n * trace-exempt (`COMPANION_TRACE_EXEMPT_GET_PATHS`), and the CLI's default interval is seconds, not less.\n */\n private async readCreationConsoleFeed(_req: Request, res: Response): Promise<void> {\n const lines = await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.HOME_LINES) as unknown as readonly Workbench_CreationHomeLine[];\n const behaviors = [...new Set(lines\n .map((line) => creationPlaneBehaviorForResourceType(line.targetResourceType))\n .filter((behavior): behavior is WorkbenchCreationPlaneBehavior => behavior !== null))];\n const rowsByBehavior = new Map(await Promise.all(\n behaviors.map(async (behavior) => [behavior, await this.creationPlaneProjection.deriveRows(behavior)] as const),\n ));\n const feed: CreationConsole_Feed = {\n computedAt: new Date().toISOString(),\n lines: buildCreationConsoleFeed(lines, (resourceType, resourceId) => {\n const behavior = creationPlaneBehaviorForResourceType(resourceType);\n if (!behavior) return null;\n const identityField = CREATION_PLANE_IDENTITY_FIELDS[behavior];\n return rowsByBehavior.get(behavior)?.find((row) => row[identityField] === resourceId) ?? null;\n }),\n };\n this.lastCreationFeedSummary = summarizeCreationConsoleFeed(feed);\n res.json(feed);\n }\n\n /** What the most recent feed read counted — the pulse's `summary`, `null` until someone reads the feed. */\n private lastCreationFeedSummary: CreationConsole_PulseSummary | null = null;\n\n /**\n * `GET /creation/pulse` — the console's poll (#1657): a hook runs it on every prompt and a status line\n * every few seconds, so it derives NOTHING. The change cursor and the run count are in memory; the\n * summary is the last feed read's, carried with its instant. A poller compares two pulses and reads\n * the feed only when one moved — which also refreshes the summary. Trace-exempt, like the feed.\n */\n private async readCreationConsolePulse(_req: Request, res: Response): Promise<void> {\n const cursor = this.creationPlaneProjection.readChangeCursor();\n const pulse: CreationConsole_Pulse = {\n sequence: cursor.sequence,\n changedAt: cursor.changedAt,\n runsInFlight: this.playbookRunService.countRunsInFlightInProcess(),\n summary: this.lastCreationFeedSummary,\n };\n res.json(pulse);\n }\n\n /** `GET /creation/questions` — every question waiting on the person, as one queue. */\n private async readCreationConsoleQuestionQueue(_req: Request, res: Response): Promise<void> {\n const queue: CreationConsole_QuestionQueue = {\n computedAt: new Date().toISOString(),\n questions: await readCreationConsoleQuestions(this.creationConsolePorts(res)),\n };\n res.json(queue);\n }\n\n /**\n * `POST /creation/questions/answer` — answer, decline or cancel ONE queued question.\n *\n * The console's own refusals (an id that names nothing, a question that moved on, an action the item\n * does not admit) answer 400 or 409 with their sentence; a service's refusal is translated exactly as\n * the workbench's operation translates it, so a refusal reads the same through both doors.\n */\n private async answerCreationConsoleQuestion(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_AnswerRequest_Schema.safeParse(req.body ?? {});\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: parsed.error.issues.map((issue) => `${issue.path.join('.') || 'body'}: ${issue.message}`).join('; ') },\n });\n }\n res.json(await answerCreationConsoleQuestion(this.creationConsolePorts(res), parsed.data));\n } catch (error) {\n if (error instanceof CreationConsoleRefusal) {\n const malformed = error.refusal === CreationConsoleRefusalKind.MALFORMED;\n next(this.errorBuilder.buildError(malformed ? ErrorType.VALIDATION : ErrorType.CONFLICT, undefined, {\n customMessageReference: malformed ? ErrorCustomMessageReference.VALIDATION : ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n private async marketGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const {\n templateRef,\n icpRef,\n featureRef,\n benefitRef,\n channelRef,\n objectionRef,\n outputLanguage,\n } = body;\n\n if (!templateRef || typeof templateRef !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`templateRef` is required and must be a non-empty string.' },\n },\n );\n }\n\n const optionalString = (key: string, value: unknown): string | undefined => {\n if (value === undefined || value === null) return undefined;\n if (typeof value !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${key}\\` must be a string when provided.` },\n },\n );\n }\n return value.length > 0 ? value : undefined;\n };\n\n // Thread the request session + a dedicated agent step into the LLM call so\n // the engine AgentCallTraceSink records the prompt/output/usage for this\n // market generation — the same observability every companion LLM\n // call gets. Best-effort: undefined when tracing is off (sink no-ops).\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', `market-generation-${templateRef}`);\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'market-generation-generate',\n attributes: { templateRef },\n }\n : undefined;\n\n const result = await this.marketGenerationService.generate({\n templateRef,\n icpRef: optionalString('icpRef', icpRef),\n featureRef: optionalString('featureRef', featureRef),\n benefitRef: optionalString('benefitRef', benefitRef),\n channelRef: optionalString('channelRef', channelRef),\n objectionRef: optionalString('objectionRef', objectionRef),\n outputLanguage: optionalString('outputLanguage', outputLanguage),\n }, traceContext);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/generate-logo` — generate the application logo\n * from the authored `BrandSnapshot`. Thin: `LogoGenerationCompanionService`\n * owns the flow (introspect `brand-render-prompt` → invoke the image agent →\n * persist the master + manifest). Body: optional `{ forceRegenerate }`.\n */\n private async brandGenerateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const forceRegenerate = (req.body || {}).forceRegenerate === true;\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-generation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-generation-generate',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoGenerationService.generate({ forceRegenerate }, traceContext);\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/deliberate-logo` — full logo DELIBERATION\n * (agentic deliberation system, Step 4): the art-director expert authors the\n * creative brief (N app-derived concept directions), one candidate generates\n * per direction, the expert panel (art-director + design-system-guardian +\n * brand-strategist) deliberates with regeneration-as-revision, and the winner\n * is staged as the single-candidate manifest the EXISTING\n * `POST /brand/accept-logo` review point promotes. Thin:\n * `LogoDeliberationCompanionService` owns the flow.\n *\n * Body (all optional): `{ directionCount?: number, roundBudget?: number,\n * shortlistSize?: number }` — positive integers; service defaults 4 / 2 / 1.\n */\n private async brandDeliberateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { directionCount, roundBudget, shortlistSize } = body;\n\n for (const [name, value] of Object.entries({ directionCount, roundBudget, shortlistSize })) {\n if (value !== undefined && (typeof value !== 'number' || !Number.isInteger(value) || value < 1)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${name}\\` must be a positive integer when provided.` },\n });\n }\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-deliberation',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoDeliberationService.run(\n {\n ...(typeof directionCount === 'number' ? { directionCount } : {}),\n ...(typeof roundBudget === 'number' ? { roundBudget } : {}),\n ...(typeof shortlistSize === 'number' ? { shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/derive` — derive an app-specific\n * expert-persona charter PROPOSAL (agentic deliberation system). Thin:\n * `ExpertPersonaCompanionService.derive` owns the flow (resolve shaping\n * inputs via introspection → invoke the derivation agent → stage the\n * proposal). Body: `{ roleRef: string }`. Every call derives; there is no\n * freshness cache to bypass.\n */\n private async expertPersonaDerive(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'expert-persona-derive');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'expert-persona-derive',\n attributes: {},\n }\n : undefined;\n\n const result = await this.expertPersonaService.derive(\n { roleRef },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/accept` — promote a STAGED charter\n * proposal into the committed SSOT (`specifications/src/personas/`). Thin:\n * `ExpertPersonaCompanionService.accept` owns the flow (human-edit\n * overwrite guard → fail-closed set validation → write generated charter\n * module + regenerate the aggregator). Body: `{ roleRef: string }`.\n */\n private async expertPersonaAccept(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n const result = await this.expertPersonaService.accept({ roleRef });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/deliberations/run` — run a charter-built expert-panel\n * deliberation over TEXT candidates (agentic deliberation system, Step 3).\n * Thin: `DeliberationCompanionService.run` composes the plan (narrowness\n * fail-closed, committed charters only) and the engine\n * `ActorsSystemBackendService.executeDeliberation` orchestrates\n * (rubric -> review rounds -> shortlist revisions -> synthesis). Body:\n * `{ workDomain, briefContext, candidates: [{ref, text}], reviewerRoleRefs,\n * coordinatorRoleRef, rubricDeriverRoleRef?, roundBudget?, shortlistSize? }`.\n */\n private async deliberationRun(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { workDomain, briefContext, candidates, reviewerRoleRefs, coordinatorRoleRef } = body;\n const knownDomains = new Set<string>(Object.values(ExpertWorkDomain));\n if (typeof workDomain !== 'string' || !knownDomains.has(workDomain)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`workDomain\\` must be one of [${[...knownDomains].join(', ')}].` },\n });\n }\n if (typeof briefContext !== 'string' || briefContext.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`briefContext` must be a non-empty string.' },\n });\n }\n if (!Array.isArray(candidates) || candidates.some((candidate: unknown) => {\n const entry = candidate as { ref?: unknown; text?: unknown };\n return typeof entry?.ref !== 'string' || entry.ref.length === 0\n || typeof entry?.text !== 'string' || entry.text.length === 0;\n })) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`candidates` must be an array of `{ ref, text }` with non-empty strings.' },\n });\n }\n if (!Array.isArray(reviewerRoleRefs) || reviewerRoleRefs.some((role: unknown) => typeof role !== 'string')\n || typeof coordinatorRoleRef !== 'string' || coordinatorRoleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`reviewerRoleRefs` must be a string array and `coordinatorRoleRef` a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'deliberation-run');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'deliberation-run',\n attributes: {},\n }\n : undefined;\n\n const result = await this.deliberationService.run(\n {\n workDomain: workDomain as ExpertWorkDomain,\n briefContext,\n candidates,\n reviewerRoleRefs,\n coordinatorRoleRef,\n ...(typeof body.rubricDeriverRoleRef === 'string' ? { rubricDeriverRoleRef: body.rubricDeriverRoleRef } : {}),\n ...(typeof body.roundBudget === 'number' ? { roundBudget: body.roundBudget } : {}),\n ...(typeof body.shortlistSize === 'number' ? { shortlistSize: body.shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/accept-logo` — the ACCEPT review point of the\n * brand/logo workflow. Thin: `BrandAcceptCompanionService` owns the flow\n * (read staged candidate → optionally run the `brand.logo.judge.agent`\n * review → promote the accepted candidate into the specification SSOT:\n * copy files into `specifications/src/brand/assets/` + rewrite\n * `resolved-assets.generated.ts`).\n *\n * Body (all optional): `{ runJudge?, requireJudgeAcceptance? }`. The staged\n * single-candidate manifest is what gets accepted; the judge\n * runs by default and its verdict is advisory (the human accept POST is the\n * authority) unless `requireJudgeAcceptance` gates on it.\n */\n private async brandAcceptLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { runJudge, requireJudgeAcceptance } = body;\n\n if (runJudge !== undefined && typeof runJudge !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runJudge` must be a boolean when provided.' },\n });\n }\n if (requireJudgeAcceptance !== undefined && typeof requireJudgeAcceptance !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`requireJudgeAcceptance` must be a boolean when provided.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-accept');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-accept-judge',\n attributes: {},\n }\n : undefined;\n\n const result = await this.brandAcceptService.accept(\n {\n ...(typeof runJudge === 'boolean' ? { runJudge } : {}),\n ...(typeof requireJudgeAcceptance === 'boolean' ? { requireJudgeAcceptance } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/generate-openapi` — on-demand\n * OpenAPI generation for the SaaS app. Returns the\n * `{ documents, stats, metadata }` shape produced by\n * {@link TechnicalDocCompanionService.generateOpenApiDocuments}\n * verbatim. The route deliberately accepts no request body\n * today: every input (`appSlug`, `appDisplayName`,\n * `publicMarketingTitle`, operations) is derived from the\n * loaded `WildoSaasConfig` + the `'openapi-generation-input'`\n * subprocess introspection. A future CLI flag (per-section\n * filter, custom version override) will plug in here as\n * optional body fields without breaking this no-body contract.\n */\n private async technicalDocGenerateOpenApi(req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.generateOpenApiDocuments();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async technicalDocPublishOpenApi(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.publishOpenApiReference());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/derive-bundles` — the trigger for the\n * source-based derivation introduced by decision **D14**.\n *\n * Until this route existed, `deriveApplicationDocumentationBundles` had NO\n * caller outside its own tests, so the whole D14 evidence path — the\n * environment evidence snapshot, the applicability gates and the two\n * authorized bundles — could only ever be verified behaviourally. That is why\n * the route earns its place despite duplicating no logic: it is the seam that\n * makes the decision observable on a running companion.\n *\n * **Read-only by construction.** It derives and returns; it writes nothing and\n * publishes nothing. The Phase 2A publication path\n * `backendServiceKey` is resolved the same way every other companion behavior\n * resolves it ({@link pickResourcesRegistryCarrierServiceKey}) rather than\n * accepted from the caller, so a request cannot name a service the application\n * does not declare. The derivation publishes framework-owned topics only; it\n * does not interpret application resource, workflow, or editorial declarations.\n */\n private async technicalDocDeriveBundles(_req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.deriveApplicationDocumentationBundles({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/publish-managed` — the operation that emits\n * `src/generated/consumer-documentation`, the generator-owned framework\n * documentation tree served by this application. Git owns history and rollback;\n * publication owns only validation and synchronization of the current bytes.\n *\n * Unlike `derive-bundles` this WRITES: it synchronizes a complete verified render into\n * one stable generated tree. It is exposed as its own route rather than folded into the\n * derivation for exactly that reason — a caller should never reach a publication by\n * asking for a read.\n *\n * `refuseProvisionalAssets` is the environment's call, so it is accepted per request\n * rather than defaulted here: a production run passes `true` and fails if any screenshot\n * is still a placeholder; development omits it and ships documentation ahead of its\n * pictures.\n */\n private async technicalDocPublishManaged(req: Request, res: Response, next: NextFunction) {\n try {\n const { refuseProvisionalAssets } = req.body || {};\n const result = await this.technicalDocService.publishManagedDocumentation({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n ...(refuseProvisionalAssets === undefined ? {} : { refuseProvisionalAssets: refuseProvisionalAssets === true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n}\n\nexport default CompanionController;\n"]}