sdd-agent-platform 0.3.0 → 0.4.0

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 (1290) hide show
  1. package/README.md +239 -239
  2. package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/ai-tools.d.ts +3 -2
  3. package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/ai-tools.js +246 -100
  4. package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -0
  5. package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.d.ts +24 -0
  6. package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +181 -0
  7. package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -0
  8. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.d.ts +47 -0
  9. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +241 -0
  10. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -0
  11. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.d.ts +29 -0
  12. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +198 -0
  13. package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -0
  14. package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.d.ts +10 -0
  15. package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.js +79 -0
  16. package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.js.map +1 -0
  17. package/node_modules/@sdd-agent-platform/core/dist/artifacts.d.ts +4 -0
  18. package/node_modules/@sdd-agent-platform/core/dist/artifacts.js +5 -0
  19. package/node_modules/@sdd-agent-platform/core/dist/artifacts.js.map +1 -0
  20. package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.d.ts +71 -0
  21. package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.js +2 -0
  22. package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.js.map +1 -0
  23. package/node_modules/@sdd-agent-platform/core/dist/coding-facts.d.ts +1 -0
  24. package/node_modules/@sdd-agent-platform/core/dist/coding-facts.js +2 -0
  25. package/node_modules/@sdd-agent-platform/core/dist/coding-facts.js.map +1 -0
  26. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +31 -0
  27. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +88 -0
  28. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -0
  29. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +49 -0
  30. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +202 -0
  31. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -0
  32. package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.d.ts +21 -0
  33. package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.js +111 -0
  34. package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.js.map +1 -0
  35. package/node_modules/@sdd-agent-platform/core/dist/config/project-status.d.ts +1 -0
  36. package/node_modules/@sdd-agent-platform/core/dist/config/project-status.js +2 -0
  37. package/node_modules/@sdd-agent-platform/core/dist/config/project-status.js.map +1 -0
  38. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -0
  39. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +432 -0
  40. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -0
  41. package/node_modules/@sdd-agent-platform/core/dist/context/budget.d.ts +10 -0
  42. package/node_modules/@sdd-agent-platform/core/dist/context/budget.js +20 -0
  43. package/node_modules/@sdd-agent-platform/core/dist/context/budget.js.map +1 -0
  44. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +46 -0
  45. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +244 -0
  46. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -0
  47. package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.d.ts +14 -0
  48. package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.js +34 -0
  49. package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.js.map +1 -0
  50. package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.d.ts +50 -0
  51. package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +86 -0
  52. package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -0
  53. package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.d.ts +19 -0
  54. package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +28 -0
  55. package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -0
  56. package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.d.ts +9 -0
  57. package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.js +30 -0
  58. package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.js.map +1 -0
  59. package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +43 -0
  60. package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.js +2 -0
  61. package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.js.map +1 -0
  62. package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.d.ts +36 -0
  63. package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.js +142 -0
  64. package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.js.map +1 -0
  65. package/node_modules/@sdd-agent-platform/core/dist/context-offload.d.ts +2 -0
  66. package/node_modules/@sdd-agent-platform/core/dist/context-offload.js +3 -0
  67. package/node_modules/@sdd-agent-platform/core/dist/context-offload.js.map +1 -0
  68. package/node_modules/@sdd-agent-platform/core/dist/context.d.ts +6 -0
  69. package/node_modules/@sdd-agent-platform/core/dist/context.js +7 -0
  70. package/node_modules/@sdd-agent-platform/core/dist/context.js.map +1 -0
  71. package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.d.ts +7 -0
  72. package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.js +7 -0
  73. package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.js.map +1 -0
  74. package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +108 -0
  75. package/node_modules/@sdd-agent-platform/core/dist/contracts.js +73 -0
  76. package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -0
  77. package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +21 -0
  78. package/node_modules/@sdd-agent-platform/core/dist/delegation/model.js +2 -0
  79. package/node_modules/@sdd-agent-platform/core/dist/delegation/model.js.map +1 -0
  80. package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.d.ts +10 -0
  81. package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.js +47 -0
  82. package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.js.map +1 -0
  83. package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.d.ts +2 -0
  84. package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.js +13 -0
  85. package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.js.map +1 -0
  86. package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.d.ts +30 -0
  87. package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.js +56 -0
  88. package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.js.map +1 -0
  89. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +28 -0
  90. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +100 -0
  91. package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -0
  92. package/node_modules/@sdd-agent-platform/core/dist/delegation.d.ts +7 -0
  93. package/node_modules/@sdd-agent-platform/core/dist/delegation.js +6 -0
  94. package/node_modules/@sdd-agent-platform/core/dist/delegation.js.map +1 -0
  95. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.d.ts +2 -0
  96. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.js +26 -0
  97. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.js.map +1 -0
  98. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.d.ts +2 -0
  99. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +104 -0
  100. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -0
  101. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.d.ts +2 -0
  102. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js +26 -0
  103. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js.map +1 -0
  104. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.d.ts +11 -0
  105. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +78 -0
  106. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -0
  107. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.d.ts +11 -0
  108. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +247 -0
  109. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -0
  110. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.d.ts +6 -0
  111. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +313 -0
  112. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -0
  113. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.d.ts +4 -0
  114. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.js +68 -0
  115. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.js.map +1 -0
  116. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.d.ts +3 -0
  117. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +121 -0
  118. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -0
  119. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.d.ts +11 -0
  120. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +279 -0
  121. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -0
  122. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.d.ts +6 -0
  123. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +138 -0
  124. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -0
  125. package/node_modules/@sdd-agent-platform/core/dist/doctor/model.d.ts +11 -0
  126. package/node_modules/@sdd-agent-platform/core/dist/doctor/model.js +2 -0
  127. package/node_modules/@sdd-agent-platform/core/dist/doctor/model.js.map +1 -0
  128. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +2 -0
  129. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +44 -0
  130. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +1 -0
  131. package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.d.ts +2 -0
  132. package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.js +10 -0
  133. package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.js.map +1 -0
  134. package/node_modules/@sdd-agent-platform/core/dist/doctor.d.ts +2 -0
  135. package/node_modules/@sdd-agent-platform/core/dist/doctor.js +3 -0
  136. package/node_modules/@sdd-agent-platform/core/dist/doctor.js.map +1 -0
  137. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +33 -0
  138. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.js +2 -0
  139. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.js.map +1 -0
  140. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.d.ts +1 -0
  141. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.js +2 -0
  142. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.js.map +1 -0
  143. package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.d.ts +31 -0
  144. package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +163 -0
  145. package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -0
  146. package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.d.ts +44 -0
  147. package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +249 -0
  148. package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -0
  149. package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.d.ts +55 -0
  150. package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +363 -0
  151. package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -0
  152. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.d.ts +27 -0
  153. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +185 -0
  154. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -0
  155. package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.d.ts +100 -0
  156. package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +319 -0
  157. package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -0
  158. package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.d.ts +45 -0
  159. package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.js +178 -0
  160. package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.js.map +1 -0
  161. package/node_modules/@sdd-agent-platform/core/dist/execution.d.ts +5 -0
  162. package/node_modules/@sdd-agent-platform/core/dist/execution.js +6 -0
  163. package/node_modules/@sdd-agent-platform/core/dist/execution.js.map +1 -0
  164. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +53 -0
  165. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +111 -0
  166. package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -0
  167. package/node_modules/@sdd-agent-platform/core/dist/governance.d.ts +1 -0
  168. package/node_modules/@sdd-agent-platform/core/dist/governance.js +2 -0
  169. package/node_modules/@sdd-agent-platform/core/dist/governance.js.map +1 -0
  170. package/node_modules/@sdd-agent-platform/core/dist/index.d.ts +1 -0
  171. package/node_modules/@sdd-agent-platform/core/dist/index.js +2 -0
  172. package/node_modules/@sdd-agent-platform/core/dist/index.js.map +1 -0
  173. package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/instructions.d.ts +1 -1
  174. package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/instructions.js +48 -19
  175. package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -0
  176. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.d.ts +39 -0
  177. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +319 -0
  178. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -0
  179. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.d.ts +2 -0
  180. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.js +27 -0
  181. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.js.map +1 -0
  182. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.d.ts +57 -0
  183. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.js +80 -0
  184. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.js.map +1 -0
  185. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +42 -0
  186. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +187 -0
  187. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -0
  188. package/node_modules/@sdd-agent-platform/core/dist/lifecycle.d.ts +4 -0
  189. package/node_modules/@sdd-agent-platform/core/dist/lifecycle.js +5 -0
  190. package/node_modules/@sdd-agent-platform/core/dist/lifecycle.js.map +1 -0
  191. package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +45 -0
  192. package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.js +2 -0
  193. package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.js.map +1 -0
  194. package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.d.ts +2 -0
  195. package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.js +3 -0
  196. package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.js.map +1 -0
  197. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +55 -0
  198. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +314 -0
  199. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -0
  200. package/node_modules/@sdd-agent-platform/core/dist/path-safety.js.map +1 -0
  201. package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.d.ts +57 -0
  202. package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.js +157 -0
  203. package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.js.map +1 -0
  204. package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.d.ts +37 -0
  205. package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.js +119 -0
  206. package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.js.map +1 -0
  207. package/node_modules/@sdd-agent-platform/core/dist/planning.d.ts +2 -0
  208. package/node_modules/@sdd-agent-platform/core/dist/planning.js +3 -0
  209. package/node_modules/@sdd-agent-platform/core/dist/planning.js.map +1 -0
  210. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +55 -0
  211. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +109 -0
  212. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -0
  213. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.d.ts +22 -0
  214. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +121 -0
  215. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -0
  216. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +51 -0
  217. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +39 -0
  218. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -0
  219. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +17 -0
  220. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +14 -0
  221. package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -0
  222. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +70 -0
  223. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +220 -0
  224. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -0
  225. package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.d.ts +64 -0
  226. package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +161 -0
  227. package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -0
  228. package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.d.ts +28 -0
  229. package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +84 -0
  230. package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -0
  231. package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.d.ts +22 -0
  232. package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +16 -0
  233. package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -0
  234. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.d.ts +20 -0
  235. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +111 -0
  236. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -0
  237. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.d.ts +21 -0
  238. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +107 -0
  239. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -0
  240. package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.d.ts +38 -0
  241. package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +99 -0
  242. package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -0
  243. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +19 -0
  244. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +89 -0
  245. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -0
  246. package/node_modules/@sdd-agent-platform/core/dist/registries.d.ts +14 -0
  247. package/node_modules/@sdd-agent-platform/core/dist/registries.js +13 -0
  248. package/node_modules/@sdd-agent-platform/core/dist/registries.js.map +1 -0
  249. package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.d.ts +18 -0
  250. package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +77 -0
  251. package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js.map +1 -0
  252. package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +57 -0
  253. package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.js +2 -0
  254. package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.js.map +1 -0
  255. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.d.ts +20 -0
  256. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +195 -0
  257. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -0
  258. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.d.ts +33 -0
  259. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +215 -0
  260. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -0
  261. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +24 -0
  262. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +160 -0
  263. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -0
  264. package/node_modules/@sdd-agent-platform/core/dist/risk.d.ts +5 -0
  265. package/node_modules/@sdd-agent-platform/core/dist/risk.js +6 -0
  266. package/node_modules/@sdd-agent-platform/core/dist/risk.js.map +1 -0
  267. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.d.ts +4 -0
  268. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +263 -0
  269. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -0
  270. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +285 -0
  271. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.js +2 -0
  272. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.js.map +1 -0
  273. package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.d.ts +18 -0
  274. package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.js +127 -0
  275. package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.js.map +1 -0
  276. package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.d.ts +6 -0
  277. package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.js +28 -0
  278. package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.js.map +1 -0
  279. package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.d.ts +39 -0
  280. package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.js +59 -0
  281. package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.js.map +1 -0
  282. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +12 -0
  283. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +127 -0
  284. package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -0
  285. package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.d.ts +3 -0
  286. package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.js +4 -0
  287. package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.js.map +1 -0
  288. package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.d.ts +4 -0
  289. package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.js +68 -0
  290. package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.js.map +1 -0
  291. package/node_modules/@sdd-agent-platform/core/dist/router/routing.d.ts +18 -0
  292. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +143 -0
  293. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -0
  294. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.d.ts +7 -0
  295. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +95 -0
  296. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -0
  297. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.d.ts +17 -0
  298. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.js +82 -0
  299. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.js.map +1 -0
  300. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.d.ts +26 -0
  301. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +207 -0
  302. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -0
  303. package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.d.ts +16 -0
  304. package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.js +134 -0
  305. package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.js.map +1 -0
  306. package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +4 -0
  307. package/node_modules/@sdd-agent-platform/core/dist/router.js +5 -0
  308. package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -0
  309. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +6 -0
  310. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +80 -0
  311. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -0
  312. package/node_modules/@sdd-agent-platform/core/dist/run-state/events.d.ts +3 -0
  313. package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +23 -0
  314. package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -0
  315. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +100 -0
  316. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +117 -0
  317. package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -0
  318. package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.d.ts +18 -0
  319. package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +99 -0
  320. package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -0
  321. package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +179 -0
  322. package/node_modules/@sdd-agent-platform/core/dist/run-state/model.js +2 -0
  323. package/node_modules/@sdd-agent-platform/core/dist/run-state/model.js.map +1 -0
  324. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +97 -0
  325. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +238 -0
  326. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -0
  327. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.d.ts +20 -0
  328. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +359 -0
  329. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -0
  330. package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +7 -0
  331. package/node_modules/@sdd-agent-platform/core/dist/run-state.js +8 -0
  332. package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -0
  333. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.d.ts +2 -0
  334. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +61 -0
  335. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -0
  336. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.d.ts +4 -0
  337. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +274 -0
  338. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -0
  339. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +175 -0
  340. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.js +2 -0
  341. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.js.map +1 -0
  342. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.d.ts +3 -0
  343. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.js +4 -0
  344. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.js.map +1 -0
  345. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +25 -0
  346. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +112 -0
  347. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -0
  348. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.d.ts +18 -0
  349. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +89 -0
  350. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -0
  351. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +6 -0
  352. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +79 -0
  353. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -0
  354. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.d.ts +6 -0
  355. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.js +31 -0
  356. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.js.map +1 -0
  357. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +78 -0
  358. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +458 -0
  359. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -0
  360. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.d.ts +5 -0
  361. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +77 -0
  362. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -0
  363. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.d.ts +5 -0
  364. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.js +6 -0
  365. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.js.map +1 -0
  366. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.d.ts +37 -0
  367. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.js +2 -0
  368. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.js.map +1 -0
  369. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.d.ts +71 -0
  370. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +275 -0
  371. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -0
  372. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.d.ts +2 -0
  373. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.js +3 -0
  374. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.js.map +1 -0
  375. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +105 -0
  376. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +251 -0
  377. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -0
  378. package/node_modules/@sdd-agent-platform/core/dist/status.d.ts +2 -0
  379. package/node_modules/@sdd-agent-platform/core/dist/status.js +3 -0
  380. package/node_modules/@sdd-agent-platform/core/dist/status.js.map +1 -0
  381. package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.d.ts +1 -0
  382. package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.js +11 -0
  383. package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.js.map +1 -0
  384. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +112 -0
  385. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +362 -0
  386. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -0
  387. package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +41 -0
  388. package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.js +2 -0
  389. package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.js.map +1 -0
  390. package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.d.ts +43 -0
  391. package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +262 -0
  392. package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -0
  393. package/node_modules/@sdd-agent-platform/core/dist/subagents.d.ts +2 -0
  394. package/node_modules/@sdd-agent-platform/core/dist/subagents.js +3 -0
  395. package/node_modules/@sdd-agent-platform/core/dist/subagents.js.map +1 -0
  396. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +17 -0
  397. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +221 -0
  398. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -0
  399. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +91 -0
  400. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +395 -0
  401. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -0
  402. package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +2 -0
  403. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +3 -0
  404. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -0
  405. package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.d.ts +33 -0
  406. package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.js +153 -0
  407. package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.js.map +1 -0
  408. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.d.ts +21 -0
  409. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +363 -0
  410. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -0
  411. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +2 -0
  412. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +55 -0
  413. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -0
  414. package/node_modules/@sdd-agent-platform/core/dist/test-support.d.ts +2 -0
  415. package/node_modules/@sdd-agent-platform/core/dist/test-support.js +3 -0
  416. package/node_modules/@sdd-agent-platform/core/dist/test-support.js.map +1 -0
  417. package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -0
  418. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +50 -0
  419. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +514 -0
  420. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -0
  421. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +51 -0
  422. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +119 -0
  423. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -0
  424. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +29 -0
  425. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +332 -0
  426. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -0
  427. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +62 -0
  428. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +591 -0
  429. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -0
  430. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +42 -0
  431. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +201 -0
  432. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -0
  433. package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +6 -0
  434. package/node_modules/@sdd-agent-platform/core/dist/verification.js +6 -0
  435. package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -0
  436. package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +24 -0
  437. package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.js +2 -0
  438. package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.js.map +1 -0
  439. package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.d.ts +21 -0
  440. package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.js +90 -0
  441. package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.js.map +1 -0
  442. package/node_modules/@sdd-agent-platform/core/dist/work-units.d.ts +2 -0
  443. package/node_modules/@sdd-agent-platform/core/dist/work-units.js +3 -0
  444. package/node_modules/@sdd-agent-platform/core/dist/work-units.js.map +1 -0
  445. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +12 -0
  446. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +60 -0
  447. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -0
  448. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +25 -0
  449. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +64 -0
  450. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -0
  451. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +50 -0
  452. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +124 -0
  453. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -0
  454. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
  455. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +2 -0
  456. package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -0
  457. package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.d.ts +40 -0
  458. package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.js +89 -0
  459. package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.js.map +1 -0
  460. package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.d.ts +39 -0
  461. package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.js +221 -0
  462. package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.js.map +1 -0
  463. package/node_modules/@sdd-agent-platform/core/dist/worktree.d.ts +2 -0
  464. package/node_modules/@sdd-agent-platform/core/dist/worktree.js +3 -0
  465. package/node_modules/@sdd-agent-platform/core/dist/worktree.js.map +1 -0
  466. package/node_modules/@sdd-agent-platform/core/package.json +40 -0
  467. package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +138 -0
  468. package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +574 -0
  469. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -0
  470. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -0
  471. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -0
  472. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +302 -0
  473. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +135 -0
  474. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -0
  475. package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -0
  476. package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -0
  477. package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -0
  478. package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -0
  479. package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +303 -0
  480. package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +119 -0
  481. package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +259 -0
  482. package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -0
  483. package/node_modules/@sdd-agent-platform/core/src/config/project-status.ts +1 -0
  484. package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +435 -0
  485. package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -0
  486. package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +317 -0
  487. package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -0
  488. package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -0
  489. package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -0
  490. package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -0
  491. package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -0
  492. package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -0
  493. package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -0
  494. package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -0
  495. package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -0
  496. package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -0
  497. package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -0
  498. package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -0
  499. package/node_modules/@sdd-agent-platform/core/src/contracts.ts +114 -0
  500. package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -0
  501. package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -0
  502. package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -0
  503. package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -0
  504. package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -0
  505. package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -0
  506. package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -0
  507. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -0
  508. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +112 -0
  509. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +27 -0
  510. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -0
  511. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -0
  512. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -0
  513. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -0
  514. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -0
  515. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -0
  516. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +545 -0
  517. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +156 -0
  518. package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -0
  519. package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -0
  520. package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -0
  521. package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +37 -0
  522. package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -0
  523. package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +190 -0
  524. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +180 -0
  525. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -0
  526. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -0
  527. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -0
  528. package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -0
  529. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +127 -0
  530. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +428 -0
  531. package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +107 -0
  532. package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -0
  533. package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -0
  534. package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +55 -0
  535. package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -0
  536. package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -0
  537. package/node_modules/@sdd-agent-platform/core/src/index.test.ts +25 -0
  538. package/node_modules/@sdd-agent-platform/core/src/index.ts +1 -0
  539. package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +43 -0
  540. package/node_modules/@sdd-agent-platform/core/src/instructions.ts +165 -0
  541. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -0
  542. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -0
  543. package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -0
  544. package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -0
  545. package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +241 -0
  546. package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -0
  547. package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -0
  548. package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -0
  549. package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +342 -0
  550. package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -0
  551. package/node_modules/@sdd-agent-platform/core/src/path-safety.ts +37 -0
  552. package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +242 -0
  553. package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +153 -0
  554. package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +272 -0
  555. package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +86 -0
  556. package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -0
  557. package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +76 -0
  558. package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -0
  559. package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -0
  560. package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +174 -0
  561. package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +146 -0
  562. package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +102 -0
  563. package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +30 -0
  564. package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +309 -0
  565. package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -0
  566. package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -0
  567. package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +404 -0
  568. package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -0
  569. package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -0
  570. package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -0
  571. package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -0
  572. package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -0
  573. package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -0
  574. package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +97 -0
  575. package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -0
  576. package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -0
  577. package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +266 -0
  578. package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -0
  579. package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -0
  580. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +308 -0
  581. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +323 -0
  582. package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -0
  583. package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -0
  584. package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -0
  585. package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +146 -0
  586. package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +281 -0
  587. package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +3 -0
  588. package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -0
  589. package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +163 -0
  590. package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +117 -0
  591. package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -0
  592. package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +248 -0
  593. package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -0
  594. package/node_modules/@sdd-agent-platform/core/src/router.ts +4 -0
  595. package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +85 -0
  596. package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -0
  597. package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +207 -0
  598. package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -0
  599. package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +204 -0
  600. package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +52 -0
  601. package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +356 -0
  602. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +67 -0
  603. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +402 -0
  604. package/node_modules/@sdd-agent-platform/core/src/run-state.ts +7 -0
  605. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +63 -0
  606. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +296 -0
  607. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +152 -0
  608. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +68 -0
  609. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +3 -0
  610. package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +136 -0
  611. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -0
  612. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +86 -0
  613. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -0
  614. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +262 -0
  615. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +581 -0
  616. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -0
  617. package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -0
  618. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -0
  619. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -0
  620. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +352 -0
  621. package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -0
  622. package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -0
  623. package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +362 -0
  624. package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -0
  625. package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -0
  626. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +125 -0
  627. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +480 -0
  628. package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -0
  629. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -0
  630. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -0
  631. package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -0
  632. package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +248 -0
  633. package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +522 -0
  634. package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +446 -0
  635. package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +2 -0
  636. package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -0
  637. package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +377 -0
  638. package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +56 -0
  639. package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -0
  640. package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +335 -0
  641. package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +615 -0
  642. package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +171 -0
  643. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +195 -0
  644. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +396 -0
  645. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +392 -0
  646. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +707 -0
  647. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +65 -0
  648. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +247 -0
  649. package/node_modules/@sdd-agent-platform/core/src/verification.ts +6 -0
  650. package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -0
  651. package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -0
  652. package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -0
  653. package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -0
  654. package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +79 -0
  655. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -0
  656. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +92 -0
  657. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +115 -0
  658. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +175 -0
  659. package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
  660. package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -0
  661. package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -0
  662. package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -0
  663. package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -0
  664. package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -0
  665. package/package.json +67 -52
  666. package/packages/cli/dist/args.d.ts +23 -0
  667. package/packages/cli/dist/args.js +89 -0
  668. package/packages/cli/dist/args.js.map +1 -0
  669. package/packages/cli/dist/commands/ai-tools.d.ts +6 -0
  670. package/packages/cli/dist/commands/ai-tools.js +18 -0
  671. package/packages/cli/dist/commands/ai-tools.js.map +1 -0
  672. package/packages/cli/dist/commands/artifact.d.ts +6 -0
  673. package/packages/cli/dist/commands/artifact.js +168 -0
  674. package/packages/cli/dist/commands/artifact.js.map +1 -0
  675. package/packages/cli/dist/commands/context.d.ts +6 -0
  676. package/packages/cli/dist/commands/context.js +51 -0
  677. package/packages/cli/dist/commands/context.js.map +1 -0
  678. package/packages/cli/dist/commands/doctor.d.ts +6 -0
  679. package/packages/cli/dist/commands/doctor.js +29 -0
  680. package/packages/cli/dist/commands/doctor.js.map +1 -0
  681. package/packages/cli/dist/commands/execution.d.ts +6 -0
  682. package/packages/cli/dist/commands/execution.js +284 -0
  683. package/packages/cli/dist/commands/execution.js.map +1 -0
  684. package/packages/cli/dist/commands/governance.d.ts +6 -0
  685. package/packages/cli/dist/commands/governance.js +37 -0
  686. package/packages/cli/dist/commands/governance.js.map +1 -0
  687. package/packages/cli/dist/commands/init.d.ts +6 -0
  688. package/packages/cli/dist/commands/init.js +22 -0
  689. package/packages/cli/dist/commands/init.js.map +1 -0
  690. package/packages/cli/dist/commands/instructions.d.ts +6 -0
  691. package/packages/cli/dist/commands/instructions.js +15 -0
  692. package/packages/cli/dist/commands/instructions.js.map +1 -0
  693. package/packages/cli/dist/commands/lifecycle.d.ts +6 -0
  694. package/packages/cli/dist/commands/lifecycle.js +112 -0
  695. package/packages/cli/dist/commands/lifecycle.js.map +1 -0
  696. package/packages/cli/dist/commands/registry/contracts.d.ts +2 -0
  697. package/packages/cli/dist/commands/registry/contracts.js +62 -0
  698. package/packages/cli/dist/commands/registry/contracts.js.map +1 -0
  699. package/packages/cli/dist/commands/registry/core.d.ts +2 -0
  700. package/packages/cli/dist/commands/registry/core.js +75 -0
  701. package/packages/cli/dist/commands/registry/core.js.map +1 -0
  702. package/packages/cli/dist/commands/registry/platform.d.ts +2 -0
  703. package/packages/cli/dist/commands/registry/platform.js +123 -0
  704. package/packages/cli/dist/commands/registry/platform.js.map +1 -0
  705. package/packages/cli/dist/commands/registry/runtime.d.ts +2 -0
  706. package/packages/cli/dist/commands/registry/runtime.js +142 -0
  707. package/packages/cli/dist/commands/registry/runtime.js.map +1 -0
  708. package/packages/cli/dist/commands/registry/types.d.ts +5 -0
  709. package/packages/cli/dist/commands/registry/types.js +2 -0
  710. package/packages/cli/dist/commands/registry/types.js.map +1 -0
  711. package/packages/cli/dist/commands/registry.d.ts +3 -0
  712. package/packages/cli/dist/commands/registry.js +11 -0
  713. package/packages/cli/dist/commands/registry.js.map +1 -0
  714. package/packages/cli/dist/commands/run.d.ts +6 -0
  715. package/packages/cli/dist/commands/run.js +173 -0
  716. package/packages/cli/dist/commands/run.js.map +1 -0
  717. package/packages/cli/dist/commands/ship.d.ts +6 -0
  718. package/packages/cli/dist/commands/ship.js +33 -0
  719. package/packages/cli/dist/commands/ship.js.map +1 -0
  720. package/packages/cli/dist/commands/status.d.ts +6 -0
  721. package/packages/cli/dist/commands/status.js +25 -0
  722. package/packages/cli/dist/commands/status.js.map +1 -0
  723. package/packages/cli/dist/commands/sync-back.d.ts +6 -0
  724. package/packages/cli/dist/commands/sync-back.js +82 -0
  725. package/packages/cli/dist/commands/sync-back.js.map +1 -0
  726. package/packages/cli/dist/commands/tasks.d.ts +6 -0
  727. package/packages/cli/dist/commands/tasks.js +78 -0
  728. package/packages/cli/dist/commands/tasks.js.map +1 -0
  729. package/packages/cli/dist/commands/test.d.ts +6 -0
  730. package/packages/cli/dist/commands/test.js +106 -0
  731. package/packages/cli/dist/commands/test.js.map +1 -0
  732. package/packages/cli/dist/commands/verifies.d.ts +6 -0
  733. package/packages/cli/dist/commands/verifies.js +83 -0
  734. package/packages/cli/dist/commands/verifies.js.map +1 -0
  735. package/packages/cli/dist/commands/verify.d.ts +6 -0
  736. package/packages/cli/dist/commands/verify.js +93 -0
  737. package/packages/cli/dist/commands/verify.js.map +1 -0
  738. package/packages/cli/dist/dispatch.d.ts +7 -0
  739. package/packages/cli/dist/dispatch.js +121 -0
  740. package/packages/cli/dist/dispatch.js.map +1 -0
  741. package/packages/cli/dist/help.d.ts +4 -0
  742. package/packages/cli/dist/help.js +163 -0
  743. package/packages/cli/dist/help.js.map +1 -0
  744. package/packages/cli/dist/identity.d.ts +7 -0
  745. package/packages/cli/dist/identity.js +51 -0
  746. package/packages/cli/dist/identity.js.map +1 -0
  747. package/packages/cli/dist/main.js +17 -0
  748. package/packages/cli/dist/main.js.map +1 -0
  749. package/{dist/packages/cli/src → packages/cli/dist}/options.d.ts +2 -0
  750. package/{dist/packages/cli/src → packages/cli/dist}/options.js +6 -0
  751. package/packages/cli/dist/options.js.map +1 -0
  752. package/packages/cli/dist/renderers/artifacts.d.ts +5 -0
  753. package/packages/cli/dist/renderers/artifacts.js +43 -0
  754. package/packages/cli/dist/renderers/artifacts.js.map +1 -0
  755. package/packages/cli/dist/renderers/context.d.ts +4 -0
  756. package/packages/cli/dist/renderers/context.js +47 -0
  757. package/packages/cli/dist/renderers/context.js.map +1 -0
  758. package/packages/cli/dist/renderers/doctor.d.ts +5 -0
  759. package/packages/cli/dist/renderers/doctor.js +31 -0
  760. package/packages/cli/dist/renderers/doctor.js.map +1 -0
  761. package/packages/cli/dist/renderers/execution.d.ts +13 -0
  762. package/packages/cli/dist/renderers/execution.js +133 -0
  763. package/packages/cli/dist/renderers/execution.js.map +1 -0
  764. package/packages/cli/dist/renderers/governance.d.ts +3 -0
  765. package/packages/cli/dist/renderers/governance.js +23 -0
  766. package/packages/cli/dist/renderers/governance.js.map +1 -0
  767. package/packages/cli/dist/renderers/issues.d.ts +24 -0
  768. package/packages/cli/dist/renderers/issues.js +37 -0
  769. package/packages/cli/dist/renderers/issues.js.map +1 -0
  770. package/packages/cli/dist/renderers/json.d.ts +3 -0
  771. package/packages/cli/dist/renderers/json.js +10 -0
  772. package/packages/cli/dist/renderers/json.js.map +1 -0
  773. package/packages/cli/dist/renderers/lifecycle.d.ts +2 -0
  774. package/packages/cli/dist/renderers/lifecycle.js +30 -0
  775. package/packages/cli/dist/renderers/lifecycle.js.map +1 -0
  776. package/packages/cli/dist/renderers/planning.d.ts +4 -0
  777. package/packages/cli/dist/renderers/planning.js +66 -0
  778. package/packages/cli/dist/renderers/planning.js.map +1 -0
  779. package/packages/cli/dist/renderers/registry-contracts.d.ts +10 -0
  780. package/packages/cli/dist/renderers/registry-contracts.js +128 -0
  781. package/packages/cli/dist/renderers/registry-contracts.js.map +1 -0
  782. package/packages/cli/dist/renderers/registry-core.d.ts +8 -0
  783. package/packages/cli/dist/renderers/registry-core.js +93 -0
  784. package/packages/cli/dist/renderers/registry-core.js.map +1 -0
  785. package/packages/cli/dist/renderers/registry-platform.d.ts +12 -0
  786. package/packages/cli/dist/renderers/registry-platform.js +112 -0
  787. package/packages/cli/dist/renderers/registry-platform.js.map +1 -0
  788. package/packages/cli/dist/renderers/registry-runtime.d.ts +16 -0
  789. package/packages/cli/dist/renderers/registry-runtime.js +201 -0
  790. package/packages/cli/dist/renderers/registry-runtime.js.map +1 -0
  791. package/packages/cli/dist/renderers/registry-shared.d.ts +3 -0
  792. package/packages/cli/dist/renderers/registry-shared.js +15 -0
  793. package/packages/cli/dist/renderers/registry-shared.js.map +1 -0
  794. package/packages/cli/dist/renderers/registry.d.ts +5 -0
  795. package/packages/cli/dist/renderers/registry.js +6 -0
  796. package/packages/cli/dist/renderers/registry.js.map +1 -0
  797. package/packages/cli/dist/renderers/router.d.ts +2 -0
  798. package/packages/cli/dist/renderers/router.js +32 -0
  799. package/packages/cli/dist/renderers/router.js.map +1 -0
  800. package/packages/cli/dist/renderers/workflow.d.ts +19 -0
  801. package/packages/cli/dist/renderers/workflow.js +253 -0
  802. package/packages/cli/dist/renderers/workflow.js.map +1 -0
  803. package/packages/cli/dist/renderers/worktree.d.ts +5 -0
  804. package/packages/cli/dist/renderers/worktree.js +41 -0
  805. package/packages/cli/dist/renderers/worktree.js.map +1 -0
  806. package/packages/cli/dist/test-support/run-cli.d.ts +6 -0
  807. package/packages/cli/dist/test-support/run-cli.js +15 -0
  808. package/packages/cli/dist/test-support/run-cli.js.map +1 -0
  809. package/packages/cli/dist/tsconfig.tsbuildinfo +1 -0
  810. package/packages/cli/package.json +15 -0
  811. package/packages/core/dist/ai-tools.d.ts +68 -0
  812. package/packages/core/dist/ai-tools.js +461 -0
  813. package/packages/core/dist/ai-tools.js.map +1 -0
  814. package/packages/core/dist/artifacts/ingestion.d.ts +24 -0
  815. package/packages/core/dist/artifacts/ingestion.js +181 -0
  816. package/packages/core/dist/artifacts/ingestion.js.map +1 -0
  817. package/packages/core/dist/artifacts/sdd-evidence.d.ts +47 -0
  818. package/packages/core/dist/artifacts/sdd-evidence.js +241 -0
  819. package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -0
  820. package/packages/core/dist/artifacts/sdd-result.d.ts +29 -0
  821. package/packages/core/dist/artifacts/sdd-result.js +198 -0
  822. package/packages/core/dist/artifacts/sdd-result.js.map +1 -0
  823. package/packages/core/dist/artifacts/templates.d.ts +10 -0
  824. package/packages/core/dist/artifacts/templates.js +79 -0
  825. package/packages/core/dist/artifacts/templates.js.map +1 -0
  826. package/packages/core/dist/artifacts.d.ts +4 -0
  827. package/packages/core/dist/artifacts.js +5 -0
  828. package/packages/core/dist/artifacts.js.map +1 -0
  829. package/packages/core/dist/coding-facts/contracts.d.ts +71 -0
  830. package/packages/core/dist/coding-facts/contracts.js +2 -0
  831. package/packages/core/dist/coding-facts/contracts.js.map +1 -0
  832. package/packages/core/dist/coding-facts.d.ts +1 -0
  833. package/packages/core/dist/coding-facts.js +2 -0
  834. package/packages/core/dist/coding-facts.js.map +1 -0
  835. package/packages/core/dist/config/init-project.d.ts +31 -0
  836. package/packages/core/dist/config/init-project.js +88 -0
  837. package/packages/core/dist/config/init-project.js.map +1 -0
  838. package/packages/core/dist/config/project-config.d.ts +49 -0
  839. package/packages/core/dist/config/project-config.js +202 -0
  840. package/packages/core/dist/config/project-config.js.map +1 -0
  841. package/packages/core/dist/config/project-detection.d.ts +21 -0
  842. package/packages/core/dist/config/project-detection.js +111 -0
  843. package/packages/core/dist/config/project-detection.js.map +1 -0
  844. package/packages/core/dist/config/project-status.d.ts +1 -0
  845. package/packages/core/dist/config/project-status.js +2 -0
  846. package/packages/core/dist/config/project-status.js.map +1 -0
  847. package/packages/core/dist/config/starter-documents.d.ts +4 -0
  848. package/packages/core/dist/config/starter-documents.js +432 -0
  849. package/packages/core/dist/config/starter-documents.js.map +1 -0
  850. package/packages/core/dist/context/budget.d.ts +10 -0
  851. package/packages/core/dist/context/budget.js +20 -0
  852. package/packages/core/dist/context/budget.js.map +1 -0
  853. package/packages/core/dist/context/build-package.d.ts +46 -0
  854. package/packages/core/dist/context/build-package.js +244 -0
  855. package/packages/core/dist/context/build-package.js.map +1 -0
  856. package/packages/core/dist/context/command-summary.d.ts +14 -0
  857. package/packages/core/dist/context/command-summary.js +34 -0
  858. package/packages/core/dist/context/command-summary.js.map +1 -0
  859. package/packages/core/dist/context/evidence-summary.d.ts +50 -0
  860. package/packages/core/dist/context/evidence-summary.js +86 -0
  861. package/packages/core/dist/context/evidence-summary.js.map +1 -0
  862. package/packages/core/dist/context/log-worker.d.ts +19 -0
  863. package/packages/core/dist/context/log-worker.js +28 -0
  864. package/packages/core/dist/context/log-worker.js.map +1 -0
  865. package/packages/core/dist/context/source-refs.d.ts +9 -0
  866. package/packages/core/dist/context/source-refs.js +30 -0
  867. package/packages/core/dist/context/source-refs.js.map +1 -0
  868. package/packages/core/dist/context-offload/contracts.d.ts +43 -0
  869. package/packages/core/dist/context-offload/contracts.js +2 -0
  870. package/packages/core/dist/context-offload/contracts.js.map +1 -0
  871. package/packages/core/dist/context-offload/runtime.d.ts +36 -0
  872. package/packages/core/dist/context-offload/runtime.js +142 -0
  873. package/packages/core/dist/context-offload/runtime.js.map +1 -0
  874. package/packages/core/dist/context-offload.d.ts +2 -0
  875. package/packages/core/dist/context-offload.js +3 -0
  876. package/packages/core/dist/context-offload.js.map +1 -0
  877. package/packages/core/dist/context.d.ts +6 -0
  878. package/packages/core/dist/context.js +7 -0
  879. package/packages/core/dist/context.js.map +1 -0
  880. package/packages/core/dist/contracts/issues.d.ts +7 -0
  881. package/packages/core/dist/contracts/issues.js +7 -0
  882. package/packages/core/dist/contracts/issues.js.map +1 -0
  883. package/packages/core/dist/contracts.d.ts +108 -0
  884. package/packages/core/dist/contracts.js +73 -0
  885. package/packages/core/dist/contracts.js.map +1 -0
  886. package/packages/core/dist/delegation/model.d.ts +21 -0
  887. package/packages/core/dist/delegation/model.js +2 -0
  888. package/packages/core/dist/delegation/model.js.map +1 -0
  889. package/packages/core/dist/delegation/queue.d.ts +10 -0
  890. package/packages/core/dist/delegation/queue.js +47 -0
  891. package/packages/core/dist/delegation/queue.js.map +1 -0
  892. package/packages/core/dist/delegation/run-state.d.ts +2 -0
  893. package/packages/core/dist/delegation/run-state.js +13 -0
  894. package/packages/core/dist/delegation/run-state.js.map +1 -0
  895. package/packages/core/dist/delegation/state-machine.d.ts +30 -0
  896. package/packages/core/dist/delegation/state-machine.js +56 -0
  897. package/packages/core/dist/delegation/state-machine.js.map +1 -0
  898. package/packages/core/dist/delegation/validation.d.ts +28 -0
  899. package/packages/core/dist/delegation/validation.js +100 -0
  900. package/packages/core/dist/delegation/validation.js.map +1 -0
  901. package/packages/core/dist/delegation.d.ts +7 -0
  902. package/packages/core/dist/delegation.js +6 -0
  903. package/packages/core/dist/delegation.js.map +1 -0
  904. package/packages/core/dist/doctor/checks/ai-entries.d.ts +2 -0
  905. package/packages/core/dist/doctor/checks/ai-entries.js +26 -0
  906. package/packages/core/dist/doctor/checks/ai-entries.js.map +1 -0
  907. package/packages/core/dist/doctor/checks/document-chain.d.ts +2 -0
  908. package/packages/core/dist/doctor/checks/document-chain.js +104 -0
  909. package/packages/core/dist/doctor/checks/document-chain.js.map +1 -0
  910. package/packages/core/dist/doctor/checks/local-run-index.d.ts +2 -0
  911. package/packages/core/dist/doctor/checks/local-run-index.js +26 -0
  912. package/packages/core/dist/doctor/checks/local-run-index.js.map +1 -0
  913. package/packages/core/dist/doctor/checks/project.d.ts +11 -0
  914. package/packages/core/dist/doctor/checks/project.js +78 -0
  915. package/packages/core/dist/doctor/checks/project.js.map +1 -0
  916. package/packages/core/dist/doctor/checks/registries.d.ts +11 -0
  917. package/packages/core/dist/doctor/checks/registries.js +247 -0
  918. package/packages/core/dist/doctor/checks/registries.js.map +1 -0
  919. package/packages/core/dist/doctor/checks/run-evidence.d.ts +6 -0
  920. package/packages/core/dist/doctor/checks/run-evidence.js +313 -0
  921. package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -0
  922. package/packages/core/dist/doctor/checks/run-records.d.ts +4 -0
  923. package/packages/core/dist/doctor/checks/run-records.js +68 -0
  924. package/packages/core/dist/doctor/checks/run-records.js.map +1 -0
  925. package/packages/core/dist/doctor/checks/run-trust.d.ts +3 -0
  926. package/packages/core/dist/doctor/checks/run-trust.js +121 -0
  927. package/packages/core/dist/doctor/checks/run-trust.js.map +1 -0
  928. package/packages/core/dist/doctor/checks/runtime-contracts.d.ts +11 -0
  929. package/packages/core/dist/doctor/checks/runtime-contracts.js +279 -0
  930. package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -0
  931. package/packages/core/dist/doctor/doctor.d.ts +6 -0
  932. package/packages/core/dist/doctor/doctor.js +138 -0
  933. package/packages/core/dist/doctor/doctor.js.map +1 -0
  934. package/packages/core/dist/doctor/model.d.ts +11 -0
  935. package/packages/core/dist/doctor/model.js +2 -0
  936. package/packages/core/dist/doctor/model.js.map +1 -0
  937. package/packages/core/dist/doctor/render.d.ts +2 -0
  938. package/packages/core/dist/doctor/render.js +44 -0
  939. package/packages/core/dist/doctor/render.js.map +1 -0
  940. package/packages/core/dist/doctor/summary.d.ts +2 -0
  941. package/packages/core/dist/doctor/summary.js +10 -0
  942. package/packages/core/dist/doctor/summary.js.map +1 -0
  943. package/packages/core/dist/doctor.d.ts +2 -0
  944. package/packages/core/dist/doctor.js +3 -0
  945. package/packages/core/dist/doctor.js.map +1 -0
  946. package/packages/core/dist/evidence-runtime/contracts.d.ts +33 -0
  947. package/packages/core/dist/evidence-runtime/contracts.js +2 -0
  948. package/packages/core/dist/evidence-runtime/contracts.js.map +1 -0
  949. package/packages/core/dist/evidence-runtime.d.ts +1 -0
  950. package/packages/core/dist/evidence-runtime.js +2 -0
  951. package/packages/core/dist/evidence-runtime.js.map +1 -0
  952. package/packages/core/dist/execution/agent-execution-records.d.ts +31 -0
  953. package/packages/core/dist/execution/agent-execution-records.js +163 -0
  954. package/packages/core/dist/execution/agent-execution-records.js.map +1 -0
  955. package/packages/core/dist/execution/background-executor.d.ts +44 -0
  956. package/packages/core/dist/execution/background-executor.js +249 -0
  957. package/packages/core/dist/execution/background-executor.js.map +1 -0
  958. package/packages/core/dist/execution/foreground-subagents.d.ts +55 -0
  959. package/packages/core/dist/execution/foreground-subagents.js +363 -0
  960. package/packages/core/dist/execution/foreground-subagents.js.map +1 -0
  961. package/packages/core/dist/execution/host-invocation.d.ts +27 -0
  962. package/packages/core/dist/execution/host-invocation.js +185 -0
  963. package/packages/core/dist/execution/host-invocation.js.map +1 -0
  964. package/packages/core/dist/execution/resident-worker.d.ts +100 -0
  965. package/packages/core/dist/execution/resident-worker.js +319 -0
  966. package/packages/core/dist/execution/resident-worker.js.map +1 -0
  967. package/packages/core/dist/execution/wave-executor.d.ts +45 -0
  968. package/packages/core/dist/execution/wave-executor.js +178 -0
  969. package/packages/core/dist/execution/wave-executor.js.map +1 -0
  970. package/packages/core/dist/execution.d.ts +5 -0
  971. package/packages/core/dist/execution.js +6 -0
  972. package/packages/core/dist/execution.js.map +1 -0
  973. package/packages/core/dist/governance/policy.d.ts +53 -0
  974. package/packages/core/dist/governance/policy.js +111 -0
  975. package/packages/core/dist/governance/policy.js.map +1 -0
  976. package/packages/core/dist/governance.d.ts +1 -0
  977. package/packages/core/dist/governance.js +2 -0
  978. package/packages/core/dist/governance.js.map +1 -0
  979. package/packages/core/dist/index.d.ts +1 -0
  980. package/packages/core/dist/index.js +2 -0
  981. package/packages/core/dist/index.js.map +1 -0
  982. package/packages/core/dist/instructions.d.ts +14 -0
  983. package/packages/core/dist/instructions.js +147 -0
  984. package/packages/core/dist/instructions.js.map +1 -0
  985. package/packages/core/dist/lifecycle/decision-gate.d.ts +39 -0
  986. package/packages/core/dist/lifecycle/decision-gate.js +319 -0
  987. package/packages/core/dist/lifecycle/decision-gate.js.map +1 -0
  988. package/packages/core/dist/lifecycle/rendering.d.ts +2 -0
  989. package/packages/core/dist/lifecycle/rendering.js +27 -0
  990. package/packages/core/dist/lifecycle/rendering.js.map +1 -0
  991. package/packages/core/dist/lifecycle/risk-signals.d.ts +57 -0
  992. package/packages/core/dist/lifecycle/risk-signals.js +80 -0
  993. package/packages/core/dist/lifecycle/risk-signals.js.map +1 -0
  994. package/packages/core/dist/lifecycle/ship.d.ts +42 -0
  995. package/packages/core/dist/lifecycle/ship.js +187 -0
  996. package/packages/core/dist/lifecycle/ship.js.map +1 -0
  997. package/packages/core/dist/lifecycle.d.ts +4 -0
  998. package/packages/core/dist/lifecycle.js +5 -0
  999. package/packages/core/dist/lifecycle.js.map +1 -0
  1000. package/packages/core/dist/orchestration/contracts.d.ts +45 -0
  1001. package/packages/core/dist/orchestration/contracts.js +2 -0
  1002. package/packages/core/dist/orchestration/contracts.js.map +1 -0
  1003. package/packages/core/dist/orchestration/index.d.ts +2 -0
  1004. package/packages/core/dist/orchestration/index.js +3 -0
  1005. package/packages/core/dist/orchestration/index.js.map +1 -0
  1006. package/packages/core/dist/orchestration/runtime.d.ts +55 -0
  1007. package/packages/core/dist/orchestration/runtime.js +314 -0
  1008. package/packages/core/dist/orchestration/runtime.js.map +1 -0
  1009. package/packages/core/dist/path-safety.d.ts +4 -0
  1010. package/packages/core/dist/path-safety.js +35 -0
  1011. package/packages/core/dist/path-safety.js.map +1 -0
  1012. package/packages/core/dist/planning/task-graph.d.ts +57 -0
  1013. package/packages/core/dist/planning/task-graph.js +157 -0
  1014. package/packages/core/dist/planning/task-graph.js.map +1 -0
  1015. package/packages/core/dist/planning/wave-plan.d.ts +37 -0
  1016. package/packages/core/dist/planning/wave-plan.js +119 -0
  1017. package/packages/core/dist/planning/wave-plan.js.map +1 -0
  1018. package/packages/core/dist/planning.d.ts +2 -0
  1019. package/packages/core/dist/planning.js +3 -0
  1020. package/packages/core/dist/planning.js.map +1 -0
  1021. package/packages/core/dist/registries/agent-capability-catalog.d.ts +55 -0
  1022. package/packages/core/dist/registries/agent-capability-catalog.js +109 -0
  1023. package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -0
  1024. package/packages/core/dist/registries/agent-registry.d.ts +22 -0
  1025. package/packages/core/dist/registries/agent-registry.js +121 -0
  1026. package/packages/core/dist/registries/agent-registry.js.map +1 -0
  1027. package/packages/core/dist/registries/agent-runtime-static.d.ts +51 -0
  1028. package/packages/core/dist/registries/agent-runtime-static.js +39 -0
  1029. package/packages/core/dist/registries/agent-runtime-static.js.map +1 -0
  1030. package/packages/core/dist/registries/capability-sources.d.ts +17 -0
  1031. package/packages/core/dist/registries/capability-sources.js +14 -0
  1032. package/packages/core/dist/registries/capability-sources.js.map +1 -0
  1033. package/packages/core/dist/registries/command-team-runtime.d.ts +70 -0
  1034. package/packages/core/dist/registries/command-team-runtime.js +220 -0
  1035. package/packages/core/dist/registries/command-team-runtime.js.map +1 -0
  1036. package/packages/core/dist/registries/eval-learning-context.d.ts +64 -0
  1037. package/packages/core/dist/registries/eval-learning-context.js +161 -0
  1038. package/packages/core/dist/registries/eval-learning-context.js.map +1 -0
  1039. package/packages/core/dist/registries/query-status.d.ts +28 -0
  1040. package/packages/core/dist/registries/query-status.js +84 -0
  1041. package/packages/core/dist/registries/query-status.js.map +1 -0
  1042. package/packages/core/dist/registries/skill-capabilities.d.ts +22 -0
  1043. package/packages/core/dist/registries/skill-capabilities.js +16 -0
  1044. package/packages/core/dist/registries/skill-capabilities.js.map +1 -0
  1045. package/packages/core/dist/registries/tool-capabilities.d.ts +20 -0
  1046. package/packages/core/dist/registries/tool-capabilities.js +111 -0
  1047. package/packages/core/dist/registries/tool-capabilities.js.map +1 -0
  1048. package/packages/core/dist/registries/tool-plugins.d.ts +21 -0
  1049. package/packages/core/dist/registries/tool-plugins.js +107 -0
  1050. package/packages/core/dist/registries/tool-plugins.js.map +1 -0
  1051. package/packages/core/dist/registries/worker-adapters.d.ts +38 -0
  1052. package/packages/core/dist/registries/worker-adapters.js +99 -0
  1053. package/packages/core/dist/registries/worker-adapters.js.map +1 -0
  1054. package/packages/core/dist/registries/workflow-gates.d.ts +19 -0
  1055. package/packages/core/dist/registries/workflow-gates.js +89 -0
  1056. package/packages/core/dist/registries/workflow-gates.js.map +1 -0
  1057. package/packages/core/dist/registries.d.ts +14 -0
  1058. package/packages/core/dist/registries.js +13 -0
  1059. package/packages/core/dist/registries.js.map +1 -0
  1060. package/packages/core/dist/risk/consumer-diagnostics.d.ts +18 -0
  1061. package/packages/core/dist/risk/consumer-diagnostics.js +77 -0
  1062. package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -0
  1063. package/packages/core/dist/risk/contracts.d.ts +57 -0
  1064. package/packages/core/dist/risk/contracts.js +2 -0
  1065. package/packages/core/dist/risk/contracts.js.map +1 -0
  1066. package/packages/core/dist/risk/kernel.d.ts +20 -0
  1067. package/packages/core/dist/risk/kernel.js +195 -0
  1068. package/packages/core/dist/risk/kernel.js.map +1 -0
  1069. package/packages/core/dist/risk/legacy-adapters.d.ts +33 -0
  1070. package/packages/core/dist/risk/legacy-adapters.js +215 -0
  1071. package/packages/core/dist/risk/legacy-adapters.js.map +1 -0
  1072. package/packages/core/dist/risk/workflow-gates.d.ts +24 -0
  1073. package/packages/core/dist/risk/workflow-gates.js +160 -0
  1074. package/packages/core/dist/risk/workflow-gates.js.map +1 -0
  1075. package/packages/core/dist/risk.d.ts +5 -0
  1076. package/packages/core/dist/risk.js +6 -0
  1077. package/packages/core/dist/risk.js.map +1 -0
  1078. package/packages/core/dist/router/agent-runtime-config.d.ts +4 -0
  1079. package/packages/core/dist/router/agent-runtime-config.js +263 -0
  1080. package/packages/core/dist/router/agent-runtime-config.js.map +1 -0
  1081. package/packages/core/dist/router/agent-runtime.d.ts +285 -0
  1082. package/packages/core/dist/router/agent-runtime.js +2 -0
  1083. package/packages/core/dist/router/agent-runtime.js.map +1 -0
  1084. package/packages/core/dist/router/profile-resolution.d.ts +18 -0
  1085. package/packages/core/dist/router/profile-resolution.js +127 -0
  1086. package/packages/core/dist/router/profile-resolution.js.map +1 -0
  1087. package/packages/core/dist/router/risk-policy.d.ts +6 -0
  1088. package/packages/core/dist/router/risk-policy.js +28 -0
  1089. package/packages/core/dist/router/risk-policy.js.map +1 -0
  1090. package/packages/core/dist/router/route-cache.d.ts +39 -0
  1091. package/packages/core/dist/router/route-cache.js +59 -0
  1092. package/packages/core/dist/router/route-cache.js.map +1 -0
  1093. package/packages/core/dist/router/route-projection.d.ts +12 -0
  1094. package/packages/core/dist/router/route-projection.js +127 -0
  1095. package/packages/core/dist/router/route-projection.js.map +1 -0
  1096. package/packages/core/dist/router/route-sdd-task.d.ts +3 -0
  1097. package/packages/core/dist/router/route-sdd-task.js +4 -0
  1098. package/packages/core/dist/router/route-sdd-task.js.map +1 -0
  1099. package/packages/core/dist/router/routing-rules.d.ts +4 -0
  1100. package/packages/core/dist/router/routing-rules.js +68 -0
  1101. package/packages/core/dist/router/routing-rules.js.map +1 -0
  1102. package/packages/core/dist/router/routing.d.ts +18 -0
  1103. package/packages/core/dist/router/routing.js +143 -0
  1104. package/packages/core/dist/router/routing.js.map +1 -0
  1105. package/packages/core/dist/router/runtime-inspection.d.ts +7 -0
  1106. package/packages/core/dist/router/runtime-inspection.js +95 -0
  1107. package/packages/core/dist/router/runtime-inspection.js.map +1 -0
  1108. package/packages/core/dist/router/runtime-registry.d.ts +17 -0
  1109. package/packages/core/dist/router/runtime-registry.js +82 -0
  1110. package/packages/core/dist/router/runtime-registry.js.map +1 -0
  1111. package/packages/core/dist/router/runtime-validation.d.ts +26 -0
  1112. package/packages/core/dist/router/runtime-validation.js +207 -0
  1113. package/packages/core/dist/router/runtime-validation.js.map +1 -0
  1114. package/packages/core/dist/router/team-mode.d.ts +16 -0
  1115. package/packages/core/dist/router/team-mode.js +134 -0
  1116. package/packages/core/dist/router/team-mode.js.map +1 -0
  1117. package/packages/core/dist/router.d.ts +4 -0
  1118. package/packages/core/dist/router.js +5 -0
  1119. package/packages/core/dist/router.js.map +1 -0
  1120. package/packages/core/dist/run-state/artifacts.d.ts +6 -0
  1121. package/packages/core/dist/run-state/artifacts.js +80 -0
  1122. package/packages/core/dist/run-state/artifacts.js.map +1 -0
  1123. package/packages/core/dist/run-state/events.d.ts +3 -0
  1124. package/packages/core/dist/run-state/events.js +23 -0
  1125. package/packages/core/dist/run-state/events.js.map +1 -0
  1126. package/packages/core/dist/run-state/inspect-run.d.ts +100 -0
  1127. package/packages/core/dist/run-state/inspect-run.js +117 -0
  1128. package/packages/core/dist/run-state/inspect-run.js.map +1 -0
  1129. package/packages/core/dist/run-state/invocation-ledger.d.ts +18 -0
  1130. package/packages/core/dist/run-state/invocation-ledger.js +99 -0
  1131. package/packages/core/dist/run-state/invocation-ledger.js.map +1 -0
  1132. package/packages/core/dist/run-state/model.d.ts +179 -0
  1133. package/packages/core/dist/run-state/model.js +2 -0
  1134. package/packages/core/dist/run-state/model.js.map +1 -0
  1135. package/packages/core/dist/run-state/run-index.d.ts +97 -0
  1136. package/packages/core/dist/run-state/run-index.js +238 -0
  1137. package/packages/core/dist/run-state/run-index.js.map +1 -0
  1138. package/packages/core/dist/run-state/run-state.d.ts +20 -0
  1139. package/packages/core/dist/run-state/run-state.js +359 -0
  1140. package/packages/core/dist/run-state/run-state.js.map +1 -0
  1141. package/packages/core/dist/run-state.d.ts +7 -0
  1142. package/packages/core/dist/run-state.js +8 -0
  1143. package/packages/core/dist/run-state.js.map +1 -0
  1144. package/packages/core/dist/runtime-analysis/build.d.ts +2 -0
  1145. package/packages/core/dist/runtime-analysis/build.js +61 -0
  1146. package/packages/core/dist/runtime-analysis/build.js.map +1 -0
  1147. package/packages/core/dist/runtime-analysis/findings.d.ts +4 -0
  1148. package/packages/core/dist/runtime-analysis/findings.js +274 -0
  1149. package/packages/core/dist/runtime-analysis/findings.js.map +1 -0
  1150. package/packages/core/dist/runtime-analysis/model.d.ts +175 -0
  1151. package/packages/core/dist/runtime-analysis/model.js +2 -0
  1152. package/packages/core/dist/runtime-analysis/model.js.map +1 -0
  1153. package/packages/core/dist/runtime-analysis.d.ts +3 -0
  1154. package/packages/core/dist/runtime-analysis.js +4 -0
  1155. package/packages/core/dist/runtime-analysis.js.map +1 -0
  1156. package/packages/core/dist/runtime-paths.d.ts +25 -0
  1157. package/packages/core/dist/runtime-paths.js +112 -0
  1158. package/packages/core/dist/runtime-paths.js.map +1 -0
  1159. package/packages/core/dist/sdd-docs/context.d.ts +18 -0
  1160. package/packages/core/dist/sdd-docs/context.js +89 -0
  1161. package/packages/core/dist/sdd-docs/context.js.map +1 -0
  1162. package/packages/core/dist/sdd-docs/run-binding.d.ts +6 -0
  1163. package/packages/core/dist/sdd-docs/run-binding.js +79 -0
  1164. package/packages/core/dist/sdd-docs/run-binding.js.map +1 -0
  1165. package/packages/core/dist/sdd-docs/task-inspection.d.ts +6 -0
  1166. package/packages/core/dist/sdd-docs/task-inspection.js +31 -0
  1167. package/packages/core/dist/sdd-docs/task-inspection.js.map +1 -0
  1168. package/packages/core/dist/sdd-docs/task-parser.d.ts +78 -0
  1169. package/packages/core/dist/sdd-docs/task-parser.js +458 -0
  1170. package/packages/core/dist/sdd-docs/task-parser.js.map +1 -0
  1171. package/packages/core/dist/sdd-docs/task-rendering.d.ts +5 -0
  1172. package/packages/core/dist/sdd-docs/task-rendering.js +77 -0
  1173. package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -0
  1174. package/packages/core/dist/sdd-docs.d.ts +5 -0
  1175. package/packages/core/dist/sdd-docs.js +6 -0
  1176. package/packages/core/dist/sdd-docs.js.map +1 -0
  1177. package/packages/core/dist/stage-runtime/contracts.d.ts +37 -0
  1178. package/packages/core/dist/stage-runtime/contracts.js +2 -0
  1179. package/packages/core/dist/stage-runtime/contracts.js.map +1 -0
  1180. package/packages/core/dist/stage-runtime/runtime.d.ts +71 -0
  1181. package/packages/core/dist/stage-runtime/runtime.js +275 -0
  1182. package/packages/core/dist/stage-runtime/runtime.js.map +1 -0
  1183. package/packages/core/dist/stage-runtime.d.ts +2 -0
  1184. package/packages/core/dist/stage-runtime.js +3 -0
  1185. package/packages/core/dist/stage-runtime.js.map +1 -0
  1186. package/packages/core/dist/status/project-status.d.ts +105 -0
  1187. package/packages/core/dist/status/project-status.js +251 -0
  1188. package/packages/core/dist/status/project-status.js.map +1 -0
  1189. package/packages/core/dist/status.d.ts +2 -0
  1190. package/packages/core/dist/status.js +3 -0
  1191. package/packages/core/dist/status.js.map +1 -0
  1192. package/packages/core/dist/storage/json-io.d.ts +1 -0
  1193. package/packages/core/dist/storage/json-io.js +11 -0
  1194. package/packages/core/dist/storage/json-io.js.map +1 -0
  1195. package/packages/core/dist/storage/runtime-store.d.ts +112 -0
  1196. package/packages/core/dist/storage/runtime-store.js +362 -0
  1197. package/packages/core/dist/storage/runtime-store.js.map +1 -0
  1198. package/packages/core/dist/subagents/contracts.d.ts +41 -0
  1199. package/packages/core/dist/subagents/contracts.js +2 -0
  1200. package/packages/core/dist/subagents/contracts.js.map +1 -0
  1201. package/packages/core/dist/subagents/runtime.d.ts +43 -0
  1202. package/packages/core/dist/subagents/runtime.js +262 -0
  1203. package/packages/core/dist/subagents/runtime.js.map +1 -0
  1204. package/packages/core/dist/subagents.d.ts +2 -0
  1205. package/packages/core/dist/subagents.js +3 -0
  1206. package/packages/core/dist/subagents.js.map +1 -0
  1207. package/packages/core/dist/sync-back/apply.d.ts +17 -0
  1208. package/packages/core/dist/sync-back/apply.js +221 -0
  1209. package/packages/core/dist/sync-back/apply.js.map +1 -0
  1210. package/packages/core/dist/sync-back/inspect.d.ts +91 -0
  1211. package/packages/core/dist/sync-back/inspect.js +395 -0
  1212. package/packages/core/dist/sync-back/inspect.js.map +1 -0
  1213. package/packages/core/dist/sync-back.d.ts +2 -0
  1214. package/packages/core/dist/sync-back.js +3 -0
  1215. package/packages/core/dist/sync-back.js.map +1 -0
  1216. package/packages/core/dist/task-risk-profile.d.ts +33 -0
  1217. package/packages/core/dist/task-risk-profile.js +153 -0
  1218. package/packages/core/dist/task-risk-profile.js.map +1 -0
  1219. package/packages/core/dist/test-support/fixtures.d.ts +21 -0
  1220. package/packages/core/dist/test-support/fixtures.js +363 -0
  1221. package/packages/core/dist/test-support/fixtures.js.map +1 -0
  1222. package/packages/core/dist/test-support/run-state.d.ts +2 -0
  1223. package/packages/core/dist/test-support/run-state.js +55 -0
  1224. package/packages/core/dist/test-support/run-state.js.map +1 -0
  1225. package/packages/core/dist/test-support.d.ts +2 -0
  1226. package/packages/core/dist/test-support.js +3 -0
  1227. package/packages/core/dist/test-support.js.map +1 -0
  1228. package/packages/core/dist/tsconfig.tsbuildinfo +1 -0
  1229. package/packages/core/dist/verification/goal-verify.d.ts +50 -0
  1230. package/packages/core/dist/verification/goal-verify.js +514 -0
  1231. package/packages/core/dist/verification/goal-verify.js.map +1 -0
  1232. package/packages/core/dist/verification/rendering.d.ts +51 -0
  1233. package/packages/core/dist/verification/rendering.js +119 -0
  1234. package/packages/core/dist/verification/rendering.js.map +1 -0
  1235. package/packages/core/dist/verification/single-task-loop.d.ts +29 -0
  1236. package/packages/core/dist/verification/single-task-loop.js +332 -0
  1237. package/packages/core/dist/verification/single-task-loop.js.map +1 -0
  1238. package/packages/core/dist/verification/test-runtime.d.ts +62 -0
  1239. package/packages/core/dist/verification/test-runtime.js +591 -0
  1240. package/packages/core/dist/verification/test-runtime.js.map +1 -0
  1241. package/packages/core/dist/verification/verify-contract.d.ts +42 -0
  1242. package/packages/core/dist/verification/verify-contract.js +201 -0
  1243. package/packages/core/dist/verification/verify-contract.js.map +1 -0
  1244. package/packages/core/dist/verification.d.ts +6 -0
  1245. package/packages/core/dist/verification.js +6 -0
  1246. package/packages/core/dist/verification.js.map +1 -0
  1247. package/packages/core/dist/work-units/contracts.d.ts +24 -0
  1248. package/packages/core/dist/work-units/contracts.js +2 -0
  1249. package/packages/core/dist/work-units/contracts.js.map +1 -0
  1250. package/packages/core/dist/work-units/runtime.d.ts +21 -0
  1251. package/packages/core/dist/work-units/runtime.js +90 -0
  1252. package/packages/core/dist/work-units/runtime.js.map +1 -0
  1253. package/packages/core/dist/work-units.d.ts +2 -0
  1254. package/packages/core/dist/work-units.js +3 -0
  1255. package/packages/core/dist/work-units.js.map +1 -0
  1256. package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +12 -0
  1257. package/packages/core/dist/workflow-state/affected-file-conflicts.js +60 -0
  1258. package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -0
  1259. package/packages/core/dist/workflow-state/dependencies.d.ts +25 -0
  1260. package/packages/core/dist/workflow-state/dependencies.js +64 -0
  1261. package/packages/core/dist/workflow-state/dependencies.js.map +1 -0
  1262. package/packages/core/dist/workflow-state/resolve.d.ts +50 -0
  1263. package/packages/core/dist/workflow-state/resolve.js +124 -0
  1264. package/packages/core/dist/workflow-state/resolve.js.map +1 -0
  1265. package/packages/core/dist/workflow-state.d.ts +1 -0
  1266. package/packages/core/dist/workflow-state.js +2 -0
  1267. package/packages/core/dist/workflow-state.js.map +1 -0
  1268. package/packages/core/dist/worktree/isolation.d.ts +40 -0
  1269. package/packages/core/dist/worktree/isolation.js +89 -0
  1270. package/packages/core/dist/worktree/isolation.js.map +1 -0
  1271. package/packages/core/dist/worktree/lifecycle.d.ts +39 -0
  1272. package/packages/core/dist/worktree/lifecycle.js +221 -0
  1273. package/packages/core/dist/worktree/lifecycle.js.map +1 -0
  1274. package/packages/core/dist/worktree.d.ts +2 -0
  1275. package/packages/core/dist/worktree.js +3 -0
  1276. package/packages/core/dist/worktree.js.map +1 -0
  1277. package/packages/core/package.json +40 -0
  1278. package/tsconfig.build.json +4 -3
  1279. package/dist/packages/cli/src/main.js +0 -2522
  1280. package/dist/packages/cli/src/main.js.map +0 -1
  1281. package/dist/packages/cli/src/options.js.map +0 -1
  1282. package/dist/packages/core/src/ai-tools.js.map +0 -1
  1283. package/dist/packages/core/src/index.d.ts +0 -1986
  1284. package/dist/packages/core/src/index.js +0 -9722
  1285. package/dist/packages/core/src/index.js.map +0 -1
  1286. package/dist/packages/core/src/instructions.js.map +0 -1
  1287. package/dist/packages/core/src/path-safety.js.map +0 -1
  1288. /package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/path-safety.d.ts +0 -0
  1289. /package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/path-safety.js +0 -0
  1290. /package/{dist/packages/cli/src → packages/cli/dist}/main.d.ts +0 -0
@@ -0,0 +1,36 @@
1
+ import type { RuntimeProjectionEnvelope, RuntimeRef, RuntimeScope } from '../contracts.js';
2
+ import { type RuntimeProjectionEnvelopeWriteResult } from '../storage/runtime-store.js';
3
+ import type { ContextLoadLevel, ContextLoadSignal, ContextOffloadDecision } from './contracts.js';
4
+ export declare const CONTEXT_OFFLOAD_RUNTIME_PRODUCER_VERSION = "phase8-context-offload-runtime-v1";
5
+ export declare const CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE = "phase8_context_load_signal";
6
+ export declare const CONTEXT_OFFLOAD_DECISION_PROJECTION_TYPE = "phase8_context_offload_decision";
7
+ export interface ContextLoadInput {
8
+ scope: RuntimeScope;
9
+ refs?: RuntimeRef[];
10
+ fileCount?: number;
11
+ artifactBytes?: number;
12
+ dependencyFanout?: number;
13
+ unknownImpact?: boolean;
14
+ staleEvidenceRefs?: number;
15
+ logBytes?: number;
16
+ generatedAt?: string;
17
+ }
18
+ export interface ContextRuntimeDiagnostic {
19
+ level: ContextLoadLevel | 'unknown';
20
+ action: ContextOffloadDecision['action'] | 'none';
21
+ loadSignals: number;
22
+ offloadDecisions: number;
23
+ dispatchRefs: number;
24
+ blockingReasons: string[];
25
+ }
26
+ export declare function evaluateContextLoadSignal(input: ContextLoadInput): ContextLoadSignal;
27
+ export declare function decideContextOffload(signal: ContextLoadSignal, refs?: {
28
+ inlineRefs?: RuntimeRef[];
29
+ summarizeRefs?: RuntimeRef[];
30
+ dispatchRefs?: RuntimeRef[];
31
+ }): ContextOffloadDecision;
32
+ export declare function contextLoadSignalScopeKey(scope: RuntimeScope): string;
33
+ export declare function recordContextLoadSignalProjection(projectRoot: string, signal: ContextLoadSignal): Promise<RuntimeProjectionEnvelopeWriteResult<ContextLoadSignal>>;
34
+ export declare function readContextLoadSignalProjection(projectRoot: string, scope: RuntimeScope): Promise<RuntimeProjectionEnvelope<ContextLoadSignal> | null>;
35
+ export declare function recordContextOffloadDecisionProjection(projectRoot: string, decision: ContextOffloadDecision): Promise<RuntimeProjectionEnvelopeWriteResult<ContextOffloadDecision>>;
36
+ export declare function inspectContextOffloadRuntime(projectRoot: string, branch: string): Promise<ContextRuntimeDiagnostic>;
@@ -0,0 +1,142 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION, CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION } from '../contracts.js';
3
+ import { listRuntimeProjections, readRuntimeProjectionEnvelope, recordRuntimeProjectionEnvelope } from '../storage/runtime-store.js';
4
+ export const CONTEXT_OFFLOAD_RUNTIME_PRODUCER_VERSION = 'phase8-context-offload-runtime-v1';
5
+ export const CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE = 'phase8_context_load_signal';
6
+ export const CONTEXT_OFFLOAD_DECISION_PROJECTION_TYPE = 'phase8_context_offload_decision';
7
+ export function evaluateContextLoadSignal(input) {
8
+ const fileCountScore = scoreByThreshold(input.fileCount ?? 0, [8, 20, 40]);
9
+ const artifactSizeScore = scoreByThreshold(input.artifactBytes ?? 0, [50_000, 200_000, 500_000]);
10
+ const dependencyFanoutScore = scoreByThreshold(input.dependencyFanout ?? 0, [5, 12, 25]);
11
+ const unknownImpactScore = input.unknownImpact ? 2 : 0;
12
+ const staleEvidenceScore = scoreByThreshold(input.staleEvidenceRefs ?? 0, [1, 3, 6]);
13
+ const logVolumeScore = scoreByThreshold(input.logBytes ?? 0, [30_000, 120_000, 300_000]);
14
+ const score = fileCountScore + artifactSizeScore + dependencyFanoutScore + unknownImpactScore + staleEvidenceScore + logVolumeScore;
15
+ return {
16
+ contract: CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION,
17
+ scope: input.scope,
18
+ level: contextLevelForScore(score),
19
+ score,
20
+ fileCountScore,
21
+ artifactSizeScore,
22
+ dependencyFanoutScore,
23
+ unknownImpactScore,
24
+ staleEvidenceScore,
25
+ logVolumeScore,
26
+ confidence: input.unknownImpact ? 'medium' : 'high',
27
+ inputRefs: input.refs ?? [],
28
+ reasons: contextLoadReasons(fileCountScore, artifactSizeScore, dependencyFanoutScore, unknownImpactScore, staleEvidenceScore, logVolumeScore),
29
+ generatedAt: input.generatedAt ?? new Date().toISOString()
30
+ };
31
+ }
32
+ export function decideContextOffload(signal, refs = {}) {
33
+ const action = signal.level === 'overloaded'
34
+ ? 'block-for-curation'
35
+ : signal.level === 'high'
36
+ ? 'dispatch-subagent'
37
+ : signal.level === 'elevated'
38
+ ? 'summarize'
39
+ : 'inline';
40
+ return {
41
+ contract: CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION,
42
+ scope: signal.scope,
43
+ action,
44
+ loadSignalRef: { kind: 'projection', ref: `${CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE}:${contextLoadSignalScopeKey(signal.scope)}` },
45
+ requiredBefore: action === 'block-for-curation' ? 'stage-output' : action === 'dispatch-subagent' ? 'handoff' : 'never',
46
+ inlineRefs: action === 'inline' ? refs.inlineRefs ?? signal.inputRefs : [],
47
+ summarizeRefs: action === 'summarize' ? refs.summarizeRefs ?? signal.inputRefs : [],
48
+ dispatchRefs: action === 'dispatch-subagent' ? refs.dispatchRefs ?? signal.inputRefs : [],
49
+ blockingReasons: action === 'block-for-curation' ? signal.reasons : [],
50
+ generatedAt: signal.generatedAt
51
+ };
52
+ }
53
+ export function contextLoadSignalScopeKey(scope) {
54
+ return [scope.branch, scope.taskId ?? 'all', scope.runId ?? 'none', scope.changeRef ?? 'none'].join(':');
55
+ }
56
+ export async function recordContextLoadSignalProjection(projectRoot, signal) {
57
+ return recordRuntimeProjectionEnvelope(projectRoot, {
58
+ projectionType: CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE,
59
+ scopeKey: contextLoadSignalScopeKey(signal.scope),
60
+ inputHash: stableHash(JSON.stringify(signal)),
61
+ producer: 'phase8-context-offload-runtime',
62
+ producerVersion: CONTEXT_OFFLOAD_RUNTIME_PRODUCER_VERSION,
63
+ generatedAt: signal.generatedAt,
64
+ payload: signal
65
+ });
66
+ }
67
+ export async function readContextLoadSignalProjection(projectRoot, scope) {
68
+ return readRuntimeProjectionEnvelope(projectRoot, CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE, contextLoadSignalScopeKey(scope));
69
+ }
70
+ export async function recordContextOffloadDecisionProjection(projectRoot, decision) {
71
+ return recordRuntimeProjectionEnvelope(projectRoot, {
72
+ projectionType: CONTEXT_OFFLOAD_DECISION_PROJECTION_TYPE,
73
+ scopeKey: contextLoadSignalScopeKey(decision.scope),
74
+ inputHash: stableHash(JSON.stringify(decision)),
75
+ producer: 'phase8-context-offload-runtime',
76
+ producerVersion: CONTEXT_OFFLOAD_RUNTIME_PRODUCER_VERSION,
77
+ generatedAt: decision.generatedAt,
78
+ payload: decision
79
+ });
80
+ }
81
+ export async function inspectContextOffloadRuntime(projectRoot, branch) {
82
+ const projections = await listRuntimeProjections(projectRoot, [CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE, CONTEXT_OFFLOAD_DECISION_PROJECTION_TYPE]);
83
+ const signalEnvelopes = projections
84
+ .filter((projection) => projection.projectionType === CONTEXT_LOAD_SIGNAL_PROJECTION_TYPE)
85
+ .map((projection) => projection.payload)
86
+ .filter((envelope) => envelope?.payload?.scope?.branch === branch);
87
+ const decisionEnvelopes = projections
88
+ .filter((projection) => projection.projectionType === CONTEXT_OFFLOAD_DECISION_PROJECTION_TYPE)
89
+ .map((projection) => projection.payload)
90
+ .filter((envelope) => envelope?.payload?.scope?.branch === branch);
91
+ const latestSignal = latestEnvelope(signalEnvelopes)?.payload ?? null;
92
+ const latestDecision = latestEnvelope(decisionEnvelopes)?.payload ?? null;
93
+ return {
94
+ level: latestSignal?.level ?? 'unknown',
95
+ action: latestDecision?.action ?? 'none',
96
+ loadSignals: signalEnvelopes.length,
97
+ offloadDecisions: decisionEnvelopes.length,
98
+ dispatchRefs: latestDecision?.dispatchRefs.length ?? 0,
99
+ blockingReasons: latestDecision?.blockingReasons ?? []
100
+ };
101
+ }
102
+ function latestEnvelope(envelopes) {
103
+ return [...envelopes].sort((left, right) => right.generatedAt.localeCompare(left.generatedAt))[0] ?? null;
104
+ }
105
+ function contextLevelForScore(score) {
106
+ if (score >= 10) {
107
+ return 'overloaded';
108
+ }
109
+ if (score >= 7) {
110
+ return 'high';
111
+ }
112
+ if (score >= 3) {
113
+ return 'elevated';
114
+ }
115
+ return 'normal';
116
+ }
117
+ function scoreByThreshold(value, thresholds) {
118
+ if (value >= thresholds[2]) {
119
+ return 3;
120
+ }
121
+ if (value >= thresholds[1]) {
122
+ return 2;
123
+ }
124
+ if (value >= thresholds[0]) {
125
+ return 1;
126
+ }
127
+ return 0;
128
+ }
129
+ function contextLoadReasons(fileCountScore, artifactSizeScore, dependencyFanoutScore, unknownImpactScore, staleEvidenceScore, logVolumeScore) {
130
+ return [
131
+ fileCountScore > 0 ? `file-count score=${fileCountScore}` : null,
132
+ artifactSizeScore > 0 ? `artifact-size score=${artifactSizeScore}` : null,
133
+ dependencyFanoutScore > 0 ? `dependency-fanout score=${dependencyFanoutScore}` : null,
134
+ unknownImpactScore > 0 ? `unknown-impact score=${unknownImpactScore}` : null,
135
+ staleEvidenceScore > 0 ? `stale-evidence score=${staleEvidenceScore}` : null,
136
+ logVolumeScore > 0 ? `log-volume score=${logVolumeScore}` : null
137
+ ].filter((reason) => reason !== null);
138
+ }
139
+ function stableHash(value) {
140
+ return createHash('sha256').update(value, 'utf8').digest('hex');
141
+ }
142
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"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 -0,0 +1,2 @@
1
+ export * from './context-offload/contracts.js';
2
+ export * from './context-offload/runtime.js';
@@ -0,0 +1,3 @@
1
+ export * from './context-offload/contracts.js';
2
+ export * from './context-offload/runtime.js';
3
+ //# sourceMappingURL=context-offload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-offload.js","sourceRoot":"","sources":["../src/context-offload.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './context/budget.js';
2
+ export * from './context/build-package.js';
3
+ export * from './context/command-summary.js';
4
+ export * from './context/evidence-summary.js';
5
+ export * from './context/log-worker.js';
6
+ export * from './context/source-refs.js';
@@ -0,0 +1,7 @@
1
+ export * from './context/budget.js';
2
+ export * from './context/build-package.js';
3
+ export * from './context/command-summary.js';
4
+ export * from './context/evidence-summary.js';
5
+ export * from './context/log-worker.js';
6
+ export * from './context/source-refs.js';
7
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface ContractValidationIssue {
2
+ field: string;
3
+ message: string;
4
+ recommendation: string;
5
+ }
6
+ export declare function contractIssue(field: string, message: string, recommendation: string): ContractValidationIssue;
7
+ export declare function messageFromError(error: unknown): string;
@@ -0,0 +1,7 @@
1
+ export function contractIssue(field, message, recommendation) {
2
+ return { field, message, recommendation };
3
+ }
4
+ export function messageFromError(error) {
5
+ return error instanceof Error ? error.message : String(error);
6
+ }
7
+ //# sourceMappingURL=issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/contracts/issues.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,OAAe,EAAE,cAAsB;IAClF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,108 @@
1
+ export declare const RUNTIME_VERSION = "phase-1.2-runtime-skeleton";
2
+ export declare const PROJECT_CONFIG_CONTRACT = "phase-1.2-project-contract";
3
+ export declare const RUN_STATE_CONTRACT = "phase-1.2-run-state-contract";
4
+ export declare const EVENT_LOG_CONTRACT = "phase-1.2-event-log-contract";
5
+ export declare const ARTIFACT_PATH_CONTRACT = "phase-1.2-artifact-path-contract";
6
+ export declare const LEGACY_LIFECYCLE_DECISION_CONTRACT = "phase-1.2-lifecycle-decision-contract";
7
+ export declare const LIFECYCLE_DECISION_CONTRACT = "sdd-lifecycle-decision-v1";
8
+ export declare const LIFECYCLE_DECISION_VERSION = "1.3.0";
9
+ export declare const SDD_RESULT_CONTRACT = "sdd-result-v1";
10
+ export declare const SDD_RESULT_VERSION = "1.3.0";
11
+ export declare const DELEGATION_LIVENESS_CONTRACT = "sdd-delegation-liveness-v1";
12
+ export declare const DELEGATION_LIVENESS_VERSION = "1.3.0";
13
+ export declare const ARTIFACT_RESULT_INGESTION_CONTRACT_VERSION = "phase-3.6-artifact-result-ingestion-v1";
14
+ export declare const TASK_GRAPH_PLANNER_CONTRACT_VERSION = "phase-3.9-task-graph-planner-v1";
15
+ export declare const WAVE_PLANNER_CONTRACT_VERSION = "phase-3.10-wave-planner-v1";
16
+ export declare const BACKGROUND_EXECUTOR_CONTRACT_VERSION = "phase-3.11-background-executor-v1";
17
+ export declare const WAVE_EXECUTOR_CONTRACT_VERSION = "phase-3.12-wave-executor-v1";
18
+ export declare const LOCAL_RUN_INDEX_CONTRACT_VERSION = "phase-3.13-local-run-index-v1";
19
+ export declare const GOVERNANCE_POLICY_CONTRACT_VERSION = "phase-3.14-governance-policy-v1";
20
+ export declare const CONTEXT_RESOLVER_CONTRACT_VERSION = "phase-5.1-context-resolver-v1";
21
+ export declare const LIFECYCLE_RISK_GATE_CONTRACT_VERSION = "phase-5.1-lifecycle-risk-gate-v1";
22
+ export declare const OUTPUT_QUALITY_CONTRACT_VERSION = "phase-5.1-output-quality-v1";
23
+ export declare const WORKFLOW_GATE_CONTRACT_VERSION = "phase-5.2-workflow-gate-v1";
24
+ export declare const AGENT_REGISTRY_CONTRACT_VERSION = "phase-5.2-agent-registry-v1";
25
+ export declare const TASK_GRAPH_CONTRACT_VERSION = "phase-5.3-task-graph-v1";
26
+ export declare const TASK_RUN_EVIDENCE_CONTRACT_VERSION = "phase-5.3-task-run-evidence-v1";
27
+ export declare const QUERY_STATUS_CONTRACT_VERSION = "phase-5.4-query-status-v1";
28
+ export declare const SKILL_AGENT_EVAL_CONTRACT_VERSION = "phase-5.5-skill-agent-eval-v1";
29
+ export declare const HARNESS_LEARNING_CONTRACT_VERSION = "phase-5.5-harness-learning-v1";
30
+ export declare const PROJECT_CONTEXT_PACK_CONTRACT_VERSION = "phase-5.5-project-context-pack-v1";
31
+ export declare const AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION = "phase-6.0-agent-skill-team-runtime-v1";
32
+ export declare const CAPABILITY_SOURCE_CATALOG_VERSION = "phase-6.0-capability-source-catalog-v1";
33
+ export declare const EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION = "phase-6.0-external-agent-pack-import-policy-v1";
34
+ export declare const TOOL_PERMISSION_SPEC_VERSION = "phase-6.0-tool-permission-spec-v1";
35
+ export declare const HOST_ADAPTER_CONTRACT_VERSION = "phase-6.0-host-adapter-contract-v1";
36
+ export declare const AGENT_ROUTER_CONTRACT_VERSION = "phase-6.0-agent-router-v1";
37
+ export declare const TEAM_MODE_POLICY_VERSION = "phase-6.0-team-mode-policy-v1";
38
+ export declare const EVIDENCE_INGESTION_CONTRACT_VERSION = "phase-6.0-evidence-ingestion-v1";
39
+ export declare const AGENT_EXECUTION_RECORD_CONTRACT_VERSION = "phase-6.0-agent-execution-record-v1";
40
+ export declare const TEAM_SESSION_RECORD_CONTRACT_VERSION = "phase-6.0-team-session-record-v1";
41
+ export declare const RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION = "phase-6.1-resident-worker-runtime-v1";
42
+ export declare const SDD_EVIDENCE_CONTRACT = "sdd-evidence-v1";
43
+ export declare const SDD_EVIDENCE_VERSION = "1.0.0";
44
+ export declare const ACCEPTANCE_POLICY_RULESET_VERSION = "acceptance-policy-v1";
45
+ export declare const INVOCATION_LEDGER_CONTRACT_VERSION = "phase-6.9-invocation-ledger-v1";
46
+ export declare const ROUTE_CACHE_CONTRACT_VERSION = "phase-6.9-route-cache-v1";
47
+ export declare const RUNTIME_PROFILE_CONTRACT_VERSION = "phase-6.9-runtime-profile-v1";
48
+ export declare const CONTEXT_BUDGET_CONTRACT_VERSION = "phase-6.10-context-budget-v1";
49
+ export declare const COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION = "sdd-command-output-summary-v1";
50
+ export declare const EVIDENCE_SUMMARY_CONTRACT_VERSION = "sdd-evidence-summary-v1";
51
+ export declare const CONTEXT_PACKAGE_CONTRACT_VERSION = "sdd-context-package-v1";
52
+ export declare const LOG_WORKER_SUMMARY_CONTRACT_VERSION = "sdd-log-worker-summary-v1";
53
+ export declare const RUNTIME_ANALYSIS_CONTRACT_VERSION = "phase-7-runtime-analysis-v1";
54
+ export declare const WORKFLOW_STATE_RESOLVER_CONTRACT_VERSION = "phase-7.3-workflow-state-resolver-v1";
55
+ export declare const VERIFY_DOCUMENT_CONTRACT_VERSION = "sdd-verify-doc-v1";
56
+ export declare const AGENT_CAPABILITY_CATALOG_CONTRACT_VERSION = "phase-7.6-agent-capability-catalog-v1";
57
+ export declare const COMMAND_TEAM_RUNTIME_CONTRACT_VERSION = "phase-7.7-command-team-runtime-v1";
58
+ export declare const RUNTIME_PROJECTION_ENVELOPE_CONTRACT_VERSION = "sdd-runtime-projection-envelope-v1";
59
+ export declare const CODING_FACT_SET_CONTRACT_VERSION = "sdd-coding-fact-set-v1";
60
+ export declare const CODING_RISK_PROFILE_CONTRACT_VERSION = "sdd-coding-risk-profile-v1";
61
+ export declare const LIFECYCLE_RISK_DECISION_CONTRACT_VERSION = "sdd-lifecycle-risk-decision-v1";
62
+ export declare const STAGE_RUN_CONTRACT_VERSION = "sdd-stage-run-v1";
63
+ export declare const WORKFLOW_HANDOFF_CONTRACT_VERSION = "sdd-workflow-handoff-v1";
64
+ export declare const WORK_UNIT_CONTRACT_VERSION = "sdd-work-unit-v1";
65
+ export declare const SUBAGENT_DEFINITION_CONTRACT_VERSION = "sdd-subagent-definition-v1";
66
+ export declare const SUBAGENT_DISPATCH_CONTRACT_VERSION = "sdd-subagent-dispatch-v1";
67
+ export declare const SUBAGENT_RESULT_CONTRACT_VERSION = "sdd-subagent-result-v1";
68
+ export declare const CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION = "sdd-context-load-signal-v1";
69
+ export declare const CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION = "sdd-context-offload-decision-v1";
70
+ export declare const SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION = "sdd-scoped-context-handoff-v1";
71
+ export declare const TEST_EVIDENCE_RUN_CONTRACT_VERSION = "sdd-test-evidence-run-v1";
72
+ export declare const MODEL_PRODUCED_ARTIFACT_CONTRACT_VERSION = "sdd-model-produced-artifact-v1";
73
+ export type RuntimeConfidence = 'high' | 'medium' | 'low';
74
+ export type RuntimeProjectionStaleness = 'fresh' | 'stale' | 'incompatible' | 'unknown';
75
+ export type SddStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'goal-verify' | 'sync-back' | 'ship';
76
+ export type RuntimeRefKind = 'document' | 'task' | 'run' | 'artifact' | 'projection' | 'evidence' | 'command' | 'external';
77
+ export interface RuntimeScope {
78
+ branch: string;
79
+ taskId?: string;
80
+ runId?: string;
81
+ changeRef?: string;
82
+ }
83
+ export interface RuntimeRef {
84
+ kind: RuntimeRefKind;
85
+ ref: string;
86
+ hash?: string;
87
+ }
88
+ export interface RuntimeProjectionEnvelope<TPayload> {
89
+ contract: typeof RUNTIME_PROJECTION_ENVELOPE_CONTRACT_VERSION;
90
+ projectionType: string;
91
+ scopeKey: string;
92
+ id: string;
93
+ inputHash: string;
94
+ producer: string;
95
+ producerVersion: string;
96
+ generatedAt: string;
97
+ staleReason?: string;
98
+ payload: TPayload;
99
+ }
100
+ export interface ModelProducedArtifact {
101
+ contract: typeof MODEL_PRODUCED_ARTIFACT_CONTRACT_VERSION;
102
+ producer: 'main-agent' | 'co-main-agent' | 'subagent';
103
+ authority: 'stage-owned' | 'candidate' | 'non-authoritative';
104
+ allowedUse: Array<'summary' | 'diagnostic' | 'test-suggestion' | 'evidence-candidate'>;
105
+ forbiddenUse: Array<'final-risk-decision' | 'stage-completion' | 'ship-gate-pass'>;
106
+ artifactRefs: string[];
107
+ reviewedByRuntime: boolean;
108
+ }
@@ -0,0 +1,73 @@
1
+ export const RUNTIME_VERSION = 'phase-1.2-runtime-skeleton';
2
+ export const PROJECT_CONFIG_CONTRACT = 'phase-1.2-project-contract';
3
+ export const RUN_STATE_CONTRACT = 'phase-1.2-run-state-contract';
4
+ export const EVENT_LOG_CONTRACT = 'phase-1.2-event-log-contract';
5
+ export const ARTIFACT_PATH_CONTRACT = 'phase-1.2-artifact-path-contract';
6
+ export const LEGACY_LIFECYCLE_DECISION_CONTRACT = 'phase-1.2-lifecycle-decision-contract';
7
+ export const LIFECYCLE_DECISION_CONTRACT = 'sdd-lifecycle-decision-v1';
8
+ export const LIFECYCLE_DECISION_VERSION = '1.3.0';
9
+ export const SDD_RESULT_CONTRACT = 'sdd-result-v1';
10
+ export const SDD_RESULT_VERSION = '1.3.0';
11
+ export const DELEGATION_LIVENESS_CONTRACT = 'sdd-delegation-liveness-v1';
12
+ export const DELEGATION_LIVENESS_VERSION = '1.3.0';
13
+ export const ARTIFACT_RESULT_INGESTION_CONTRACT_VERSION = 'phase-3.6-artifact-result-ingestion-v1';
14
+ export const TASK_GRAPH_PLANNER_CONTRACT_VERSION = 'phase-3.9-task-graph-planner-v1';
15
+ export const WAVE_PLANNER_CONTRACT_VERSION = 'phase-3.10-wave-planner-v1';
16
+ export const BACKGROUND_EXECUTOR_CONTRACT_VERSION = 'phase-3.11-background-executor-v1';
17
+ export const WAVE_EXECUTOR_CONTRACT_VERSION = 'phase-3.12-wave-executor-v1';
18
+ export const LOCAL_RUN_INDEX_CONTRACT_VERSION = 'phase-3.13-local-run-index-v1';
19
+ export const GOVERNANCE_POLICY_CONTRACT_VERSION = 'phase-3.14-governance-policy-v1';
20
+ export const CONTEXT_RESOLVER_CONTRACT_VERSION = 'phase-5.1-context-resolver-v1';
21
+ export const LIFECYCLE_RISK_GATE_CONTRACT_VERSION = 'phase-5.1-lifecycle-risk-gate-v1';
22
+ export const OUTPUT_QUALITY_CONTRACT_VERSION = 'phase-5.1-output-quality-v1';
23
+ export const WORKFLOW_GATE_CONTRACT_VERSION = 'phase-5.2-workflow-gate-v1';
24
+ export const AGENT_REGISTRY_CONTRACT_VERSION = 'phase-5.2-agent-registry-v1';
25
+ export const TASK_GRAPH_CONTRACT_VERSION = 'phase-5.3-task-graph-v1';
26
+ export const TASK_RUN_EVIDENCE_CONTRACT_VERSION = 'phase-5.3-task-run-evidence-v1';
27
+ export const QUERY_STATUS_CONTRACT_VERSION = 'phase-5.4-query-status-v1';
28
+ export const SKILL_AGENT_EVAL_CONTRACT_VERSION = 'phase-5.5-skill-agent-eval-v1';
29
+ export const HARNESS_LEARNING_CONTRACT_VERSION = 'phase-5.5-harness-learning-v1';
30
+ export const PROJECT_CONTEXT_PACK_CONTRACT_VERSION = 'phase-5.5-project-context-pack-v1';
31
+ export const AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION = 'phase-6.0-agent-skill-team-runtime-v1';
32
+ export const CAPABILITY_SOURCE_CATALOG_VERSION = 'phase-6.0-capability-source-catalog-v1';
33
+ export const EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION = 'phase-6.0-external-agent-pack-import-policy-v1';
34
+ export const TOOL_PERMISSION_SPEC_VERSION = 'phase-6.0-tool-permission-spec-v1';
35
+ export const HOST_ADAPTER_CONTRACT_VERSION = 'phase-6.0-host-adapter-contract-v1';
36
+ export const AGENT_ROUTER_CONTRACT_VERSION = 'phase-6.0-agent-router-v1';
37
+ export const TEAM_MODE_POLICY_VERSION = 'phase-6.0-team-mode-policy-v1';
38
+ export const EVIDENCE_INGESTION_CONTRACT_VERSION = 'phase-6.0-evidence-ingestion-v1';
39
+ export const AGENT_EXECUTION_RECORD_CONTRACT_VERSION = 'phase-6.0-agent-execution-record-v1';
40
+ export const TEAM_SESSION_RECORD_CONTRACT_VERSION = 'phase-6.0-team-session-record-v1';
41
+ export const RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION = 'phase-6.1-resident-worker-runtime-v1';
42
+ export const SDD_EVIDENCE_CONTRACT = 'sdd-evidence-v1';
43
+ export const SDD_EVIDENCE_VERSION = '1.0.0';
44
+ export const ACCEPTANCE_POLICY_RULESET_VERSION = 'acceptance-policy-v1';
45
+ export const INVOCATION_LEDGER_CONTRACT_VERSION = 'phase-6.9-invocation-ledger-v1';
46
+ export const ROUTE_CACHE_CONTRACT_VERSION = 'phase-6.9-route-cache-v1';
47
+ export const RUNTIME_PROFILE_CONTRACT_VERSION = 'phase-6.9-runtime-profile-v1';
48
+ export const CONTEXT_BUDGET_CONTRACT_VERSION = 'phase-6.10-context-budget-v1';
49
+ export const COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION = 'sdd-command-output-summary-v1';
50
+ export const EVIDENCE_SUMMARY_CONTRACT_VERSION = 'sdd-evidence-summary-v1';
51
+ export const CONTEXT_PACKAGE_CONTRACT_VERSION = 'sdd-context-package-v1';
52
+ export const LOG_WORKER_SUMMARY_CONTRACT_VERSION = 'sdd-log-worker-summary-v1';
53
+ export const RUNTIME_ANALYSIS_CONTRACT_VERSION = 'phase-7-runtime-analysis-v1';
54
+ export const WORKFLOW_STATE_RESOLVER_CONTRACT_VERSION = 'phase-7.3-workflow-state-resolver-v1';
55
+ export const VERIFY_DOCUMENT_CONTRACT_VERSION = 'sdd-verify-doc-v1';
56
+ export const AGENT_CAPABILITY_CATALOG_CONTRACT_VERSION = 'phase-7.6-agent-capability-catalog-v1';
57
+ export const COMMAND_TEAM_RUNTIME_CONTRACT_VERSION = 'phase-7.7-command-team-runtime-v1';
58
+ export const RUNTIME_PROJECTION_ENVELOPE_CONTRACT_VERSION = 'sdd-runtime-projection-envelope-v1';
59
+ export const CODING_FACT_SET_CONTRACT_VERSION = 'sdd-coding-fact-set-v1';
60
+ export const CODING_RISK_PROFILE_CONTRACT_VERSION = 'sdd-coding-risk-profile-v1';
61
+ export const LIFECYCLE_RISK_DECISION_CONTRACT_VERSION = 'sdd-lifecycle-risk-decision-v1';
62
+ export const STAGE_RUN_CONTRACT_VERSION = 'sdd-stage-run-v1';
63
+ export const WORKFLOW_HANDOFF_CONTRACT_VERSION = 'sdd-workflow-handoff-v1';
64
+ export const WORK_UNIT_CONTRACT_VERSION = 'sdd-work-unit-v1';
65
+ export const SUBAGENT_DEFINITION_CONTRACT_VERSION = 'sdd-subagent-definition-v1';
66
+ export const SUBAGENT_DISPATCH_CONTRACT_VERSION = 'sdd-subagent-dispatch-v1';
67
+ export const SUBAGENT_RESULT_CONTRACT_VERSION = 'sdd-subagent-result-v1';
68
+ export const CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION = 'sdd-context-load-signal-v1';
69
+ export const CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION = 'sdd-context-offload-decision-v1';
70
+ export const SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION = 'sdd-scoped-context-handoff-v1';
71
+ export const TEST_EVIDENCE_RUN_CONTRACT_VERSION = 'sdd-test-evidence-run-v1';
72
+ export const MODEL_PRODUCED_ARTIFACT_CONTRACT_VERSION = 'sdd-model-produced-artifact-v1';
73
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,4BAA4B,CAAC;AAC5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AACpE,MAAM,CAAC,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;AACjE,MAAM,CAAC,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,kCAAkC,CAAC;AACzE,MAAM,CAAC,MAAM,kCAAkC,GAAG,uCAAuC,CAAC;AAC1F,MAAM,CAAC,MAAM,2BAA2B,GAAG,2BAA2B,CAAC;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GAAG,4BAA4B,CAAC;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAEnD,MAAM,CAAC,MAAM,0CAA0C,GAAG,wCAAwC,CAAC;AACnG,MAAM,CAAC,MAAM,mCAAmC,GAAG,iCAAiC,CAAC;AACrF,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAC1E,MAAM,CAAC,MAAM,oCAAoC,GAAG,mCAAmC,CAAC;AACxF,MAAM,CAAC,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG,+BAA+B,CAAC;AA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AAC,MAAM,oCAAoC,GAAG,4BAA4B,CAAC;AACjF,MAAM,CAAC,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AAC7E,MAAM,CAAC,MAAM,gCAAgC,GAAG,wBAAwB,CAAC;AACzE,MAAM,CAAC,MAAM,oCAAoC,GAAG,4BAA4B,CAAC;AACjF,MAAM,CAAC,MAAM,yCAAyC,GAAG,iCAAiC,CAAC;AAC3F,MAAM,CAAC,MAAM,uCAAuC,GAAG,+BAA+B,CAAC;AACvF,MAAM,CAAC,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AAC7E,MAAM,CAAC,MAAM,wCAAwC,GAAG,gCAAgC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { DELEGATION_LIVENESS_CONTRACT, DELEGATION_LIVENESS_VERSION } from '../contracts.js';
2
+ import type { DelegationStatus } from './state-machine.js';
3
+ export type { DelegationStatus } from './state-machine.js';
4
+ export type DelegationRunMode = 'foreground' | 'background';
5
+ export interface DelegationRecord {
6
+ contract: typeof DELEGATION_LIVENESS_CONTRACT;
7
+ version: typeof DELEGATION_LIVENESS_VERSION;
8
+ delegationId: string;
9
+ task: string;
10
+ agent: string;
11
+ runMode: DelegationRunMode;
12
+ blocking: boolean;
13
+ requiredForPhaseExit: boolean;
14
+ status: DelegationStatus;
15
+ startedAt: string;
16
+ lastHeartbeatAt: string | null;
17
+ timeoutSeconds: number;
18
+ expectedArtifact: string;
19
+ terminalEventRequired: boolean;
20
+ terminalEventAt?: string | null;
21
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/delegation/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { DelegationQueueItem } from '../run-state/run-index.js';
2
+ export declare const DELEGATION_QUEUE_CONTRACT_VERSION = "phase-3.3-delegation-queue-contract-v1";
3
+ export interface DelegationQueueSnapshot {
4
+ version: string;
5
+ items: DelegationQueueItem[];
6
+ }
7
+ export declare function listDelegationQueueItems(projectRoot: string, options?: {
8
+ runId?: string;
9
+ }): Promise<DelegationQueueSnapshot>;
10
+ export declare function inspectDelegationQueueItem(projectRoot: string, queueItemId: string): Promise<DelegationQueueItem | null>;
@@ -0,0 +1,47 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { parseProjectConfig } from '../config/project-config.js';
3
+ import { getProjectConfigPath } from '../runtime-paths.js';
4
+ import { readAllRunStates, readRunState } from '../run-state/run-state.js';
5
+ export const DELEGATION_QUEUE_CONTRACT_VERSION = 'phase-3.3-delegation-queue-contract-v1';
6
+ export async function listDelegationQueueItems(projectRoot, options = {}) {
7
+ await assertProjectConfigReadable(projectRoot);
8
+ const states = options.runId
9
+ ? [await readRunState(projectRoot, options.runId)]
10
+ : await readAllRunStates(projectRoot);
11
+ const items = states
12
+ .filter((state) => state.status !== 'archived')
13
+ .flatMap((state) => Object.values(state.delegations).map((delegation) => delegationQueueItemFromRunState(state, delegation)))
14
+ .sort((left, right) => left.id.localeCompare(right.id));
15
+ return {
16
+ version: DELEGATION_QUEUE_CONTRACT_VERSION,
17
+ items
18
+ };
19
+ }
20
+ export async function inspectDelegationQueueItem(projectRoot, queueItemId) {
21
+ const snapshot = await listDelegationQueueItems(projectRoot);
22
+ return snapshot.items.find((item) => item.id === queueItemId) ?? null;
23
+ }
24
+ function delegationQueueItemFromRunState(state, delegation) {
25
+ return {
26
+ id: `${state.runId}:${delegation.delegationId}`,
27
+ runId: state.runId,
28
+ delegationId: delegation.delegationId,
29
+ taskId: delegation.task,
30
+ agent: delegation.agent,
31
+ requestedCapabilityId: 'sdd-cli',
32
+ dedupeKey: `${state.runId}:${delegation.task}:${delegation.agent}`,
33
+ status: delegation.status,
34
+ statusSource: 'run_state_delegation',
35
+ runMode: delegation.runMode,
36
+ expectedArtifact: delegation.expectedArtifact,
37
+ requiredEvidence: [delegation.expectedArtifact, state.eventLogPath],
38
+ createdAt: delegation.startedAt,
39
+ updatedAt: delegation.terminalEventAt ?? delegation.lastHeartbeatAt ?? state.updatedAt
40
+ };
41
+ }
42
+ async function assertProjectConfigReadable(projectRoot) {
43
+ const configPath = getProjectConfigPath(projectRoot);
44
+ const raw = await readFile(configPath, 'utf8');
45
+ parseProjectConfig(raw, configPath);
46
+ }
47
+ //# sourceMappingURL=queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/delegation/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI3E,MAAM,CAAC,MAAM,iCAAiC,GAAG,wCAAwC,CAAC;AAO1F,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,WAAmB,EAAE,UAA8B,EAAE;IAClG,MAAM,2BAA2B,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK;QAC1B,CAAC,CAAC,CAAC,MAAM,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,MAAM,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM;SACjB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC;SAC9C,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;SAC5H,IAAI,CAAC,CAAC,IA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,2BAA2B,CAAC,WAAmB;IAC5D,MAAM,UAAU,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC/C,kBAAkB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { DelegationRecord } from './model.js';
2
+ export declare function persistDelegation(projectRoot: string, runId: string, delegation: DelegationRecord): Promise<void>;
@@ -0,0 +1,13 @@
1
+ import { readRunState, writeRunState } from '../run-state/run-state.js';
2
+ export async function persistDelegation(projectRoot, runId, delegation) {
3
+ const state = await readRunState(projectRoot, runId);
4
+ await writeRunState(projectRoot, {
5
+ ...state,
6
+ status: delegation.status === 'RUNNING' ? 'running' : state.status,
7
+ delegations: {
8
+ ...state.delegations,
9
+ [delegation.delegationId]: delegation
10
+ }
11
+ });
12
+ }
13
+ //# sourceMappingURL=run-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-state.js","sourceRoot":"","sources":["../../src/delegation/run-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGxE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,WAAmB,EAAE,KAAa,EAAE,UAA4B;IACtG,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACrD,MAAM,aAAa,CAAC,WAAW,EAAE;QAC/B,GAAG,KAAK;QACR,MAAM,EAAE,UAAU,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM;QAClE,WAAW,EAAE;YACX,GAAG,KAAK,CAAC,WAAW;YACpB,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,UAAU;SACtC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const DELEGATION_STATE_MACHINE_VERSION = "phase-3.4-delegation-state-machine-v1";
2
+ export type DelegationStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'RECOVERABLE' | 'STALE';
3
+ export interface ContractValidationIssue {
4
+ field: string;
5
+ message: string;
6
+ recommendation: string;
7
+ }
8
+ export interface DelegationStateTransition {
9
+ from: DelegationStatus;
10
+ to: DelegationStatus;
11
+ event: string;
12
+ terminal: boolean;
13
+ }
14
+ export interface DelegationStateMachine {
15
+ version: string;
16
+ statuses: DelegationStatus[];
17
+ terminalStatuses: DelegationStatus[];
18
+ transitions: DelegationStateTransition[];
19
+ }
20
+ export interface DelegationStateTransitionValidation {
21
+ valid: boolean;
22
+ from: DelegationStatus;
23
+ to: DelegationStatus;
24
+ event: string | null;
25
+ issues: ContractValidationIssue[];
26
+ }
27
+ export declare const DELEGATION_STATUSES: DelegationStatus[];
28
+ export declare const TERMINAL_DELEGATION_STATUSES: DelegationStatus[];
29
+ export declare function getDelegationStateMachine(): DelegationStateMachine;
30
+ export declare function validateDelegationStateTransition(from: DelegationStatus, to: DelegationStatus, event?: string | null): DelegationStateTransitionValidation;