aspectcode 0.2.2 → 0.3.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 (299) 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/package.json +11 -3
  280. package/dist/commands/deps.d.ts +0 -11
  281. package/dist/commands/deps.d.ts.map +0 -1
  282. package/dist/commands/deps.js +0 -197
  283. package/dist/commands/deps.js.map +0 -1
  284. package/dist/commands/generate.d.ts +0 -8
  285. package/dist/commands/generate.d.ts.map +0 -1
  286. package/dist/commands/generate.js +0 -162
  287. package/dist/commands/generate.js.map +0 -1
  288. package/dist/commands/settings.d.ts +0 -9
  289. package/dist/commands/settings.d.ts.map +0 -1
  290. package/dist/commands/settings.js +0 -165
  291. package/dist/commands/settings.js.map +0 -1
  292. package/dist/commands/watch.d.ts +0 -6
  293. package/dist/commands/watch.d.ts.map +0 -1
  294. package/dist/commands/watch.js +0 -180
  295. package/dist/commands/watch.js.map +0 -1
  296. package/dist/connections.d.ts +0 -24
  297. package/dist/connections.d.ts.map +0 -1
  298. package/dist/connections.js +0 -89
  299. package/dist/connections.js.map +0 -1
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ /**
3
+ * Architecture emitter — generates `architecture.md` content.
4
+ *
5
+ * Pure function: takes data, returns a markdown string.
6
+ * No I/O, no vscode.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.buildArchitectureContent = buildArchitectureContent;
10
+ const constants_1 = require("./constants");
11
+ const helpers_1 = require("./helpers");
12
+ const classifiers_1 = require("./classifiers");
13
+ const entryPoints_1 = require("./entryPoints");
14
+ const analyzers_1 = require("./analyzers");
15
+ const detectors_1 = require("./detectors");
16
+ const conventions_1 = require("./conventions");
17
+ /**
18
+ * Build the full `architecture.md` content string.
19
+ * Deterministic for the same inputs.
20
+ */
21
+ function buildArchitectureContent(input) {
22
+ const { files, depData, allLinks, fileContentCache, workspaceRoot, generatedAt } = input;
23
+ let content = '# Architecture\n\n';
24
+ content += '_Read this first. Describes the project layout and "Do Not Break" zones._\n\n';
25
+ if (files.length === 0) {
26
+ content += '_No source files found._\n';
27
+ }
28
+ else {
29
+ // Quick stats
30
+ const totalEdges = allLinks.length;
31
+ // Filter out self-references
32
+ const circularLinks = allLinks.filter((l) => l.type === 'circular' && l.source !== l.target);
33
+ const cycleCount = Math.ceil(circularLinks.length / 2);
34
+ content += `**Files:** ${files.length} | **Dependencies:** ${totalEdges} | **Cycles:** ${cycleCount}\n\n`;
35
+ // Filter to app files for architectural views
36
+ const appFiles = files.filter((f) => (0, classifiers_1.classifyFile)(f, workspaceRoot) === 'app');
37
+ const testFiles = files.filter((f) => (0, classifiers_1.classifyFile)(f, workspaceRoot) === 'test');
38
+ // ── HIGH-RISK ARCHITECTURAL HUBS ───────────────────────
39
+ const findingCounts = new Map();
40
+ const hubs = Array.from(depData.entries())
41
+ .filter(([file]) => (0, classifiers_1.isStructuralAppFile)(file, workspaceRoot))
42
+ .map(([file, info]) => {
43
+ const depScore = info.inDegree + info.outDegree;
44
+ const fc = findingCounts.get(file) || 0;
45
+ const hotspotScore = depScore * 2 + fc;
46
+ return {
47
+ file,
48
+ inDegree: info.inDegree,
49
+ outDegree: info.outDegree,
50
+ totalDegree: depScore,
51
+ findings: fc,
52
+ hotspotScore,
53
+ };
54
+ })
55
+ .filter((h) => h.totalDegree > 2 || h.findings > 0)
56
+ .sort((a, b) => b.hotspotScore - a.hotspotScore || a.file.localeCompare(b.file))
57
+ .slice(0, constants_1.KB_SECTION_LIMITS.hubs);
58
+ if (hubs.length > 0) {
59
+ content += '## ⚠️ High-Risk Architectural Hubs\n\n';
60
+ content += '> **These files are architectural load-bearing walls.**\n';
61
+ content +=
62
+ '> Modify with extreme caution. Do not change signatures without checking the **Map** section below.\n\n';
63
+ content += '| Rank | File | Imports | Imported By | Risk |\n';
64
+ content += '|------|------|---------|-------------|------|\n';
65
+ for (let i = 0; i < hubs.length; i++) {
66
+ const hub = hubs[i];
67
+ const relPath = (0, helpers_1.makeRelativePath)(hub.file, workspaceRoot);
68
+ const appImportCount = (0, helpers_1.dedupe)(allLinks
69
+ .filter((l) => l.target === hub.file && l.source !== hub.file)
70
+ .filter((l) => (0, classifiers_1.classifyFile)(l.source, workspaceRoot) === 'app'), (l) => l.source).length;
71
+ const risk = appImportCount > 8
72
+ ? '🔴 High'
73
+ : appImportCount > 4 || hub.findings > 3
74
+ ? '🟡 Medium'
75
+ : '🟢 Low';
76
+ content += `| ${i + 1} | \`${relPath}\` | ${hub.outDegree} | ${appImportCount} | ${risk} |\n`;
77
+ }
78
+ content += '\n';
79
+ // Hub Details & Blast Radius
80
+ content += '### Hub Details & Blast Radius\n\n';
81
+ content += '_Blast radius = direct dependents + their dependents (2 levels)._\n\n';
82
+ for (let i = 0; i < Math.min(constants_1.KB_SECTION_LIMITS.hubDetails, hubs.length); i++) {
83
+ const hub = hubs[i];
84
+ const relPath = (0, helpers_1.makeRelativePath)(hub.file, workspaceRoot);
85
+ const directImporters = (0, helpers_1.dedupe)(allLinks
86
+ .filter((l) => l.target === hub.file && l.source !== hub.file)
87
+ .filter((l) => (0, classifiers_1.classifyFile)(l.source, workspaceRoot) === 'app'), (l) => l.source).sort((a, b) => a.source.localeCompare(b.source));
88
+ const secondLevelImporters = new Set();
89
+ for (const importer of directImporters.slice(0, 10)) {
90
+ const indirectLinks = allLinks
91
+ .filter((l) => l.target === importer.source &&
92
+ l.source !== hub.file &&
93
+ (0, classifiers_1.classifyFile)(l.source, workspaceRoot) === 'app')
94
+ .sort((a, b) => a.source.localeCompare(b.source));
95
+ for (const il of indirectLinks.slice(0, 3)) {
96
+ secondLevelImporters.add(il.source);
97
+ }
98
+ }
99
+ const directDependentCount = directImporters.length;
100
+ const totalBlastRadius = directDependentCount + secondLevelImporters.size;
101
+ content += `**${i + 1}. \`${relPath}\`** — Blast radius: ${totalBlastRadius} files\n`;
102
+ content += ` - Direct dependents: ${directDependentCount}\n`;
103
+ content += ` - Indirect dependents: ~${secondLevelImporters.size}\n`;
104
+ if (directImporters.length > 0) {
105
+ const shownCount = Math.min(5, directImporters.length);
106
+ content += `\n Imported by (${directDependentCount} files):\n`;
107
+ for (const imp of directImporters.slice(0, shownCount)) {
108
+ const impRel = (0, helpers_1.makeRelativePath)(imp.source, workspaceRoot);
109
+ content += ` - \`${impRel}\`\n`;
110
+ }
111
+ if (directImporters.length > shownCount) {
112
+ content += ` - _...and ${directImporters.length - shownCount} more_\n`;
113
+ }
114
+ }
115
+ content += '\n';
116
+ }
117
+ }
118
+ // ── ENTRY POINTS ───────────────────────────────────────
119
+ const contentBasedEntryPoints = (0, entryPoints_1.detectEntryPointsWithContent)(appFiles, workspaceRoot, fileContentCache);
120
+ if (contentBasedEntryPoints.length > 0) {
121
+ content += '## Entry Points\n\n';
122
+ content +=
123
+ '_Where code execution begins. Categorized by type with detection confidence._\n\n';
124
+ const runtimeEntries = contentBasedEntryPoints.filter((e) => e.category === 'runtime');
125
+ const toolingEntries = contentBasedEntryPoints.filter((e) => e.category === 'tooling');
126
+ const barrelEntries = contentBasedEntryPoints.filter((e) => e.category === 'barrel');
127
+ if (runtimeEntries.length > 0) {
128
+ content += '### Runtime Entry Points\n\n';
129
+ content += '_Server handlers, API routes, application entry._\n\n';
130
+ const topRuntime = runtimeEntries.slice(0, constants_1.KB_SECTION_LIMITS.entryPoints);
131
+ for (const entry of topRuntime) {
132
+ const confIcon = entry.confidence === 'high' ? '🟢' : entry.confidence === 'medium' ? '🟡' : '🟠';
133
+ content += `- ${confIcon} \`${entry.path}\`: ${entry.reason}\n`;
134
+ }
135
+ if (runtimeEntries.length > constants_1.KB_SECTION_LIMITS.entryPoints) {
136
+ content += `- _...and ${runtimeEntries.length - constants_1.KB_SECTION_LIMITS.entryPoints} more_\n`;
137
+ }
138
+ content += '\n';
139
+ }
140
+ if (toolingEntries.length > 0) {
141
+ content += '### Runnable Scripts / Tooling\n\n';
142
+ content += '_CLI tools, build scripts, standalone utilities._\n\n';
143
+ const topTooling = toolingEntries.slice(0, 5);
144
+ for (const entry of topTooling) {
145
+ const confIcon = entry.confidence === 'high' ? '🟢' : entry.confidence === 'medium' ? '🟡' : '🟠';
146
+ content += `- ${confIcon} \`${entry.path}\`: ${entry.reason}\n`;
147
+ }
148
+ if (toolingEntries.length > 5) {
149
+ content += `- _...and ${toolingEntries.length - 5} more_\n`;
150
+ }
151
+ content += '\n';
152
+ }
153
+ if (barrelEntries.length > 0) {
154
+ content += '### Barrel/Index Exports\n\n';
155
+ content += '_Re-export hubs that aggregate module exports._\n\n';
156
+ const topBarrels = barrelEntries.slice(0, 5);
157
+ for (const entry of topBarrels) {
158
+ content += `- 🟡 \`${entry.path}\`: ${entry.reason}\n`;
159
+ }
160
+ if (barrelEntries.length > 5) {
161
+ content += `- _...and ${barrelEntries.length - 5} more_\n`;
162
+ }
163
+ content += '\n';
164
+ }
165
+ }
166
+ // ── DIRECTORY LAYOUT ───────────────────────────────────
167
+ const dirStructure = (0, analyzers_1.analyzeDirStructure)(appFiles, workspaceRoot);
168
+ const topDirs = Array.from(dirStructure.entries())
169
+ .filter(([, info]) => info.files.length >= 2)
170
+ .sort((a, b) => b[1].files.length - a[1].files.length || a[0].localeCompare(b[0]))
171
+ .slice(0, 12);
172
+ if (topDirs.length > 0) {
173
+ content += '## Directory Layout\n\n';
174
+ content += '| Directory | Files | Purpose |\n';
175
+ content += '|-----------|-------|--------|\n';
176
+ for (const [dir, info] of topDirs) {
177
+ const relDir = (0, helpers_1.makeRelativePath)(dir, workspaceRoot) || '.';
178
+ const purpose = info.purpose || (0, analyzers_1.inferDirPurpose)(relDir);
179
+ content += `| \`${relDir}/\` | ${info.files.length} | ${purpose} |\n`;
180
+ }
181
+ content += '\n';
182
+ }
183
+ // ── CIRCULAR DEPENDENCIES ──────────────────────────────
184
+ const appCircularLinks = circularLinks
185
+ .filter((l) => (0, classifiers_1.isStructuralAppFile)(l.source, workspaceRoot) &&
186
+ (0, classifiers_1.isStructuralAppFile)(l.target, workspaceRoot) &&
187
+ l.source !== l.target)
188
+ .sort((a, b) => a.source.localeCompare(b.source) || a.target.localeCompare(b.target));
189
+ if (appCircularLinks.length > 0) {
190
+ content += '## ⚠️ Circular Dependencies\n\n';
191
+ content += '_Bidirectional imports that create tight coupling._\n\n';
192
+ const processedPairs = new Set();
193
+ let cycleIndex = 0;
194
+ for (const link of appCircularLinks) {
195
+ if (cycleIndex >= 5)
196
+ break;
197
+ if (link.source === link.target)
198
+ continue;
199
+ const pairKey = [link.source, link.target].sort().join('::');
200
+ if (processedPairs.has(pairKey))
201
+ continue;
202
+ processedPairs.add(pairKey);
203
+ const sourceRel = (0, helpers_1.makeRelativePath)(link.source, workspaceRoot);
204
+ const targetRel = (0, helpers_1.makeRelativePath)(link.target, workspaceRoot);
205
+ content += `- \`${sourceRel}\` ↔ \`${targetRel}\`\n`;
206
+ cycleIndex++;
207
+ }
208
+ content += '\n';
209
+ }
210
+ // ── GLOBAL STATE ───────────────────────────────────────
211
+ const globalStateFindings = (0, detectors_1.getKBEnrichments)('GLOBAL_STATE', appFiles, workspaceRoot, fileContentCache).filter((f) => (0, classifiers_1.classifyFile)(f.file, workspaceRoot) === 'app');
212
+ if (globalStateFindings.length > 0) {
213
+ content += '## Shared State\n\n';
214
+ content += '_Global/singleton state locations. Consider thread-safety and testability._\n\n';
215
+ for (const finding of globalStateFindings.slice(0, 8)) {
216
+ const relPath = (0, helpers_1.makeRelativePath)(finding.file, workspaceRoot);
217
+ content += `- \`${relPath}\`: ${finding.message}\n`;
218
+ }
219
+ if (globalStateFindings.length > 8) {
220
+ content += `- _...and ${globalStateFindings.length - 8} more_\n`;
221
+ }
222
+ content += '\n';
223
+ }
224
+ // ── TESTS SUMMARY ──────────────────────────────────────
225
+ const testInfo = (0, conventions_1.analyzeTestOrganization)(testFiles.length > 0 ? testFiles : files, workspaceRoot);
226
+ if (testInfo.testFiles.length > 0) {
227
+ content += '## Tests\n\n';
228
+ content += `**Test files:** ${testInfo.testFiles.length}`;
229
+ if (testInfo.testDirs.length > 0) {
230
+ content += ` | **Dirs:** ${testInfo.testDirs.slice(0, 2).join(', ')}`;
231
+ }
232
+ content += '\n\n';
233
+ }
234
+ }
235
+ content += `\n_Generated: ${generatedAt}_\n`;
236
+ return (0, helpers_1.enforceLineBudget)(content, constants_1.KB_SIZE_LIMITS.architecture, 'architecture.md', generatedAt);
237
+ }
238
+ //# sourceMappingURL=architectureEmitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architectureEmitter.js","sourceRoot":"","sources":["../../src/kb/architectureEmitter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AA0BH,4DAoRC;AA3SD,2CAAgE;AAChE,uCAAwE;AACxE,+CAAkE;AAClE,+CAA6D;AAC7D,2CAAmE;AACnE,2CAA+C;AAC/C,+CAAwD;AAaxD;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,KAA+B;IACtE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEzF,IAAI,OAAO,GAAG,oBAAoB,CAAC;IACnC,OAAO,IAAI,+EAA+E,CAAC;IAE3F,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,4BAA4B,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,cAAc;QACd,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;QACnC,6BAA6B;QAC7B,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QAC7F,MAAM,UAAU,GAAG,IAA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,OAAO,IAAI,CAAC;YACtD,CAAC;YACD,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,IAAI,aAAa,mBAAmB,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC;YACnE,CAAC;YACD,OAAO,IAAI,IAAI,CAAC;QAClB,CAAC;QAED,0DAA0D;QAC1D,MAAM,QAAQ,GAAG,IAAA,qCAAuB,EACtC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EACxC,aAAa,CACd,CAAC;QACF,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClC,OAAO,IAAI,cAAc,CAAC;YAC1B,OAAO,IAAI,mBAAmB,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAC1D,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACjC,OAAO,IAAI,gBAAgB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACxE,CAAC;YACD,OAAO,IAAI,MAAM,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,iBAAiB,WAAW,KAAK,CAAC;IAE7C,OAAO,IAAA,2BAAiB,EAAC,OAAO,EAAE,0BAAc,CAAC,YAAY,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;AACjG,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * File classifiers — re-exported from @aspectcode/core.
3
+ *
4
+ * The canonical implementations now live in core so the CLI can use them
5
+ * without depending on the emitters package for this purpose.
6
+ */
7
+ export { classifyFile, isStructuralAppFile, isConfigOrToolingFile, type FileKind, } from '@aspectcode/core';
8
+ //# sourceMappingURL=classifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifiers.d.ts","sourceRoot":"","sources":["../../src/kb/classifiers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isConfigOrToolingFile = exports.isStructuralAppFile = exports.classifyFile = void 0;
4
+ /**
5
+ * File classifiers — re-exported from @aspectcode/core.
6
+ *
7
+ * The canonical implementations now live in core so the CLI can use them
8
+ * without depending on the emitters package for this purpose.
9
+ */
10
+ var core_1 = require("@aspectcode/core");
11
+ Object.defineProperty(exports, "classifyFile", { enumerable: true, get: function () { return core_1.classifyFile; } });
12
+ Object.defineProperty(exports, "isStructuralAppFile", { enumerable: true, get: function () { return core_1.isStructuralAppFile; } });
13
+ Object.defineProperty(exports, "isConfigOrToolingFile", { enumerable: true, get: function () { return core_1.isConfigOrToolingFile; } });
14
+ //# sourceMappingURL=classifiers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifiers.js","sourceRoot":"","sources":["../../src/kb/classifiers.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAK0B;AAJxB,oGAAA,YAAY,OAAA;AACZ,2GAAA,mBAAmB,OAAA;AACnB,6GAAA,qBAAqB,OAAA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * KB line budgets and per-section item caps.
3
+ *
4
+ * These keep generated files within AI context-window budgets.
5
+ */
6
+ /** Maximum line counts for each KB file. */
7
+ export declare const KB_SIZE_LIMITS: {
8
+ readonly architecture: 200;
9
+ readonly map: 300;
10
+ readonly context: 200;
11
+ };
12
+ /** Maximum items per section to prevent runaway lists. */
13
+ export declare const KB_SECTION_LIMITS: {
14
+ readonly hubs: 12;
15
+ readonly hubDetails: 3;
16
+ readonly entryPoints: 10;
17
+ readonly directories: 12;
18
+ readonly dataModels: 15;
19
+ readonly symbolsPerFile: 10;
20
+ readonly filesInSymbolIndex: 30;
21
+ readonly clusters: 6;
22
+ readonly chains: 8;
23
+ readonly integrations: 4;
24
+ };
25
+ /** KB-enriching rule IDs. */
26
+ export declare const KB_ENRICHING_RULES: {
27
+ readonly ENTRY_POINT: "arch.entry_point";
28
+ readonly EXTERNAL_INTEGRATION: "arch.external_integration";
29
+ readonly DATA_MODEL: "arch.data_model";
30
+ readonly GLOBAL_STATE: "arch.global_state_usage";
31
+ readonly IMPORT_CYCLE: "imports.cycle.advanced";
32
+ readonly CRITICAL_DEPENDENCY: "architecture.critical_dependency";
33
+ readonly CHANGE_IMPACT: "analysis.change_impact";
34
+ };
35
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/kb/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,4CAA4C;AAC5C,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAWpB,CAAC;AAEX,6BAA6B;AAC7B,eAAO,MAAM,kBAAkB;;;;;;;;CAQrB,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * KB line budgets and per-section item caps.
4
+ *
5
+ * These keep generated files within AI context-window budgets.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.KB_ENRICHING_RULES = exports.KB_SECTION_LIMITS = exports.KB_SIZE_LIMITS = void 0;
9
+ /** Maximum line counts for each KB file. */
10
+ exports.KB_SIZE_LIMITS = {
11
+ architecture: 200,
12
+ map: 300,
13
+ context: 200,
14
+ };
15
+ /** Maximum items per section to prevent runaway lists. */
16
+ exports.KB_SECTION_LIMITS = {
17
+ hubs: 12,
18
+ hubDetails: 3,
19
+ entryPoints: 10,
20
+ directories: 12,
21
+ dataModels: 15,
22
+ symbolsPerFile: 10,
23
+ filesInSymbolIndex: 30,
24
+ clusters: 6,
25
+ chains: 8,
26
+ integrations: 4,
27
+ };
28
+ /** KB-enriching rule IDs. */
29
+ exports.KB_ENRICHING_RULES = {
30
+ ENTRY_POINT: 'arch.entry_point',
31
+ EXTERNAL_INTEGRATION: 'arch.external_integration',
32
+ DATA_MODEL: 'arch.data_model',
33
+ GLOBAL_STATE: 'arch.global_state_usage',
34
+ IMPORT_CYCLE: 'imports.cycle.advanced',
35
+ CRITICAL_DEPENDENCY: 'architecture.critical_dependency',
36
+ CHANGE_IMPACT: 'analysis.change_impact',
37
+ };
38
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/kb/constants.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4CAA4C;AAC/B,QAAA,cAAc,GAAG;IAC5B,YAAY,EAAE,GAAG;IACjB,GAAG,EAAE,GAAG;IACR,OAAO,EAAE,GAAG;CACJ,CAAC;AAEX,0DAA0D;AAC7C,QAAA,iBAAiB,GAAG;IAC/B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,cAAc,EAAE,EAAE;IAClB,kBAAkB,EAAE,EAAE;IACtB,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,CAAC;IACT,YAAY,EAAE,CAAC;CACP,CAAC;AAEX,6BAA6B;AAChB,QAAA,kBAAkB,GAAG;IAChC,WAAW,EAAE,kBAAkB;IAC/B,oBAAoB,EAAE,2BAA2B;IACjD,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,yBAAyB;IACvC,YAAY,EAAE,wBAAwB;IACtC,mBAAmB,EAAE,kCAAkC;IACvD,aAAa,EAAE,wBAAwB;CAC/B,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Context emitter — generates `context.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 ContextEmitterInput {
9
+ files: string[];
10
+ allLinks: DependencyLink[];
11
+ fileContentCache: Map<string, string>;
12
+ workspaceRoot: string;
13
+ generatedAt: string;
14
+ }
15
+ /**
16
+ * Build the full `context.md` content string.
17
+ * Deterministic for the same inputs.
18
+ */
19
+ export declare function buildContextContent(input: ContextEmitterInput): string;
20
+ //# sourceMappingURL=contextEmitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextEmitter.d.ts","sourceRoot":"","sources":["../../src/kb/contextEmitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAevD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,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,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAmLtE"}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ /**
3
+ * Context emitter — generates `context.md` content.
4
+ *
5
+ * Pure function: takes data, returns a markdown string.
6
+ * No I/O, no vscode.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.buildContextContent = buildContextContent;
10
+ const constants_1 = require("./constants");
11
+ const helpers_1 = require("./helpers");
12
+ const classifiers_1 = require("./classifiers");
13
+ const entryPoints_1 = require("./entryPoints");
14
+ const analyzers_1 = require("./analyzers");
15
+ const detectors_1 = require("./detectors");
16
+ /**
17
+ * Build the full `context.md` content string.
18
+ * Deterministic for the same inputs.
19
+ */
20
+ function buildContextContent(input) {
21
+ const { files, allLinks, fileContentCache, workspaceRoot, generatedAt } = input;
22
+ let content = '# Context\n\n';
23
+ content +=
24
+ '_Data flow and co-location context. Use to understand which files work together._\n\n';
25
+ // Filter links to only include app-to-app dependencies
26
+ const appLinks = allLinks.filter((l) => (0, classifiers_1.classifyFile)(l.source, workspaceRoot) === 'app' &&
27
+ (0, classifiers_1.classifyFile)(l.target, workspaceRoot) === 'app');
28
+ const appFiles = files.filter((f) => (0, classifiers_1.classifyFile)(f, workspaceRoot) === 'app');
29
+ if (appLinks.length === 0) {
30
+ content += '_No dependency data available. Run examination first._\n';
31
+ }
32
+ else {
33
+ // ── MODULE CLUSTERS ────────────────────────────────────
34
+ const clusters = (0, analyzers_1.findModuleClusters)(appLinks, workspaceRoot);
35
+ if (clusters.length > 0) {
36
+ content += '## Module Clusters\n\n';
37
+ content +=
38
+ '_Files commonly imported together. Editing one likely requires editing the others._\n\n';
39
+ for (const cluster of clusters.slice(0, 6)) {
40
+ content += `### ${cluster.name}\n\n`;
41
+ content += `_${cluster.reason}_\n\n`;
42
+ for (const file of cluster.files.slice(0, 5)) {
43
+ content += `- \`${file}\`\n`;
44
+ }
45
+ if (cluster.files.length > 5) {
46
+ content += `- _...and ${cluster.files.length - 5} more_\n`;
47
+ }
48
+ content += '\n';
49
+ }
50
+ }
51
+ // ── CRITICAL FLOWS ─────────────────────────────────────
52
+ const centralityScores = (0, analyzers_1.calculateCentralityScores)(appLinks);
53
+ const topModules = Array.from(centralityScores.entries())
54
+ .filter(([file]) => (0, classifiers_1.isStructuralAppFile)(file, workspaceRoot))
55
+ .sort((a, b) => b[1].score - a[1].score || a[0].localeCompare(b[0]))
56
+ .slice(0, 8);
57
+ if (topModules.length > 0) {
58
+ content += '## Critical Flows\n\n';
59
+ content += '_Most central modules by connectivity. Changes here propagate widely._\n\n';
60
+ content += '| Module | Callers | Dependencies |\n';
61
+ content += '|--------|---------|--------------|\n';
62
+ for (const [file, stats] of topModules) {
63
+ const relPath = (0, helpers_1.makeRelativePath)(file, workspaceRoot);
64
+ content += `| \`${relPath}\` | ${stats.inDegree} | ${stats.outDegree} |\n`;
65
+ }
66
+ content += '\n';
67
+ }
68
+ // ── DEPENDENCY CHAINS ──────────────────────────────────
69
+ const entryPointsForChains = (0, entryPoints_1.detectEntryPointsWithContent)(appFiles, workspaceRoot, fileContentCache);
70
+ const runtimeEntryPaths = entryPointsForChains
71
+ .filter((e) => e.category === 'runtime')
72
+ .map((e) => e.path);
73
+ const chains = (0, analyzers_1.findDependencyChains)(appLinks, workspaceRoot, 4, runtimeEntryPaths);
74
+ if (chains.length > 0) {
75
+ const sortedChains = chains
76
+ .map((c) => ({ chain: c, depth: c.split(' → ').length }))
77
+ .sort((a, b) => b.depth - a.depth || a.chain.localeCompare(b.chain))
78
+ .slice(0, 8)
79
+ .map((c) => c.chain);
80
+ content += '## Dependency Chains\n\n';
81
+ content +=
82
+ '_Top data/call flow paths. Shows how changes propagate through the codebase._\n\n';
83
+ for (let i = 0; i < sortedChains.length && i < 8; i++) {
84
+ const chain = sortedChains[i];
85
+ const depth = chain.split(' → ').length;
86
+ content += `**Chain ${i + 1}** (${depth} modules):\n`;
87
+ content += `\`\`\`\n${chain}\n\`\`\`\n\n`;
88
+ }
89
+ }
90
+ // ── EXTERNAL INTEGRATIONS ──────────────────────────────
91
+ const externalIntegrations = (0, detectors_1.getKBEnrichments)('EXTERNAL_INTEGRATION', appFiles, workspaceRoot, fileContentCache).filter((f) => (0, classifiers_1.classifyFile)(f.file, workspaceRoot) === 'app');
92
+ if (externalIntegrations.length > 0) {
93
+ content += '## External Integrations\n\n';
94
+ content += '_Connections to external services._\n\n';
95
+ const databases = externalIntegrations.filter((f) => f.message.includes('Database') || f.message.includes('DB') || f.message.includes('SQL'));
96
+ const httpClients = externalIntegrations.filter((f) => f.message.includes('HTTP') || f.message.includes('API') || f.message.includes('fetch'));
97
+ const queues = externalIntegrations.filter((f) => f.message.includes('Queue') || f.message.includes('Kafka') || f.message.includes('Redis'));
98
+ const other = externalIntegrations.filter((f) => !databases.includes(f) && !httpClients.includes(f) && !queues.includes(f));
99
+ if (databases.length > 0) {
100
+ content += '**Database:**\n';
101
+ for (const db of databases.slice(0, 3)) {
102
+ const relPath = (0, helpers_1.makeRelativePath)(db.file, workspaceRoot);
103
+ content += `- \`${relPath}\`: ${db.message}\n`;
104
+ }
105
+ content += '\n';
106
+ }
107
+ if (httpClients.length > 0) {
108
+ content += '**HTTP/API Clients:**\n';
109
+ for (const http of httpClients.slice(0, 3)) {
110
+ const relPath = (0, helpers_1.makeRelativePath)(http.file, workspaceRoot);
111
+ content += `- \`${relPath}\`: ${http.message}\n`;
112
+ }
113
+ content += '\n';
114
+ }
115
+ if (queues.length > 0) {
116
+ content += '**Message Queues:**\n';
117
+ for (const q of queues.slice(0, 3)) {
118
+ const relPath = (0, helpers_1.makeRelativePath)(q.file, workspaceRoot);
119
+ content += `- \`${relPath}\`: ${q.message}\n`;
120
+ }
121
+ content += '\n';
122
+ }
123
+ if (other.length > 0) {
124
+ content += '**Other:**\n';
125
+ for (const o of other.slice(0, 3)) {
126
+ const relPath = (0, helpers_1.makeRelativePath)(o.file, workspaceRoot);
127
+ content += `- \`${relPath}\`: ${o.message}\n`;
128
+ }
129
+ content += '\n';
130
+ }
131
+ }
132
+ // ── REQUEST FLOW PATTERN ───────────────────────────────
133
+ const layerFlows = (0, analyzers_1.detectLayerFlows)(appFiles, appLinks, workspaceRoot);
134
+ if (layerFlows.length > 0) {
135
+ content += '## Request Flow Pattern\n\n';
136
+ content += '_How a typical request flows through the architecture._\n\n';
137
+ for (const layer of layerFlows) {
138
+ content += `**${layer.name}:**\n`;
139
+ content += `\`\`\`\n${layer.flow}\n\`\`\`\n\n`;
140
+ }
141
+ }
142
+ // ── QUICK REFERENCE ────────────────────────────────────
143
+ content += '---\n\n';
144
+ content += '## Quick Reference\n\n';
145
+ content += '**"What files work together for feature X?"**\n';
146
+ content += '→ Check Module Clusters above.\n\n';
147
+ content += '**"Where does data flow from this endpoint?"**\n';
148
+ content += '→ Check Critical Flows and Dependency Chains.\n\n';
149
+ content += '**"Where are external connections?"**\n';
150
+ content += '→ Check External Integrations.\n';
151
+ }
152
+ content += `\n\n_Generated: ${generatedAt}_\n`;
153
+ return (0, helpers_1.enforceLineBudget)(content, constants_1.KB_SIZE_LIMITS.context, 'context.md', generatedAt);
154
+ }
155
+ //# sourceMappingURL=contextEmitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextEmitter.js","sourceRoot":"","sources":["../../src/kb/contextEmitter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AA6BH,kDAmLC;AA7MD,2CAA6C;AAC7C,uCAAgE;AAChE,+CAAkE;AAClE,+CAA6D;AAC7D,2CAKqB;AACrB,2CAA+C;AAY/C;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAA0B;IAC5D,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEhF,IAAI,OAAO,GAAG,eAAe,CAAC;IAC9B,OAAO;QACL,uFAAuF,CAAC;IAE1F,uDAAuD;IACvD,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAC9B,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,0BAAY,EAAC,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,KAAK;QAC/C,IAAA,0BAAY,EAAC,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,KAAK,CAClD,CAAC;IACF,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,0BAAY,EAAC,CAAC,EAAE,aAAa,CAAC,KAAK,KAAK,CAAC,CAAC;IAE/E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,0DAA0D,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,0DAA0D;QAC1D,MAAM,QAAQ,GAAG,IAAA,8BAAkB,E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gB,EAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;QACvE,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,OAAO,IAAI,6BAA6B,CAAC;YACzC,OAAO,IAAI,6DAA6D,CAAC;YAEzE,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;gBAC/B,OAAO,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC;gBAClC,OAAO,IAAI,WAAW,KAAK,CAAC,IAAI,cAAc,CAAC;YACjD,CAAC;QACH,CAAC;QAED,0DAA0D;QAC1D,OAAO,IAAI,SAAS,CAAC;QACrB,OAAO,IAAI,wBAAwB,CAAC;QACpC,OAAO,IAAI,iDAAiD,CAAC;QAC7D,OAAO,IAAI,oCAAoC,CAAC;QAChD,OAAO,IAAI,kDAAkD,CAAC;QAC9D,OAAO,IAAI,mDAAmD,CAAC;QAC/D,OAAO,IAAI,yCAAyC,CAAC;QACrD,OAAO,IAAI,kCAAkC,CAAC;IAChD,CAAC;IAED,OAAO,IAAI,mBAAmB,WAAW,KAAK,CAAC;IAE/C,OAAO,IAAA,2BAAiB,EAAC,OAAO,EAAE,0BAAc,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Convention-analysis helpers — file-naming, function-naming, class-naming,
3
+ * import patterns, test-naming, and framework detection.
4
+ *
5
+ * Functions that originally did I/O via vscode.workspace.fs now accept
6
+ * a `fileContentCache` parameter.
7
+ *
8
+ * All functions are pure (no I/O, no vscode).
9
+ */
10
+ export declare function analyzeFileNaming(files: string[], _workspaceRoot: string): {
11
+ patterns: Array<{
12
+ style: string;
13
+ example: string;
14
+ count: number;
15
+ }>;
16
+ dominant: string | null;
17
+ };
18
+ export declare function analyzeFunctionNaming(files: string[], fileContentCache: Map<string, string>): {
19
+ patterns: Array<{
20
+ pattern: string;
21
+ example: string;
22
+ usage: string;
23
+ }>;
24
+ };
25
+ export declare function analyzeClassNaming(files: string[], fileContentCache: Map<string, string>): {
26
+ patterns: Array<{
27
+ pattern: string;
28
+ example: string;
29
+ usage: string;
30
+ }>;
31
+ };
32
+ export declare function analyzeImportPatterns(files: string[], fileContentCache: Map<string, string>): Array<{
33
+ language: string;
34
+ example: string;
35
+ }>;
36
+ export declare function analyzeTestNaming(files: string[], _workspaceRoot: string): {
37
+ patterns: Array<{
38
+ pattern: string;
39
+ example: string;
40
+ }>;
41
+ };
42
+ export declare function detectFrameworkPatterns(files: string[], _workspaceRoot: string): Array<{
43
+ name: string;
44
+ patterns: string[];
45
+ }>;
46
+ export declare function getFixTemplate(rule: string): string | null;
47
+ export declare function analyzeTestOrganization(files: string[], workspaceRoot: string): {
48
+ testFiles: string[];
49
+ testDirs: string[];
50
+ testPatterns: string[];
51
+ };
52
+ //# sourceMappingURL=conventions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conventions.d.ts","sourceRoot":"","sources":["../../src/kb/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,MAAM,GACrB;IACD,QAAQ,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAyCA;AAID,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC;IACD,QAAQ,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE,CAgDA;AA8BD,wBAAgB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