erosolar-cli 1.5.2 → 1.5.4

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 (346) hide show
  1. package/config/security-deployment.json +54 -0
  2. package/dist/bin/adapters/node/index.js +33 -0
  3. package/dist/bin/adapters/types.js +1 -0
  4. package/dist/bin/alpha-zero/agentWrapper.js +165 -0
  5. package/dist/bin/alpha-zero/codeEvaluator.js +272 -0
  6. package/dist/bin/alpha-zero/competitiveRunner.js +219 -0
  7. package/dist/bin/alpha-zero/index.js +98 -0
  8. package/dist/bin/alpha-zero/introspection.js +298 -0
  9. package/dist/bin/alpha-zero/metricsTracker.js +207 -0
  10. package/dist/bin/alpha-zero/security/core.js +269 -0
  11. package/dist/bin/alpha-zero/security/google.js +308 -0
  12. package/dist/bin/alpha-zero/security/googleLoader.js +40 -0
  13. package/dist/bin/alpha-zero/security/index.js +31 -0
  14. package/dist/bin/alpha-zero/security/simulation.js +274 -0
  15. package/dist/bin/alpha-zero/selfModification.js +231 -0
  16. package/dist/bin/alpha-zero/types.js +30 -0
  17. package/dist/bin/bin/erosolar-optimized.js +205 -0
  18. package/dist/bin/capabilities/agentSpawningCapability.js +116 -0
  19. package/dist/bin/capabilities/bashCapability.js +22 -0
  20. package/dist/bin/capabilities/cloudCapability.js +36 -0
  21. package/dist/bin/capabilities/codeAnalysisCapability.js +22 -0
  22. package/dist/bin/capabilities/codeQualityCapability.js +23 -0
  23. package/dist/bin/capabilities/dependencySecurityCapability.js +22 -0
  24. package/dist/bin/capabilities/devCapability.js +22 -0
  25. package/dist/bin/capabilities/editCapability.js +28 -0
  26. package/dist/bin/capabilities/emailCapability.js +20 -0
  27. package/dist/bin/capabilities/enhancedGitCapability.js +221 -0
  28. package/dist/bin/capabilities/filesystemCapability.js +22 -0
  29. package/dist/bin/capabilities/globCapability.js +28 -0
  30. package/dist/bin/capabilities/interactionCapability.js +20 -0
  31. package/dist/bin/capabilities/learnCapability.js +22 -0
  32. package/dist/bin/capabilities/mcpCapability.js +20 -0
  33. package/dist/bin/capabilities/notebookCapability.js +28 -0
  34. package/dist/bin/capabilities/planningCapability.js +27 -0
  35. package/dist/bin/capabilities/refactoringCapability.js +23 -0
  36. package/dist/bin/capabilities/repoChecksCapability.js +22 -0
  37. package/dist/bin/capabilities/searchCapability.js +22 -0
  38. package/dist/bin/capabilities/skillCapability.js +76 -0
  39. package/dist/bin/capabilities/taskManagementCapability.js +20 -0
  40. package/dist/bin/capabilities/testingCapability.js +23 -0
  41. package/dist/bin/capabilities/toolManifest.js +159 -0
  42. package/dist/bin/capabilities/toolRegistry.js +114 -0
  43. package/dist/bin/capabilities/webCapability.js +20 -0
  44. package/dist/bin/config.js +139 -0
  45. package/dist/bin/contracts/v1/agent.js +7 -0
  46. package/dist/bin/contracts/v1/agentProfileManifest.js +8 -0
  47. package/dist/bin/contracts/v1/agentRules.js +9 -0
  48. package/dist/bin/contracts/v1/toolAccess.js +8 -0
  49. package/dist/bin/core/agent.js +362 -0
  50. package/dist/bin/core/agentProfileManifest.js +187 -0
  51. package/dist/bin/core/agentProfiles.js +34 -0
  52. package/dist/bin/core/agentRulebook.js +135 -0
  53. package/dist/bin/core/agentSchemaLoader.js +233 -0
  54. package/dist/bin/core/contextManager.js +412 -0
  55. package/dist/bin/core/contextWindow.js +122 -0
  56. package/dist/bin/core/customCommands.js +80 -0
  57. package/dist/bin/core/errors/apiKeyErrors.js +114 -0
  58. package/dist/bin/core/errors/errorTypes.js +340 -0
  59. package/dist/bin/core/errors/safetyValidator.js +304 -0
  60. package/dist/bin/core/errors.js +32 -0
  61. package/dist/bin/core/modelDiscovery.js +755 -0
  62. package/dist/bin/core/preferences.js +224 -0
  63. package/dist/bin/core/schemaValidator.js +92 -0
  64. package/dist/bin/core/secretStore.js +199 -0
  65. package/dist/bin/core/sessionStore.js +187 -0
  66. package/dist/bin/core/toolRuntime.js +290 -0
  67. package/dist/bin/core/types.js +1 -0
  68. package/dist/bin/erosolar-optimized.d.ts +12 -0
  69. package/dist/bin/erosolar-optimized.d.ts.map +1 -0
  70. package/dist/bin/erosolar-optimized.js +239 -0
  71. package/dist/bin/erosolar-optimized.js.map +1 -0
  72. package/dist/bin/erosolar.js +14 -0
  73. package/dist/bin/erosolar.js.map +1 -1
  74. package/dist/bin/headless/headlessApp.js +172 -0
  75. package/dist/bin/mcp/config.js +202 -0
  76. package/dist/bin/mcp/stdioClient.js +172 -0
  77. package/dist/bin/mcp/toolBridge.js +104 -0
  78. package/dist/bin/mcp/types.js +1 -0
  79. package/dist/bin/plugins/index.js +113 -0
  80. package/dist/bin/plugins/providers/anthropic/index.js +25 -0
  81. package/dist/bin/plugins/providers/deepseek/index.js +24 -0
  82. package/dist/bin/plugins/providers/google/index.js +26 -0
  83. package/dist/bin/plugins/providers/index.js +19 -0
  84. package/dist/bin/plugins/providers/ollama/index.js +59 -0
  85. package/dist/bin/plugins/providers/openai/index.js +26 -0
  86. package/dist/bin/plugins/providers/xai/index.js +24 -0
  87. package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +8 -0
  88. package/dist/bin/plugins/tools/bash/localBashPlugin.js +13 -0
  89. package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +13 -0
  90. package/dist/bin/plugins/tools/cloud/cloudPlugin.js +13 -0
  91. package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +13 -0
  92. package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +13 -0
  93. package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +11 -0
  94. package/dist/bin/plugins/tools/development/devPlugin.js +13 -0
  95. package/dist/bin/plugins/tools/edit/editPlugin.js +14 -0
  96. package/dist/bin/plugins/tools/email/emailPlugin.js +11 -0
  97. package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +8 -0
  98. package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +13 -0
  99. package/dist/bin/plugins/tools/glob/globPlugin.js +14 -0
  100. package/dist/bin/plugins/tools/index.js +2 -0
  101. package/dist/bin/plugins/tools/interaction/interactionPlugin.js +11 -0
  102. package/dist/bin/plugins/tools/learn/learnPlugin.js +13 -0
  103. package/dist/bin/plugins/tools/mcp/mcpPlugin.js +8 -0
  104. package/dist/bin/plugins/tools/nodeDefaults.js +56 -0
  105. package/dist/bin/plugins/tools/notebook/notebookPlugin.js +14 -0
  106. package/dist/bin/plugins/tools/planning/planningPlugin.js +14 -0
  107. package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +11 -0
  108. package/dist/bin/plugins/tools/registry.js +57 -0
  109. package/dist/bin/plugins/tools/search/localSearchPlugin.js +13 -0
  110. package/dist/bin/plugins/tools/skills/skillPlugin.js +8 -0
  111. package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +11 -0
  112. package/dist/bin/plugins/tools/testing/testingPlugin.js +11 -0
  113. package/dist/bin/plugins/tools/web/webPlugin.js +11 -0
  114. package/dist/bin/providers/anthropicProvider.js +329 -0
  115. package/dist/bin/providers/googleProvider.js +203 -0
  116. package/dist/bin/providers/openaiChatCompletionsProvider.js +208 -0
  117. package/dist/bin/providers/openaiResponsesProvider.js +249 -0
  118. package/dist/bin/providers/providerFactory.js +24 -0
  119. package/dist/bin/runtime/agentController.js +321 -0
  120. package/dist/bin/runtime/agentHost.js +153 -0
  121. package/dist/bin/runtime/agentSession.js +195 -0
  122. package/dist/bin/runtime/node.js +10 -0
  123. package/dist/bin/runtime/universal.js +28 -0
  124. package/dist/bin/shell/bracketedPasteManager.js +350 -0
  125. package/dist/bin/shell/fileChangeTracker.js +65 -0
  126. package/dist/bin/shell/interactiveShell.js +2908 -0
  127. package/dist/bin/shell/liveStatus.js +78 -0
  128. package/dist/bin/shell/shellApp.js +290 -0
  129. package/dist/bin/shell/systemPrompt.js +60 -0
  130. package/dist/bin/shell/updateManager.js +108 -0
  131. package/dist/bin/skills/skillRepository.js +236 -0
  132. package/dist/bin/skills/types.js +1 -0
  133. package/dist/bin/subagents/taskRunner.js +269 -0
  134. package/dist/bin/tools/backgroundBashTools.js +211 -0
  135. package/dist/bin/tools/bashTools.js +159 -0
  136. package/dist/bin/tools/cloudTools.js +864 -0
  137. package/dist/bin/tools/codeAnalysisTools.js +641 -0
  138. package/dist/bin/tools/codeQualityTools.js +294 -0
  139. package/dist/bin/tools/dependencyTools.js +282 -0
  140. package/dist/bin/tools/devTools.js +238 -0
  141. package/dist/bin/tools/diffUtils.js +137 -0
  142. package/dist/bin/tools/editTools.js +134 -0
  143. package/dist/bin/tools/emailTools.js +448 -0
  144. package/dist/bin/tools/fileTools.js +282 -0
  145. package/dist/bin/tools/globTools.js +173 -0
  146. package/dist/bin/tools/grepTools.js +332 -0
  147. package/dist/bin/tools/interactionTools.js +170 -0
  148. package/dist/bin/tools/learnTools.js +1818 -0
  149. package/dist/bin/tools/notebookEditTools.js +196 -0
  150. package/dist/bin/tools/planningTools.js +46 -0
  151. package/dist/bin/tools/refactoringTools.js +293 -0
  152. package/dist/bin/tools/repoChecksTools.js +160 -0
  153. package/dist/bin/tools/searchTools.js +206 -0
  154. package/dist/bin/tools/skillTools.js +177 -0
  155. package/dist/bin/tools/taskManagementTools.js +156 -0
  156. package/dist/bin/tools/testingTools.js +232 -0
  157. package/dist/bin/tools/webTools.js +480 -0
  158. package/dist/bin/ui/ShellUIAdapter.js +459 -0
  159. package/dist/bin/ui/UnifiedUIController.js +183 -0
  160. package/dist/bin/ui/animation/AnimationScheduler.js +430 -0
  161. package/dist/bin/ui/codeHighlighter.js +854 -0
  162. package/dist/bin/ui/designSystem.js +121 -0
  163. package/dist/bin/ui/display.js +1222 -0
  164. package/dist/bin/ui/interrupts/InterruptManager.js +437 -0
  165. package/dist/bin/ui/layout.js +139 -0
  166. package/dist/bin/ui/orchestration/StatusOrchestrator.js +403 -0
  167. package/dist/bin/ui/outputMode.js +38 -0
  168. package/dist/bin/ui/persistentPrompt.js +183 -0
  169. package/dist/bin/ui/richText.js +338 -0
  170. package/dist/bin/ui/shortcutsHelp.js +87 -0
  171. package/dist/bin/ui/telemetry/UITelemetry.js +443 -0
  172. package/dist/bin/ui/textHighlighter.js +210 -0
  173. package/dist/bin/ui/theme.js +116 -0
  174. package/dist/bin/ui/toolDisplay.js +423 -0
  175. package/dist/bin/ui/toolDisplayAdapter.js +357 -0
  176. package/dist/bin/workspace.js +106 -0
  177. package/dist/bin/workspace.validator.js +213 -0
  178. package/dist/capabilities/cloudCapability.d.ts +13 -0
  179. package/dist/capabilities/cloudCapability.d.ts.map +1 -0
  180. package/dist/capabilities/cloudCapability.js +38 -0
  181. package/dist/capabilities/cloudCapability.js.map +1 -0
  182. package/dist/capabilities/index.d.ts +1 -0
  183. package/dist/capabilities/index.d.ts.map +1 -1
  184. package/dist/capabilities/index.js +1 -0
  185. package/dist/capabilities/index.js.map +1 -1
  186. package/dist/capabilities/offensiveSecurityCapability.d.ts +26 -0
  187. package/dist/capabilities/offensiveSecurityCapability.d.ts.map +1 -0
  188. package/dist/capabilities/offensiveSecurityCapability.js +58 -0
  189. package/dist/capabilities/offensiveSecurityCapability.js.map +1 -0
  190. package/dist/capabilities/realSecurityCapability.d.ts +26 -0
  191. package/dist/capabilities/realSecurityCapability.d.ts.map +1 -0
  192. package/dist/capabilities/realSecurityCapability.js +53 -0
  193. package/dist/capabilities/realSecurityCapability.js.map +1 -0
  194. package/dist/capabilities/securityCapability.d.ts +32 -0
  195. package/dist/capabilities/securityCapability.d.ts.map +1 -0
  196. package/dist/capabilities/securityCapability.js +57 -0
  197. package/dist/capabilities/securityCapability.js.map +1 -0
  198. package/dist/capabilities/ultimateSecurityCapability.d.ts +42 -0
  199. package/dist/capabilities/ultimateSecurityCapability.d.ts.map +1 -0
  200. package/dist/capabilities/ultimateSecurityCapability.js +96 -0
  201. package/dist/capabilities/ultimateSecurityCapability.js.map +1 -0
  202. package/dist/core/LazyLoader.d.ts +129 -0
  203. package/dist/core/LazyLoader.d.ts.map +1 -0
  204. package/dist/core/LazyLoader.js +240 -0
  205. package/dist/core/LazyLoader.js.map +1 -0
  206. package/dist/core/intelligenceTools.d.ts +19 -0
  207. package/dist/core/intelligenceTools.d.ts.map +1 -0
  208. package/dist/core/intelligenceTools.js +453 -0
  209. package/dist/core/intelligenceTools.js.map +1 -0
  210. package/dist/core/operationalTools.d.ts +19 -0
  211. package/dist/core/operationalTools.d.ts.map +1 -0
  212. package/dist/core/operationalTools.js +467 -0
  213. package/dist/core/operationalTools.js.map +1 -0
  214. package/dist/offensive/core/offensive-engine.d.ts +171 -0
  215. package/dist/offensive/core/offensive-engine.d.ts.map +1 -0
  216. package/dist/offensive/core/offensive-engine.js +345 -0
  217. package/dist/offensive/core/offensive-engine.js.map +1 -0
  218. package/dist/offensive/core/offensive-integration.d.ts +129 -0
  219. package/dist/offensive/core/offensive-integration.d.ts.map +1 -0
  220. package/dist/offensive/core/offensive-integration.js +364 -0
  221. package/dist/offensive/core/offensive-integration.js.map +1 -0
  222. package/dist/offensive/core/offensive-tools.d.ts +55 -0
  223. package/dist/offensive/core/offensive-tools.d.ts.map +1 -0
  224. package/dist/offensive/core/offensive-tools.js +438 -0
  225. package/dist/offensive/core/offensive-tools.js.map +1 -0
  226. package/dist/offensive/offensive-cli.d.ts +48 -0
  227. package/dist/offensive/offensive-cli.d.ts.map +1 -0
  228. package/dist/offensive/offensive-cli.js +233 -0
  229. package/dist/offensive/offensive-cli.js.map +1 -0
  230. package/dist/plugins/index.d.ts +1 -1
  231. package/dist/plugins/index.d.ts.map +1 -1
  232. package/dist/plugins/index.js +2 -0
  233. package/dist/plugins/index.js.map +1 -1
  234. package/dist/plugins/tools/cloud/cloudPlugin.d.ts +3 -0
  235. package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +1 -0
  236. package/dist/plugins/tools/cloud/cloudPlugin.js +14 -0
  237. package/dist/plugins/tools/cloud/cloudPlugin.js.map +1 -0
  238. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  239. package/dist/plugins/tools/nodeDefaults.js +2 -0
  240. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  241. package/dist/security/advanced-persistence-research.d.ts +92 -0
  242. package/dist/security/advanced-persistence-research.d.ts.map +1 -0
  243. package/dist/security/advanced-persistence-research.js +195 -0
  244. package/dist/security/advanced-persistence-research.js.map +1 -0
  245. package/dist/security/apt-simulation-cli.d.ts +57 -0
  246. package/dist/security/apt-simulation-cli.d.ts.map +1 -0
  247. package/dist/security/apt-simulation-cli.js +278 -0
  248. package/dist/security/apt-simulation-cli.js.map +1 -0
  249. package/dist/security/apt-simulation-engine-complete.d.ts +97 -0
  250. package/dist/security/apt-simulation-engine-complete.d.ts.map +1 -0
  251. package/dist/security/apt-simulation-engine-complete.js +441 -0
  252. package/dist/security/apt-simulation-engine-complete.js.map +1 -0
  253. package/dist/security/apt-simulation-engine.d.ts +97 -0
  254. package/dist/security/apt-simulation-engine.d.ts.map +1 -0
  255. package/dist/security/apt-simulation-engine.js +441 -0
  256. package/dist/security/apt-simulation-engine.js.map +1 -0
  257. package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
  258. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
  259. package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
  260. package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
  261. package/dist/security/authorization/securityAuthorization.d.ts +88 -0
  262. package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
  263. package/dist/security/authorization/securityAuthorization.js +172 -0
  264. package/dist/security/authorization/securityAuthorization.js.map +1 -0
  265. package/dist/security/authorization.d.ts +45 -0
  266. package/dist/security/authorization.d.ts.map +1 -0
  267. package/dist/security/authorization.js +128 -0
  268. package/dist/security/authorization.js.map +1 -0
  269. package/dist/security/comprehensive-security-research.d.ts +84 -0
  270. package/dist/security/comprehensive-security-research.d.ts.map +1 -0
  271. package/dist/security/comprehensive-security-research.js +211 -0
  272. package/dist/security/comprehensive-security-research.js.map +1 -0
  273. package/dist/security/offensive/exploitationEngine.d.ts +54 -0
  274. package/dist/security/offensive/exploitationEngine.d.ts.map +1 -0
  275. package/dist/security/offensive/exploitationEngine.js +263 -0
  276. package/dist/security/offensive/exploitationEngine.js.map +1 -0
  277. package/dist/security/persistence-analyzer.d.ts +56 -0
  278. package/dist/security/persistence-analyzer.d.ts.map +1 -0
  279. package/dist/security/persistence-analyzer.js +187 -0
  280. package/dist/security/persistence-analyzer.js.map +1 -0
  281. package/dist/security/persistence-cli.d.ts +36 -0
  282. package/dist/security/persistence-cli.d.ts.map +1 -0
  283. package/dist/security/persistence-cli.js +160 -0
  284. package/dist/security/persistence-cli.js.map +1 -0
  285. package/dist/security/persistence-research.d.ts +100 -0
  286. package/dist/security/persistence-research.d.ts.map +1 -0
  287. package/dist/security/persistence-research.js +372 -0
  288. package/dist/security/persistence-research.js.map +1 -0
  289. package/dist/security/real/networkExploitation.d.ts +92 -0
  290. package/dist/security/real/networkExploitation.d.ts.map +1 -0
  291. package/dist/security/real/networkExploitation.js +316 -0
  292. package/dist/security/real/networkExploitation.js.map +1 -0
  293. package/dist/security/real/persistenceImplementation.d.ts +62 -0
  294. package/dist/security/real/persistenceImplementation.d.ts.map +1 -0
  295. package/dist/security/real/persistenceImplementation.js +323 -0
  296. package/dist/security/real/persistenceImplementation.js.map +1 -0
  297. package/dist/security/real/vulnerabilityScanner.d.ts +73 -0
  298. package/dist/security/real/vulnerabilityScanner.d.ts.map +1 -0
  299. package/dist/security/real/vulnerabilityScanner.js +341 -0
  300. package/dist/security/real/vulnerabilityScanner.js.map +1 -0
  301. package/dist/security/research/persistenceResearch.d.ts +97 -0
  302. package/dist/security/research/persistenceResearch.d.ts.map +1 -0
  303. package/dist/security/research/persistenceResearch.js +282 -0
  304. package/dist/security/research/persistenceResearch.js.map +1 -0
  305. package/dist/security/security-testing-framework.d.ts +120 -0
  306. package/dist/security/security-testing-framework.d.ts.map +1 -0
  307. package/dist/security/security-testing-framework.js +372 -0
  308. package/dist/security/security-testing-framework.js.map +1 -0
  309. package/dist/security/simulation/attackSimulation.d.ts +93 -0
  310. package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
  311. package/dist/security/simulation/attackSimulation.js +341 -0
  312. package/dist/security/simulation/attackSimulation.js.map +1 -0
  313. package/dist/shell/bracketedPasteManager.d.ts +76 -0
  314. package/dist/shell/bracketedPasteManager.d.ts.map +1 -1
  315. package/dist/shell/bracketedPasteManager.js +267 -9
  316. package/dist/shell/bracketedPasteManager.js.map +1 -1
  317. package/dist/shell/interactiveShell.d.ts +34 -1
  318. package/dist/shell/interactiveShell.d.ts.map +1 -1
  319. package/dist/shell/interactiveShell.js +304 -24
  320. package/dist/shell/interactiveShell.js.map +1 -1
  321. package/dist/shell/taskCompletionDetector.d.ts +101 -0
  322. package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
  323. package/dist/shell/taskCompletionDetector.js +343 -0
  324. package/dist/shell/taskCompletionDetector.js.map +1 -0
  325. package/dist/tools/cloudTools.d.ts +57 -0
  326. package/dist/tools/cloudTools.d.ts.map +1 -0
  327. package/dist/tools/cloudTools.js +865 -0
  328. package/dist/tools/cloudTools.js.map +1 -0
  329. package/dist/tools/enhancedSecurityTools.d.ts +19 -0
  330. package/dist/tools/enhancedSecurityTools.d.ts.map +1 -0
  331. package/dist/tools/enhancedSecurityTools.js +215 -0
  332. package/dist/tools/enhancedSecurityTools.js.map +1 -0
  333. package/dist/tools/offensiveSecurityTools.d.ts +16 -0
  334. package/dist/tools/offensiveSecurityTools.d.ts.map +1 -0
  335. package/dist/tools/offensiveSecurityTools.js +285 -0
  336. package/dist/tools/offensiveSecurityTools.js.map +1 -0
  337. package/dist/tools/realSecurityTools.d.ts +18 -0
  338. package/dist/tools/realSecurityTools.d.ts.map +1 -0
  339. package/dist/tools/realSecurityTools.js +468 -0
  340. package/dist/tools/realSecurityTools.js.map +1 -0
  341. package/dist/tools/securityTools.d.ts +20 -0
  342. package/dist/tools/securityTools.d.ts.map +1 -0
  343. package/dist/tools/securityTools.js +449 -0
  344. package/dist/tools/securityTools.js.map +1 -0
  345. package/package.json +27 -12
  346. package/scripts/deploy-security-capabilities.js +178 -0
@@ -0,0 +1,345 @@
1
+ /**
2
+ * Offensive Operations Core Engine
3
+ *
4
+ * Comprehensive framework for real offensive operations including:
5
+ * - Advanced reconnaissance capabilities
6
+ * - Persistence mechanisms
7
+ * - Lateral movement
8
+ * - Data exfiltration
9
+ * - Command and control
10
+ * - RL/AlphaZero integration for adaptive operations
11
+ */
12
+ /**
13
+ * Core Offensive Engine
14
+ */
15
+ export class OffensiveEngine {
16
+ operations = new Map();
17
+ adaptiveStates = new Map();
18
+ techniqueRegistry = new Map();
19
+ constructor() {
20
+ this.initializeCoreTechniques();
21
+ }
22
+ /**
23
+ * Initialize core offensive techniques
24
+ */
25
+ initializeCoreTechniques() {
26
+ // Reconnaissance Techniques
27
+ this.registerTechnique({
28
+ id: 'passive-recon-dns',
29
+ mitreId: 'T1592.002',
30
+ name: 'Passive DNS Reconnaissance',
31
+ implementation: {
32
+ automated: true,
33
+ tools: ['dnsrecon', 'sublist3r', 'amass'],
34
+ prerequisites: ['target-domain'],
35
+ executionTime: 'minutes'
36
+ },
37
+ detectionVectors: [
38
+ {
39
+ type: 'network',
40
+ description: 'DNS query patterns from single source',
41
+ confidence: 'medium',
42
+ mitigation: 'Use multiple sources and rate limiting'
43
+ }
44
+ ],
45
+ countermeasures: [
46
+ {
47
+ type: 'detective',
48
+ description: 'Monitor DNS query patterns',
49
+ effectiveness: 0.7
50
+ }
51
+ ],
52
+ resourceRequirements: [
53
+ {
54
+ type: 'network',
55
+ description: 'Internet connectivity',
56
+ quantity: 1
57
+ }
58
+ ]
59
+ });
60
+ // Initial Access Techniques
61
+ this.registerTechnique({
62
+ id: 'spearphishing-advanced',
63
+ mitreId: 'T1566.001',
64
+ name: 'Advanced Spearphishing',
65
+ implementation: {
66
+ automated: false,
67
+ manualSteps: [
68
+ 'Craft targeted email with social engineering',
69
+ 'Use domain spoofing or lookalike domains',
70
+ 'Deploy payload with execution chain'
71
+ ],
72
+ tools: ['gophish', 'setoolkit', 'custom-payloads'],
73
+ prerequisites: ['target-emails', 'payload-infrastructure'],
74
+ executionTime: 'hours'
75
+ },
76
+ detectionVectors: [
77
+ {
78
+ type: 'network',
79
+ description: 'Email security gateways',
80
+ confidence: 'high',
81
+ mitigation: 'Use trusted domains and social engineering'
82
+ }
83
+ ],
84
+ countermeasures: [
85
+ {
86
+ type: 'preventative',
87
+ description: 'User security training',
88
+ effectiveness: 0.8
89
+ }
90
+ ],
91
+ resourceRequirements: [
92
+ {
93
+ type: 'human',
94
+ description: 'Social engineering expertise',
95
+ quantity: 1
96
+ }
97
+ ]
98
+ });
99
+ // Persistence Techniques
100
+ this.registerTechnique({
101
+ id: 'multi-stage-persistence',
102
+ mitreId: 'T1543.003',
103
+ name: 'Multi-Stage Persistence',
104
+ implementation: {
105
+ automated: true,
106
+ tools: ['metasploit', 'cobalt-strike', 'custom-implant'],
107
+ prerequisites: ['initial-access'],
108
+ executionTime: 'minutes'
109
+ },
110
+ detectionVectors: [
111
+ {
112
+ type: 'endpoint',
113
+ description: 'EDR and antivirus detection',
114
+ confidence: 'high',
115
+ mitigation: 'Use fileless techniques and obfuscation'
116
+ }
117
+ ],
118
+ countermeasures: [
119
+ {
120
+ type: 'detective',
121
+ description: 'Endpoint monitoring',
122
+ effectiveness: 0.9
123
+ }
124
+ ],
125
+ resourceRequirements: [
126
+ {
127
+ type: 'compute',
128
+ description: 'Implant infrastructure',
129
+ quantity: 1
130
+ }
131
+ ]
132
+ });
133
+ }
134
+ /**
135
+ * Register offensive technique
136
+ */
137
+ registerTechnique(technique) {
138
+ this.techniqueRegistry.set(technique.id, technique);
139
+ }
140
+ /**
141
+ * Create new offensive operation
142
+ */
143
+ createOperation(spec) {
144
+ const operation = {
145
+ id: this.generateOperationId(),
146
+ name: spec.name,
147
+ target: spec.target,
148
+ objectives: spec.objectives,
149
+ phases: [],
150
+ status: 'planning',
151
+ stealthLevel: spec.stealthLevel,
152
+ riskTolerance: spec.riskTolerance
153
+ };
154
+ this.operations.set(operation.id, operation);
155
+ // Initialize adaptive state
156
+ this.adaptiveStates.set(operation.id, {
157
+ currentPhase: 'planning',
158
+ techniquesDeployed: [],
159
+ successMetrics: {},
160
+ riskLevel: 0,
161
+ stealthLevel: this.stealthLevelToNumber(spec.stealthLevel),
162
+ resourceUtilization: 0,
163
+ detectionEvents: []
164
+ });
165
+ return operation;
166
+ }
167
+ /**
168
+ * Plan operation phases using RL/AlphaZero approach
169
+ */
170
+ planOperation(operationId) {
171
+ const operation = this.operations.get(operationId);
172
+ if (!operation) {
173
+ throw new Error(`Operation not found: ${operationId}`);
174
+ }
175
+ const phases = [];
176
+ // Phase 1: Reconnaissance
177
+ phases.push({
178
+ id: 'reconnaissance',
179
+ name: 'Target Reconnaissance',
180
+ techniques: this.selectTechniquesForPhase('reconnaissance', operation),
181
+ dependencies: [],
182
+ estimatedDuration: '1-2 days',
183
+ successProbability: 0.9
184
+ });
185
+ // Phase 2: Initial Access
186
+ phases.push({
187
+ id: 'initial-access',
188
+ name: 'Initial Access Establishment',
189
+ techniques: this.selectTechniquesForPhase('initial-access', operation),
190
+ dependencies: ['reconnaissance'],
191
+ estimatedDuration: '1-3 days',
192
+ successProbability: 0.7
193
+ });
194
+ // Phase 3: Persistence
195
+ phases.push({
196
+ id: 'persistence',
197
+ name: 'Persistent Access',
198
+ techniques: this.selectTechniquesForPhase('persistence', operation),
199
+ dependencies: ['initial-access'],
200
+ estimatedDuration: 'hours',
201
+ successProbability: 0.8
202
+ });
203
+ // Phase 4: Lateral Movement
204
+ phases.push({
205
+ id: 'lateral-movement',
206
+ name: 'Network Expansion',
207
+ techniques: this.selectTechniquesForPhase('lateral-movement', operation),
208
+ dependencies: ['persistence'],
209
+ estimatedDuration: '2-5 days',
210
+ successProbability: 0.6
211
+ });
212
+ // Phase 5: Data Collection
213
+ phases.push({
214
+ id: 'collection',
215
+ name: 'Data Identification and Collection',
216
+ techniques: this.selectTechniquesForPhase('collection', operation),
217
+ dependencies: ['lateral-movement'],
218
+ estimatedDuration: '3-7 days',
219
+ successProbability: 0.8
220
+ });
221
+ // Phase 6: Exfiltration
222
+ phases.push({
223
+ id: 'exfiltration',
224
+ name: 'Data Exfiltration',
225
+ techniques: this.selectTechniquesForPhase('exfiltration', operation),
226
+ dependencies: ['collection'],
227
+ estimatedDuration: '1-2 days',
228
+ successProbability: 0.7
229
+ });
230
+ operation.phases = phases;
231
+ return phases;
232
+ }
233
+ /**
234
+ * Select techniques for operation phase using adaptive algorithm
235
+ */
236
+ selectTechniquesForPhase(phase, operation) {
237
+ const availableTechniques = Array.from(this.techniqueRegistry.values())
238
+ .filter(tech => tech.implementation.tools.length > 0);
239
+ // Filter by stealth requirements
240
+ let filteredTechniques = availableTechniques.filter(tech => {
241
+ const maxDetectionConfidence = Math.max(...tech.detectionVectors.map(v => this.confidenceToNumber(v.confidence)));
242
+ return maxDetectionConfidence <= this.stealthLevelToNumber(operation.stealthLevel);
243
+ });
244
+ // Apply RL/AlphaZero selection based on operation state
245
+ const adaptiveState = this.adaptiveStates.get(operation.id);
246
+ if (adaptiveState) {
247
+ filteredTechniques = this.applyAdaptiveSelection(filteredTechniques, adaptiveState, phase);
248
+ }
249
+ return filteredTechniques.slice(0, 3); // Return top 3 techniques
250
+ }
251
+ /**
252
+ * Apply RL/AlphaZero adaptive technique selection
253
+ */
254
+ applyAdaptiveSelection(techniques, state, phase) {
255
+ // Simple scoring algorithm - in real implementation, this would use neural networks
256
+ const scoredTechniques = techniques.map(tech => ({
257
+ technique: tech,
258
+ score: this.calculateTechniqueScore(tech, state, phase)
259
+ }));
260
+ // Sort by score descending
261
+ scoredTechniques.sort((a, b) => b.score - a.score);
262
+ return scoredTechniques.map(st => st.technique);
263
+ }
264
+ /**
265
+ * Calculate technique score using adaptive algorithm
266
+ */
267
+ calculateTechniqueScore(technique, state, phase) {
268
+ let score = 0;
269
+ // Base score from technique properties
270
+ score += technique.implementation.automated ? 10 : 5;
271
+ score -= technique.detectionVectors.length * 2;
272
+ score += technique.countermeasures.length * -1;
273
+ // Adjust based on current operation state
274
+ if (state.detectionEvents.length > 0) {
275
+ score -= state.detectionEvents.length * 5; // Penalize if previous detections
276
+ }
277
+ // Phase-specific adjustments
278
+ switch (phase) {
279
+ case 'reconnaissance':
280
+ score += technique.implementation.executionTime === 'minutes' ? 5 : 0;
281
+ break;
282
+ case 'initial-access':
283
+ score += technique.implementation.tools.includes('custom-payloads') ? 10 : 0;
284
+ break;
285
+ case 'persistence':
286
+ score += technique.implementation.automated ? 15 : 5;
287
+ break;
288
+ }
289
+ return Math.max(0, score);
290
+ }
291
+ /**
292
+ * Execute offensive operation phase
293
+ */
294
+ async executePhase(operationId, phaseId) {
295
+ const operation = this.operations.get(operationId);
296
+ if (!operation) {
297
+ throw new Error(`Operation not found: ${operationId}`);
298
+ }
299
+ const phase = operation.phases.find(p => p.id === phaseId);
300
+ if (!phase) {
301
+ throw new Error(`Phase not found: ${phaseId}`);
302
+ }
303
+ console.log(`Executing phase: ${phase.name}`);
304
+ for (const technique of phase.techniques) {
305
+ await this.executeTechnique(operationId, technique);
306
+ }
307
+ // Update adaptive state
308
+ const adaptiveState = this.adaptiveStates.get(operationId);
309
+ if (adaptiveState) {
310
+ adaptiveState.currentPhase = phaseId;
311
+ this.calculateOperationReward(operationId);
312
+ }
313
+ }
314
+ /**
315
+ * Execute individual technique
316
+ */
317
+ async executeTechnique(operationId, technique) {
318
+ console.log(`Executing technique: ${technique.name}`);
319
+ // Simulate technique execution
320
+ await new Promise(resolve => setTimeout(resolve, 1000));
321
+ // Update adaptive state
322
+ const adaptiveState = this.adaptiveStates.get(operationId);
323
+ if (adaptiveState) {
324
+ adaptiveState.techniquesDeployed.push(technique.id);
325
+ // Simulate potential detection events
326
+ if (Math.random() < 0.2) { // 20% chance of detection
327
+ adaptiveState.detectionEvents.push({
328
+ timestamp: new Date(),
329
+ techniqueId: technique.id,
330
+ detectionType: 'simulated',
331
+ confidence: 0.7,
332
+ impact: 'medium'
333
+ });
334
+ }
335
+ }
336
+ }
337
+ /**
338
+ * Calculate operation reward for RL training
339
+ */
340
+ calculateOperationReward(operationId) {
341
+ const operation = this.operations.get(operationId);
342
+ const adaptiveState = this.adaptiveStates.get(operationId);
343
+ }
344
+ }
345
+ //# sourceMappingURL=offensive-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offensive-engine.js","sourceRoot":"","sources":["../../../src/offensive/core/offensive-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuHH;;GAEG;AACH,MAAM,OAAO,eAAe;IAClB,UAAU,GAAoC,IAAI,GAAG,EAAE,CAAC;IACxD,cAAc,GAAwC,IAAI,GAAG,EAAE,CAAC;IAChE,iBAAiB,GAAoC,IAAI,GAAG,EAAE,CAAC;IAEvE;QACE,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,4BAA4B;QAC5B,IAAI,CAAC,iBAAiB,CAAC;YACrB,EAAE,EAAE,mBAAmB;YACvB,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,4BAA4B;YAClC,cAAc,EAAE;gBACd,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC;gBACzC,aAAa,EAAE,CAAC,eAAe,CAAC;gBAChC,aAAa,EAAE,SAAS;aACzB;YACD,gBAAgB,EAAE;gBAChB;oBACE,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,uCAAuC;oBACpD,UAAU,EAAE,QAAQ;oBACpB,UAAU,EAAE,wCAAwC;iBACrD;aACF;YACD,eAAe,EAAE;gBACf;oBACE,IAAI,EAAE,WAAW;oBACjB,WAAW,EAAE,4BAA4B;oBACzC,aAAa,EAAE,GAAG;iBACnB;aACF;YACD,oBAAoB,EAAE;gBACpB;oBACE,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,uBAAuB;oBACpC,QAAQ,EAAE,CAAC;iBACZ;aACF;SACF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AAS,CAAC,EAAE;oBACzB,aAAa,EAAE,WAAW;oBAC1B,UAAU,EAAE,GAAG;oBACf,MAAM,EAAE,QAAQ;iBACjB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACK,wBAAwB,CAAC,WAAmB;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAA,CAAA;IAAA,CAAC,AAAD;CAAA"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Offensive Operations Core Integration
3
+ *
4
+ * Integration of offensive capabilities into the Erosolar CLI core system
5
+ * enabling real APT operations with RL/AlphaZero adaptive capabilities.
6
+ */
7
+ import { type ToolSuite } from '../../core/toolRuntime.js';
8
+ /**
9
+ * Offensive Operations Integration Manager
10
+ */
11
+ export declare class OffensiveIntegration {
12
+ private offensiveTools;
13
+ constructor();
14
+ /**
15
+ * Get offensive operations tool suite for core integration
16
+ */
17
+ getOffensiveToolSuite(): ToolSuite;
18
+ /**
19
+ * Initialize offensive capabilities in the core system
20
+ */
21
+ initialize(): void;
22
+ /**
23
+ * Register offensive capabilities with the core system
24
+ */
25
+ private registerOffensiveCapabilities;
26
+ /**
27
+ * Get offensive operations status
28
+ */
29
+ getStatus(): object;
30
+ }
31
+ /**
32
+ * RL/AlphaZero Adaptive Operations Framework
33
+ */
34
+ export declare class AdaptiveOffensiveFramework {
35
+ private operationHistory;
36
+ private rewardModels;
37
+ constructor();
38
+ /**
39
+ * Initialize RL reward models for different operation types
40
+ */
41
+ private initializeRewardModels;
42
+ /**
43
+ * Calculate operation reward using RL approach
44
+ */
45
+ calculateOperationReward(operationData: any): number;
46
+ /**
47
+ * Select optimal techniques using AlphaZero-inspired approach
48
+ */
49
+ selectOptimalTechniques(availableTechniques: any[], operationContext: any): any[];
50
+ /**
51
+ * Simulate technique performance using simplified MCTS
52
+ */
53
+ private simulateTechniquePerformance;
54
+ /**
55
+ * Get historical performance data for technique
56
+ */
57
+ private getHistoricalPerformance;
58
+ /**
59
+ * Update learning model based on operation results
60
+ */
61
+ updateLearningModel(operationId: string, results: any): void;
62
+ /**
63
+ * Update technique performance data
64
+ */
65
+ private updateTechniquePerformance;
66
+ /**
67
+ * Update strategy patterns based on operation results
68
+ */
69
+ private updateStrategyPatterns;
70
+ /**
71
+ * Analyze successful patterns in operation
72
+ */
73
+ private analyzeSuccessfulPatterns;
74
+ /**
75
+ * Analyze failed patterns in operation
76
+ */
77
+ private analyzeFailedPatterns;
78
+ /**
79
+ * Update strategy database with learned patterns
80
+ */
81
+ private updateStrategyDatabase;
82
+ }
83
+ /**
84
+ * Global offensive operations manager
85
+ */
86
+ export declare class GlobalOffensiveManager {
87
+ private static instance;
88
+ private integration;
89
+ private adaptiveFramework;
90
+ private activeOperations;
91
+ private constructor();
92
+ /**
93
+ * Get singleton instance
94
+ */
95
+ static getInstance(): GlobalOffensiveManager;
96
+ /**
97
+ * Initialize global offensive capabilities
98
+ */
99
+ initialize(): void;
100
+ /**
101
+ * Get offensive tool suite for core integration
102
+ */
103
+ getToolSuite(): any;
104
+ /**
105
+ * Create new offensive operation with adaptive planning
106
+ */
107
+ createAdaptiveOperation(operationSpec: any): string;
108
+ /**
109
+ * Execute operation with RL-guided adaptation
110
+ */
111
+ executeAdaptiveOperation(operationId: string): Promise<any>;
112
+ /**
113
+ * Execute phase with adaptive decision making
114
+ */
115
+ private executeAdaptivePhase;
116
+ /**
117
+ * Execute technique with performance monitoring
118
+ */
119
+ private executeAdaptiveTechnique;
120
+ /**
121
+ * Generate unique operation ID
122
+ */
123
+ private generateOperationId;
124
+ /**
125
+ * Get offensive operations status
126
+ */
127
+ getStatus(): any;
128
+ }
129
+ //# sourceMappingURL=offensive-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offensive-integration.d.ts","sourceRoot":"","sources":["../../../src/offensive/core/off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