@wildo-ai/dev-companion 1.1.13 → 1.1.15

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 (363) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +89 -1
  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 +114 -9
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +46 -1
  7. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  8. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +39 -2
  9. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  10. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts +6 -0
  11. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts.map +1 -1
  12. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.js.map +1 -1
  13. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts +19 -5
  14. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts.map +1 -1
  15. package/dist/esm/claude-cli/models/verification-tool-availability.models.js +17 -5
  16. package/dist/esm/claude-cli/models/verification-tool-availability.models.js.map +1 -1
  17. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +16 -1
  18. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  19. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +53 -6
  20. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  21. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +145 -6
  22. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  23. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +474 -47
  24. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  25. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +6 -2
  26. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  27. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +16 -39
  28. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  29. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +14 -0
  30. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  31. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +35 -0
  32. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  33. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts +36 -0
  34. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts.map +1 -0
  35. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js +134 -0
  36. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js.map +1 -0
  37. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
  38. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  39. package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
  40. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  41. package/dist/esm/companion-api/companion-api.schemas.js +8 -0
  42. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  43. package/dist/esm/companion-api/controllers/companion.controller.d.ts +7 -0
  44. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  45. package/dist/esm/companion-api/controllers/companion.controller.js +26 -12
  46. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  47. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
  48. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
  49. package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
  50. package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
  51. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
  52. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  53. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +12 -0
  54. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  55. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  56. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +7 -1
  57. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  58. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
  59. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  60. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
  61. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  62. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
  63. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
  64. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
  65. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
  66. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts +3 -2
  67. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  68. package/dist/esm/core/introspection/services/translation-placement.companion.service.js.map +1 -1
  69. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  70. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +24 -14
  71. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  72. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +42 -0
  73. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -1
  74. package/dist/esm/core/introspection/workspace-element-index.companion.js +42 -0
  75. package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -1
  76. package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
  77. package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
  78. package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
  79. package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
  80. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +53 -0
  81. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  82. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +119 -2
  83. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  84. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  85. package/dist/esm/core/runtime/services/start-companion-application.service.js +16 -3
  86. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  87. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +2 -2
  88. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  89. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +6 -6
  90. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  91. package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
  92. package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
  93. package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
  94. package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
  95. package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
  96. package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
  97. package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
  98. package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
  99. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -0
  100. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  101. package/dist/esm/email/services/email-template.companion.service.js +44 -11
  102. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  103. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts +26 -2
  104. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  105. package/dist/esm/email/utils/email-template-fs-discovery.utils.js +41 -2
  106. package/dist/esm/email/utils/email-template-fs-discovery.utils.js.map +1 -1
  107. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts +19 -0
  108. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts.map +1 -0
  109. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js +171 -0
  110. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js.map +1 -0
  111. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts +75 -0
  112. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts.map +1 -0
  113. package/dist/esm/email/utils/module-email-root.companion.utils.js +162 -0
  114. package/dist/esm/email/utils/module-email-root.companion.utils.js.map +1 -0
  115. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
  116. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
  117. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
  118. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
  119. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
  120. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
  121. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
  122. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
  123. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +1 -0
  124. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  125. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +1 -0
  126. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  127. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts +1 -0
  128. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts.map +1 -1
  129. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js +1 -0
  130. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js.map +1 -1
  131. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
  132. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  133. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
  134. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  135. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
  136. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
  137. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
  138. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
  139. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
  140. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
  141. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
  142. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
  143. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
  144. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
  145. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
  146. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
  147. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
  148. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
  149. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
  150. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
  151. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
  152. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
  153. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
  154. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
  155. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
  156. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  157. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
  158. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  159. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
  160. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
  161. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
  162. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
  163. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
  164. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  165. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
  166. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  167. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
  168. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
  169. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
  170. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
  171. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
  172. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  173. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
  174. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  175. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
  176. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
  177. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
  178. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
  179. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
  180. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  181. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
  182. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  183. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
  184. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
  185. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
  186. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
  187. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
  188. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
  189. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  190. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
  191. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
  192. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
  193. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
  194. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  195. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
  196. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  197. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
  198. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
  199. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
  200. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
  201. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
  202. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  203. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
  204. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  205. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
  206. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
  207. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
  208. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
  209. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
  210. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
  211. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
  212. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
  213. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
  214. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
  215. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
  216. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
  217. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
  218. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
  219. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
  220. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
  221. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
  222. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
  223. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
  224. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
  225. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
  226. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
  227. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
  228. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
  229. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  230. package/dist/esm/i18n/resources/workbenchAspects.en.js +4 -0
  231. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  232. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
  233. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
  234. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
  235. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
  236. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
  237. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
  238. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
  239. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
  240. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
  241. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
  242. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
  243. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
  244. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
  245. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
  246. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
  247. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
  248. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
  249. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
  250. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +35 -0
  251. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  252. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +12 -0
  253. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  254. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +536 -531
  255. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
  256. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +536 -531
  257. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
  258. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +170 -170
  259. package/dist/esm/i18n/system_enums/application-creation.fr.js +170 -170
  260. package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
  261. package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
  262. package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
  263. package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
  264. package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
  265. package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
  266. package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
  267. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -2
  268. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
  269. package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -2
  270. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  271. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
  272. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
  273. package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
  274. package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
  275. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
  276. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
  277. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
  278. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
  279. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
  280. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
  281. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
  282. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
  283. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
  284. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
  285. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
  286. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
  287. package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
  288. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
  289. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
  290. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
  291. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
  292. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
  293. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -1
  294. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -1
  295. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +7 -3
  296. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -1
  297. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  298. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +3 -4
  299. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  300. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
  301. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  302. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
  303. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  304. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +9 -0
  305. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
  306. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +18 -2
  307. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
  308. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +153 -22
  309. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  310. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +970 -208
  311. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  312. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +115 -13
  313. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  314. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +295 -56
  315. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  316. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
  317. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
  318. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
  319. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
  320. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
  321. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
  322. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
  323. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +1 -1
  324. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  325. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +48 -26
  326. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  327. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts +12 -0
  328. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts.map +1 -1
  329. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js +30 -1
  330. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js.map +1 -1
  331. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
  332. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
  333. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
  334. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  335. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +12 -1
  336. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  337. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  338. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
  339. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  340. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
  341. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
  342. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
  343. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +8 -1
  344. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  345. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +119 -25
  346. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  347. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts +55 -1
  348. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts.map +1 -1
  349. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js +157 -10
  350. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js.map +1 -1
  351. package/dist/esm/module-layout/module-layout-convention.companion.d.ts +158 -0
  352. package/dist/esm/module-layout/module-layout-convention.companion.d.ts.map +1 -0
  353. package/dist/esm/module-layout/module-layout-convention.companion.js +272 -0
  354. package/dist/esm/module-layout/module-layout-convention.companion.js.map +1 -0
  355. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts +42 -0
  356. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts.map +1 -0
  357. package/dist/esm/module-layout/module-layout-inspection.companion.js +290 -0
  358. package/dist/esm/module-layout/module-layout-inspection.companion.js.map +1 -0
  359. package/dist/esm/module-layout/module-source-files.companion.d.ts +3 -0
  360. package/dist/esm/module-layout/module-source-files.companion.d.ts.map +1 -0
  361. package/dist/esm/module-layout/module-source-files.companion.js +45 -0
  362. package/dist/esm/module-layout/module-source-files.companion.js.map +1 -0
  363. package/package.json +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"git-change-set.companion.service.js","sourceRoot":"","sources":["../../../../src/claude-cli/services/git-change-set.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;;;;;;;;;;;;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OA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AQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,OAAO,CAAC;IAC7D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,KAAK,CAAC;IAC3D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,OAAO,CAAC;IAC7D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,QAAQ,CAAC;IAClF,OAAO,uBAAuB,CAAC,OAAO,CAAC;AACzC,CAAC;AAED,SAAS,MAAM,CAAC,OAAwB;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["/**\n * Read-only git change-set capture for coding-agent dispatch runs\n * (meta-workflows P-19).\n *\n * # DD-8 carve-out — read-only git observation companion-side\n *\n * DD-8 (`.claude/context/dev-companion.md`) places git plumbing in the\n * CLI (`wildo-cli/src/services/companion/git-helper.service.ts`), not the\n * companion. This service is the DELIBERATE, DOCUMENTED carve-out: the\n * change-set capture must run in the same process that owns the run\n * lifecycle (the companion), atomically around the spawn — routing it\n * through the CLI would invert the DD-8 client/server direction and add\n * a network hop around a mutation-critical section.\n *\n * The carve-out is strictly READ-ONLY:\n * - allowed git subset: `status --porcelain=v2`, `diff HEAD`,\n * `diff --name-status <base>..<head>`, `rev-parse HEAD`,\n * `ls-files --others [--ignored] --exclude-standard`\n * (enforced by {@link READ_ONLY_GIT_SUBCOMMANDS});\n * - untracked files are LISTED (path + size), never `git add -N`'d —\n * intent-to-add mutates the index and breaks the read-only contract;\n * - `GitHelper` (stage/commit plumbing) is NOT reused, moved, or\n * exposed over HTTP.\n *\n * # Attribution model (P-19 / P-19b)\n *\n * On the dogfood tree dirty-at-dispatch is the NORMAL state — Paul's\n * parallel sessions mutate the tree continuously. The capture therefore\n * never assumes exclusivity: it snapshots a per-file fingerprint baseline\n * at dispatch and classifies every post-run entry as RUN_EXCLUSIVE /\n * BASELINE_DIRTY_AMBIGUOUS / APPEARED_DURING_RUN. Files dirty at baseline\n * whose fingerprint did NOT change during the window are excluded from\n * the change set (nothing happened during the run).\n */\n\nimport { execFile, spawn } from 'node:child_process';\nimport { createHash } from 'node:crypto';\nimport { promisify } from 'node:util';\nimport { promises as fs } from 'node:fs';\nimport { join, posix, relative } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n} from '@wildo-ai/saas-models';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport {\n ChangeSetAttributionClass,\n ChangeSetFileChangeKind,\n type GitChangeSetCapture,\n type GitChangeSetFileEntry,\n type GitWorktreeFileState,\n type GitWorktreeSnapshot,\n} from '../models/coding-agent-dispatch.models';\nimport { RESEARCH_EVIDENCE_RELATIVE_ROOT } from './research-evidence-store.companion';\n\nconst execFileAsync = promisify(execFile);\n\n/** Every text a failed read carries — the built error's own fields (its context holds git's stderr) and its description. */\nfunction describeGitReadFailure(error: unknown): string {\n let fields = '';\n try {\n fields = JSON.stringify(error) ?? '';\n } catch {\n fields = '';\n }\n return `${describeCaughtError(error)} ${fields}`;\n}\n\n/**\n * How `git show HEAD:./<path>` says the path is not in HEAD — the ordinary \"absent\" answer, as opposed to a failure to\n * ask: `path '…' does not exist in 'HEAD'`, `path '…' exists on disk, but not in 'HEAD'`, and an unborn HEAD's\n * `invalid object name 'HEAD'`. Matched loosely; a message it does not recognise is counted as a failure, the safe\n * direction for a caller deciding whether an answer may be held.\n */\nconst GIT_PATH_ABSENT_AT_HEAD = /does not exist in '?HEAD'?|exists on disk, but not in '?HEAD'?|invalid object name '?HEAD'?|not a valid object name/iu;\n\n/**\n * What git says about the application tree at one instant, as a build-plan landing answer depends on it\n * (#3206): see {@link GitChangeSetCompanionService.readLandingSourceState}.\n */\nexport interface GitLandingSourceState {\n /** The commit HEAD names; `null` before the repository's first commit. */\n readonly headSha: string | null;\n /** The raw `status --porcelain -z --untracked-files=all -- .` output, compared verbatim by a caller's cache key. */\n readonly porcelain: string;\n /** Every path that output names (origins of renames included), application-root relative. */\n readonly changedPaths: readonly string[];\n}\n\n/**\n * The complete read-only subset this service may invoke. Guard, not\n * documentation: `execGit` rejects any subcommand outside this set so a\n * future edit cannot silently grow the DD-8 carve-out into write plumbing.\n */\nconst READ_ONLY_GIT_SUBCOMMANDS: ReadonlySet<string> = new Set([\n 'status',\n 'diff',\n 'rev-parse',\n 'ls-files',\n // History reads only — commit timestamps for artifact freshness. `log` mutates nothing.\n 'log',\n /*\n * COMMITTED BYTES, for the build-plan landing probe. `show` writes nothing — it prints an object\n * from the database — and it is the only way to answer \"what does HEAD hold for this path?\" without\n * consulting the worktree.\n *\n * This set was deliberately kept to four verbs, and `readCommittedText` was written to avoid\n * widening it: it asked whether the worktree copy was CLEAN and then read the file from disk. That\n * is a different question, and on a tree several sessions edit continuously it is the wrong one —\n * measured 2026-09-16, when a sibling session held all seven `*.relationships.ts` files dirty and\n * every relationship task in every module reported NOT LANDED, so the lane re-offered finished work\n * and spent a coding run per task discovering there was nothing to do. The committed bytes held the\n * edges the whole time.\n */\n 'show',\n /*\n * The BATCHED form of `show`, and admitted for that reason alone.\n *\n * `cat-file --batch` reads object names on stdin and prints their contents — one subprocess for a\n * whole path set instead of one `show` per path. It writes nothing; it is `show`'s plumbing.\n *\n * It is the first verb here that takes STDIN, which is the property worth noticing: everything\n * else in this set is fully described by its argv, so the read-only guard reading argv is a\n * complete check of what it will do. For `cat-file --batch` the guard covers the verb and\n * {@link readCommittedTexts} owns what is written to it — object names it builds itself from the\n * caller's paths, never caller-supplied argv.\n */\n 'cat-file',\n]);\n\n/**\n * Gitignored paths that are nevertheless OBSERVED, because a write there is\n * exactly what this capture exists to make visible.\n *\n * `ls-files --others --exclude-standard` lists untracked files but EXCLUDES\n * ignored ones, so everything below was invisible to both the baseline and the\n * post-run snapshot: an agent that wrote accepted state, a journal record or a\n * secret produced an EMPTY change set and the run landed\n * `WORKING_RESULT_RECORDED`. Measured on the live dogfood tree: the standard\n * listing returns 0 entries under `.wildo-saas/state`, while the same listing\n * with `--ignored` returns 121 (115 of them inside the subtrees declared here).\n *\n * The set is deliberately NARROW rather than \"observe everything ignored\".\n * Blanket observation would enumerate `node_modules`, every `dist/`,\n * `.wildo-runtime-signals/` and the log trees — on this repository that is\n * thousands of files hashed per run, and their constant churn would flood the\n * change set with entries no agent caused. What is listed here is the material\n * that carries CONSEQUENCE: accepted application truth, deployment material,\n * and secrets.\n *\n * It is also narrower than `.wildo-saas/state` as a whole, and that exclusion\n * is measured rather than tidy. `state/local/runtime.json`, `state/journeys/`\n * and `state/environments.json` are HOST bookkeeping written on lifecycle\n * events — the live tree shows `local/runtime.json` rewritten at companion\n * start — so a run that merely overlapped a restart would be refused for a\n * write the host itself made. They carry no accepted truth, so observing them\n * buys nothing and costs a false refusal.\n *\n * `.wildo-saas/continuity` is deliberately ABSENT: it is not gitignored, so the\n * ordinary tracked/untracked capture already sees it.\n *\n * `.wildo-saas/state/meta-workflows` and `.wildo-saas/state/audit` are ABSENT,\n * and they are absent for DIFFERENT reasons. Read this before \"restoring\"\n * either of them.\n *\n * Originally both were excluded because the HOST wrote to them inside the very\n * window a coding run occupies: the episode host persisted an episode\n * checkpoint after the baseline capture and before the run ended, and a\n * security audit appended an event on every token-gated request. Observing\n * them therefore refused EVERY typed coding run as `MUTATION_SCOPE_VIOLATION`,\n * naming the episode's own checkpoint as the violating path — measured by the\n * Block-4 integration proof rather than reasoned about.\n *\n * `.wildo-saas/state/audit` genuinely has no producer any more: the companion\n * security audit was deleted with the rest of the ledger layer, so that subtree\n * holds only orphaned events that nothing reads.\n *\n * `.wildo-saas/state/meta-workflows` DOES have host writers again, and its\n * exclusion is once more load-bearing for the ORIGINAL reason rather than a\n * leftover. One companion store lives under it — the playbook run-write\n * register, written DURING a playbook run, as each run lands its files. (Two\n * more did until #1360: choreography checkpoints and suspended runs, both now\n * on the run's actor execution row.) That is exactly the writer shape this\n * exclusion exists to keep out of a coding run's change set.\n *\n * The distinction is load-bearing for whoever adds the next host-owned store.\n * A writer that runs INSIDE the coding window must be excluded, and keeping its\n * records honest becomes the owning store's job rather than this capture's. Do\n * not reach for a hash chain or a per-event self-digest for that: a same-UID\n * agent can recompute either, and Rule 0 of\n * `.claude/rules/one-source-of-truth.md` keeps such records out. Git is the\n * record; a store that must survive the agent is placed outside its reach,\n * not sealed inside it.\n *\n * WHERE that exclusion is written depends on whether the store is gitignored,\n * and getting this wrong is what let a real defect through. Omitting a subtree\n * from the list below only hides it while git itself hides it. A store that is\n * TRACKED — the research evidence store is, deliberately — is listed by the\n * ordinary untracked/tracked capture no matter what this pathspec set says, and\n * belongs in {@link CONCURRENT_HOST_LANE_ROOTS} instead.\n *\n * These paths are outside any coding task's declared `allowedPathPrefixes`, so\n * making them visible is sufficient — the mutation-scope assessment lists an\n * observed write here among the run's out-of-scope paths, with no second\n * mechanism to keep in step. (It refused the run for one until 2026-09-13.)\n *\n * Paths are git pathspecs relative to the application root (`git -C saasRoot`).\n */\nconst OBSERVED_IGNORED_PATH_SPECS: readonly string[] = [\n // Workbench state. Nothing writes acceptance receipts here any more (they\n // went with the digest machinery); the path stays observed so a coding run\n // cannot plant files in it unseen.\n '.wildo-saas/state/application-creation-workbench',\n // Generated deployment material, including rendered environment files.\n '.wildo-saas/deploy',\n // Application secrets.\n '.env',\n '.env.*',\n];\n\n/**\n * Application-relative roots owned by a COMPANION LANE that legitimately writes\n * while a coding run is in flight, and that the ordinary tracked/untracked\n * capture can therefore see.\n *\n * The sibling of {@link OBSERVED_IGNORED_PATH_SPECS}'s exclusions, for the case\n * those cannot cover. That comment states the rule — \"a writer that runs INSIDE\n * the coding window must be excluded here\" — and then discharges it by *not\n * listing* the path, which only works while the writer's store is GITIGNORED.\n * The research evidence store is not: it lives at\n * `specifications/research-evidence/`, inside the application repository and\n * deliberately committable, so `ls-files --others --exclude-standard` lists it\n * like any other untracked file and no omission from an `--ignored` pathspec\n * can hide it.\n *\n * Measured shape of the defect: the research dispatch takes no\n * workspace-mutation lock (its own JSDoc: \"No lock, no change set, no\n * reconciliation — a run that cannot mutate has nothing to attribute\"), and two\n * live paths put it inside a coding window — an operator's\n * `POST /api/companion/research`, and a composite's `RESEARCH_AGENT` children,\n * which `runPlaybookChoreography` dispatches with `Promise.allSettled` up to\n * `maximumLanesPerIteration` at a time. Its files then appear post-run at a path\n * no coding task's `allowedPathPrefixes` contains (every policy in\n * `resolveBuildPlanTaskCodingPolicy` is a `<layer>/src/modules/<module>/` or one\n * named config file, and the store sits outside `specifications/src/`), so the\n * scope assessment answered `MUTATION_SCOPE_VIOLATION` and failed a correct\n * coding run for another lane's writes.\n *\n * WIDENING THE LOCK WAS REJECTED, and measured rather than assumed. The lock is\n * taken with `retries: { retries: 0 }`, so a second acquisition is refused, not\n * queued. Putting research under it would refuse two of every three lanes of a\n * breadth-first research iteration — the exact fan-out the lane exists for — and\n * would refuse every research child sharing an iteration with a dispatch child.\n * The answer to \"a lane that mutates nothing but its own store\" is not a bigger\n * lock; it is saying who owns the store.\n *\n * The list is deliberately EXACT — a root, not a parent. `specifications/`\n * would swallow `specifications/src/`, which is a real coding-task target\n * (`BuildPlanResourceStage.SPEC`), and an out-of-scope write there would stop\n * being refused. Do not generalise an entry here to save a line.\n *\n * ## A WIDER population exists, and it deliberately does not belong here\n *\n * Measured 2026-09-09 on `examples/wonder-crm`, because \"the research store is\n * the only tracked in-window writer\" is a claim about a population and had to\n * be counted rather than assumed. It is not the only one:\n * `.wildo-saas/generated/{brand,deliberations,expert-personas,compliance}` are\n * NOT gitignored either (`git check-ignore` reports nothing for any of them;\n * only `state/`, `dist/`, `tmp/`, `deploy/`, `templates/`, `docs/`, `logs/`,\n * `cache/`, `companion-keys/`, `local_data/` and\n * `generated/providers/*.generated.json` are), and they carry host writers —\n * `structured-deliberation`, `logo-generation`/`brand-accept`,\n * `expert-persona`, the technical-doc pilot — none of which takes the\n * workspace-mutation lock. So a playbook lane writing a deliberation record\n * beside a coding lane produces the same visible, unattributable entry.\n *\n * They are NOT listed here, and the reason is the difference between the two\n * cases rather than an oversight. `.wildo-saas/` is in every build task's\n * `ALWAYS_PROHIBITED_PREFIXES` — since #1268 the ONLY entry left there, because\n * it holds the companion's runtime and the executing run's own records, and\n * `OBSERVED_IGNORED_PATH_SPECS` above keeps the workbench subtree observed on\n * purpose \"so a coding run cannot plant files in it unseen\". Excluding those\n * roots would therefore weaken a DELIBERATE prohibition, which is the exact\n * over-exclusion this constant's boundary rule exists to prevent — the evidence\n * store carries no prohibition, it is merely outside every task's allow-list.\n *\n * Whatever answers that case has to distinguish \"the host wrote here\" from \"the\n * agent wrote into a prohibited tree\", which this predicate cannot: it reads a\n * path and nothing else. That needs a writer-identified signal (the lane\n * declaring its own writes for the window), not a bigger path list. Recorded\n * here rather than fixed here so the next author meets the measurement at the\n * seam instead of re-deriving it — and so nobody \"completes\" this list by\n * adding `.wildo-saas/generated`.\n */\nconst CONCURRENT_HOST_LANE_ROOTS: readonly string[] = [\n // Imported, never re-spelt: the research dispatch's location predicate and the\n // store's own writer read the same constant, and a second copy here is how the\n // exclusion comes to cover a directory the agent is no longer confined to.\n RESEARCH_EVIDENCE_RELATIVE_ROOT,\n];\n\n/**\n * Is this application-relative path owned by a concurrent companion lane?\n *\n * Exported because it has TWO call sites and they answer different halves of one\n * question: this service uses it to ATTRIBUTE the entry, and the dispatch's scope\n * assessment uses it to drop a disappearance under the same root — a research\n * agent may delete or rewrite a file it wrote in an earlier round, and a\n * disappearance carries no attribution class to filter on. One predicate, so the\n * two halves cannot drift.\n *\n * Boundary-matched like every other prefix comparison in this vertical:\n * `specifications/research-evidence` must not admit\n * `specifications/research-evidence-notes.md` (dead-plan-citation: an example path, not a file).\n */\nexport function isConcurrentHostLanePath(applicationRelativePath: string): boolean {\n const normalized = applicationRelativePath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n return CONCURRENT_HOST_LANE_ROOTS.some((root) => normalized === root || normalized.startsWith(`${root}/`));\n}\n\n/**\n * Does this application-relative path lie ABOVE the application root?\n *\n * Every path this service records is keyed relative to `-C saasRoot`, and git spells a path outside\n * that directory with leading `../` segments (`resolveApplicationRelativePathMapper`). So the key\n * itself answers the question, with no filesystem access and no second root to disagree with.\n *\n * Exported for the same reason as {@link isConcurrentHostLanePath}: this service uses it to\n * ATTRIBUTE the entry ({@link ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT}), and the\n * dispatch's scope assessment uses it to keep a bare disappearance under the same root off the\n * out-of-scope list. One predicate, so the two halves cannot drift (#1020).\n */\nexport function isOutsideApplicationRootPath(applicationRelativePath: string): boolean {\n const normalized = applicationRelativePath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n return normalized === '..' || normalized.startsWith('../');\n}\n\n/** Combined stdout ceiling for one git invocation (diffs on a busy dogfood tree are large). */\nconst GIT_MAX_BUFFER_BYTES = 128 * 1024 * 1024;\nconst GIT_TIMEOUT_MS = 60_000;\n/** Reads of a worktree snapshot before it refuses a repository that keeps moving under it (#3204). */\nconst WORKTREE_SNAPSHOT_MAX_ATTEMPTS = 6;\n/** The pause before a re-read, multiplied by the attempt: a checkpoint commit is done well within it. */\nconst WORKTREE_SNAPSHOT_RETRY_DELAY_MS = 50;\n\n@injectable()\nexport class GitChangeSetCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n ) {\n this.logDebug = this.logger.debugByType('GitChangeSetCompanionService');\n }\n\n /**\n * Snapshot the worktree state at dispatch time: HEAD sha + a per-file\n * fingerprint of every tracked-dirty and untracked file. The fingerprint\n * (per-file diff section hash / untracked content hash) is what lets the\n * post-run pass distinguish \"still dirty from before the run\" from\n * \"changed again during the run\" (→ BASELINE_DIRTY_AMBIGUOUS).\n */\n public async captureWorktreeSnapshot(): Promise<GitWorktreeSnapshot> {\n /*\n * ONE state of the repository, or none (#3204). The snapshot is several reads (HEAD, status, diff, the untracked\n * list), and since build checkpoints a sibling run's settlement commits the shared tree while other runs are still\n * capturing theirs (`git add` on the shared index, then `git commit`). A commit landing between the HEAD read and\n * the status read paired the OLD HEAD with the POST-commit clean tree: the committed files were neither dirty nor\n * \"committed during the run\" (HEAD looked unmoved), so a run's change set came out empty and its contention with\n * its siblings was never recorded. A `git add` between the status and untracked reads dropped a file the same way.\n *\n * So the reads are bracketed by the staging identity — HEAD plus the staged entries under the application root —\n * and repeated when it moved. Status refreshing stat data does not move it (`ls-files -s` prints no stat fields),\n * and another session staging outside the application root does not either. After\n * {@link WORKTREE_SNAPSHOT_MAX_ATTEMPTS} moving reads the capture refuses rather than return a torn state, because a\n * torn snapshot loses files silently and every caller already treats a failed capture as a capture failure.\n */\n for (let attempt = 1; ; attempt += 1) {\n const before = await this.readStagingIdentity();\n const snapshot = await this.readWorktreeSnapshotOnce();\n const after = await this.readStagingIdentity();\n if (before === after) return snapshot;\n if (attempt >= WORKTREE_SNAPSHOT_MAX_ATTEMPTS) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `The repository changed during each of ${WORKTREE_SNAPSHOT_MAX_ATTEMPTS} worktree snapshot reads (a commit or a staging write landed between them); no consistent snapshot was taken.`,\n saasRoot: this.companionContext.saasRoot,\n },\n });\n }\n this.logDebug('The repository moved during a worktree snapshot; reading it again', { attempt });\n await new Promise((resolve) => setTimeout(resolve, WORKTREE_SNAPSHOT_RETRY_DELAY_MS * attempt));\n }\n }\n\n /**\n * What a commit or a `git add` changes and a status refresh does not: HEAD, and the staged entries (mode, blob, stage,\n * path) under the application root. Compared, never stored.\n */\n private async readStagingIdentity(): Promise<string> {\n const headSha = await this.resolveHeadSha().catch(() => '');\n const { stdout } = await this.execGit(['ls-files', '-s', '-z', '--', '.'], { noOptionalLocks: true });\n return `${headSha}:${sha256(stdout)}`;\n }\n\n /** One pass of the snapshot's reads; {@link captureWorktreeSnapshot} keeps it only when nothing moved around it. */\n private async readWorktreeSnapshotOnce(): Promise<GitWorktreeSnapshot> {\n const headSha = await this.resolveHeadSha();\n const files: Record<string, GitWorktreeFileState> = {};\n\n // Tracked changes vs HEAD — status gives the change kind, the split\n // `diff HEAD` sections give the per-file content fingerprint.\n const trackedStates = await this.readTrackedDirtyStates();\n const diffSectionsByPath = this.splitDiffSectionsByPath(await this.readFullDiffText(true));\n for (const state of trackedStates) {\n const diffSection = diffSectionsByPath.get(state.path);\n files[state.path] = {\n ...state,\n ...(diffSection !== undefined ? { fingerprint: sha256(diffSection) } : {}),\n };\n }\n\n // Untracked files: listed with path + size + content hash — NEVER\n // `git add -N`'d (read-only contract).\n for (const untrackedPath of await this.readUntrackedPaths()) {\n files[untrackedPath] = await this.buildUntrackedFileState(untrackedPath);\n }\n\n // Sensitive IGNORED material (see OBSERVED_IGNORED_PATH_SPECS). Same\n // read-only treatment as untracked files; a path already recorded above\n // keeps its tracked/untracked state rather than being reclassified.\n for (const ignoredPath of await this.readObservedIgnoredPaths()) {\n if (files[ignoredPath] !== undefined) continue;\n files[ignoredPath] = await this.buildUntrackedFileState(ignoredPath);\n }\n\n return {\n headSha,\n capturedAt: new Date().toISOString(),\n files,\n };\n }\n\n /** True when the snapshot carries any tracked-dirty or untracked file. */\n public isDirty(snapshot: GitWorktreeSnapshot): boolean {\n return Object.keys(snapshot.files).length > 0;\n }\n\n /**\n * Post-run capture: re-snapshot the worktree and attribute every entry\n * against the dispatch baseline (P-19 classes). Also returns the raw\n * post-run `diff HEAD` text for the DEBUG_VERBOSE traceability artifact.\n */\n public async captureChangeSet(baseline: GitWorktreeSnapshot): Promise<GitChangeSetCapture> {\n const postRun = await this.captureWorktreeSnapshot();\n const fullDiffText = await this.readFullDiffText();\n\n const entries: GitChangeSetFileEntry[] = [];\n for (const [path, postState] of Object.entries(postRun.files)) {\n const baselineState = baseline.files[path];\n /*\n * Decided BEFORE the fingerprint classification, because the lane owning\n * the path settles the attribution whatever the file did. A research\n * round may create a file (`APPEARED_DURING_RUN` shape), rewrite one it\n * wrote in an earlier round (`BASELINE_DIRTY_AMBIGUOUS` shape), or —\n * once the store is committed — modify a tracked file (`RUN_EXCLUSIVE`\n * shape, the one that reads most like the agent's own edit). All three\n * are the same fact: another lane wrote here.\n */\n const ownedByConcurrentLane = isConcurrentHostLanePath(path);\n /*\n * Decided FIRST, above even the lane ownership: a path above the application root is outside\n * anything a task scope can admit, and on a monorepo checkout it is overwhelmingly another\n * session's edit (#1020: 38 of 39 attributed paths). The entry stays in the change set and is\n * counted; it simply never reads as the run's own work.\n */\n const outsideApplicationRoot = isOutsideApplicationRootPath(path);\n\n if (!baselineState) {\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: outsideApplicationRoot\n ? ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT\n : ownedByConcurrentLane\n ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE\n : postState.changeKind === ChangeSetFileChangeKind.UNTRACKED\n ? ChangeSetAttributionClass.APPEARED_DURING_RUN\n : ChangeSetAttributionClass.RUN_EXCLUSIVE,\n dirtyAtBaseline: false,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),\n ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),\n });\n continue;\n }\n\n const changedDuringRun = baselineState.fingerprint !== postState.fingerprint\n || baselineState.changeKind !== postState.changeKind;\n if (!changedDuringRun) {\n // Dirty before the run, untouched during it — not part of this\n // run's change set at all.\n continue;\n }\n\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: outsideApplicationRoot\n ? ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT\n : ownedByConcurrentLane\n ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE\n : ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,\n dirtyAtBaseline: true,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),\n ...(baselineState.fingerprint !== undefined ? { baselineFingerprint: baselineState.fingerprint } : {}),\n ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),\n });\n }\n\n const disappearedFromBaseline = Object.keys(baseline.files)\n .filter((path) => !(path in postRun.files))\n .sort();\n\n /*\n * A commit landing inside the run window removes its files from the dirty\n * set, so everything above is blind to them: a run that committed its own\n * work produced an empty change set and still reported success. Recover the\n * committed paths from the head-to-head diff so nothing is invisible. They\n * are marked COMMITTED_DURING_RUN rather than attributed — a parallel\n * session's commit is indistinguishable from the agent's — and the window\n * is recorded as `historyMutated` on the run's result, for whoever reviews\n * and commits it. (This said an \"acceptance tier\" refuses to promote such a\n * result by policy; nothing reads `historyMutated` in code.)\n */\n const committedDuringRun = baseline.headSha === postRun.headSha\n ? []\n : await this.readCommittedPaths(baseline.headSha, postRun.headSha);\n for (const path of committedDuringRun) {\n if (entries.some((entry) => entry.path === path)) continue;\n entries.push({\n path,\n changeKind: ChangeSetFileChangeKind.MODIFIED,\n attribution: ChangeSetAttributionClass.COMMITTED_DURING_RUN,\n dirtyAtBaseline: baseline.files[path] !== undefined,\n });\n }\n\n const stats = {\n runExclusive: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.RUN_EXCLUSIVE).length,\n baselineDirtyAmbiguous: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS).length,\n appearedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.APPEARED_DURING_RUN).length,\n disappearedFromBaseline: disappearedFromBaseline.length,\n committedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.COMMITTED_DURING_RUN).length,\n concurrentHostLane: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.CONCURRENT_HOST_LANE).length,\n outsideApplicationRoot: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT).length,\n };\n\n this.logDebug('Captured coding-agent change set', {\n baselineHeadSha: baseline.headSha,\n postRunHeadSha: postRun.headSha,\n ...stats,\n });\n\n return {\n baselineHeadSha: baseline.headSha,\n postRunHeadSha: postRun.headSha,\n headMovedDuringRun: baseline.headSha !== postRun.headSha,\n baselineCapturedAt: baseline.capturedAt,\n capturedAt: postRun.capturedAt,\n files: entries.sort((left, right) => left.path.localeCompare(right.path)),\n stats,\n disappearedFromBaseline,\n fullDiffText,\n };\n }\n\n // ================================================================\n // Read-only git plumbing\n // ================================================================\n\n private async resolveHeadSha(): Promise<string> {\n const { stdout } = await this.execGit(['rev-parse', 'HEAD']);\n return stdout.trim();\n }\n\n /**\n * `--relative` is load-bearing, not cosmetic. Every other path this service\n * records is application-root-relative (`ls-files --others` reports relative\n * to `-C saasRoot`; `status --porcelain=v2 -z` does NOT, and is mapped by\n * `resolveApplicationRelativePathMapper`), but `diff`\n * reports repository-root paths and the WHOLE repository unless told\n * otherwise. For an application hosted inside a larger repository that meant\n * no tracked-dirty path ever matched its own diff section, so every tracked\n * fingerprint was silently absent: baseline-dirty files could change during\n * a run without being detected, and the post-run fingerprint an acceptance\n * compares against did not exist. Same for the committed-path recovery below.\n */\n private async readFullDiffText(includeRawPaths = false): Promise<string> {\n const { stdout } = await this.execGit(['diff', '--relative', ...(includeRawPaths ? ['--raw', '-z', '--patch'] : []), 'HEAD']);\n return stdout;\n }\n\n /**\n * Paths changed by commits between two heads. `--name-only` keeps the output\n * bounded (a commit range on this tree can be very large) and `diff` is\n * already in the read-only subset.\n */\n private async readCommittedPaths(baselineHeadSha: string, postRunHeadSha: string): Promise<string[]> {\n const { stdout } = await this.execGit([\n 'diff',\n '--relative',\n '--name-only',\n '-z',\n `${baselineHeadSha}..${postRunHeadSha}`,\n ]);\n return stdout.split('\\0').filter((path) => path.length > 0).sort();\n }\n\n private async readUntrackedPaths(): Promise<string[]> {\n const { stdout } = await this.execGit(['ls-files', '-z', '--others', '--exclude-standard']);\n return stdout.split('\\0').filter((path) => path.length > 0);\n }\n\n /**\n * List the declared sensitive ignored material. `--ignored` requires an\n * exclude option, and the pathspecs keep the walk bounded — without them\n * this would enumerate every `node_modules` and `dist` tree in the workspace.\n */\n private async readObservedIgnoredPaths(): Promise<string[]> {\n const { stdout } = await this.execGit([\n 'ls-files',\n '-z',\n '--others',\n '--ignored',\n '--exclude-standard',\n '--',\n ...OBSERVED_IGNORED_PATH_SPECS,\n ]);\n return stdout.split('\\0').filter((path) => path.length > 0);\n }\n\n private async buildUntrackedFileState(untrackedPath: string): Promise<GitWorktreeFileState> {\n const absolutePath = join(this.companionContext.saasRoot, untrackedPath);\n try {\n const content = await fs.readFile(absolutePath);\n return {\n path: untrackedPath,\n changeKind: ChangeSetFileChangeKind.UNTRACKED,\n fingerprint: sha256(content),\n sizeBytes: content.byteLength,\n };\n } catch {\n // Raced away by a parallel session between listing and hashing —\n // record presence without a fingerprint.\n return {\n path: untrackedPath,\n changeKind: ChangeSetFileChangeKind.UNTRACKED,\n };\n }\n }\n\n /**\n * Map a REPOSITORY-ROOT path to the APPLICATION-root form every other path in this service uses.\n *\n * `git status --porcelain=v2 -z` does not honour `-C`: with NUL termination git prints paths relative\n * to the repository root, whatever the working directory; without `-z` the same command prints them\n * relative to `-C saasRoot`. Measured 2026-09-13 against Wonder CRM, an application nested at\n * `examples/wonder-crm/` inside the framework repository: the in-app `specifications/src/COHERENCE.md`\n * came back as `examples/wonder-crm/specifications/src/COHERENCE.md`, and an out-of-app file as\n * `.claude/…` rather than `../../.claude/…`.\n *\n * Two silent consequences followed, for every application that is not its repository's root. Every\n * tracked in-app edit failed the scope check, because its key could never match an application-relative\n * prefix — `build-task-company-schema` was recorded `mutation_scope_violation` against its own two\n * in-scope edits. And tracked fingerprints went missing, because `diff --relative` keys its sections\n * application-relative and the two keys never met — the failure `readFullDiffText` describes, arriving\n * from the other side.\n *\n * `-z` stays: it is what keeps unusual filenames exact. The prefix comes from git itself\n * (`rev-parse --show-prefix`), so a symlinked or case-varied root cannot disagree with it. An empty prefix\n * — the application IS the repository root, as in every root-level fixture — maps nothing, which is why\n * those fixtures never saw this.\n */\n private async resolveApplicationRelativePathMapper(): Promise<(repositoryRootPath: string) => string> {\n const { stdout } = await this.execGit(['rev-parse', '--show-prefix']);\n // Newline only: a directory name may legitimately end in a space, so `trim()` would corrupt it.\n const prefix = stdout.replace(/\\r?\\n$/u, '');\n if (prefix.length === 0) return (repositoryRootPath) => repositoryRootPath;\n const prefixDirectory = prefix.replace(/\\/$/u, '');\n return (repositoryRootPath) => (repositoryRootPath.startsWith(prefix)\n ? repositoryRootPath.slice(prefix.length)\n : posix.relative(prefixDirectory, repositoryRootPath));\n }\n\n /**\n * Parse `git status --porcelain=v2 -z` into tracked-dirty file states.\n * Untracked (`?`) and ignored (`!`) records are skipped — untracked files\n * are sourced from `ls-files --others --exclude-standard` instead\n * (the pinned P-19 subset).\n */\n private async readTrackedDirtyStates(): Promise<GitWorktreeFileState[]> {\n const { stdout } = await this.execGit(['status', '--porcelain=v2', '-z']);\n const toApplicationRelative = await this.resolveApplicationRelativePathMapper();\n const states: GitWorktreeFileState[] = [];\n\n const records = stdout.split('\\0');\n for (let index = 0; index < records.length; index++) {\n const line = records[index];\n if (line.length === 0) continue;\n const recordType = line[0];\n\n if (recordType === '1') {\n // `1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>`\n const fields = line.split(' ');\n const path = fields.slice(8).join(' ');\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: changeKindFromXY(fields[1] ?? '') });\n } else if (recordType === '2') {\n // `2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <Xscore> <path>\\0<origPath>\\0`\n const fields = line.split(' ');\n const path = fields.slice(9).join(' ');\n // In -z mode the original path is the NEXT record, not tab-separated.\n index++;\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: ChangeSetFileChangeKind.RENAMED });\n } else if (recordType === 'u') {\n // `u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>`\n const fields = line.split(' ');\n const path = fields.slice(10).join(' ');\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: ChangeSetFileChangeKind.UNMERGED });\n }\n // '?' and '!' intentionally skipped (see JSDoc).\n }\n\n return states;\n }\n\n /**\n * Pair NUL-framed raw post-image names with patch sections from the SAME Git invocation.\n * Raw names preserve Unicode, tabs and newlines without decoding human-facing C quoting.\n * Rename/copy records carry two names; the second is the post-image. Git emits raw entries\n * and patch sections in the same order. A mismatch is refused instead of losing fingerprints.\n */\n private splitDiffSectionsByPath(diffText: string): Map<string, string> {\n if (!diffText) return new Map();\n const boundary = diffText.indexOf('\\0\\0');\n if (boundary < 0) throw new Error('Git diff lacks NUL-framed path metadata');\n const raw = diffText.slice(0, boundary).split('\\0');\n const paths: string[] = [];\n for (let index = 0; index < raw.length;) {\n const header = raw[index++];\n if (!header.startsWith(':')) throw new Error('Malformed Git raw diff metadata');\n const status = header.split(' ').at(-1) ?? '';\n let path = raw[index++];\n if (status.startsWith('R') || status.startsWith('C')) path = raw[index++];\n if (!path) throw new Error('Git raw diff record lacks a path');\n paths.push(path);\n }\n const parts = diffText.slice(boundary + 2).split(/^(?=diff --git )/m).filter((part) => part.startsWith('diff --git '));\n if (parts.length !== paths.length) throw new Error('Git raw path and patch section counts disagree');\n return new Map(paths.map((path, index) => [path, parts[index]]));\n }\n\n /**\n * The BASIS an episode ran against: git's own content hash for the specifications tree.\n *\n * Rule 6 of the contract in `.claude/rules/one-source-of-truth.md`. This replaces\n * `sourceFamilyHeadSetDigest` — a digest over an accepted head set, which named a machine-local ledger\n * entry, could not be compared across two clones, and meant nothing after a merge.\n *\n * `git rev-parse HEAD:<path>` returns a TREE hash: git's own address for a directory's exact content.\n * Two developers with the same specifications get the same basis without coordinating, a fresh clone\n * derives it in one command, and a merge produces a new one that both sides can compute. That is what\n * \"branchable\" means, and it is the only reason a hash is admissible here at all under Rule 0 — this one\n * is not invented, it is read.\n *\n * Returns null when the tree has never been committed. That is a real state (a fresh application before\n * its first commit), and it is the CALLER's business what to do about it — an episode may legitimately\n * run against uncommitted work; it just cannot claim a basis for it.\n */\n public async resolveSpecificationsTreeBasis(subjectRelativeSpecificationsPath: string): Promise<string | null> {\n try {\n // `HEAD:./<path>`, not `HEAD:<path>`: a tree-ish path resolves from the REPOSITORY root regardless of\n // `-C`, so for an application nested in a larger repository the bare form names a path that does not\n // exist — git itself answers \"exists, but not 'specifications' … aka 'HEAD:./specifications'\". The\n // `./` form resolves from `-C saasRoot`, the application root this method is contracted in.\n const { stdout } = await this.execGit(['rev-parse', `HEAD:./${subjectRelativeSpecificationsPath}`]);\n const treeHash = stdout.trim();\n return /^[0-9a-f]{40}$/u.test(treeHash) ? treeHash : null;\n } catch {\n return null;\n }\n }\n\n /**\n * The git half of the state a build-plan LANDING answer is a function of (#3206): the commit HEAD names and\n * every path under the application root whose index or working-tree copy differs from it, with the porcelain\n * status of each. `undefined` when git cannot be asked, which a caller must read as \"cannot say whether\n * anything moved\", never as \"nothing moved\".\n *\n * Three spawns, whatever the size of the plan: `rev-parse HEAD`, one `status --porcelain -z\n * --untracked-files=all -- .` (without optional locks), and `rev-parse HEAD` again — a HEAD that moved between them\n * pairs a commit with another state's difference list, so the reading is refused rather than returned. Landing asks \"is this path committed\" (tracked, and HEAD, index and working tree\n * in agreement), so for every path the answer is decided by exactly these two facts: whether HEAD changed\n * (a commit, a reset, a branch switch) and whether the path is in the difference list. A dirty path's CONTENT\n * is not in the porcelain line, so a caller that needs to see a second edit of an already-dirty file stats the\n * listed paths itself.\n *\n * `--untracked-files=all` so a NEW file inside a new directory is listed by its own path rather than folded\n * into its directory, which is what a probe names. Ignored files are not listed; build outputs are signed by\n * the caller separately.\n *\n * Never throws.\n */\n public async readLandingSourceState(): Promise<GitLandingSourceState | undefined> {\n try {\n // An unborn HEAD (a repository with no commit yet) is a real state: nothing is committed, so `null`.\n const headSha = await this.resolveHeadSha().catch(() => null);\n // No optional locks: several sessions commit in this tree, and a read must never hold `index.lock` against them.\n const { stdout } = await this.execGit(['status', '--porcelain', '-z', '--untracked-files=all', '--', '.'], { noOptionalLocks: true });\n // A commit between the two reads would pair a HEAD with a difference list of another state: refuse the reading.\n const headAfter = await this.resolveHeadSha().catch(() => null);\n if (headAfter !== headSha) return undefined;\n // `--porcelain` prints repository-root paths (see `selectCommittedPaths`); a caller stats them from the application root.\n const prefix = await this.resolveRepositoryPrefix();\n const changedPaths = GitChangeSetCompanionService.parsePorcelainZPaths(stdout)\n .map((entry) => (entry.startsWith(prefix) ? entry.slice(prefix.length) : entry));\n return { headSha: headSha === '' ? null : headSha, porcelain: stdout, changedPaths };\n } catch {\n return undefined;\n }\n }\n\n /**\n * Checks of a path that are still running, so concurrent callers share one pair of git spawns (#1005).\n *\n * Created on first use rather than as an initialized field, because test harnesses build this service\n * with `Object.create` and never run its field initializers.\n */\n private inFlightCommittedChecks?: Map<string, Promise<boolean>>;\n\n /**\n * Are the working-tree bytes at this path IDENTICAL to committed content?\n *\n * Why it matters: once git is the accepted state, a committed file has nothing outstanding to accept, so it must stop being reported as\n * maintained-bytes drift.\n *\n * `status --porcelain -- <path>` answers it exactly and with a subcommand already inside the read-only\n * carve-out. Empty output means HEAD, index and worktree agree for that path. Anything else -- an\n * unstaged edit, a STAGED edit that differs from HEAD, an untracked file, a rename -- is a difference,\n * and every one of those is correctly NOT committed.\n *\n * Never throws, by contract. A repository that cannot be inspected answers `false`, which falls back to\n * the accepted-manifest comparison: the behaviour that predates this port. Failing closed here instead\n * would put a boot path behind a remedy that needs the very companion it just stopped\n * (`continuity-drift-and-cas-basis.md`, Rule 3).\n */\n public isWorktreePathCommitted(subjectRelativePath: string): Promise<boolean> {\n /*\n * One check per path AT A TIME. Every build-dispatch read resolves landing for the whole plan, and\n * overlapping callers (a poller on `/build/next`, a dispatch, the workbench board) used to spawn the\n * same `ls-files` + `status` pair once each. Measured on Wonder CRM on 2026-09-13: 228 git children in\n * about five seconds, and the companion stopped answering `/health`. Concurrent calls get the same\n * answer anyway, so they share the pending promise. Once it settles it is dropped: a later call asks\n * git again, because the tree may have changed.\n */\n this.inFlightCommittedChecks ??= new Map();\n const inFlight = this.inFlightCommittedChecks.get(subjectRelativePath);\n if (inFlight) return inFlight;\n const check = this.checkWorktreePathCommitted(subjectRelativePath).finally(() => {\n this.inFlightCommittedChecks?.delete(subjectRelativePath);\n });\n this.inFlightCommittedChecks.set(subjectRelativePath, check);\n return check;\n }\n\n /** The two spawns behind {@link isWorktreePathCommitted}. Never rejects. */\n private async checkWorktreePathCommitted(subjectRelativePath: string): Promise<boolean> {\n try {\n /*\n * TRACKED FIRST. An empty `git status` is NOT proof of \"committed\" -- it is proof that git reported\n * no DIFFERENCE, and git reports none for a path it does not track. An untracked or IGNORED file\n * therefore looks identical to a pristine committed one.\n *\n * That is not a theoretical edge. Measured 2026-08-22: the first version of this method checked only\n * `status`, and the ordinary-bootstrap proof went red because its fixture lives under the\n * repo-ignored `.wildo-test-artifacts/`. Every file there answered \"committed\", so a deliberately\n * drifted file stopped being reported as drift -- the guard silently disabled by an ignore rule.\n * `.claude/rules/negative-results-require-a-positive-probe.md` is exactly this shape: an empty\n * result means \"this command, as invoked, found nothing\".\n *\n * `ls-files -- <path>` names the path only when it is in the index, so the two together mean what\n * this method claims: git tracks it, and HEAD, index and worktree agree.\n */\n const { stdout: tracked } = await this.execGit(['ls-files', '--', subjectRelativePath]);\n if (tracked.trim() === '') return false;\n const { stdout: status } = await this.execGit(['status', '--porcelain', '--', subjectRelativePath]);\n return status.trim() === '';\n } catch {\n this.noteCommittedReadFailure();\n return false;\n }\n }\n\n /**\n * How many committed-tree reads have FAILED in this process (#3206 review F4): an `ls-files` / `status` pair that\n * could not run, or a batch that fell back to the per-path route. Each of those answers \"not committed\" rather than\n * throwing, which is right for a single read and wrong for an answer somebody HOLDS: a timeout under load reads\n * exactly like an absent product. A caller that keeps an answer compares the count before and after deriving it, and\n * treats a rise as \"this answer is not known to be true\" — never as proof it is false.\n */\n public committedReadFailureCount(): number {\n return this.committedReadFailures ?? 0;\n }\n\n /** See {@link committedReadFailureCount}. Lazily initialized for the reason {@link inFlightCommittedChecks} is. */\n private committedReadFailures?: number;\n\n private noteCommittedReadFailure(): void {\n this.committedReadFailures = (this.committedReadFailures ?? 0) + 1;\n }\n\n /**\n * How many paths ride one `ls-files` / `status` pathspec list.\n *\n * Bounded only to stay clear of the argv limit — at ~120 bytes a path this is ~30 KB against a\n * 1 MB `ARG_MAX`, so the margin is two orders of magnitude and the chunk count stays small.\n */\n private static readonly COMMITTED_BATCH_PATHSPEC_LIMIT = 256;\n\n /**\n * Where this service's `saasRoot` sits INSIDE its git repository, with a trailing slash, or `''`.\n *\n * Cached for the life of the service: a working directory does not move within its repository.\n * Needed because the two commands below disagree about what a path is relative to — see\n * {@link selectCommittedPaths}.\n */\n private repositoryPrefix?: Promise<string>;\n\n private resolveRepositoryPrefix(): Promise<string> {\n this.repositoryPrefix ??= this.execGit(['rev-parse', '--show-prefix'])\n .then(({ stdout }) => stdout.trim())\n .catch(() => '');\n return this.repositoryPrefix;\n }\n\n /**\n * Last-commit times for MANY paths, memoised against the COMMIT THE ANSWER DEPENDS ON.\n *\n * `git log -1 --format=%ct -- <path>` reads the commit graph reachable from HEAD and nothing else —\n * not the index, not the worktree. So its answer can only change when HEAD moves, which makes the\n * HEAD object id a COMPLETE cache key rather than a heuristic one: a branch switch, a commit, a\n * reset all move it, and an ordinary edit correctly does not.\n *\n * That matters because this was the largest remaining per-path caller once the committed-ness and\n * committed-text reads were batched: the eligibility board asks it once per family, on every poll,\n * and a dogfood application has a dozen-odd families. Steady state is now ONE `rev-parse` for the\n * whole set; the per-path walks happen once per commit rather than once per poll.\n *\n * Unbounded by design and that is deliberate rather than overlooked: the key set is the family\n * paths of one application, so it is bounded by the vocabulary rather than by traffic, and a stale\n * generation's entries are dropped wholesale when HEAD moves.\n *\n * Never throws. A `rev-parse` that fails answers from the per-path route, so an unreadable\n * repository behaves exactly as it did before this memo existed.\n */\n public async lastCommitUnixTimes(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, number>> {\n const paths = [...new Set(subjectRelativePaths)];\n const times = new Map<string, number>();\n if (paths.length === 0) return times;\n\n let headObjectId: string | undefined;\n try {\n const { stdout } = await this.execGit(['rev-parse', 'HEAD']);\n headObjectId = stdout.trim() || undefined;\n } catch {\n headObjectId = undefined;\n }\n\n if (headObjectId === undefined || this.commitTimesByPath?.headObjectId !== headObjectId) {\n this.commitTimesByPath = headObjectId === undefined ? undefined : { headObjectId, times: new Map() };\n }\n const memo = this.commitTimesByPath;\n\n for (const path of paths) {\n if (memo?.times.has(path) === true) {\n const cached = memo.times.get(path);\n if (cached !== undefined) times.set(path, cached);\n continue;\n }\n const resolved = await this.lastCommitUnixTime(path);\n // A path with no commit history is memoised as ABSENT, not skipped — otherwise every poll would\n // re-walk the history of exactly the families that have never been committed.\n memo?.times.set(path, resolved);\n if (resolved !== undefined) times.set(path, resolved);\n }\n return times;\n }\n\n /** Last-commit times valid only while HEAD is unmoved; see {@link lastCommitUnixTimes}. */\n private commitTimesByPath?: { headObjectId: string; times: Map<string, number | undefined> };\n\n /**\n * Which of MANY paths are committed — the same question as {@link isWorktreePathCommitted}, asked\n * in a bounded number of spawns instead of two per path.\n *\n * ## Why this exists\n *\n * Resolving a build plan's landing asks the per-path question for every probe path of every task,\n * and each answer cost a `ls-files` + `status` PAIR. #1005 already measured that shape stopping\n * this companion — \"228 git children in about five seconds, and the companion stopped answering\n * `/health`\" — and the fix then was the in-flight map above, which shares a check between\n * CONCURRENT callers of the SAME path. A landing resolution is neither: it walks hundreds of\n * DISTINCT paths, so nothing was shared and the storm returned.\n *\n * Measured 2026-09-22 on `examples/wonder-todos`: the companion sustained ~158 child processes per\n * second in ~12-second bursts, held ~45% of a core, and `/health/ready` — which the workbench gives\n * ten seconds — took 16 to 35 seconds. The workbench then reported its own origin as the thing that\n * was not ready, which is why this surfaced as a proxy defect.\n *\n * ## The trap this method exists to contain\n *\n * **The two commands do not agree about what a path is relative to**, and the disagreement is\n * silent. Measured from `examples/wonder-todos` inside this monorepo:\n *\n * ```\n * git -C <app> ls-files -- specifications/src/build-plan/index.ts\n * -> specifications/src/build-plan/index.ts (relative to the CWD)\n * git -C <app> status --porcelain -- specifications/src/build-plan/index.ts\n * -> M examples/wonder-todos/specifications/src/build-plan/index.ts (relative to the REPO ROOT)\n * ```\n *\n * `--porcelain` pins `status.relativePaths` off by definition, so its paths carry the prefix and\n * `ls-files`'s do not. The per-path version was immune because it never READ a path — it only asked\n * whether the output was empty. A batched version must match names, so it must strip the prefix.\n *\n * Getting that wrong fails in the DANGEROUS direction: no reported path would match any probe path,\n * every path would read as clean, and every task would report LANDED. That is why the prefix is\n * derived from `rev-parse --show-prefix` rather than assumed empty — it IS empty for a standalone\n * application, which is the shipped case and the one that would never have caught this.\n *\n * ## The answer is the same one, composed the same way\n *\n * TRACKED FIRST, for the reason {@link checkWorktreePathCommitted} records: an empty `status` proves\n * only that git reported no difference, and it reports none for a path it does not track. So a path\n * is committed here exactly when `ls-files` names it and `status` does not.\n *\n * Never throws. A batch that fails falls back to the per-path checks rather than answering for them,\n * so a repository this cannot inspect behaves precisely as it did before this method existed.\n */\n public async selectCommittedPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n\n try {\n const prefix = await this.resolveRepositoryPrefix();\n const tracked = new Set<string>();\n const changed = new Set<string>();\n\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout: trackedOut } = await this.execGit(['ls-files', '-z', '--', ...chunk]);\n for (const entry of trackedOut.split('\\0')) if (entry !== '') tracked.add(entry);\n\n const { stdout: statusOut } = await this.execGit(['status', '--porcelain', '-z', '--', ...chunk]);\n for (const entry of GitChangeSetCompanionService.parsePorcelainZPaths(statusOut)) {\n changed.add(entry.startsWith(prefix) ? entry.slice(prefix.length) : entry);\n }\n }\n\n return new Set(paths.filter((path) => tracked.has(path) && !changed.has(path)));\n } catch {\n /*\n * Fall back rather than answer. `isWorktreePathCommitted` is the contract this batch accelerates,\n * and it already answers `false` for a repository it cannot read — so deferring to it keeps one\n * definition of the failure behaviour instead of adding a second that can drift from it.\n */\n this.noteCommittedReadFailure();\n const answers = await Promise.all(paths.map(async (path) => [path, await this.isWorktreePathCommitted(path)] as const));\n return new Set(answers.filter(([, committed]) => committed).map(([path]) => path));\n }\n }\n\n /**\n * THE WORKING TREE as a build task's landing reads it (#3204), the counterpart of the committed reads above: a path is\n * PRESENT when the application holds it, readable on disk and seen by git ({@link selectGitVisiblePaths}), so a file\n * under an ignored directory is never a product; its text is the working file's. Decided by Paul (2026-11-09): a task\n * lands when its product is in the working tree, and commits are checkpoints that record. Never throws: an unreadable\n * file is absent, and an unreadable repository counts a committed-read failure (see `selectGitVisiblePaths`).\n */\n public async isWorktreePathPresent(subjectRelativePath: string): Promise<boolean> {\n return (await this.selectPresentPaths([subjectRelativePath])).has(subjectRelativePath);\n }\n\n /** {@link isWorktreePathPresent} for a set: one `ls-files` per chunk, and a read of each path git sees. */\n public async selectPresentPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const visible = await this.selectGitVisiblePaths(subjectRelativePaths);\n const present = await Promise.all([...visible].map(async (path) => {\n const stat = await fs.stat(join(this.companionContext.saasRoot, path)).catch(() => undefined);\n return stat?.isFile() === true ? path : undefined;\n }));\n return new Set(present.filter((path): path is string => path !== undefined));\n }\n\n /** The working file's text, or `undefined` when it cannot be read (absent, a directory, unreadable). */\n public async readWorktreeText(subjectRelativePath: string): Promise<string | undefined> {\n return fs.readFile(join(this.companionContext.saasRoot, subjectRelativePath), 'utf8').catch(() => undefined);\n }\n\n /** {@link readWorktreeText} for a set; a path that cannot be read is absent from the map. */\n public async readWorktreeTexts(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const entries = await Promise.all([...new Set(subjectRelativePaths)].map(async (path) => [path, await this.readWorktreeText(path)] as const));\n return new Map(entries.filter((entry): entry is readonly [string, string] => entry[1] !== undefined));\n }\n\n /**\n * Which of these paths git SEES (#3204): tracked, or untracked and not ignored — `ls-files --cached --others\n * --exclude-standard`, one per pathspec chunk. What a build task's landing asks of the WORKING tree, beside reading the\n * file: a product counts when it is there and is part of the application's source, so a file under an ignored directory\n * (a build output, a test artifact) never reads as a product, the trap {@link checkWorktreePathCommitted} records.\n *\n * Says nothing about whether the file still exists (an index entry outlives a deletion): the caller reads it. Never\n * throws: an unreadable repository answers \"sees none of them\" and counts a committed-read failure, so a landing pass\n * that met it is held as provisional rather than believed.\n */\n public async selectGitVisiblePaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n try {\n const visible = new Set<string>();\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout } = await this.execGit(['ls-files', '-z', '--cached', '--others', '--exclude-standard', '--', ...chunk]);\n for (const entry of stdout.split('\\0')) if (entry !== '') visible.add(entry);\n }\n return new Set(paths.filter((path) => visible.has(path)));\n } catch {\n this.noteCommittedReadFailure();\n return new Set();\n }\n }\n\n /**\n * Which of these paths git TRACKS (the index names them), in one `ls-files` per pathspec chunk — the half of\n * {@link selectCommittedPaths} a DELETION needs on its own: a committed deletion is a path git no longer tracks and the\n * working tree no longer holds. Never throws; an unreadable repository answers \"tracks all of them\", the direction in\n * which a deletion reads as still waiting on its commit rather than as settled.\n */\n public async selectTrackedPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n try {\n const tracked = new Set<string>();\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout } = await this.execGit(['ls-files', '-z', '--', ...chunk]);\n for (const entry of stdout.split('\\0')) if (entry !== '') tracked.add(entry);\n }\n return tracked;\n } catch {\n this.noteCommittedReadFailure();\n return new Set(paths);\n }\n }\n\n /**\n * Every application-relative path a commit touched since `sinceIso` (commit time, HEAD's history), or `undefined` when\n * git could not be asked (#3233): \"could not tell\" must never read as \"nothing changed\". One `log --name-only`.\n */\n public async listPathsCommittedSince(sinceIso: string): Promise<readonly string[] | undefined> {\n try {\n // `--relative` scopes the paths to this application and prints them relative to it, as the rest of this service does.\n const { stdout } = await this.execGit(['log', `--since=${sinceIso}`, '--name-only', '--format=', '--relative', '--', '.']);\n return [...new Set(stdout.split('\\n').map((line) => line.trim()).filter((line) => line !== ''))];\n } catch {\n return undefined;\n }\n }\n\n /** Split a path list into argv-safe pathspec chunks. */\n private static *chunkPaths(paths: readonly string[]): Generator<readonly string[]> {\n for (let index = 0; index < paths.length; index += GitChangeSetCompanionService.COMMITTED_BATCH_PATHSPEC_LIMIT) {\n yield paths.slice(index, index + GitChangeSetCompanionService.COMMITTED_BATCH_PATHSPEC_LIMIT);\n }\n }\n\n /**\n * Every path named by `git status --porcelain -z`, ORIGIN PATHS INCLUDED.\n *\n * `-z` rather than the newline form because the newline form QUOTES and C-escapes any path with a\n * space or a non-ASCII byte, so a parser would have to unescape — and a path it unescaped wrongly\n * would silently read as clean. `-z` emits raw bytes and needs no unquoting at all.\n *\n * A rename or copy occupies TWO NUL-separated fields — `XY <new>\\0<origin>\\0` — and the origin\n * carries no status prefix of its own. Both names are reported: a path that was renamed AWAY is not\n * \"committed and unchanged\" at its old name, and consuming the extra field is also what keeps the\n * parser in step, since reading it as a status entry would mis-slice the next path.\n */\n private static parsePorcelainZPaths(stdout: string): readonly string[] {\n const fields = stdout.split('\\0');\n const named: string[] = [];\n for (let index = 0; index < fields.length; index += 1) {\n const field = fields[index];\n if (field === undefined || field.length < 4) continue;\n named.push(field.slice(3));\n const indexStatus = field[0];\n const worktreeStatus = field[1];\n if (indexStatus === 'R' || indexStatus === 'C' || worktreeStatus === 'R' || worktreeStatus === 'C') {\n index += 1;\n const origin = fields[index];\n if (origin !== undefined && origin !== '') named.push(origin);\n }\n }\n return named;\n }\n\n /**\n * The COMMITTED text at MANY paths — one `git cat-file --batch` subprocess instead of one\n * `git show` per path.\n *\n * ## Why\n *\n * The landing probe reads committed bytes for every DECLARES probe of every task, and each read\n * was its own `show` spawn. Attributed at the spawn site 2026-09-22 on `examples/wonder-todos`,\n * this was the largest remaining source once the committed-ness checks were batched: 20 of 45\n * spawns in a ten-second window, on four distinct paths — the same files, re-read per resolution.\n *\n * ## The protocol, because it is positional and that is the whole risk\n *\n * `--batch` answers each stdin line in order and its reply for a FOUND object is\n * `<oid> <type> <size>\\n<bytes>\\n` — **which does not echo the path**. So results are matched to\n * requests by ORDER, and a parser that loses its place returns one path's bytes under another\n * path's name. A missing object answers `<the line you sent> missing\\n`, which both reports the\n * absence and resynchronises the stream, so the two cases cannot be confused.\n *\n * The reply is read as BYTES and sliced by the declared `size` before being decoded, never split\n * on newlines: content contains newlines, so a line-oriented parser would mis-slice every file\n * with more than one line in it — which is every file this reads.\n *\n * `HEAD:./<path>` keeps the `./` that {@link readCommittedText} documents: without it the name\n * resolves against the REPOSITORY root even under `git -C`, so inside this monorepo every request\n * would miss and every task would read as never landed.\n *\n * Never throws, and falls back to the per-path reads rather than answering for them — the same\n * contract as {@link selectCommittedPaths}, so one definition of the failure behaviour.\n */\n public async readCommittedTexts(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const paths = [...new Set(subjectRelativePaths)];\n const texts = new Map<string, string>();\n if (paths.length === 0) return texts;\n\n try {\n const stdout = await this.runCatFileBatch(paths.map((path) => `HEAD:./${path}`));\n let offset = 0;\n for (const path of paths) {\n const newline = stdout.indexOf(0x0a, offset);\n if (newline < 0) throw new Error('cat-file --batch ended mid-header');\n const header = stdout.toString('latin1', offset, newline);\n offset = newline + 1;\n if (header.endsWith(' missing') || header.endsWith(' ambiguous')) continue;\n const size = Number(header.slice(header.lastIndexOf(' ') + 1));\n if (!Number.isSafeInteger(size) || size < 0) throw new Error(`cat-file --batch header not understood: ${header}`);\n texts.set(path, stdout.toString('utf8', offset, offset + size));\n // The payload is followed by a single newline the object itself does not contain.\n offset += size + 1;\n }\n return texts;\n } catch {\n this.noteCommittedReadFailure();\n const answers = await Promise.all(paths.map(async (path) => [path, await this.readCommittedText(path)] as const));\n for (const [path, text] of answers) if (text !== undefined) texts.set(path, text);\n return texts;\n }\n }\n\n /** One `git cat-file --batch`, fed {@link names} on stdin, answered as raw bytes. */\n private runCatFileBatch(names: readonly string[]): Promise<Buffer> {\n if (!READ_ONLY_GIT_SUBCOMMANDS.has('cat-file')) {\n return Promise.reject(new Error(\"Git subcommand 'cat-file' is outside the companion's read-only carve-out (DD-8 / P-19).\"));\n }\n return new Promise<Buffer>((resolve, reject) => {\n const child = spawn('git', ['-C', this.companionContext.saasRoot, 'cat-file', '--batch'], { stdio: ['pipe', 'pipe', 'pipe'] });\n const chunks: Buffer[] = [];\n let bytes = 0;\n let settled = false;\n const finish = (error: Error | null): void => {\n if (settled) return;\n settled = true;\n clearTimeout(timer);\n child.kill('SIGKILL');\n if (error) reject(error); else resolve(Buffer.concat(chunks));\n };\n const timer = setTimeout(() => finish(new Error('git cat-file --batch timed out')), GIT_TIMEOUT_MS);\n child.stdout.on('data', (chunk: Buffer) => {\n bytes += chunk.length;\n // The same ceiling `execGit` gives every other read, enforced here because `spawn` has no\n // `maxBuffer` of its own — without it an unexpectedly large object set is unbounded memory.\n if (bytes > GIT_MAX_BUFFER_BYTES) { finish(new Error('git cat-file --batch exceeded the read ceiling')); return; }\n chunks.push(chunk);\n });\n child.on('error', (error) => finish(error));\n child.on('close', (code) => finish(code === 0 ? null : new Error(`git cat-file --batch exited ${String(code)}`)));\n child.stdin.on('error', () => { /* a child that died before we finished writing settles through `close`. */ });\n child.stdin.end(`${names.join('\\n')}\\n`);\n });\n }\n\n /**\n * The COMMITTED text at this path, or `undefined` when the path is not committed.\n *\n * Reads the worktree file, and that is exact rather than approximate:\n * {@link isWorktreePathCommitted} has already established that git tracks the path and that HEAD,\n * WHAT HEAD HOLDS, read from the object database — never the worktree copy.\n *\n * It used to ask whether the worktree and index AGREED for the path and then read the file from\n * disk, on the reasoning that a half-edited file is work in progress and never evidence. That\n * reasoning is right about the WORKTREE and wrong about this question: whether a path is currently\n * being edited says nothing about what was committed, and on a tree several sessions write to\n * continuously, \"clean\" is the exceptional state rather than the normal one.\n *\n * Measured 2026-09-16 and the cost was per-dispatch. A sibling session held every module's\n * `*.relationships.ts` dirty while adding `onParentDelete` declarations; every relationship task in\n * the build plan therefore read as NOT LANDED, the lane re-offered work finished hours earlier, and\n * a coding run was spent per task discovering there was nothing to write — one of them judged GAP\n * for recording an empty change-set, which was the honest verdict on the evidence. HEAD held every\n * one of those edges throughout.\n *\n * The earlier note said `git show` was declined to keep {@link READ_ONLY_GIT_SUBCOMMANDS} small.\n * The set exists to keep this service incapable of mutation, and `show` prints an object; the four\n * verbs it started with were never the point.\n */\n public async readCommittedText(subjectRelativePath: string): Promise<string | undefined> {\n try {\n /*\n * `./` IS LOAD-BEARING. `HEAD:<path>` resolves against the REPOSITORY ROOT even under `git -C`,\n * so the bare form asks for `shared-lib/…` at the monorepo root — which does not exist, making\n * every probe answer \"absent\" and every task read as never landed. `HEAD:./<path>` is the form\n * that resolves against the current directory, i.e. the application root this service runs in.\n * Measured both ways before this was written: bare `fatal: path … does not exist`, `./` returns\n * the file.\n */\n const { stdout } = await this.execGit(['show', `HEAD:./${subjectRelativePath}`]);\n return stdout;\n } catch (error) {\n // No such path at HEAD — untracked, or never committed. Absent, not empty.\n // Anything else (a timeout, a spawn that failed) also reads as absent, and is COUNTED as a failed read, so a\n // caller holding the answer knows it may not be true (#3206 review L1).\n if (!GIT_PATH_ABSENT_AT_HEAD.test(describeGitReadFailure(error))) {\n this.noteCommittedReadFailure();\n }\n return undefined;\n }\n }\n\n /**\n * Every commit reachable from HEAD that changed `relativePath`, newest first, with author and whole message (#3224\n * review): the build-task decisions reader honours the file only when its bytes are what a commit made through a\n * person's door produced. Records are split on RS and fields on NUL, so no message text can be read as an author or a\n * record. `undefined` when git cannot be read: an unknown history is never read as a door.\n */\n public async listCommitsTouching(relativePath: string): Promise<readonly { readonly sha: string; readonly authorName: string; readonly authorEmail: string; readonly body: string }[] | undefined> {\n try {\n const { stdout } = await this.execGit(['log', '--format=%x1e%H%x00%an%x00%ae%x00%B', 'HEAD', '--', relativePath]);\n return stdout.split('\\x1e').filter((record) => record.trim().length > 0).flatMap((record) => {\n const [sha, authorName, authorEmail, ...body] = record.split('\\0');\n return sha?.trim() && authorName !== undefined && authorEmail !== undefined\n ? [{ sha: sha.trim(), authorName, authorEmail, body: body.join('\\0') }]\n : [];\n });\n } catch {\n return undefined;\n }\n }\n\n /** The commit HEAD names, or `undefined` when git cannot say (#3224 review: the decisions history is cached per HEAD). */\n public async readHeadCommitSha(): Promise<string | undefined> {\n try {\n return (await this.resolveHeadSha()) || undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Whether `sha` names a commit this repository still holds (#3224 review): a run record whose baseline or post-run\n * commit was rewritten away (reset, rebase and gc) names a window that can no longer be computed. `undefined` when git\n * cannot be asked at all, which is a different answer from \"it no longer exists\".\n */\n public async commitExists(sha: string): Promise<boolean | undefined> {\n if (!/^[0-9a-f]{7,64}$/iu.test(sha)) return false;\n try {\n // `--ignore-missing` answers an object it does not hold with nothing (exit 0), so a failure here is git failing.\n const { stdout } = await this.execGit(['log', '--format=%H', '--no-walk', '--ignore-missing', sha]);\n return stdout.trim().length > 0;\n } catch {\n return undefined;\n }\n }\n\n /** The blob id `rev` holds at `relativePath` (application-root relative), or `undefined` when it holds none. */\n public async readBlobIdAt(rev: string, relativePath: string): Promise<string | undefined> {\n try {\n // `./` resolves against the application root, as in `readCommittedText`.\n const { stdout } = await this.execGit(['rev-parse', '--verify', '--quiet', `${rev}:./${relativePath}`]);\n return stdout.trim() || undefined;\n } catch {\n return undefined;\n }\n }\n\n /** The text `rev` holds at `relativePath`, or `undefined` when it holds none. */\n public async readTextAt(rev: string, relativePath: string): Promise<string | undefined> {\n try {\n return (await this.execGit(['show', `${rev}:./${relativePath}`])).stdout;\n } catch {\n return undefined;\n }\n }\n\n /**\n * The commits reachable from `tip` and not from `base` (`base..tip`), or `undefined` when git cannot answer. Read by\n * the decisions reader to find the commits made INSIDE a coding run's window (#3224 review).\n */\n public async listCommitsBetween(base: string, tip: string): Promise<readonly string[] | undefined> {\n if (!/^[0-9a-f]{7,64}$/iu.test(base) || !/^[0-9a-f]{7,64}$/iu.test(tip)) return undefined;\n try {\n const { stdout } = await this.execGit(['log', '--format=%H', `${base}..${tip}`]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.length > 0);\n } catch {\n return undefined;\n }\n }\n\n /**\n * The full SHA of `ref` when it names a commit HEAD contains (HEAD itself or an ancestor), else `undefined` (#3224):\n * what `wildo build close --satisfied-by <commit>` accepts. Read-only: `rev-parse` resolves it, and `log\n * --ancestry-path <sha>..HEAD` is non-empty exactly when the commit is a proper ancestor of HEAD (the read-only set has\n * no `merge-base`). A ref that names no commit, or one on another branch, reads `undefined`.\n */\n public async resolveCommitOnHead(ref: string): Promise<string | undefined> {\n if (!/^[0-9a-f]{4,40}$/iu.test(ref)) return undefined;\n try {\n const sha = (await this.execGit(['rev-parse', '--verify', '--quiet', `${ref}^{commit}`])).stdout.trim();\n const head = (await this.execGit(['rev-parse', 'HEAD'])).stdout.trim();\n if (sha.length === 0) return undefined;\n if (sha === head) return sha;\n const between = (await this.execGit(['log', '--ancestry-path', '--format=%H', '-1', `${sha}..HEAD`])).stdout.trim();\n return between.length > 0 ? sha : undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Unix time (seconds) of the last commit touching the path, or `undefined` when the path has no\n * commit history (a brand-new or untracked file) or the repository cannot be inspected. Used for\n * git-derived artifact FRESHNESS — never stored, so it merges like everything else git carries.\n */\n public async lastCommitUnixTime(subjectRelativePath: string): Promise<number | undefined> {\n try {\n const { stdout } = await this.execGit(['log', '-1', '--format=%ct', '--', subjectRelativePath]);\n const parsed = Number(stdout.trim());\n return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Spawn `git -C <saasRoot> <args>` — argv-array `execFile`, never a\n * shell. The first argument MUST be in {@link READ_ONLY_GIT_SUBCOMMANDS};\n * anything else throws before spawning (the DD-8 read-only guard).\n */\n private async execGit(args: string[], options: { readonly noOptionalLocks?: boolean } = {}): Promise<{ stdout: string; stderr: string }> {\n const subcommand = args[0];\n if (!subcommand || !READ_ONLY_GIT_SUBCOMMANDS.has(subcommand)) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Git subcommand '${subcommand ?? '<none>'}' is outside the companion's read-only carve-out (DD-8 / P-19).`,\n allowedSubcommands: [...READ_ONLY_GIT_SUBCOMMANDS],\n },\n });\n }\n\n try {\n return await execFileAsync(\n 'git',\n // `--no-optional-locks` is a git-wide option, so it precedes the subcommand the guard above checked.\n ['-C', this.companionContext.saasRoot, ...(options.noOptionalLocks === true ? ['--no-optional-locks'] : []), ...args],\n { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS },\n );\n } catch (error) {\n const stderr = (error as { stderr?: string }).stderr ?? '';\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Read-only git invocation failed: git ${args.join(' ')} — ${describeCaughtError(error)}`,\n stderr: stderr.slice(0, 2_000),\n saasRoot: this.companionContext.saasRoot,\n },\n });\n }\n }\n}\n\nfunction changeKindFromXY(xy: string): ChangeSetFileChangeKind {\n if (xy.includes('D')) return ChangeSetFileChangeKind.DELETED;\n if (xy.includes('A')) return ChangeSetFileChangeKind.ADDED;\n if (xy.includes('R')) return ChangeSetFileChangeKind.RENAMED;\n if (xy.includes('M') || xy.includes('T')) return ChangeSetFileChangeKind.MODIFIED;\n return ChangeSetFileChangeKind.UNKNOWN;\n}\n\nfunction sha256(content: string | Buffer): string {\n return createHash('sha256').update(content).digest('hex');\n}\n\n"]}
1
+ {"version":3,"file":"git-change-set.companion.service.js","sourceRoot":"","sources":["../../../../src/claude-cli/services/git-change-set.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAY,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GAKxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAGtF,4HAA4H;AAC5H,SAAS,sBAAsB,CAAC,KAAc;IAC5C,IAAI,MAAM,GAA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4B;IADxC,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAEjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;qCAHxB,aAAa;QAEP,0BAA0B;GAPhD,4BAA4B,CA2nCxC;;AAED,SAAS,gBAAgB,CAAC,EAAU;IAClC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,OAAO,CAAC;IAC7D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,KAAK,CAAC;IAC3D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,OAAO,CAAC;IAC7D,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC,QAAQ,CAAC;IAClF,OAAO,uBAAuB,CAAC,OAAO,CAAC;AACzC,CAAC;AAED,SAAS,MAAM,CAAC,OAAwB;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["/**\n * Read-only git change-set capture for coding-agent dispatch runs\n * (meta-workflows P-19).\n *\n * # DD-8 carve-out — read-only git observation companion-side\n *\n * DD-8 (`.claude/context/dev-companion.md`) places git plumbing in the\n * CLI (`wildo-cli/src/services/companion/git-helper.service.ts`), not the\n * companion. This service is the DELIBERATE, DOCUMENTED carve-out: the\n * change-set capture must run in the same process that owns the run\n * lifecycle (the companion), atomically around the spawn — routing it\n * through the CLI would invert the DD-8 client/server direction and add\n * a network hop around a mutation-critical section.\n *\n * The carve-out is strictly READ-ONLY:\n * - allowed git subset: `status --porcelain=v2`, `diff HEAD`,\n * `diff --name-status <base>..<head>`, `rev-parse HEAD`,\n * `ls-files --others [--ignored] --exclude-standard`\n * (enforced by {@link READ_ONLY_GIT_SUBCOMMANDS});\n * - untracked files are LISTED (path + size), never `git add -N`'d —\n * intent-to-add mutates the index and breaks the read-only contract;\n * - `GitHelper` (stage/commit plumbing) is NOT reused, moved, or\n * exposed over HTTP.\n *\n * # Attribution model (P-19 / P-19b)\n *\n * On the dogfood tree dirty-at-dispatch is the NORMAL state — Paul's\n * parallel sessions mutate the tree continuously. The capture therefore\n * never assumes exclusivity: it snapshots a per-file fingerprint baseline\n * at dispatch and classifies every post-run entry as RUN_EXCLUSIVE /\n * BASELINE_DIRTY_AMBIGUOUS / APPEARED_DURING_RUN. Files dirty at baseline\n * whose fingerprint did NOT change during the window are excluded from\n * the change set (nothing happened during the run).\n */\n\nimport { createHash } from 'node:crypto';\nimport { promises as fs } from 'node:fs';\nimport { join, posix, relative } from 'node:path';\n\nimport { inject, injectable } from 'inversify';\nimport {\n ErrorBuilderBackendService,\n LoggerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n} from '@wildo-ai/saas-models';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { gitReadBroker } from '../../core/utils/git-read-broker.companion';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport {\n ChangeSetAttributionClass,\n ChangeSetFileChangeKind,\n type GitChangeSetCapture,\n type GitChangeSetFileEntry,\n type GitWorktreeFileState,\n type GitWorktreeSnapshot,\n} from '../models/coding-agent-dispatch.models';\nimport { RESEARCH_EVIDENCE_RELATIVE_ROOT } from './research-evidence-store.companion';\n\n\n/** Every text a failed read carries — the built error's own fields (its context holds git's stderr) and its description. */\nfunction describeGitReadFailure(error: unknown): string {\n let fields = '';\n try {\n fields = JSON.stringify(error) ?? '';\n } catch {\n fields = '';\n }\n return `${describeCaughtError(error)} ${fields}`;\n}\n\n/**\n * How `git show HEAD:./<path>` says the path is not in HEAD — the ordinary \"absent\" answer, as opposed to a failure to\n * ask: `path '…' does not exist in 'HEAD'`, `path '…' exists on disk, but not in 'HEAD'`, and an unborn HEAD's\n * `invalid object name 'HEAD'`. Matched loosely; a message it does not recognise is counted as a failure, the safe\n * direction for a caller deciding whether an answer may be held.\n */\nconst GIT_PATH_ABSENT_AT_HEAD = /does not exist in '?HEAD'?|exists on disk, but not in '?HEAD'?|invalid object name '?HEAD'?|not a valid object name/iu;\n\n/**\n * What git says about the application tree at one instant, as a build-plan landing answer depends on it\n * (#3206): see {@link GitChangeSetCompanionService.readLandingSourceState}.\n */\nexport interface GitLandingSourceState {\n /** The commit HEAD names; `null` before the repository's first commit. */\n readonly headSha: string | null;\n /** The raw `status --porcelain -z --untracked-files=all -- .` output, compared verbatim by a caller's cache key. */\n readonly porcelain: string;\n /** Every path that output names (origins of renames included), application-root relative. */\n readonly changedPaths: readonly string[];\n}\n\n/**\n * The complete read-only subset this service may invoke. Guard, not\n * documentation: `execGit` rejects any subcommand outside this set so a\n * future edit cannot silently grow the DD-8 carve-out into write plumbing.\n */\nconst READ_ONLY_GIT_SUBCOMMANDS: ReadonlySet<string> = new Set([\n 'status',\n 'diff',\n 'rev-parse',\n 'ls-files',\n // History reads only — commit timestamps for artifact freshness. `log` mutates nothing.\n 'log',\n /*\n * COMMITTED BYTES, for the build-plan landing probe. `show` writes nothing — it prints an object\n * from the database — and it is the only way to answer \"what does HEAD hold for this path?\" without\n * consulting the worktree.\n *\n * This set was deliberately kept to four verbs, and `readCommittedText` was written to avoid\n * widening it: it asked whether the worktree copy was CLEAN and then read the file from disk. That\n * is a different question, and on a tree several sessions edit continuously it is the wrong one —\n * measured 2026-09-16, when a sibling session held all seven `*.relationships.ts` files dirty and\n * every relationship task in every module reported NOT LANDED, so the lane re-offered finished work\n * and spent a coding run per task discovering there was nothing to do. The committed bytes held the\n * edges the whole time.\n */\n 'show',\n /*\n * The BATCHED form of `show`, and admitted for that reason alone.\n *\n * `cat-file --batch` reads object names on stdin and prints their contents — one subprocess for a\n * whole path set instead of one `show` per path. It writes nothing; it is `show`'s plumbing.\n *\n * It is the first verb here that takes STDIN, which is the property worth noticing: everything\n * else in this set is fully described by its argv, so the read-only guard reading argv is a\n * complete check of what it will do. For `cat-file --batch` the guard covers the verb and\n * {@link readCommittedTexts} owns what is written to it — object names it builds itself from the\n * caller's paths, never caller-supplied argv.\n */\n 'cat-file',\n]);\n\n/**\n * Gitignored paths that are nevertheless OBSERVED, because a write there is\n * exactly what this capture exists to make visible.\n *\n * `ls-files --others --exclude-standard` lists untracked files but EXCLUDES\n * ignored ones, so everything below was invisible to both the baseline and the\n * post-run snapshot: an agent that wrote accepted state, a journal record or a\n * secret produced an EMPTY change set and the run landed\n * `WORKING_RESULT_RECORDED`. Measured on the live dogfood tree: the standard\n * listing returns 0 entries under `.wildo-saas/state`, while the same listing\n * with `--ignored` returns 121 (115 of them inside the subtrees declared here).\n *\n * The set is deliberately NARROW rather than \"observe everything ignored\".\n * Blanket observation would enumerate `node_modules`, every `dist/`,\n * `.wildo-runtime-signals/` and the log trees — on this repository that is\n * thousands of files hashed per run, and their constant churn would flood the\n * change set with entries no agent caused. What is listed here is the material\n * that carries CONSEQUENCE: accepted application truth, deployment material,\n * and secrets.\n *\n * It is also narrower than `.wildo-saas/state` as a whole, and that exclusion\n * is measured rather than tidy. `state/local/runtime.json`, `state/journeys/`\n * and `state/environments.json` are HOST bookkeeping written on lifecycle\n * events — the live tree shows `local/runtime.json` rewritten at companion\n * start — so a run that merely overlapped a restart would be refused for a\n * write the host itself made. They carry no accepted truth, so observing them\n * buys nothing and costs a false refusal.\n *\n * `.wildo-saas/continuity` is deliberately ABSENT: it is not gitignored, so the\n * ordinary tracked/untracked capture already sees it.\n *\n * `.wildo-saas/state/meta-workflows` and `.wildo-saas/state/audit` are ABSENT,\n * and they are absent for DIFFERENT reasons. Read this before \"restoring\"\n * either of them.\n *\n * Originally both were excluded because the HOST wrote to them inside the very\n * window a coding run occupies: the episode host persisted an episode\n * checkpoint after the baseline capture and before the run ended, and a\n * security audit appended an event on every token-gated request. Observing\n * them therefore refused EVERY typed coding run as `MUTATION_SCOPE_VIOLATION`,\n * naming the episode's own checkpoint as the violating path — measured by the\n * Block-4 integration proof rather than reasoned about.\n *\n * `.wildo-saas/state/audit` genuinely has no producer any more: the companion\n * security audit was deleted with the rest of the ledger layer, so that subtree\n * holds only orphaned events that nothing reads.\n *\n * `.wildo-saas/state/meta-workflows` DOES have host writers again, and its\n * exclusion is once more load-bearing for the ORIGINAL reason rather than a\n * leftover. One companion store lives under it — the playbook run-write\n * register, written DURING a playbook run, as each run lands its files. (Two\n * more did until #1360: choreography checkpoints and suspended runs, both now\n * on the run's actor execution row.) That is exactly the writer shape this\n * exclusion exists to keep out of a coding run's change set.\n *\n * The distinction is load-bearing for whoever adds the next host-owned store.\n * A writer that runs INSIDE the coding window must be excluded, and keeping its\n * records honest becomes the owning store's job rather than this capture's. Do\n * not reach for a hash chain or a per-event self-digest for that: a same-UID\n * agent can recompute either, and Rule 0 of\n * `.claude/rules/one-source-of-truth.md` keeps such records out. Git is the\n * record; a store that must survive the agent is placed outside its reach,\n * not sealed inside it.\n *\n * WHERE that exclusion is written depends on whether the store is gitignored,\n * and getting this wrong is what let a real defect through. Omitting a subtree\n * from the list below only hides it while git itself hides it. A store that is\n * TRACKED — the research evidence store is, deliberately — is listed by the\n * ordinary untracked/tracked capture no matter what this pathspec set says, and\n * belongs in {@link CONCURRENT_HOST_LANE_ROOTS} instead.\n *\n * These paths are outside any coding task's declared `allowedPathPrefixes`, so\n * making them visible is sufficient — the mutation-scope assessment lists an\n * observed write here among the run's out-of-scope paths, with no second\n * mechanism to keep in step. (It refused the run for one until 2026-09-13.)\n *\n * Paths are git pathspecs relative to the application root (`git -C saasRoot`).\n */\nconst OBSERVED_IGNORED_PATH_SPECS: readonly string[] = [\n // Workbench state. Nothing writes acceptance receipts here any more (they\n // went with the digest machinery); the path stays observed so a coding run\n // cannot plant files in it unseen.\n '.wildo-saas/state/application-creation-workbench',\n // Generated deployment material, including rendered environment files.\n '.wildo-saas/deploy',\n // Application secrets.\n '.env',\n '.env.*',\n];\n\n/**\n * Application-relative roots owned by a COMPANION LANE that legitimately writes\n * while a coding run is in flight, and that the ordinary tracked/untracked\n * capture can therefore see.\n *\n * The sibling of {@link OBSERVED_IGNORED_PATH_SPECS}'s exclusions, for the case\n * those cannot cover. That comment states the rule — \"a writer that runs INSIDE\n * the coding window must be excluded here\" — and then discharges it by *not\n * listing* the path, which only works while the writer's store is GITIGNORED.\n * The research evidence store is not: it lives at\n * `specifications/research-evidence/`, inside the application repository and\n * deliberately committable, so `ls-files --others --exclude-standard` lists it\n * like any other untracked file and no omission from an `--ignored` pathspec\n * can hide it.\n *\n * Measured shape of the defect: the research dispatch takes no\n * workspace-mutation lock (its own JSDoc: \"No lock, no change set, no\n * reconciliation — a run that cannot mutate has nothing to attribute\"), and two\n * live paths put it inside a coding window — an operator's\n * `POST /api/companion/research`, and a composite's `RESEARCH_AGENT` children,\n * which `runPlaybookChoreography` dispatches with `Promise.allSettled` up to\n * `maximumLanesPerIteration` at a time. Its files then appear post-run at a path\n * no coding task's `allowedPathPrefixes` contains (every policy in\n * `resolveBuildPlanTaskCodingPolicy` is a `<layer>/src/modules/<module>/` or one\n * named config file, and the store sits outside `specifications/src/`), so the\n * scope assessment answered `MUTATION_SCOPE_VIOLATION` and failed a correct\n * coding run for another lane's writes.\n *\n * WIDENING THE LOCK WAS REJECTED, and measured rather than assumed. The lock is\n * taken with `retries: { retries: 0 }`, so a second acquisition is refused, not\n * queued. Putting research under it would refuse two of every three lanes of a\n * breadth-first research iteration — the exact fan-out the lane exists for — and\n * would refuse every research child sharing an iteration with a dispatch child.\n * The answer to \"a lane that mutates nothing but its own store\" is not a bigger\n * lock; it is saying who owns the store.\n *\n * The list is deliberately EXACT — a root, not a parent. `specifications/`\n * would swallow `specifications/src/`, which is a real coding-task target\n * (`BuildPlanResourceStage.SPEC`), and an out-of-scope write there would stop\n * being refused. Do not generalise an entry here to save a line.\n *\n * ## A WIDER population exists, and it deliberately does not belong here\n *\n * Measured 2026-09-09 on `examples/wonder-crm`, because \"the research store is\n * the only tracked in-window writer\" is a claim about a population and had to\n * be counted rather than assumed. It is not the only one:\n * `.wildo-saas/generated/{brand,deliberations,expert-personas,compliance}` are\n * NOT gitignored either (`git check-ignore` reports nothing for any of them;\n * only `state/`, `dist/`, `tmp/`, `deploy/`, `templates/`, `docs/`, `logs/`,\n * `cache/`, `companion-keys/`, `local_data/` and\n * `generated/providers/*.generated.json` are), and they carry host writers —\n * `structured-deliberation`, `logo-generation`/`brand-accept`,\n * `expert-persona`, the technical-doc pilot — none of which takes the\n * workspace-mutation lock. So a playbook lane writing a deliberation record\n * beside a coding lane produces the same visible, unattributable entry.\n *\n * They are NOT listed here, and the reason is the difference between the two\n * cases rather than an oversight. `.wildo-saas/` is in every build task's\n * `ALWAYS_PROHIBITED_PREFIXES` — since #1268 the ONLY entry left there, because\n * it holds the companion's runtime and the executing run's own records, and\n * `OBSERVED_IGNORED_PATH_SPECS` above keeps the workbench subtree observed on\n * purpose \"so a coding run cannot plant files in it unseen\". Excluding those\n * roots would therefore weaken a DELIBERATE prohibition, which is the exact\n * over-exclusion this constant's boundary rule exists to prevent — the evidence\n * store carries no prohibition, it is merely outside every task's allow-list.\n *\n * Whatever answers that case has to distinguish \"the host wrote here\" from \"the\n * agent wrote into a prohibited tree\", which this predicate cannot: it reads a\n * path and nothing else. That needs a writer-identified signal (the lane\n * declaring its own writes for the window), not a bigger path list. Recorded\n * here rather than fixed here so the next author meets the measurement at the\n * seam instead of re-deriving it — and so nobody \"completes\" this list by\n * adding `.wildo-saas/generated`.\n */\nconst CONCURRENT_HOST_LANE_ROOTS: readonly string[] = [\n // Imported, never re-spelt: the research dispatch's location predicate and the\n // store's own writer read the same constant, and a second copy here is how the\n // exclusion comes to cover a directory the agent is no longer confined to.\n RESEARCH_EVIDENCE_RELATIVE_ROOT,\n];\n\n/**\n * Is this application-relative path owned by a concurrent companion lane?\n *\n * Exported because it has TWO call sites and they answer different halves of one\n * question: this service uses it to ATTRIBUTE the entry, and the dispatch's scope\n * assessment uses it to drop a disappearance under the same root — a research\n * agent may delete or rewrite a file it wrote in an earlier round, and a\n * disappearance carries no attribution class to filter on. One predicate, so the\n * two halves cannot drift.\n *\n * Boundary-matched like every other prefix comparison in this vertical:\n * `specifications/research-evidence` must not admit\n * `specifications/research-evidence-notes.md` (dead-plan-citation: an example path, not a file).\n */\nexport function isConcurrentHostLanePath(applicationRelativePath: string): boolean {\n const normalized = applicationRelativePath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n return CONCURRENT_HOST_LANE_ROOTS.some((root) => normalized === root || normalized.startsWith(`${root}/`));\n}\n\n/**\n * Does this application-relative path lie ABOVE the application root?\n *\n * Every path this service records is keyed relative to `-C saasRoot`, and git spells a path outside\n * that directory with leading `../` segments (`resolveApplicationRelativePathMapper`). So the key\n * itself answers the question, with no filesystem access and no second root to disagree with.\n *\n * Exported for the same reason as {@link isConcurrentHostLanePath}: this service uses it to\n * ATTRIBUTE the entry ({@link ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT}), and the\n * dispatch's scope assessment uses it to keep a bare disappearance under the same root off the\n * out-of-scope list. One predicate, so the two halves cannot drift (#1020).\n */\nexport function isOutsideApplicationRootPath(applicationRelativePath: string): boolean {\n const normalized = applicationRelativePath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n return normalized === '..' || normalized.startsWith('../');\n}\n\n/** Combined stdout ceiling for one git invocation (diffs on a busy dogfood tree are large). */\nconst GIT_MAX_BUFFER_BYTES = 128 * 1024 * 1024;\nconst GIT_TIMEOUT_MS = 60_000;\n/** Reads of a worktree snapshot before it refuses a repository that keeps moving under it (#3204). */\nconst WORKTREE_SNAPSHOT_MAX_ATTEMPTS = 6;\n/** The pause before a re-read, multiplied by the attempt: a checkpoint commit is done well within it. */\nconst WORKTREE_SNAPSHOT_RETRY_DELAY_MS = 50;\n\n@injectable()\nexport class GitChangeSetCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n ) {\n this.logDebug = this.logger.debugByType('GitChangeSetCompanionService');\n }\n\n /**\n * Snapshot the worktree state at dispatch time: HEAD sha + a per-file\n * fingerprint of every tracked-dirty and untracked file. The fingerprint\n * (per-file diff section hash / untracked content hash) is what lets the\n * post-run pass distinguish \"still dirty from before the run\" from\n * \"changed again during the run\" (→ BASELINE_DIRTY_AMBIGUOUS).\n */\n public async captureWorktreeSnapshot(): Promise<GitWorktreeSnapshot> {\n /*\n * ONE state of the repository, or none (#3204). The snapshot is several reads (HEAD, status, diff, the untracked\n * list), and since build checkpoints a sibling run's settlement commits the shared tree while other runs are still\n * capturing theirs (`git add` on the shared index, then `git commit`). A commit landing between the HEAD read and\n * the status read paired the OLD HEAD with the POST-commit clean tree: the committed files were neither dirty nor\n * \"committed during the run\" (HEAD looked unmoved), so a run's change set came out empty and its contention with\n * its siblings was never recorded. A `git add` between the status and untracked reads dropped a file the same way.\n *\n * So the reads are bracketed by the staging identity — HEAD plus the staged entries under the application root —\n * and repeated when it moved. Status refreshing stat data does not move it (`ls-files -s` prints no stat fields),\n * and another session staging outside the application root does not either. After\n * {@link WORKTREE_SNAPSHOT_MAX_ATTEMPTS} moving reads the capture refuses rather than return a torn state, because a\n * torn snapshot loses files silently and every caller already treats a failed capture as a capture failure.\n */\n for (let attempt = 1; ; attempt += 1) {\n const before = await this.readStagingIdentity();\n const snapshot = await this.readWorktreeSnapshotOnce();\n const after = await this.readStagingIdentity();\n if (before === after) return snapshot;\n if (attempt >= WORKTREE_SNAPSHOT_MAX_ATTEMPTS) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `The repository changed during each of ${WORKTREE_SNAPSHOT_MAX_ATTEMPTS} worktree snapshot reads (a commit or a staging write landed between them); no consistent snapshot was taken.`,\n saasRoot: this.companionContext.saasRoot,\n },\n });\n }\n this.logDebug('The repository moved during a worktree snapshot; reading it again', { attempt });\n await new Promise((resolve) => setTimeout(resolve, WORKTREE_SNAPSHOT_RETRY_DELAY_MS * attempt));\n }\n }\n\n /**\n * What a commit or a `git add` changes and a status refresh does not: HEAD, and the staged entries (mode, blob, stage,\n * path) under the application root. Compared, never stored.\n */\n private async readStagingIdentity(): Promise<string> {\n const headSha = await this.resolveHeadSha().catch(() => '');\n const { stdout } = await this.execGit(['ls-files', '-s', '-z', '--', '.'], { noOptionalLocks: true });\n return `${headSha}:${sha256(stdout)}`;\n }\n\n /** One pass of the snapshot's reads; {@link captureWorktreeSnapshot} keeps it only when nothing moved around it. */\n private async readWorktreeSnapshotOnce(): Promise<GitWorktreeSnapshot> {\n const headSha = await this.resolveHeadSha();\n const files: Record<string, GitWorktreeFileState> = {};\n\n // Tracked changes vs HEAD — status gives the change kind, the split\n // `diff HEAD` sections give the per-file content fingerprint.\n const trackedStates = await this.readTrackedDirtyStates();\n const diffSectionsByPath = this.splitDiffSectionsByPath(await this.readFullDiffText(true));\n for (const state of trackedStates) {\n const diffSection = diffSectionsByPath.get(state.path);\n files[state.path] = {\n ...state,\n ...(diffSection !== undefined ? { fingerprint: sha256(diffSection) } : {}),\n };\n }\n\n // Untracked files: listed with path + size + content hash — NEVER\n // `git add -N`'d (read-only contract).\n for (const untrackedPath of await this.readUntrackedPaths()) {\n files[untrackedPath] = await this.buildUntrackedFileState(untrackedPath);\n }\n\n // Sensitive IGNORED material (see OBSERVED_IGNORED_PATH_SPECS). Same\n // read-only treatment as untracked files; a path already recorded above\n // keeps its tracked/untracked state rather than being reclassified.\n for (const ignoredPath of await this.readObservedIgnoredPaths()) {\n if (files[ignoredPath] !== undefined) continue;\n files[ignoredPath] = await this.buildUntrackedFileState(ignoredPath);\n }\n\n return {\n headSha,\n capturedAt: new Date().toISOString(),\n files,\n };\n }\n\n /** True when the snapshot carries any tracked-dirty or untracked file. */\n public isDirty(snapshot: GitWorktreeSnapshot): boolean {\n return Object.keys(snapshot.files).length > 0;\n }\n\n /**\n * Post-run capture: re-snapshot the worktree and attribute every entry\n * against the dispatch baseline (P-19 classes). Also returns the raw\n * post-run `diff HEAD` text for the DEBUG_VERBOSE traceability artifact.\n */\n public async captureChangeSet(baseline: GitWorktreeSnapshot): Promise<GitChangeSetCapture> {\n const postRun = await this.captureWorktreeSnapshot();\n const fullDiffText = await this.readFullDiffText();\n\n const entries: GitChangeSetFileEntry[] = [];\n for (const [path, postState] of Object.entries(postRun.files)) {\n const baselineState = baseline.files[path];\n /*\n * Decided BEFORE the fingerprint classification, because the lane owning\n * the path settles the attribution whatever the file did. A research\n * round may create a file (`APPEARED_DURING_RUN` shape), rewrite one it\n * wrote in an earlier round (`BASELINE_DIRTY_AMBIGUOUS` shape), or —\n * once the store is committed — modify a tracked file (`RUN_EXCLUSIVE`\n * shape, the one that reads most like the agent's own edit). All three\n * are the same fact: another lane wrote here.\n */\n const ownedByConcurrentLane = isConcurrentHostLanePath(path);\n /*\n * Decided FIRST, above even the lane ownership: a path above the application root is outside\n * anything a task scope can admit, and on a monorepo checkout it is overwhelmingly another\n * session's edit (#1020: 38 of 39 attributed paths). The entry stays in the change set and is\n * counted; it simply never reads as the run's own work.\n */\n const outsideApplicationRoot = isOutsideApplicationRootPath(path);\n\n if (!baselineState) {\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: outsideApplicationRoot\n ? ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT\n : ownedByConcurrentLane\n ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE\n : postState.changeKind === ChangeSetFileChangeKind.UNTRACKED\n ? ChangeSetAttributionClass.APPEARED_DURING_RUN\n : ChangeSetAttributionClass.RUN_EXCLUSIVE,\n dirtyAtBaseline: false,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),\n ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),\n });\n continue;\n }\n\n const changedDuringRun = baselineState.fingerprint !== postState.fingerprint\n || baselineState.changeKind !== postState.changeKind;\n if (!changedDuringRun) {\n // Dirty before the run, untouched during it — not part of this\n // run's change set at all.\n continue;\n }\n\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: outsideApplicationRoot\n ? ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT\n : ownedByConcurrentLane\n ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE\n : ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,\n dirtyAtBaseline: true,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),\n ...(baselineState.fingerprint !== undefined ? { baselineFingerprint: baselineState.fingerprint } : {}),\n ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),\n });\n }\n\n const disappearedFromBaseline = Object.keys(baseline.files)\n .filter((path) => !(path in postRun.files))\n .sort();\n\n /*\n * A commit landing inside the run window removes its files from the dirty\n * set, so everything above is blind to them: a run that committed its own\n * work produced an empty change set and still reported success. Recover the\n * committed paths from the head-to-head diff so nothing is invisible. They\n * are marked COMMITTED_DURING_RUN rather than attributed — a parallel\n * session's commit is indistinguishable from the agent's — and the window\n * is recorded as `historyMutated` on the run's result, for whoever reviews\n * and commits it. (This said an \"acceptance tier\" refuses to promote such a\n * result by policy; nothing reads `historyMutated` in code.)\n */\n const committedDuringRun = baseline.headSha === postRun.headSha\n ? []\n : await this.readCommittedPaths(baseline.headSha, postRun.headSha);\n for (const path of committedDuringRun) {\n if (entries.some((entry) => entry.path === path)) continue;\n entries.push({\n path,\n changeKind: ChangeSetFileChangeKind.MODIFIED,\n attribution: ChangeSetAttributionClass.COMMITTED_DURING_RUN,\n dirtyAtBaseline: baseline.files[path] !== undefined,\n });\n }\n\n const stats = {\n runExclusive: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.RUN_EXCLUSIVE).length,\n baselineDirtyAmbiguous: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS).length,\n appearedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.APPEARED_DURING_RUN).length,\n disappearedFromBaseline: disappearedFromBaseline.length,\n committedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.COMMITTED_DURING_RUN).length,\n concurrentHostLane: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.CONCURRENT_HOST_LANE).length,\n outsideApplicationRoot: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.OUTSIDE_APPLICATION_ROOT).length,\n };\n\n this.logDebug('Captured coding-agent change set', {\n baselineHeadSha: baseline.headSha,\n postRunHeadSha: postRun.headSha,\n ...stats,\n });\n\n return {\n baselineHeadSha: baseline.headSha,\n postRunHeadSha: postRun.headSha,\n headMovedDuringRun: baseline.headSha !== postRun.headSha,\n baselineCapturedAt: baseline.capturedAt,\n capturedAt: postRun.capturedAt,\n files: entries.sort((left, right) => left.path.localeCompare(right.path)),\n stats,\n disappearedFromBaseline,\n fullDiffText,\n };\n }\n\n // ================================================================\n // Read-only git plumbing\n // ================================================================\n\n private async resolveHeadSha(): Promise<string> {\n const { stdout } = await this.execGit(['rev-parse', 'HEAD']);\n return stdout.trim();\n }\n\n /**\n * `--relative` is load-bearing, not cosmetic. Every other path this service\n * records is application-root-relative (`ls-files --others` reports relative\n * to `-C saasRoot`; `status --porcelain=v2 -z` does NOT, and is mapped by\n * `resolveApplicationRelativePathMapper`), but `diff`\n * reports repository-root paths and the WHOLE repository unless told\n * otherwise. For an application hosted inside a larger repository that meant\n * no tracked-dirty path ever matched its own diff section, so every tracked\n * fingerprint was silently absent: baseline-dirty files could change during\n * a run without being detected, and the post-run fingerprint an acceptance\n * compares against did not exist. Same for the committed-path recovery below.\n */\n private async readFullDiffText(includeRawPaths = false): Promise<string> {\n const { stdout } = await this.execGit(['diff', '--relative', ...(includeRawPaths ? ['--raw', '-z', '--patch'] : []), 'HEAD']);\n return stdout;\n }\n\n /**\n * Paths changed by commits between two heads. `--name-only` keeps the output\n * bounded (a commit range on this tree can be very large) and `diff` is\n * already in the read-only subset.\n */\n private async readCommittedPaths(baselineHeadSha: string, postRunHeadSha: string): Promise<string[]> {\n const { stdout } = await this.execGit([\n 'diff',\n '--relative',\n '--name-only',\n '-z',\n `${baselineHeadSha}..${postRunHeadSha}`,\n ]);\n return stdout.split('\\0').filter((path) => path.length > 0).sort();\n }\n\n private async readUntrackedPaths(): Promise<string[]> {\n const { stdout } = await this.execGit(['ls-files', '-z', '--others', '--exclude-standard']);\n return stdout.split('\\0').filter((path) => path.length > 0);\n }\n\n /**\n * List the declared sensitive ignored material. `--ignored` requires an\n * exclude option, and the pathspecs keep the walk bounded — without them\n * this would enumerate every `node_modules` and `dist` tree in the workspace.\n */\n private async readObservedIgnoredPaths(): Promise<string[]> {\n const { stdout } = await this.execGit([\n 'ls-files',\n '-z',\n '--others',\n '--ignored',\n '--exclude-standard',\n '--',\n ...OBSERVED_IGNORED_PATH_SPECS,\n ]);\n return stdout.split('\\0').filter((path) => path.length > 0);\n }\n\n private async buildUntrackedFileState(untrackedPath: string): Promise<GitWorktreeFileState> {\n const absolutePath = join(this.companionContext.saasRoot, untrackedPath);\n try {\n const content = await fs.readFile(absolutePath);\n return {\n path: untrackedPath,\n changeKind: ChangeSetFileChangeKind.UNTRACKED,\n fingerprint: sha256(content),\n sizeBytes: content.byteLength,\n };\n } catch {\n // Raced away by a parallel session between listing and hashing —\n // record presence without a fingerprint.\n return {\n path: untrackedPath,\n changeKind: ChangeSetFileChangeKind.UNTRACKED,\n };\n }\n }\n\n /**\n * Map a REPOSITORY-ROOT path to the APPLICATION-root form every other path in this service uses.\n *\n * `git status --porcelain=v2 -z` does not honour `-C`: with NUL termination git prints paths relative\n * to the repository root, whatever the working directory; without `-z` the same command prints them\n * relative to `-C saasRoot`. Measured 2026-09-13 against Wonder CRM, an application nested at\n * `examples/wonder-crm/` inside the framework repository: the in-app `specifications/src/COHERENCE.md`\n * came back as `examples/wonder-crm/specifications/src/COHERENCE.md`, and an out-of-app file as\n * `.claude/…` rather than `../../.claude/…`.\n *\n * Two silent consequences followed, for every application that is not its repository's root. Every\n * tracked in-app edit failed the scope check, because its key could never match an application-relative\n * prefix — `build-task-company-schema` was recorded `mutation_scope_violation` against its own two\n * in-scope edits. And tracked fingerprints went missing, because `diff --relative` keys its sections\n * application-relative and the two keys never met — the failure `readFullDiffText` describes, arriving\n * from the other side.\n *\n * `-z` stays: it is what keeps unusual filenames exact. The prefix comes from git itself\n * (`rev-parse --show-prefix`), so a symlinked or case-varied root cannot disagree with it. An empty prefix\n * — the application IS the repository root, as in every root-level fixture — maps nothing, which is why\n * those fixtures never saw this.\n */\n private async resolveApplicationRelativePathMapper(): Promise<(repositoryRootPath: string) => string> {\n const { stdout } = await this.execGit(['rev-parse', '--show-prefix']);\n // Newline only: a directory name may legitimately end in a space, so `trim()` would corrupt it.\n const prefix = stdout.replace(/\\r?\\n$/u, '');\n if (prefix.length === 0) return (repositoryRootPath) => repositoryRootPath;\n const prefixDirectory = prefix.replace(/\\/$/u, '');\n return (repositoryRootPath) => (repositoryRootPath.startsWith(prefix)\n ? repositoryRootPath.slice(prefix.length)\n : posix.relative(prefixDirectory, repositoryRootPath));\n }\n\n /**\n * Parse `git status --porcelain=v2 -z` into tracked-dirty file states.\n * Untracked (`?`) and ignored (`!`) records are skipped — untracked files\n * are sourced from `ls-files --others --exclude-standard` instead\n * (the pinned P-19 subset).\n */\n private async readTrackedDirtyStates(): Promise<GitWorktreeFileState[]> {\n const { stdout } = await this.execGit(['status', '--porcelain=v2', '-z']);\n const toApplicationRelative = await this.resolveApplicationRelativePathMapper();\n const states: GitWorktreeFileState[] = [];\n\n const records = stdout.split('\\0');\n for (let index = 0; index < records.length; index++) {\n const line = records[index];\n if (line.length === 0) continue;\n const recordType = line[0];\n\n if (recordType === '1') {\n // `1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>`\n const fields = line.split(' ');\n const path = fields.slice(8).join(' ');\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: changeKindFromXY(fields[1] ?? '') });\n } else if (recordType === '2') {\n // `2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <Xscore> <path>\\0<origPath>\\0`\n const fields = line.split(' ');\n const path = fields.slice(9).join(' ');\n // In -z mode the original path is the NEXT record, not tab-separated.\n index++;\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: ChangeSetFileChangeKind.RENAMED });\n } else if (recordType === 'u') {\n // `u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>`\n const fields = line.split(' ');\n const path = fields.slice(10).join(' ');\n if (!path) continue;\n states.push({ path: toApplicationRelative(path), changeKind: ChangeSetFileChangeKind.UNMERGED });\n }\n // '?' and '!' intentionally skipped (see JSDoc).\n }\n\n return states;\n }\n\n /**\n * Pair NUL-framed raw post-image names with patch sections from the SAME Git invocation.\n * Raw names preserve Unicode, tabs and newlines without decoding human-facing C quoting.\n * Rename/copy records carry two names; the second is the post-image. Git emits raw entries\n * and patch sections in the same order. A mismatch is refused instead of losing fingerprints.\n */\n private splitDiffSectionsByPath(diffText: string): Map<string, string> {\n if (!diffText) return new Map();\n const boundary = diffText.indexOf('\\0\\0');\n if (boundary < 0) throw new Error('Git diff lacks NUL-framed path metadata');\n const raw = diffText.slice(0, boundary).split('\\0');\n const paths: string[] = [];\n for (let index = 0; index < raw.length;) {\n const header = raw[index++];\n if (!header.startsWith(':')) throw new Error('Malformed Git raw diff metadata');\n const status = header.split(' ').at(-1) ?? '';\n let path = raw[index++];\n if (status.startsWith('R') || status.startsWith('C')) path = raw[index++];\n if (!path) throw new Error('Git raw diff record lacks a path');\n paths.push(path);\n }\n const parts = diffText.slice(boundary + 2).split(/^(?=diff --git )/m).filter((part) => part.startsWith('diff --git '));\n if (parts.length !== paths.length) throw new Error('Git raw path and patch section counts disagree');\n return new Map(paths.map((path, index) => [path, parts[index]]));\n }\n\n /**\n * The BASIS an episode ran against: git's own content hash for the specifications tree.\n *\n * Rule 6 of the contract in `.claude/rules/one-source-of-truth.md`. This replaces\n * `sourceFamilyHeadSetDigest` — a digest over an accepted head set, which named a machine-local ledger\n * entry, could not be compared across two clones, and meant nothing after a merge.\n *\n * `git rev-parse HEAD:<path>` returns a TREE hash: git's own address for a directory's exact content.\n * Two developers with the same specifications get the same basis without coordinating, a fresh clone\n * derives it in one command, and a merge produces a new one that both sides can compute. That is what\n * \"branchable\" means, and it is the only reason a hash is admissible here at all under Rule 0 — this one\n * is not invented, it is read.\n *\n * Returns null when the tree has never been committed. That is a real state (a fresh application before\n * its first commit), and it is the CALLER's business what to do about it — an episode may legitimately\n * run against uncommitted work; it just cannot claim a basis for it.\n */\n public async resolveSpecificationsTreeBasis(subjectRelativeSpecificationsPath: string): Promise<string | null> {\n try {\n // `HEAD:./<path>`, not `HEAD:<path>`: a tree-ish path resolves from the REPOSITORY root regardless of\n // `-C`, so for an application nested in a larger repository the bare form names a path that does not\n // exist — git itself answers \"exists, but not 'specifications' … aka 'HEAD:./specifications'\". The\n // `./` form resolves from `-C saasRoot`, the application root this method is contracted in.\n const { stdout } = await this.execGit(['rev-parse', `HEAD:./${subjectRelativeSpecificationsPath}`]);\n const treeHash = stdout.trim();\n return /^[0-9a-f]{40}$/u.test(treeHash) ? treeHash : null;\n } catch {\n return null;\n }\n }\n\n /**\n * The git half of the state a build-plan LANDING answer is a function of (#3206): the commit HEAD names and\n * every path under the application root whose index or working-tree copy differs from it, with the porcelain\n * status of each. `undefined` when git cannot be asked, which a caller must read as \"cannot say whether\n * anything moved\", never as \"nothing moved\".\n *\n * Three spawns, whatever the size of the plan: `rev-parse HEAD`, one `status --porcelain -z\n * --untracked-files=all -- .` (without optional locks), and `rev-parse HEAD` again — a HEAD that moved between them\n * pairs a commit with another state's difference list, so the reading is refused rather than returned. Landing asks \"is this path committed\" (tracked, and HEAD, index and working tree\n * in agreement), so for every path the answer is decided by exactly these two facts: whether HEAD changed\n * (a commit, a reset, a branch switch) and whether the path is in the difference list. A dirty path's CONTENT\n * is not in the porcelain line, so a caller that needs to see a second edit of an already-dirty file stats the\n * listed paths itself.\n *\n * `--untracked-files=all` so a NEW file inside a new directory is listed by its own path rather than folded\n * into its directory, which is what a probe names. Ignored files are not listed; build outputs are signed by\n * the caller separately.\n *\n * Never throws.\n */\n public async readLandingSourceState(): Promise<GitLandingSourceState | undefined> {\n try {\n // An unborn HEAD (a repository with no commit yet) is a real state: nothing is committed, so `null`.\n const headSha = await this.resolveHeadSha().catch(() => null);\n // No optional locks: several sessions commit in this tree, and a read must never hold `index.lock` against them.\n const { stdout } = await this.execGit(['status', '--porcelain', '-z', '--untracked-files=all', '--', '.'], { noOptionalLocks: true });\n // A commit between the two reads would pair a HEAD with a difference list of another state: refuse the reading.\n const headAfter = await this.resolveHeadSha().catch(() => null);\n if (headAfter !== headSha) return undefined;\n // `--porcelain` prints repository-root paths (see `selectCommittedPaths`); a caller stats them from the application root.\n const prefix = await this.resolveRepositoryPrefix();\n const changedPaths = GitChangeSetCompanionService.parsePorcelainZPaths(stdout)\n .map((entry) => (entry.startsWith(prefix) ? entry.slice(prefix.length) : entry));\n return { headSha: headSha === '' ? null : headSha, porcelain: stdout, changedPaths };\n } catch {\n return undefined;\n }\n }\n\n /**\n * Checks of a path that are still running, so concurrent callers share one pair of git spawns (#1005).\n *\n * Created on first use rather than as an initialized field, because test harnesses build this service\n * with `Object.create` and never run its field initializers.\n */\n private inFlightCommittedChecks?: Map<string, Promise<boolean>>;\n\n /**\n * Are the working-tree bytes at this path IDENTICAL to committed content?\n *\n * Why it matters: once git is the accepted state, a committed file has nothing outstanding to accept, so it must stop being reported as\n * maintained-bytes drift.\n *\n * `status --porcelain -- <path>` answers it exactly and with a subcommand already inside the read-only\n * carve-out. Empty output means HEAD, index and worktree agree for that path. Anything else -- an\n * unstaged edit, a STAGED edit that differs from HEAD, an untracked file, a rename -- is a difference,\n * and every one of those is correctly NOT committed.\n *\n * Never throws, by contract. A repository that cannot be inspected answers `false`, which falls back to\n * the accepted-manifest comparison: the behaviour that predates this port. Failing closed here instead\n * would put a boot path behind a remedy that needs the very companion it just stopped\n * (`continuity-drift-and-cas-basis.md`, Rule 3).\n */\n public isWorktreePathCommitted(subjectRelativePath: string): Promise<boolean> {\n /*\n * One check per path AT A TIME. Every build-dispatch read resolves landing for the whole plan, and\n * overlapping callers (a poller on `/build/next`, a dispatch, the workbench board) used to spawn the\n * same `ls-files` + `status` pair once each. Measured on Wonder CRM on 2026-09-13: 228 git children in\n * about five seconds, and the companion stopped answering `/health`. Concurrent calls get the same\n * answer anyway, so they share the pending promise. Once it settles it is dropped: a later call asks\n * git again, because the tree may have changed.\n */\n this.inFlightCommittedChecks ??= new Map();\n const inFlight = this.inFlightCommittedChecks.get(subjectRelativePath);\n if (inFlight) return inFlight;\n const check = this.checkWorktreePathCommitted(subjectRelativePath).finally(() => {\n this.inFlightCommittedChecks?.delete(subjectRelativePath);\n });\n this.inFlightCommittedChecks.set(subjectRelativePath, check);\n return check;\n }\n\n /** The two spawns behind {@link isWorktreePathCommitted}. Never rejects. */\n private async checkWorktreePathCommitted(subjectRelativePath: string): Promise<boolean> {\n try {\n /*\n * TRACKED FIRST. An empty `git status` is NOT proof of \"committed\" -- it is proof that git reported\n * no DIFFERENCE, and git reports none for a path it does not track. An untracked or IGNORED file\n * therefore looks identical to a pristine committed one.\n *\n * That is not a theoretical edge. Measured 2026-08-22: the first version of this method checked only\n * `status`, and the ordinary-bootstrap proof went red because its fixture lives under the\n * repo-ignored `.wildo-test-artifacts/`. Every file there answered \"committed\", so a deliberately\n * drifted file stopped being reported as drift -- the guard silently disabled by an ignore rule.\n * `.claude/rules/negative-results-require-a-positive-probe.md` is exactly this shape: an empty\n * result means \"this command, as invoked, found nothing\".\n *\n * `ls-files -- <path>` names the path only when it is in the index, so the two together mean what\n * this method claims: git tracks it, and HEAD, index and worktree agree.\n */\n const { stdout: tracked } = await this.execGit(['ls-files', '--', subjectRelativePath]);\n if (tracked.trim() === '') return false;\n const { stdout: status } = await this.execGit(['status', '--porcelain', '--', subjectRelativePath]);\n return status.trim() === '';\n } catch {\n this.noteCommittedReadFailure();\n return false;\n }\n }\n\n /**\n * How many committed-tree reads have FAILED in this process (#3206 review F4): an `ls-files` / `status` pair that\n * could not run, or a batch that fell back to the per-path route. Each of those answers \"not committed\" rather than\n * throwing, which is right for a single read and wrong for an answer somebody HOLDS: a timeout under load reads\n * exactly like an absent product. A caller that keeps an answer compares the count before and after deriving it, and\n * treats a rise as \"this answer is not known to be true\" — never as proof it is false.\n */\n public committedReadFailureCount(): number {\n return this.committedReadFailures ?? 0;\n }\n\n /** See {@link committedReadFailureCount}. Lazily initialized for the reason {@link inFlightCommittedChecks} is. */\n private committedReadFailures?: number;\n\n private noteCommittedReadFailure(): void {\n this.committedReadFailures = (this.committedReadFailures ?? 0) + 1;\n }\n\n /**\n * How many paths ride one `ls-files` / `status` pathspec list.\n *\n * Bounded only to stay clear of the argv limit — at ~120 bytes a path this is ~30 KB against a\n * 1 MB `ARG_MAX`, so the margin is two orders of magnitude and the chunk count stays small.\n */\n private static readonly COMMITTED_BATCH_PATHSPEC_LIMIT = 256;\n\n /**\n * Where this service's `saasRoot` sits INSIDE its git repository, with a trailing slash, or `''`.\n *\n * Cached for the life of the service: a working directory does not move within its repository.\n * Needed because the two commands below disagree about what a path is relative to — see\n * {@link selectCommittedPaths}.\n */\n private repositoryPrefix?: Promise<string>;\n\n private resolveRepositoryPrefix(): Promise<string> {\n this.repositoryPrefix ??= this.execGit(['rev-parse', '--show-prefix'])\n .then(({ stdout }) => stdout.trim())\n .catch(() => '');\n return this.repositoryPrefix;\n }\n\n /**\n * Last-commit times for MANY paths, memoised against the COMMIT THE ANSWER DEPENDS ON.\n *\n * `git log -1 --format=%ct -- <path>` reads the commit graph reachable from HEAD and nothing else —\n * not the index, not the worktree. So its answer can only change when HEAD moves, which makes the\n * HEAD object id a COMPLETE cache key rather than a heuristic one: a branch switch, a commit, a\n * reset all move it, and an ordinary edit correctly does not.\n *\n * That matters because this was the largest remaining per-path caller once the committed-ness and\n * committed-text reads were batched: the eligibility board asks it once per family, on every poll,\n * and a dogfood application has a dozen-odd families. Steady state is now ONE `rev-parse` for the\n * whole set; the per-path walks happen once per commit rather than once per poll.\n *\n * Unbounded by design and that is deliberate rather than overlooked: the key set is the family\n * paths of one application, so it is bounded by the vocabulary rather than by traffic, and a stale\n * generation's entries are dropped wholesale when HEAD moves.\n *\n * Never throws. A `rev-parse` that fails answers from the per-path route, so an unreadable\n * repository behaves exactly as it did before this memo existed.\n */\n public async lastCommitUnixTimes(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, number>> {\n const paths = [...new Set(subjectRelativePaths)];\n const times = new Map<string, number>();\n if (paths.length === 0) return times;\n\n let headObjectId: string | undefined;\n try {\n const { stdout } = await this.execGit(['rev-parse', 'HEAD']);\n headObjectId = stdout.trim() || undefined;\n } catch {\n headObjectId = undefined;\n }\n\n if (headObjectId === undefined || this.commitTimesByPath?.headObjectId !== headObjectId) {\n this.commitTimesByPath = headObjectId === undefined ? undefined : { headObjectId, times: new Map() };\n }\n const memo = this.commitTimesByPath;\n\n for (const path of paths) {\n if (memo?.times.has(path) === true) {\n const cached = memo.times.get(path);\n if (cached !== undefined) times.set(path, cached);\n continue;\n }\n const resolved = await this.lastCommitUnixTime(path);\n // A path with no commit history is memoised as ABSENT, not skipped — otherwise every poll would\n // re-walk the history of exactly the families that have never been committed.\n memo?.times.set(path, resolved);\n if (resolved !== undefined) times.set(path, resolved);\n }\n return times;\n }\n\n /** Last-commit times valid only while HEAD is unmoved; see {@link lastCommitUnixTimes}. */\n private commitTimesByPath?: { headObjectId: string; times: Map<string, number | undefined> };\n\n /**\n * Which of MANY paths are committed — the same question as {@link isWorktreePathCommitted}, asked\n * in a bounded number of spawns instead of two per path.\n *\n * ## Why this exists\n *\n * Resolving a build plan's landing asks the per-path question for every probe path of every task,\n * and each answer cost a `ls-files` + `status` PAIR. #1005 already measured that shape stopping\n * this companion — \"228 git children in about five seconds, and the companion stopped answering\n * `/health`\" — and the fix then was the in-flight map above, which shares a check between\n * CONCURRENT callers of the SAME path. A landing resolution is neither: it walks hundreds of\n * DISTINCT paths, so nothing was shared and the storm returned.\n *\n * Measured 2026-09-22 on `examples/wonder-todos`: the companion sustained ~158 child processes per\n * second in ~12-second bursts, held ~45% of a core, and `/health/ready` — which the workbench gives\n * ten seconds — took 16 to 35 seconds. The workbench then reported its own origin as the thing that\n * was not ready, which is why this surfaced as a proxy defect.\n *\n * ## The trap this method exists to contain\n *\n * **The two commands do not agree about what a path is relative to**, and the disagreement is\n * silent. Measured from `examples/wonder-todos` inside this monorepo:\n *\n * ```\n * git -C <app> ls-files -- specifications/src/build-plan/index.ts\n * -> specifications/src/build-plan/index.ts (relative to the CWD)\n * git -C <app> status --porcelain -- specifications/src/build-plan/index.ts\n * -> M examples/wonder-todos/specifications/src/build-plan/index.ts (relative to the REPO ROOT)\n * ```\n *\n * `--porcelain` pins `status.relativePaths` off by definition, so its paths carry the prefix and\n * `ls-files`'s do not. The per-path version was immune because it never READ a path — it only asked\n * whether the output was empty. A batched version must match names, so it must strip the prefix.\n *\n * Getting that wrong fails in the DANGEROUS direction: no reported path would match any probe path,\n * every path would read as clean, and every task would report LANDED. That is why the prefix is\n * derived from `rev-parse --show-prefix` rather than assumed empty — it IS empty for a standalone\n * application, which is the shipped case and the one that would never have caught this.\n *\n * ## The answer is the same one, composed the same way\n *\n * TRACKED FIRST, for the reason {@link checkWorktreePathCommitted} records: an empty `status` proves\n * only that git reported no difference, and it reports none for a path it does not track. So a path\n * is committed here exactly when `ls-files` names it and `status` does not.\n *\n * Never throws. A batch that fails falls back to the per-path checks rather than answering for them,\n * so a repository this cannot inspect behaves precisely as it did before this method existed.\n */\n public async selectCommittedPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n\n try {\n const prefix = await this.resolveRepositoryPrefix();\n const tracked = new Set<string>();\n const changed = new Set<string>();\n\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout: trackedOut } = await this.execGit(['ls-files', '-z', '--', ...chunk]);\n for (const entry of trackedOut.split('\\0')) if (entry !== '') tracked.add(entry);\n\n const { stdout: statusOut } = await this.execGit(['status', '--porcelain', '-z', '--', ...chunk]);\n for (const entry of GitChangeSetCompanionService.parsePorcelainZPaths(statusOut)) {\n changed.add(entry.startsWith(prefix) ? entry.slice(prefix.length) : entry);\n }\n }\n\n return new Set(paths.filter((path) => tracked.has(path) && !changed.has(path)));\n } catch {\n /*\n * Fall back rather than answer. `isWorktreePathCommitted` is the contract this batch accelerates,\n * and it already answers `false` for a repository it cannot read — so deferring to it keeps one\n * definition of the failure behaviour instead of adding a second that can drift from it.\n */\n this.noteCommittedReadFailure();\n const answers = await Promise.all(paths.map(async (path) => [path, await this.isWorktreePathCommitted(path)] as const));\n return new Set(answers.filter(([, committed]) => committed).map(([path]) => path));\n }\n }\n\n /**\n * THE WORKING TREE as a build task's landing reads it (#3204), the counterpart of the committed reads above: a path is\n * PRESENT when the application holds it, readable on disk and seen by git ({@link selectGitVisiblePaths}), so a file\n * under an ignored directory is never a product; its text is the working file's. Decided by Paul (2026-11-09): a task\n * lands when its product is in the working tree, and commits are checkpoints that record. Never throws: an unreadable\n * file is absent, and an unreadable repository counts a committed-read failure (see `selectGitVisiblePaths`).\n */\n public async isWorktreePathPresent(subjectRelativePath: string): Promise<boolean> {\n return (await this.selectPresentPaths([subjectRelativePath])).has(subjectRelativePath);\n }\n\n /** {@link isWorktreePathPresent} for a set: one `ls-files` per chunk, and a read of each path git sees. */\n public async selectPresentPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const visible = await this.selectGitVisiblePaths(subjectRelativePaths);\n const present = await Promise.all([...visible].map(async (path) => {\n const stat = await fs.stat(join(this.companionContext.saasRoot, path)).catch(() => undefined);\n return stat?.isFile() === true ? path : undefined;\n }));\n return new Set(present.filter((path): path is string => path !== undefined));\n }\n\n /** The working file's text, or `undefined` when it cannot be read (absent, a directory, unreadable). */\n public async readWorktreeText(subjectRelativePath: string): Promise<string | undefined> {\n return fs.readFile(join(this.companionContext.saasRoot, subjectRelativePath), 'utf8').catch(() => undefined);\n }\n\n /** {@link readWorktreeText} for a set; a path that cannot be read is absent from the map. */\n public async readWorktreeTexts(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const entries = await Promise.all([...new Set(subjectRelativePaths)].map(async (path) => [path, await this.readWorktreeText(path)] as const));\n return new Map(entries.filter((entry): entry is readonly [string, string] => entry[1] !== undefined));\n }\n\n /**\n * Which of these paths git SEES (#3204): tracked, or untracked and not ignored — `ls-files --cached --others\n * --exclude-standard`, one per pathspec chunk. What a build task's landing asks of the WORKING tree, beside reading the\n * file: a product counts when it is there and is part of the application's source, so a file under an ignored directory\n * (a build output, a test artifact) never reads as a product, the trap {@link checkWorktreePathCommitted} records.\n *\n * Says nothing about whether the file still exists (an index entry outlives a deletion): the caller reads it. Never\n * throws: an unreadable repository answers \"sees none of them\" and counts a committed-read failure, so a landing pass\n * that met it is held as provisional rather than believed.\n */\n public async selectGitVisiblePaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n try {\n const visible = new Set<string>();\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout } = await this.execGit(['ls-files', '-z', '--cached', '--others', '--exclude-standard', '--', ...chunk]);\n for (const entry of stdout.split('\\0')) if (entry !== '') visible.add(entry);\n }\n return new Set(paths.filter((path) => visible.has(path)));\n } catch {\n this.noteCommittedReadFailure();\n return new Set();\n }\n }\n\n /**\n * Which of these paths git TRACKS (the index names them), in one `ls-files` per pathspec chunk — the half of\n * {@link selectCommittedPaths} a DELETION needs on its own: a committed deletion is a path git no longer tracks and the\n * working tree no longer holds. Never throws; an unreadable repository answers \"tracks all of them\", the direction in\n * which a deletion reads as still waiting on its commit rather than as settled.\n */\n public async selectTrackedPaths(subjectRelativePaths: readonly string[]): Promise<ReadonlySet<string>> {\n const paths = [...new Set(subjectRelativePaths)];\n if (paths.length === 0) return new Set();\n try {\n const tracked = new Set<string>();\n for (const chunk of GitChangeSetCompanionService.chunkPaths(paths)) {\n const { stdout } = await this.execGit(['ls-files', '-z', '--', ...chunk]);\n for (const entry of stdout.split('\\0')) if (entry !== '') tracked.add(entry);\n }\n return tracked;\n } catch {\n this.noteCommittedReadFailure();\n return new Set(paths);\n }\n }\n\n /**\n * Every application-relative path a commit touched since `sinceIso` (commit time, HEAD's history), or `undefined` when\n * git could not be asked (#3233): \"could not tell\" must never read as \"nothing changed\". One `log --name-only`.\n */\n public async listPathsCommittedSince(sinceIso: string): Promise<readonly string[] | undefined> {\n try {\n // `--relative` scopes the paths to this application and prints them relative to it, as the rest of this service does.\n const { stdout } = await this.execGit(['log', `--since=${sinceIso}`, '--name-only', '--format=', '--relative', '--', '.']);\n return [...new Set(stdout.split('\\n').map((line) => line.trim()).filter((line) => line !== ''))];\n } catch {\n return undefined;\n }\n }\n\n /** Split a path list into argv-safe pathspec chunks. */\n private static *chunkPaths(paths: readonly string[]): Generator<readonly string[]> {\n for (let index = 0; index < paths.length; index += GitChangeSetCompanionService.COMMITTED_BATCH_PATHSPEC_LIMIT) {\n yield paths.slice(index, index + GitChangeSetCompanionService.COMMITTED_BATCH_PATHSPEC_LIMIT);\n }\n }\n\n /**\n * Every path named by `git status --porcelain -z`, ORIGIN PATHS INCLUDED.\n *\n * `-z` rather than the newline form because the newline form QUOTES and C-escapes any path with a\n * space or a non-ASCII byte, so a parser would have to unescape — and a path it unescaped wrongly\n * would silently read as clean. `-z` emits raw bytes and needs no unquoting at all.\n *\n * A rename or copy occupies TWO NUL-separated fields — `XY <new>\\0<origin>\\0` — and the origin\n * carries no status prefix of its own. Both names are reported: a path that was renamed AWAY is not\n * \"committed and unchanged\" at its old name, and consuming the extra field is also what keeps the\n * parser in step, since reading it as a status entry would mis-slice the next path.\n */\n private static parsePorcelainZPaths(stdout: string): readonly string[] {\n const fields = stdout.split('\\0');\n const named: string[] = [];\n for (let index = 0; index < fields.length; index += 1) {\n const field = fields[index];\n if (field === undefined || field.length < 4) continue;\n named.push(field.slice(3));\n const indexStatus = field[0];\n const worktreeStatus = field[1];\n if (indexStatus === 'R' || indexStatus === 'C' || worktreeStatus === 'R' || worktreeStatus === 'C') {\n index += 1;\n const origin = fields[index];\n if (origin !== undefined && origin !== '') named.push(origin);\n }\n }\n return named;\n }\n\n /**\n * The COMMITTED text at MANY paths — one `git cat-file --batch` subprocess instead of one\n * `git show` per path.\n *\n * ## Why\n *\n * The landing probe reads committed bytes for every DECLARES probe of every task, and each read\n * was its own `show` spawn. Attributed at the spawn site 2026-09-22 on `examples/wonder-todos`,\n * this was the largest remaining source once the committed-ness checks were batched: 20 of 45\n * spawns in a ten-second window, on four distinct paths — the same files, re-read per resolution.\n *\n * ## The protocol, because it is positional and that is the whole risk\n *\n * `--batch` answers each stdin line in order and its reply for a FOUND object is\n * `<oid> <type> <size>\\n<bytes>\\n` — **which does not echo the path**. So results are matched to\n * requests by ORDER, and a parser that loses its place returns one path's bytes under another\n * path's name. A missing object answers `<the line you sent> missing\\n`, which both reports the\n * absence and resynchronises the stream, so the two cases cannot be confused.\n *\n * The reply is read as BYTES and sliced by the declared `size` before being decoded, never split\n * on newlines: content contains newlines, so a line-oriented parser would mis-slice every file\n * with more than one line in it — which is every file this reads.\n *\n * `HEAD:./<path>` keeps the `./` that {@link readCommittedText} documents: without it the name\n * resolves against the REPOSITORY root even under `git -C`, so inside this monorepo every request\n * would miss and every task would read as never landed.\n *\n * Never throws, and falls back to the per-path reads rather than answering for them — the same\n * contract as {@link selectCommittedPaths}, so one definition of the failure behaviour.\n */\n public async readCommittedTexts(subjectRelativePaths: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const paths = [...new Set(subjectRelativePaths)];\n const texts = new Map<string, string>();\n if (paths.length === 0) return texts;\n\n try {\n const stdout = await this.runCatFileBatch(paths.map((path) => `HEAD:./${path}`));\n let offset = 0;\n for (const path of paths) {\n const newline = stdout.indexOf(0x0a, offset);\n if (newline < 0) throw new Error('cat-file --batch ended mid-header');\n const header = stdout.toString('latin1', offset, newline);\n offset = newline + 1;\n if (header.endsWith(' missing') || header.endsWith(' ambiguous')) continue;\n const size = Number(header.slice(header.lastIndexOf(' ') + 1));\n if (!Number.isSafeInteger(size) || size < 0) throw new Error(`cat-file --batch header not understood: ${header}`);\n texts.set(path, stdout.toString('utf8', offset, offset + size));\n // The payload is followed by a single newline the object itself does not contain.\n offset += size + 1;\n }\n return texts;\n } catch {\n this.noteCommittedReadFailure();\n const answers = await Promise.all(paths.map(async (path) => [path, await this.readCommittedText(path)] as const));\n for (const [path, text] of answers) if (text !== undefined) texts.set(path, text);\n return texts;\n }\n }\n\n /**\n * One `git cat-file --batch`, fed {@link names} on stdin, answered as raw bytes. Through the git read helper (#3204):\n * forking `git` from the companion's 2 GB process blocked its event loop. The same ceiling `execGit` gives every other\n * read bounds it (`maxBuffer`), and a non-zero exit, a timeout or the ceiling all reject, as the direct spawn did.\n */\n private async runCatFileBatch(names: readonly string[]): Promise<Buffer> {\n if (!READ_ONLY_GIT_SUBCOMMANDS.has('cat-file')) {\n throw new Error(\"Git subcommand 'cat-file' is outside the companion's read-only carve-out (DD-8 / P-19).\");\n }\n const { stdout } = await gitReadBroker.execGitBuffer(['-C', this.companionContext.saasRoot, 'cat-file', '--batch'], {\n input: `${names.join('\\n')}\\n`,\n maxBuffer: GIT_MAX_BUFFER_BYTES,\n timeout: GIT_TIMEOUT_MS,\n });\n return stdout;\n }\n\n /**\n * The COMMITTED text at this path, or `undefined` when the path is not committed.\n *\n * Reads the worktree file, and that is exact rather than approximate:\n * {@link isWorktreePathCommitted} has already established that git tracks the path and that HEAD,\n * WHAT HEAD HOLDS, read from the object database — never the worktree copy.\n *\n * It used to ask whether the worktree and index AGREED for the path and then read the file from\n * disk, on the reasoning that a half-edited file is work in progress and never evidence. That\n * reasoning is right about the WORKTREE and wrong about this question: whether a path is currently\n * being edited says nothing about what was committed, and on a tree several sessions write to\n * continuously, \"clean\" is the exceptional state rather than the normal one.\n *\n * Measured 2026-09-16 and the cost was per-dispatch. A sibling session held every module's\n * `*.relationships.ts` dirty while adding `onParentDelete` declarations; every relationship task in\n * the build plan therefore read as NOT LANDED, the lane re-offered work finished hours earlier, and\n * a coding run was spent per task discovering there was nothing to write — one of them judged GAP\n * for recording an empty change-set, which was the honest verdict on the evidence. HEAD held every\n * one of those edges throughout.\n *\n * The earlier note said `git show` was declined to keep {@link READ_ONLY_GIT_SUBCOMMANDS} small.\n * The set exists to keep this service incapable of mutation, and `show` prints an object; the four\n * verbs it started with were never the point.\n */\n public async readCommittedText(subjectRelativePath: string): Promise<string | undefined> {\n try {\n /*\n * `./` IS LOAD-BEARING. `HEAD:<path>` resolves against the REPOSITORY ROOT even under `git -C`,\n * so the bare form asks for `shared-lib/…` at the monorepo root — which does not exist, making\n * every probe answer \"absent\" and every task read as never landed. `HEAD:./<path>` is the form\n * that resolves against the current directory, i.e. the application root this service runs in.\n * Measured both ways before this was written: bare `fatal: path … does not exist`, `./` returns\n * the file.\n */\n const { stdout } = await this.execGit(['show', `HEAD:./${subjectRelativePath}`]);\n return stdout;\n } catch (error) {\n // No such path at HEAD — untracked, or never committed. Absent, not empty.\n // Anything else (a timeout, a spawn that failed) also reads as absent, and is COUNTED as a failed read, so a\n // caller holding the answer knows it may not be true (#3206 review L1).\n if (!GIT_PATH_ABSENT_AT_HEAD.test(describeGitReadFailure(error))) {\n this.noteCommittedReadFailure();\n }\n return undefined;\n }\n }\n\n /**\n * Every commit reachable from HEAD that changed `relativePath`, newest first, with author and whole message (#3224\n * review): the build-task decisions reader honours the file only when its bytes are what a commit made through a\n * person's door produced. Records are split on RS and fields on NUL, so no message text can be read as an author or a\n * record. `undefined` when git cannot be read: an unknown history is never read as a door.\n */\n public async listCommitsTouching(relativePath: string): Promise<readonly { readonly sha: string; readonly authorName: string; readonly authorEmail: string; readonly body: string }[] | undefined> {\n try {\n const { stdout } = await this.execGit(['log', '--format=%x1e%H%x00%an%x00%ae%x00%B', 'HEAD', '--', relativePath]);\n return stdout.split('\\x1e').filter((record) => record.trim().length > 0).flatMap((record) => {\n const [sha, authorName, authorEmail, ...body] = record.split('\\0');\n return sha?.trim() && authorName !== undefined && authorEmail !== undefined\n ? [{ sha: sha.trim(), authorName, authorEmail, body: body.join('\\0') }]\n : [];\n });\n } catch {\n return undefined;\n }\n }\n\n /** The commit HEAD names, or `undefined` when git cannot say (#3224 review: the decisions history is cached per HEAD). */\n public async readHeadCommitSha(): Promise<string | undefined> {\n try {\n return (await this.resolveHeadSha()) || undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Whether `sha` names a commit this repository still holds (#3224 review): a run record whose baseline or post-run\n * commit was rewritten away (reset, rebase and gc) names a window that can no longer be computed. `undefined` when git\n * cannot be asked at all, which is a different answer from \"it no longer exists\".\n */\n public async commitExists(sha: string): Promise<boolean | undefined> {\n if (!/^[0-9a-f]{7,64}$/iu.test(sha)) return false;\n try {\n // `--ignore-missing` answers an object it does not hold with nothing (exit 0), so a failure here is git failing.\n const { stdout } = await this.execGit(['log', '--format=%H', '--no-walk', '--ignore-missing', sha]);\n return stdout.trim().length > 0;\n } catch {\n return undefined;\n }\n }\n\n /** The blob id `rev` holds at `relativePath` (application-root relative), or `undefined` when it holds none. */\n public async readBlobIdAt(rev: string, relativePath: string): Promise<string | undefined> {\n try {\n // `./` resolves against the application root, as in `readCommittedText`.\n const { stdout } = await this.execGit(['rev-parse', '--verify', '--quiet', `${rev}:./${relativePath}`]);\n return stdout.trim() || undefined;\n } catch {\n return undefined;\n }\n }\n\n /** The text `rev` holds at `relativePath`, or `undefined` when it holds none. */\n public async readTextAt(rev: string, relativePath: string): Promise<string | undefined> {\n try {\n return (await this.execGit(['show', `${rev}:./${relativePath}`])).stdout;\n } catch {\n return undefined;\n }\n }\n\n /**\n * The commits reachable from `tip` and not from `base` (`base..tip`), or `undefined` when git cannot answer. Read by\n * the decisions reader to find the commits made INSIDE a coding run's window (#3224 review).\n */\n public async listCommitsBetween(base: string, tip: string): Promise<readonly string[] | undefined> {\n if (!/^[0-9a-f]{7,64}$/iu.test(base) || !/^[0-9a-f]{7,64}$/iu.test(tip)) return undefined;\n try {\n const { stdout } = await this.execGit(['log', '--format=%H', `${base}..${tip}`]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.length > 0);\n } catch {\n return undefined;\n }\n }\n\n /**\n * The full SHA of `ref` when it names a commit HEAD contains (HEAD itself or an ancestor), else `undefined` (#3224):\n * what `wildo build close --satisfied-by <commit>` accepts. Read-only: `rev-parse` resolves it, and `log\n * --ancestry-path <sha>..HEAD` is non-empty exactly when the commit is a proper ancestor of HEAD (the read-only set has\n * no `merge-base`). A ref that names no commit, or one on another branch, reads `undefined`.\n */\n public async resolveCommitOnHead(ref: string): Promise<string | undefined> {\n if (!/^[0-9a-f]{4,40}$/iu.test(ref)) return undefined;\n try {\n const sha = (await this.execGit(['rev-parse', '--verify', '--quiet', `${ref}^{commit}`])).stdout.trim();\n const head = (await this.execGit(['rev-parse', 'HEAD'])).stdout.trim();\n if (sha.length === 0) return undefined;\n if (sha === head) return sha;\n const between = (await this.execGit(['log', '--ancestry-path', '--format=%H', '-1', `${sha}..HEAD`])).stdout.trim();\n return between.length > 0 ? sha : undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Unix time (seconds) of the last commit touching the path, or `undefined` when the path has no\n * commit history (a brand-new or untracked file) or the repository cannot be inspected. Used for\n * git-derived artifact FRESHNESS — never stored, so it merges like everything else git carries.\n */\n public async lastCommitUnixTime(subjectRelativePath: string): Promise<number | undefined> {\n try {\n const { stdout } = await this.execGit(['log', '-1', '--format=%ct', '--', subjectRelativePath]);\n const parsed = Number(stdout.trim());\n return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Run `git -C <saasRoot> <args>` through the git read helper (#3204) — argv-array `execFile`, never a\n * shell. The first argument MUST be in {@link READ_ONLY_GIT_SUBCOMMANDS};\n * anything else throws before spawning (the DD-8 read-only guard).\n */\n private async execGit(args: string[], options: { readonly noOptionalLocks?: boolean } = {}): Promise<{ stdout: string; stderr: string }> {\n const subcommand = args[0];\n if (!subcommand || !READ_ONLY_GIT_SUBCOMMANDS.has(subcommand)) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Git subcommand '${subcommand ?? '<none>'}' is outside the companion's read-only carve-out (DD-8 / P-19).`,\n allowedSubcommands: [...READ_ONLY_GIT_SUBCOMMANDS],\n },\n });\n }\n\n try {\n // Through the git read helper (#3204): forking `git` from the companion's 2 GB process blocked its event loop.\n return await gitReadBroker.execGit(\n // `--no-optional-locks` is a git-wide option, so it precedes the subcommand the guard above checked.\n ['-C', this.companionContext.saasRoot, ...(options.noOptionalLocks === true ? ['--no-optional-locks'] : []), ...args],\n { maxBuffer: GIT_MAX_BUFFER_BYTES, timeout: GIT_TIMEOUT_MS },\n );\n } catch (error) {\n const stderr = (error as { stderr?: string }).stderr ?? '';\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message: `Read-only git invocation failed: git ${args.join(' ')} — ${describeCaughtError(error)}`,\n stderr: stderr.slice(0, 2_000),\n saasRoot: this.companionContext.saasRoot,\n },\n });\n }\n }\n}\n\nfunction changeKindFromXY(xy: string): ChangeSetFileChangeKind {\n if (xy.includes('D')) return ChangeSetFileChangeKind.DELETED;\n if (xy.includes('A')) return ChangeSetFileChangeKind.ADDED;\n if (xy.includes('R')) return ChangeSetFileChangeKind.RENAMED;\n if (xy.includes('M') || xy.includes('T')) return ChangeSetFileChangeKind.MODIFIED;\n return ChangeSetFileChangeKind.UNKNOWN;\n}\n\nfunction sha256(content: string | Buffer): string {\n return createHash('sha256').update(content).digest('hex');\n}\n\n"]}
@@ -86,6 +86,20 @@ export interface FinalEvidenceRecordInput {
86
86
  * investigation. Returns the absolute path written, so the caller can report it.
87
87
  */
88
88
  export declare function writeFinalEvidenceRecord(input: FinalEvidenceRecordInput): string;
89
+ /** One completed research turn, as its final evidence record states it (#3896). */
90
+ export interface ResearchTurnRecord {
91
+ /** The playbook that asked; the record's own evidence scope (its directory) when the record names none. */
92
+ readonly playbookRef: string;
93
+ readonly startedAt: string;
94
+ readonly elapsedMs: number;
95
+ }
96
+ /**
97
+ * Every completed research turn of the application, read from the final evidence records under
98
+ * {@link RESEARCH_EVIDENCE_RELATIVE_ROOT} (`<scope>/<yyyy-mm-dd>-round-<n>.md`, written by {@link writeFinalEvidenceRecord}).
99
+ * The creation timeline reads them because a research turn writes no playbook-run row (#3896). A record without
100
+ * `startedAt` or `elapsedMs` is skipped; a missing root answers none. Throws only on an unreadable directory.
101
+ */
102
+ export declare function readResearchTurnRecords(saasRoot: string): readonly ResearchTurnRecord[];
89
103
  /**
90
104
  * Stamp the markdown files a research turn wrote as THIRD_PARTY content (#2846 review M1, N7).
91
105
  *
@@ -1 +1 @@
1
- {"version":3,"file":"research-evidence-store.companion.d.ts","sourceRoot":"","sources":["../../../../src/claude-cli/services/research-evidence-store.companion.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,uGAAuG;AACvG,eAAO,MAAM,+BAA+B,qCAAqC,CAAC;AAElF;;;;GAIG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C,MAAM,EAAE,MAAM,CAAC,EACnC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,CAQ3E"}
1
+ {"version":3,"file":"research-evidence-store.companion.d.ts","sourceRoot":"","sources":["../../../../src/claude-cli/services/research-evidence-store.companion.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,uGAAuG;AACvG,eAAO,MAAM,+BAA+B,qCAAqC,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAExF;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO1D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,+BAA+B,CAAC,6BAA6B,EAAE,MAAM,EAAE,mCAAmC,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB3I;AAED,sGAAsG;AACtG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,wBAAwB,GAAG,MAAM,CAsChF;AAED,mFAAmF;AACnF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