@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
@@ -0,0 +1,62 @@
1
+ /** Whether `git <args>` may run through the helper: its subcommand (after `-C`/`-c` and options) is read-only. */
2
+ export declare function isBrokerableGitInvocation(args: readonly string[]): boolean;
3
+ /** `execFile`'s options that a read-only git call uses, plus the stdin a `--batch` read is fed. */
4
+ export interface BrokeredGitOptions {
5
+ readonly maxBuffer?: number;
6
+ readonly timeout?: number;
7
+ /** The FULL environment, as `execFile` takes it; omitted, the helper's own (the companion's at the helper's start). */
8
+ readonly env?: Readonly<Record<string, string | undefined>>;
9
+ /** Written to git's stdin, which is then closed (`cat-file --batch`). Omitted, stdin is left as `execFile` leaves it. */
10
+ readonly input?: string;
11
+ }
12
+ /** A read answered as text (`execFile`'s default `utf8`). */
13
+ export interface BrokeredGitTextResult {
14
+ readonly stdout: string;
15
+ readonly stderr: string;
16
+ }
17
+ /** A read answered as bytes (`encoding: 'buffer'`): a blob, or `cat-file --batch` output. */
18
+ export interface BrokeredGitBufferResult {
19
+ readonly stdout: Buffer;
20
+ readonly stderr: Buffer;
21
+ }
22
+ /** A call the helper could not serve; the caller spawns directly instead. */
23
+ export declare class GitReadBrokerUnavailableError extends Error {
24
+ readonly name = "GitReadBrokerUnavailableError";
25
+ }
26
+ /** Consecutive helper failures after which the companion spawns read-only git directly for the rest of its life. */
27
+ export declare const MAXIMUM_BROKER_FAILURES = 3;
28
+ /** The companion's side of the helper. One per process ({@link gitReadBroker}); constructed directly by tests. */
29
+ export declare class GitReadBroker {
30
+ private helper;
31
+ private nextId;
32
+ private consecutiveFailures;
33
+ private readonly pending;
34
+ private readonly options;
35
+ constructor(options?: {
36
+ readonly entryPath?: string;
37
+ });
38
+ /**
39
+ * `git <args>` as `execFile` would run it, through the helper when it is read-only and the helper is available, and
40
+ * directly otherwise. Resolves `{ stdout, stderr }` as text; rejects with `execFile`'s error shape.
41
+ */
42
+ execGit(args: readonly string[], options?: BrokeredGitOptions): Promise<BrokeredGitTextResult>;
43
+ /** {@link execGit} answered as bytes (`execFile`'s `encoding: 'buffer'`): a blob, or a `--batch` read. */
44
+ execGitBuffer(args: readonly string[], options?: BrokeredGitOptions): Promise<BrokeredGitBufferResult>;
45
+ /** Whether the helper has been given up on for this process. For tests and logs. */
46
+ get disabled(): boolean;
47
+ /**
48
+ * Stop the helper (tests). A call it was serving is answered by a direct spawn, as when the helper dies. The companion
49
+ * itself never calls this: the helper exits when the companion's IPC channel closes, which the companion's exit does.
50
+ */
51
+ close(): void;
52
+ /** The helper's pid, or `undefined` when none runs. For tests. */
53
+ get helperPid(): number | undefined;
54
+ private run;
55
+ private viaHelper;
56
+ private ensureHelper;
57
+ /** Forget the helper and fail every call it was serving as unavailable, so each is answered by a direct spawn. */
58
+ private failPending;
59
+ }
60
+ /** The process's helper: one per companion. */
61
+ export declare const gitReadBroker: GitReadBroker;
62
+ //# sourceMappingURL=git-read-broker.companion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-read-broker.companion.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/git-read-broker.companion.ts"],"names":[],"mappings":"AAkDA,kHAAkH;AAClH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAW1E;AAED,mGAAmG;AACnG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,uHAAuH;IACvH,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC5D,yHAAyH;IACzH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,6FAA6F;AAC7F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAuFD,6EAA6E;AAC7E,qBAAa,6BAA8B,SAAQ,KAAK;IACtD,SAAyB,IAAI,mCAAmC;CACjE;AAED,oHAAoH;AACpH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,kHAAkH;AAClH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsG;IAE9H,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkC;gBAEvC,OAAO,GAAE;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO;IAIhE;;;OAGG;IACU,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAK/G,0GAA0G;IAC7F,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAKvH,oFAAoF;IACpF,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;;;OAGG;IACI,KAAK,IAAI,IAAI;IAOpB,kEAAkE;IAClE,IAAW,SAAS,IAAI,MAAM,GAAG,SAAS,CAEzC;YAEa,GAAG;IAWjB,OAAO,CAAC,SAAS;IA4BjB,OAAO,CAAC,YAAY;IAwCpB,kHAAkH;IAClH,OAAO,CAAC,WAAW;CAOpB;AAmBD,+CAA+C;AAC/C,eAAO,MAAM,aAAa,eAAsB,CAAC"}
@@ -0,0 +1,282 @@
1
+ import childProcess from 'node:child_process';
2
+ import { existsSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { describeCaughtError } from '@wildo-ai/saas-models/public-runtime';
5
+ /**
6
+ * Read-only `git` invocations, spawned by a small long-lived helper process instead of by the companion (#3204).
7
+ *
8
+ * ## Why
9
+ *
10
+ * Starting a process forks its parent, and on Linux the fork copies the parent's page tables while the calling thread
11
+ * waits. The companion runs with a 1.5–2 GB heap during a build, and measured on the reference VM one `git rev-parse`
12
+ * blocked a 2 GB process's main thread for 8.5 ms against 1.1 ms from a 50 MB one. The build's landing derivation and
13
+ * change-set reads run `git` about a dozen times a second, so a 90 s CPU profile of the reference run's companion
14
+ * (2026-11-14) spent 10 s of the main thread inside `spawn` for read-only git alone, while every workbench request waited.
15
+ * From a helper the companion pays one IPC message each way; the fork happens in a process with a few tens of MB.
16
+ *
17
+ * ## What it never does
18
+ *
19
+ * Only READ-ONLY git goes through it ({@link isBrokerableGitInvocation}): a subcommand the companion's write recording
20
+ * (`local-write-recording.companion.ts`) treats as unable to write anything a fingerprint reads. A write must stay a
21
+ * direct spawn, because that recording sees a subprocess only when the companion starts it, and a write it did not see
22
+ * would leave a derived input's fingerprint stale.
23
+ *
24
+ * ## Failing toward the direct spawn
25
+ *
26
+ * Every answer is the one `execFile` would give: the same stdout and stderr strings, and on failure an `Error` carrying
27
+ * `code`, `signal`, `killed`, `stdout` and `stderr`, with `execFile`'s own message. When the helper cannot start, exits or
28
+ * loses its channel, the call it was serving is retried as a direct spawn (a read-only command is safe to run twice), and
29
+ * the next call starts a fresh helper. After {@link MAXIMUM_BROKER_FAILURES} consecutive failures the companion spawns
30
+ * directly for the rest of its life.
31
+ *
32
+ * This module imports nothing but Node built-ins, so the helper can run from this `.ts` file under Node's type stripping
33
+ * (the companion under test, or run from source) as well as from the compiled `.js`.
34
+ */
35
+ /**
36
+ * Git subcommands that write nothing a fingerprint reads. THE one list: the write recording
37
+ * (`local-write-recording.companion.ts`) reads it through {@link isBrokerableGitInvocation} to decide which subprocesses
38
+ * cannot have written, and the helper may run only these.
39
+ *
40
+ * `status` may refresh `.git/index`, which no fingerprint reads (the creation plane signs `HEAD` and `logs/HEAD`). Kept
41
+ * narrow on purpose: a subcommand missing here costs one walk per fingerprint (and a direct spawn), a subcommand wrongly
42
+ * here costs a stale fingerprint.
43
+ */
44
+ const READ_ONLY_GIT_SUBCOMMANDS = new Set([
45
+ 'status', 'ls-files', 'rev-parse', 'log', 'show', 'diff', 'cat-file', 'ls-tree', 'for-each-ref', 'merge-base',
46
+ 'rev-list', 'describe', 'blame', 'grep', 'check-ignore', 'diff-tree', 'diff-index', 'name-rev',
47
+ ]);
48
+ /** Whether `git <args>` may run through the helper: its subcommand (after `-C`/`-c` and options) is read-only. */
49
+ export function isBrokerableGitInvocation(args) {
50
+ for (let index = 0; index < args.length; index += 1) {
51
+ const argument = args[index];
52
+ if (argument === '-C' || argument === '-c' || argument === '--git-dir' || argument === '--work-tree') {
53
+ index += 1;
54
+ continue;
55
+ }
56
+ if (argument.startsWith('-'))
57
+ continue;
58
+ return READ_ONLY_GIT_SUBCOMMANDS.has(argument);
59
+ }
60
+ return false;
61
+ }
62
+ /**
63
+ * `execFile` with this module's options, as every path here runs it (the helper, and the direct fallback): the text or
64
+ * the bytes, and the stdin a batch read is fed. The callback receives `execFile`'s own error, stdout and stderr.
65
+ */
66
+ function runExecFile(args, options, binary, callback) {
67
+ const child = childProcess.execFile('git', [...args], {
68
+ ...(binary ? { encoding: 'buffer' } : {}),
69
+ ...(options.maxBuffer !== undefined ? { maxBuffer: options.maxBuffer } : {}),
70
+ ...(options.timeout !== undefined ? { timeout: options.timeout } : {}),
71
+ ...(options.env !== undefined ? { env: options.env } : {}),
72
+ }, (error, stdout, stderr) => callback(error, stdout, stderr));
73
+ if (options.input !== undefined) {
74
+ // A child that died before the write finished settles through `execFile`'s own callback.
75
+ child.stdin?.on('error', () => undefined);
76
+ child.stdin?.end(options.input);
77
+ }
78
+ }
79
+ function asBuffer(output) {
80
+ if (output === undefined)
81
+ return Buffer.alloc(0);
82
+ return typeof output === 'string' ? Buffer.from(output) : Buffer.from(output.buffer, output.byteOffset, output.byteLength);
83
+ }
84
+ function asText(output) {
85
+ if (output === undefined)
86
+ return '';
87
+ return typeof output === 'string' ? output : asBuffer(output).toString('utf8');
88
+ }
89
+ /** Marks a process started by {@link GitReadBroker}, so importing this module elsewhere starts nothing. */
90
+ const GIT_READ_BROKER_ARGUMENT = '--wildo-git-read-broker';
91
+ // The helper's side: run each request with `execFile`, answer on the channel, and exit with the companion.
92
+ if (process.argv.includes(GIT_READ_BROKER_ARGUMENT) && typeof process.send === 'function') {
93
+ const send = process.send.bind(process);
94
+ process.on('disconnect', () => process.exit(0));
95
+ process.on('message', (request) => {
96
+ if (!isBrokerableGitInvocation(request.args)) {
97
+ send({ id: request.id, failure: { message: `git ${request.args.join(' ')} is not a read-only invocation; the helper refuses it` } });
98
+ return;
99
+ }
100
+ runExecFile(request.args, request.options, request.binary, (error, stdout, stderr) => {
101
+ if (error === null) {
102
+ send({ id: request.id, stdout, stderr });
103
+ return;
104
+ }
105
+ const failed = error;
106
+ send({
107
+ id: request.id,
108
+ failure: { message: failed.message, code: failed.code ?? null, signal: failed.signal ?? null, killed: failed.killed ?? false, stdout, stderr },
109
+ });
110
+ });
111
+ });
112
+ }
113
+ /** A call the helper could not serve; the caller spawns directly instead. */
114
+ export class GitReadBrokerUnavailableError extends Error {
115
+ name = 'GitReadBrokerUnavailableError';
116
+ }
117
+ /** Consecutive helper failures after which the companion spawns read-only git directly for the rest of its life. */
118
+ export const MAXIMUM_BROKER_FAILURES = 3;
119
+ /** The companion's side of the helper. One per process ({@link gitReadBroker}); constructed directly by tests. */
120
+ export class GitReadBroker {
121
+ helper;
122
+ nextId = 1;
123
+ consecutiveFailures = 0;
124
+ pending = new Map();
125
+ // A plain field, not a parameter property: this file runs under type stripping, which refuses non-erasable syntax.
126
+ options;
127
+ constructor(options = {}) {
128
+ this.options = options;
129
+ }
130
+ /**
131
+ * `git <args>` as `execFile` would run it, through the helper when it is read-only and the helper is available, and
132
+ * directly otherwise. Resolves `{ stdout, stderr }` as text; rejects with `execFile`'s error shape.
133
+ */
134
+ async execGit(args, options = {}) {
135
+ const { stdout, stderr } = await this.run(args, options, false);
136
+ return { stdout: asText(stdout), stderr: asText(stderr) };
137
+ }
138
+ /** {@link execGit} answered as bytes (`execFile`'s `encoding: 'buffer'`): a blob, or a `--batch` read. */
139
+ async execGitBuffer(args, options = {}) {
140
+ const { stdout, stderr } = await this.run(args, options, true);
141
+ return { stdout: asBuffer(stdout), stderr: asBuffer(stderr) };
142
+ }
143
+ /** Whether the helper has been given up on for this process. For tests and logs. */
144
+ get disabled() {
145
+ return this.consecutiveFailures >= MAXIMUM_BROKER_FAILURES;
146
+ }
147
+ /**
148
+ * Stop the helper (tests). A call it was serving is answered by a direct spawn, as when the helper dies. The companion
149
+ * itself never calls this: the helper exits when the companion's IPC channel closes, which the companion's exit does.
150
+ */
151
+ close() {
152
+ const helper = this.helper;
153
+ if (helper === undefined)
154
+ return;
155
+ this.failPending(helper, 'the git read helper was closed');
156
+ helper.disconnect?.();
157
+ }
158
+ /** The helper's pid, or `undefined` when none runs. For tests. */
159
+ get helperPid() {
160
+ return this.helper?.pid;
161
+ }
162
+ async run(args, options, binary) {
163
+ if (isBrokerableGitInvocation(args)) {
164
+ try {
165
+ return await this.viaHelper(args, options, binary);
166
+ }
167
+ catch (error) {
168
+ if (!(error instanceof GitReadBrokerUnavailableError))
169
+ throw error;
170
+ }
171
+ }
172
+ return directExecGit(args, options, binary);
173
+ }
174
+ viaHelper(args, options, binary) {
175
+ const helper = this.ensureHelper();
176
+ if (helper === undefined)
177
+ return Promise.reject(new GitReadBrokerUnavailableError('no git read helper is available'));
178
+ const id = this.nextId;
179
+ this.nextId += 1;
180
+ return new Promise((resolve, reject) => {
181
+ this.pending.set(id, { resolve, reject });
182
+ // Referenced only while a call is pending: an idle helper never keeps the companion alive.
183
+ if (this.pending.size === 1)
184
+ helper.channel?.ref?.();
185
+ try {
186
+ helper.send({ id, args, options, binary });
187
+ }
188
+ catch (error) {
189
+ this.pending.delete(id);
190
+ reject(new GitReadBrokerUnavailableError(`the git read helper could not be sent the call: ${describeCaughtError(error)}`));
191
+ }
192
+ }).then((response) => {
193
+ if (response.failure === undefined)
194
+ return { stdout: response.stdout ?? '', stderr: response.stderr ?? '' };
195
+ // `execFile`'s own error, rebuilt: its message, exit code, signal, and the output it had, in the caller's encoding.
196
+ throw Object.assign(new Error(response.failure.message), {
197
+ code: response.failure.code,
198
+ signal: response.failure.signal,
199
+ killed: response.failure.killed,
200
+ stdout: binary ? asBuffer(response.failure.stdout) : asText(response.failure.stdout),
201
+ stderr: binary ? asBuffer(response.failure.stderr) : asText(response.failure.stderr),
202
+ });
203
+ });
204
+ }
205
+ ensureHelper() {
206
+ if (this.helper !== undefined)
207
+ return this.helper;
208
+ if (this.disabled)
209
+ return undefined;
210
+ let helper;
211
+ try {
212
+ const entryPath = this.options.entryPath ?? resolveGitReadBrokerEntry();
213
+ /*
214
+ * `execArgv: []`: the companion's own flags (its heap size, its loaders) are not the helper's, and a large heap
215
+ * limit is exactly what the helper exists to avoid. Its environment is the companion's, so git sees the same one.
216
+ * `serialization: 'advanced'` carries a blob's bytes as bytes rather than as text that would have to be re-encoded.
217
+ */
218
+ helper = childProcess.fork(entryPath, [GIT_READ_BROKER_ARGUMENT], { execArgv: [], serialization: 'advanced', stdio: ['ignore', 'ignore', 'inherit', 'ipc'] });
219
+ }
220
+ catch {
221
+ this.consecutiveFailures += 1;
222
+ return undefined;
223
+ }
224
+ helper.unref();
225
+ helper.channel?.unref?.();
226
+ helper.on('message', (response) => {
227
+ const waiter = this.pending.get(response.id);
228
+ if (waiter === undefined)
229
+ return;
230
+ this.pending.delete(response.id);
231
+ if (this.pending.size === 0)
232
+ helper.channel?.unref?.();
233
+ this.consecutiveFailures = 0;
234
+ waiter.resolve(response);
235
+ });
236
+ const fail = (reason) => {
237
+ if (this.helper !== helper)
238
+ return;
239
+ this.consecutiveFailures += 1;
240
+ this.failPending(helper, reason);
241
+ // A failure that is not an exit (an error, a lost channel) can leave the process running: stop the one it forgot.
242
+ if (helper.exitCode === null && helper.signalCode === null)
243
+ helper.kill();
244
+ };
245
+ helper.on('error', (error) => fail(`the git read helper failed: ${error.message}`));
246
+ helper.on('exit', (code, signal) => fail(`the git read helper exited (code ${String(code)}, signal ${String(signal)})`));
247
+ helper.on('disconnect', () => fail('the git read helper lost its channel'));
248
+ this.helper = helper;
249
+ return helper;
250
+ }
251
+ /** Forget the helper and fail every call it was serving as unavailable, so each is answered by a direct spawn. */
252
+ failPending(helper, reason) {
253
+ if (this.helper !== helper)
254
+ return;
255
+ this.helper = undefined;
256
+ const waiters = [...this.pending.values()];
257
+ this.pending.clear();
258
+ for (const waiter of waiters)
259
+ waiter.reject(new GitReadBrokerUnavailableError(reason));
260
+ }
261
+ }
262
+ /** The direct spawn: what every call did before the helper, and the fallback when it cannot serve. */
263
+ function directExecGit(args, options, binary) {
264
+ return new Promise((resolve, reject) => {
265
+ runExecFile(args, options, binary, (error, stdout, stderr) => {
266
+ if (error === null)
267
+ resolve({ stdout, stderr });
268
+ else
269
+ reject(Object.assign(error, { stdout, stderr }));
270
+ });
271
+ });
272
+ }
273
+ /** This module's own file: the compiled `.js` in a build, the `.ts` when the companion runs from source. */
274
+ function resolveGitReadBrokerEntry() {
275
+ const own = fileURLToPath(import.meta.url);
276
+ if (existsSync(own))
277
+ return own;
278
+ throw new GitReadBrokerUnavailableError(`the git read helper entry ${own} does not exist`);
279
+ }
280
+ /** The process's helper: one per companion. */
281
+ export const gitReadBroker = new GitReadBroker();
282
+ //# sourceMappingURL=git-read-broker.companion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-read-broker.companion.js","sourceRoot":"","sources":["../../../../src/core/utils/git-read-broker.companion.ts"],"names":[],"mappings":"AAAA,OAAO,YAAmC,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;GAQG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY;IAC7G,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU;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GAAsG;AACtG,SAAS,aAAa,CAAC,IAAuB,EAAE,OAA2B,EAAE,MAAe;IAC1F,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YAC3D,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;;gBAC3C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,4GAA4G;AAC5G,SAAS,yBAAyB;IAChC,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IAChC,MAAM,IAAI,6BAA6B,CAAC,6BAA6B,GAAG,iBAAiB,CAAC,CAAC;AAC7F,CAAC;AAED,+CAA+C;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import childProcess, { type ChildProcess } from 'node:child_process';\nimport { existsSync } from 'node:fs';\nimport { fileURLToPath } from 'node:url';\nimport { describeCaughtError } from '@wildo-ai/saas-models/public-runtime';\n\n/**\n * Read-only `git` invocations, spawned by a small long-lived helper process instead of by the companion (#3204).\n *\n * ## Why\n *\n * Starting a process forks its parent, and on Linux the fork copies the parent's page tables while the calling thread\n * waits. The companion runs with a 1.5–2 GB heap during a build, and measured on the reference VM one `git rev-parse`\n * blocked a 2 GB process's main thread for 8.5 ms against 1.1 ms from a 50 MB one. The build's landing derivation and\n * change-set reads run `git` about a dozen times a second, so a 90 s CPU profile of the reference run's companion\n * (2026-11-14) spent 10 s of the main thread inside `spawn` for read-only git alone, while every workbench request waited.\n * From a helper the companion pays one IPC message each way; the fork happens in a process with a few tens of MB.\n *\n * ## What it never does\n *\n * Only READ-ONLY git goes through it ({@link isBrokerableGitInvocation}): a subcommand the companion's write recording\n * (`local-write-recording.companion.ts`) treats as unable to write anything a fingerprint reads. A write must stay a\n * direct spawn, because that recording sees a subprocess only when the companion starts it, and a write it did not see\n * would leave a derived input's fingerprint stale.\n *\n * ## Failing toward the direct spawn\n *\n * Every answer is the one `execFile` would give: the same stdout and stderr strings, and on failure an `Error` carrying\n * `code`, `signal`, `killed`, `stdout` and `stderr`, with `execFile`'s own message. When the helper cannot start, exits or\n * loses its channel, the call it was serving is retried as a direct spawn (a read-only command is safe to run twice), and\n * the next call starts a fresh helper. After {@link MAXIMUM_BROKER_FAILURES} consecutive failures the companion spawns\n * directly for the rest of its life.\n *\n * This module imports nothing but Node built-ins, so the helper can run from this `.ts` file under Node's type stripping\n * (the companion under test, or run from source) as well as from the compiled `.js`.\n */\n\n/**\n * Git subcommands that write nothing a fingerprint reads. THE one list: the write recording\n * (`local-write-recording.companion.ts`) reads it through {@link isBrokerableGitInvocation} to decide which subprocesses\n * cannot have written, and the helper may run only these.\n *\n * `status` may refresh `.git/index`, which no fingerprint reads (the creation plane signs `HEAD` and `logs/HEAD`). Kept\n * narrow on purpose: a subcommand missing here costs one walk per fingerprint (and a direct spawn), a subcommand wrongly\n * here costs a stale fingerprint.\n */\nconst READ_ONLY_GIT_SUBCOMMANDS: ReadonlySet<string> = new Set([\n 'status', 'ls-files', 'rev-parse', 'log', 'show', 'diff', 'cat-file', 'ls-tree', 'for-each-ref', 'merge-base',\n 'rev-list', 'describe', 'blame', 'grep', 'check-ignore', 'diff-tree', 'diff-index', 'name-rev',\n]);\n\n/** Whether `git <args>` may run through the helper: its subcommand (after `-C`/`-c` and options) is read-only. */\nexport function isBrokerableGitInvocation(args: readonly string[]): boolean {\n for (let index = 0; index < args.length; index += 1) {\n const argument = args[index]!;\n if (argument === '-C' || argument === '-c' || argument === '--git-dir' || argument === '--work-tree') {\n index += 1;\n continue;\n }\n if (argument.startsWith('-')) continue;\n return READ_ONLY_GIT_SUBCOMMANDS.has(argument);\n }\n return false;\n}\n\n/** `execFile`'s options that a read-only git call uses, plus the stdin a `--batch` read is fed. */\nexport interface BrokeredGitOptions {\n readonly maxBuffer?: number;\n readonly timeout?: number;\n /** The FULL environment, as `execFile` takes it; omitted, the helper's own (the companion's at the helper's start). */\n readonly env?: Readonly<Record<string, string | undefined>>;\n /** Written to git's stdin, which is then closed (`cat-file --batch`). Omitted, stdin is left as `execFile` leaves it. */\n readonly input?: string;\n}\n\n/** A read answered as text (`execFile`'s default `utf8`). */\nexport interface BrokeredGitTextResult {\n readonly stdout: string;\n readonly stderr: string;\n}\n\n/** A read answered as bytes (`encoding: 'buffer'`): a blob, or `cat-file --batch` output. */\nexport interface BrokeredGitBufferResult {\n readonly stdout: Buffer;\n readonly stderr: Buffer;\n}\n\n/** What crosses the channel: `serialization: 'advanced'` carries a `Buffer` as a `Uint8Array`, a string as itself. */\ntype Output = string | Uint8Array;\n\ninterface BrokerRequest {\n readonly id: number;\n readonly args: readonly string[];\n readonly options: BrokeredGitOptions;\n readonly binary: boolean;\n}\n\ninterface BrokerFailure {\n readonly message: string;\n readonly code?: number | string | null;\n readonly signal?: string | null;\n readonly killed?: boolean;\n readonly stdout?: Output;\n readonly stderr?: Output;\n}\n\ninterface BrokerResponse {\n readonly id: number;\n readonly stdout?: Output;\n readonly stderr?: Output;\n readonly failure?: BrokerFailure;\n}\n\n/**\n * `execFile` with this module's options, as every path here runs it (the helper, and the direct fallback): the text or\n * the bytes, and the stdin a batch read is fed. The callback receives `execFile`'s own error, stdout and stderr.\n */\nfunction runExecFile(\n args: readonly string[],\n options: BrokeredGitOptions,\n binary: boolean,\n callback: (error: Error | null, stdout: Output, stderr: Output) => void,\n): void {\n const child = childProcess.execFile('git', [...args], {\n ...(binary ? { encoding: 'buffer' as const } : {}),\n ...(options.maxBuffer !== undefined ? { maxBuffer: options.maxBuffer } : {}),\n ...(options.timeout !== undefined ? { timeout: options.timeout } : {}),\n ...(options.env !== undefined ? { env: options.env as NodeJS.ProcessEnv } : {}),\n }, (error, stdout, stderr) => callback(error, stdout as Output, stderr as Output));\n if (options.input !== undefined) {\n // A child that died before the write finished settles through `execFile`'s own callback.\n child.stdin?.on('error', () => undefined);\n child.stdin?.end(options.input);\n }\n}\n\nfunction asBuffer(output: Output | undefined): Buffer {\n if (output === undefined) return Buffer.alloc(0);\n return typeof output === 'string' ? Buffer.from(output) : Buffer.from(output.buffer, output.byteOffset, output.byteLength);\n}\n\nfunction asText(output: Output | undefined): string {\n if (output === undefined) return '';\n return typeof output === 'string' ? output : asBuffer(output).toString('utf8');\n}\n\n/** Marks a process started by {@link GitReadBroker}, so importing this module elsewhere starts nothing. */\nconst GIT_READ_BROKER_ARGUMENT = '--wildo-git-read-broker';\n\n// The helper's side: run each request with `execFile`, answer on the channel, and exit with the companion.\nif (process.argv.includes(GIT_READ_BROKER_ARGUMENT) && typeof process.send === 'function') {\n const send = process.send.bind(process);\n process.on('disconnect', () => process.exit(0));\n process.on('message', (request: BrokerRequest) => {\n if (!isBrokerableGitInvocation(request.args)) {\n send({ id: request.id, failure: { message: `git ${request.args.join(' ')} is not a read-only invocation; the helper refuses it` } } satisfies BrokerResponse);\n return;\n }\n runExecFile(request.args, request.options, request.binary, (error, stdout, stderr) => {\n if (error === null) {\n send({ id: request.id, stdout, stderr } satisfies BrokerResponse);\n return;\n }\n const failed = error as Error & { code?: number | string | null; signal?: string | null; killed?: boolean };\n send({\n id: request.id,\n failure: { message: failed.message, code: failed.code ?? null, signal: failed.signal ?? null, killed: failed.killed ?? false, stdout, stderr },\n } satisfies BrokerResponse);\n });\n });\n}\n\n/** A call the helper could not serve; the caller spawns directly instead. */\nexport class GitReadBrokerUnavailableError extends Error {\n public override readonly name = 'GitReadBrokerUnavailableError';\n}\n\n/** Consecutive helper failures after which the companion spawns read-only git directly for the rest of its life. */\nexport const MAXIMUM_BROKER_FAILURES = 3;\n\n/** The companion's side of the helper. One per process ({@link gitReadBroker}); constructed directly by tests. */\nexport class GitReadBroker {\n private helper: ChildProcess | undefined;\n private nextId = 1;\n private consecutiveFailures = 0;\n private readonly pending = new Map<number, { resolve: (response: BrokerResponse) => void; reject: (error: Error) => void }>();\n // A plain field, not a parameter property: this file runs under type stripping, which refuses non-erasable syntax.\n private readonly options: { readonly entryPath?: string };\n\n public constructor(options: { readonly entryPath?: string } = {}) {\n this.options = options;\n }\n\n /**\n * `git <args>` as `execFile` would run it, through the helper when it is read-only and the helper is available, and\n * directly otherwise. Resolves `{ stdout, stderr }` as text; rejects with `execFile`'s error shape.\n */\n public async execGit(args: readonly string[], options: BrokeredGitOptions = {}): Promise<BrokeredGitTextResult> {\n const { stdout, stderr } = await this.run(args, options, false);\n return { stdout: asText(stdout), stderr: asText(stderr) };\n }\n\n /** {@link execGit} answered as bytes (`execFile`'s `encoding: 'buffer'`): a blob, or a `--batch` read. */\n public async execGitBuffer(args: readonly string[], options: BrokeredGitOptions = {}): Promise<BrokeredGitBufferResult> {\n const { stdout, stderr } = await this.run(args, options, true);\n return { stdout: asBuffer(stdout), stderr: asBuffer(stderr) };\n }\n\n /** Whether the helper has been given up on for this process. For tests and logs. */\n public get disabled(): boolean {\n return this.consecutiveFailures >= MAXIMUM_BROKER_FAILURES;\n }\n\n /**\n * Stop the helper (tests). A call it was serving is answered by a direct spawn, as when the helper dies. The companion\n * itself never calls this: the helper exits when the companion's IPC channel closes, which the companion's exit does.\n */\n public close(): void {\n const helper = this.helper;\n if (helper === undefined) return;\n this.failPending(helper, 'the git read helper was closed');\n helper.disconnect?.();\n }\n\n /** The helper's pid, or `undefined` when none runs. For tests. */\n public get helperPid(): number | undefined {\n return this.helper?.pid;\n }\n\n private async run(args: readonly string[], options: BrokeredGitOptions, binary: boolean): Promise<{ stdout: Output; stderr: Output }> {\n if (isBrokerableGitInvocation(args)) {\n try {\n return await this.viaHelper(args, options, binary);\n } catch (error) {\n if (!(error instanceof GitReadBrokerUnavailableError)) throw error;\n }\n }\n return directExecGit(args, options, binary);\n }\n\n private viaHelper(args: readonly string[], options: BrokeredGitOptions, binary: boolean): Promise<{ stdout: Output; stderr: Output }> {\n const helper = this.ensureHelper();\n if (helper === undefined) return Promise.reject(new GitReadBrokerUnavailableError('no git read helper is available'));\n const id = this.nextId;\n this.nextId += 1;\n return new Promise<BrokerResponse>((resolve, reject) => {\n this.pending.set(id, { resolve, reject });\n // Referenced only while a call is pending: an idle helper never keeps the companion alive.\n if (this.pending.size === 1) helper.channel?.ref?.();\n try {\n helper.send({ id, args, options, binary } satisfies BrokerRequest);\n } catch (error) {\n this.pending.delete(id);\n reject(new GitReadBrokerUnavailableError(`the git read helper could not be sent the call: ${describeCaughtError(error)}`));\n }\n }).then((response) => {\n if (response.failure === undefined) return { stdout: response.stdout ?? '', stderr: response.stderr ?? '' };\n // `execFile`'s own error, rebuilt: its message, exit code, signal, and the output it had, in the caller's encoding.\n throw Object.assign(new Error(response.failure.message), {\n code: response.failure.code,\n signal: response.failure.signal,\n killed: response.failure.killed,\n stdout: binary ? asBuffer(response.failure.stdout) : asText(response.failure.stdout),\n stderr: binary ? asBuffer(response.failure.stderr) : asText(response.failure.stderr),\n });\n });\n }\n\n private ensureHelper(): ChildProcess | undefined {\n if (this.helper !== undefined) return this.helper;\n if (this.disabled) return undefined;\n let helper: ChildProcess;\n try {\n const entryPath = this.options.entryPath ?? resolveGitReadBrokerEntry();\n /*\n * `execArgv: []`: the companion's own flags (its heap size, its loaders) are not the helper's, and a large heap\n * limit is exactly what the helper exists to avoid. Its environment is the companion's, so git sees the same one.\n * `serialization: 'advanced'` carries a blob's bytes as bytes rather than as text that would have to be re-encoded.\n */\n helper = childProcess.fork(entryPath, [GIT_READ_BROKER_ARGUMENT], { execArgv: [], serialization: 'advanced', stdio: ['ignore', 'ignore', 'inherit', 'ipc'] });\n } catch {\n this.consecutiveFailures += 1;\n return undefined;\n }\n helper.unref();\n helper.channel?.unref?.();\n helper.on('message', (response: BrokerResponse) => {\n const waiter = this.pending.get(response.id);\n if (waiter === undefined) return;\n this.pending.delete(response.id);\n if (this.pending.size === 0) helper.channel?.unref?.();\n this.consecutiveFailures = 0;\n waiter.resolve(response);\n });\n const fail = (reason: string): void => {\n if (this.helper !== helper) return;\n this.consecutiveFailures += 1;\n this.failPending(helper, reason);\n // A failure that is not an exit (an error, a lost channel) can leave the process running: stop the one it forgot.\n if (helper.exitCode === null && helper.signalCode === null) helper.kill();\n };\n helper.on('error', (error: Error) => fail(`the git read helper failed: ${error.message}`));\n helper.on('exit', (code, signal) => fail(`the git read helper exited (code ${String(code)}, signal ${String(signal)})`));\n helper.on('disconnect', () => fail('the git read helper lost its channel'));\n this.helper = helper;\n return helper;\n }\n\n /** Forget the helper and fail every call it was serving as unavailable, so each is answered by a direct spawn. */\n private failPending(helper: ChildProcess, reason: string): void {\n if (this.helper !== helper) return;\n this.helper = undefined;\n const waiters = [...this.pending.values()];\n this.pending.clear();\n for (const waiter of waiters) waiter.reject(new GitReadBrokerUnavailableError(reason));\n }\n}\n\n/** The direct spawn: what every call did before the helper, and the fallback when it cannot serve. */\nfunction directExecGit(args: readonly string[], options: BrokeredGitOptions, binary: boolean): Promise<{ stdout: Output; stderr: Output }> {\n return new Promise((resolve, reject) => {\n runExecFile(args, options, binary, (error, stdout, stderr) => {\n if (error === null) resolve({ stdout, stderr });\n else reject(Object.assign(error, { stdout, stderr }));\n });\n });\n}\n\n/** This module's own file: the compiled `.js` in a build, the `.ts` when the companion runs from source. */\nfunction resolveGitReadBrokerEntry(): string {\n const own = fileURLToPath(import.meta.url);\n if (existsSync(own)) return own;\n throw new GitReadBrokerUnavailableError(`the git read helper entry ${own} does not exist`);\n}\n\n/** The process's helper: one per companion. */\nexport const gitReadBroker = new GitReadBroker();\n"]}
@@ -9,7 +9,14 @@ export interface LocalWriteSink {
9
9
  }
10
10
  /** Route recorded writes to `next` (the watcher's generations), or nowhere. */
11
11
  export declare function setLocalWriteSink(next: LocalWriteSink | undefined): void;
12
- /** Whether a subprocess cannot have written anything a fingerprint reads. */
12
+ /**
13
+ * Whether a subprocess cannot have written anything a fingerprint reads: a `git` whose subcommand is in the read-only set.
14
+ * Every other subprocess (another git subcommand, the CLI, a generator, a coding agent, a package manager) is taken to
15
+ * have possibly written.
16
+ *
17
+ * The set lives with the git read helper (`git-read-broker.companion.ts`, #3204), which may spawn only what this says is
18
+ * read-only: one list, so the helper can never run a git invocation this recording would have had to see.
19
+ */
13
20
  export declare function subprocessIsReadOnly(command: string, args: readonly string[]): boolean;
14
21
  /**
15
22
  * Record every file this process writes, the moment the write completes, and every subprocess that may have written
@@ -1 +1 @@
1
- {"version":3,"file":"local-write-recording.companion.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/local-write-recording.companion.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,qDAAqD;IACrD,mBAAmB,IAAI,IAAI,CAAC;CAC7B;AAKD,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAExE;AAeD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAYtF;AAyBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAgGjD"}
1
+ {"version":3,"file":"local-write-recording.companion.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/local-write-recording.companion.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,qDAAqD;IACrD,mBAAmB,IAAI,IAAI,CAAC;CAC7B;AAKD,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAExE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAEtF;AAyBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAgGjD"}
@@ -7,6 +7,7 @@ import { basename } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { promisify } from 'node:util';
9
9
  import { realPathOrProjection } from './derived-input-change-feed.companion.utils.js';
10
+ import { isBrokerableGitInvocation } from './git-read-broker.companion.js';
10
11
  let sink;
11
12
  let installed = false;
12
13
  /** Route recorded writes to `next` (the watcher's generations), or nowhere. */
@@ -14,32 +15,15 @@ export function setLocalWriteSink(next) {
14
15
  sink = next;
15
16
  }
16
17
  /**
17
- * Git subcommands that write nothing a fingerprint reads. Every other subprocess (another git subcommand, the CLI, a
18
- * generator, a coding agent, a package manager) is taken to have possibly written.
18
+ * Whether a subprocess cannot have written anything a fingerprint reads: a `git` whose subcommand is in the read-only set.
19
+ * Every other subprocess (another git subcommand, the CLI, a generator, a coding agent, a package manager) is taken to
20
+ * have possibly written.
19
21
  *
20
- * `status` may refresh `.git/index`, which no fingerprint reads (the creation plane signs `HEAD` and `logs/HEAD`). Kept
21
- * narrow on purpose: a subcommand missing here costs one walk per fingerprint, a subcommand wrongly here costs a
22
- * stale fingerprint.
22
+ * The set lives with the git read helper (`git-read-broker.companion.ts`, #3204), which may spawn only what this says is
23
+ * read-only: one list, so the helper can never run a git invocation this recording would have had to see.
23
24
  */
24
- const READ_ONLY_GIT_SUBCOMMANDS = new Set([
25
- 'status', 'ls-files', 'rev-parse', 'log', 'show', 'diff', 'cat-file', 'ls-tree', 'for-each-ref', 'merge-base',
26
- 'rev-list', 'describe', 'blame', 'grep', 'check-ignore', 'diff-tree', 'diff-index', 'name-rev',
27
- ]);
28
- /** Whether a subprocess cannot have written anything a fingerprint reads. */
29
25
  export function subprocessIsReadOnly(command, args) {
30
- if (basename(command) !== 'git')
31
- return false;
32
- for (let index = 0; index < args.length; index += 1) {
33
- const argument = args[index];
34
- if (argument === '-C' || argument === '-c' || argument === '--git-dir' || argument === '--work-tree') {
35
- index += 1;
36
- continue;
37
- }
38
- if (argument.startsWith('-'))
39
- continue;
40
- return READ_ONLY_GIT_SUBCOMMANDS.has(argument);
41
- }
42
- return false;
26
+ return basename(command) === 'git' && isBrokerableGitInvocation(args);
43
27
  }
44
28
  function pathOf(value) {
45
29
  if (typeof value === 'string')
@@ -1 +1 @@
1
- {"version":3,"file":"local-write-recording.companion.js","sourceRoot":"","sources":["../../../../src/core/utils/local-write-recording.companion.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,qHAAqH;AACrH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAYnF,IAAI,IAAgC,CAAC;AACrC,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,+EAA+E;AAC/E,MAAM,UAAU,iBAAiB,CAAC,IAAgC;IAChE,IAAI,GAAG,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAA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AI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE;gBAChD,KAAK,EAAE,SAAS,0BAA0B,CAAgB,GAAG,IAAe;oBAC1E,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAsE,CAAC;oBAChH,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;oBACrD,OAAO,OAAO,CAAC;gBACjB,CAAC;aACF,CAAC,CAAC;QACL,CAAC;QACD,aAAa,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACjC,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,CAAC;QAC7D,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAE,CAAC;QACtC,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,sBAAsB,CAAgB,GAAG,IAAe;YACrF,IAAI,CAAC;gBACH,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;oBAAS,CAAC;gBACT,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IACD,qBAAqB,EAAE,CAAC;AAC1B,CAAC","sourcesContent":["// The DEFAULT imports on purpose: they are the mutable CommonJS module objects every caller reaches, and the place the\n// patches below must go. `import * as` would be an ES module namespace, which is frozen, and assigning to it throws.\nimport childProcess from 'node:child_process';\nimport fs from 'node:fs';\nimport { syncBuiltinESMExports } from 'node:module';\nimport { basename } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { promisify } from 'node:util';\n\nimport { realPathOrProjection } from './derived-input-change-feed.companion.utils';\n\n/**\n * Where the companion's own writes are recorded: the change feed's generations, once the source watcher runs.\n */\nexport interface LocalWriteSink {\n /** A path this process just finished writing, renaming, creating or removing (a real path). */\n noteLocalWrite(path: string): void;\n /** A subprocess that may have written just ended. */\n noteSubprocessEnded(): void;\n}\n\nlet sink: LocalWriteSink | undefined;\nlet installed = false;\n\n/** Route recorded writes to `next` (the watcher's generations), or nowhere. */\nexport function setLocalWriteSink(next: LocalWriteSink | undefined): void {\n sink = next;\n}\n\n/**\n * Git subcommands that write nothing a fingerprint reads. Every other subprocess (another git subcommand, the CLI, a\n * generator, a coding agent, a package manager) is taken to have possibly written.\n *\n * `status` may refresh `.git/index`, which no fingerprint reads (the creation plane signs `HEAD` and `logs/HEAD`). Kept\n * narrow on purpose: a subcommand missing here costs one walk per fingerprint, a subcommand wrongly here costs a\n * stale fingerprint.\n */\nconst READ_ONLY_GIT_SUBCOMMANDS: ReadonlySet<string> = new Set([\n 'status', 'ls-files', 'rev-parse', 'log', 'show', 'diff', 'cat-file', 'ls-tree', 'for-each-ref', 'merge-base',\n 'rev-list', 'describe', 'blame', 'grep', 'check-ignore', 'diff-tree', 'diff-index', 'name-rev',\n]);\n\n/** Whether a subprocess cannot have written anything a fingerprint reads. */\nexport function subprocessIsReadOnly(command: string, args: readonly string[]): boolean {\n if (basename(command) !== 'git') return false;\n for (let index = 0; index < args.length; index += 1) {\n const argument = args[index]!;\n if (argument === '-C' || argument === '-c' || argument === '--git-dir' || argument === '--work-tree') {\n index += 1;\n continue;\n }\n if (argument.startsWith('-')) continue;\n return READ_ONLY_GIT_SUBCOMMANDS.has(argument);\n }\n return false;\n}\n\nfunction pathOf(value: unknown): string | undefined {\n if (typeof value === 'string') return value;\n if (value instanceof URL) return value.protocol === 'file:' ? fileURLToPath(value) : undefined;\n if (Buffer.isBuffer(value)) return value.toString();\n return undefined;\n}\n\nfunction record(values: readonly unknown[]): void {\n if (sink === undefined) return;\n for (const value of values) {\n const path = pathOf(value);\n if (path !== undefined) sink.noteLocalWrite(realPathOrProjection(path));\n }\n}\n\n/** The arguments of each write operation that name a path it changes, by index. */\nconst WRITE_OPERATIONS: Readonly<Record<string, readonly number[]>> = {\n writeFile: [0], appendFile: [0], rename: [0, 1], unlink: [0], rm: [0], rmdir: [0], mkdir: [0], copyFile: [1],\n cp: [1], symlink: [1], link: [1], truncate: [0], utimes: [0], lutimes: [0], mkdtemp: [],\n};\n\ntype AnyFunction = (...args: unknown[]) => unknown;\n\n/**\n * Record every file this process writes, the moment the write completes, and every subprocess that may have written\n * (#3452 second review M2).\n *\n * ## Why at the `fs` boundary\n *\n * The change feed learns of a write from the watcher, 6-15 ms after it happens. The companion itself writes inputs it\n * reads back at once: a specification file it lands, label files, the brand module, and the outputs of the generators it\n * awaits (`wildo db generate`, `design-tokens generate`). Without this, a fingerprint read right after such a write is\n * the one taken before it. The writers are spread over 32 files; recording them one by one is a list that drifts the\n * first time someone adds a writer (`.claude/rules/invariant-call-site-enumeration.md`), so the record is taken where\n * every write passes: the `fs` functions and their promise forms, and the `child_process` functions.\n *\n * Installed by the entry's second import (`install-local-write-recording.companion.ts`), before any other module\n * captures an `fs` function, and synced into ES-module named imports with `syncBuiltinESMExports`. Never on import of this\n * module, so a test that imports the watcher does not patch its own process. A write made through a file DESCRIPTOR (`fs.write` on an fd) names no path\n * and is not recorded; its file is reached by a recorded `rename` when it is atomic, and otherwise by the watcher's event.\n *\n * The record only ever makes a fingerprint walk sooner. It decides nothing about the write and cannot fail it: the\n * original function runs exactly as before, and the record happens after it.\n */\nexport function installLocalWriteRecording(): void {\n if (installed) return;\n installed = true;\n const fsModule = fs as unknown as Record<string, AnyFunction>;\n const promises = fs.promises as unknown as Record<string, AnyFunction>;\n for (const [name, pathIndexes] of Object.entries(WRITE_OPERATIONS)) {\n const paths = (args: readonly unknown[]): unknown[] => pathIndexes.map((index) => args[index]);\n const callbackForm = fsModule[name];\n if (typeof callbackForm === 'function') {\n fsModule[name] = function recordedCallbackForm(this: unknown, ...args: unknown[]) {\n const last = args.length - 1;\n if (last >= 0 && typeof args[last] === 'function') {\n const callback = args[last] as AnyFunction;\n const targets = paths(args);\n args[last] = (...results: unknown[]) => {\n if (results[0] === null || results[0] === undefined) record(targets);\n return callback(...results);\n };\n }\n return callbackForm.apply(this, args);\n };\n }\n const syncForm = fsModule[`${name}Sync`];\n if (typeof syncForm === 'function') {\n fsModule[`${name}Sync`] = function recordedSyncForm(this: unknown, ...args: unknown[]) {\n const result = syncForm.apply(this, args);\n record(paths(args));\n return result;\n };\n }\n const promiseForm = promises[name];\n if (typeof promiseForm === 'function') {\n promises[name] = function recordedPromiseForm(this: unknown, ...args: unknown[]) {\n return (promiseForm.apply(this, args) as Promise<unknown>).then((result) => {\n record(paths(args));\n return result;\n });\n };\n }\n }\n const createWriteStream = fsModule.createWriteStream!;\n fsModule.createWriteStream = function recordedCreateWriteStream(this: unknown, ...args: unknown[]) {\n const stream = createWriteStream.apply(this, args) as fs.WriteStream;\n stream.once('close', () => record([args[0]]));\n return stream;\n };\n\n const processModule = childProcess as unknown as Record<string, AnyFunction>;\n const commandOf = (name: string, args: readonly unknown[]): { command: string; argv: string[] } => {\n if (name === 'exec' || name === 'execSync') {\n const words = String(args[0] ?? '').trim().split(/\\s+/u);\n return { command: words[0] ?? '', argv: words.slice(1) };\n }\n if (name === 'fork') return { command: 'node', argv: [] };\n return { command: String(args[0] ?? ''), argv: Array.isArray(args[1]) ? args[1].map(String) : [] };\n };\n const ended = (name: string, args: readonly unknown[]): void => {\n const { command, argv } = commandOf(name, args);\n if (!subprocessIsReadOnly(command, argv)) sink?.noteSubprocessEnded();\n };\n for (const name of ['spawn', 'execFile', 'exec', 'fork']) {\n const original = processModule[name]!;\n const recorded = function recordedSubprocess(this: unknown, ...args: unknown[]) {\n const child = original.apply(this, args) as childProcess.ChildProcess;\n child.once('exit', () => ended(name, args));\n return child;\n };\n /*\n * `execFile` and `exec` carry Node's own promise form (`util.promisify.custom`), resolving to `{ stdout, stderr }`.\n * A wrapper without it makes every `promisify(execFile)` evaluated after this install resolve to the bare stdout, so\n * `const { stdout } = await …` reads `undefined` (#3204, reference run 42486534966: every git read of the playbook\n * write register threw, and no playbook result was ever accepted). So the wrapper keeps that form, recording the end.\n */\n const promised = (original as unknown as Record<symbol, AnyFunction | undefined>)[promisify.custom];\n if (promised !== undefined) {\n Object.defineProperty(recorded, promisify.custom, {\n value: function recordedPromisedSubprocess(this: unknown, ...args: unknown[]) {\n const promise = promised.apply(this, args) as Promise<unknown> & { readonly child?: childProcess.ChildProcess };\n promise.child?.once('exit', () => ended(name, args));\n return promise;\n },\n });\n }\n processModule[name] = recorded;\n }\n for (const name of ['spawnSync', 'execFileSync', 'execSync']) {\n const original = processModule[name]!;\n processModule[name] = function recordedSyncSubprocess(this: unknown, ...args: unknown[]) {\n try {\n return original.apply(this, args);\n } finally {\n ended(name, args);\n }\n };\n }\n syncBuiltinESMExports();\n}\n\n"]}
1
+ {"version":3,"file":"local-write-recording.companion.js","sourceRoot":"","sources":["../../../../src/core/utils/local-write-recording.companion.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,qHAAqH;AACrH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAYxE,IAAI,IAAgC,CAAC;AACrC,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,+EAA+E;AAC/E,MAAM,UAAU,iBAAiB,CAAC,IAAgC;IAChE,IAAI,GAAG,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,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IAAI,CAAC,GAAG,SAAS,sBAAsB,CAAgB,GAAG,IAAe;YACrF,IAAI,CAAC;gBACH,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;oBAAS,CAAC;gBACT,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IACD,qBAAqB,EAAE,CAAC;AAC1B,CAAC","sourcesContent":["// The DEFAULT imports on purpose: they are the mutable CommonJS module objects every caller reaches, and the place the\n// patches below must go. `import * as` would be an ES module namespace, which is frozen, and assigning to it throws.\nimport childProcess from 'node:child_process';\nimport fs from 'node:fs';\nimport { syncBuiltinESMExports } from 'node:module';\nimport { basename } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { promisify } from 'node:util';\n\nimport { realPathOrProjection } from './derived-input-change-feed.companion.utils';\nimport { isBrokerableGitInvocation } from './git-read-broker.companion';\n\n/**\n * Where the companion's own writes are recorded: the change feed's generations, once the source watcher runs.\n */\nexport interface LocalWriteSink {\n /** A path this process just finished writing, renaming, creating or removing (a real path). */\n noteLocalWrite(path: string): void;\n /** A subprocess that may have written just ended. */\n noteSubprocessEnded(): void;\n}\n\nlet sink: LocalWriteSink | undefined;\nlet installed = false;\n\n/** Route recorded writes to `next` (the watcher's generations), or nowhere. */\nexport function setLocalWriteSink(next: LocalWriteSink | undefined): void {\n sink = next;\n}\n\n/**\n * Whether a subprocess cannot have written anything a fingerprint reads: a `git` whose subcommand is in the read-only set.\n * Every other subprocess (another git subcommand, the CLI, a generator, a coding agent, a package manager) is taken to\n * have possibly written.\n *\n * The set lives with the git read helper (`git-read-broker.companion.ts`, #3204), which may spawn only what this says is\n * read-only: one list, so the helper can never run a git invocation this recording would have had to see.\n */\nexport function subprocessIsReadOnly(command: string, args: readonly string[]): boolean {\n return basename(command) === 'git' && isBrokerableGitInvocation(args);\n}\n\nfunction pathOf(value: unknown): string | undefined {\n if (typeof value === 'string') return value;\n if (value instanceof URL) return value.protocol === 'file:' ? fileURLToPath(value) : undefined;\n if (Buffer.isBuffer(value)) return value.toString();\n return undefined;\n}\n\nfunction record(values: readonly unknown[]): void {\n if (sink === undefined) return;\n for (const value of values) {\n const path = pathOf(value);\n if (path !== undefined) sink.noteLocalWrite(realPathOrProjection(path));\n }\n}\n\n/** The arguments of each write operation that name a path it changes, by index. */\nconst WRITE_OPERATIONS: Readonly<Record<string, readonly number[]>> = {\n writeFile: [0], appendFile: [0], rename: [0, 1], unlink: [0], rm: [0], rmdir: [0], mkdir: [0], copyFile: [1],\n cp: [1], symlink: [1], link: [1], truncate: [0], utimes: [0], lutimes: [0], mkdtemp: [],\n};\n\ntype AnyFunction = (...args: unknown[]) => unknown;\n\n/**\n * Record every file this process writes, the moment the write completes, and every subprocess that may have written\n * (#3452 second review M2).\n *\n * ## Why at the `fs` boundary\n *\n * The change feed learns of a write from the watcher, 6-15 ms after it happens. The companion itself writes inputs it\n * reads back at once: a specification file it lands, label files, the brand module, and the outputs of the generators it\n * awaits (`wildo db generate`, `design-tokens generate`). Without this, a fingerprint read right after such a write is\n * the one taken before it. The writers are spread over 32 files; recording them one by one is a list that drifts the\n * first time someone adds a writer (`.claude/rules/invariant-call-site-enumeration.md`), so the record is taken where\n * every write passes: the `fs` functions and their promise forms, and the `child_process` functions.\n *\n * Installed by the entry's second import (`install-local-write-recording.companion.ts`), before any other module\n * captures an `fs` function, and synced into ES-module named imports with `syncBuiltinESMExports`. Never on import of this\n * module, so a test that imports the watcher does not patch its own process. A write made through a file DESCRIPTOR (`fs.write` on an fd) names no path\n * and is not recorded; its file is reached by a recorded `rename` when it is atomic, and otherwise by the watcher's event.\n *\n * The record only ever makes a fingerprint walk sooner. It decides nothing about the write and cannot fail it: the\n * original function runs exactly as before, and the record happens after it.\n */\nexport function installLocalWriteRecording(): void {\n if (installed) return;\n installed = true;\n const fsModule = fs as unknown as Record<string, AnyFunction>;\n const promises = fs.promises as unknown as Record<string, AnyFunction>;\n for (const [name, pathIndexes] of Object.entries(WRITE_OPERATIONS)) {\n const paths = (args: readonly unknown[]): unknown[] => pathIndexes.map((index) => args[index]);\n const callbackForm = fsModule[name];\n if (typeof callbackForm === 'function') {\n fsModule[name] = function recordedCallbackForm(this: unknown, ...args: unknown[]) {\n const last = args.length - 1;\n if (last >= 0 && typeof args[last] === 'function') {\n const callback = args[last] as AnyFunction;\n const targets = paths(args);\n args[last] = (...results: unknown[]) => {\n if (results[0] === null || results[0] === undefined) record(targets);\n return callback(...results);\n };\n }\n return callbackForm.apply(this, args);\n };\n }\n const syncForm = fsModule[`${name}Sync`];\n if (typeof syncForm === 'function') {\n fsModule[`${name}Sync`] = function recordedSyncForm(this: unknown, ...args: unknown[]) {\n const result = syncForm.apply(this, args);\n record(paths(args));\n return result;\n };\n }\n const promiseForm = promises[name];\n if (typeof promiseForm === 'function') {\n promises[name] = function recordedPromiseForm(this: unknown, ...args: unknown[]) {\n return (promiseForm.apply(this, args) as Promise<unknown>).then((result) => {\n record(paths(args));\n return result;\n });\n };\n }\n }\n const createWriteStream = fsModule.createWriteStream!;\n fsModule.createWriteStream = function recordedCreateWriteStream(this: unknown, ...args: unknown[]) {\n const stream = createWriteStream.apply(this, args) as fs.WriteStream;\n stream.once('close', () => record([args[0]]));\n return stream;\n };\n\n const processModule = childProcess as unknown as Record<string, AnyFunction>;\n const commandOf = (name: string, args: readonly unknown[]): { command: string; argv: string[] } => {\n if (name === 'exec' || name === 'execSync') {\n const words = String(args[0] ?? '').trim().split(/\\s+/u);\n return { command: words[0] ?? '', argv: words.slice(1) };\n }\n if (name === 'fork') return { command: 'node', argv: [] };\n return { command: String(args[0] ?? ''), argv: Array.isArray(args[1]) ? args[1].map(String) : [] };\n };\n const ended = (name: string, args: readonly unknown[]): void => {\n const { command, argv } = commandOf(name, args);\n if (!subprocessIsReadOnly(command, argv)) sink?.noteSubprocessEnded();\n };\n for (const name of ['spawn', 'execFile', 'exec', 'fork']) {\n const original = processModule[name]!;\n const recorded = function recordedSubprocess(this: unknown, ...args: unknown[]) {\n const child = original.apply(this, args) as childProcess.ChildProcess;\n child.once('exit', () => ended(name, args));\n return child;\n };\n /*\n * `execFile` and `exec` carry Node's own promise form (`util.promisify.custom`), resolving to `{ stdout, stderr }`.\n * A wrapper without it makes every `promisify(execFile)` evaluated after this install resolve to the bare stdout, so\n * `const { stdout } = await …` reads `undefined` (#3204, reference run 42486534966: every git read of the playbook\n * write register threw, and no playbook result was ever accepted). So the wrapper keeps that form, recording the end.\n */\n const promised = (original as unknown as Record<symbol, AnyFunction | undefined>)[promisify.custom];\n if (promised !== undefined) {\n Object.defineProperty(recorded, promisify.custom, {\n value: function recordedPromisedSubprocess(this: unknown, ...args: unknown[]) {\n const promise = promised.apply(this, args) as Promise<unknown> & { readonly child?: childProcess.ChildProcess };\n promise.child?.once('exit', () => ended(name, args));\n return promise;\n },\n });\n }\n processModule[name] = recorded;\n }\n for (const name of ['spawnSync', 'execFileSync', 'execSync']) {\n const original = processModule[name]!;\n processModule[name] = function recordedSyncSubprocess(this: unknown, ...args: unknown[]) {\n try {\n return original.apply(this, args);\n } finally {\n ended(name, args);\n }\n };\n }\n syncBuiltinESMExports();\n}\n\n"]}
@@ -70,6 +70,17 @@ interface CompanionExecutionOwnership {
70
70
  organizationId: string;
71
71
  wildoApplicationId: string;
72
72
  }
73
+ /**
74
+ * The stored fields an actor-execution listing leaves out unless its caller asks for whole rows (#3204,
75
+ * `RepositoryOptions.omitStoredFields`).
76
+ *
77
+ * `standaloneTasks.input.baseline.files` is a coding run's dirty-file map at admission: measured on the reference creation
78
+ * (run 42886943490), 15.7 KB of a 36 KB coding row, over 986 rows, re-read by the build loop's 2,000-row listings several
79
+ * times a minute — which kept the companion's thread blocked about 1.5 s in every 30. No reader of a LISTING uses it: the
80
+ * change-set and recovery paths read the baseline from the task row (`getActorTask`) or hold it in memory, and the
81
+ * listing readers take only `baseline.headSha` / `capturedAt`. The HTTP listing passes `[]` and keeps returning whole rows.
82
+ */
83
+ export declare const ACTOR_EXECUTION_LISTING_OMITTED_FIELDS: readonly string[];
73
84
  export declare class CompanionExecutionsCompanionService {
74
85
  private readonly logger;
75
86
  private readonly errorBuilder;
@@ -172,7 +183,13 @@ export declare class CompanionExecutionsCompanionService {
172
183
  listActorExecutionsOwingCorrectionRecord(sessionContext?: CompanionExecutionSessionContext, after?: string): Promise<Wildo_Application_ActorSystem_Execution[]>;
173
184
  getActorExecution(executionId: string, _sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_ActorSystem_Execution>;
174
185
  getFlowExecution(executionId: string, _sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_FlowSystem_Execution>;
175
- listActorExecutions(query: CompanionExecutionsListQuery, _sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_ActorSystem_Execution[]>;
186
+ listActorExecutions(query: CompanionExecutionsListQuery, _sessionContext?: CompanionExecutionSessionContext,
187
+ /**
188
+ * Stored fields the rows leave out. Defaults to {@link ACTOR_EXECUTION_LISTING_OMITTED_FIELDS}; pass `[]` for whole rows.
189
+ */
190
+ readOptions?: {
191
+ readonly omitStoredFields?: readonly string[];
192
+ }): Promise<Wildo_Application_ActorSystem_Execution[]>;
176
193
  listFlowExecutions(query: CompanionExecutionsListQuery, _sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_FlowSystem_Execution[]>;
177
194
  createActorTask(payload: CompanionCreateActorTaskRequest, sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_Actor_Task>;
178
195
  getActorTask(taskId: string, _sessionContext?: CompanionExecutionSessionContext): Promise<Wildo_Application_Actor_Task>;
@@ -1 +1 @@
1
- {"version":3,"file":"companion-executions.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/executions/services/companion-executions.companion.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAE1B,qCAAqC,EACrC,aAAa,EACb,yCAAyC,EACzC,2CAA2C,EAE3C,+BAA+B,EAE/B,gBAAgB,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OAIG;IAEH,OAAO,CAAC,wBAAwB,CAAC,CAAS;IAC1C,OAAO,CAAC,iBAAiB,CAAC,CAAyH;IAEnJ,OAAO,CAAC,kBAAkB;IAK1B;;;;;;;;;;OAUG;YACW,cAAc;YAmBd,oBAAoB;IA6BlC;;;;;;;;;;;;;;;;;;;OAmBG;YACW,0BAA0B;YA2B1B,qBAAqB;YAqDrB,gCAAgC;YAsDhC,6BAA6B;YAsD7B,+BAA+B;YAyC/B,oBAAoB;YAqBpB,yBAAyB;YAyBzB,uBAAuB;YAiBvB,6BAA6B;IAyE3C,OAAO,CAAC,wBAAwB;YASlB,mBAAmB;YAgCnB,qBAAqB;YAgCrB,qBAAqB;IAyBnC,OAAO,CAAC,sBAAsB;YAkBhB,oBAAoB;IA6ClC,OAAO,CAAC,sBAAsB;IAI9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,kCAAkC;IAS1C,OAAO,CAAC,oCAAoC;IA8B5C,OAAO,CAAC,0BAA0B;IA2ClC,OAAO,CAAC,kCAAkC;IA0B1C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,gBAAgB;IAIxB;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,sBAAsB;CAU/B"}
1
+ {"version":3,"file":"companion-executions.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/executions/services/companion-executions.companion.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAE1B,qCAAqC,EACrC,aAAa,EACb,yCAAyC,EACzC,2CAA2C,EAE3C,+BAA+B,EAE/B,gBAAgB,EAKjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,yBAAyB,EAE9B,qBAAqB,EACrB,kBAAkB,EAIlB,kBAAkB,EAClB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