@wildo-ai/dev-companion 1.1.12 → 1.1.14

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 (313) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +21 -0
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +37 -4
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  7. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +9 -2
  8. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  9. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +66 -0
  10. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  11. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +191 -13
  12. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  13. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +6 -2
  14. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  15. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +16 -39
  16. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  17. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
  18. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  19. package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
  20. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  21. package/dist/esm/companion-api/companion-api.schemas.js +8 -0
  22. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  23. package/dist/esm/companion-api/controllers/companion.controller.d.ts +13 -0
  24. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  25. package/dist/esm/companion-api/controllers/companion.controller.js +39 -13
  26. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  27. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
  28. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
  29. package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
  30. package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
  31. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
  32. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  33. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +19 -0
  34. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  35. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  36. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +7 -1
  37. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  38. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +5 -1
  39. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -1
  40. package/dist/esm/core/introspection/resources/launch-blockers.companion.js +37 -4
  41. package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -1
  42. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +14 -0
  43. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  44. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +48 -0
  45. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  46. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts +128 -0
  47. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts.map +1 -0
  48. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js +180 -0
  49. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js.map +1 -0
  50. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
  51. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  52. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
  53. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  54. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
  55. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
  56. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
  57. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
  58. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts +9 -0
  59. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts.map +1 -1
  60. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js +25 -3
  61. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js.map +1 -1
  62. package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
  63. package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
  64. package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
  65. package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
  66. package/dist/esm/core/runtime/restart-drain.companion.d.ts +107 -0
  67. package/dist/esm/core/runtime/restart-drain.companion.d.ts.map +1 -0
  68. package/dist/esm/core/runtime/restart-drain.companion.js +237 -0
  69. package/dist/esm/core/runtime/restart-drain.companion.js.map +1 -0
  70. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  71. package/dist/esm/core/runtime/services/start-companion-application.service.js +3 -2
  72. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  73. package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
  74. package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
  75. package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
  76. package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
  77. package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
  78. package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
  79. package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
  80. package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
  81. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
  82. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  83. package/dist/esm/executions/services/companion-executions.companion.service.js +34 -8
  84. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  85. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
  86. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
  87. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
  88. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
  89. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
  90. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
  91. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
  92. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
  93. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
  94. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  95. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
  96. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  97. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
  98. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
  99. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
  100. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
  101. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
  102. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
  103. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
  104. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
  105. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
  106. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
  107. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
  108. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
  109. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
  110. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
  111. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
  112. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
  113. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
  114. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
  115. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
  116. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
  117. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
  118. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  119. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
  120. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  121. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
  122. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
  123. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
  124. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
  125. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
  126. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  127. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
  128. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  129. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
  130. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
  131. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
  132. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
  133. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
  134. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  135. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
  136. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  137. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
  138. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
  139. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
  140. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
  141. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
  142. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  143. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
  144. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  145. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
  146. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
  147. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
  148. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
  149. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
  150. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
  151. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  152. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
  153. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
  154. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
  155. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
  156. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  157. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
  158. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  159. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
  160. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
  161. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
  162. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
  163. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
  164. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  165. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
  166. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  167. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
  168. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
  169. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
  170. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
  171. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
  172. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
  173. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
  174. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
  175. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
  176. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
  177. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
  178. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
  179. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
  180. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
  181. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
  182. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
  183. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
  184. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
  185. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
  186. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
  187. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
  188. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
  189. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
  190. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
  191. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
  192. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
  193. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
  194. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
  195. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
  196. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
  197. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
  198. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
  199. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
  200. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
  201. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
  202. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
  203. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
  204. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
  205. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
  206. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
  207. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
  208. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
  209. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +40 -0
  210. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  211. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +13 -0
  212. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  213. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +40 -0
  214. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
  215. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +40 -0
  216. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
  217. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +5 -0
  218. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  219. package/dist/esm/i18n/system_enums/application-creation.en.js +6 -0
  220. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  221. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +175 -170
  222. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts.map +1 -1
  223. package/dist/esm/i18n/system_enums/application-creation.fr.js +175 -170
  224. package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
  225. package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
  226. package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
  227. package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
  228. package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
  229. package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
  230. package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
  231. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -0
  232. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
  233. package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -0
  234. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  235. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
  236. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
  237. package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
  238. package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
  239. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
  240. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
  241. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
  242. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
  243. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
  244. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
  245. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
  246. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
  247. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
  248. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
  249. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
  250. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
  251. package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
  252. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
  253. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
  254. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
  255. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
  256. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
  257. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -1
  258. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  259. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +3 -4
  260. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  261. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
  262. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  263. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
  264. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  265. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +5 -1
  266. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  267. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +5 -1
  268. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  269. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +12 -0
  270. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  271. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +9 -0
  272. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  273. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +200 -20
  274. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  275. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +1107 -230
  276. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  277. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +158 -16
  278. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  279. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +381 -46
  280. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  281. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +58 -0
  282. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  283. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +116 -2
  284. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  285. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
  286. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
  287. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
  288. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
  289. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
  290. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
  291. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
  292. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +12 -0
  293. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  294. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +31 -7
  295. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  296. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
  297. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
  298. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
  299. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +2 -2
  300. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  301. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +10 -8
  302. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  303. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  304. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
  305. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  306. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
  307. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
  308. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
  309. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +68 -3
  310. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  311. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +281 -69
  312. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  313. package/package.json +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"creation-intervention-ledger.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-intervention-ledger.companion.service.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAa,KAAK,sCAAsC,EAAE,MAAM,uEAAuE,CAAC;AAC/I,OAAO,EAAmB,KAAK,wCAAwC,EAAE,MAAM,iDAAiD,CAAC;AAEj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,CAAC,aAAa,EAAE,SAAS,+BAA+B,EAAE,CAAC;QACnE,oHAAoH;QACpH,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC;QACvF,uHAAuH;QACvH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,aAAa,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAwChH,2GAA2G;YAC7F,cAAc;IAwB5B;;;;OAIG;YACW,yBAAyB;IA4BvC,0EAA0E;YAC5D,sBAAsB;IAmBpC;;;;;OAKG;YACW,mBAAmB;IASjC,2HAA2H;IAC3H,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA6B;YAEnD,OAAO;YAKP,GAAG;IAOjB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,WAAW;CAGpB"}
1
+ {"version":3,"file":"creation-intervention-ledger.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-intervention-ledger.companion.service.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAa,KAAK,sCAAsC,EAAE,MAAM,uEAAuE,CAAC;AAC/I,OAAO,EAAmB,KAAK,wCAAwC,EAAE,MAAM,iDAAiD,CAAC;AAEjI,OAAO,EAQL,KAAK,+BAA+B,EAEpC,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,qBAAqB,EAE3B,MAAM,wCAAwC,CAAC;AAsBhD,4GAA4G;AAC5G,qBAAa,iCAAkC,SAAQ,KAAK;aACvB,cAAc,EAAE,MAAM;gBAAtB,cAAc,EAAE,MAAM;CA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AE,QAAQ,CAAC,aAAa,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAwChH,2GAA2G;YAC7F,cAAc;IAwB5B;;;;OAIG;YACW,yBAAyB;IA4BvC,0EAA0E;YAC5D,sBAAsB;IAmBpC;;;;;OAKG;YACW,mBAAmB;IASjC,2HAA2H;IAC3H,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA6B;YAEnD,OAAO;YAMP,GAAG;IAOjB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,WAAW;CAGpB"}
@@ -10,10 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
- import { execFile } from 'node:child_process';
14
13
  import { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';
15
14
  import * as path from 'node:path';
16
- import { promisify } from 'node:util';
17
15
  import { inject, injectable } from 'inversify';
18
16
  import { z } from 'zod';
19
17
  import { SAAS_SERVICE_TYPES, describeCaughtError } from '@wildo-ai/saas-backend-lib';
@@ -22,7 +20,7 @@ import { sha256Hex } from '../../claude-cli/services/coding-run-write-register.c
22
20
  import { writtenSha256Of } from './playbook-run-write-register.companion.service.js';
23
21
  import { OPERATOR_BUILD_TASK_REARM_REASONS } from '@wildo-ai/platform-core-shared';
24
22
  import { CREATION_BUILD_LANE, applyStatedReasons, classifyCommitAsIntervention, classifyWorkingTreeEdits, deriveBuildAttemptInterventions, deriveRestartIntervention, deriveRevertInterventions, } from '../models/creation-intervention.models.js';
25
- const execFileAsync = promisify(execFile);
23
+ import { gitReadBroker } from '../../core/utils/git-read-broker.companion.js';
26
24
  /** Git may only be READ here: the ledger observes the history, it never writes it. */
27
25
  const READ_ONLY_GIT_SUBCOMMANDS = new Set(['log', 'show', 'status', 'rev-parse']);
28
26
  const GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
@@ -277,14 +275,15 @@ let CreationInterventionLedgerCompanionService = class CreationInterventionLedge
277
275
  /** `<commit>:<path>` → the sha-256 of its bytes. Immutable, so never invalidated; bounded by the run's commits × files. */
278
276
  committedBlobHashes = new Map();
279
277
  async gitBlob(object) {
280
- const { stdout } = await execFileAsync('git', ['-C', this.companionContext.saasRoot, 'show', object], { encoding: 'buffer', maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });
278
+ // Through the git read helper (#3204): forking `git` from the companion's 2 GB process blocked its event loop.
279
+ const { stdout } = await gitReadBroker.execGitBuffer(['-C', this.companionContext.saasRoot, 'show', object], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });
281
280
  return stdout;
282
281
  }
283
282
  async git(args) {
284
283
  if (!READ_ONLY_GIT_SUBCOMMANDS.has(args[0] ?? ''))
285
284
  throw new Error(`git ${args[0]} is outside the intervention ledger's read-only set`);
286
285
  // `core.quotePath=false`: a quoted non-ASCII path would never match the registers' (#2231 review F13).
287
- const { stdout } = await execFileAsync('git', ['-C', this.companionContext.saasRoot, '-c', 'core.quotePath=false', ...args], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });
286
+ const { stdout } = await gitReadBroker.execGit(['-C', this.companionContext.saasRoot, '-c', 'core.quotePath=false', ...args], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });
288
287
  return { stdout };
289
288
  }
290
289
  interventionsDirectory() {
@@ -1 +1 @@
1
- {"version":3,"file":"creation-intervention-ledger.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-intervention-ledger.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAA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,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;;GAPvD,0CAA0C,CA8OtD","sourcesContent":["import { execFile } from 'node:child_process';\nimport { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';\nimport * as path from 'node:path';\nimport { promisify } from 'node:util';\n\nimport { inject, injectable } from 'inversify';\nimport { z } from 'zod';\n\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError } from '@wildo-ai/saas-backend-lib';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { sha256Hex, type CodingRunWriteRegisterCompanionService } from '../../claude-cli/services/coding-run-write-register.companion.service';\nimport { writtenSha256Of, type PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { OPERATOR_BUILD_TASK_REARM_REASONS } from '@wildo-ai/platform-core-shared';\nimport {\n CREATION_BUILD_LANE,\n applyStatedReasons,\n classifyCommitAsIntervention,\n classifyWorkingTreeEdits,\n deriveBuildAttemptInterventions,\n deriveRestartIntervention,\n deriveRevertInterventions,\n type CreationBuildAttemptObservation,\n type CreationCommitObservation,\n type CreationIntervention,\n type CreationInterruptedPlaybookExecution,\n type CreationRestartRecord,\n type CreationRunFootprint,\n} from '../models/creation-intervention.models';\n\nconst execFileAsync = promisify(execFile);\n\n/** Git may only be READ here: the ledger observes the history, it never writes it. */\nconst READ_ONLY_GIT_SUBCOMMANDS = new Set(['log', 'show', 'status', 'rev-parse']);\nconst GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;\nconst GIT_TIMEOUT_MS = 60_000;\n/** The separators the commit query's `--format` emits: a commit's start, and the end of its header. */\nconst COMMIT_MARK = '\\x1e';\nconst HEADER_END = '\\x1d';\nconst FIELD = '\\x1f';\n\nconst CreationRestartRecordSchema = z.strictObject({\n bootAt: z.string().min(1),\n codingTaskIds: z.array(z.string().min(1)),\n playbookExecutionIds: z.array(z.string().min(1)),\n generationExecutionIds: z.array(z.string().min(1)),\n});\n\nconst StatedReasonsSchema = z.record(z.string().min(1), z.strictObject({ reason: z.string().min(1), statedAt: z.string().min(1) }));\n\n/** Refused: a reason was stated for an id no current derivation produces, so it would attach to nothing. */\nexport class CreationInterventionNotFoundError extends Error {\n public constructor(public readonly interventionId: string) {\n super(`No intervention \"${interventionId}\" in this creation run. List them with \\`wildo creation report\\`.`);\n }\n}\n\n/**\n * The companion half of the INTERVENTION LEDGER (#2231). The derivations are in\n * `creation-intervention.models.ts`; this gathers what they read and keeps the two facts no later read can\n * recover — each restart (`recordRestart`, called by the boot) and each reason a person states.\n *\n * Deliberately light: the boot path injects it, so it depends on the two write registers and the context\n * only. The run rows it also needs (build attempts, playbook executions) are handed in by the report.\n *\n * Everything it stores is under `.wildo-saas/state/meta-workflows/interventions/`, throwaway like the rest of\n * that tree: deleting it loses the restarts and the stated reasons, which is time, and nothing the lane\n * reads, because nothing in the lane reads it.\n */\n@injectable()\nexport class CreationInterventionLedgerCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingRunWriteRegisterService) private readonly codingRunWrites: CodingRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly playbookRunWrites: PlaybookRunWriteRegisterCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('CreationInterventionLedger');\n }\n\n /**\n * Record a boot that found runs in flight — a restart, as `deriveRestartIntervention` counts it. Called by\n * the boot right after its reconciliation, with what that reconciliation settled. A boot that found\n * nothing writes nothing: an ordinary start is no intervention. Never throws: a boot must not fail on a\n * report (`continuity-drift-and-cas-basis.md`, Rule 3).\n */\n public async recordRestart(record: CreationRestartRecord): Promise<void> {\n if (record.codingTaskIds.length + record.playbookExecutionIds.length + record.generationExecutionIds.length === 0) return;\n try {\n const parsed = CreationRestartRecordSchema.parse(record);\n await mkdir(this.restartsDirectory(), { recursive: true });\n await writeFile(path.join(this.restartsDirectory(), `${parsed.bootAt.replace(/[^0-9A-Za-z-]/g, '-')}.json`), `${JSON.stringify(parsed, null, 2)}\\n`, 'utf8');\n } catch (error) {\n this.logger.warn('Could not record the restart in the intervention ledger; the run report will not count it.', { error: describeCaughtError(error) });\n }\n }\n\n /** Every recorded restart, oldest first. An unreadable record is skipped, as the registers skip theirs. */\n public async listRestarts(): Promise<readonly CreationRestartRecord[]> {\n const entries = await readdir(this.restartsDirectory()).catch((error: NodeJS.ErrnoException) => {\n if (error?.code === 'ENOENT') return [] as string[];\n throw error;\n });\n const restarts: CreationRestartRecord[] = [];\n for (const entry of entries.filter((name) => name.endsWith('.json'))) {\n try {\n restarts.push(CreationRestartRecordSchema.parse(JSON.parse(await readFile(path.join(this.restartsDirectory(), entry), 'utf8'))));\n } catch {\n this.logDebug('Skipping unreadable restart record', { entry });\n }\n }\n return restarts.sort((left, right) => left.bootAt.localeCompare(right.bootAt));\n }\n\n /** The reasons people stated, by intervention id. */\n public async readStatedReasons(): Promise<Readonly<Record<string, { readonly reason: string; readonly statedAt: string }>>> {\n try {\n return StatedReasonsSchema.parse(JSON.parse(await readFile(this.reasonsPath(), 'utf8')));\n } catch (error) {\n if ((error as NodeJS.ErrnoException)?.code !== 'ENOENT') this.logDebug('Stated reasons unreadable; reading none', { error: String(error) });\n return {};\n }\n }\n\n /**\n * Record why a person intervened — the one thing the ledger asks of anyone. `knownIds` is the current\n * derivation's ids: a reason for an id nothing produces would attach to nothing, so it is refused.\n */\n public async stateReason(interventionId: string, reason: string, knownIds: ReadonlySet<string>): Promise<{ readonly interventionId: string; readonly statedAt: string }> {\n if (!knownIds.has(interventionId)) throw new CreationInterventionNotFoundError(interventionId);\n const statedAt = new Date().toISOString();\n const reasons = { ...(await this.readStatedReasons()), [interventionId]: { reason: reason.trim(), statedAt } };\n await mkdir(path.dirname(this.reasonsPath()), { recursive: true });\n await writeFile(this.reasonsPath(), `${JSON.stringify(StatedReasonsSchema.parse(reasons), null, 2)}\\n`, 'utf8');\n return { interventionId, statedAt };\n }\n\n /**\n * Every intervention of the run, oldest first, with the reasons stated so far — and what could not be\n * checked, said rather than silently left out.\n */\n public async deriveInterventions(input: {\n readonly buildAttempts: readonly CreationBuildAttemptObservation[];\n /** Every meta-workflows execution the report read, by id: its lane, and its root when it is a composite's child. */\n readonly playbookExecutions: ReadonlyMap<string, CreationInterruptedPlaybookExecution>;\n /** A run is in flight: the working tree then holds writes no record names yet, so uncommitted edits are not judged. */\n readonly runsInFlight: number;\n }): Promise<{ readonly interventions: readonly CreationIntervention[]; readonly notChecked: readonly string[] }> {\n const notChecked: string[] = [];\n const footprints = await this.readFootprints();\n const codingTaskRefById = new Map(input.buildAttempts.map((attempt) => [attempt.runTaskId, attempt.taskRef] as const));\n for (const record of await this.codingRunWrites.list()) codingTaskRefById.set(record.taskId, record.taskRef);\n\n const reverts = await this.playbookRunWrites.listReverts();\n const recordedRunIds = new Set((await this.playbookRunWrites.list()).map((record) => record.runId));\n // A fully reverted run's record is gone; its marker keeps its footprint. Only a marker from before that cannot.\n const unrecorded = new Set(reverts.filter((revert) => !recordedRunIds.has(revert.runId) && revert.runFootprint === undefined).map((revert) => revert.runId));\n if (unrecorded.size > 0) {\n notChecked.push(`${unrecorded.size} reverted playbook run(s) no longer have a write record, so commits of their files made before the revert are not attributed`);\n }\n const derived: CreationIntervention[] = [\n ...deriveBuildAttemptInterventions(input.buildAttempts, OPERATOR_BUILD_TASK_REARM_REASONS),\n ...deriveRevertInterventions(reverts),\n ...(await this.listRestarts()).map((restart) => deriveRestartIntervention(restart, {\n codingTaskRef: (taskId) => codingTaskRefById.get(taskId),\n playbookExecution: (executionId) => input.playbookExecutions.get(executionId),\n })),\n ];\n try {\n derived.push(...await this.deriveCommitInterventions(footprints));\n } catch (error) {\n notChecked.push(`commits: git could not be read (${describeCaughtError(error)}), so no manual commit or committed hand edit is counted`);\n }\n if (input.runsInFlight > 0) {\n notChecked.push(`uncommitted hand edits: ${input.runsInFlight} run(s) in flight are writing files no record names yet; read the report again once they settle`);\n } else {\n try {\n derived.push(...await this.deriveWorkingTreeEdits(footprints));\n } catch (error) {\n notChecked.push(`uncommitted hand edits: the working tree could not be read (${describeCaughtError(error)})`);\n }\n }\n const interventions = applyStatedReasons(derived, await this.readStatedReasons())\n .sort((left, right) => left.at.localeCompare(right.at) || left.id.localeCompare(right.id));\n return { interventions, notChecked };\n }\n\n /** What each recorded run wrote: coding runs from their change-set register, playbook runs from theirs. */\n private async readFootprints(): Promise<CreationRunFootprint[]> {\n const coding = (await this.codingRunWrites.list()).map((record) => ({\n target: { lane: CREATION_BUILD_LANE, task: record.taskRef },\n at: record.at,\n files: new Map(record.files.map((file) => [file.path, file.contentSha256 ?? null] as const)),\n }));\n const playbook = (await this.playbookRunWrites.list()).map((record) => ({\n target: { lane: record.playbookRef, task: record.runId },\n at: record.at,\n files: new Map(record.files.map((file) => [file.path, writtenSha256Of(file)] as const)),\n }));\n /*\n * A REVERTED run still wrote what it wrote: a commit of those files before the revert is still a person's\n * commit of that run's work. Its marker keeps the footprint the revert deleted from the register.\n */\n const reverted = (await this.playbookRunWrites.listReverts()).flatMap((revert) => (revert.runFootprint ? [{\n target: { lane: revert.playbookRef, task: revert.runId },\n at: revert.runFootprint.runAt,\n files: new Map(revert.runFootprint.writtenFiles.map((file) => [file.path, file.sha256] as const)),\n until: revert.at,\n }] : []));\n return [...coding, ...playbook, ...reverted];\n }\n\n /**\n * Every non-merge commit since the first recorded run, each with the bytes of the run-owned paths it\n * touched. Only those paths are hashed: a commit of nothing a run wrote is a person's own work beside the\n * lane, and `classifyCommitAsIntervention` would discard it anyway.\n */\n private async deriveCommitInterventions(footprints: readonly CreationRunFootprint[]): Promise<CreationIntervention[]> {\n if (footprints.length === 0) return [];\n const since = footprints.reduce((earliest, footprint) => (footprint.at < earliest ? footprint.at : earliest), footprints[0]!.at);\n // `--relative`: the registers hold APP-relative paths, and an application nested in its repository (every\n // `examples/*` dogfood app) would otherwise match none of them and read as needing nobody (#2231 review F3).\n const { stdout } = await this.git(['log', '--relative', '--no-merges', '--no-renames', '--name-status', `--since=${since}`,\n `--format=${COMMIT_MARK}%H${FIELD}%cI${FIELD}%an${FIELD}%s${FIELD}%b${HEADER_END}`]);\n const interventions: CreationIntervention[] = [];\n for (const chunk of stdout.split(COMMIT_MARK).filter((entry) => entry.trim().length > 0)) {\n const [header, changes = ''] = chunk.split(HEADER_END);\n const [sha, committedAt, authorName, subject, body = ''] = (header ?? '').split(FIELD);\n if (!sha || !committedAt || authorName === undefined || subject === undefined) continue;\n // `%cI` carries the committer's offset and the registers write UTC: compared as text, they must agree.\n const at = new Date(committedAt).toISOString();\n const files: { path: string; sha256: string | null }[] = [];\n for (const line of changes.split('\\n').filter((entry) => entry.includes('\\t'))) {\n const [status, filePath] = line.split('\\t');\n // Any footprint that ever held the path makes it worth hashing; ownership at this instant is decided with the bytes.\n if (!status || !filePath || !footprints.some((footprint) => footprint.files.has(filePath) && footprint.at <= at)) continue;\n files.push({ path: filePath, sha256: status.startsWith('D') ? null : await this.committedBlobSha256(sha, filePath) });\n }\n const observation: CreationCommitObservation = { sha, at, authorName, subject, body, files };\n const intervention = classifyCommitAsIntervention(observation, footprints);\n if (intervention) interventions.push(intervention);\n }\n return interventions;\n }\n\n /** Dirty run-owned files whose bytes are neither the run's nor HEAD's. */\n private async deriveWorkingTreeEdits(footprints: readonly CreationRunFootprint[]): Promise<CreationIntervention[]> {\n if (footprints.length === 0) return [];\n const owned = new Set(footprints.flatMap((footprint) => [...footprint.files.keys()]));\n // Porcelain paths are relative to the REPOSITORY root whatever the working directory; the app's prefix is stripped.\n const prefix = (await this.git(['rev-parse', '--show-prefix'])).stdout.trim();\n const { stdout } = await this.git(['status', '--porcelain=v1', '-z', '--untracked-files=all', '--no-renames', '--', '.']);\n const dirty: { path: string; sha256: string | null; headSha256: string | null }[] = [];\n for (const entry of stdout.split('\\0').filter((line) => line.length > 3)) {\n const repositoryPath = entry.slice(3);\n if (!repositoryPath.startsWith(prefix)) continue;\n const filePath = repositoryPath.slice(prefix.length);\n if (!owned.has(filePath)) continue;\n const current = await readFile(path.resolve(this.companionContext.saasRoot, filePath)).catch(() => undefined);\n const head = await this.gitBlob(`HEAD:./${filePath}`).catch(() => undefined);\n dirty.push({ path: filePath, sha256: current === undefined ? null : sha256Hex(current), headSha256: head === undefined ? null : sha256Hex(head) });\n }\n return classifyWorkingTreeEdits(dirty, footprints, new Date().toISOString());\n }\n\n /**\n * The hash of a file as one commit holds it, read once per companion (#3204). A commit's content never changes, so the\n * answer is held for good. Every report re-reads every commit since the run began, and asked `git show` for each\n * run-owned file of each of them: on reference run 42523477847 that was a spawn per (commit, file) on every read, the\n * companion's largest remaining CPU cost during the build (8% of samples) while the creation drive asked repeatedly.\n */\n private async committedBlobSha256(commitSha: string, filePath: string): Promise<string> {\n const key = `${commitSha}:${filePath}`;\n const held = this.committedBlobHashes.get(key);\n if (held !== undefined) return held;\n const hashed = sha256Hex(await this.gitBlob(`${commitSha}:./${filePath}`));\n this.committedBlobHashes.set(key, hashed);\n return hashed;\n }\n\n /** `<commit>:<path>` → the sha-256 of its bytes. Immutable, so never invalidated; bounded by the run's commits × files. */\n private readonly committedBlobHashes = new Map<string, string>();\n\n private async gitBlob(object: string): Promise<Buffer> {\n const { stdout } = await execFileAsync('git', ['-C', this.companionContext.saasRoot, 'show', object], { encoding: 'buffer', maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });\n return stdout;\n }\n\n private async git(args: string[]): Promise<{ stdout: string }> {\n if (!READ_ONLY_GIT_SUBCOMMANDS.has(args[0] ?? '')) throw new Error(`git ${args[0]} is outside the intervention ledger's read-only set`);\n // `core.quotePath=false`: a quoted non-ASCII path would never match the registers' (#2231 review F13).\n const { stdout } = await execFileAsync('git', ['-C', this.companionContext.saasRoot, '-c', 'core.quotePath=false', ...args], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });\n return { stdout };\n }\n\n private interventionsDirectory(): string {\n return path.resolve(this.companionContext.saasRoot, '.wildo-saas/state/meta-workflows/interventions');\n }\n\n private restartsDirectory(): string {\n return path.join(this.interventionsDirectory(), 'restarts');\n }\n\n private reasonsPath(): string {\n return path.join(this.interventionsDirectory(), 'reasons.json');\n }\n}\n"]}
1
+ {"version":3,"file":"creation-intervention-ledger.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-intervention-ledger.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,SAAS,EAA+C,MAAM,uEAAuE,CAAC;AAC/I,OAAO,EAAE,eAAe,EAAiD,MAAM,iDAAiD,CAAC;AACjI,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,GAO1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAG3E,sFAAsF;AACtF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,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BAAsB,EAAE,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAEO,WAAW;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,cAAc,CAAC,CAAC;IAClE,CAAC;CACF,CAAA;AA/OY,0CAA0C;IADtD,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,6BAA6B,CAAC,CAAA;IAC7D,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;;GAPvD,0CAA0C,CA+OtD","sourcesContent":["import { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';\nimport * as path from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport { z } from 'zod';\n\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError } from '@wildo-ai/saas-backend-lib';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { sha256Hex, type CodingRunWriteRegisterCompanionService } from '../../claude-cli/services/coding-run-write-register.companion.service';\nimport { writtenSha256Of, type PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { OPERATOR_BUILD_TASK_REARM_REASONS } from '@wildo-ai/platform-core-shared';\nimport {\n CREATION_BUILD_LANE,\n applyStatedReasons,\n classifyCommitAsIntervention,\n classifyWorkingTreeEdits,\n deriveBuildAttemptInterventions,\n deriveRestartIntervention,\n deriveRevertInterventions,\n type CreationBuildAttemptObservation,\n type CreationCommitObservation,\n type CreationIntervention,\n type CreationInterruptedPlaybookExecution,\n type CreationRestartRecord,\n type CreationRunFootprint,\n} from '../models/creation-intervention.models';\nimport { gitReadBroker } from '../../core/utils/git-read-broker.companion';\n\n\n/** Git may only be READ here: the ledger observes the history, it never writes it. */\nconst READ_ONLY_GIT_SUBCOMMANDS = new Set(['log', 'show', 'status', 'rev-parse']);\nconst GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;\nconst GIT_TIMEOUT_MS = 60_000;\n/** The separators the commit query's `--format` emits: a commit's start, and the end of its header. */\nconst COMMIT_MARK = '\\x1e';\nconst HEADER_END = '\\x1d';\nconst FIELD = '\\x1f';\n\nconst CreationRestartRecordSchema = z.strictObject({\n bootAt: z.string().min(1),\n codingTaskIds: z.array(z.string().min(1)),\n playbookExecutionIds: z.array(z.string().min(1)),\n generationExecutionIds: z.array(z.string().min(1)),\n});\n\nconst StatedReasonsSchema = z.record(z.string().min(1), z.strictObject({ reason: z.string().min(1), statedAt: z.string().min(1) }));\n\n/** Refused: a reason was stated for an id no current derivation produces, so it would attach to nothing. */\nexport class CreationInterventionNotFoundError extends Error {\n public constructor(public readonly interventionId: string) {\n super(`No intervention \"${interventionId}\" in this creation run. List them with \\`wildo creation report\\`.`);\n }\n}\n\n/**\n * The companion half of the INTERVENTION LEDGER (#2231). The derivations are in\n * `creation-intervention.models.ts`; this gathers what they read and keeps the two facts no later read can\n * recover — each restart (`recordRestart`, called by the boot) and each reason a person states.\n *\n * Deliberately light: the boot path injects it, so it depends on the two write registers and the context\n * only. The run rows it also needs (build attempts, playbook executions) are handed in by the report.\n *\n * Everything it stores is under `.wildo-saas/state/meta-workflows/interventions/`, throwaway like the rest of\n * that tree: deleting it loses the restarts and the stated reasons, which is time, and nothing the lane\n * reads, because nothing in the lane reads it.\n */\n@injectable()\nexport class CreationInterventionLedgerCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingRunWriteRegisterService) private readonly codingRunWrites: CodingRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly playbookRunWrites: PlaybookRunWriteRegisterCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('CreationInterventionLedger');\n }\n\n /**\n * Record a boot that found runs in flight — a restart, as `deriveRestartIntervention` counts it. Called by\n * the boot right after its reconciliation, with what that reconciliation settled. A boot that found\n * nothing writes nothing: an ordinary start is no intervention. Never throws: a boot must not fail on a\n * report (`continuity-drift-and-cas-basis.md`, Rule 3).\n */\n public async recordRestart(record: CreationRestartRecord): Promise<void> {\n if (record.codingTaskIds.length + record.playbookExecutionIds.length + record.generationExecutionIds.length === 0) return;\n try {\n const parsed = CreationRestartRecordSchema.parse(record);\n await mkdir(this.restartsDirectory(), { recursive: true });\n await writeFile(path.join(this.restartsDirectory(), `${parsed.bootAt.replace(/[^0-9A-Za-z-]/g, '-')}.json`), `${JSON.stringify(parsed, null, 2)}\\n`, 'utf8');\n } catch (error) {\n this.logger.warn('Could not record the restart in the intervention ledger; the run report will not count it.', { error: describeCaughtError(error) });\n }\n }\n\n /** Every recorded restart, oldest first. An unreadable record is skipped, as the registers skip theirs. */\n public async listRestarts(): Promise<readonly CreationRestartRecord[]> {\n const entries = await readdir(this.restartsDirectory()).catch((error: NodeJS.ErrnoException) => {\n if (error?.code === 'ENOENT') return [] as string[];\n throw error;\n });\n const restarts: CreationRestartRecord[] = [];\n for (const entry of entries.filter((name) => name.endsWith('.json'))) {\n try {\n restarts.push(CreationRestartRecordSchema.parse(JSON.parse(await readFile(path.join(this.restartsDirectory(), entry), 'utf8'))));\n } catch {\n this.logDebug('Skipping unreadable restart record', { entry });\n }\n }\n return restarts.sort((left, right) => left.bootAt.localeCompare(right.bootAt));\n }\n\n /** The reasons people stated, by intervention id. */\n public async readStatedReasons(): Promise<Readonly<Record<string, { readonly reason: string; readonly statedAt: string }>>> {\n try {\n return StatedReasonsSchema.parse(JSON.parse(await readFile(this.reasonsPath(), 'utf8')));\n } catch (error) {\n if ((error as NodeJS.ErrnoException)?.code !== 'ENOENT') this.logDebug('Stated reasons unreadable; reading none', { error: String(error) });\n return {};\n }\n }\n\n /**\n * Record why a person intervened — the one thing the ledger asks of anyone. `knownIds` is the current\n * derivation's ids: a reason for an id nothing produces would attach to nothing, so it is refused.\n */\n public async stateReason(interventionId: string, reason: string, knownIds: ReadonlySet<string>): Promise<{ readonly interventionId: string; readonly statedAt: string }> {\n if (!knownIds.has(interventionId)) throw new CreationInterventionNotFoundError(interventionId);\n const statedAt = new Date().toISOString();\n const reasons = { ...(await this.readStatedReasons()), [interventionId]: { reason: reason.trim(), statedAt } };\n await mkdir(path.dirname(this.reasonsPath()), { recursive: true });\n await writeFile(this.reasonsPath(), `${JSON.stringify(StatedReasonsSchema.parse(reasons), null, 2)}\\n`, 'utf8');\n return { interventionId, statedAt };\n }\n\n /**\n * Every intervention of the run, oldest first, with the reasons stated so far — and what could not be\n * checked, said rather than silently left out.\n */\n public async deriveInterventions(input: {\n readonly buildAttempts: readonly CreationBuildAttemptObservation[];\n /** Every meta-workflows execution the report read, by id: its lane, and its root when it is a composite's child. */\n readonly playbookExecutions: ReadonlyMap<string, CreationInterruptedPlaybookExecution>;\n /** A run is in flight: the working tree then holds writes no record names yet, so uncommitted edits are not judged. */\n readonly runsInFlight: number;\n }): Promise<{ readonly interventions: readonly CreationIntervention[]; readonly notChecked: readonly string[] }> {\n const notChecked: string[] = [];\n const footprints = await this.readFootprints();\n const codingTaskRefById = new Map(input.buildAttempts.map((attempt) => [attempt.runTaskId, attempt.taskRef] as const));\n for (const record of await this.codingRunWrites.list()) codingTaskRefById.set(record.taskId, record.taskRef);\n\n const reverts = await this.playbookRunWrites.listReverts();\n const recordedRunIds = new Set((await this.playbookRunWrites.list()).map((record) => record.runId));\n // A fully reverted run's record is gone; its marker keeps its footprint. Only a marker from before that cannot.\n const unrecorded = new Set(reverts.filter((revert) => !recordedRunIds.has(revert.runId) && revert.runFootprint === undefined).map((revert) => revert.runId));\n if (unrecorded.size > 0) {\n notChecked.push(`${unrecorded.size} reverted playbook run(s) no longer have a write record, so commits of their files made before the revert are not attributed`);\n }\n const derived: CreationIntervention[] = [\n ...deriveBuildAttemptInterventions(input.buildAttempts, OPERATOR_BUILD_TASK_REARM_REASONS),\n ...deriveRevertInterventions(reverts),\n ...(await this.listRestarts()).map((restart) => deriveRestartIntervention(restart, {\n codingTaskRef: (taskId) => codingTaskRefById.get(taskId),\n playbookExecution: (executionId) => input.playbookExecutions.get(executionId),\n })),\n ];\n try {\n derived.push(...await this.deriveCommitInterventions(footprints));\n } catch (error) {\n notChecked.push(`commits: git could not be read (${describeCaughtError(error)}), so no manual commit or committed hand edit is counted`);\n }\n if (input.runsInFlight > 0) {\n notChecked.push(`uncommitted hand edits: ${input.runsInFlight} run(s) in flight are writing files no record names yet; read the report again once they settle`);\n } else {\n try {\n derived.push(...await this.deriveWorkingTreeEdits(footprints));\n } catch (error) {\n notChecked.push(`uncommitted hand edits: the working tree could not be read (${describeCaughtError(error)})`);\n }\n }\n const interventions = applyStatedReasons(derived, await this.readStatedReasons())\n .sort((left, right) => left.at.localeCompare(right.at) || left.id.localeCompare(right.id));\n return { interventions, notChecked };\n }\n\n /** What each recorded run wrote: coding runs from their change-set register, playbook runs from theirs. */\n private async readFootprints(): Promise<CreationRunFootprint[]> {\n const coding = (await this.codingRunWrites.list()).map((record) => ({\n target: { lane: CREATION_BUILD_LANE, task: record.taskRef },\n at: record.at,\n files: new Map(record.files.map((file) => [file.path, file.contentSha256 ?? null] as const)),\n }));\n const playbook = (await this.playbookRunWrites.list()).map((record) => ({\n target: { lane: record.playbookRef, task: record.runId },\n at: record.at,\n files: new Map(record.files.map((file) => [file.path, writtenSha256Of(file)] as const)),\n }));\n /*\n * A REVERTED run still wrote what it wrote: a commit of those files before the revert is still a person's\n * commit of that run's work. Its marker keeps the footprint the revert deleted from the register.\n */\n const reverted = (await this.playbookRunWrites.listReverts()).flatMap((revert) => (revert.runFootprint ? [{\n target: { lane: revert.playbookRef, task: revert.runId },\n at: revert.runFootprint.runAt,\n files: new Map(revert.runFootprint.writtenFiles.map((file) => [file.path, file.sha256] as const)),\n until: revert.at,\n }] : []));\n return [...coding, ...playbook, ...reverted];\n }\n\n /**\n * Every non-merge commit since the first recorded run, each with the bytes of the run-owned paths it\n * touched. Only those paths are hashed: a commit of nothing a run wrote is a person's own work beside the\n * lane, and `classifyCommitAsIntervention` would discard it anyway.\n */\n private async deriveCommitInterventions(footprints: readonly CreationRunFootprint[]): Promise<CreationIntervention[]> {\n if (footprints.length === 0) return [];\n const since = footprints.reduce((earliest, footprint) => (footprint.at < earliest ? footprint.at : earliest), footprints[0]!.at);\n // `--relative`: the registers hold APP-relative paths, and an application nested in its repository (every\n // `examples/*` dogfood app) would otherwise match none of them and read as needing nobody (#2231 review F3).\n const { stdout } = await this.git(['log', '--relative', '--no-merges', '--no-renames', '--name-status', `--since=${since}`,\n `--format=${COMMIT_MARK}%H${FIELD}%cI${FIELD}%an${FIELD}%s${FIELD}%b${HEADER_END}`]);\n const interventions: CreationIntervention[] = [];\n for (const chunk of stdout.split(COMMIT_MARK).filter((entry) => entry.trim().length > 0)) {\n const [header, changes = ''] = chunk.split(HEADER_END);\n const [sha, committedAt, authorName, subject, body = ''] = (header ?? '').split(FIELD);\n if (!sha || !committedAt || authorName === undefined || subject === undefined) continue;\n // `%cI` carries the committer's offset and the registers write UTC: compared as text, they must agree.\n const at = new Date(committedAt).toISOString();\n const files: { path: string; sha256: string | null }[] = [];\n for (const line of changes.split('\\n').filter((entry) => entry.includes('\\t'))) {\n const [status, filePath] = line.split('\\t');\n // Any footprint that ever held the path makes it worth hashing; ownership at this instant is decided with the bytes.\n if (!status || !filePath || !footprints.some((footprint) => footprint.files.has(filePath) && footprint.at <= at)) continue;\n files.push({ path: filePath, sha256: status.startsWith('D') ? null : await this.committedBlobSha256(sha, filePath) });\n }\n const observation: CreationCommitObservation = { sha, at, authorName, subject, body, files };\n const intervention = classifyCommitAsIntervention(observation, footprints);\n if (intervention) interventions.push(intervention);\n }\n return interventions;\n }\n\n /** Dirty run-owned files whose bytes are neither the run's nor HEAD's. */\n private async deriveWorkingTreeEdits(footprints: readonly CreationRunFootprint[]): Promise<CreationIntervention[]> {\n if (footprints.length === 0) return [];\n const owned = new Set(footprints.flatMap((footprint) => [...footprint.files.keys()]));\n // Porcelain paths are relative to the REPOSITORY root whatever the working directory; the app's prefix is stripped.\n const prefix = (await this.git(['rev-parse', '--show-prefix'])).stdout.trim();\n const { stdout } = await this.git(['status', '--porcelain=v1', '-z', '--untracked-files=all', '--no-renames', '--', '.']);\n const dirty: { path: string; sha256: string | null; headSha256: string | null }[] = [];\n for (const entry of stdout.split('\\0').filter((line) => line.length > 3)) {\n const repositoryPath = entry.slice(3);\n if (!repositoryPath.startsWith(prefix)) continue;\n const filePath = repositoryPath.slice(prefix.length);\n if (!owned.has(filePath)) continue;\n const current = await readFile(path.resolve(this.companionContext.saasRoot, filePath)).catch(() => undefined);\n const head = await this.gitBlob(`HEAD:./${filePath}`).catch(() => undefined);\n dirty.push({ path: filePath, sha256: current === undefined ? null : sha256Hex(current), headSha256: head === undefined ? null : sha256Hex(head) });\n }\n return classifyWorkingTreeEdits(dirty, footprints, new Date().toISOString());\n }\n\n /**\n * The hash of a file as one commit holds it, read once per companion (#3204). A commit's content never changes, so the\n * answer is held for good. Every report re-reads every commit since the run began, and asked `git show` for each\n * run-owned file of each of them: on reference run 42523477847 that was a spawn per (commit, file) on every read, the\n * companion's largest remaining CPU cost during the build (8% of samples) while the creation drive asked repeatedly.\n */\n private async committedBlobSha256(commitSha: string, filePath: string): Promise<string> {\n const key = `${commitSha}:${filePath}`;\n const held = this.committedBlobHashes.get(key);\n if (held !== undefined) return held;\n const hashed = sha256Hex(await this.gitBlob(`${commitSha}:./${filePath}`));\n this.committedBlobHashes.set(key, hashed);\n return hashed;\n }\n\n /** `<commit>:<path>` → the sha-256 of its bytes. Immutable, so never invalidated; bounded by the run's commits × files. */\n private readonly committedBlobHashes = new Map<string, string>();\n\n private async gitBlob(object: string): Promise<Buffer> {\n // Through the git read helper (#3204): forking `git` from the companion's 2 GB process blocked its event loop.\n const { stdout } = await gitReadBroker.execGitBuffer(['-C', this.companionContext.saasRoot, 'show', object], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });\n return stdout;\n }\n\n private async git(args: string[]): Promise<{ stdout: string }> {\n if (!READ_ONLY_GIT_SUBCOMMANDS.has(args[0] ?? '')) throw new Error(`git ${args[0]} is outside the intervention ledger's read-only set`);\n // `core.quotePath=false`: a quoted non-ASCII path would never match the registers' (#2231 review F13).\n const { stdout } = await gitReadBroker.execGit(['-C', this.companionContext.saasRoot, '-c', 'core.quotePath=false', ...args], { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS });\n return { stdout };\n }\n\n private interventionsDirectory(): string {\n return path.resolve(this.companionContext.saasRoot, '.wildo-saas/state/meta-workflows/interventions');\n }\n\n private restartsDirectory(): string {\n return path.join(this.interventionsDirectory(), 'restarts');\n }\n\n private reasonsPath(): string {\n return path.join(this.interventionsDirectory(), 'reasons.json');\n }\n}\n"]}
@@ -68,8 +68,8 @@ export declare class CreationRunReportCompanionService {
68
68
  * and read on its own: it needs no build plan, no landing pass and no git, so it answers on an application whose
69
69
  * build has not started and costs two listings.
70
70
  *
71
- * Reads the playbook runs to the build record's history ceiling rather than the report's 200-run window: a phase's
72
- * START is its OLDEST run, which is the first a newest-first window drops.
71
+ * Reads the playbook runs to the build record's history ceiling, as `describe` does: a phase's START is its OLDEST
72
+ * run, which is the first a newest-first window drops.
73
73
  *
74
74
  * It also carries the accepted build plan's GRAPH (#3204's budget: "at least 3 concurrent tasks when ready" needs to
75
75
  * know when a task could have run, which no attempt row says). Read from the specifications' data slots, which the
@@ -1 +1 @@
1
- {"version":3,"file":"creation-run-report.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-run-report.companion.service.ts"],"names":[],"mappings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OAAO,CAAC;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAI1I"}
1
+ {"version":3,"file":"creation-run-report.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-run-report.companion.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiC,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAI9G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,kEAAkE,CAAC;AAC5H,OAAO,EAIL,KAAK,wCAAwC,EAC9C,MAAM,gDAAgD,CAAC;AAIxD,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,kDAAkD,CAAC;AACnH,OAAO,EAAiC,KAAK,wCAAwC,EAAE,MAAM,iDAAiD,CAAC;AAa/I,OAAO,EAGL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EAEzB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC9B,MAAM,wCAAwC,CAAC;AAGhD,uGAAuG;AACvG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,iFAAiF;IACjF,QAAQ,CAAC,aAAa,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,GAAG;QAClE,sGAAsG;QACtG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAClC,QAAQ,CAAC,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAC;KACzD,CAAC;IACF,QAAQ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,OAAO,CAAC,iBAAiB,CAAC;IAqInD;;;;;;;;;;;;;;;;;OAiBG;IACU,gBAAgB,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAgElE;;;;;OAKG;YACW,kBAAkB;IA0BhC,0FAA0F;IAC7E,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAI1I"}
@@ -15,7 +15,6 @@ import { FlowsActors_Status, describeCaughtError } from '@wildo-ai/saas-models';
15
15
  import { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks } from '@wildo-ai/framework-knowledge';
16
16
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
17
17
  import { loadSpecificationFamilyData } from '../../core/context/specification-family-data.companion.js';
18
- import { CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas.js';
19
18
  import { BUILD_TASK_RECORD_HISTORY_CEILING, projectBuildTaskAttempt, isBuildPlanHeldByFailedModule, } from './application-build-dispatch.companion.service.js';
20
19
  import { APPLICATION_CODING_SYSTEM_REF } from '../models/application-coding-agent.actors-system.definitions.js';
21
20
  import { APPLICATION_BUILD_SYSTEM_REF } from '../models/application-build.actors-system.definitions.js';
@@ -25,8 +24,6 @@ import { META_WORKFLOWS_SYSTEM_REF } from '../models/meta-workflows-lane.models.
25
24
  import { projectPlaybookLoops, readPlaybookRunMeasurement, } from '../models/playbook-run-record.models.js';
26
25
  import { classifyPlaybookRefsByJourneyPhase, deriveCreationJourneyTimeline, } from '../models/creation-journey-timeline.models.js';
27
26
  import { CREATION_BUILD_LANE, CREATION_LOOP_LANE, deriveIndependenceScore, deriveJourneySpend, } from '../models/creation-intervention.models.js';
28
- /** The page the run report reads the meta-workflows executions in. The list's own ceiling. */
29
- const PLAYBOOK_EXECUTION_PAGE = 200;
30
27
  /**
31
28
  * The CREATION RUN REPORT (#2231): what a person had to do, what each run spent, and how independent the lane
32
29
  * was — the report app-creation-test-004's driving session wrote by hand. Derived on every read from rows,
@@ -47,9 +44,14 @@ let CreationRunReportCompanionService = class CreationRunReportCompanionService
47
44
  }
48
45
  async describe() {
49
46
  const notChecked = [];
50
- const rows = await this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: PLAYBOOK_EXECUTION_PAGE }));
51
- if (rows.length >= PLAYBOOK_EXECUTION_PAGE) {
52
- notChecked.push(`playbook runs: only the newest ${PLAYBOOK_EXECUTION_PAGE} executions were read, so older runs' spend and restarts' playbook names are missing`);
47
+ /*
48
+ * To the build record's history ceiling, as the timeline reads them (#3706): the HTTP listing's 200-row cap dropped
49
+ * the oldest runs of a long creation, so their spend and the playbook a restart interrupted went missing. The same
50
+ * query as the timeline's, so the two share one cached listing.
51
+ */
52
+ const rows = await this.executions.listActorExecutions({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });
53
+ if (rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) {
54
+ notChecked.push(`playbook runs: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} executions were read, so older runs' spend and restarts' playbook names are missing`);
53
55
  }
54
56
  const playbookExecutions = new Map();
55
57
  // The unattended loop's rows name no playbook; a restart that interrupted one is still a restart of the loop.
@@ -182,8 +184,8 @@ let CreationRunReportCompanionService = class CreationRunReportCompanionService
182
184
  * and read on its own: it needs no build plan, no landing pass and no git, so it answers on an application whose
183
185
  * build has not started and costs two listings.
184
186
  *
185
- * Reads the playbook runs to the build record's history ceiling rather than the report's 200-run window: a phase's
186
- * START is its OLDEST run, which is the first a newest-first window drops.
187
+ * Reads the playbook runs to the build record's history ceiling, as `describe` does: a phase's START is its OLDEST
188
+ * run, which is the first a newest-first window drops.
187
189
  *
188
190
  * It also carries the accepted build plan's GRAPH (#3204's budget: "at least 3 concurrent tasks when ready" needs to
189
191
  * know when a task could have run, which no attempt row says). Read from the specifications' data slots, which the
@@ -1 +1 @@
1
- {"version":3,"file":"creation-run-report.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-run-report.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAE/G,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAE/F,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,6BAA6B,GAE9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8DAA8D,CAAC;AAC7G,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,gCAAgC,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AAEtI,OAAO,EAAE,6BAA6B,EAAiD,MAAM,iDAAiD,CAAC;AAC/I,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAE3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kCAAkC,EAClC,6BAA6B,GAG9B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GAOnB,MAAM,wCAAwC,CAAC;AAEhD,8FAA8F;AAC9F,MAAM,uBAAuB,GAAG,GAAG,CAAC;AA2CpC;;;;GAIG;AAE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AAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;;GANxC,iCAAiC,CAgQ7C;;AAED;;;;;GAKG;AACH,IAAI,0BAA8E,CAAC;AACnF,SAAS,8BAA8B,CAAC,GAAW;IACjD,0BAA0B,KAAK,IAAI,GAAG,CAAC,+BAA+B,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACrF,MAAM,MAAM,GAAI,6BAA6B,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,QAA6E,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC;QACtK,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAsB,EAAE,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjI,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AACnD,CAAC","sourcesContent":["import { inject, injectable } from 'inversify';\n\nimport { FlowsActors_Status, describeCaughtError } from '@wildo-ai/saas-models';\nimport type { PlaybookSpend } from '@wildo-ai/application-creation-runtime';\nimport type { CreationJourney_BuildPlanTask, CreationJourney_Timeline } from '@wildo-ai/platform-core-shared';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks } from '@wildo-ai/framework-knowledge';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { loadSpecificationFamilyData } from '../../core/context/specification-family-data.companion';\nimport { CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas';\nimport type { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n BUILD_TASK_RECORD_HISTORY_CEILING,\n projectBuildTaskAttempt,\n isBuildPlanHeldByFailedModule,\n type ApplicationBuildDispatchCompanionService,\n} from './application-build-dispatch.companion.service';\nimport { APPLICATION_CODING_SYSTEM_REF } from '../models/application-coding-agent.actors-system.definitions';\nimport { APPLICATION_BUILD_SYSTEM_REF } from '../models/application-build.actors-system.definitions';\nimport { ApplicationCodingTaskDisposition, isInterruptedAtStartupOutput } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport type { CreationInterventionLedgerCompanionService } from './creation-intervention-ledger.companion.service';\nimport { describeFailedLandingRemedies, type PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { META_WORKFLOWS_SYSTEM_REF } from '../models/meta-workflows-lane.models';\nimport {\n projectPlaybookLoops,\n readPlaybookRunMeasurement,\n type PlaybookRunExecutionRow,\n} from '../models/playbook-run-record.models';\nimport {\n classifyPlaybookRefsByJourneyPhase,\n deriveCreationJourneyTimeline,\n type CreationJourneyBuildAttempt,\n type CreationJourneyPlaybookRun,\n} from '../models/creation-journey-timeline.models';\nimport {\n CREATION_BUILD_LANE,\n CREATION_LOOP_LANE,\n deriveIndependenceScore,\n deriveJourneySpend,\n type CreationCodingRunSpend,\n type CreationGenerationStepSpend,\n type CreationIntervention,\n type CreationInterruptedPlaybookExecution,\n type CreationLoopSelectionSpend,\n type CreationPlaybookRunSpend,\n} from '../models/creation-intervention.models';\n\n/** The page the run report reads the meta-workflows executions in. The list's own ceiling. */\nconst PLAYBOOK_EXECUTION_PAGE = 200;\n\n/** What `GET /api/companion/creation/report` answers (#2231) — what `wildo creation report` prints. */\nexport interface CreationRunReport {\n readonly generatedAt: string;\n /**\n * The application the report is about, by its `wildo.saas.config` slug — the name a defect found during its\n * creation carries in its `**Creation run:**` field (#2287), which `wildo creation report` looks up on the tracker.\n */\n readonly application: { readonly slug: string };\n /** Oldest first, each with what it unblocked and why, when a reason is known. */\n readonly interventions: readonly CreationIntervention[];\n readonly independence: ReturnType<typeof deriveIndependenceScore> & {\n /** Build tasks the plan reads LANDED: the per-landed-task denominator the build lane is judged by. */\n readonly landedBuildTasks: number;\n readonly interventionsPerLandedBuildTask: number | null;\n };\n readonly spend: {\n readonly playbookRuns: readonly CreationPlaybookRunSpend[];\n readonly codingRuns: readonly CreationCodingRunSpend[];\n readonly generationSteps: readonly CreationGenerationStepSpend[];\n readonly loopSelections: readonly CreationLoopSelectionSpend[];\n readonly total: ReturnType<typeof deriveJourneySpend>;\n };\n /**\n * Playbook runs that FAILED after writing and whose writes nobody accepted (#3265), newest first: each a half-applied\n * composition the posture never commits and no coding door takes. Not landings, so not counted in `independence`; listed\n * here with the two doors each waits on, because nothing else prompts a person to act on them.\n */\n readonly failedLandings: readonly CreationFailedLanding[];\n /** What this report could not see, said rather than left out — each line a reason a figure is a floor. */\n readonly notChecked: readonly string[];\n}\n\n/** One failed landing the report lists (#3265): which run, what it left in the tree, and how to settle it. */\nexport interface CreationFailedLanding {\n readonly runId: string;\n readonly playbookRef: string;\n readonly at: string;\n readonly paths: readonly string[];\n readonly remedies: { readonly accept: string; readonly revert: string };\n}\n\n/**\n * The CREATION RUN REPORT (#2231): what a person had to do, what each run spent, and how independent the lane\n * was — the report app-creation-test-004's driving session wrote by hand. Derived on every read from rows,\n * registers and git; nothing is stored here, and nothing in the lane reads it.\n */\n@injectable()\nexport class CreationRunReportCompanionService {\n public constructor(\n @inject(COMPANION_SERVICE_TYPES.CreationInterventionLedgerService) private readonly ledger: CreationInterventionLedgerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatch: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly playbookRunWrites: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n ) {}\n\n public async describe(): Promise<CreationRunReport> {\n const notChecked: string[] = [];\n const rows = await this.executions.listActorExecutions(\n CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: PLAYBOOK_EXECUTION_PAGE }),\n ) as unknown as PlaybookRunExecutionRow[];\n if (rows.length >= PLAYBOOK_EXECUTION_PAGE) {\n notChecked.push(`playbook runs: only the newest ${PLAYBOOK_EXECUTION_PAGE} executions were read, so older runs' spend and restarts' playbook names are missing`);\n }\n const playbookExecutions = new Map<string, CreationInterruptedPlaybookExecution>();\n // The unattended loop's rows name no playbook; a restart that interrupted one is still a restart of the loop.\n for (const loop of projectPlaybookLoops(rows)) playbookExecutions.set(loop.runId, { lane: CREATION_LOOP_LANE });\n const playbookRuns: CreationPlaybookRunSpend[] = [];\n let playbookRunsInFlight = 0;\n for (const row of rows) {\n const refs = row.standaloneTasks[0]?.context?.correlation?.refs;\n const playbookRef = refs?.['playbookRef'];\n if (typeof playbookRef !== 'string') continue;\n playbookExecutions.set(row._id, { lane: playbookRef, ...(typeof refs?.['rootRunId'] === 'string' ? { rootRunId: refs['rootRunId'] } : {}) });\n if (row.status === FlowsActors_Status.PROCESSING || row.status === FlowsActors_Status.PENDING) playbookRunsInFlight += 1;\n // A child's spend is inside its root's: only ROOT runs are summed, or a composite's work counts twice.\n if (typeof refs?.['rootRunId'] === 'string') continue;\n const measurement = readPlaybookRunMeasurement(row.standaloneTasks[0]?.output);\n playbookRuns.push({\n runId: row._id,\n playbookRef,\n ...(typeof refs?.['instanceKey'] === 'string' ? { instanceKey: refs['instanceKey'] } : {}),\n startedAt: row.createdAt.toISOString(),\n ...(row.finishedAt ? { finishedAt: row.finishedAt.toISOString() } : {}),\n status: row.status,\n ...(measurement ? { spend: measurement.spend } : {}),\n });\n }\n playbookRuns.sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n\n const loopSelections = projectPlaybookLoops(rows).map((loop): CreationLoopSelectionSpend => {\n // The loop's own row counts every lane it ran; each lane is also a root run above, so only the rest is the loop's.\n const laneSpends: PlaybookSpend[] = (loop.steps ?? []).flatMap((step) => (step.lanes ?? []).flatMap((lane) => (lane.spend ? [lane.spend] : [])));\n const cost: Record<string, number> = { ...(loop.measurement?.spend.cost ?? {}) };\n for (const lane of laneSpends) for (const [currency, amount] of Object.entries(lane.cost ?? {})) cost[currency] = (cost[currency] ?? 0) - amount;\n const kept = Object.fromEntries(Object.entries(cost).filter((entry) => entry[1] > 0));\n return { runId: loop.runId, startedAt: loop.startedAt, ...(Object.keys(kept).length > 0 ? { cost: kept } : {}) };\n });\n\n let build: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['describeBuildTaskRecords']>>;\n try {\n build = await this.buildDispatch.describeBuildTaskRecords();\n if (build === undefined) notChecked.push('build: the application has no build plan yet, so there are no coding runs to count');\n } catch (error) {\n // A plan a failed module holds exists (#3258): the report says so instead of dying, or of saying there is none.\n if (!isBuildPlanHeldByFailedModule(error)) throw error;\n notChecked.push(`build: the build plan could not be read, so its coding runs are not counted. ${error.message}`);\n }\n if (build?.attemptsTruncated) notChecked.push('build: the attempt listing hit its page cap, so coding runs, generation steps and their spend are a floor');\n const attempts = (build?.tasks ?? []).flatMap((task) => task.attempts.map((attempt) => ({ taskRef: task.taskRef, attempt })));\n const codingRuns: CreationCodingRunSpend[] = attempts\n // A generation step is an attempt and no agent run: it is not a coding run. Its own spend is listed apart, below.\n .filter(({ attempt }) => attempt.ranNothing !== true && attempt.generationStep !== true)\n .map(({ taskRef, attempt }) => ({\n runTaskId: attempt.runTaskId,\n taskRef,\n startedAt: attempt.startedAt,\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(attempt.tokens ? { tokens: attempt.tokens } : {}),\n ...(attempt.cost ? { cost: attempt.cost } : {}),\n }))\n .sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n const generationSteps: CreationGenerationStepSpend[] = attempts\n .filter(({ attempt }) => attempt.ranNothing !== true && attempt.generationStep === true)\n .map(({ taskRef, attempt }) => ({\n runTaskId: attempt.runTaskId,\n taskRef,\n startedAt: attempt.startedAt,\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(attempt.generationStepSpend ? { spend: attempt.generationStepSpend } : {}),\n }))\n .sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n const codingRunsInFlight = attempts.filter(({ attempt }) => attempt.status === FlowsActors_Status.PROCESSING || attempt.status === FlowsActors_Status.PENDING).length;\n\n const { interventions, notChecked: ledgerNotChecked } = await this.ledger.deriveInterventions({\n buildAttempts: attempts.map(({ taskRef, attempt }) => ({\n taskRef,\n runTaskId: attempt.runTaskId,\n startedAt: attempt.startedAt,\n ...(attempt.rearm ? { rearm: attempt.rearm } : {}),\n ...(attempt.landedOverride ? { landedOverride: attempt.landedOverride } : {}),\n })),\n playbookExecutions,\n runsInFlight: playbookRunsInFlight + codingRunsInFlight,\n });\n notChecked.push(...ledgerNotChecked);\n\n // A playbook lane's landings are its runs that landed files; the build's, its tasks the plan reads landed.\n // A FAILED landing's record (#3237) holds what a run left behind when it threw, which is no landing.\n const landedByLane = new Map<string, number>();\n const playbookRunWriteRecords = await this.playbookRunWrites.list();\n for (const record of playbookRunWriteRecords.filter((candidate) => candidate.landingFailed !== true)) {\n landedByLane.set(record.playbookRef, (landedByLane.get(record.playbookRef) ?? 0) + 1);\n }\n // Listed instead (#3265): an accepted one has been settled by a person and is history, not a prompt.\n const failedLandings: CreationFailedLanding[] = playbookRunWriteRecords\n .filter((record) => record.landingFailed === true && record.acceptedCommitSha === undefined)\n .map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n paths: record.files.map((file) => file.path),\n remedies: describeFailedLandingRemedies(record.runId),\n }));\n const landedBuildTasks = build?.summary.landed ?? 0;\n if (build !== undefined) landedByLane.set(CREATION_BUILD_LANE, landedBuildTasks);\n const independence = deriveIndependenceScore(interventions, landedByLane);\n const buildInterventions = interventions.filter((intervention) => intervention.targets.some((target) => target.lane === CREATION_BUILD_LANE)).length;\n\n return {\n generatedAt: new Date().toISOString(),\n application: { slug: this.companionContext.saasConfig.slug },\n interventions,\n independence: {\n ...independence,\n landedBuildTasks,\n interventionsPerLandedBuildTask: landedBuildTasks > 0 ? Math.round((buildInterventions / landedBuildTasks) * 100) / 100 : buildInterventions === 0 ? 0 : null,\n },\n spend: { playbookRuns, codingRuns, generationSteps, loopSelections, total: deriveJourneySpend({ playbookRuns, codingRuns, generationSteps, loopSelections }) },\n failedLandings,\n notChecked,\n };\n }\n\n /**\n * `GET /creation/timeline` (#3206, epic #3204): how long each phase of the journey took, the wall clock, and the\n * slowest build tasks with their dispatch wait and run time. Derived on every read from the rows, like the report,\n * and read on its own: it needs no build plan, no landing pass and no git, so it answers on an application whose\n * build has not started and costs two listings.\n *\n * Reads the playbook runs to the build record's history ceiling rather than the report's 200-run window: a phase's\n * START is its OLDEST run, which is the first a newest-first window drops.\n *\n * It also carries the accepted build plan's GRAPH (#3204's budget: \"at least 3 concurrent tasks when ready\" needs to\n * know when a task could have run, which no attempt row says). Read from the specifications' data slots, which the\n * companion holds cached while nothing changed, and still with no landing pass: a plan that cannot be read is said in\n * `notChecked` and leaves the graph NULL, never failing the read.\n *\n * A playbook run a restart ended is measured to the restart like a build attempt, and unlike one it is not marked:\n * the engine's startup sweep writes the same failure for it as for any orphan, and the meta-workflows sweep passes no\n * description of its own. A phase interrupted by a restart may therefore run long.\n */\n public async describeTimeline(): Promise<CreationJourney_Timeline> {\n const notChecked: string[] = [];\n const [playbookRows, ...attemptPages] = await Promise.all([\n this.executions.listActorExecutions({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING }),\n ...[APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })),\n ]);\n if (playbookRows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) {\n notChecked.push(`playbook runs: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} executions were read, so the earliest phase starts are later than they were`);\n }\n if (attemptPages.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING)) {\n notChecked.push(`build attempts: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} of a system were read, so the build's start and the task totals are a floor`);\n }\n const playbookRuns: CreationJourneyPlaybookRun[] = [];\n for (const row of playbookRows as unknown as PlaybookRunExecutionRow[]) {\n const playbookRef = row.standaloneTasks[0]?.context?.correlation?.refs?.['playbookRef'];\n // The unattended loop's own rows name no playbook: each lane it ran is a row of its own, counted there.\n if (typeof playbookRef !== 'string') continue;\n playbookRuns.push({\n runId: row._id,\n playbookRef,\n startedAt: row.createdAt.toISOString(),\n ...(row.finishedAt ? { finishedAt: row.finishedAt.toISOString() } : {}),\n status: row.status,\n ...(row.suspension?.suspendedAt ? { suspendedAt: row.suspension.suspendedAt } : {}),\n });\n }\n const buildAttempts: CreationJourneyBuildAttempt[] = [];\n for (const row of attemptPages.flat() as unknown as ReadonlyArray<Parameters<typeof projectBuildTaskAttempt>[0] & {\n readonly suspension?: { readonly suspendedAt?: string } | null;\n }>) {\n const projected = projectBuildTaskAttempt(row);\n if (projected === null) continue;\n const { attempt } = projected;\n // A coding run parked on a question (AWAITING_APPROVAL) is waiting on a person, as a parked playbook run is.\n const parkedAt = attempt.status === FlowsActors_Status.AWAITING_APPROVAL ? row.suspension?.suspendedAt : undefined;\n buildAttempts.push({\n taskRef: projected.taskRef,\n selectedAt: attempt.startedAt,\n ...(attempt.preparationStartedAt ? { preparationStartedAt: attempt.preparationStartedAt } : {}),\n ...(attempt.admittedAt ? { admittedAt: attempt.admittedAt } : {}),\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(parkedAt ? { waitingOnPersonSince: parkedAt } : {}),\n /*\n * Settled by a later process's startup sweep: the coding lane's interrupted disposition (every row it ever wrote),\n * or the startup marker the sweep writes on a selected-only run and a generation step since #3206.\n */\n endedByCompanionRestart: attempt.disposition === ApplicationCodingTaskDisposition.INTERRUPTED_REQUIRES_REVIEW\n || isInterruptedAtStartupOutput(row.standaloneTasks[0]?.output),\n generationStep: attempt.generationStep === true,\n });\n }\n if (buildAttempts.some((attempt) => attempt.preparationStartedAt === undefined)) {\n notChecked.push('dispatch wait: an attempt recorded before #3206 carries no preparation start, so its wait is measured from its selection and is a floor');\n }\n const endedByRestart = buildAttempts.filter((attempt) => attempt.endedByCompanionRestart).length;\n if (endedByRestart > 0) {\n notChecked.push(`build attempts: ${endedByRestart} ended by a companion restart are measured to that restart, which includes any time the companion was down`);\n }\n const { phaseOf, ambiguousPlaybookRefs } = classifyPlaybookRefsByJourneyPhase(readCompiledChoreographyAdmits);\n const buildPlanGraph = await this.readBuildPlanGraph(notChecked);\n return deriveCreationJourneyTimeline({ now: new Date(), playbookRuns, buildAttempts, phaseOf, ambiguousPlaybookRefs, buildPlanGraph, notChecked });\n }\n\n /**\n * The accepted build plan's tasks and their prerequisites, by SHAPE: the timeline needs two fields, not a validated\n * plan, and validating it is the dispatcher's job (an invalid plan dispatches nothing, which its own reads say). NULL\n * when no plan is authored yet, which is a true answer for every application before build-decompose; NULL plus a\n * `notChecked` line when one exists and cannot be read, so \"no plan\" and \"could not look\" stay apart.\n */\n private async readBuildPlanGraph(notChecked: string[]): Promise<readonly CreationJourney_BuildPlanTask[] | null> {\n let authored: unknown;\n try {\n authored = (await loadSpecificationFamilyData(this.companionContext) as unknown as Record<string, unknown>).buildPlanSpecification;\n } catch (error) {\n notChecked.push(`build plan: the specifications could not be read (${describeCaughtError(error)}), so the plan graph is absent`);\n return null;\n }\n if (authored === undefined || authored === null) return null;\n const tasks = (authored as { readonly tasks?: unknown }).tasks;\n const graph: CreationJourney_BuildPlanTask[] = [];\n for (const task of Array.isArray(tasks) ? tasks : []) {\n const { taskRef, prerequisiteTaskRefs } = (task ?? {}) as { readonly taskRef?: unknown; readonly prerequisiteTaskRefs?: unknown };\n if (typeof taskRef !== 'string' || taskRef.length === 0) continue;\n graph.push({\n taskRef,\n prerequisiteTaskRefs: Array.isArray(prerequisiteTaskRefs) ? prerequisiteTaskRefs.filter((ref): ref is string => typeof ref === 'string' && ref.length > 0) : [],\n });\n }\n if (!Array.isArray(tasks) || graph.length !== tasks.length) {\n notChecked.push('build plan: the authored plan has tasks of no readable shape, so the plan graph is absent');\n return null;\n }\n return graph;\n }\n\n /** Record why a person intervened; refused for an id the current report does not hold. */\n public async stateReason(interventionId: string, reason: string): Promise<{ readonly interventionId: string; readonly statedAt: string }> {\n const report = await this.describe();\n return this.ledger.stateReason(interventionId, reason, new Set(report.interventions.map((intervention) => intervention.id)));\n }\n}\n\n/**\n * What a compiled playbook's choreography admits, read from the framework-knowledge catalog the companion ships with:\n * the catalog is what the lanes ran from, so it is what says which lane a run's playbook belongs to. Read by shape\n * (the loader types a playbook `unknown`), and loaded once per process — the compiled catalog does not change under a\n * running companion.\n */\nlet compiledChoreographyAdmits: ReadonlyMap<string, readonly string[]> | undefined;\nfunction readCompiledChoreographyAdmits(ref: string): readonly string[] {\n compiledChoreographyAdmits ??= new Map(listFrameworkKnowledgePlaybooks().map((entry) => {\n const admits = (getFrameworkKnowledgePlaybook(entry.ref)?.playbook as { method?: { choreography?: { admits?: unknown } } } | undefined)?.method?.choreography?.admits;\n return [entry.ref, Array.isArray(admits) ? admits.filter((admitted): admitted is string => typeof admitted === 'string') : []];\n }));\n return compiledChoreographyAdmits.get(ref) ?? [];\n}\n"]}
1
+ {"version":3,"file":"creation-run-report.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/creation-run-report.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,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tK,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAsB,EAAE,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjI,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AACnD,CAAC","sourcesContent":["import { inject, injectable } from 'inversify';\n\nimport { FlowsActors_Status, describeCaughtError } from '@wildo-ai/saas-models';\nimport type { PlaybookSpend } from '@wildo-ai/application-creation-runtime';\nimport type { CreationJourney_BuildPlanTask, CreationJourney_Timeline } from '@wildo-ai/platform-core-shared';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks } from '@wildo-ai/framework-knowledge';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { loadSpecificationFamilyData } from '../../core/context/specification-family-data.companion';\nimport type { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n BUILD_TASK_RECORD_HISTORY_CEILING,\n projectBuildTaskAttempt,\n isBuildPlanHeldByFailedModule,\n type ApplicationBuildDispatchCompanionService,\n} from './application-build-dispatch.companion.service';\nimport { APPLICATION_CODING_SYSTEM_REF } from '../models/application-coding-agent.actors-system.definitions';\nimport { APPLICATION_BUILD_SYSTEM_REF } from '../models/application-build.actors-system.definitions';\nimport { ApplicationCodingTaskDisposition, isInterruptedAtStartupOutput } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport type { CreationInterventionLedgerCompanionService } from './creation-intervention-ledger.companion.service';\nimport { describeFailedLandingRemedies, type PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { META_WORKFLOWS_SYSTEM_REF } from '../models/meta-workflows-lane.models';\nimport {\n projectPlaybookLoops,\n readPlaybookRunMeasurement,\n type PlaybookRunExecutionRow,\n} from '../models/playbook-run-record.models';\nimport {\n classifyPlaybookRefsByJourneyPhase,\n deriveCreationJourneyTimeline,\n type CreationJourneyBuildAttempt,\n type CreationJourneyPlaybookRun,\n} from '../models/creation-journey-timeline.models';\nimport {\n CREATION_BUILD_LANE,\n CREATION_LOOP_LANE,\n deriveIndependenceScore,\n deriveJourneySpend,\n type CreationCodingRunSpend,\n type CreationGenerationStepSpend,\n type CreationIntervention,\n type CreationInterruptedPlaybookExecution,\n type CreationLoopSelectionSpend,\n type CreationPlaybookRunSpend,\n} from '../models/creation-intervention.models';\n\n\n/** What `GET /api/companion/creation/report` answers (#2231) — what `wildo creation report` prints. */\nexport interface CreationRunReport {\n readonly generatedAt: string;\n /**\n * The application the report is about, by its `wildo.saas.config` slug — the name a defect found during its\n * creation carries in its `**Creation run:**` field (#2287), which `wildo creation report` looks up on the tracker.\n */\n readonly application: { readonly slug: string };\n /** Oldest first, each with what it unblocked and why, when a reason is known. */\n readonly interventions: readonly CreationIntervention[];\n readonly independence: ReturnType<typeof deriveIndependenceScore> & {\n /** Build tasks the plan reads LANDED: the per-landed-task denominator the build lane is judged by. */\n readonly landedBuildTasks: number;\n readonly interventionsPerLandedBuildTask: number | null;\n };\n readonly spend: {\n readonly playbookRuns: readonly CreationPlaybookRunSpend[];\n readonly codingRuns: readonly CreationCodingRunSpend[];\n readonly generationSteps: readonly CreationGenerationStepSpend[];\n readonly loopSelections: readonly CreationLoopSelectionSpend[];\n readonly total: ReturnType<typeof deriveJourneySpend>;\n };\n /**\n * Playbook runs that FAILED after writing and whose writes nobody accepted (#3265), newest first: each a half-applied\n * composition the posture never commits and no coding door takes. Not landings, so not counted in `independence`; listed\n * here with the two doors each waits on, because nothing else prompts a person to act on them.\n */\n readonly failedLandings: readonly CreationFailedLanding[];\n /** What this report could not see, said rather than left out — each line a reason a figure is a floor. */\n readonly notChecked: readonly string[];\n}\n\n/** One failed landing the report lists (#3265): which run, what it left in the tree, and how to settle it. */\nexport interface CreationFailedLanding {\n readonly runId: string;\n readonly playbookRef: string;\n readonly at: string;\n readonly paths: readonly string[];\n readonly remedies: { readonly accept: string; readonly revert: string };\n}\n\n/**\n * The CREATION RUN REPORT (#2231): what a person had to do, what each run spent, and how independent the lane\n * was — the report app-creation-test-004's driving session wrote by hand. Derived on every read from rows,\n * registers and git; nothing is stored here, and nothing in the lane reads it.\n */\n@injectable()\nexport class CreationRunReportCompanionService {\n public constructor(\n @inject(COMPANION_SERVICE_TYPES.CreationInterventionLedgerService) private readonly ledger: CreationInterventionLedgerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatch: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly playbookRunWrites: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n ) {}\n\n public async describe(): Promise<CreationRunReport> {\n const notChecked: string[] = [];\n /*\n * To the build record's history ceiling, as the timeline reads them (#3706): the HTTP listing's 200-row cap dropped\n * the oldest runs of a long creation, so their spend and the playbook a restart interrupted went missing. The same\n * query as the timeline's, so the two share one cached listing.\n */\n const rows = await this.executions.listActorExecutions(\n { systemRef: META_WORKFLOWS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING },\n ) as unknown as PlaybookRunExecutionRow[];\n if (rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) {\n notChecked.push(`playbook runs: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} executions were read, so older runs' spend and restarts' playbook names are missing`);\n }\n const playbookExecutions = new Map<string, CreationInterruptedPlaybookExecution>();\n // The unattended loop's rows name no playbook; a restart that interrupted one is still a restart of the loop.\n for (const loop of projectPlaybookLoops(rows)) playbookExecutions.set(loop.runId, { lane: CREATION_LOOP_LANE });\n const playbookRuns: CreationPlaybookRunSpend[] = [];\n let playbookRunsInFlight = 0;\n for (const row of rows) {\n const refs = row.standaloneTasks[0]?.context?.correlation?.refs;\n const playbookRef = refs?.['playbookRef'];\n if (typeof playbookRef !== 'string') continue;\n playbookExecutions.set(row._id, { lane: playbookRef, ...(typeof refs?.['rootRunId'] === 'string' ? { rootRunId: refs['rootRunId'] } : {}) });\n if (row.status === FlowsActors_Status.PROCESSING || row.status === FlowsActors_Status.PENDING) playbookRunsInFlight += 1;\n // A child's spend is inside its root's: only ROOT runs are summed, or a composite's work counts twice.\n if (typeof refs?.['rootRunId'] === 'string') continue;\n const measurement = readPlaybookRunMeasurement(row.standaloneTasks[0]?.output);\n playbookRuns.push({\n runId: row._id,\n playbookRef,\n ...(typeof refs?.['instanceKey'] === 'string' ? { instanceKey: refs['instanceKey'] } : {}),\n startedAt: row.createdAt.toISOString(),\n ...(row.finishedAt ? { finishedAt: row.finishedAt.toISOString() } : {}),\n status: row.status,\n ...(measurement ? { spend: measurement.spend } : {}),\n });\n }\n playbookRuns.sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n\n const loopSelections = projectPlaybookLoops(rows).map((loop): CreationLoopSelectionSpend => {\n // The loop's own row counts every lane it ran; each lane is also a root run above, so only the rest is the loop's.\n const laneSpends: PlaybookSpend[] = (loop.steps ?? []).flatMap((step) => (step.lanes ?? []).flatMap((lane) => (lane.spend ? [lane.spend] : [])));\n const cost: Record<string, number> = { ...(loop.measurement?.spend.cost ?? {}) };\n for (const lane of laneSpends) for (const [currency, amount] of Object.entries(lane.cost ?? {})) cost[currency] = (cost[currency] ?? 0) - amount;\n const kept = Object.fromEntries(Object.entries(cost).filter((entry) => entry[1] > 0));\n return { runId: loop.runId, startedAt: loop.startedAt, ...(Object.keys(kept).length > 0 ? { cost: kept } : {}) };\n });\n\n let build: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['describeBuildTaskRecords']>>;\n try {\n build = await this.buildDispatch.describeBuildTaskRecords();\n if (build === undefined) notChecked.push('build: the application has no build plan yet, so there are no coding runs to count');\n } catch (error) {\n // A plan a failed module holds exists (#3258): the report says so instead of dying, or of saying there is none.\n if (!isBuildPlanHeldByFailedModule(error)) throw error;\n notChecked.push(`build: the build plan could not be read, so its coding runs are not counted. ${error.message}`);\n }\n if (build?.attemptsTruncated) notChecked.push('build: the attempt listing hit its page cap, so coding runs, generation steps and their spend are a floor');\n const attempts = (build?.tasks ?? []).flatMap((task) => task.attempts.map((attempt) => ({ taskRef: task.taskRef, attempt })));\n const codingRuns: CreationCodingRunSpend[] = attempts\n // A generation step is an attempt and no agent run: it is not a coding run. Its own spend is listed apart, below.\n .filter(({ attempt }) => attempt.ranNothing !== true && attempt.generationStep !== true)\n .map(({ taskRef, attempt }) => ({\n runTaskId: attempt.runTaskId,\n taskRef,\n startedAt: attempt.startedAt,\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(attempt.tokens ? { tokens: attempt.tokens } : {}),\n ...(attempt.cost ? { cost: attempt.cost } : {}),\n }))\n .sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n const generationSteps: CreationGenerationStepSpend[] = attempts\n .filter(({ attempt }) => attempt.ranNothing !== true && attempt.generationStep === true)\n .map(({ taskRef, attempt }) => ({\n runTaskId: attempt.runTaskId,\n taskRef,\n startedAt: attempt.startedAt,\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(attempt.generationStepSpend ? { spend: attempt.generationStepSpend } : {}),\n }))\n .sort((left, right) => left.startedAt.localeCompare(right.startedAt));\n const codingRunsInFlight = attempts.filter(({ attempt }) => attempt.status === FlowsActors_Status.PROCESSING || attempt.status === FlowsActors_Status.PENDING).length;\n\n const { interventions, notChecked: ledgerNotChecked } = await this.ledger.deriveInterventions({\n buildAttempts: attempts.map(({ taskRef, attempt }) => ({\n taskRef,\n runTaskId: attempt.runTaskId,\n startedAt: attempt.startedAt,\n ...(attempt.rearm ? { rearm: attempt.rearm } : {}),\n ...(attempt.landedOverride ? { landedOverride: attempt.landedOverride } : {}),\n })),\n playbookExecutions,\n runsInFlight: playbookRunsInFlight + codingRunsInFlight,\n });\n notChecked.push(...ledgerNotChecked);\n\n // A playbook lane's landings are its runs that landed files; the build's, its tasks the plan reads landed.\n // A FAILED landing's record (#3237) holds what a run left behind when it threw, which is no landing.\n const landedByLane = new Map<string, number>();\n const playbookRunWriteRecords = await this.playbookRunWrites.list();\n for (const record of playbookRunWriteRecords.filter((candidate) => candidate.landingFailed !== true)) {\n landedByLane.set(record.playbookRef, (landedByLane.get(record.playbookRef) ?? 0) + 1);\n }\n // Listed instead (#3265): an accepted one has been settled by a person and is history, not a prompt.\n const failedLandings: CreationFailedLanding[] = playbookRunWriteRecords\n .filter((record) => record.landingFailed === true && record.acceptedCommitSha === undefined)\n .map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n paths: record.files.map((file) => file.path),\n remedies: describeFailedLandingRemedies(record.runId),\n }));\n const landedBuildTasks = build?.summary.landed ?? 0;\n if (build !== undefined) landedByLane.set(CREATION_BUILD_LANE, landedBuildTasks);\n const independence = deriveIndependenceScore(interventions, landedByLane);\n const buildInterventions = interventions.filter((intervention) => intervention.targets.some((target) => target.lane === CREATION_BUILD_LANE)).length;\n\n return {\n generatedAt: new Date().toISOString(),\n application: { slug: this.companionContext.saasConfig.slug },\n interventions,\n independence: {\n ...independence,\n landedBuildTasks,\n interventionsPerLandedBuildTask: landedBuildTasks > 0 ? Math.round((buildInterventions / landedBuildTasks) * 100) / 100 : buildInterventions === 0 ? 0 : null,\n },\n spend: { playbookRuns, codingRuns, generationSteps, loopSelections, total: deriveJourneySpend({ playbookRuns, codingRuns, generationSteps, loopSelections }) },\n failedLandings,\n notChecked,\n };\n }\n\n /**\n * `GET /creation/timeline` (#3206, epic #3204): how long each phase of the journey took, the wall clock, and the\n * slowest build tasks with their dispatch wait and run time. Derived on every read from the rows, like the report,\n * and read on its own: it needs no build plan, no landing pass and no git, so it answers on an application whose\n * build has not started and costs two listings.\n *\n * Reads the playbook runs to the build record's history ceiling, as `describe` does: a phase's START is its OLDEST\n * run, which is the first a newest-first window drops.\n *\n * It also carries the accepted build plan's GRAPH (#3204's budget: \"at least 3 concurrent tasks when ready\" needs to\n * know when a task could have run, which no attempt row says). Read from the specifications' data slots, which the\n * companion holds cached while nothing changed, and still with no landing pass: a plan that cannot be read is said in\n * `notChecked` and leaves the graph NULL, never failing the read.\n *\n * A playbook run a restart ended is measured to the restart like a build attempt, and unlike one it is not marked:\n * the engine's startup sweep writes the same failure for it as for any orphan, and the meta-workflows sweep passes no\n * description of its own. A phase interrupted by a restart may therefore run long.\n */\n public async describeTimeline(): Promise<CreationJourney_Timeline> {\n const notChecked: string[] = [];\n const [playbookRows, ...attemptPages] = await Promise.all([\n this.executions.listActorExecutions({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING }),\n ...[APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })),\n ]);\n if (playbookRows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) {\n notChecked.push(`playbook runs: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} executions were read, so the earliest phase starts are later than they were`);\n }\n if (attemptPages.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING)) {\n notChecked.push(`build attempts: only the newest ${BUILD_TASK_RECORD_HISTORY_CEILING} of a system were read, so the build's start and the task totals are a floor`);\n }\n const playbookRuns: CreationJourneyPlaybookRun[] = [];\n for (const row of playbookRows as unknown as PlaybookRunExecutionRow[]) {\n const playbookRef = row.standaloneTasks[0]?.context?.correlation?.refs?.['playbookRef'];\n // The unattended loop's own rows name no playbook: each lane it ran is a row of its own, counted there.\n if (typeof playbookRef !== 'string') continue;\n playbookRuns.push({\n runId: row._id,\n playbookRef,\n startedAt: row.createdAt.toISOString(),\n ...(row.finishedAt ? { finishedAt: row.finishedAt.toISOString() } : {}),\n status: row.status,\n ...(row.suspension?.suspendedAt ? { suspendedAt: row.suspension.suspendedAt } : {}),\n });\n }\n const buildAttempts: CreationJourneyBuildAttempt[] = [];\n for (const row of attemptPages.flat() as unknown as ReadonlyArray<Parameters<typeof projectBuildTaskAttempt>[0] & {\n readonly suspension?: { readonly suspendedAt?: string } | null;\n }>) {\n const projected = projectBuildTaskAttempt(row);\n if (projected === null) continue;\n const { attempt } = projected;\n // A coding run parked on a question (AWAITING_APPROVAL) is waiting on a person, as a parked playbook run is.\n const parkedAt = attempt.status === FlowsActors_Status.AWAITING_APPROVAL ? row.suspension?.suspendedAt : undefined;\n buildAttempts.push({\n taskRef: projected.taskRef,\n selectedAt: attempt.startedAt,\n ...(attempt.preparationStartedAt ? { preparationStartedAt: attempt.preparationStartedAt } : {}),\n ...(attempt.admittedAt ? { admittedAt: attempt.admittedAt } : {}),\n ...(attempt.settledAt ? { settledAt: attempt.settledAt } : {}),\n ...(parkedAt ? { waitingOnPersonSince: parkedAt } : {}),\n /*\n * Settled by a later process's startup sweep: the coding lane's interrupted disposition (every row it ever wrote),\n * or the startup marker the sweep writes on a selected-only run and a generation step since #3206.\n */\n endedByCompanionRestart: attempt.disposition === ApplicationCodingTaskDisposition.INTERRUPTED_REQUIRES_REVIEW\n || isInterruptedAtStartupOutput(row.standaloneTasks[0]?.output),\n generationStep: attempt.generationStep === true,\n });\n }\n if (buildAttempts.some((attempt) => attempt.preparationStartedAt === undefined)) {\n notChecked.push('dispatch wait: an attempt recorded before #3206 carries no preparation start, so its wait is measured from its selection and is a floor');\n }\n const endedByRestart = buildAttempts.filter((attempt) => attempt.endedByCompanionRestart).length;\n if (endedByRestart > 0) {\n notChecked.push(`build attempts: ${endedByRestart} ended by a companion restart are measured to that restart, which includes any time the companion was down`);\n }\n const { phaseOf, ambiguousPlaybookRefs } = classifyPlaybookRefsByJourneyPhase(readCompiledChoreographyAdmits);\n const buildPlanGraph = await this.readBuildPlanGraph(notChecked);\n return deriveCreationJourneyTimeline({ now: new Date(), playbookRuns, buildAttempts, phaseOf, ambiguousPlaybookRefs, buildPlanGraph, notChecked });\n }\n\n /**\n * The accepted build plan's tasks and their prerequisites, by SHAPE: the timeline needs two fields, not a validated\n * plan, and validating it is the dispatcher's job (an invalid plan dispatches nothing, which its own reads say). NULL\n * when no plan is authored yet, which is a true answer for every application before build-decompose; NULL plus a\n * `notChecked` line when one exists and cannot be read, so \"no plan\" and \"could not look\" stay apart.\n */\n private async readBuildPlanGraph(notChecked: string[]): Promise<readonly CreationJourney_BuildPlanTask[] | null> {\n let authored: unknown;\n try {\n authored = (await loadSpecificationFamilyData(this.companionContext) as unknown as Record<string, unknown>).buildPlanSpecification;\n } catch (error) {\n notChecked.push(`build plan: the specifications could not be read (${describeCaughtError(error)}), so the plan graph is absent`);\n return null;\n }\n if (authored === undefined || authored === null) return null;\n const tasks = (authored as { readonly tasks?: unknown }).tasks;\n const graph: CreationJourney_BuildPlanTask[] = [];\n for (const task of Array.isArray(tasks) ? tasks : []) {\n const { taskRef, prerequisiteTaskRefs } = (task ?? {}) as { readonly taskRef?: unknown; readonly prerequisiteTaskRefs?: unknown };\n if (typeof taskRef !== 'string' || taskRef.length === 0) continue;\n graph.push({\n taskRef,\n prerequisiteTaskRefs: Array.isArray(prerequisiteTaskRefs) ? prerequisiteTaskRefs.filter((ref): ref is string => typeof ref === 'string' && ref.length > 0) : [],\n });\n }\n if (!Array.isArray(tasks) || graph.length !== tasks.length) {\n notChecked.push('build plan: the authored plan has tasks of no readable shape, so the plan graph is absent');\n return null;\n }\n return graph;\n }\n\n /** Record why a person intervened; refused for an id the current report does not hold. */\n public async stateReason(interventionId: string, reason: string): Promise<{ readonly interventionId: string; readonly statedAt: string }> {\n const report = await this.describe();\n return this.ledger.stateReason(interventionId, reason, new Set(report.interventions.map((intervention) => intervention.id)));\n }\n}\n\n/**\n * What a compiled playbook's choreography admits, read from the framework-knowledge catalog the companion ships with:\n * the catalog is what the lanes ran from, so it is what says which lane a run's playbook belongs to. Read by shape\n * (the loader types a playbook `unknown`), and loaded once per process — the compiled catalog does not change under a\n * running companion.\n */\nlet compiledChoreographyAdmits: ReadonlyMap<string, readonly string[]> | undefined;\nfunction readCompiledChoreographyAdmits(ref: string): readonly string[] {\n compiledChoreographyAdmits ??= new Map(listFrameworkKnowledgePlaybooks().map((entry) => {\n const admits = (getFrameworkKnowledgePlaybook(entry.ref)?.playbook as { method?: { choreography?: { admits?: unknown } } } | undefined)?.method?.choreography?.admits;\n return [entry.ref, Array.isArray(admits) ? admits.filter((admitted): admitted is string => typeof admitted === 'string') : []];\n }));\n return compiledChoreographyAdmits.get(ref) ?? [];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-executor.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/foundation-executor.companion.service.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,gCAAgC,EAChC,sBAAsB,EAIvB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAA0B,KAAK,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AAChI,OAAO,EAA0J,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AAM5O,OAAO,EASL,KAAK,yBAAyB,EAE9B,sBAAsB,EAUtB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EAOxB,KAAK,wBAAwB,EAE7B,KAAK,0CAA0C,EAI/C,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EAWjC,KAAK,qCAAqC,EAI1C,KAAK,8BAA8B,EACpC,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAI7E;;;;;;;;;;;;;;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;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,wBAAwB;IAWhC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;CAUlC"}
1
+ {"version":3,"file":"foundation-executor.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/foundation-executor.companion.service.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,gCAAgC,EAChC,sBAAsB,EAIvB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAA0B,KAAK,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AAChI,OAAO,EAA0J,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AAM5O,OAAO,EASL,KAAK,yBAAyB,EAE9B,sBAAsB,EAWtB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EAOxB,KAAK,wBAAwB,EAE7B,KAAK,0CAA0C,EAI/C,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EAWjC,KAAK,qCAAqC,EAI1C,KAAK,8BAA8B,EACpC,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAI7E;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mGAAmG;IACnG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,+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2B;IAwBzC;;;;;;OAMG;YACW,oBAAoB;IAwClC,uGAAuG;YACzF,0BAA0B;IAMxC,qHAAqH;YACvG,iCAAiC;IAI/C;;;;;;;;;;;;;;OAcG;YACW,qCAAqC;IA4EnD;;;;;;;OAOG;IACH,OAAO,CAAC,yBAAyB;IA2IjC;;;;;;;;;;OAUG;IACU,qCAAqC,IAAI,OAAO,CAAC,+BAA+B,GAAG,SAAS,CAAC;IA0B1G;;;;;;;;;;;;;OAaG;IACU,oCAAoC,CAAC,KAAK,GAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAiBtI;;;;;;;OAOG;YACW,gBAAgB;IAmC9B;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAgE1B;;;;;;;OAOG;IACH,OAAO,CAAC,gCAAgC;IA0BxC;;;;OAIG;YACW,sBAAsB;IAQpC;;;;;;OAMG;YACW,wBAAwB;IAgBtC,sGAAsG;IACtG,OAAO,CAAC,uCAAuC;IAkB/C;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B;IAyClC;;;;;;OAMG;IACH,OAAO,CAAC,2BAA2B;IAwDnC;;;;;;;;;;;;;;;;;;;;;;OAsBG;YACW,qBAAqB;IASnC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,eAAe;IAmDvB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,wBAAwB;IAWhC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;CAUlC"}
@@ -24,7 +24,7 @@ import { AppFrontendType, JurisdictionSlugListReadingKind, ProviderOriginKind, e
24
24
  import { AvailableLanguage, languagePathSegment } from '@wildo-ai/saas-models/public-runtime';
25
25
  import { engineProviderSpecifications } from '@wildo-ai/saas-specifications';
26
26
  import { loadEffectiveSystemOfRecordFacets, rereadDeclaredSystemOfRecordInstances } from './system-of-record-facet-library.companion.utils.js';
27
- import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, addProviderToScope, applyCompositionScenarioPlan, createCompositionTemplateRenderer, deriveEngineCapabilityPlan, deriveFoundationCompositionPlan, readEngineCapabilityEnabled, SAAS_CONFIG_FILE_NAME, creatorProviderAnswerFor, FoundationPrimaryScope, listCompositionScenarioDirectories, loadCompositionScenario, planCompositionScenario, ProviderPackageLinksService, readDeliveredOptInFrameworkPackages, resolveCompositionScenarioVariables, setEngineCapabilityEnabled, setProviderSelectionPrimary, layDownOperatorWithClients, applyLineAccessPosture, resolveCorporateIdentity, describeOwnerNamingDifference, renameOwnerToDomainPlanNames, composeOwnerOrganizationIdentityDeclaration, backendDeclaresSystemsOfRecordLibrary, deriveSystemOfRecordNeeds, describeSystemOfRecordCredentialsOwed, readSaasConfigOperatorWithClients, listSaasConfigOrganizationTypeRefs, setOrganizationTypeOwnsApplication, ORGANIZATION_IDENTITY_DECLARATION_FILE, propagateBrandAssets, DATA_RESIDENCY_TERRITORIES_QUESTION_REF, OPERATING_ENTITY_QUESTION_REF, OPERATING_JURISDICTIONS_QUESTION_REF, applyFoundationOperatorDeclarations, planFoundationOperatorDeclarations, FoundationDataResidencyState, applyFoundationDataResidency, planFoundationDataResidency, } from '@wildo-ai/application-creation-runtime';
27
+ import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, addProviderToScope, applyCompositionScenarioPlan, createCompositionTemplateRenderer, deriveEngineCapabilityPlan, deriveFoundationCompositionPlan, readEngineCapabilityEnabled, SAAS_CONFIG_FILE_NAME, creatorProviderAnswerFor, FoundationPrimaryScope, listCompositionScenarioDirectories, loadCompositionScenario, planCompositionScenario, ProviderPackageLinksService, linkableFrameworkCheckout, readDeliveredOptInFrameworkPackages, resolveCompositionScenarioVariables, setEngineCapabilityEnabled, setProviderSelectionPrimary, layDownOperatorWithClients, applyLineAccessPosture, resolveCorporateIdentity, describeOwnerNamingDifference, renameOwnerToDomainPlanNames, composeOwnerOrganizationIdentityDeclaration, backendDeclaresSystemsOfRecordLibrary, deriveSystemOfRecordNeeds, describeSystemOfRecordCredentialsOwed, readSaasConfigOperatorWithClients, listSaasConfigOrganizationTypeRefs, setOrganizationTypeOwnsApplication, ORGANIZATION_IDENTITY_DECLARATION_FILE, propagateBrandAssets, DATA_RESIDENCY_TERRITORIES_QUESTION_REF, OPERATING_ENTITY_QUESTION_REF, OPERATING_JURISDICTIONS_QUESTION_REF, applyFoundationOperatorDeclarations, planFoundationOperatorDeclarations, FoundationDataResidencyState, applyFoundationDataResidency, planFoundationDataResidency, } from '@wildo-ai/application-creation-runtime';
28
28
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
29
29
  import { assertSpecificationsReadWhole } from '../../core/context/companion-package-loaders.companion.js';
30
30
  import { loadSpecificationFamilyData } from '../../core/context/specification-family-data.companion.js';
@@ -491,8 +491,11 @@ let FoundationExecutorCompanionService = class FoundationExecutorCompanionServic
491
491
  */
492
492
  try {
493
493
  const frameworkPath = this.companionContext.resolvedHomes?.framework?.repositoryRoot ?? null;
494
- // Without a checkout, the opt-in records delivered with the templates (#3492); with one, the checkout's own.
495
- const deliveredOptIn = frameworkPath === null ? readDeliveredOptInFrameworkPackages(applicationRoot) : undefined;
494
+ // Without a checkout the application lives in, the opt-in records delivered with the templates (#3492); with one,
495
+ // the checkout's own. A known framework root the application is outside of is no checkout (#3903).
496
+ const deliveredOptIn = linkableFrameworkCheckout(applicationRoot, frameworkPath) === null
497
+ ? readDeliveredOptInFrameworkPackages(applicationRoot)
498
+ : undefined;
496
499
  const links = ProviderPackageLinksService.reconcileAndReport({
497
500
  applicationRoot,
498
501
  frameworkPath,