erosolar-cli 2.1.249 → 2.1.253

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 (470) hide show
  1. package/agents/general.rules.json +10 -133
  2. package/agents/general.rules.json.bak +278 -0
  3. package/agents/general.rules.json.bak2 +306 -0
  4. package/dist/bin/erosolar.js +9 -5
  5. package/dist/bin/erosolar.js.map +1 -1
  6. package/dist/capabilities/bidirectionalAuditCapability.d.ts +26 -0
  7. package/dist/capabilities/bidirectionalAuditCapability.d.ts.map +1 -0
  8. package/dist/capabilities/bidirectionalAuditCapability.js +44 -0
  9. package/dist/capabilities/bidirectionalAuditCapability.js.map +1 -0
  10. package/dist/capabilities/globCapability.d.ts +3 -6
  11. package/dist/capabilities/globCapability.d.ts.map +1 -1
  12. package/dist/capabilities/globCapability.js +6 -10
  13. package/dist/capabilities/globCapability.js.map +1 -1
  14. package/dist/capabilities/index.d.ts +1 -18
  15. package/dist/capabilities/index.d.ts.map +1 -1
  16. package/dist/capabilities/index.js +1 -18
  17. package/dist/capabilities/index.js.map +1 -1
  18. package/dist/capabilities/orchestrationCapability.d.ts +2 -0
  19. package/dist/capabilities/orchestrationCapability.d.ts.map +1 -1
  20. package/dist/capabilities/orchestrationCapability.js +980 -2
  21. package/dist/capabilities/orchestrationCapability.js.map +1 -1
  22. package/dist/capabilities/searchCapability.d.ts +8 -2
  23. package/dist/capabilities/searchCapability.d.ts.map +1 -1
  24. package/dist/capabilities/searchCapability.js +11 -6
  25. package/dist/capabilities/searchCapability.js.map +1 -1
  26. package/dist/contracts/tools.schema.json +9 -133
  27. package/dist/core/aiErrorFixer.d.ts +1 -14
  28. package/dist/core/aiErrorFixer.d.ts.map +1 -1
  29. package/dist/core/aiErrorFixer.js +51 -239
  30. package/dist/core/aiErrorFixer.js.map +1 -1
  31. package/dist/core/alphaZeroEngine.d.ts +16 -256
  32. package/dist/core/alphaZeroEngine.d.ts.map +1 -1
  33. package/dist/core/alphaZeroEngine.js +22 -513
  34. package/dist/core/alphaZeroEngine.js.map +1 -1
  35. package/dist/core/completeAttackOrchestrator.d.ts +102 -0
  36. package/dist/core/completeAttackOrchestrator.d.ts.map +1 -0
  37. package/dist/core/completeAttackOrchestrator.js +293 -0
  38. package/dist/core/completeAttackOrchestrator.js.map +1 -0
  39. package/dist/core/defensiveSecurityToolkit.d.ts +373 -0
  40. package/dist/core/defensiveSecurityToolkit.d.ts.map +1 -0
  41. package/dist/core/defensiveSecurityToolkit.js +1304 -0
  42. package/dist/core/defensiveSecurityToolkit.js.map +1 -0
  43. package/dist/core/errors/errorTypes.d.ts +30 -57
  44. package/dist/core/errors/errorTypes.d.ts.map +1 -1
  45. package/dist/core/errors/errorTypes.js +51 -228
  46. package/dist/core/errors/errorTypes.js.map +1 -1
  47. package/dist/core/errors/safetyValidator.d.ts +19 -3
  48. package/dist/core/errors/safetyValidator.d.ts.map +1 -1
  49. package/dist/core/errors/safetyValidator.js +33 -71
  50. package/dist/core/errors/safetyValidator.js.map +1 -1
  51. package/dist/core/failureRecovery.d.ts +4 -100
  52. package/dist/core/failureRecovery.d.ts.map +1 -1
  53. package/dist/core/failureRecovery.js +16 -440
  54. package/dist/core/failureRecovery.js.map +1 -1
  55. package/dist/core/intelligentTargetResearcher.d.ts +142 -0
  56. package/dist/core/intelligentTargetResearcher.d.ts.map +1 -0
  57. package/dist/core/intelligentTargetResearcher.js +367 -0
  58. package/dist/core/intelligentTargetResearcher.js.map +1 -0
  59. package/dist/core/intelligentTestFlows.d.ts +26 -107
  60. package/dist/core/intelligentTestFlows.d.ts.map +1 -1
  61. package/dist/core/intelligentTestFlows.js +15 -659
  62. package/dist/core/intelligentTestFlows.js.map +1 -1
  63. package/dist/core/learningPersistence.d.ts +45 -132
  64. package/dist/core/learningPersistence.d.ts.map +1 -1
  65. package/dist/core/learningPersistence.js +32 -463
  66. package/dist/core/learningPersistence.js.map +1 -1
  67. package/dist/core/metricsTracker.d.ts +22 -139
  68. package/dist/core/metricsTracker.d.ts.map +1 -1
  69. package/dist/core/metricsTracker.js +51 -241
  70. package/dist/core/metricsTracker.js.map +1 -1
  71. package/dist/core/performanceMonitor.d.ts +15 -109
  72. package/dist/core/performanceMonitor.d.ts.map +1 -1
  73. package/dist/core/performanceMonitor.js +27 -184
  74. package/dist/core/performanceMonitor.js.map +1 -1
  75. package/dist/core/reliabilityPrompt.d.ts.map +1 -1
  76. package/dist/core/reliabilityPrompt.js +14 -0
  77. package/dist/core/reliabilityPrompt.js.map +1 -1
  78. package/dist/core/resultVerification.d.ts +6 -100
  79. package/dist/core/resultVerification.d.ts.map +1 -1
  80. package/dist/core/resultVerification.js +31 -400
  81. package/dist/core/resultVerification.js.map +1 -1
  82. package/dist/core/selfEvolution.d.ts +32 -126
  83. package/dist/core/selfEvolution.d.ts.map +1 -1
  84. package/dist/core/selfEvolution.js +24 -967
  85. package/dist/core/selfEvolution.js.map +1 -1
  86. package/dist/core/selfImprovement.d.ts +50 -109
  87. package/dist/core/selfImprovement.d.ts.map +1 -1
  88. package/dist/core/selfImprovement.js +14 -689
  89. package/dist/core/selfImprovement.js.map +1 -1
  90. package/dist/core/sourceCodeManager.d.ts +89 -0
  91. package/dist/core/sourceCodeManager.d.ts.map +1 -0
  92. package/dist/core/sourceCodeManager.js +332 -0
  93. package/dist/core/sourceCodeManager.js.map +1 -0
  94. package/dist/core/unifiedOrchestrator.d.ts +88 -0
  95. package/dist/core/unifiedOrchestrator.d.ts.map +1 -0
  96. package/dist/core/unifiedOrchestrator.js +284 -0
  97. package/dist/core/unifiedOrchestrator.js.map +1 -0
  98. package/dist/core/userDefenseOrchestrator.d.ts +202 -0
  99. package/dist/core/userDefenseOrchestrator.d.ts.map +1 -0
  100. package/dist/core/userDefenseOrchestrator.js +1006 -0
  101. package/dist/core/userDefenseOrchestrator.js.map +1 -0
  102. package/dist/plugins/index.d.ts +1 -1
  103. package/dist/plugins/index.d.ts.map +1 -1
  104. package/dist/plugins/index.js +36 -26
  105. package/dist/plugins/index.js.map +1 -1
  106. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts +8 -0
  107. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts.map +1 -0
  108. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js +17 -0
  109. package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js.map +1 -0
  110. package/dist/plugins/tools/nodeDefaults.d.ts +14 -0
  111. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  112. package/dist/plugins/tools/nodeDefaults.js +17 -54
  113. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  114. package/dist/plugins/tools/orchestration/orchestrationPlugin.d.ts +9 -0
  115. package/dist/plugins/tools/orchestration/orchestrationPlugin.d.ts.map +1 -0
  116. package/dist/plugins/tools/orchestration/orchestrationPlugin.js +18 -0
  117. package/dist/plugins/tools/orchestration/orchestrationPlugin.js.map +1 -0
  118. package/dist/shell/interactiveShell.d.ts +97 -2
  119. package/dist/shell/interactiveShell.d.ts.map +1 -1
  120. package/dist/shell/interactiveShell.js +1001 -6
  121. package/dist/shell/interactiveShell.js.map +1 -1
  122. package/dist/tools/appleExposureTools.d.ts +108 -0
  123. package/dist/tools/appleExposureTools.d.ts.map +1 -0
  124. package/dist/tools/appleExposureTools.js +850 -0
  125. package/dist/tools/appleExposureTools.js.map +1 -0
  126. package/dist/tools/bidirectionalAuditTools.d.ts +104 -0
  127. package/dist/tools/bidirectionalAuditTools.d.ts.map +1 -0
  128. package/dist/tools/bidirectionalAuditTools.js +1280 -0
  129. package/dist/tools/bidirectionalAuditTools.js.map +1 -0
  130. package/dist/tools/defensiveSecurityTools.d.ts +152 -0
  131. package/dist/tools/defensiveSecurityTools.d.ts.map +1 -0
  132. package/dist/tools/defensiveSecurityTools.js +576 -0
  133. package/dist/tools/defensiveSecurityTools.js.map +1 -0
  134. package/dist/tools/forwardAttackChainTracer.d.ts +73 -0
  135. package/dist/tools/forwardAttackChainTracer.d.ts.map +1 -0
  136. package/dist/tools/forwardAttackChainTracer.js +604 -0
  137. package/dist/tools/forwardAttackChainTracer.js.map +1 -0
  138. package/dist/tools/localExplore.d.ts +12 -199
  139. package/dist/tools/localExplore.d.ts.map +1 -1
  140. package/dist/tools/localExplore.js +18 -1352
  141. package/dist/tools/localExplore.js.map +1 -1
  142. package/dist/tools/offensiveTransparencyTools.d.ts +188 -0
  143. package/dist/tools/offensiveTransparencyTools.d.ts.map +1 -0
  144. package/dist/tools/offensiveTransparencyTools.js +890 -0
  145. package/dist/tools/offensiveTransparencyTools.js.map +1 -0
  146. package/dist/tools/planningTools.d.ts +8 -17
  147. package/dist/tools/planningTools.d.ts.map +1 -1
  148. package/dist/tools/planningTools.js +31 -141
  149. package/dist/tools/planningTools.js.map +1 -1
  150. package/dist/tools/searchTools.d.ts +9 -0
  151. package/dist/tools/searchTools.d.ts.map +1 -1
  152. package/dist/tools/searchTools.js +305 -189
  153. package/dist/tools/searchTools.js.map +1 -1
  154. package/dist/tools/skillTools.d.ts +7 -5
  155. package/dist/tools/skillTools.d.ts.map +1 -1
  156. package/dist/tools/skillTools.js +13 -155
  157. package/dist/tools/skillTools.js.map +1 -1
  158. package/dist/tools/threatIntelligenceTools.d.ts +128 -0
  159. package/dist/tools/threatIntelligenceTools.d.ts.map +1 -0
  160. package/dist/tools/threatIntelligenceTools.js +712 -0
  161. package/dist/tools/threatIntelligenceTools.js.map +1 -0
  162. package/dist/ui/PromptController.d.ts +4 -0
  163. package/dist/ui/PromptController.d.ts.map +1 -1
  164. package/dist/ui/PromptController.js +32 -11
  165. package/dist/ui/PromptController.js.map +1 -1
  166. package/dist/ui/UnifiedUIRenderer.d.ts +20 -0
  167. package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
  168. package/dist/ui/UnifiedUIRenderer.js +235 -28
  169. package/dist/ui/UnifiedUIRenderer.js.map +1 -1
  170. package/dist/ui/animatedStatus.d.ts +2 -0
  171. package/dist/ui/animatedStatus.d.ts.map +1 -1
  172. package/dist/ui/animatedStatus.js +36 -2
  173. package/dist/ui/animatedStatus.js.map +1 -1
  174. package/dist/ui/orchestration/StatusOrchestrator.d.ts +10 -0
  175. package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +1 -1
  176. package/dist/ui/orchestration/StatusOrchestrator.js +36 -4
  177. package/dist/ui/orchestration/StatusOrchestrator.js.map +1 -1
  178. package/package.json +1 -1
  179. package/dist/capabilities/advancedTestGenerationCapability.d.ts +0 -17
  180. package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +0 -1
  181. package/dist/capabilities/advancedTestGenerationCapability.js +0 -28
  182. package/dist/capabilities/advancedTestGenerationCapability.js.map +0 -1
  183. package/dist/capabilities/browserAutomationCapability.d.ts +0 -37
  184. package/dist/capabilities/browserAutomationCapability.d.ts.map +0 -1
  185. package/dist/capabilities/browserAutomationCapability.js +0 -49
  186. package/dist/capabilities/browserAutomationCapability.js.map +0 -1
  187. package/dist/capabilities/buildCapability.d.ts +0 -24
  188. package/dist/capabilities/buildCapability.d.ts.map +0 -1
  189. package/dist/capabilities/buildCapability.js +0 -25
  190. package/dist/capabilities/buildCapability.js.map +0 -1
  191. package/dist/capabilities/cloudCapability.d.ts +0 -13
  192. package/dist/capabilities/cloudCapability.d.ts.map +0 -1
  193. package/dist/capabilities/cloudCapability.js +0 -38
  194. package/dist/capabilities/cloudCapability.js.map +0 -1
  195. package/dist/capabilities/codeAnalysisCapability.d.ts +0 -13
  196. package/dist/capabilities/codeAnalysisCapability.d.ts.map +0 -1
  197. package/dist/capabilities/codeAnalysisCapability.js +0 -24
  198. package/dist/capabilities/codeAnalysisCapability.js.map +0 -1
  199. package/dist/capabilities/codeQualityCapability.d.ts +0 -13
  200. package/dist/capabilities/codeQualityCapability.d.ts.map +0 -1
  201. package/dist/capabilities/codeQualityCapability.js +0 -25
  202. package/dist/capabilities/codeQualityCapability.js.map +0 -1
  203. package/dist/capabilities/dependencySecurityCapability.d.ts +0 -13
  204. package/dist/capabilities/dependencySecurityCapability.d.ts.map +0 -1
  205. package/dist/capabilities/dependencySecurityCapability.js +0 -24
  206. package/dist/capabilities/dependencySecurityCapability.js.map +0 -1
  207. package/dist/capabilities/devCapability.d.ts +0 -13
  208. package/dist/capabilities/devCapability.d.ts.map +0 -1
  209. package/dist/capabilities/devCapability.js +0 -24
  210. package/dist/capabilities/devCapability.js.map +0 -1
  211. package/dist/capabilities/emailCapability.d.ts +0 -12
  212. package/dist/capabilities/emailCapability.d.ts.map +0 -1
  213. package/dist/capabilities/emailCapability.js +0 -22
  214. package/dist/capabilities/emailCapability.js.map +0 -1
  215. package/dist/capabilities/enhancedAnalysisCapability.d.ts +0 -13
  216. package/dist/capabilities/enhancedAnalysisCapability.d.ts.map +0 -1
  217. package/dist/capabilities/enhancedAnalysisCapability.js +0 -20
  218. package/dist/capabilities/enhancedAnalysisCapability.js.map +0 -1
  219. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +0 -17
  220. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +0 -1
  221. package/dist/capabilities/enhancedCodeIntelligenceCapability.js +0 -28
  222. package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +0 -1
  223. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +0 -17
  224. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +0 -1
  225. package/dist/capabilities/enhancedDevWorkflowCapability.js +0 -28
  226. package/dist/capabilities/enhancedDevWorkflowCapability.js.map +0 -1
  227. package/dist/capabilities/frontendTestingCapability.d.ts +0 -13
  228. package/dist/capabilities/frontendTestingCapability.d.ts.map +0 -1
  229. package/dist/capabilities/frontendTestingCapability.js +0 -28
  230. package/dist/capabilities/frontendTestingCapability.js.map +0 -1
  231. package/dist/capabilities/interactionCapability.d.ts +0 -12
  232. package/dist/capabilities/interactionCapability.d.ts.map +0 -1
  233. package/dist/capabilities/interactionCapability.js +0 -22
  234. package/dist/capabilities/interactionCapability.js.map +0 -1
  235. package/dist/capabilities/learnCapability.d.ts +0 -22
  236. package/dist/capabilities/learnCapability.d.ts.map +0 -1
  237. package/dist/capabilities/learnCapability.js +0 -37
  238. package/dist/capabilities/learnCapability.js.map +0 -1
  239. package/dist/capabilities/notebookCapability.d.ts +0 -17
  240. package/dist/capabilities/notebookCapability.d.ts.map +0 -1
  241. package/dist/capabilities/notebookCapability.js +0 -27
  242. package/dist/capabilities/notebookCapability.js.map +0 -1
  243. package/dist/capabilities/planningCapability.d.ts +0 -16
  244. package/dist/capabilities/planningCapability.d.ts.map +0 -1
  245. package/dist/capabilities/planningCapability.js +0 -26
  246. package/dist/capabilities/planningCapability.js.map +0 -1
  247. package/dist/capabilities/refactoringCapability.d.ts +0 -13
  248. package/dist/capabilities/refactoringCapability.d.ts.map +0 -1
  249. package/dist/capabilities/refactoringCapability.js +0 -25
  250. package/dist/capabilities/refactoringCapability.js.map +0 -1
  251. package/dist/capabilities/repoChecksCapability.d.ts +0 -10
  252. package/dist/capabilities/repoChecksCapability.d.ts.map +0 -1
  253. package/dist/capabilities/repoChecksCapability.js +0 -24
  254. package/dist/capabilities/repoChecksCapability.js.map +0 -1
  255. package/dist/capabilities/taskManagementCapability.d.ts +0 -12
  256. package/dist/capabilities/taskManagementCapability.d.ts.map +0 -1
  257. package/dist/capabilities/taskManagementCapability.js +0 -22
  258. package/dist/capabilities/taskManagementCapability.js.map +0 -1
  259. package/dist/capabilities/testingCapability.d.ts +0 -13
  260. package/dist/capabilities/testingCapability.d.ts.map +0 -1
  261. package/dist/capabilities/testingCapability.js +0 -25
  262. package/dist/capabilities/testingCapability.js.map +0 -1
  263. package/dist/capabilities/validationCapability.d.ts +0 -13
  264. package/dist/capabilities/validationCapability.d.ts.map +0 -1
  265. package/dist/capabilities/validationCapability.js +0 -24
  266. package/dist/capabilities/validationCapability.js.map +0 -1
  267. package/dist/capabilities/webCapability.d.ts +0 -12
  268. package/dist/capabilities/webCapability.d.ts.map +0 -1
  269. package/dist/capabilities/webCapability.js +0 -22
  270. package/dist/capabilities/webCapability.js.map +0 -1
  271. package/dist/core/deepBugAnalyzer.d.ts +0 -128
  272. package/dist/core/deepBugAnalyzer.d.ts.map +0 -1
  273. package/dist/core/deepBugAnalyzer.js +0 -406
  274. package/dist/core/deepBugAnalyzer.js.map +0 -1
  275. package/dist/core/hypothesisEngine.d.ts +0 -113
  276. package/dist/core/hypothesisEngine.d.ts.map +0 -1
  277. package/dist/core/hypothesisEngine.js +0 -264
  278. package/dist/core/hypothesisEngine.js.map +0 -1
  279. package/dist/core/productTestHarness.d.ts +0 -113
  280. package/dist/core/productTestHarness.d.ts.map +0 -1
  281. package/dist/core/productTestHarness.js +0 -351
  282. package/dist/core/productTestHarness.js.map +0 -1
  283. package/dist/core/validationRunner.d.ts +0 -106
  284. package/dist/core/validationRunner.d.ts.map +0 -1
  285. package/dist/core/validationRunner.js +0 -892
  286. package/dist/core/validationRunner.js.map +0 -1
  287. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +0 -14
  288. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +0 -1
  289. package/dist/plugins/tools/browser/browserAutomationPlugin.js +0 -26
  290. package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +0 -1
  291. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +0 -3
  292. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +0 -1
  293. package/dist/plugins/tools/checks/localRepoChecksPlugin.js +0 -14
  294. package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +0 -1
  295. package/dist/plugins/tools/cloud/cloudPlugin.d.ts +0 -3
  296. package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +0 -1
  297. package/dist/plugins/tools/cloud/cloudPlugin.js +0 -14
  298. package/dist/plugins/tools/cloud/cloudPlugin.js.map +0 -1
  299. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +0 -3
  300. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +0 -1
  301. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -14
  302. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +0 -1
  303. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +0 -3
  304. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +0 -1
  305. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +0 -14
  306. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +0 -1
  307. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +0 -3
  308. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +0 -1
  309. package/dist/plugins/tools/dependency/dependencyPlugin.js +0 -12
  310. package/dist/plugins/tools/dependency/dependencyPlugin.js.map +0 -1
  311. package/dist/plugins/tools/development/devPlugin.d.ts +0 -3
  312. package/dist/plugins/tools/development/devPlugin.d.ts.map +0 -1
  313. package/dist/plugins/tools/development/devPlugin.js +0 -14
  314. package/dist/plugins/tools/development/devPlugin.js.map +0 -1
  315. package/dist/plugins/tools/email/emailPlugin.d.ts +0 -3
  316. package/dist/plugins/tools/email/emailPlugin.d.ts.map +0 -1
  317. package/dist/plugins/tools/email/emailPlugin.js +0 -12
  318. package/dist/plugins/tools/email/emailPlugin.js.map +0 -1
  319. package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.d.ts +0 -3
  320. package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.d.ts.map +0 -1
  321. package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.js +0 -14
  322. package/dist/plugins/tools/enhancedAnalysis/enhancedAnalysisPlugin.js.map +0 -1
  323. package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.d.ts +0 -3
  324. package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.d.ts.map +0 -1
  325. package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.js +0 -12
  326. package/dist/plugins/tools/enhancedCodeIntelligence/enhancedCodeIntelligencePlugin.js.map +0 -1
  327. package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.d.ts +0 -3
  328. package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.d.ts.map +0 -1
  329. package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.js +0 -12
  330. package/dist/plugins/tools/enhancedDevWorkflow/enhancedDevWorkflowPlugin.js.map +0 -1
  331. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +0 -3
  332. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +0 -1
  333. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +0 -14
  334. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +0 -1
  335. package/dist/plugins/tools/interaction/interactionPlugin.d.ts +0 -3
  336. package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +0 -1
  337. package/dist/plugins/tools/interaction/interactionPlugin.js +0 -12
  338. package/dist/plugins/tools/interaction/interactionPlugin.js.map +0 -1
  339. package/dist/plugins/tools/learn/learnPlugin.d.ts +0 -3
  340. package/dist/plugins/tools/learn/learnPlugin.d.ts.map +0 -1
  341. package/dist/plugins/tools/learn/learnPlugin.js +0 -14
  342. package/dist/plugins/tools/learn/learnPlugin.js.map +0 -1
  343. package/dist/plugins/tools/notebook/notebookPlugin.d.ts +0 -9
  344. package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +0 -1
  345. package/dist/plugins/tools/notebook/notebookPlugin.js +0 -15
  346. package/dist/plugins/tools/notebook/notebookPlugin.js.map +0 -1
  347. package/dist/plugins/tools/planning/planningPlugin.d.ts +0 -9
  348. package/dist/plugins/tools/planning/planningPlugin.d.ts.map +0 -1
  349. package/dist/plugins/tools/planning/planningPlugin.js +0 -15
  350. package/dist/plugins/tools/planning/planningPlugin.js.map +0 -1
  351. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +0 -3
  352. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +0 -1
  353. package/dist/plugins/tools/refactoring/refactoringPlugin.js +0 -12
  354. package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +0 -1
  355. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +0 -3
  356. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +0 -1
  357. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +0 -12
  358. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +0 -1
  359. package/dist/plugins/tools/testing/testingPlugin.d.ts +0 -3
  360. package/dist/plugins/tools/testing/testingPlugin.d.ts.map +0 -1
  361. package/dist/plugins/tools/testing/testingPlugin.js +0 -12
  362. package/dist/plugins/tools/testing/testingPlugin.js.map +0 -1
  363. package/dist/plugins/tools/validation/validationPlugin.d.ts +0 -3
  364. package/dist/plugins/tools/validation/validationPlugin.d.ts.map +0 -1
  365. package/dist/plugins/tools/validation/validationPlugin.js +0 -14
  366. package/dist/plugins/tools/validation/validationPlugin.js.map +0 -1
  367. package/dist/plugins/tools/web/webPlugin.d.ts +0 -3
  368. package/dist/plugins/tools/web/webPlugin.d.ts.map +0 -1
  369. package/dist/plugins/tools/web/webPlugin.js +0 -12
  370. package/dist/plugins/tools/web/webPlugin.js.map +0 -1
  371. package/dist/tools/advancedTestGenerationTools.d.ts +0 -21
  372. package/dist/tools/advancedTestGenerationTools.d.ts.map +0 -1
  373. package/dist/tools/advancedTestGenerationTools.js +0 -304
  374. package/dist/tools/advancedTestGenerationTools.js.map +0 -1
  375. package/dist/tools/browserAutomationTools.d.ts +0 -23
  376. package/dist/tools/browserAutomationTools.d.ts.map +0 -1
  377. package/dist/tools/browserAutomationTools.js +0 -916
  378. package/dist/tools/browserAutomationTools.js.map +0 -1
  379. package/dist/tools/buildTools.d.ts +0 -9
  380. package/dist/tools/buildTools.d.ts.map +0 -1
  381. package/dist/tools/buildTools.js +0 -346
  382. package/dist/tools/buildTools.js.map +0 -1
  383. package/dist/tools/cloudTools.d.ts +0 -49
  384. package/dist/tools/cloudTools.d.ts.map +0 -1
  385. package/dist/tools/cloudTools.js +0 -1258
  386. package/dist/tools/cloudTools.js.map +0 -1
  387. package/dist/tools/codeAnalysisTools.d.ts +0 -74
  388. package/dist/tools/codeAnalysisTools.d.ts.map +0 -1
  389. package/dist/tools/codeAnalysisTools.js +0 -664
  390. package/dist/tools/codeAnalysisTools.js.map +0 -1
  391. package/dist/tools/codeGenerationTools.d.ts +0 -3
  392. package/dist/tools/codeGenerationTools.d.ts.map +0 -1
  393. package/dist/tools/codeGenerationTools.js +0 -439
  394. package/dist/tools/codeGenerationTools.js.map +0 -1
  395. package/dist/tools/codeQualityTools.d.ts +0 -3
  396. package/dist/tools/codeQualityTools.d.ts.map +0 -1
  397. package/dist/tools/codeQualityTools.js +0 -297
  398. package/dist/tools/codeQualityTools.js.map +0 -1
  399. package/dist/tools/dependencyTools.d.ts +0 -3
  400. package/dist/tools/dependencyTools.d.ts.map +0 -1
  401. package/dist/tools/dependencyTools.js +0 -284
  402. package/dist/tools/dependencyTools.js.map +0 -1
  403. package/dist/tools/devTools.d.ts +0 -10
  404. package/dist/tools/devTools.d.ts.map +0 -1
  405. package/dist/tools/devTools.js +0 -2126
  406. package/dist/tools/devTools.js.map +0 -1
  407. package/dist/tools/emailTools.d.ts +0 -21
  408. package/dist/tools/emailTools.d.ts.map +0 -1
  409. package/dist/tools/emailTools.js +0 -449
  410. package/dist/tools/emailTools.js.map +0 -1
  411. package/dist/tools/enhancedAnalysisTools.d.ts +0 -9
  412. package/dist/tools/enhancedAnalysisTools.d.ts.map +0 -1
  413. package/dist/tools/enhancedAnalysisTools.js +0 -370
  414. package/dist/tools/enhancedAnalysisTools.js.map +0 -1
  415. package/dist/tools/enhancedCodeIntelligenceTools.d.ts +0 -7
  416. package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +0 -1
  417. package/dist/tools/enhancedCodeIntelligenceTools.js +0 -540
  418. package/dist/tools/enhancedCodeIntelligenceTools.js.map +0 -1
  419. package/dist/tools/enhancedDevWorkflowTools.d.ts +0 -7
  420. package/dist/tools/enhancedDevWorkflowTools.d.ts.map +0 -1
  421. package/dist/tools/enhancedDevWorkflowTools.js +0 -432
  422. package/dist/tools/enhancedDevWorkflowTools.js.map +0 -1
  423. package/dist/tools/frontendTestingTools.d.ts +0 -35
  424. package/dist/tools/frontendTestingTools.d.ts.map +0 -1
  425. package/dist/tools/frontendTestingTools.js +0 -1258
  426. package/dist/tools/frontendTestingTools.js.map +0 -1
  427. package/dist/tools/globTools.d.ts +0 -15
  428. package/dist/tools/globTools.d.ts.map +0 -1
  429. package/dist/tools/globTools.js +0 -174
  430. package/dist/tools/globTools.js.map +0 -1
  431. package/dist/tools/grepTools.d.ts +0 -19
  432. package/dist/tools/grepTools.d.ts.map +0 -1
  433. package/dist/tools/grepTools.js +0 -411
  434. package/dist/tools/grepTools.js.map +0 -1
  435. package/dist/tools/interactionTools.d.ts +0 -6
  436. package/dist/tools/interactionTools.d.ts.map +0 -1
  437. package/dist/tools/interactionTools.js +0 -209
  438. package/dist/tools/interactionTools.js.map +0 -1
  439. package/dist/tools/learnTools.d.ts +0 -164
  440. package/dist/tools/learnTools.d.ts.map +0 -1
  441. package/dist/tools/learnTools.js +0 -2098
  442. package/dist/tools/learnTools.js.map +0 -1
  443. package/dist/tools/notebookEditTools.d.ts +0 -15
  444. package/dist/tools/notebookEditTools.d.ts.map +0 -1
  445. package/dist/tools/notebookEditTools.js +0 -197
  446. package/dist/tools/notebookEditTools.js.map +0 -1
  447. package/dist/tools/refactoringTools.d.ts +0 -3
  448. package/dist/tools/refactoringTools.d.ts.map +0 -1
  449. package/dist/tools/refactoringTools.js +0 -294
  450. package/dist/tools/refactoringTools.js.map +0 -1
  451. package/dist/tools/repoChecksTools.d.ts +0 -3
  452. package/dist/tools/repoChecksTools.d.ts.map +0 -1
  453. package/dist/tools/repoChecksTools.js +0 -276
  454. package/dist/tools/repoChecksTools.js.map +0 -1
  455. package/dist/tools/taskManagementTools.d.ts +0 -10
  456. package/dist/tools/taskManagementTools.d.ts.map +0 -1
  457. package/dist/tools/taskManagementTools.js +0 -133
  458. package/dist/tools/taskManagementTools.js.map +0 -1
  459. package/dist/tools/testingTools.d.ts +0 -3
  460. package/dist/tools/testingTools.d.ts.map +0 -1
  461. package/dist/tools/testingTools.js +0 -237
  462. package/dist/tools/testingTools.js.map +0 -1
  463. package/dist/tools/validationTools.d.ts +0 -7
  464. package/dist/tools/validationTools.d.ts.map +0 -1
  465. package/dist/tools/validationTools.js +0 -344
  466. package/dist/tools/validationTools.js.map +0 -1
  467. package/dist/tools/webTools.d.ts +0 -3
  468. package/dist/tools/webTools.d.ts.map +0 -1
  469. package/dist/tools/webTools.js +0 -502
  470. package/dist/tools/webTools.js.map +0 -1
@@ -1,502 +0,0 @@
1
- import * as https from 'node:https';
2
- import * as http from 'node:http';
3
- import { getSecretDefinition, getSecretValue, MissingSecretError, safeErrorMessage, sanitizeErrorMessage, } from '../core/secretStore.js';
4
- export function createWebTools() {
5
- return [
6
- {
7
- name: 'WebFetch',
8
- description: `- Fetches content from a specified URL and processes it using an AI model
9
- - Takes a URL and a prompt as input
10
- - Fetches the URL content, converts HTML to markdown
11
- - Processes the content with the prompt using a small, fast model
12
- - Returns the model's response about the content
13
- - Use this tool when you need to retrieve and analyze web content
14
-
15
- Usage notes:
16
- - IMPORTANT: If TAVILY_API_KEY is set, use WebExtract instead for better content extraction
17
- - The URL must be a fully-formed valid URL
18
- - HTTP URLs will be automatically upgraded to HTTPS
19
- - The prompt should describe what information you want to extract from the page
20
- - This tool is read-only and does not modify any files
21
- - Results may be summarized if the content is very large
22
- - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
23
- - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.`,
24
- parameters: {
25
- type: 'object',
26
- properties: {
27
- url: {
28
- type: 'string',
29
- description: 'The URL to fetch content from',
30
- },
31
- prompt: {
32
- type: 'string',
33
- description: 'The prompt to run on the fetched content',
34
- },
35
- },
36
- required: ['url', 'prompt'],
37
- },
38
- handler: async (args) => {
39
- const url = args['url'];
40
- const prompt = args['prompt'];
41
- if (!url || !prompt) {
42
- return 'Error: url and prompt parameters are required.';
43
- }
44
- try {
45
- // Upgrade HTTP to HTTPS
46
- const targetUrl = url.replace(/^http:\/\//, 'https://');
47
- const content = await fetchUrl(targetUrl);
48
- // Simple HTML to markdown conversion (basic implementation)
49
- const markdown = htmlToMarkdown(content);
50
- // Process with prompt (in a real implementation, this would use a small LLM)
51
- // For now, we'll return the content with the prompt context
52
- return `Fetched content from ${targetUrl}
53
-
54
- Prompt: ${prompt}
55
-
56
- Content (first 5000 characters):
57
- ${markdown.slice(0, 5000)}${markdown.length > 5000 ? '\n\n... (content truncated)' : ''}
58
-
59
- Summary: This is the content fetched from the URL. In a full implementation, this would be processed by a small LLM to answer the specific prompt.`;
60
- }
61
- catch (error) {
62
- // SECURITY: Sanitize error message to prevent token leakage
63
- return `Error fetching URL: ${safeErrorMessage(error)}`;
64
- }
65
- },
66
- },
67
- {
68
- name: 'WebExtract',
69
- description: `- Extracts clean, structured content from one or more URLs using Tavily Extract API
70
- - Superior to WebFetch for content extraction when TAVILY_API_KEY is available
71
- - Returns raw text content optimized for LLM consumption
72
- - Supports batch extraction of up to 20 URLs in a single call
73
-
74
- Usage notes:
75
- - Requires TAVILY_API_KEY environment variable
76
- - Best for extracting article content, documentation, blog posts
77
- - Returns clean text without HTML artifacts
78
- - More reliable than basic HTML parsing for complex pages
79
- - Use for deep content extraction when you need full page text`,
80
- parameters: {
81
- type: 'object',
82
- properties: {
83
- urls: {
84
- type: 'array',
85
- items: { type: 'string' },
86
- description: 'Array of URLs to extract content from (max 20)',
87
- },
88
- },
89
- required: ['urls'],
90
- },
91
- handler: async (args) => {
92
- const urls = args['urls'];
93
- if (!urls || !Array.isArray(urls) || urls.length === 0) {
94
- return 'Error: urls parameter is required and must be a non-empty array.';
95
- }
96
- if (urls.length > 20) {
97
- return 'Error: Maximum 20 URLs allowed per request.';
98
- }
99
- const tavilyKey = getSecretValue('TAVILY_API_KEY') || process.env['TAVILY_API_KEY']?.trim();
100
- if (!tavilyKey) {
101
- const secretDef = getSecretDefinition('TAVILY_API_KEY');
102
- if (secretDef) {
103
- throw new MissingSecretError(secretDef);
104
- }
105
- throw new Error('WebExtract requires TAVILY_API_KEY to be set.');
106
- }
107
- try {
108
- const response = await fetch('https://api.tavily.com/extract', {
109
- method: 'POST',
110
- headers: {
111
- 'Content-Type': 'application/json',
112
- },
113
- body: JSON.stringify({
114
- api_key: tavilyKey,
115
- urls,
116
- }),
117
- });
118
- if (!response.ok) {
119
- const errorText = await response.text().catch(() => '');
120
- // SECURITY: Sanitize error text to prevent token leakage
121
- const authHint = response.status === 401 || response.status === 403 ? ' (authentication failed)' : '';
122
- const error = new Error(`Tavily Extract returned HTTP ${response.status}${authHint}: ${sanitizeErrorMessage(errorText)}`);
123
- error.status = response.status;
124
- throw error;
125
- }
126
- const payload = (await response.json());
127
- const results = payload.results || [];
128
- const failedUrls = payload.failed_results || [];
129
- if (results.length === 0 && failedUrls.length === urls.length) {
130
- return `Failed to extract content from all ${urls.length} URLs. This may be due to access restrictions or invalid URLs.`;
131
- }
132
- let output = `Extracted content from ${results.length}/${urls.length} URLs:\n\n`;
133
- for (const result of results) {
134
- output += `--- ${result.url} ---\n`;
135
- if (result.raw_content) {
136
- // Truncate very long content
137
- const content = result.raw_content.length > 10000
138
- ? `${result.raw_content.slice(0, 10000)}\n\n... (content truncated)`
139
- : result.raw_content;
140
- output += `${content}\n\n`;
141
- }
142
- else {
143
- output += '(No content extracted)\n\n';
144
- }
145
- }
146
- if (failedUrls.length > 0) {
147
- output += `\nFailed URLs (${failedUrls.length}):\n`;
148
- for (const failed of failedUrls) {
149
- output += `- ${failed.url}: ${failed.error || 'Unknown error'}\n`;
150
- }
151
- }
152
- return output.trim();
153
- }
154
- catch (error) {
155
- // SECURITY: Sanitize error message to prevent token leakage
156
- return `Error extracting content: ${safeErrorMessage(error)}`;
157
- }
158
- },
159
- },
160
- {
161
- name: 'WebSearch',
162
- description: `- Allows Claude to search the web and use the results to inform responses
163
- - Provides up-to-date information for current events and recent data
164
- - Returns search result information formatted as search result blocks
165
- - Use this tool for accessing information beyond Claude's knowledge cutoff
166
- - Searches are performed automatically within a single API call
167
-
168
- Usage notes:
169
- - Domain filtering is supported to include or block specific websites
170
- - Web search is only available in the US
171
- - Account for "Today's date" in <env>. For example, if <env> says "Today's date: 2025-07-01", and the user wants the latest docs, do not use 2024 in the search query. Use 2025.`,
172
- parameters: {
173
- type: 'object',
174
- properties: {
175
- query: {
176
- type: 'string',
177
- description: 'The search query to use',
178
- },
179
- allowed_domains: {
180
- type: 'array',
181
- items: {
182
- type: 'string',
183
- },
184
- description: 'Only include search results from these domains',
185
- },
186
- blocked_domains: {
187
- type: 'array',
188
- items: {
189
- type: 'string',
190
- },
191
- description: 'Never include search results from these domains',
192
- },
193
- },
194
- required: ['query'],
195
- },
196
- handler: async (args) => {
197
- const query = typeof args['query'] === 'string' ? args['query'].trim() : '';
198
- const allowed = parseDomainList(args['allowed_domains']);
199
- const blocked = parseDomainList(args['blocked_domains']);
200
- if (!query) {
201
- return 'Error: query parameter is required.';
202
- }
203
- try {
204
- const provider = resolveSearchProvider();
205
- if (!provider) {
206
- const secretDef = getSecretDefinition('TAVILY_API_KEY');
207
- if (secretDef) {
208
- throw new MissingSecretError(secretDef);
209
- }
210
- throw new Error('WebSearch requires TAVILY_API_KEY, BRAVE_SEARCH_API_KEY, or SERPAPI_API_KEY.');
211
- }
212
- const results = await provider.search({
213
- query,
214
- allowedDomains: allowed,
215
- blockedDomains: blocked,
216
- maxResults: 6,
217
- });
218
- if (!results.length) {
219
- return `No web results found for "${query}" ${formatFilterSummary(allowed, blocked)}.`;
220
- }
221
- return formatSearchResults(query, results, provider.label, allowed, blocked);
222
- }
223
- catch (error) {
224
- // SECURITY: Sanitize error message to prevent token leakage
225
- return `Error performing web search: ${safeErrorMessage(error)}`;
226
- }
227
- },
228
- },
229
- ];
230
- }
231
- function resolveSearchProvider() {
232
- // Tavily is the preferred search provider - check secretStore then env
233
- const tavilyKey = getSecretValue('TAVILY_API_KEY') || process.env['TAVILY_API_KEY']?.trim();
234
- if (tavilyKey) {
235
- return {
236
- id: 'tavily',
237
- label: 'Tavily Search',
238
- search: (params) => performTavilySearch(params, tavilyKey),
239
- };
240
- }
241
- const braveKey = getSecretValue('BRAVE_SEARCH_API_KEY') || process.env['BRAVE_SEARCH_API_KEY']?.trim();
242
- if (braveKey) {
243
- return {
244
- id: 'brave',
245
- label: 'Brave Search',
246
- search: (params) => performBraveSearch(params, braveKey),
247
- };
248
- }
249
- const serpKey = getSecretValue('SERPAPI_API_KEY') || process.env['SERPAPI_API_KEY']?.trim();
250
- if (serpKey) {
251
- return {
252
- id: 'serpapi',
253
- label: 'SerpAPI (Google)',
254
- search: (params) => performSerpApiSearch(params, serpKey),
255
- };
256
- }
257
- return null;
258
- }
259
- async function performBraveSearch(params, apiKey) {
260
- const url = new URL('https://api.search.brave.com/res/v1/web/search');
261
- url.searchParams.set('q', params.query);
262
- url.searchParams.set('count', String(Math.min(params.maxResults * 2, 20)));
263
- const response = await fetch(url, {
264
- headers: {
265
- Accept: 'application/json',
266
- 'X-Subscription-Token': apiKey,
267
- },
268
- });
269
- if (!response.ok) {
270
- const authHint = response.status === 401 || response.status === 403 ? ' (authentication failed)' : '';
271
- const error = new Error(`Brave Search returned HTTP ${response.status}${authHint}`);
272
- error.status = response.status;
273
- throw error;
274
- }
275
- const payload = (await response.json());
276
- const entries = Array.isArray(payload?.web?.results) ? payload.web.results : [];
277
- const mapped = entries
278
- .map((entry) => ({
279
- title: entry.title || entry.url,
280
- url: entry.url,
281
- snippet: entry.description || entry.snippet || '',
282
- source: entry.profile?.name || entry.source || safeHostname(entry.url) || undefined,
283
- published: entry.publishedDate || entry.subtype,
284
- }))
285
- .filter((result) => Boolean(result.url));
286
- return applyDomainFilters(mapped, params.allowedDomains, params.blockedDomains).slice(0, params.maxResults);
287
- }
288
- async function performSerpApiSearch(params, apiKey) {
289
- const url = new URL('https://serpapi.com/search.json');
290
- url.searchParams.set('engine', 'google');
291
- url.searchParams.set('q', params.query);
292
- url.searchParams.set('num', String(Math.min(params.maxResults * 2, 10)));
293
- url.searchParams.set('api_key', apiKey);
294
- const response = await fetch(url);
295
- if (!response.ok) {
296
- const authHint = response.status === 401 || response.status === 403 ? ' (authentication failed)' : '';
297
- const error = new Error(`SerpAPI returned HTTP ${response.status}${authHint}`);
298
- error.status = response.status;
299
- throw error;
300
- }
301
- const payload = (await response.json());
302
- const entries = Array.isArray(payload?.organic_results) ? payload.organic_results : [];
303
- const mapped = entries
304
- .map((entry) => ({
305
- title: entry.title || entry.link,
306
- url: entry.link,
307
- snippet: entry.snippet || (Array.isArray(entry.snippet_highlighted_words) ? entry.snippet_highlighted_words.join(' ') : ''),
308
- source: entry.source || entry.display_link || entry.displayed_link || safeHostname(entry.link) || undefined,
309
- published: entry.date || entry.snippet_date,
310
- }))
311
- .filter((result) => Boolean(result.url));
312
- return applyDomainFilters(mapped, params.allowedDomains, params.blockedDomains).slice(0, params.maxResults);
313
- }
314
- async function performTavilySearch(params, apiKey) {
315
- const response = await fetch('https://api.tavily.com/search', {
316
- method: 'POST',
317
- headers: {
318
- 'Content-Type': 'application/json',
319
- },
320
- body: JSON.stringify({
321
- api_key: apiKey,
322
- query: params.query,
323
- search_depth: 'advanced',
324
- include_answer: true,
325
- include_raw_content: false,
326
- max_results: Math.min(params.maxResults * 2, 10),
327
- include_domains: params.allowedDomains.length ? params.allowedDomains : undefined,
328
- exclude_domains: params.blockedDomains.length ? params.blockedDomains : undefined,
329
- }),
330
- });
331
- if (!response.ok) {
332
- const errorText = await response.text().catch(() => '');
333
- // SECURITY: Sanitize error text to prevent token leakage
334
- const authHint = response.status === 401 || response.status === 403 ? ' (authentication failed)' : '';
335
- const error = new Error(`Tavily Search returned HTTP ${response.status}${authHint}: ${sanitizeErrorMessage(errorText)}`);
336
- error.status = response.status;
337
- throw error;
338
- }
339
- const payload = (await response.json());
340
- const entries = Array.isArray(payload?.results) ? payload.results : [];
341
- const mapped = entries
342
- .map((entry) => ({
343
- title: entry.title || entry.url,
344
- url: entry.url,
345
- snippet: entry.content || '',
346
- source: safeHostname(entry.url) || undefined,
347
- published: entry.published_date,
348
- score: entry.score,
349
- }))
350
- .filter((result) => Boolean(result.url));
351
- // Tavily already handles domain filtering via include_domains/exclude_domains
352
- return mapped.slice(0, params.maxResults);
353
- }
354
- function parseDomainList(value) {
355
- if (!Array.isArray(value)) {
356
- return [];
357
- }
358
- return value
359
- .map((entry) => (typeof entry === 'string' ? entry.trim().toLowerCase() : ''))
360
- .filter(Boolean);
361
- }
362
- function applyDomainFilters(results, allowedDomains, blockedDomains) {
363
- const normalizedAllowed = allowedDomains.map((domain) => domain.startsWith('.') ? domain.slice(1) : domain);
364
- const normalizedBlocked = blockedDomains.map((domain) => domain.startsWith('.') ? domain.slice(1) : domain);
365
- return results.filter((result) => {
366
- const hostname = safeHostname(result.url);
367
- if (!hostname) {
368
- return false;
369
- }
370
- if (normalizedAllowed.length && !normalizedAllowed.some((domain) => hostname === domain || hostname.endsWith(`.${domain}`))) {
371
- return false;
372
- }
373
- if (normalizedBlocked.some((domain) => hostname === domain || hostname.endsWith(`.${domain}`))) {
374
- return false;
375
- }
376
- return true;
377
- });
378
- }
379
- function formatSearchResults(query, results, providerLabel, allowed, blocked) {
380
- const lines = [`Web Search Results for "${query}" (${providerLabel})`, ''];
381
- results.forEach((result, index) => {
382
- lines.push(`${index + 1}. ${result.title || result.url}`, result.url);
383
- if (result.snippet) {
384
- lines.push(` ${result.snippet}`);
385
- }
386
- const meta = [];
387
- if (result.source) {
388
- meta.push(`source: ${result.source}`);
389
- }
390
- if (result.published) {
391
- meta.push(`published: ${result.published}`);
392
- }
393
- if (meta.length) {
394
- lines.push(` (${meta.join(' · ')})`);
395
- }
396
- lines.push('');
397
- });
398
- lines.push(formatFilterSummary(allowed, blocked, providerLabel));
399
- return lines.join('\n').trim();
400
- }
401
- function formatFilterSummary(allowed, blocked, providerLabel) {
402
- const segments = [];
403
- if (allowed.length) {
404
- segments.push(`allowed: ${allowed.join(', ')}`);
405
- }
406
- if (blocked.length) {
407
- segments.push(`blocked: ${blocked.join(', ')}`);
408
- }
409
- if (!segments.length) {
410
- segments.push('none');
411
- }
412
- if (providerLabel) {
413
- segments.push(`provider: ${providerLabel}`);
414
- }
415
- return `Filters: ${segments.join(' | ')}`;
416
- }
417
- function safeHostname(raw) {
418
- if (!raw) {
419
- return null;
420
- }
421
- try {
422
- const url = new URL(raw);
423
- return url.hostname.toLowerCase();
424
- }
425
- catch {
426
- return null;
427
- }
428
- }
429
- // Maximum size for fetched content (5MB) to prevent memory exhaustion
430
- const MAX_FETCH_SIZE = 5 * 1024 * 1024;
431
- function fetchUrl(url) {
432
- return new Promise((resolve, reject) => {
433
- const client = url.startsWith('https://') ? https : http;
434
- const request = client
435
- .get(url, (res) => {
436
- let data = '';
437
- let totalSize = 0;
438
- // Handle redirects
439
- if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
440
- fetchUrl(res.headers.location)
441
- .then(resolve)
442
- .catch(reject);
443
- return;
444
- }
445
- if (res.statusCode !== 200) {
446
- reject(new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`));
447
- return;
448
- }
449
- res.on('data', (chunk) => {
450
- totalSize += chunk.length;
451
- if (totalSize > MAX_FETCH_SIZE) {
452
- res.destroy();
453
- reject(new Error(`Response too large (>${MAX_FETCH_SIZE / 1024 / 1024}MB). Content truncated for memory safety.`));
454
- return;
455
- }
456
- data += chunk;
457
- });
458
- res.on('end', () => {
459
- resolve(data);
460
- });
461
- })
462
- .on('error', (err) => {
463
- reject(err);
464
- });
465
- request.on('error', (err) => {
466
- reject(err);
467
- });
468
- });
469
- }
470
- function htmlToMarkdown(html) {
471
- // Very basic HTML to markdown conversion
472
- let text = html;
473
- // Remove script and style tags
474
- text = text.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
475
- text = text.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, '');
476
- // Convert common HTML tags
477
- text = text.replace(/<h1[^>]*>(.*?)<\/h1>/gi, '# $1\n\n');
478
- text = text.replace(/<h2[^>]*>(.*?)<\/h2>/gi, '## $1\n\n');
479
- text = text.replace(/<h3[^>]*>(.*?)<\/h3>/gi, '### $1\n\n');
480
- text = text.replace(/<p[^>]*>(.*?)<\/p>/gi, '$1\n\n');
481
- text = text.replace(/<br\s*\/?>/gi, '\n');
482
- text = text.replace(/<strong[^>]*>(.*?)<\/strong>/gi, '**$1**');
483
- text = text.replace(/<b[^>]*>(.*?)<\/b>/gi, '**$1**');
484
- text = text.replace(/<em[^>]*>(.*?)<\/em>/gi, '*$1*');
485
- text = text.replace(/<i[^>]*>(.*?)<\/i>/gi, '*$1*');
486
- text = text.replace(/<code[^>]*>(.*?)<\/code>/gi, '`$1`');
487
- text = text.replace(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/gi, '[$2]($1)');
488
- // Remove remaining HTML tags
489
- text = text.replace(/<[^>]+>/g, '');
490
- // Decode HTML entities
491
- text = text
492
- .replace(/&nbsp;/g, ' ')
493
- .replace(/&amp;/g, '&')
494
- .replace(/&lt;/g, '<')
495
- .replace(/&gt;/g, '>')
496
- .replace(/&quot;/g, '"')
497
- .replace(/&#39;/g, "'");
498
- // Clean up excessive newlines
499
- text = text.replace(/\n{3,}/g, '\n\n');
500
- return text.trim();
501
- }
502
- //# sourceMappingURL=webTools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webTools.js","sourceRoot":"","sources":["../../src/tools/webTools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,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