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,992 @@
1
+ /**
2
+ * Quality Gates System - Type Definitions
3
+ *
4
+ * @license Apache-2.0
5
+ *
6
+ * This file contains all type definitions for the quality gates system.
7
+ * Types are organized into logical sections for maintainability.
8
+ *
9
+ * LICENSING NOTE: All features are available to all users initially.
10
+ * The licensing infrastructure is in place but NOT enforced.
11
+ * See FUTURE_GATE comments for where license checks should be added.
12
+ */
13
+ /**
14
+ * Gate execution status
15
+ */
16
+ export type GateStatus = 'passed' | 'failed' | 'warned' | 'skipped' | 'errored';
17
+ /**
18
+ * Severity levels for violations
19
+ */
20
+ export type ViolationSeverity = 'error' | 'warning' | 'info' | 'hint';
21
+ /**
22
+ * Gate identifiers - each gate has a unique ID
23
+ */
24
+ export type GateId = 'pattern-compliance' | 'constraint-verification' | 'regression-detection' | 'impact-simulation' | 'security-boundary' | 'custom-rules';
25
+ /**
26
+ * Output format options
27
+ */
28
+ export type OutputFormat = 'text' | 'json' | 'github' | 'gitlab' | 'sarif' | 'webhook';
29
+ /**
30
+ * Policy aggregation modes
31
+ */
32
+ export type AggregationMode = 'any' | 'all' | 'weighted' | 'threshold';
33
+ /**
34
+ * Input provided to all gates
35
+ */
36
+ export interface GateInput {
37
+ /** Files to check (relative paths) */
38
+ files: string[];
39
+ /** Project root directory */
40
+ projectRoot: string;
41
+ /** Current branch name */
42
+ branch: string;
43
+ /** Base branch for comparison (for PRs) */
44
+ baseBranch?: string;
45
+ /** Commit SHA being checked */
46
+ commitSha?: string;
47
+ /** Whether running in CI environment */
48
+ isCI: boolean;
49
+ /** Gate-specific configuration */
50
+ config: GateConfig;
51
+ /** Shared context from orchestrator */
52
+ context: GateContext;
53
+ }
54
+ /**
55
+ * Shared context available to all gates
56
+ * Populated by orchestrator to avoid redundant loading
57
+ */
58
+ export interface GateContext {
59
+ /** Loaded patterns (if available) */
60
+ patterns?: Pattern[];
61
+ /** Loaded constraints (if available) */
62
+ constraints?: Constraint[];
63
+ /** Call graph (if available) */
64
+ callGraph?: CallGraph;
65
+ /** Previous snapshot for comparison (if available) */
66
+ previousSnapshot?: HealthSnapshot;
67
+ /** Custom rules (if available) */
68
+ customRules?: CustomRule[];
69
+ }
70
+ export interface Pattern {
71
+ id: string;
72
+ name: string;
73
+ status: 'approved' | 'discovered' | 'ignored';
74
+ confidence: number;
75
+ category: string;
76
+ locations?: Array<{
77
+ file: string;
78
+ line: number;
79
+ }>;
80
+ outliers?: Array<{
81
+ file: string;
82
+ line: number;
83
+ reason: string;
84
+ }>;
85
+ }
86
+ export interface Constraint {
87
+ id: string;
88
+ description: string;
89
+ status: 'approved' | 'discovered' | 'ignored';
90
+ confidence: number;
91
+ category: string;
92
+ }
93
+ export interface CallGraph {
94
+ nodes: Map<string, CallGraphNode>;
95
+ edges: Array<{
96
+ from: string;
97
+ to: string;
98
+ }>;
99
+ }
100
+ export interface CallGraphNode {
101
+ id: string;
102
+ file: string;
103
+ name: string;
104
+ type: 'function' | 'method' | 'class';
105
+ }
106
+ /**
107
+ * Base result returned by all gates
108
+ */
109
+ export interface GateResult {
110
+ /** Gate identifier */
111
+ gateId: GateId;
112
+ /** Gate display name */
113
+ gateName: string;
114
+ /** Execution status */
115
+ status: GateStatus;
116
+ /** Whether the gate passed */
117
+ passed: boolean;
118
+ /** Score out of 100 */
119
+ score: number;
120
+ /** Human-readable summary */
121
+ summary: string;
122
+ /** Detailed violations */
123
+ violations: GateViolation[];
124
+ /** Warnings (non-blocking) */
125
+ warnings: string[];
126
+ /** Execution time in milliseconds */
127
+ executionTimeMs: number;
128
+ /** Gate-specific details */
129
+ details: Record<string, unknown>;
130
+ /** Error message if status is 'errored' */
131
+ error?: string;
132
+ }
133
+ /**
134
+ * A single violation from a gate
135
+ */
136
+ export interface GateViolation {
137
+ /** Unique violation ID */
138
+ id: string;
139
+ /** Gate that produced this violation */
140
+ gateId: GateId;
141
+ /** Severity level */
142
+ severity: ViolationSeverity;
143
+ /** File path (relative) */
144
+ file: string;
145
+ /** Line number (1-indexed) */
146
+ line: number;
147
+ /** Column number (1-indexed) */
148
+ column: number;
149
+ /** End line (optional) */
150
+ endLine?: number;
151
+ /** End column (optional) */
152
+ endColumn?: number;
153
+ /** Short message */
154
+ message: string;
155
+ /** Detailed explanation */
156
+ explanation: string;
157
+ /** Rule or pattern ID that was violated */
158
+ ruleId: string;
159
+ /** Suggested fix (if available) */
160
+ suggestedFix?: string;
161
+ /** Documentation URL */
162
+ documentationUrl?: string;
163
+ }
164
+ /**
165
+ * Base configuration for all gates
166
+ */
167
+ export interface BaseGateConfig {
168
+ /** Whether this gate is enabled */
169
+ enabled: boolean;
170
+ /** Whether failures block the pipeline */
171
+ blocking: boolean;
172
+ /** Custom thresholds override defaults */
173
+ thresholds?: Record<string, number>;
174
+ }
175
+ /**
176
+ * Pattern Compliance Gate configuration
177
+ */
178
+ export interface PatternComplianceConfig extends BaseGateConfig {
179
+ /** Minimum compliance rate (0-100) */
180
+ minComplianceRate: number;
181
+ /** Maximum new outliers allowed */
182
+ maxNewOutliers: number;
183
+ /** Pattern categories to check (empty = all) */
184
+ categories: string[];
185
+ /** Minimum pattern confidence to consider */
186
+ minPatternConfidence: number;
187
+ /** Whether to check only approved patterns */
188
+ approvedOnly: boolean;
189
+ }
190
+ /**
191
+ * Constraint Verification Gate configuration
192
+ * FUTURE_GATE: gate:policy-engine (Team tier for advanced constraint management)
193
+ */
194
+ export interface ConstraintVerificationConfig extends BaseGateConfig {
195
+ /** Enforce approved constraints */
196
+ enforceApproved: boolean;
197
+ /** Enforce discovered constraints (usually false) */
198
+ enforceDiscovered: boolean;
199
+ /** Minimum constraint confidence to enforce */
200
+ minConfidence: number;
201
+ /** Constraint categories to check (empty = all) */
202
+ categories: string[];
203
+ }
204
+ /**
205
+ * Regression Detection Gate configuration
206
+ * FUTURE_GATE: gate:regression-detection (Team tier)
207
+ */
208
+ export interface RegressionDetectionConfig extends BaseGateConfig {
209
+ /** Maximum allowed confidence drop (percentage points) */
210
+ maxConfidenceDrop: number;
211
+ /** Maximum allowed compliance drop (percentage points) */
212
+ maxComplianceDrop: number;
213
+ /** Maximum new outliers per pattern */
214
+ maxNewOutliersPerPattern: number;
215
+ /** Categories where ANY regression fails */
216
+ criticalCategories: string[];
217
+ /** Comparison baseline ('previous-commit' | 'branch-base' | 'snapshot') */
218
+ baseline: 'previous-commit' | 'branch-base' | 'snapshot';
219
+ }
220
+ /**
221
+ * Impact Simulation Gate configuration
222
+ * FUTURE_GATE: gate:impact-simulation (Enterprise tier)
223
+ */
224
+ export interface ImpactSimulationConfig extends BaseGateConfig {
225
+ /** Maximum downstream files affected */
226
+ maxFilesAffected: number;
227
+ /** Maximum downstream functions affected */
228
+ maxFunctionsAffected: number;
229
+ /** Maximum API entry points affected */
230
+ maxEntryPointsAffected: number;
231
+ /** Maximum friction score (0-100) */
232
+ maxFrictionScore: number;
233
+ /** Whether to analyze sensitive data paths */
234
+ analyzeSensitiveData: boolean;
235
+ }
236
+ /**
237
+ * Security Boundary Gate configuration
238
+ * FUTURE_GATE: gate:security-boundary (Enterprise tier)
239
+ */
240
+ export interface SecurityBoundaryConfig extends BaseGateConfig {
241
+ /** Allow new sensitive data access points */
242
+ allowNewSensitiveAccess: boolean;
243
+ /** Tables that MUST have auth in call chain */
244
+ protectedTables: string[];
245
+ /** Maximum hops to sensitive data */
246
+ maxDataFlowDepth: number;
247
+ /** Required auth patterns in call chain */
248
+ requiredAuthPatterns: string[];
249
+ }
250
+ /**
251
+ * Custom Rules Gate configuration
252
+ * FUTURE_GATE: gate:custom-rules (Team tier)
253
+ */
254
+ export interface CustomRulesConfig extends BaseGateConfig {
255
+ /** Rule files to load */
256
+ ruleFiles: string[];
257
+ /** Inline rule definitions */
258
+ inlineRules: CustomRule[];
259
+ /** Whether to use built-in rules */
260
+ useBuiltInRules: boolean;
261
+ }
262
+ /**
263
+ * Union type for all gate configs
264
+ */
265
+ export type GateConfig = PatternComplianceConfig | ConstraintVerificationConfig | RegressionDetectionConfig | ImpactSimulationConfig | SecurityBoundaryConfig | CustomRulesConfig;
266
+ /**
267
+ * Pattern Compliance Gate result details
268
+ */
269
+ export interface PatternComplianceDetails {
270
+ /** Overall compliance rate (0-100) */
271
+ complianceRate: number;
272
+ /** Number of patterns checked */
273
+ patternsChecked: number;
274
+ /** Number of files checked */
275
+ filesChecked: number;
276
+ /** New outliers introduced */
277
+ newOutliers: OutlierDetail[];
278
+ /** Existing outliers in changed files */
279
+ existingOutliers: number;
280
+ /** Compliance by category */
281
+ byCategory: Record<string, {
282
+ compliant: number;
283
+ total: number;
284
+ }>;
285
+ }
286
+ /**
287
+ * Detail about a single outlier
288
+ */
289
+ export interface OutlierDetail {
290
+ /** Pattern ID */
291
+ patternId: string;
292
+ /** Pattern name */
293
+ patternName: string;
294
+ /** File path */
295
+ file: string;
296
+ /** Line number */
297
+ line: number;
298
+ /** Reason for outlier */
299
+ reason: string;
300
+ /** Whether this is a new outlier (not in baseline) */
301
+ isNew: boolean;
302
+ }
303
+ /**
304
+ * Constraint Verification Gate result details
305
+ */
306
+ export interface ConstraintVerificationDetails {
307
+ /** Constraints that passed */
308
+ satisfied: ConstraintResult[];
309
+ /** Constraints that failed */
310
+ violated: ConstraintViolationDetail[];
311
+ /** Constraints that were skipped */
312
+ skipped: SkippedConstraint[];
313
+ /** Results by category */
314
+ byCategory: Record<string, {
315
+ passed: number;
316
+ failed: number;
317
+ }>;
318
+ }
319
+ /**
320
+ * Result for a single constraint check
321
+ */
322
+ export interface ConstraintResult {
323
+ /** Constraint ID */
324
+ constraintId: string;
325
+ /** Constraint description */
326
+ description: string;
327
+ /** Whether it passed */
328
+ passed: boolean;
329
+ /** Confidence in the result */
330
+ confidence: number;
331
+ }
332
+ /**
333
+ * Detail about a constraint violation
334
+ */
335
+ export interface ConstraintViolationDetail {
336
+ /** Constraint ID */
337
+ constraintId: string;
338
+ /** Constraint description */
339
+ description: string;
340
+ /** Files that violate */
341
+ violatingFiles: string[];
342
+ /** Specific violation locations */
343
+ locations: Array<{
344
+ file: string;
345
+ line: number;
346
+ reason: string;
347
+ }>;
348
+ }
349
+ /**
350
+ * Constraint that was skipped
351
+ */
352
+ export interface SkippedConstraint {
353
+ /** Constraint ID */
354
+ constraintId: string;
355
+ /** Reason for skipping */
356
+ reason: string;
357
+ }
358
+ /**
359
+ * Regression Detection Gate result details
360
+ */
361
+ export interface RegressionDetectionDetails {
362
+ /** Patterns that regressed */
363
+ regressions: PatternRegression[];
364
+ /** Patterns that improved */
365
+ improvements: PatternImprovement[];
366
+ /** Overall health delta (-100 to +100) */
367
+ overallHealthDelta: number;
368
+ /** Health delta by category */
369
+ categoryDeltas: Record<string, number>;
370
+ /** Baseline used for comparison */
371
+ baseline: {
372
+ type: 'previous-commit' | 'branch-base' | 'snapshot';
373
+ reference: string;
374
+ timestamp: string;
375
+ };
376
+ }
377
+ /**
378
+ * A pattern that regressed
379
+ */
380
+ export interface PatternRegression {
381
+ /** Pattern ID */
382
+ patternId: string;
383
+ /** Pattern name */
384
+ patternName: string;
385
+ /** Previous confidence */
386
+ previousConfidence: number;
387
+ /** Current confidence */
388
+ currentConfidence: number;
389
+ /** Confidence delta */
390
+ confidenceDelta: number;
391
+ /** Previous compliance */
392
+ previousCompliance: number;
393
+ /** Current compliance */
394
+ currentCompliance: number;
395
+ /** Compliance delta */
396
+ complianceDelta: number;
397
+ /** New outliers introduced */
398
+ newOutliers: number;
399
+ /** Severity of regression */
400
+ severity: 'minor' | 'moderate' | 'severe';
401
+ }
402
+ /**
403
+ * A pattern that improved
404
+ */
405
+ export interface PatternImprovement {
406
+ /** Pattern ID */
407
+ patternId: string;
408
+ /** Pattern name */
409
+ patternName: string;
410
+ /** Confidence improvement */
411
+ confidenceImprovement: number;
412
+ /** Compliance improvement */
413
+ complianceImprovement: number;
414
+ /** Outliers fixed */
415
+ outliersFixed: number;
416
+ }
417
+ /**
418
+ * Impact Simulation Gate result details
419
+ */
420
+ export interface ImpactSimulationDetails {
421
+ /** Number of files affected */
422
+ filesAffected: number;
423
+ /** Number of functions affected */
424
+ functionsAffected: number;
425
+ /** Entry points affected */
426
+ entryPointsAffected: string[];
427
+ /** Friction score (0-100) */
428
+ frictionScore: number;
429
+ /** Breaking risk assessment */
430
+ breakingRisk: 'low' | 'medium' | 'high' | 'critical';
431
+ /** Sensitive data paths affected */
432
+ sensitiveDataPaths: SensitiveDataPath[];
433
+ /** Affected files list */
434
+ affectedFiles: AffectedFile[];
435
+ }
436
+ /**
437
+ * A sensitive data path
438
+ */
439
+ export interface SensitiveDataPath {
440
+ /** Starting point */
441
+ from: string;
442
+ /** Sensitive data accessed */
443
+ sensitiveData: string;
444
+ /** Path through code */
445
+ path: string[];
446
+ }
447
+ /**
448
+ * An affected file
449
+ */
450
+ export interface AffectedFile {
451
+ /** File path */
452
+ file: string;
453
+ /** How it's affected */
454
+ affectedBy: 'direct' | 'transitive';
455
+ /** Distance from changed file */
456
+ distance: number;
457
+ }
458
+ /**
459
+ * Security Boundary Gate result details
460
+ */
461
+ export interface SecurityBoundaryDetails {
462
+ /** New sensitive data access points */
463
+ newSensitiveAccess: DataAccessPoint[];
464
+ /** Unauthorized access paths */
465
+ unauthorizedPaths: UnauthorizedPath[];
466
+ /** Tables accessed by changed code */
467
+ tablesAccessed: string[];
468
+ /** Auth coverage percentage */
469
+ authCoverage: number;
470
+ /** Protected tables status */
471
+ protectedTablesStatus: Record<string, 'protected' | 'unprotected' | 'partial'>;
472
+ }
473
+ /**
474
+ * A data access point
475
+ */
476
+ export interface DataAccessPoint {
477
+ /** File where access occurs */
478
+ file: string;
479
+ /** Line number */
480
+ line: number;
481
+ /** Table/data being accessed */
482
+ dataAccessed: string;
483
+ /** Type of access */
484
+ accessType: 'read' | 'write' | 'delete';
485
+ /** Whether auth is in call chain */
486
+ hasAuth: boolean;
487
+ }
488
+ /**
489
+ * An unauthorized access path
490
+ */
491
+ export interface UnauthorizedPath {
492
+ /** Entry point */
493
+ entryPoint: string;
494
+ /** Sensitive data reached */
495
+ sensitiveData: string;
496
+ /** Path through code */
497
+ path: string[];
498
+ /** Missing auth check */
499
+ missingAuth: string;
500
+ }
501
+ /**
502
+ * Custom Rules Gate result details
503
+ */
504
+ export interface CustomRulesDetails {
505
+ /** Results for each rule */
506
+ ruleResults: RuleResult[];
507
+ /** Rules that failed */
508
+ failedRules: string[];
509
+ /** Rules that passed */
510
+ passedRules: string[];
511
+ /** Rules that were skipped */
512
+ skippedRules: string[];
513
+ }
514
+ /**
515
+ * Result for a single rule
516
+ */
517
+ export interface RuleResult {
518
+ /** Rule ID */
519
+ ruleId: string;
520
+ /** Rule name */
521
+ ruleName: string;
522
+ /** Whether it passed */
523
+ passed: boolean;
524
+ /** Violations if failed */
525
+ violations: RuleViolation[];
526
+ /** Files checked */
527
+ filesChecked: number;
528
+ }
529
+ /**
530
+ * A rule violation
531
+ */
532
+ export interface RuleViolation {
533
+ /** File path */
534
+ file: string;
535
+ /** Line number */
536
+ line: number;
537
+ /** Violation message */
538
+ message: string;
539
+ }
540
+ /**
541
+ * A custom rule definition
542
+ */
543
+ export interface CustomRule {
544
+ /** Unique rule ID */
545
+ id: string;
546
+ /** Human-readable name */
547
+ name: string;
548
+ /** Description of what the rule checks */
549
+ description: string;
550
+ /** Severity when violated */
551
+ severity: ViolationSeverity;
552
+ /** Rule condition */
553
+ condition: RuleCondition;
554
+ /** Message to show when violated */
555
+ message: string;
556
+ /** Documentation URL */
557
+ documentationUrl?: string;
558
+ /** Whether rule is enabled */
559
+ enabled: boolean;
560
+ /** Tags for categorization */
561
+ tags: string[];
562
+ }
563
+ /**
564
+ * Rule condition types
565
+ */
566
+ export type RuleCondition = FilePatternCondition | ContentPatternCondition | DependencyCondition | NamingCondition | StructureCondition | CompositeCondition;
567
+ /**
568
+ * File pattern condition
569
+ */
570
+ export interface FilePatternCondition {
571
+ type: 'file-pattern';
572
+ /** Files that must exist matching pattern */
573
+ mustExist?: string;
574
+ /** Files that must not exist matching pattern */
575
+ mustNotExist?: string;
576
+ /** For each file matching this pattern... */
577
+ forEachFile?: string;
578
+ /** ...there must be a corresponding file matching this */
579
+ correspondingFile?: string;
580
+ }
581
+ /**
582
+ * Content pattern condition
583
+ */
584
+ export interface ContentPatternCondition {
585
+ type: 'content-pattern';
586
+ /** Files to check */
587
+ files: string;
588
+ /** Pattern that must be present */
589
+ mustContain?: string;
590
+ /** Pattern that must not be present */
591
+ mustNotContain?: string;
592
+ /** Regex pattern */
593
+ regex?: string;
594
+ }
595
+ /**
596
+ * Dependency condition
597
+ */
598
+ export interface DependencyCondition {
599
+ type: 'dependency';
600
+ /** Source files */
601
+ from: string;
602
+ /** Cannot import from */
603
+ cannotImport?: string;
604
+ /** Must import from */
605
+ mustImport?: string;
606
+ }
607
+ /**
608
+ * Naming condition
609
+ */
610
+ export interface NamingCondition {
611
+ type: 'naming';
612
+ /** Files to check */
613
+ files: string;
614
+ /** Naming pattern (regex) */
615
+ pattern: string;
616
+ /** What should match (file, class, function, variable) */
617
+ target: 'file' | 'class' | 'function' | 'variable';
618
+ }
619
+ /**
620
+ * Structure condition
621
+ */
622
+ export interface StructureCondition {
623
+ type: 'structure';
624
+ /** Directory that must exist */
625
+ directoryMustExist?: string;
626
+ /** File that must exist */
627
+ fileMustExist?: string;
628
+ /** Maximum file count in directory */
629
+ maxFilesInDirectory?: {
630
+ directory: string;
631
+ max: number;
632
+ };
633
+ }
634
+ /**
635
+ * Composite condition (AND/OR)
636
+ */
637
+ export interface CompositeCondition {
638
+ type: 'composite';
639
+ /** Operator */
640
+ operator: 'and' | 'or' | 'not';
641
+ /** Child conditions */
642
+ conditions: RuleCondition[];
643
+ }
644
+ /**
645
+ * A quality gate policy
646
+ * FUTURE_GATE: gate:policy-engine (Team tier for multiple policies)
647
+ */
648
+ export interface QualityPolicy {
649
+ /** Unique policy ID */
650
+ id: string;
651
+ /** Human-readable name */
652
+ name: string;
653
+ /** Description */
654
+ description: string;
655
+ /** Policy version */
656
+ version: string;
657
+ /** When this policy applies */
658
+ scope: PolicyScope;
659
+ /** Gate configurations */
660
+ gates: PolicyGateConfigs;
661
+ /** How to aggregate gate results */
662
+ aggregation: AggregationConfig;
663
+ /** Actions to take based on result */
664
+ actions: PolicyActions;
665
+ /** Policy metadata */
666
+ metadata: {
667
+ createdAt: string;
668
+ updatedAt: string;
669
+ createdBy?: string;
670
+ };
671
+ }
672
+ /**
673
+ * Policy scope - when the policy applies
674
+ */
675
+ export interface PolicyScope {
676
+ /** Branch patterns (glob) */
677
+ branches?: string[];
678
+ /** Path patterns (glob) */
679
+ paths?: string[];
680
+ /** Author patterns (for different rules for bots) */
681
+ authors?: string[];
682
+ /** File patterns to include */
683
+ includeFiles?: string[];
684
+ /** File patterns to exclude */
685
+ excludeFiles?: string[];
686
+ /** Time-based scope (e.g., stricter before release) */
687
+ timeRange?: {
688
+ after?: string;
689
+ before?: string;
690
+ };
691
+ }
692
+ /**
693
+ * Gate configurations within a policy
694
+ */
695
+ export interface PolicyGateConfigs {
696
+ 'pattern-compliance': PatternComplianceConfig | 'skip';
697
+ 'constraint-verification': ConstraintVerificationConfig | 'skip';
698
+ 'regression-detection': RegressionDetectionConfig | 'skip';
699
+ 'impact-simulation': ImpactSimulationConfig | 'skip';
700
+ 'security-boundary': SecurityBoundaryConfig | 'skip';
701
+ 'custom-rules': CustomRulesConfig | 'skip';
702
+ }
703
+ /**
704
+ * Aggregation configuration
705
+ */
706
+ export interface AggregationConfig {
707
+ /** How to determine overall pass/fail */
708
+ mode: AggregationMode;
709
+ /** Weights for weighted mode */
710
+ weights?: Record<GateId, number>;
711
+ /** Minimum score for threshold mode */
712
+ minScore?: number;
713
+ /** Gates that must pass regardless of mode */
714
+ requiredGates?: GateId[];
715
+ }
716
+ /**
717
+ * Actions to take based on result
718
+ */
719
+ export interface PolicyActions {
720
+ /** Actions on pass */
721
+ onPass: PolicyAction[];
722
+ /** Actions on fail */
723
+ onFail: PolicyAction[];
724
+ /** Actions on warn */
725
+ onWarn: PolicyAction[];
726
+ }
727
+ /**
728
+ * A single policy action
729
+ * FUTURE_GATE: integration:webhooks, integration:slack, integration:jira (Enterprise tier)
730
+ */
731
+ export type PolicyAction = {
732
+ type: 'comment';
733
+ template: string;
734
+ } | {
735
+ type: 'label';
736
+ add?: string[];
737
+ remove?: string[];
738
+ } | {
739
+ type: 'webhook';
740
+ url: string;
741
+ payload?: Record<string, unknown>;
742
+ } | {
743
+ type: 'slack';
744
+ channel: string;
745
+ message: string;
746
+ } | {
747
+ type: 'jira';
748
+ project: string;
749
+ issueType: string;
750
+ };
751
+ /**
752
+ * Options for running quality gates
753
+ */
754
+ export interface QualityGateOptions {
755
+ /** Project root directory */
756
+ projectRoot: string;
757
+ /** Files to check (if not specified, uses staged/changed files) */
758
+ files?: string[];
759
+ /** Policy to use (ID or inline) */
760
+ policy?: string | QualityPolicy;
761
+ /** Specific gates to run (overrides policy) */
762
+ gates?: GateId[];
763
+ /** Output format */
764
+ format?: OutputFormat;
765
+ /** Whether running in CI */
766
+ ci?: boolean;
767
+ /** Verbose output */
768
+ verbose?: boolean;
769
+ /** Dry run (show what would be checked) */
770
+ dryRun?: boolean;
771
+ /** Branch name */
772
+ branch?: string;
773
+ /** Base branch for comparison */
774
+ baseBranch?: string;
775
+ /** Commit SHA */
776
+ commitSha?: string;
777
+ /** Webhook URL for results */
778
+ webhookUrl?: string;
779
+ /** Save results to history */
780
+ saveHistory?: boolean;
781
+ }
782
+ /**
783
+ * Overall quality gate result
784
+ */
785
+ export interface QualityGateResult {
786
+ /** Overall pass/fail */
787
+ passed: boolean;
788
+ /** Overall status */
789
+ status: GateStatus;
790
+ /** Overall score (0-100) */
791
+ score: number;
792
+ /** Human-readable summary */
793
+ summary: string;
794
+ /** Individual gate results */
795
+ gates: Record<GateId, GateResult>;
796
+ /** All violations across gates */
797
+ violations: GateViolation[];
798
+ /** All warnings across gates */
799
+ warnings: string[];
800
+ /** Policy that was applied */
801
+ policy: {
802
+ id: string;
803
+ name: string;
804
+ };
805
+ /** Execution metadata */
806
+ metadata: {
807
+ /** Total execution time */
808
+ executionTimeMs: number;
809
+ /** Files checked */
810
+ filesChecked: number;
811
+ /** Gates run */
812
+ gatesRun: GateId[];
813
+ /** Gates skipped */
814
+ gatesSkipped: GateId[];
815
+ /** Timestamp */
816
+ timestamp: string;
817
+ /** Branch */
818
+ branch: string;
819
+ /** Commit SHA */
820
+ commitSha?: string;
821
+ /** CI environment */
822
+ ci: boolean;
823
+ };
824
+ /** Exit code for CLI */
825
+ exitCode: number;
826
+ }
827
+ /**
828
+ * A point-in-time snapshot of codebase health
829
+ */
830
+ export interface HealthSnapshot {
831
+ /** Snapshot ID */
832
+ id: string;
833
+ /** Branch name */
834
+ branch: string;
835
+ /** Commit SHA */
836
+ commitSha: string;
837
+ /** Timestamp */
838
+ timestamp: string;
839
+ /** Overall health score */
840
+ healthScore: number;
841
+ /** Pattern health */
842
+ patterns: PatternHealthSnapshot[];
843
+ /** Constraint health */
844
+ constraints: ConstraintHealthSnapshot[];
845
+ /** Security health */
846
+ security: SecurityHealthSnapshot;
847
+ /** Metadata */
848
+ metadata: {
849
+ filesAnalyzed: number;
850
+ patternsAnalyzed: number;
851
+ constraintsAnalyzed: number;
852
+ };
853
+ }
854
+ /**
855
+ * Pattern health in a snapshot
856
+ */
857
+ export interface PatternHealthSnapshot {
858
+ /** Pattern ID */
859
+ patternId: string;
860
+ /** Pattern name */
861
+ patternName: string;
862
+ /** Category */
863
+ category: string;
864
+ /** Confidence score */
865
+ confidence: number;
866
+ /** Compliance rate */
867
+ compliance: number;
868
+ /** Number of locations */
869
+ locations: number;
870
+ /** Number of outliers */
871
+ outliers: number;
872
+ }
873
+ /**
874
+ * Constraint health in a snapshot
875
+ */
876
+ export interface ConstraintHealthSnapshot {
877
+ /** Constraint ID */
878
+ constraintId: string;
879
+ /** Description */
880
+ description: string;
881
+ /** Category */
882
+ category: string;
883
+ /** Whether satisfied */
884
+ satisfied: boolean;
885
+ /** Confidence */
886
+ confidence: number;
887
+ }
888
+ /**
889
+ * Security health in a snapshot
890
+ */
891
+ export interface SecurityHealthSnapshot {
892
+ /** Auth coverage */
893
+ authCoverage: number;
894
+ /** Sensitive data access points */
895
+ sensitiveAccessPoints: number;
896
+ /** Protected tables */
897
+ protectedTables: number;
898
+ /** Unprotected tables */
899
+ unprotectedTables: number;
900
+ }
901
+ /**
902
+ * Reporter options
903
+ */
904
+ export interface ReporterOptions {
905
+ /** Output file path (if writing to file) */
906
+ outputPath?: string;
907
+ /** Verbose output */
908
+ verbose?: boolean;
909
+ /** Include suggestions */
910
+ includeSuggestions?: boolean;
911
+ /** Include code snippets */
912
+ includeCodeSnippets?: boolean;
913
+ /** Webhook URL (for webhook reporter) */
914
+ webhookUrl?: string;
915
+ /** GitHub token (for GitHub reporter) */
916
+ githubToken?: string;
917
+ /** GitLab token (for GitLab reporter) */
918
+ gitlabToken?: string;
919
+ }
920
+ /**
921
+ * Gate run record
922
+ */
923
+ export interface GateRunRecord {
924
+ /** Run ID */
925
+ id: string;
926
+ /** Timestamp */
927
+ timestamp: string;
928
+ /** Branch */
929
+ branch: string;
930
+ /** Commit SHA */
931
+ commitSha?: string;
932
+ /** Policy used */
933
+ policyId: string;
934
+ /** Overall result */
935
+ passed: boolean;
936
+ /** Score */
937
+ score: number;
938
+ /** Gate results summary */
939
+ gates: Record<GateId, {
940
+ passed: boolean;
941
+ score: number;
942
+ }>;
943
+ /** Violation count */
944
+ violationCount: number;
945
+ /** Execution time */
946
+ executionTimeMs: number;
947
+ /** CI environment */
948
+ ci: boolean;
949
+ }
950
+ /**
951
+ * Gate factory function type
952
+ */
953
+ export type GateFactory = (context: GateFactoryContext) => Gate;
954
+ /**
955
+ * Context provided to gate factories
956
+ */
957
+ export interface GateFactoryContext {
958
+ /** Project root */
959
+ projectRoot: string;
960
+ /** Logger */
961
+ logger?: Logger;
962
+ }
963
+ /**
964
+ * Simple logger interface
965
+ */
966
+ export interface Logger {
967
+ debug(message: string, ...args: unknown[]): void;
968
+ info(message: string, ...args: unknown[]): void;
969
+ warn(message: string, ...args: unknown[]): void;
970
+ error(message: string, ...args: unknown[]): void;
971
+ }
972
+ /**
973
+ * Gate interface
974
+ */
975
+ export interface Gate {
976
+ /** Gate ID */
977
+ id: GateId;
978
+ /** Gate name */
979
+ name: string;
980
+ /** Gate description */
981
+ description: string;
982
+ /** Execute the gate */
983
+ execute(input: GateInput): Promise<GateResult>;
984
+ /** Validate configuration */
985
+ validateConfig(config: GateConfig): {
986
+ valid: boolean;
987
+ errors: string[];
988
+ };
989
+ /** Get default configuration */
990
+ getDefaultConfig(): GateConfig;
991
+ }
992
+ //# sourceMappingURL=types.d.ts.map