@specforge/canary-cli 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/tools/core/git-injection.d.ts +8 -0
  2. package/dist/tools/core/git-injection.d.ts.map +1 -1
  3. package/dist/tools/core/git-injection.js +5 -0
  4. package/dist/tools/core/git-injection.js.map +1 -1
  5. package/dist/tools/index.d.ts.map +1 -1
  6. package/dist/tools/index.js +20 -2
  7. package/dist/tools/index.js.map +1 -1
  8. package/node_modules/@specforge/session-types/CHANGELOG.md +56 -0
  9. package/node_modules/@specforge/session-types/README.md +18 -0
  10. package/node_modules/@specforge/session-types/dist/index.d.ts +47 -0
  11. package/node_modules/@specforge/session-types/dist/index.d.ts.map +1 -0
  12. package/node_modules/@specforge/session-types/dist/index.js +47 -0
  13. package/node_modules/@specforge/session-types/dist/index.js.map +1 -0
  14. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts +46 -0
  15. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts.map +1 -0
  16. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js +41 -0
  17. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js.map +1 -0
  18. package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts +9 -0
  19. package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts.map +1 -0
  20. package/node_modules/@specforge/session-types/dist/runtime/discovery.js +2 -0
  21. package/node_modules/@specforge/session-types/dist/runtime/discovery.js.map +1 -0
  22. package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts +51 -0
  23. package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts.map +1 -0
  24. package/node_modules/@specforge/session-types/dist/runtime/enums.js +162 -0
  25. package/node_modules/@specforge/session-types/dist/runtime/enums.js.map +1 -0
  26. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts +177 -0
  27. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts.map +1 -0
  28. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js +90 -0
  29. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js.map +1 -0
  30. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts +8 -0
  31. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts.map +1 -0
  32. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js +2 -0
  33. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js.map +1 -0
  34. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts +433 -0
  35. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts.map +1 -0
  36. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js +128 -0
  37. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js.map +1 -0
  38. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts +8 -0
  39. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts.map +1 -0
  40. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js +2 -0
  41. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js.map +1 -0
  42. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts +315 -0
  43. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts.map +1 -0
  44. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js +2 -0
  45. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js.map +1 -0
  46. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts +128 -0
  47. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts.map +1 -0
  48. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js +30 -0
  49. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js.map +1 -0
  50. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts +4 -0
  51. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts.map +1 -0
  52. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js +2 -0
  53. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js.map +1 -0
  54. package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts +82 -0
  55. package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts.map +1 -0
  56. package/node_modules/@specforge/session-types/dist/runtime/planning-config.js +61 -0
  57. package/node_modules/@specforge/session-types/dist/runtime/planning-config.js.map +1 -0
  58. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts +34 -0
  59. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts.map +1 -0
  60. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js +14 -0
  61. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js.map +1 -0
  62. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts +6 -0
  63. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts.map +1 -0
  64. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js +32 -0
  65. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js.map +1 -0
  66. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts +34 -0
  67. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts.map +1 -0
  68. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js +22 -0
  69. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js.map +1 -0
  70. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts +73 -0
  71. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts.map +1 -0
  72. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js +56 -0
  73. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js.map +1 -0
  74. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts +239 -0
  75. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts.map +1 -0
  76. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js +88 -0
  77. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js.map +1 -0
  78. package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts +574 -0
  79. package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts.map +1 -0
  80. package/node_modules/@specforge/session-types/dist/runtime/planning-session.js +40 -0
  81. package/node_modules/@specforge/session-types/dist/runtime/planning-session.js.map +1 -0
  82. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts +221 -0
  83. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts.map +1 -0
  84. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js +41 -0
  85. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js.map +1 -0
  86. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts +4 -0
  87. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts.map +1 -0
  88. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js +2 -0
  89. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js.map +1 -0
  90. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts +9 -0
  91. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts.map +1 -0
  92. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js +2 -0
  93. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js.map +1 -0
  94. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts +4 -0
  95. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts.map +1 -0
  96. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js +2 -0
  97. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js.map +1 -0
  98. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts +4 -0
  99. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts.map +1 -0
  100. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js +2 -0
  101. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js.map +1 -0
  102. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts +4 -0
  103. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts.map +1 -0
  104. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js +2 -0
  105. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js.map +1 -0
  106. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts +4 -0
  107. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts.map +1 -0
  108. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js +2 -0
  109. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js.map +1 -0
  110. package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts +4 -0
  111. package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts.map +1 -0
  112. package/node_modules/@specforge/session-types/dist/runtime/work-session.js +2 -0
  113. package/node_modules/@specforge/session-types/dist/runtime/work-session.js.map +1 -0
  114. package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts +43 -0
  115. package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts.map +1 -0
  116. package/node_modules/@specforge/session-types/dist/runtime/working-context.js +2 -0
  117. package/node_modules/@specforge/session-types/dist/runtime/working-context.js.map +1 -0
  118. package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts +146 -0
  119. package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts.map +1 -0
  120. package/node_modules/@specforge/session-types/dist/runtime/write-plan.js +2 -0
  121. package/node_modules/@specforge/session-types/dist/runtime/write-plan.js.map +1 -0
  122. package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts +76 -0
  123. package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts.map +1 -0
  124. package/node_modules/@specforge/session-types/dist/schema/discovery.js +42 -0
  125. package/node_modules/@specforge/session-types/dist/schema/discovery.js.map +1 -0
  126. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts +48 -0
  127. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts.map +1 -0
  128. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js +28 -0
  129. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js.map +1 -0
  130. package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts +37 -0
  131. package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts.map +1 -0
  132. package/node_modules/@specforge/session-types/dist/schema/implementation-session.js +24 -0
  133. package/node_modules/@specforge/session-types/dist/schema/implementation-session.js.map +1 -0
  134. package/node_modules/@specforge/session-types/dist/schema/index.d.ts +12 -0
  135. package/node_modules/@specforge/session-types/dist/schema/index.d.ts.map +1 -0
  136. package/node_modules/@specforge/session-types/dist/schema/index.js +12 -0
  137. package/node_modules/@specforge/session-types/dist/schema/index.js.map +1 -0
  138. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts +74 -0
  139. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts.map +1 -0
  140. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js +31 -0
  141. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js.map +1 -0
  142. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts +27 -0
  143. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts.map +1 -0
  144. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js +11 -0
  145. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js.map +1 -0
  146. package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts +91 -0
  147. package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts.map +1 -0
  148. package/node_modules/@specforge/session-types/dist/schema/work-session-action.js +71 -0
  149. package/node_modules/@specforge/session-types/dist/schema/work-session-action.js.map +1 -0
  150. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts +42 -0
  151. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts.map +1 -0
  152. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js +25 -0
  153. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js.map +1 -0
  154. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts +27 -0
  155. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts.map +1 -0
  156. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js +11 -0
  157. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js.map +1 -0
  158. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts +42 -0
  159. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts.map +1 -0
  160. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js +28 -0
  161. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js.map +1 -0
  162. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts +72 -0
  163. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts.map +1 -0
  164. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js +32 -0
  165. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js.map +1 -0
  166. package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts +174 -0
  167. package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts.map +1 -0
  168. package/node_modules/@specforge/session-types/dist/schema/work-session.js +63 -0
  169. package/node_modules/@specforge/session-types/dist/schema/work-session.js.map +1 -0
  170. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts +17 -0
  171. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts.map +1 -0
  172. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js +2 -0
  173. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js.map +1 -0
  174. package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts +31 -0
  175. package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts.map +1 -0
  176. package/node_modules/@specforge/session-types/dist/stores/discovery-store.js +2 -0
  177. package/node_modules/@specforge/session-types/dist/stores/discovery-store.js.map +1 -0
  178. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts +19 -0
  179. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts.map +1 -0
  180. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js +2 -0
  181. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js.map +1 -0
  182. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts +16 -0
  183. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts.map +1 -0
  184. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js +2 -0
  185. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js.map +1 -0
  186. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts +28 -0
  187. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts.map +1 -0
  188. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js +2 -0
  189. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js.map +1 -0
  190. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts +12 -0
  191. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts.map +1 -0
  192. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js +2 -0
  193. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js.map +1 -0
  194. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts +10 -0
  195. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts.map +1 -0
  196. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js +2 -0
  197. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js.map +1 -0
  198. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts +13 -0
  199. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts.map +1 -0
  200. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js +2 -0
  201. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js.map +1 -0
  202. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts +10 -0
  203. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts.map +1 -0
  204. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js +2 -0
  205. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js.map +1 -0
  206. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts +20 -0
  207. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts.map +1 -0
  208. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js +2 -0
  209. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js.map +1 -0
  210. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts +15 -0
  211. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts.map +1 -0
  212. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js +2 -0
  213. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js.map +1 -0
  214. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts +29 -0
  215. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts.map +1 -0
  216. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js +2 -0
  217. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js.map +1 -0
  218. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts +9 -0
  219. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts.map +1 -0
  220. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js +2 -0
  221. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js.map +1 -0
  222. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts +9 -0
  223. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts.map +1 -0
  224. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js +2 -0
  225. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js.map +1 -0
  226. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts +10 -0
  227. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts.map +1 -0
  228. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js +2 -0
  229. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js.map +1 -0
  230. package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts +14 -0
  231. package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts.map +1 -0
  232. package/node_modules/@specforge/session-types/dist/stores/work-session-store.js +2 -0
  233. package/node_modules/@specforge/session-types/dist/stores/work-session-store.js.map +1 -0
  234. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts +8 -0
  235. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts.map +1 -0
  236. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js +2 -0
  237. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js.map +1 -0
  238. package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts +27 -0
  239. package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts.map +1 -0
  240. package/node_modules/@specforge/session-types/dist/stores/working-context-store.js +2 -0
  241. package/node_modules/@specforge/session-types/dist/stores/working-context-store.js.map +1 -0
  242. package/node_modules/@specforge/session-types/package.json +43 -0
  243. package/package.json +6 -5
@@ -19,6 +19,14 @@ export interface WorktreeGitEvidence {
19
19
  * agent is not inside a git worktree, so SWS still records the WorkSession.
20
20
  */
21
21
  export declare function readWorktreeGitEvidence(run?: GitRunner): WorktreeGitEvidence;
22
+ /**
23
+ * The worktree HEAD commit hash (`git rev-parse HEAD`), or `null` when not inside a
24
+ * git worktree or the repo has no commit yet. The MCP-local reads this on
25
+ * `complete_work_session` and binds it as `WorkSession.commitSha` — the per-session
26
+ * commit proof the CWS git-evidence gate requires to finalize (M23.2). The deployed
27
+ * Lambda has no worktree, so only this CLI can observe it.
28
+ */
29
+ export declare function readHeadCommitSha(run?: GitRunner): string | null;
22
30
  /** One injected file-change action (a subset of the AWS `record_file_change` payload). */
23
31
  export interface LocalFileChangeAction {
24
32
  action: 'record_file_change';
@@ -1 +1 @@
1
- {"version":3,"file":"git-injection.d.ts","sourceRoot":"","sources":["../../../src/tools/core/git-injection.ts"],"names":[],"mappings":"AA2BA,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,IAAI,CAAC;AAE1D,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,SAU9B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,sFAAsF;IACtF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,yFAAyF;IACzF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,SAA4B,GAAG,mBAAmB,CAc9F;AAED,0FAA0F;AAC1F,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,oBAAoB,CA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pC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC/C,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACjD,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,UAAU,SAAS;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,GAAG,EAAE,SAAS,GACb,qBAAqB,EAAE,CA4BzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,GAAE,SAA4B,GAAG,qBAAqB,EAAE,CAE/G"}
@@ -24,6 +24,10 @@ function readWorktreeGitEvidence(run = defaultGitRunner) {
24
24
  branch: branch === null || branch === "" ? null : branch
25
25
  };
26
26
  }
27
+ function readHeadCommitSha(run = defaultGitRunner) {
28
+ const sha = run(["rev-parse", "HEAD"]);
29
+ return sha === null || sha === "" ? null : sha;
30
+ }
27
31
  function deriveLocalFileChanges(statusPorcelain, ctx) {
28
32
  if (!statusPorcelain) return [];
29
33
  const actions = [];
@@ -68,6 +72,7 @@ function classifyPorcelain(xy) {
68
72
  export {
69
73
  defaultGitRunner,
70
74
  deriveLocalFileChanges,
75
+ readHeadCommitSha,
71
76
  readLocalFileChanges,
72
77
  readWorktreeGitEvidence
73
78
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/tools/core/git-injection.ts"],"sourcesContent":["/**\n * MCP-local git-evidence injection (M23.2).\n *\n * The work lifecycle's SWS/AWS verbs need worktree git evidence that only the\n * MCP-LOCAL (this CLI, running on the agent's machine — the deployed Lambda has\n * NO worktree) can observe. Per `docs/architecture/work-lifecycle-flow.md` §0 +\n * [[project_coherence_score]]:\n *\n * - **SWS** (`start_work_session`): runs `git status` for the clean-workspace\n * precondition (`gitClean`) and reports the worktree provenance —\n * `worktreePath` via `git rev-parse --show-toplevel` + `branch` via\n * `git rev-parse --abbrev-ref HEAD` — so SWS persists\n * `WorkSession.worktreePath`/`branch` (M16.2). When the agent is NOT inside a\n * git worktree (\"caso esteja em uma\") the provenance is `null` (SWS still\n * records the WorkSession) and `gitClean` defaults to `true` (a non-git caller\n * is never \"dirty\" — it must not be blocked by the precondition).\n * - **AWS** (`action_work_session`, `validateFiles: 'local'`): runs\n * `git status --porcelain` and injects one `record_file_change` action per\n * created/modified/deleted file (the agent only reports the `referenced`\n * files git cannot see).\n *\n * The git commands run through an injectable `GitRunner` (defaults to a real,\n * non-throwing `git` spawn) so the layer is unit-testable without a live repo and\n * never throws inside a tool handler.\n */\nimport { execFileSync } from 'node:child_process';\n\n/** Runs a `git` sub-command; returns trimmed stdout, or `null` on any failure. */\nexport type GitRunner = (args: string[]) => string | null;\n\n/** Default runner: spawn `git`, return trimmed stdout, `null` on any failure. */\nexport const defaultGitRunner: GitRunner = (args) => {\n try {\n const out = execFileSync('git', args, {\n encoding: 'utf8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n return out.trim();\n } catch {\n return null;\n }\n};\n\nexport interface WorktreeGitEvidence {\n /**\n * `true` when the worktree has no uncommitted changes — OR when the caller is\n * not inside a git repo (a non-git caller is never \"dirty\", so SWS still runs).\n */\n gitClean: boolean;\n /** Worktree root (`git rev-parse --show-toplevel`); `null` when not in a worktree. */\n worktreePath: string | null;\n /** Current branch (`git rev-parse --abbrev-ref HEAD`); `null` when not in a worktree. */\n branch: string | null;\n}\n\n/**\n * SWS git evidence — the clean-status precondition input + the worktree\n * provenance (M23.2). Emits `null` provenance (and `gitClean: true`) when the\n * agent is not inside a git worktree, so SWS still records the WorkSession.\n */\nexport function readWorktreeGitEvidence(run: GitRunner = defaultGitRunner): WorktreeGitEvidence {\n const worktreePath = run(['rev-parse', '--show-toplevel']);\n if (worktreePath === null || worktreePath === '') {\n // Not inside a git worktree — SWS still records the WorkSession.\n return { gitClean: true, worktreePath: null, branch: null };\n }\n const branch = run(['rev-parse', '--abbrev-ref', 'HEAD']);\n const status = run(['status', '--porcelain']);\n return {\n // A failed `git status` (null) must not block SWS → treat as clean.\n gitClean: status === null ? true : status.trim() === '',\n worktreePath,\n branch: branch === null || branch === '' ? null : branch,\n };\n}\n\n/** One injected file-change action (a subset of the AWS `record_file_change` payload). */\nexport interface LocalFileChangeAction {\n action: 'record_file_change';\n workSessionId: string;\n ticketId: string;\n expectedPath: string;\n expectedAction: 'create' | 'modify' | 'delete';\n actualAction: 'created' | 'modified' | 'deleted';\n status: 'matched';\n}\n\ninterface DeriveCtx {\n workSessionId: string;\n ticketId: string;\n}\n\n/**\n * Parse `git status --porcelain` into the `record_file_change` set the MCP-local\n * injects in `validateFiles: 'local'` mode — one action per created/modified/\n * deleted path (the agent reports the `referenced` files itself). A rename (`R`)\n * surfaces as a create of the new path.\n */\nexport function deriveLocalFileChanges(\n statusPorcelain: string | null,\n ctx: DeriveCtx,\n): LocalFileChangeAction[] {\n if (!statusPorcelain) return [];\n const actions: LocalFileChangeAction[] = [];\n for (const raw of statusPorcelain.split('\\n')) {\n const line = raw.replace(/\\r$/, '');\n if (line.trim() === '') continue;\n // porcelain v1: `XY<space>path` — XY is the 2-char status, path starts at col 3.\n const xy = line.slice(0, 2);\n let path = line.slice(3).trim();\n // Rename/copy renders as `old -> new`; record the new path.\n const arrow = path.indexOf(' -> ');\n if (arrow >= 0) path = path.slice(arrow + 4).trim();\n // git quotes paths with special chars.\n if (path.startsWith('\"') && path.endsWith('\"')) path = path.slice(1, -1);\n if (path === '') continue;\n const kind = classifyPorcelain(xy);\n if (!kind) continue;\n actions.push({\n action: 'record_file_change',\n workSessionId: ctx.workSessionId,\n ticketId: ctx.ticketId,\n expectedPath: path,\n expectedAction: kind.expected,\n actualAction: kind.actual,\n status: 'matched',\n });\n }\n return actions;\n}\n\n/**\n * Read the worktree's changed-file set (`git status --porcelain`) and map it to\n * the `record_file_change` actions the MCP-local injects (AWS `validateFiles:\n * 'local'`). Empty when not inside a git worktree.\n */\nexport function readLocalFileChanges(ctx: DeriveCtx, run: GitRunner = defaultGitRunner): LocalFileChangeAction[] {\n return deriveLocalFileChanges(run(['status', '--porcelain']), ctx);\n}\n\nfunction classifyPorcelain(\n xy: string,\n): { expected: 'create' | 'modify' | 'delete'; actual: 'created' | 'modified' | 'deleted' } | null {\n const s = xy.trim();\n if (s === '') return null;\n // Untracked / added / renamed / copied → a new (created) file.\n if (s === '??' || s.includes('A') || s.includes('R') || s.includes('C')) {\n return { expected: 'create', actual: 'created' };\n }\n if (s.includes('D')) return { expected: 'delete', actual: 'deleted' };\n if (s.includes('M') || s.includes('T') || s.includes('U')) {\n return { expected: 'modify', actual: 'modified' };\n }\n return null;\n}\n"],"mappings":"AAyBA,SAAS,oBAAoB;AAMtB,MAAM,mBAA8B,CAAC,SAAS;AACnD,MAAI;AACF,UAAM,MAAM,aAAa,OAAO,MAAM;AAAA,MACpC,UAAU;AAAA,MACV,OAAO,CAAC,UAAU,QAAQ,QAAQ;AAAA,IACpC,CAAC;AACD,WAAO,IAAI,KAAK;AAAA,EAClB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAmBO,SAAS,wBAAwB,MAAiB,kBAAuC;AAC9F,QAAM,eAAe,IAAI,CAAC,aAAa,iBAAiB,CAAC;AACzD,MAAI,iBAAiB,QAAQ,iBAAiB,IAAI;AAEhD,WAAO,EAAE,UAAU,MAAM,cAAc,MAAM,QAAQ,KAAK;AAAA,EAC5D;AACA,QAAM,SAAS,IAAI,CAAC,aAAa,gBAAgB,MAAM,CAAC;AACxD,QAAM,SAAS,IAAI,CAAC,UAAU,aAAa,CAAC;AAC5C,SAAO;AAAA;AAAA,IAEL,UAAU,WAAW,OAAO,OAAO,OAAO,KAAK,MAAM;AAAA,IACrD;AA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E,SAAS,GAAG,EAAG,QAAO,EAAE,UAAU,UAAU,QAAQ,UAAU;AACpE,MAAI,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,GAAG;AACzD,WAAO,EAAE,UAAU,UAAU,QAAQ,WAAW;AAAA,EAClD;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../src/tools/core/git-injection.ts"],"sourcesContent":["/**\n * MCP-local git-evidence injection (M23.2).\n *\n * The work lifecycle's SWS/AWS verbs need worktree git evidence that only the\n * MCP-LOCAL (this CLI, running on the agent's machine — the deployed Lambda has\n * NO worktree) can observe. Per `docs/architecture/work-lifecycle-flow.md` §0 +\n * [[project_coherence_score]]:\n *\n * - **SWS** (`start_work_session`): runs `git status` for the clean-workspace\n * precondition (`gitClean`) and reports the worktree provenance —\n * `worktreePath` via `git rev-parse --show-toplevel` + `branch` via\n * `git rev-parse --abbrev-ref HEAD` — so SWS persists\n * `WorkSession.worktreePath`/`branch` (M16.2). When the agent is NOT inside a\n * git worktree (\"caso esteja em uma\") the provenance is `null` (SWS still\n * records the WorkSession) and `gitClean` defaults to `true` (a non-git caller\n * is never \"dirty\" — it must not be blocked by the precondition).\n * - **AWS** (`action_work_session`, `validateFiles: 'local'`): runs\n * `git status --porcelain` and injects one `record_file_change` action per\n * created/modified/deleted file (the agent only reports the `referenced`\n * files git cannot see).\n *\n * The git commands run through an injectable `GitRunner` (defaults to a real,\n * non-throwing `git` spawn) so the layer is unit-testable without a live repo and\n * never throws inside a tool handler.\n */\nimport { execFileSync } from 'node:child_process';\n\n/** Runs a `git` sub-command; returns trimmed stdout, or `null` on any failure. */\nexport type GitRunner = (args: string[]) => string | null;\n\n/** Default runner: spawn `git`, return trimmed stdout, `null` on any failure. */\nexport const defaultGitRunner: GitRunner = (args) => {\n try {\n const out = execFileSync('git', args, {\n encoding: 'utf8',\n stdio: ['ignore', 'pipe', 'ignore'],\n });\n return out.trim();\n } catch {\n return null;\n }\n};\n\nexport interface WorktreeGitEvidence {\n /**\n * `true` when the worktree has no uncommitted changes — OR when the caller is\n * not inside a git repo (a non-git caller is never \"dirty\", so SWS still runs).\n */\n gitClean: boolean;\n /** Worktree root (`git rev-parse --show-toplevel`); `null` when not in a worktree. */\n worktreePath: string | null;\n /** Current branch (`git rev-parse --abbrev-ref HEAD`); `null` when not in a worktree. */\n branch: string | null;\n}\n\n/**\n * SWS git evidence — the clean-status precondition input + the worktree\n * provenance (M23.2). Emits `null` provenance (and `gitClean: true`) when the\n * agent is not inside a git worktree, so SWS still records the WorkSession.\n */\nexport function readWorktreeGitEvidence(run: GitRunner = defaultGitRunner): WorktreeGitEvidence {\n const worktreePath = run(['rev-parse', '--show-toplevel']);\n if (worktreePath === null || worktreePath === '') {\n // Not inside a git worktree — SWS still records the WorkSession.\n return { gitClean: true, worktreePath: null, branch: null };\n }\n const branch = run(['rev-parse', '--abbrev-ref', 'HEAD']);\n const status = run(['status', '--porcelain']);\n return {\n // A failed `git status` (null) must not block SWS → treat as clean.\n gitClean: status === null ? true : status.trim() === '',\n worktreePath,\n branch: branch === null || branch === '' ? null : branch,\n };\n}\n\n/**\n * The worktree HEAD commit hash (`git rev-parse HEAD`), or `null` when not inside a\n * git worktree or the repo has no commit yet. The MCP-local reads this on\n * `complete_work_session` and binds it as `WorkSession.commitSha` — the per-session\n * commit proof the CWS git-evidence gate requires to finalize (M23.2). The deployed\n * Lambda has no worktree, so only this CLI can observe it.\n */\nexport function readHeadCommitSha(run: GitRunner = defaultGitRunner): string | null {\n const sha = run(['rev-parse', 'HEAD']);\n return sha === null || sha === '' ? null : sha;\n}\n\n/** One injected file-change action (a subset of the AWS `record_file_change` payload). */\nexport interface LocalFileChangeAction {\n action: 'record_file_change';\n workSessionId: string;\n ticketId: string;\n expectedPath: string;\n expectedAction: 'create' | 'modify' | 'delete';\n actualAction: 'created' | 'modified' | 'deleted';\n status: 'matched';\n}\n\ninterface DeriveCtx {\n workSessionId: string;\n ticketId: string;\n}\n\n/**\n * Parse `git status --porcelain` into the `record_file_change` set the MCP-local\n * injects in `validateFiles: 'local'` mode — one action per created/modified/\n * deleted path (the agent reports the `referenced` files itself). A rename (`R`)\n * surfaces as a create of the new path.\n */\nexport function deriveLocalFileChanges(\n statusPorcelain: string | null,\n ctx: DeriveCtx,\n): LocalFileChangeAction[] {\n if (!statusPorcelain) return [];\n const actions: LocalFileChangeAction[] = [];\n for (const raw of statusPorcelain.split('\\n')) {\n const line = raw.replace(/\\r$/, '');\n if (line.trim() === '') continue;\n // porcelain v1: `XY<space>path` — XY is the 2-char status, path starts at col 3.\n const xy = line.slice(0, 2);\n let path = line.slice(3).trim();\n // Rename/copy renders as `old -> new`; record the new path.\n const arrow = path.indexOf(' -> ');\n if (arrow >= 0) path = path.slice(arrow + 4).trim();\n // git quotes paths with special chars.\n if (path.startsWith('\"') && path.endsWith('\"')) path = path.slice(1, -1);\n if (path === '') continue;\n const kind = classifyPorcelain(xy);\n if (!kind) continue;\n actions.push({\n action: 'record_file_change',\n workSessionId: ctx.workSessionId,\n ticketId: ctx.ticketId,\n expectedPath: path,\n expectedAction: kind.expected,\n actualAction: kind.actual,\n status: 'matched',\n });\n }\n return actions;\n}\n\n/**\n * Read the worktree's changed-file set (`git status --porcelain`) and map it to\n * the `record_file_change` actions the MCP-local injects (AWS `validateFiles:\n * 'local'`). Empty when not inside a git worktree.\n */\nexport function readLocalFileChanges(ctx: DeriveCtx, run: GitRunner = defaultGitRunner): LocalFileChangeAction[] {\n return deriveLocalFileChanges(run(['status', '--porcelain']), ctx);\n}\n\nfunction classifyPorcelain(\n xy: string,\n): { expected: 'create' | 'modify' | 'delete'; actual: 'created' | 'modified' | 'deleted' } | null {\n const s = xy.trim();\n if (s === '') return null;\n // Untracked / added / renamed / copied → a new (created) file.\n if (s === '??' || s.includes('A') || s.includes('R') || s.includes('C')) {\n return { expected: 'create', actual: 'created' };\n }\n if (s.includes('D')) return { expected: 'delete', actual: 'deleted' };\n if (s.includes('M') || s.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B,CAAC,CAOrC;AAGD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { appendFileSync } from "node:fs";
1
2
  import {
2
3
  ValidationError,
3
4
  ApiError,
@@ -7,7 +8,7 @@ import {
7
8
  } from "../validation/index.js";
8
9
  import { injectContext, injectContextRequired } from "./core/context-helper.js";
9
10
  import { probeExistingFiles } from "./core/file-existence-injection.js";
10
- import { readWorktreeGitEvidence } from "./core/git-injection.js";
11
+ import { readWorktreeGitEvidence, readHeadCommitSha } from "./core/git-injection.js";
11
12
  import { tryLoadProjectConfig, saveProjectConfig } from "../cli/config/index.js";
12
13
  import {
13
14
  appendPlanningSessionRegistry,
@@ -1194,7 +1195,22 @@ async function withRetry(fn, toolName, debug) {
1194
1195
  }
1195
1196
  function createToolHandlers(apiClient) {
1196
1197
  const callLocal = async (op, args) => {
1198
+ const debug = process.env.SPECFORGE_DEBUG === "true";
1199
+ const debugFile = process.env.SPECFORGE_DEBUG_FILE;
1200
+ const trace = (line) => {
1201
+ if (!debug) return;
1202
+ if (debugFile) {
1203
+ try {
1204
+ appendFileSync(debugFile, line + "\n");
1205
+ return;
1206
+ } catch {
1207
+ }
1208
+ }
1209
+ process.stderr.write(line + "\n");
1210
+ };
1211
+ trace(`[cli:wire \u2192] ${op} ${JSON.stringify(args)}`);
1197
1212
  const body = await apiClient.getTransport().execute(op, args);
1213
+ trace(`[cli:wire \u2190] ${op} ${JSON.stringify(body).slice(0, 800)}`);
1198
1214
  if (body && typeof body === "object") {
1199
1215
  if (body.kind === "standard_error") {
1200
1216
  const guidance = body.guidance;
@@ -1354,6 +1370,7 @@ function createToolHandlers(apiClient) {
1354
1370
  },
1355
1371
  complete_work_session: async (_client, args) => {
1356
1372
  validateRequired(args, "ticketId", "summary");
1373
+ const commitSha = readHeadCommitSha();
1357
1374
  return await callLocal("complete_work_session", {
1358
1375
  ticketId: args.ticketId,
1359
1376
  summary: args.summary,
@@ -1361,7 +1378,8 @@ function createToolHandlers(apiClient) {
1361
1378
  filesCreated: args.filesCreated,
1362
1379
  filesDeleted: args.filesDeleted,
1363
1380
  actualHours: args.actualHours,
1364
- validation: args.validation
1381
+ validation: args.validation,
1382
+ ...commitSha !== null && { commitSha }
1365
1383
  });
1366
1384
  },
1367
1385
  start_review_session: async (_client, args) => {