driftdetect-core 0.7.1 → 0.8.1

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 (466) hide show
  1. package/dist/boundaries/types.d.ts +1 -1
  2. package/dist/boundaries/types.d.ts.map +1 -1
  3. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  4. package/dist/call-graph/analysis/graph-builder.js +2 -0
  5. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  6. package/dist/call-graph/extractors/cpp-data-access-extractor.d.ts +37 -0
  7. package/dist/call-graph/extractors/cpp-data-access-extractor.d.ts.map +1 -0
  8. package/dist/call-graph/extractors/cpp-data-access-extractor.js +467 -0
  9. package/dist/call-graph/extractors/cpp-data-access-extractor.js.map +1 -0
  10. package/dist/call-graph/extractors/cpp-hybrid-extractor.d.ts +89 -0
  11. package/dist/call-graph/extractors/cpp-hybrid-extractor.d.ts.map +1 -0
  12. package/dist/call-graph/extractors/cpp-hybrid-extractor.js +541 -0
  13. package/dist/call-graph/extractors/cpp-hybrid-extractor.js.map +1 -0
  14. package/dist/call-graph/extractors/index.d.ts +8 -1
  15. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  16. package/dist/call-graph/extractors/index.js +9 -1
  17. package/dist/call-graph/extractors/index.js.map +1 -1
  18. package/dist/call-graph/extractors/regex/cpp-regex.d.ts +46 -0
  19. package/dist/call-graph/extractors/regex/cpp-regex.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/regex/cpp-regex.js +325 -0
  21. package/dist/call-graph/extractors/regex/cpp-regex.js.map +1 -0
  22. package/dist/call-graph/extractors/regex/index.d.ts +2 -0
  23. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -1
  24. package/dist/call-graph/extractors/regex/index.js +16 -0
  25. package/dist/call-graph/extractors/regex/index.js.map +1 -1
  26. package/dist/call-graph/extractors/regex/rust-regex.d.ts +45 -0
  27. package/dist/call-graph/extractors/regex/rust-regex.d.ts.map +1 -0
  28. package/dist/call-graph/extractors/regex/rust-regex.js +517 -0
  29. package/dist/call-graph/extractors/regex/rust-regex.js.map +1 -0
  30. package/dist/call-graph/extractors/rust-data-access-extractor.d.ts +35 -0
  31. package/dist/call-graph/extractors/rust-data-access-extractor.d.ts.map +1 -0
  32. package/dist/call-graph/extractors/rust-data-access-extractor.js +349 -0
  33. package/dist/call-graph/extractors/rust-data-access-extractor.js.map +1 -0
  34. package/dist/call-graph/extractors/rust-extractor.d.ts +125 -0
  35. package/dist/call-graph/extractors/rust-extractor.d.ts.map +1 -0
  36. package/dist/call-graph/extractors/rust-extractor.js +604 -0
  37. package/dist/call-graph/extractors/rust-extractor.js.map +1 -0
  38. package/dist/call-graph/extractors/rust-hybrid-extractor.d.ts +119 -0
  39. package/dist/call-graph/extractors/rust-hybrid-extractor.d.ts.map +1 -0
  40. package/dist/call-graph/extractors/rust-hybrid-extractor.js +548 -0
  41. package/dist/call-graph/extractors/rust-hybrid-extractor.js.map +1 -0
  42. package/dist/call-graph/index.d.ts +2 -0
  43. package/dist/call-graph/index.d.ts.map +1 -1
  44. package/dist/call-graph/index.js +4 -0
  45. package/dist/call-graph/index.js.map +1 -1
  46. package/dist/call-graph/streaming-builder.d.ts +60 -0
  47. package/dist/call-graph/streaming-builder.d.ts.map +1 -0
  48. package/dist/call-graph/streaming-builder.js +204 -0
  49. package/dist/call-graph/streaming-builder.js.map +1 -0
  50. package/dist/call-graph/types.d.ts +1 -1
  51. package/dist/call-graph/types.d.ts.map +1 -1
  52. package/dist/call-graph/unified-provider.d.ts +72 -0
  53. package/dist/call-graph/unified-provider.d.ts.map +1 -0
  54. package/dist/call-graph/unified-provider.js +502 -0
  55. package/dist/call-graph/unified-provider.js.map +1 -0
  56. package/dist/constants/extractors/regex/rust-regex.d.ts +43 -0
  57. package/dist/constants/extractors/regex/rust-regex.d.ts.map +1 -0
  58. package/dist/constants/extractors/regex/rust-regex.js +370 -0
  59. package/dist/constants/extractors/regex/rust-regex.js.map +1 -0
  60. package/dist/constants/types.d.ts +1 -1
  61. package/dist/constants/types.d.ts.map +1 -1
  62. package/dist/constants/types.js.map +1 -1
  63. package/dist/constraints/store/constraint-store.d.ts.map +1 -1
  64. package/dist/constraints/store/constraint-store.js +2 -0
  65. package/dist/constraints/store/constraint-store.js.map +1 -1
  66. package/dist/constraints/types.d.ts +1 -1
  67. package/dist/constraints/types.d.ts.map +1 -1
  68. package/dist/constraints/types.js +2 -0
  69. package/dist/constraints/types.js.map +1 -1
  70. package/dist/context/context-generator.d.ts +38 -0
  71. package/dist/context/context-generator.d.ts.map +1 -0
  72. package/dist/context/context-generator.js +392 -0
  73. package/dist/context/context-generator.js.map +1 -0
  74. package/dist/context/index.d.ts +13 -0
  75. package/dist/context/index.d.ts.map +1 -0
  76. package/dist/context/index.js +14 -0
  77. package/dist/context/index.js.map +1 -0
  78. package/dist/context/package-detector.d.ts +53 -0
  79. package/dist/context/package-detector.d.ts.map +1 -0
  80. package/dist/context/package-detector.js +672 -0
  81. package/dist/context/package-detector.js.map +1 -0
  82. package/dist/context/types.d.ts +258 -0
  83. package/dist/context/types.d.ts.map +1 -0
  84. package/dist/context/types.js +10 -0
  85. package/dist/context/types.js.map +1 -0
  86. package/dist/cpp/cpp-analyzer.d.ts +179 -0
  87. package/dist/cpp/cpp-analyzer.d.ts.map +1 -0
  88. package/dist/cpp/cpp-analyzer.js +532 -0
  89. package/dist/cpp/cpp-analyzer.js.map +1 -0
  90. package/dist/cpp/index.d.ts +9 -0
  91. package/dist/cpp/index.d.ts.map +1 -0
  92. package/dist/cpp/index.js +9 -0
  93. package/dist/cpp/index.js.map +1 -0
  94. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -1
  95. package/dist/decisions/analyzer/decision-mining-analyzer.js +4 -0
  96. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -1
  97. package/dist/decisions/types.d.ts +1 -1
  98. package/dist/decisions/types.d.ts.map +1 -1
  99. package/dist/environment/extractors/cpp-env-extractor.d.ts +58 -0
  100. package/dist/environment/extractors/cpp-env-extractor.d.ts.map +1 -0
  101. package/dist/environment/extractors/cpp-env-extractor.js +298 -0
  102. package/dist/environment/extractors/cpp-env-extractor.js.map +1 -0
  103. package/dist/environment/extractors/index.d.ts +2 -0
  104. package/dist/environment/extractors/index.d.ts.map +1 -1
  105. package/dist/environment/extractors/index.js +2 -0
  106. package/dist/environment/extractors/index.js.map +1 -1
  107. package/dist/environment/extractors/rust-env-extractor.d.ts +58 -0
  108. package/dist/environment/extractors/rust-env-extractor.d.ts.map +1 -0
  109. package/dist/environment/extractors/rust-env-extractor.js +297 -0
  110. package/dist/environment/extractors/rust-env-extractor.js.map +1 -0
  111. package/dist/environment/index.d.ts +1 -1
  112. package/dist/environment/index.d.ts.map +1 -1
  113. package/dist/environment/index.js +1 -1
  114. package/dist/environment/index.js.map +1 -1
  115. package/dist/environment/types.d.ts +2 -2
  116. package/dist/environment/types.d.ts.map +1 -1
  117. package/dist/environment/types.js.map +1 -1
  118. package/dist/index.d.ts +15 -3
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +62 -2
  121. package/dist/index.js.map +1 -1
  122. package/dist/licensing/feature-guard.d.ts +103 -0
  123. package/dist/licensing/feature-guard.d.ts.map +1 -0
  124. package/dist/licensing/feature-guard.js +195 -0
  125. package/dist/licensing/feature-guard.js.map +1 -0
  126. package/dist/licensing/index.d.ts +46 -0
  127. package/dist/licensing/index.d.ts.map +1 -0
  128. package/dist/licensing/index.js +47 -0
  129. package/dist/licensing/index.js.map +1 -0
  130. package/dist/licensing/license-manager.d.ts +88 -0
  131. package/dist/licensing/license-manager.d.ts.map +1 -0
  132. package/dist/licensing/license-manager.js +251 -0
  133. package/dist/licensing/license-manager.js.map +1 -0
  134. package/dist/licensing/license-validator.d.ts +60 -0
  135. package/dist/licensing/license-validator.d.ts.map +1 -0
  136. package/dist/licensing/license-validator.js +300 -0
  137. package/dist/licensing/license-validator.js.map +1 -0
  138. package/dist/licensing/types.d.ts +76 -0
  139. package/dist/licensing/types.d.ts.map +1 -0
  140. package/dist/licensing/types.js +51 -0
  141. package/dist/licensing/types.js.map +1 -0
  142. package/dist/parsers/tree-sitter/cpp-loader.d.ts +51 -0
  143. package/dist/parsers/tree-sitter/cpp-loader.d.ts.map +1 -0
  144. package/dist/parsers/tree-sitter/cpp-loader.js +162 -0
  145. package/dist/parsers/tree-sitter/cpp-loader.js.map +1 -0
  146. package/dist/parsers/tree-sitter/index.d.ts +6 -0
  147. package/dist/parsers/tree-sitter/index.d.ts.map +1 -1
  148. package/dist/parsers/tree-sitter/index.js +16 -0
  149. package/dist/parsers/tree-sitter/index.js.map +1 -1
  150. package/dist/parsers/tree-sitter/rust-loader.d.ts +50 -0
  151. package/dist/parsers/tree-sitter/rust-loader.d.ts.map +1 -0
  152. package/dist/parsers/tree-sitter/rust-loader.js +161 -0
  153. package/dist/parsers/tree-sitter/rust-loader.js.map +1 -0
  154. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.d.ts +198 -0
  155. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.d.ts.map +1 -0
  156. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.js +671 -0
  157. package/dist/parsers/tree-sitter/tree-sitter-cpp-parser.js.map +1 -0
  158. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.d.ts +180 -0
  159. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.d.ts.map +1 -0
  160. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.js +478 -0
  161. package/dist/parsers/tree-sitter/tree-sitter-rust-parser.js.map +1 -0
  162. package/dist/parsers/types.d.ts +1 -1
  163. package/dist/parsers/types.d.ts.map +1 -1
  164. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -1
  165. package/dist/patterns/adapters/pattern-store-adapter.js +35 -10
  166. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -1
  167. package/dist/quality-gates/gates/base-gate.d.ts +71 -0
  168. package/dist/quality-gates/gates/base-gate.d.ts.map +1 -0
  169. package/dist/quality-gates/gates/base-gate.js +178 -0
  170. package/dist/quality-gates/gates/base-gate.js.map +1 -0
  171. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.d.ts +62 -0
  172. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.d.ts.map +1 -0
  173. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.js +255 -0
  174. package/dist/quality-gates/gates/constraint-verification/constraint-verification-gate.js.map +1 -0
  175. package/dist/quality-gates/gates/constraint-verification/index.d.ts +7 -0
  176. package/dist/quality-gates/gates/constraint-verification/index.d.ts.map +1 -0
  177. package/dist/quality-gates/gates/constraint-verification/index.js +7 -0
  178. package/dist/quality-gates/gates/constraint-verification/index.js.map +1 -0
  179. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.d.ts +73 -0
  180. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.d.ts.map +1 -0
  181. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.js +351 -0
  182. package/dist/quality-gates/gates/custom-rules/custom-rules-gate.js.map +1 -0
  183. package/dist/quality-gates/gates/custom-rules/index.d.ts +7 -0
  184. package/dist/quality-gates/gates/custom-rules/index.d.ts.map +1 -0
  185. package/dist/quality-gates/gates/custom-rules/index.js +7 -0
  186. package/dist/quality-gates/gates/custom-rules/index.js.map +1 -0
  187. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.d.ts +61 -0
  188. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.d.ts.map +1 -0
  189. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.js +318 -0
  190. package/dist/quality-gates/gates/impact-simulation/impact-simulation-gate.js.map +1 -0
  191. package/dist/quality-gates/gates/impact-simulation/index.d.ts +7 -0
  192. package/dist/quality-gates/gates/impact-simulation/index.d.ts.map +1 -0
  193. package/dist/quality-gates/gates/impact-simulation/index.js +7 -0
  194. package/dist/quality-gates/gates/impact-simulation/index.js.map +1 -0
  195. package/dist/quality-gates/gates/index.d.ts +13 -0
  196. package/dist/quality-gates/gates/index.d.ts.map +1 -0
  197. package/dist/quality-gates/gates/index.js +13 -0
  198. package/dist/quality-gates/gates/index.js.map +1 -0
  199. package/dist/quality-gates/gates/pattern-compliance/index.d.ts +7 -0
  200. package/dist/quality-gates/gates/pattern-compliance/index.d.ts.map +1 -0
  201. package/dist/quality-gates/gates/pattern-compliance/index.js +7 -0
  202. package/dist/quality-gates/gates/pattern-compliance/index.js.map +1 -0
  203. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.d.ts +61 -0
  204. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.d.ts.map +1 -0
  205. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.js +261 -0
  206. package/dist/quality-gates/gates/pattern-compliance/pattern-compliance-gate.js.map +1 -0
  207. package/dist/quality-gates/gates/regression-detection/index.d.ts +7 -0
  208. package/dist/quality-gates/gates/regression-detection/index.d.ts.map +1 -0
  209. package/dist/quality-gates/gates/regression-detection/index.js +7 -0
  210. package/dist/quality-gates/gates/regression-detection/index.js.map +1 -0
  211. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.d.ts +69 -0
  212. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.d.ts.map +1 -0
  213. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.js +330 -0
  214. package/dist/quality-gates/gates/regression-detection/regression-detection-gate.js.map +1 -0
  215. package/dist/quality-gates/gates/security-boundary/index.d.ts +7 -0
  216. package/dist/quality-gates/gates/security-boundary/index.d.ts.map +1 -0
  217. package/dist/quality-gates/gates/security-boundary/index.js +7 -0
  218. package/dist/quality-gates/gates/security-boundary/index.js.map +1 -0
  219. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.d.ts +65 -0
  220. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.d.ts.map +1 -0
  221. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.js +307 -0
  222. package/dist/quality-gates/gates/security-boundary/security-boundary-gate.js.map +1 -0
  223. package/dist/quality-gates/index.d.ts +35 -0
  224. package/dist/quality-gates/index.d.ts.map +1 -0
  225. package/dist/quality-gates/index.js +43 -0
  226. package/dist/quality-gates/index.js.map +1 -0
  227. package/dist/quality-gates/orchestrator/gate-orchestrator.d.ts +79 -0
  228. package/dist/quality-gates/orchestrator/gate-orchestrator.d.ts.map +1 -0
  229. package/dist/quality-gates/orchestrator/gate-orchestrator.js +314 -0
  230. package/dist/quality-gates/orchestrator/gate-orchestrator.js.map +1 -0
  231. package/dist/quality-gates/orchestrator/gate-registry.d.ts +53 -0
  232. package/dist/quality-gates/orchestrator/gate-registry.d.ts.map +1 -0
  233. package/dist/quality-gates/orchestrator/gate-registry.js +141 -0
  234. package/dist/quality-gates/orchestrator/gate-registry.js.map +1 -0
  235. package/dist/quality-gates/orchestrator/index.d.ts +10 -0
  236. package/dist/quality-gates/orchestrator/index.d.ts.map +1 -0
  237. package/dist/quality-gates/orchestrator/index.js +10 -0
  238. package/dist/quality-gates/orchestrator/index.js.map +1 -0
  239. package/dist/quality-gates/orchestrator/parallel-executor.d.ts +35 -0
  240. package/dist/quality-gates/orchestrator/parallel-executor.d.ts.map +1 -0
  241. package/dist/quality-gates/orchestrator/parallel-executor.js +70 -0
  242. package/dist/quality-gates/orchestrator/parallel-executor.js.map +1 -0
  243. package/dist/quality-gates/orchestrator/result-aggregator.d.ts +27 -0
  244. package/dist/quality-gates/orchestrator/result-aggregator.d.ts.map +1 -0
  245. package/dist/quality-gates/orchestrator/result-aggregator.js +70 -0
  246. package/dist/quality-gates/orchestrator/result-aggregator.js.map +1 -0
  247. package/dist/quality-gates/policy/default-policies.d.ts +14 -0
  248. package/dist/quality-gates/policy/default-policies.d.ts.map +1 -0
  249. package/dist/quality-gates/policy/default-policies.js +266 -0
  250. package/dist/quality-gates/policy/default-policies.js.map +1 -0
  251. package/dist/quality-gates/policy/index.d.ts +9 -0
  252. package/dist/quality-gates/policy/index.d.ts.map +1 -0
  253. package/dist/quality-gates/policy/index.js +9 -0
  254. package/dist/quality-gates/policy/index.js.map +1 -0
  255. package/dist/quality-gates/policy/policy-evaluator.d.ts +43 -0
  256. package/dist/quality-gates/policy/policy-evaluator.d.ts.map +1 -0
  257. package/dist/quality-gates/policy/policy-evaluator.js +136 -0
  258. package/dist/quality-gates/policy/policy-evaluator.js.map +1 -0
  259. package/dist/quality-gates/policy/policy-loader.d.ts +72 -0
  260. package/dist/quality-gates/policy/policy-loader.d.ts.map +1 -0
  261. package/dist/quality-gates/policy/policy-loader.js +228 -0
  262. package/dist/quality-gates/policy/policy-loader.js.map +1 -0
  263. package/dist/quality-gates/reporters/github-reporter.d.ts +19 -0
  264. package/dist/quality-gates/reporters/github-reporter.d.ts.map +1 -0
  265. package/dist/quality-gates/reporters/github-reporter.js +49 -0
  266. package/dist/quality-gates/reporters/github-reporter.js.map +1 -0
  267. package/dist/quality-gates/reporters/gitlab-reporter.d.ts +20 -0
  268. package/dist/quality-gates/reporters/gitlab-reporter.d.ts.map +1 -0
  269. package/dist/quality-gates/reporters/gitlab-reporter.js +42 -0
  270. package/dist/quality-gates/reporters/gitlab-reporter.js.map +1 -0
  271. package/dist/quality-gates/reporters/index.d.ts +12 -0
  272. package/dist/quality-gates/reporters/index.d.ts.map +1 -0
  273. package/dist/quality-gates/reporters/index.js +12 -0
  274. package/dist/quality-gates/reporters/index.js.map +1 -0
  275. package/dist/quality-gates/reporters/json-reporter.d.ts +18 -0
  276. package/dist/quality-gates/reporters/json-reporter.d.ts.map +1 -0
  277. package/dist/quality-gates/reporters/json-reporter.js +51 -0
  278. package/dist/quality-gates/reporters/json-reporter.js.map +1 -0
  279. package/dist/quality-gates/reporters/reporter-interface.d.ts +35 -0
  280. package/dist/quality-gates/reporters/reporter-interface.d.ts.map +1 -0
  281. package/dist/quality-gates/reporters/reporter-interface.js +22 -0
  282. package/dist/quality-gates/reporters/reporter-interface.js.map +1 -0
  283. package/dist/quality-gates/reporters/sarif-reporter.d.ts +22 -0
  284. package/dist/quality-gates/reporters/sarif-reporter.d.ts.map +1 -0
  285. package/dist/quality-gates/reporters/sarif-reporter.js +85 -0
  286. package/dist/quality-gates/reporters/sarif-reporter.js.map +1 -0
  287. package/dist/quality-gates/reporters/text-reporter.d.ts +18 -0
  288. package/dist/quality-gates/reporters/text-reporter.d.ts.map +1 -0
  289. package/dist/quality-gates/reporters/text-reporter.js +92 -0
  290. package/dist/quality-gates/reporters/text-reporter.js.map +1 -0
  291. package/dist/quality-gates/store/gate-run-store.d.ts +37 -0
  292. package/dist/quality-gates/store/gate-run-store.d.ts.map +1 -0
  293. package/dist/quality-gates/store/gate-run-store.js +104 -0
  294. package/dist/quality-gates/store/gate-run-store.js.map +1 -0
  295. package/dist/quality-gates/store/index.d.ts +8 -0
  296. package/dist/quality-gates/store/index.d.ts.map +1 -0
  297. package/dist/quality-gates/store/index.js +8 -0
  298. package/dist/quality-gates/store/index.js.map +1 -0
  299. package/dist/quality-gates/store/snapshot-store.d.ts +41 -0
  300. package/dist/quality-gates/store/snapshot-store.d.ts.map +1 -0
  301. package/dist/quality-gates/store/snapshot-store.js +117 -0
  302. package/dist/quality-gates/store/snapshot-store.js.map +1 -0
  303. package/dist/quality-gates/types.d.ts +992 -0
  304. package/dist/quality-gates/types.d.ts.map +1 -0
  305. package/dist/quality-gates/types.js +14 -0
  306. package/dist/quality-gates/types.js.map +1 -0
  307. package/dist/rust/index.d.ts +7 -0
  308. package/dist/rust/index.d.ts.map +1 -0
  309. package/dist/rust/index.js +8 -0
  310. package/dist/rust/index.js.map +1 -0
  311. package/dist/rust/rust-analyzer.d.ts +185 -0
  312. package/dist/rust/rust-analyzer.d.ts.map +1 -0
  313. package/dist/rust/rust-analyzer.js +538 -0
  314. package/dist/rust/rust-analyzer.js.map +1 -0
  315. package/dist/scanner/file-walker.d.ts.map +1 -1
  316. package/dist/scanner/file-walker.js +11 -0
  317. package/dist/scanner/file-walker.js.map +1 -1
  318. package/dist/simulation/simulation-engine.d.ts +6 -0
  319. package/dist/simulation/simulation-engine.d.ts.map +1 -1
  320. package/dist/simulation/simulation-engine.js +6 -0
  321. package/dist/simulation/simulation-engine.js.map +1 -1
  322. package/dist/speculative/types.d.ts +1 -1
  323. package/dist/speculative/types.d.ts.map +1 -1
  324. package/dist/speculative/types.js +2 -0
  325. package/dist/speculative/types.js.map +1 -1
  326. package/dist/store/project-config.d.ts +19 -0
  327. package/dist/store/project-config.d.ts.map +1 -1
  328. package/dist/store/project-config.js.map +1 -1
  329. package/dist/telemetry/index.d.ts +10 -0
  330. package/dist/telemetry/index.d.ts.map +1 -0
  331. package/dist/telemetry/index.js +11 -0
  332. package/dist/telemetry/index.js.map +1 -0
  333. package/dist/telemetry/telemetry-client.d.ts +127 -0
  334. package/dist/telemetry/telemetry-client.d.ts.map +1 -0
  335. package/dist/telemetry/telemetry-client.js +373 -0
  336. package/dist/telemetry/telemetry-client.js.map +1 -0
  337. package/dist/telemetry/types.d.ts +160 -0
  338. package/dist/telemetry/types.d.ts.map +1 -0
  339. package/dist/telemetry/types.js +27 -0
  340. package/dist/telemetry/types.js.map +1 -0
  341. package/dist/test-topology/extractors/cpp-test-extractor.d.ts +38 -0
  342. package/dist/test-topology/extractors/cpp-test-extractor.d.ts.map +1 -0
  343. package/dist/test-topology/extractors/cpp-test-extractor.js +507 -0
  344. package/dist/test-topology/extractors/cpp-test-extractor.js.map +1 -0
  345. package/dist/test-topology/extractors/index.d.ts +2 -0
  346. package/dist/test-topology/extractors/index.d.ts.map +1 -1
  347. package/dist/test-topology/extractors/index.js +2 -0
  348. package/dist/test-topology/extractors/index.js.map +1 -1
  349. package/dist/test-topology/extractors/regex/index.d.ts +1 -0
  350. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -1
  351. package/dist/test-topology/extractors/regex/index.js +4 -0
  352. package/dist/test-topology/extractors/regex/index.js.map +1 -1
  353. package/dist/test-topology/extractors/regex/rust-test-regex.d.ts +66 -0
  354. package/dist/test-topology/extractors/regex/rust-test-regex.d.ts.map +1 -0
  355. package/dist/test-topology/extractors/regex/rust-test-regex.js +565 -0
  356. package/dist/test-topology/extractors/regex/rust-test-regex.js.map +1 -0
  357. package/dist/test-topology/extractors/rust-test-extractor.d.ts +49 -0
  358. package/dist/test-topology/extractors/rust-test-extractor.d.ts.map +1 -0
  359. package/dist/test-topology/extractors/rust-test-extractor.js +422 -0
  360. package/dist/test-topology/extractors/rust-test-extractor.js.map +1 -0
  361. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -1
  362. package/dist/test-topology/hybrid-test-topology-analyzer.js +2 -0
  363. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -1
  364. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -1
  365. package/dist/test-topology/test-topology-analyzer.js +2 -0
  366. package/dist/test-topology/test-topology-analyzer.js.map +1 -1
  367. package/dist/test-topology/types.d.ts +2 -2
  368. package/dist/test-topology/types.d.ts.map +1 -1
  369. package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -1
  370. package/dist/unified-provider/integration/unified-scanner.js +3 -0
  371. package/dist/unified-provider/integration/unified-scanner.js.map +1 -1
  372. package/dist/unified-provider/matching/diesel-matcher.d.ts +33 -0
  373. package/dist/unified-provider/matching/diesel-matcher.d.ts.map +1 -0
  374. package/dist/unified-provider/matching/diesel-matcher.js +210 -0
  375. package/dist/unified-provider/matching/diesel-matcher.js.map +1 -0
  376. package/dist/unified-provider/matching/index.d.ts +3 -1
  377. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  378. package/dist/unified-provider/matching/index.js +4 -1
  379. package/dist/unified-provider/matching/index.js.map +1 -1
  380. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  381. package/dist/unified-provider/matching/matcher-registry.js +7 -2
  382. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  383. package/dist/unified-provider/matching/seaorm-matcher.d.ts +35 -0
  384. package/dist/unified-provider/matching/seaorm-matcher.d.ts.map +1 -0
  385. package/dist/unified-provider/matching/seaorm-matcher.js +200 -0
  386. package/dist/unified-provider/matching/seaorm-matcher.js.map +1 -0
  387. package/dist/unified-provider/matching/sqlx-matcher.d.ts +19 -24
  388. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -1
  389. package/dist/unified-provider/matching/sqlx-matcher.js +171 -149
  390. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -1
  391. package/dist/unified-provider/normalization/cpp-normalizer.d.ts +62 -0
  392. package/dist/unified-provider/normalization/cpp-normalizer.d.ts.map +1 -0
  393. package/dist/unified-provider/normalization/cpp-normalizer.js +581 -0
  394. package/dist/unified-provider/normalization/cpp-normalizer.js.map +1 -0
  395. package/dist/unified-provider/normalization/index.d.ts +2 -0
  396. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  397. package/dist/unified-provider/normalization/index.js +11 -1
  398. package/dist/unified-provider/normalization/index.js.map +1 -1
  399. package/dist/unified-provider/normalization/rust-normalizer.d.ts +71 -0
  400. package/dist/unified-provider/normalization/rust-normalizer.d.ts.map +1 -0
  401. package/dist/unified-provider/normalization/rust-normalizer.js +670 -0
  402. package/dist/unified-provider/normalization/rust-normalizer.js.map +1 -0
  403. package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -1
  404. package/dist/unified-provider/parsing/parser-registry.js +62 -1
  405. package/dist/unified-provider/parsing/parser-registry.js.map +1 -1
  406. package/dist/unified-provider/provider/unified-language-provider.js +1 -1
  407. package/dist/unified-provider/provider/unified-language-provider.js.map +1 -1
  408. package/dist/unified-provider/types.d.ts +1 -1
  409. package/dist/unified-provider/types.d.ts.map +1 -1
  410. package/dist/wrappers/index.d.ts.map +1 -1
  411. package/dist/wrappers/index.js +2 -0
  412. package/dist/wrappers/index.js.map +1 -1
  413. package/dist/wrappers/integration/adapter.d.ts.map +1 -1
  414. package/dist/wrappers/integration/adapter.js +2 -0
  415. package/dist/wrappers/integration/adapter.js.map +1 -1
  416. package/dist/wrappers/integration/scanner.d.ts.map +1 -1
  417. package/dist/wrappers/integration/scanner.js +2 -0
  418. package/dist/wrappers/integration/scanner.js.map +1 -1
  419. package/dist/wrappers/primitives/registry.d.ts +18 -0
  420. package/dist/wrappers/primitives/registry.d.ts.map +1 -1
  421. package/dist/wrappers/primitives/registry.js +190 -0
  422. package/dist/wrappers/primitives/registry.js.map +1 -1
  423. package/dist/wrappers/types.d.ts +1 -1
  424. package/dist/wrappers/types.d.ts.map +1 -1
  425. package/package.json +5 -2
  426. package/LICENSE +0 -21
  427. package/dist/lake/lake.bak/index-store.d.ts +0 -82
  428. package/dist/lake/lake.bak/index-store.d.ts.map +0 -1
  429. package/dist/lake/lake.bak/index-store.js +0 -357
  430. package/dist/lake/lake.bak/index-store.js.map +0 -1
  431. package/dist/lake/lake.bak/index.d.ts +0 -81
  432. package/dist/lake/lake.bak/index.d.ts.map +0 -1
  433. package/dist/lake/lake.bak/index.js +0 -114
  434. package/dist/lake/lake.bak/index.js.map +0 -1
  435. package/dist/lake/lake.bak/manifest-store.d.ts +0 -51
  436. package/dist/lake/lake.bak/manifest-store.d.ts.map +0 -1
  437. package/dist/lake/lake.bak/manifest-store.js +0 -347
  438. package/dist/lake/lake.bak/manifest-store.js.map +0 -1
  439. package/dist/lake/lake.bak/query-engine.d.ts +0 -112
  440. package/dist/lake/lake.bak/query-engine.d.ts.map +0 -1
  441. package/dist/lake/lake.bak/query-engine.js +0 -370
  442. package/dist/lake/lake.bak/query-engine.js.map +0 -1
  443. package/dist/lake/lake.bak/types.d.ts +0 -428
  444. package/dist/lake/lake.bak/types.d.ts.map +0 -1
  445. package/dist/lake/lake.bak/types.js +0 -46
  446. package/dist/lake/lake.bak/types.js.map +0 -1
  447. package/dist/lake/lake.bak/view-materializer.d.ts +0 -70
  448. package/dist/lake/lake.bak/view-materializer.d.ts.map +0 -1
  449. package/dist/lake/lake.bak/view-materializer.js +0 -314
  450. package/dist/lake/lake.bak/view-materializer.js.map +0 -1
  451. package/dist/lake/lake.bak/view-store.d.ts +0 -57
  452. package/dist/lake/lake.bak/view-store.d.ts.map +0 -1
  453. package/dist/lake/lake.bak/view-store.js +0 -348
  454. package/dist/lake/lake.bak/view-store.js.map +0 -1
  455. package/dist/unified-provider/migration/deprecated-extractors.d.ts +0 -104
  456. package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +0 -1
  457. package/dist/unified-provider/migration/deprecated-extractors.js +0 -129
  458. package/dist/unified-provider/migration/deprecated-extractors.js.map +0 -1
  459. package/dist/unified-provider/migration/deprecated-scanner.d.ts +0 -40
  460. package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +0 -1
  461. package/dist/unified-provider/migration/deprecated-scanner.js +0 -49
  462. package/dist/unified-provider/migration/deprecated-scanner.js.map +0 -1
  463. package/dist/unified-provider/migration/index.d.ts +0 -41
  464. package/dist/unified-provider/migration/index.d.ts.map +0 -1
  465. package/dist/unified-provider/migration/index.js +0 -43
  466. package/dist/unified-provider/migration/index.js.map +0 -1
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Gate Orchestrator
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * Main orchestrator for quality gates.
7
+ * Coordinates gate execution and aggregates results.
8
+ */
9
+ import { GateRegistry, getGateRegistry } from './gate-registry.js';
10
+ import { ParallelExecutor } from './parallel-executor.js';
11
+ import { ResultAggregator } from './result-aggregator.js';
12
+ import { PolicyLoader } from '../policy/policy-loader.js';
13
+ import { PolicyEvaluator } from '../policy/policy-evaluator.js';
14
+ /**
15
+ * Main orchestrator for quality gates.
16
+ * Coordinates gate execution and aggregates results.
17
+ */
18
+ export class GateOrchestrator {
19
+ registry;
20
+ executor;
21
+ aggregator;
22
+ policyLoader;
23
+ policyEvaluator;
24
+ // projectRoot is stored for future use when integrating with data stores
25
+ projectRoot;
26
+ constructor(projectRoot) {
27
+ this.projectRoot = projectRoot;
28
+ this.registry = getGateRegistry();
29
+ this.executor = new ParallelExecutor();
30
+ this.aggregator = new ResultAggregator();
31
+ this.policyLoader = new PolicyLoader(projectRoot);
32
+ this.policyEvaluator = new PolicyEvaluator();
33
+ }
34
+ /**
35
+ * Run quality gates with the given options.
36
+ */
37
+ async run(options) {
38
+ const startTime = Date.now();
39
+ // Ensure registry is initialized before proceeding
40
+ await this.registry.list();
41
+ // Load policy first (needed for empty result too)
42
+ const policy = await this.loadPolicy(options);
43
+ // Resolve files to check
44
+ const files = await this.resolveFiles(options);
45
+ // Determine which gates to run
46
+ const gatesToRun = this.determineGates(options, policy);
47
+ if (files.length === 0) {
48
+ return this.createEmptyResult(options, startTime, policy, gatesToRun);
49
+ }
50
+ if (gatesToRun.length === 0) {
51
+ return this.createEmptyResult(options, startTime, policy, [], 'No gates enabled in policy');
52
+ }
53
+ // Build shared context
54
+ const context = await this.buildContext(options, policy);
55
+ // Execute gates
56
+ const gateResults = await this.executeGates(gatesToRun, files, options, policy, context);
57
+ // Evaluate policy
58
+ const evaluation = this.policyEvaluator.evaluate(gateResults, policy);
59
+ // Aggregate results
60
+ const result = this.aggregator.aggregate(gateResults, evaluation, policy, {
61
+ files,
62
+ startTime,
63
+ options,
64
+ });
65
+ // Save to history if configured
66
+ if (options.saveHistory !== false) {
67
+ await this.saveToHistory(result, options);
68
+ }
69
+ return result;
70
+ }
71
+ /**
72
+ * Resolve files to check.
73
+ */
74
+ async resolveFiles(options) {
75
+ if (options.files && options.files.length > 0) {
76
+ return options.files;
77
+ }
78
+ // Default to all files if none specified
79
+ // In a real implementation, this would use git to get staged/changed files
80
+ return [];
81
+ }
82
+ /**
83
+ * Load the appropriate policy.
84
+ */
85
+ async loadPolicy(options) {
86
+ if (typeof options.policy === 'object') {
87
+ return options.policy;
88
+ }
89
+ if (typeof options.policy === 'string') {
90
+ return this.policyLoader.load(options.policy);
91
+ }
92
+ // Auto-detect based on context
93
+ return this.policyLoader.loadForContext({
94
+ branch: options.branch ?? 'main',
95
+ paths: options.files ?? [],
96
+ });
97
+ }
98
+ /**
99
+ * Determine which gates to run.
100
+ */
101
+ determineGates(options, policy) {
102
+ // If specific gates requested, use those
103
+ if (options.gates && options.gates.length > 0) {
104
+ return options.gates;
105
+ }
106
+ // Otherwise, use gates from policy
107
+ const gates = [];
108
+ for (const [gateId, config] of Object.entries(policy.gates)) {
109
+ if (config !== 'skip' && config.enabled) {
110
+ gates.push(gateId);
111
+ }
112
+ }
113
+ return gates;
114
+ }
115
+ /**
116
+ * Build shared context for gates.
117
+ */
118
+ async buildContext(options, policy) {
119
+ const context = {};
120
+ // Load patterns if any gate needs them
121
+ const needsPatterns = this.gatesNeed(policy, ['pattern-compliance', 'regression-detection']);
122
+ if (needsPatterns) {
123
+ context.patterns = await this.loadPatterns();
124
+ }
125
+ // Load constraints if needed
126
+ const needsConstraints = this.gatesNeed(policy, ['constraint-verification']);
127
+ if (needsConstraints) {
128
+ context.constraints = await this.loadConstraints();
129
+ }
130
+ // Load call graph if needed
131
+ const needsCallGraph = this.gatesNeed(policy, ['impact-simulation', 'security-boundary']);
132
+ if (needsCallGraph) {
133
+ const callGraph = await this.loadCallGraph();
134
+ if (callGraph) {
135
+ context.callGraph = callGraph;
136
+ }
137
+ }
138
+ // Load previous snapshot if needed
139
+ const needsSnapshot = this.gatesNeed(policy, ['regression-detection']);
140
+ if (needsSnapshot) {
141
+ const snapshot = await this.loadPreviousSnapshot(options);
142
+ if (snapshot) {
143
+ context.previousSnapshot = snapshot;
144
+ }
145
+ }
146
+ // Load custom rules if needed
147
+ const needsRules = this.gatesNeed(policy, ['custom-rules']);
148
+ if (needsRules) {
149
+ context.customRules = await this.loadCustomRules(policy);
150
+ }
151
+ return context;
152
+ }
153
+ /**
154
+ * Check if any of the specified gates are enabled.
155
+ */
156
+ gatesNeed(policy, gateIds) {
157
+ for (const gateId of gateIds) {
158
+ const config = policy.gates[gateId];
159
+ if (config !== 'skip' && config.enabled) {
160
+ return true;
161
+ }
162
+ }
163
+ return false;
164
+ }
165
+ /**
166
+ * Execute gates in parallel where possible.
167
+ */
168
+ async executeGates(gatesToRun, files, options, policy, context) {
169
+ const results = {};
170
+ // Build inputs for each gate
171
+ const inputs = [];
172
+ for (const gateId of gatesToRun) {
173
+ const config = policy.gates[gateId];
174
+ if (config === 'skip')
175
+ continue;
176
+ inputs.push({
177
+ gateId,
178
+ input: {
179
+ files,
180
+ projectRoot: options.projectRoot,
181
+ branch: options.branch ?? 'main',
182
+ baseBranch: options.baseBranch,
183
+ commitSha: options.commitSha,
184
+ isCI: options.ci ?? false,
185
+ config,
186
+ context,
187
+ },
188
+ });
189
+ }
190
+ // Execute in parallel
191
+ const gateResults = await this.executor.execute(inputs, this.registry);
192
+ // Map results
193
+ for (const { gateId, result } of gateResults) {
194
+ results[gateId] = result;
195
+ }
196
+ return results;
197
+ }
198
+ /**
199
+ * Create result for empty file list or no gates.
200
+ */
201
+ createEmptyResult(options, startTime, policy, gatesToRun = [], reason = 'No files to check') {
202
+ const result = {
203
+ passed: true,
204
+ status: 'passed',
205
+ score: 100,
206
+ summary: reason,
207
+ gates: {},
208
+ violations: [],
209
+ warnings: [reason],
210
+ policy: { id: policy.id, name: policy.name },
211
+ metadata: {
212
+ executionTimeMs: Date.now() - startTime,
213
+ filesChecked: 0,
214
+ gatesRun: gatesToRun,
215
+ gatesSkipped: [],
216
+ timestamp: new Date().toISOString(),
217
+ branch: options.branch ?? 'main',
218
+ ci: options.ci ?? false,
219
+ },
220
+ exitCode: 0,
221
+ };
222
+ if (options.commitSha) {
223
+ result.metadata.commitSha = options.commitSha;
224
+ }
225
+ return result;
226
+ }
227
+ // =========================================================================
228
+ // Data Loading Methods
229
+ // These integrate with existing Drift services when available
230
+ // =========================================================================
231
+ /**
232
+ * Load patterns from the pattern store.
233
+ */
234
+ async loadPatterns() {
235
+ try {
236
+ // Dynamically import to avoid circular dependencies
237
+ const { PatternStore } = await import('../../store/pattern-store.js');
238
+ const { createPatternServiceFromStore } = await import('../../patterns/adapters/service-factory.js');
239
+ const store = new PatternStore({ rootDir: this.projectRoot });
240
+ const service = createPatternServiceFromStore(store, this.projectRoot);
241
+ // Get approved patterns (summaries first)
242
+ const result = await service.listByStatus('approved', { limit: 1000 });
243
+ // Fetch full pattern data for each pattern (needed for locations/outliers)
244
+ const patterns = [];
245
+ for (const summary of result.items) {
246
+ const full = await service.getPattern(summary.id);
247
+ if (full) {
248
+ patterns.push({
249
+ id: full.id,
250
+ name: full.name,
251
+ category: full.category,
252
+ status: full.status,
253
+ confidence: full.confidence,
254
+ locations: full.locations ?? [],
255
+ outliers: full.outliers ?? [],
256
+ });
257
+ }
258
+ }
259
+ return patterns;
260
+ }
261
+ catch {
262
+ // Pattern service not available, return empty array
263
+ return [];
264
+ }
265
+ }
266
+ /**
267
+ * Load constraints from the constraint store.
268
+ */
269
+ async loadConstraints() {
270
+ // Constraints will be loaded by the orchestrator when constraint store is available
271
+ // For now, return empty array - constraints can be passed via context
272
+ return [];
273
+ }
274
+ /**
275
+ * Load call graph from the call graph analyzer.
276
+ */
277
+ async loadCallGraph() {
278
+ // Call graph will be loaded by the orchestrator when call graph store is available
279
+ // For now, return undefined - call graph can be passed via context
280
+ return undefined;
281
+ }
282
+ /**
283
+ * Load previous snapshot for regression detection.
284
+ */
285
+ async loadPreviousSnapshot(_options) {
286
+ // Snapshots will be loaded by the orchestrator when snapshot store is available
287
+ // For now, return undefined - snapshot can be passed via context
288
+ return undefined;
289
+ }
290
+ /**
291
+ * Load custom rules from policy configuration.
292
+ */
293
+ async loadCustomRules(policy) {
294
+ const rulesConfig = policy.gates['custom-rules'];
295
+ if (rulesConfig === 'skip' || !rulesConfig.enabled) {
296
+ return [];
297
+ }
298
+ const rules = [];
299
+ // Add inline rules
300
+ if (rulesConfig.inlineRules) {
301
+ rules.push(...rulesConfig.inlineRules);
302
+ }
303
+ // Load rules from files would be implemented in the custom rules gate
304
+ return rules;
305
+ }
306
+ /**
307
+ * Save result to history.
308
+ */
309
+ async saveToHistory(_result, _options) {
310
+ // History saving will be implemented when gate run store is integrated
311
+ // For now, this is a no-op
312
+ }
313
+ }
314
+ //# sourceMappingURL=gate-orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3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ED;;OAEG;IACK,KAAK,CAAC,eAAe;QAC3B,oFAAoF;QACpF,sEAAsE;QACtE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,aAAa;QACzB,mFAAmF;QACnF,mEAAmE;QACnE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,oBAAoB,CAAC,QAA4B;QAC7D,gFAAgF;QAChF,iEAAiE;QACjE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe,CAAC,MAAqB;QACjD,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACjD,IAAI,WAAW,KAAK,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACnD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,KAAK,GAAiB,EAAE,CAAC;QAE/B,mBAAmB;QACnB,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;QAED,sEAAsE;QAEtE,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,aAAa,CAAC,OAA0B,EAAE,QAA4B;QAClF,uEAAuE;QACvE,2BAA2B;IAC7B,CAAC;CACF"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Gate Registry
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * Manages gate registration and instantiation.
7
+ * Supports both built-in gates and custom gate registration.
8
+ */
9
+ import type { Gate, GateId, GateFactory, GateFactoryContext } from '../types.js';
10
+ /**
11
+ * Registry for quality gates.
12
+ * Manages gate registration and instantiation.
13
+ */
14
+ export declare class GateRegistry {
15
+ private gates;
16
+ private factories;
17
+ private initialized;
18
+ constructor();
19
+ /**
20
+ * Initialize with built-in gates.
21
+ * Called lazily on first access.
22
+ */
23
+ private initializeBuiltInGates;
24
+ /**
25
+ * Register a gate factory.
26
+ */
27
+ register(gateId: GateId, factory: GateFactory): void;
28
+ /**
29
+ * Get a gate instance.
30
+ */
31
+ get(gateId: GateId, context?: GateFactoryContext): Promise<Gate>;
32
+ /**
33
+ * Check if a gate is registered.
34
+ */
35
+ has(gateId: GateId): Promise<boolean>;
36
+ /**
37
+ * List all registered gate IDs.
38
+ */
39
+ list(): Promise<GateId[]>;
40
+ /**
41
+ * Clear cached gate instances.
42
+ */
43
+ clear(): void;
44
+ /**
45
+ * Reset the registry (for testing).
46
+ */
47
+ reset(): void;
48
+ }
49
+ /**
50
+ * Get the global gate registry.
51
+ */
52
+ export declare function getGateRegistry(): GateRegistry;
53
+ //# sourceMappingURL=gate-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-registry.d.ts","sourceRoot":"","sources":["../../../src/quality-gates/orchestrator/gate-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjF;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,SAAS,CAAuC;IACxD,OAAO,CAAC,WAAW,CAAS;;IAM5B;;;OAGG;YACW,sBAAsB;IAgDpC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI;IAMpD;;OAEG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBtE;;OAEG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3C;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAK/B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd;AAOD;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAK9C"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Gate Registry
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * Manages gate registration and instantiation.
7
+ * Supports both built-in gates and custom gate registration.
8
+ */
9
+ /**
10
+ * Registry for quality gates.
11
+ * Manages gate registration and instantiation.
12
+ */
13
+ export class GateRegistry {
14
+ gates = new Map();
15
+ factories = new Map();
16
+ initialized = false;
17
+ constructor() {
18
+ // Built-in gates are registered lazily to avoid circular imports
19
+ }
20
+ /**
21
+ * Initialize with built-in gates.
22
+ * Called lazily on first access.
23
+ */
24
+ async initializeBuiltInGates() {
25
+ if (this.initialized)
26
+ return;
27
+ this.initialized = true;
28
+ // Import gates dynamically to avoid circular dependencies
29
+ try {
30
+ const { PatternComplianceGate } = await import('../gates/pattern-compliance/index.js');
31
+ this.register('pattern-compliance', () => new PatternComplianceGate());
32
+ }
33
+ catch (e) {
34
+ console.error('Failed to load PatternComplianceGate:', e);
35
+ }
36
+ try {
37
+ const { ConstraintVerificationGate } = await import('../gates/constraint-verification/index.js');
38
+ this.register('constraint-verification', () => new ConstraintVerificationGate());
39
+ }
40
+ catch (e) {
41
+ console.error('Failed to load ConstraintVerificationGate:', e);
42
+ }
43
+ try {
44
+ const { RegressionDetectionGate } = await import('../gates/regression-detection/index.js');
45
+ this.register('regression-detection', () => new RegressionDetectionGate());
46
+ }
47
+ catch (e) {
48
+ console.error('Failed to load RegressionDetectionGate:', e);
49
+ }
50
+ try {
51
+ const { ImpactSimulationGate } = await import('../gates/impact-simulation/index.js');
52
+ this.register('impact-simulation', () => new ImpactSimulationGate());
53
+ }
54
+ catch (e) {
55
+ console.error('Failed to load ImpactSimulationGate:', e);
56
+ }
57
+ try {
58
+ const { SecurityBoundaryGate } = await import('../gates/security-boundary/index.js');
59
+ this.register('security-boundary', () => new SecurityBoundaryGate());
60
+ }
61
+ catch (e) {
62
+ console.error('Failed to load SecurityBoundaryGate:', e);
63
+ }
64
+ try {
65
+ const { CustomRulesGate } = await import('../gates/custom-rules/index.js');
66
+ this.register('custom-rules', () => new CustomRulesGate());
67
+ }
68
+ catch (e) {
69
+ console.error('Failed to load CustomRulesGate:', e);
70
+ }
71
+ }
72
+ /**
73
+ * Register a gate factory.
74
+ */
75
+ register(gateId, factory) {
76
+ this.factories.set(gateId, factory);
77
+ // Clear cached instance if re-registering
78
+ this.gates.delete(gateId);
79
+ }
80
+ /**
81
+ * Get a gate instance.
82
+ */
83
+ async get(gateId, context) {
84
+ await this.initializeBuiltInGates();
85
+ // Check if already instantiated
86
+ let gate = this.gates.get(gateId);
87
+ if (gate)
88
+ return gate;
89
+ // Get factory
90
+ const factory = this.factories.get(gateId);
91
+ if (!factory) {
92
+ throw new Error(`Unknown gate: ${gateId}`);
93
+ }
94
+ // Create instance
95
+ gate = factory(context ?? { projectRoot: process.cwd() });
96
+ this.gates.set(gateId, gate);
97
+ return gate;
98
+ }
99
+ /**
100
+ * Check if a gate is registered.
101
+ */
102
+ async has(gateId) {
103
+ await this.initializeBuiltInGates();
104
+ return this.factories.has(gateId);
105
+ }
106
+ /**
107
+ * List all registered gate IDs.
108
+ */
109
+ async list() {
110
+ await this.initializeBuiltInGates();
111
+ return Array.from(this.factories.keys());
112
+ }
113
+ /**
114
+ * Clear cached gate instances.
115
+ */
116
+ clear() {
117
+ this.gates.clear();
118
+ }
119
+ /**
120
+ * Reset the registry (for testing).
121
+ */
122
+ reset() {
123
+ this.gates.clear();
124
+ this.factories.clear();
125
+ this.initialized = false;
126
+ }
127
+ }
128
+ /**
129
+ * Singleton registry instance.
130
+ */
131
+ let registryInstance = null;
132
+ /**
133
+ * Get the global gate registry.
134
+ */
135
+ export function getGateRegistry() {
136
+ if (!registryInstance) {
137
+ registryInstance = new GateRegistry();
138
+ }
139
+ return registryInstance;
140
+ }
141
+ //# sourceMappingURL=gate-registry.js.map
@@ -0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EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF;AAED;;GAEG;AACH,IAAI,gBAAgB,GAAwB,IAAI,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,YAAY,EAAE,CAAC;IACxC,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Orchestrator Module - Exports
3
+ *
4
+ * @license Apache-2.0
5
+ */
6
+ export { GateOrchestrator } from './gate-orchestrator.js';
7
+ export { GateRegistry, getGateRegistry } from './gate-registry.js';
8
+ export { ParallelExecutor } from './parallel-executor.js';
9
+ export { ResultAggregator } from './result-aggregator.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/quality-gates/orchestrator/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Orchestrator Module - Exports
3
+ *
4
+ * @license Apache-2.0
5
+ */
6
+ export { GateOrchestrator } from './gate-orchestrator.js';
7
+ export { GateRegistry, getGateRegistry } from './gate-registry.js';
8
+ export { ParallelExecutor } from './parallel-executor.js';
9
+ export { ResultAggregator } from './result-aggregator.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/quality-gates/orchestrator/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Parallel Executor
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * Executes gates in parallel where possible.
7
+ * Gates without dependencies can run concurrently.
8
+ */
9
+ import type { GateId, GateInput, GateResult } from '../types.js';
10
+ import type { GateRegistry } from './gate-registry.js';
11
+ /**
12
+ * Executes gates in parallel where possible.
13
+ */
14
+ export declare class ParallelExecutor {
15
+ /**
16
+ * Execute gates in parallel.
17
+ */
18
+ execute(inputs: Array<{
19
+ gateId: GateId;
20
+ input: GateInput;
21
+ }>, registry: GateRegistry): Promise<Array<{
22
+ gateId: GateId;
23
+ result: GateResult;
24
+ }>>;
25
+ /**
26
+ * Group gates by dependencies.
27
+ * Gates without dependencies can run in parallel.
28
+ *
29
+ * Current dependency model:
30
+ * - All gates are independent and can run in parallel
31
+ * - Future: Add dependency tracking for gates that need results from others
32
+ */
33
+ private groupByDependencies;
34
+ }
35
+ //# sourceMappingURL=parallel-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallel-executor.d.ts","sourceRoot":"","sources":["../../../src/quality-gates/orchestrator/parallel-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACG,OAAO,CACX,MAAM,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CAAC,EACnD,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IAyCzD;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;CAW5B"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Parallel Executor
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * Executes gates in parallel where possible.
7
+ * Gates without dependencies can run concurrently.
8
+ */
9
+ /**
10
+ * Executes gates in parallel where possible.
11
+ */
12
+ export class ParallelExecutor {
13
+ /**
14
+ * Execute gates in parallel.
15
+ */
16
+ async execute(inputs, registry) {
17
+ // Group gates by dependencies
18
+ const groups = this.groupByDependencies(inputs);
19
+ const results = [];
20
+ // Execute each group in sequence, gates within group in parallel
21
+ for (const group of groups) {
22
+ const groupResults = await Promise.all(group.map(async ({ gateId, input }) => {
23
+ try {
24
+ const gate = await registry.get(gateId);
25
+ const result = await gate.execute(input);
26
+ return { gateId, result };
27
+ }
28
+ catch (error) {
29
+ // Return error result if gate fails to load
30
+ return {
31
+ gateId,
32
+ result: {
33
+ gateId,
34
+ gateName: gateId,
35
+ status: 'errored',
36
+ passed: true, // Errors don't block by default
37
+ score: 0,
38
+ summary: `Gate failed to execute: ${error instanceof Error ? error.message : String(error)}`,
39
+ violations: [],
40
+ warnings: [`Gate ${gateId} failed to execute`],
41
+ executionTimeMs: 0,
42
+ details: {},
43
+ error: error instanceof Error ? error.message : String(error),
44
+ },
45
+ };
46
+ }
47
+ }));
48
+ results.push(...groupResults);
49
+ }
50
+ return results;
51
+ }
52
+ /**
53
+ * Group gates by dependencies.
54
+ * Gates without dependencies can run in parallel.
55
+ *
56
+ * Current dependency model:
57
+ * - All gates are independent and can run in parallel
58
+ * - Future: Add dependency tracking for gates that need results from others
59
+ */
60
+ groupByDependencies(inputs) {
61
+ // For now, all gates are independent and can run in parallel
62
+ // This returns a single group containing all gates
63
+ //
64
+ // Future enhancement: Implement dependency graph
65
+ // - regression-detection might depend on pattern-compliance results
66
+ // - security-boundary might depend on impact-simulation results
67
+ return [inputs];
68
+ }
69
+ }
70
+ //# sourceMappingURL=parallel-executor.js.map