erosolar-cli 1.7.193 → 1.7.195

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 (1086) hide show
  1. package/dist/contracts/module-schema.json +1 -1
  2. package/package.json +1 -1
  3. package/dist/StringUtils.d.ts +0 -8
  4. package/dist/StringUtils.d.ts.map +0 -1
  5. package/dist/StringUtils.js +0 -11
  6. package/dist/StringUtils.js.map +0 -1
  7. package/dist/adapters/browser/index.d.ts +0 -12
  8. package/dist/adapters/browser/index.d.ts.map +0 -1
  9. package/dist/adapters/browser/index.js +0 -11
  10. package/dist/adapters/browser/index.js.map +0 -1
  11. package/dist/adapters/node/index.d.ts +0 -17
  12. package/dist/adapters/node/index.d.ts.map +0 -1
  13. package/dist/adapters/node/index.js +0 -35
  14. package/dist/adapters/node/index.js.map +0 -1
  15. package/dist/adapters/remote/index.d.ts +0 -13
  16. package/dist/adapters/remote/index.d.ts.map +0 -1
  17. package/dist/adapters/remote/index.js +0 -20
  18. package/dist/adapters/remote/index.js.map +0 -1
  19. package/dist/adapters/types.d.ts +0 -14
  20. package/dist/adapters/types.d.ts.map +0 -1
  21. package/dist/adapters/types.js +0 -2
  22. package/dist/adapters/types.js.map +0 -1
  23. package/dist/alpha-zero/agentWrapper.d.ts +0 -84
  24. package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
  25. package/dist/alpha-zero/agentWrapper.js +0 -171
  26. package/dist/alpha-zero/agentWrapper.js.map +0 -1
  27. package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
  28. package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
  29. package/dist/alpha-zero/codeEvaluator.js +0 -273
  30. package/dist/alpha-zero/codeEvaluator.js.map +0 -1
  31. package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
  32. package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
  33. package/dist/alpha-zero/competitiveRunner.js +0 -224
  34. package/dist/alpha-zero/competitiveRunner.js.map +0 -1
  35. package/dist/alpha-zero/index.d.ts +0 -67
  36. package/dist/alpha-zero/index.d.ts.map +0 -1
  37. package/dist/alpha-zero/index.js +0 -99
  38. package/dist/alpha-zero/index.js.map +0 -1
  39. package/dist/alpha-zero/introspection.d.ts +0 -128
  40. package/dist/alpha-zero/introspection.d.ts.map +0 -1
  41. package/dist/alpha-zero/introspection.js +0 -300
  42. package/dist/alpha-zero/introspection.js.map +0 -1
  43. package/dist/alpha-zero/metricsTracker.d.ts +0 -71
  44. package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
  45. package/dist/alpha-zero/metricsTracker.js +0 -209
  46. package/dist/alpha-zero/metricsTracker.js.map +0 -1
  47. package/dist/alpha-zero/security/core.d.ts +0 -125
  48. package/dist/alpha-zero/security/core.d.ts.map +0 -1
  49. package/dist/alpha-zero/security/core.js +0 -271
  50. package/dist/alpha-zero/security/core.js.map +0 -1
  51. package/dist/alpha-zero/security/google.d.ts +0 -125
  52. package/dist/alpha-zero/security/google.d.ts.map +0 -1
  53. package/dist/alpha-zero/security/google.js +0 -311
  54. package/dist/alpha-zero/security/google.js.map +0 -1
  55. package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
  56. package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
  57. package/dist/alpha-zero/security/googleLoader.js +0 -41
  58. package/dist/alpha-zero/security/googleLoader.js.map +0 -1
  59. package/dist/alpha-zero/security/index.d.ts +0 -29
  60. package/dist/alpha-zero/security/index.d.ts.map +0 -1
  61. package/dist/alpha-zero/security/index.js +0 -32
  62. package/dist/alpha-zero/security/index.js.map +0 -1
  63. package/dist/alpha-zero/security/simulation.d.ts +0 -124
  64. package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
  65. package/dist/alpha-zero/security/simulation.js +0 -277
  66. package/dist/alpha-zero/security/simulation.js.map +0 -1
  67. package/dist/alpha-zero/selfModification.d.ts +0 -109
  68. package/dist/alpha-zero/selfModification.d.ts.map +0 -1
  69. package/dist/alpha-zero/selfModification.js +0 -233
  70. package/dist/alpha-zero/selfModification.js.map +0 -1
  71. package/dist/alpha-zero/types.d.ts +0 -170
  72. package/dist/alpha-zero/types.d.ts.map +0 -1
  73. package/dist/alpha-zero/types.js +0 -31
  74. package/dist/alpha-zero/types.js.map +0 -1
  75. package/dist/bin/erosolar.d.ts +0 -9
  76. package/dist/bin/erosolar.d.ts.map +0 -1
  77. package/dist/bin/erosolar.js +0 -88
  78. package/dist/bin/erosolar.js.map +0 -1
  79. package/dist/bin/selfTest.d.ts +0 -14
  80. package/dist/bin/selfTest.d.ts.map +0 -1
  81. package/dist/bin/selfTest.js +0 -406
  82. package/dist/bin/selfTest.js.map +0 -1
  83. package/dist/browser/BrowserSessionManager.d.ts +0 -307
  84. package/dist/browser/BrowserSessionManager.d.ts.map +0 -1
  85. package/dist/browser/BrowserSessionManager.js +0 -713
  86. package/dist/browser/BrowserSessionManager.js.map +0 -1
  87. package/dist/capabilities/advancedTestGenerationCapability.d.ts +0 -17
  88. package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +0 -1
  89. package/dist/capabilities/advancedTestGenerationCapability.js +0 -28
  90. package/dist/capabilities/advancedTestGenerationCapability.js.map +0 -1
  91. package/dist/capabilities/agentSpawningCapability.d.ts +0 -6
  92. package/dist/capabilities/agentSpawningCapability.d.ts.map +0 -1
  93. package/dist/capabilities/agentSpawningCapability.js +0 -115
  94. package/dist/capabilities/agentSpawningCapability.js.map +0 -1
  95. package/dist/capabilities/askUserCapability.d.ts +0 -21
  96. package/dist/capabilities/askUserCapability.d.ts.map +0 -1
  97. package/dist/capabilities/askUserCapability.js +0 -155
  98. package/dist/capabilities/askUserCapability.js.map +0 -1
  99. package/dist/capabilities/bashCapability.d.ts +0 -13
  100. package/dist/capabilities/bashCapability.d.ts.map +0 -1
  101. package/dist/capabilities/bashCapability.js +0 -24
  102. package/dist/capabilities/bashCapability.js.map +0 -1
  103. package/dist/capabilities/browserAutomationCapability.d.ts +0 -37
  104. package/dist/capabilities/browserAutomationCapability.d.ts.map +0 -1
  105. package/dist/capabilities/browserAutomationCapability.js +0 -49
  106. package/dist/capabilities/browserAutomationCapability.js.map +0 -1
  107. package/dist/capabilities/cloudCapability.d.ts +0 -13
  108. package/dist/capabilities/cloudCapability.d.ts.map +0 -1
  109. package/dist/capabilities/cloudCapability.js +0 -38
  110. package/dist/capabilities/cloudCapability.js.map +0 -1
  111. package/dist/capabilities/codeAnalysisCapability.d.ts +0 -13
  112. package/dist/capabilities/codeAnalysisCapability.d.ts.map +0 -1
  113. package/dist/capabilities/codeAnalysisCapability.js +0 -24
  114. package/dist/capabilities/codeAnalysisCapability.js.map +0 -1
  115. package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
  116. package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
  117. package/dist/capabilities/codeGenerationCapability.js +0 -25
  118. package/dist/capabilities/codeGenerationCapability.js.map +0 -1
  119. package/dist/capabilities/codeQualityCapability.d.ts +0 -13
  120. package/dist/capabilities/codeQualityCapability.d.ts.map +0 -1
  121. package/dist/capabilities/codeQualityCapability.js +0 -25
  122. package/dist/capabilities/codeQualityCapability.js.map +0 -1
  123. package/dist/capabilities/dependencySecurityCapability.d.ts +0 -13
  124. package/dist/capabilities/dependencySecurityCapability.d.ts.map +0 -1
  125. package/dist/capabilities/dependencySecurityCapability.js +0 -24
  126. package/dist/capabilities/dependencySecurityCapability.js.map +0 -1
  127. package/dist/capabilities/devCapability.d.ts +0 -13
  128. package/dist/capabilities/devCapability.d.ts.map +0 -1
  129. package/dist/capabilities/devCapability.js +0 -24
  130. package/dist/capabilities/devCapability.js.map +0 -1
  131. package/dist/capabilities/editCapability.d.ts +0 -17
  132. package/dist/capabilities/editCapability.d.ts.map +0 -1
  133. package/dist/capabilities/editCapability.js +0 -27
  134. package/dist/capabilities/editCapability.js.map +0 -1
  135. package/dist/capabilities/emailCapability.d.ts +0 -12
  136. package/dist/capabilities/emailCapability.d.ts.map +0 -1
  137. package/dist/capabilities/emailCapability.js +0 -22
  138. package/dist/capabilities/emailCapability.js.map +0 -1
  139. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +0 -17
  140. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +0 -1
  141. package/dist/capabilities/enhancedCodeIntelligenceCapability.js +0 -28
  142. package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +0 -1
  143. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +0 -17
  144. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +0 -1
  145. package/dist/capabilities/enhancedDevWorkflowCapability.js +0 -28
  146. package/dist/capabilities/enhancedDevWorkflowCapability.js.map +0 -1
  147. package/dist/capabilities/enhancedGitCapability.d.ts +0 -7
  148. package/dist/capabilities/enhancedGitCapability.d.ts.map +0 -1
  149. package/dist/capabilities/enhancedGitCapability.js +0 -220
  150. package/dist/capabilities/enhancedGitCapability.js.map +0 -1
  151. package/dist/capabilities/filesystemCapability.d.ts +0 -13
  152. package/dist/capabilities/filesystemCapability.d.ts.map +0 -1
  153. package/dist/capabilities/filesystemCapability.js +0 -24
  154. package/dist/capabilities/filesystemCapability.js.map +0 -1
  155. package/dist/capabilities/frontendTestingCapability.d.ts +0 -13
  156. package/dist/capabilities/frontendTestingCapability.d.ts.map +0 -1
  157. package/dist/capabilities/frontendTestingCapability.js +0 -28
  158. package/dist/capabilities/frontendTestingCapability.js.map +0 -1
  159. package/dist/capabilities/globCapability.d.ts +0 -17
  160. package/dist/capabilities/globCapability.d.ts.map +0 -1
  161. package/dist/capabilities/globCapability.js +0 -27
  162. package/dist/capabilities/globCapability.js.map +0 -1
  163. package/dist/capabilities/index.d.ts +0 -25
  164. package/dist/capabilities/index.d.ts.map +0 -1
  165. package/dist/capabilities/index.js +0 -25
  166. package/dist/capabilities/index.js.map +0 -1
  167. package/dist/capabilities/interactionCapability.d.ts +0 -12
  168. package/dist/capabilities/interactionCapability.d.ts.map +0 -1
  169. package/dist/capabilities/interactionCapability.js +0 -22
  170. package/dist/capabilities/interactionCapability.js.map +0 -1
  171. package/dist/capabilities/learnCapability.d.ts +0 -13
  172. package/dist/capabilities/learnCapability.d.ts.map +0 -1
  173. package/dist/capabilities/learnCapability.js +0 -24
  174. package/dist/capabilities/learnCapability.js.map +0 -1
  175. package/dist/capabilities/mcpCapability.d.ts +0 -6
  176. package/dist/capabilities/mcpCapability.d.ts.map +0 -1
  177. package/dist/capabilities/mcpCapability.js +0 -19
  178. package/dist/capabilities/mcpCapability.js.map +0 -1
  179. package/dist/capabilities/notebookCapability.d.ts +0 -17
  180. package/dist/capabilities/notebookCapability.d.ts.map +0 -1
  181. package/dist/capabilities/notebookCapability.js +0 -27
  182. package/dist/capabilities/notebookCapability.js.map +0 -1
  183. package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
  184. package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
  185. package/dist/capabilities/performanceMonitoringCapability.js +0 -176
  186. package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
  187. package/dist/capabilities/planningCapability.d.ts +0 -16
  188. package/dist/capabilities/planningCapability.d.ts.map +0 -1
  189. package/dist/capabilities/planningCapability.js +0 -26
  190. package/dist/capabilities/planningCapability.js.map +0 -1
  191. package/dist/capabilities/refactoringCapability.d.ts +0 -13
  192. package/dist/capabilities/refactoringCapability.d.ts.map +0 -1
  193. package/dist/capabilities/refactoringCapability.js +0 -25
  194. package/dist/capabilities/refactoringCapability.js.map +0 -1
  195. package/dist/capabilities/repoChecksCapability.d.ts +0 -10
  196. package/dist/capabilities/repoChecksCapability.d.ts.map +0 -1
  197. package/dist/capabilities/repoChecksCapability.js +0 -24
  198. package/dist/capabilities/repoChecksCapability.js.map +0 -1
  199. package/dist/capabilities/searchCapability.d.ts +0 -13
  200. package/dist/capabilities/searchCapability.d.ts.map +0 -1
  201. package/dist/capabilities/searchCapability.js +0 -24
  202. package/dist/capabilities/searchCapability.js.map +0 -1
  203. package/dist/capabilities/skillCapability.d.ts +0 -3
  204. package/dist/capabilities/skillCapability.d.ts.map +0 -1
  205. package/dist/capabilities/skillCapability.js +0 -77
  206. package/dist/capabilities/skillCapability.js.map +0 -1
  207. package/dist/capabilities/taskManagementCapability.d.ts +0 -12
  208. package/dist/capabilities/taskManagementCapability.d.ts.map +0 -1
  209. package/dist/capabilities/taskManagementCapability.js +0 -22
  210. package/dist/capabilities/taskManagementCapability.js.map +0 -1
  211. package/dist/capabilities/testingCapability.d.ts +0 -13
  212. package/dist/capabilities/testingCapability.d.ts.map +0 -1
  213. package/dist/capabilities/testingCapability.js +0 -25
  214. package/dist/capabilities/testingCapability.js.map +0 -1
  215. package/dist/capabilities/todoCapability.d.ts +0 -19
  216. package/dist/capabilities/todoCapability.d.ts.map +0 -1
  217. package/dist/capabilities/todoCapability.js +0 -169
  218. package/dist/capabilities/todoCapability.js.map +0 -1
  219. package/dist/capabilities/toolManifest.d.ts +0 -3
  220. package/dist/capabilities/toolManifest.d.ts.map +0 -1
  221. package/dist/capabilities/toolManifest.js +0 -160
  222. package/dist/capabilities/toolManifest.js.map +0 -1
  223. package/dist/capabilities/toolRegistry.d.ts +0 -22
  224. package/dist/capabilities/toolRegistry.d.ts.map +0 -1
  225. package/dist/capabilities/toolRegistry.js +0 -115
  226. package/dist/capabilities/toolRegistry.js.map +0 -1
  227. package/dist/capabilities/validationCapability.d.ts +0 -13
  228. package/dist/capabilities/validationCapability.d.ts.map +0 -1
  229. package/dist/capabilities/validationCapability.js +0 -24
  230. package/dist/capabilities/validationCapability.js.map +0 -1
  231. package/dist/capabilities/webCapability.d.ts +0 -12
  232. package/dist/capabilities/webCapability.d.ts.map +0 -1
  233. package/dist/capabilities/webCapability.js +0 -22
  234. package/dist/capabilities/webCapability.js.map +0 -1
  235. package/dist/config.d.ts +0 -25
  236. package/dist/config.d.ts.map +0 -1
  237. package/dist/config.js +0 -140
  238. package/dist/config.js.map +0 -1
  239. package/dist/contracts/v1/agent.d.ts +0 -147
  240. package/dist/contracts/v1/agent.d.ts.map +0 -1
  241. package/dist/contracts/v1/agent.js +0 -8
  242. package/dist/contracts/v1/agent.js.map +0 -1
  243. package/dist/contracts/v1/agentProfileManifest.d.ts +0 -60
  244. package/dist/contracts/v1/agentProfileManifest.d.ts.map +0 -1
  245. package/dist/contracts/v1/agentProfileManifest.js +0 -9
  246. package/dist/contracts/v1/agentProfileManifest.js.map +0 -1
  247. package/dist/contracts/v1/agentRules.d.ts +0 -60
  248. package/dist/contracts/v1/agentRules.d.ts.map +0 -1
  249. package/dist/contracts/v1/agentRules.js +0 -10
  250. package/dist/contracts/v1/agentRules.js.map +0 -1
  251. package/dist/contracts/v1/provider.d.ts +0 -149
  252. package/dist/contracts/v1/provider.d.ts.map +0 -1
  253. package/dist/contracts/v1/provider.js +0 -7
  254. package/dist/contracts/v1/provider.js.map +0 -1
  255. package/dist/contracts/v1/tool.d.ts +0 -136
  256. package/dist/contracts/v1/tool.d.ts.map +0 -1
  257. package/dist/contracts/v1/tool.js +0 -7
  258. package/dist/contracts/v1/tool.js.map +0 -1
  259. package/dist/contracts/v1/toolAccess.d.ts +0 -43
  260. package/dist/contracts/v1/toolAccess.d.ts.map +0 -1
  261. package/dist/contracts/v1/toolAccess.js +0 -9
  262. package/dist/contracts/v1/toolAccess.js.map +0 -1
  263. package/dist/core/LazyLoader.d.ts +0 -129
  264. package/dist/core/LazyLoader.d.ts.map +0 -1
  265. package/dist/core/LazyLoader.js +0 -240
  266. package/dist/core/LazyLoader.js.map +0 -1
  267. package/dist/core/agent.d.ts +0 -144
  268. package/dist/core/agent.d.ts.map +0 -1
  269. package/dist/core/agent.js +0 -780
  270. package/dist/core/agent.js.map +0 -1
  271. package/dist/core/agentProfileManifest.d.ts +0 -3
  272. package/dist/core/agentProfileManifest.d.ts.map +0 -1
  273. package/dist/core/agentProfileManifest.js +0 -188
  274. package/dist/core/agentProfileManifest.js.map +0 -1
  275. package/dist/core/agentProfiles.d.ts +0 -22
  276. package/dist/core/agentProfiles.d.ts.map +0 -1
  277. package/dist/core/agentProfiles.js +0 -35
  278. package/dist/core/agentProfiles.js.map +0 -1
  279. package/dist/core/agentRulebook.d.ts +0 -11
  280. package/dist/core/agentRulebook.d.ts.map +0 -1
  281. package/dist/core/agentRulebook.js +0 -136
  282. package/dist/core/agentRulebook.js.map +0 -1
  283. package/dist/core/agentSchemaLoader.d.ts +0 -131
  284. package/dist/core/agentSchemaLoader.d.ts.map +0 -1
  285. package/dist/core/agentSchemaLoader.js +0 -234
  286. package/dist/core/agentSchemaLoader.js.map +0 -1
  287. package/dist/core/cliTestHarness.d.ts +0 -200
  288. package/dist/core/cliTestHarness.d.ts.map +0 -1
  289. package/dist/core/cliTestHarness.js +0 -549
  290. package/dist/core/cliTestHarness.js.map +0 -1
  291. package/dist/core/contextManager.d.ts +0 -259
  292. package/dist/core/contextManager.d.ts.map +0 -1
  293. package/dist/core/contextManager.js +0 -1057
  294. package/dist/core/contextManager.js.map +0 -1
  295. package/dist/core/contextWindow.d.ts +0 -42
  296. package/dist/core/contextWindow.d.ts.map +0 -1
  297. package/dist/core/contextWindow.js +0 -123
  298. package/dist/core/contextWindow.js.map +0 -1
  299. package/dist/core/customCommands.d.ts +0 -18
  300. package/dist/core/customCommands.d.ts.map +0 -1
  301. package/dist/core/customCommands.js +0 -81
  302. package/dist/core/customCommands.js.map +0 -1
  303. package/dist/core/errors/apiKeyErrors.d.ts +0 -11
  304. package/dist/core/errors/apiKeyErrors.d.ts.map +0 -1
  305. package/dist/core/errors/apiKeyErrors.js +0 -159
  306. package/dist/core/errors/apiKeyErrors.js.map +0 -1
  307. package/dist/core/errors/errorTypes.d.ts +0 -111
  308. package/dist/core/errors/errorTypes.d.ts.map +0 -1
  309. package/dist/core/errors/errorTypes.js +0 -348
  310. package/dist/core/errors/errorTypes.js.map +0 -1
  311. package/dist/core/errors/safetyValidator.d.ts +0 -71
  312. package/dist/core/errors/safetyValidator.d.ts.map +0 -1
  313. package/dist/core/errors/safetyValidator.js +0 -302
  314. package/dist/core/errors/safetyValidator.js.map +0 -1
  315. package/dist/core/errors.d.ts +0 -4
  316. package/dist/core/errors.d.ts.map +0 -1
  317. package/dist/core/errors.js +0 -33
  318. package/dist/core/errors.js.map +0 -1
  319. package/dist/core/isolatedVerifier.d.ts +0 -40
  320. package/dist/core/isolatedVerifier.d.ts.map +0 -1
  321. package/dist/core/isolatedVerifier.js +0 -129
  322. package/dist/core/isolatedVerifier.js.map +0 -1
  323. package/dist/core/modelDiscovery.d.ts +0 -101
  324. package/dist/core/modelDiscovery.d.ts.map +0 -1
  325. package/dist/core/modelDiscovery.js +0 -780
  326. package/dist/core/modelDiscovery.js.map +0 -1
  327. package/dist/core/multilinePasteHandler.d.ts +0 -35
  328. package/dist/core/multilinePasteHandler.d.ts.map +0 -1
  329. package/dist/core/multilinePasteHandler.js +0 -80
  330. package/dist/core/multilinePasteHandler.js.map +0 -1
  331. package/dist/core/performanceMonitor.d.ts +0 -106
  332. package/dist/core/performanceMonitor.d.ts.map +0 -1
  333. package/dist/core/performanceMonitor.js +0 -195
  334. package/dist/core/performanceMonitor.js.map +0 -1
  335. package/dist/core/preferences.d.ts +0 -31
  336. package/dist/core/preferences.d.ts.map +0 -1
  337. package/dist/core/preferences.js +0 -232
  338. package/dist/core/preferences.js.map +0 -1
  339. package/dist/core/responseVerifier.d.ts +0 -98
  340. package/dist/core/responseVerifier.d.ts.map +0 -1
  341. package/dist/core/responseVerifier.js +0 -509
  342. package/dist/core/responseVerifier.js.map +0 -1
  343. package/dist/core/resultVerification.d.ts +0 -141
  344. package/dist/core/resultVerification.d.ts.map +0 -1
  345. package/dist/core/resultVerification.js +0 -482
  346. package/dist/core/resultVerification.js.map +0 -1
  347. package/dist/core/schemaValidator.d.ts +0 -6
  348. package/dist/core/schemaValidator.d.ts.map +0 -1
  349. package/dist/core/schemaValidator.js +0 -93
  350. package/dist/core/schemaValidator.js.map +0 -1
  351. package/dist/core/secretStore.d.ts +0 -47
  352. package/dist/core/secretStore.d.ts.map +0 -1
  353. package/dist/core/secretStore.js +0 -364
  354. package/dist/core/secretStore.js.map +0 -1
  355. package/dist/core/sessionStore.d.ts +0 -33
  356. package/dist/core/sessionStore.d.ts.map +0 -1
  357. package/dist/core/sessionStore.js +0 -188
  358. package/dist/core/sessionStore.js.map +0 -1
  359. package/dist/core/toolPreconditions.d.ts +0 -41
  360. package/dist/core/toolPreconditions.d.ts.map +0 -1
  361. package/dist/core/toolPreconditions.js +0 -267
  362. package/dist/core/toolPreconditions.js.map +0 -1
  363. package/dist/core/toolRuntime.d.ts +0 -137
  364. package/dist/core/toolRuntime.d.ts.map +0 -1
  365. package/dist/core/toolRuntime.js +0 -380
  366. package/dist/core/toolRuntime.js.map +0 -1
  367. package/dist/core/types.d.ts +0 -141
  368. package/dist/core/types.d.ts.map +0 -1
  369. package/dist/core/types.js +0 -2
  370. package/dist/core/types.js.map +0 -1
  371. package/dist/core/unified/errors.d.ts +0 -189
  372. package/dist/core/unified/errors.d.ts.map +0 -1
  373. package/dist/core/unified/errors.js +0 -497
  374. package/dist/core/unified/errors.js.map +0 -1
  375. package/dist/core/unified/index.d.ts +0 -19
  376. package/dist/core/unified/index.d.ts.map +0 -1
  377. package/dist/core/unified/index.js +0 -68
  378. package/dist/core/unified/index.js.map +0 -1
  379. package/dist/core/unified/schema.d.ts +0 -101
  380. package/dist/core/unified/schema.d.ts.map +0 -1
  381. package/dist/core/unified/schema.js +0 -350
  382. package/dist/core/unified/schema.js.map +0 -1
  383. package/dist/core/unified/toolRuntime.d.ts +0 -179
  384. package/dist/core/unified/toolRuntime.d.ts.map +0 -1
  385. package/dist/core/unified/toolRuntime.js +0 -517
  386. package/dist/core/unified/toolRuntime.js.map +0 -1
  387. package/dist/core/unified/tools.d.ts +0 -127
  388. package/dist/core/unified/tools.d.ts.map +0 -1
  389. package/dist/core/unified/tools.js +0 -1333
  390. package/dist/core/unified/tools.js.map +0 -1
  391. package/dist/core/unified/types.d.ts +0 -352
  392. package/dist/core/unified/types.d.ts.map +0 -1
  393. package/dist/core/unified/types.js +0 -12
  394. package/dist/core/unified/types.js.map +0 -1
  395. package/dist/core/unified/version.d.ts +0 -209
  396. package/dist/core/unified/version.d.ts.map +0 -1
  397. package/dist/core/unified/version.js +0 -454
  398. package/dist/core/unified/version.js.map +0 -1
  399. package/dist/core/validationRunner.d.ts +0 -93
  400. package/dist/core/validationRunner.d.ts.map +0 -1
  401. package/dist/core/validationRunner.js +0 -740
  402. package/dist/core/validationRunner.js.map +0 -1
  403. package/dist/headless/headlessApp.d.ts +0 -5
  404. package/dist/headless/headlessApp.d.ts.map +0 -1
  405. package/dist/headless/headlessApp.js +0 -189
  406. package/dist/headless/headlessApp.js.map +0 -1
  407. package/dist/intelligence/codeIntelligence.d.ts +0 -84
  408. package/dist/intelligence/codeIntelligence.d.ts.map +0 -1
  409. package/dist/intelligence/codeIntelligence.js +0 -493
  410. package/dist/intelligence/codeIntelligence.js.map +0 -1
  411. package/dist/intelligence/docGenerator.d.ts +0 -86
  412. package/dist/intelligence/docGenerator.d.ts.map +0 -1
  413. package/dist/intelligence/docGenerator.js +0 -564
  414. package/dist/intelligence/docGenerator.js.map +0 -1
  415. package/dist/intelligence/index.d.ts +0 -51
  416. package/dist/intelligence/index.d.ts.map +0 -1
  417. package/dist/intelligence/index.js +0 -253
  418. package/dist/intelligence/index.js.map +0 -1
  419. package/dist/intelligence/refactoring.d.ts +0 -50
  420. package/dist/intelligence/refactoring.d.ts.map +0 -1
  421. package/dist/intelligence/refactoring.js +0 -354
  422. package/dist/intelligence/refactoring.js.map +0 -1
  423. package/dist/intelligence/testGenerator.d.ts +0 -74
  424. package/dist/intelligence/testGenerator.d.ts.map +0 -1
  425. package/dist/intelligence/testGenerator.js +0 -483
  426. package/dist/intelligence/testGenerator.js.map +0 -1
  427. package/dist/mcp/config.d.ts +0 -8
  428. package/dist/mcp/config.d.ts.map +0 -1
  429. package/dist/mcp/config.js +0 -252
  430. package/dist/mcp/config.js.map +0 -1
  431. package/dist/mcp/sseClient.d.ts +0 -34
  432. package/dist/mcp/sseClient.d.ts.map +0 -1
  433. package/dist/mcp/sseClient.js +0 -299
  434. package/dist/mcp/sseClient.js.map +0 -1
  435. package/dist/mcp/stdioClient.d.ts +0 -24
  436. package/dist/mcp/stdioClient.d.ts.map +0 -1
  437. package/dist/mcp/stdioClient.js +0 -179
  438. package/dist/mcp/stdioClient.js.map +0 -1
  439. package/dist/mcp/toolBridge.d.ts +0 -12
  440. package/dist/mcp/toolBridge.d.ts.map +0 -1
  441. package/dist/mcp/toolBridge.js +0 -117
  442. package/dist/mcp/toolBridge.js.map +0 -1
  443. package/dist/mcp/types.d.ts +0 -60
  444. package/dist/mcp/types.d.ts.map +0 -1
  445. package/dist/mcp/types.js +0 -2
  446. package/dist/mcp/types.js.map +0 -1
  447. package/dist/plugins/index.d.ts +0 -49
  448. package/dist/plugins/index.d.ts.map +0 -1
  449. package/dist/plugins/index.js +0 -114
  450. package/dist/plugins/index.js.map +0 -1
  451. package/dist/plugins/providers/anthropic/index.d.ts +0 -11
  452. package/dist/plugins/providers/anthropic/index.d.ts.map +0 -1
  453. package/dist/plugins/providers/anthropic/index.js +0 -38
  454. package/dist/plugins/providers/anthropic/index.js.map +0 -1
  455. package/dist/plugins/providers/deepseek/index.d.ts +0 -11
  456. package/dist/plugins/providers/deepseek/index.d.ts.map +0 -1
  457. package/dist/plugins/providers/deepseek/index.js +0 -52
  458. package/dist/plugins/providers/deepseek/index.js.map +0 -1
  459. package/dist/plugins/providers/google/index.d.ts +0 -11
  460. package/dist/plugins/providers/google/index.d.ts.map +0 -1
  461. package/dist/plugins/providers/google/index.js +0 -40
  462. package/dist/plugins/providers/google/index.js.map +0 -1
  463. package/dist/plugins/providers/index.d.ts +0 -2
  464. package/dist/plugins/providers/index.d.ts.map +0 -1
  465. package/dist/plugins/providers/index.js +0 -20
  466. package/dist/plugins/providers/index.js.map +0 -1
  467. package/dist/plugins/providers/ollama/index.d.ts +0 -21
  468. package/dist/plugins/providers/ollama/index.d.ts.map +0 -1
  469. package/dist/plugins/providers/ollama/index.js +0 -69
  470. package/dist/plugins/providers/ollama/index.js.map +0 -1
  471. package/dist/plugins/providers/openai/index.d.ts +0 -12
  472. package/dist/plugins/providers/openai/index.d.ts.map +0 -1
  473. package/dist/plugins/providers/openai/index.js +0 -39
  474. package/dist/plugins/providers/openai/index.js.map +0 -1
  475. package/dist/plugins/providers/xai/index.d.ts +0 -11
  476. package/dist/plugins/providers/xai/index.d.ts.map +0 -1
  477. package/dist/plugins/providers/xai/index.js +0 -39
  478. package/dist/plugins/providers/xai/index.js.map +0 -1
  479. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +0 -3
  480. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +0 -1
  481. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -9
  482. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +0 -1
  483. package/dist/plugins/tools/bash/localBashPlugin.d.ts +0 -3
  484. package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +0 -1
  485. package/dist/plugins/tools/bash/localBashPlugin.js +0 -14
  486. package/dist/plugins/tools/bash/localBashPlugin.js.map +0 -1
  487. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +0 -14
  488. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +0 -1
  489. package/dist/plugins/tools/browser/browserAutomationPlugin.js +0 -26
  490. package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +0 -1
  491. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +0 -3
  492. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +0 -1
  493. package/dist/plugins/tools/checks/localRepoChecksPlugin.js +0 -14
  494. package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +0 -1
  495. package/dist/plugins/tools/cloud/cloudPlugin.d.ts +0 -3
  496. package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +0 -1
  497. package/dist/plugins/tools/cloud/cloudPlugin.js +0 -14
  498. package/dist/plugins/tools/cloud/cloudPlugin.js.map +0 -1
  499. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +0 -3
  500. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +0 -1
  501. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -14
  502. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +0 -1
  503. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +0 -3
  504. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +0 -1
  505. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +0 -14
  506. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +0 -1
  507. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +0 -3
  508. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +0 -1
  509. package/dist/plugins/tools/dependency/dependencyPlugin.js +0 -12
  510. package/dist/plugins/tools/dependency/dependencyPlugin.js.map +0 -1
  511. package/dist/plugins/tools/development/devPlugin.d.ts +0 -3
  512. package/dist/plugins/tools/development/devPlugin.d.ts.map +0 -1
  513. package/dist/plugins/tools/development/devPlugin.js +0 -14
  514. package/dist/plugins/tools/development/devPlugin.js.map +0 -1
  515. package/dist/plugins/tools/edit/editPlugin.d.ts +0 -9
  516. package/dist/plugins/tools/edit/editPlugin.d.ts.map +0 -1
  517. package/dist/plugins/tools/edit/editPlugin.js +0 -15
  518. package/dist/plugins/tools/edit/editPlugin.js.map +0 -1
  519. package/dist/plugins/tools/email/emailPlugin.d.ts +0 -3
  520. package/dist/plugins/tools/email/emailPlugin.d.ts.map +0 -1
  521. package/dist/plugins/tools/email/emailPlugin.js +0 -12
  522. package/dist/plugins/tools/email/emailPlugin.js.map +0 -1
  523. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +0 -3
  524. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +0 -1
  525. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -9
  526. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +0 -1
  527. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +0 -3
  528. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +0 -1
  529. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +0 -14
  530. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +0 -1
  531. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +0 -3
  532. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +0 -1
  533. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +0 -14
  534. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +0 -1
  535. package/dist/plugins/tools/glob/globPlugin.d.ts +0 -9
  536. package/dist/plugins/tools/glob/globPlugin.d.ts.map +0 -1
  537. package/dist/plugins/tools/glob/globPlugin.js +0 -15
  538. package/dist/plugins/tools/glob/globPlugin.js.map +0 -1
  539. package/dist/plugins/tools/index.d.ts +0 -3
  540. package/dist/plugins/tools/index.d.ts.map +0 -1
  541. package/dist/plugins/tools/index.js +0 -3
  542. package/dist/plugins/tools/index.js.map +0 -1
  543. package/dist/plugins/tools/interaction/interactionPlugin.d.ts +0 -3
  544. package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +0 -1
  545. package/dist/plugins/tools/interaction/interactionPlugin.js +0 -12
  546. package/dist/plugins/tools/interaction/interactionPlugin.js.map +0 -1
  547. package/dist/plugins/tools/learn/learnPlugin.d.ts +0 -3
  548. package/dist/plugins/tools/learn/learnPlugin.d.ts.map +0 -1
  549. package/dist/plugins/tools/learn/learnPlugin.js +0 -14
  550. package/dist/plugins/tools/learn/learnPlugin.js.map +0 -1
  551. package/dist/plugins/tools/mcp/mcpPlugin.d.ts +0 -3
  552. package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +0 -1
  553. package/dist/plugins/tools/mcp/mcpPlugin.js +0 -9
  554. package/dist/plugins/tools/mcp/mcpPlugin.js.map +0 -1
  555. package/dist/plugins/tools/nodeDefaults.d.ts +0 -2
  556. package/dist/plugins/tools/nodeDefaults.d.ts.map +0 -1
  557. package/dist/plugins/tools/nodeDefaults.js +0 -63
  558. package/dist/plugins/tools/nodeDefaults.js.map +0 -1
  559. package/dist/plugins/tools/notebook/notebookPlugin.d.ts +0 -9
  560. package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +0 -1
  561. package/dist/plugins/tools/notebook/notebookPlugin.js +0 -15
  562. package/dist/plugins/tools/notebook/notebookPlugin.js.map +0 -1
  563. package/dist/plugins/tools/planning/planningPlugin.d.ts +0 -9
  564. package/dist/plugins/tools/planning/planningPlugin.d.ts.map +0 -1
  565. package/dist/plugins/tools/planning/planningPlugin.js +0 -15
  566. package/dist/plugins/tools/planning/planningPlugin.js.map +0 -1
  567. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +0 -3
  568. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +0 -1
  569. package/dist/plugins/tools/refactoring/refactoringPlugin.js +0 -12
  570. package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +0 -1
  571. package/dist/plugins/tools/registry.d.ts +0 -22
  572. package/dist/plugins/tools/registry.d.ts.map +0 -1
  573. package/dist/plugins/tools/registry.js +0 -58
  574. package/dist/plugins/tools/registry.js.map +0 -1
  575. package/dist/plugins/tools/search/localSearchPlugin.d.ts +0 -3
  576. package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +0 -1
  577. package/dist/plugins/tools/search/localSearchPlugin.js +0 -14
  578. package/dist/plugins/tools/search/localSearchPlugin.js.map +0 -1
  579. package/dist/plugins/tools/skills/skillPlugin.d.ts +0 -3
  580. package/dist/plugins/tools/skills/skillPlugin.d.ts.map +0 -1
  581. package/dist/plugins/tools/skills/skillPlugin.js +0 -9
  582. package/dist/plugins/tools/skills/skillPlugin.js.map +0 -1
  583. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +0 -3
  584. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +0 -1
  585. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +0 -12
  586. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +0 -1
  587. package/dist/plugins/tools/testing/testingPlugin.d.ts +0 -3
  588. package/dist/plugins/tools/testing/testingPlugin.d.ts.map +0 -1
  589. package/dist/plugins/tools/testing/testingPlugin.js +0 -12
  590. package/dist/plugins/tools/testing/testingPlugin.js.map +0 -1
  591. package/dist/plugins/tools/validation/validationPlugin.d.ts +0 -3
  592. package/dist/plugins/tools/validation/validationPlugin.d.ts.map +0 -1
  593. package/dist/plugins/tools/validation/validationPlugin.js +0 -14
  594. package/dist/plugins/tools/validation/validationPlugin.js.map +0 -1
  595. package/dist/plugins/tools/web/webPlugin.d.ts +0 -3
  596. package/dist/plugins/tools/web/webPlugin.d.ts.map +0 -1
  597. package/dist/plugins/tools/web/webPlugin.js +0 -12
  598. package/dist/plugins/tools/web/webPlugin.js.map +0 -1
  599. package/dist/providers/anthropicProvider.d.ts +0 -41
  600. package/dist/providers/anthropicProvider.d.ts.map +0 -1
  601. package/dist/providers/anthropicProvider.js +0 -446
  602. package/dist/providers/anthropicProvider.js.map +0 -1
  603. package/dist/providers/googleProvider.d.ts +0 -36
  604. package/dist/providers/googleProvider.d.ts.map +0 -1
  605. package/dist/providers/googleProvider.js +0 -312
  606. package/dist/providers/googleProvider.js.map +0 -1
  607. package/dist/providers/openaiChatCompletionsProvider.d.ts +0 -43
  608. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +0 -1
  609. package/dist/providers/openaiChatCompletionsProvider.js +0 -469
  610. package/dist/providers/openaiChatCompletionsProvider.js.map +0 -1
  611. package/dist/providers/openaiResponsesProvider.d.ts +0 -38
  612. package/dist/providers/openaiResponsesProvider.d.ts.map +0 -1
  613. package/dist/providers/openaiResponsesProvider.js +0 -364
  614. package/dist/providers/openaiResponsesProvider.js.map +0 -1
  615. package/dist/providers/providerFactory.d.ts +0 -18
  616. package/dist/providers/providerFactory.d.ts.map +0 -1
  617. package/dist/providers/providerFactory.js +0 -25
  618. package/dist/providers/providerFactory.js.map +0 -1
  619. package/dist/providers/resilientProvider.d.ts +0 -94
  620. package/dist/providers/resilientProvider.d.ts.map +0 -1
  621. package/dist/providers/resilientProvider.js +0 -370
  622. package/dist/providers/resilientProvider.js.map +0 -1
  623. package/dist/runtime/agentController.d.ts +0 -65
  624. package/dist/runtime/agentController.d.ts.map +0 -1
  625. package/dist/runtime/agentController.js +0 -353
  626. package/dist/runtime/agentController.js.map +0 -1
  627. package/dist/runtime/agentHost.d.ts +0 -61
  628. package/dist/runtime/agentHost.d.ts.map +0 -1
  629. package/dist/runtime/agentHost.js +0 -156
  630. package/dist/runtime/agentHost.js.map +0 -1
  631. package/dist/runtime/agentSession.d.ts +0 -40
  632. package/dist/runtime/agentSession.d.ts.map +0 -1
  633. package/dist/runtime/agentSession.js +0 -206
  634. package/dist/runtime/agentSession.js.map +0 -1
  635. package/dist/runtime/browser.d.ts +0 -7
  636. package/dist/runtime/browser.d.ts.map +0 -1
  637. package/dist/runtime/browser.js +0 -10
  638. package/dist/runtime/browser.js.map +0 -1
  639. package/dist/runtime/cloud.d.ts +0 -7
  640. package/dist/runtime/cloud.d.ts.map +0 -1
  641. package/dist/runtime/cloud.js +0 -10
  642. package/dist/runtime/cloud.js.map +0 -1
  643. package/dist/runtime/node.d.ts +0 -8
  644. package/dist/runtime/node.d.ts.map +0 -1
  645. package/dist/runtime/node.js +0 -11
  646. package/dist/runtime/node.js.map +0 -1
  647. package/dist/runtime/universal.d.ts +0 -21
  648. package/dist/runtime/universal.d.ts.map +0 -1
  649. package/dist/runtime/universal.js +0 -29
  650. package/dist/runtime/universal.js.map +0 -1
  651. package/dist/security/active-stack-security.d.ts +0 -112
  652. package/dist/security/active-stack-security.d.ts.map +0 -1
  653. package/dist/security/active-stack-security.js +0 -296
  654. package/dist/security/active-stack-security.js.map +0 -1
  655. package/dist/security/advanced-persistence-research.d.ts +0 -92
  656. package/dist/security/advanced-persistence-research.d.ts.map +0 -1
  657. package/dist/security/advanced-persistence-research.js +0 -195
  658. package/dist/security/advanced-persistence-research.js.map +0 -1
  659. package/dist/security/advanced-targeting.d.ts +0 -119
  660. package/dist/security/advanced-targeting.d.ts.map +0 -1
  661. package/dist/security/advanced-targeting.js +0 -233
  662. package/dist/security/advanced-targeting.js.map +0 -1
  663. package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
  664. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
  665. package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
  666. package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
  667. package/dist/security/authorization/securityAuthorization.d.ts +0 -88
  668. package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
  669. package/dist/security/authorization/securityAuthorization.js +0 -172
  670. package/dist/security/authorization/securityAuthorization.js.map +0 -1
  671. package/dist/security/comprehensive-targeting.d.ts +0 -85
  672. package/dist/security/comprehensive-targeting.d.ts.map +0 -1
  673. package/dist/security/comprehensive-targeting.js +0 -438
  674. package/dist/security/comprehensive-targeting.js.map +0 -1
  675. package/dist/security/global-security-integration.d.ts +0 -91
  676. package/dist/security/global-security-integration.d.ts.map +0 -1
  677. package/dist/security/global-security-integration.js +0 -218
  678. package/dist/security/global-security-integration.js.map +0 -1
  679. package/dist/security/index.d.ts +0 -38
  680. package/dist/security/index.d.ts.map +0 -1
  681. package/dist/security/index.js +0 -47
  682. package/dist/security/index.js.map +0 -1
  683. package/dist/security/persistence-analyzer.d.ts +0 -56
  684. package/dist/security/persistence-analyzer.d.ts.map +0 -1
  685. package/dist/security/persistence-analyzer.js +0 -187
  686. package/dist/security/persistence-analyzer.js.map +0 -1
  687. package/dist/security/persistence-cli.d.ts +0 -36
  688. package/dist/security/persistence-cli.d.ts.map +0 -1
  689. package/dist/security/persistence-cli.js +0 -160
  690. package/dist/security/persistence-cli.js.map +0 -1
  691. package/dist/security/persistence-research.d.ts +0 -92
  692. package/dist/security/persistence-research.d.ts.map +0 -1
  693. package/dist/security/persistence-research.js +0 -364
  694. package/dist/security/persistence-research.js.map +0 -1
  695. package/dist/security/research/persistenceResearch.d.ts +0 -97
  696. package/dist/security/research/persistenceResearch.d.ts.map +0 -1
  697. package/dist/security/research/persistenceResearch.js +0 -282
  698. package/dist/security/research/persistenceResearch.js.map +0 -1
  699. package/dist/security/security-integration.d.ts +0 -74
  700. package/dist/security/security-integration.d.ts.map +0 -1
  701. package/dist/security/security-integration.js +0 -137
  702. package/dist/security/security-integration.js.map +0 -1
  703. package/dist/security/security-testing-framework.d.ts +0 -112
  704. package/dist/security/security-testing-framework.d.ts.map +0 -1
  705. package/dist/security/security-testing-framework.js +0 -364
  706. package/dist/security/security-testing-framework.js.map +0 -1
  707. package/dist/security/simulation/attackSimulation.d.ts +0 -93
  708. package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
  709. package/dist/security/simulation/attackSimulation.js +0 -341
  710. package/dist/security/simulation/attackSimulation.js.map +0 -1
  711. package/dist/security/strategic-operations.d.ts +0 -100
  712. package/dist/security/strategic-operations.d.ts.map +0 -1
  713. package/dist/security/strategic-operations.js +0 -276
  714. package/dist/security/strategic-operations.js.map +0 -1
  715. package/dist/security/tool-security-wrapper.d.ts +0 -58
  716. package/dist/security/tool-security-wrapper.d.ts.map +0 -1
  717. package/dist/security/tool-security-wrapper.js +0 -156
  718. package/dist/security/tool-security-wrapper.js.map +0 -1
  719. package/dist/shell/autoExecutor.d.ts +0 -70
  720. package/dist/shell/autoExecutor.d.ts.map +0 -1
  721. package/dist/shell/autoExecutor.js +0 -288
  722. package/dist/shell/autoExecutor.js.map +0 -1
  723. package/dist/shell/bracketedPasteManager.d.ts +0 -128
  724. package/dist/shell/bracketedPasteManager.d.ts.map +0 -1
  725. package/dist/shell/bracketedPasteManager.enhanced.d.ts +0 -2
  726. package/dist/shell/bracketedPasteManager.enhanced.d.ts.map +0 -1
  727. package/dist/shell/bracketedPasteManager.enhanced.js +0 -4
  728. package/dist/shell/bracketedPasteManager.enhanced.js.map +0 -1
  729. package/dist/shell/bracketedPasteManager.js +0 -372
  730. package/dist/shell/bracketedPasteManager.js.map +0 -1
  731. package/dist/shell/chatBox.d.ts +0 -228
  732. package/dist/shell/chatBox.d.ts.map +0 -1
  733. package/dist/shell/chatBox.js +0 -811
  734. package/dist/shell/chatBox.js.map +0 -1
  735. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  736. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  737. package/dist/shell/claudeCodeStreamHandler.js +0 -312
  738. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  739. package/dist/shell/composableMessage.d.ts +0 -183
  740. package/dist/shell/composableMessage.d.ts.map +0 -1
  741. package/dist/shell/composableMessage.js +0 -420
  742. package/dist/shell/composableMessage.js.map +0 -1
  743. package/dist/shell/fileChangeTracker.d.ts +0 -39
  744. package/dist/shell/fileChangeTracker.d.ts.map +0 -1
  745. package/dist/shell/fileChangeTracker.js +0 -64
  746. package/dist/shell/fileChangeTracker.js.map +0 -1
  747. package/dist/shell/inputQueueManager.d.ts +0 -144
  748. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  749. package/dist/shell/inputQueueManager.js +0 -290
  750. package/dist/shell/inputQueueManager.js.map +0 -1
  751. package/dist/shell/interactiveShell.d.ts +0 -300
  752. package/dist/shell/interactiveShell.d.ts.map +0 -1
  753. package/dist/shell/interactiveShell.js +0 -3189
  754. package/dist/shell/interactiveShell.js.map +0 -1
  755. package/dist/shell/liveStatus.d.ts +0 -29
  756. package/dist/shell/liveStatus.d.ts.map +0 -1
  757. package/dist/shell/liveStatus.js +0 -77
  758. package/dist/shell/liveStatus.js.map +0 -1
  759. package/dist/shell/shellApp.d.ts +0 -19
  760. package/dist/shell/shellApp.d.ts.map +0 -1
  761. package/dist/shell/shellApp.js +0 -348
  762. package/dist/shell/shellApp.js.map +0 -1
  763. package/dist/shell/streamingOutputManager.d.ts +0 -114
  764. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  765. package/dist/shell/streamingOutputManager.js +0 -213
  766. package/dist/shell/streamingOutputManager.js.map +0 -1
  767. package/dist/shell/systemPrompt.d.ts +0 -3
  768. package/dist/shell/systemPrompt.d.ts.map +0 -1
  769. package/dist/shell/systemPrompt.js +0 -73
  770. package/dist/shell/systemPrompt.js.map +0 -1
  771. package/dist/shell/taskCompletionDetector.d.ts +0 -106
  772. package/dist/shell/taskCompletionDetector.d.ts.map +0 -1
  773. package/dist/shell/taskCompletionDetector.js +0 -402
  774. package/dist/shell/taskCompletionDetector.js.map +0 -1
  775. package/dist/shell/terminalInput.d.ts +0 -217
  776. package/dist/shell/terminalInput.d.ts.map +0 -1
  777. package/dist/shell/terminalInput.js +0 -1066
  778. package/dist/shell/terminalInput.js.map +0 -1
  779. package/dist/shell/terminalInputAdapter.d.ts +0 -118
  780. package/dist/shell/terminalInputAdapter.d.ts.map +0 -1
  781. package/dist/shell/terminalInputAdapter.js +0 -218
  782. package/dist/shell/terminalInputAdapter.js.map +0 -1
  783. package/dist/shell/unifiedChatBox.d.ts +0 -194
  784. package/dist/shell/unifiedChatBox.d.ts.map +0 -1
  785. package/dist/shell/unifiedChatBox.js +0 -585
  786. package/dist/shell/unifiedChatBox.js.map +0 -1
  787. package/dist/shell/updateManager.d.ts +0 -2
  788. package/dist/shell/updateManager.d.ts.map +0 -1
  789. package/dist/shell/updateManager.js +0 -111
  790. package/dist/shell/updateManager.js.map +0 -1
  791. package/dist/skills/skillRepository.d.ts +0 -103
  792. package/dist/skills/skillRepository.d.ts.map +0 -1
  793. package/dist/skills/skillRepository.js +0 -237
  794. package/dist/skills/skillRepository.js.map +0 -1
  795. package/dist/skills/types.d.ts +0 -37
  796. package/dist/skills/types.d.ts.map +0 -1
  797. package/dist/skills/types.js +0 -2
  798. package/dist/skills/types.js.map +0 -1
  799. package/dist/subagents/taskRunner.d.ts +0 -23
  800. package/dist/subagents/taskRunner.d.ts.map +0 -1
  801. package/dist/subagents/taskRunner.js +0 -271
  802. package/dist/subagents/taskRunner.js.map +0 -1
  803. package/dist/tools/advancedTestGenerationTools.d.ts +0 -21
  804. package/dist/tools/advancedTestGenerationTools.d.ts.map +0 -1
  805. package/dist/tools/advancedTestGenerationTools.js +0 -301
  806. package/dist/tools/advancedTestGenerationTools.js.map +0 -1
  807. package/dist/tools/backgroundBashTools.d.ts +0 -21
  808. package/dist/tools/backgroundBashTools.d.ts.map +0 -1
  809. package/dist/tools/backgroundBashTools.js +0 -215
  810. package/dist/tools/backgroundBashTools.js.map +0 -1
  811. package/dist/tools/bashTools.d.ts +0 -8
  812. package/dist/tools/bashTools.d.ts.map +0 -1
  813. package/dist/tools/bashTools.js +0 -227
  814. package/dist/tools/bashTools.js.map +0 -1
  815. package/dist/tools/browserAutomationTools.d.ts +0 -23
  816. package/dist/tools/browserAutomationTools.d.ts.map +0 -1
  817. package/dist/tools/browserAutomationTools.js +0 -916
  818. package/dist/tools/browserAutomationTools.js.map +0 -1
  819. package/dist/tools/cloudTools.d.ts +0 -49
  820. package/dist/tools/cloudTools.d.ts.map +0 -1
  821. package/dist/tools/cloudTools.js +0 -1258
  822. package/dist/tools/cloudTools.js.map +0 -1
  823. package/dist/tools/code-quality-dashboard.d.ts +0 -57
  824. package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
  825. package/dist/tools/code-quality-dashboard.js +0 -218
  826. package/dist/tools/code-quality-dashboard.js.map +0 -1
  827. package/dist/tools/codeAnalysisTools.d.ts +0 -74
  828. package/dist/tools/codeAnalysisTools.d.ts.map +0 -1
  829. package/dist/tools/codeAnalysisTools.js +0 -664
  830. package/dist/tools/codeAnalysisTools.js.map +0 -1
  831. package/dist/tools/codeGenerationTools.d.ts +0 -3
  832. package/dist/tools/codeGenerationTools.d.ts.map +0 -1
  833. package/dist/tools/codeGenerationTools.js +0 -439
  834. package/dist/tools/codeGenerationTools.js.map +0 -1
  835. package/dist/tools/codeQualityTools.d.ts +0 -3
  836. package/dist/tools/codeQualityTools.d.ts.map +0 -1
  837. package/dist/tools/codeQualityTools.js +0 -296
  838. package/dist/tools/codeQualityTools.js.map +0 -1
  839. package/dist/tools/dependencyTools.d.ts +0 -3
  840. package/dist/tools/dependencyTools.d.ts.map +0 -1
  841. package/dist/tools/dependencyTools.js +0 -283
  842. package/dist/tools/dependencyTools.js.map +0 -1
  843. package/dist/tools/devTools.d.ts +0 -10
  844. package/dist/tools/devTools.d.ts.map +0 -1
  845. package/dist/tools/devTools.js +0 -2305
  846. package/dist/tools/devTools.js.map +0 -1
  847. package/dist/tools/diffUtils.d.ts +0 -36
  848. package/dist/tools/diffUtils.d.ts.map +0 -1
  849. package/dist/tools/diffUtils.js +0 -528
  850. package/dist/tools/diffUtils.js.map +0 -1
  851. package/dist/tools/editTools.d.ts +0 -29
  852. package/dist/tools/editTools.d.ts.map +0 -1
  853. package/dist/tools/editTools.js +0 -419
  854. package/dist/tools/editTools.js.map +0 -1
  855. package/dist/tools/emailTools.d.ts +0 -21
  856. package/dist/tools/emailTools.d.ts.map +0 -1
  857. package/dist/tools/emailTools.js +0 -449
  858. package/dist/tools/emailTools.js.map +0 -1
  859. package/dist/tools/enhancedCodeIntelligenceTools.d.ts +0 -27
  860. package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +0 -1
  861. package/dist/tools/enhancedCodeIntelligenceTools.js +0 -418
  862. package/dist/tools/enhancedCodeIntelligenceTools.js.map +0 -1
  863. package/dist/tools/enhancedDevWorkflowTools.d.ts +0 -15
  864. package/dist/tools/enhancedDevWorkflowTools.d.ts.map +0 -1
  865. package/dist/tools/enhancedDevWorkflowTools.js +0 -303
  866. package/dist/tools/enhancedDevWorkflowTools.js.map +0 -1
  867. package/dist/tools/fileTools.d.ts +0 -3
  868. package/dist/tools/fileTools.d.ts.map +0 -1
  869. package/dist/tools/fileTools.js +0 -252
  870. package/dist/tools/fileTools.js.map +0 -1
  871. package/dist/tools/frontendTestingTools.d.ts +0 -35
  872. package/dist/tools/frontendTestingTools.d.ts.map +0 -1
  873. package/dist/tools/frontendTestingTools.js +0 -1254
  874. package/dist/tools/frontendTestingTools.js.map +0 -1
  875. package/dist/tools/globTools.d.ts +0 -15
  876. package/dist/tools/globTools.d.ts.map +0 -1
  877. package/dist/tools/globTools.js +0 -174
  878. package/dist/tools/globTools.js.map +0 -1
  879. package/dist/tools/grepTools.d.ts +0 -19
  880. package/dist/tools/grepTools.d.ts.map +0 -1
  881. package/dist/tools/grepTools.js +0 -339
  882. package/dist/tools/grepTools.js.map +0 -1
  883. package/dist/tools/interactionTools.d.ts +0 -13
  884. package/dist/tools/interactionTools.d.ts.map +0 -1
  885. package/dist/tools/interactionTools.js +0 -171
  886. package/dist/tools/interactionTools.js.map +0 -1
  887. package/dist/tools/learnTools.d.ts +0 -152
  888. package/dist/tools/learnTools.d.ts.map +0 -1
  889. package/dist/tools/learnTools.js +0 -1819
  890. package/dist/tools/learnTools.js.map +0 -1
  891. package/dist/tools/notebookEditTools.d.ts +0 -15
  892. package/dist/tools/notebookEditTools.d.ts.map +0 -1
  893. package/dist/tools/notebookEditTools.js +0 -197
  894. package/dist/tools/notebookEditTools.js.map +0 -1
  895. package/dist/tools/planningTools.d.ts +0 -11
  896. package/dist/tools/planningTools.d.ts.map +0 -1
  897. package/dist/tools/planningTools.js +0 -47
  898. package/dist/tools/planningTools.js.map +0 -1
  899. package/dist/tools/refactoringTools.d.ts +0 -3
  900. package/dist/tools/refactoringTools.d.ts.map +0 -1
  901. package/dist/tools/refactoringTools.js +0 -294
  902. package/dist/tools/refactoringTools.js.map +0 -1
  903. package/dist/tools/repoChecksTools.d.ts +0 -3
  904. package/dist/tools/repoChecksTools.d.ts.map +0 -1
  905. package/dist/tools/repoChecksTools.js +0 -161
  906. package/dist/tools/repoChecksTools.js.map +0 -1
  907. package/dist/tools/searchTools.d.ts +0 -3
  908. package/dist/tools/searchTools.d.ts.map +0 -1
  909. package/dist/tools/searchTools.js +0 -207
  910. package/dist/tools/searchTools.js.map +0 -1
  911. package/dist/tools/skillTools.d.ts +0 -8
  912. package/dist/tools/skillTools.d.ts.map +0 -1
  913. package/dist/tools/skillTools.js +0 -178
  914. package/dist/tools/skillTools.js.map +0 -1
  915. package/dist/tools/softwareEngineeringTools.d.ts +0 -7
  916. package/dist/tools/softwareEngineeringTools.d.ts.map +0 -1
  917. package/dist/tools/softwareEngineeringTools.js +0 -338
  918. package/dist/tools/softwareEngineeringTools.js.map +0 -1
  919. package/dist/tools/taskManagementTools.d.ts +0 -10
  920. package/dist/tools/taskManagementTools.d.ts.map +0 -1
  921. package/dist/tools/taskManagementTools.js +0 -157
  922. package/dist/tools/taskManagementTools.js.map +0 -1
  923. package/dist/tools/testingTools.d.ts +0 -3
  924. package/dist/tools/testingTools.d.ts.map +0 -1
  925. package/dist/tools/testingTools.js +0 -233
  926. package/dist/tools/testingTools.js.map +0 -1
  927. package/dist/tools/validationTools.d.ts +0 -7
  928. package/dist/tools/validationTools.d.ts.map +0 -1
  929. package/dist/tools/validationTools.js +0 -278
  930. package/dist/tools/validationTools.js.map +0 -1
  931. package/dist/tools/webTools.d.ts +0 -3
  932. package/dist/tools/webTools.d.ts.map +0 -1
  933. package/dist/tools/webTools.js +0 -495
  934. package/dist/tools/webTools.js.map +0 -1
  935. package/dist/ui/FixedInputArea.d.ts +0 -108
  936. package/dist/ui/FixedInputArea.d.ts.map +0 -1
  937. package/dist/ui/FixedInputArea.js +0 -312
  938. package/dist/ui/FixedInputArea.js.map +0 -1
  939. package/dist/ui/ShellUIAdapter.d.ts +0 -141
  940. package/dist/ui/ShellUIAdapter.d.ts.map +0 -1
  941. package/dist/ui/ShellUIAdapter.js +0 -680
  942. package/dist/ui/ShellUIAdapter.js.map +0 -1
  943. package/dist/ui/UnifiedUIController.d.ts +0 -70
  944. package/dist/ui/UnifiedUIController.d.ts.map +0 -1
  945. package/dist/ui/UnifiedUIController.js +0 -190
  946. package/dist/ui/UnifiedUIController.js.map +0 -1
  947. package/dist/ui/advancedTheme.d.ts +0 -246
  948. package/dist/ui/advancedTheme.d.ts.map +0 -1
  949. package/dist/ui/advancedTheme.js +0 -478
  950. package/dist/ui/advancedTheme.js.map +0 -1
  951. package/dist/ui/animation/AnimationScheduler.d.ts +0 -192
  952. package/dist/ui/animation/AnimationScheduler.d.ts.map +0 -1
  953. package/dist/ui/animation/AnimationScheduler.js +0 -432
  954. package/dist/ui/animation/AnimationScheduler.js.map +0 -1
  955. package/dist/ui/codeHighlighter.d.ts +0 -6
  956. package/dist/ui/codeHighlighter.d.ts.map +0 -1
  957. package/dist/ui/codeHighlighter.js +0 -855
  958. package/dist/ui/codeHighlighter.js.map +0 -1
  959. package/dist/ui/collapsibleContent.d.ts +0 -57
  960. package/dist/ui/collapsibleContent.d.ts.map +0 -1
  961. package/dist/ui/collapsibleContent.js +0 -106
  962. package/dist/ui/collapsibleContent.js.map +0 -1
  963. package/dist/ui/designSystem.d.ts +0 -26
  964. package/dist/ui/designSystem.d.ts.map +0 -1
  965. package/dist/ui/designSystem.js +0 -122
  966. package/dist/ui/designSystem.js.map +0 -1
  967. package/dist/ui/diffViewer.d.ts +0 -42
  968. package/dist/ui/diffViewer.d.ts.map +0 -1
  969. package/dist/ui/diffViewer.js +0 -343
  970. package/dist/ui/diffViewer.js.map +0 -1
  971. package/dist/ui/display.d.ts +0 -310
  972. package/dist/ui/display.d.ts.map +0 -1
  973. package/dist/ui/display.js +0 -1558
  974. package/dist/ui/display.js.map +0 -1
  975. package/dist/ui/errorFormatter.d.ts +0 -54
  976. package/dist/ui/errorFormatter.d.ts.map +0 -1
  977. package/dist/ui/errorFormatter.js +0 -251
  978. package/dist/ui/errorFormatter.js.map +0 -1
  979. package/dist/ui/gitDisplay.d.ts +0 -45
  980. package/dist/ui/gitDisplay.d.ts.map +0 -1
  981. package/dist/ui/gitDisplay.js +0 -215
  982. package/dist/ui/gitDisplay.js.map +0 -1
  983. package/dist/ui/gitFormatter.d.ts +0 -29
  984. package/dist/ui/gitFormatter.d.ts.map +0 -1
  985. package/dist/ui/gitFormatter.js +0 -203
  986. package/dist/ui/gitFormatter.js.map +0 -1
  987. package/dist/ui/interrupts/InterruptManager.d.ts +0 -142
  988. package/dist/ui/interrupts/InterruptManager.d.ts.map +0 -1
  989. package/dist/ui/interrupts/InterruptManager.js +0 -439
  990. package/dist/ui/interrupts/InterruptManager.js.map +0 -1
  991. package/dist/ui/keyboardShortcuts.d.ts +0 -49
  992. package/dist/ui/keyboardShortcuts.d.ts.map +0 -1
  993. package/dist/ui/keyboardShortcuts.js +0 -128
  994. package/dist/ui/keyboardShortcuts.js.map +0 -1
  995. package/dist/ui/layout.d.ts +0 -17
  996. package/dist/ui/layout.d.ts.map +0 -1
  997. package/dist/ui/layout.js +0 -140
  998. package/dist/ui/layout.js.map +0 -1
  999. package/dist/ui/logFormatter.d.ts +0 -70
  1000. package/dist/ui/logFormatter.d.ts.map +0 -1
  1001. package/dist/ui/logFormatter.js +0 -323
  1002. package/dist/ui/logFormatter.js.map +0 -1
  1003. package/dist/ui/orchestration/StatusOrchestrator.d.ts +0 -156
  1004. package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +0 -1
  1005. package/dist/ui/orchestration/StatusOrchestrator.js +0 -406
  1006. package/dist/ui/orchestration/StatusOrchestrator.js.map +0 -1
  1007. package/dist/ui/outputMode.d.ts +0 -22
  1008. package/dist/ui/outputMode.d.ts.map +0 -1
  1009. package/dist/ui/outputMode.js +0 -40
  1010. package/dist/ui/outputMode.js.map +0 -1
  1011. package/dist/ui/outputSummarizer.d.ts +0 -52
  1012. package/dist/ui/outputSummarizer.d.ts.map +0 -1
  1013. package/dist/ui/outputSummarizer.js +0 -242
  1014. package/dist/ui/outputSummarizer.js.map +0 -1
  1015. package/dist/ui/persistentPrompt.d.ts +0 -545
  1016. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  1017. package/dist/ui/persistentPrompt.js +0 -1529
  1018. package/dist/ui/persistentPrompt.js.map +0 -1
  1019. package/dist/ui/progressBar.d.ts +0 -51
  1020. package/dist/ui/progressBar.d.ts.map +0 -1
  1021. package/dist/ui/progressBar.js +0 -153
  1022. package/dist/ui/progressBar.js.map +0 -1
  1023. package/dist/ui/progressIndicator.d.ts +0 -69
  1024. package/dist/ui/progressIndicator.d.ts.map +0 -1
  1025. package/dist/ui/progressIndicator.js +0 -145
  1026. package/dist/ui/progressIndicator.js.map +0 -1
  1027. package/dist/ui/richText.d.ts +0 -6
  1028. package/dist/ui/richText.d.ts.map +0 -1
  1029. package/dist/ui/richText.js +0 -391
  1030. package/dist/ui/richText.js.map +0 -1
  1031. package/dist/ui/shortcutsHelp.d.ts +0 -23
  1032. package/dist/ui/shortcutsHelp.d.ts.map +0 -1
  1033. package/dist/ui/shortcutsHelp.js +0 -89
  1034. package/dist/ui/shortcutsHelp.js.map +0 -1
  1035. package/dist/ui/streamingIndicators.d.ts +0 -42
  1036. package/dist/ui/streamingIndicators.d.ts.map +0 -1
  1037. package/dist/ui/streamingIndicators.js +0 -155
  1038. package/dist/ui/streamingIndicators.js.map +0 -1
  1039. package/dist/ui/tableFormatter.d.ts +0 -31
  1040. package/dist/ui/tableFormatter.d.ts.map +0 -1
  1041. package/dist/ui/tableFormatter.js +0 -186
  1042. package/dist/ui/tableFormatter.js.map +0 -1
  1043. package/dist/ui/telemetry/UITelemetry.d.ts +0 -181
  1044. package/dist/ui/telemetry/UITelemetry.d.ts.map +0 -1
  1045. package/dist/ui/telemetry/UITelemetry.js +0 -446
  1046. package/dist/ui/telemetry/UITelemetry.js.map +0 -1
  1047. package/dist/ui/textHighlighter.d.ts +0 -83
  1048. package/dist/ui/textHighlighter.d.ts.map +0 -1
  1049. package/dist/ui/textHighlighter.js +0 -267
  1050. package/dist/ui/textHighlighter.js.map +0 -1
  1051. package/dist/ui/theme.d.ts +0 -103
  1052. package/dist/ui/theme.d.ts.map +0 -1
  1053. package/dist/ui/theme.js +0 -128
  1054. package/dist/ui/theme.js.map +0 -1
  1055. package/dist/ui/thinkingTracker.d.ts +0 -51
  1056. package/dist/ui/thinkingTracker.d.ts.map +0 -1
  1057. package/dist/ui/thinkingTracker.js +0 -115
  1058. package/dist/ui/thinkingTracker.js.map +0 -1
  1059. package/dist/ui/toolDisplay.d.ts +0 -151
  1060. package/dist/ui/toolDisplay.d.ts.map +0 -1
  1061. package/dist/ui/toolDisplay.js +0 -1338
  1062. package/dist/ui/toolDisplay.js.map +0 -1
  1063. package/dist/ui/toolDisplayAdapter.d.ts +0 -66
  1064. package/dist/ui/toolDisplayAdapter.d.ts.map +0 -1
  1065. package/dist/ui/toolDisplayAdapter.js +0 -356
  1066. package/dist/ui/toolDisplayAdapter.js.map +0 -1
  1067. package/dist/ui/treeVisualizer.d.ts +0 -56
  1068. package/dist/ui/treeVisualizer.d.ts.map +0 -1
  1069. package/dist/ui/treeVisualizer.js +0 -247
  1070. package/dist/ui/treeVisualizer.js.map +0 -1
  1071. package/dist/utils/asyncUtils.d.ts +0 -95
  1072. package/dist/utils/asyncUtils.d.ts.map +0 -1
  1073. package/dist/utils/asyncUtils.js +0 -286
  1074. package/dist/utils/asyncUtils.js.map +0 -1
  1075. package/dist/utils/errorUtils.d.ts +0 -16
  1076. package/dist/utils/errorUtils.d.ts.map +0 -1
  1077. package/dist/utils/errorUtils.js +0 -66
  1078. package/dist/utils/errorUtils.js.map +0 -1
  1079. package/dist/workspace.d.ts +0 -8
  1080. package/dist/workspace.d.ts.map +0 -1
  1081. package/dist/workspace.js +0 -107
  1082. package/dist/workspace.js.map +0 -1
  1083. package/dist/workspace.validator.d.ts +0 -49
  1084. package/dist/workspace.validator.d.ts.map +0 -1
  1085. package/dist/workspace.validator.js +0 -214
  1086. package/dist/workspace.validator.js.map +0 -1
@@ -1,1819 +0,0 @@
1
- /**
2
- * Learn Tools - Codebase exploration and learning tools for understanding codebases.
3
- *
4
- * These tools enable deep codebase exploration without requiring external API calls
5
- * for the core analysis. The AI can use these tools to build a comprehensive
6
- * understanding of any codebase's architecture, patterns, and conventions.
7
- *
8
- * Features:
9
- * - Codebase structure analysis
10
- * - Pattern detection and learning
11
- * - Architecture understanding
12
- * - File relationship mapping
13
- * - Topic-based exploration
14
- */
15
- import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs';
16
- import { join, relative, extname, basename } from 'node:path';
17
- import { buildError } from '../core/errors.js';
18
- // =====================================================
19
- // Constants
20
- // =====================================================
21
- const IGNORED_DIRS = new Set([
22
- 'node_modules',
23
- '.git',
24
- '.svn',
25
- '.hg',
26
- 'dist',
27
- 'build',
28
- 'out',
29
- '.next',
30
- '.nuxt',
31
- '.output',
32
- 'coverage',
33
- '.nyc_output',
34
- '.cache',
35
- '.turbo',
36
- '.vercel',
37
- '.netlify',
38
- '__pycache__',
39
- '.pytest_cache',
40
- '.mypy_cache',
41
- '.ruff_cache',
42
- 'venv',
43
- '.venv',
44
- 'env',
45
- '.env',
46
- 'target',
47
- 'vendor',
48
- '.idea',
49
- '.vscode',
50
- ]);
51
- const LANGUAGE_MAP = {
52
- '.ts': 'TypeScript',
53
- '.tsx': 'TypeScript React',
54
- '.js': 'JavaScript',
55
- '.jsx': 'JavaScript React',
56
- '.mjs': 'JavaScript (ESM)',
57
- '.cjs': 'JavaScript (CJS)',
58
- '.py': 'Python',
59
- '.pyw': 'Python',
60
- '.pyi': 'Python Stub',
61
- '.rs': 'Rust',
62
- '.go': 'Go',
63
- '.java': 'Java',
64
- '.kt': 'Kotlin',
65
- '.kts': 'Kotlin Script',
66
- '.scala': 'Scala',
67
- '.rb': 'Ruby',
68
- '.php': 'PHP',
69
- '.cs': 'C#',
70
- '.fs': 'F#',
71
- '.cpp': 'C++',
72
- '.cc': 'C++',
73
- '.cxx': 'C++',
74
- '.c': 'C',
75
- '.h': 'C/C++ Header',
76
- '.hpp': 'C++ Header',
77
- '.swift': 'Swift',
78
- '.m': 'Objective-C',
79
- '.mm': 'Objective-C++',
80
- '.vue': 'Vue',
81
- '.svelte': 'Svelte',
82
- '.elm': 'Elm',
83
- '.ex': 'Elixir',
84
- '.exs': 'Elixir Script',
85
- '.erl': 'Erlang',
86
- '.hs': 'Haskell',
87
- '.ml': 'OCaml',
88
- '.mli': 'OCaml Interface',
89
- '.lua': 'Lua',
90
- '.pl': 'Perl',
91
- '.pm': 'Perl Module',
92
- '.sh': 'Shell',
93
- '.bash': 'Bash',
94
- '.zsh': 'Zsh',
95
- '.fish': 'Fish',
96
- '.ps1': 'PowerShell',
97
- '.sql': 'SQL',
98
- '.json': 'JSON',
99
- '.yaml': 'YAML',
100
- '.yml': 'YAML',
101
- '.toml': 'TOML',
102
- '.xml': 'XML',
103
- '.md': 'Markdown',
104
- '.mdx': 'MDX',
105
- '.html': 'HTML',
106
- '.htm': 'HTML',
107
- '.css': 'CSS',
108
- '.scss': 'SCSS',
109
- '.sass': 'Sass',
110
- '.less': 'Less',
111
- '.styl': 'Stylus',
112
- };
113
- const CONFIG_FILES = {
114
- 'package.json': { type: 'npm', purpose: 'Node.js package configuration and dependencies' },
115
- 'tsconfig.json': { type: 'typescript', purpose: 'TypeScript compiler configuration' },
116
- 'pyproject.toml': { type: 'python', purpose: 'Python project configuration (PEP 517/518)' },
117
- 'setup.py': { type: 'python', purpose: 'Python package setup (legacy)' },
118
- 'requirements.txt': { type: 'python', purpose: 'Python dependencies' },
119
- 'Cargo.toml': { type: 'rust', purpose: 'Rust package manifest' },
120
- 'go.mod': { type: 'go', purpose: 'Go module definition' },
121
- 'pom.xml': { type: 'maven', purpose: 'Maven project configuration' },
122
- 'build.gradle': { type: 'gradle', purpose: 'Gradle build configuration' },
123
- 'build.gradle.kts': { type: 'gradle', purpose: 'Gradle Kotlin build configuration' },
124
- 'Gemfile': { type: 'ruby', purpose: 'Ruby dependencies (Bundler)' },
125
- 'composer.json': { type: 'php', purpose: 'PHP Composer dependencies' },
126
- '.eslintrc.json': { type: 'linting', purpose: 'ESLint configuration' },
127
- '.eslintrc.js': { type: 'linting', purpose: 'ESLint configuration' },
128
- '.prettierrc': { type: 'formatting', purpose: 'Prettier configuration' },
129
- 'prettier.config.js': { type: 'formatting', purpose: 'Prettier configuration' },
130
- '.gitignore': { type: 'git', purpose: 'Git ignore patterns' },
131
- '.dockerignore': { type: 'docker', purpose: 'Docker ignore patterns' },
132
- 'Dockerfile': { type: 'docker', purpose: 'Docker image definition' },
133
- 'docker-compose.yml': { type: 'docker', purpose: 'Docker Compose services' },
134
- 'docker-compose.yaml': { type: 'docker', purpose: 'Docker Compose services' },
135
- 'Makefile': { type: 'build', purpose: 'Make build automation' },
136
- '.env.example': { type: 'config', purpose: 'Environment variable template' },
137
- 'jest.config.js': { type: 'testing', purpose: 'Jest test configuration' },
138
- 'vitest.config.ts': { type: 'testing', purpose: 'Vitest test configuration' },
139
- 'webpack.config.js': { type: 'bundler', purpose: 'Webpack bundler configuration' },
140
- 'vite.config.ts': { type: 'bundler', purpose: 'Vite build tool configuration' },
141
- 'rollup.config.js': { type: 'bundler', purpose: 'Rollup bundler configuration' },
142
- 'next.config.js': { type: 'framework', purpose: 'Next.js configuration' },
143
- 'nuxt.config.ts': { type: 'framework', purpose: 'Nuxt.js configuration' },
144
- 'tailwind.config.js': { type: 'css', purpose: 'Tailwind CSS configuration' },
145
- '.github/workflows': { type: 'ci', purpose: 'GitHub Actions workflows' },
146
- '.gitlab-ci.yml': { type: 'ci', purpose: 'GitLab CI/CD configuration' },
147
- 'Jenkinsfile': { type: 'ci', purpose: 'Jenkins pipeline definition' },
148
- };
149
- const ARCHITECTURE_PATTERNS = [
150
- {
151
- name: 'MVC (Model-View-Controller)',
152
- indicators: ['models', 'views', 'controllers', 'routes'],
153
- type: 'architectural',
154
- },
155
- {
156
- name: 'Clean Architecture',
157
- indicators: ['domain', 'application', 'infrastructure', 'presentation', 'entities', 'use-cases', 'usecases'],
158
- type: 'architectural',
159
- },
160
- {
161
- name: 'Hexagonal Architecture',
162
- indicators: ['ports', 'adapters', 'domain', 'application'],
163
- type: 'architectural',
164
- },
165
- {
166
- name: 'Feature-based Structure',
167
- indicators: ['features', 'modules'],
168
- type: 'structural',
169
- },
170
- {
171
- name: 'Component-based',
172
- indicators: ['components', 'shared', 'common'],
173
- type: 'structural',
174
- },
175
- {
176
- name: 'Layered Architecture',
177
- indicators: ['api', 'services', 'repositories', 'data', 'business'],
178
- type: 'architectural',
179
- },
180
- {
181
- name: 'Microservices',
182
- indicators: ['services', 'gateway', 'docker-compose'],
183
- type: 'architectural',
184
- },
185
- {
186
- name: 'Monorepo',
187
- indicators: ['packages', 'apps', 'libs', 'workspace'],
188
- type: 'structural',
189
- },
190
- {
191
- name: 'Plugin Architecture',
192
- indicators: ['plugins', 'extensions', 'addons'],
193
- type: 'architectural',
194
- },
195
- {
196
- name: 'Event-Driven',
197
- indicators: ['events', 'handlers', 'listeners', 'subscribers', 'publishers'],
198
- type: 'architectural',
199
- },
200
- ];
201
- // =====================================================
202
- // Tool Creation
203
- // =====================================================
204
- export function createLearnTools(workingDir) {
205
- return [
206
- createLearnCodebaseTool(workingDir),
207
- createLearnFileTool(workingDir),
208
- createLearnTopicTool(workingDir),
209
- createLearnSummaryTool(workingDir),
210
- ];
211
- }
212
- // =====================================================
213
- // learn_codebase Tool
214
- // =====================================================
215
- function createLearnCodebaseTool(workingDir) {
216
- return {
217
- name: 'learn_codebase',
218
- description: `Analyze and learn the entire codebase structure, architecture, patterns, and conventions.
219
- This tool provides a comprehensive overview of the project without requiring external API calls.
220
- Use this to understand:
221
- - Project structure and organization
222
- - Primary programming languages used
223
- - Architectural patterns detected
224
- - Configuration and build setup
225
- - Entry points and key files
226
- - Dependencies and package management`,
227
- parameters: {
228
- type: 'object',
229
- properties: {
230
- depth: {
231
- type: 'number',
232
- description: 'Maximum directory depth to analyze (default: 5)',
233
- },
234
- includeHidden: {
235
- type: 'boolean',
236
- description: 'Include hidden files/directories in analysis (default: false)',
237
- },
238
- focusPath: {
239
- type: 'string',
240
- description: 'Focus analysis on a specific subdirectory',
241
- },
242
- },
243
- additionalProperties: false,
244
- },
245
- cacheable: true,
246
- handler: async (args) => {
247
- try {
248
- const depth = typeof args['depth'] === 'number' ? args['depth'] : 5;
249
- const includeHidden = args['includeHidden'] === true;
250
- const focusPath = args['focusPath'];
251
- const targetDir = focusPath ? resolveFilePath(workingDir, focusPath) : workingDir;
252
- if (!existsSync(targetDir)) {
253
- return `Error: Directory not found: ${targetDir}`;
254
- }
255
- const analysis = analyzeCodebase(targetDir, workingDir, depth, includeHidden);
256
- return formatCodebaseAnalysis(analysis);
257
- }
258
- catch (error) {
259
- return buildError('analyzing codebase', error, { workingDir });
260
- }
261
- },
262
- };
263
- }
264
- // =====================================================
265
- // learn_file Tool
266
- // =====================================================
267
- function createLearnFileTool(workingDir) {
268
- return {
269
- name: 'learn_file',
270
- description: `Deep-learn a specific file's purpose, structure, patterns, and relationships.
271
- This tool provides detailed analysis of a single file including:
272
- - File purpose and responsibilities
273
- - Imports and dependencies
274
- - Exports and public interface
275
- - Functions and classes with their purposes
276
- - Complexity metrics
277
- - Relationships to other files`,
278
- parameters: {
279
- type: 'object',
280
- properties: {
281
- path: {
282
- type: 'string',
283
- description: 'Path to the file to analyze',
284
- },
285
- includeRelationships: {
286
- type: 'boolean',
287
- description: 'Analyze relationships to other files (default: true)',
288
- },
289
- },
290
- required: ['path'],
291
- additionalProperties: false,
292
- },
293
- cacheable: true,
294
- handler: async (args) => {
295
- try {
296
- const filePath = resolveFilePath(workingDir, args['path']);
297
- const includeRelationships = args['includeRelationships'] !== false;
298
- if (!existsSync(filePath)) {
299
- return `Error: File not found: ${filePath}`;
300
- }
301
- const stat = statSync(filePath);
302
- if (stat.isDirectory()) {
303
- return `Error: Path is a directory, not a file: ${filePath}`;
304
- }
305
- const analysis = analyzeFile(filePath, workingDir, includeRelationships);
306
- return formatFileAnalysis(analysis);
307
- }
308
- catch (error) {
309
- return buildError('analyzing file', error, { path: String(args['path']) });
310
- }
311
- },
312
- };
313
- }
314
- // =====================================================
315
- // learn_topic Tool
316
- // =====================================================
317
- function createLearnTopicTool(workingDir) {
318
- return {
319
- name: 'learn_topic',
320
- description: `Learn about a specific topic, pattern, or concept within the codebase.
321
- Use this to understand how specific patterns are implemented, such as:
322
- - Authentication/authorization patterns
323
- - Error handling conventions
324
- - Data validation approaches
325
- - API design patterns
326
- - State management
327
- - Testing patterns
328
- - Any custom pattern or convention`,
329
- parameters: {
330
- type: 'object',
331
- properties: {
332
- topic: {
333
- type: 'string',
334
- description: 'The topic or pattern to learn about (e.g., "authentication", "error handling", "api routes")',
335
- },
336
- maxFiles: {
337
- type: 'number',
338
- description: 'Maximum number of relevant files to analyze (default: 10)',
339
- },
340
- maxExamples: {
341
- type: 'number',
342
- description: 'Maximum number of code examples to include (default: 5)',
343
- },
344
- },
345
- required: ['topic'],
346
- additionalProperties: false,
347
- },
348
- cacheable: true,
349
- handler: async (args) => {
350
- try {
351
- const topic = args['topic'];
352
- const maxFiles = typeof args['maxFiles'] === 'number' ? args['maxFiles'] : 10;
353
- const maxExamples = typeof args['maxExamples'] === 'number' ? args['maxExamples'] : 5;
354
- if (!topic || !topic.trim()) {
355
- return 'Error: topic must be a non-empty string';
356
- }
357
- const analysis = analyzeTopic(workingDir, topic.trim(), maxFiles, maxExamples);
358
- return formatTopicAnalysis(analysis);
359
- }
360
- catch (error) {
361
- return buildError('analyzing topic', error, { topic: String(args['topic']) });
362
- }
363
- },
364
- };
365
- }
366
- // =====================================================
367
- // learn_summary Tool
368
- // =====================================================
369
- function createLearnSummaryTool(workingDir) {
370
- return {
371
- name: 'learn_summary',
372
- description: `Generate a learning summary for the codebase suitable for onboarding.
373
- This creates a comprehensive summary including:
374
- - Quick start guide
375
- - Key concepts and terminology
376
- - Architecture overview
377
- - Important files and their purposes
378
- - Common patterns and conventions
379
- - Development workflow suggestions`,
380
- parameters: {
381
- type: 'object',
382
- properties: {
383
- format: {
384
- type: 'string',
385
- description: 'Output format: "markdown" (default) or "text"',
386
- enum: ['markdown', 'text'],
387
- },
388
- focus: {
389
- type: 'string',
390
- description: 'Focus area for the summary (e.g., "frontend", "backend", "api")',
391
- },
392
- },
393
- additionalProperties: false,
394
- },
395
- cacheable: true,
396
- handler: async (args) => {
397
- try {
398
- const format = args['format'] || 'markdown';
399
- const focus = args['focus'];
400
- const analysis = analyzeCodebase(workingDir, workingDir, 4, false);
401
- return formatLearningSummary(analysis, format, focus);
402
- }
403
- catch (error) {
404
- return buildError('generating learning summary', error, { workingDir });
405
- }
406
- },
407
- };
408
- }
409
- // =====================================================
410
- // Analysis Functions
411
- // =====================================================
412
- function analyzeCodebase(targetDir, workingDir, maxDepth, includeHidden) {
413
- const files = [];
414
- const directories = [];
415
- const configFiles = [];
416
- // Build directory tree and collect files
417
- const structure = buildDirectoryTree(targetDir, workingDir, 0, maxDepth, includeHidden, files, directories, configFiles);
418
- // Calculate language breakdown
419
- const languageCounts = new Map();
420
- for (const file of files) {
421
- const lang = LANGUAGE_MAP[file.ext] || 'Other';
422
- const existing = languageCounts.get(lang) || { ext: file.ext, count: 0 };
423
- existing.count++;
424
- languageCounts.set(lang, existing);
425
- }
426
- const totalFiles = files.length;
427
- const languages = Array.from(languageCounts.entries())
428
- .map(([language, data]) => ({
429
- language,
430
- extension: data.ext,
431
- fileCount: data.count,
432
- percentage: totalFiles > 0 ? (data.count / totalFiles) * 100 : 0,
433
- }))
434
- .sort((a, b) => b.fileCount - a.fileCount);
435
- // Detect architecture patterns
436
- const dirNames = directories.map((d) => basename(d).toLowerCase());
437
- const patterns = detectPatterns(dirNames, files.map((f) => f.path));
438
- // Build architecture insights
439
- const architecture = buildArchitectureInsights(patterns, dirNames, targetDir, workingDir);
440
- // Find entry points
441
- const entryPoints = findEntryPoints(files.map((f) => f.path), configFiles);
442
- // Analyze dependencies
443
- const dependencies = analyzeDependencies(targetDir);
444
- return {
445
- rootDir: relative(workingDir, targetDir) || '.',
446
- totalFiles,
447
- totalDirectories: directories.length,
448
- languages,
449
- structure,
450
- patterns,
451
- architecture,
452
- entryPoints,
453
- configFiles,
454
- dependencies,
455
- };
456
- }
457
- function buildDirectoryTree(dir, workingDir, depth, maxDepth, includeHidden, files, directories, configFiles) {
458
- const name = basename(dir) || dir;
459
- const relPath = relative(workingDir, dir) || '.';
460
- const node = {
461
- name,
462
- path: relPath,
463
- type: 'directory',
464
- children: [],
465
- };
466
- if (depth >= maxDepth) {
467
- return node;
468
- }
469
- try {
470
- const entries = readdirSync(dir, { withFileTypes: true });
471
- for (const entry of entries) {
472
- // Skip hidden files/dirs if not requested
473
- if (!includeHidden && entry.name.startsWith('.')) {
474
- continue;
475
- }
476
- // Skip ignored directories
477
- if (IGNORED_DIRS.has(entry.name)) {
478
- continue;
479
- }
480
- const fullPath = join(dir, entry.name);
481
- const entryRelPath = relative(workingDir, fullPath);
482
- if (entry.isDirectory()) {
483
- directories.push(fullPath);
484
- const childNode = buildDirectoryTree(fullPath, workingDir, depth + 1, maxDepth, includeHidden, files, directories, configFiles);
485
- node.children.push(childNode);
486
- }
487
- else if (entry.isFile()) {
488
- try {
489
- const stat = statSync(fullPath);
490
- const ext = extname(entry.name).toLowerCase();
491
- const language = LANGUAGE_MAP[ext];
492
- files.push({ path: entryRelPath, ext, size: stat.size });
493
- // Check if it's a config file
494
- const configInfo = CONFIG_FILES[entry.name];
495
- if (configInfo) {
496
- configFiles.push({
497
- name: entry.name,
498
- path: entryRelPath,
499
- type: configInfo.type,
500
- purpose: configInfo.purpose,
501
- });
502
- }
503
- node.children.push({
504
- name: entry.name,
505
- path: entryRelPath,
506
- type: 'file',
507
- size: stat.size,
508
- language,
509
- });
510
- }
511
- catch {
512
- // Skip files we can't stat
513
- }
514
- }
515
- }
516
- }
517
- catch {
518
- // Skip directories we can't read
519
- }
520
- return node;
521
- }
522
- function detectPatterns(dirNames, filePaths) {
523
- const patterns = [];
524
- const dirNameSet = new Set(dirNames);
525
- const filePathsLower = filePaths.map((p) => p.toLowerCase());
526
- for (const pattern of ARCHITECTURE_PATTERNS) {
527
- const matches = pattern.indicators.filter((ind) => dirNameSet.has(ind));
528
- if (matches.length >= 2 || (matches.length >= 1 && pattern.indicators.length <= 2)) {
529
- const confidence = matches.length >= 3 ? 'high' : matches.length >= 2 ? 'medium' : 'low';
530
- patterns.push({
531
- name: pattern.name,
532
- type: pattern.type,
533
- description: `Detected ${pattern.name} pattern based on directory structure`,
534
- evidence: matches.map((m) => `Found "${m}" directory`),
535
- confidence,
536
- });
537
- }
538
- }
539
- // Detect naming conventions
540
- const hasKebabCase = filePathsLower.some((p) => /[a-z]+-[a-z]+/.test(basename(p)));
541
- const hasCamelCase = filePaths.some((p) => /[a-z]+[A-Z][a-z]+/.test(basename(p)));
542
- const hasPascalCase = filePaths.some((p) => /^[A-Z][a-z]+[A-Z]/.test(basename(p)));
543
- const hasSnakeCase = filePathsLower.some((p) => /[a-z]+_[a-z]+/.test(basename(p)));
544
- const namingConventions = [];
545
- if (hasKebabCase)
546
- namingConventions.push('kebab-case');
547
- if (hasCamelCase)
548
- namingConventions.push('camelCase');
549
- if (hasPascalCase)
550
- namingConventions.push('PascalCase');
551
- if (hasSnakeCase)
552
- namingConventions.push('snake_case');
553
- if (namingConventions.length > 0) {
554
- patterns.push({
555
- name: 'File Naming Convention',
556
- type: 'naming',
557
- description: `Uses ${namingConventions.join(', ')} naming convention(s)`,
558
- evidence: namingConventions.map((n) => `Detected ${n} pattern in filenames`),
559
- confidence: 'medium',
560
- });
561
- }
562
- // Detect test patterns
563
- const hasTestDir = dirNameSet.has('test') || dirNameSet.has('tests') || dirNameSet.has('__tests__');
564
- const hasSpecFiles = filePathsLower.some((p) => p.includes('.spec.') || p.includes('.test.'));
565
- if (hasTestDir || hasSpecFiles) {
566
- patterns.push({
567
- name: 'Testing Structure',
568
- type: 'structural',
569
- description: hasTestDir
570
- ? 'Uses dedicated test directory'
571
- : 'Uses co-located test files (.spec/.test)',
572
- evidence: hasTestDir
573
- ? ['Found test/tests/__tests__ directory']
574
- : ['Found .spec or .test files alongside source'],
575
- confidence: 'high',
576
- });
577
- }
578
- return patterns;
579
- }
580
- function buildArchitectureInsights(patterns, dirNames, targetDir, workingDir) {
581
- const archPattern = patterns.find((p) => p.type === 'architectural');
582
- const type = archPattern?.name || 'Custom/Unknown';
583
- const layers = [];
584
- const components = [];
585
- // Identify layers based on common directory names
586
- const layerDirs = ['api', 'routes', 'controllers', 'services', 'models', 'views', 'components', 'utils', 'lib', 'core'];
587
- for (const layer of layerDirs) {
588
- if (dirNames.includes(layer)) {
589
- layers.push(layer);
590
- }
591
- }
592
- // Build component info from top-level directories
593
- try {
594
- const entries = readdirSync(targetDir, { withFileTypes: true });
595
- for (const entry of entries) {
596
- if (entry.isDirectory() && !IGNORED_DIRS.has(entry.name) && !entry.name.startsWith('.')) {
597
- const componentPath = relative(workingDir, join(targetDir, entry.name));
598
- components.push({
599
- name: entry.name,
600
- type: inferComponentType(entry.name),
601
- path: componentPath,
602
- responsibilities: inferResponsibilities(entry.name),
603
- });
604
- }
605
- }
606
- }
607
- catch {
608
- // Ignore errors
609
- }
610
- const dataFlow = inferDataFlow(layers, type);
611
- return {
612
- type,
613
- layers,
614
- components,
615
- dataFlow,
616
- };
617
- }
618
- function inferComponentType(name) {
619
- const lower = name.toLowerCase();
620
- if (['api', 'routes', 'controllers', 'handlers'].includes(lower))
621
- return 'API Layer';
622
- if (['services', 'business', 'domain'].includes(lower))
623
- return 'Business Logic';
624
- if (['models', 'entities', 'schemas'].includes(lower))
625
- return 'Data Models';
626
- if (['views', 'pages', 'screens'].includes(lower))
627
- return 'Presentation';
628
- if (['components', 'ui'].includes(lower))
629
- return 'UI Components';
630
- if (['utils', 'helpers', 'lib', 'common', 'shared'].includes(lower))
631
- return 'Utilities';
632
- if (['config', 'configs', 'settings'].includes(lower))
633
- return 'Configuration';
634
- if (['test', 'tests', '__tests__', 'spec'].includes(lower))
635
- return 'Testing';
636
- if (['types', 'interfaces', 'contracts'].includes(lower))
637
- return 'Type Definitions';
638
- if (['middleware', 'middlewares'].includes(lower))
639
- return 'Middleware';
640
- if (['plugins', 'extensions', 'addons'].includes(lower))
641
- return 'Extensions';
642
- return 'Module';
643
- }
644
- function inferResponsibilities(name) {
645
- const lower = name.toLowerCase();
646
- const responsibilities = [];
647
- if (['api', 'routes'].includes(lower)) {
648
- responsibilities.push('HTTP request handling', 'Route definitions', 'Request/response processing');
649
- }
650
- else if (lower === 'controllers') {
651
- responsibilities.push('Request handling', 'Input validation', 'Response formatting');
652
- }
653
- else if (lower === 'services') {
654
- responsibilities.push('Business logic', 'Data orchestration', 'External integrations');
655
- }
656
- else if (lower === 'models') {
657
- responsibilities.push('Data structures', 'Database schemas', 'Data validation');
658
- }
659
- else if (['views', 'pages'].includes(lower)) {
660
- responsibilities.push('UI rendering', 'Page composition', 'Layout management');
661
- }
662
- else if (lower === 'components') {
663
- responsibilities.push('Reusable UI elements', 'Component logic', 'State management');
664
- }
665
- else if (['utils', 'helpers'].includes(lower)) {
666
- responsibilities.push('Utility functions', 'Common helpers', 'Shared logic');
667
- }
668
- return responsibilities.length > 0 ? responsibilities : ['Module functionality'];
669
- }
670
- function inferDataFlow(layers, archType) {
671
- if (archType.includes('MVC')) {
672
- return ['Request → Controller → Model → View → Response'];
673
- }
674
- if (archType.includes('Clean')) {
675
- return [
676
- 'External → Controllers → Use Cases → Entities',
677
- 'Entities → Use Cases → Presenters → External',
678
- ];
679
- }
680
- if (archType.includes('Layered')) {
681
- return ['API → Services → Repositories → Database'];
682
- }
683
- if (layers.length > 0) {
684
- return [`Request → ${layers.join(' → ')} → Response`];
685
- }
686
- return ['Standard request/response flow'];
687
- }
688
- function findEntryPoints(filePaths, configFiles) {
689
- const entryPoints = [];
690
- // Check for common entry point patterns
691
- const entryPatterns = [
692
- 'index.ts',
693
- 'index.js',
694
- 'main.ts',
695
- 'main.js',
696
- 'app.ts',
697
- 'app.js',
698
- 'server.ts',
699
- 'server.js',
700
- 'cli.ts',
701
- 'cli.js',
702
- '__main__.py',
703
- 'main.py',
704
- 'app.py',
705
- 'manage.py',
706
- 'main.go',
707
- 'main.rs',
708
- 'lib.rs',
709
- ];
710
- for (const pattern of entryPatterns) {
711
- const match = filePaths.find((p) => basename(p) === pattern || p.endsWith(`/src/${pattern}`) || p.endsWith(`/bin/${pattern}`));
712
- if (match) {
713
- entryPoints.push(match);
714
- }
715
- }
716
- // Check package.json for main/bin
717
- const pkgJson = configFiles.find((c) => c.name === 'package.json');
718
- if (pkgJson) {
719
- entryPoints.push(`${pkgJson.path} (see "main" or "bin" fields)`);
720
- }
721
- return [...new Set(entryPoints)];
722
- }
723
- function analyzeDependencies(dir) {
724
- const result = {
725
- dependencies: [],
726
- devDependencies: [],
727
- hasDependencyFile: false,
728
- };
729
- // Check package.json
730
- const pkgPath = join(dir, 'package.json');
731
- if (existsSync(pkgPath)) {
732
- try {
733
- const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
734
- result.packageManager = 'npm';
735
- result.hasDependencyFile = true;
736
- result.dependencies = Object.keys(pkg.dependencies || {}).slice(0, 20);
737
- result.devDependencies = Object.keys(pkg.devDependencies || {}).slice(0, 20);
738
- }
739
- catch {
740
- // Ignore parse errors
741
- }
742
- }
743
- // Check pyproject.toml
744
- const pyprojectPath = join(dir, 'pyproject.toml');
745
- if (existsSync(pyprojectPath)) {
746
- result.packageManager = result.packageManager || 'pip';
747
- result.hasDependencyFile = true;
748
- // Basic TOML parsing for dependencies
749
- try {
750
- const content = readFileSync(pyprojectPath, 'utf-8');
751
- const depMatch = content.match(/dependencies\s*=\s*\[([\s\S]*?)\]/);
752
- if (depMatch && depMatch[1]) {
753
- const deps = depMatch[1].match(/"([^"]+)"/g) || [];
754
- result.dependencies = deps.map((d) => d.replace(/"/g, '').split(/[<>=!]/)[0]?.trim() ?? '').slice(0, 20);
755
- }
756
- }
757
- catch {
758
- // Ignore parse errors
759
- }
760
- }
761
- // Check Cargo.toml
762
- const cargoPath = join(dir, 'Cargo.toml');
763
- if (existsSync(cargoPath)) {
764
- result.packageManager = 'cargo';
765
- result.hasDependencyFile = true;
766
- }
767
- // Check go.mod
768
- const goModPath = join(dir, 'go.mod');
769
- if (existsSync(goModPath)) {
770
- result.packageManager = 'go modules';
771
- result.hasDependencyFile = true;
772
- }
773
- return result;
774
- }
775
- function analyzeFile(filePath, workingDir, includeRelationships) {
776
- const content = readFileSync(filePath, 'utf-8');
777
- const lines = content.split('\n');
778
- const ext = extname(filePath).toLowerCase();
779
- const language = LANGUAGE_MAP[ext] || 'Unknown';
780
- const relPath = relative(workingDir, filePath);
781
- const imports = extractImports(content, ext);
782
- const exports = extractExports(content, ext);
783
- const functions = extractFunctions(content, ext);
784
- const classes = extractClasses(content, ext);
785
- const patterns = detectCodePatterns(content, ext);
786
- const complexity = calculateComplexity(content);
787
- const purpose = inferFilePurpose(basename(filePath), content, imports, exports, functions, classes);
788
- const relationships = [];
789
- if (includeRelationships) {
790
- // Build relationships from imports
791
- for (const imp of imports) {
792
- if (imp.isRelative) {
793
- relationships.push({
794
- targetFile: imp.resolvedPath || imp.source,
795
- type: 'imports',
796
- symbols: imp.specifiers,
797
- });
798
- }
799
- }
800
- }
801
- return {
802
- path: relPath,
803
- language,
804
- size: content.length,
805
- lineCount: lines.length,
806
- purpose,
807
- imports,
808
- exports,
809
- functions,
810
- classes,
811
- patterns,
812
- relationships,
813
- complexity,
814
- };
815
- }
816
- function extractImports(content, ext) {
817
- const imports = [];
818
- if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(ext)) {
819
- // ES6 imports
820
- const importRegex = /import\s+(?:(\*\s+as\s+\w+)|(\{[^}]+\})|(\w+)(?:\s*,\s*\{([^}]+)\})?)\s+from\s+['"]([^'"]+)['"]/g;
821
- let match;
822
- while ((match = importRegex.exec(content)) !== null) {
823
- const source = match[5] || '';
824
- let specifiers = [];
825
- if (match[1]) {
826
- // namespace import
827
- specifiers = [match[1].trim()];
828
- }
829
- else if (match[2]) {
830
- // named imports
831
- specifiers = match[2]
832
- .replace(/[{}]/g, '')
833
- .split(',')
834
- .map((s) => s.trim())
835
- .filter(Boolean);
836
- }
837
- else if (match[3]) {
838
- // default import
839
- specifiers = [match[3]];
840
- if (match[4]) {
841
- // additional named imports
842
- specifiers.push(...match[4]
843
- .split(',')
844
- .map((s) => s.trim())
845
- .filter(Boolean));
846
- }
847
- }
848
- imports.push({
849
- source,
850
- specifiers,
851
- isRelative: source.startsWith('.') || source.startsWith('/'),
852
- });
853
- }
854
- // CommonJS requires
855
- const requireRegex = /(?:const|let|var)\s+(?:(\{[^}]+\})|(\w+))\s*=\s*require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
856
- while ((match = requireRegex.exec(content)) !== null) {
857
- const source = match[3] || '';
858
- let specifiers = [];
859
- if (match[1]) {
860
- specifiers = match[1]
861
- .replace(/[{}]/g, '')
862
- .split(',')
863
- .map((s) => s.trim())
864
- .filter(Boolean);
865
- }
866
- else if (match[2]) {
867
- specifiers = [match[2]];
868
- }
869
- imports.push({
870
- source,
871
- specifiers,
872
- isRelative: source.startsWith('.') || source.startsWith('/'),
873
- });
874
- }
875
- }
876
- else if (ext === '.py') {
877
- // Python imports
878
- const fromImportRegex = /from\s+([^\s]+)\s+import\s+(.+)/g;
879
- let match;
880
- while ((match = fromImportRegex.exec(content)) !== null) {
881
- const source = match[1] ?? '';
882
- const specifiers = (match[2] ?? '')
883
- .split(',')
884
- .map((s) => s.trim().split(' as ')[0]?.trim() ?? '')
885
- .filter(Boolean);
886
- imports.push({
887
- source,
888
- specifiers,
889
- isRelative: source.startsWith('.'),
890
- });
891
- }
892
- const importRegex = /^import\s+([^\s,]+(?:\s*,\s*[^\s,]+)*)/gm;
893
- while ((match = importRegex.exec(content)) !== null) {
894
- const modules = (match[1] ?? '').split(',').map((s) => s.trim().split(' as ')[0]?.trim() ?? '');
895
- for (const mod of modules) {
896
- if (mod) {
897
- imports.push({
898
- source: mod,
899
- specifiers: [mod],
900
- isRelative: mod.startsWith('.'),
901
- });
902
- }
903
- }
904
- }
905
- }
906
- return imports;
907
- }
908
- function extractExports(content, ext) {
909
- const exports = [];
910
- if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(ext)) {
911
- // Export default
912
- const defaultMatch = content.match(/export\s+default\s+(?:class|function)?\s*(\w+)?/);
913
- if (defaultMatch) {
914
- exports.push({
915
- name: defaultMatch[1] || 'default',
916
- type: 'default',
917
- });
918
- }
919
- // Named exports
920
- const namedExportRegex = /export\s+(?:const|let|var|function|class|interface|type|enum)\s+(\w+)/g;
921
- let match;
922
- while ((match = namedExportRegex.exec(content)) !== null) {
923
- const name = match[1] || '';
924
- const line = content.substring(0, match.index).split('\n').length;
925
- const lineContent = content.split('\n')[line - 1] || '';
926
- let type = 'named';
927
- if (lineContent.includes('interface'))
928
- type = 'interface';
929
- else if (lineContent.includes('type'))
930
- type = 'type';
931
- else if (lineContent.includes('class'))
932
- type = 'class';
933
- else if (lineContent.includes('function'))
934
- type = 'function';
935
- exports.push({ name, type });
936
- }
937
- // Re-exports
938
- const reExportRegex = /export\s+\{([^}]+)\}\s+from/g;
939
- while ((match = reExportRegex.exec(content)) !== null) {
940
- const names = (match[1] ?? '').split(',').map((s) => s.trim().split(' as ')[0]?.trim() ?? '');
941
- for (const name of names) {
942
- if (name) {
943
- exports.push({ name, type: 'named' });
944
- }
945
- }
946
- }
947
- }
948
- else if (ext === '.py') {
949
- // Python __all__
950
- const allMatch = content.match(/__all__\s*=\s*\[([\s\S]*?)\]/);
951
- if (allMatch && allMatch[1]) {
952
- const names = (allMatch[1].match(/['"]([^'"]+)['"]/g) || []).map((s) => s.replace(/['"]/g, ''));
953
- for (const name of names) {
954
- exports.push({ name, type: 'named' });
955
- }
956
- }
957
- // Public functions/classes (not starting with _)
958
- const defRegex = /^(?:def|class)\s+([a-zA-Z][a-zA-Z0-9_]*)/gm;
959
- let match;
960
- while ((match = defRegex.exec(content)) !== null) {
961
- const name = match[1] || '';
962
- if (!name.startsWith('_')) {
963
- const lineContent = content.split('\n')[content.substring(0, match.index).split('\n').length - 1] || '';
964
- exports.push({
965
- name,
966
- type: lineContent.startsWith('class') ? 'class' : 'function',
967
- });
968
- }
969
- }
970
- }
971
- return exports;
972
- }
973
- function extractFunctions(content, ext) {
974
- const functions = [];
975
- if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(ext)) {
976
- // Regular functions
977
- const funcRegex = /(?:export\s+)?(?:async\s+)?function\s+(\w+)\s*\(([^)]*)\)(?:\s*:\s*([^{]+))?\s*\{/g;
978
- let match;
979
- while ((match = funcRegex.exec(content)) !== null) {
980
- const name = match[1] || '';
981
- const params = (match[2] || '').split(',').map((p) => p.trim().split(':')[0]?.trim() ?? '').filter(Boolean);
982
- const returnType = (match[3] || '').trim() || undefined;
983
- const line = content.substring(0, match.index).split('\n').length;
984
- const isAsync = content.substring(match.index - 20, match.index).includes('async');
985
- const isExported = content.substring(match.index - 20, match.index).includes('export');
986
- functions.push({
987
- name,
988
- line,
989
- parameters: params,
990
- returnType,
991
- isAsync,
992
- isExported,
993
- complexity: 1,
994
- });
995
- }
996
- // Arrow functions
997
- const arrowRegex = /(?:export\s+)?(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s+)?\(?([^)=]*)\)?\s*(?::\s*([^=]+))?\s*=>/g;
998
- while ((match = arrowRegex.exec(content)) !== null) {
999
- const name = match[1] || '';
1000
- const params = (match[2] || '').split(',').map((p) => p.trim().split(':')[0]?.trim() ?? '').filter(Boolean);
1001
- const returnType = (match[3] || '').trim() || undefined;
1002
- const line = content.substring(0, match.index).split('\n').length;
1003
- const isAsync = content.substring(match.index, match.index + 50).includes('async');
1004
- const isExported = content.substring(match.index - 20, match.index).includes('export');
1005
- functions.push({
1006
- name,
1007
- line,
1008
- parameters: params,
1009
- returnType,
1010
- isAsync,
1011
- isExported,
1012
- complexity: 1,
1013
- });
1014
- }
1015
- }
1016
- else if (ext === '.py') {
1017
- const defRegex = /(?:async\s+)?def\s+(\w+)\s*\(([^)]*)\)(?:\s*->\s*([^:]+))?\s*:/g;
1018
- let match;
1019
- while ((match = defRegex.exec(content)) !== null) {
1020
- const name = match[1] ?? '';
1021
- const params = (match[2] ?? '')
1022
- .split(',')
1023
- .map((p) => (p.trim().split(':')[0]?.split('=')[0]?.trim()) ?? '')
1024
- .filter((p) => p && p !== 'self' && p !== 'cls');
1025
- const returnType = (match[3] || '').trim() || undefined;
1026
- const line = content.substring(0, match.index).split('\n').length;
1027
- const isAsync = content.substring(match.index - 10, match.index).includes('async');
1028
- functions.push({
1029
- name,
1030
- line,
1031
- parameters: params,
1032
- returnType,
1033
- isAsync,
1034
- isExported: !name.startsWith('_'),
1035
- complexity: 1,
1036
- });
1037
- }
1038
- }
1039
- return functions;
1040
- }
1041
- function extractClasses(content, ext) {
1042
- const classes = [];
1043
- if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(ext)) {
1044
- const classRegex = /(?:export\s+)?class\s+(\w+)(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?\s*\{/g;
1045
- let match;
1046
- while ((match = classRegex.exec(content)) !== null) {
1047
- const name = match[1] || '';
1048
- const line = content.substring(0, match.index).split('\n').length;
1049
- const extendsClass = match[2];
1050
- const implementsList = match[3]
1051
- ? match[3]
1052
- .split(',')
1053
- .map((s) => s.trim())
1054
- .filter(Boolean)
1055
- : undefined;
1056
- const isExported = content.substring(match.index - 20, match.index).includes('export');
1057
- // Find class body and extract methods/properties
1058
- const classStart = match.index + match[0].length;
1059
- let braceCount = 1;
1060
- let classEnd = classStart;
1061
- for (let i = classStart; i < content.length && braceCount > 0; i++) {
1062
- if (content[i] === '{')
1063
- braceCount++;
1064
- if (content[i] === '}')
1065
- braceCount--;
1066
- classEnd = i;
1067
- }
1068
- const classBody = content.substring(classStart, classEnd);
1069
- const methods = [];
1070
- const properties = [];
1071
- // Extract methods
1072
- const methodRegex = /(?:async\s+)?(?:public|private|protected)?\s*(\w+)\s*\([^)]*\)/g;
1073
- let methodMatch;
1074
- while ((methodMatch = methodRegex.exec(classBody)) !== null) {
1075
- if (methodMatch[1] && methodMatch[1] !== 'constructor') {
1076
- methods.push(methodMatch[1]);
1077
- }
1078
- }
1079
- // Extract properties
1080
- const propRegex = /(?:public|private|protected|readonly)?\s+(\w+)\s*[:=]/g;
1081
- let propMatch;
1082
- while ((propMatch = propRegex.exec(classBody)) !== null) {
1083
- if (propMatch[1]) {
1084
- properties.push(propMatch[1]);
1085
- }
1086
- }
1087
- classes.push({
1088
- name,
1089
- line,
1090
- methods,
1091
- properties,
1092
- extends: extendsClass,
1093
- implements: implementsList,
1094
- isExported,
1095
- });
1096
- }
1097
- }
1098
- else if (ext === '.py') {
1099
- const classRegex = /class\s+(\w+)(?:\s*\(([^)]*)\))?\s*:/g;
1100
- let match;
1101
- while ((match = classRegex.exec(content)) !== null) {
1102
- const name = match[1] || '';
1103
- const line = content.substring(0, match.index).split('\n').length;
1104
- const parentClasses = match[2]
1105
- ? match[2]
1106
- .split(',')
1107
- .map((s) => s.trim())
1108
- .filter(Boolean)
1109
- : [];
1110
- classes.push({
1111
- name,
1112
- line,
1113
- methods: [],
1114
- properties: [],
1115
- extends: parentClasses[0],
1116
- implements: parentClasses.slice(1),
1117
- isExported: !name.startsWith('_'),
1118
- });
1119
- }
1120
- }
1121
- return classes;
1122
- }
1123
- function detectCodePatterns(content, _ext) {
1124
- const patterns = [];
1125
- // Common patterns detection
1126
- if (/async\s+function|async\s+\(|await\s+/.test(content)) {
1127
- patterns.push('Async/Await');
1128
- }
1129
- if (/Promise\.all|Promise\.race|Promise\.allSettled/.test(content)) {
1130
- patterns.push('Promise Combinators');
1131
- }
1132
- if (/try\s*\{[\s\S]*?\}\s*catch/.test(content)) {
1133
- patterns.push('Try-Catch Error Handling');
1134
- }
1135
- if (/\.map\s*\(|\.filter\s*\(|\.reduce\s*\(/.test(content)) {
1136
- patterns.push('Functional Array Methods');
1137
- }
1138
- if (/Object\.freeze|Object\.seal|readonly\s+/.test(content)) {
1139
- patterns.push('Immutability');
1140
- }
1141
- if (/interface\s+\w+|type\s+\w+\s*=/.test(content)) {
1142
- patterns.push('TypeScript Types');
1143
- }
1144
- if (/\bclass\s+\w+/.test(content)) {
1145
- patterns.push('Object-Oriented');
1146
- }
1147
- if (/export\s+default|export\s+\{|module\.exports/.test(content)) {
1148
- patterns.push('Module Pattern');
1149
- }
1150
- if (/\.test\(|\.spec\.|describe\s*\(|it\s*\(|expect\s*\(/.test(content)) {
1151
- patterns.push('Testing');
1152
- }
1153
- if (/console\.(log|error|warn|debug)/.test(content)) {
1154
- patterns.push('Console Logging');
1155
- }
1156
- if (/@decorator|@\w+\s*\(|@\w+\s*\n/.test(content)) {
1157
- patterns.push('Decorators');
1158
- }
1159
- if (/useEffect|useState|useCallback|useMemo/.test(content)) {
1160
- patterns.push('React Hooks');
1161
- }
1162
- if (/createSlice|createReducer|createAction/.test(content)) {
1163
- patterns.push('Redux Toolkit');
1164
- }
1165
- return patterns;
1166
- }
1167
- function calculateComplexity(content) {
1168
- const lines = content.split('\n');
1169
- const linesOfCode = lines.filter((l) => l.trim() && !l.trim().startsWith('//')).length;
1170
- const linesOfComments = lines.filter((l) => l.trim().startsWith('//')).length;
1171
- // Simple cyclomatic complexity estimation
1172
- let cyclomaticComplexity = 1;
1173
- const controlFlowPatterns = /\bif\b|\belse\b|\bfor\b|\bwhile\b|\bcase\b|\bcatch\b|\b\?\s*:/g;
1174
- const matches = content.match(controlFlowPatterns);
1175
- if (matches) {
1176
- cyclomaticComplexity += matches.length;
1177
- }
1178
- // Cognitive complexity (simplified)
1179
- let cognitiveComplexity = cyclomaticComplexity;
1180
- const nestedPatterns = /\{\s*\{|\bif\b.*\bif\b/g;
1181
- const nestedMatches = content.match(nestedPatterns);
1182
- if (nestedMatches) {
1183
- cognitiveComplexity += nestedMatches.length * 2;
1184
- }
1185
- // Maintainability index (simplified, 0-100 scale)
1186
- const maintainabilityIndex = Math.max(0, Math.min(100, 171 - 5.2 * Math.log(linesOfCode + 1) - 0.23 * cyclomaticComplexity - 16.2 * Math.log(linesOfCode / (linesOfComments + 1) + 1)));
1187
- return {
1188
- cyclomaticComplexity,
1189
- cognitiveComplexity,
1190
- maintainabilityIndex: Math.round(maintainabilityIndex),
1191
- linesOfCode,
1192
- linesOfComments,
1193
- };
1194
- }
1195
- function inferFilePurpose(filename, _content, _imports, exports, functions, classes) {
1196
- const lower = filename.toLowerCase();
1197
- // Check filename patterns
1198
- if (lower.includes('test') || lower.includes('spec')) {
1199
- return 'Test file for unit/integration testing';
1200
- }
1201
- if (lower === 'index.ts' || lower === 'index.js') {
1202
- return 'Module entry point and public API exports';
1203
- }
1204
- if (lower.includes('config')) {
1205
- return 'Configuration settings and constants';
1206
- }
1207
- if (lower.includes('type') || lower.includes('interface')) {
1208
- return 'Type definitions and interfaces';
1209
- }
1210
- if (lower.includes('util') || lower.includes('helper')) {
1211
- return 'Utility functions and helpers';
1212
- }
1213
- if (lower.includes('hook')) {
1214
- return 'Custom React hooks';
1215
- }
1216
- if (lower.includes('context')) {
1217
- return 'React context provider';
1218
- }
1219
- if (lower.includes('store') || lower.includes('reducer')) {
1220
- return 'State management';
1221
- }
1222
- if (lower.includes('service')) {
1223
- return 'Business logic and service layer';
1224
- }
1225
- if (lower.includes('api') || lower.includes('client')) {
1226
- return 'API client and HTTP requests';
1227
- }
1228
- if (lower.includes('route')) {
1229
- return 'Route definitions and handlers';
1230
- }
1231
- if (lower.includes('middleware')) {
1232
- return 'Middleware functions';
1233
- }
1234
- if (lower.includes('model') || lower.includes('entity')) {
1235
- return 'Data models and entities';
1236
- }
1237
- if (lower.includes('schema')) {
1238
- return 'Schema definitions and validation';
1239
- }
1240
- if (lower.includes('component')) {
1241
- return 'UI component';
1242
- }
1243
- // Infer from content
1244
- if (classes.length > 0 && functions.length === 0) {
1245
- return `Class definitions: ${classes.map((c) => c.name).join(', ')}`;
1246
- }
1247
- if (functions.length > 0 && classes.length === 0) {
1248
- const exportedFuncs = functions.filter((f) => f.isExported);
1249
- if (exportedFuncs.length > 0) {
1250
- return `Function library: ${exportedFuncs.map((f) => f.name).slice(0, 3).join(', ')}${exportedFuncs.length > 3 ? '...' : ''}`;
1251
- }
1252
- }
1253
- if (exports.length > 0) {
1254
- return `Module exporting: ${exports.map((e) => e.name).slice(0, 3).join(', ')}${exports.length > 3 ? '...' : ''}`;
1255
- }
1256
- return 'General module';
1257
- }
1258
- function analyzeTopic(workingDir, topic, maxFiles, maxExamples) {
1259
- const topicLower = topic.toLowerCase();
1260
- const relevantFiles = [];
1261
- const patterns = new Map();
1262
- const examples = [];
1263
- // Keywords to search for based on topic
1264
- const keywords = generateTopicKeywords(topicLower);
1265
- // Search through files
1266
- const allFiles = collectAllFiles(workingDir, 4);
1267
- for (const filePath of allFiles) {
1268
- try {
1269
- const content = readFileSync(filePath, 'utf-8');
1270
- const lines = content.split('\n');
1271
- const relPath = relative(workingDir, filePath);
1272
- // Calculate relevance score
1273
- let relevance = 0;
1274
- const snippets = [];
1275
- for (const keyword of keywords) {
1276
- const regex = new RegExp(keyword, 'gi');
1277
- const matches = content.match(regex);
1278
- if (matches) {
1279
- relevance += matches.length;
1280
- // Find snippets containing the keyword
1281
- for (let i = 0; i < lines.length && snippets.length < 3; i++) {
1282
- if (lines[i]?.toLowerCase().includes(keyword)) {
1283
- const snippet = lines.slice(Math.max(0, i - 1), Math.min(lines.length, i + 3)).join('\n');
1284
- if (!snippets.includes(snippet)) {
1285
- snippets.push(snippet);
1286
- // Add to patterns
1287
- const patternName = identifyPattern(lines[i] ?? '', keyword);
1288
- if (patternName) {
1289
- const existing = patterns.get(patternName) || { count: 0, locations: [] };
1290
- existing.count++;
1291
- if (!existing.locations.includes(relPath)) {
1292
- existing.locations.push(relPath);
1293
- }
1294
- patterns.set(patternName, existing);
1295
- }
1296
- // Add to examples
1297
- if (examples.length < maxExamples) {
1298
- examples.push({
1299
- file: relPath,
1300
- line: i + 1,
1301
- code: snippet,
1302
- explanation: `Example of ${topic} usage`,
1303
- });
1304
- }
1305
- }
1306
- }
1307
- }
1308
- }
1309
- }
1310
- if (relevance > 0) {
1311
- relevantFiles.push({
1312
- path: relPath,
1313
- relevance,
1314
- snippets,
1315
- });
1316
- }
1317
- }
1318
- catch {
1319
- // Skip files we can't read
1320
- }
1321
- }
1322
- // Sort by relevance and limit
1323
- relevantFiles.sort((a, b) => b.relevance - a.relevance);
1324
- const topFiles = relevantFiles.slice(0, maxFiles);
1325
- // Convert patterns map to array
1326
- const topicPatterns = Array.from(patterns.entries())
1327
- .map(([name, data]) => ({
1328
- name,
1329
- occurrences: data.count,
1330
- locations: data.locations,
1331
- }))
1332
- .sort((a, b) => b.occurrences - a.occurrences);
1333
- // Generate summary
1334
- const summary = generateTopicSummary(topic, topFiles, topicPatterns, examples);
1335
- return {
1336
- topic,
1337
- relevantFiles: topFiles,
1338
- patterns: topicPatterns,
1339
- examples: examples.slice(0, maxExamples),
1340
- summary,
1341
- };
1342
- }
1343
- function generateTopicKeywords(topic) {
1344
- const keywords = [topic];
1345
- // Add related keywords
1346
- const relatedKeywords = {
1347
- auth: ['authentication', 'authorize', 'login', 'logout', 'session', 'token', 'jwt', 'oauth', 'passport'],
1348
- error: ['error', 'exception', 'catch', 'throw', 'try', 'finally', 'fail', 'handle'],
1349
- api: ['api', 'route', 'endpoint', 'handler', 'request', 'response', 'http', 'rest', 'graphql'],
1350
- test: ['test', 'spec', 'describe', 'it', 'expect', 'mock', 'jest', 'vitest', 'pytest'],
1351
- database: ['database', 'db', 'sql', 'query', 'model', 'schema', 'migration', 'orm', 'prisma', 'mongoose'],
1352
- validation: ['validate', 'validation', 'schema', 'zod', 'yup', 'joi', 'check', 'verify'],
1353
- state: ['state', 'store', 'reducer', 'action', 'dispatch', 'context', 'redux', 'zustand', 'recoil'],
1354
- cache: ['cache', 'memoize', 'memo', 'redis', 'memcached', 'ttl', 'invalidate'],
1355
- logging: ['log', 'logger', 'logging', 'debug', 'trace', 'info', 'warn', 'error', 'console'],
1356
- config: ['config', 'configuration', 'settings', 'env', 'environment', 'options'],
1357
- };
1358
- for (const [key, related] of Object.entries(relatedKeywords)) {
1359
- if (topic.includes(key)) {
1360
- keywords.push(...related);
1361
- }
1362
- }
1363
- return [...new Set(keywords)];
1364
- }
1365
- function identifyPattern(line, _keyword) {
1366
- const lower = line.toLowerCase();
1367
- if (lower.includes('try') && lower.includes('catch'))
1368
- return 'Try-Catch Pattern';
1369
- if (lower.includes('async') && lower.includes('await'))
1370
- return 'Async/Await Pattern';
1371
- if (lower.includes('export') && lower.includes('default'))
1372
- return 'Default Export';
1373
- if (lower.includes('import') && lower.includes('from'))
1374
- return 'ES6 Import';
1375
- if (lower.includes('class') && lower.includes('extends'))
1376
- return 'Class Inheritance';
1377
- if (lower.includes('interface') || lower.includes('type'))
1378
- return 'Type Definition';
1379
- if (/\.(map|filter|reduce)\s*\(/.test(lower))
1380
- return 'Functional Methods';
1381
- if (lower.includes('usestate') || lower.includes('useeffect'))
1382
- return 'React Hooks';
1383
- if (lower.includes('describe') && lower.includes('it'))
1384
- return 'Test Structure';
1385
- return null;
1386
- }
1387
- function generateTopicSummary(topic, files, patterns, examples) {
1388
- const parts = [];
1389
- parts.push(`Analysis of "${topic}" in this codebase:\n`);
1390
- if (files.length === 0) {
1391
- parts.push(`No files found directly related to "${topic}". Consider searching for related terms.`);
1392
- }
1393
- else {
1394
- parts.push(`Found ${files.length} relevant file(s).`);
1395
- if (patterns.length > 0) {
1396
- parts.push(`\nDetected patterns:`);
1397
- for (const pattern of patterns.slice(0, 5)) {
1398
- parts.push(`- ${pattern.name}: ${pattern.occurrences} occurrence(s)`);
1399
- }
1400
- }
1401
- if (examples.length > 0) {
1402
- parts.push(`\n${examples.length} code example(s) available.`);
1403
- }
1404
- parts.push(`\nMost relevant files:`);
1405
- for (const file of files.slice(0, 5)) {
1406
- parts.push(`- ${file.path} (relevance: ${file.relevance})`);
1407
- }
1408
- }
1409
- return parts.join('\n');
1410
- }
1411
- function collectAllFiles(dir, maxDepth, depth = 0) {
1412
- const files = [];
1413
- if (depth >= maxDepth)
1414
- return files;
1415
- try {
1416
- const entries = readdirSync(dir, { withFileTypes: true });
1417
- for (const entry of entries) {
1418
- if (entry.name.startsWith('.') || IGNORED_DIRS.has(entry.name)) {
1419
- continue;
1420
- }
1421
- const fullPath = join(dir, entry.name);
1422
- if (entry.isDirectory()) {
1423
- files.push(...collectAllFiles(fullPath, maxDepth, depth + 1));
1424
- }
1425
- else if (entry.isFile()) {
1426
- const ext = extname(entry.name).toLowerCase();
1427
- if (LANGUAGE_MAP[ext]) {
1428
- files.push(fullPath);
1429
- }
1430
- }
1431
- }
1432
- }
1433
- catch {
1434
- // Skip directories we can't read
1435
- }
1436
- return files;
1437
- }
1438
- // =====================================================
1439
- // Formatting Functions
1440
- // =====================================================
1441
- function formatCodebaseAnalysis(analysis) {
1442
- const output = [];
1443
- output.push(`# Codebase Analysis: ${analysis.rootDir}`);
1444
- output.push('');
1445
- // Overview
1446
- output.push('## Overview');
1447
- output.push(`- Total files: ${analysis.totalFiles}`);
1448
- output.push(`- Total directories: ${analysis.totalDirectories}`);
1449
- output.push('');
1450
- // Languages
1451
- output.push('## Languages');
1452
- for (const lang of analysis.languages.slice(0, 10)) {
1453
- output.push(`- ${lang.language}: ${lang.fileCount} files (${lang.percentage.toFixed(1)}%)`);
1454
- }
1455
- output.push('');
1456
- // Architecture
1457
- output.push('## Architecture');
1458
- output.push(`- Type: ${analysis.architecture.type}`);
1459
- if (analysis.architecture.layers.length > 0) {
1460
- output.push(`- Layers: ${analysis.architecture.layers.join(', ')}`);
1461
- }
1462
- if (analysis.architecture.dataFlow.length > 0) {
1463
- output.push('- Data Flow:');
1464
- for (const flow of analysis.architecture.dataFlow) {
1465
- output.push(` - ${flow}`);
1466
- }
1467
- }
1468
- output.push('');
1469
- // Detected Patterns
1470
- if (analysis.patterns.length > 0) {
1471
- output.push('## Detected Patterns');
1472
- for (const pattern of analysis.patterns) {
1473
- output.push(`- **${pattern.name}** (${pattern.confidence} confidence)`);
1474
- output.push(` ${pattern.description}`);
1475
- }
1476
- output.push('');
1477
- }
1478
- // Key Components
1479
- if (analysis.architecture.components.length > 0) {
1480
- output.push('## Key Components');
1481
- for (const comp of analysis.architecture.components.slice(0, 15)) {
1482
- output.push(`- **${comp.name}** (${comp.type}): ${comp.path}`);
1483
- if (comp.responsibilities.length > 0) {
1484
- output.push(` Responsibilities: ${comp.responsibilities.join(', ')}`);
1485
- }
1486
- }
1487
- output.push('');
1488
- }
1489
- // Entry Points
1490
- if (analysis.entryPoints.length > 0) {
1491
- output.push('## Entry Points');
1492
- for (const entry of analysis.entryPoints) {
1493
- output.push(`- ${entry}`);
1494
- }
1495
- output.push('');
1496
- }
1497
- // Configuration Files
1498
- if (analysis.configFiles.length > 0) {
1499
- output.push('## Configuration Files');
1500
- for (const config of analysis.configFiles.slice(0, 10)) {
1501
- output.push(`- **${config.name}** (${config.type}): ${config.purpose}`);
1502
- }
1503
- output.push('');
1504
- }
1505
- // Dependencies
1506
- if (analysis.dependencies.hasDependencyFile) {
1507
- output.push('## Dependencies');
1508
- output.push(`- Package Manager: ${analysis.dependencies.packageManager || 'Unknown'}`);
1509
- if (analysis.dependencies.dependencies.length > 0) {
1510
- output.push(`- Dependencies: ${analysis.dependencies.dependencies.slice(0, 10).join(', ')}${analysis.dependencies.dependencies.length > 10 ? '...' : ''}`);
1511
- }
1512
- if (analysis.dependencies.devDependencies.length > 0) {
1513
- output.push(`- Dev Dependencies: ${analysis.dependencies.devDependencies.slice(0, 10).join(', ')}${analysis.dependencies.devDependencies.length > 10 ? '...' : ''}`);
1514
- }
1515
- output.push('');
1516
- }
1517
- // Directory Structure (simplified)
1518
- output.push('## Directory Structure');
1519
- output.push(formatDirectoryTree(analysis.structure, 0, 3));
1520
- return output.join('\n');
1521
- }
1522
- function formatDirectoryTree(node, depth, maxDepth) {
1523
- const indent = ' '.repeat(depth);
1524
- const lines = [];
1525
- if (node.type === 'directory') {
1526
- lines.push(`${indent}${node.name}/`);
1527
- if (node.children && depth < maxDepth) {
1528
- for (const child of node.children.slice(0, 15)) {
1529
- lines.push(formatDirectoryTree(child, depth + 1, maxDepth));
1530
- }
1531
- if (node.children.length > 15) {
1532
- lines.push(`${indent} ... (${node.children.length - 15} more)`);
1533
- }
1534
- }
1535
- }
1536
- else {
1537
- const langSuffix = node.language ? ` [${node.language}]` : '';
1538
- lines.push(`${indent}${node.name}${langSuffix}`);
1539
- }
1540
- return lines.join('\n');
1541
- }
1542
- function formatFileAnalysis(analysis) {
1543
- const output = [];
1544
- output.push(`# File Analysis: ${analysis.path}`);
1545
- output.push('');
1546
- // Overview
1547
- output.push('## Overview');
1548
- output.push(`- Language: ${analysis.language}`);
1549
- output.push(`- Lines: ${analysis.lineCount}`);
1550
- output.push(`- Size: ${(analysis.size / 1024).toFixed(2)} KB`);
1551
- output.push(`- Purpose: ${analysis.purpose}`);
1552
- output.push('');
1553
- // Complexity
1554
- output.push('## Complexity Metrics');
1555
- output.push(`- Cyclomatic Complexity: ${analysis.complexity.cyclomaticComplexity}`);
1556
- output.push(`- Cognitive Complexity: ${analysis.complexity.cognitiveComplexity}`);
1557
- output.push(`- Maintainability Index: ${analysis.complexity.maintainabilityIndex}/100`);
1558
- output.push(`- Lines of Code: ${analysis.complexity.linesOfCode}`);
1559
- output.push(`- Lines of Comments: ${analysis.complexity.linesOfComments}`);
1560
- output.push('');
1561
- // Imports
1562
- if (analysis.imports.length > 0) {
1563
- output.push('## Imports');
1564
- for (const imp of analysis.imports.slice(0, 15)) {
1565
- const type = imp.isRelative ? '(relative)' : '(external)';
1566
- output.push(`- ${imp.source} ${type}`);
1567
- if (imp.specifiers.length > 0) {
1568
- output.push(` Imports: ${imp.specifiers.join(', ')}`);
1569
- }
1570
- }
1571
- if (analysis.imports.length > 15) {
1572
- output.push(`- ... and ${analysis.imports.length - 15} more imports`);
1573
- }
1574
- output.push('');
1575
- }
1576
- // Exports
1577
- if (analysis.exports.length > 0) {
1578
- output.push('## Exports');
1579
- for (const exp of analysis.exports) {
1580
- output.push(`- ${exp.name} (${exp.type})`);
1581
- }
1582
- output.push('');
1583
- }
1584
- // Functions
1585
- if (analysis.functions.length > 0) {
1586
- output.push('## Functions');
1587
- for (const func of analysis.functions.slice(0, 20)) {
1588
- const async = func.isAsync ? 'async ' : '';
1589
- const exported = func.isExported ? 'export ' : '';
1590
- const params = func.parameters.join(', ');
1591
- const ret = func.returnType ? `: ${func.returnType}` : '';
1592
- output.push(`- Line ${func.line}: ${exported}${async}${func.name}(${params})${ret}`);
1593
- }
1594
- if (analysis.functions.length > 20) {
1595
- output.push(`- ... and ${analysis.functions.length - 20} more functions`);
1596
- }
1597
- output.push('');
1598
- }
1599
- // Classes
1600
- if (analysis.classes.length > 0) {
1601
- output.push('## Classes');
1602
- for (const cls of analysis.classes) {
1603
- const exported = cls.isExported ? 'export ' : '';
1604
- const ext = cls.extends ? ` extends ${cls.extends}` : '';
1605
- const impl = cls.implements?.length ? ` implements ${cls.implements.join(', ')}` : '';
1606
- output.push(`- Line ${cls.line}: ${exported}class ${cls.name}${ext}${impl}`);
1607
- if (cls.methods.length > 0) {
1608
- output.push(` Methods: ${cls.methods.join(', ')}`);
1609
- }
1610
- if (cls.properties.length > 0) {
1611
- output.push(` Properties: ${cls.properties.join(', ')}`);
1612
- }
1613
- }
1614
- output.push('');
1615
- }
1616
- // Patterns
1617
- if (analysis.patterns.length > 0) {
1618
- output.push('## Detected Patterns');
1619
- output.push(analysis.patterns.join(', '));
1620
- output.push('');
1621
- }
1622
- // Relationships
1623
- if (analysis.relationships.length > 0) {
1624
- output.push('## File Relationships');
1625
- for (const rel of analysis.relationships) {
1626
- output.push(`- ${rel.type}: ${rel.targetFile}`);
1627
- if (rel.symbols.length > 0) {
1628
- output.push(` Symbols: ${rel.symbols.join(', ')}`);
1629
- }
1630
- }
1631
- output.push('');
1632
- }
1633
- return output.join('\n');
1634
- }
1635
- function formatTopicAnalysis(analysis) {
1636
- const output = [];
1637
- output.push(`# Topic Analysis: "${analysis.topic}"`);
1638
- output.push('');
1639
- output.push(analysis.summary);
1640
- output.push('');
1641
- // Patterns
1642
- if (analysis.patterns.length > 0) {
1643
- output.push('## Patterns Found');
1644
- for (const pattern of analysis.patterns) {
1645
- output.push(`### ${pattern.name}`);
1646
- output.push(`- Occurrences: ${pattern.occurrences}`);
1647
- output.push(`- Found in: ${pattern.locations.slice(0, 5).join(', ')}${pattern.locations.length > 5 ? '...' : ''}`);
1648
- output.push('');
1649
- }
1650
- }
1651
- // Relevant Files
1652
- if (analysis.relevantFiles.length > 0) {
1653
- output.push('## Relevant Files');
1654
- for (const file of analysis.relevantFiles) {
1655
- output.push(`### ${file.path}`);
1656
- output.push(`Relevance Score: ${file.relevance}`);
1657
- if (file.snippets.length > 0) {
1658
- output.push('');
1659
- output.push('Relevant snippets:');
1660
- for (const snippet of file.snippets.slice(0, 2)) {
1661
- output.push('```');
1662
- output.push(snippet);
1663
- output.push('```');
1664
- }
1665
- }
1666
- output.push('');
1667
- }
1668
- }
1669
- // Code Examples
1670
- if (analysis.examples.length > 0) {
1671
- output.push('## Code Examples');
1672
- for (const example of analysis.examples) {
1673
- output.push(`### ${example.file}:${example.line}`);
1674
- output.push(example.explanation);
1675
- output.push('```');
1676
- output.push(example.code);
1677
- output.push('```');
1678
- output.push('');
1679
- }
1680
- }
1681
- return output.join('\n');
1682
- }
1683
- function formatLearningSummary(analysis, format, _focus) {
1684
- const output = [];
1685
- const isMarkdown = format === 'markdown';
1686
- const h1 = (text) => (isMarkdown ? `# ${text}` : text.toUpperCase());
1687
- const h2 = (text) => (isMarkdown ? `## ${text}` : `\n${text}`);
1688
- const bullet = isMarkdown ? '-' : '*';
1689
- output.push(h1('Codebase Learning Summary'));
1690
- output.push('');
1691
- // Quick Start
1692
- output.push(h2('Quick Start'));
1693
- output.push('');
1694
- const mainLang = analysis.languages[0];
1695
- if (mainLang) {
1696
- output.push(`This is primarily a **${mainLang.language}** project.`);
1697
- }
1698
- if (analysis.dependencies.packageManager) {
1699
- output.push(`Package manager: **${analysis.dependencies.packageManager}**`);
1700
- }
1701
- if (analysis.entryPoints.length > 0) {
1702
- output.push(`Main entry point: \`${analysis.entryPoints[0]}\``);
1703
- }
1704
- output.push('');
1705
- // Architecture Overview
1706
- output.push(h2('Architecture Overview'));
1707
- output.push('');
1708
- output.push(`Architecture Type: **${analysis.architecture.type}**`);
1709
- if (analysis.architecture.layers.length > 0) {
1710
- output.push(`Layers: ${analysis.architecture.layers.join(' → ')}`);
1711
- }
1712
- for (const flow of analysis.architecture.dataFlow) {
1713
- output.push(`${bullet} ${flow}`);
1714
- }
1715
- output.push('');
1716
- // Key Concepts
1717
- output.push(h2('Key Concepts'));
1718
- output.push('');
1719
- for (const pattern of analysis.patterns.slice(0, 5)) {
1720
- output.push(`${bullet} **${pattern.name}**: ${pattern.description}`);
1721
- }
1722
- output.push('');
1723
- // Important Files
1724
- output.push(h2('Important Files'));
1725
- output.push('');
1726
- for (const config of analysis.configFiles.slice(0, 5)) {
1727
- output.push(`${bullet} \`${config.path}\`: ${config.purpose}`);
1728
- }
1729
- if (analysis.entryPoints.length > 0) {
1730
- output.push('');
1731
- output.push('Entry points:');
1732
- for (const entry of analysis.entryPoints) {
1733
- output.push(`${bullet} \`${entry}\``);
1734
- }
1735
- }
1736
- output.push('');
1737
- // Directory Guide
1738
- output.push(h2('Directory Guide'));
1739
- output.push('');
1740
- for (const comp of analysis.architecture.components.slice(0, 10)) {
1741
- output.push(`${bullet} **${comp.name}/** (${comp.type})`);
1742
- if (comp.responsibilities.length > 0) {
1743
- output.push(` ${comp.responsibilities.slice(0, 2).join(', ')}`);
1744
- }
1745
- }
1746
- output.push('');
1747
- // Common Patterns
1748
- if (analysis.patterns.length > 0) {
1749
- output.push(h2('Common Patterns'));
1750
- output.push('');
1751
- for (const pattern of analysis.patterns.filter((p) => p.confidence === 'high').slice(0, 5)) {
1752
- output.push(`${bullet} **${pattern.name}**`);
1753
- for (const evidence of pattern.evidence.slice(0, 2)) {
1754
- output.push(` ${bullet} ${evidence}`);
1755
- }
1756
- }
1757
- output.push('');
1758
- }
1759
- // Development Workflow
1760
- output.push(h2('Development Workflow'));
1761
- output.push('');
1762
- const hasTest = analysis.configFiles.some((c) => c.type === 'testing');
1763
- const hasLint = analysis.configFiles.some((c) => c.type === 'linting');
1764
- const hasBundler = analysis.configFiles.some((c) => c.type === 'bundler');
1765
- if (analysis.dependencies.packageManager === 'npm') {
1766
- output.push('```bash');
1767
- output.push('# Install dependencies');
1768
- output.push('npm install');
1769
- output.push('');
1770
- if (hasBundler) {
1771
- output.push('# Build project');
1772
- output.push('npm run build');
1773
- output.push('');
1774
- }
1775
- if (hasTest) {
1776
- output.push('# Run tests');
1777
- output.push('npm test');
1778
- output.push('');
1779
- }
1780
- if (hasLint) {
1781
- output.push('# Lint code');
1782
- output.push('npm run lint');
1783
- }
1784
- output.push('```');
1785
- }
1786
- else if (analysis.dependencies.packageManager === 'pip') {
1787
- output.push('```bash');
1788
- output.push('# Install dependencies');
1789
- output.push('pip install -e .');
1790
- output.push('');
1791
- if (hasTest) {
1792
- output.push('# Run tests');
1793
- output.push('pytest');
1794
- }
1795
- output.push('```');
1796
- }
1797
- output.push('');
1798
- // Next Steps
1799
- output.push(h2('Suggested Next Steps'));
1800
- output.push('');
1801
- output.push(`1. Read the entry point: \`${analysis.entryPoints[0] || 'index file'}\``);
1802
- if (analysis.configFiles.some((c) => c.name === 'package.json')) {
1803
- output.push('2. Review `package.json` for available scripts');
1804
- }
1805
- output.push('3. Explore the main directories to understand the structure');
1806
- if (hasTest) {
1807
- output.push('4. Run the test suite to verify setup');
1808
- }
1809
- output.push('5. Use `learn_topic` to explore specific features');
1810
- return output.join('\n');
1811
- }
1812
- // =====================================================
1813
- // Utilities
1814
- // =====================================================
1815
- function resolveFilePath(workingDir, path) {
1816
- const normalized = path.trim();
1817
- return normalized.startsWith('/') ? normalized : join(workingDir, normalized);
1818
- }
1819
- //# sourceMappingURL=learnTools.js.map