@wildo-ai/dev-companion 1.1.2 → 1.1.4

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 (540) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/__tests__/asset-noop.d.ts.map +1 -1
  3. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
  4. package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
  5. package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  8. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +9 -3
  9. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  10. package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
  11. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
  12. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  13. package/dist/esm/brand/services/brand-accept.companion.service.js +10 -48
  14. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  15. package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
  16. package/dist/esm/brand/services/logo-deliberation.companion.service.js +2 -8
  17. package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
  18. package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
  19. package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
  20. package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
  21. package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
  22. package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
  23. package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
  24. package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
  25. package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
  26. package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
  27. package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
  28. package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
  29. package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
  30. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +52 -2
  31. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +45 -0
  33. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +45 -5
  35. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  36. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +180 -9
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +12 -22
  39. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +151 -82
  41. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +30 -4
  43. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  44. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +30 -4
  45. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  46. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +1 -1
  47. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +1 -1
  49. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  50. package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
  51. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
  52. package/dist/esm/companion-api/companion-api.schemas.d.ts +57 -57
  53. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  54. package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
  55. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
  56. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
  57. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +98 -0
  58. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
  59. package/dist/esm/companion-api/controllers/companion.controller.d.ts +32 -5
  60. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  61. package/dist/esm/companion-api/controllers/companion.controller.js +126 -41
  62. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  63. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +8 -1
  64. package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
  65. package/dist/esm/core/auth/companion-auth-floor.companion.service.js +8 -1
  66. package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
  67. package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
  68. package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
  69. package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
  70. package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
  71. package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
  72. package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
  73. package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
  74. package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
  75. package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
  76. package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
  77. package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
  78. package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
  80. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
  81. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
  82. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
  83. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
  84. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
  85. package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
  86. package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
  87. package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
  88. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  89. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
  90. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  91. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  92. package/dist/esm/core/context/companion-context.d.ts.map +1 -1
  93. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  94. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  95. package/dist/esm/core/inject/models/container.js +0 -7
  96. package/dist/esm/core/inject/models/container.js.map +1 -1
  97. package/dist/esm/core/inject/models/service-types.d.ts +0 -1
  98. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  99. package/dist/esm/core/inject/models/service-types.js +0 -1
  100. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  101. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  102. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  103. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  104. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +8 -4
  105. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  106. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  107. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  108. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  109. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  110. package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
  111. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  112. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +42 -1
  113. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  114. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  115. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  116. package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
  117. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  118. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  120. package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
  121. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  122. package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
  124. package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
  125. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  126. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +3 -2
  127. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  128. package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
  129. package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
  130. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
  131. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
  133. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
  135. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
  137. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  139. package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
  141. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +38 -1
  142. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  143. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +143 -19
  144. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  145. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  146. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
  147. package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
  148. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
  149. package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
  150. package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
  151. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
  152. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
  153. package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
  154. package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
  155. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  156. package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
  157. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +16 -13
  158. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  159. package/dist/esm/core/runtime/services/start-companion-application.service.js +70 -45
  160. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  161. package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
  162. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  163. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +9 -2
  164. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  165. package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
  166. package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
  167. package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
  168. package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
  169. package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
  170. package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
  171. package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
  172. package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
  173. package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
  174. package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
  175. package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
  176. package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
  177. package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
  178. package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
  180. package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
  181. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  182. package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
  183. package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
  184. package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
  185. package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
  186. package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
  187. package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
  188. package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
  189. package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
  190. package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
  191. package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
  192. package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
  193. package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
  194. package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
  195. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
  196. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
  197. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
  198. package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
  199. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
  200. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
  201. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
  202. package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
  203. package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
  204. package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
  205. package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
  206. package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
  207. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
  208. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
  209. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
  210. package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
  211. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
  212. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
  213. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
  214. package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
  215. package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
  216. package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
  217. package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
  218. package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
  219. package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
  220. package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
  221. package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
  222. package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
  223. package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
  224. package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
  225. package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
  226. package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
  227. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
  228. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
  229. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
  230. package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
  231. package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
  232. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
  233. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +4 -4
  234. package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
  235. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  236. package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
  237. package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
  238. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  239. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
  240. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  241. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  242. package/dist/esm/deliberations/services/deliberation.companion.service.js +0 -5
  243. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  244. package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
  245. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +0 -2
  246. package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
  247. package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
  248. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  249. package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
  250. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  251. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
  252. package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
  253. package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
  254. package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
  255. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  256. package/dist/esm/email/services/email-template.companion.service.js +23 -1
  257. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  258. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  259. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  260. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  261. package/dist/esm/executions/services/companion-executions.companion.service.js +15 -2
  262. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  263. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  264. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
  265. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  266. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  267. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
  268. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  269. package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
  270. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +9 -24
  271. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  272. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +11 -60
  273. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  274. package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
  275. package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
  276. package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
  277. package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
  278. package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
  279. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  280. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
  281. package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
  282. package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  283. package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
  285. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  286. package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
  287. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  289. package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
  290. package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
  291. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  293. package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
  294. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  295. package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
  296. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
  297. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
  298. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
  299. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
  301. package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
  302. package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
  303. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  305. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
  306. package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
  307. package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
  311. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
  314. package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
  315. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
  317. package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
  318. package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
  319. package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
  321. package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
  322. package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
  323. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
  325. package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
  326. package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
  327. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
  329. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  330. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
  331. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
  333. package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
  334. package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
  336. package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
  337. package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
  338. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  339. package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
  340. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
  341. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
  342. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
  344. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  345. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
  346. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
  347. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
  348. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
  349. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
  350. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
  352. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
  353. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
  354. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
  355. package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
  356. package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
  357. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
  359. package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
  360. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  361. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
  363. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  364. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
  365. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
  367. package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
  368. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
  369. package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
  371. package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
  372. package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
  373. package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
  375. package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
  376. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
  377. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
  379. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
  380. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
  381. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
  382. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
  383. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  384. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
  385. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
  386. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
  387. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
  388. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  389. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
  391. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
  392. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
  393. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
  395. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
  396. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
  397. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
  399. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  400. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
  401. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  403. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  404. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
  405. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
  407. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
  408. package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
  409. package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
  411. package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
  412. package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
  413. package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
  414. package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
  415. package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
  416. package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
  417. package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
  419. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  420. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -1
  421. package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
  422. package/dist/esm/i18n/index.d.ts.map +1 -1
  423. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  424. package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
  425. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
  426. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  427. package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
  428. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  429. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  430. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  431. package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
  432. package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
  433. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +58 -0
  434. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  435. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +35 -0
  436. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  437. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  438. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
  439. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  440. package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +55 -1
  442. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  443. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +178 -73
  444. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  445. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +3 -3
  446. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  447. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +16 -5
  448. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  449. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +35 -2
  450. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  451. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +68 -29
  452. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  453. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  454. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +126 -35
  455. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  456. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
  457. package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
  458. package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
  459. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
  460. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
  461. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
  462. package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
  463. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
  464. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
  465. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
  466. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
  467. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  468. package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
  469. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +104 -0
  470. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  471. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +163 -18
  472. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  473. package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
  474. package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
  475. package/dist/esm/index.d.ts.map +1 -1
  476. package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
  477. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  478. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +72 -0
  479. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  480. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  481. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  482. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +17 -4
  483. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -1
  484. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +25 -5
  485. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
  486. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  487. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  488. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +9 -4
  489. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  490. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
  491. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +3 -9
  492. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  493. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +48 -28
  494. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  495. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +83 -2
  496. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +197 -4
  498. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  499. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  500. package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
  501. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  502. package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +1 -1
  503. package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
  504. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  505. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +37 -1
  506. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  507. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +227 -15
  508. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  509. package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
  510. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +117 -2
  511. package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
  512. package/dist/esm/technical-doc/services/technical-doc.companion.service.js +258 -69
  513. package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
  514. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +5 -1
  515. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
  516. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +142 -10
  517. package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
  518. package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
  519. package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
  520. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
  521. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  522. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +10 -2
  523. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  524. package/package.json +17 -17
  525. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
  526. package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
  527. package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
  528. package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
  529. package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
  530. package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
  531. package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
  532. package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
  533. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +0 -19
  534. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +0 -1
  535. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +0 -19
  536. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +0 -1
  537. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
  538. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
  539. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
  540. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
@@ -36,19 +36,20 @@ import { ErrorBuilderBackendService, LoggerService } from '@wildo-ai/saas-backen
36
36
  import type { CompanionContext } from '../../core/context/companion-context';
37
37
  import { type GitChangeSetCapture, type GitWorktreeSnapshot } from '../models/coding-agent-dispatch.models';
38
38
  /**
39
- * Lightweight machine-local Git observation used by continuity bootstrap.
39
+ * Is this application-relative path owned by a concurrent companion lane?
40
40
  *
41
- * The digest identifies one local Git common directory, so linked worktrees
42
- * share repository identity while an independently cloned repository does
43
- * not. It is an alias in a local workspace binding, never the canonical
44
- * application-subject identity and never portable application truth.
41
+ * Exported because it has TWO call sites and they answer different halves of one
42
+ * question: this service uses it to ATTRIBUTE the entry, and the dispatch's scope
43
+ * assessment uses it to drop a disappearance under the same root — a research
44
+ * agent may delete or rewrite a file it wrote in an earlier round, and a
45
+ * disappearance carries no attribution class to filter on. One predicate, so the
46
+ * two halves cannot drift.
47
+ *
48
+ * Boundary-matched like every other prefix comparison in this vertical:
49
+ * `specifications/research-evidence` must not admit
50
+ * `specifications/research-evidence-notes.md`.
45
51
  */
46
- export interface LocalGitRepositoryIdentityObservation {
47
- repositoryIdentityDigest: string;
48
- headSha: string;
49
- repositoryRoot: string;
50
- applicationRootRelativePath: string;
51
- }
52
+ export declare function isConcurrentHostLanePath(applicationRelativePath: string): boolean;
52
53
  export declare class GitChangeSetCompanionService {
53
54
  private readonly logger;
54
55
  private readonly errorBuilder;
@@ -63,15 +64,6 @@ export declare class GitChangeSetCompanionService {
63
64
  * "changed again during the run" (→ BASELINE_DIRTY_AMBIGUOUS).
64
65
  */
65
66
  captureWorktreeSnapshot(): Promise<GitWorktreeSnapshot>;
66
- /**
67
- * Resolve only the stable local repository alias and current Git head.
68
- *
69
- * Continuity startup must not call {@link captureWorktreeSnapshot}: that
70
- * coding-agent operation hashes every dirty/untracked file and captures a
71
- * full diff. This narrower internal observation uses read-only `rev-parse`
72
- * calls and performs no MCP/A2A round trip or Git mutation.
73
- */
74
- captureLocalRepositoryIdentity(): Promise<LocalGitRepositoryIdentityObservation>;
75
67
  /** True when the snapshot carries any tracked-dirty or untracked file. */
76
68
  isDirty(snapshot: GitWorktreeSnapshot): boolean;
77
69
  /**
@@ -81,8 +73,6 @@ export declare class GitChangeSetCompanionService {
81
73
  */
82
74
  captureChangeSet(baseline: GitWorktreeSnapshot): Promise<GitChangeSetCapture>;
83
75
  private resolveHeadSha;
84
- private resolveRepositoryRoot;
85
- private resolveGitCommonDirectory;
86
76
  /**
87
77
  * `--relative` is load-bearing, not cosmetic. Every other path this service
88
78
  * records is application-root-relative (`status --porcelain=v2` and
@@ -1 +1 @@
1
- {"version":3,"file":"git-change-set.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/claude-cli/services/git-change-set.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AASH,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAGd,MAAM,4BAA4B,CAAC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,CAAC;IAU9G;;;;;;;;;;;;;;;;OAgBG;IACU,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BnF;;;;OAIG;IACU,kBAAkB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUzF;;;;OAIG;YACW,OAAO;CA8BtB"}
1
+ {"version":3,"file":"git-change-set.companion.service.d.ts","sourceRoot":"","sources":["../../../../src/claude-cli/services/git-change-set.companion.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AASH,OAAO,EACL,0BAA0B,EAC1B,aAAa,EAGd,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAGL,KAAK,mBAAmB,EAGxB,KAAK,mBAAmB,EACzB,MAAM,wCAAwC,CAAC;AA+LhD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,uBAAuB,EAAE,MAAM,GAAG,OAAO,CAGjF;AAMD,qBACa,4BAA4B;IAKrC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IARnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+D;gBAIrE,MAAM,EAAE,aAAa,EAErB,YAAY,EAAE,0BAA0B,EAExC,gBAAgB,EAAE,gBAAgB;IAKrD;;;;;;OAMG;IACU,uBAAuB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAqCpE,0EAA0E;IACnE,OAAO,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO;IAItD;;;;OAIG;IACU,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;YAiH5E,cAAc;IAK5B;;;;;;;;;;OAUG;YACW,gBAAgB;IAK9B;;;;OAIG;YACW,kBAAkB;YAUlB,kBAAkB;IAKhC;;;;OAIG;YACW,wBAAwB;YAYxB,uBAAuB;IAoBrC;;;;;OAKG;YACW,sBAAsB;IAkCpC;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;;;;;;;;;;;;;;;OAgBG;IACU,8BAA8B,CAAC,iCAAiC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAU9G;;;;;;;;;;;;;;;;OAgBG;IACU,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BnF;;;;OAIG;IACU,kBAAkB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUzF;;;;OAIG;YACW,OAAO;CA8BtB"}
@@ -48,12 +48,13 @@ import { execFile } from 'node:child_process';
48
48
  import { createHash } from 'node:crypto';
49
49
  import { promisify } from 'node:util';
50
50
  import { promises as fs } from 'node:fs';
51
- import { isAbsolute, join, relative, resolve, sep } from 'node:path';
51
+ import { join } from 'node:path';
52
52
  import { inject, injectable } from 'inversify';
53
53
  import { ErrorBuilderBackendService, LoggerService, SAAS_SERVICE_TYPES, describeCaughtError, } from '@wildo-ai/saas-backend-lib';
54
54
  import { ErrorCustomMessageReference, ErrorType, } from '@wildo-ai/saas-models';
55
55
  import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
56
56
  import { ChangeSetAttributionClass, ChangeSetFileChangeKind, } from '../models/coding-agent-dispatch.models.js';
57
+ import { RESEARCH_EVIDENCE_RELATIVE_ROOT } from './research-evidence-store.companion.js';
57
58
  const execFileAsync = promisify(execFile);
58
59
  /**
59
60
  * The complete read-only subset this service may invoke. Guard, not
@@ -100,9 +101,10 @@ const READ_ONLY_GIT_SUBCOMMANDS = new Set([
100
101
  * ordinary tracked/untracked capture already sees it.
101
102
  *
102
103
  * `.wildo-saas/state/meta-workflows` and `.wildo-saas/state/audit` are ABSENT,
103
- * and the reason CHANGED on 2026-08-24 — read this before "restoring" them.
104
+ * and they are absent for DIFFERENT reasons. Read this before "restoring"
105
+ * either of them.
104
106
  *
105
- * Originally they were excluded because the HOST wrote to them inside the very
107
+ * Originally both were excluded because the HOST wrote to them inside the very
106
108
  * window a coding run occupies: the episode host persisted an episode
107
109
  * checkpoint after the baseline capture and before the run ended, and a
108
110
  * security audit appended an event on every token-gated request. Observing
@@ -110,19 +112,34 @@ const READ_ONLY_GIT_SUBCOMMANDS = new Set([
110
112
  * naming the episode's own checkpoint as the violating path — measured by the
111
113
  * Block-4 integration proof rather than reasoned about.
112
114
  *
113
- * Both of those writers are now GONE. The episode checkpoint store and the
114
- * companion security audit were deleted with the rest of the ledger layer, so
115
- * neither subtree has a producer: `.wildo-saas/state/audit/` holds only
116
- * orphaned events (newest 2026-08-22) and nothing reads them. They stay absent
117
- * because there is nothing there to observe — not because a host writer would
118
- * collide with the capture.
115
+ * `.wildo-saas/state/audit` genuinely has no producer any more: the companion
116
+ * security audit was deleted with the rest of the ledger layer, so that subtree
117
+ * holds only orphaned events that nothing reads.
118
+ *
119
+ * `.wildo-saas/state/meta-workflows` DOES have host writers again, and its
120
+ * exclusion is once more load-bearing for the ORIGINAL reason rather than a
121
+ * leftover. Three companion stores live under it (choreography checkpoints,
122
+ * suspended runs and the playbook run-write register), and the first two are
123
+ * written DURING a playbook run (`PlaybookRunCompanionService` passes
124
+ * `choreographyCheckpoints.save` as the choreography's checkpoint callback, and
125
+ * saves a suspended-run record on suspension). That is exactly the writer shape
126
+ * this exclusion exists to keep out of a coding run's change set.
119
127
  *
120
128
  * The distinction is load-bearing for whoever adds the next host-owned store.
121
- * If a writer that runs INSIDE the coding window returns — a new checkpoint,
122
- * a new audit trail — it must be excluded here again, and its own integrity
123
- * becomes the owning store's job rather than this capture's. A same-UID agent
124
- * can always recompute a per-event self-digest, so such a store needs a hash
125
- * chain or an anchor the agent cannot reach, designed in from the start.
129
+ * A writer that runs INSIDE the coding window must be excluded, and keeping its
130
+ * records honest becomes the owning store's job rather than this capture's. Do
131
+ * not reach for a hash chain or a per-event self-digest for that: a same-UID
132
+ * agent can recompute either, and Rule 0 of
133
+ * `.claude/rules/one-source-of-truth.md` keeps such records out. Git is the
134
+ * record; a store that must survive the agent is placed outside its reach,
135
+ * not sealed inside it.
136
+ *
137
+ * WHERE that exclusion is written depends on whether the store is gitignored,
138
+ * and getting this wrong is what let a real defect through. Omitting a subtree
139
+ * from the list below only hides it while git itself hides it. A store that is
140
+ * TRACKED — the research evidence store is, deliberately — is listed by the
141
+ * ordinary untracked/tracked capture no matter what this pathspec set says, and
142
+ * belongs in {@link CONCURRENT_HOST_LANE_ROOTS} instead.
126
143
  *
127
144
  * These paths are outside any coding task's declared `allowedPathPrefixes`, so
128
145
  * making them visible is sufficient — the existing mutation-scope assessment
@@ -132,8 +149,9 @@ const READ_ONLY_GIT_SUBCOMMANDS = new Set([
132
149
  * Paths are git pathspecs relative to the application root (`git -C saasRoot`).
133
150
  */
134
151
  const OBSERVED_IGNORED_PATH_SPECS = [
135
- // Accepted activation receipts: written on an operator/boot-time activation,
136
- // never inside a coding-run window.
152
+ // Workbench state. Nothing writes acceptance receipts here any more (they
153
+ // went with the digest machinery); the path stays observed so a coding run
154
+ // cannot plant files in it unseen.
137
155
  '.wildo-saas/state/application-creation-workbench',
138
156
  // Generated deployment material, including rendered environment files.
139
157
  '.wildo-saas/deploy',
@@ -141,10 +159,107 @@ const OBSERVED_IGNORED_PATH_SPECS = [
141
159
  '.env',
142
160
  '.env.*',
143
161
  ];
162
+ /**
163
+ * Application-relative roots owned by a COMPANION LANE that legitimately writes
164
+ * while a coding run is in flight, and that the ordinary tracked/untracked
165
+ * capture can therefore see.
166
+ *
167
+ * The sibling of {@link OBSERVED_IGNORED_PATH_SPECS}'s exclusions, for the case
168
+ * those cannot cover. That comment states the rule — "a writer that runs INSIDE
169
+ * the coding window must be excluded here" — and then discharges it by *not
170
+ * listing* the path, which only works while the writer's store is GITIGNORED.
171
+ * The research evidence store is not: it lives at
172
+ * `specifications/research-evidence/`, inside the application repository and
173
+ * deliberately committable, so `ls-files --others --exclude-standard` lists it
174
+ * like any other untracked file and no omission from an `--ignored` pathspec
175
+ * can hide it.
176
+ *
177
+ * Measured shape of the defect: the research dispatch takes no
178
+ * workspace-mutation lock (its own JSDoc: "No lock, no change set, no
179
+ * reconciliation — a run that cannot mutate has nothing to attribute"), and two
180
+ * live paths put it inside a coding window — an operator's
181
+ * `POST /api/companion/research`, and a composite's `RESEARCH_AGENT` children,
182
+ * which `runPlaybookChoreography` dispatches with `Promise.allSettled` up to
183
+ * `maximumLanesPerIteration` at a time. Its files then appear post-run at a path
184
+ * no coding task's `allowedPathPrefixes` contains (every policy in
185
+ * `resolveBuildPlanTaskCodingPolicy` is a `<layer>/src/modules/<module>/` or one
186
+ * named config file, and the store sits outside `specifications/src/`), so the
187
+ * scope assessment answered `MUTATION_SCOPE_VIOLATION` and failed a correct
188
+ * coding run for another lane's writes.
189
+ *
190
+ * WIDENING THE LOCK WAS REJECTED, and measured rather than assumed. The lock is
191
+ * taken with `retries: { retries: 0 }`, so a second acquisition is refused, not
192
+ * queued. Putting research under it would refuse two of every three lanes of a
193
+ * breadth-first research iteration — the exact fan-out the lane exists for — and
194
+ * would refuse every research child sharing an iteration with a dispatch child.
195
+ * The answer to "a lane that mutates nothing but its own store" is not a bigger
196
+ * lock; it is saying who owns the store.
197
+ *
198
+ * The list is deliberately EXACT — a root, not a parent. `specifications/`
199
+ * would swallow `specifications/src/`, which is a real coding-task target
200
+ * (`BuildPlanResourceStage.SPEC`), and an out-of-scope write there would stop
201
+ * being refused. Do not generalise an entry here to save a line.
202
+ *
203
+ * ## A WIDER population exists, and it deliberately does not belong here
204
+ *
205
+ * Measured 2026-09-09 on `examples/wonder-crm`, because "the research store is
206
+ * the only tracked in-window writer" is a claim about a population and had to
207
+ * be counted rather than assumed. It is not the only one:
208
+ * `.wildo-saas/generated/{brand,deliberations,expert-personas,compliance}` are
209
+ * NOT gitignored either (`git check-ignore` reports nothing for any of them;
210
+ * only `state/`, `dist/`, `tmp/`, `deploy/`, `templates/`, `docs/`, `logs/`,
211
+ * `cache/`, `companion-keys/`, `local_data/` and
212
+ * `generated/providers/*.generated.json` are), and they carry host writers —
213
+ * `structured-deliberation`, `logo-generation`/`brand-accept`,
214
+ * `expert-persona`, the technical-doc pilot — none of which takes the
215
+ * workspace-mutation lock. So a playbook lane writing a deliberation record
216
+ * beside a coding lane produces the same visible, unattributable entry.
217
+ *
218
+ * They are NOT listed here, and the reason is the difference between the two
219
+ * cases rather than an oversight. `.wildo-saas/` is in every build task's
220
+ * `ALWAYS_PROHIBITED_PREFIXES` ("nothing a build task does may touch the
221
+ * companion, its state, or the application's declared identity/config"), and
222
+ * `OBSERVED_IGNORED_PATH_SPECS` above keeps the workbench subtree observed on
223
+ * purpose "so a coding run cannot plant files in it unseen". Excluding those
224
+ * roots would therefore weaken a DELIBERATE prohibition, which is the exact
225
+ * over-exclusion this constant's boundary rule exists to prevent — the evidence
226
+ * store carries no prohibition, it is merely outside every task's allow-list.
227
+ *
228
+ * Whatever answers that case has to distinguish "the host wrote here" from "the
229
+ * agent wrote into a prohibited tree", which this predicate cannot: it reads a
230
+ * path and nothing else. That needs a writer-identified signal (the lane
231
+ * declaring its own writes for the window), not a bigger path list. Recorded
232
+ * here rather than fixed here so the next author meets the measurement at the
233
+ * seam instead of re-deriving it — and so nobody "completes" this list by
234
+ * adding `.wildo-saas/generated`.
235
+ */
236
+ const CONCURRENT_HOST_LANE_ROOTS = [
237
+ // Imported, never re-spelt: the research dispatch's location predicate and the
238
+ // store's own writer read the same constant, and a second copy here is how the
239
+ // exclusion comes to cover a directory the agent is no longer confined to.
240
+ RESEARCH_EVIDENCE_RELATIVE_ROOT,
241
+ ];
242
+ /**
243
+ * Is this application-relative path owned by a concurrent companion lane?
244
+ *
245
+ * Exported because it has TWO call sites and they answer different halves of one
246
+ * question: this service uses it to ATTRIBUTE the entry, and the dispatch's scope
247
+ * assessment uses it to drop a disappearance under the same root — a research
248
+ * agent may delete or rewrite a file it wrote in an earlier round, and a
249
+ * disappearance carries no attribution class to filter on. One predicate, so the
250
+ * two halves cannot drift.
251
+ *
252
+ * Boundary-matched like every other prefix comparison in this vertical:
253
+ * `specifications/research-evidence` must not admit
254
+ * `specifications/research-evidence-notes.md`.
255
+ */
256
+ export function isConcurrentHostLanePath(applicationRelativePath) {
257
+ const normalized = applicationRelativePath.replace(/\\/g, '/').replace(/^\.\//, '');
258
+ return CONCURRENT_HOST_LANE_ROOTS.some((root) => normalized === root || normalized.startsWith(`${root}/`));
259
+ }
144
260
  /** Combined stdout ceiling for one git invocation (diffs on a busy dogfood tree are large). */
145
261
  const GIT_MAX_BUFFER_BYTES = 128 * 1024 * 1024;
146
262
  const GIT_TIMEOUT_MS = 60_000;
147
- const LOCAL_GIT_REPOSITORY_IDENTITY_DIGEST_DOMAIN = 'wildo:local-git-repository-identity:v1';
148
263
  let GitChangeSetCompanionService = class GitChangeSetCompanionService {
149
264
  logger;
150
265
  errorBuilder;
@@ -196,45 +311,6 @@ let GitChangeSetCompanionService = class GitChangeSetCompanionService {
196
311
  files,
197
312
  };
198
313
  }
199
- /**
200
- * Resolve only the stable local repository alias and current Git head.
201
- *
202
- * Continuity startup must not call {@link captureWorktreeSnapshot}: that
203
- * coding-agent operation hashes every dirty/untracked file and captures a
204
- * full diff. This narrower internal observation uses read-only `rev-parse`
205
- * calls and performs no MCP/A2A round trip or Git mutation.
206
- */
207
- async captureLocalRepositoryIdentity() {
208
- const [headSha, repositoryRootRaw, gitCommonDirectoryRaw] = await Promise.all([
209
- this.resolveHeadSha(),
210
- this.resolveRepositoryRoot(),
211
- this.resolveGitCommonDirectory(),
212
- ]);
213
- const [repositoryRoot, gitCommonDirectory, applicationRoot] = await Promise.all([
214
- fs.realpath(repositoryRootRaw),
215
- fs.realpath(gitCommonDirectoryRaw),
216
- fs.realpath(this.companionContext.saasRoot),
217
- ]);
218
- const applicationRootRelativePath = relative(repositoryRoot, applicationRoot);
219
- if (!isAbsolute(repositoryRoot)
220
- || !isAbsolute(gitCommonDirectory)
221
- || applicationRootRelativePath === '..'
222
- || applicationRootRelativePath.startsWith(`..${sep}`)
223
- || isAbsolute(applicationRootRelativePath)) {
224
- throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
225
- customMessageReference: ErrorCustomMessageReference.INTERNAL,
226
- context: {
227
- message: 'Companion application root is not contained in the observed local Git repository.',
228
- },
229
- });
230
- }
231
- return {
232
- repositoryIdentityDigest: semanticSha256(LOCAL_GIT_REPOSITORY_IDENTITY_DIGEST_DOMAIN, gitCommonDirectory),
233
- headSha,
234
- repositoryRoot,
235
- applicationRootRelativePath: applicationRootRelativePath.split(sep).join('/'),
236
- };
237
- }
238
314
  /** True when the snapshot carries any tracked-dirty or untracked file. */
239
315
  isDirty(snapshot) {
240
316
  return Object.keys(snapshot.files).length > 0;
@@ -250,13 +326,25 @@ let GitChangeSetCompanionService = class GitChangeSetCompanionService {
250
326
  const entries = [];
251
327
  for (const [path, postState] of Object.entries(postRun.files)) {
252
328
  const baselineState = baseline.files[path];
329
+ /*
330
+ * Decided BEFORE the fingerprint classification, because the lane owning
331
+ * the path settles the attribution whatever the file did. A research
332
+ * round may create a file (`APPEARED_DURING_RUN` shape), rewrite one it
333
+ * wrote in an earlier round (`BASELINE_DIRTY_AMBIGUOUS` shape), or —
334
+ * once the store is committed — modify a tracked file (`RUN_EXCLUSIVE`
335
+ * shape, the one that reads most like the agent's own edit). All three
336
+ * are the same fact: another lane wrote here.
337
+ */
338
+ const ownedByConcurrentLane = isConcurrentHostLanePath(path);
253
339
  if (!baselineState) {
254
340
  entries.push({
255
341
  path,
256
342
  changeKind: postState.changeKind,
257
- attribution: postState.changeKind === ChangeSetFileChangeKind.UNTRACKED
258
- ? ChangeSetAttributionClass.APPEARED_DURING_RUN
259
- : ChangeSetAttributionClass.RUN_EXCLUSIVE,
343
+ attribution: ownedByConcurrentLane
344
+ ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE
345
+ : postState.changeKind === ChangeSetFileChangeKind.UNTRACKED
346
+ ? ChangeSetAttributionClass.APPEARED_DURING_RUN
347
+ : ChangeSetAttributionClass.RUN_EXCLUSIVE,
260
348
  dirtyAtBaseline: false,
261
349
  ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),
262
350
  ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),
@@ -273,7 +361,9 @@ let GitChangeSetCompanionService = class GitChangeSetCompanionService {
273
361
  entries.push({
274
362
  path,
275
363
  changeKind: postState.changeKind,
276
- attribution: ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,
364
+ attribution: ownedByConcurrentLane
365
+ ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE
366
+ : ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,
277
367
  dirtyAtBaseline: true,
278
368
  ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.fingerprint } : {}),
279
369
  ...(postState.sizeBytes !== undefined ? { sizeBytes: postState.sizeBytes } : {}),
@@ -311,6 +401,7 @@ let GitChangeSetCompanionService = class GitChangeSetCompanionService {
311
401
  appearedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.APPEARED_DURING_RUN).length,
312
402
  disappearedFromBaseline: disappearedFromBaseline.length,
313
403
  committedDuringRun: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.COMMITTED_DURING_RUN).length,
404
+ concurrentHostLane: entries.filter((entry) => entry.attribution === ChangeSetAttributionClass.CONCURRENT_HOST_LANE).length,
314
405
  };
315
406
  this.logDebug('Captured coding-agent change set', {
316
407
  baselineHeadSha: baseline.headSha,
@@ -336,21 +427,6 @@ let GitChangeSetCompanionService = class GitChangeSetCompanionService {
336
427
  const { stdout } = await this.execGit(['rev-parse', 'HEAD']);
337
428
  return stdout.trim();
338
429
  }
339
- async resolveRepositoryRoot() {
340
- const { stdout } = await this.execGit([
341
- 'rev-parse',
342
- '--show-toplevel',
343
- ]);
344
- return resolve(stdout.trim());
345
- }
346
- async resolveGitCommonDirectory() {
347
- const { stdout } = await this.execGit([
348
- 'rev-parse',
349
- '--path-format=absolute',
350
- '--git-common-dir',
351
- ]);
352
- return resolve(this.companionContext.saasRoot, stdout.trim());
353
- }
354
430
  /**
355
431
  * `--relative` is load-bearing, not cosmetic. Every other path this service
356
432
  * records is application-root-relative (`status --porcelain=v2` and
@@ -624,11 +700,4 @@ function changeKindFromXY(xy) {
624
700
  function sha256(content) {
625
701
  return createHash('sha256').update(content).digest('hex');
626
702
  }
627
- function semanticSha256(domain, value) {
628
- return `sha256:${createHash('sha256')
629
- .update(domain)
630
- .update('\0')
631
- .update(value)
632
- .digest('hex')}`;
633
- }
634
703
  //# sourceMappingURL=git-change-set.companion.service.js.map
@@ -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,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErE,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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AO,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;AAED,SAAS,cAAc,CAAC,MAAc,EAAE,KAAa;IACnD,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC;SAClC,MAAM,CAAC,MAAM,CAAC;SACd,MAAM,CAAC,IAAI,CAAC;SACZ,MAAM,CAAC,KAAK,CAAC;SACb,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACrB,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 } from 'node:child_process';\nimport { createHash } from 'node:crypto';\nimport { promisify } from 'node:util';\nimport { promises as fs } from 'node:fs';\nimport { isAbsolute, join, relative, resolve, sep } 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';\n\nconst execFileAsync = promisify(execFile);\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\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 the reason CHANGED on 2026-08-24 — read this before \"restoring\" them.\n *\n * Originally they 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 * Both of those writers are now GONE. The episode checkpoint store and the\n * companion security audit were deleted with the rest of the ledger layer, so\n * neither subtree has a producer: `.wildo-saas/state/audit/` holds only\n * orphaned events (newest 2026-08-22) and nothing reads them. They stay absent\n * because there is nothing there to observe — not because a host writer would\n * collide with the capture.\n *\n * The distinction is load-bearing for whoever adds the next host-owned store.\n * If a writer that runs INSIDE the coding window returns — a new checkpoint,\n * a new audit trail — it must be excluded here again, and its own integrity\n * becomes the owning store's job rather than this capture's. A same-UID agent\n * can always recompute a per-event self-digest, so such a store needs a hash\n * chain or an anchor the agent cannot reach, designed in from the start.\n *\n * These paths are outside any coding task's declared `allowedPathPrefixes`, so\n * making them visible is sufficient — the existing mutation-scope assessment\n * turns an observed write here into `MUTATION_SCOPE_VIOLATION` with no second\n * mechanism to keep in step.\n *\n * Paths are git pathspecs relative to the application root (`git -C saasRoot`).\n */\nconst OBSERVED_IGNORED_PATH_SPECS: readonly string[] = [\n // Accepted activation receipts: written on an operator/boot-time activation,\n // never inside a coding-run window.\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/** 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;\nconst LOCAL_GIT_REPOSITORY_IDENTITY_DIGEST_DOMAIN = 'wildo:local-git-repository-identity:v1';\n\n/**\n * Lightweight machine-local Git observation used by continuity bootstrap.\n *\n * The digest identifies one local Git common directory, so linked worktrees\n * share repository identity while an independently cloned repository does\n * not. It is an alias in a local workspace binding, never the canonical\n * application-subject identity and never portable application truth.\n */\nexport interface LocalGitRepositoryIdentityObservation {\n repositoryIdentityDigest: string;\n headSha: string;\n repositoryRoot: string;\n applicationRootRelativePath: string;\n}\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 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());\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 /**\n * Resolve only the stable local repository alias and current Git head.\n *\n * Continuity startup must not call {@link captureWorktreeSnapshot}: that\n * coding-agent operation hashes every dirty/untracked file and captures a\n * full diff. This narrower internal observation uses read-only `rev-parse`\n * calls and performs no MCP/A2A round trip or Git mutation.\n */\n public async captureLocalRepositoryIdentity():\n Promise<LocalGitRepositoryIdentityObservation> {\n const [headSha, repositoryRootRaw, gitCommonDirectoryRaw] =\n await Promise.all([\n this.resolveHeadSha(),\n this.resolveRepositoryRoot(),\n this.resolveGitCommonDirectory(),\n ]);\n const [repositoryRoot, gitCommonDirectory, applicationRoot] =\n await Promise.all([\n fs.realpath(repositoryRootRaw),\n fs.realpath(gitCommonDirectoryRaw),\n fs.realpath(this.companionContext.saasRoot),\n ]);\n const applicationRootRelativePath = relative(\n repositoryRoot,\n applicationRoot,\n );\n if (\n !isAbsolute(repositoryRoot)\n || !isAbsolute(gitCommonDirectory)\n || applicationRootRelativePath === '..'\n || applicationRootRelativePath.startsWith(`..${sep}`)\n || isAbsolute(applicationRootRelativePath)\n ) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.INTERNAL,\n context: {\n message:\n 'Companion application root is not contained in the observed local Git repository.',\n },\n });\n }\n\n return {\n repositoryIdentityDigest: semanticSha256(\n LOCAL_GIT_REPOSITORY_IDENTITY_DIGEST_DOMAIN,\n gitCommonDirectory,\n ),\n headSha,\n repositoryRoot,\n applicationRootRelativePath:\n applicationRootRelativePath.split(sep).join('/'),\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 if (!baselineState) {\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: 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: ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,\n dirtyAtBaseline: true,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.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` for the acceptance tier, which refuses to\n * promote an unattributable result by policy.\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 };\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 private async resolveRepositoryRoot(): Promise<string> {\n const { stdout } = await this.execGit([\n 'rev-parse',\n '--show-toplevel',\n ]);\n return resolve(stdout.trim());\n }\n\n private async resolveGitCommonDirectory(): Promise<string> {\n const { stdout } = await this.execGit([\n 'rev-parse',\n '--path-format=absolute',\n '--git-common-dir',\n ]);\n return resolve(this.companionContext.saasRoot, stdout.trim());\n }\n\n /**\n * `--relative` is load-bearing, not cosmetic. Every other path this service\n * records is application-root-relative (`status --porcelain=v2` and\n * `ls-files --others` both report relative to `-C saasRoot`), 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(): Promise<string> {\n const { stdout } = await this.execGit(['diff', '--relative', '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 `${baselineHeadSha}..${postRunHeadSha}`,\n ]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.length > 0).sort();\n }\n\n private async readUntrackedPaths(): Promise<string[]> {\n const { stdout } = await this.execGit(['ls-files', '--others', '--exclude-standard']);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.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 '--others',\n '--ignored',\n '--exclude-standard',\n '--',\n ...OBSERVED_IGNORED_PATH_SPECS,\n ]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.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 * Parse `git status --porcelain=v2` into tracked-dirty file states.\n * Untracked (`?`) and ignored (`!`) lines 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']);\n const states: GitWorktreeFileState[] = [];\n\n for (const line of stdout.split('\\n')) {\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, changeKind: changeKindFromXY(fields[1] ?? '') });\n } else if (recordType === '2') {\n // `2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <Xscore> <path>\\t<origPath>`\n const fields = line.split(' ');\n const pathPair = fields.slice(9).join(' ');\n const [path] = pathPair.split('\\t');\n if (!path) continue;\n states.push({ 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, changeKind: ChangeSetFileChangeKind.UNMERGED });\n }\n // '?' and '!' intentionally skipped (see JSDoc).\n }\n\n return states;\n }\n\n /**\n * Split one `git diff HEAD` text into per-file sections keyed by the\n * post-image path (the `b/` side of the `diff --git` header). Section\n * hashes are the per-file fingerprints of tracked-dirty files.\n */\n private splitDiffSectionsByPath(diffText: string): Map<string, string> {\n const sections = new Map<string, string>();\n if (!diffText) return sections;\n\n const parts = diffText.split(/^(?=diff --git )/m);\n for (const part of parts) {\n if (!part.startsWith('diff --git ')) continue;\n const headerLine = part.slice(0, part.indexOf('\\n'));\n const match = /^diff --git \"?a\\/.*?\"? \"?b\\/(.*?)\"?$/.exec(headerLine);\n if (!match?.[1]) continue;\n sections.set(match[1], part);\n }\n return sections;\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 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 * Are the working-tree bytes at this path IDENTICAL to committed content?\n *\n * The question Step 5 of `.claude/plans/git-is-the-accepted-state.md` turns on: once git is the accepted\n * 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 async isWorktreePathCommitted(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 return false;\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[]): 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 ['-C', this.companionContext.saasRoot, ...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\nfunction semanticSha256(domain: string, value: string): string {\n return `sha256:${createHash('sha256')\n .update(domain)\n .update('\\0')\n .update(value)\n .digest('hex')}`;\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,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAY,MAAM,WAAW,CAAC;AAE3C,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;AAEjF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GAKxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAEtF,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AA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AAC,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 } from 'node:child_process';\nimport { createHash } from 'node:crypto';\nimport { promisify } from 'node:util';\nimport { promises as fs } from 'node:fs';\nimport { join, 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/**\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\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. Three companion stores live under it (choreography checkpoints,\n * suspended runs and the playbook run-write register), and the first two are\n * written DURING a playbook run (`PlaybookRunCompanionService` passes\n * `choreographyCheckpoints.save` as the choreography's checkpoint callback, and\n * saves a suspended-run record on suspension). That is exactly the writer shape\n * this 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 existing mutation-scope assessment\n * turns an observed write here into `MUTATION_SCOPE_VIOLATION` with no second\n * mechanism to keep in step.\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` (\"nothing a build task does may touch the\n * companion, its state, or the application's declared identity/config\"), 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`.\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/** 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\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 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());\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 if (!baselineState) {\n entries.push({\n path,\n changeKind: postState.changeKind,\n attribution: 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: ownedByConcurrentLane\n ? ChangeSetAttributionClass.CONCURRENT_HOST_LANE\n : ChangeSetAttributionClass.BASELINE_DIRTY_AMBIGUOUS,\n dirtyAtBaseline: true,\n ...(postState.fingerprint !== undefined ? { postRunFingerprint: postState.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` for the acceptance tier, which refuses to\n * promote an unattributable result by policy.\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 };\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 (`status --porcelain=v2` and\n * `ls-files --others` both report relative to `-C saasRoot`), 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(): Promise<string> {\n const { stdout } = await this.execGit(['diff', '--relative', '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 `${baselineHeadSha}..${postRunHeadSha}`,\n ]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.length > 0).sort();\n }\n\n private async readUntrackedPaths(): Promise<string[]> {\n const { stdout } = await this.execGit(['ls-files', '--others', '--exclude-standard']);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.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 '--others',\n '--ignored',\n '--exclude-standard',\n '--',\n ...OBSERVED_IGNORED_PATH_SPECS,\n ]);\n return stdout.split('\\n').map((line) => line.trim()).filter((line) => line.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 * Parse `git status --porcelain=v2` into tracked-dirty file states.\n * Untracked (`?`) and ignored (`!`) lines 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']);\n const states: GitWorktreeFileState[] = [];\n\n for (const line of stdout.split('\\n')) {\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, changeKind: changeKindFromXY(fields[1] ?? '') });\n } else if (recordType === '2') {\n // `2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <Xscore> <path>\\t<origPath>`\n const fields = line.split(' ');\n const pathPair = fields.slice(9).join(' ');\n const [path] = pathPair.split('\\t');\n if (!path) continue;\n states.push({ 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, changeKind: ChangeSetFileChangeKind.UNMERGED });\n }\n // '?' and '!' intentionally skipped (see JSDoc).\n }\n\n return states;\n }\n\n /**\n * Split one `git diff HEAD` text into per-file sections keyed by the\n * post-image path (the `b/` side of the `diff --git` header). Section\n * hashes are the per-file fingerprints of tracked-dirty files.\n */\n private splitDiffSectionsByPath(diffText: string): Map<string, string> {\n const sections = new Map<string, string>();\n if (!diffText) return sections;\n\n const parts = diffText.split(/^(?=diff --git )/m);\n for (const part of parts) {\n if (!part.startsWith('diff --git ')) continue;\n const headerLine = part.slice(0, part.indexOf('\\n'));\n const match = /^diff --git \"?a\\/.*?\"? \"?b\\/(.*?)\"?$/.exec(headerLine);\n if (!match?.[1]) continue;\n sections.set(match[1], part);\n }\n return sections;\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 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 * Are the working-tree bytes at this path IDENTICAL to committed content?\n *\n * The question Step 5 of `.claude/plans/git-is-the-accepted-state.md` turns on: once git is the accepted\n * 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 async isWorktreePathCommitted(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 return false;\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[]): 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 ['-C', this.companionContext.saasRoot, ...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"]}