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,523 +1,32 @@
1
1
  /**
2
- * AlphaZero-Style Dual Agent Engine
3
- *
4
- * Implements self-play concepts for code generation:
5
- * 1. Dual Response Generation - Generate 2 responses, pick the best
6
- * 2. Self-Critique Loop - Critique and improve responses
7
- * 3. Solution Quality Scoring - Multi-dimensional evaluation
8
- * 4. Tool Pattern Learning - Learn optimal tool sequences
9
- *
10
- * Principal Investigator: Bo Shang
2
+ * AlphaZero Engine - Minimal stub for backward compatibility
11
3
  */
12
- export const DEFAULT_DUAL_CONFIG = {
13
- enabled: true,
14
- temperatureA: 0.3, // Conservative
15
- temperatureB: 0.7, // Creative
16
- minQualityDifference: 0.1,
17
- timeoutMs: 60000,
18
- };
19
- /**
20
- * Generates evaluation prompt for comparing two responses
21
- */
22
- export function buildEvaluationPrompt(userQuery, responseA, responseB) {
23
- return `You are an expert code reviewer evaluating two AI assistant responses.
24
-
25
- USER QUERY:
26
- ${userQuery}
27
-
28
- RESPONSE A:
29
- ---
30
- ${responseA.slice(0, 4000)}
31
- ---
32
-
33
- RESPONSE B:
34
- ---
35
- ${responseB.slice(0, 4000)}
36
- ---
37
-
38
- Evaluate both responses on these dimensions (0-100 each):
39
- 1. Correctness - Is the solution correct and bug-free?
40
- 2. Completeness - Does it fully address the user's request?
41
- 3. Efficiency - Is the code/approach efficient?
42
- 4. Code Quality - Is the code clean, readable, well-structured?
43
- 5. Tool Usage - Are tools used appropriately and effectively?
44
-
45
- Return JSON only:
46
- {
47
- "winner": "A" | "B" | "tie",
48
- "scores": {
49
- "correctness": { "a": 0-100, "b": 0-100 },
50
- "completeness": { "a": 0-100, "b": 0-100 },
51
- "efficiency": { "a": 0-100, "b": 0-100 },
52
- "codeQuality": { "a": 0-100, "b": 0-100 },
53
- "toolUsage": { "a": 0-100, "b": 0-100 }
54
- },
55
- "reasoning": "brief explanation",
56
- "confidence": 0-100
57
- }`;
58
- }
59
- /**
60
- * Parse evaluation response from LLM
61
- */
62
- export function parseEvaluationResponse(response) {
63
- try {
64
- const match = response.match(/\{[\s\S]*\}/);
65
- if (!match)
66
- return null;
67
- const parsed = JSON.parse(match[0]);
68
- const qualityA = (parsed.scores.correctness.a +
69
- parsed.scores.completeness.a +
70
- parsed.scores.efficiency.a +
71
- parsed.scores.codeQuality.a +
72
- parsed.scores.toolUsage.a) / 5;
73
- const qualityB = (parsed.scores.correctness.b +
74
- parsed.scores.completeness.b +
75
- parsed.scores.efficiency.b +
76
- parsed.scores.codeQuality.b +
77
- parsed.scores.toolUsage.b) / 5;
78
- return {
79
- qualityScoreA: qualityA,
80
- qualityScoreB: qualityB,
81
- dimensions: {
82
- correctness: parsed.scores.correctness,
83
- completeness: parsed.scores.completeness,
84
- efficiency: parsed.scores.efficiency,
85
- codeQuality: parsed.scores.codeQuality,
86
- toolUsage: parsed.scores.toolUsage,
87
- },
88
- reasoning: parsed.reasoning,
89
- confidence: parsed.confidence,
90
- };
91
- }
92
- catch {
93
- return null;
94
- }
95
- }
96
- // ============================================================================
97
- // SELF-CRITIQUE ENGINE
98
- // ============================================================================
99
- /**
100
- * Generates self-critique prompt
101
- */
102
- export function buildCritiquePrompt(userQuery, response, toolCalls) {
103
- const toolSummary = toolCalls.length > 0
104
- ? toolCalls.map(t => `- ${t.name}: ${t.success ? 'success' : 'failed'}`).join('\n')
105
- : 'No tools used';
106
- return `You are a critical code reviewer. Analyze this AI assistant response for issues.
107
-
108
- USER QUERY:
109
- ${userQuery}
110
-
111
- RESPONSE:
112
- ---
113
- ${response.slice(0, 6000)}
114
- ---
115
-
116
- TOOLS USED:
117
- ${toolSummary}
118
-
119
- Find issues in these categories:
120
- - correctness: bugs, logic errors, wrong approaches
121
- - completeness: missing features, partial solutions
122
- - efficiency: performance issues, unnecessary operations
123
- - style: code style, readability problems
124
- - security: potential vulnerabilities
125
-
126
- Return JSON only:
127
- {
128
- "issues": [
129
- {
130
- "category": "correctness|completeness|efficiency|style|security",
131
- "severity": "critical|major|minor",
132
- "description": "what's wrong",
133
- "suggestion": "how to fix",
134
- "location": "where in code (if applicable)"
135
- }
136
- ],
137
- "overallQuality": 0-100,
138
- "needsImprovement": true|false,
139
- "improvementPriority": ["issue indices in order of importance"]
140
- }`;
141
- }
142
- /**
143
- * Parse critique response
144
- */
145
- export function parseCritiqueResponse(response) {
146
- try {
147
- const match = response.match(/\{[\s\S]*\}/);
148
- if (!match)
149
- return [];
150
- const parsed = JSON.parse(match[0]);
151
- return parsed.issues || [];
152
- }
153
- catch {
154
- return [];
155
- }
156
- }
157
- /**
158
- * Build improvement prompt based on critique
159
- */
160
- export function buildImprovementPrompt(userQuery, originalResponse, issues) {
161
- const issueList = issues
162
- .map((i, idx) => `${idx + 1}. [${i.severity.toUpperCase()}] ${i.category}: ${i.description}${i.suggestion ? ` → ${i.suggestion}` : ''}`)
163
- .join('\n');
164
- return `Improve your previous response by fixing these issues:
165
-
166
- ORIGINAL QUERY:
167
- ${userQuery}
168
-
169
- ISSUES FOUND:
170
- ${issueList}
171
-
172
- ORIGINAL RESPONSE:
173
- ---
174
- ${originalResponse.slice(0, 4000)}
175
- ---
176
-
177
- Generate an improved response that addresses ALL issues listed above.
178
- Focus especially on critical and major issues.
179
- Maintain what was good about the original response.`;
180
- }
181
- // ============================================================================
182
- // TOOL PATTERN LEARNING
183
- // ============================================================================
184
- /**
185
- * Tool pattern tracker for learning optimal sequences
186
- */
187
- export class ToolPatternTracker {
188
- patterns = new Map();
189
- currentSequence = [];
190
- currentTaskType = 'general';
191
- sequenceStartTime = 0;
192
- /**
193
- * Start tracking a new task
194
- */
195
- startTask(taskType) {
196
- this.currentTaskType = taskType;
197
- this.currentSequence = [];
198
- this.sequenceStartTime = Date.now();
199
- }
200
- /**
201
- * Record a tool use
202
- */
203
- recordToolUse(toolName, _success) {
204
- this.currentSequence.push(toolName);
205
- }
206
- /**
207
- * Complete the current task and record the pattern
208
- */
209
- completeTask(success) {
210
- if (this.currentSequence.length === 0)
211
- return;
212
- const duration = Date.now() - this.sequenceStartTime;
213
- const patternKey = this.currentSequence.join('→');
214
- let patterns = this.patterns.get(this.currentTaskType);
215
- if (!patterns) {
216
- patterns = [];
217
- this.patterns.set(this.currentTaskType, patterns);
218
- }
219
- // Find existing pattern or create new
220
- const existing = patterns.find(p => p.toolSequence.join('→') === patternKey);
221
- if (existing) {
222
- // Update statistics
223
- existing.occurrences++;
224
- existing.successRate = (existing.successRate * (existing.occurrences - 1) + (success ? 1 : 0)) / existing.occurrences;
225
- existing.avgDuration = (existing.avgDuration * (existing.occurrences - 1) + duration) / existing.occurrences;
226
- }
227
- else {
228
- // Create new pattern
229
- patterns.push({
230
- taskType: this.currentTaskType,
231
- toolSequence: [...this.currentSequence],
232
- successRate: success ? 1 : 0,
233
- avgDuration: duration,
234
- occurrences: 1,
235
- });
236
- }
237
- // Sort by success rate
238
- patterns.sort((a, b) => b.successRate - a.successRate);
239
- // Keep top 10 patterns per task type
240
- if (patterns.length > 10) {
241
- patterns.length = 10;
242
- }
243
- }
244
- /**
245
- * Get recommended tool sequence for a task type
246
- */
247
- getRecommendedSequence(taskType) {
248
- const patterns = this.patterns.get(taskType);
249
- if (!patterns || patterns.length === 0)
250
- return null;
251
- // Return the most successful pattern with enough occurrences
252
- const reliable = patterns.find(p => p.occurrences >= 3 && p.successRate >= 0.7);
253
- return reliable?.toolSequence ?? patterns[0]?.toolSequence ?? null;
254
- }
255
- /**
256
- * Get all learned patterns
257
- */
258
- getAllPatterns() {
259
- return new Map(this.patterns);
260
- }
261
- /**
262
- * Export patterns for persistence
263
- */
264
- exportPatterns() {
265
- const result = {};
266
- for (const [key, value] of this.patterns) {
267
- result[key] = value;
268
- }
269
- return result;
270
- }
271
- /**
272
- * Import patterns from persistence
273
- */
274
- importPatterns(data) {
275
- this.patterns.clear();
276
- for (const [key, value] of Object.entries(data)) {
277
- this.patterns.set(key, value);
278
- }
279
- }
280
- }
281
- /**
282
- * Quick heuristic-based quality scoring (no LLM needed)
283
- */
284
- export function quickQualityScore(response, toolCalls) {
285
- let correctness = 50;
286
- let completeness = 50;
287
- let efficiency = 50;
288
- let maintainability = 50;
289
- let security = 50;
290
- // Tool call success rate affects correctness
291
- if (toolCalls.length > 0) {
292
- const successRate = toolCalls.filter(t => t.success).length / toolCalls.length;
293
- correctness = Math.round(50 + successRate * 40);
294
- }
295
- // Response length indicates completeness
296
- if (response.length > 1000)
297
- completeness += 15;
298
- if (response.length > 3000)
299
- completeness += 10;
300
- if (response.length < 200)
301
- completeness -= 20;
302
- // Code blocks indicate actual implementation
303
- const codeBlocks = (response.match(/```/g) || []).length / 2;
304
- if (codeBlocks >= 1)
305
- completeness += 10;
306
- if (codeBlocks >= 3)
307
- completeness += 5;
308
- // Check for common patterns
309
- if (/error|exception|try.*catch/i.test(response)) {
310
- maintainability += 10; // Error handling
311
- }
312
- if (/\bconst\b|\blet\b/.test(response)) {
313
- maintainability += 5; // Modern JS
314
- }
315
- if (/async|await|Promise/.test(response)) {
316
- efficiency += 5; // Async patterns
317
- }
318
- // Security indicators
319
- if (/validate|sanitize|escape/i.test(response))
320
- security += 10;
321
- if (/sql\s*injection|xss|csrf/i.test(response.toLowerCase()))
322
- security -= 10; // Mentions vulnerabilities without fixing
323
- // Bound scores
324
- const bound = (n) => Math.max(0, Math.min(100, n));
325
- correctness = bound(correctness);
326
- completeness = bound(completeness);
327
- efficiency = bound(efficiency);
328
- maintainability = bound(maintainability);
329
- security = bound(security);
330
- const overall = Math.round(correctness * 0.3 +
331
- completeness * 0.25 +
332
- efficiency * 0.2 +
333
- maintainability * 0.15 +
334
- security * 0.1);
335
- const breakdown = [
336
- `Correctness: ${correctness}`,
337
- `Completeness: ${completeness}`,
338
- `Efficiency: ${efficiency}`,
339
- `Maintainability: ${maintainability}`,
340
- `Security: ${security}`,
341
- ].join(' | ');
342
- return {
343
- overall,
344
- correctness,
345
- completeness,
346
- efficiency,
347
- maintainability,
348
- security,
349
- breakdown,
350
- };
351
- }
352
- // ============================================================================
353
- // TASK TYPE CLASSIFICATION
354
- // ============================================================================
355
- /**
356
- * Classify task type from user query for pattern matching
357
- */
358
- export function classifyTaskType(query) {
359
- const q = query.toLowerCase();
360
- if (/\b(bug|fix|error|issue|broken|doesn't work|not working)\b/.test(q)) {
4
+ export function classifyTaskType(userMessage) {
5
+ const msg = userMessage.toLowerCase();
6
+ if (/fix|bug|error|issue|broken|crash/.test(msg))
361
7
  return 'bug-fix';
362
- }
363
- if (/\b(add|create|implement|build|make|new)\b/.test(q)) {
364
- return 'feature-add';
365
- }
366
- if (/\b(refactor|clean|improve|optimize|simplify)\b/.test(q)) {
8
+ if (/add|implement|create|build|feature|new/.test(msg))
9
+ return 'feature';
10
+ if (/refactor|clean|improve|optimize/.test(msg))
367
11
  return 'refactor';
368
- }
369
- if (/\b(test|spec|coverage)\b/.test(q)) {
370
- return 'testing';
371
- }
372
- if (/\b(explain|what|how|why|understand)\b/.test(q)) {
373
- return 'explanation';
374
- }
375
- if (/\b(review|check|analyze|audit)\b/.test(q)) {
376
- return 'review';
377
- }
378
- if (/\b(deploy|release|publish|ship)\b/.test(q)) {
379
- return 'deployment';
380
- }
381
- if (/\b(config|setup|install|configure)\b/.test(q)) {
382
- return 'configuration';
383
- }
384
- return 'general';
12
+ if (/test|spec|coverage/.test(msg))
13
+ return 'test';
14
+ if (/doc|readme|comment|explain/.test(msg))
15
+ return 'docs';
16
+ if (/config|setup|install|configure/.test(msg))
17
+ return 'config';
18
+ return 'unknown';
385
19
  }
386
- export const DEFAULT_ALPHA_CONFIG = {
387
- dualResponseEnabled: true,
388
- selfCritiqueEnabled: true,
389
- patternLearningEnabled: true,
390
- minQualityThreshold: 60,
391
- maxCritiqueIterations: 2,
392
- };
393
- /**
394
- * Main AlphaZero Engine coordinating all components
395
- */
396
- export class AlphaZeroEngine {
397
- config;
398
- patternTracker;
399
- sessionStats;
400
- constructor(config = {}) {
401
- this.config = { ...DEFAULT_ALPHA_CONFIG, ...config };
402
- this.patternTracker = new ToolPatternTracker();
403
- this.sessionStats = {
404
- dualResponsesGenerated: 0,
405
- critiqueIterations: 0,
406
- improvementsApplied: 0,
407
- patternsLearned: 0,
408
- };
409
- }
410
- /**
411
- * Start tracking a task
412
- */
413
- startTask(userQuery) {
414
- const taskType = classifyTaskType(userQuery);
415
- this.patternTracker.startTask(taskType);
416
- }
417
- /**
418
- * Record a tool call
419
- */
420
- recordToolCall(toolName, success) {
421
- this.patternTracker.recordToolUse(toolName, success);
422
- }
423
- /**
424
- * Complete current task
425
- */
426
- completeTask(success) {
427
- this.patternTracker.completeTask(success);
428
- if (success) {
429
- this.sessionStats.patternsLearned++;
430
- }
431
- }
432
- /**
433
- * Get recommended tools for current task type
434
- */
435
- getRecommendedTools(taskType) {
436
- return this.patternTracker.getRecommendedSequence(taskType);
437
- }
438
- /**
439
- * Score a response
440
- */
441
- scoreResponse(response, toolCalls) {
442
- return quickQualityScore(response, toolCalls);
443
- }
444
- /**
445
- * Check if response needs improvement
446
- */
447
- needsImprovement(score) {
448
- return score.overall < this.config.minQualityThreshold;
449
- }
450
- /**
451
- * Get session statistics
452
- */
453
- getStats() {
454
- return { ...this.sessionStats };
455
- }
456
- /**
457
- * Export learned patterns
458
- */
459
- exportLearning() {
460
- return {
461
- patterns: this.patternTracker.exportPatterns(),
462
- stats: { ...this.sessionStats },
463
- };
464
- }
465
- /**
466
- * Import learned patterns
467
- */
468
- importLearning(data) {
469
- if (data.patterns) {
470
- this.patternTracker.importPatterns(data.patterns);
471
- }
472
- }
473
- /**
474
- * Increment dual response counter
475
- */
476
- recordDualResponse() {
477
- this.sessionStats.dualResponsesGenerated++;
478
- }
479
- /**
480
- * Increment critique counter
481
- */
482
- recordCritique() {
483
- this.sessionStats.critiqueIterations++;
484
- }
485
- /**
486
- * Increment improvement counter
487
- */
488
- recordImprovement() {
489
- this.sessionStats.improvementsApplied++;
490
- }
491
- /**
492
- * Get configuration
493
- */
494
- getConfig() {
495
- return { ...this.config };
20
+ export class ToolPatternTracker {
21
+ patterns = [];
22
+ addPattern(pattern) {
23
+ this.patterns.push(pattern);
496
24
  }
497
- /**
498
- * Update configuration
499
- */
500
- updateConfig(updates) {
501
- this.config = { ...this.config, ...updates };
25
+ getPatterns() {
26
+ return [...this.patterns];
502
27
  }
503
- }
504
- // ============================================================================
505
- // SINGLETON INSTANCE
506
- // ============================================================================
507
- let engineInstance = null;
508
- /**
509
- * Get the global AlphaZero engine instance
510
- */
511
- export function getAlphaZeroEngine() {
512
- if (!engineInstance) {
513
- engineInstance = new AlphaZeroEngine();
28
+ clear() {
29
+ this.patterns = [];
514
30
  }
515
- return engineInstance;
516
- }
517
- /**
518
- * Reset the engine (for testing)
519
- */
520
- export function resetAlphaZeroEngine() {
521
- engineInstance = null;
522
31
  }
523
32
  //# sourceMappingURL=alphaZeroEngine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alphaZeroEngine.js","sourceRoot":"","sources":["../../src/core/alphaZeroEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgGH,MAAM,CAAC,MAAM,mBAAmB,GAAuB;IACrD,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,GAAG,EAAG,eAAe;IACnC,YAAY,EAAE,GAAG,EAAG,WAAW;IAC/B,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AAE,CAAC;IAErC,UAAU,CAAC,OAAoB;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,WAAW;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Complete Attack Orchestrator
3
+ *
4
+ * Fully integrated, self-contained attack orchestration system.
5
+ * No external dependencies on Apple-specific code.
6
+ *
7
+ * AUTHORIZED USE ONLY - Security Research & Penetration Testing
8
+ */
9
+ export interface AttackConfig {
10
+ organization: string;
11
+ intent: 'destroy' | 'attack' | 'audit' | 'analyze' | 'recon' | 'exfiltrate' | 'persist' | 'escalate' | 'evade';
12
+ mode?: 'rl' | 'non-rl' | 'auto';
13
+ vectors?: string[];
14
+ maxIterations?: number;
15
+ completionThreshold?: number;
16
+ enableKeyboard?: boolean;
17
+ verbose?: boolean;
18
+ }
19
+ export interface AttackStatistics {
20
+ organization: string;
21
+ intent: string;
22
+ mode: 'rl' | 'non-rl';
23
+ startTime: number;
24
+ endTime: number;
25
+ totalRuntime: number;
26
+ totalTargets: number;
27
+ compromisedTargets: number;
28
+ completionRate: number;
29
+ serversCompromised: number;
30
+ systemsCompromised: number;
31
+ devicesCompromised: number;
32
+ employeesCompromised: number;
33
+ totalIterations: number;
34
+ successfulAttacks: number;
35
+ failedAttacks: number;
36
+ successRate: number;
37
+ codeVersionsGenerated: number;
38
+ modeSwaps: number;
39
+ totalReward?: number;
40
+ averageReward?: number;
41
+ events: AttackEvent[];
42
+ }
43
+ export interface AttackEvent {
44
+ timestamp: number;
45
+ phase: string;
46
+ event: string;
47
+ success: boolean;
48
+ details: string;
49
+ }
50
+ export declare class CompleteAttackOrchestrator {
51
+ private researcher;
52
+ private sourceManager;
53
+ private currentMode;
54
+ private running;
55
+ private keyboardEnabled;
56
+ constructor();
57
+ /**
58
+ * Execute complete attack campaign
59
+ */
60
+ execute(config: AttackConfig): Promise<AttackStatistics>;
61
+ /**
62
+ * Determine execution mode
63
+ */
64
+ private determineMode;
65
+ /**
66
+ * Execute attack campaign
67
+ */
68
+ private executeAttack;
69
+ /**
70
+ * Execute RL iteration
71
+ */
72
+ private executeRLIteration;
73
+ /**
74
+ * Execute Non-RL iteration
75
+ */
76
+ private executeNonRLIteration;
77
+ /**
78
+ * Estimate total targets
79
+ */
80
+ private estimateTotalTargets;
81
+ /**
82
+ * Setup keyboard controls
83
+ */
84
+ private setupKeyboard;
85
+ /**
86
+ * Toggle between RL and Non-RL modes
87
+ */
88
+ private toggleMode;
89
+ /**
90
+ * Stop orchestration
91
+ */
92
+ stop(): void;
93
+ /**
94
+ * Cleanup resources
95
+ */
96
+ private cleanup;
97
+ /**
98
+ * Generate comprehensive report
99
+ */
100
+ static generateReport(stats: AttackStatistics): string;
101
+ }
102
+ //# sourceMappingURL=completeAttackOrchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completeAttackOrchestrator.d.ts","sourceRoot":"","sources":["../../src/core/completeAttackOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IAC/G,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,g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