driftdetect-core 0.4.6 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (644) 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 +1 -0
  5. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  6. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
  7. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  8. package/dist/call-graph/extractors/csharp-data-access-extractor.js +8 -0
  9. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  10. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  11. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  12. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  13. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  14. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  15. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  16. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  17. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  18. package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
  19. package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
  21. package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
  22. package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
  23. package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
  24. package/dist/call-graph/extractors/go-extractor.js +509 -0
  25. package/dist/call-graph/extractors/go-extractor.js.map +1 -0
  26. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
  27. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
  28. package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
  29. package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
  30. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  31. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  32. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  33. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  34. package/dist/call-graph/extractors/index.d.ts +17 -13
  35. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  36. package/dist/call-graph/extractors/index.js +24 -23
  37. package/dist/call-graph/extractors/index.js.map +1 -1
  38. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  39. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  40. package/dist/call-graph/extractors/java-data-access-extractor.js +8 -0
  41. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  42. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  43. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  44. package/dist/call-graph/extractors/java-extractor.js +120 -4
  45. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  46. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  47. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  48. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  49. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  50. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  51. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  52. package/dist/call-graph/extractors/php-data-access-extractor.js +8 -0
  53. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  54. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  55. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  56. package/dist/call-graph/extractors/php-extractor.js +460 -6
  57. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  58. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  59. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  60. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  61. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  62. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  63. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  64. package/dist/call-graph/extractors/python-data-access-extractor.js +8 -0
  65. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  66. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  67. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  68. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  69. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  70. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  71. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  72. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  73. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  74. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  75. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  76. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  77. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  78. package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
  79. package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
  80. package/dist/call-graph/extractors/regex/go-regex.js +435 -0
  81. package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
  82. package/dist/call-graph/extractors/regex/index.d.ts +26 -0
  83. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  84. package/dist/call-graph/extractors/regex/index.js +74 -0
  85. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  86. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  87. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  88. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  89. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  90. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  91. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  92. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  93. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  94. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  95. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  96. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  97. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  98. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  99. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  100. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  101. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  102. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +7 -0
  103. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  104. package/dist/call-graph/extractors/semantic-data-access-scanner.js +7 -0
  105. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  106. package/dist/call-graph/extractors/types.d.ts +111 -0
  107. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  108. package/dist/call-graph/extractors/types.js +68 -0
  109. package/dist/call-graph/extractors/types.js.map +1 -0
  110. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  111. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  112. package/dist/call-graph/extractors/typescript-data-access-extractor.js +8 -0
  113. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  114. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  115. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  116. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  117. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  118. package/dist/call-graph/index.d.ts +3 -0
  119. package/dist/call-graph/index.d.ts.map +1 -1
  120. package/dist/call-graph/index.js +5 -0
  121. package/dist/call-graph/index.js.map +1 -1
  122. package/dist/call-graph/types.d.ts +1 -1
  123. package/dist/call-graph/types.d.ts.map +1 -1
  124. package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
  125. package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
  126. package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
  127. package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
  128. package/dist/constraints/extraction/index.d.ts +10 -0
  129. package/dist/constraints/extraction/index.d.ts.map +1 -0
  130. package/dist/constraints/extraction/index.js +10 -0
  131. package/dist/constraints/extraction/index.js.map +1 -0
  132. package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
  133. package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
  134. package/dist/constraints/extraction/invariant-detector.js +979 -0
  135. package/dist/constraints/extraction/invariant-detector.js.map +1 -0
  136. package/dist/constraints/index.d.ts +15 -0
  137. package/dist/constraints/index.d.ts.map +1 -0
  138. package/dist/constraints/index.js +16 -0
  139. package/dist/constraints/index.js.map +1 -0
  140. package/dist/constraints/store/constraint-store.d.ts +110 -0
  141. package/dist/constraints/store/constraint-store.d.ts.map +1 -0
  142. package/dist/constraints/store/constraint-store.js +584 -0
  143. package/dist/constraints/store/constraint-store.js.map +1 -0
  144. package/dist/constraints/types.d.ts +605 -0
  145. package/dist/constraints/types.d.ts.map +1 -0
  146. package/dist/constraints/types.js +57 -0
  147. package/dist/constraints/types.js.map +1 -0
  148. package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
  149. package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
  150. package/dist/constraints/verification/constraint-verifier.js +638 -0
  151. package/dist/constraints/verification/constraint-verifier.js.map +1 -0
  152. package/dist/constraints/verification/index.d.ts +8 -0
  153. package/dist/constraints/verification/index.d.ts.map +1 -0
  154. package/dist/constraints/verification/index.js +8 -0
  155. package/dist/constraints/verification/index.js.map +1 -0
  156. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
  157. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
  158. package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
  159. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
  160. package/dist/decisions/analyzer/index.d.ts +5 -0
  161. package/dist/decisions/analyzer/index.d.ts.map +1 -0
  162. package/dist/decisions/analyzer/index.js +5 -0
  163. package/dist/decisions/analyzer/index.js.map +1 -0
  164. package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
  165. package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
  166. package/dist/decisions/extractors/base-commit-extractor.js +305 -0
  167. package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
  168. package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
  169. package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
  170. package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
  171. package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
  172. package/dist/decisions/extractors/index.d.ts +31 -0
  173. package/dist/decisions/extractors/index.d.ts.map +1 -0
  174. package/dist/decisions/extractors/index.js +63 -0
  175. package/dist/decisions/extractors/index.js.map +1 -0
  176. package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
  177. package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
  178. package/dist/decisions/extractors/java-commit-extractor.js +248 -0
  179. package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
  180. package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
  181. package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
  182. package/dist/decisions/extractors/php-commit-extractor.js +280 -0
  183. package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
  184. package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
  185. package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
  186. package/dist/decisions/extractors/python-commit-extractor.js +248 -0
  187. package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
  188. package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
  189. package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
  190. package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
  191. package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
  192. package/dist/decisions/git/commit-parser.d.ts +58 -0
  193. package/dist/decisions/git/commit-parser.d.ts.map +1 -0
  194. package/dist/decisions/git/commit-parser.js +344 -0
  195. package/dist/decisions/git/commit-parser.js.map +1 -0
  196. package/dist/decisions/git/diff-analyzer.d.ts +30 -0
  197. package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
  198. package/dist/decisions/git/diff-analyzer.js +492 -0
  199. package/dist/decisions/git/diff-analyzer.js.map +1 -0
  200. package/dist/decisions/git/git-walker.d.ts +64 -0
  201. package/dist/decisions/git/git-walker.d.ts.map +1 -0
  202. package/dist/decisions/git/git-walker.js +441 -0
  203. package/dist/decisions/git/git-walker.js.map +1 -0
  204. package/dist/decisions/git/index.d.ts +11 -0
  205. package/dist/decisions/git/index.d.ts.map +1 -0
  206. package/dist/decisions/git/index.js +13 -0
  207. package/dist/decisions/git/index.js.map +1 -0
  208. package/dist/decisions/git/types.d.ts +223 -0
  209. package/dist/decisions/git/types.d.ts.map +1 -0
  210. package/dist/decisions/git/types.js +7 -0
  211. package/dist/decisions/git/types.js.map +1 -0
  212. package/dist/decisions/index.d.ts +27 -0
  213. package/dist/decisions/index.d.ts.map +1 -0
  214. package/dist/decisions/index.js +45 -0
  215. package/dist/decisions/index.js.map +1 -0
  216. package/dist/decisions/types.d.ts +530 -0
  217. package/dist/decisions/types.d.ts.map +1 -0
  218. package/dist/decisions/types.js +8 -0
  219. package/dist/decisions/types.js.map +1 -0
  220. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  221. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  222. package/dist/error-handling/error-handling-analyzer.js +706 -0
  223. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  224. package/dist/error-handling/index.d.ts +8 -0
  225. package/dist/error-handling/index.d.ts.map +1 -0
  226. package/dist/error-handling/index.js +8 -0
  227. package/dist/error-handling/index.js.map +1 -0
  228. package/dist/error-handling/types.d.ts +307 -0
  229. package/dist/error-handling/types.d.ts.map +1 -0
  230. package/dist/error-handling/types.js +7 -0
  231. package/dist/error-handling/types.js.map +1 -0
  232. package/dist/go/go-analyzer.d.ts +203 -0
  233. package/dist/go/go-analyzer.d.ts.map +1 -0
  234. package/dist/go/go-analyzer.js +509 -0
  235. package/dist/go/go-analyzer.js.map +1 -0
  236. package/dist/go/index.d.ts +7 -0
  237. package/dist/go/index.d.ts.map +1 -0
  238. package/dist/go/index.js +8 -0
  239. package/dist/go/index.js.map +1 -0
  240. package/dist/index.d.ts +25 -0
  241. package/dist/index.d.ts.map +1 -1
  242. package/dist/index.js +85 -0
  243. package/dist/index.js.map +1 -1
  244. package/dist/lake/pattern-shard-store.d.ts +6 -0
  245. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  246. package/dist/lake/pattern-shard-store.js +6 -0
  247. package/dist/lake/pattern-shard-store.js.map +1 -1
  248. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  249. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  250. package/dist/module-coupling/coupling-analyzer.js +668 -0
  251. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  252. package/dist/module-coupling/index.d.ts +9 -0
  253. package/dist/module-coupling/index.d.ts.map +1 -0
  254. package/dist/module-coupling/index.js +9 -0
  255. package/dist/module-coupling/index.js.map +1 -0
  256. package/dist/module-coupling/types.d.ts +273 -0
  257. package/dist/module-coupling/types.d.ts.map +1 -0
  258. package/dist/module-coupling/types.js +8 -0
  259. package/dist/module-coupling/types.js.map +1 -0
  260. package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
  261. package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
  262. package/dist/parsers/tree-sitter/go-loader.js +161 -0
  263. package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
  264. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
  265. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
  266. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
  267. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
  268. package/dist/parsers/types.d.ts +1 -1
  269. package/dist/parsers/types.d.ts.map +1 -1
  270. package/dist/patterns/adapters/index.d.ts +11 -0
  271. package/dist/patterns/adapters/index.d.ts.map +1 -0
  272. package/dist/patterns/adapters/index.js +11 -0
  273. package/dist/patterns/adapters/index.js.map +1 -0
  274. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  275. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  276. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  277. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  278. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  279. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  280. package/dist/patterns/adapters/service-factory.js +144 -0
  281. package/dist/patterns/adapters/service-factory.js.map +1 -0
  282. package/dist/patterns/errors.d.ts +32 -0
  283. package/dist/patterns/errors.d.ts.map +1 -0
  284. package/dist/patterns/errors.js +45 -0
  285. package/dist/patterns/errors.js.map +1 -0
  286. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  287. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  288. package/dist/patterns/impl/cached-repository.js +296 -0
  289. package/dist/patterns/impl/cached-repository.js.map +1 -0
  290. package/dist/patterns/impl/file-repository.d.ts +75 -0
  291. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  292. package/dist/patterns/impl/file-repository.js +507 -0
  293. package/dist/patterns/impl/file-repository.js.map +1 -0
  294. package/dist/patterns/impl/index.d.ts +16 -0
  295. package/dist/patterns/impl/index.d.ts.map +1 -0
  296. package/dist/patterns/impl/index.js +21 -0
  297. package/dist/patterns/impl/index.js.map +1 -0
  298. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  299. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  300. package/dist/patterns/impl/memory-repository.js +323 -0
  301. package/dist/patterns/impl/memory-repository.js.map +1 -0
  302. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  303. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  304. package/dist/patterns/impl/pattern-service.js +382 -0
  305. package/dist/patterns/impl/pattern-service.js.map +1 -0
  306. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  307. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  308. package/dist/patterns/impl/repository-factory.js +140 -0
  309. package/dist/patterns/impl/repository-factory.js.map +1 -0
  310. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  311. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  312. package/dist/patterns/impl/unified-file-repository.js +677 -0
  313. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  314. package/dist/patterns/index.d.ts +23 -0
  315. package/dist/patterns/index.d.ts.map +1 -0
  316. package/dist/patterns/index.js +41 -0
  317. package/dist/patterns/index.js.map +1 -0
  318. package/dist/patterns/repository.d.ts +241 -0
  319. package/dist/patterns/repository.d.ts.map +1 -0
  320. package/dist/patterns/repository.js +23 -0
  321. package/dist/patterns/repository.js.map +1 -0
  322. package/dist/patterns/service.d.ts +245 -0
  323. package/dist/patterns/service.d.ts.map +1 -0
  324. package/dist/patterns/service.js +25 -0
  325. package/dist/patterns/service.js.map +1 -0
  326. package/dist/patterns/types.d.ts +227 -0
  327. package/dist/patterns/types.d.ts.map +1 -0
  328. package/dist/patterns/types.js +117 -0
  329. package/dist/patterns/types.js.map +1 -0
  330. package/dist/simulation/approach-generator.d.ts +73 -0
  331. package/dist/simulation/approach-generator.d.ts.map +1 -0
  332. package/dist/simulation/approach-generator.js +371 -0
  333. package/dist/simulation/approach-generator.js.map +1 -0
  334. package/dist/simulation/index.d.ts +14 -0
  335. package/dist/simulation/index.d.ts.map +1 -0
  336. package/dist/simulation/index.js +19 -0
  337. package/dist/simulation/index.js.map +1 -0
  338. package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
  339. package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
  340. package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
  341. package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
  342. package/dist/simulation/language-strategies/index.d.ts +41 -0
  343. package/dist/simulation/language-strategies/index.d.ts.map +1 -0
  344. package/dist/simulation/language-strategies/index.js +92 -0
  345. package/dist/simulation/language-strategies/index.js.map +1 -0
  346. package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
  347. package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
  348. package/dist/simulation/language-strategies/java-strategies.js +119 -0
  349. package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
  350. package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
  351. package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
  352. package/dist/simulation/language-strategies/php-strategies.js +129 -0
  353. package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
  354. package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
  355. package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
  356. package/dist/simulation/language-strategies/python-strategies.js +208 -0
  357. package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
  358. package/dist/simulation/language-strategies/types.d.ts +67 -0
  359. package/dist/simulation/language-strategies/types.d.ts.map +1 -0
  360. package/dist/simulation/language-strategies/types.js +23 -0
  361. package/dist/simulation/language-strategies/types.js.map +1 -0
  362. package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
  363. package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
  364. package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
  365. package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
  366. package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
  367. package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
  368. package/dist/simulation/scorers/friction-scorer.js +336 -0
  369. package/dist/simulation/scorers/friction-scorer.js.map +1 -0
  370. package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
  371. package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
  372. package/dist/simulation/scorers/impact-scorer.js +273 -0
  373. package/dist/simulation/scorers/impact-scorer.js.map +1 -0
  374. package/dist/simulation/scorers/index.d.ts +12 -0
  375. package/dist/simulation/scorers/index.d.ts.map +1 -0
  376. package/dist/simulation/scorers/index.js +12 -0
  377. package/dist/simulation/scorers/index.js.map +1 -0
  378. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
  379. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
  380. package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
  381. package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
  382. package/dist/simulation/scorers/security-scorer.d.ts +63 -0
  383. package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
  384. package/dist/simulation/scorers/security-scorer.js +346 -0
  385. package/dist/simulation/scorers/security-scorer.js.map +1 -0
  386. package/dist/simulation/simulation-engine.d.ts +89 -0
  387. package/dist/simulation/simulation-engine.d.ts.map +1 -0
  388. package/dist/simulation/simulation-engine.js +480 -0
  389. package/dist/simulation/simulation-engine.js.map +1 -0
  390. package/dist/simulation/types.d.ts +200 -0
  391. package/dist/simulation/types.d.ts.map +1 -0
  392. package/dist/simulation/types.js +23 -0
  393. package/dist/simulation/types.js.map +1 -0
  394. package/dist/speculative/approach-generator.d.ts +2 -0
  395. package/dist/speculative/approach-generator.d.ts.map +1 -0
  396. package/dist/speculative/approach-generator.js +2 -0
  397. package/dist/speculative/approach-generator.js.map +1 -0
  398. package/dist/speculative/templates/types.d.ts +133 -0
  399. package/dist/speculative/templates/types.d.ts.map +1 -0
  400. package/dist/speculative/templates/types.js +208 -0
  401. package/dist/speculative/templates/types.js.map +1 -0
  402. package/dist/speculative/types.d.ts +523 -0
  403. package/dist/speculative/types.d.ts.map +1 -0
  404. package/dist/speculative/types.js +71 -0
  405. package/dist/speculative/types.js.map +1 -0
  406. package/dist/store/pattern-store.d.ts +6 -0
  407. package/dist/store/pattern-store.d.ts.map +1 -1
  408. package/dist/store/pattern-store.js +6 -0
  409. package/dist/store/pattern-store.js.map +1 -1
  410. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  411. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  412. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  413. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  414. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  415. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  416. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  417. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  418. package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
  419. package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
  420. package/dist/test-topology/extractors/go-test-extractor.js +436 -0
  421. package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
  422. package/dist/test-topology/extractors/index.d.ts +13 -0
  423. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  424. package/dist/test-topology/extractors/index.js +13 -0
  425. package/dist/test-topology/extractors/index.js.map +1 -0
  426. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  427. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  428. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  429. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  430. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  431. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  432. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  433. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  434. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  435. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  436. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  437. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  438. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  439. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  440. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  441. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  442. package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
  443. package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
  444. package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
  445. package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
  446. package/dist/test-topology/extractors/regex/index.d.ts +19 -0
  447. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  448. package/dist/test-topology/extractors/regex/index.js +47 -0
  449. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  450. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  451. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  452. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  453. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  454. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  455. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  456. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  457. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  458. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  459. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  460. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  461. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  462. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  463. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  464. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  465. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  466. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  467. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  468. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  469. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  470. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  471. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  472. package/dist/test-topology/hybrid-test-topology-analyzer.js +556 -0
  473. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  474. package/dist/test-topology/index.d.ts +16 -0
  475. package/dist/test-topology/index.d.ts.map +1 -0
  476. package/dist/test-topology/index.js +19 -0
  477. package/dist/test-topology/index.js.map +1 -0
  478. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  479. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  480. package/dist/test-topology/test-topology-analyzer.js +539 -0
  481. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  482. package/dist/test-topology/types.d.ts +300 -0
  483. package/dist/test-topology/types.d.ts.map +1 -0
  484. package/dist/test-topology/types.js +7 -0
  485. package/dist/test-topology/types.js.map +1 -0
  486. package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
  487. package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
  488. package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
  489. package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
  490. package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
  491. package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
  492. package/dist/unified-provider/matching/gorm-matcher.js +222 -0
  493. package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
  494. package/dist/unified-provider/matching/index.d.ts +3 -0
  495. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  496. package/dist/unified-provider/matching/index.js +4 -0
  497. package/dist/unified-provider/matching/index.js.map +1 -1
  498. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  499. package/dist/unified-provider/matching/matcher-registry.js +7 -0
  500. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  501. package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
  502. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
  503. package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
  504. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
  505. package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
  506. package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
  507. package/dist/unified-provider/normalization/go-normalizer.js +608 -0
  508. package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
  509. package/dist/unified-provider/normalization/index.d.ts +1 -0
  510. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  511. package/dist/unified-provider/normalization/index.js +6 -1
  512. package/dist/unified-provider/normalization/index.js.map +1 -1
  513. package/dist/unified-provider/types.d.ts +1 -1
  514. package/dist/unified-provider/types.d.ts.map +1 -1
  515. package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
  516. package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
  517. package/dist/wpf/extractors/binding-error-detector.js +290 -0
  518. package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
  519. package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
  520. package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
  521. package/dist/wpf/extractors/code-behind-linker.js +172 -0
  522. package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
  523. package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
  524. package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
  525. package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
  526. package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
  527. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
  528. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
  529. package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
  530. package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
  531. package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
  532. package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
  533. package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
  534. package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
  535. package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
  536. package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
  537. package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
  538. package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
  539. package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
  540. package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
  541. package/dist/wpf/extractors/value-converter-extractor.js +312 -0
  542. package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
  543. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
  544. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
  545. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
  546. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
  547. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
  548. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
  549. package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
  550. package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
  551. package/dist/wpf/index.d.ts +25 -0
  552. package/dist/wpf/index.d.ts.map +1 -0
  553. package/dist/wpf/index.js +31 -0
  554. package/dist/wpf/index.js.map +1 -0
  555. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
  556. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
  557. package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
  558. package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
  559. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
  560. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
  561. package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
  562. package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
  563. package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
  564. package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
  565. package/dist/wpf/linkers/datacontext-resolver.js +240 -0
  566. package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
  567. package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
  568. package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
  569. package/dist/wpf/linkers/viewmodel-linker.js +268 -0
  570. package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
  571. package/dist/wpf/types.d.ts +451 -0
  572. package/dist/wpf/types.d.ts.map +1 -0
  573. package/dist/wpf/types.js +8 -0
  574. package/dist/wpf/types.js.map +1 -0
  575. package/dist/wpf/wpf-analyzer.d.ts +114 -0
  576. package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
  577. package/dist/wpf/wpf-analyzer.js +332 -0
  578. package/dist/wpf/wpf-analyzer.js.map +1 -0
  579. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  580. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  581. package/dist/wrappers/clustering/clusterer.js +374 -0
  582. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  583. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  584. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  585. package/dist/wrappers/clustering/exclusions.js +318 -0
  586. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  587. package/dist/wrappers/clustering/index.d.ts +6 -0
  588. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  589. package/dist/wrappers/clustering/index.js +6 -0
  590. package/dist/wrappers/clustering/index.js.map +1 -0
  591. package/dist/wrappers/detection/detector.d.ts +69 -0
  592. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  593. package/dist/wrappers/detection/detector.js +279 -0
  594. package/dist/wrappers/detection/detector.js.map +1 -0
  595. package/dist/wrappers/detection/index.d.ts +5 -0
  596. package/dist/wrappers/detection/index.d.ts.map +1 -0
  597. package/dist/wrappers/detection/index.js +5 -0
  598. package/dist/wrappers/detection/index.js.map +1 -0
  599. package/dist/wrappers/export/index.d.ts +5 -0
  600. package/dist/wrappers/export/index.d.ts.map +1 -0
  601. package/dist/wrappers/export/index.js +5 -0
  602. package/dist/wrappers/export/index.js.map +1 -0
  603. package/dist/wrappers/export/json.d.ts +127 -0
  604. package/dist/wrappers/export/json.d.ts.map +1 -0
  605. package/dist/wrappers/export/json.js +160 -0
  606. package/dist/wrappers/export/json.js.map +1 -0
  607. package/dist/wrappers/index.d.ts +56 -0
  608. package/dist/wrappers/index.d.ts.map +1 -0
  609. package/dist/wrappers/index.js +159 -0
  610. package/dist/wrappers/index.js.map +1 -0
  611. package/dist/wrappers/integration/adapter.d.ts +52 -0
  612. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  613. package/dist/wrappers/integration/adapter.js +210 -0
  614. package/dist/wrappers/integration/adapter.js.map +1 -0
  615. package/dist/wrappers/integration/index.d.ts +9 -0
  616. package/dist/wrappers/integration/index.d.ts.map +1 -0
  617. package/dist/wrappers/integration/index.js +12 -0
  618. package/dist/wrappers/integration/index.js.map +1 -0
  619. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  620. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  621. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  622. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  623. package/dist/wrappers/integration/scanner.d.ts +85 -0
  624. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  625. package/dist/wrappers/integration/scanner.js +367 -0
  626. package/dist/wrappers/integration/scanner.js.map +1 -0
  627. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  628. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  629. package/dist/wrappers/primitives/discovery.js +389 -0
  630. package/dist/wrappers/primitives/discovery.js.map +1 -0
  631. package/dist/wrappers/primitives/index.d.ts +6 -0
  632. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  633. package/dist/wrappers/primitives/index.js +6 -0
  634. package/dist/wrappers/primitives/index.js.map +1 -0
  635. package/dist/wrappers/primitives/registry.d.ts +63 -0
  636. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  637. package/dist/wrappers/primitives/registry.js +447 -0
  638. package/dist/wrappers/primitives/registry.js.map +1 -0
  639. package/dist/wrappers/types.d.ts +137 -0
  640. package/dist/wrappers/types.d.ts.map +1 -0
  641. package/dist/wrappers/types.js +7 -0
  642. package/dist/wrappers/types.js.map +1 -0
  643. package/package.json +33 -18
  644. package/LICENSE +0 -21
@@ -0,0 +1,371 @@
1
+ /**
2
+ * Approach Generator
3
+ *
4
+ * Generates implementation approaches for a given task by:
5
+ * 1. Detecting the task category from the description
6
+ * 2. Detecting the project language and framework
7
+ * 3. Using language-specific strategies to generate approaches
8
+ * 4. Enriching approaches with target files from the codebase
9
+ *
10
+ * @module simulation/approach-generator
11
+ */
12
+ import * as fs from 'node:fs/promises';
13
+ import * as path from 'node:path';
14
+ import { getStrategyProvider, detectTaskCategory, detectFramework, } from './language-strategies/index.js';
15
+ // ============================================================================
16
+ // Language Detection Helpers
17
+ // ============================================================================
18
+ const LANGUAGE_EXTENSIONS = {
19
+ '.ts': 'typescript',
20
+ '.tsx': 'typescript',
21
+ '.js': 'javascript',
22
+ '.jsx': 'javascript',
23
+ '.py': 'python',
24
+ '.java': 'java',
25
+ '.cs': 'csharp',
26
+ '.php': 'php',
27
+ };
28
+ const FRAMEWORK_INDICATORS = {
29
+ 'package.json': { language: 'typescript', framework: 'node' },
30
+ 'tsconfig.json': { language: 'typescript', framework: 'node' },
31
+ 'requirements.txt': { language: 'python', framework: 'python' },
32
+ 'pyproject.toml': { language: 'python', framework: 'python' },
33
+ 'pom.xml': { language: 'java', framework: 'maven' },
34
+ 'build.gradle': { language: 'java', framework: 'gradle' },
35
+ 'composer.json': { language: 'php', framework: 'composer' },
36
+ '*.csproj': { language: 'csharp', framework: 'dotnet' },
37
+ };
38
+ // ============================================================================
39
+ // Approach Generator
40
+ // ============================================================================
41
+ /**
42
+ * Generates implementation approaches for a task
43
+ */
44
+ export class ApproachGenerator {
45
+ config;
46
+ constructor(config) {
47
+ this.config = config;
48
+ }
49
+ /**
50
+ * Generate approaches for a task
51
+ */
52
+ async generate(task, maxApproaches = 5) {
53
+ // Step 1: Detect category if not provided
54
+ const category = task.category || detectTaskCategory(task.description);
55
+ // Step 2: Detect language and framework from codebase
56
+ const { language, framework } = await this.detectLanguageAndFramework();
57
+ // Step 3: Get strategy provider for the language
58
+ const provider = getStrategyProvider(language);
59
+ if (!provider) {
60
+ return {
61
+ approaches: [this.createFallbackApproach(task, category, language)],
62
+ detectedLanguage: language,
63
+ detectedFramework: framework,
64
+ detectedCategory: category,
65
+ };
66
+ }
67
+ // Step 4: Get applicable strategies
68
+ const strategies = provider.getStrategies(category, framework ?? undefined);
69
+ // Step 5: Find relevant files from call graph
70
+ const relevantFiles = this.findRelevantFiles(task, category, language);
71
+ // Step 6: Find relevant patterns
72
+ const relevantPatterns = await this.findRelevantPatterns(category);
73
+ // Step 7: Generate approaches from strategies
74
+ const approaches = [];
75
+ for (const strategy of strategies.slice(0, maxApproaches)) {
76
+ const approach = this.createApproach(strategy, task, category, language, framework, relevantFiles, relevantPatterns);
77
+ approaches.push(approach);
78
+ }
79
+ // Step 8: Add a custom approach if we have room
80
+ if (approaches.length < maxApproaches && approaches.length > 0) {
81
+ approaches.push(this.createCustomApproach(task, category, language, relevantFiles));
82
+ }
83
+ return {
84
+ approaches,
85
+ detectedLanguage: language,
86
+ detectedFramework: framework,
87
+ detectedCategory: category,
88
+ };
89
+ }
90
+ // ==========================================================================
91
+ // Language & Framework Detection
92
+ // ==========================================================================
93
+ /**
94
+ * Detect the primary language and framework from the codebase
95
+ */
96
+ async detectLanguageAndFramework() {
97
+ // If we have a call graph, use its language distribution
98
+ if (this.config.callGraph) {
99
+ const langCounts = new Map();
100
+ for (const [, func] of this.config.callGraph.functions) {
101
+ const ext = path.extname(func.file);
102
+ const lang = LANGUAGE_EXTENSIONS[ext];
103
+ if (lang) {
104
+ langCounts.set(lang, (langCounts.get(lang) ?? 0) + 1);
105
+ }
106
+ }
107
+ // Find dominant language
108
+ let maxCount = 0;
109
+ let dominantLang = 'typescript';
110
+ for (const [lang, count] of langCounts) {
111
+ if (count > maxCount) {
112
+ maxCount = count;
113
+ dominantLang = lang;
114
+ }
115
+ }
116
+ // Try to detect framework from files
117
+ const framework = await this.detectFrameworkFromFiles(dominantLang);
118
+ return { language: dominantLang, framework };
119
+ }
120
+ // Fallback: scan project root for indicators
121
+ try {
122
+ const files = await fs.readdir(this.config.projectRoot);
123
+ for (const file of files) {
124
+ const indicator = FRAMEWORK_INDICATORS[file];
125
+ if (indicator) {
126
+ const framework = await this.detectFrameworkFromFiles(indicator.language);
127
+ return { language: indicator.language, framework };
128
+ }
129
+ }
130
+ }
131
+ catch {
132
+ // Ignore errors
133
+ }
134
+ return { language: 'typescript', framework: null };
135
+ }
136
+ /**
137
+ * Detect specific framework from file contents
138
+ */
139
+ async detectFrameworkFromFiles(language) {
140
+ const { projectRoot } = this.config;
141
+ try {
142
+ switch (language) {
143
+ case 'typescript':
144
+ case 'javascript': {
145
+ const pkgPath = path.join(projectRoot, 'package.json');
146
+ const content = await fs.readFile(pkgPath, 'utf-8');
147
+ return detectFramework(content, pkgPath, language);
148
+ }
149
+ case 'python': {
150
+ // Check for Django, FastAPI, Flask
151
+ const reqPath = path.join(projectRoot, 'requirements.txt');
152
+ try {
153
+ const content = await fs.readFile(reqPath, 'utf-8');
154
+ return detectFramework(content, reqPath, language);
155
+ }
156
+ catch {
157
+ // Try pyproject.toml
158
+ const pyprojectPath = path.join(projectRoot, 'pyproject.toml');
159
+ const content = await fs.readFile(pyprojectPath, 'utf-8');
160
+ return detectFramework(content, pyprojectPath, language);
161
+ }
162
+ }
163
+ case 'java': {
164
+ // Check for Spring Boot
165
+ const pomPath = path.join(projectRoot, 'pom.xml');
166
+ try {
167
+ const content = await fs.readFile(pomPath, 'utf-8');
168
+ return detectFramework(content, pomPath, language);
169
+ }
170
+ catch {
171
+ const gradlePath = path.join(projectRoot, 'build.gradle');
172
+ const content = await fs.readFile(gradlePath, 'utf-8');
173
+ return detectFramework(content, gradlePath, language);
174
+ }
175
+ }
176
+ case 'csharp': {
177
+ // Check for ASP.NET Core
178
+ const files = await fs.readdir(projectRoot);
179
+ const csproj = files.find(f => f.endsWith('.csproj'));
180
+ if (csproj) {
181
+ const content = await fs.readFile(path.join(projectRoot, csproj), 'utf-8');
182
+ return detectFramework(content, csproj, language);
183
+ }
184
+ break;
185
+ }
186
+ case 'php': {
187
+ // Check for Laravel
188
+ const composerPath = path.join(projectRoot, 'composer.json');
189
+ const content = await fs.readFile(composerPath, 'utf-8');
190
+ return detectFramework(content, composerPath, language);
191
+ }
192
+ }
193
+ }
194
+ catch {
195
+ // Ignore errors
196
+ }
197
+ return null;
198
+ }
199
+ // ==========================================================================
200
+ // File Discovery
201
+ // ==========================================================================
202
+ /**
203
+ * Find relevant files for the task from the call graph
204
+ */
205
+ findRelevantFiles(task, category, _language) {
206
+ const files = [];
207
+ if (!this.config.callGraph) {
208
+ return files;
209
+ }
210
+ // If task has a specific target, find files related to it
211
+ if (task.target) {
212
+ for (const [, func] of this.config.callGraph.functions) {
213
+ if (func.file.includes(task.target) ||
214
+ func.name.toLowerCase().includes(task.target.toLowerCase()) ||
215
+ func.qualifiedName.toLowerCase().includes(task.target.toLowerCase())) {
216
+ if (!files.includes(func.file)) {
217
+ files.push(func.file);
218
+ }
219
+ }
220
+ }
221
+ }
222
+ // Find files by category keywords
223
+ const categoryKeywords = this.getCategoryKeywords(category);
224
+ for (const [, func] of this.config.callGraph.functions) {
225
+ const funcText = `${func.file} ${func.name} ${func.qualifiedName}`.toLowerCase();
226
+ for (const keyword of categoryKeywords) {
227
+ if (funcText.includes(keyword) && !files.includes(func.file)) {
228
+ files.push(func.file);
229
+ break;
230
+ }
231
+ }
232
+ }
233
+ // Limit to reasonable number
234
+ return files.slice(0, 20);
235
+ }
236
+ /**
237
+ * Get keywords for a category
238
+ */
239
+ getCategoryKeywords(category) {
240
+ const keywords = {
241
+ 'rate-limiting': ['rate', 'limit', 'throttle', 'quota'],
242
+ 'authentication': ['auth', 'login', 'session', 'token', 'jwt'],
243
+ 'authorization': ['permission', 'role', 'access', 'policy', 'guard'],
244
+ 'api-endpoint': ['route', 'endpoint', 'controller', 'handler', 'api'],
245
+ 'data-access': ['repository', 'dao', 'model', 'entity', 'query'],
246
+ 'error-handling': ['error', 'exception', 'catch', 'handler'],
247
+ 'caching': ['cache', 'redis', 'memcache', 'store'],
248
+ 'logging': ['log', 'logger', 'trace', 'debug'],
249
+ 'testing': ['test', 'spec', 'mock', 'stub'],
250
+ 'validation': ['valid', 'schema', 'sanitize', 'check'],
251
+ 'middleware': ['middleware', 'interceptor', 'filter', 'pipe'],
252
+ 'refactoring': [],
253
+ 'generic': [],
254
+ };
255
+ return keywords[category] ?? [];
256
+ }
257
+ // ==========================================================================
258
+ // Pattern Discovery
259
+ // ==========================================================================
260
+ /**
261
+ * Find relevant patterns for the category
262
+ */
263
+ async findRelevantPatterns(category) {
264
+ if (!this.config.patternService) {
265
+ return [];
266
+ }
267
+ try {
268
+ const result = await this.config.patternService.listByCategory(category, {
269
+ limit: 10,
270
+ });
271
+ return result.items.map(p => p.id);
272
+ }
273
+ catch {
274
+ return [];
275
+ }
276
+ }
277
+ // ==========================================================================
278
+ // Approach Creation
279
+ // ==========================================================================
280
+ /**
281
+ * Create an approach from a strategy template
282
+ */
283
+ createApproach(strategy, _task, _category, language, framework, relevantFiles, relevantPatterns) {
284
+ const id = `${strategy.strategy}-${language}-${Date.now()}`;
285
+ // Estimate lines based on strategy complexity
286
+ const complexityMultiplier = {
287
+ middleware: 1.2,
288
+ decorator: 0.8,
289
+ wrapper: 1.0,
290
+ 'per-route': 1.5,
291
+ 'per-function': 1.8,
292
+ centralized: 0.7,
293
+ distributed: 1.5,
294
+ aspect: 0.9,
295
+ filter: 1.0,
296
+ interceptor: 1.1,
297
+ guard: 0.9,
298
+ policy: 1.0,
299
+ dependency: 0.8,
300
+ mixin: 0.7,
301
+ custom: 1.3,
302
+ };
303
+ const baseLines = 50;
304
+ const multiplier = complexityMultiplier[strategy.strategy] ?? 1.0;
305
+ const estimatedLines = Math.round(baseLines * multiplier);
306
+ const approach = {
307
+ id,
308
+ name: strategy.name,
309
+ description: strategy.description,
310
+ strategy: strategy.strategy,
311
+ language,
312
+ targetFiles: relevantFiles.slice(0, 5),
313
+ followsPatterns: relevantPatterns.slice(0, 3),
314
+ estimatedLinesAdded: estimatedLines,
315
+ estimatedLinesModified: Math.round(relevantFiles.length * 5),
316
+ };
317
+ if (framework) {
318
+ approach.framework = framework;
319
+ }
320
+ if (strategy.newFiles) {
321
+ approach.newFiles = strategy.newFiles;
322
+ }
323
+ if (strategy.template) {
324
+ approach.template = strategy.template;
325
+ }
326
+ if (strategy.frameworkNotes) {
327
+ approach.frameworkNotes = strategy.frameworkNotes;
328
+ }
329
+ return approach;
330
+ }
331
+ /**
332
+ * Create a custom/hybrid approach
333
+ */
334
+ createCustomApproach(task, _category, language, relevantFiles) {
335
+ return {
336
+ id: `custom-${language}-${Date.now()}`,
337
+ name: 'Custom Implementation',
338
+ description: `A custom implementation tailored to the specific requirements of: ${task.description}`,
339
+ strategy: 'custom',
340
+ language,
341
+ targetFiles: relevantFiles.slice(0, 3),
342
+ estimatedLinesAdded: 80,
343
+ estimatedLinesModified: Math.round(relevantFiles.length * 8),
344
+ };
345
+ }
346
+ /**
347
+ * Create a fallback approach when no strategies are available
348
+ */
349
+ createFallbackApproach(_task, category, language) {
350
+ return {
351
+ id: `fallback-${language}-${Date.now()}`,
352
+ name: 'Generic Implementation',
353
+ description: `A generic implementation for ${category} in ${language}. No specific framework strategies available.`,
354
+ strategy: 'custom',
355
+ language,
356
+ targetFiles: [],
357
+ estimatedLinesAdded: 100,
358
+ estimatedLinesModified: 20,
359
+ };
360
+ }
361
+ }
362
+ // ============================================================================
363
+ // Factory Function
364
+ // ============================================================================
365
+ /**
366
+ * Create an approach generator
367
+ */
368
+ export function createApproachGenerator(config) {
369
+ return new ApproachGenerator(config);
370
+ }
371
+ //# sourceMappingURL=approach-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approach-generator.js","sourceRoot":"","sources":["../../src/simulation/approach-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAQlC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAEhB,MAAM,gCAAgC,CAAC;AAmBxC,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,MAAM,mBAAmB,GAAsC;IAC7D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ACJ,CAAC;IAED;;OAEG;IACK,sBAAsB,CAC5B,KAAqB,EACrB,QAAsB,EACtB,QAA2B;QAE3B,OAAO;YACL,EAAE,EAAE,YAAY,QAAQ,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE;YACxC,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EAAE,gCAAgC,QAAQ,OAAO,QAAQ,+CAA+C;YACnH,QAAQ,EAAE,QAAQ;YAClB,QAAQ;YACR,WAAW,EAAE,EAAE;YACf,mBAAmB,EAAE,GAAG;YACxB,sBAAsB,EAAE,EAAE;SAC3B,CAAC;IACJ,CAAC;CACF;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAA+B;IACrE,OAAO,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Speculative Execution Engine
3
+ *
4
+ * Simulates multiple implementation approaches BEFORE code generation,
5
+ * scoring them by friction, impact, and pattern alignment.
6
+ *
7
+ * @module simulation
8
+ */
9
+ export * from './types.js';
10
+ export * from './language-strategies/index.js';
11
+ export { ApproachGenerator, createApproachGenerator, type ApproachGeneratorConfig, type GeneratedApproaches, } from './approach-generator.js';
12
+ export * from './scorers/index.js';
13
+ export { SimulationEngine, createSimulationEngine, type SimulationEngineConfig, } from './simulation-engine.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,gCAAgC,CAAC;AAG/C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Speculative Execution Engine
3
+ *
4
+ * Simulates multiple implementation approaches BEFORE code generation,
5
+ * scoring them by friction, impact, and pattern alignment.
6
+ *
7
+ * @module simulation
8
+ */
9
+ // Types
10
+ export * from './types.js';
11
+ // Language Strategies
12
+ export * from './language-strategies/index.js';
13
+ // Approach Generator
14
+ export { ApproachGenerator, createApproachGenerator, } from './approach-generator.js';
15
+ // Scorers
16
+ export * from './scorers/index.js';
17
+ // Simulation Engine
18
+ export { SimulationEngine, createSimulationEngine, } from './simulation-engine.js';
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simulation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,sBAAsB;AACtB,cAAc,gCAAgC,CAAC;AAE/C,qBAAqB;AACrB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GAGxB,MAAM,yBAAyB,CAAC;AAEjC,UAAU;AACV,cAAc,oBAAoB,CAAC;AAEnC,oBAAoB;AACpB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GAEvB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * C# Language Strategies
3
+ *
4
+ * Strategies for ASP.NET Core framework.
5
+ *
6
+ * @module simulation/language-strategies/csharp-strategies
7
+ */
8
+ import type { TaskCategory } from '../types.js';
9
+ import type { FrameworkDefinition, LanguageStrategyProvider, StrategyTemplate } from './types.js';
10
+ export declare class CSharpStrategyProvider implements LanguageStrategyProvider {
11
+ readonly language: "csharp";
12
+ readonly frameworks: FrameworkDefinition[];
13
+ getStrategies(category: TaskCategory, framework?: string): StrategyTemplate[];
14
+ detectFramework(content: string, _filePath: string): string | null;
15
+ }
16
+ export declare const csharpStrategyProvider: CSharpStrategyProvider;
17
+ //# sourceMappingURL=csharp-strategies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csharp-strategies.d.ts","sourceRoot":"","sources":["../../../src/simulation/language-strategies/csharp-strategies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAuFlG,qBAAa,sBAAuB,YAAW,wBAAwB;IACrE,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IACtC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,EAAE,CAAsB;IAEhE,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAa7E,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAenE;AAED,eAAO,MAAM,sBAAsB,wBAA+B,CAAC"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * C# Language Strategies
3
+ *
4
+ * Strategies for ASP.NET Core framework.
5
+ *
6
+ * @module simulation/language-strategies/csharp-strategies
7
+ */
8
+ // ============================================================================
9
+ // ASP.NET Core Strategies
10
+ // ============================================================================
11
+ const ASPNET_STRATEGIES = [
12
+ {
13
+ strategy: 'middleware',
14
+ name: 'ASP.NET Middleware',
15
+ description: 'Implement as ASP.NET Core middleware',
16
+ applicableCategories: ['logging', 'authentication', 'rate-limiting', 'error-handling'],
17
+ filePatterns: ['Middleware', 'Middlewares'],
18
+ pros: ['Pipeline pattern', 'Full request access', 'Standard pattern'],
19
+ cons: ['Order-dependent', 'Global by default'],
20
+ estimatedLines: 40,
21
+ template: `public class {{Name}}Middleware\n{\n private readonly RequestDelegate _next;\n public {{Name}}Middleware(RequestDelegate next) => _next = next;\n public async Task InvokeAsync(HttpContext context)\n {\n await _next(context);\n }\n}`,
22
+ },
23
+ {
24
+ strategy: 'filter',
25
+ name: 'Action Filter',
26
+ description: 'Implement as an MVC action filter',
27
+ applicableCategories: ['logging', 'authorization', 'validation', 'caching'],
28
+ filePatterns: ['Filters', 'Filter'],
29
+ pros: ['MVC-aware', 'Access to action context', 'Attribute-based'],
30
+ cons: ['Only for MVC actions'],
31
+ estimatedLines: 35,
32
+ template: `public class {{Name}}Filter : IActionFilter\n{\n public void OnActionExecuting(ActionExecutingContext context) { }\n public void OnActionExecuted(ActionExecutedContext context) { }\n}`,
33
+ },
34
+ {
35
+ strategy: 'decorator',
36
+ name: 'Custom Attribute',
37
+ description: 'Create a custom attribute for declarative behavior',
38
+ applicableCategories: ['authorization', 'caching', 'rate-limiting', 'validation'],
39
+ filePatterns: ['Attributes', 'Attribute'],
40
+ pros: ['Declarative', 'Self-documenting', 'Reusable'],
41
+ cons: ['Requires filter or middleware support'],
42
+ estimatedLines: 25,
43
+ template: `[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]\npublic class {{Name}}Attribute : Attribute\n{\n public string Value { get; set; }\n}`,
44
+ },
45
+ {
46
+ strategy: 'policy',
47
+ name: 'Authorization Policy',
48
+ description: 'Create an authorization policy with requirements',
49
+ applicableCategories: ['authorization'],
50
+ filePatterns: ['Authorization', 'Policies', 'Requirements'],
51
+ pros: ['Built-in pattern', 'Composable', 'Testable'],
52
+ cons: ['Only for authorization'],
53
+ estimatedLines: 50,
54
+ template: `public class {{Name}}Requirement : IAuthorizationRequirement { }\n\npublic class {{Name}}Handler : AuthorizationHandler<{{Name}}Requirement>\n{\n protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, {{Name}}Requirement requirement)\n {\n context.Succeed(requirement);\n return Task.CompletedTask;\n }\n}`,
55
+ },
56
+ {
57
+ strategy: 'centralized',
58
+ name: 'Service Class',
59
+ description: 'Create a dedicated service with DI',
60
+ applicableCategories: ['authentication', 'data-access', 'caching'],
61
+ filePatterns: ['Services', 'Service'],
62
+ pros: ['Clean architecture', 'DI-friendly', 'Testable'],
63
+ cons: ['Manual invocation'],
64
+ estimatedLines: 55,
65
+ template: `public interface I{{Name}}Service\n{\n Task ProcessAsync();\n}\n\npublic class {{Name}}Service : I{{Name}}Service\n{\n public async Task ProcessAsync() { }\n}`,
66
+ },
67
+ {
68
+ strategy: 'guard',
69
+ name: '[Authorize] Attribute',
70
+ description: 'Use built-in authorization attributes',
71
+ applicableCategories: ['authorization', 'authentication'],
72
+ filePatterns: ['Controllers', 'Controller'],
73
+ pros: ['Built-in', 'Simple', 'Policy-based'],
74
+ cons: ['Limited customization without policies'],
75
+ estimatedLines: 5,
76
+ template: `[Authorize(Policy = "{{Name}}")]\npublic IActionResult SecureAction() => Ok();`,
77
+ },
78
+ ];
79
+ const ASPNET_FRAMEWORK = {
80
+ name: 'aspnet',
81
+ language: 'csharp',
82
+ detectPatterns: ['WebApplication', 'IActionResult', '[ApiController]', '[HttpGet]', '[HttpPost]', 'ControllerBase'],
83
+ importPatterns: ['Microsoft.AspNetCore', 'using Microsoft.AspNetCore'],
84
+ strategies: ASPNET_STRATEGIES,
85
+ };
86
+ // ============================================================================
87
+ // C# Strategy Provider
88
+ // ============================================================================
89
+ export class CSharpStrategyProvider {
90
+ language = 'csharp';
91
+ frameworks = [ASPNET_FRAMEWORK];
92
+ getStrategies(category, framework) {
93
+ const fw = framework
94
+ ? this.frameworks.find(f => f.name === framework)
95
+ : this.frameworks[0];
96
+ if (!fw)
97
+ return [];
98
+ return fw.strategies.filter(s => s.applicableCategories.includes(category) ||
99
+ s.applicableCategories.includes('generic'));
100
+ }
101
+ detectFramework(content, _filePath) {
102
+ for (const fw of this.frameworks) {
103
+ for (const pattern of fw.importPatterns) {
104
+ if (content.includes(pattern)) {
105
+ return fw.name;
106
+ }
107
+ }
108
+ for (const pattern of fw.detectPatterns) {
109
+ if (content.includes(pattern)) {
110
+ return fw.name;
111
+ }
112
+ }
113
+ }
114
+ return null;
115
+ }
116
+ }
117
+ export const csharpStrategyProvider = new CSharpStrategyProvider();
118
+ //# sourceMappingURL=csharp-strategies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csharp-strategies.js","sourceRoot":"","sources":["../../../src/simulation/language-strategies/csharp-strategies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,MAAM,iBAAiB,GAAuB;IAC5C;QACE,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,sCAAsC;QACnD,oBAAoB,EAAE,CAAC,SAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,CAAC;QACtF,YAAY,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QAC3C,IAAI,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;QACrE,IAAI,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;QAC9C,cAAc,EAAE,EAAE;QAClB,QAAQ,EAAE,+PAA+P;KAC1Q;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,mCAAmC;QAChD,oBAAoB,EAAE,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,CAAC;QAC3E,YAAY,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;QACnC,IAAI,EAAE,CAAC,WAAW,EAAE,0BAA0B,EAAE,iBAAiB,CAAC;QAClE,IAAI,EAAE,CAAC,sBAAsB,CAAC;QAC9B,cAAc,EAAE,EAAE;QAClB,QAAQ,EAAE,+LAA+L;KAC1M;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,oDAAoD;QACjE,oBAAoB,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,CAAC;QACjF,YAAY,EAAE,CAAC,YAAY,EAAE,WA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,EAAE,CAAC,cAAc,EAAE,CAAC;gBACxC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC9B,OAAO,EAAE,CAAC,IAAI,CAAC;gBACjB,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Language Strategies Index
3
+ *
4
+ * Exports all language strategy providers and utilities.
5
+ *
6
+ * @module simulation/language-strategies
7
+ */
8
+ import type { CallGraphLanguage } from '../../call-graph/types.js';
9
+ import type { TaskCategory } from '../types.js';
10
+ import type { LanguageStrategyProvider, StrategyTemplate } from './types.js';
11
+ export * from './types.js';
12
+ export { typescriptStrategyProvider } from './typescript-strategies.js';
13
+ export { pythonStrategyProvider } from './python-strategies.js';
14
+ export { javaStrategyProvider } from './java-strategies.js';
15
+ export { csharpStrategyProvider } from './csharp-strategies.js';
16
+ export { phpStrategyProvider } from './php-strategies.js';
17
+ /**
18
+ * Get strategy provider for a language
19
+ */
20
+ export declare function getStrategyProvider(language: CallGraphLanguage): LanguageStrategyProvider | null;
21
+ /**
22
+ * Get strategies for a language and task category
23
+ */
24
+ export declare function getStrategiesForTask(language: CallGraphLanguage, category: TaskCategory, framework?: string): StrategyTemplate[];
25
+ /**
26
+ * Detect task category from description
27
+ */
28
+ export declare function detectTaskCategory(description: string): TaskCategory;
29
+ /**
30
+ * Detect framework from file content
31
+ */
32
+ export declare function detectFramework(content: string, filePath: string, language: CallGraphLanguage): string | null;
33
+ /**
34
+ * Get all supported languages
35
+ */
36
+ export declare function getSupportedLanguages(): CallGraphLanguage[];
37
+ /**
38
+ * Get all frameworks for a language
39
+ */
40
+ export declare function getFrameworksForLanguage(language: CallGraphLanguage): string[];
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simulation/language-strategies/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAU7E,cAAc,YAAY,CAAC;AAG3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAW1D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,wBAAwB,GAAG,IAAI,CAEhG;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,gBAAgB,EAAE,CAIpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAuBpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,iBAAiB,GAC1B,MAAM,GAAG,IAAI,CAIf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,iBAAiB,EAAE,CAE3D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAI9E"}