@agent-teams/engineering-foundation 0.17.0-rc.8 → 0.18.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 (285) hide show
  1. package/README.md +33 -47
  2. package/dist/capabilities/contract-json-schema-releases/module.d.ts.map +1 -1
  3. package/dist/capabilities/contract-json-schema-releases/module.js +4 -17
  4. package/dist/capabilities/contract-json-schema-releases/module.js.map +1 -1
  5. package/dist/capabilities/contract-protobuf-evolution/module.d.ts.map +1 -1
  6. package/dist/capabilities/contract-protobuf-evolution/module.js +4 -17
  7. package/dist/capabilities/contract-protobuf-evolution/module.js.map +1 -1
  8. package/dist/capabilities/documentation-local-references/module.d.ts.map +1 -1
  9. package/dist/capabilities/documentation-local-references/module.js +4 -17
  10. package/dist/capabilities/documentation-local-references/module.js.map +1 -1
  11. package/dist/capabilities/executable-specifications/module.d.ts.map +1 -1
  12. package/dist/capabilities/executable-specifications/module.js +4 -17
  13. package/dist/capabilities/executable-specifications/module.js.map +1 -1
  14. package/dist/capabilities/governance-architecture-decisions/module.d.ts.map +1 -1
  15. package/dist/capabilities/governance-architecture-decisions/module.js +4 -17
  16. package/dist/capabilities/governance-architecture-decisions/module.js.map +1 -1
  17. package/dist/capabilities/public-api-compatibility/module.d.ts.map +1 -1
  18. package/dist/capabilities/public-api-compatibility/module.js +4 -19
  19. package/dist/capabilities/public-api-compatibility/module.js.map +1 -1
  20. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.d.ts +3 -0
  21. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.d.ts.map +1 -0
  22. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.js +17 -0
  23. package/dist/capabilities/quality-gate-runner/adapters/inbound/cli/report-renderer.js.map +1 -0
  24. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.d.ts +7 -0
  25. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.d.ts.map +1 -0
  26. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.js +51 -0
  27. package/dist/capabilities/quality-gate-runner/adapters/outbound/filesystem/filesystem-package-script-catalog-reader.js.map +1 -0
  28. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts +22 -0
  29. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.d.ts.map +1 -0
  30. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js +90 -0
  31. package/dist/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.js.map +1 -0
  32. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.d.ts +3 -0
  33. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.d.ts.map +1 -0
  34. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.js +5 -0
  35. package/dist/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.js.map +1 -0
  36. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.d.ts +18 -0
  37. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.d.ts.map +1 -0
  38. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.js +2 -0
  39. package/dist/capabilities/quality-gate-runner/application/model/quality-gate-report.js.map +1 -0
  40. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts +19 -0
  41. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.d.ts.map +1 -0
  42. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.js +2 -0
  43. package/dist/capabilities/quality-gate-runner/application/model/quality-gate.js.map +1 -0
  44. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts +4 -0
  45. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.d.ts.map +1 -0
  46. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js +64 -0
  47. package/dist/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.js.map +1 -0
  48. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts +6 -0
  49. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.d.ts.map +1 -0
  50. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.js +75 -0
  51. package/dist/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.js.map +1 -0
  52. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.d.ts +4 -0
  53. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.d.ts.map +1 -0
  54. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.js +2 -0
  55. package/dist/capabilities/quality-gate-runner/application/ports/monotonic-clock.js.map +1 -0
  56. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.d.ts +5 -0
  57. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.d.ts.map +1 -0
  58. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.js +2 -0
  59. package/dist/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.js.map +1 -0
  60. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts +20 -0
  61. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.d.ts.map +1 -0
  62. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.js +9 -0
  63. package/dist/capabilities/quality-gate-runner/application/ports/package-script-executor.js.map +1 -0
  64. package/dist/capabilities/quality-gate-runner/application/rules.d.ts +12 -0
  65. package/dist/capabilities/quality-gate-runner/application/rules.d.ts.map +1 -0
  66. package/dist/capabilities/quality-gate-runner/application/rules.js +18 -0
  67. package/dist/capabilities/quality-gate-runner/application/rules.js.map +1 -0
  68. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts +9 -0
  69. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.d.ts.map +1 -0
  70. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.js +5 -0
  71. package/dist/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.js.map +1 -0
  72. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts +10 -0
  73. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.d.ts.map +1 -0
  74. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js +138 -0
  75. package/dist/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.js.map +1 -0
  76. package/dist/capabilities/quality-gate-runner/contract/config.d.ts +5 -0
  77. package/dist/capabilities/quality-gate-runner/contract/config.d.ts.map +1 -0
  78. package/dist/capabilities/quality-gate-runner/contract/config.js +89 -0
  79. package/dist/capabilities/quality-gate-runner/contract/config.js.map +1 -0
  80. package/dist/capabilities/quality-gate-runner/gate-command.d.ts +10 -0
  81. package/dist/capabilities/quality-gate-runner/gate-command.d.ts.map +1 -0
  82. package/dist/capabilities/quality-gate-runner/gate-command.js +82 -0
  83. package/dist/capabilities/quality-gate-runner/gate-command.js.map +1 -0
  84. package/dist/capabilities/quality-gate-runner/module.d.ts +5 -0
  85. package/dist/capabilities/quality-gate-runner/module.d.ts.map +1 -0
  86. package/dist/capabilities/quality-gate-runner/module.js +36 -0
  87. package/dist/capabilities/quality-gate-runner/module.js.map +1 -0
  88. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts +2 -0
  89. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts.map +1 -1
  90. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js +32 -0
  91. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js.map +1 -1
  92. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.d.ts +16 -0
  93. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.d.ts.map +1 -0
  94. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.js +213 -0
  95. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-effective-instructions-reader.js.map +1 -0
  96. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts +9 -0
  97. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts.map +1 -1
  98. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js +232 -62
  99. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js.map +1 -1
  100. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts +1 -0
  101. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts.map +1 -1
  102. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js +2 -1
  103. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js.map +1 -1
  104. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts +26 -0
  105. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts.map +1 -1
  106. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.d.ts +61 -0
  107. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.d.ts.map +1 -0
  108. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.js +7 -0
  109. package/dist/capabilities/repository-agent-workflow/application/model/effective-instructions.js.map +1 -0
  110. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.d.ts +15 -0
  111. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.d.ts.map +1 -0
  112. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.js +2 -0
  113. package/dist/capabilities/repository-agent-workflow/application/ports/effective-instructions-reader.js.map +1 -0
  114. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.d.ts +8 -0
  115. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.d.ts.map +1 -0
  116. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.js +128 -0
  117. package/dist/capabilities/repository-agent-workflow/application/use-cases/resolve-effective-instructions.js.map +1 -0
  118. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.d.ts.map +1 -1
  119. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js +8 -0
  120. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js.map +1 -1
  121. package/dist/capabilities/repository-agent-workflow/instructions-command.d.ts +6 -0
  122. package/dist/capabilities/repository-agent-workflow/instructions-command.d.ts.map +1 -0
  123. package/dist/capabilities/repository-agent-workflow/instructions-command.js +26 -0
  124. package/dist/capabilities/repository-agent-workflow/instructions-command.js.map +1 -0
  125. package/dist/capabilities/repository-agent-workflow/module.d.ts.map +1 -1
  126. package/dist/capabilities/repository-agent-workflow/module.js +4 -17
  127. package/dist/capabilities/repository-agent-workflow/module.js.map +1 -1
  128. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/workflow-evidence-parser.d.ts.map +1 -1
  129. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/workflow-evidence-parser.js +33 -0
  130. package/dist/capabilities/repository-security-baseline/adapters/outbound/filesystem/workflow-evidence-parser.js.map +1 -1
  131. package/dist/capabilities/repository-security-baseline/application/model/repository-security.d.ts +1 -0
  132. package/dist/capabilities/repository-security-baseline/application/model/repository-security.d.ts.map +1 -1
  133. package/dist/capabilities/repository-security-baseline/application/model/repository-security.js.map +1 -1
  134. package/dist/capabilities/repository-security-baseline/application/policies/dependency-review-ordering.js +1 -1
  135. package/dist/capabilities/repository-security-baseline/application/policies/dependency-review-ordering.js.map +1 -1
  136. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security-tools.js +1 -1
  137. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security-tools.js.map +1 -1
  138. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js +1 -1
  139. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js.map +1 -1
  140. package/dist/capabilities/repository-security-baseline/module.d.ts.map +1 -1
  141. package/dist/capabilities/repository-security-baseline/module.js +4 -17
  142. package/dist/capabilities/repository-security-baseline/module.js.map +1 -1
  143. package/dist/capabilities/source-dependencies/module.d.ts.map +1 -1
  144. package/dist/capabilities/source-dependencies/module.js +4 -19
  145. package/dist/capabilities/source-dependencies/module.js.map +1 -1
  146. package/dist/capabilities/suppression-governance/module.d.ts.map +1 -1
  147. package/dist/capabilities/suppression-governance/module.js +4 -19
  148. package/dist/capabilities/suppression-governance/module.js.map +1 -1
  149. package/dist/capabilities/workspace-dependency-declarations/module.d.ts.map +1 -1
  150. package/dist/capabilities/workspace-dependency-declarations/module.js +4 -18
  151. package/dist/capabilities/workspace-dependency-declarations/module.js.map +1 -1
  152. package/dist/capability-runtime.d.ts +8 -0
  153. package/dist/capability-runtime.d.ts.map +1 -1
  154. package/dist/capability-runtime.js +66 -0
  155. package/dist/capability-runtime.js.map +1 -1
  156. package/dist/check-runner.d.ts.map +1 -1
  157. package/dist/check-runner.js +16 -10
  158. package/dist/check-runner.js.map +1 -1
  159. package/dist/cli-arguments.d.ts.map +1 -1
  160. package/dist/cli-arguments.js +15 -8
  161. package/dist/cli-arguments.js.map +1 -1
  162. package/dist/cli.js +31 -8
  163. package/dist/cli.js.map +1 -1
  164. package/dist/composition/capability-modules.d.ts +13 -0
  165. package/dist/composition/capability-modules.d.ts.map +1 -0
  166. package/dist/composition/capability-modules.js +30 -0
  167. package/dist/composition/capability-modules.js.map +1 -0
  168. package/dist/composition/capability-registry.d.ts +2 -0
  169. package/dist/composition/capability-registry.d.ts.map +1 -1
  170. package/dist/composition/capability-registry.js +5 -25
  171. package/dist/composition/capability-registry.js.map +1 -1
  172. package/dist/composition/rule-registry.d.ts +4 -7
  173. package/dist/composition/rule-registry.d.ts.map +1 -1
  174. package/dist/composition/rule-registry.js +17 -25
  175. package/dist/composition/rule-registry.js.map +1 -1
  176. package/dist/document-authoring/index.d.ts +6 -1
  177. package/dist/document-authoring/index.d.ts.map +1 -1
  178. package/dist/document-authoring/index.js.map +1 -1
  179. package/dist/filesystem-path-safety.d.ts +6 -0
  180. package/dist/filesystem-path-safety.d.ts.map +1 -1
  181. package/dist/filesystem-path-safety.js +76 -21
  182. package/dist/filesystem-path-safety.js.map +1 -1
  183. package/dist/index.d.ts +2 -0
  184. package/dist/index.d.ts.map +1 -1
  185. package/dist/index.js +2 -0
  186. package/dist/index.js.map +1 -1
  187. package/dist/legacy-docs-cli-deprecation.d.ts +10 -0
  188. package/dist/legacy-docs-cli-deprecation.d.ts.map +1 -0
  189. package/dist/legacy-docs-cli-deprecation.js +36 -0
  190. package/dist/legacy-docs-cli-deprecation.js.map +1 -0
  191. package/dist/local-mode/index.d.ts +5 -0
  192. package/dist/local-mode/index.d.ts.map +1 -1
  193. package/dist/local-mode/index.js +5 -0
  194. package/dist/local-mode/index.js.map +1 -1
  195. package/dist/mutation/index.d.ts +8 -0
  196. package/dist/mutation/index.d.ts.map +1 -1
  197. package/dist/mutation/index.js.map +1 -1
  198. package/dist/mutation/qualification/index.d.ts +10 -0
  199. package/dist/mutation/qualification/index.d.ts.map +1 -0
  200. package/dist/mutation/qualification/index.js +6 -0
  201. package/dist/mutation/qualification/index.js.map +1 -0
  202. package/dist/process-execution/node-process-runner.d.ts +6 -1
  203. package/dist/process-execution/node-process-runner.d.ts.map +1 -1
  204. package/dist/process-execution/node-process-runner.js +29 -6
  205. package/dist/process-execution/node-process-runner.js.map +1 -1
  206. package/dist/quality-gate-cli-command.d.ts +3 -0
  207. package/dist/quality-gate-cli-command.d.ts.map +1 -0
  208. package/dist/quality-gate-cli-command.js +37 -0
  209. package/dist/quality-gate-cli-command.js.map +1 -0
  210. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.d.ts +84 -0
  211. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.d.ts.map +1 -0
  212. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.js +232 -0
  213. package/dist/repository-mutation/adapters/node/node-known-file-apply-effects.js.map +1 -0
  214. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.d.ts +9 -0
  215. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.d.ts.map +1 -0
  216. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.js +2 -0
  217. package/dist/repository-mutation/adapters/node/node-known-file-apply-faults.js.map +1 -0
  218. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.d.ts +6 -0
  219. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.d.ts.map +1 -0
  220. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.js +30 -0
  221. package/dist/repository-mutation/adapters/node/node-known-file-apply-observation.js.map +1 -0
  222. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.d.ts +11 -0
  223. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.d.ts.map +1 -0
  224. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.js +159 -0
  225. package/dist/repository-mutation/adapters/node/node-known-file-apply-operation.js.map +1 -0
  226. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.d.ts +9 -0
  227. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.d.ts.map +1 -0
  228. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.js +21 -0
  229. package/dist/repository-mutation/adapters/node/node-known-file-apply-state.js.map +1 -0
  230. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.d.ts +9 -0
  231. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.d.ts.map +1 -0
  232. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.js +203 -0
  233. package/dist/repository-mutation/adapters/node/node-known-file-recovery-cleanup.js.map +1 -0
  234. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.d.ts +17 -0
  235. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.d.ts.map +1 -0
  236. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.js +22 -0
  237. package/dist/repository-mutation/adapters/node/node-known-file-recovery-executor.js.map +1 -0
  238. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.d.ts +15 -0
  239. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.d.ts.map +1 -0
  240. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.js +47 -0
  241. package/dist/repository-mutation/adapters/node/node-known-file-recovery-observation.js.map +1 -0
  242. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.d.ts +29 -0
  243. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.d.ts.map +1 -0
  244. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.js +72 -0
  245. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured-cleanup.js.map +1 -0
  246. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.d.ts +31 -0
  247. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.d.ts.map +1 -0
  248. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.js +254 -0
  249. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage-captured.js.map +1 -0
  250. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.d.ts +13 -0
  251. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.d.ts.map +1 -0
  252. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.js +210 -0
  253. package/dist/repository-mutation/adapters/node/node-known-file-recovery-preimage.js.map +1 -0
  254. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.d.ts +15 -0
  255. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.d.ts.map +1 -0
  256. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.js +172 -0
  257. package/dist/repository-mutation/adapters/node/node-known-file-recovery-retirement.js.map +1 -0
  258. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.d.ts +12 -0
  259. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.d.ts.map +1 -0
  260. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.js +17 -0
  261. package/dist/repository-mutation/adapters/node/node-known-file-recovery-state.js.map +1 -0
  262. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.d.ts +2 -5
  263. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.d.ts.map +1 -1
  264. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.js +18 -860
  265. package/dist/repository-mutation/adapters/node/node-known-file-transaction-recovery.js.map +1 -1
  266. package/dist/repository-mutation/adapters/node/node-known-file-transaction.d.ts +3 -9
  267. package/dist/repository-mutation/adapters/node/node-known-file-transaction.d.ts.map +1 -1
  268. package/dist/repository-mutation/adapters/node/node-known-file-transaction.js +35 -451
  269. package/dist/repository-mutation/adapters/node/node-known-file-transaction.js.map +1 -1
  270. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.d.ts +25 -0
  271. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.d.ts.map +1 -0
  272. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.js +19 -0
  273. package/dist/repository-mutation/application/policies/classify-known-file-recovery-transition.js.map +1 -0
  274. package/dist/schema-ids.d.ts +1 -1
  275. package/dist/schema-ids.d.ts.map +1 -1
  276. package/dist/schema-ids.js +2 -0
  277. package/dist/schema-ids.js.map +1 -1
  278. package/dist/unexpected-failure.d.ts +9 -0
  279. package/dist/unexpected-failure.d.ts.map +1 -0
  280. package/dist/unexpected-failure.js +105 -0
  281. package/dist/unexpected-failure.js.map +1 -0
  282. package/package.json +7 -1
  283. package/schemas/foundation-config/v1.schema.json +10 -0
  284. package/schemas/quality-gate-run-report/v1.schema.json +47 -0
  285. package/schemas/quality-gate-runner/v1.schema.json +74 -0
@@ -0,0 +1,90 @@
1
+ import { lstat, realpath } from "node:fs/promises";
2
+ import { delimiter, isAbsolute, resolve } from "node:path";
3
+ import { FoundationError } from "../../../../../errors.js";
4
+ import { executeManagedProcess } from "../../../../../process-execution/node-process-runner.js";
5
+ import { PackageScriptTimeoutError } from "../../../application/ports/package-script-executor.js";
6
+ async function isRegularFile(path) {
7
+ const metadata = await lstat(path).catch(() => null);
8
+ return metadata !== null && metadata.isFile();
9
+ }
10
+ async function nodeEntrypoint(candidates) {
11
+ for (const candidate of candidates) {
12
+ if (candidate !== undefined && isAbsolute(candidate)) {
13
+ const canonical = await realpath(candidate).catch(() => null);
14
+ if (canonical !== null &&
15
+ /\.(?:c|m)?js$/u.test(canonical) &&
16
+ await isRegularFile(canonical)) {
17
+ return canonical;
18
+ }
19
+ }
20
+ }
21
+ return undefined;
22
+ }
23
+ async function resolvePnpmInvocation(environment) {
24
+ const homeEntrypoint = environment.pnpmHome === undefined
25
+ ? undefined
26
+ : resolve(environment.pnpmHome, "..", "pnpm", "bin", "pnpm.cjs");
27
+ const pathEntrypoints = environment.pathValue === undefined
28
+ ? []
29
+ : environment.pathValue.split(delimiter)
30
+ .filter((path) => path.length > 0)
31
+ .map((path) => resolve(path, process.platform === "win32" ? "pnpm.exe" : "pnpm"));
32
+ const entrypoint = await nodeEntrypoint([
33
+ environment.npmExecPath,
34
+ homeEntrypoint,
35
+ ...pathEntrypoints
36
+ ]);
37
+ if (entrypoint !== undefined) {
38
+ return { command: process.execPath, argsPrefix: [entrypoint] };
39
+ }
40
+ if (process.platform !== "win32") {
41
+ return { command: "pnpm", argsPrefix: [] };
42
+ }
43
+ const candidates = [
44
+ ...(environment.pnpmHome === undefined
45
+ ? []
46
+ : [resolve(environment.pnpmHome, "pnpm.exe")]),
47
+ ...(environment.pathValue === undefined
48
+ ? []
49
+ : environment.pathValue.split(delimiter)
50
+ .filter((path) => path.length > 0)
51
+ .map((path) => resolve(path, "pnpm.exe")))
52
+ ];
53
+ for (const candidate of candidates) {
54
+ if (await isRegularFile(candidate)) {
55
+ return { command: candidate, argsPrefix: [] };
56
+ }
57
+ }
58
+ throw new FoundationError("PROCESS_FAILED", "Unable to resolve a shell-free pnpm entrypoint on Windows.");
59
+ }
60
+ export class PnpmQualityGateScriptExecutor {
61
+ environment;
62
+ constructor(environment) {
63
+ this.environment = environment;
64
+ }
65
+ async run(input) {
66
+ const invocation = await resolvePnpmInvocation(this.environment);
67
+ try {
68
+ const result = await executeManagedProcess({
69
+ command: invocation.command,
70
+ args: [...invocation.argsPrefix, "run", input.scriptId],
71
+ cwd: input.consumerRoot,
72
+ ...(input.timeoutMs === undefined ? {} : { timeoutMs: input.timeoutMs }),
73
+ ...(input.signal === undefined ? {} : { signal: input.signal })
74
+ });
75
+ return {
76
+ ...result,
77
+ exitCode: result.signal === null ? result.exitCode : null
78
+ };
79
+ }
80
+ catch (error) {
81
+ if (input.timeoutMs !== undefined &&
82
+ error instanceof FoundationError &&
83
+ error.message.endsWith(`timed out after ${input.timeoutMs}ms.`)) {
84
+ throw new PackageScriptTimeoutError(input.timeoutMs, { cause: error });
85
+ }
86
+ throw error;
87
+ }
88
+ }
89
+ }
90
+ //# sourceMappingURL=pnpm-package-script-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpm-package-script-executor.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/pnpm/pnpm-package-script-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,qB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;gBACD,MAAM,IAAI,yBAAyB,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzE,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ import type { MonotonicClock } from "../../../application/ports/monotonic-clock.js";
2
+ export declare const performanceMonotonicClock: MonotonicClock;
3
+ //# sourceMappingURL=performance-monotonic-clock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-monotonic-clock.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,eAAO,MAAM,yBAAyB,EAAE,cAEtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { performance } from "node:perf_hooks";
2
+ export const performanceMonotonicClock = Object.freeze({
3
+ nowMs: () => performance.now()
4
+ });
5
+ //# sourceMappingURL=performance-monotonic-clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance-monotonic-clock.js","sourceRoot":"","sources":["../../../../../../src/capabilities/quality-gate-runner/adapters/outbound/time/performance-monotonic-clock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,CAAC,MAAM,yBAAyB,GAAmB,MAAM,CAAC,MAAM,CAAC;IACrE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ type QualityGateTaskOutcome = "passed" | "failed" | "timed-out" | "blocked" | "cancelled";
2
+ export interface QualityGateTaskReport {
3
+ readonly id: string;
4
+ readonly outcome: QualityGateTaskOutcome;
5
+ readonly durationMs: number;
6
+ readonly exitCode: number | null;
7
+ readonly signal: NodeJS.Signals | null;
8
+ readonly failureTail: string;
9
+ }
10
+ export interface QualityGateRunReport {
11
+ readonly reportSchemaVersion: 1;
12
+ readonly profileId: string;
13
+ readonly outcome: "passed" | "failed" | "cancelled";
14
+ readonly durationMs: number;
15
+ readonly tasks: readonly QualityGateTaskReport[];
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=quality-gate-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate-report.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate-report.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,GACvB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAEhB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=quality-gate-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate-report.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate-report.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface QualityGateTask {
2
+ readonly id: string;
3
+ readonly needs: readonly string[];
4
+ readonly after: readonly string[];
5
+ readonly timeoutMs?: number;
6
+ }
7
+ export interface QualityGateProfile {
8
+ readonly id: string;
9
+ readonly concurrency: number;
10
+ readonly tasks: readonly QualityGateTask[];
11
+ }
12
+ export interface QualityGatePolicy {
13
+ readonly packageManager: "pnpm";
14
+ readonly profiles: readonly QualityGateProfile[];
15
+ }
16
+ export interface PackageScriptCatalog {
17
+ readonly scripts: Readonly<Record<string, string>>;
18
+ }
19
+ //# sourceMappingURL=quality-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACpD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=quality-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gate.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/model/quality-gate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { FoundationDiagnostic } from "../../../../check-contract.js";
2
+ import type { PackageScriptCatalog, QualityGatePolicy } from "../model/quality-gate.js";
3
+ export declare function evaluateQualityGateScripts(policy: QualityGatePolicy, catalog: PackageScriptCatalog): readonly FoundationDiagnostic[];
4
+ //# sourceMappingURL=evaluate-quality-gate-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-quality-gate-scripts.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AA8DlC,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,oBAAoB,GAC5B,SAAS,oBAAoB,EAAE,CAqBjC"}
@@ -0,0 +1,64 @@
1
+ const PACKAGE_SCRIPT_REFERENCE = /(?:^|[;&|()]|\s)(?:pnpm|npm)\s+(?:run(?:-script)?\s+)?([A-Za-z0-9][A-Za-z0-9:._-]*)/gu;
2
+ function scriptReferences(command) {
3
+ const references = [];
4
+ for (const match of command.matchAll(PACKAGE_SCRIPT_REFERENCE)) {
5
+ const script = match[1];
6
+ if (script !== undefined) {
7
+ references.push(script);
8
+ }
9
+ }
10
+ return Object.freeze(references);
11
+ }
12
+ function reachesRunner(scriptId, catalog, visiting = new Set()) {
13
+ if (visiting.has(scriptId)) {
14
+ return false;
15
+ }
16
+ const command = catalog.scripts[scriptId];
17
+ if (command === undefined) {
18
+ return false;
19
+ }
20
+ if ((command.includes("agent-teams-foundation") ||
21
+ command.includes("engineering-foundation/dist/cli.js")) &&
22
+ (command.includes("gate run") || command.includes("gate\trun"))) {
23
+ return true;
24
+ }
25
+ const next = new Set(visiting);
26
+ next.add(scriptId);
27
+ return scriptReferences(command).some((reference) => reachesRunner(reference, catalog, next));
28
+ }
29
+ function diagnostic(input) {
30
+ return Object.freeze({
31
+ ruleId: input.ruleId,
32
+ severity: "error",
33
+ subject: input.scriptId,
34
+ message: input.message,
35
+ location: { path: "package.json" },
36
+ relatedLocations: [],
37
+ evidence: [{ kind: "script-id", value: input.scriptId }],
38
+ remediation: input.ruleId.endsWith("missing")
39
+ ? "Add the package script or remove it from every quality gate profile."
40
+ : "Remove the direct or indirect quality gate runner invocation from this script.",
41
+ requiresArchitectureReview: false
42
+ });
43
+ }
44
+ export function evaluateQualityGateScripts(policy, catalog) {
45
+ const scriptIds = [...new Set(policy.profiles.flatMap(({ tasks }) => tasks.map(({ id }) => id)))].toSorted();
46
+ return Object.freeze(scriptIds.flatMap((scriptId) => {
47
+ if (catalog.scripts[scriptId] === undefined) {
48
+ return [diagnostic({
49
+ ruleId: "quality.gate-runner.script-missing",
50
+ scriptId,
51
+ message: `Quality gate task ${scriptId} is not an existing root package.json script.`
52
+ })];
53
+ }
54
+ if (reachesRunner(scriptId, catalog)) {
55
+ return [diagnostic({
56
+ ruleId: "quality.gate-runner.script-recursive",
57
+ scriptId,
58
+ message: `Quality gate task ${scriptId} directly or indirectly invokes the gate runner.`
59
+ })];
60
+ }
61
+ return [];
62
+ }));
63
+ }
64
+ //# sourceMappingURL=evaluate-quality-gate-scripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-quality-gate-scripts.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/evaluate-quality-gate-scripts.ts"],"names":[],"mappings":"AAMA,MAAM,wBAAwB,GAC5B,uFAAuF,CAAC;AAE1F,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,K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ACR,OAAO,EAAE,qBAAqB,QAAQ,kDAAkD;iBACzF,CAAC,CAAC,CAAC;QACN,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { QualityGatePolicy } from "../model/quality-gate.js";
2
+ export declare class QualityGateGraphError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare function validateQualityGatePolicy(policy: QualityGatePolicy): void;
6
+ //# sourceMappingURL=validate-quality-gate-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality-gate-graph.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAElC,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AA+CD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAqCzE"}
@@ -0,0 +1,75 @@
1
+ export class QualityGateGraphError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = "QualityGateGraphError";
5
+ }
6
+ }
7
+ function duplicate(values) {
8
+ const observed = new Set();
9
+ for (const value of values) {
10
+ if (observed.has(value)) {
11
+ return value;
12
+ }
13
+ observed.add(value);
14
+ }
15
+ return undefined;
16
+ }
17
+ function dependencies(task) {
18
+ return [...task.needs, ...task.after];
19
+ }
20
+ function assertAcyclic(profile) {
21
+ const tasks = new Map(profile.tasks.map((task) => [task.id, task]));
22
+ const visiting = new Set();
23
+ const visited = new Set();
24
+ const visit = (id, path) => {
25
+ if (visiting.has(id)) {
26
+ const cycleStart = path.indexOf(id);
27
+ const cycle = [...path.slice(cycleStart), id];
28
+ throw new QualityGateGraphError(`Profile ${profile.id} contains a dependency cycle: ${cycle.join(" -> ")}.`);
29
+ }
30
+ if (visited.has(id)) {
31
+ return;
32
+ }
33
+ visiting.add(id);
34
+ const task = tasks.get(id);
35
+ for (const dependency of task === undefined ? [] : dependencies(task)) {
36
+ visit(dependency, [...path, id]);
37
+ }
38
+ visiting.delete(id);
39
+ visited.add(id);
40
+ };
41
+ for (const task of profile.tasks) {
42
+ visit(task.id, []);
43
+ }
44
+ }
45
+ export function validateQualityGatePolicy(policy) {
46
+ const duplicateProfile = duplicate(policy.profiles.map(({ id }) => id));
47
+ if (duplicateProfile !== undefined) {
48
+ throw new QualityGateGraphError(`Duplicate profile ID: ${duplicateProfile}.`);
49
+ }
50
+ for (const profile of policy.profiles) {
51
+ const taskIds = profile.tasks.map(({ id }) => id);
52
+ const duplicateTask = duplicate(taskIds);
53
+ if (duplicateTask !== undefined) {
54
+ throw new QualityGateGraphError(`Profile ${profile.id} contains duplicate task ID: ${duplicateTask}.`);
55
+ }
56
+ const known = new Set(taskIds);
57
+ for (const task of profile.tasks) {
58
+ for (const dependency of dependencies(task)) {
59
+ if (dependency === task.id) {
60
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} cannot depend on itself.`);
61
+ }
62
+ if (!known.has(dependency)) {
63
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} references unknown task ${dependency}.`);
64
+ }
65
+ }
66
+ const needs = new Set(task.needs);
67
+ const overlap = task.after.find((dependency) => needs.has(dependency));
68
+ if (overlap !== undefined) {
69
+ throw new QualityGateGraphError(`Profile ${profile.id} task ${task.id} declares ${overlap} in both needs and after.`);
70
+ }
71
+ }
72
+ assertAcyclic(profile);
73
+ }
74
+ }
75
+ //# sourceMappingURL=validate-quality-gate-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality-gate-graph.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/policies/validate-quality-gate-graph.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,O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=monotonic-clock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monotonic-clock.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/monotonic-clock.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,KAAK,IAAI,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=monotonic-clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monotonic-clock.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/monotonic-clock.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { PackageScriptCatalog } from "../model/quality-gate.js";
2
+ export interface PackageScriptCatalogReader {
3
+ read(consumerRoot: string, signal?: AbortSignal): Promise<PackageScriptCatalog>;
4
+ }
5
+ //# sourceMappingURL=package-script-catalog-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-script-catalog-reader.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACjF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=package-script-catalog-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-script-catalog-reader.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/package-script-catalog-reader.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ interface PackageScriptExecution {
2
+ readonly exitCode: number | null;
3
+ readonly signal: NodeJS.Signals | null;
4
+ readonly stdout: string;
5
+ readonly stderr: string;
6
+ }
7
+ export interface PackageScriptExecutor {
8
+ run(input: {
9
+ readonly consumerRoot: string;
10
+ readonly scriptId: string;
11
+ readonly timeoutMs?: number;
12
+ readonly signal?: AbortSignal;
13
+ }): Promise<PackageScriptExecution>;
14
+ }
15
+ export declare class PackageScriptTimeoutError extends Error {
16
+ readonly timeoutMs: number;
17
+ constructor(timeoutMs: number, options?: ErrorOptions);
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=package-script-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-script-executor.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/package-script-executor.ts"],"names":[],"mappings":"AAAA,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,KAAK,EAAE;QACT,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC/B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACrC;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM;IAAtC,YAAqB,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAG7D;CACF"}
@@ -0,0 +1,9 @@
1
+ export class PackageScriptTimeoutError extends Error {
2
+ timeoutMs;
3
+ constructor(timeoutMs, options) {
4
+ super(`Package script timed out after ${timeoutMs}ms.`, options);
5
+ this.timeoutMs = timeoutMs;
6
+ this.name = "PackageScriptTimeoutError";
7
+ }
8
+ }
9
+ //# sourceMappingURL=package-script-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-script-executor.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/ports/package-script-executor.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAC7B,SAAS;IAA9B,YAAqB,SAAiB,EAAE,OAAsB;QAC5D,KAAK,CAAC,kCAAkC,SAAS,KAAK,EAAE,OAAO,CAAC,CAAC;yBAD9C,SAAS;QAE5B,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ export declare const QUALITY_GATE_RUNNER_RULES_BY_ID: ReadonlyMap<string, {
2
+ readonly id: "quality.gate-runner.script-missing";
3
+ readonly rationale: "Every declared gate task must resolve to an existing root package script.";
4
+ readonly remediation: "Add the package.json script or remove the task from the profile.";
5
+ readonly documentation: "https://github.com/agent-teams-ai/engineering-foundation/blob/main/docs/reference/quality-gate-runner.md";
6
+ } | {
7
+ readonly id: "quality.gate-runner.script-recursive";
8
+ readonly rationale: "A gate task must not directly or indirectly invoke the gate runner.";
9
+ readonly remediation: "Remove the runner invocation from the package script call chain.";
10
+ readonly documentation: "https://github.com/agent-teams-ai/engineering-foundation/blob/main/docs/reference/quality-gate-runner.md";
11
+ }>;
12
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/quality-gate-runner/application/rules.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,+BAA+B;iBAbpC,oCAAoC;wBAC7B,2EAA2E;0BACzE,kEAAkE;;;iBAI3E,sCAAsC;wBAC/B,qEAAqE;0BACnE,kEAAkE;;EAQlF,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { createUniqueRegistry } from "../../../unique-registry.js";
2
+ const DOCUMENTATION = "https://github.com/agent-teams-ai/engineering-foundation/blob/main/docs/reference/quality-gate-runner.md";
3
+ const rules = [
4
+ {
5
+ id: "quality.gate-runner.script-missing",
6
+ rationale: "Every declared gate task must resolve to an existing root package script.",
7
+ remediation: "Add the package.json script or remove the task from the profile.",
8
+ documentation: DOCUMENTATION
9
+ },
10
+ {
11
+ id: "quality.gate-runner.script-recursive",
12
+ rationale: "A gate task must not directly or indirectly invoke the gate runner.",
13
+ remediation: "Remove the runner invocation from the package script call chain.",
14
+ documentation: DOCUMENTATION
15
+ }
16
+ ];
17
+ export const QUALITY_GATE_RUNNER_RULES_BY_ID = createUniqueRegistry("rule", rules.map((rule) => [rule.id, rule]));
18
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/capabilities/quality-gate-runner/application/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,aAAa,GACjB,0GAA0G,CAAC;AAE7G,MAAM,KAAK,GAAG;IACZ;QACE,EAAE,EAAE,oCAAoC;QACxC,SAAS,EAAE,2EAA2E;QACtF,WAAW,EAAE,kEAAkE;QAC/E,aAAa,EAAE,aAAa;KAC7B;IACD;QACE,EAAE,EAAE,sCAAsC;QAC1C,SAAS,EAAE,qEAAqE;QAChF,WAAW,EAAE,kEAAkE;QAC/E,aAAa,EAAE,aAAa;KAC7B;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG,oBAAoB,CACjE,MAAM,EACN,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CACrC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { FoundationDiagnostic } from "../../../../check-contract.js";
2
+ import type { QualityGatePolicy } from "../model/quality-gate.js";
3
+ import type { PackageScriptCatalogReader } from "../ports/package-script-catalog-reader.js";
4
+ export declare function analyzeQualityGateRunner(input: {
5
+ readonly consumerRoot: string;
6
+ readonly policy: QualityGatePolicy;
7
+ readonly signal?: AbortSignal;
8
+ }, reader: PackageScriptCatalogReader): Promise<readonly FoundationDiagnostic[]>;
9
+ //# sourceMappingURL=analyze-quality-gate-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-quality-gate-runner.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,wBAAsB,wBAAwB,CAAC,KAAK,EAAE;IACpD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC,CAK/E"}
@@ -0,0 +1,5 @@
1
+ import { evaluateQualityGateScripts } from "../policies/evaluate-quality-gate-scripts.js";
2
+ export async function analyzeQualityGateRunner(input, reader) {
3
+ return evaluateQualityGateScripts(input.policy, await reader.read(input.consumerRoot, input.signal));
4
+ }
5
+ //# sourceMappingURL=analyze-quality-gate-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-quality-gate-runner.js","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/use-cases/analyze-quality-gate-runner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAG1F,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,KAI9C,EAAE,MAAkC;IACnC,OAAO,0BAA0B,CAC/B,KAAK,CAAC,MAAM,EACZ,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { QualityGateProfile } from "../model/quality-gate.js";
2
+ import type { QualityGateRunReport } from "../model/quality-gate-report.js";
3
+ import type { MonotonicClock } from "../ports/monotonic-clock.js";
4
+ import { type PackageScriptExecutor } from "../ports/package-script-executor.js";
5
+ export declare function runQualityGateProfile(input: {
6
+ readonly consumerRoot: string;
7
+ readonly profile: QualityGateProfile;
8
+ readonly signal?: AbortSignal;
9
+ }, executor: PackageScriptExecutor, clock: MonotonicClock): Promise<QualityGateRunReport>;
10
+ //# sourceMappingURL=run-quality-gate-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-quality-gate-profile.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/quality-gate-runner/application/use-cases/run-quality-gate-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,qCAAqC,CAAC;AA2F7C,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAiCxF"}