@wildo-ai/dev-companion 1.1.3 → 1.1.5

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 (1095) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/__time-gov.probe.d.mts +0 -0
  3. package/dist/esm/__time-gov.probe.d.mts.map +0 -0
  4. package/dist/esm/__time-gov.probe.mjs.map +0 -0
  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 +9 -3
  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 +3 -24
  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 +34 -53
  11. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  12. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts +7 -0
  13. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
  14. package/dist/esm/brand/services/logo-deliberation.companion.service.js +9 -8
  15. package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
  16. package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
  17. package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
  18. package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
  19. package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
  20. package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
  21. package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
  22. package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
  23. package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
  24. package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
  25. package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
  26. package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
  27. package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
  28. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +143 -0
  29. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -0
  30. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +84 -0
  31. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -0
  32. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +177 -14
  33. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  34. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +215 -8
  35. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  36. package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts +85 -0
  37. package/dist/esm/claude-cli/models/coding-session-frame-retention.d.ts.map +1 -0
  38. package/dist/esm/claude-cli/models/coding-session-frame-retention.js +122 -0
  39. package/dist/esm/claude-cli/models/coding-session-frame-retention.js.map +1 -0
  40. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +98 -0
  41. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -0
  42. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +135 -0
  43. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -0
  44. package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts +94 -0
  45. package/dist/esm/claude-cli/models/parked-question-answer.models.d.ts.map +1 -0
  46. package/dist/esm/claude-cli/models/parked-question-answer.models.js +137 -0
  47. package/dist/esm/claude-cli/models/parked-question-answer.models.js.map +1 -0
  48. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts +16 -0
  49. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.d.ts.map +1 -0
  50. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +46 -0
  51. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -0
  52. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +46 -0
  53. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -0
  54. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +135 -0
  55. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -0
  56. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +131 -0
  57. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -0
  58. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +371 -0
  59. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -0
  60. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +717 -76
  61. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  62. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +2056 -388
  63. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  64. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +109 -0
  65. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -0
  66. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +186 -0
  67. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -0
  68. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +227 -29
  69. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  70. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +666 -125
  71. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  72. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +57 -10
  73. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  74. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +127 -10
  75. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  76. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +16 -0
  77. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  78. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +17 -0
  79. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  80. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +8 -1
  81. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  82. package/dist/esm/companion-api/companion-api.schemas.d.ts +164 -87
  83. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  84. package/dist/esm/companion-api/companion-api.schemas.js +52 -6
  85. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  86. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
  87. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
  88. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +109 -0
  89. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
  90. package/dist/esm/companion-api/controllers/companion.controller.d.ts +201 -16
  91. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  92. package/dist/esm/companion-api/controllers/companion.controller.js +660 -117
  93. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  94. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +47 -5
  95. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
  96. package/dist/esm/core/auth/companion-auth-floor.companion.service.js +47 -5
  97. package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
  98. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
  99. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
  100. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
  101. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
  102. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
  103. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
  104. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
  105. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  106. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
  107. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  108. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts +54 -0
  109. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.d.ts.map +1 -0
  110. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js +78 -0
  111. package/dist/esm/core/config/application-schema-plan-obligation.companion.utils.js.map +1 -0
  112. package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
  113. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  114. package/dist/esm/core/config/primary-language.companion.utils.js +12 -0
  115. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  116. package/dist/esm/core/context/companion-context.d.ts.map +1 -1
  117. package/dist/esm/core/context/companion-context.js +4 -0
  118. package/dist/esm/core/context/companion-context.js.map +1 -1
  119. package/dist/esm/core/context/companion-package-loaders.companion.d.ts +57 -0
  120. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  121. package/dist/esm/core/context/companion-package-loaders.companion.js +181 -7
  122. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  123. package/dist/esm/core/context/draft-family-values.companion.d.ts +23 -0
  124. package/dist/esm/core/context/draft-family-values.companion.d.ts.map +1 -0
  125. package/dist/esm/core/context/draft-family-values.companion.js +49 -0
  126. package/dist/esm/core/context/draft-family-values.companion.js.map +1 -0
  127. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  128. package/dist/esm/core/inject/models/container.js +28 -11
  129. package/dist/esm/core/inject/models/container.js.map +1 -1
  130. package/dist/esm/core/inject/models/service-types.d.ts +12 -3
  131. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  132. package/dist/esm/core/inject/models/service-types.js +14 -3
  133. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  134. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  135. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +74 -2
  136. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
  137. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +37 -1
  138. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  139. package/dist/esm/core/introspection/models/companion-introspection.models.js +55 -0
  140. package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
  141. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +93 -0
  142. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -0
  143. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +290 -0
  144. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -0
  145. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  146. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +636 -18
  147. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  148. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +592 -17
  149. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  150. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +1425 -94
  151. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  152. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +61 -4
  153. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  154. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +136 -10
  155. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
  156. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  157. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +11 -0
  158. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
  159. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +21 -0
  160. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  161. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +63 -4
  162. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  163. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  164. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +11 -3
  165. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
  166. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +15 -5
  167. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  168. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +28 -15
  169. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  170. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts +24 -0
  171. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
  172. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js +29 -5
  173. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js.map +1 -1
  174. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +116 -0
  175. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -0
  176. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +223 -0
  177. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -0
  178. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +13 -15
  179. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  180. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  181. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts +2 -1
  182. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
  183. package/dist/esm/core/introspection/subprocess/assertions.behavior.js.map +1 -1
  184. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  185. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +85 -51
  186. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  187. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
  188. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  189. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
  190. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  191. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts +33 -0
  192. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.d.ts.map +1 -0
  193. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js +59 -0
  194. package/dist/esm/core/introspection/subprocess/engine-resource-population.subprocess.utils.js.map +1 -0
  195. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +12 -0
  196. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
  197. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
  198. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
  199. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
  200. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +46 -102
  201. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
  202. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +15 -0
  203. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  204. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +140 -46
  205. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
  206. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +65 -2
  207. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  208. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +292 -49
  209. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  210. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts +79 -0
  211. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.d.ts.map +1 -0
  212. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js +49 -0
  213. package/dist/esm/core/introspection/subprocess/risk-signals.behavior.js.map +1 -0
  214. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  215. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +314 -212
  216. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  217. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts +72 -0
  218. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.d.ts.map +1 -0
  219. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js +123 -0
  220. package/dist/esm/core/introspection/subprocess/specification-elements.behavior.js.map +1 -0
  221. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +184 -0
  222. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -0
  223. package/dist/esm/core/introspection/workspace-element-index.companion.js +311 -0
  224. package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -0
  225. package/dist/esm/core/introspection/workspace-elements.companion.d.ts +54 -0
  226. package/dist/esm/core/introspection/workspace-elements.companion.d.ts.map +1 -0
  227. package/dist/esm/core/introspection/workspace-elements.companion.js +43 -0
  228. package/dist/esm/core/introspection/workspace-elements.companion.js.map +1 -0
  229. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
  230. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
  231. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
  232. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
  233. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts +7 -0
  234. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
  235. package/dist/esm/core/lock/wildo-saas-lock.models.js.map +1 -1
  236. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +3 -0
  237. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
  238. package/dist/esm/core/lock/wildo-saas-lock.schemas.js +1 -0
  239. package/dist/esm/core/lock/wildo-saas-lock.schemas.js.map +1 -1
  240. package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts +31 -0
  241. package/dist/esm/core/runtime/application-runtime-liveness.companion.d.ts.map +1 -0
  242. package/dist/esm/core/runtime/application-runtime-liveness.companion.js +53 -0
  243. package/dist/esm/core/runtime/application-runtime-liveness.companion.js.map +1 -0
  244. package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
  245. package/dist/esm/core/runtime/companion-startup-assembly.js +35 -1
  246. package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
  247. package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts +54 -0
  248. package/dist/esm/core/runtime/services/file-storage-initialization.companion.d.ts.map +1 -0
  249. package/dist/esm/core/runtime/services/file-storage-initialization.companion.js +54 -0
  250. package/dist/esm/core/runtime/services/file-storage-initialization.companion.js.map +1 -0
  251. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +26 -14
  252. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  253. package/dist/esm/core/runtime/services/start-companion-application.service.js +243 -67
  254. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  255. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +3 -3
  256. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  257. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +35 -10
  258. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  259. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts +0 -4
  260. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
  261. package/dist/esm/core/specifications/cross-registry-rendering.shared.js +0 -4
  262. package/dist/esm/core/specifications/cross-registry-rendering.shared.js.map +1 -1
  263. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
  264. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.js.map +1 -1
  265. package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
  266. package/dist/esm/core/specifications/onboarding-element-rendering.shared.js +6 -34
  267. package/dist/esm/core/specifications/onboarding-element-rendering.shared.js.map +1 -1
  268. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
  269. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.js.map +1 -1
  270. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  271. package/dist/esm/core/specifications/resource-specification-context.factory.js +2 -0
  272. package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
  273. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts +4 -2
  274. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
  275. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +16 -6
  276. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
  277. package/dist/esm/core/traceability/companion-traceability.service.d.ts +21 -1
  278. package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
  279. package/dist/esm/core/traceability/companion-traceability.service.js +25 -1
  280. package/dist/esm/core/traceability/companion-traceability.service.js.map +1 -1
  281. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +45 -0
  282. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -0
  283. package/dist/esm/core/utils/derived-input-signature.companion.utils.js +96 -0
  284. package/dist/esm/core/utils/derived-input-signature.companion.utils.js.map +1 -0
  285. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts +35 -0
  286. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -0
  287. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +118 -0
  288. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -0
  289. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +34 -0
  290. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -0
  291. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +280 -0
  292. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -0
  293. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  294. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
  295. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  296. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts +19 -1
  297. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  298. package/dist/esm/deliberations/services/deliberation.companion.service.js +61 -10
  299. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  300. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts +3 -1
  301. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
  302. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +7 -4
  303. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
  304. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  305. package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
  306. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  307. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
  308. package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
  309. package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
  310. package/dist/esm/email/services/email-template.companion.service.d.ts +30 -0
  311. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  312. package/dist/esm/email/services/email-template.companion.service.js +92 -19
  313. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  314. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +34 -0
  315. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -0
  316. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +130 -0
  317. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -0
  318. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +117 -5
  319. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  320. package/dist/esm/executions/services/companion-executions.companion.service.js +263 -10
  321. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  322. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  323. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
  324. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  325. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  326. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
  327. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  328. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +14 -24
  329. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  330. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +69 -68
  331. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  332. package/dist/esm/expert-personas/services/persona-source-ownership.d.ts +8 -0
  333. package/dist/esm/expert-personas/services/persona-source-ownership.d.ts.map +1 -0
  334. package/dist/esm/expert-personas/services/persona-source-ownership.js +83 -0
  335. package/dist/esm/expert-personas/services/persona-source-ownership.js.map +1 -0
  336. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts +1 -1
  337. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js +1 -1
  338. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.js.map +1 -1
  339. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts +4 -4
  340. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js +4 -4
  341. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.js.map +1 -1
  342. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts +2 -2
  343. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js +2 -2
  344. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.js.map +1 -1
  345. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +4 -2
  346. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  347. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +5 -3
  348. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
  349. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts +2 -1
  350. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js +2 -1
  352. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.js.map +1 -1
  353. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts +1 -1
  354. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js +1 -1
  355. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.js.map +1 -1
  356. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts +6 -5
  357. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js +7 -6
  359. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.js.map +1 -1
  360. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts +3 -3
  361. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js +3 -3
  362. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.js.map +1 -1
  363. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -2
  364. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +2 -2
  365. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
  366. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts +2 -1
  367. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
  368. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js +2 -1
  369. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.js.map +1 -1
  370. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +1 -1
  371. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +1 -1
  372. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
  373. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +1 -1
  374. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +1 -1
  375. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
  376. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +43 -0
  377. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -0
  378. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +43 -0
  379. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -0
  380. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts +26 -0
  381. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.d.ts.map +1 -0
  382. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js +26 -0
  383. package/dist/esm/i18n/components/APP_LAYOUTS_CONSENT_GATE.en.js.map +1 -0
  384. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts +18 -0
  385. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.d.ts.map +1 -0
  386. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js +18 -0
  387. package/dist/esm/i18n/components/APP_LAYOUTS_DOCUMENT_ACCEPTANCE_GATE.en.js.map +1 -0
  388. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts +3 -3
  389. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js +3 -3
  390. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.js.map +1 -1
  391. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts +1 -1
  392. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js +1 -1
  393. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.js.map +1 -1
  394. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +2 -2
  395. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +2 -2
  396. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
  397. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -1
  398. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  399. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +4 -1
  400. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
  401. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts +10 -10
  402. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js +10 -10
  403. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.js.map +1 -1
  404. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +25 -13
  405. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +26 -14
  407. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
  408. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts +1 -0
  409. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js +2 -1
  411. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.js.map +1 -1
  412. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts +17 -0
  413. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.d.ts.map +1 -0
  414. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js +17 -0
  415. package/dist/esm/i18n/components/APP_LAYOUTS_SURFACE_ERROR_BOUNDARY.en.js.map +1 -0
  416. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts +5 -5
  417. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js +5 -5
  418. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.js.map +1 -1
  419. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts +1 -1
  420. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js +1 -1
  421. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.js.map +1 -1
  422. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts +1 -1
  423. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js +1 -1
  424. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.js.map +1 -1
  425. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts +16 -2
  426. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
  427. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js +16 -2
  428. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.js.map +1 -1
  429. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts +3 -3
  430. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js +3 -3
  431. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.js.map +1 -1
  432. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts +8 -8
  433. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js +8 -8
  434. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.js.map +1 -1
  435. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +14 -14
  436. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +14 -14
  437. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  438. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +22 -6
  439. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  440. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +23 -7
  441. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  442. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts +2 -2
  443. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js +2 -2
  444. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.js.map +1 -1
  445. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts +1 -1
  446. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js +1 -1
  447. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.js.map +1 -1
  448. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts +1 -1
  449. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js +1 -1
  450. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.js.map +1 -1
  451. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts +1 -1
  452. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js +1 -1
  453. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.js.map +1 -1
  454. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts +2 -2
  455. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js +2 -2
  456. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.js.map +1 -1
  457. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts +21 -0
  458. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.d.ts.map +1 -0
  459. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js +21 -0
  460. package/dist/esm/i18n/components/LOW_LEVEL_AI_DIFF_BLOCK.en.js.map +1 -0
  461. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts +1 -1
  462. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js +1 -1
  463. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.js.map +1 -1
  464. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts +1 -1
  465. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js +1 -1
  466. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.js.map +1 -1
  467. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts +2 -2
  468. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js +2 -2
  469. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.js.map +1 -1
  470. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts +1 -1
  471. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js +1 -1
  472. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.js.map +1 -1
  473. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +4 -5
  474. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  475. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +4 -5
  476. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
  477. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts +4 -4
  478. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js +4 -4
  479. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.js.map +1 -1
  480. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts +2 -2
  481. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js +2 -2
  482. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.js.map +1 -1
  483. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts +1 -1
  484. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js +1 -1
  485. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.js.map +1 -1
  486. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts +1 -0
  487. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
  488. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js +2 -1
  489. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.js.map +1 -1
  490. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +12 -6
  491. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
  492. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +12 -6
  493. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
  494. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts +1 -0
  495. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
  496. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js +2 -1
  497. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.js.map +1 -1
  498. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +3 -2
  499. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  500. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +4 -3
  501. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
  502. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts +3 -2
  503. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
  504. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js +4 -3
  505. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.js.map +1 -1
  506. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +3 -1
  507. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  508. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +4 -2
  509. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
  510. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts +3 -3
  511. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js +3 -3
  512. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.js.map +1 -1
  513. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts +1 -1
  514. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js +1 -1
  515. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.js.map +1 -1
  516. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +3 -3
  517. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +3 -3
  518. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  519. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts +15 -0
  520. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.d.ts.map +1 -0
  521. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js +15 -0
  522. package/dist/esm/i18n/components/LOW_LEVEL_DATETIME_RANGE_PICKER.en.js.map +1 -0
  523. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts +12 -0
  524. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.d.ts.map +1 -0
  525. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js +12 -0
  526. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_ADDRESS.en.js.map +1 -0
  527. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts +1 -1
  528. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js +1 -1
  529. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.js.map +1 -1
  530. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts +1 -1
  531. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js +1 -1
  532. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.js.map +1 -1
  533. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +4 -3
  534. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  535. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +4 -3
  536. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
  537. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts +1 -1
  538. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js +1 -1
  539. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.js.map +1 -1
  540. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts +3 -0
  541. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
  542. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js +4 -1
  543. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.js.map +1 -1
  544. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts +1 -1
  545. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js +1 -1
  546. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.js.map +1 -1
  547. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts +1 -1
  548. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js +1 -1
  549. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.js.map +1 -1
  550. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts +1 -1
  551. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js +1 -1
  552. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.js.map +1 -1
  553. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts +1 -1
  554. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js +1 -1
  555. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.js.map +1 -1
  556. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts +1 -1
  557. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js +1 -1
  558. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.js.map +1 -1
  559. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts +1 -1
  560. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js +1 -1
  561. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.js.map +1 -1
  562. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts +22 -0
  563. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.d.ts.map +1 -0
  564. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js +22 -0
  565. package/dist/esm/i18n/components/LOW_LEVEL_DURATION.en.js.map +1 -0
  566. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts +2 -2
  567. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js +2 -2
  568. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.js.map +1 -1
  569. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts +6 -6
  570. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js +6 -6
  571. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.js.map +1 -1
  572. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts +3 -3
  573. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js +3 -3
  574. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.js.map +1 -1
  575. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +15 -8
  576. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  577. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +16 -9
  578. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
  579. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +20 -0
  580. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -0
  581. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +20 -0
  582. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -0
  583. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts +1 -1
  584. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js +1 -1
  585. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.js.map +1 -1
  586. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +39 -20
  587. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  588. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +39 -20
  589. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
  590. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts +5 -5
  591. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js +5 -5
  592. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.js.map +1 -1
  593. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts +1 -1
  594. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js +1 -1
  595. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.js.map +1 -1
  596. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts +13 -0
  597. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.d.ts.map +1 -0
  598. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js +13 -0
  599. package/dist/esm/i18n/components/LOW_LEVEL_PASSWORD_INPUT.en.js.map +1 -0
  600. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts +13 -0
  601. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.d.ts.map +1 -0
  602. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js +13 -0
  603. package/dist/esm/i18n/components/LOW_LEVEL_RANGE_SLIDER.en.js.map +1 -0
  604. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts +3 -3
  605. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js +3 -3
  606. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.js.map +1 -1
  607. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts +15 -0
  608. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.d.ts.map +1 -0
  609. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js +15 -0
  610. package/dist/esm/i18n/components/LOW_LEVEL_TIME_RANGE_PICKER.en.js.map +1 -0
  611. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts +5 -3
  612. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
  613. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js +6 -4
  614. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.js.map +1 -1
  615. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts +10 -9
  616. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
  617. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js +11 -10
  618. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.js.map +1 -1
  619. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
  620. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
  621. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
  622. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
  623. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts +5 -5
  624. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js +5 -5
  625. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.js.map +1 -1
  626. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +6 -6
  627. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +6 -6
  628. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  629. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts +7 -7
  630. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js +7 -7
  631. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.js.map +1 -1
  632. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts +1 -1
  633. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js +1 -1
  634. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.js.map +1 -1
  635. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts +1 -1
  636. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js +1 -1
  637. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.js.map +1 -1
  638. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts +4 -4
  639. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js +4 -4
  640. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.js.map +1 -1
  641. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts +24 -0
  642. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.d.ts.map +1 -0
  643. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js +24 -0
  644. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ORGANIZATION_ONBOARDING.en.js.map +1 -0
  645. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +6 -4
  646. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  647. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +6 -4
  648. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  649. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +14 -10
  650. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
  651. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +14 -10
  652. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  653. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts +6 -6
  654. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js +6 -6
  655. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.js.map +1 -1
  656. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts +11 -8
  657. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
  658. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js +12 -9
  659. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.js.map +1 -1
  660. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts +9 -8
  661. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
  662. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js +9 -8
  663. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.js.map +1 -1
  664. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts +25 -9
  665. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
  666. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js +25 -9
  667. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.js.map +1 -1
  668. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts +1 -1
  669. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js +1 -1
  670. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.js.map +1 -1
  671. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts +2 -2
  672. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js +2 -2
  673. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.js.map +1 -1
  674. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts +1 -0
  675. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
  676. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js +2 -1
  677. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.js.map +1 -1
  678. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts +25 -24
  679. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
  680. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js +26 -25
  681. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.js.map +1 -1
  682. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts +1 -1
  683. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js +1 -1
  684. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.js.map +1 -1
  685. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +3 -1
  686. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  687. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +4 -2
  688. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  689. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts +2 -2
  690. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js +2 -2
  691. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.js.map +1 -1
  692. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +11 -11
  693. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +11 -11
  694. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  695. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +1 -1
  696. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +1 -1
  697. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
  698. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +12 -0
  699. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  700. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +13 -1
  701. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
  702. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts +6 -6
  703. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js +6 -6
  704. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.js.map +1 -1
  705. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts +2 -2
  706. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js +2 -2
  707. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.js.map +1 -1
  708. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts +2 -2
  709. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js +2 -2
  710. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.js.map +1 -1
  711. package/dist/esm/i18n/components/guidance_banner.en.d.ts +1 -1
  712. package/dist/esm/i18n/components/guidance_banner.en.js +1 -1
  713. package/dist/esm/i18n/components/guidance_banner.en.js.map +1 -1
  714. package/dist/esm/i18n/components/guidance_checklist.en.d.ts +2 -2
  715. package/dist/esm/i18n/components/guidance_checklist.en.js +2 -2
  716. package/dist/esm/i18n/components/guidance_checklist.en.js.map +1 -1
  717. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts +1 -0
  718. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
  719. package/dist/esm/i18n/components/guidance_checklist_item.en.js +2 -1
  720. package/dist/esm/i18n/components/guidance_checklist_item.en.js.map +1 -1
  721. package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts +1 -1
  722. package/dist/esm/i18n/components/guidance_onboarding_view.en.js +1 -1
  723. package/dist/esm/i18n/components/guidance_onboarding_view.en.js.map +1 -1
  724. package/dist/esm/i18n/components/guidance_survey.en.d.ts +1 -0
  725. package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
  726. package/dist/esm/i18n/components/guidance_survey.en.js +2 -1
  727. package/dist/esm/i18n/components/guidance_survey.en.js.map +1 -1
  728. package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts +1 -1
  729. package/dist/esm/i18n/components/progression_achievement_badge.en.js +1 -1
  730. package/dist/esm/i18n/components/progression_achievement_badge.en.js.map +1 -1
  731. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +5 -1
  732. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  733. package/dist/esm/i18n/components/progression_milestone_tracker.en.js +6 -2
  734. package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
  735. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -13
  736. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -1
  737. package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -1
  738. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +17 -0
  739. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -0
  740. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +252 -0
  741. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -0
  742. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts +15 -0
  743. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -0
  744. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +58 -0
  745. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -0
  746. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +96 -0
  747. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -0
  748. package/dist/esm/i18n/errors_messages/errors-messages.en.js +54 -0
  749. package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -0
  750. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +2014 -1
  751. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  752. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +516 -0
  753. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
  754. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts +878 -8
  755. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
  756. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js +247 -0
  757. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js.map +1 -1
  758. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts +504 -1
  759. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
  760. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js +153 -0
  761. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js.map +1 -1
  762. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts +78 -0
  763. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -0
  764. package/dist/esm/i18n/resources/workbenchAspects.en.js +255 -0
  765. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -0
  766. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +149 -0
  767. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -0
  768. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +79 -0
  769. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -0
  770. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +89 -0
  771. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -0
  772. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +74 -0
  773. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -0
  774. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +70 -5
  775. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  776. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +67 -0
  777. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
  778. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +80 -0
  779. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -0
  780. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +50 -0
  781. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -0
  782. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts +95 -0
  783. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.d.ts.map +1 -0
  784. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js +54 -0
  785. package/dist/esm/i18n/resources/workbenchCreationHomeLines.en.js.map +1 -0
  786. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts +95 -0
  787. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.d.ts.map +1 -0
  788. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js +51 -0
  789. package/dist/esm/i18n/resources/workbenchCreationOutcomes.en.js.map +1 -0
  790. package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts +1 -1
  791. package/dist/esm/i18n/resources/workbenchDomainResources.en.js +2 -2
  792. package/dist/esm/i18n/resources/workbenchDomainResources.en.js.map +1 -1
  793. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +108 -0
  794. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -0
  795. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +61 -0
  796. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -0
  797. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +99 -0
  798. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -0
  799. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +87 -0
  800. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -0
  801. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts +121 -0
  802. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.d.ts.map +1 -0
  803. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js +84 -0
  804. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.en.js.map +1 -0
  805. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +83 -0
  806. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -0
  807. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +71 -0
  808. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -0
  809. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +159 -0
  810. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -0
  811. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +103 -0
  812. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -0
  813. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +142 -6
  814. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  815. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +103 -0
  816. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
  817. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +94 -4
  818. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  819. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +79 -0
  820. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
  821. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +5074 -257
  822. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  823. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +1201 -44
  824. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  825. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts +86 -3
  826. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
  827. package/dist/esm/i18n/resources/workbenchTraceSessions.en.js +90 -0
  828. package/dist/esm/i18n/resources/workbenchTraceSessions.en.js.map +1 -1
  829. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +97 -0
  830. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -0
  831. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +77 -0
  832. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -0
  833. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +272 -0
  834. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -0
  835. package/dist/esm/i18n/system_enums/application-creation.en.js +319 -0
  836. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -0
  837. package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts +154 -0
  838. package/dist/esm/i18n/system_enums/compliance-programme.en.d.ts.map +1 -0
  839. package/dist/esm/i18n/system_enums/compliance-programme.en.js +154 -0
  840. package/dist/esm/i18n/system_enums/compliance-programme.en.js.map +1 -0
  841. package/dist/esm/i18n/system_enums/flows-actors.en.d.ts +54 -0
  842. package/dist/esm/i18n/system_enums/flows-actors.en.d.ts.map +1 -0
  843. package/dist/esm/i18n/system_enums/flows-actors.en.js +54 -0
  844. package/dist/esm/i18n/system_enums/flows-actors.en.js.map +1 -0
  845. package/dist/esm/i18n/system_enums/market.en.d.ts +12 -2
  846. package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
  847. package/dist/esm/i18n/system_enums/market.en.js +12 -2
  848. package/dist/esm/i18n/system_enums/market.en.js.map +1 -1
  849. package/dist/esm/i18n/system_enums/processor-register.en.d.ts +43 -0
  850. package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -0
  851. package/dist/esm/i18n/system_enums/processor-register.en.js +43 -0
  852. package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -0
  853. package/dist/esm/i18n/system_enums/risk-register.en.d.ts +56 -0
  854. package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -0
  855. package/dist/esm/i18n/system_enums/risk-register.en.js +56 -0
  856. package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -0
  857. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +50 -0
  858. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -0
  859. package/dist/esm/i18n/system_enums/workbench-build.en.js +55 -0
  860. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -0
  861. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +47 -0
  862. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -0
  863. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +48 -0
  864. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -0
  865. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +18 -0
  866. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -0
  867. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +18 -0
  868. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -0
  869. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts +29 -0
  870. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.d.ts.map +1 -0
  871. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js +29 -0
  872. package/dist/esm/i18n/system_enums/workbench-playbook-run.en.js.map +1 -0
  873. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +24 -0
  874. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -0
  875. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +24 -0
  876. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -0
  877. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +106 -0
  878. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  879. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +69 -0
  880. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  881. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  882. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
  883. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  884. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +68 -4
  885. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  886. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +320 -88
  887. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  888. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +11 -11
  889. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  890. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +61 -44
  891. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  892. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +139 -2
  893. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  894. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +521 -42
  895. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  896. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  897. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +156 -36
  898. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  899. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts +91 -0
  900. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.d.ts.map +1 -0
  901. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js +149 -0
  902. package/dist/esm/i18n-labelling/utils/application-tone-of-voice.utils.js.map +1 -0
  903. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +27 -0
  904. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -0
  905. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +44 -0
  906. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -0
  907. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +27 -0
  908. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
  909. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js +27 -0
  910. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
  911. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts +12 -0
  912. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
  913. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js +58 -1
  914. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.js.map +1 -1
  915. package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
  916. package/dist/esm/i18n-labelling/utils/label-file-source.utils.js +19 -0
  917. package/dist/esm/i18n-labelling/utils/label-file-source.utils.js.map +1 -1
  918. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
  919. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
  920. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
  921. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
  922. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
  923. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
  924. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
  925. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
  926. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  927. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -0
  928. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
  929. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +108 -1
  930. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  931. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +289 -104
  932. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  933. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts +11 -0
  934. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
  935. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js +27 -3
  936. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.js.map +1 -1
  937. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts +29 -0
  938. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -0
  939. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +59 -0
  940. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -0
  941. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +117 -3
  942. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  943. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +277 -55
  944. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  945. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +27 -1
  946. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  947. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +43 -8
  948. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  949. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +50 -0
  950. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
  951. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +116 -0
  952. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
  953. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +46 -0
  954. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -0
  955. package/dist/esm/meta-workflows/models/build-task-rearm.models.js +43 -0
  956. package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -0
  957. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +34 -0
  958. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -0
  959. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +59 -0
  960. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -0
  961. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +65 -0
  962. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -0
  963. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +83 -0
  964. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -0
  965. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +69 -7
  966. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  967. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +70 -7
  968. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  969. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  970. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +36 -9
  971. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  972. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +208 -0
  973. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -0
  974. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +273 -0
  975. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -0
  976. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +356 -0
  977. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -0
  978. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +417 -0
  979. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -0
  980. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts +14 -0
  981. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.d.ts.map +1 -0
  982. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js +21 -0
  983. package/dist/esm/meta-workflows/models/playbook-step-schema-namespaces.models.js.map +1 -0
  984. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
  985. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +3 -1
  986. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +1 -1
  987. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +65 -0
  988. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -0
  989. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +148 -0
  990. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -0
  991. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +933 -36
  992. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  993. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +2092 -134
  994. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  995. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +183 -23
  996. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  997. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +422 -6
  998. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  999. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +402 -16
  1000. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  1001. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +1398 -70
  1002. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  1003. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts +47 -0
  1004. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -0
  1005. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +103 -0
  1006. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -0
  1007. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +29 -0
  1008. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -0
  1009. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +88 -0
  1010. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -0
  1011. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +47 -0
  1012. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -0
  1013. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +102 -0
  1014. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -0
  1015. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
  1016. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
  1017. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
  1018. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +81 -0
  1019. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -0
  1020. package/dist/esm/meta-workflows/services/dossier.companion.service.js +231 -0
  1021. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -0
  1022. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts +36 -0
  1023. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.d.ts.map +1 -0
  1024. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js +72 -0
  1025. package/dist/esm/meta-workflows/services/engine-settings-destination-catalog.companion.js.map +1 -0
  1026. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts +82 -1
  1027. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
  1028. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js +200 -31
  1029. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js.map +1 -1
  1030. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts +16 -0
  1031. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.d.ts.map +1 -0
  1032. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js +29 -0
  1033. package/dist/esm/meta-workflows/services/external-authentication-brief.companion.utils.js.map +1 -0
  1034. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +196 -1
  1035. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  1036. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +380 -10
  1037. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  1038. package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts +2 -0
  1039. package/dist/esm/meta-workflows/services/landed-module-import.companion.d.ts.map +1 -0
  1040. package/dist/esm/meta-workflows/services/landed-module-import.companion.js +36 -0
  1041. package/dist/esm/meta-workflows/services/landed-module-import.companion.js.map +1 -0
  1042. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +57 -0
  1043. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  1044. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +83 -3
  1045. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  1046. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +980 -167
  1047. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  1048. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +3410 -409
  1049. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  1050. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +100 -0
  1051. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -0
  1052. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +156 -0
  1053. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -0
  1054. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts +49 -0
  1055. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.d.ts.map +1 -0
  1056. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js +93 -0
  1057. package/dist/esm/meta-workflows/services/schema-plan-freshness-loop.companion.js.map +1 -0
  1058. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts +45 -0
  1059. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.d.ts.map +1 -0
  1060. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js +145 -0
  1061. package/dist/esm/meta-workflows/utils/unified-diff.companion.utils.js.map +1 -0
  1062. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +148 -9
  1063. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
  1064. package/dist/esm/technical-doc/services/technical-doc.companion.service.js +317 -85
  1065. package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
  1066. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +27 -6
  1067. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
  1068. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +211 -20
  1069. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
  1070. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
  1071. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  1072. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
  1073. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  1074. package/package.json +18 -18
  1075. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
  1076. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
  1077. package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
  1078. package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
  1079. package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
  1080. package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
  1081. package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
  1082. package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
  1083. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
  1084. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
  1085. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
  1086. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
  1087. package/dist/esm/i18n/composite_views/app.creation-board.en.js +0 -91
  1088. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts +0 -92
  1089. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +0 -1
  1090. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js +0 -178
  1091. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.js.map +0 -1
  1092. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts +0 -107
  1093. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +0 -1
  1094. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js +0 -188
  1095. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Application coding-task host — the typed Flows/Actors coding path.
3
3
  *
4
- * `runApplicationCodingTask` admits one typed `ApplicationCodingTaskContract`
4
+ * `runApplicationCodingTask` admits one typed `MetaWorkflow_ApplicationCodingTaskContract`
5
5
  * (the episode runtime's coding revision owner is the caller), renders its
6
6
  * prompt from the sealed contract, creates an `Actors_Task` row, spawns the
7
7
  * Claude CLI in the background against the application worktree, captures
@@ -28,13 +28,40 @@
28
28
  * gate Paul's parallel sessions (P-19b): CLAUDE.md forbids session
29
29
  * coordination; per-file attribution is the compensation, not exclusion.
30
30
  *
31
+ * ⚠️ **THE CAP IS A SIDE EFFECT OF THE LOCK BEING GLOBAL, AND #48 PROPOSES
32
+ * MAKING IT PER-SCOPE.** Admission by disjoint mutation scopes deletes this
33
+ * refusal silently: a recursing run asks for a task in ANOTHER module, is
34
+ * found disjoint, and is admitted. Nothing throws, nothing logs, and the
35
+ * first symptom is a fan-out nobody asked for — this repository's "a
36
+ * construct that refuses needs its paired path" lesson running BACKWARDS,
37
+ * with a refusal removed as a side effect, which is the harder direction to
38
+ * notice.
39
+ *
40
+ * So the cap must become an EXPLICIT guard in the same change: a run's own
41
+ * dispatch identity refused at admission regardless of scope disjointness.
42
+ * Note that identity is the hard part and is not solved here — the child's
43
+ * environment is composed by this service, but an HTTP request from the
44
+ * agent's shell carries none of it, and the machine-local token the agent
45
+ * reads is the same one an operator uses. Whoever scopes the lock owns
46
+ * finding that channel; do not assume it exists.
47
+ *
48
+ * It is TRIPWIRED rather than left to memory. The single-flight tests below
49
+ * dispatch the SAME scope twice, so they keep passing under scope-aware
50
+ * admission and would let the cap vanish green. `refuses a second dispatch
51
+ * whose mutation scope is DISJOINT — the P-35 recursion cap (#48)` varies
52
+ * the scope on purpose and goes red instead.
53
+ *
31
54
  * # Traceability (P-21)
32
55
  *
33
- * L2 runs are NOT traced by the engine `AgentCallTraceSink` — the direct
34
- * claude-cli lane bypasses it AND Bottleneck rate limiting. Do not assume
35
- * traced-for-free: this service owns its companion-traceability events
36
- * (DEBUG) and artifacts (DEBUG_VERBOSE); a sink wrapper emission is
37
- * deferred. The background phase runs under an INTERNAL trace session
56
+ * L2 runs dispatch through `AgentsBackendService.invokeAgent`, so they DO
57
+ * reach the engine `AgentCallTraceSink` (on success and on failure, gated by
58
+ * the agent-traceability policy and silent when no sink is bound) and they DO
59
+ * run through the provider's Bottleneck limiter, which `executeAgentViaACP`
60
+ * schedules the session on. The pre-ACP direct claude-cli lane bypassed both;
61
+ * that is history, not the current shape. Two things still do not come free:
62
+ * a NONE policy level or an unbound sink means no engine trace at all, so this
63
+ * service also owns its companion-traceability events (DEBUG) and artifacts
64
+ * (DEBUG_VERBOSE). The background phase runs under an INTERNAL trace session
38
65
  * (`createInternalSession`) because the HTTP request session ends at the
39
66
  * 202-style response.
40
67
  *
@@ -58,46 +85,102 @@ var __metadata = (this && this.__metadata) || function (k, v) {
58
85
  var __param = (this && this.__param) || function (paramIndex, decorator) {
59
86
  return function (target, key) { decorator(target, key, paramIndex); }
60
87
  };
88
+ import { MetaWorkflow_ApplicationCodingTaskContractSchema, } from '@wildo-ai/saas-models/meta-workflows';
89
+ import { ApplicationSchemaPlanObligation, assessApplicationSchemaPlanObligation, } from '../../core/config/application-schema-plan-obligation.companion.utils.js';
61
90
  import { isAbsolute, join, normalize, relative, sep, dirname } from 'node:path';
62
- import { existsSync, realpathSync } from 'node:fs';
91
+ import { existsSync, readFileSync, realpathSync } from 'node:fs';
92
+ import { appendFile, mkdir, writeFile } from 'node:fs/promises';
93
+ import { CODING_ANSWERS_FILE_NAME, CodingQuestionAnswerer, getFamilyPackageRelativePath, renderCodingQuestionAnswerEntry, renderCodingQuestionAnswersHeader, } from '@wildo-ai/application-creation-runtime';
94
+ import { ApplicationSpecificationFamily } from '@wildo-ai/saas-specifications/application-creation';
95
+ import { AgentAnswerAttemptDecision, decideAgentAnswerAttempt, ParkedQuestionAnswerOutputSchema, ParkedQuestionAnswerVerdict, readParkedQuestionAnswers, renderParkedQuestionAnswerPrompt, withParkedQuestionAnswer, } from '../models/parked-question-answer.models.js';
96
+ import { PARKED_QUESTION_ANSWERER_AGENT_REF } from '../models/parked-question-answerer.actors-system.definitions.js';
97
+ import { applicationCodingExclusiveSubject, CODING_RUN_WINDOW_RETENTION_MS, CodingRunConcurrency, describeRunConcurrency, isConcurrentRunSubject, selectBudgetCountingFailures, collectRunClaimedPaths, } from '../models/concurrent-coding-runs.models.js';
63
98
  import { inject, injectable } from 'inversify';
64
- import { AgentsBackendService, ErrorBuilderBackendService, LoggerService, SAAS_SERVICE_TYPES, executeBoundedSubprocess, describeCaughtError, } from '@wildo-ai/saas-backend-lib';
65
- import { Actor_Task_Topics, ErrorCustomMessageReference, ErrorType, FlowsActors_IO_PartKind, FlowsActors_Status, isWildoBackendError, } from '@wildo-ai/saas-models';
66
- import { CodingAgent_SessionSuspensionSchema, CodingAgent_StopReason, } from '@wildo-ai/external-connectors-models';
67
- import { ApplicationCodingTaskContractSchema, } from '@wildo-ai/saas-specifications/application-creation';
99
+ import { ActorsSystemBackendService, AgentsBackendService, ErrorBuilderBackendService, LoggerService, SAAS_SERVICE_TYPES, executeBoundedSubprocess, describeCaughtError, isActorExecutionSubjectBusyError, } from '@wildo-ai/saas-backend-lib';
100
+ import { Actor_Task_Topics, ErrorCustomMessageReference, ErrorType, FlowsActors_IO_PartKind, FlowsActors_Status, isWildoBackendError, HumanDecision_FieldKind, HumanDecision_ResponseIntent, } from '@wildo-ai/saas-models';
101
+ import { CodingAgent_StopReason, } from '@wildo-ai/external-connectors-models';
68
102
  import { getWorkspaceMutationLockPath as resolveWorkspaceMutationLockPath, withDedicatedFileLock, } from '@wildo-ai/platform-config-lib';
69
- import { sanitizeWorkbenchCreationPlaneIdentity } from '@wildo-ai/platform-core-shared';
103
+ import { sanitizeWorkbenchCreationPlaneIdentity, Workbench_ParkedCodingQuestionOptionRef, WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF, WORKBENCH_TASK_CORRELATION_DOMAIN, WorkbenchTaskCorrelationRef, } from '@wildo-ai/platform-core-shared';
70
104
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
71
105
  import { CompanionTraceabilityLevel, CompanionTraceAliasKind } from '../../core/traceability/companion-traceability.models.js';
72
106
  import { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service.js';
73
107
  import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service.js';
74
108
  import { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service.js';
75
- import { CompanionCreateActorTaskRequestSchema, CompanionUpdateActorTaskRequestSchema, } from '../../companion-api/companion-api.schemas.js';
76
- import { GitChangeSetCompanionService } from './git-change-set.companion.service.js';
77
- import { APPLICATION_CODING_AGENT_REF, APPLICATION_CODING_TURN_CLASSIFIER_AGENT_REF, CodingTurnEndClassificationOutputSchema, } from '../../meta-workflows/models/application-coding-agent.actors-system.definitions.js';
78
- import { ChangeSetAttributionClass, ApplicationCodingTaskDisposition, DISPATCH_DEFAULT_MAX_CAPTURED_BYTES, DISPATCH_DEFAULT_TIMEOUT_MS, DISPATCH_HARD_MAX_CAPTURED_BYTES, DISPATCH_HARD_MAX_TIMEOUT_MS, VerificationKind, renderApplicationCodingTaskAgentPrompt, resolveApplicationCodingTaskVerificationPlans, } from '../models/coding-agent-dispatch.models.js';
109
+ import { CompanionActorTasksListQuerySchema, CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas.js';
110
+ import { GitChangeSetCompanionService, isConcurrentHostLanePath, isOutsideApplicationRootPath } from './git-change-set.companion.service.js';
111
+ import { CodingRunWriteRegisterCompanionService } from './coding-run-write-register.companion.service.js';
112
+ import { PlaybookLaneBoundaryDecision } from '@wildo-ai/application-creation-runtime';
113
+ import { APPLICATION_CREATION_AUTONOMY_POSTURE, LaneBoundaryTreatment, laneBoundaryTreatmentFor, } from '../../meta-workflows/models/playbook-run-checkpoint.models.js';
114
+ import { AcceptOrigin, AcceptedChangeCommitCompanionService, NothingToAcceptError } from './accepted-change-commit.companion.service.js';
115
+ import { APPLICATION_CODING_TURN_CLASSIFIER_AGENT_REF, CodingTurnEndClassificationOutputSchema, APPLICATION_CODING_AGENT_REFS, APPLICATION_CODING_SYSTEM_REF, APPLICATION_CODING_WORKTREE_SUBJECT, isApplicationCodingAgentRef, resolveSelectedApplicationCodingAgentBinding, } from '../../meta-workflows/models/application-coding-agent.actors-system.definitions.js';
116
+ import { ChangeSetAttributionClass, ApplicationCodingTaskDisposition, CodingRunFailureAttribution, deriveCodingRunFailureAttribution, APPLICATION_CODING_CONTRACT_REFUSAL_MARKER, DISPATCH_DEFAULT_MAX_CAPTURED_BYTES, DISPATCH_DEFAULT_TIMEOUT_MS, DISPATCH_HARD_MAX_CAPTURED_BYTES, DISPATCH_HARD_MAX_TIMEOUT_MS, VerificationKind, renderApplicationCodingTaskAgentPrompt, resolveApplicationCodingTaskVerificationPlans, } from '../models/coding-agent-dispatch.models.js';
117
+ import { CodingSessionFrameRetention } from '../models/coding-session-frame-retention.js';
118
+ import { isInfrastructureShapedAgentFailure, isProviderAccountAgentFailure } from '../../core/runtime/dev-compile-quiet.companion.js';
119
+ import { diagnoseCarriedVerificationFailure } from '../../meta-workflows/models/carried-verification-failure.models.js';
120
+ import { NothingToRearmError, readBuildTaskRearm, withBuildTaskRearm, } from '../../meta-workflows/models/build-task-rearm.models.js';
121
+ import { APPLICATION_CODING_RUN_CHECKPOINT_KIND, ApplicationCodingRunCheckpointSchema, isParkedCodingRunAnswerable, } from '../models/application-coding-run-checkpoint.models.js';
79
122
  /** Fixed, non-overridable limits for the verification hook subprocess. */
80
123
  const VERIFICATION_TIMEOUT_MS = 10 * 60_000;
81
124
  const VERIFICATION_MAX_CAPTURED_BYTES = 10 * 1024 * 1024;
82
- /**
83
- * The session frames worth retaining on the durable row: what the agent DID and
84
- * what it changed. Message chunks are already summarised by the output tail, and
85
- * usage frames are superseded by the recorded totals.
86
- */
87
- const RETAINED_CODING_SESSION_EVENT_KINDS = new Set(['tool_call', 'tool_call_update', 'plan']);
88
- /** Ceiling on retained frames — a bound, not a sample: excess is dropped, never summarised. */
89
- const RETAINED_CODING_SESSION_FRAME_LIMIT = 200;
90
125
  /** Tail size persisted on the task row; full streams go to traceability artifacts. */
91
126
  const OUTPUT_TAIL_CHARS = 16_000;
127
+ /**
128
+ * How one coding run's executor ENDED, as the engine's execution driver is told to record it.
129
+ *
130
+ * Two ways, and neither is a throw. `parked`: the agent stopped to ask the operator, so the run
131
+ * waits on its execution with the question and its resume inputs. `concluded`: the disposition
132
+ * ladder classified the run — and a `FAILED` conclusion is a REPORTED outcome of a dispatch that
133
+ * succeeded (the agent ran, files may have changed, verification said no), which is why it is a
134
+ * classification with its full output rather than an exception that would lose it.
135
+ *
136
+ * `afterSettle` runs once the rows have moved: the success/failure trace names a result the durable
137
+ * row already carries, never one it might still fail to.
138
+ */
139
+ var CodingRunEnding;
140
+ (function (CodingRunEnding) {
141
+ /** The agent stopped to ask the operator; the run waits on its execution and can be continued. */
142
+ CodingRunEnding["PARKED"] = "parked";
143
+ /** The disposition ladder classified the run — a working result or a reported failure, both terminal. */
144
+ CodingRunEnding["CONCLUDED"] = "concluded";
145
+ })(CodingRunEnding || (CodingRunEnding = {}));
146
+ /**
147
+ * How many change-set file entries ride on the durable row's summary.
148
+ *
149
+ * A build task's change-set is a handful of files by construction — the task declares its mutation
150
+ * scope — so this bounds the pathological case rather than the ordinary one. Chosen over "all of
151
+ * them" because the row is read by a judge whose brief is assembled per run, and over "none of them"
152
+ * because that is what made the judge answer INDETERMINATE about work it could not see.
153
+ */
154
+ const CHANGE_SET_SUMMARY_FILE_LIMIT = 40;
92
155
  /** Local narrow: is this an indexable object (not null, not an array)? */
93
156
  function isRecordValue(value) {
94
157
  return typeof value === 'object' && value !== null && !Array.isArray(value);
95
158
  }
96
159
  /**
97
- * Scope checking is deliberately based on the post-run attribution capture,
98
- * not only clean-baseline files. A baseline-dirty file changed again during a
99
- * run is not safely attributable to the Agent, but it is still a real effect
100
- * inside the host window and must not be used to bypass a declared boundary.
160
+ * Which changed-during-run paths fall outside the task's declared scope. RECORDED, NOT REFUSED.
161
+ *
162
+ * Decided by Paul, 2026-09-13, after measuring what the refusal cost. `build-task-company-config` made
163
+ * its two in-scope edits, stopped at `end_turn`, and was recorded failed — against three
164
+ * `marketing/website` files a parallel Claude Code session edited inside the run window. The capture
165
+ * compares a snapshot at dispatch with one at the end, so a file that was clean at dispatch and dirty
166
+ * at the end is `RUN_EXCLUSIVE` whoever wrote it. On a tree where several sessions work at once, that
167
+ * made EVERY coding run fail the moment anyone touched anything else: the intended use — hand the
168
+ * Wildo lane a change and keep editing elsewhere meanwhile — could not work at all.
169
+ *
170
+ * The same reasoning was already applied twice and is now applied everywhere: a commit landing
171
+ * mid-run (2026-08-19) and a concurrent research lane (2026-09-09) were each excluded because they
172
+ * cannot be attributed. A parallel session's uncommitted edit is the same fact, and it cannot be
173
+ * listed by root, so the refusal itself is what goes. This is also the application-creation
174
+ * directive: mutation is free, git makes every change visible and reversible, and acceptance is the
175
+ * commit — a restriction arrives later as a judge reading this list, never as a refusal in the lane.
176
+ *
177
+ * What stays enforced is the agent's OWN act: an edit whose permission request declares a location
178
+ * outside the scope is still denied in flight by the runner. What this list adds is visibility for
179
+ * what that guard cannot see — shell commands, which declare no location, and other people's edits.
180
+ * One limit on that: for an application nested inside its repository, a NEW untracked file created
181
+ * OUTSIDE the application is not listed, because `ls-files --others` run from the application root sees
182
+ * only untracked files beneath it. A shell write escaping the application is visible here when it
183
+ * modifies a tracked file, not when it creates one. Verification runs regardless.
101
184
  */
102
185
  function assessApplicationCodingTaskMutationScope(changeSet, allowedPrefixes, prohibitedPrefixes) {
103
186
  const normalizedAllowed = allowedPrefixes.map(normalizeApplicationRelativePrefix);
@@ -106,13 +189,12 @@ function assessApplicationCodingTaskMutationScope(changeSet, allowedPrefixes, pr
106
189
  * Committed paths are deliberately EXCLUDED from the scope decision. They are
107
190
  * present in `changeSet.files` (as `COMMITTED_DURING_RUN`) so nothing is
108
191
  * invisible, but nobody can attribute them: a parallel session's commit and
109
- * the agent's own look identical from here, so refusing on them would fail
110
- * runs for other people's work. `historyMutated` carries that fact forward
111
- * instead, and the acceptance tier decides what an unattributable window is
112
- * worth.
192
+ * the agent's own look identical from here, so listing them would record
193
+ * other people's work as this run's. `historyMutated` carries that fact forward
194
+ * instead, for whoever reviews the result.
113
195
  */
114
196
  /*
115
- * A disappearance is only a VIOLATION when the run can be held responsible for it, and a commit
197
+ * A disappearance is only listed when the run can be held responsible for it, and a commit
116
198
  * landing inside the window is precisely when it cannot.
117
199
  *
118
200
  * `disappearedFromBaseline` is "dirty at baseline, no longer dirty post-run", which has two
@@ -130,18 +212,53 @@ function assessApplicationCodingTaskMutationScope(changeSet, allowedPrefixes, pr
130
212
  * set. The field's own contract already said they "are NOT attributed change-set entries".
131
213
  *
132
214
  * So the exclusion is conditional, not blanket: with no commit in the window a disappearance
133
- * IS the run's doing and still fails it. Only the case the run cannot be responsible for is
215
+ * IS the run's doing and is still listed. Only the case the run cannot be responsible for is
134
216
  * dropped, and it stays visible — the paths remain on `disappearedFromBaseline`, and
135
- * `historyMutated` tells the acceptance tier the window is unattributable.
217
+ * `historyMutated` tells the reviewer the window is unattributable.
136
218
  */
137
219
  const disappearancesAttributableToTheRun = changeSet.headMovedDuringRun
138
220
  ? []
139
221
  : changeSet.disappearedFromBaseline;
140
- const violatingPaths = [
222
+ /*
223
+ * A CONCURRENT_HOST_LANE path is excluded for the same reason a committed one
224
+ * is, and the exclusion is applied in the same place for the same reason: it
225
+ * belongs to a companion lane that runs INSIDE this window and is not this
226
+ * run's to write. The research dispatch takes no workspace-mutation lock by
227
+ * design — it mutates nothing but its own evidence store — and that store is
228
+ * committable and therefore fully visible here, so before this filter (2026-09-09,
229
+ * while this check still refused) one `POST /api/companion/research` overlapping
230
+ * a coding run failed the coding run as `MUTATION_SCOPE_VIOLATION` against files
231
+ * it never touched. Today nothing refuses; the filter keeps another lane's
232
+ * writes off the out-of-scope list the reviewer reads, so that list names only
233
+ * paths that could be this run's.
234
+ *
235
+ * Both halves are filtered, and the second is easy to miss: an entry carries
236
+ * an attribution class, while a DISAPPEARANCE is a bare path — so the
237
+ * disappearance of an evidence file a research round rewrote or deleted would
238
+ * otherwise be listed. One predicate answers both (its own contract says why it
239
+ * is exported).
240
+ */
241
+ /*
242
+ * And a path ABOVE THE APPLICATION ROOT is excluded on the same terms (#1020): the scope this list
243
+ * is compared against is application-relative, so `../engine/…` can never be admitted by it, and on a
244
+ * monorepo checkout such a path is another session's edit — 38 of the 39 paths one run was recorded
245
+ * against. The entry stays in the change set as `OUTSIDE_APPLICATION_ROOT` and is counted; the bare
246
+ * disappearance is filtered by the same predicate, for the reason given above.
247
+ */
248
+ /*
249
+ * THE exclusion predicate, named once and read twice: by the scope list that drops these entries and
250
+ * by the record that names them. Deriving both from one function is the point — the previous shape
251
+ * excluded three classes and reported one, which is how the judge came to read an unexplained gap
252
+ * twice in an hour, about a different class each time.
253
+ */
254
+ const isExcludedFromScopeAssessment = (attribution) => attribution === ChangeSetAttributionClass.COMMITTED_DURING_RUN
255
+ || attribution === ChangeSetAttributionClass.CONCURRENT_HOST_LANE
256
+ || attribution === ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT;
257
+ const outOfScopePaths = [
141
258
  ...changeSet.files
142
- .filter((entry) => entry.attribution !== ChangeSetAttributionClass.COMMITTED_DURING_RUN)
259
+ .filter((entry) => !isExcludedFromScopeAssessment(entry.attribution))
143
260
  .map((entry) => entry.path),
144
- ...disappearancesAttributableToTheRun,
261
+ ...disappearancesAttributableToTheRun.filter((path) => !isConcurrentHostLanePath(path) && !isOutsideApplicationRootPath(path)),
145
262
  ]
146
263
  .filter((path) => {
147
264
  const normalizedPath = normalizeApplicationRelativePrefix(path);
@@ -149,12 +266,18 @@ function assessApplicationCodingTaskMutationScope(changeSet, allowedPrefixes, pr
149
266
  const inProhibitedScope = normalizedProhibited.some((prefix) => matchesApplicationRelativePrefix(normalizedPath, prefix));
150
267
  return !inAllowedScope || inProhibitedScope;
151
268
  });
269
+ /*
270
+ * Everything the scope list deliberately drops, named WITH THE CLASS that dropped it, so the record
271
+ * reconciles itself instead of leaving a reader to infer an omission. Derived from the predicate
272
+ * above, so a class added to the exclusion tomorrow is reported here the same day.
273
+ */
274
+ const excludedFromScopeAssessment = changeSet.files
275
+ .filter((entry) => isExcludedFromScopeAssessment(entry.attribution))
276
+ .map((entry) => ({ path: entry.path, attribution: entry.attribution }));
152
277
  return {
153
- // `historyMutated` does NOT gate admissibility (see the field's contract):
154
- // it is recorded so the consumer of this working result can see that the
155
- // window is unattributable, not used to fail a run that protected nothing.
156
- allowed: violatingPaths.length === 0,
157
- violatingPaths,
278
+ // No field here gates the run: all are recorded for whoever reviews and commits this result.
279
+ outOfScopePaths,
280
+ excludedFromScopeAssessment,
158
281
  historyMutated: changeSet.headMovedDuringRun,
159
282
  };
160
283
  }
@@ -165,13 +288,61 @@ function assessApplicationCodingTaskMutationScope(changeSet, allowedPrefixes, pr
165
288
  *
166
289
  * Deliberately reuses the SAME normalisation and boundary matching as the
167
290
  * post-hoc assessment. Two predicates answering "is this path in scope?" with
168
- * different rules would produce the worst possible outcome — a run permitted
169
- * live and then judged a scope violation afterwards, or the reverse.
291
+ * different rules would make the record contradict the guard — a path the live
292
+ * guard permitted listed as out of scope afterwards, or a refused one missing
293
+ * from that list's reasoning. (The post-hoc assessment only records since
294
+ * 2026-09-13; the agreement still matters, because the reviewer reads both.)
170
295
  *
171
296
  * It NARROWS and never widens: the permission ceiling still decides the KIND of
172
297
  * operation, and this only refuses a path that ceiling would otherwise allow.
173
298
  * A path outside the workspace is refused outright rather than reasoned about.
174
299
  */
300
+ /*
301
+ * The option refs and the field ref moved to `@wildo-ai/platform-core-shared` on 2026-09-19, beside
302
+ * the `workbenchParkedCodingQuestions` row that carries them to a browser. They are re-exported here
303
+ * under their old names so this file's callers are unchanged, and there is ONE declaration.
304
+ */
305
+ export { Workbench_ParkedCodingQuestionOptionRef as ParkedCodingQuestionOptionRef } from '@wildo-ai/platform-core-shared';
306
+ export { WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF as PARKED_CODING_QUESTION_FIELD_REF } from '@wildo-ai/platform-core-shared';
307
+ /**
308
+ * Exported for tests that build the service without its constructor (field initializers do not run
309
+ * under `Object.create`), so they read the PRODUCTION classification rather than a copy of it.
310
+ */
311
+ export const CODING_RUN_OPTIONS = {
312
+ suspendOn: (result) => (result.kind === CodingRunEnding.PARKED ? result.suspension : null),
313
+ concludeAs: (result) => (result.kind === CodingRunEnding.CONCLUDED ? result.conclusion : null),
314
+ };
315
+ /**
316
+ * Project a parked coding run as a decision a person can be shown.
317
+ *
318
+ * ONE free-text field, because that is what ACP gives us: `CodingAgent_SessionSuspension` carries the
319
+ * agent's end-of-turn message and nothing structured. The payload's field set is general enough to
320
+ * carry that as its degenerate case, which is the point of modelling a question as a field set rather
321
+ * than as "the question".
322
+ *
323
+ * `resumable: false` is surfaced in the description rather than hidden: the question is still real,
324
+ * but answering starts a NEW session that must restate the task context — a degradation the person
325
+ * deciding should see, not one the caller should smooth over.
326
+ */
327
+ function projectParkedCodingQuestionAsDecision(parked) {
328
+ return {
329
+ decisionId: parked.taskId,
330
+ title: parked.taskRef,
331
+ description: parked.suspension.resumable
332
+ ? 'The coding agent stopped to ask. Answering resumes the same session.'
333
+ : 'The coding agent stopped to ask. This session cannot be re-entered, so answering starts a NEW one that must restate the task context.',
334
+ fields: [{
335
+ ref: WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF,
336
+ question: parked.suspension.question,
337
+ kind: HumanDecision_FieldKind.FREE_TEXT,
338
+ }],
339
+ options: [
340
+ { ref: Workbench_ParkedCodingQuestionOptionRef.ANSWER, label: 'Answer and continue', intent: HumanDecision_ResponseIntent.PROCEED_WITH_VALUES },
341
+ { ref: Workbench_ParkedCodingQuestionOptionRef.CANCEL, label: 'Cancel this run', intent: HumanDecision_ResponseIntent.ABORT },
342
+ ],
343
+ requestedAt: parked.parkedAt,
344
+ };
345
+ }
175
346
  export function buildApplicationCodingTaskLocationPredicate(workspaceRootPath, allowedPrefixes, prohibitedPrefixes) {
176
347
  const normalizedAllowed = allowedPrefixes.map(normalizeApplicationRelativePrefix);
177
348
  const normalizedProhibited = prohibitedPrefixes.map(normalizeApplicationRelativePrefix);
@@ -186,17 +357,7 @@ export function buildApplicationCodingTaskLocationPredicate(workspaceRootPath, a
186
357
  * silently denies everything is worse than one that denies nothing, because
187
358
  * it looks like the agent failing rather than the guard misfiring.
188
359
  */
189
- const candidateRoots = [workspaceRootPath];
190
- try {
191
- const physicalRoot = realpathSync.native(workspaceRootPath);
192
- if (physicalRoot !== workspaceRootPath) {
193
- candidateRoots.push(physicalRoot);
194
- }
195
- }
196
- catch {
197
- // An unresolvable root is left as authored; the relative check below still
198
- // refuses anything outside it.
199
- }
360
+ const candidateRoots = applicationRootSpellings(workspaceRootPath);
200
361
  return (absolutePath) => {
201
362
  if (!isAbsolute(absolutePath)) {
202
363
  return false;
@@ -213,6 +374,23 @@ export function buildApplicationCodingTaskLocationPredicate(workspaceRootPath, a
213
374
  return inAllowedScope && !inProhibitedScope;
214
375
  };
215
376
  }
377
+ /**
378
+ * The configured application root and, when it differs, its physical realpath — the two spellings an
379
+ * agent's absolute path may use (see the predicate above). An unresolvable root is left as authored;
380
+ * a relative check against it still refuses anything outside it.
381
+ */
382
+ function applicationRootSpellings(workspaceRootPath) {
383
+ const roots = [workspaceRootPath];
384
+ try {
385
+ const physicalRoot = realpathSync.native(workspaceRootPath);
386
+ if (physicalRoot !== workspaceRootPath)
387
+ roots.push(physicalRoot);
388
+ }
389
+ catch {
390
+ // Left as authored.
391
+ }
392
+ return roots;
393
+ }
216
394
  function normalizeApplicationRelativePrefix(value) {
217
395
  return value.replace(/\\/g, '/').replace(/^\.\//, '').replace(/\/+$/, '');
218
396
  }
@@ -229,12 +407,91 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
229
407
  executionsService;
230
408
  traceabilityService;
231
409
  introspectionService;
410
+ actorsSystem;
411
+ codingRunWriteRegister;
412
+ acceptedChangeCommit;
232
413
  logDebug;
233
414
  /**
234
- * In-memory single-flight flag — the FAST 409 in front of the
235
- * cross-process lockfile, never a replacement for it (P-20).
415
+ * The CANCEL HANDLE of the coding session this process is driving — nothing more (#1361).
416
+ *
417
+ * Until 2026-09-20 this was also the single-flight flag (the "fast 409" in front of the lockfile),
418
+ * and the status route's answer to "is a run active". Both now read the actor plane: a coding run
419
+ * holds the engine's lease on the `worktree` subject, so the refusal and the badge are as true
420
+ * after a restart, or from a second process, as inside the one driving the run. What cannot live
421
+ * on a row is an `AbortController`, so that is what stays here.
422
+ */
423
+ activeRuns = new Map();
424
+ /**
425
+ * Every coding run's time in the tree, kept for the runs that overlap it (#1528): a concurrent run
426
+ * records which runs shared the tree with it and which paths they both changed. Pruned to
427
+ * {@link CODING_RUN_WINDOW_RETENTION_MS}; in-process, because the comparison is only ever made by
428
+ * the process that drove both runs.
429
+ */
430
+ codingRunWindows = [];
431
+ /**
432
+ * Who wants to know that a run's writes were committed by the loop (#1534).
433
+ *
434
+ * A commit LANDS a task, so every derived board that reads landing is stale the moment one is made.
435
+ * The workbench's `accept` invalidates the creation-plane projection itself; the loop cannot,
436
+ * because the projection already depends on THIS service and injecting it back would be a cycle.
437
+ * So the dependency points the way it already does: the projection subscribes here.
438
+ */
439
+ runAcceptedListeners = [];
440
+ registerRunAcceptedListener(listener) {
441
+ this.runAcceptedListeners.push(listener);
442
+ }
443
+ /**
444
+ * Who wants to know that a build task's RUN STATE changed (#1310) — every trigger is listed on
445
+ * {@link announceRunStateChanged}: selected, started (fresh or resumed), settled, refused before
446
+ * admission, re-armed, and a generation step opening and ending.
447
+ *
448
+ * Wider than {@link registerRunAcceptedListener} on purpose. Each moves the creation boards through
449
+ * actor-plane state no file signature can see: a selected or started run is in flight to the
450
+ * next-task selection, a settled one changes its dispatch row and can LAND a task declaring no
451
+ * product (the RAN-not-PROVEN mark), a refusal leaves a counted failure, and a re-arm releases a task
452
+ * the loop guard or attempt budget was holding — which is what un-stucks the eligibility board's
453
+ * all-stuck gate. Same direction as the accepted-run seam, for the same reason: the projection
454
+ * depends on this service, so it subscribes here.
455
+ *
456
+ * One timing is deliberate rather than exact: a run that PARKS inside a fresh chain is announced
457
+ * when that chain ends, after the answering agent's turn, so for about one model call a cached
458
+ * board may still count it as in flight. Announcing at the park would re-derive the boards and
459
+ * then again at the chain's end, for a window that closes on its own.
460
+ */
461
+ runStateChangedListeners = [];
462
+ registerRunStateChangedListener(listener) {
463
+ this.runStateChangedListeners.push(listener);
464
+ }
465
+ /**
466
+ * Tell the run-state-changed listeners, each isolated from the others.
467
+ *
468
+ * Called at every change to a build task's run state that no file shows:
469
+ *
470
+ * - **SELECTED** — {@link openSelectedApplicationCodingExecution} opened a PENDING execution, which
471
+ * the next-task selection already counts as in flight, whichever door opened it;
472
+ * - **STARTED** — a fresh run ADMITTED (after its active-run entry exists), and a resumed run once
473
+ * the engine has moved its rows back to PROCESSING (inside `resumeParkedRunHoldingLock`'s
474
+ * executor, the one moment its start is true);
475
+ * - **SETTLED** — LAST in the `finally` of each TOP-LEVEL chain, a fresh run's background body and
476
+ * `resumeBody`, after the parked-question answering, the active-run release and the settlement
477
+ * resolve, so a board re-derived because of it reads the chain's final state. Never from inside
478
+ * `resumeParkedRunHoldingLock`'s own `finally`, which is a step of a chain some caller settles.
479
+ * Every ending reaches it, including the ones that returned early;
480
+ * - **RE-ARMED** — {@link rearmBuildTask}, even when one of its updates threw.
481
+ *
482
+ * Public because a GENERATION STEP's execution and a coding dispatch refused before admission are
483
+ * opened and settled by the build dispatch service, so that service announces those.
236
484
  */
237
- activeRun = null;
485
+ announceRunStateChanged() {
486
+ for (const listener of this.runStateChangedListeners) {
487
+ try {
488
+ listener();
489
+ }
490
+ catch (error) {
491
+ this.logDebug('A run-state-changed listener threw', { error: describeCaughtError(error) });
492
+ }
493
+ }
494
+ }
238
495
  /**
239
496
  * Per-process settlement signal of every application coding task THIS
240
497
  * process admitted: resolved when the background run has recorded its
@@ -245,11 +502,10 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
245
502
  */
246
503
  applicationCodingTaskSettlements = new Map();
247
504
  /**
248
- * Tasks parked on a question, keyed by task id — the answerable set. A task
249
- * enters here when a run returns a `suspension` and leaves when it is answered
250
- * (resumed) or explicitly abandoned. See {@link ParkedCodingSessionState}.
505
+ * The driver's reading of what a coding run's executor returned — see {@link CodingRunResult}.
506
+ * One object for a first run and a resumed one, so the two cannot be read by different ladders.
251
507
  */
252
- parkedCodingSessions = new Map();
508
+ codingRunOptions = CODING_RUN_OPTIONS;
253
509
  /**
254
510
  * Live-frame subscribers keyed by task id. Fed by the coding session's own
255
511
  * event stream and the ladder's state transitions while a run is active;
@@ -257,7 +513,7 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
257
513
  * subscriber never touches the run it observes.
258
514
  */
259
515
  codingSessionSubscribers = new Map();
260
- constructor(logger, errorBuilder, companionContext, agentsService, gitChangeSetService, executionsService, traceabilityService, introspectionService) {
516
+ constructor(logger, errorBuilder, companionContext, agentsService, gitChangeSetService, executionsService, traceabilityService, introspectionService, actorsSystem, codingRunWriteRegister, acceptedChangeCommit) {
261
517
  this.logger = logger;
262
518
  this.errorBuilder = errorBuilder;
263
519
  this.companionContext = companionContext;
@@ -266,6 +522,9 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
266
522
  this.executionsService = executionsService;
267
523
  this.traceabilityService = traceabilityService;
268
524
  this.introspectionService = introspectionService;
525
+ this.actorsSystem = actorsSystem;
526
+ this.codingRunWriteRegister = codingRunWriteRegister;
527
+ this.acceptedChangeCommit = acceptedChangeCommit;
269
528
  this.logDebug = this.logger.debugByType('CodingAgentDispatchCompanionService');
270
529
  this.logger.setDebugTypeLogging('CodingAgentDispatchCompanionService', true);
271
530
  }
@@ -278,7 +537,22 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
278
537
  * records a working code result and its evidence, never accepted
279
538
  * application truth.
280
539
  */
281
- async runApplicationCodingTask(rawTask, sessionContext) {
540
+ async runApplicationCodingTask(rawTask, sessionContext,
541
+ /**
542
+ * The execution a caller opened when it SELECTED this task
543
+ * ({@link openSelectedApplicationCodingExecution}). Admission then STARTS that execution instead
544
+ * of opening one, so the run has one pair of ids from selection to settlement. The caller owns it
545
+ * until this method resolves: a rejection here means the run never started, and the caller
546
+ * settles what it opened.
547
+ */
548
+ selected,
549
+ /** Where the run was started from (#1454, Step 7): stamped on the row, never read by the run. */
550
+ origin,
551
+ /**
552
+ * CONCURRENT only from the build loop's wave (#1528), which opened `selected` in the same mode.
553
+ * Every other door is single-flight, and single-flight refuses while any concurrent run is live.
554
+ */
555
+ mode = CodingRunConcurrency.SINGLE_FLIGHT) {
282
556
  /*
283
557
  * Both admission refusals below are TYPED.
284
558
  *
@@ -288,7 +562,7 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
288
562
  * INTERNAL — indistinguishable from the host being broken. They are
289
563
  * VALIDATION: the request is refused, nothing was locked, created or run.
290
564
  */
291
- const task = this.admitTypedInput(() => ApplicationCodingTaskContractSchema.parse(rawTask), 'Application coding task contract is not valid.');
565
+ const task = this.admitTypedInput(() => MetaWorkflow_ApplicationCodingTaskContractSchema.parse(rawTask), 'Application coding task contract is not valid.');
292
566
  // Resolve before acquiring the lock or creating a task. A semantic check
293
567
  // name is not a command and cannot silently fall back to an arbitrary
294
568
  // workspace typecheck.
@@ -304,40 +578,70 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
304
578
  artifactFileName: 'application-coding-task-input.txt',
305
579
  artifactContent: renderedPrompt,
306
580
  });
307
- if (this.activeRun) {
308
- throw this.buildDispatchConflictError(`A coding-agent run is already active (task ${this.activeRun.taskId}, started ${this.activeRun.startedAt}). `
309
- + 'Application coding tasks share the same cross-process mutation lock.');
310
- }
581
+ // The FAST 409, read from the rows (#1361): a run holding the worktree that is not the one this
582
+ // call was handed. The authoritative take is the driver's, at open — this only answers early,
583
+ // with the holder named, instead of making the caller wait on the file lock to be told the same.
584
+ await this.refuseWhileWorktreeIsHeld(selected?.executionId ?? null, sessionContext);
585
+ if (mode === CodingRunConcurrency.SINGLE_FLIGHT)
586
+ await this.refuseWhileConcurrentRunsInFlight(sessionContext);
311
587
  const admission = createDeferred();
312
- const backgroundRun = withDedicatedFileLock(this.getWorkspaceMutationLockPath(), async () => {
588
+ const runBody = async () => {
313
589
  let admitted;
590
+ // Before the baseline, never inside the run: a playbook file left uncommitted here would be
591
+ // dirty at this run's baseline, and this run's own accept would then refuse it (#1534). A
592
+ // concurrent run holds no lock, so it takes one for this commit only.
593
+ await (mode === CodingRunConcurrency.CONCURRENT
594
+ ? this.underBriefWorktreeLock(() => this.acceptPendingPlaybookRunsBeforeBaseline())
595
+ : this.acceptPendingPlaybookRunsBeforeBaseline());
314
596
  try {
315
597
  const baseline = await this.gitChangeSetService.captureWorktreeSnapshot();
316
- const durableTask = await this.createApplicationCodingTask(task, baseline, sessionContext);
317
- this.activeRun = {
318
- taskId: durableTask._id,
598
+ // The run IS an actor-system execution from here on (#1359): the engine opens the
599
+ // execution and its task, and will settle both however the run ends.
600
+ const opened = selected
601
+ ? await this.startSelectedApplicationCodingExecution(selected, task, baseline, sessionContext, origin)
602
+ : await this.openApplicationCodingExecution(task, baseline, sessionContext, origin, mode);
603
+ this.activeRuns.set(opened.taskId, {
604
+ taskId: opened.taskId,
319
605
  startedAt: new Date().toISOString(),
320
606
  abortController: new AbortController(),
321
- };
322
- admitted = { task: durableTask, baseline };
607
+ mode,
608
+ });
609
+ this.openCodingRunWindow(opened.taskId, task.taskRef);
610
+ // Started: the run has left the next-task selection's ready set, and no file says so yet.
611
+ this.announceRunStateChanged();
612
+ admitted = { opened, baseline };
323
613
  // Registered BEFORE the admission is resolved, so a caller that
324
614
  // awaits the settlement right after admission can never miss it.
325
615
  const settlement = createDeferred();
326
- this.applicationCodingTaskSettlements.set(durableTask._id, { promise: settlement.promise, resolve: () => settlement.resolve(undefined) });
616
+ this.applicationCodingTaskSettlements.set(opened.taskId, { promise: settlement.promise, resolve: () => settlement.resolve(undefined) });
327
617
  admission.resolve(admitted);
328
618
  }
329
619
  catch (error) {
330
- admission.reject(error);
620
+ admission.reject(this.translateWorktreeBusy(error));
331
621
  return;
332
622
  }
333
623
  try {
334
- await this.executeApplicationCodingTask(task, renderedPrompt, verificationPlans, admitted.task, admitted.baseline);
624
+ const trace = await this.openCodingRunTrace(admitted.opened.taskId, task.taskRef);
625
+ await this.superviseCodingRun(task.taskRef, admitted.opened.taskId, trace, (capture) => this.actorsSystem.completeActorExecution(admitted.opened, async (opened) => capture(await this.executeApplicationCodingTask(task, renderedPrompt, verificationPlans, opened, admitted.baseline, trace)), trace.runSession, this.codingRunOptions));
626
+ // Before the settlement resolves and before the worktree is released: a question the run
627
+ // parked on is offered to the answering agent while nothing else can take the worktree (#1559).
628
+ await this.answerParkedQuestionsHoldingLock(admitted.opened.taskId, sessionContext);
335
629
  }
336
630
  finally {
337
- this.activeRun = null;
338
- this.applicationCodingTaskSettlements.get(admitted.task._id)?.resolve();
631
+ this.endCodingRunWindow(admitted.opened.taskId);
632
+ this.activeRuns.delete(admitted.opened.taskId);
633
+ this.applicationCodingTaskSettlements.get(admitted.opened.taskId)?.resolve();
634
+ this.announceRunStateChanged();
339
635
  }
340
- }, { retries: { retries: 0 } });
636
+ };
637
+ /*
638
+ * A SINGLE-FLIGHT run holds the workspace lock for its whole life, as it always has. A CONCURRENT
639
+ * run holds none (#1528): the tree is shared by decision, and interference is detected and
640
+ * repaired rather than prevented. It takes the lock only around a commit.
641
+ */
642
+ const backgroundRun = mode === CodingRunConcurrency.CONCURRENT
643
+ ? runBody()
644
+ : withDedicatedFileLock(this.getWorkspaceMutationLockPath(), runBody, { retries: { retries: 0 } });
341
645
  backgroundRun.catch((error) => {
342
646
  admission.reject(this.mapLockError(error));
343
647
  this.logDebug('Application coding-task background run chain terminated with error', {
@@ -347,21 +651,33 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
347
651
  });
348
652
  const admitted = await admission.promise;
349
653
  const response = {
350
- taskId: admitted.task._id,
654
+ taskId: admitted.opened.taskId,
351
655
  status: FlowsActors_Status.PROCESSING,
352
656
  taskRef: task.taskRef,
353
657
  baselineHeadSha: admitted.baseline.headSha,
354
658
  baselineDirtyFileCount: Object.keys(admitted.baseline.files).length,
355
659
  };
356
- await this.traceOperationSuccess({
357
- sessionContext,
358
- step: traceStep,
359
- type: 'application-coding-task-admission-success',
360
- summary: `Admitted application coding task ${task.taskRef} as Actor Task ${admitted.task._id}`,
361
- payload: response,
362
- artifactFileName: 'application-coding-task-admission.json',
363
- artifactContent: response,
364
- });
660
+ /*
661
+ * The run has STARTED by now, so nothing after this point may reject: a caller reads a rejection
662
+ * from this method as "the run never started" and settles its execution ABORTED (#1581, second
663
+ * review A7). The trace is evidence ABOUT the admission, never a condition of it.
664
+ */
665
+ try {
666
+ await this.traceOperationSuccess({
667
+ sessionContext,
668
+ step: traceStep,
669
+ type: 'application-coding-task-admission-success',
670
+ summary: `Admitted application coding task ${task.taskRef} as Actor Task ${admitted.opened.taskId} of execution ${admitted.opened.executionId}`,
671
+ payload: response,
672
+ artifactFileName: 'application-coding-task-admission.json',
673
+ artifactContent: response,
674
+ });
675
+ }
676
+ catch (traceError) {
677
+ this.logDebug('The admission-success trace could not be written; the run is admitted regardless', {
678
+ taskId: admitted.opened.taskId, error: describeCaughtError(traceError),
679
+ });
680
+ }
365
681
  return response;
366
682
  }
367
683
  /**
@@ -376,72 +692,231 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
376
692
  return this.applicationCodingTaskSettlements.get(taskId)?.promise ?? null;
377
693
  }
378
694
  /**
379
- * Reconcile only a previous process's unfinished application-coding rows.
695
+ * Read one application coding task's OUTCOME from its durable row.
696
+ *
697
+ * Pairs with {@link awaitApplicationCodingTaskSettlement}: wait for the settlement, then ask this
698
+ * what the run did. The two are deliberately separate — the settlement is an in-process fact (only
699
+ * this process holds the deferred), while the outcome is durable and survives the restart that a
700
+ * rebuild triggers, so a caller that lost the settlement can still answer the question.
701
+ *
702
+ * `null` for a row that is not an application coding task, or that cannot be read at all. An
703
+ * unreadable row is not a failed run, and a caller must not report it as one.
704
+ */
705
+ async readApplicationCodingTaskOutcome(taskId, sessionContext) {
706
+ let row;
707
+ try {
708
+ row = await this.executionsService.getActorTask(taskId, sessionContext);
709
+ }
710
+ catch {
711
+ return null;
712
+ }
713
+ // MEMBERSHIP, as everywhere else that classifies one of these rows: a second declared coding
714
+ // agent must not make this silently answer "not a coding run".
715
+ if (!isApplicationCodingAgentRef(row.actors?.actorRef))
716
+ return null;
717
+ const output = isRecordValue(row.output) ? row.output : {};
718
+ const verificationRows = (Array.isArray(output.verification) ? output.verification : [])
719
+ .filter((entry) => isRecordValue(entry))
720
+ .map((entry) => ({
721
+ checkRef: typeof entry.checkRef === 'string' ? entry.checkRef : 'unknown',
722
+ success: isRecordValue(entry.outcome) && entry.outcome.success === true,
723
+ }));
724
+ const failedVerificationRefs = verificationRows.filter((entry) => !entry.success).map((entry) => entry.checkRef);
725
+ return {
726
+ taskId: typeof row._id === 'string' ? row._id : taskId,
727
+ taskRef: isRecordValue(row.input) && typeof row.input.taskRef === 'string' ? row.input.taskRef : null,
728
+ status: typeof row.status === 'string' ? row.status : 'UNKNOWN',
729
+ succeeded: output.succeeded === true,
730
+ disposition: typeof output.disposition === 'string' ? output.disposition : null,
731
+ // The STATUS says it, since #1359: a parked run waits as `AWAITING_APPROVAL`. The output still
732
+ // carries the question while it waits, but a withdrawn park keeps that output and is not waiting.
733
+ awaitingAnswer: row.status === FlowsActors_Status.AWAITING_APPROVAL,
734
+ failedVerificationRefs,
735
+ verification: verificationRows,
736
+ changeSetSummary: isRecordValue(output.changeSetSummary) ? output.changeSetSummary : null,
737
+ scopeAssessment: isRecordValue(output.scopeAssessment) ? output.scopeAssessment : null,
738
+ agentStopReason: typeof output.agentStopReason === 'string' ? output.agentStopReason : null,
739
+ };
740
+ }
741
+ /**
742
+ * Settle what a previous process left behind: coding runs still `PROCESSING`, and parked
743
+ * questions a restarted host can no longer show as answerable.
744
+ *
745
+ * A companion restart cannot prove the previous coding subprocess is still running. Retrying
746
+ * could duplicate a worktree mutation, while reverting would destroy evidence. The safe result is
747
+ * therefore a terminal abort plus an explicit human-review disposition carrying what the worktree
748
+ * looked like when the restart found it.
749
+ *
750
+ * Since #1359 the engine's execution driver does the settling, exactly as it does for playbook
751
+ * runs, and this method supplies the two things only the coding lane knows:
380
752
  *
381
- * A companion restart cannot prove the previous Claude Code subprocess is
382
- * still running. Retrying could duplicate a worktree mutation, while
383
- * reverting would destroy evidence. The safe v0 result is therefore a
384
- * terminal physical abort plus an explicit human-review disposition. Root
385
- * wires this method into ordinary startup in a later, separately reviewed
386
- * join; this source slice never invokes it automatically.
753
+ * 1. **What an ORPHAN's task should say** — the recovery evidence. The driver lists the
754
+ * `PROCESSING` executions of `application-coding.system` and settles each `ABORTED`.
755
+ * 2. **Which PARKS survive a restart: every one whose session can be re-entered.** A parked run
756
+ * is `AWAITING_APPROVAL`, never `PROCESSING`, so the orphan sweep cannot touch it — the
757
+ * exemption this method used to carry by hand (measured 2026-09-04: the sweep terminalized a
758
+ * parked row three seconds before the operator's answer arrived) is a property of the status.
759
+ * What is aborted here is only a park no host could answer on its session — a non-resumable one,
760
+ * or one whose checkpoint cannot be read ({@link isParkedCodingRunAnswerable}). A park is NOT
761
+ * aborted for its age: that reaped every question that waited longer than fifteen minutes (#1533).
387
762
  */
388
763
  async reconcileInterruptedApplicationCodingTasks(sessionContext) {
389
- const processingTasks = await this.executionsService.listActorTasks({
390
- status: FlowsActors_Status.PROCESSING,
391
- limit: 200,
392
- }, sessionContext);
393
764
  const reconciledTaskIds = [];
394
- for (const task of processingTasks) {
395
- if (task.actors?.actorRef !== APPLICATION_CODING_AGENT_REF)
765
+ const interruptedWhileRunning = [];
766
+ await this.actorsSystem.reconcileOrphanedActorExecutions(APPLICATION_CODING_SYSTEM_REF, sessionContext, {
767
+ describeOrphan: async (orphan) => {
768
+ reconciledTaskIds.push(...orphan.tasks.map((task) => task._id));
769
+ /*
770
+ * A PENDING orphan was SELECTED and never admitted — usually a restart during the compile-quiet
771
+ * wait. It touched nothing, so it has no writes to recover and nothing to review, and it was no
772
+ * attempt: recorded like a refused dispatch, `{ failure }` and no disposition, so the build
773
+ * board does not count it as a started run that "requires review" (#1581, second review A4).
774
+ */
775
+ if (orphan.status === FlowsActors_Status.PENDING) {
776
+ return { failure: { message: 'Selected, and the companion stopped before the run was admitted; nothing ran.' } };
777
+ }
778
+ interruptedWhileRunning.push(...orphan.tasks.map((task) => task._id));
779
+ return this.describeInterruptedCodingRun();
780
+ },
781
+ });
782
+ await this.recoverInterruptedRunWrites(interruptedWhileRunning, sessionContext);
783
+ const waiting = await this.actorsSystem.listSuspendedActorExecutions(APPLICATION_CODING_SYSTEM_REF, sessionContext);
784
+ for (const row of waiting) {
785
+ const checkpoint = ApplicationCodingRunCheckpointSchema.safeParse(row.checkpoint?.context);
786
+ if (checkpoint.success && isParkedCodingRunAnswerable(checkpoint.data))
396
787
  continue;
397
- /*
398
- * A PARKED task is deliberately PROCESSING with no live child — its agent process is already
399
- * closed and the answer resumes the persisted session via `session/load`. That is the ONE
400
- * PROCESSING shape a restart must NOT terminalize: surviving the restart is the suspension's
401
- * whole design (`reconstructParkedCodingTaskForResume` re-selects it from the build plan).
402
- * Measured 2026-09-04, first live park on a restart: this sweep terminalized the parked row
403
- * and nulled its suspension three seconds before the operator's answer arrived, so the
404
- * restart-durability door refused with "no coding task is awaiting an answer". Only a FRESH,
405
- * RESUMABLE suspension is exempt — an expired `parkedUntil`, or an agent that cannot
406
- * `session/load`, leaves a question nobody can answer on the same session, and terminalizing
407
- * it for review is then the honest outcome.
408
- */
409
- const parkedOutput = task.output;
410
- if (parkedOutput?.disposition === ApplicationCodingTaskDisposition.AWAITING_OPERATOR_INPUT) {
411
- const parsedSuspension = CodingAgent_SessionSuspensionSchema.safeParse(parkedOutput.suspension);
412
- const stillAnswerable = parsedSuspension.success
413
- && parsedSuspension.data.resumable
414
- && Date.parse(parsedSuspension.data.parkedUntil) > Date.now();
415
- if (stillAnswerable)
416
- continue;
417
- }
418
- let currentSnapshot = null;
419
- let captureError = null;
788
+ await this.actorsSystem.abortSuspendedActorExecution(row._id, await this.describeInterruptedCodingRun(), sessionContext);
789
+ reconciledTaskIds.push(...row.tasks.map((task) => task._id));
790
+ }
791
+ return { reconciledTaskIds };
792
+ }
793
+ /**
794
+ * Give a run the host stopped under an OWNER for what it wrote, and accept that under the posture.
795
+ *
796
+ * ## Why this exists
797
+ *
798
+ * A run interrupted mid-task leaves its writes in the tree and is settled
799
+ * INTERRUPTED_REQUIRES_REVIEW. Nothing recorded WHICH files it wrote — its baseline lived in memory
800
+ * — so nobody could accept them, and its retry could not claim them either: to the retry they were
801
+ * already dirty at its own baseline (`baseline_dirty_ambiguous`). Measured 2026-09-24 on
802
+ * scratch-journey: an interrupted `build-task-user-menu-placement` left `app-shell.config.ts` dirty;
803
+ * the retry found the work done and recorded no files; a sibling task's edit to the same file was
804
+ * refused as ambiguous; and every shell surface that file carries stopped landing, including one
805
+ * that had landed hours earlier. The build sat at 91/95 with its work done.
806
+ *
807
+ * ## What it does
808
+ *
809
+ * The run's task input now carries its baseline's dirty files, so the change set is the same
810
+ * capture a finished run gets, against the same baseline, recorded in the same write register.
811
+ * Then the ordinary posture decides: under notify-and-proceed it is committed with the
812
+ * INTERRUPTED_RUN_RECOVERY origin (forced, like the end-of-wave repair, because "already dirty"
813
+ * and "edited since" are exactly what an interruption produces); under a posture that keeps
814
+ * acceptance with a person, the record simply waits for the workbench's Accept, which could not
815
+ * act on an interrupted run before because there was no record.
816
+ *
817
+ * A run started before its input carried `files` has no baseline to diff against and is left as
818
+ * it was. BEST-EFFORT throughout: this runs on the boot path, and a boot path must not fail closed
819
+ * on a repair (`continuity-drift-and-cas-basis.md`, Rule 3).
820
+ */
821
+ async recoverInterruptedRunWrites(taskIds, sessionContext) {
822
+ const recoveredTaskRefs = [];
823
+ for (const taskId of taskIds) {
420
824
  try {
421
- currentSnapshot = await this.gitChangeSetService.captureWorktreeSnapshot();
825
+ const row = await this.executionsService.getActorTask(taskId, sessionContext);
826
+ const input = isRecordValue(row.input) ? row.input : undefined;
827
+ const baseline = input && isRecordValue(input.baseline) ? input.baseline : undefined;
828
+ const taskRef = input && typeof input.taskRef === 'string' ? input.taskRef : undefined;
829
+ if (!taskRef || !baseline || !isRecordValue(baseline.files)
830
+ || typeof baseline.headSha !== 'string' || typeof baseline.capturedAt !== 'string')
831
+ continue;
832
+ const snapshot = {
833
+ headSha: baseline.headSha,
834
+ capturedAt: baseline.capturedAt,
835
+ files: baseline.files,
836
+ };
837
+ const changeSet = await this.gitChangeSetService.captureChangeSet(snapshot);
838
+ if (changeSet.files.length === 0)
839
+ continue;
840
+ await this.codingRunWriteRegister.record({ taskId, taskRef, changeSet });
841
+ recoveredTaskRefs.push(taskRef);
422
842
  }
423
843
  catch (error) {
424
- captureError = error;
844
+ this.logger.warn('Could not recover the writes of an interrupted coding run; it stays for review', {
845
+ taskId, error: describeCaughtError(error),
846
+ });
425
847
  }
426
- const updatePayload = CompanionUpdateActorTaskRequestSchema.parse({
427
- status: FlowsActors_Status.ABORTED,
428
- output: {
429
- succeeded: false,
430
- disposition: ApplicationCodingTaskDisposition.INTERRUPTED_REQUIRES_REVIEW,
431
- recoveryEvidence: currentSnapshot
432
- ? {
433
- headSha: currentSnapshot.headSha,
434
- dirtyFileCount: Object.keys(currentSnapshot.files).length,
435
- capturedAt: currentSnapshot.capturedAt,
436
- }
437
- : null,
438
- ...(captureError ? { recoveryCaptureError: buildOutputErrorPayload(captureError) } : {}),
848
+ }
849
+ if (recoveredTaskRefs.length === 0)
850
+ return;
851
+ const results = await this.reconcileAcceptance(recoveredTaskRefs, AcceptOrigin.INTERRUPTED_RUN_RECOVERY);
852
+ this.logger.warn('Recovered the writes of coding run(s) interrupted by a restart', { recoveredTaskRefs, results });
853
+ }
854
+ /**
855
+ * Write a run's baseline onto its own task, for a run whose task was opened before the baseline
856
+ * existed: a GENERATION STEP, whose window captures it after the execution is open. A coding run
857
+ * carries it from its start ({@link buildApplicationCodingTaskInput}). Best-effort: the step runs
858
+ * whether or not its recovery evidence could be written.
859
+ */
860
+ async recordRunBaselineOnTask(taskId, baseline, sessionContext) {
861
+ try {
862
+ const row = await this.executionsService.getActorTask(taskId, sessionContext);
863
+ const input = isRecordValue(row.input) ? row.input : {};
864
+ await this.executionsService.updateActorTask(taskId, {
865
+ input: {
866
+ ...input,
867
+ baseline: { headSha: baseline.headSha, capturedAt: baseline.capturedAt, dirtyFileCount: Object.keys(baseline.files).length, files: baseline.files },
439
868
  },
869
+ }, sessionContext);
870
+ }
871
+ catch (error) {
872
+ this.logger.warn('Could not record a generation step\'s baseline; an interruption would leave its writes for review', {
873
+ taskId, error: describeCaughtError(error),
440
874
  });
441
- await this.executionsService.updateActorTask(task._id, updatePayload, sessionContext);
442
- reconciledTaskIds.push(task._id);
443
875
  }
444
- return { reconciledTaskIds };
876
+ }
877
+ /**
878
+ * The build system's startup sweep (#1359), with the same recovery the coding sweep has. A
879
+ * generation step interrupted mid-pass leaves the files it had written, and its re-dispatch SKIPS
880
+ * them as fresh, so they never enter any later change set. Measured 2026-09-24: an interrupted
881
+ * `i18n-labels` pass left ten label files uncommitted that no later run would ever commit.
882
+ */
883
+ async reconcileInterruptedBuildGenerationSteps(buildSystemRef, sessionContext) {
884
+ const interrupted = [];
885
+ const { aborted } = await this.actorsSystem.reconcileOrphanedActorExecutions(buildSystemRef, sessionContext, {
886
+ describeOrphan: async (orphan) => {
887
+ interrupted.push(...orphan.tasks.map((task) => task._id));
888
+ return { failure: { message: 'The host running this generation step stopped before it concluded.' } };
889
+ },
890
+ });
891
+ await this.recoverInterruptedRunWrites(interrupted, sessionContext);
892
+ return { aborted };
893
+ }
894
+ /**
895
+ * What a reviewer needs to see on a coding run the host stopped under: where HEAD is and how
896
+ * dirty the tree is NOW. A capture that fails is recorded as such — an interrupted run with no
897
+ * evidence is still an interrupted run, and must not stay `PROCESSING` because git was unavailable.
898
+ */
899
+ async describeInterruptedCodingRun() {
900
+ let currentSnapshot = null;
901
+ let captureError = null;
902
+ try {
903
+ currentSnapshot = await this.gitChangeSetService.captureWorktreeSnapshot();
904
+ }
905
+ catch (error) {
906
+ captureError = error;
907
+ }
908
+ return {
909
+ succeeded: false,
910
+ disposition: ApplicationCodingTaskDisposition.INTERRUPTED_REQUIRES_REVIEW,
911
+ recoveryEvidence: currentSnapshot
912
+ ? {
913
+ headSha: currentSnapshot.headSha,
914
+ dirtyFileCount: Object.keys(currentSnapshot.files).length,
915
+ capturedAt: currentSnapshot.capturedAt,
916
+ }
917
+ : null,
918
+ ...(captureError ? { recoveryCaptureError: buildOutputErrorPayload(captureError) } : {}),
919
+ };
445
920
  }
446
921
  /**
447
922
  * Readiness snapshot for the status route. HONESTY CONTRACT: the
@@ -471,25 +946,46 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
471
946
  * controller again, which is a no-op.
472
947
  */
473
948
  cancelActiveApplicationCodingTask() {
474
- const active = this.activeRun;
475
- if (!active) {
949
+ // Every run this process drives: a wave is cancelled as one (#1528). The first is named, as before.
950
+ const active = [...this.activeRuns.values()];
951
+ if (active.length === 0) {
476
952
  return null;
477
953
  }
478
- this.logDebug('Cancelling active application coding task', { taskId: active.taskId });
479
- active.abortController.abort();
480
- return { taskId: active.taskId, startedAt: active.startedAt };
954
+ for (const run of active) {
955
+ this.logDebug('Cancelling active application coding task', { taskId: run.taskId });
956
+ run.abortController.abort();
957
+ }
958
+ return { taskId: active[0].taskId, startedAt: active[0].startedAt };
481
959
  }
482
- getStatus() {
960
+ /**
961
+ * The run holding the worktree right now, from the actor plane (#1361) — what the creation board's
962
+ * coding-lane badge shows. It read this process's cancel handle until 2026-09-20, so a run driven
963
+ * by another process, or selected and not yet admitted, showed as "idle". A status read does not
964
+ * fail because the plane is unreachable: it then answers what this process is driving.
965
+ */
966
+ async readActiveCodingRun() {
967
+ try {
968
+ const holder = await this.actorsSystem.readExclusiveSubjectHolder(APPLICATION_CODING_SYSTEM_REF, APPLICATION_CODING_WORKTREE_SUBJECT);
969
+ return holder ? { taskId: holder.tasks[0]?._id ?? holder._id, startedAt: holder.createdAt ?? new Date().toISOString() } : null;
970
+ }
971
+ catch {
972
+ const active = this.activeRuns.values().next().value;
973
+ return active ? { taskId: active.taskId, startedAt: active.startedAt } : null;
974
+ }
975
+ }
976
+ async getStatus() {
483
977
  return {
484
978
  // Reports a fact this service can actually establish: whether the coding
485
979
  // agent is registered. It deliberately does NOT claim the transport is
486
980
  // usable — that depends on the provider configuration and on an agent
487
981
  // process this service has not started, and a status field that overstates
488
982
  // its knowledge is worse than one that is narrow about it.
489
- codingAgentRegistered: this.agentsService.getAgent(APPLICATION_CODING_AGENT_REF) !== undefined,
490
- activeRun: this.activeRun ? { taskId: this.activeRun.taskId, startedAt: this.activeRun.startedAt } : null,
983
+ // Every declared agent must resolve, not merely the default: a registry
984
+ // missing the SELECTED agent reports healthy while dispatch refuses.
985
+ codingAgentRegistered: APPLICATION_CODING_AGENT_REFS.every((ref) => this.agentsService.getAgent(ref) !== undefined),
986
+ activeRun: await this.readActiveCodingRun(),
491
987
  // The answerable set: what is parked waiting for an operator response.
492
- pendingQuestions: this.listPendingCodingQuestions(),
988
+ pendingQuestions: await this.listPendingCodingQuestions(),
493
989
  limits: {
494
990
  defaultTimeoutMs: DISPATCH_DEFAULT_TIMEOUT_MS,
495
991
  hardMaxTimeoutMs: DISPATCH_HARD_MAX_TIMEOUT_MS,
@@ -517,56 +1013,274 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
517
1013
  * dormant surface that later readers mistake for a guarantee. The candidate
518
1014
  * ref is exact per ITERATION, which is the granularity an auditor wants.
519
1015
  */
520
- async createApplicationCodingTask(task, baseline, sessionContext) {
521
- const payload = CompanionCreateActorTaskRequestSchema.parse({
522
- title: `Application coding task ${task.taskRef}`,
523
- /* The cross-plane join key — the board's build-plan row this task executes (Phase 4, R5). */
524
- workbenchBuildPlanTaskId: sanitizeWorkbenchCreationPlaneIdentity(task.taskRef),
525
- description: `Typed application coding task for ${task.objectiveRef}; acceptance remains outside the coding host.`,
526
- topic: Actor_Task_Topics.IMPLEMENTATION,
527
- status: FlowsActors_Status.PROCESSING,
528
- actors: { actorRef: APPLICATION_CODING_AGENT_REF },
529
- input: {
530
- taskRef: task.taskRef,
531
- objectiveRef: task.objectiveRef,
532
- candidateRef: task.candidateRef,
533
- mutationScope: task.mutationScope,
534
- contextPlan: {
535
- planRef: task.contextPlan.planRef,
536
- objectiveRef: task.contextPlan.objectiveRef,
537
- },
538
- contextSelection: {
539
- planRef: task.contextSelection.planRef,
540
- selectedSourceRefs: task.contextSelection.selectedSources.map((source) => source.sourceRef),
541
- selectedSourceCount: task.contextSelection.selectedSources.length,
542
- },
543
- verificationIntent: task.verificationIntent,
544
- installedSkillRefs: task.installedSkillRefs,
545
- baseline: {
546
- headSha: baseline.headSha,
547
- dirtyFileCount: Object.keys(baseline.files).length,
548
- capturedAt: baseline.capturedAt,
1016
+ async openApplicationCodingExecution(task, baseline, sessionContext, origin, mode = CodingRunConcurrency.SINGLE_FLIGHT) {
1017
+ /*
1018
+ * ONE EXECUTION PER CODING RUN (#1359), opened by the engine's driver.
1019
+ *
1020
+ * Until 2026-09-20 this created a bare task with no execution parent, so a coding run had no row
1021
+ * saying "this is a run" and nowhere to hold a pending question or its resume inputs. Per RUN
1022
+ * rather than per build phase, because a parked run releases the worktree lock and the
1023
+ * dispatcher moves on: several questions can stand while a sibling runs, and an execution has
1024
+ * one `suspension`.
1025
+ */
1026
+ return this.actorsSystem.openActorExecution(this.buildApplicationCodingExecutionRequest(task, baseline, sessionContext, origin, mode));
1027
+ }
1028
+ /**
1029
+ * Open a coding run's execution at the moment its task is SELECTED — `PENDING`, not started.
1030
+ *
1031
+ * A build dispatch selects a task and then waits: for the compile watchers to go quiet, then for
1032
+ * the worktree lock. That stretch can be minutes, and until #1359 it existed only in an in-memory
1033
+ * dispatch record — so a dispatch that failed inside it failed nowhere durable, and a companion
1034
+ * restart forgot it had been selected at all. The row says `PENDING` for exactly that stretch;
1035
+ * `runApplicationCodingTask` starts it at admission, and the caller settles it `ABORTED` if the run
1036
+ * never gets that far — the host declined to start it, which is no attempt of the task's (#1581) —
1037
+ * or `FAILED` when the task's own contract was refused as invalid.
1038
+ *
1039
+ * The input carries no baseline yet: a baseline is captured under the lock this run has not taken.
1040
+ */
1041
+ async openSelectedApplicationCodingExecution(rawTask, sessionContext, origin, mode = CodingRunConcurrency.SINGLE_FLIGHT) {
1042
+ const task = this.admitTypedInput(() => MetaWorkflow_ApplicationCodingTaskContractSchema.parse(rawTask), 'Application coding task contract is not valid.');
1043
+ await this.refuseWhileWorktreeIsHeld(null, sessionContext);
1044
+ if (mode === CodingRunConcurrency.SINGLE_FLIGHT)
1045
+ await this.refuseWhileConcurrentRunsInFlight(sessionContext);
1046
+ const opened = await this.actorsSystem
1047
+ .openActorExecution({ ...this.buildApplicationCodingExecutionRequest(task, null, sessionContext, origin, mode), deferred: true })
1048
+ .catch((error) => { throw this.translateWorktreeBusy(error); });
1049
+ // SELECTED: a PENDING execution is already in flight to the next-task selection (#1310), whichever
1050
+ // door opened it — the resource operation, `POST /build/dispatch-next`, the playbook build tier.
1051
+ this.announceRunStateChanged();
1052
+ return opened;
1053
+ }
1054
+ /**
1055
+ * Run `critical` holding the workspace lock BRIEFLY, waiting for it rather than refusing (#1528).
1056
+ *
1057
+ * For a concurrent run's commits: the tree is shared on purpose, but git's index admits one writer,
1058
+ * and a generation step or a CLI writer may hold the lock for its whole duration. Waiting up to about
1059
+ * ten minutes is right here, where the single-flight lane's fail-fast would drop a finished run's
1060
+ * commit; a commit that still cannot get the lock is left for the wave reconciliation.
1061
+ */
1062
+ underBriefWorktreeLock(critical) {
1063
+ return withDedicatedFileLock(this.getWorkspaceMutationLockPath(), critical, {
1064
+ retries: { retries: 120, minTimeout: 500, maxTimeout: 5_000 },
1065
+ });
1066
+ }
1067
+ /**
1068
+ * The live coding runs — selected, admitted or running — from the actor plane, so the answer holds
1069
+ * across processes and restarts (#1528). A parked run is not live: its agent is closed.
1070
+ */
1071
+ async listInFlightCodingRuns(sessionContext) {
1072
+ const rows = (await Promise.all([FlowsActors_Status.PENDING, FlowsActors_Status.PROCESSING].map((status) => this.executionsService.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef: APPLICATION_CODING_SYSTEM_REF, status, limit: 200 }), sessionContext)))).flat();
1073
+ return rows.map((row) => {
1074
+ const execution = row;
1075
+ const input = execution.standaloneTasks?.[0]?.input;
1076
+ return {
1077
+ executionId: String(execution._id),
1078
+ taskRef: isRecordValue(input) && typeof input.taskRef === 'string' ? input.taskRef : null,
1079
+ ...(execution.exclusiveSubject ? { exclusiveSubject: execution.exclusiveSubject } : {}),
1080
+ ...(execution.createdAt ? { createdAt: execution.createdAt } : {}),
1081
+ };
1082
+ });
1083
+ }
1084
+ /** The live run of one build task, or `null` — what the wave skips, so no task is built twice at once. */
1085
+ async findInFlightRunForBuildTask(buildTaskRef, sessionContext) {
1086
+ const live = (await this.listInFlightCodingRuns(sessionContext)).find((run) => run.taskRef === buildTaskRef);
1087
+ return live ? { executionId: live.executionId } : null;
1088
+ }
1089
+ /**
1090
+ * Refuse (409) a SINGLE-FLIGHT run while any concurrent run is live (#1528).
1091
+ *
1092
+ * Two reasons, and the second is why it is explicit rather than incidental. A single-flight run was
1093
+ * promised the tree to itself. And the single-flight door is the one an agent can reach from its own
1094
+ * shell: until concurrency, the global lock refused a running agent's dispatch as a SIDE EFFECT (the
1095
+ * P-35 recursion cap). A concurrent run does not hold that lock, so without this a recursing agent
1096
+ * would be admitted beside its own wave.
1097
+ */
1098
+ async refuseWhileConcurrentRunsInFlight(sessionContext) {
1099
+ const concurrent = (await this.listInFlightCodingRuns(sessionContext)).filter((run) => isConcurrentRunSubject(run.exclusiveSubject));
1100
+ if (concurrent.length === 0)
1101
+ return;
1102
+ throw this.buildDispatchConflictError(`${concurrent.length} coding run(s) of a parallel build wave are live (${concurrent.map((run) => run.taskRef ?? run.executionId).join(', ')}). `
1103
+ + 'A single run cannot start beside them; it runs after the wave, or as part of the next one.');
1104
+ }
1105
+ /** Record that a run entered the tree, for the runs it will overlap (#1528). */
1106
+ openCodingRunWindow(taskId, taskRef) {
1107
+ const now = Date.now();
1108
+ this.codingRunWindows = this.codingRunWindows
1109
+ .filter((window) => window.taskId !== taskId && (window.endedAtMs === undefined || now - window.endedAtMs < CODING_RUN_WINDOW_RETENTION_MS));
1110
+ this.codingRunWindows.push({ taskId, taskRef, startedAtMs: now });
1111
+ }
1112
+ /** End a run's window if nothing closed it — a parked run, or one that ended without a result. Idempotent. */
1113
+ endCodingRunWindow(taskId) {
1114
+ const endedAtMs = Date.now();
1115
+ this.codingRunWindows = this.codingRunWindows.map((window) => window.taskId === taskId && window.endedAtMs === undefined
1116
+ ? { ...window, endedAtMs }
1117
+ : window);
1118
+ }
1119
+ /**
1120
+ * Close a run's window with the paths it changed, and say which runs shared the tree with it and
1121
+ * which of those paths they changed too (#1528). `null` when it overlapped nothing — a run alone in
1122
+ * the tree records nothing new.
1123
+ */
1124
+ closeCodingRunWindow(taskId, changedPaths) {
1125
+ const window = this.codingRunWindows.find((candidate) => candidate.taskId === taskId);
1126
+ if (!window)
1127
+ return null;
1128
+ const endedAtMs = Date.now();
1129
+ const record = describeRunConcurrency(this.codingRunWindows, { taskId, startedAtMs: window.startedAtMs, endedAtMs }, changedPaths);
1130
+ this.codingRunWindows = this.codingRunWindows.map((candidate) => candidate.taskId === taskId
1131
+ ? { ...candidate, endedAtMs, changedPaths: [...changedPaths] }
1132
+ : candidate);
1133
+ return record.overlappingTaskRefs.length > 0 ? record : null;
1134
+ }
1135
+ /**
1136
+ * REPAIR at the end of a wave (#1528): accept each finished run's writes again, now that nothing is
1137
+ * writing, with the door's WAVE_RECONCILIATION origin.
1138
+ *
1139
+ * Under concurrency the ordinary accept refuses exactly what siblings in one tree produce — a path
1140
+ * already dirty when the run started, a path edited since — and those tasks would sit unlanded with
1141
+ * their work done. At the end of the wave the tree holds the merged result of every run, so
1142
+ * committing each run's registered paths commits that result. Only paths the register holds, only
1143
+ * under the posture that lets the system accept, and never a path another lane produced.
1144
+ */
1145
+ async reconcileWaveAcceptance(taskRefs) {
1146
+ return this.reconcileAcceptance(taskRefs, AcceptOrigin.WAVE_RECONCILIATION);
1147
+ }
1148
+ /** Force-accept each task's latest registered run, under the posture, with the caller's origin. */
1149
+ async reconcileAcceptance(taskRefs, origin) {
1150
+ if (laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) !== LaneBoundaryTreatment.NOTIFY_AND_PROCEED)
1151
+ return [];
1152
+ const results = [];
1153
+ await this.underBriefWorktreeLock(async () => {
1154
+ for (const taskRef of taskRefs) {
1155
+ try {
1156
+ const outcome = await this.acceptedChangeCommit.acceptCodingRun({ taskRef, force: true, origin });
1157
+ // A pathspec already at HEAD is not a repair: count paths only when a commit was made.
1158
+ results.push({ taskRef, committedPaths: outcome.alreadyCommitted ? 0 : outcome.committedPaths.length });
1159
+ }
1160
+ catch (error) {
1161
+ // Nothing left to commit is the usual answer: the run's own accept already took everything.
1162
+ results.push({ taskRef, committedPaths: 0, ...(error instanceof NothingToAcceptError ? {} : { error: describeCaughtError(error) }) });
1163
+ }
1164
+ }
1165
+ });
1166
+ if (results.some((result) => result.committedPaths > 0)) {
1167
+ for (const listener of this.runAcceptedListeners) {
1168
+ try {
1169
+ listener();
1170
+ }
1171
+ catch (error) {
1172
+ this.logDebug('A run-accepted listener threw', { error: describeCaughtError(error) });
1173
+ }
1174
+ }
1175
+ }
1176
+ return results;
1177
+ }
1178
+ /**
1179
+ * Refuse (409) while another coding run holds the worktree, NAMING it — the holder is read from the
1180
+ * actor plane, so the message is true after a restart and from a second process. `exceptExecutionId`
1181
+ * is the execution the caller itself opened at selection, which holds the subject legitimately.
1182
+ */
1183
+ async refuseWhileWorktreeIsHeld(exceptExecutionId, sessionContext) {
1184
+ const holder = await this.actorsSystem.readExclusiveSubjectHolder(APPLICATION_CODING_SYSTEM_REF, APPLICATION_CODING_WORKTREE_SUBJECT, sessionContext);
1185
+ if (!holder || holder._id === exceptExecutionId)
1186
+ return;
1187
+ throw this.buildDispatchConflictError(`A coding-agent run is already active (task ${holder.tasks[0]?._id ?? 'unknown'}, execution ${holder._id}, ${holder.status}`
1188
+ + `${holder.createdAt ? `, started ${holder.createdAt}` : ''}). Application coding tasks share one working tree.`);
1189
+ }
1190
+ /** The driver's own refusal — two callers raced past the fast 409 — in this lane's 409 shape. */
1191
+ translateWorktreeBusy(error) {
1192
+ return isActorExecutionSubjectBusyError(error)
1193
+ ? this.buildDispatchConflictError('A coding-agent run took the working tree first. Application coding tasks share one working tree.')
1194
+ : error;
1195
+ }
1196
+ /** Admission of a run that was opened at selection: start it, completing its input with the baseline. */
1197
+ async startSelectedApplicationCodingExecution(selected, task, baseline, sessionContext, origin) {
1198
+ await this.actorsSystem.startActorExecution(selected, { taskInput: this.buildApplicationCodingTaskInput(task, baseline, origin) }, sessionContext);
1199
+ return selected;
1200
+ }
1201
+ buildApplicationCodingExecutionRequest(task, baseline, sessionContext, origin, mode = CodingRunConcurrency.SINGLE_FLIGHT) {
1202
+ return {
1203
+ systemRef: APPLICATION_CODING_SYSTEM_REF,
1204
+ // A single-flight run holds the application's working tree while it runs (#1361); a concurrent
1205
+ // one holds only its own task, so two runs of one task can never overlap (#1528).
1206
+ exclusiveSubject: applicationCodingExclusiveSubject(mode, task.taskRef),
1207
+ // The SELECTED agent, resolved once at creation and carried on the row —
1208
+ // so a task records which agent it was addressed to, and a selection
1209
+ // changed between creation and claim cannot silently redirect it. The
1210
+ // system declares one actor per binding under the binding's own ref.
1211
+ actorRef: resolveSelectedApplicationCodingAgentBinding().ref,
1212
+ scope: sessionContext,
1213
+ task: {
1214
+ title: `Application coding task ${task.taskRef}`,
1215
+ description: `Typed application coding task for ${task.objectiveRef}; acceptance is a commit, made by the loop under the autonomy posture or by a person on the workbench.`,
1216
+ topic: Actor_Task_Topics.IMPLEMENTATION,
1217
+ input: this.buildApplicationCodingTaskInput(task, baseline, origin),
1218
+ /*
1219
+ * The cross-plane join, carried in the GENERIC correlation envelope rather than in a
1220
+ * `workbenchBuildPlanTaskId` column on the actor-task row (#1348).
1221
+ *
1222
+ * The engine owns the slot and validates only that keys and values are non-empty strings;
1223
+ * this domain owns the keys. The value is the board's row identity — sanitized, which is the
1224
+ * ref verbatim today — so the creation plane can match its build-plan row to this task
1225
+ * without the generic platform row knowing what a build-plan task is.
1226
+ */
1227
+ correlation: {
1228
+ domain: WORKBENCH_TASK_CORRELATION_DOMAIN,
1229
+ refs: {
1230
+ [WorkbenchTaskCorrelationRef.BUILD_PLAN_TASK]: sanitizeWorkbenchCreationPlaneIdentity(task.taskRef),
1231
+ // The thread the dispatch came from (#1454, Step 7), the same key a playbook run carries.
1232
+ ...(origin?.conversationId ? { [WorkbenchTaskCorrelationRef.CONVERSATION]: origin.conversationId } : {}),
1233
+ },
549
1234
  },
550
1235
  },
551
- context: {},
552
- startedAt: new Date().toISOString(),
553
- });
554
- return this.executionsService.createActorTask(payload, sessionContext);
1236
+ };
555
1237
  }
556
1238
  /**
557
- * Executes the normal Agent invocation and lands the full working-result
558
- * evidence. This method runs inside the worktree lock and therefore is the
559
- * sole typed path allowed to observe its own before/after Git boundary.
1239
+ * The task row's INPUT — replayable task identity and guard evidence, never prompt/context bytes
1240
+ * (see the contract above `openApplicationCodingExecution`). `baseline` is `null` between
1241
+ * selection and admission, and says so rather than being absent: a reader can tell a run that has
1242
+ * not captured one from a row that forgot to record it.
560
1243
  */
561
- async executeApplicationCodingTask(task, renderedPrompt, verificationPlans, durableTask, baseline,
1244
+ buildApplicationCodingTaskInput(task, baseline, origin) {
1245
+ return {
1246
+ taskRef: task.taskRef,
1247
+ // Read back by the dispatch projection, so the row says which conversation started it.
1248
+ ...(origin?.conversationId ? { conversationId: origin.conversationId } : {}),
1249
+ objectiveRef: task.objectiveRef,
1250
+ candidateRef: task.candidateRef,
1251
+ mutationScope: task.mutationScope,
1252
+ contextPlan: {
1253
+ planRef: task.contextPlan.planRef,
1254
+ objectiveRef: task.contextPlan.objectiveRef,
1255
+ },
1256
+ contextSelection: {
1257
+ planRef: task.contextSelection.planRef,
1258
+ selectedSourceRefs: task.contextSelection.selectedSources.map((source) => source.sourceRef),
1259
+ selectedSourceCount: task.contextSelection.selectedSources.length,
1260
+ },
1261
+ verificationIntent: task.verificationIntent,
1262
+ installedSkillRefs: task.installedSkillRefs,
1263
+ baseline: baseline
1264
+ ? {
1265
+ headSha: baseline.headSha,
1266
+ dirtyFileCount: Object.keys(baseline.files).length,
1267
+ capturedAt: baseline.capturedAt,
1268
+ /*
1269
+ * The dirty files themselves, not only their count: the one record that survives a
1270
+ * restart mid-run, so the next start can tell what THIS run wrote from what was already
1271
+ * there ({@link recoverInterruptedRunWrites}). Paths and fingerprints only — no content.
1272
+ */
1273
+ files: baseline.files,
1274
+ }
1275
+ : null,
1276
+ };
1277
+ }
562
1278
  /**
563
- * Present when this run ANSWERS a parked question rather than starting the
564
- * task: the agent session is resumed by id via `session/load` and the answer
565
- * is delivered as the next turn. The task's mutation scope, verification plan
566
- * and original baseline are unchanged — the resume is held to exactly the
567
- * bounds the first run was.
1279
+ * Open the trace half of one coding run — see {@link CodingRunTrace}. Best-effort like every
1280
+ * trace write here: a session that cannot be opened is recorded as a traceability error and the
1281
+ * run proceeds with no scope, which the actor plane accepts.
568
1282
  */
569
- resume) {
1283
+ async openCodingRunTrace(taskId, taskRef) {
570
1284
  let runSession;
571
1285
  let runStep;
572
1286
  const traceabilityErrors = [];
@@ -581,8 +1295,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
581
1295
  // visibly non-accepted for explicit follow-up.
582
1296
  traceabilityErrors.push(error);
583
1297
  this.logger.error('Application coding-task trace operation failed', {
584
- taskId: durableTask._id,
585
- taskRef: task.taskRef,
1298
+ taskId,
1299
+ taskRef,
586
1300
  operation,
587
1301
  error: describeCaughtError(error),
588
1302
  });
@@ -591,41 +1305,265 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
591
1305
  await traceBestEffort('initialize-session', async () => {
592
1306
  runSession = this.traceabilityService.createInternalSession({
593
1307
  label: 'application-coding-task-run',
594
- metadata: { taskId: durableTask._id, taskRef: task.taskRef },
1308
+ metadata: { taskId, taskRef },
595
1309
  });
596
1310
  if (!runSession)
597
1311
  return;
598
- await this.traceabilityService.registerAlias(runSession, CompanionTraceAliasKind.ACTOR_TASK, durableTask._id);
1312
+ await this.traceabilityService.registerAlias(runSession, CompanionTraceAliasKind.ACTOR_TASK, taskId);
599
1313
  runStep = this.createOperationTraceStep(runSession, 'application-coding-task-run');
600
1314
  });
1315
+ return { runSession, runStep, traceabilityErrors, traceBestEffort };
1316
+ }
1317
+ /**
1318
+ * ACCEPT a run's writes when the autonomy posture says the system accepts (#1534).
1319
+ *
1320
+ * **Why here.** A build task LANDS only when its declared product is COMMITTED, and until this
1321
+ * existed nothing in the loop committed — so an unattended build stopped after its first task,
1322
+ * and the 2026-09-23 run was carried by an operator's shell loop running `git add -A` in the gaps
1323
+ * between dispatches. `one-source-of-truth.md` D5 had already decided the posture (YOLO: the system
1324
+ * commits, the creator is notified and can override); what was missing was the mechanism.
1325
+ *
1326
+ * **Why it is safe HERE and nowhere later.** This runs inside `afterSettle`, which
1327
+ * `superviseCodingRun` awaits inside `withDedicatedFileLock(workspace mutation lock)`. No other
1328
+ * coding run can be live, so the commit cannot land inside another run's baseline→post window —
1329
+ * which is what destroys change-set attribution, and why the shell loop had to wait for a gap.
1330
+ *
1331
+ * **The posture is asked through the ONE table**, `laneBoundaryTreatmentFor`, as an APPROVE_RESULT
1332
+ * boundary — never by testing for YOLO here. So GUIDED keeps acceptance a person's act on the
1333
+ * workbench, YOLO_LIGHT and YOLO accept, and a posture added tomorrow is classified there once.
1334
+ *
1335
+ * **It never widens what is committed.** No `force`: every refusal the door applies to a person
1336
+ * applies here. A path it cannot vouch for stays uncommitted and the task stays visibly unlanded.
1337
+ *
1338
+ * **Best effort, and loud.** A failed accept costs the task its landing, never the run — the run's
1339
+ * result is already settled. It is logged at WARN because a silent failure here recreates exactly
1340
+ * the stall this exists to remove.
1341
+ */
1342
+ async acceptUnderAutonomyPosture(taskRef, taskId) {
1343
+ const treatment = laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT);
1344
+ if (treatment !== LaneBoundaryTreatment.NOTIFY_AND_PROCEED)
1345
+ return;
1346
+ try {
1347
+ const accept = () => this.acceptedChangeCommit.acceptCodingRun({
1348
+ taskRef,
1349
+ origin: AcceptOrigin.AUTONOMY_POSTURE,
1350
+ });
1351
+ // A concurrent run holds no lock (#1528), and git's index takes one writer: the commit is serialized.
1352
+ const outcome = this.activeRuns.get(taskId)?.mode === CodingRunConcurrency.CONCURRENT
1353
+ ? await this.underBriefWorktreeLock(accept)
1354
+ : await accept();
1355
+ this.logger.info('Accepted a build-task run under the autonomy posture', {
1356
+ taskId,
1357
+ taskRef,
1358
+ posture: APPLICATION_CREATION_AUTONOMY_POSTURE,
1359
+ commitSha: outcome.commitSha,
1360
+ committedPaths: outcome.committedPaths.length,
1361
+ refusedPaths: outcome.refusedPaths,
1362
+ alreadyCommitted: outcome.alreadyCommitted,
1363
+ });
1364
+ for (const listener of this.runAcceptedListeners) {
1365
+ try {
1366
+ listener();
1367
+ }
1368
+ catch (error) {
1369
+ this.logDebug('A run-accepted listener threw', { error: describeCaughtError(error) });
1370
+ }
1371
+ }
1372
+ }
1373
+ catch (error) {
1374
+ if (error instanceof NothingToAcceptError) {
1375
+ // An empty run, or every path refused by name. The refusals are the finding; they stay visible.
1376
+ this.logger.warn('A build-task run concluded with nothing the posture could accept', {
1377
+ taskId, taskRef, reason: error.message, refusedPaths: error.refusedPaths,
1378
+ });
1379
+ return;
1380
+ }
1381
+ this.logger.warn('Could not accept a build-task run under the autonomy posture; its task stays unlanded', {
1382
+ taskId, taskRef, error: describeCaughtError(error),
1383
+ });
1384
+ }
1385
+ }
1386
+ /**
1387
+ * Accept every pending PLAYBOOK run under the posture, from inside the worktree window and before a
1388
+ * baseline — the third site of #1534 (see `acceptPendingPlaybookRuns` for why exactly here).
1389
+ * Best effort by construction: it must never cost the run whose window it borrows.
1390
+ */
1391
+ async acceptPendingPlaybookRunsBeforeBaseline() {
1392
+ if (laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) !== LaneBoundaryTreatment.NOTIFY_AND_PROCEED)
1393
+ return;
1394
+ try {
1395
+ const outcome = await this.acceptedChangeCommit.acceptPendingPlaybookRuns(AcceptOrigin.AUTONOMY_POSTURE);
1396
+ if (outcome.accepted > 0) {
1397
+ for (const listener of this.runAcceptedListeners) {
1398
+ try {
1399
+ listener();
1400
+ }
1401
+ catch (error) {
1402
+ this.logDebug('A run-accepted listener threw', { error: describeCaughtError(error) });
1403
+ }
1404
+ }
1405
+ }
1406
+ }
1407
+ catch (error) {
1408
+ this.logger.warn('Could not accept pending playbook runs before a baseline', { error: describeCaughtError(error) });
1409
+ }
1410
+ }
1411
+ /**
1412
+ * Run a build-plan GENERATION STEP inside the coding lane's attribution window, and accept what it
1413
+ * wrote under the autonomy posture — the second site of #1534's invariant.
1414
+ *
1415
+ * **Why a generation step needs this at all.** It lands on COMMITTED paths
1416
+ * (`ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS`), exactly like a coding task's
1417
+ * product, and it is EXEMPT from the loop guard because a step such as `i18n-labels` is
1418
+ * legitimately re-runnable. So an uncommitted step does not stall visibly: it is re-selected on
1419
+ * every dispatch, does nothing new, and every task that names it as a prerequisite never becomes
1420
+ * ready. The 2026-09-23 run never met this only because an operator's shell loop committed
1421
+ * everything between dispatches.
1422
+ *
1423
+ * **Why inside THIS window rather than beside it.** A coding run's attribution is a baseline→post
1424
+ * comparison, and it collapses when anything commits inside it. Until now a generation step held
1425
+ * neither half of the lane's single-flight, so it could run while a coding run was live and land
1426
+ * its writes inside that run's window. Here it takes both: the worktree lease check first — the
1427
+ * same 409 a second coding task gets, naming the holder — then the workspace mutation lock for
1428
+ * the snapshot, the step, the capture and the accept. The two are not redundant: a coding run
1429
+ * SELECTED but not yet admitted holds the lease and not the lock while it waits for the compile
1430
+ * watchers, and a step taking the lock there would fail that run's admission. A PARKED run holds
1431
+ * neither, by design — siblings run while its question waits, and anything they commit is
1432
+ * classified `committed_during_run` and excluded from its accept; a step is one more sibling. This is the lane's EXISTING single-flight,
1433
+ * extended to the other writer it always had; it restricts no agent's edits, which is what
1434
+ * #1264's "no serialization" constraint is about.
1435
+ *
1436
+ * **The writes go through the same register and door as a coding run's**, so the workbench's
1437
+ * Accept works on a generation-step row too, under GUIDED, with the same refusals. The capture and
1438
+ * the accept are best effort: a step whose writes could not be registered still returns its
1439
+ * result, and stays visibly unlanded.
1440
+ */
1441
+ async runGenerationStepInWorktreeWindow(input) {
1442
+ await this.refuseWhileWorktreeIsHeld(null, input.sessionContext);
1443
+ return withDedicatedFileLock(this.getWorkspaceMutationLockPath(), async () => {
1444
+ await this.acceptPendingPlaybookRunsBeforeBaseline();
1445
+ const baseline = await this.gitChangeSetService.captureWorktreeSnapshot();
1446
+ await this.recordRunBaselineOnTask(input.taskId, baseline, input.sessionContext);
1447
+ const result = await input.execute();
1448
+ try {
1449
+ const changeSet = await this.gitChangeSetService.captureChangeSet(baseline);
1450
+ await this.codingRunWriteRegister.record({ taskId: input.taskId, taskRef: input.taskRef, changeSet });
1451
+ }
1452
+ catch (error) {
1453
+ this.logger.warn('Could not register a generation step\'s writes; it stays unlanded until they are committed', {
1454
+ taskId: input.taskId, taskRef: input.taskRef, error: describeCaughtError(error),
1455
+ });
1456
+ return result;
1457
+ }
1458
+ await this.acceptUnderAutonomyPosture(input.taskRef, input.taskId);
1459
+ return result;
1460
+ }, { retries: { retries: 0 } }).catch((error) => { throw this.mapLockError(error); });
1461
+ }
1462
+ /**
1463
+ * Run the engine-driven half of a coding run and deal with the two ways it can go wrong.
1464
+ *
1465
+ * `drive` is `completeActorExecution` or `resumeActorExecution`; `capture` hands this method the
1466
+ * executor's result, because the driver answers it only when the settle ALSO succeeded — and the
1467
+ * case that needs the result most is the one where it did not.
1468
+ *
1469
+ * - The executor returned and the SETTLE failed: not retried. The agent may already have changed
1470
+ * files and re-execution would duplicate an unclassified effect. The row is deliberately left
1471
+ * for the startup reconcile, and the trace records why it is not terminal.
1472
+ * - The executor THREW: the driver already settled `FAILED` with the message. Nothing to add
1473
+ * except a log line — the executor classifies its own failures, so a throw is a defect in it.
1474
+ */
1475
+ async superviseCodingRun(taskRef, taskId, trace, drive) {
1476
+ let result = null;
1477
+ try {
1478
+ await drive((returned) => { result = returned; return returned; });
1479
+ }
1480
+ catch (error) {
1481
+ const returned = result;
1482
+ if (returned === null) {
1483
+ // Two ways to get here with no result: the executor threw (the engine settled the run
1484
+ // FAILED with the message), or the engine refused to START it — a resume of an execution
1485
+ // that is no longer waiting. Neither leaves anything for this method to record.
1486
+ this.logger.error('Application coding run ended without a result', {
1487
+ taskId, taskRef, error: describeCaughtError(error),
1488
+ });
1489
+ return;
1490
+ }
1491
+ this.logger.error('Failed to persist application coding-task result', { taskId, taskRef, error: describeCaughtError(error) });
1492
+ await trace.traceBestEffort('record-terminal-patch-failure', () => this.traceOperationFailure({
1493
+ sessionContext: trace.runSession,
1494
+ step: trace.runStep,
1495
+ type: 'application-coding-task-terminal-patch-failure',
1496
+ summary: `Failed to persist the result of application coding task ${taskRef}`,
1497
+ error,
1498
+ payload: returned.output,
1499
+ }));
1500
+ return;
1501
+ }
1502
+ await result?.afterSettle();
1503
+ }
1504
+ /**
1505
+ * Executes the normal Agent invocation and lands the full working-result
1506
+ * evidence. This method runs inside the worktree lock and therefore is the
1507
+ * sole typed path allowed to observe its own before/after Git boundary.
1508
+ */
1509
+ async executeApplicationCodingTask(task, renderedPrompt, verificationPlans, opened, baseline, trace,
1510
+ /**
1511
+ * Present when this run ANSWERS a parked question rather than starting the
1512
+ * task: the agent session is resumed by id via `session/load` and the answer
1513
+ * is delivered as the next turn. The task's mutation scope, verification plan
1514
+ * and original baseline are unchanged — the resume is held to exactly the
1515
+ * bounds the first run was.
1516
+ */
1517
+ resume) {
1518
+ const { runSession, runStep, traceabilityErrors, traceBestEffort } = trace;
1519
+ // The TASK id is this lane's handle — the live stream, the answer door and the board row all
1520
+ // key on it. The execution is the engine's; it is reached from the task.
1521
+ const taskId = opened.taskId;
601
1522
  const traceContext = {
602
1523
  label: `application-coding-task:${task.taskRef}`,
603
1524
  attributes: {
604
- taskId: durableTask._id,
1525
+ taskId,
605
1526
  taskRef: task.taskRef,
606
1527
  objectiveRef: task.objectiveRef,
607
1528
  candidateRef: task.candidateRef,
608
1529
  },
609
1530
  };
610
- const invocation = {
611
- agentRef: APPLICATION_CODING_AGENT_REF,
612
- initiator: {},
613
- invocationContext: [],
614
- // A resume delivers the operator's ANSWER as the turn and re-enters the
615
- // parked session; a first run delivers the rendered task.
616
- input: resume
617
- ? { prompt: resume.answerPrompt, continuationOfSessionId: resume.continuationOfSessionId }
618
- : { prompt: renderedPrompt },
619
- output: { finalMessage: '', stopReason: CodingAgent_StopReason.END_TURN },
620
- executionContext: { callTimestamp: new Date().toISOString() },
621
- artifactBindings: [],
622
- };
623
1531
  const startedAtMs = Date.now();
1532
+ /*
1533
+ * Which of this task's checks were ALREADY failing before the agent ran?
1534
+ *
1535
+ * Verification decides the disposition, and it used to ask "is any check red now?" — a question
1536
+ * about the TREE, answered as though it were about the RUN. A check that was red before the
1537
+ * agent started says nothing about the agent, and failing the task on it burns the whole run.
1538
+ *
1539
+ * Measured on the first end-to-end journey run (#1273): `check:technical-doc-typecheck` was red
1540
+ * before anything was dispatched, because `technical-doc/src/generated/consumer-documentation/`
1541
+ * has never been produced in that application. `build-task-docs-find-context` ran for fifteen
1542
+ * minutes, established its findings, wrote its report — and was recorded
1543
+ * `VERIFICATION_FAILED` on a red it did not cause, at $19.33. Every documentation task names
1544
+ * that check, so every one of them would have failed the same way, forever, for the same money.
1545
+ * That is the unbounded-cost shape `findCompletedRunForBuildTask` exists to close, reached
1546
+ * through the one door it cannot see: a run that FAILS is not a completed run, so it is
1547
+ * re-offered on the next dispatch.
1548
+ *
1549
+ * The baseline is the tree as this run found it, so it is the honest reference for "did THIS run
1550
+ * break it". Costs one extra pass of the same checks — tens of seconds against a run measured in
1551
+ * quarter-hours and tens of dollars.
1552
+ *
1553
+ * A check that THREW at baseline is excluded: it produced no verdict, so it cannot license
1554
+ * forgiving the same check afterwards. See `unrunCheckRefs`.
1555
+ */
1556
+ const baselineVerification = await this.executeVerificationPlans(verificationPlans);
1557
+ const unrunAtBaseline = new Set(baselineVerification.unrunCheckRefs);
1558
+ const preexistingVerificationFailures = new Set(baselineVerification.verification
1559
+ .filter(({ checkRef, outcome }) => !outcome.success && !unrunAtBaseline.has(checkRef))
1560
+ .map(({ checkRef }) => checkRef));
624
1561
  let runError = null;
625
1562
  let agentOutput = '';
626
1563
  let codingUsage;
627
1564
  let codingDeniedPermissionCount;
628
1565
  let codingPermissionDecisions;
1566
+ let codingReportedFileLocations;
629
1567
  let agentStopReason;
630
1568
  /*
631
1569
  * Counted in full, RETAINED in part.
@@ -638,7 +1576,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
638
1576
  * to a fixed ceiling.
639
1577
  */
640
1578
  let codingSessionEventCount = 0;
641
- const retainedCodingSessionFrames = [];
1579
+ // What the row keeps of the session, and why it is not "the first N frames": see the model.
1580
+ const codingSessionRetention = new CodingSessionFrameRetention();
642
1581
  await traceBestEffort('record-start', () => this.traceOperationStart({
643
1582
  sessionContext: runSession,
644
1583
  step: runStep,
@@ -649,6 +1588,27 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
649
1588
  artifactContent: renderedPrompt,
650
1589
  }));
651
1590
  try {
1591
+ // Resume the agent recorded on the durable task. The host selector may
1592
+ // have changed since admission; it must not reroute an existing session.
1593
+ // The coding system declares one actor per binding under the binding's
1594
+ // own ref, so the actor the run was opened for IS the agent to invoke.
1595
+ const agentRef = opened.actorRef;
1596
+ if (typeof agentRef !== 'string' || !isApplicationCodingAgentRef(agentRef)) {
1597
+ throw this.buildDispatchConflictError('The coding task does not identify a declared application coding agent.');
1598
+ }
1599
+ const invocation = {
1600
+ agentRef,
1601
+ initiator: {},
1602
+ invocationContext: [],
1603
+ // A resume delivers the operator's ANSWER as the turn and re-enters the
1604
+ // parked session; a first run delivers the rendered task.
1605
+ input: resume
1606
+ ? { prompt: resume.answerPrompt, continuationOfSessionId: resume.continuationOfSessionId }
1607
+ : { prompt: renderedPrompt },
1608
+ output: { finalMessage: '', stopReason: CodingAgent_StopReason.END_TURN },
1609
+ executionContext: { callTimestamp: new Date().toISOString() },
1610
+ artifactBindings: [],
1611
+ };
652
1612
  const response = await this.agentsService.invokeAgent(invocation, traceContext, {
653
1613
  workspaceRootPath: this.companionContext.saasRoot,
654
1614
  // Hold the agent to the task's declared scope WHILE it runs, not only
@@ -659,11 +1619,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
659
1619
  isPermittedCodingLocation: buildApplicationCodingTaskLocationPredicate(this.companionContext.saasRoot, task.mutationScope.allowedPathPrefixes, task.mutationScope.prohibitedPathPrefixes),
660
1620
  onCodingSessionEvent: (event) => {
661
1621
  codingSessionEventCount += 1;
662
- if (retainedCodingSessionFrames.length < RETAINED_CODING_SESSION_FRAME_LIMIT
663
- && RETAINED_CODING_SESSION_EVENT_KINDS.has(event.kind)) {
664
- retainedCodingSessionFrames.push(event);
665
- }
666
- this.publishCodingSessionFrame(durableTask._id, { channel: 'event', payload: event });
1622
+ codingSessionRetention.accept(event);
1623
+ this.publishCodingSessionFrame(taskId, { channel: 'event', payload: event });
667
1624
  },
668
1625
  // The JUDGMENT half of the interactive lane: classify each end-of-turn
669
1626
  // message so the engine ladder can auto-continue a self-pause and park
@@ -672,15 +1629,16 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
672
1629
  // hanging the run — this method may therefore throw freely.
673
1630
  classifyCodingTurnEnd: (input) => this.classifyCodingTurnEnd(input),
674
1631
  onCodingSessionStateChange: (state) => {
675
- this.publishCodingSessionFrame(durableTask._id, { channel: 'state', payload: state });
1632
+ this.publishCodingSessionFrame(taskId, { channel: 'state', payload: state });
676
1633
  },
677
- ...(this.activeRun ? { codingSessionAbortSignal: this.activeRun.abortController.signal } : {}),
1634
+ ...(this.activeRuns.get(taskId) ? { codingSessionAbortSignal: this.activeRuns.get(taskId).abortController.signal } : {}),
678
1635
  });
679
1636
  const codingOutput = response.output;
680
1637
  // The agent runtime publishes provider-learned facts on `executionContext`.
681
1638
  codingUsage = response.executionContext?.usage;
682
1639
  codingDeniedPermissionCount = codingOutput?.deniedPermissionCount;
683
1640
  codingPermissionDecisions = codingOutput?.permissionDecisions;
1641
+ codingReportedFileLocations = codingOutput?.reportedFileLocations;
684
1642
  const text = codingOutput?.finalMessage;
685
1643
  agentStopReason = codingOutput?.stopReason;
686
1644
  // A PARKED run stopped WITHOUT finishing to ask the operator a question.
@@ -691,22 +1649,21 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
691
1649
  // because a question is a non-empty END_TURN message that would otherwise
692
1650
  // read as a completed working result.
693
1651
  if (codingOutput?.suspension) {
694
- await this.recordParkedApplicationCodingTask({
1652
+ return this.buildParkedCodingRunResult({
695
1653
  task,
696
- verificationPlans,
697
- durableTask,
1654
+ taskId,
698
1655
  baseline,
699
1656
  suspension: codingOutput.suspension,
700
1657
  output: codingOutput,
701
1658
  usage: codingUsage,
702
1659
  codingSessionEventCount,
703
- retainedCodingSessionFrames,
1660
+ retainedCodingSessionFrames: codingSessionRetention.frames(),
1661
+ codingSessionRetention: codingSessionRetention.summary(),
704
1662
  startedAtMs,
705
1663
  runSession,
706
1664
  runStep,
707
1665
  traceBestEffort,
708
1666
  });
709
- return;
710
1667
  }
711
1668
  // A CANCELLED turn is not a completed one, and its partial change set must
712
1669
  // not be read as a working result. Refused here rather than downstream so
@@ -730,19 +1687,147 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
730
1687
  catch (error) {
731
1688
  captureError = error;
732
1689
  }
1690
+ /*
1691
+ * The register the workbench's `accept` commits from (#1454, Step 7): every path, attributed and
1692
+ * hashed, unbounded where the durable row's summary is bounded. Best effort — a register that
1693
+ * could not be written costs the ability to accept THIS run from the workbench, never the run.
1694
+ */
1695
+ if (changeSet) {
1696
+ try {
1697
+ // A run that shared the tree (#1528) records what it has evidence of writing: its capture also holds its siblings' files.
1698
+ const claimedPaths = this.activeRuns.get(taskId)?.mode === CodingRunConcurrency.CONCURRENT
1699
+ ? collectRunClaimedPaths({
1700
+ candidateRoots: applicationRootSpellings(this.companionContext.saasRoot),
1701
+ reportedFileLocations: codingReportedFileLocations,
1702
+ permissionDecisions: codingPermissionDecisions,
1703
+ })
1704
+ : undefined;
1705
+ await this.codingRunWriteRegister.record({ taskId, taskRef: task.taskRef, changeSet, ...(claimedPaths !== undefined ? { claimedPaths } : {}) });
1706
+ }
1707
+ catch (error) {
1708
+ this.logDebug('Could not record the coding run\'s writes; accepting it from the workbench will refuse', { taskId, error: describeCaughtError(error) });
1709
+ }
1710
+ }
733
1711
  const scopeAssessment = changeSet
734
1712
  ? assessApplicationCodingTaskMutationScope(changeSet, task.mutationScope.allowedPathPrefixes, task.mutationScope.prohibitedPathPrefixes)
735
1713
  : null;
1714
+ /*
1715
+ * Did Wildo's IN-FLIGHT guards actually run for this agent?
1716
+ *
1717
+ * The permission ceiling and the task mutation scope are both enforced in
1718
+ * the client's answer to `session/request_permission`, and the scope half is
1719
+ * enforced against the `locations` that request DECLARES. So there are TWO
1720
+ * ways a run reaches the end with the mutation scope never consulted, and
1721
+ * until 2026-09-09 only the first was reported:
1722
+ *
1723
+ * 1. NO REQUEST AT ALL — the agent writes without asking. Codex's design
1724
+ * (its safety model is a sandbox) and OpenCode's default. Nothing is
1725
+ * answered, so nothing is checked.
1726
+ *
1727
+ * 2. REQUESTS RAISED, NONE CARRYING A LOCATION — the agent asks, the
1728
+ * client answers, and the scope predicate has nothing to check the
1729
+ * answer against, because `locations.some(...)` over an empty array is
1730
+ * vacuously satisfied. Under an UNRESTRICTED ceiling this is EVERY
1731
+ * shell command: `execute` is admitted by the ceiling, and a shell
1732
+ * command declares no locations because its effect is not derivable
1733
+ * from the command string. A run can therefore write outside its
1734
+ * declared scope through a shell command with a full, well-formed
1735
+ * permission-decision record showing it was allowed.
1736
+ *
1737
+ * Shape 2 is not a hole to be closed by deriving locations from a command —
1738
+ * a shell command is UNSCOPED BY NATURE, and parsing one to guess its writes
1739
+ * would be an invented, defeatable answer (`sh -c "$CMD"`, a redirect
1740
+ * through a substituted path). The honest treatment is to say so.
1741
+ *
1742
+ * Both shapes are ADMISSIBLE by decision (2026-09-06/09): a different agent
1743
+ * architecture is not a reason to refuse a tool, the dogfood lane authors
1744
+ * UNRESTRICTED deliberately, and the framework's directive is that
1745
+ * restrictions arrive as judge-style guards rather than refusals wired into
1746
+ * the mechanism. What is NOT acceptable is the consequence going unrecorded
1747
+ * while the configuration reads as though a gate were in place.
1748
+ *
1749
+ * Keyed on the run's OWN evidence rather than on a provider declaration: an
1750
+ * agent that changes behaviour between versions cannot silently keep an
1751
+ * old, reassuring claim. (The provider's declaration is used too, at
1752
+ * DISPATCH, where it refuses a ceiling narrower than UNRESTRICTED against an
1753
+ * agent that cannot honour one — a claim before the run and evidence after
1754
+ * it, which are different jobs.)
1755
+ */
1756
+ const raisedNoPermissionRequest = (codingPermissionDecisions?.length ?? 0) === 0;
1757
+ // An ALLOWED decision that declared no path: the ceiling admitted the act and
1758
+ // the scope predicate was handed nothing to judge it by.
1759
+ const allowedActsWithNoDeclaredLocation = (codingPermissionDecisions ?? []).filter((decision) => decision.allowed && decision.locations.length === 0).length;
1760
+ const mutationScopeWentUnconsulted = raisedNoPermissionRequest || allowedActsWithNoDeclaredLocation > 0;
1761
+ const mutatedFileCount = changeSet?.files.length ?? 0;
1762
+ if (!runError && mutationScopeWentUnconsulted && mutatedFileCount > 0) {
1763
+ // Best-effort and FEATURE-DETECTED, the same posture the audit emits take:
1764
+ // this observes a run, and an observation that can fail the run it
1765
+ // observes is worse than no observation. A partially-bound logger must not
1766
+ // turn a completed coding task into an error — measured the hard way, when
1767
+ // a `warn` the test double did not implement hung fifteen runs.
1768
+ this.logger.warn?.((raisedNoPermissionRequest
1769
+ ? 'Coding run mutated the workspace without raising a single permission request — '
1770
+ + "Wildo's permission ceiling and task mutation scope were NOT enforced in flight for this agent. "
1771
+ : `Coding run mutated the workspace after ${allowedActsWithNoDeclaredLocation} permitted act(s) that `
1772
+ + 'declared no file location — typically shell commands, which are unscoped by nature — so the task '
1773
+ + 'mutation scope had nothing to check those acts against and was NOT enforced in flight for them. ')
1774
+ + 'The change set taken after the run is the only record of what it touched'
1775
+ + (scopeAssessment && scopeAssessment.outOfScopePaths.length > 0
1776
+ ? `, and it recorded ${scopeAssessment.outOfScopePaths.length} changed path(s) outside the task's declared scope `
1777
+ + '(this run\'s or a parallel session\'s — the change set cannot tell which).'
1778
+ : '.'), {
1779
+ taskRef: task.taskRef,
1780
+ objectiveRef: task.objectiveRef,
1781
+ mutationScopeRef: task.mutationScope.scopeRef,
1782
+ mutatedFileCount,
1783
+ outOfScopePathCount: scopeAssessment?.outOfScopePaths.length ?? null,
1784
+ raisedNoPermissionRequest,
1785
+ allowedActsWithNoDeclaredLocation,
1786
+ inFlightMutationScopeConsulted: false,
1787
+ });
1788
+ }
736
1789
  // Verification is deliberately sequential. Each check has a fixed
737
1790
  // semantic meaning, but several checks can still contend for the same
738
1791
  // application package/cache if started together. The ordered outcomes are
739
1792
  // easier to inspect and avoid turning a bounded coding task into an
740
1793
  // accidental local-build fan-out.
741
- const shouldVerify = !runError && !captureError && scopeAssessment?.allowed === true;
1794
+ // Out-of-scope paths never skip verification: they are recorded, not refused.
1795
+ const shouldVerify = !runError && !captureError;
742
1796
  const { verification, infrastructureError: verificationInfrastructureError } = shouldVerify
743
1797
  ? await this.executeVerificationPlans(verificationPlans)
744
1798
  : { verification: [], infrastructureError: null };
745
- const failedVerification = verification.find(({ outcome }) => !outcome.success) ?? null;
1799
+ /*
1800
+ * Only a check this run BROKE fails the task. One that was already red is recorded and reported,
1801
+ * never attributed — see `preexistingVerificationFailures` above for what it cost when it was.
1802
+ *
1803
+ * The recording half is not decoration: a check red for every task is a project-level defect
1804
+ * that nothing else would surface, and forgiving it silently would replace a loud wrong answer
1805
+ * with a quiet one.
1806
+ */
1807
+ const carriedVerification = verification
1808
+ .filter(({ checkRef, outcome }) => !outcome.success && preexistingVerificationFailures.has(checkRef));
1809
+ const carriedVerificationFailures = carriedVerification.map(({ checkRef }) => checkRef);
1810
+ /*
1811
+ * And WHY it is red, captured while the output is in hand (#1529): the files the check names and
1812
+ * what generated them. A red nobody diagnoses is re-diagnosed by hand — on the first end-to-end run
1813
+ * that took an hour, for a fact the broken file's own banner stated.
1814
+ */
1815
+ const carriedVerificationDiagnoses = carriedVerification.map(({ checkRef, outcome }) => diagnoseCarriedVerificationFailure({
1816
+ checkRef,
1817
+ checkPath: outcome.path,
1818
+ message: outcome.message,
1819
+ stdoutTail: outcome.stdoutTail,
1820
+ stderrTail: outcome.stderrTail,
1821
+ readHead: (relativePath) => {
1822
+ try {
1823
+ return readFileSync(join(this.companionContext.saasRoot, relativePath), 'utf8').slice(0, 8_000);
1824
+ }
1825
+ catch {
1826
+ return undefined;
1827
+ }
1828
+ },
1829
+ }));
1830
+ const failedVerification = verification.find(({ checkRef, outcome }) => !outcome.success && !preexistingVerificationFailures.has(checkRef)) ?? null;
746
1831
  if (agentOutput) {
747
1832
  await traceBestEffort('write-agent-output', () => this.traceOperationArtifact(runSession, runStep, 'application-coding-task-agent-output.txt', agentOutput));
748
1833
  }
@@ -753,17 +1838,37 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
753
1838
  ? ApplicationCodingTaskDisposition.AGENT_EXECUTION_FAILED
754
1839
  : captureError
755
1840
  ? ApplicationCodingTaskDisposition.CHANGE_SET_CAPTURE_FAILED
756
- : !scopeAssessment?.allowed
757
- ? ApplicationCodingTaskDisposition.MUTATION_SCOPE_VIOLATION
758
- : failedVerification
759
- ? ApplicationCodingTaskDisposition.VERIFICATION_FAILED
760
- : traceabilityErrors.length > 0
761
- ? ApplicationCodingTaskDisposition.TRACEABILITY_FAILED
762
- : ApplicationCodingTaskDisposition.WORKING_RESULT_RECORDED;
1841
+ : failedVerification
1842
+ ? ApplicationCodingTaskDisposition.VERIFICATION_FAILED
1843
+ : traceabilityErrors.length > 0
1844
+ ? ApplicationCodingTaskDisposition.TRACEABILITY_FAILED
1845
+ : ApplicationCodingTaskDisposition.WORKING_RESULT_RECORDED;
763
1846
  const succeeded = disposition === ApplicationCodingTaskDisposition.WORKING_RESULT_RECORDED;
1847
+ /*
1848
+ * Whose failure this was (#1581). An agent failure is the HOST's only when the turn was TAKEN
1849
+ * AWAY: an operator cancelled it (this run's own abort signal), or the measured classifiers name
1850
+ * the environment (a mid-turn kill, a 529/429) or the account (quota, expired login). A timed-out
1851
+ * turn also ends `cancelled`, and it is the task's — it needed more than a turn.
1852
+ */
1853
+ const runErrorMessage = runError ? describeCaughtError(runError) : '';
1854
+ const agentTurnTakenByHost = this.activeRuns.get(taskId)?.abortController.signal.aborted === true
1855
+ || isInfrastructureShapedAgentFailure(runErrorMessage)
1856
+ || isProviderAccountAgentFailure(runErrorMessage);
1857
+ const failureAttribution = deriveCodingRunFailureAttribution({ disposition, agentTurnTakenByHost });
1858
+ // Which runs shared the tree with this one, and where they both wrote (#1528). Absent for a run alone.
1859
+ const concurrency = this.closeCodingRunWindow(taskId, (changeSet?.files ?? []).map((entry) => entry.path));
764
1860
  const output = {
765
1861
  succeeded,
766
1862
  disposition,
1863
+ ...(failureAttribution !== null ? { failureAttribution } : {}),
1864
+ ...(concurrency ? {
1865
+ concurrency,
1866
+ /*
1867
+ * A failure while other runs were editing the same tree may be theirs. Suspected, never
1868
+ * proven: the attempt budget forgives a bounded number of these (`selectBudgetCountingFailures`).
1869
+ */
1870
+ ...(!succeeded ? { interferenceSuspected: true } : {}),
1871
+ } : {}),
767
1872
  durationMs: Date.now() - startedAtMs,
768
1873
  agentOutputTail: agentOutput.slice(-OUTPUT_TAIL_CHARS),
769
1874
  // Recorded on the durable row because it is the difference between "the
@@ -772,7 +1877,11 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
772
1877
  // like a complete one from the diff alone.
773
1878
  ...(agentStopReason ? { agentStopReason } : {}),
774
1879
  ...(codingSessionEventCount > 0 ? { codingSessionEventCount } : {}),
775
- ...(retainedCodingSessionFrames.length > 0 ? { codingSessionFrames: retainedCodingSessionFrames } : {}),
1880
+ // Red before this run started, and still red. Not this task's failure, and not nobody's.
1881
+ ...(carriedVerificationFailures.length > 0 ? { carriedVerificationFailures, carriedVerificationDiagnoses } : {}),
1882
+ ...(codingSessionRetention.frames().length > 0
1883
+ ? { codingSessionFrames: codingSessionRetention.frames(), codingSessionRetention: codingSessionRetention.summary() }
1884
+ : {}),
776
1885
  // #2: the run's real cost, recorded on the durable row.
777
1886
  //
778
1887
  // This is what the previous transport structurally could not report, and
@@ -800,55 +1909,82 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
800
1909
  postRunHeadSha: changeSet.postRunHeadSha,
801
1910
  headMovedDuringRun: changeSet.headMovedDuringRun,
802
1911
  stats: changeSet.stats,
1912
+ /*
1913
+ * WHICH files, beside how many — asked for by the judge itself.
1914
+ *
1915
+ * On 2026-09-16, the first run whose evidence the `dispatch-outcome-sound` treatment could
1916
+ * read answered INDETERMINATE on its in-scope criterion, and said exactly why: "the artifact
1917
+ * does not identify the changed paths or their contents. It therefore cannot show that the
1918
+ * dispatched target/stage was implemented within <the declared scope>". That criterion asks
1919
+ * whether a schema task added a persisted shape and a ui-behavior task added field displays —
1920
+ * a question about PATHS, answered with counts.
1921
+ *
1922
+ * Path and attribution class only. The class is what lets a reader separate the run's own
1923
+ * work from a file that was already dirty at baseline or that a parallel session committed
1924
+ * inside the window — the distinction the criterion's own guidance turns on, and one the
1925
+ * counts flatten. Contents stay out: the full diff is a trace artifact, and pasting a
1926
+ * change-set into a durable row would put the repository inside its own task record.
1927
+ *
1928
+ * BOUNDED, because a durable row is not a diff: a task that touches more files than this
1929
+ * carries the first `CHANGE_SET_SUMMARY_FILE_LIMIT` and says how many it left out, which is
1930
+ * a truthful summary rather than a silently truncated one.
1931
+ */
1932
+ files: changeSet.files.slice(0, CHANGE_SET_SUMMARY_FILE_LIMIT).map((entry) => ({
1933
+ path: entry.path,
1934
+ attribution: entry.attribution,
1935
+ changeKind: entry.changeKind,
1936
+ })),
1937
+ ...(changeSet.files.length > CHANGE_SET_SUMMARY_FILE_LIMIT
1938
+ ? { filesOmittedFromSummary: changeSet.files.length - CHANGE_SET_SUMMARY_FILE_LIMIT }
1939
+ : {}),
803
1940
  },
804
1941
  } : { changeSetSummary: null }),
805
1942
  };
806
- try {
807
- const updatePayload = CompanionUpdateActorTaskRequestSchema.parse({
1943
+ /*
1944
+ * The run CONCLUDED, and the engine's driver records it (#1359): the status, this output and the
1945
+ * change-set artifact land on the task in the one move that settles the execution. `FAILED` is a
1946
+ * conclusion here, not a throw — see {@link CodingRunResult}.
1947
+ */
1948
+ return {
1949
+ kind: CodingRunEnding.CONCLUDED,
1950
+ conclusion: {
808
1951
  status: succeeded ? FlowsActors_Status.COMPLETED : FlowsActors_Status.FAILED,
809
- output,
810
- ...(changeSet ? { artifacts: [buildChangeSetArtifact(durableTask._id, changeSet)] } : {}),
811
- });
812
- await this.executionsService.updateActorTask(durableTask._id, updatePayload, runSession);
813
- }
814
- catch (error) {
815
- // Do not turn a failed durable PATCH into a retry: the agent may already
816
- // have changed files and re-execution would duplicate an unclassified
817
- // effect. The PROCESSING row is deliberately visible for the explicit
818
- // restart-review hook, while the trace records why it was not terminal.
819
- this.logger.error('Failed to persist terminal application coding-task result', {
820
- taskId: durableTask._id,
821
- taskRef: task.taskRef,
822
- error: describeCaughtError(error),
823
- });
824
- await traceBestEffort('record-terminal-patch-failure', () => this.traceOperationFailure({
825
- sessionContext: runSession,
826
- step: runStep,
827
- type: 'application-coding-task-terminal-patch-failure',
828
- summary: `Failed to persist terminal result for application coding task ${task.taskRef}`,
829
- error,
830
- payload: output,
831
- }));
832
- return;
833
- }
834
- if (succeeded) {
835
- await traceBestEffort('record-success', () => this.traceOperationSuccess({
836
- sessionContext: runSession,
837
- step: runStep,
838
- type: 'application-coding-task-run-success',
839
- summary: `Recorded working result for application coding task ${task.taskRef}`,
840
- payload: output,
841
- }));
842
- return;
843
- }
844
- await traceBestEffort('record-failure', () => this.traceOperationFailure({
845
- sessionContext: runSession,
846
- step: runStep,
847
- type: 'application-coding-task-run-failure',
848
- summary: `Application coding task ${task.taskRef} requires follow-up`,
849
- error: runError ?? captureError ?? verificationInfrastructureError ?? traceabilityErrors[0] ?? new Error(`Application coding task disposition: ${disposition}`),
850
- payload: output,
851
- }));
1952
+ taskOutput: output,
1953
+ ...(changeSet ? { taskArtifacts: [buildChangeSetArtifact(taskId, changeSet)] } : {}),
1954
+ },
1955
+ output,
1956
+ afterSettle: async () => {
1957
+ /*
1958
+ * A run that ANSWERED a question and then failed would otherwise keep its resume inputs:
1959
+ * the driver leaves a FAILED run's checkpoint in place, because for most hosts re-running
1960
+ * from it is how a failure is recovered. Here it holds the admitted contract — context
1961
+ * bytes the durable row deliberately never carries — and the question it answered is gone,
1962
+ * so there is nothing to continue. A failed coding run is re-DISPATCHED, not resumed.
1963
+ */
1964
+ if (!succeeded && resume) {
1965
+ await traceBestEffort('consume-checkpoint', () => this.actorsSystem.consumeActorExecutionCheckpoint(opened.executionId, runSession));
1966
+ }
1967
+ if (succeeded) {
1968
+ await traceBestEffort('record-success', () => this.traceOperationSuccess({
1969
+ sessionContext: runSession,
1970
+ step: runStep,
1971
+ type: 'application-coding-task-run-success',
1972
+ summary: `Recorded working result for application coding task ${task.taskRef}`,
1973
+ payload: output,
1974
+ }));
1975
+ await this.acceptUnderAutonomyPosture(task.taskRef, taskId);
1976
+ return;
1977
+ }
1978
+ await traceBestEffort('record-failure', () => this.traceOperationFailure({
1979
+ sessionContext: runSession,
1980
+ step: runStep,
1981
+ type: 'application-coding-task-run-failure',
1982
+ summary: `Application coding task ${task.taskRef} requires follow-up`,
1983
+ error: runError ?? captureError ?? verificationInfrastructureError ?? traceabilityErrors[0] ?? new Error(`Application coding task disposition: ${disposition}`),
1984
+ payload: output,
1985
+ }));
1986
+ },
1987
+ };
852
1988
  }
853
1989
  // ================================================================
854
1990
  // Interactive lane — classifier, live relay, park & resume
@@ -924,36 +2060,66 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
924
2060
  this.codingSessionSubscribers.delete(taskId);
925
2061
  };
926
2062
  }
927
- /** The questions currently awaiting an operator answer, for status/UX. */
928
- listPendingCodingQuestions() {
929
- return [...this.parkedCodingSessions.values()].map((parked) => ({
930
- taskId: parked.durableTask._id,
931
- taskRef: parked.task.taskRef,
932
- question: parked.suspension.question,
933
- parkedAt: parked.parkedAt,
934
- resumable: parked.suspension.resumable,
2063
+ /**
2064
+ * The questions currently awaiting an operator answer, for status/UX.
2065
+ *
2066
+ * Read from the ACTOR PLANE since #1359: every parked coding run is an execution of
2067
+ * `application-coding.system` that is `AWAITING_APPROVAL`, carrying the decision it waits on and
2068
+ * the checkpoint an answer continues from. Until then this read an in-process map, so a companion
2069
+ * restart emptied the list while the questions still stood — the board showed nothing to answer
2070
+ * for runs that were one answer away from continuing.
2071
+ *
2072
+ * Each carries a `decision` — the same `HumanDecision_Request` an interview and a clarification are
2073
+ * rendered from — so a reader needs no knowledge of ACP suspensions to show one. It is the decision
2074
+ * STORED on the execution when the run parked, not one rebuilt here: a second producer of a shared
2075
+ * contract would drift from the first the day an option changed.
2076
+ */
2077
+ async listPendingCodingQuestions(sessionContext) {
2078
+ return (await this.listParkedCodingRuns(sessionContext)).map((parked) => ({
2079
+ taskId: parked.taskId,
2080
+ taskRef: parked.checkpoint.taskRef,
2081
+ question: parked.checkpoint.suspension.question,
2082
+ parkedAt: parked.checkpoint.parkedAt,
2083
+ resumable: parked.checkpoint.suspension.resumable,
2084
+ decision: parked.decision,
935
2085
  }));
936
2086
  }
937
2087
  /**
938
- * Record a run that parked on a question: persist the non-terminal durable row
939
- * (status PROCESSING, disposition AWAITING_OPERATOR_INPUT, question on the
940
- * output) and retain the answerable state in memory for the resume door.
2088
+ * Every coding run waiting on an operator, as the actor plane holds it.
2089
+ *
2090
+ * ONE system's waiting executions — not the 200 most recently updated rows of every actor, which is
2091
+ * what the task-list scans this replaced read, and why a parked coding row could fall outside the
2092
+ * window on a busy application and be reported as absent.
2093
+ *
2094
+ * A waiting row whose checkpoint does not parse is SKIPPED, never reported: it has lost the thing
2095
+ * an answer would continue, so it is not a parked run anybody can answer. The startup reconcile
2096
+ * aborts such a row for review; between restarts it is simply not offered.
2097
+ */
2098
+ async listParkedCodingRuns(sessionContext) {
2099
+ const waiting = await this.actorsSystem.listSuspendedActorExecutions(APPLICATION_CODING_SYSTEM_REF, sessionContext);
2100
+ const parked = [];
2101
+ for (const row of waiting) {
2102
+ const checkpoint = ApplicationCodingRunCheckpointSchema.safeParse(row.checkpoint?.context);
2103
+ const task = row.tasks[0];
2104
+ if (!checkpoint.success || !task || !row.suspension)
2105
+ continue;
2106
+ parked.push({ executionId: row._id, taskId: task._id, checkpoint: checkpoint.data, decision: row.suspension.decision });
2107
+ }
2108
+ return parked;
2109
+ }
2110
+ /**
2111
+ * A run that parked on a question, as the engine's driver is told to record it: the run waits on
2112
+ * its execution (`AWAITING_APPROVAL`) with the decision a person owes and the inputs an answer
2113
+ * continues from, and its task shows the question and what the turn cost so far.
941
2114
  *
942
2115
  * Deliberately skips change-set assessment and verification: a parked run's
943
2116
  * edits are partial by definition, and assessing them as a final change set is
944
2117
  * exactly the "read a suspended turn as complete" mistake the suspension field
945
2118
  * exists to prevent.
946
2119
  */
947
- async recordParkedApplicationCodingTask(params) {
948
- const { task, durableTask, baseline, suspension, output, verificationPlans } = params;
949
- this.parkedCodingSessions.set(durableTask._id, {
950
- durableTask,
951
- task,
952
- verificationPlans,
953
- baseline,
954
- suspension,
955
- parkedAt: new Date().toISOString(),
956
- });
2120
+ buildParkedCodingRunResult(params) {
2121
+ const { task, taskId, baseline, suspension, output } = params;
2122
+ const parkedAt = new Date().toISOString();
957
2123
  const durableOutput = {
958
2124
  succeeded: false,
959
2125
  disposition: ApplicationCodingTaskDisposition.AWAITING_OPERATOR_INPUT,
@@ -966,129 +2132,353 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
966
2132
  ...(output.turnCount ? { turnCount: output.turnCount } : {}),
967
2133
  ...(output.continuations && output.continuations.length > 0 ? { continuations: output.continuations } : {}),
968
2134
  ...(params.codingSessionEventCount > 0 ? { codingSessionEventCount: params.codingSessionEventCount } : {}),
969
- ...(params.retainedCodingSessionFrames.length > 0 ? { codingSessionFrames: params.retainedCodingSessionFrames } : {}),
2135
+ ...(params.retainedCodingSessionFrames.length > 0
2136
+ ? { codingSessionFrames: params.retainedCodingSessionFrames, codingSessionRetention: params.codingSessionRetention }
2137
+ : {}),
970
2138
  ...(params.usage ? { usage: params.usage } : {}),
971
2139
  ...(output.deniedPermissionCount !== undefined ? { deniedPermissionCount: output.deniedPermissionCount } : {}),
972
2140
  ...(output.permissionDecisions && output.permissionDecisions.length > 0 ? { permissionDecisions: output.permissionDecisions } : {}),
973
2141
  };
974
- // Status stays PROCESSING: the task is genuinely still in flight, waiting on
975
- // the operator. It is not COMPLETED (nothing was accepted) and not FAILED
976
- // (nothing went wrong) — the disposition carries the real state.
977
- const updatePayload = CompanionUpdateActorTaskRequestSchema.parse({
978
- status: FlowsActors_Status.PROCESSING,
2142
+ // The resume inputs — see `ApplicationCodingRunCheckpointSchema` for why the CONTRACT and the
2143
+ // ORIGINAL baseline travel here rather than being re-derived when the answer arrives.
2144
+ const checkpoint = {
2145
+ kind: APPLICATION_CODING_RUN_CHECKPOINT_KIND,
2146
+ taskRef: task.taskRef,
2147
+ contract: task,
2148
+ baseline,
2149
+ suspension,
2150
+ parkedAt,
2151
+ };
2152
+ return {
2153
+ kind: CodingRunEnding.PARKED,
2154
+ suspension: {
2155
+ decision: projectParkedCodingQuestionAsDecision({ taskId, taskRef: task.taskRef, suspension, parkedAt }),
2156
+ checkpointContext: checkpoint,
2157
+ taskOutput: durableOutput,
2158
+ },
979
2159
  output: durableOutput,
980
- });
981
- await this.executionsService.updateActorTask(durableTask._id, updatePayload, params.runSession);
982
- await params.traceBestEffort('record-awaiting-input', () => this.traceOperationStart({
983
- sessionContext: params.runSession,
984
- step: params.runStep,
985
- type: 'application-coding-task-awaiting-input',
986
- summary: `Application coding task ${task.taskRef} is awaiting an operator answer`,
987
- payload: { taskId: durableTask._id, question: suspension.question, resumable: suspension.resumable },
988
- }));
2160
+ afterSettle: () => params.traceBestEffort('record-awaiting-input', () => this.traceOperationStart({
2161
+ sessionContext: params.runSession,
2162
+ step: params.runStep,
2163
+ type: 'application-coding-task-awaiting-input',
2164
+ summary: `Application coding task ${task.taskRef} is awaiting an operator answer`,
2165
+ payload: { taskId, question: suspension.question, resumable: suspension.resumable },
2166
+ })),
2167
+ };
989
2168
  }
990
- /** The in-process answerable state for a parked task, if this process is the one that parked it. */
991
- getParkedCodingSessionState(taskId) {
992
- return this.parkedCodingSessions.get(taskId) ?? null;
2169
+ /**
2170
+ * Has this build task ALREADY been run to a working result?
2171
+ *
2172
+ * Asked by the build dispatcher before it selects a task, and the reason is a measured money
2173
+ * leak rather than tidiness. `dispatch-next` picks `ready[0]`, and readiness is "not landed";
2174
+ * a task whose declared PRODUCT is never satisfied by the work it does is therefore ready
2175
+ * again the instant it finishes. Measured 2026-09-10 on Wonder CRM, where every task in the
2176
+ * plan declares `produces: []` and so can never land (#606): three consecutive dispatches
2177
+ * selected `build-task-contact-schema`, ran a full coding agent each time, and cost roughly
2178
+ * $7.50 per iteration. Nothing failed — each run succeeded — and the loop is unbounded.
2179
+ *
2180
+ * The durable actor-task rows are the right source and the only one that survives a restart:
2181
+ * an in-memory "last dispatched" would forget across the respawn that a rebuild triggers, and
2182
+ * the loop would resume.
2183
+ *
2184
+ * Deliberately COMPLETED only. A failed or cancelled run is exactly what an operator SHOULD be
2185
+ * able to re-dispatch, and a parked one is answered by resuming rather than by re-running.
2186
+ *
2187
+ * And a RE-ARMED completed run does not count (#1535): once the reason a task did not land is
2188
+ * fixed, `rearmBuildTask` records that on the run, and the task is offered again.
2189
+ */
2190
+ async findCompletedRunForBuildTask(buildTaskRef, sessionContext) {
2191
+ const [first] = await this.listCountingCompletedRunsForBuildTask(buildTaskRef, sessionContext);
2192
+ return first === undefined ? null : { taskId: first.taskId, completedAt: first.completedAt };
993
2193
  }
994
2194
  /**
995
- * Load the DURABLE facts needed to RECONSTRUCT a parked task's answerable state
996
- * after the in-process map has lost it (a companion restart).
2195
+ * Put a build task back in the queue after the reason it did not land has been fixed (#1535).
2196
+ *
2197
+ * Every completed or failed run of the task that still counts gets a re-arm recorded on its own row, in its
2198
+ * long-term memory, with the reason and a note. Nothing about the run is rewritten: it still reads
2199
+ * as the run it was, and it now also reads as a run that was superseded, and why.
997
2200
  *
998
- * Returns the build-plan `taskRef` and the persisted `suspension` — enough for
999
- * the build-dispatch layer to re-compose the task contract and rebuild a
1000
- * {@link ParkedCodingSessionState}. `null` when the row is not a parked coding
1001
- * task (wrong actor, no suspension, or not found).
2201
+ * Refuses when there is nothing to re-arm, naming why, because a re-arm that changes nothing would
2202
+ * let an operator believe a task was released when it was never held.
1002
2203
  */
1003
- async loadPersistedParkedCodingTask(taskId, sessionContext) {
1004
- let durableTask;
2204
+ async rearmBuildTask(buildTaskRef, request, sessionContext) {
2205
+ // Completed runs hold a task through the anti-loop guard; failed ones through its attempt budget (#1536).
2206
+ const runs = [
2207
+ ...(await this.listCountingCompletedRunsForBuildTask(buildTaskRef, sessionContext)),
2208
+ ...(await this.listAttributableFailedRunsForBuildTask(buildTaskRef, sessionContext)),
2209
+ ];
2210
+ if (runs.length === 0) {
2211
+ throw new NothingToRearmError(`Build task "${buildTaskRef}" has no completed or failed coding run that still counts, so there is nothing to re-arm: `
2212
+ + 'it was never run, or every run is already re-armed. A task in that state is '
2213
+ + 'offered by the next dispatch on its own.');
2214
+ }
2215
+ const rearm = { reason: request.reason, note: request.note, rearmedAt: new Date().toISOString() };
1005
2216
  try {
1006
- durableTask = await this.executionsService.getActorTask(taskId, sessionContext);
2217
+ for (const run of runs) {
2218
+ await this.executionsService.updateActorTask(run.taskId, { memory: withBuildTaskRearm(run.memory, rearm) }, sessionContext);
2219
+ }
1007
2220
  }
1008
- catch {
1009
- return null;
2221
+ finally {
2222
+ // A re-arm is actor-plane memory only — no file moves — and it releases a task the boards held as
2223
+ // stuck. Announced even when a later update threw: the runs re-armed before it did still moved.
2224
+ this.announceRunStateChanged();
1010
2225
  }
1011
- const row = durableTask;
1012
- if (row.actors?.actorRef !== APPLICATION_CODING_AGENT_REF)
1013
- return null;
1014
- const taskRef = isRecordValue(row.input) && typeof row.input.taskRef === 'string' ? row.input.taskRef : null;
1015
- const suspensionRaw = isRecordValue(row.output) ? row.output.suspension : undefined;
1016
- const parsedSuspension = CodingAgent_SessionSuspensionSchema.safeParse(suspensionRaw);
1017
- if (!taskRef || !parsedSuspension.success)
1018
- return null;
1019
- return { taskRef, suspension: parsedSuspension.data, durableTask };
2226
+ return { rearmedRunTaskIds: runs.map((run) => run.taskId), rearm };
1020
2227
  }
1021
2228
  /**
1022
- * Answer a parked coding task's question and resume the SAME agent session.
2229
+ * The FAILED coding runs of one build task that still count against its attempt budget (#1536) —
2230
+ * newest first, re-armed runs excluded, each with what the dispatcher needs to tell the next attempt
2231
+ * why this one failed.
1023
2232
  *
1024
- * The IN-PROCESS door: it answers a task THIS process parked. For a task whose
1025
- * in-process state was lost to a restart, the caller reconstructs a
1026
- * {@link ParkedCodingSessionState} (from the build plan) and uses
1027
- * {@link resumeParkedCodingTask} directly.
2233
+ * Only the task's OWN failures count. Since `703d07c3` a check that was red before the run started
2234
+ * no longer fails it (the run completes and records `carriedVerificationFailures`). A CANCELLED or
2235
+ * ABORTED run is an operator's or a host's act, not an attempt, and is not listed — which includes a
2236
+ * dispatch refused before admission, settled ABORTED (#1581). A FAILED run the HOST caused
2237
+ * (`failureAttribution`, {@link deriveCodingRunFailureAttribution}) is forgiven, up to
2238
+ * `MAXIMUM_HOST_FAILURE_EXCLUSIONS`, like suspected interference: past the bound it counts, so a
2239
+ * host condition that fails every attempt still retires the task. A row older than the field counts.
1028
2240
  */
1029
- async respondToApplicationCodingTaskQuestion(taskId, answer) {
1030
- // A missing answer is a VALIDATION 400 regardless of whether a task is parked
1031
- // — it is a malformed request, not a state conflict.
1032
- this.admitTypedInput(() => {
1033
- if (answer.trim().length === 0)
1034
- throw new Error('empty answer');
1035
- return answer;
1036
- }, 'An answer is required to resume a parked coding task.');
1037
- const parked = this.parkedCodingSessions.get(taskId);
1038
- if (!parked) {
1039
- throw this.buildDispatchConflictError(`No coding task is awaiting an answer under id ${taskId} in this process. `
1040
- + 'A companion restart drops in-flight answerable state; re-dispatch the task instead.');
2241
+ async listAttributableFailedRunsForBuildTask(buildTaskRef, sessionContext, options = {}) {
2242
+ const failed = await this.executionsService.listActorTasks(CompanionActorTasksListQuerySchema.parse({
2243
+ status: FlowsActors_Status.FAILED,
2244
+ actorRefs: [...APPLICATION_CODING_AGENT_REFS],
2245
+ limit: 200,
2246
+ }), sessionContext);
2247
+ const counting = [];
2248
+ for (const task of failed) {
2249
+ const row = task;
2250
+ if (!isApplicationCodingAgentRef(row.actors?.actorRef))
2251
+ continue;
2252
+ if (!isRecordValue(row.input) || row.input.taskRef !== buildTaskRef)
2253
+ continue;
2254
+ // A re-armed failure no longer counts against the budget; a retry may still want to READ it.
2255
+ if (options.includeRearmed !== true && readBuildTaskRearm(row.memory) !== undefined)
2256
+ continue;
2257
+ const output = isRecordValue(row.output) ? row.output : {};
2258
+ counting.push({
2259
+ taskId: String(row._id),
2260
+ ...(row.completedAt ? { settledAt: row.completedAt } : {}),
2261
+ memory: row.memory,
2262
+ output,
2263
+ interferenceSuspected: output.interferenceSuspected === true,
2264
+ hostAttributed: output.failureAttribution === CodingRunFailureAttribution.HOST,
2265
+ });
2266
+ }
2267
+ /*
2268
+ * A run that failed while other runs shared the tree may have failed for THEIR edits (#1528). The
2269
+ * budget forgives up to MAXIMUM_INTERFERENCE_RETRIES of those, so interference cannot retire a
2270
+ * task, and a task that genuinely cannot pass still does. A retry READING its history sees them all.
2271
+ */
2272
+ return (options.includeRearmed === true ? counting : selectBudgetCountingFailures(counting))
2273
+ .map(({ interferenceSuspected: _suspected, hostAttributed: _host, ...run }) => run);
2274
+ }
2275
+ /**
2276
+ * The completed coding runs of one build task that the anti-loop guard still counts — newest first,
2277
+ * re-armed runs excluded. One reader, so the guard and the re-arm cannot disagree about which runs
2278
+ * hold a task.
2279
+ */
2280
+ async listCountingCompletedRunsForBuildTask(buildTaskRef, sessionContext) {
2281
+ /*
2282
+ * Scoped to the CODING actors before the list is trimmed (#1359). This used to read the 200 most
2283
+ * recently updated `COMPLETED` tasks of EVERY actor, so a busy judge or labelling lane could push
2284
+ * a completed coding run out of the window — and this guard would then answer "never ran" and
2285
+ * reopen the loop it exists to close. What remains is a bound on coding runs alone: a build task
2286
+ * whose completed run is older than the 200 most recent COMPLETED coding runs is still missed.
2287
+ */
2288
+ const completed = await this.executionsService.listActorTasks(CompanionActorTasksListQuerySchema.parse({
2289
+ status: FlowsActors_Status.COMPLETED,
2290
+ actorRefs: [...APPLICATION_CODING_AGENT_REFS],
2291
+ limit: 200,
2292
+ }), sessionContext);
2293
+ const counting = [];
2294
+ for (const task of completed) {
2295
+ const row = task;
2296
+ // MEMBERSHIP, not equality with one constant — the same reason
2297
+ // `reconcileInterruptedApplicationCodingTasks` gives: a second declared coding agent must
2298
+ // not make this silently answer "never ran".
2299
+ if (!isApplicationCodingAgentRef(row.actors?.actorRef))
2300
+ continue;
2301
+ if (!isRecordValue(row.input) || row.input.taskRef !== buildTaskRef)
2302
+ continue;
2303
+ if (readBuildTaskRearm(row.memory) !== undefined)
2304
+ continue;
2305
+ counting.push({ taskId: String(row._id), completedAt: row.completedAt, memory: row.memory });
2306
+ }
2307
+ return counting;
2308
+ }
2309
+ /**
2310
+ * A run for this build task that is PARKED on an unanswered question.
2311
+ *
2312
+ * The sibling above answers "has this task already run to a terminal state?" and is what the
2313
+ * dispatcher's anti-loop guard consults. It lists `COMPLETED` tasks only, so a run that SUSPENDS is
2314
+ * invisible to it, and its task would be offered again on every dispatch, forever.
2315
+ *
2316
+ * Measured 2026-09-16 on Wonder CRM: `build-task-gdpr-data-handling-governance` suspended, and the
2317
+ * next `dispatch-next` dry run selected the same task — neither landed, nor marked, nor skipped.
2318
+ * That is the money-burning loop `buildUnlandableTaskError` was written against (#606, ~$7.50 a
2319
+ * turn), reached through the one door that guard cannot see.
2320
+ *
2321
+ * Re-dispatching a parked task is worse than re-dispatching a completed one: it starts a NEW run
2322
+ * and abandons the persisted session the operator's answer would have resumed, so the question and
2323
+ * everything the agent established are lost rather than merely repeated.
2324
+ *
2325
+ * Reads the waiting EXECUTIONS of the coding system since #1359 — see `listParkedCodingRuns` for
2326
+ * the residual that closed.
2327
+ */
2328
+ async findParkedRunForBuildTask(buildTaskRef, sessionContext) {
2329
+ for (const parked of await this.listParkedCodingRuns(sessionContext)) {
2330
+ if (parked.checkpoint.taskRef !== buildTaskRef)
2331
+ continue;
2332
+ /*
2333
+ * RESUMABLE only, and matching the answer door's own predicate is the whole point. A
2334
+ * non-resumable park cannot be answered — that door refuses it — so reporting it here would
2335
+ * make the dispatcher skip the one task no operator can unblock: a dead end in both
2336
+ * directions. A non-resumable park is therefore reported as NOT parked, and a fresh dispatch
2337
+ * is the only way forward for it.
2338
+ */
2339
+ if (!parked.checkpoint.suspension.resumable)
2340
+ continue;
2341
+ return { taskId: parked.taskId, question: parked.checkpoint.suspension.question, resumable: true };
2342
+ }
2343
+ return null;
2344
+ }
2345
+ /**
2346
+ * The parked run behind one TASK id, or `null` when nothing answerable waits under it.
2347
+ *
2348
+ * The task id is the lane's handle and the execution is the engine's, so this is the join: the
2349
+ * task row names its execution, and the driver says whether that execution is waiting. Every way
2350
+ * of not being a parked coding run answers `null` — not a coding task, no execution, not waiting,
2351
+ * a checkpoint that no longer parses — because the caller's response to all of them is the same
2352
+ * refusal, and none of them is an error in the request.
2353
+ */
2354
+ async readParkedCodingRun(taskId, sessionContext) {
2355
+ let executionId;
2356
+ try {
2357
+ const row = await this.executionsService.getActorTask(taskId, sessionContext);
2358
+ if (!isApplicationCodingAgentRef(row.actors?.actorRef))
2359
+ return null;
2360
+ executionId = row.wildoApplicationActorSystemExecutionId;
2361
+ }
2362
+ catch {
2363
+ return null;
2364
+ }
2365
+ if (!executionId)
2366
+ return null;
2367
+ try {
2368
+ const waiting = await this.actorsSystem.readSuspendedActorExecution(executionId, sessionContext);
2369
+ const checkpoint = ApplicationCodingRunCheckpointSchema.safeParse(waiting.row.checkpoint?.context);
2370
+ // A run parked from a wave resumes as one: it holds only its task, never the tree (#1528).
2371
+ const mode = isConcurrentRunSubject(waiting.row.exclusiveSubject) ? CodingRunConcurrency.CONCURRENT : CodingRunConcurrency.SINGLE_FLIGHT;
2372
+ return checkpoint.success ? { executionId, checkpoint: checkpoint.data, mode } : null;
2373
+ }
2374
+ catch {
2375
+ // `readSuspendedActorExecution` refuses an execution that is not waiting — already answered,
2376
+ // cancelled, settled. For this door that is "nothing to answer", not a fault.
2377
+ return null;
1041
2378
  }
1042
- return this.resumeParkedCodingTask(parked, answer);
1043
2379
  }
1044
2380
  /**
1045
- * Run a resume against an EXPLICIT parked state — from the in-process map or
1046
- * reconstructed from the build plan after a restart.
2381
+ * Answer a parked coding task's question, resuming the SAME agent session.
2382
+ *
2383
+ * ONE door, in-process or after a restart (#1359). The run's execution is `AWAITING_APPROVAL`
2384
+ * with the contract, the original baseline and the agent session on its checkpoint, and the
2385
+ * engine's `resumeActorExecution` continues it under the same ids: it refuses an execution that is
2386
+ * no longer waiting BEFORE moving anything — so a second answer to one question cannot run the
2387
+ * work twice — moves the rows back to `PROCESSING`, and settles whatever the continued run does,
2388
+ * including parking again on a second question.
1047
2389
  *
1048
2390
  * Runs under the worktree mutation lock exactly like a fresh dispatch (a resume
1049
2391
  * mutates the same worktree) and re-enters the turn ladder through
1050
2392
  * `session/load`, so the agent continues with its full context. The mutation
1051
2393
  * scope and verification plan are the parked contract's; a resume is held to the
1052
- * same bounds as the first run.
2394
+ * same bounds as the first run, and its change set is measured from the first run's baseline.
2395
+ */
2396
+ /**
2397
+ * Append one answer to `src/build-plan/CODING-ANSWERS.md` — the record of what a person told a
2398
+ * parked coding run (#1454, Step 6). Until then the answer lived only in the agent session and
2399
+ * the run log, so a reviewer accepting the change set could not see the decision it rests on.
2400
+ *
2401
+ * Best-effort: a record that cannot be written is logged and the answer still goes to the agent
2402
+ * — the person's answer is not held hostage to a file. The file lands beside the build plan as a
2403
+ * working edit; a commit accepts it like every other decision record.
1053
2404
  */
1054
- async resumeParkedCodingTask(parked, answer) {
2405
+ async recordCodingQuestionAnswer(taskRef, question, answer, source = {}) {
2406
+ const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
2407
+ const buildPlanPath = getFamilyPackageRelativePath(ApplicationSpecificationFamily.BUILD_PLAN);
2408
+ if (!specificationsPackageRoot || !buildPlanPath)
2409
+ return;
2410
+ const filePath = join(specificationsPackageRoot, dirname(buildPlanPath), CODING_ANSWERS_FILE_NAME);
2411
+ try {
2412
+ await mkdir(dirname(filePath), { recursive: true });
2413
+ const entry = renderCodingQuestionAnswerEntry({ taskRef, question, answer, answeredAt: new Date().toISOString(), ...source });
2414
+ if (existsSync(filePath))
2415
+ await appendFile(filePath, entry, 'utf8');
2416
+ else
2417
+ await writeFile(filePath, `${renderCodingQuestionAnswersHeader()}${entry}`, 'utf8');
2418
+ }
2419
+ catch (error) {
2420
+ this.logDebug('Could not record the coding-question answer beside the build plan (the answer still resumes the run)', { taskRef, error: String(error) });
2421
+ }
2422
+ }
2423
+ async respondToApplicationCodingTaskQuestion(taskId, answer, sessionContext) {
2424
+ // A missing answer is a VALIDATION 400 regardless of whether a task is parked
2425
+ // — it is a malformed request, not a state conflict.
1055
2426
  const trimmedAnswer = this.admitTypedInput(() => {
1056
2427
  const value = answer.trim();
1057
2428
  if (value.length === 0)
1058
2429
  throw new Error('empty answer');
1059
2430
  return value;
1060
2431
  }, 'An answer is required to resume a parked coding task.');
1061
- const taskId = parked.durableTask._id;
1062
- if (!parked.suspension.resumable) {
2432
+ const parked = await this.readParkedCodingRun(taskId, sessionContext);
2433
+ if (!parked) {
2434
+ throw this.buildDispatchConflictError(`No coding task is awaiting an answer under id ${taskId}. It was already answered, cancelled or settled, `
2435
+ + 'or it is not a coding run.');
2436
+ }
2437
+ const { checkpoint, executionId, mode } = parked;
2438
+ if (!checkpoint.suspension.resumable) {
1063
2439
  throw this.buildDispatchConflictError(`Coding task ${taskId} parked on a question, but its agent does not support session resume, `
1064
2440
  + 'so the answer cannot be delivered to the same session. Re-dispatch the task with the answer folded into the objective.');
1065
2441
  }
1066
- if (this.activeRun) {
1067
- throw this.buildDispatchConflictError(`A coding-agent run is already active (task ${this.activeRun.taskId}). Answers are serialized behind the same worktree lock.`);
1068
- }
1069
- // Taken out of the answerable set for the duration of the resume; a resume
1070
- // that parks again re-registers it through the same suspension branch.
1071
- this.parkedCodingSessions.delete(taskId);
2442
+ // Answers are serialized behind the same worktree: refused while another run holds it. The
2443
+ // driver re-takes the subject on resume and refuses there too; this names the holder first.
2444
+ await this.refuseWhileWorktreeIsHeld(null, sessionContext);
2445
+ if (mode === CodingRunConcurrency.SINGLE_FLIGHT)
2446
+ await this.refuseWhileConcurrentRunsInFlight(sessionContext);
2447
+ const task = checkpoint.contract;
2448
+ // The answer is a DECISION the change set will rest on: recorded beside the build plan before the
2449
+ // run resumes, so a resume that then fails still leaves the decision where a reviewer reads (#1454, Step 6).
2450
+ await this.recordCodingQuestionAnswer(task.taskRef, checkpoint.suspension.question, trimmedAnswer);
2451
+ const verificationPlans = this.admitTypedInput(() => resolveApplicationCodingTaskVerificationPlans(task.verificationIntent.requiredChecks), 'The parked coding task names a verification check this host no longer registers.');
1072
2452
  const admission = createDeferred();
1073
- const resumeRun = withDedicatedFileLock(this.getWorkspaceMutationLockPath(), async () => {
1074
- this.activeRun = { taskId, startedAt: new Date().toISOString(), abortController: new AbortController() };
2453
+ const resumeBody = async () => {
2454
+ // ONE settlement for the whole chain: the resumed turn, and any questions the answering agent
2455
+ // then answers under the same hold (#1559) — a caller awaiting it sees the chain's final state.
1075
2456
  const settlement = createDeferred();
1076
2457
  this.applicationCodingTaskSettlements.set(taskId, { promise: settlement.promise, resolve: () => settlement.resolve(undefined) });
1077
- admission.resolve({
1078
- taskId,
1079
- status: FlowsActors_Status.PROCESSING,
1080
- taskRef: parked.task.taskRef,
1081
- baselineHeadSha: parked.baseline.headSha,
1082
- baselineDirtyFileCount: Object.keys(parked.baseline.files).length,
1083
- });
1084
2458
  try {
1085
- await this.executeApplicationCodingTask(parked.task, renderApplicationCodingTaskAgentPrompt(parked.task), parked.verificationPlans, parked.durableTask, parked.baseline, { continuationOfSessionId: parked.suspension.sessionId, answerPrompt: trimmedAnswer });
2459
+ await this.resumeParkedRunHoldingLock({
2460
+ taskId,
2461
+ executionId,
2462
+ checkpoint,
2463
+ answer: trimmedAnswer,
2464
+ verificationPlans,
2465
+ sessionContext,
2466
+ mode,
2467
+ onAdmitted: (admitted) => admission.resolve(admitted),
2468
+ });
2469
+ await this.answerParkedQuestionsHoldingLock(taskId, sessionContext);
1086
2470
  }
1087
2471
  finally {
1088
- this.activeRun = null;
1089
2472
  this.applicationCodingTaskSettlements.get(taskId)?.resolve();
2473
+ // A resume the driver refused never reached the executor, so nobody answered the caller.
2474
+ admission.reject(this.buildDispatchConflictError(`Coding task ${taskId} could not be resumed: it is no longer awaiting an answer.`));
2475
+ this.announceRunStateChanged();
1090
2476
  }
1091
- }, { retries: { retries: 0 } });
2477
+ };
2478
+ // A run parked from a wave resumes beside it, holding no lock, as it ran (#1528).
2479
+ const resumeRun = mode === CodingRunConcurrency.CONCURRENT
2480
+ ? resumeBody()
2481
+ : withDedicatedFileLock(this.getWorkspaceMutationLockPath(), resumeBody, { retries: { retries: 0 } });
1092
2482
  resumeRun.catch((error) => {
1093
2483
  admission.reject(this.mapLockError(error));
1094
2484
  this.logDebug('Application coding-task resume run terminated with error', {
@@ -1098,6 +2488,131 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1098
2488
  });
1099
2489
  return admission.promise;
1100
2490
  }
2491
+ /**
2492
+ * Continue one parked run with an answer. The CALLER holds the worktree mutation lock and owns the
2493
+ * run's settlement — which is what lets the answering agent resume a run from inside the hold of
2494
+ * the run that parked, without a second acquire (the lock is not re-entrant) and without the build
2495
+ * loop taking the worktree in between (#1559).
2496
+ */
2497
+ async resumeParkedRunHoldingLock(input) {
2498
+ const { taskId, checkpoint } = input;
2499
+ const task = checkpoint.contract;
2500
+ const baseline = checkpoint.baseline;
2501
+ this.activeRuns.set(taskId, { taskId, startedAt: new Date().toISOString(), abortController: new AbortController(), mode: input.mode ?? CodingRunConcurrency.SINGLE_FLIGHT });
2502
+ this.openCodingRunWindow(taskId, task.taskRef);
2503
+ try {
2504
+ const trace = await this.openCodingRunTrace(taskId, task.taskRef);
2505
+ await this.superviseCodingRun(task.taskRef, taskId, trace, (capture) => this.actorsSystem.resumeActorExecution(input.executionId, async (opened) => {
2506
+ // Admitted HERE, once the engine has moved the rows back to PROCESSING: a resume the
2507
+ // driver refuses (somebody answered first) rejects the admission instead of claiming it.
2508
+ input.onAdmitted?.({
2509
+ taskId,
2510
+ status: FlowsActors_Status.PROCESSING,
2511
+ taskRef: task.taskRef,
2512
+ baselineHeadSha: baseline.headSha,
2513
+ baselineDirtyFileCount: Object.keys(baseline.files).length,
2514
+ });
2515
+ // Started again, announced only NOW that the engine has moved its rows back to PROCESSING:
2516
+ // a read that re-derived before that would still see the run as parked.
2517
+ this.announceRunStateChanged();
2518
+ return capture(await this.executeApplicationCodingTask(task, renderApplicationCodingTaskAgentPrompt(task), input.verificationPlans, opened, baseline, trace, { continuationOfSessionId: checkpoint.suspension.sessionId, answerPrompt: input.answer }));
2519
+ }, trace.runSession, this.codingRunOptions));
2520
+ }
2521
+ finally {
2522
+ this.endCodingRunWindow(taskId);
2523
+ this.activeRuns.delete(taskId);
2524
+ // NOT announced here: this runs inside a chain its CALLER settles (`resumeBody`, or a fresh run
2525
+ // answering its parked questions), and that caller announces once the whole chain has settled.
2526
+ }
2527
+ }
2528
+ /**
2529
+ * Offer a run's parked question to the ANSWERING AGENT before it reaches the creator (#1559), and
2530
+ * keep doing so while the run parks again on a question the agent can answer.
2531
+ *
2532
+ * Runs inside the worktree hold of the run that parked, BEFORE that run's settlement resolves: the
2533
+ * build loop waits on the settlement, so it sees the chain's final outcome, and it cannot take the
2534
+ * worktree between the park and the answer — a race that would send answerable questions to a person
2535
+ * for no reason.
2536
+ *
2537
+ * Bounded three ways, all in `decideAgentAnswerAttempt`: the posture (GUIDED keeps every question with
2538
+ * the person), one verdict per question, and {@link MAXIMUM_AGENT_ANSWERS_PER_RUN} answers per run.
2539
+ * Every verdict is written to the run's task memory BEFORE anything acts on it, so a wrong
2540
+ * self-answer can be audited and a restart cannot ask the same question twice.
2541
+ *
2542
+ * Never fails the run. Every refusal, a failed model call, an unparseable answer or a failed resume
2543
+ * leaves the park exactly as it was, and the question reaches the creator as it always did.
2544
+ */
2545
+ async answerParkedQuestionsHoldingLock(taskId, sessionContext) {
2546
+ try {
2547
+ for (;;) {
2548
+ const parked = await this.readParkedCodingRun(taskId, sessionContext);
2549
+ if (!parked || !parked.checkpoint.suspension.resumable)
2550
+ return;
2551
+ const row = await this.executionsService.getActorTask(taskId, sessionContext);
2552
+ const question = parked.checkpoint.suspension.question;
2553
+ const decision = decideAgentAnswerAttempt({
2554
+ posture: APPLICATION_CREATION_AUTONOMY_POSTURE,
2555
+ question,
2556
+ priorRecords: readParkedQuestionAnswers(row.memory),
2557
+ });
2558
+ if (decision !== AgentAnswerAttemptDecision.ATTEMPT) {
2559
+ this.logDebug('Parked question left for the creator', { taskId, decision });
2560
+ return;
2561
+ }
2562
+ const task = parked.checkpoint.contract;
2563
+ const agentOutputTail = String(row.output?.agentOutputTail ?? '');
2564
+ const output = await this.askAnsweringAgent({ brief: renderApplicationCodingTaskAgentPrompt(task), question, agentOutputTail });
2565
+ if (!output)
2566
+ return;
2567
+ const answer = output.verdict === ParkedQuestionAnswerVerdict.ANSWERED ? output.answer.trim() : '';
2568
+ const record = {
2569
+ // An `answered` with no answer is not an answer; the creator is asked.
2570
+ verdict: answer.length > 0 ? ParkedQuestionAnswerVerdict.ANSWERED : ParkedQuestionAnswerVerdict.PRODUCT_DECISION,
2571
+ question,
2572
+ answer,
2573
+ basis: output.basis.trim(),
2574
+ decidedAt: new Date().toISOString(),
2575
+ };
2576
+ await this.executionsService.updateActorTask(taskId, { memory: withParkedQuestionAnswer(row.memory, record) }, sessionContext);
2577
+ this.logger.info('The answering agent returned a verdict on a parked coding question', {
2578
+ taskId, taskRef: task.taskRef, verdict: record.verdict,
2579
+ });
2580
+ if (record.verdict !== ParkedQuestionAnswerVerdict.ANSWERED)
2581
+ return;
2582
+ await this.recordCodingQuestionAnswer(task.taskRef, question, answer, { answeredBy: CodingQuestionAnswerer.ANSWERING_AGENT, basis: record.basis });
2583
+ await this.resumeParkedRunHoldingLock({
2584
+ taskId,
2585
+ executionId: parked.executionId,
2586
+ checkpoint: parked.checkpoint,
2587
+ answer,
2588
+ verificationPlans: resolveApplicationCodingTaskVerificationPlans(task.verificationIntent.requiredChecks),
2589
+ sessionContext,
2590
+ mode: parked.mode,
2591
+ });
2592
+ }
2593
+ }
2594
+ catch (error) {
2595
+ this.logger.warn('The answering agent could not handle a parked coding question; it stays with the creator', {
2596
+ taskId,
2597
+ error: describeCaughtError(error),
2598
+ });
2599
+ }
2600
+ }
2601
+ /** ONE structured call to the answering agent; `null` when it produced nothing usable, which leaves the question with the creator. */
2602
+ async askAnsweringAgent(input) {
2603
+ const invocation = {
2604
+ agentRef: PARKED_QUESTION_ANSWERER_AGENT_REF,
2605
+ initiator: {},
2606
+ invocationContext: [],
2607
+ input: { prompt: renderParkedQuestionAnswerPrompt(input), schema: ParkedQuestionAnswerOutputSchema },
2608
+ output: { object: {} },
2609
+ executionContext: {},
2610
+ artifactBindings: [],
2611
+ };
2612
+ const response = await this.agentsService.invokeAgent(invocation);
2613
+ const parsed = ParkedQuestionAnswerOutputSchema.safeParse(response.output?.object);
2614
+ return parsed.success ? parsed.data : null;
2615
+ }
1101
2616
  buildApplicationCodingTaskTraceSummary(task) {
1102
2617
  return {
1103
2618
  taskRef: task.taskRef,
@@ -1223,6 +2738,119 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1223
2738
  stderrTail: '',
1224
2739
  };
1225
2740
  }
2741
+ /**
2742
+ * The schema-plan drift gate — `wildo db diff --check` at the application root.
2743
+ *
2744
+ * ## Why it is not simply another argv plan
2745
+ *
2746
+ * The other CLI checks answer a two-valued question about a package that always exists.
2747
+ * This one has THREE outcomes, and collapsing any of them into "failed" would fail runs
2748
+ * on a question nobody asked:
2749
+ *
2750
+ * 1. **No committed lockfile** — answered here, from the application's DECLARED store
2751
+ * (`ApplicationSchemaPlanObligation`, #1144), because `wildo db diff --check` exits
2752
+ * non-zero for every application without one. A MongoDB application is permanently in
2753
+ * this state (a collection exists on first write; there is no plan to drift from): a
2754
+ * pass that says it checked nothing. A PostgreSQL application in it has had no
2755
+ * migration create its tables and cannot boot: a FAILED check naming the initial
2756
+ * `wildo db generate`. A store that cannot be read is "we could not ask": it THROWS.
2757
+ * 2. **No `backend-api/dist`** — the model is computed by IMPORTING the compiled
2758
+ * modules registry, and the build lane only ever runs `tsc --noEmit`, which emits
2759
+ * nothing. This is "we could not ask", not "the application has drifted", so it
2760
+ * THROWS and is reported as an infrastructure error. Same distinction this playbook's
2761
+ * method already draws for the typechecks, and the same reasoning
2762
+ * `reconcileDevelopmentSchemaDrift` uses when it SKIPS on a stale model rather than
2763
+ * generating a migration for a model nobody has.
2764
+ * 3. **Both present** — the spawn decides, and its own message is carried through: it
2765
+ * names the drifted tables and the command that fixes them, which is more than this
2766
+ * layer could reconstruct.
2767
+ *
2768
+ * ## Why the check is worth having at all
2769
+ *
2770
+ * It is the only check in the catalog that can see a missing table. A resource whose
2771
+ * migration was never generated typechecks green in all four packages and then refuses
2772
+ * to boot with `postgresql_table_schema_mismatch` — measured 2026-09-07, when an engine
2773
+ * resource landed with migrations for two of the three PostgreSQL-backed applications
2774
+ * and the third crash-looped until a human read the log.
2775
+ */
2776
+ async runSchemaPlanDriftVerification() {
2777
+ const saasRoot = this.companionContext.saasRoot;
2778
+ const assessment = await assessApplicationSchemaPlanObligation(saasRoot);
2779
+ if (assessment.obligation === ApplicationSchemaPlanObligation.NOT_OWED) {
2780
+ return {
2781
+ kind: VerificationKind.SCHEMA_PLAN_DRIFT,
2782
+ path: null,
2783
+ success: true,
2784
+ // Says it checked NOTHING rather than reporting a clean plan — the same honesty the
2785
+ // settings-placement sweep applies to an application with no authored rail.
2786
+ message: `no schema-plan lockfile, and ${assessment.declaredIn} does not declare PostgreSQL — this application has not adopted migrations, so there is no accepted plan to drift from (every MongoDB application is in this state permanently)`,
2787
+ stdoutTail: '',
2788
+ stderrTail: '',
2789
+ };
2790
+ }
2791
+ if (assessment.obligation === ApplicationSchemaPlanObligation.BASELINE_OWED) {
2792
+ /*
2793
+ * A FAILED check, not a pass (#1144). Until then no lockfile read as "not adopted" whatever the store,
2794
+ * so a PostgreSQL application whose initial migration was never generated verified green here — the
2795
+ * one check in the catalog that can see a missing table, answering for the one application that has
2796
+ * none of them.
2797
+ */
2798
+ return {
2799
+ kind: VerificationKind.SCHEMA_PLAN_DRIFT,
2800
+ path: null,
2801
+ success: false,
2802
+ message: `no schema-plan baseline, but ${assessment.declaredIn} declares PostgreSQL — no migration has created this application's tables, so its backend cannot boot. Generate the initial migration with \`wildo db generate --name initial-schema\` (it writes the baseline in the same invocation) and commit both.`,
2803
+ stdoutTail: '',
2804
+ stderrTail: '',
2805
+ };
2806
+ }
2807
+ if (assessment.obligation === ApplicationSchemaPlanObligation.UNDETERMINED) {
2808
+ // Infrastructure, not drift: nothing about the model was asked.
2809
+ throw new Error(`Cannot check schema-plan drift: there is no schema-plan lockfile and ${assessment.reason}.`);
2810
+ }
2811
+ const modulesRegistryPath = join(saasRoot, 'backend-api', 'dist', 'modules-registry.backend.js');
2812
+ if (!existsSync(modulesRegistryPath)) {
2813
+ // THROWN on purpose: `executeVerificationPlans` classifies a throw as an infrastructure
2814
+ // error and reports it apart from a failing check. A `success: false` here would say the
2815
+ // application has drifted, which is a claim about a model that was never computed.
2816
+ throw new Error(`Cannot check schema-plan drift: ${modulesRegistryPath} does not exist. The plan is computed by importing `
2817
+ + "the compiled backend registry, and this build never emitted one (`tsc --noEmit` does not). Build backend-api, "
2818
+ + 'or run this check under `wildo local dev`, whose watcher maintains that dist.');
2819
+ }
2820
+ const outcome = await this.runVerification({
2821
+ kind: VerificationKind.SCHEMA_PLAN_DRIFT,
2822
+ path: null,
2823
+ command: 'wildo',
2824
+ args: ['db', 'diff', '--check'],
2825
+ cwd: saasRoot,
2826
+ });
2827
+ if (!outcome.success && /ENOENT|not found/i.test(outcome.message)) {
2828
+ // The CLI is a GLOBAL install (`platform/factory/scripts/install.sh`) and is not linked
2829
+ // into an application's `node_modules/.bin` — verified on both dogfood applications. So
2830
+ // "wildo is not on PATH" is an absent tool, never a drifted schema.
2831
+ throw new Error(`Cannot check schema-plan drift: the \`wildo\` CLI could not be executed (${outcome.message}).`);
2832
+ }
2833
+ /*
2834
+ * COULD NOT ASK is not DRIFT, and `wildo db diff --check` cannot tell them apart by exit code —
2835
+ * it answers `{ success: false }` for both (`diff.command.ts`), so the message is the only
2836
+ * discriminator, exactly as it already is for the ENOENT case above.
2837
+ *
2838
+ * `computeCurrentLockfileJson` refuses before planning whenever the compiled model is STALE —
2839
+ * "shared-lib/dist is older than its sources … This is NOT drift: wait for the watcher to
2840
+ * rebuild" — or when `backend-api/dist` is absent. Reported as a failing check, both read as
2841
+ * "this application has drifted", which is a claim about a model that was never computed. On a
2842
+ * per-task check that matters twice over: the check runs seconds after an agent wrote the very
2843
+ * sources the watcher is still compiling, so the race is the COMMON case rather than the edge.
2844
+ *
2845
+ * Thrown, like every other infrastructure absence here, so `executeVerificationPlans` reports it
2846
+ * apart from a failing check and a BASELINE pass cannot read it as "already broken".
2847
+ */
2848
+ if (!outcome.success && /Cannot compute the current schema plan/i.test(`${outcome.stdoutTail}\n${outcome.stderrTail}`)) {
2849
+ throw new Error('Cannot check schema-plan drift: the CLI refused to compute the current plan, so nothing about the model was '
2850
+ + `asked. This is NOT drift. ${outcome.stderrTail.trim() || outcome.stdoutTail.trim()}`);
2851
+ }
2852
+ return outcome;
2853
+ }
1226
2854
  /**
1227
2855
  * Run a resolved verification plan set and return one outcome per check.
1228
2856
  *
@@ -1238,6 +2866,7 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1238
2866
  */
1239
2867
  async executeVerificationPlans(plans) {
1240
2868
  const verification = [];
2869
+ const unrunCheckRefs = [];
1241
2870
  let infrastructureError = null;
1242
2871
  for (const plan of plans) {
1243
2872
  try {
@@ -1250,11 +2879,15 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1250
2879
  ? await this.runForeignKeyResolutionVerification()
1251
2880
  : plan.kind === VerificationKind.SETTINGS_PLACEMENT_CONTENT
1252
2881
  ? await this.runSettingsPlacementContentVerification()
1253
- : await this.runVerification(this.buildVerificationPlan(plan.kind, plan.path ?? undefined)),
2882
+ : plan.kind === VerificationKind.SCHEMA_PLAN_DRIFT
2883
+ ? await this.runSchemaPlanDriftVerification()
2884
+ : this.absentWorkspacePackageOutcome(plan)
2885
+ ?? await this.runVerification(this.buildVerificationPlan(plan.kind, plan.path ?? undefined)),
1254
2886
  });
1255
2887
  }
1256
2888
  catch (error) {
1257
2889
  infrastructureError ??= error;
2890
+ unrunCheckRefs.push(plan.checkRef);
1258
2891
  verification.push({
1259
2892
  checkRef: plan.checkRef,
1260
2893
  outcome: {
@@ -1268,7 +2901,7 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1268
2901
  });
1269
2902
  }
1270
2903
  }
1271
- return { verification, infrastructureError };
2904
+ return { verification, infrastructureError, unrunCheckRefs };
1272
2905
  }
1273
2906
  /**
1274
2907
  * Run named verification checks against the application, outside any agent dispatch.
@@ -1284,6 +2917,33 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1284
2917
  async runApplicationVerificationChecks(checkRefs) {
1285
2918
  return this.executeVerificationPlans(resolveApplicationCodingTaskVerificationPlans(checkRefs));
1286
2919
  }
2920
+ /**
2921
+ * A typecheck of a workspace package the application does not have answers "nothing to check" (#1540).
2922
+ *
2923
+ * Required checks are derived from the paths a task may write, so a provider binding that may write
2924
+ * `website/src/provider-contributions.ts` owes the website typecheck, in every application, including
2925
+ * one with no website. Running `tsc` in a directory that is not a package would fail the task over a
2926
+ * package that does not exist. The honest answer is the one the settings sweep gives when no rail is
2927
+ * authored: checked, and nothing was there to check. That is stated in the outcome, never a silent pass.
2928
+ *
2929
+ * A package is its `package.json`. A directory holding one stray file, with no manifest, is not a
2930
+ * package that any typecheck could run in.
2931
+ */
2932
+ absentWorkspacePackageOutcome(plan) {
2933
+ if (plan.kind !== VerificationKind.TYPECHECK || plan.path === null)
2934
+ return undefined;
2935
+ const packageDirectory = this.sanitizeRelativePath(plan.path);
2936
+ if (existsSync(join(this.companionContext.saasRoot, packageDirectory, 'package.json')))
2937
+ return undefined;
2938
+ return {
2939
+ kind: plan.kind,
2940
+ path: plan.path,
2941
+ success: true,
2942
+ message: `no ${packageDirectory} package in this application — nothing to typecheck`,
2943
+ stdoutTail: '',
2944
+ stderrTail: '',
2945
+ };
2946
+ }
1287
2947
  async runVerification(plan) {
1288
2948
  try {
1289
2949
  const result = await executeBoundedSubprocess({
@@ -1334,6 +2994,8 @@ let CodingAgentDispatchCompanionService = class CodingAgentDispatchCompanionServ
1334
2994
  context: {
1335
2995
  message,
1336
2996
  validationError: describeCaughtError(error),
2997
+ // The task's own contract was refused: a dispatcher counts this as its attempt (#1581).
2998
+ [APPLICATION_CODING_CONTRACT_REFUSAL_MARKER]: true,
1337
2999
  },
1338
3000
  });
1339
3001
  }
@@ -1496,12 +3158,18 @@ CodingAgentDispatchCompanionService = __decorate([
1496
3158
  __param(5, inject(COMPANION_SERVICE_TYPES.ExecutionsService)),
1497
3159
  __param(6, inject(COMPANION_SERVICE_TYPES.TraceabilityService)),
1498
3160
  __param(7, inject(COMPANION_SERVICE_TYPES.IntrospectionService)),
3161
+ __param(8, inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService)),
3162
+ __param(9, inject(COMPANION_SERVICE_TYPES.CodingRunWriteRegisterService)),
3163
+ __param(10, inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService)),
1499
3164
  __metadata("design:paramtypes", [LoggerService,
1500
3165
  ErrorBuilderBackendService, Object, AgentsBackendService,
1501
3166
  GitChangeSetCompanionService,
1502
3167
  CompanionExecutionsCompanionService,
1503
3168
  CompanionTraceabilityService,
1504
- CompanionIntrospectionService])
3169
+ CompanionIntrospectionService,
3170
+ ActorsSystemBackendService,
3171
+ CodingRunWriteRegisterCompanionService,
3172
+ AcceptedChangeCommitCompanionService])
1505
3173
  ], CodingAgentDispatchCompanionService);
1506
3174
  export { CodingAgentDispatchCompanionService };
1507
3175
  /**