aspectcode 0.2.2 → 0.3.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 (311) hide show
  1. package/dist/cli.d.ts +15 -47
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +18 -17
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +14 -24
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +5 -60
  8. package/dist/config.js.map +1 -1
  9. package/dist/kbBuilder.d.ts +14 -0
  10. package/dist/kbBuilder.d.ts.map +1 -0
  11. package/dist/kbBuilder.js +106 -0
  12. package/dist/kbBuilder.js.map +1 -0
  13. package/dist/main.d.ts +4 -5
  14. package/dist/main.d.ts.map +1 -1
  15. package/dist/main.js +45 -124
  16. package/dist/main.js.map +1 -1
  17. package/dist/optimize.d.ts +14 -0
  18. package/dist/optimize.d.ts.map +1 -0
  19. package/dist/optimize.js +131 -0
  20. package/dist/optimize.js.map +1 -0
  21. package/dist/pipeline.d.ts +15 -0
  22. package/dist/pipeline.d.ts.map +1 -0
  23. package/dist/pipeline.js +212 -0
  24. package/dist/pipeline.js.map +1 -0
  25. package/dist/toolIngestion.d.ts +15 -0
  26. package/dist/toolIngestion.d.ts.map +1 -0
  27. package/dist/toolIngestion.js +47 -0
  28. package/dist/toolIngestion.js.map +1 -0
  29. package/dist/writer.d.ts +17 -0
  30. package/dist/writer.d.ts.map +1 -0
  31. package/dist/writer.js +26 -0
  32. package/dist/writer.js.map +1 -0
  33. package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts +34 -0
  34. package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts.map +1 -0
  35. package/node_modules/@aspectcode/core/dist/analysis/analyzer.js +240 -0
  36. package/node_modules/@aspectcode/core/dist/analysis/analyzer.js.map +1 -0
  37. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts +32 -0
  38. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts.map +1 -0
  39. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js +133 -0
  40. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js.map +1 -0
  41. package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts +30 -0
  42. package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts.map +1 -0
  43. package/node_modules/@aspectcode/core/dist/analysis/importParsers.js +92 -0
  44. package/node_modules/@aspectcode/core/dist/analysis/importParsers.js.map +1 -0
  45. package/node_modules/@aspectcode/core/dist/analysis/index.d.ts +9 -0
  46. package/node_modules/@aspectcode/core/dist/analysis/index.d.ts.map +1 -0
  47. package/node_modules/@aspectcode/core/dist/analysis/index.js +9 -0
  48. package/node_modules/@aspectcode/core/dist/analysis/index.js.map +1 -0
  49. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts +34 -0
  50. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts.map +1 -0
  51. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js +240 -0
  52. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js.map +1 -0
  53. package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts +33 -0
  54. package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts.map +1 -0
  55. package/node_modules/@aspectcode/core/dist/analysis/repo.js +246 -0
  56. package/node_modules/@aspectcode/core/dist/analysis/repo.js.map +1 -0
  57. package/node_modules/@aspectcode/core/dist/classifiers.d.ts +24 -0
  58. package/node_modules/@aspectcode/core/dist/classifiers.d.ts.map +1 -0
  59. package/node_modules/@aspectcode/core/dist/classifiers.js +119 -0
  60. package/node_modules/@aspectcode/core/dist/classifiers.js.map +1 -0
  61. package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts +26 -0
  62. package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts.map +1 -0
  63. package/node_modules/@aspectcode/core/dist/fs/exclusions.js +130 -0
  64. package/node_modules/@aspectcode/core/dist/fs/exclusions.js.map +1 -0
  65. package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts +42 -0
  66. package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts.map +1 -0
  67. package/node_modules/@aspectcode/core/dist/fs/fingerprint.js +125 -0
  68. package/node_modules/@aspectcode/core/dist/fs/fingerprint.js.map +1 -0
  69. package/node_modules/@aspectcode/core/dist/fs/index.d.ts +9 -0
  70. package/node_modules/@aspectcode/core/dist/fs/index.d.ts.map +1 -0
  71. package/node_modules/@aspectcode/core/dist/fs/index.js +26 -0
  72. package/node_modules/@aspectcode/core/dist/fs/index.js.map +1 -0
  73. package/node_modules/@aspectcode/core/dist/fs/walker.d.ts +23 -0
  74. package/node_modules/@aspectcode/core/dist/fs/walker.d.ts.map +1 -0
  75. package/node_modules/@aspectcode/core/dist/fs/walker.js +94 -0
  76. package/node_modules/@aspectcode/core/dist/fs/walker.js.map +1 -0
  77. package/node_modules/@aspectcode/core/dist/host.d.ts +38 -0
  78. package/node_modules/@aspectcode/core/dist/host.d.ts.map +1 -0
  79. package/node_modules/@aspectcode/core/dist/host.js +110 -0
  80. package/node_modules/@aspectcode/core/dist/host.js.map +1 -0
  81. package/node_modules/@aspectcode/core/dist/index.d.ts +23 -0
  82. package/node_modules/@aspectcode/core/dist/index.d.ts.map +1 -0
  83. package/node_modules/@aspectcode/core/dist/index.js +59 -0
  84. package/node_modules/@aspectcode/core/dist/index.js.map +1 -0
  85. package/node_modules/@aspectcode/core/dist/model.d.ts +90 -0
  86. package/node_modules/@aspectcode/core/dist/model.d.ts.map +1 -0
  87. package/node_modules/@aspectcode/core/dist/model.js +9 -0
  88. package/node_modules/@aspectcode/core/dist/model.js.map +1 -0
  89. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts +17 -0
  90. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts.map +1 -0
  91. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js +225 -0
  92. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js.map +1 -0
  93. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts +30 -0
  94. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts.map +1 -0
  95. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js +71 -0
  96. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js.map +1 -0
  97. package/node_modules/@aspectcode/core/dist/parsers/index.d.ts +13 -0
  98. package/node_modules/@aspectcode/core/dist/parsers/index.d.ts.map +1 -0
  99. package/node_modules/@aspectcode/core/dist/parsers/index.js +32 -0
  100. package/node_modules/@aspectcode/core/dist/parsers/index.js.map +1 -0
  101. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts +17 -0
  102. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts.map +1 -0
  103. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js +182 -0
  104. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js.map +1 -0
  105. package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts +44 -0
  106. package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts.map +1 -0
  107. package/node_modules/@aspectcode/core/dist/parsers/languages.js +64 -0
  108. package/node_modules/@aspectcode/core/dist/parsers/languages.js.map +1 -0
  109. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts +18 -0
  110. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts.map +1 -0
  111. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js +139 -0
  112. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js.map +1 -0
  113. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts +22 -0
  114. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts.map +1 -0
  115. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js +240 -0
  116. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js.map +1 -0
  117. package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts +7 -0
  118. package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts.map +1 -0
  119. package/node_modules/@aspectcode/core/dist/parsers/utils.js +11 -0
  120. package/node_modules/@aspectcode/core/dist/parsers/utils.js.map +1 -0
  121. package/node_modules/@aspectcode/core/dist/paths.d.ts +27 -0
  122. package/node_modules/@aspectcode/core/dist/paths.d.ts.map +1 -0
  123. package/node_modules/@aspectcode/core/dist/paths.js +45 -0
  124. package/node_modules/@aspectcode/core/dist/paths.js.map +1 -0
  125. package/node_modules/@aspectcode/core/dist/stats.d.ts +41 -0
  126. package/node_modules/@aspectcode/core/dist/stats.d.ts.map +1 -0
  127. package/node_modules/@aspectcode/core/dist/stats.js +88 -0
  128. package/node_modules/@aspectcode/core/dist/stats.js.map +1 -0
  129. package/node_modules/@aspectcode/core/package.json +41 -0
  130. package/node_modules/@aspectcode/core/parsers/c_sharp.wasm +0 -0
  131. package/node_modules/@aspectcode/core/parsers/java.wasm +0 -0
  132. package/node_modules/@aspectcode/core/parsers/javascript.wasm +0 -0
  133. package/node_modules/@aspectcode/core/parsers/python.wasm +0 -0
  134. package/node_modules/@aspectcode/core/parsers/tree-sitter.wasm +0 -0
  135. package/node_modules/@aspectcode/core/parsers/tsx.wasm +0 -0
  136. package/node_modules/@aspectcode/core/parsers/typescript.wasm +0 -0
  137. package/node_modules/@aspectcode/emitters/dist/emitter.d.ts +72 -0
  138. package/node_modules/@aspectcode/emitters/dist/emitter.d.ts.map +1 -0
  139. package/node_modules/@aspectcode/emitters/dist/emitter.js +10 -0
  140. package/node_modules/@aspectcode/emitters/dist/emitter.js.map +1 -0
  141. package/node_modules/@aspectcode/emitters/dist/host.d.ts +31 -0
  142. package/node_modules/@aspectcode/emitters/dist/host.d.ts.map +1 -0
  143. package/node_modules/@aspectcode/emitters/dist/host.js +86 -0
  144. package/node_modules/@aspectcode/emitters/dist/host.js.map +1 -0
  145. package/node_modules/@aspectcode/emitters/dist/index.d.ts +27 -0
  146. package/node_modules/@aspectcode/emitters/dist/index.d.ts.map +1 -0
  147. package/node_modules/@aspectcode/emitters/dist/index.js +116 -0
  148. package/node_modules/@aspectcode/emitters/dist/index.js.map +1 -0
  149. package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts +15 -0
  150. package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts.map +1 -0
  151. package/node_modules/@aspectcode/emitters/dist/instructions/content.js +289 -0
  152. package/node_modules/@aspectcode/emitters/dist/instructions/content.js.map +1 -0
  153. package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts +13 -0
  154. package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts.map +1 -0
  155. package/node_modules/@aspectcode/emitters/dist/instructions/detection.js +55 -0
  156. package/node_modules/@aspectcode/emitters/dist/instructions/detection.js.map +1 -0
  157. package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts +17 -0
  158. package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts.map +1 -0
  159. package/node_modules/@aspectcode/emitters/dist/instructions/formats.js +23 -0
  160. package/node_modules/@aspectcode/emitters/dist/instructions/formats.js.map +1 -0
  161. package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts +5 -0
  162. package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts.map +1 -0
  163. package/node_modules/@aspectcode/emitters/dist/instructions/index.js +12 -0
  164. package/node_modules/@aspectcode/emitters/dist/instructions/index.js.map +1 -0
  165. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts +9 -0
  166. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts.map +1 -0
  167. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js +30 -0
  168. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js.map +1 -0
  169. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts +64 -0
  170. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts.map +1 -0
  171. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js +504 -0
  172. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js.map +1 -0
  173. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts +24 -0
  174. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts.map +1 -0
  175. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js +238 -0
  176. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js.map +1 -0
  177. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts +8 -0
  178. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts.map +1 -0
  179. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js +14 -0
  180. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js.map +1 -0
  181. package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts +35 -0
  182. package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts.map +1 -0
  183. package/node_modules/@aspectcode/emitters/dist/kb/constants.js +38 -0
  184. package/node_modules/@aspectcode/emitters/dist/kb/constants.js.map +1 -0
  185. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts +20 -0
  186. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts.map +1 -0
  187. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js +155 -0
  188. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js.map +1 -0
  189. package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts +52 -0
  190. package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts.map +1 -0
  191. package/node_modules/@aspectcode/emitters/dist/kb/conventions.js +391 -0
  192. package/node_modules/@aspectcode/emitters/dist/kb/conventions.js.map +1 -0
  193. package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts +18 -0
  194. package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts.map +1 -0
  195. package/node_modules/@aspectcode/emitters/dist/kb/depData.js +31 -0
  196. package/node_modules/@aspectcode/emitters/dist/kb/depData.js.map +1 -0
  197. package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts +18 -0
  198. package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts.map +1 -0
  199. package/node_modules/@aspectcode/emitters/dist/kb/detectors.js +317 -0
  200. package/node_modules/@aspectcode/emitters/dist/kb/detectors.js.map +1 -0
  201. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts +33 -0
  202. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts.map +1 -0
  203. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js +323 -0
  204. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js.map +1 -0
  205. package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts +27 -0
  206. package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts.map +1 -0
  207. package/node_modules/@aspectcode/emitters/dist/kb/helpers.js +63 -0
  208. package/node_modules/@aspectcode/emitters/dist/kb/helpers.js.map +1 -0
  209. package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts +27 -0
  210. package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts.map +1 -0
  211. package/node_modules/@aspectcode/emitters/dist/kb/index.js +72 -0
  212. package/node_modules/@aspectcode/emitters/dist/kb/index.js.map +1 -0
  213. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts +21 -0
  214. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts.map +1 -0
  215. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js +125 -0
  216. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js.map +1 -0
  217. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts +26 -0
  218. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts.map +1 -0
  219. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js +255 -0
  220. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js.map +1 -0
  221. package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts +12 -0
  222. package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts.map +1 -0
  223. package/node_modules/@aspectcode/emitters/dist/kb/policy.js +29 -0
  224. package/node_modules/@aspectcode/emitters/dist/kb/policy.js.map +1 -0
  225. package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts +43 -0
  226. package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts.map +1 -0
  227. package/node_modules/@aspectcode/emitters/dist/kb/symbols.js +343 -0
  228. package/node_modules/@aspectcode/emitters/dist/kb/symbols.js.map +1 -0
  229. package/node_modules/@aspectcode/emitters/dist/manifest.d.ts +37 -0
  230. package/node_modules/@aspectcode/emitters/dist/manifest.d.ts.map +1 -0
  231. package/node_modules/@aspectcode/emitters/dist/manifest.js +50 -0
  232. package/node_modules/@aspectcode/emitters/dist/manifest.js.map +1 -0
  233. package/node_modules/@aspectcode/emitters/dist/report.d.ts +22 -0
  234. package/node_modules/@aspectcode/emitters/dist/report.d.ts.map +1 -0
  235. package/node_modules/@aspectcode/emitters/dist/report.js +3 -0
  236. package/node_modules/@aspectcode/emitters/dist/report.js.map +1 -0
  237. package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts +14 -0
  238. package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts.map +1 -0
  239. package/node_modules/@aspectcode/emitters/dist/stableJson.js +40 -0
  240. package/node_modules/@aspectcode/emitters/dist/stableJson.js.map +1 -0
  241. package/node_modules/@aspectcode/emitters/dist/transaction.d.ts +29 -0
  242. package/node_modules/@aspectcode/emitters/dist/transaction.d.ts.map +1 -0
  243. package/node_modules/@aspectcode/emitters/dist/transaction.js +104 -0
  244. package/node_modules/@aspectcode/emitters/dist/transaction.js.map +1 -0
  245. package/node_modules/@aspectcode/emitters/package.json +39 -0
  246. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts +18 -0
  247. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts.map +1 -0
  248. package/node_modules/@aspectcode/optimizer/dist/agent.js +123 -0
  249. package/node_modules/@aspectcode/optimizer/dist/agent.js.map +1 -0
  250. package/node_modules/@aspectcode/optimizer/dist/index.d.ts +15 -0
  251. package/node_modules/@aspectcode/optimizer/dist/index.d.ts.map +1 -0
  252. package/node_modules/@aspectcode/optimizer/dist/index.js +31 -0
  253. package/node_modules/@aspectcode/optimizer/dist/index.js.map +1 -0
  254. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts +39 -0
  255. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts.map +1 -0
  256. package/node_modules/@aspectcode/optimizer/dist/prompts.js +156 -0
  257. package/node_modules/@aspectcode/optimizer/dist/prompts.js.map +1 -0
  258. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts +20 -0
  259. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts.map +1 -0
  260. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js +126 -0
  261. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js.map +1 -0
  262. package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts +28 -0
  263. package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts.map +1 -0
  264. package/node_modules/@aspectcode/optimizer/dist/providers/index.js +142 -0
  265. package/node_modules/@aspectcode/optimizer/dist/providers/index.js.map +1 -0
  266. package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts +19 -0
  267. package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts.map +1 -0
  268. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js +98 -0
  269. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js.map +1 -0
  270. package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts +19 -0
  271. package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts.map +1 -0
  272. package/node_modules/@aspectcode/optimizer/dist/providers/retry.js +87 -0
  273. package/node_modules/@aspectcode/optimizer/dist/providers/retry.js.map +1 -0
  274. package/node_modules/@aspectcode/optimizer/dist/types.d.ts +93 -0
  275. package/node_modules/@aspectcode/optimizer/dist/types.d.ts.map +1 -0
  276. package/node_modules/@aspectcode/optimizer/dist/types.js +20 -0
  277. package/node_modules/@aspectcode/optimizer/dist/types.js.map +1 -0
  278. package/node_modules/@aspectcode/optimizer/package.json +41 -0
  279. package/node_modules/dotenv/CHANGELOG.md +520 -0
  280. package/node_modules/dotenv/LICENSE +23 -0
  281. package/node_modules/dotenv/README-es.md +411 -0
  282. package/node_modules/dotenv/README.md +645 -0
  283. package/node_modules/dotenv/SECURITY.md +1 -0
  284. package/node_modules/dotenv/config.d.ts +1 -0
  285. package/node_modules/dotenv/config.js +9 -0
  286. package/node_modules/dotenv/lib/cli-options.js +17 -0
  287. package/node_modules/dotenv/lib/env-options.js +28 -0
  288. package/node_modules/dotenv/lib/main.d.ts +162 -0
  289. package/node_modules/dotenv/lib/main.js +386 -0
  290. package/node_modules/dotenv/package.json +62 -0
  291. package/package.json +16 -4
  292. package/dist/commands/deps.d.ts +0 -11
  293. package/dist/commands/deps.d.ts.map +0 -1
  294. package/dist/commands/deps.js +0 -197
  295. package/dist/commands/deps.js.map +0 -1
  296. package/dist/commands/generate.d.ts +0 -8
  297. package/dist/commands/generate.d.ts.map +0 -1
  298. package/dist/commands/generate.js +0 -162
  299. package/dist/commands/generate.js.map +0 -1
  300. package/dist/commands/settings.d.ts +0 -9
  301. package/dist/commands/settings.d.ts.map +0 -1
  302. package/dist/commands/settings.js +0 -165
  303. package/dist/commands/settings.js.map +0 -1
  304. package/dist/commands/watch.d.ts +0 -6
  305. package/dist/commands/watch.d.ts.map +0 -1
  306. package/dist/commands/watch.js +0 -180
  307. package/dist/commands/watch.js.map +0 -1
  308. package/dist/connections.d.ts +0 -24
  309. package/dist/connections.d.ts.map +0 -1
  310. package/dist/connections.js +0 -89
  311. package/dist/connections.js.map +0 -1
@@ -0,0 +1,504 @@
1
+ "use strict";
2
+ /**
3
+ * Graph-analysis helpers for the KB emitter.
4
+ *
5
+ * Centrality scoring, dependency chains, module clusters,
6
+ * directory analysis, layer-flow detection, endpoint grouping.
7
+ *
8
+ * All functions are pure (no I/O, no vscode).
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.calculateCentralityScores = calculateCentralityScores;
12
+ exports.groupEndpointsByModule = groupEndpointsByModule;
13
+ exports.buildEntryPointFlows = buildEntryPointFlows;
14
+ exports.detectLayerFlows = detectLayerFlows;
15
+ exports.findDependencyChains = findDependencyChains;
16
+ exports.findModuleClusters = findModuleClusters;
17
+ exports.analyzeDirStructure = analyzeDirStructure;
18
+ exports.inferDirPurpose = inferDirPurpose;
19
+ exports.getSymbolCallers = getSymbolCallers;
20
+ const core_1 = require("@aspectcode/core");
21
+ const helpers_1 = require("./helpers");
22
+ const classifiers_1 = require("./classifiers");
23
+ // ── Centrality ───────────────────────────────────────────────
24
+ function calculateCentralityScores(allLinks) {
25
+ const scores = new Map();
26
+ const allFiles = new Set(allLinks.flatMap((l) => [l.source, l.target]));
27
+ for (const file of allFiles) {
28
+ const inDegree = allLinks.filter((l) => l.target === file && l.source !== file).length;
29
+ const outDegree = allLinks.filter((l) => l.source === file && l.target !== file).length;
30
+ const score = inDegree * 2 + outDegree;
31
+ scores.set(file, { inDegree, outDegree, score });
32
+ }
33
+ return scores;
34
+ }
35
+ // ── Endpoint grouping ────────────────────────────────────────
36
+ function groupEndpointsByModule(handlers, workspaceRoot) {
37
+ const groups = {};
38
+ for (const handler of handlers) {
39
+ const relPath = (0, helpers_1.makeRelativePath)(handler.file, workspaceRoot);
40
+ const parts = relPath.split(/[/\\]/);
41
+ let moduleName = getBasenameNoExt(handler.file);
42
+ const routeIdx = parts.findIndex((p) => p === 'routes' || p === 'api' || p === 'endpoints');
43
+ if (routeIdx >= 0 && routeIdx < parts.length - 1) {
44
+ const nextPart = parts[routeIdx + 1];
45
+ if (!nextPart.includes('.')) {
46
+ moduleName = nextPart;
47
+ }
48
+ }
49
+ moduleName = moduleName.charAt(0).toUpperCase() + moduleName.slice(1);
50
+ if (!groups[moduleName])
51
+ groups[moduleName] = [];
52
+ groups[moduleName].push(handler);
53
+ }
54
+ return Object.fromEntries(Object.entries(groups).sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0])));
55
+ }
56
+ // ── Entry-point flows ────────────────────────────────────────
57
+ /**
58
+ * Build call-chain flows starting from known entry points.
59
+ * Follows outgoing links 2 levels deep.
60
+ */
61
+ function buildEntryPointFlows(entryPoints, files, allLinks, workspaceRoot) {
62
+ const flows = [];
63
+ for (const entry of entryPoints.slice(0, 5)) {
64
+ const entryFile = files.find((f) => (0, helpers_1.makeRelativePath)(f, workspaceRoot) === entry.path);
65
+ if (!entryFile)
66
+ continue;
67
+ const chain = [];
68
+ chain.push(`→ ${entry.path} (${entry.reason})`);
69
+ const level1Links = allLinks
70
+ .filter((l) => l.source === entryFile)
71
+ .sort((a, b) => a.target.localeCompare(b.target))
72
+ .slice(0, 3);
73
+ for (const l1 of level1Links) {
74
+ const l1Name = (0, helpers_1.makeRelativePath)(l1.target, workspaceRoot);
75
+ const l1Symbols = l1.symbols.slice(0, 2).join(', ');
76
+ chain.push(` → ${l1Name}${l1Symbols ? ` (${l1Symbols})` : ''}`);
77
+ const level2Links = allLinks
78
+ .filter((l) => l.source === l1.target)
79
+ .sort((a, b) => a.target.localeCompare(b.target))
80
+ .slice(0, 2);
81
+ for (const l2 of level2Links) {
82
+ chain.push(` → ${(0, helpers_1.makeRelativePath)(l2.target, workspaceRoot)}`);
83
+ }
84
+ }
85
+ if (chain.length > 1)
86
+ flows.push({ title: entry.reason, chain });
87
+ }
88
+ return flows;
89
+ }
90
+ // ── Layer flows ──────────────────────────────────────────────
91
+ function detectLayerFlows(files, _allLinks, _workspaceRoot) {
92
+ const flows = [];
93
+ const lower = files.map((f) => f.toLowerCase());
94
+ const hasModels = lower.some((f) => f.includes('model'));
95
+ const hasServices = lower.some((f) => f.includes('service'));
96
+ const hasHandlers = lower.some((f) => f.includes('handler') || f.includes('controller'));
97
+ const hasApi = lower.some((f) => f.includes('/api/') || f.includes('route'));
98
+ if (hasApi && hasHandlers) {
99
+ flows.push({
100
+ name: 'API Request Flow',
101
+ flow: 'Client Request → Routes/API → Handlers/Controllers → Services → Models → Database',
102
+ });
103
+ }
104
+ if (hasModels && hasServices) {
105
+ flows.push({
106
+ name: 'Data Flow',
107
+ flow: 'Models (data) → Services (logic) → Handlers (HTTP) → Response',
108
+ });
109
+ }
110
+ const hasComponents = lower.some((f) => f.includes('component'));
111
+ const hasHooks = lower.some((f) => f.includes('hook') || f.includes('use'));
112
+ if (hasComponents && hasHooks) {
113
+ flows.push({
114
+ name: 'React Data Flow',
115
+ flow: 'Components → Hooks → State/Context → API Calls → Server',
116
+ });
117
+ }
118
+ return flows;
119
+ }
120
+ // ── Dependency chains ────────────────────────────────────────
121
+ /**
122
+ * Find 3-5 dependency chains (3-6 modules) with deterministic ordering.
123
+ */
124
+ function findDependencyChains(allLinks, workspaceRoot, maxDepth = 5, preferredStartPaths = []) {
125
+ const chains = [];
126
+ // Build sorted adjacency map
127
+ const outgoing = new Map();
128
+ for (const link of allLinks) {
129
+ if (link.source === link.target)
130
+ continue;
131
+ if (!outgoing.has(link.source))
132
+ outgoing.set(link.source, []);
133
+ outgoing.get(link.source).push(link.target);
134
+ }
135
+ for (const [key, deps] of outgoing.entries()) {
136
+ outgoing.set(key, deps.sort());
137
+ }
138
+ const preferredSet = new Set(preferredStartPaths.map((p) => p.toLowerCase()));
139
+ // In-degree for start-point ranking
140
+ const inDegree = new Map();
141
+ for (const link of allLinks) {
142
+ if (link.source === link.target)
143
+ continue;
144
+ inDegree.set(link.target, (inDegree.get(link.target) || 0) + 1);
145
+ }
146
+ const entryStartFiles = [];
147
+ for (const file of outgoing.keys()) {
148
+ const relPath = (0, helpers_1.makeRelativePath)(file, workspaceRoot).toLowerCase();
149
+ if (preferredSet.has(relPath))
150
+ entryStartFiles.push(file);
151
+ }
152
+ const inDegreeStartFiles = Array.from(inDegree.entries())
153
+ .sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
154
+ .slice(0, 8)
155
+ .map(([file]) => file)
156
+ .filter((f) => !entryStartFiles.some((e) => e === f));
157
+ const startFiles = [...entryStartFiles.sort(), ...inDegreeStartFiles].slice(0, 10);
158
+ const seenChains = new Set();
159
+ for (const startFile of startFiles) {
160
+ const deps = outgoing.get(startFile) || [];
161
+ if (deps.length === 0)
162
+ continue;
163
+ const startsFromEntry = preferredSet.has((0, helpers_1.makeRelativePath)(startFile, workspaceRoot).toLowerCase());
164
+ const chain = [(0, helpers_1.makeRelativePath)(startFile, workspaceRoot)];
165
+ let current = deps[0];
166
+ let depth = 0;
167
+ while (depth < maxDepth && current) {
168
+ const relPath = (0, helpers_1.makeRelativePath)(current, workspaceRoot);
169
+ if (chain.includes(relPath))
170
+ break;
171
+ chain.push(relPath);
172
+ const nextDeps = (outgoing.get(current) || []).filter((d) => !chain.includes((0, helpers_1.makeRelativePath)(d, workspaceRoot)));
173
+ current = nextDeps[0] || '';
174
+ depth++;
175
+ }
176
+ if (chain.length >= 3) {
177
+ const finalChain = chain.slice(0, 6);
178
+ const chainStr = finalChain.join(' → ');
179
+ if (!seenChains.has(chainStr)) {
180
+ seenChains.add(chainStr);
181
+ chains.push({ chain: finalChain, depth: finalChain.length, startPath: startFile, startsFromEntry });
182
+ }
183
+ }
184
+ }
185
+ // Score & sort
186
+ const outDegree = new Map();
187
+ for (const link of allLinks) {
188
+ if (link.source === link.target)
189
+ continue;
190
+ outDegree.set(link.source, (outDegree.get(link.source) || 0) + 1);
191
+ }
192
+ const sortedChains = chains
193
+ .map((c) => {
194
+ const lastFile = c.chain[c.chain.length - 1];
195
+ const isLeaf = (outDegree.get(lastFile) || 0) <= 1;
196
+ const entryBonus = c.startsFromEntry ? 10 : 0;
197
+ return { ...c, score: entryBonus + c.depth + (isLeaf ? 1 : 0) };
198
+ })
199
+ .sort((a, b) => b.score - a.score || b.depth - a.depth || a.startPath.localeCompare(b.startPath))
200
+ .slice(0, 5);
201
+ // Fill with fallback chains if < 3
202
+ if (sortedChains.length < 3) {
203
+ const additionalStarts = Array.from(outgoing.keys())
204
+ .filter((f) => !startFiles.includes(f))
205
+ .sort()
206
+ .slice(0, 5);
207
+ for (const startFile of additionalStarts) {
208
+ if (sortedChains.length >= 5)
209
+ break;
210
+ const chain = [(0, helpers_1.makeRelativePath)(startFile, workspaceRoot)];
211
+ let current = (outgoing.get(startFile) || [])[0];
212
+ while (chain.length < maxDepth && current) {
213
+ const relPath = (0, helpers_1.makeRelativePath)(current, workspaceRoot);
214
+ if (chain.includes(relPath))
215
+ break;
216
+ chain.push(relPath);
217
+ const nextDeps = (outgoing.get(current) || []).filter((d) => !chain.includes((0, helpers_1.makeRelativePath)(d, workspaceRoot)));
218
+ current = nextDeps[0] || '';
219
+ }
220
+ if (chain.length >= 3) {
221
+ const finalChain = chain.slice(0, 6);
222
+ const chainStr = finalChain.join(' → ');
223
+ if (!seenChains.has(chainStr)) {
224
+ seenChains.add(chainStr);
225
+ const lastFile = finalChain[finalChain.length - 1];
226
+ const isLeaf = (outDegree.get(lastFile) || 0) <= 1;
227
+ sortedChains.push({
228
+ chain: finalChain,
229
+ depth: finalChain.length,
230
+ startPath: startFile,
231
+ startsFromEntry: false,
232
+ score: finalChain.length + (isLeaf ? 1 : 0),
233
+ });
234
+ }
235
+ }
236
+ }
237
+ }
238
+ return sortedChains.slice(0, 5).map((c) => c.chain.join(' → '));
239
+ }
240
+ /**
241
+ * Find 3-7 clusters of files commonly imported together.
242
+ */
243
+ function findModuleClusters(allLinks, workspaceRoot) {
244
+ const clusters = [];
245
+ // Build importedBy map
246
+ const importedBy = new Map();
247
+ for (const link of allLinks) {
248
+ if (link.source === link.target)
249
+ continue;
250
+ if (!importedBy.has(link.target))
251
+ importedBy.set(link.target, new Set());
252
+ importedBy.get(link.target).add(link.source);
253
+ }
254
+ // Pairwise co-import scoring
255
+ const fileList = Array.from(importedBy.keys()).sort();
256
+ const coImportScores = new Map();
257
+ for (let i = 0; i < fileList.length; i++) {
258
+ for (let j = i + 1; j < fileList.length; j++) {
259
+ const fileA = fileList[i];
260
+ const fileB = fileList[j];
261
+ const importersA = importedBy.get(fileA) || new Set();
262
+ const importersB = importedBy.get(fileB) || new Set();
263
+ const sharedImporters = [];
264
+ for (const importer of importersA) {
265
+ if (importersB.has(importer))
266
+ sharedImporters.push(importer);
267
+ }
268
+ if (sharedImporters.length >= 2) {
269
+ if (!coImportScores.has(fileA))
270
+ coImportScores.set(fileA, new Map());
271
+ sharedImporters.sort();
272
+ coImportScores.get(fileA).set(fileB, { score: sharedImporters.length, sharedImporters });
273
+ }
274
+ }
275
+ }
276
+ // Build clusters from high co-import scores
277
+ const processed = new Set();
278
+ const sortedEntries = Array.from(coImportScores.entries()).sort((a, b) => {
279
+ const scoreA = Array.from(a[1].values()).reduce((sum, d) => sum + d.score, 0);
280
+ const scoreB = Array.from(b[1].values()).reduce((sum, d) => sum + d.score, 0);
281
+ return scoreB - scoreA || a[0].localeCompare(b[0]);
282
+ });
283
+ for (const [file, relatedMap] of sortedEntries) {
284
+ if (processed.has(file))
285
+ continue;
286
+ const related = Array.from(relatedMap.entries())
287
+ .filter(([_, data]) => data.score >= 2)
288
+ .sort((a, b) => b[1].score - a[1].score || a[0].localeCompare(b[0]))
289
+ .slice(0, 7);
290
+ if (related.length >= 1) {
291
+ const rawFiles = [file, ...related.map(([f]) => f)].map((f) => (0, helpers_1.makeRelativePath)(f, workspaceRoot));
292
+ const clusterFiles = (0, helpers_1.dedupe)(rawFiles.filter((f) => !(0, classifiers_1.isConfigOrToolingFile)(f)))
293
+ .sort()
294
+ .slice(0, 8);
295
+ if (clusterFiles.length < 2) {
296
+ processed.add(file);
297
+ related.forEach(([f]) => processed.add(f));
298
+ continue;
299
+ }
300
+ const allSharedImporters = new Set();
301
+ for (const [_, data] of related) {
302
+ for (const imp of data.sharedImporters)
303
+ allSharedImporters.add((0, helpers_1.makeRelativePath)(imp, workspaceRoot));
304
+ }
305
+ const clusterScore = related.reduce((sum, [_, d]) => sum + d.score, 0);
306
+ const parts = clusterFiles[0].split(/[/\\]/);
307
+ let clusterName = parts.length > 1 ? parts[parts.length - 2] : getBasenameNoExt(clusterFiles[0]);
308
+ clusterName = clusterName.charAt(0).toUpperCase() + clusterName.slice(1);
309
+ const topImporters = Array.from(allSharedImporters).sort().slice(0, 3);
310
+ const reason = topImporters.length > 0
311
+ ? `Co-imported by: ${topImporters.map((i) => `\`${i}\``).join(', ')}${allSharedImporters.size > 3 ? ` (+${allSharedImporters.size - 3} more)` : ''}`
312
+ : 'Frequently used together';
313
+ clusters.push({
314
+ name: clusterName,
315
+ files: clusterFiles,
316
+ reason,
317
+ sharedImporters: Array.from(allSharedImporters).sort(),
318
+ score: clusterScore,
319
+ });
320
+ processed.add(file);
321
+ related.forEach(([f]) => processed.add(f));
322
+ }
323
+ }
324
+ const sortedClusters = clusters.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));
325
+ if (sortedClusters.length < 3 && fileList.length > 5) {
326
+ const dirClusters = buildDirectoryClusters(allLinks, workspaceRoot, processed);
327
+ for (const dc of dirClusters) {
328
+ if (sortedClusters.length >= 7)
329
+ break;
330
+ if (!sortedClusters.some((c) => c.name === dc.name))
331
+ sortedClusters.push(dc);
332
+ }
333
+ }
334
+ disambiguateClusterNames(sortedClusters);
335
+ return sortedClusters.slice(0, 7);
336
+ }
337
+ function analyzeDirStructure(files, _workspaceRoot) {
338
+ const structure = new Map();
339
+ for (const file of files) {
340
+ const p = (0, core_1.toPosix)(file);
341
+ const lastSlash = p.lastIndexOf('/');
342
+ const dir = lastSlash >= 0 ? p.substring(0, lastSlash) : '.';
343
+ if (!structure.has(dir))
344
+ structure.set(dir, { files: [], fileTypes: new Map() });
345
+ const info = structure.get(dir);
346
+ info.files.push(file);
347
+ const ext = getExtension(file);
348
+ info.fileTypes.set(ext, (info.fileTypes.get(ext) || 0) + 1);
349
+ }
350
+ for (const [dir, info] of structure.entries()) {
351
+ const lastSlash = dir.lastIndexOf('/');
352
+ const dirName = lastSlash >= 0 ? dir.substring(lastSlash + 1) : dir;
353
+ info.purpose = inferDirPurpose(dirName);
354
+ }
355
+ return structure;
356
+ }
357
+ function inferDirPurpose(dirName) {
358
+ const lower = dirName.toLowerCase();
359
+ const purposes = {
360
+ src: 'Source code',
361
+ source: 'Source code',
362
+ lib: 'Libraries',
363
+ test: 'Tests',
364
+ tests: 'Tests',
365
+ spec: 'Tests',
366
+ docs: 'Documentation',
367
+ doc: 'Documentation',
368
+ config: 'Configuration',
369
+ utils: 'Utilities',
370
+ helpers: 'Utilities',
371
+ api: 'API layer',
372
+ server: 'Server code',
373
+ client: 'Client code',
374
+ frontend: 'Frontend',
375
+ backend: 'Backend',
376
+ models: 'Data models',
377
+ views: 'Views/UI',
378
+ controllers: 'Controllers',
379
+ services: 'Services',
380
+ components: 'Components',
381
+ };
382
+ return purposes[lower] || 'General';
383
+ }
384
+ // ── Symbol callers ───────────────────────────────────────────
385
+ /**
386
+ * Find callers of a given symbol from the dependency graph.
387
+ * Returns shortened relative paths for display, capped at 5 + overflow.
388
+ */
389
+ function getSymbolCallers(symbolName, targetFile, allLinks, workspaceRoot) {
390
+ const callers = allLinks.filter((l) => {
391
+ if (l.target !== targetFile)
392
+ return false;
393
+ const hasSymbol = l.symbols.includes(symbolName) ||
394
+ l.symbols.includes('*') ||
395
+ l.symbols.length === 0 ||
396
+ l.type === 'import';
397
+ if (!hasSymbol)
398
+ return false;
399
+ if (workspaceRoot && (0, classifiers_1.classifyFile)(l.source, workspaceRoot) !== 'app')
400
+ return false;
401
+ return true;
402
+ });
403
+ const uniqueCallers = (0, helpers_1.dedupe)(callers, (l) => l.source);
404
+ const sorted = uniqueCallers.sort((a, b) => a.source.localeCompare(b.source));
405
+ const maxDisplay = 5;
406
+ const result = [];
407
+ for (let i = 0; i < Math.min(maxDisplay, sorted.length); i++) {
408
+ const caller = sorted[i];
409
+ const relPath = workspaceRoot
410
+ ? (0, helpers_1.makeRelativePath)(caller.source, workspaceRoot)
411
+ : getBasenameNoExt(caller.source);
412
+ const segments = relPath.split('/');
413
+ const shortened = segments.length > 2 ? segments.slice(-2).join('/') : relPath;
414
+ result.push(shortened);
415
+ }
416
+ if (sorted.length > maxDisplay) {
417
+ result.push(`(+${sorted.length - maxDisplay} more)`);
418
+ }
419
+ return result;
420
+ }
421
+ // ── Internal helpers ─────────────────────────────────────────
422
+ function disambiguateClusterNames(clusters) {
423
+ const nameGroups = new Map();
424
+ for (let i = 0; i < clusters.length; i++) {
425
+ const name = clusters[i].name;
426
+ if (!nameGroups.has(name))
427
+ nameGroups.set(name, []);
428
+ nameGroups.get(name).push(i);
429
+ }
430
+ for (const [name, indices] of nameGroups.entries()) {
431
+ if (indices.length <= 1)
432
+ continue;
433
+ const pathContexts = [];
434
+ for (const idx of indices) {
435
+ const firstFile = clusters[idx].files[0] || '';
436
+ const segments = firstFile.split('/');
437
+ if (segments.length >= 2) {
438
+ pathContexts.push(segments[segments.length - 2]);
439
+ }
440
+ else if (segments.length >= 1) {
441
+ pathContexts.push(getBasenameNoExt(segments[0]));
442
+ }
443
+ else {
444
+ pathContexts.push('');
445
+ }
446
+ }
447
+ const uniqueContexts = new Set(pathContexts);
448
+ if (uniqueContexts.size === pathContexts.length && !pathContexts.some((c) => c === '')) {
449
+ for (let i = 0; i < indices.length; i++) {
450
+ clusters[indices[i]].name = `${name} (${pathContexts[i]})`;
451
+ }
452
+ }
453
+ else {
454
+ for (let i = 0; i < indices.length; i++) {
455
+ clusters[indices[i]].name = `${name} #${i + 1}`;
456
+ }
457
+ }
458
+ }
459
+ }
460
+ function buildDirectoryClusters(allLinks, workspaceRoot, processedFiles) {
461
+ const dirGroups = new Map();
462
+ const allFiles = new Set(allLinks.flatMap((l) => [l.source, l.target]));
463
+ for (const file of allFiles) {
464
+ if (processedFiles.has(file))
465
+ continue;
466
+ const relPath = (0, helpers_1.makeRelativePath)(file, workspaceRoot);
467
+ if ((0, classifiers_1.isConfigOrToolingFile)(relPath))
468
+ continue;
469
+ const p = (0, core_1.toPosix)(relPath);
470
+ const lastSlash = p.lastIndexOf('/');
471
+ const dir = lastSlash >= 0 ? p.substring(0, lastSlash) : '.';
472
+ if (!dirGroups.has(dir))
473
+ dirGroups.set(dir, []);
474
+ dirGroups.get(dir).push(relPath);
475
+ }
476
+ return Array.from(dirGroups.entries())
477
+ .filter(([_, files]) => files.length >= 3)
478
+ .sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0]))
479
+ .slice(0, 3)
480
+ .map(([dir, files]) => {
481
+ const lastSlash = dir.lastIndexOf('/');
482
+ const dirBasename = lastSlash >= 0 ? dir.substring(lastSlash + 1) : dir;
483
+ return {
484
+ name: dirBasename || 'Root',
485
+ files: files.filter((f) => !(0, classifiers_1.isConfigOrToolingFile)(f)).sort().slice(0, 8),
486
+ reason: `Files in \`${dir}/\` directory`,
487
+ sharedImporters: [],
488
+ score: files.length,
489
+ };
490
+ });
491
+ }
492
+ function getExtension(filePath) {
493
+ const p = (0, core_1.toPosix)(filePath);
494
+ const lastDot = p.lastIndexOf('.');
495
+ return lastDot >= 0 ? p.substring(lastDot).toLowerCase() : '';
496
+ }
497
+ function getBasenameNoExt(filePath) {
498
+ const p = (0, core_1.toPosix)(filePath);
499
+ const lastSlash = p.lastIndexOf('/');
500
+ const name = lastSlash >= 0 ? p.substring(lastSlash + 1) : p;
501
+ const lastDot = name.lastIndexOf('.');
502
+ return lastDot > 0 ? name.substring(0, lastDot) : name;
503
+ }
504
+ //# sourceMappingURL=analyzers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyzers.js","sourceRoot":"","sources":["../../src/kb/analyzers.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAQH,8DAcC;AAID,wDA2BC;AAQD,oDAsCC;AAID,4CAoCC;AAOD,oDAuIC;AAeD,gDA2GC;AAUD,kDA0BC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AC,CAAC,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Architecture emitter — generates `architecture.md` content.
3
+ *
4
+ * Pure function: takes data, returns a markdown string.
5
+ * No I/O, no vscode.
6
+ */
7
+ import type { DependencyLink } from '@aspectcode/core';
8
+ export interface ArchitectureEmitterInput {
9
+ files: string[];
10
+ depData: Map<string, {
11
+ inDegree: number;
12
+ outDegree: number;
13
+ }>;
14
+ allLinks: DependencyLink[];
15
+ fileContentCache: Map<string, string>;
16
+ workspaceRoot: string;
17
+ generatedAt: string;
18
+ }
19
+ /**
20
+ * Build the full `architecture.md` content string.
21
+ * Deterministic for the same inputs.
22
+ */
23
+ export declare function buildArchitectureContent(input: ArchitectureEmitterInput): string;
24
+ //# sourceMappingURL=architectureEmitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architectureEmitter.d.ts","sourceRoot":"","sources":["../../src/kb/architectureEmitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWvD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,wBAAwB,GAAG,MAAM,CAoRhF"}