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
@@ -0,0 +1,235 @@
1
+ import { readLifecycleRiskDecisionProjection } from '../risk/kernel.js';
2
+ import { resolveSddContext } from '../sdd-docs/context.js';
3
+ import { parseSddBranch } from '../sdd-docs/task-parser.js';
4
+ import { STAGE_ROUTE_BINDING_PRODUCER_VERSION, STAGE_ROUTE_BINDING_PROJECTION_TYPE, runtimeProjectionStableHash } from '../runtime-projection-p0.js';
5
+ import { recordRuntimeProjectionEnvelope } from '../storage/runtime-store.js';
6
+ export const STAGE_ROUTE_BINDING_CONTRACT_VERSION = 'sdd-stage-route-binding-v1';
7
+ export async function bindStageRoute(projectRoot, input) {
8
+ const context = await resolveSddContext(projectRoot, { branch: input.branch, branchSource: input.branch ? 'cli_option' : undefined });
9
+ const model = await parseSddBranch(projectRoot, context.partition);
10
+ return bindStageRouteForModel(projectRoot, {
11
+ branch: context.partition,
12
+ model,
13
+ entry: input.entry,
14
+ userText: input.userText ?? ''
15
+ });
16
+ }
17
+ export async function bindStageRouteForModel(projectRoot, input) {
18
+ const userText = (input.userText ?? '').trim();
19
+ const activeLifecycleDecisionRef = (await readLifecycleRiskDecisionProjection(projectRoot, { branch: input.branch }))?.id ?? null;
20
+ if (input.entry === 'sdd:do') {
21
+ return bindDoTask(input.branch, input.model, userText, activeLifecycleDecisionRef);
22
+ }
23
+ return bindBundleStage(input.branch, input.entry, userText, activeLifecycleDecisionRef);
24
+ }
25
+ export function stageRouteBindingScopeKey(binding) {
26
+ return [binding.branch, binding.entry, runtimeProjectionStableHash(binding.userText || '<empty>').slice(0, 16)].join(':');
27
+ }
28
+ export async function recordStageRouteBindingProjection(projectRoot, binding) {
29
+ return recordRuntimeProjectionEnvelope(projectRoot, {
30
+ projectionType: STAGE_ROUTE_BINDING_PROJECTION_TYPE,
31
+ scopeKey: stageRouteBindingScopeKey(binding),
32
+ inputHash: runtimeProjectionStableHash(binding),
33
+ producer: 'phase9.18-stage-route-binding-runtime',
34
+ producerVersion: STAGE_ROUTE_BINDING_PRODUCER_VERSION,
35
+ payload: binding
36
+ });
37
+ }
38
+ function bindDoTask(branch, model, userText, activeLifecycleDecisionRef) {
39
+ const staleReason = doStageStaleReason(model);
40
+ if (staleReason) {
41
+ return binding({
42
+ branch,
43
+ entry: 'sdd:do',
44
+ targetRuntimeStage: 'do',
45
+ userText,
46
+ status: 'stale_upstream',
47
+ targetKind: 'task',
48
+ targetId: null,
49
+ matchedRefs: [],
50
+ activeLifecycleDecisionRef,
51
+ nextAction: 'runtime_repair_required',
52
+ reasons: [staleReason]
53
+ });
54
+ }
55
+ const matches = matchTasks(model.tasks, userText);
56
+ if (matches.length === 0) {
57
+ const looksLikeId = looksLikeTaskId(userText);
58
+ return binding({
59
+ branch,
60
+ entry: 'sdd:do',
61
+ targetRuntimeStage: 'do',
62
+ userText,
63
+ status: looksLikeId ? 'not_found' : 'boundary_expanding',
64
+ targetKind: 'task',
65
+ targetId: null,
66
+ matchedRefs: [],
67
+ activeLifecycleDecisionRef,
68
+ nextAction: looksLikeId ? 'ask_clarification' : 'route_to_lifecycle_decision',
69
+ reasons: looksLikeId
70
+ ? [`Task ${userText || '<empty>'} was not found in the accepted task set.`]
71
+ : [`No accepted task boundary matched "${userText}"; run /sdd or /sdd:spec if this is new scope, risk, or acceptance.`]
72
+ });
73
+ }
74
+ const topScore = matches[0].score;
75
+ const tied = matches.filter((candidate) => candidate.score === topScore);
76
+ if (tied.length > 1) {
77
+ return binding({
78
+ branch,
79
+ entry: 'sdd:do',
80
+ targetRuntimeStage: 'do',
81
+ userText,
82
+ status: 'ambiguous',
83
+ targetKind: 'task',
84
+ targetId: null,
85
+ matchedRefs: tied.map((candidate) => taskRuntimeRef(candidate.task)),
86
+ activeLifecycleDecisionRef,
87
+ nextAction: 'ask_clarification',
88
+ reasons: [`Ambiguous task text "${userText}" matched ${tied.map((candidate) => candidate.task.id).join(', ')}; specify a task id or more precise title.`]
89
+ });
90
+ }
91
+ const task = matches[0].task;
92
+ return binding({
93
+ branch,
94
+ entry: 'sdd:do',
95
+ targetRuntimeStage: 'do',
96
+ userText,
97
+ status: 'bound',
98
+ targetKind: 'task',
99
+ targetId: task.id,
100
+ matchedRefs: [taskRuntimeRef(task)],
101
+ activeLifecycleDecisionRef,
102
+ nextAction: 'enter_stage',
103
+ reasons: [`Bound "${userText}" to task ${task.id}.`]
104
+ });
105
+ }
106
+ function bindBundleStage(branch, entry, userText, activeLifecycleDecisionRef) {
107
+ const targetRuntimeStage = bundleTargetRuntimeStage(entry, userText);
108
+ return binding({
109
+ branch,
110
+ entry,
111
+ targetRuntimeStage,
112
+ userText,
113
+ status: 'bound',
114
+ targetKind: entry === 'sdd:ship' ? 'ship_scope' : 'stage',
115
+ targetId: targetRuntimeStage,
116
+ matchedRefs: [{ kind: entry === 'sdd:ship' ? 'projection' : 'command', ref: `${entry}:${targetRuntimeStage}` }],
117
+ activeLifecycleDecisionRef,
118
+ nextAction: targetRuntimeStage === bundleForEntry(entry) ? 'enter_stage' : 'run_internal_stage',
119
+ reasons: [`Bound ${entry} to runtime stage ${targetRuntimeStage}.`]
120
+ });
121
+ }
122
+ function binding(input) {
123
+ return {
124
+ contract: STAGE_ROUTE_BINDING_CONTRACT_VERSION,
125
+ bundle: bundleForEntry(input.entry),
126
+ ...input
127
+ };
128
+ }
129
+ function bundleForEntry(entry) {
130
+ if (entry === 'sdd:plan')
131
+ return 'plan';
132
+ if (entry === 'sdd:tasks')
133
+ return 'tasks';
134
+ if (entry === 'sdd:do')
135
+ return 'do';
136
+ if (entry === 'sdd:test')
137
+ return 'test';
138
+ return 'ship';
139
+ }
140
+ function bundleTargetRuntimeStage(entry, userText) {
141
+ const normalized = normalizeSearchText(userText);
142
+ if (entry === 'sdd:plan')
143
+ return 'plan';
144
+ if (entry === 'sdd:tasks')
145
+ return normalized.includes('verif') || normalized.includes('verify') ? 'verifies' : 'tasks';
146
+ if (entry === 'sdd:test')
147
+ return normalized.includes('goalverify') || normalized.includes('goal') ? 'goal-verify' : 'test';
148
+ return 'ship';
149
+ }
150
+ function doStageStaleReason(model) {
151
+ if (model.documents.tasksStale) {
152
+ return 'Tasks document is stale; return to the tasks bundle before executing do-stage binding.';
153
+ }
154
+ if (model.documents.verifyStale) {
155
+ return 'Verify document is stale; return to the tasks/verifies bundle before executing do-stage binding.';
156
+ }
157
+ return null;
158
+ }
159
+ function matchTasks(tasks, userText) {
160
+ const query = normalizeSearchText(userText);
161
+ if (!query) {
162
+ return [];
163
+ }
164
+ return tasks
165
+ .map((task) => ({ task, score: scoreTask(task, userText, query) }))
166
+ .filter((candidate) => candidate.score >= 40)
167
+ .sort((left, right) => right.score - left.score || left.task.id.localeCompare(right.task.id));
168
+ }
169
+ function scoreTask(task, rawQuery, normalizedQuery) {
170
+ const normalizedId = normalizeSearchText(task.id);
171
+ if (normalizedId === normalizedQuery) {
172
+ return 1000;
173
+ }
174
+ if (normalizedId.includes(normalizedQuery) && normalizedQuery.length >= 2) {
175
+ return 700;
176
+ }
177
+ let score = 0;
178
+ score = Math.max(score, scoreTextField(task.title ?? '', rawQuery, normalizedQuery, 600, 360, 80));
179
+ score = Math.max(score, scoreTextField(task.acceptance.join(' '), rawQuery, normalizedQuery, 260, 180, 35));
180
+ score = Math.max(score, scoreTextField(task.boundary ?? '', rawQuery, normalizedQuery, 180, 120, 24));
181
+ score = Math.max(score, scoreTextField(task.affectedFiles.join(' '), rawQuery, normalizedQuery, 120, 80, 12));
182
+ return score;
183
+ }
184
+ function scoreTextField(value, rawQuery, normalizedQuery, exactScore, containsScore, tokenWeight) {
185
+ const normalizedValue = normalizeSearchText(value);
186
+ if (!normalizedValue) {
187
+ return 0;
188
+ }
189
+ if (normalizedValue === normalizedQuery) {
190
+ return exactScore;
191
+ }
192
+ if ((normalizedValue.includes(normalizedQuery) || normalizedQuery.includes(normalizedValue)) && Math.min(normalizedValue.length, normalizedQuery.length) >= 2) {
193
+ return containsScore;
194
+ }
195
+ const queryTokens = searchTokens(rawQuery);
196
+ const valueTokens = searchTokens(value);
197
+ let overlap = 0;
198
+ for (const token of queryTokens) {
199
+ if (valueTokens.has(token)) {
200
+ overlap += 1;
201
+ }
202
+ }
203
+ return overlap * tokenWeight;
204
+ }
205
+ function normalizeSearchText(value) {
206
+ return value.toLocaleLowerCase().normalize('NFKC').replace(/[\s\p{P}\p{S}_-]+/gu, '');
207
+ }
208
+ const LOW_SIGNAL_SEARCH_TOKENS = new Set(['system', 'systems', 'feature', 'features', '功能', '系统', '模块', '服务', '任务', '实现', '完成', '边界']);
209
+ function searchTokens(value) {
210
+ const tokens = new Set();
211
+ const normalized = value.toLocaleLowerCase().normalize('NFKC');
212
+ for (const match of normalized.matchAll(/[a-z0-9]+/g)) {
213
+ addSearchToken(tokens, match[0]);
214
+ }
215
+ for (const match of normalized.matchAll(/\p{Script=Han}+/gu)) {
216
+ const text = match[0];
217
+ addSearchToken(tokens, text);
218
+ for (let index = 0; index < text.length - 1; index += 1) {
219
+ addSearchToken(tokens, text.slice(index, index + 2));
220
+ }
221
+ }
222
+ return tokens;
223
+ }
224
+ function addSearchToken(tokens, token) {
225
+ if (token.length >= 2 && !LOW_SIGNAL_SEARCH_TOKENS.has(token)) {
226
+ tokens.add(token);
227
+ }
228
+ }
229
+ function looksLikeTaskId(value) {
230
+ return /^[a-z][a-z0-9._-]*-?\d+$/i.test(value.trim());
231
+ }
232
+ function taskRuntimeRef(task) {
233
+ return { kind: 'task', ref: `task:${task.id}` };
234
+ }
235
+ //# sourceMappingURL=stage-route-binding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage-route-binding.js","sourceRoot":"","sources":["../../src/router/stage-route-binding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAmC,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,oCAAoC,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACrJ,OAAO,EAAE,+BAA+B,EAA6C,MAAM,6BAA6B,CAAC;AAEzH,MAAM,CAAC,MAAM,oCAAoC,GAAG,4BAAqC,CAAC;AA6B1F,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,WAAmB,EAAE,KAAqE;IAC7H,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IACtI,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnE,OAAO,sBAAsB,CAAC,WAAW,EAAE;QACzC,MAAM,EAAE,OAAO,CAAC,SAAS;QACzB,KAAK;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE;KAC/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AAI,CAAC,EAAE,EAAE,EAAE,CAAC;AAClD,CAAC"}
@@ -2,3 +2,5 @@ export * from './router/agent-runtime-config.js';
2
2
  export * from './router/agent-runtime.js';
3
3
  export * from './router/route-cache.js';
4
4
  export * from './router/route-sdd-task.js';
5
+ export * from './router/stage-route-binding.js';
6
+ export * from './router/runtime-import.js';
@@ -2,4 +2,6 @@ export * from './router/agent-runtime-config.js';
2
2
  export * from './router/agent-runtime.js';
3
3
  export * from './router/route-cache.js';
4
4
  export * from './router/route-sdd-task.js';
5
+ export * from './router/stage-route-binding.js';
6
+ export * from './router/runtime-import.js';
5
7
  //# sourceMappingURL=router.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
@@ -2,5 +2,21 @@ export declare function writeArtifact(projectRoot: string, runId: string, artifa
2
2
  absolutePath: string;
3
3
  runRelativePath: string;
4
4
  }>;
5
+ export declare function recordStageEvidenceArtifact(projectRoot: string, runId: string, stageEvidenceRef: string, content: string, options?: {
6
+ taskId?: string | null;
7
+ artifactRole?: string;
8
+ }): Promise<{
9
+ absolutePath: string;
10
+ runRelativePath: string;
11
+ }>;
12
+ export declare function recordRuntimeOnlyArtifact(projectRoot: string, runId: string, artifactRootRelativePath: string, content: string, options?: {
13
+ logicalRef?: string;
14
+ branch?: string | null;
15
+ taskId?: string | null;
16
+ artifactRole?: string;
17
+ }): Promise<{
18
+ absolutePath: string;
19
+ runRelativePath: string;
20
+ }>;
5
21
  export declare function readArtifact(projectRoot: string, runId: string, artifactRootRelativePath: string): Promise<string>;
6
22
  export declare function artifactKind(artifactPath: string): string;
@@ -1,15 +1,16 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
- import { getArtifactPath, getEvidenceAttachmentPath, getRunRelativeArtifactPath, normalizeArtifactRootRelativePath } from '../runtime-paths.js';
5
- import { readRuntimeRunState, recordRuntimeEvidenceAttachment, runtimeScopedId, withRuntimeStore } from '../storage/runtime-store.js';
6
- import { exists } from '../storage/json-io.js';
4
+ import { getBranchStageEvidencePathFromRef, getEvidenceAttachmentPath, getLegacyArtifactPath, getRunRelativeArtifactPath, getRuntimeStorePath, isBranchStageEvidenceRef, normalizeArtifactRootRelativePath, normalizeBranchStageEvidenceRef, toBranchStageEvidenceRef } from '../runtime-paths.js';
5
+ import { readRuntimeRunState, recordRuntimeArtifactPayload, recordRuntimeEvidenceAttachment, resolveRuntimeArtifactPayload, runtimeScopedId, withRuntimeStore } from '../storage/runtime-store.js';
7
6
  import { appendArtifactHashLedgerEntry } from './invocation-ledger.js';
8
7
  export async function writeArtifact(projectRoot, runId, artifactRootRelativePath, content) {
9
8
  const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
10
9
  const runRelativePath = getRunRelativeArtifactPath(normalized);
11
- const branchSlug = await resolveRunBranchSlug(projectRoot, runId);
12
- const absolutePath = getEvidenceAttachmentPath(projectRoot, branchSlug, runRelativePath);
10
+ const runScope = await resolveRunScope(projectRoot, runId);
11
+ const contentHash = hashDocumentContent(content);
12
+ const physicalPayloadPath = uniquePhysicalPayloadPath(runRelativePath, runId, contentHash);
13
+ const absolutePath = getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, physicalPayloadPath);
13
14
  await mkdir(path.dirname(absolutePath), { recursive: true });
14
15
  await writeFile(absolutePath, content, 'utf8');
15
16
  await appendArtifactHashLedgerEntry(projectRoot, {
@@ -18,26 +19,172 @@ export async function writeArtifact(projectRoot, runId, artifactRootRelativePath
18
19
  content,
19
20
  status: 'written'
20
21
  });
21
- await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written' });
22
+ await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written', taskId: runScope.taskId });
23
+ await recordRuntimeArtifactPayload(projectRoot, {
24
+ payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
25
+ runId,
26
+ sourceRunId: runId,
27
+ branchSlug: runScope.branchSlug,
28
+ taskId: runScope.taskId,
29
+ logicalRef: runRelativePath,
30
+ physicalPayloadPath,
31
+ artifactRole: artifactKind(runRelativePath),
32
+ digest: contentHash,
33
+ status: 'active',
34
+ payload: { logicalRef: runRelativePath, physicalPayloadPath, artifactPath: runRelativePath, status: 'written' }
35
+ });
22
36
  await recordRuntimeEvidenceAttachment(projectRoot, {
23
- branchSlug,
37
+ branchSlug: runScope.branchSlug,
24
38
  runId,
39
+ taskId: runScope.taskId,
25
40
  kind: artifactKind(runRelativePath),
41
+ relativePath: physicalPayloadPath,
42
+ contentHash,
43
+ bytes: Buffer.byteLength(content, 'utf8'),
44
+ payload: { logicalRef: runRelativePath, physicalPayloadPath, status: 'written' }
45
+ });
46
+ return { absolutePath, runRelativePath };
47
+ }
48
+ export async function recordStageEvidenceArtifact(projectRoot, runId, stageEvidenceRef, content, options = {}) {
49
+ const runRelativePath = normalizeBranchStageEvidenceRef(stageEvidenceRef);
50
+ const runScope = await resolveRunScope(projectRoot, runId);
51
+ const taskId = options.taskId ?? runScope.taskId;
52
+ const contentHash = hashDocumentContent(content);
53
+ const absolutePath = getBranchStageEvidencePathFromRef(projectRoot, runRelativePath);
54
+ await mkdir(path.dirname(absolutePath), { recursive: true });
55
+ await writeFile(absolutePath, content, 'utf8');
56
+ await appendArtifactHashLedgerEntry(projectRoot, {
57
+ runId,
58
+ taskId,
59
+ branch: runScope.branchSlug,
60
+ artifactPath: runRelativePath,
61
+ content,
62
+ status: 'written'
63
+ });
64
+ await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written', taskId });
65
+ await recordRuntimeArtifactPayload(projectRoot, {
66
+ payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
67
+ runId,
68
+ sourceRunId: runId,
69
+ branchSlug: runScope.branchSlug,
70
+ taskId,
71
+ logicalRef: runRelativePath,
72
+ physicalPayloadPath: runRelativePath,
73
+ artifactRole: options.artifactRole ?? artifactKind(runRelativePath),
74
+ digest: contentHash,
75
+ status: 'active',
76
+ payload: { logicalRef: runRelativePath, physicalPayloadPath: runRelativePath, storage: 'stage-evidence', status: 'written' }
77
+ });
78
+ await recordRuntimeEvidenceAttachment(projectRoot, {
79
+ branchSlug: runScope.branchSlug,
80
+ runId,
81
+ taskId,
82
+ kind: options.artifactRole ?? artifactKind(runRelativePath),
26
83
  relativePath: runRelativePath,
27
- contentHash: hashDocumentContent(content),
84
+ contentHash,
28
85
  bytes: Buffer.byteLength(content, 'utf8'),
29
- payload: { artifactPath: runRelativePath, status: 'written' }
86
+ payload: { logicalRef: runRelativePath, physicalPayloadPath: runRelativePath, storage: 'stage-evidence', status: 'written' }
30
87
  });
31
88
  return { absolutePath, runRelativePath };
32
89
  }
90
+ export async function recordRuntimeOnlyArtifact(projectRoot, runId, artifactRootRelativePath, content, options = {}) {
91
+ const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
92
+ const runRelativePath = options.logicalRef ?? getRunRelativeArtifactPath(normalized);
93
+ const runScope = await resolveRunScope(projectRoot, runId);
94
+ const branchSlug = options.branch ?? runScope.branchSlug;
95
+ const taskId = options.taskId ?? runScope.taskId;
96
+ const contentHash = hashDocumentContent(content);
97
+ const physicalPayloadPath = `runtime.sqlite:${runId}:${runRelativePath}`;
98
+ await appendArtifactHashLedgerEntry(projectRoot, {
99
+ runId,
100
+ taskId,
101
+ branch: branchSlug,
102
+ artifactPath: runRelativePath,
103
+ content,
104
+ status: 'recorded'
105
+ });
106
+ await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'recorded', taskId });
107
+ await recordRuntimeArtifactPayload(projectRoot, {
108
+ payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
109
+ runId,
110
+ sourceRunId: runId,
111
+ branchSlug,
112
+ taskId,
113
+ logicalRef: runRelativePath,
114
+ physicalPayloadPath,
115
+ artifactRole: options.artifactRole ?? artifactKind(runRelativePath),
116
+ digest: contentHash,
117
+ status: 'active',
118
+ payload: { logicalRef: runRelativePath, physicalPayloadPath, storage: 'runtime.sqlite', content }
119
+ });
120
+ await recordRuntimeEvidenceAttachment(projectRoot, {
121
+ branchSlug,
122
+ runId,
123
+ taskId,
124
+ kind: options.artifactRole ?? artifactKind(runRelativePath),
125
+ relativePath: physicalPayloadPath,
126
+ contentHash,
127
+ bytes: Buffer.byteLength(content, 'utf8'),
128
+ payload: { logicalRef: runRelativePath, physicalPayloadPath, storage: 'runtime.sqlite' }
129
+ });
130
+ return { absolutePath: `${getRuntimeStorePath(projectRoot)}#${runRelativePath}`, runRelativePath };
131
+ }
33
132
  export async function readArtifact(projectRoot, runId, artifactRootRelativePath) {
34
133
  const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
35
134
  const runRelativePath = getRunRelativeArtifactPath(normalized);
36
- const evidencePath = getEvidenceAttachmentPath(projectRoot, await resolveRunBranchSlug(projectRoot, runId), runRelativePath);
37
- if (await exists(evidencePath)) {
38
- return readFile(evidencePath, 'utf8');
135
+ const runScope = await resolveRunScope(projectRoot, runId);
136
+ const payload = await resolveRuntimeArtifactPayload(projectRoot, runId, runRelativePath)
137
+ ?? await resolveRuntimeArtifactPayload(projectRoot, runId, runtimeStageEvidenceRef(runScope.branchSlug, normalized));
138
+ const payloadContent = runtimePayloadContent(payload);
139
+ if (payloadContent !== null) {
140
+ return payloadContent;
141
+ }
142
+ if (payload) {
143
+ if (isBranchStageEvidenceRef(payload.physicalPayloadPath)) {
144
+ return readFile(getBranchStageEvidencePathFromRef(projectRoot, payload.physicalPayloadPath), 'utf8');
145
+ }
146
+ return readFile(getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, payload.physicalPayloadPath), 'utf8');
147
+ }
148
+ const stageEvidenceRef = runtimeStageEvidenceRef(runScope.branchSlug, normalized);
149
+ try {
150
+ return await readFile(getBranchStageEvidencePathFromRef(projectRoot, stageEvidenceRef), 'utf8');
39
151
  }
40
- return readFile(getArtifactPath(projectRoot, runId, normalized), 'utf8');
152
+ catch {
153
+ try {
154
+ return await readFile(getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, runRelativePath), 'utf8');
155
+ }
156
+ catch {
157
+ return readFile(getLegacyArtifactPath(projectRoot, runId, normalized), 'utf8');
158
+ }
159
+ }
160
+ }
161
+ function runtimePayloadContent(payload) {
162
+ if (!payload || !payload.payload || typeof payload.payload !== 'object' || Array.isArray(payload.payload)) {
163
+ return null;
164
+ }
165
+ const content = payload.payload.content;
166
+ return typeof content === 'string' ? content : null;
167
+ }
168
+ function runtimeStageEvidenceRef(branch, artifactRootRelativePath) {
169
+ const fileName = path.posix.basename(artifactRootRelativePath.replace(/\\/g, '/'));
170
+ return toBranchStageEvidenceRef(branch, runtimeStageForArtifact(fileName), fileName);
171
+ }
172
+ function runtimeStageForArtifact(fileName) {
173
+ if (fileName.startsWith('acceptance-coverage-')) {
174
+ return 'goal-verify';
175
+ }
176
+ if (fileName.startsWith('test-') || fileName.startsWith('validation-')) {
177
+ return 'test';
178
+ }
179
+ if (fileName.startsWith('ship-') || fileName.startsWith('release-')) {
180
+ return 'ship';
181
+ }
182
+ return 'do';
183
+ }
184
+ function uniquePhysicalPayloadPath(logicalRef, runId, digest) {
185
+ const parsed = path.posix.parse(logicalRef.replace(/\\/g, '/'));
186
+ const suffix = `${runId}-${digest.slice(0, 12)}`;
187
+ return path.posix.join(parsed.dir, `${parsed.name}-${suffix}${parsed.ext}`);
41
188
  }
42
189
  export function artifactKind(artifactPath) {
43
190
  const fileName = path.posix.basename(artifactPath.replace(/\\/g, '/'));
@@ -50,15 +197,15 @@ export function artifactKind(artifactPath) {
50
197
  if (fileName.startsWith('debug-')) {
51
198
  return 'debug';
52
199
  }
200
+ if (fileName.startsWith('test-validation-')) {
201
+ return 'test-validation';
202
+ }
53
203
  if (fileName.startsWith('validation-')) {
54
204
  return 'validation';
55
205
  }
56
206
  if (fileName.startsWith('gap-report-')) {
57
207
  return 'gap-report';
58
208
  }
59
- if (fileName === 'sync-back-proposal.md') {
60
- return 'sync-back-proposal';
61
- }
62
209
  return 'artifact';
63
210
  }
64
211
  async function recordRuntimeArtifact(projectRoot, input) {
@@ -70,9 +217,12 @@ async function recordRuntimeArtifact(projectRoot, input) {
70
217
  .run(runtimeScopedId(input.runId, input.path, contentHash), input.runId, input.path, artifactKind(input.path), input.taskId ?? null, input.agent ?? null, contentHash, Buffer.byteLength(input.content, 'utf8'), input.status, now, payload);
71
218
  });
72
219
  }
73
- async function resolveRunBranchSlug(projectRoot, runId) {
220
+ async function resolveRunScope(projectRoot, runId) {
74
221
  const state = await readRuntimeRunState(projectRoot, runId);
75
- return state?.gitBranch ?? state?.partition ?? 'unscoped';
222
+ return {
223
+ branchSlug: state?.gitBranch ?? state?.partition ?? 'unscoped',
224
+ taskId: state?.taskId ?? state?.currentTask ?? null
225
+ };
76
226
  }
77
227
  function hashDocumentContent(raw) {
78
228
  return createHash('sha256').update(raw.replace(/\r\n/g, '\n'), 'utf8').digest('hex');
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../src/run-state/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,iCAAiC,E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AAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACjP,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,WAAmB,EAAE,KAAa;IAC/D,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC5D,OAAO;QACL,UAAU,EAAE,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,IAAI,UAAU;QAC9D,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,EAAE,WAAW,IAAI,IAAI;KACpD,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import { EVENT_LOG_CONTRACT } from '../contracts.js';
3
- import { getRunDir } from '../runtime-paths.js';
3
+ import { getLegacyRunDir } from '../runtime-paths.js';
4
4
  import { importLegacyRunEventsIfNeeded, readRuntimeRunEvents, recordRuntimeEvent } from '../storage/runtime-store.js';
5
5
  export async function appendEvent(projectRoot, runId, event) {
6
6
  const nextEvent = {
@@ -16,7 +16,7 @@ export async function readRunEvents(projectRoot, runId) {
16
16
  if (storedEvents.length > 0) {
17
17
  return storedEvents;
18
18
  }
19
- const eventPath = path.join(getRunDir(projectRoot, runId), 'events.jsonl');
19
+ const eventPath = path.join(getLegacyRunDir(projectRoot, runId), 'events.jsonl');
20
20
  await importLegacyRunEventsIfNeeded(projectRoot, runId, eventPath);
21
21
  return readRuntimeRunEvents(projectRoot, runId);
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/run-state/events.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,KAAa,EAAE,KAA8C;IAClH,MAAM,SAAS,GAAiB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,GAAG,KAAK;KACT,CAAC;IACF,MAAM,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB,EAAE,KAAa;IACpE,MAAM,YAAY,GAAG,MAAM,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpE,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,cAAc,CAAC,CAAC;IAC3E,MAAM,6BAA6B,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACnE,OAAO,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/run-state/events.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,KAAa,EAAE,KAA8C;IAClH,MAAM,SAAS,GAAiB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,GAAG,KAAK;KACT,CAAC;IACF,MAAM,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB,EAAE,KAAa;IACpE,MAAM,YAAY,GAAG,MAAM,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpE,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,cAAc,CAAC,CAAC;IACjF,MAAM,6BAA6B,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACnE,OAAO,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { TASK_RUN_EVIDENCE_CONTRACT_VERSION } from '../contracts.js';
2
2
  import type { ArtifactIndexEntry, InvocationLedgerEntry, RunState, RunStateArtifactIngestionRecord, RunStateWorktreeLifecycleRecord, RunStatus, RunSummary, RuntimeEvent } from './model.js';
3
+ import { type TaskEvidenceView } from './task-evidence.js';
3
4
  export interface TaskRunEvidenceGap {
4
5
  type: string;
5
6
  severity: string;
@@ -20,7 +21,7 @@ export interface AgentExecutionRecordView {
20
21
  } | null;
21
22
  routeId: string;
22
23
  routeDecision: {
23
- recommendedProfile?: string;
24
+ recommendedProfile?: string | null;
24
25
  };
25
26
  createdAt: string;
26
27
  [key: string]: unknown;
@@ -73,7 +74,6 @@ export interface TaskRunEvidenceContract {
73
74
  artifacts: ArtifactIndexEntry[];
74
75
  validation: RunState['validation'];
75
76
  gaps: TaskRunEvidenceGap[];
76
- syncBackProposal: string | null;
77
77
  invocationLedger: InvocationLedgerEntry[];
78
78
  agentExecutions: AgentExecutionRecordView[];
79
79
  teamSessions: TeamSessionRecordView[];
@@ -89,9 +89,9 @@ export interface RunInspection {
89
89
  artifactIngestions: RunStateArtifactIngestionRecord[];
90
90
  worktrees: RunStateWorktreeLifecycleRecord[];
91
91
  validation: RunState['validation'];
92
- syncBack: RunState['syncBack'];
93
92
  tasks: Record<string, unknown>;
94
93
  taskRunEvidence: TaskRunEvidenceContract;
94
+ taskEvidenceView: TaskEvidenceView | null;
95
95
  agentExecutions: AgentExecutionRecordView[];
96
96
  invocationLedger: InvocationLedgerEntry[];
97
97
  teamSessions: TeamSessionRecordView[];