sdd-agent-platform 0.4.0 → 0.4.2

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 (801) hide show
  1. package/README.md +36 -39
  2. package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +72 -71
  3. package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
  4. package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +64 -9
  5. package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
  6. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +0 -1
  7. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
  8. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +26 -17
  9. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
  10. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +3 -0
  11. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +13 -9
  12. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
  13. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
  14. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
  15. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
  16. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -4
  17. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +16 -20
  18. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
  19. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
  20. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +1 -7
  21. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
  22. package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +26 -8
  23. package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
  24. package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
  25. package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
  26. package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
  27. package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +4 -1
  28. package/node_modules/@sdd-agent-platform/core/dist/contracts.js +3 -0
  29. package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
  30. package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +3 -0
  31. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
  32. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
  33. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
  34. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +1 -1
  35. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
  36. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +8 -8
  37. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
  38. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +0 -1
  39. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
  40. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +7 -7
  41. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
  42. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +0 -24
  43. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
  44. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +1 -1
  45. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
  46. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +277 -3
  47. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
  48. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
  49. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +61 -0
  50. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
  51. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -1
  52. package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
  53. package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -1
  54. package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +4 -4
  55. package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
  56. package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
  57. package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
  58. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +5 -4
  59. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
  60. package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +16 -7
  61. package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
  62. package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.d.ts +112 -0
  63. package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
  64. package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
  65. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
  66. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
  67. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
  68. package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
  69. package/node_modules/@sdd-agent-platform/core/dist/instructions.js +59 -66
  70. package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
  71. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
  72. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
  73. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +3 -0
  74. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +55 -19
  75. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
  76. package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
  77. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +12 -2
  78. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
  79. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
  80. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +20 -2
  81. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +218 -18
  82. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
  83. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +17 -17
  84. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
  85. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +10 -0
  86. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +32 -2
  87. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
  88. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +2 -17
  89. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
  90. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -1
  91. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
  92. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +9 -9
  93. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
  94. package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +4 -4
  95. package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -1
  96. package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +2 -2
  97. package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
  98. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +3 -3
  99. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
  100. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
  101. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
  102. package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
  103. package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -1
  104. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +12 -12
  105. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
  106. package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
  107. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
  108. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
  109. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +4 -7
  110. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
  111. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +2 -2
  112. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +19 -17
  113. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
  114. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +28 -13
  115. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
  116. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +61 -1
  117. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
  118. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +192 -1
  119. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
  120. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +73 -17
  121. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
  122. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
  123. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
  124. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
  125. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +11 -4
  126. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
  127. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
  128. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
  129. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
  130. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
  131. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
  132. package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
  133. package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
  134. package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
  135. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
  136. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +168 -18
  137. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
  138. package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +2 -2
  139. package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
  140. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -3
  141. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +22 -54
  142. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
  143. package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +2 -2
  144. package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
  145. package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +53 -9
  146. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
  147. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
  148. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
  149. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +51 -34
  150. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
  151. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +65 -0
  152. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +169 -0
  153. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
  154. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
  155. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
  156. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
  157. package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +2 -0
  158. package/node_modules/@sdd-agent-platform/core/dist/run-state.js +2 -0
  159. package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
  160. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +0 -3
  161. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
  162. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +5 -44
  163. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
  164. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
  165. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +20 -0
  166. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +109 -14
  167. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
  168. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
  169. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
  170. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
  171. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +1 -1
  172. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
  173. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +6 -0
  174. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +276 -0
  175. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
  176. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
  177. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +15 -4
  178. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
  179. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +21 -0
  180. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +139 -38
  181. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
  182. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
  183. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
  184. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
  185. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
  186. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
  187. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
  188. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
  189. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
  190. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
  191. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
  192. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
  193. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +105 -1
  194. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +343 -8
  195. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
  196. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +348 -3
  197. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +1017 -8
  198. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
  199. package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
  200. package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
  201. package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
  202. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +21 -0
  203. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
  204. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
  205. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +19 -20
  206. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
  207. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
  208. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
  209. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
  210. package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
  211. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -1
  212. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +44 -37
  213. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
  214. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +0 -2
  215. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +19 -49
  216. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
  217. package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
  218. package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
  219. package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
  220. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
  221. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +213 -111
  222. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
  223. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +28 -3
  224. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +546 -125
  225. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
  226. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
  227. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
  228. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
  229. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +76 -0
  230. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +450 -0
  231. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
  232. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +3 -1
  233. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +105 -30
  234. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
  235. package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +2 -0
  236. package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
  237. package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
  238. package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
  239. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
  240. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +395 -0
  241. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
  242. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
  243. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +164 -0
  244. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
  245. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
  246. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +182 -0
  247. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
  248. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +88 -0
  249. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
  250. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
  251. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
  252. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +17 -3
  253. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
  254. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +8 -4
  255. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
  256. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
  257. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
  258. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +188 -0
  259. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
  260. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
  261. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
  262. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
  263. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
  264. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
  265. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
  266. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
  267. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
  268. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
  269. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +80 -3
  270. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +674 -41
  271. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
  272. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
  273. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
  274. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
  275. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
  276. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
  277. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
  278. package/node_modules/@sdd-agent-platform/core/package.json +3 -3
  279. package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
  280. package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +72 -71
  281. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
  282. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
  283. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
  284. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +52 -6
  285. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
  286. package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +44 -29
  287. package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +15 -11
  288. package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
  289. package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +17 -20
  290. package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
  291. package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
  292. package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
  293. package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
  294. package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
  295. package/node_modules/@sdd-agent-platform/core/src/contracts.ts +4 -1
  296. package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
  297. package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
  298. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
  299. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
  300. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
  301. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +7 -7
  302. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
  303. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
  304. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +217 -7
  305. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -3
  306. package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +88 -0
  307. package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -1
  308. package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
  309. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +57 -2
  310. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
  311. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
  312. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
  313. package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
  314. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +17 -1
  315. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +16 -7
  316. package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
  317. package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
  318. package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +14 -0
  319. package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +10 -0
  320. package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
  321. package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +34 -13
  322. package/node_modules/@sdd-agent-platform/core/src/instructions.ts +60 -67
  323. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
  324. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
  325. package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
  326. package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +58 -19
  327. package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
  328. package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
  329. package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +3 -3
  330. package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +8 -3
  331. package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
  332. package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
  333. package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +319 -20
  334. package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +17 -17
  335. package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +42 -2
  336. package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
  337. package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
  338. package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
  339. package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
  340. package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +45 -4
  341. package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
  342. package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
  343. package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
  344. package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
  345. package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
  346. package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
  347. package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
  348. package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
  349. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +32 -13
  350. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +68 -1
  351. package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +212 -1
  352. package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +391 -6
  353. package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +78 -17
  354. package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
  355. package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
  356. package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
  357. package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
  358. package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
  359. package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +173 -18
  360. package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
  361. package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +24 -59
  362. package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
  363. package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +59 -9
  364. package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
  365. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +53 -2
  366. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +55 -41
  367. package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +252 -0
  368. package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
  369. package/node_modules/@sdd-agent-platform/core/src/run-state.ts +2 -0
  370. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
  371. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
  372. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
  373. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
  374. package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +131 -14
  375. package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
  376. package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
  377. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +1 -1
  378. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +306 -0
  379. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +15 -4
  380. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +261 -0
  381. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +169 -41
  382. package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
  383. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
  384. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
  385. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
  386. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
  387. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
  388. package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
  389. package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +497 -8
  390. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +560 -4
  391. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1510 -9
  392. package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
  393. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
  394. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
  395. package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +21 -0
  396. package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +20 -20
  397. package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
  398. package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
  399. package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
  400. package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +46 -42
  401. package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +18 -52
  402. package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +84 -0
  403. package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
  404. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +138 -64
  405. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +226 -116
  406. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +148 -48
  407. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +619 -136
  408. package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
  409. package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +383 -0
  410. package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +556 -0
  411. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +131 -8
  412. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +117 -30
  413. package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
  414. package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
  415. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +425 -0
  416. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +507 -0
  417. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +182 -0
  418. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +174 -0
  419. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +194 -0
  420. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +115 -0
  421. package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +19 -4
  422. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
  423. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
  424. package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +224 -0
  425. package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
  426. package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
  427. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
  428. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +851 -9
  429. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +862 -45
  430. package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
  431. package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
  432. package/package.json +1 -1
  433. package/packages/cli/dist/args.js +2 -2
  434. package/packages/cli/dist/args.js.map +1 -1
  435. package/packages/cli/dist/commands/ai-tools.js +13 -2
  436. package/packages/cli/dist/commands/ai-tools.js.map +1 -1
  437. package/packages/cli/dist/commands/context.js +1 -1
  438. package/packages/cli/dist/commands/context.js.map +1 -1
  439. package/packages/cli/dist/commands/execution.js +49 -1
  440. package/packages/cli/dist/commands/execution.js.map +1 -1
  441. package/packages/cli/dist/commands/governance.js +1 -1
  442. package/packages/cli/dist/commands/governance.js.map +1 -1
  443. package/packages/cli/dist/commands/init.js +6 -1
  444. package/packages/cli/dist/commands/init.js.map +1 -1
  445. package/packages/cli/dist/commands/lifecycle.js +15 -2
  446. package/packages/cli/dist/commands/lifecycle.js.map +1 -1
  447. package/packages/cli/dist/commands/registry/runtime.js +48 -2
  448. package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
  449. package/packages/cli/dist/commands/run.js +52 -2
  450. package/packages/cli/dist/commands/run.js.map +1 -1
  451. package/packages/cli/dist/commands/stage-close.d.ts +6 -0
  452. package/packages/cli/dist/commands/stage-close.js +295 -0
  453. package/packages/cli/dist/commands/stage-close.js.map +1 -0
  454. package/packages/cli/dist/commands/status.js +70 -4
  455. package/packages/cli/dist/commands/status.js.map +1 -1
  456. package/packages/cli/dist/commands/tasks.js +4 -4
  457. package/packages/cli/dist/commands/tasks.js.map +1 -1
  458. package/packages/cli/dist/commands/test.js +272 -5
  459. package/packages/cli/dist/commands/test.js.map +1 -1
  460. package/packages/cli/dist/commands/verifies.js +9 -5
  461. package/packages/cli/dist/commands/verifies.js.map +1 -1
  462. package/packages/cli/dist/commands/verify.js +257 -20
  463. package/packages/cli/dist/commands/verify.js.map +1 -1
  464. package/packages/cli/dist/dispatch.js +4 -9
  465. package/packages/cli/dist/dispatch.js.map +1 -1
  466. package/packages/cli/dist/help.js +42 -27
  467. package/packages/cli/dist/help.js.map +1 -1
  468. package/packages/cli/dist/renderers/doctor.js +1 -1
  469. package/packages/cli/dist/renderers/doctor.js.map +1 -1
  470. package/packages/cli/dist/renderers/execution.js +1 -1
  471. package/packages/cli/dist/renderers/execution.js.map +1 -1
  472. package/packages/cli/dist/renderers/json.d.ts +1 -0
  473. package/packages/cli/dist/renderers/json.js +3 -0
  474. package/packages/cli/dist/renderers/json.js.map +1 -1
  475. package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
  476. package/packages/cli/dist/renderers/registry-runtime.js +27 -2
  477. package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
  478. package/packages/cli/dist/renderers/router.js +5 -3
  479. package/packages/cli/dist/renderers/router.js.map +1 -1
  480. package/packages/cli/dist/renderers/workflow.d.ts +0 -4
  481. package/packages/cli/dist/renderers/workflow.js +46 -84
  482. package/packages/cli/dist/renderers/workflow.js.map +1 -1
  483. package/packages/cli/dist/skill-import-args.d.ts +10 -0
  484. package/packages/cli/dist/skill-import-args.js +47 -0
  485. package/packages/cli/dist/skill-import-args.js.map +1 -0
  486. package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
  487. package/packages/cli/package.json +2 -2
  488. package/packages/core/dist/ai-tools.js +72 -71
  489. package/packages/core/dist/ai-tools.js.map +1 -1
  490. package/packages/core/dist/artifacts/ingestion.js +64 -9
  491. package/packages/core/dist/artifacts/ingestion.js.map +1 -1
  492. package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
  493. package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
  494. package/packages/core/dist/artifacts/sdd-result.js +26 -17
  495. package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
  496. package/packages/core/dist/config/init-project.d.ts +3 -0
  497. package/packages/core/dist/config/init-project.js +13 -9
  498. package/packages/core/dist/config/init-project.js.map +1 -1
  499. package/packages/core/dist/config/project-config.d.ts +3 -1
  500. package/packages/core/dist/config/project-config.js +7 -3
  501. package/packages/core/dist/config/project-config.js.map +1 -1
  502. package/packages/core/dist/config/starter-documents.d.ts +4 -4
  503. package/packages/core/dist/config/starter-documents.js +16 -20
  504. package/packages/core/dist/config/starter-documents.js.map +1 -1
  505. package/packages/core/dist/context/build-package.d.ts +1 -1
  506. package/packages/core/dist/context/build-package.js +1 -7
  507. package/packages/core/dist/context/build-package.js.map +1 -1
  508. package/packages/core/dist/context/evidence-summary.js +26 -8
  509. package/packages/core/dist/context/evidence-summary.js.map +1 -1
  510. package/packages/core/dist/context/log-worker.js +2 -2
  511. package/packages/core/dist/context/log-worker.js.map +1 -1
  512. package/packages/core/dist/context-offload/contracts.d.ts +1 -1
  513. package/packages/core/dist/contracts.d.ts +4 -1
  514. package/packages/core/dist/contracts.js +3 -0
  515. package/packages/core/dist/contracts.js.map +1 -1
  516. package/packages/core/dist/delegation/model.d.ts +3 -0
  517. package/packages/core/dist/delegation/validation.d.ts +3 -0
  518. package/packages/core/dist/delegation/validation.js +7 -4
  519. package/packages/core/dist/delegation/validation.js.map +1 -1
  520. package/packages/core/dist/doctor/checks/document-chain.js +1 -1
  521. package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
  522. package/packages/core/dist/doctor/checks/project.js +8 -8
  523. package/packages/core/dist/doctor/checks/project.js.map +1 -1
  524. package/packages/core/dist/doctor/checks/registries.js +0 -1
  525. package/packages/core/dist/doctor/checks/registries.js.map +1 -1
  526. package/packages/core/dist/doctor/checks/run-evidence.js +7 -7
  527. package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
  528. package/packages/core/dist/doctor/checks/run-trust.js +0 -24
  529. package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
  530. package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
  531. package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
  532. package/packages/core/dist/doctor/doctor.js +277 -3
  533. package/packages/core/dist/doctor/doctor.js.map +1 -1
  534. package/packages/core/dist/evidence/lookup.d.ts +23 -0
  535. package/packages/core/dist/evidence/lookup.js +61 -0
  536. package/packages/core/dist/evidence/lookup.js.map +1 -0
  537. package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -1
  538. package/packages/core/dist/execution/agent-execution-records.js +15 -8
  539. package/packages/core/dist/execution/agent-execution-records.js.map +1 -1
  540. package/packages/core/dist/execution/background-executor.js +4 -4
  541. package/packages/core/dist/execution/background-executor.js.map +1 -1
  542. package/packages/core/dist/execution/foreground-subagents.js +3 -3
  543. package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
  544. package/packages/core/dist/execution/host-invocation.js +5 -4
  545. package/packages/core/dist/execution/host-invocation.js.map +1 -1
  546. package/packages/core/dist/execution/resident-worker.js +16 -7
  547. package/packages/core/dist/execution/resident-worker.js.map +1 -1
  548. package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
  549. package/packages/core/dist/execution/stage-team-runtime.js +145 -0
  550. package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
  551. package/packages/core/dist/governance/policy.d.ts +1 -1
  552. package/packages/core/dist/governance/policy.js +1 -1
  553. package/packages/core/dist/governance/policy.js.map +1 -1
  554. package/packages/core/dist/instructions.d.ts +1 -1
  555. package/packages/core/dist/instructions.js +59 -66
  556. package/packages/core/dist/instructions.js.map +1 -1
  557. package/packages/core/dist/lifecycle/decision-gate.js +1 -1
  558. package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
  559. package/packages/core/dist/lifecycle/ship.d.ts +3 -0
  560. package/packages/core/dist/lifecycle/ship.js +55 -19
  561. package/packages/core/dist/lifecycle/ship.js.map +1 -1
  562. package/packages/core/dist/orchestration/contracts.d.ts +1 -1
  563. package/packages/core/dist/orchestration/runtime.d.ts +12 -2
  564. package/packages/core/dist/orchestration/runtime.js +62 -21
  565. package/packages/core/dist/orchestration/runtime.js.map +1 -1
  566. package/packages/core/dist/registries/agent-capability-catalog.d.ts +20 -2
  567. package/packages/core/dist/registries/agent-capability-catalog.js +218 -18
  568. package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
  569. package/packages/core/dist/registries/agent-registry.js +17 -17
  570. package/packages/core/dist/registries/agent-registry.js.map +1 -1
  571. package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
  572. package/packages/core/dist/registries/agent-runtime-static.js +32 -2
  573. package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
  574. package/packages/core/dist/registries/capability-sources.d.ts +2 -17
  575. package/packages/core/dist/registries/capability-sources.js +222 -10
  576. package/packages/core/dist/registries/capability-sources.js.map +1 -1
  577. package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
  578. package/packages/core/dist/registries/command-team-runtime.js +9 -9
  579. package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
  580. package/packages/core/dist/registries/eval-learning-context.js +4 -4
  581. package/packages/core/dist/registries/eval-learning-context.js.map +1 -1
  582. package/packages/core/dist/registries/query-status.js +2 -2
  583. package/packages/core/dist/registries/query-status.js.map +1 -1
  584. package/packages/core/dist/registries/tool-capabilities.js +3 -3
  585. package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
  586. package/packages/core/dist/registries/tool-plugins.js +2 -2
  587. package/packages/core/dist/registries/tool-plugins.js.map +1 -1
  588. package/packages/core/dist/registries/worker-adapters.js +11 -11
  589. package/packages/core/dist/registries/worker-adapters.js.map +1 -1
  590. package/packages/core/dist/registries/workflow-gates.js +12 -12
  591. package/packages/core/dist/registries/workflow-gates.js.map +1 -1
  592. package/packages/core/dist/risk/contracts.d.ts +2 -2
  593. package/packages/core/dist/risk/kernel.js +4 -4
  594. package/packages/core/dist/risk/kernel.js.map +1 -1
  595. package/packages/core/dist/risk/legacy-adapters.js +4 -7
  596. package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
  597. package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
  598. package/packages/core/dist/risk/workflow-gates.js +19 -17
  599. package/packages/core/dist/risk/workflow-gates.js.map +1 -1
  600. package/packages/core/dist/router/agent-runtime-config.js +28 -13
  601. package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
  602. package/packages/core/dist/router/agent-runtime.d.ts +61 -1
  603. package/packages/core/dist/router/route-projection.d.ts +3 -1
  604. package/packages/core/dist/router/route-projection.js +192 -1
  605. package/packages/core/dist/router/route-projection.js.map +1 -1
  606. package/packages/core/dist/router/routing.js +73 -17
  607. package/packages/core/dist/router/routing.js.map +1 -1
  608. package/packages/core/dist/router/runtime-import.d.ts +28 -0
  609. package/packages/core/dist/router/runtime-import.js +373 -0
  610. package/packages/core/dist/router/runtime-import.js.map +1 -0
  611. package/packages/core/dist/router/runtime-inspection.js +11 -4
  612. package/packages/core/dist/router/runtime-inspection.js.map +1 -1
  613. package/packages/core/dist/router/runtime-validation.js +31 -3
  614. package/packages/core/dist/router/runtime-validation.js.map +1 -1
  615. package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
  616. package/packages/core/dist/router/stage-route-binding.js +235 -0
  617. package/packages/core/dist/router/stage-route-binding.js.map +1 -0
  618. package/packages/core/dist/router.d.ts +2 -0
  619. package/packages/core/dist/router.js +2 -0
  620. package/packages/core/dist/router.js.map +1 -1
  621. package/packages/core/dist/run-state/artifacts.d.ts +16 -0
  622. package/packages/core/dist/run-state/artifacts.js +168 -18
  623. package/packages/core/dist/run-state/artifacts.js.map +1 -1
  624. package/packages/core/dist/run-state/events.js +2 -2
  625. package/packages/core/dist/run-state/events.js.map +1 -1
  626. package/packages/core/dist/run-state/inspect-run.d.ts +3 -3
  627. package/packages/core/dist/run-state/inspect-run.js +22 -54
  628. package/packages/core/dist/run-state/inspect-run.js.map +1 -1
  629. package/packages/core/dist/run-state/invocation-ledger.js +2 -2
  630. package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
  631. package/packages/core/dist/run-state/model.d.ts +53 -9
  632. package/packages/core/dist/run-state/run-index.d.ts +0 -2
  633. package/packages/core/dist/run-state/run-index.js +1 -3
  634. package/packages/core/dist/run-state/run-index.js.map +1 -1
  635. package/packages/core/dist/run-state/run-state.js +51 -34
  636. package/packages/core/dist/run-state/run-state.js.map +1 -1
  637. package/packages/core/dist/run-state/task-evidence.d.ts +65 -0
  638. package/packages/core/dist/run-state/task-evidence.js +169 -0
  639. package/packages/core/dist/run-state/task-evidence.js.map +1 -0
  640. package/packages/core/dist/run-state/timing.d.ts +8 -0
  641. package/packages/core/dist/run-state/timing.js +131 -0
  642. package/packages/core/dist/run-state/timing.js.map +1 -0
  643. package/packages/core/dist/run-state.d.ts +2 -0
  644. package/packages/core/dist/run-state.js +2 -0
  645. package/packages/core/dist/run-state.js.map +1 -1
  646. package/packages/core/dist/runtime-analysis/build.js +0 -3
  647. package/packages/core/dist/runtime-analysis/build.js.map +1 -1
  648. package/packages/core/dist/runtime-analysis/findings.js +5 -44
  649. package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
  650. package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
  651. package/packages/core/dist/runtime-paths.d.ts +20 -0
  652. package/packages/core/dist/runtime-paths.js +109 -14
  653. package/packages/core/dist/runtime-paths.js.map +1 -1
  654. package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
  655. package/packages/core/dist/runtime-projection-p0.js +200 -0
  656. package/packages/core/dist/runtime-projection-p0.js.map +1 -0
  657. package/packages/core/dist/sdd-docs/context.js +1 -1
  658. package/packages/core/dist/sdd-docs/context.js.map +1 -1
  659. package/packages/core/dist/sdd-docs/document-hashes.d.ts +6 -0
  660. package/packages/core/dist/sdd-docs/document-hashes.js +276 -0
  661. package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
  662. package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
  663. package/packages/core/dist/sdd-docs/run-binding.js +15 -4
  664. package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
  665. package/packages/core/dist/sdd-docs/task-parser.d.ts +21 -0
  666. package/packages/core/dist/sdd-docs/task-parser.js +139 -38
  667. package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
  668. package/packages/core/dist/stage-artifacts.d.ts +55 -0
  669. package/packages/core/dist/stage-artifacts.js +322 -0
  670. package/packages/core/dist/stage-artifacts.js.map +1 -0
  671. package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
  672. package/packages/core/dist/stage-collaboration-contracts.js +241 -0
  673. package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
  674. package/packages/core/dist/stage-collaboration.d.ts +888 -0
  675. package/packages/core/dist/stage-collaboration.js +3870 -0
  676. package/packages/core/dist/stage-collaboration.js.map +1 -0
  677. package/packages/core/dist/stage-runtime/runtime.js +8 -1
  678. package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
  679. package/packages/core/dist/status/project-status.d.ts +105 -1
  680. package/packages/core/dist/status/project-status.js +343 -8
  681. package/packages/core/dist/status/project-status.js.map +1 -1
  682. package/packages/core/dist/storage/runtime-store.d.ts +348 -3
  683. package/packages/core/dist/storage/runtime-store.js +1017 -8
  684. package/packages/core/dist/storage/runtime-store.js.map +1 -1
  685. package/packages/core/dist/subagents/contracts.d.ts +1 -1
  686. package/packages/core/dist/subagents/runtime.js +7 -7
  687. package/packages/core/dist/subagents/runtime.js.map +1 -1
  688. package/packages/core/dist/test-support/fixtures.js +21 -0
  689. package/packages/core/dist/test-support/fixtures.js.map +1 -1
  690. package/packages/core/dist/test-support/run-state.d.ts +1 -1
  691. package/packages/core/dist/test-support/run-state.js +19 -20
  692. package/packages/core/dist/test-support/run-state.js.map +1 -1
  693. package/packages/core/dist/truth-reconciliation.d.ts +44 -0
  694. package/packages/core/dist/truth-reconciliation.js +138 -0
  695. package/packages/core/dist/truth-reconciliation.js.map +1 -0
  696. package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
  697. package/packages/core/dist/verification/goal-verify.d.ts +0 -1
  698. package/packages/core/dist/verification/goal-verify.js +44 -37
  699. package/packages/core/dist/verification/goal-verify.js.map +1 -1
  700. package/packages/core/dist/verification/rendering.d.ts +0 -2
  701. package/packages/core/dist/verification/rendering.js +19 -49
  702. package/packages/core/dist/verification/rendering.js.map +1 -1
  703. package/packages/core/dist/verification/review-gate.d.ts +22 -0
  704. package/packages/core/dist/verification/review-gate.js +53 -0
  705. package/packages/core/dist/verification/review-gate.js.map +1 -0
  706. package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
  707. package/packages/core/dist/verification/single-task-loop.js +213 -111
  708. package/packages/core/dist/verification/single-task-loop.js.map +1 -1
  709. package/packages/core/dist/verification/test-runtime.d.ts +28 -3
  710. package/packages/core/dist/verification/test-runtime.js +546 -125
  711. package/packages/core/dist/verification/test-runtime.js.map +1 -1
  712. package/packages/core/dist/verification/validation-cache.d.ts +26 -0
  713. package/packages/core/dist/verification/validation-cache.js +73 -0
  714. package/packages/core/dist/verification/validation-cache.js.map +1 -0
  715. package/packages/core/dist/verification/validation-wave.d.ts +76 -0
  716. package/packages/core/dist/verification/validation-wave.js +450 -0
  717. package/packages/core/dist/verification/validation-wave.js.map +1 -0
  718. package/packages/core/dist/verification/verify-contract.d.ts +3 -1
  719. package/packages/core/dist/verification/verify-contract.js +105 -30
  720. package/packages/core/dist/verification/verify-contract.js.map +1 -1
  721. package/packages/core/dist/verification.d.ts +2 -0
  722. package/packages/core/dist/verification.js +2 -0
  723. package/packages/core/dist/verification.js.map +1 -1
  724. package/packages/core/dist/work-units/contracts.d.ts +1 -1
  725. package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
  726. package/packages/core/dist/workflow-gate/evidence-packet.js +395 -0
  727. package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
  728. package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
  729. package/packages/core/dist/workflow-gate/hard-checks.js +164 -0
  730. package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
  731. package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
  732. package/packages/core/dist/workflow-gate/policy.js +182 -0
  733. package/packages/core/dist/workflow-gate/policy.js.map +1 -0
  734. package/packages/core/dist/workflow-gate/types.d.ts +88 -0
  735. package/packages/core/dist/workflow-gate/types.js +2 -0
  736. package/packages/core/dist/workflow-gate/types.js.map +1 -0
  737. package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
  738. package/packages/core/dist/workflow-state/affected-file-conflicts.js +17 -3
  739. package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
  740. package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
  741. package/packages/core/dist/workflow-state/dependencies.js +25 -11
  742. package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
  743. package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
  744. package/packages/core/dist/workflow-state/latest-eligible-run.js +188 -0
  745. package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
  746. package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
  747. package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
  748. package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
  749. package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
  750. package/packages/core/dist/workflow-state/repair-contract.js +63 -0
  751. package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
  752. package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
  753. package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
  754. package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
  755. package/packages/core/dist/workflow-state/resolve.d.ts +80 -3
  756. package/packages/core/dist/workflow-state/resolve.js +674 -41
  757. package/packages/core/dist/workflow-state/resolve.js.map +1 -1
  758. package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
  759. package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
  760. package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
  761. package/packages/core/dist/workflow-state.d.ts +1 -0
  762. package/packages/core/dist/workflow-state.js +1 -0
  763. package/packages/core/dist/workflow-state.js.map +1 -1
  764. package/packages/core/package.json +3 -3
  765. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
  766. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
  767. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
  768. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
  769. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -221
  770. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
  771. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -91
  772. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -395
  773. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
  774. package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
  775. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
  776. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
  777. package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -248
  778. package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -522
  779. package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -446
  780. package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
  781. package/packages/cli/dist/commands/artifact.d.ts +0 -6
  782. package/packages/cli/dist/commands/artifact.js +0 -168
  783. package/packages/cli/dist/commands/artifact.js.map +0 -1
  784. package/packages/cli/dist/commands/sync-back.d.ts +0 -6
  785. package/packages/cli/dist/commands/sync-back.js +0 -82
  786. package/packages/cli/dist/commands/sync-back.js.map +0 -1
  787. package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
  788. package/packages/cli/dist/renderers/artifacts.js +0 -43
  789. package/packages/cli/dist/renderers/artifacts.js.map +0 -1
  790. package/packages/core/dist/doctor/render.d.ts +0 -2
  791. package/packages/core/dist/doctor/render.js +0 -44
  792. package/packages/core/dist/doctor/render.js.map +0 -1
  793. package/packages/core/dist/sync-back/apply.d.ts +0 -17
  794. package/packages/core/dist/sync-back/apply.js +0 -221
  795. package/packages/core/dist/sync-back/apply.js.map +0 -1
  796. package/packages/core/dist/sync-back/inspect.d.ts +0 -91
  797. package/packages/core/dist/sync-back/inspect.js +0 -395
  798. package/packages/core/dist/sync-back/inspect.js.map +0 -1
  799. package/packages/core/dist/sync-back.d.ts +0 -2
  800. package/packages/core/dist/sync-back.js +0 -3
  801. package/packages/core/dist/sync-back.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-paths.js","sourceRoot":"","sources":["../src/runtime-paths.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEvG,MAAM,UAAU,eAAe,CAAC,WAAmB;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,WAAmB;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAmB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AAM,IAAI,KAAK,CAAC,kFAAkF,KAAK,EAAE,CAAC,CAAC;IAC7G,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAiB,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,KAAiB,CAAC;AAC3B,CAAC;AAED,SAAS,oCAAoC,CAAC,QAAgB;IAC5D,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9G,MAAM,IAAI,KAAK,CAAC,6DAA6D,QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACnD,qBAAqB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAC;IAC3D,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,gBAAgB,GAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { RuntimeProjectionEnvelope, RuntimeProjectionStaleness, RuntimeRef } from './contracts.js';
2
+ import { type RuntimeProjectionEnvelopeWriteResult } from './storage/runtime-store.js';
3
+ export declare const RUNTIME_PROJECTION_P0_CONTRACT_VERSION: "phase9.19-runtime-sqlite-contract-projection-p0-v1";
4
+ export declare const RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE = "phase9_19_ref_hash_registry";
5
+ export declare const RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION = "phase9.19-ref-hash-registry-v1";
6
+ export declare const STAGE_ROUTE_BINDING_PROJECTION_TYPE = "phase9_18_stage_route_binding";
7
+ export declare const STAGE_ROUTE_BINDING_PRODUCER_VERSION = "phase9.18-stage-route-binding-v1";
8
+ export declare const TRUTH_RECONCILIATION_PROJECTION_TYPE = "phase9_21_truth_reconciliation";
9
+ export type RuntimeProjectionP0Key = 'lifecycleDecisions' | 'riskSignals' | 'stageRuns' | 'stageHandoffs' | 'gates' | 'gapBlockers' | 'evidenceItems' | 'evidenceSets' | 'selectionPointers' | 'workflowCurrentState' | 'taskOrchestration' | 'validationUnits' | 'truthAlignment' | 'truthReconciliation' | 'stageRouteBindings' | 'nextIntent' | 'auditEvents';
10
+ export type RuntimeProjectionP0Storage = 'sqlite' | 'sqlite-ref-hash-only' | 'sqlite-projection';
11
+ export type RuntimeProjectionP0HealthStatus = 'pass' | 'warn' | 'blocked';
12
+ export type RuntimeRefFreshnessStatus = 'fresh' | 'stale' | 'missing' | 'unhashed' | 'unsafe' | 'not_file_backed';
13
+ export interface RuntimeProjectionP0InventoryItem {
14
+ key: RuntimeProjectionP0Key;
15
+ storage: RuntimeProjectionP0Storage;
16
+ primitive: string;
17
+ writer: 'runtime';
18
+ responsibility: string;
19
+ consumers: string[];
20
+ markdownBodyAuthority: false;
21
+ }
22
+ export interface RuntimeRefFreshness {
23
+ ref: RuntimeRef;
24
+ normalizedRef: string;
25
+ expectedHash: string | null;
26
+ currentHash: string | null;
27
+ status: RuntimeRefFreshnessStatus;
28
+ reason: string;
29
+ }
30
+ export interface RuntimeRefHashRegistryProjection {
31
+ contract: typeof RUNTIME_PROJECTION_P0_CONTRACT_VERSION;
32
+ branch: string;
33
+ refs: RuntimeRefFreshness[];
34
+ status: 'fresh' | 'blocked';
35
+ staleRefs: RuntimeRef[];
36
+ reasons: string[];
37
+ }
38
+ export interface RuntimeProjectionP0Diagnostic {
39
+ contract: typeof RUNTIME_PROJECTION_P0_CONTRACT_VERSION;
40
+ branch: string;
41
+ status: RuntimeProjectionP0HealthStatus;
42
+ inventory: RuntimeProjectionP0InventoryItem[];
43
+ projectionCounts: Record<string, number>;
44
+ refHashRegistry: {
45
+ projectionType: typeof RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE;
46
+ envelopeStaleness: RuntimeProjectionStaleness;
47
+ status: RuntimeRefHashRegistryProjection['status'] | 'missing';
48
+ staleRefs: RuntimeRef[];
49
+ reasons: string[];
50
+ };
51
+ reasons: string[];
52
+ }
53
+ export declare const RUNTIME_PROJECTION_P0_INVENTORY: readonly RuntimeProjectionP0InventoryItem[];
54
+ export declare const RUNTIME_PROJECTION_P0_PROJECTION_TYPES: readonly ["phase8_lifecycle_risk_decision", "phase8_stage_run", "phase8_workflow_handoff", "phase9_12_truth_alignment", "phase9_21_truth_reconciliation", "phase9_18_stage_route_binding", "phase9_25_workflow_current_state", "phase9_26_task_orchestration", "phase9_26_validation_unit", "phase9_29_next_intent", "phase9_19_ref_hash_registry"];
55
+ export declare function inspectRuntimeProjectionP0(projectRoot: string, branch: string): Promise<RuntimeProjectionP0Diagnostic>;
56
+ export declare function recordRuntimeRefHashRegistryProjection(projectRoot: string, input: {
57
+ branch: string;
58
+ refs: RuntimeRef[];
59
+ generatedAt?: string;
60
+ }): Promise<RuntimeProjectionEnvelopeWriteResult<RuntimeRefHashRegistryProjection>>;
61
+ export declare function readRuntimeRefHashRegistryProjection(projectRoot: string, branch: string): Promise<RuntimeProjectionEnvelope<RuntimeRefHashRegistryProjection> | null>;
62
+ export declare function inspectRuntimeRefFreshness(projectRoot: string, refs: RuntimeRef[]): Promise<RuntimeRefFreshness[]>;
63
+ export declare function runtimeRefHashRegistryScopeKey(branch: string): string;
64
+ export declare function runtimeProjectionStableHash(value: unknown): string;
@@ -0,0 +1,200 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readFile } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { branchToSafePartition, normalizePortablePath } from './path-safety.js';
5
+ import { hashDocumentContent } from './sdd-docs/document-hashes.js';
6
+ import { listRuntimeProjections, readRuntimeProjectionEnvelope, recordRuntimeProjectionEnvelope, runtimeProjectionStaleness } from './storage/runtime-store.js';
7
+ import { NEXT_INTENT_PROJECTION_TYPE, TASK_ORCHESTRATION_PROJECTION_TYPE, VALIDATION_UNIT_PROJECTION_TYPE, WORKFLOW_CURRENT_STATE_PROJECTION_TYPE } from './workflow-state/runtime-projections.js';
8
+ export const RUNTIME_PROJECTION_P0_CONTRACT_VERSION = 'phase9.19-runtime-sqlite-contract-projection-p0-v1';
9
+ export const RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE = 'phase9_19_ref_hash_registry';
10
+ export const RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION = 'phase9.19-ref-hash-registry-v1';
11
+ export const STAGE_ROUTE_BINDING_PROJECTION_TYPE = 'phase9_18_stage_route_binding';
12
+ export const STAGE_ROUTE_BINDING_PRODUCER_VERSION = 'phase9.18-stage-route-binding-v1';
13
+ export const TRUTH_RECONCILIATION_PROJECTION_TYPE = 'phase9_21_truth_reconciliation';
14
+ export const RUNTIME_PROJECTION_P0_INVENTORY = [
15
+ inventoryItem('lifecycleDecisions', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Lifecycle/risk authority created only by /sdd or /sdd:spec.', ['router', 'stage-close', 'status', 'doctor']),
16
+ inventoryItem('riskSignals', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Risk signal snapshot and lifecycle policy output for routing and gates.', ['router', 'workflow-gate', 'status']),
17
+ inventoryItem('stageRuns', 'sqlite', 'projections:phase8_stage_run', 'Runtime-owned stage run state and terminal health.', ['status', 'stage-close', 'ship']),
18
+ inventoryItem('stageHandoffs', 'sqlite', 'projections:phase8_workflow_handoff', 'Runtime handoff packet between completed stages and next runtime stage.', ['status', 'stage-close']),
19
+ inventoryItem('gates', 'sqlite', 'workflow_gate_decisions', 'Hard gate decisions and policy outcomes.', ['workflow-gate', 'status', 'ship']),
20
+ inventoryItem('gapBlockers', 'sqlite', 'durable_gaps', 'Mutable gap/blocker lifecycle with runtime status authority.', ['doctor', 'status', 'stage-close']),
21
+ inventoryItem('evidenceItems', 'sqlite-ref-hash-only', 'stage_artifacts/artifact_payloads', 'Agent-authored Markdown evidence registered by ref, hash, contract, producer, and status.', ['workflow-gate', 'stage-close', 'doctor']),
22
+ inventoryItem('evidenceSets', 'sqlite-ref-hash-only', 'evidence_sets/evidence_set_items', 'Accepted evidence sets selected by refs and digests, not Markdown bodies.', ['workflow-gate', 'ship', 'status']),
23
+ inventoryItem('selectionPointers', 'sqlite', 'selection_pointers', 'Active accepted evidence pointer for downstream consumers.', ['workflow-gate', 'latest-eligible-run', 'ship']),
24
+ inventoryItem('workflowCurrentState', 'sqlite-projection', `projections:${WORKFLOW_CURRENT_STATE_PROJECTION_TYPE}`, 'Runtime-owned lifecycle, task, and validation-unit current state projection.', ['status', 'router', 'ai-tool-entry']),
25
+ inventoryItem('taskOrchestration', 'sqlite-projection', `projections:${TASK_ORCHESTRATION_PROJECTION_TYPE}`, 'Parsed task orchestration read model with task-level hashes, dependencies, validation unit binding, and capability signals.', ['status', 'do-manager', 'tasks-manager']),
26
+ inventoryItem('validationUnits', 'sqlite-projection', `projections:${VALIDATION_UNIT_PROJECTION_TYPE}`, 'Runtime validation-unit read model derived from verify contracts and task orchestration.', ['status', 'test-manager', 'workflow-gate']),
27
+ inventoryItem('truthAlignment', 'sqlite', 'projections:phase9_12_truth_alignment', 'Goal-verify truth alignment projection for ship readiness.', ['ship', 'status']),
28
+ inventoryItem('truthReconciliation', 'sqlite', `projections:${TRUTH_RECONCILIATION_PROJECTION_TYPE}`, 'Owner-stage reconciliation decision slot for minimal rerun frontier.', ['orchestrator', 'status', 'ship']),
29
+ inventoryItem('stageRouteBindings', 'sqlite', `projections:${STAGE_ROUTE_BINDING_PROJECTION_TYPE}`, 'Stage-local command input binding to an accepted runtime target.', ['router', 'status']),
30
+ inventoryItem('nextIntent', 'sqlite-projection', `projections:${NEXT_INTENT_PROJECTION_TYPE}`, 'Advisory runtime next-action read model; execution still checks readiness and gates.', ['status', 'ai-tool-entry']),
31
+ inventoryItem('auditEvents', 'sqlite', 'events/activities', 'Append-only runtime events and activity records for auditability.', ['doctor', 'run-inspect'])
32
+ ];
33
+ export const RUNTIME_PROJECTION_P0_PROJECTION_TYPES = [
34
+ 'phase8_lifecycle_risk_decision',
35
+ 'phase8_stage_run',
36
+ 'phase8_workflow_handoff',
37
+ 'phase9_12_truth_alignment',
38
+ TRUTH_RECONCILIATION_PROJECTION_TYPE,
39
+ STAGE_ROUTE_BINDING_PROJECTION_TYPE,
40
+ WORKFLOW_CURRENT_STATE_PROJECTION_TYPE,
41
+ TASK_ORCHESTRATION_PROJECTION_TYPE,
42
+ VALIDATION_UNIT_PROJECTION_TYPE,
43
+ NEXT_INTENT_PROJECTION_TYPE,
44
+ RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE
45
+ ];
46
+ export async function inspectRuntimeProjectionP0(projectRoot, branch) {
47
+ const partition = branchToSafePartition(branch);
48
+ const projections = await listRuntimeProjections(projectRoot, [...RUNTIME_PROJECTION_P0_PROJECTION_TYPES]);
49
+ const projectionCounts = Object.fromEntries(RUNTIME_PROJECTION_P0_PROJECTION_TYPES.map((projectionType) => [projectionType, projections.filter((projection) => projection.projectionType === projectionType).length]));
50
+ const envelope = await readRuntimeRefHashRegistryProjection(projectRoot, partition);
51
+ const refHashRegistry = await inspectRefHashRegistry(projectRoot, partition, envelope);
52
+ const status = refHashRegistry.status === 'blocked' ? 'blocked' : envelope ? 'pass' : 'warn';
53
+ const reasons = runtimeProjectionP0Reasons(status, refHashRegistry.reasons);
54
+ return {
55
+ contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
56
+ branch: partition,
57
+ status,
58
+ inventory: [...RUNTIME_PROJECTION_P0_INVENTORY],
59
+ projectionCounts,
60
+ refHashRegistry,
61
+ reasons
62
+ };
63
+ }
64
+ export async function recordRuntimeRefHashRegistryProjection(projectRoot, input) {
65
+ const branch = branchToSafePartition(input.branch);
66
+ const refs = await inspectRuntimeRefFreshness(projectRoot, input.refs);
67
+ const staleRefs = refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
68
+ const projection = {
69
+ contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
70
+ branch,
71
+ refs,
72
+ status: staleRefs.length === 0 ? 'fresh' : 'blocked',
73
+ staleRefs,
74
+ reasons: refHashRegistryReasons(staleRefs, refs)
75
+ };
76
+ return recordRuntimeProjectionEnvelope(projectRoot, {
77
+ projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
78
+ scopeKey: runtimeRefHashRegistryScopeKey(branch),
79
+ inputHash: runtimeProjectionStableHash(projection),
80
+ producer: 'phase9.19-runtime-projection-p0',
81
+ producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION,
82
+ generatedAt: input.generatedAt,
83
+ payload: projection
84
+ });
85
+ }
86
+ export async function readRuntimeRefHashRegistryProjection(projectRoot, branch) {
87
+ return readRuntimeProjectionEnvelope(projectRoot, RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE, runtimeRefHashRegistryScopeKey(branchToSafePartition(branch)));
88
+ }
89
+ export async function inspectRuntimeRefFreshness(projectRoot, refs) {
90
+ return Promise.all(refs.map((ref) => inspectRuntimeRef(projectRoot, ref)));
91
+ }
92
+ export function runtimeRefHashRegistryScopeKey(branch) {
93
+ return [branchToSafePartition(branch), 'ref-hash-registry'].join(':');
94
+ }
95
+ export function runtimeProjectionStableHash(value) {
96
+ return createHash('sha256').update(JSON.stringify(value)).digest('hex');
97
+ }
98
+ async function inspectRefHashRegistry(projectRoot, branch, envelope) {
99
+ if (!envelope) {
100
+ return {
101
+ projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
102
+ envelopeStaleness: 'unknown',
103
+ status: 'missing',
104
+ staleRefs: [],
105
+ reasons: ['Runtime ref/hash registry projection is missing; register accepted Markdown refs before relying on freshness diagnostics.']
106
+ };
107
+ }
108
+ const currentRefs = await inspectRuntimeRefFreshness(projectRoot, envelope.payload.refs.map((entry) => entry.ref));
109
+ const staleRefs = currentRefs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
110
+ const currentProjection = {
111
+ ...envelope.payload,
112
+ refs: currentRefs,
113
+ status: staleRefs.length === 0 ? 'fresh' : 'blocked',
114
+ staleRefs,
115
+ reasons: refHashRegistryReasons(staleRefs, currentRefs)
116
+ };
117
+ return {
118
+ projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
119
+ envelopeStaleness: runtimeProjectionStaleness(envelope, {
120
+ inputHash: runtimeProjectionStableHash(currentProjection),
121
+ producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION
122
+ }),
123
+ status: currentProjection.status,
124
+ staleRefs,
125
+ reasons: currentProjection.reasons
126
+ };
127
+ }
128
+ async function inspectRuntimeRef(projectRoot, ref) {
129
+ const normalizedRef = normalizePortablePath(ref.ref);
130
+ if (!isFileBackedRef(ref)) {
131
+ return freshness(ref, normalizedRef, null, null, 'not_file_backed', `Runtime ref kind ${ref.kind} is not file-backed.`);
132
+ }
133
+ if (!ref.hash) {
134
+ return freshness(ref, normalizedRef, null, null, 'unhashed', `File-backed ref ${ref.ref} has no expected hash.`);
135
+ }
136
+ const safePath = safeProjectRelativePath(projectRoot, normalizedRef);
137
+ if (!safePath) {
138
+ return freshness(ref, normalizedRef, ref.hash, null, 'unsafe', `File-backed ref ${ref.ref} is not a safe project-relative path.`);
139
+ }
140
+ try {
141
+ const currentHash = hashDocumentContent(await readFile(safePath, 'utf8'));
142
+ return hashMatches(ref.hash, currentHash)
143
+ ? freshness(ref, normalizedRef, ref.hash, currentHash, 'fresh', `File-backed ref ${normalizedRef} is fresh.`)
144
+ : freshness(ref, normalizedRef, ref.hash, currentHash, 'stale', `File-backed ref ${normalizedRef} hash is stale: expected ${ref.hash}, actual ${currentHash}.`);
145
+ }
146
+ catch (error) {
147
+ if (isMissingFileError(error)) {
148
+ return freshness(ref, normalizedRef, ref.hash, null, 'missing', `File-backed ref ${normalizedRef} is missing.`);
149
+ }
150
+ throw error;
151
+ }
152
+ }
153
+ function inventoryItem(key, storage, primitive, responsibility, consumers) {
154
+ return { key, storage, primitive, writer: 'runtime', responsibility, consumers, markdownBodyAuthority: false };
155
+ }
156
+ function runtimeProjectionP0Reasons(status, refHashReasons) {
157
+ if (status === 'blocked') {
158
+ return refHashReasons;
159
+ }
160
+ if (status === 'warn') {
161
+ return ['Runtime projection P0 inventory is available; ref/hash freshness registry has not been recorded yet.'];
162
+ }
163
+ return ['Runtime projection P0 inventory is available and registered file-backed refs are fresh.'];
164
+ }
165
+ function refHashRegistryReasons(staleRefs, refs) {
166
+ if (staleRefs.length === 0) {
167
+ return ['Registered file-backed refs are fresh; non-file-backed refs remain metadata-only.'];
168
+ }
169
+ return refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.reason);
170
+ }
171
+ function blocksRefHashRegistry(status) {
172
+ return status === 'stale' || status === 'missing' || status === 'unhashed' || status === 'unsafe';
173
+ }
174
+ function isFileBackedRef(ref) {
175
+ if (ref.kind === 'document' || ref.kind === 'artifact' || ref.kind === 'evidence') {
176
+ return true;
177
+ }
178
+ return /^(specs|runs)\//.test(normalizePortablePath(ref.ref));
179
+ }
180
+ function safeProjectRelativePath(projectRoot, normalizedRef) {
181
+ if (path.isAbsolute(normalizedRef) || normalizedRef.startsWith('../') || normalizedRef === '..') {
182
+ return null;
183
+ }
184
+ const projectPath = path.resolve(projectRoot);
185
+ const absolutePath = path.resolve(projectPath, normalizedRef);
186
+ return absolutePath === projectPath || absolutePath.startsWith(`${projectPath}${path.sep}`) ? absolutePath : null;
187
+ }
188
+ function freshness(ref, normalizedRef, expectedHash, currentHash, status, reason) {
189
+ return { ref: { ...ref, ref: normalizedRef }, normalizedRef, expectedHash, currentHash, status, reason };
190
+ }
191
+ function hashMatches(expected, actual) {
192
+ return expected.replace(/^sha256:/, '') === actual.replace(/^sha256:/, '');
193
+ }
194
+ function isMissingFileError(error) {
195
+ if (!error || typeof error !== 'object') {
196
+ return false;
197
+ }
198
+ return 'code' in error && error.code === 'ENOENT';
199
+ }
200
+ //# sourceMappingURL=runtime-projection-p0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-projection-p0.js","sourceRoot":"","sources":["../src/runtime-projection-p0.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,0BAA0B,EAA6C,MAAM,4BAA4B,CAAC;AAC3M,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,+BAA+B,EAC/B,sCAAsC,EACvC,MAAM,yCAAyC,CAAC;AAEjD,MAAM,CAAC,MAAM,sCAAsC,GAAG,oDAA6D,CAAC;AACpH,MAAM,CAAC,MAAM,yCAAyC,GAAG,6BAA6B,CAAC;AACvF,MAAM,CAAC,MAAM,0CAA0C,GAAG,gCAAgC,CAAC;AAC3F,MAAM,CAAC,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AACnF,MAAM,CAAC,MAAM,oCAAoC,GAAG,kCAAkC,CAAC;AACvF,MAAM,CAAC,MAAM,oCAAoC,GAAG,gCAAgC,CAAC;AAqErF,MAAM,CAAC,MAAM,+BAA+B,GAAgD;IAC1F,aAAa,CAAC,oBAAoB,EAAE,QAAQ,EAAE,4CAA4C,EAAE,6DAA6D,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ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D,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,IAAI,KAAK,IAAK,KAA4B,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC5E,CAAC"}
@@ -20,7 +20,7 @@ export async function resolveSddContext(projectRoot, options = {}) {
20
20
  if (projectConfigBranch) {
21
21
  return resolvedContext(projectRoot, projectConfigBranch, 'project_config', currentGitBranch);
22
22
  }
23
- throw new Error('Cannot resolve SDD branch. Run from a Git branch, pass --branch <branch>, or set sdd.default_branch in .sdd/project.yml. /sdd:spec is the workflow partition entry.');
23
+ throw new Error('Cannot resolve SDD branch. Run from a Git branch, pass --branch <branch>, or set sdd.default_branch in .sdd/project.yml. The spec stage is the workflow partition entry.');
24
24
  }
25
25
  export async function resolveRunStateContext(projectRoot, state) {
26
26
  if (!state.partition && !state.gitBranch) {
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/sdd-docs/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,k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AAC,CAAC,IAAI,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function hashDocumentContent(raw: string): string;
2
+ export declare function hashNormalizedMarkdownContent(raw: string | null): string | null;
3
+ export declare function normalizeMarkdownContentV1(raw: string): string;
4
+ export declare function hashSemanticDocument(raw: string | null): string | null;
5
+ export declare function hashTasksContract(raw: string | null): string | null;
6
+ export declare function documentHashMatches(expected: string, actual: string): boolean;
@@ -0,0 +1,276 @@
1
+ import { createHash } from 'node:crypto';
2
+ const TASK_CONTRACT_METADATA_KEYS = [
3
+ 'id',
4
+ 'wave',
5
+ 'depends_on',
6
+ 'acceptance_refs',
7
+ 'plan_refs',
8
+ 'affected_files',
9
+ 'change_surface',
10
+ 'implementation_wave',
11
+ 'validation_batch',
12
+ 'validation_timing',
13
+ 'requires_verify_before_next',
14
+ 'validation',
15
+ 'risk',
16
+ 'required_artifacts',
17
+ 'allowed_agents',
18
+ 'verification_availability',
19
+ 'autonomy',
20
+ 'validation_wave',
21
+ 'review_gate'
22
+ ];
23
+ const TASK_CONTRACT_SECTION_TITLES = [
24
+ 'Boundary',
25
+ 'Acceptance',
26
+ 'Definition of Done',
27
+ 'Evidence Expectations'
28
+ ];
29
+ const TOP_LEVEL_CONTRACT_SECTION_TITLES = [
30
+ 'Delivery Map',
31
+ 'Wave Plan',
32
+ 'Implementation Waves',
33
+ 'Validation Waves',
34
+ 'Review Gate',
35
+ 'Review Gates',
36
+ 'Review Gate Declarations',
37
+ 'Phase Gate Checkpoint'
38
+ ];
39
+ const RUNTIME_METADATA_KEYS = new Set([
40
+ 'accepted_status',
41
+ 'close_status',
42
+ 'created_at',
43
+ 'decision_id',
44
+ 'generated_at',
45
+ 'generatedat',
46
+ 'reviewhash',
47
+ 'run_id',
48
+ 'runtime_decision_id',
49
+ 'targethash',
50
+ 'updated_at'
51
+ ]);
52
+ export function hashDocumentContent(raw) {
53
+ return sha256(normalizeLineEndings(raw));
54
+ }
55
+ export function hashNormalizedMarkdownContent(raw) {
56
+ return raw === null ? null : sha256(normalizeMarkdownContentV1(raw));
57
+ }
58
+ export function normalizeMarkdownContentV1(raw) {
59
+ const withoutBom = raw.charCodeAt(0) === 0xFEFF ? raw.slice(1) : raw;
60
+ let lines = normalizeLineEndings(withoutBom).split('\n');
61
+ if (lines[0]?.trim() === '---') {
62
+ const frontmatterEnd = lines.findIndex((line, index) => index > 0 && line.trim() === '---');
63
+ if (frontmatterEnd > 0) {
64
+ const frontmatter = lines.slice(1, frontmatterEnd).filter((line) => !isRuntimeMetadataLine(line));
65
+ lines = [...(frontmatter.some((line) => line.trim()) ? ['---', ...frontmatter, '---'] : []), ...lines.slice(frontmatterEnd + 1)];
66
+ }
67
+ }
68
+ const normalized = [];
69
+ let fence = null;
70
+ let previousBlank = false;
71
+ for (const line of lines) {
72
+ if (fence) {
73
+ normalized.push(line);
74
+ if (isClosingFence(line, fence)) {
75
+ fence = null;
76
+ }
77
+ previousBlank = false;
78
+ continue;
79
+ }
80
+ const openingFence = parseOpeningFence(line);
81
+ if (openingFence) {
82
+ normalized.push(line);
83
+ fence = openingFence;
84
+ previousBlank = false;
85
+ continue;
86
+ }
87
+ const withoutTrailingWhitespace = line.replace(/[ \t]+$/g, '');
88
+ if (isStandaloneHtmlComment(withoutTrailingWhitespace) || isRuntimeMetadataLine(withoutTrailingWhitespace)) {
89
+ continue;
90
+ }
91
+ if (withoutTrailingWhitespace.trim() === '') {
92
+ if (!previousBlank) {
93
+ normalized.push('');
94
+ previousBlank = true;
95
+ }
96
+ continue;
97
+ }
98
+ normalized.push(withoutTrailingWhitespace);
99
+ previousBlank = false;
100
+ }
101
+ while (normalized.length > 0 && normalized[0] === '') {
102
+ normalized.shift();
103
+ }
104
+ while (normalized.length > 0 && normalized[normalized.length - 1] === '') {
105
+ normalized.pop();
106
+ }
107
+ return normalized.length > 0 ? `${normalized.join('\n')}\n` : '';
108
+ }
109
+ export function hashSemanticDocument(raw) {
110
+ return hashNormalizedMarkdownContent(raw);
111
+ }
112
+ export function hashTasksContract(raw) {
113
+ if (raw === null) {
114
+ return null;
115
+ }
116
+ return sha256(stableJson({
117
+ tasks: parseTaskContracts(raw),
118
+ declarations: TOP_LEVEL_CONTRACT_SECTION_TITLES.map((title) => [title, normalizeSectionText(sectionText(raw, title))]).filter(([, value]) => value !== null)
119
+ }));
120
+ }
121
+ export function documentHashMatches(expected, actual) {
122
+ return expected.replace(/^sha256:/, '') === actual;
123
+ }
124
+ function parseTaskContracts(raw) {
125
+ const fencedBlocks = Array.from(raw.matchAll(/^\s*```sdd-task\s*\r?\n([\s\S]*?)\r?^\s*```\s*$/gm));
126
+ return fencedBlocks.map((blockMatch, index) => {
127
+ const block = blockMatch[1] ?? '';
128
+ const blockStart = blockMatch.index ?? 0;
129
+ const blockEnd = blockStart + blockMatch[0].length;
130
+ const nextBlockStart = fencedBlocks[index + 1]?.index ?? raw.length;
131
+ const section = raw.slice(blockEnd, nextTaskStart(raw, blockEnd, nextBlockStart));
132
+ const metadata = parseSimpleYamlBlock(block);
133
+ const heading = nearestTaskHeading(raw.slice(0, blockStart));
134
+ const id = scalarValue(metadata.id) ?? heading?.id ?? null;
135
+ return {
136
+ id,
137
+ title: heading?.title ?? null,
138
+ metadata: Object.fromEntries(TASK_CONTRACT_METADATA_KEYS.map((key) => [key, normalizedMetadataValue(metadata[key])])),
139
+ sections: Object.fromEntries(TASK_CONTRACT_SECTION_TITLES.map((title) => [title, normalizeSectionText(sectionText(section, title))]))
140
+ };
141
+ }).sort((left, right) => String(left.id ?? '').localeCompare(String(right.id ?? '')));
142
+ }
143
+ function normalizeLineEndings(raw) {
144
+ return raw.replace(/\r\n?/g, '\n');
145
+ }
146
+ function parseOpeningFence(line) {
147
+ const match = line.match(/^\s*(`{3,}|~{3,})/);
148
+ if (!match) {
149
+ return null;
150
+ }
151
+ const marker = match[1];
152
+ return { character: marker[0], length: marker.length };
153
+ }
154
+ function isClosingFence(line, fence) {
155
+ const escaped = fence.character === '`' ? '`' : '~';
156
+ const match = line.match(new RegExp(`^\\s*(${escaped}{${fence.length},})\\s*$`));
157
+ return Boolean(match);
158
+ }
159
+ function isStandaloneHtmlComment(line) {
160
+ return /^\s*<!--[\s\S]*?-->\s*$/.test(line);
161
+ }
162
+ function isRuntimeMetadataLine(line) {
163
+ const match = line.match(/^\s*(?:-\s*)?([A-Za-z0-9_]+):\s*/);
164
+ if (!match) {
165
+ return false;
166
+ }
167
+ const key = match[1];
168
+ const normalizedKey = key.toLowerCase();
169
+ return /^based_on_.*_hash$/.test(normalizedKey)
170
+ || RUNTIME_METADATA_KEYS.has(normalizedKey);
171
+ }
172
+ function normalizeSectionText(value) {
173
+ if (!value) {
174
+ return null;
175
+ }
176
+ return value.replace(/\r\n/g, '\n').split('\n').map((line) => line.trim()).filter((line) => line && !/^<!--.*-->$/.test(line)).join('\n');
177
+ }
178
+ function sectionText(raw, title) {
179
+ const escaped = title.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
180
+ const sectionPattern = `^\\s*#{2,4}\\s+${escaped}\\s*$([\\s\\S]*?)(?=^\\s*#{2,4}\\s+|$(?![\\s\\S]))`;
181
+ const match = raw.match(new RegExp(sectionPattern, 'im'));
182
+ const text = match?.[1]?.trim() ?? '';
183
+ return text.length > 0 ? text : null;
184
+ }
185
+ function parseSimpleYamlBlock(raw) {
186
+ const result = {};
187
+ const lines = raw.split(/\r?\n/);
188
+ let currentListKey = null;
189
+ for (const line of lines) {
190
+ const trimmed = line.trim();
191
+ if (!trimmed || trimmed.startsWith('#')) {
192
+ continue;
193
+ }
194
+ if (currentListKey && /^-\s+/.test(trimmed)) {
195
+ const current = result[currentListKey];
196
+ const items = Array.isArray(current) ? current : [];
197
+ items.push(unquoteSimpleYamlValue(trimmed.slice(2).trim()));
198
+ result[currentListKey] = items;
199
+ continue;
200
+ }
201
+ const scalarMatch = trimmed.match(/^([A-Za-z0-9_-]+):\s*(.*)$/);
202
+ if (!scalarMatch) {
203
+ currentListKey = null;
204
+ continue;
205
+ }
206
+ const key = scalarMatch[1];
207
+ const value = scalarMatch[2].trim();
208
+ if (value === '') {
209
+ result[key] = [];
210
+ currentListKey = key;
211
+ }
212
+ else if (value === '[]') {
213
+ result[key] = [];
214
+ currentListKey = null;
215
+ }
216
+ else if (value.startsWith('[') && value.endsWith(']')) {
217
+ result[key] = value.slice(1, -1).split(',').map((item) => unquoteSimpleYamlValue(item.trim())).filter(Boolean);
218
+ currentListKey = null;
219
+ }
220
+ else {
221
+ result[key] = unquoteSimpleYamlValue(value);
222
+ currentListKey = null;
223
+ }
224
+ }
225
+ return result;
226
+ }
227
+ function normalizedMetadataValue(value) {
228
+ if (Array.isArray(value)) {
229
+ return [...value].filter(Boolean).sort();
230
+ }
231
+ return value && value !== '[]' ? value : null;
232
+ }
233
+ function scalarValue(value) {
234
+ return typeof value === 'string' && value.length > 0 ? value : null;
235
+ }
236
+ function unquoteSimpleYamlValue(value) {
237
+ if (value.length >= 2) {
238
+ const first = value[0];
239
+ const last = value[value.length - 1];
240
+ if ((first === '"' && last === '"') || (first === "'" && last === "'")) {
241
+ return value.slice(1, -1);
242
+ }
243
+ }
244
+ return value;
245
+ }
246
+ function nearestTaskHeading(prefix) {
247
+ const matches = Array.from(prefix.matchAll(/^\s*###\s+(.+)$/gm));
248
+ const last = matches.at(-1);
249
+ if (!last) {
250
+ return null;
251
+ }
252
+ const raw = last[1].trim();
253
+ const parsed = raw.match(/^([^::\s]+)\s*[::]\s*(.+)$/);
254
+ return {
255
+ raw,
256
+ id: parsed?.[1]?.trim() ?? null,
257
+ title: parsed?.[2]?.trim() ?? raw
258
+ };
259
+ }
260
+ function nextTaskStart(raw, offset, limit = raw.length) {
261
+ const next = raw.slice(offset, limit).search(/^\s*###\s+/m);
262
+ return next < 0 ? limit : offset + next;
263
+ }
264
+ function stableJson(value) {
265
+ if (Array.isArray(value)) {
266
+ return `[${value.map(stableJson).join(',')}]`;
267
+ }
268
+ if (value && typeof value === 'object') {
269
+ return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${stableJson(item)}`).join(',')}}`;
270
+ }
271
+ return JSON.stringify(value);
272
+ }
273
+ function sha256(value) {
274
+ return createHash('sha256').update(value, 'utf8').digest('hex');
275
+ }
276
+ //# sourceMappingURL=document-hashes.js.map