erosolar-cli 1.5.3 → 1.5.5

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 (385) hide show
  1. package/config/security-deployment.json +54 -0
  2. package/dist/active-stack-security.d.ts +110 -0
  3. package/dist/active-stack-security.js +313 -0
  4. package/dist/active-stack-security.js.map +1 -0
  5. package/dist/advanced-targeting.d.ts +113 -0
  6. package/dist/advanced-targeting.js +252 -0
  7. package/dist/advanced-targeting.js.map +1 -0
  8. package/dist/bin/adapters/node/index.js +33 -0
  9. package/dist/bin/adapters/types.js +1 -0
  10. package/dist/bin/alpha-zero/agentWrapper.js +165 -0
  11. package/dist/bin/alpha-zero/codeEvaluator.js +272 -0
  12. package/dist/bin/alpha-zero/competitiveRunner.js +219 -0
  13. package/dist/bin/alpha-zero/index.js +98 -0
  14. package/dist/bin/alpha-zero/introspection.js +298 -0
  15. package/dist/bin/alpha-zero/metricsTracker.js +207 -0
  16. package/dist/bin/alpha-zero/security/core.js +269 -0
  17. package/dist/bin/alpha-zero/security/google.js +308 -0
  18. package/dist/bin/alpha-zero/security/googleLoader.js +40 -0
  19. package/dist/bin/alpha-zero/security/index.js +31 -0
  20. package/dist/bin/alpha-zero/security/simulation.js +274 -0
  21. package/dist/bin/alpha-zero/selfModification.js +231 -0
  22. package/dist/bin/alpha-zero/types.js +30 -0
  23. package/dist/bin/bin/erosolar-optimized.js +205 -0
  24. package/dist/bin/capabilities/agentSpawningCapability.js +116 -0
  25. package/dist/bin/capabilities/bashCapability.js +22 -0
  26. package/dist/bin/capabilities/cloudCapability.js +36 -0
  27. package/dist/bin/capabilities/codeAnalysisCapability.js +22 -0
  28. package/dist/bin/capabilities/codeQualityCapability.js +23 -0
  29. package/dist/bin/capabilities/dependencySecurityCapability.js +22 -0
  30. package/dist/bin/capabilities/devCapability.js +22 -0
  31. package/dist/bin/capabilities/editCapability.js +28 -0
  32. package/dist/bin/capabilities/emailCapability.js +20 -0
  33. package/dist/bin/capabilities/enhancedGitCapability.js +221 -0
  34. package/dist/bin/capabilities/filesystemCapability.js +22 -0
  35. package/dist/bin/capabilities/globCapability.js +28 -0
  36. package/dist/bin/capabilities/interactionCapability.js +20 -0
  37. package/dist/bin/capabilities/learnCapability.js +22 -0
  38. package/dist/bin/capabilities/mcpCapability.js +20 -0
  39. package/dist/bin/capabilities/notebookCapability.js +28 -0
  40. package/dist/bin/capabilities/planningCapability.js +27 -0
  41. package/dist/bin/capabilities/refactoringCapability.js +23 -0
  42. package/dist/bin/capabilities/repoChecksCapability.js +22 -0
  43. package/dist/bin/capabilities/searchCapability.js +22 -0
  44. package/dist/bin/capabilities/skillCapability.js +76 -0
  45. package/dist/bin/capabilities/taskManagementCapability.js +20 -0
  46. package/dist/bin/capabilities/testingCapability.js +23 -0
  47. package/dist/bin/capabilities/toolManifest.js +159 -0
  48. package/dist/bin/capabilities/toolRegistry.js +114 -0
  49. package/dist/bin/capabilities/webCapability.js +20 -0
  50. package/dist/bin/config.js +139 -0
  51. package/dist/bin/contracts/v1/agent.js +7 -0
  52. package/dist/bin/contracts/v1/agentProfileManifest.js +8 -0
  53. package/dist/bin/contracts/v1/agentRules.js +9 -0
  54. package/dist/bin/contracts/v1/toolAccess.js +8 -0
  55. package/dist/bin/core/agent.js +362 -0
  56. package/dist/bin/core/agentProfileManifest.js +187 -0
  57. package/dist/bin/core/agentProfiles.js +34 -0
  58. package/dist/bin/core/agentRulebook.js +135 -0
  59. package/dist/bin/core/agentSchemaLoader.js +233 -0
  60. package/dist/bin/core/contextManager.js +412 -0
  61. package/dist/bin/core/contextWindow.js +122 -0
  62. package/dist/bin/core/customCommands.js +80 -0
  63. package/dist/bin/core/errors/apiKeyErrors.js +114 -0
  64. package/dist/bin/core/errors/errorTypes.js +340 -0
  65. package/dist/bin/core/errors/safetyValidator.js +304 -0
  66. package/dist/bin/core/errors.js +32 -0
  67. package/dist/bin/core/modelDiscovery.js +755 -0
  68. package/dist/bin/core/preferences.js +224 -0
  69. package/dist/bin/core/schemaValidator.js +92 -0
  70. package/dist/bin/core/secretStore.js +199 -0
  71. package/dist/bin/core/sessionStore.js +187 -0
  72. package/dist/bin/core/toolRuntime.js +290 -0
  73. package/dist/bin/core/types.js +1 -0
  74. package/dist/bin/erosolar-optimized.d.ts +12 -0
  75. package/dist/bin/erosolar-optimized.d.ts.map +1 -0
  76. package/dist/bin/erosolar-optimized.js +239 -0
  77. package/dist/bin/erosolar-optimized.js.map +1 -0
  78. package/dist/bin/erosolar.js +14 -0
  79. package/dist/bin/erosolar.js.map +1 -1
  80. package/dist/bin/headless/headlessApp.js +172 -0
  81. package/dist/bin/mcp/config.js +202 -0
  82. package/dist/bin/mcp/stdioClient.js +172 -0
  83. package/dist/bin/mcp/toolBridge.js +104 -0
  84. package/dist/bin/mcp/types.js +1 -0
  85. package/dist/bin/plugins/index.js +113 -0
  86. package/dist/bin/plugins/providers/anthropic/index.js +25 -0
  87. package/dist/bin/plugins/providers/deepseek/index.js +24 -0
  88. package/dist/bin/plugins/providers/google/index.js +26 -0
  89. package/dist/bin/plugins/providers/index.js +19 -0
  90. package/dist/bin/plugins/providers/ollama/index.js +59 -0
  91. package/dist/bin/plugins/providers/openai/index.js +26 -0
  92. package/dist/bin/plugins/providers/xai/index.js +24 -0
  93. package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +8 -0
  94. package/dist/bin/plugins/tools/bash/localBashPlugin.js +13 -0
  95. package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +13 -0
  96. package/dist/bin/plugins/tools/cloud/cloudPlugin.js +13 -0
  97. package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +13 -0
  98. package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +13 -0
  99. package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +11 -0
  100. package/dist/bin/plugins/tools/development/devPlugin.js +13 -0
  101. package/dist/bin/plugins/tools/edit/editPlugin.js +14 -0
  102. package/dist/bin/plugins/tools/email/emailPlugin.js +11 -0
  103. package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +8 -0
  104. package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +13 -0
  105. package/dist/bin/plugins/tools/glob/globPlugin.js +14 -0
  106. package/dist/bin/plugins/tools/index.js +2 -0
  107. package/dist/bin/plugins/tools/interaction/interactionPlugin.js +11 -0
  108. package/dist/bin/plugins/tools/learn/learnPlugin.js +13 -0
  109. package/dist/bin/plugins/tools/mcp/mcpPlugin.js +8 -0
  110. package/dist/bin/plugins/tools/nodeDefaults.js +56 -0
  111. package/dist/bin/plugins/tools/notebook/notebookPlugin.js +14 -0
  112. package/dist/bin/plugins/tools/planning/planningPlugin.js +14 -0
  113. package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +11 -0
  114. package/dist/bin/plugins/tools/registry.js +57 -0
  115. package/dist/bin/plugins/tools/search/localSearchPlugin.js +13 -0
  116. package/dist/bin/plugins/tools/skills/skillPlugin.js +8 -0
  117. package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +11 -0
  118. package/dist/bin/plugins/tools/testing/testingPlugin.js +11 -0
  119. package/dist/bin/plugins/tools/web/webPlugin.js +11 -0
  120. package/dist/bin/providers/anthropicProvider.js +329 -0
  121. package/dist/bin/providers/googleProvider.js +203 -0
  122. package/dist/bin/providers/openaiChatCompletionsProvider.js +208 -0
  123. package/dist/bin/providers/openaiResponsesProvider.js +249 -0
  124. package/dist/bin/providers/providerFactory.js +24 -0
  125. package/dist/bin/runtime/agentController.js +321 -0
  126. package/dist/bin/runtime/agentHost.js +153 -0
  127. package/dist/bin/runtime/agentSession.js +195 -0
  128. package/dist/bin/runtime/node.js +10 -0
  129. package/dist/bin/runtime/universal.js +28 -0
  130. package/dist/bin/shell/bracketedPasteManager.js +350 -0
  131. package/dist/bin/shell/fileChangeTracker.js +65 -0
  132. package/dist/bin/shell/interactiveShell.js +2908 -0
  133. package/dist/bin/shell/liveStatus.js +78 -0
  134. package/dist/bin/shell/shellApp.js +290 -0
  135. package/dist/bin/shell/systemPrompt.js +60 -0
  136. package/dist/bin/shell/updateManager.js +108 -0
  137. package/dist/bin/skills/skillRepository.js +236 -0
  138. package/dist/bin/skills/types.js +1 -0
  139. package/dist/bin/subagents/taskRunner.js +269 -0
  140. package/dist/bin/tools/backgroundBashTools.js +211 -0
  141. package/dist/bin/tools/bashTools.js +159 -0
  142. package/dist/bin/tools/cloudTools.js +864 -0
  143. package/dist/bin/tools/codeAnalysisTools.js +641 -0
  144. package/dist/bin/tools/codeQualityTools.js +294 -0
  145. package/dist/bin/tools/dependencyTools.js +282 -0
  146. package/dist/bin/tools/devTools.js +238 -0
  147. package/dist/bin/tools/diffUtils.js +137 -0
  148. package/dist/bin/tools/editTools.js +134 -0
  149. package/dist/bin/tools/emailTools.js +448 -0
  150. package/dist/bin/tools/fileTools.js +282 -0
  151. package/dist/bin/tools/globTools.js +173 -0
  152. package/dist/bin/tools/grepTools.js +332 -0
  153. package/dist/bin/tools/interactionTools.js +170 -0
  154. package/dist/bin/tools/learnTools.js +1818 -0
  155. package/dist/bin/tools/notebookEditTools.js +196 -0
  156. package/dist/bin/tools/planningTools.js +46 -0
  157. package/dist/bin/tools/refactoringTools.js +293 -0
  158. package/dist/bin/tools/repoChecksTools.js +160 -0
  159. package/dist/bin/tools/searchTools.js +206 -0
  160. package/dist/bin/tools/skillTools.js +177 -0
  161. package/dist/bin/tools/taskManagementTools.js +156 -0
  162. package/dist/bin/tools/testingTools.js +232 -0
  163. package/dist/bin/tools/webTools.js +480 -0
  164. package/dist/bin/ui/ShellUIAdapter.js +459 -0
  165. package/dist/bin/ui/UnifiedUIController.js +183 -0
  166. package/dist/bin/ui/animation/AnimationScheduler.js +430 -0
  167. package/dist/bin/ui/codeHighlighter.js +854 -0
  168. package/dist/bin/ui/designSystem.js +121 -0
  169. package/dist/bin/ui/display.js +1222 -0
  170. package/dist/bin/ui/interrupts/InterruptManager.js +437 -0
  171. package/dist/bin/ui/layout.js +139 -0
  172. package/dist/bin/ui/orchestration/StatusOrchestrator.js +403 -0
  173. package/dist/bin/ui/outputMode.js +38 -0
  174. package/dist/bin/ui/persistentPrompt.js +183 -0
  175. package/dist/bin/ui/richText.js +338 -0
  176. package/dist/bin/ui/shortcutsHelp.js +87 -0
  177. package/dist/bin/ui/telemetry/UITelemetry.js +443 -0
  178. package/dist/bin/ui/textHighlighter.js +210 -0
  179. package/dist/bin/ui/theme.js +116 -0
  180. package/dist/bin/ui/toolDisplay.js +423 -0
  181. package/dist/bin/ui/toolDisplayAdapter.js +357 -0
  182. package/dist/bin/workspace.js +106 -0
  183. package/dist/bin/workspace.validator.js +213 -0
  184. package/dist/capabilities/offensiveSecurityCapability.d.ts +26 -0
  185. package/dist/capabilities/offensiveSecurityCapability.d.ts.map +1 -0
  186. package/dist/capabilities/offensiveSecurityCapability.js +58 -0
  187. package/dist/capabilities/offensiveSecurityCapability.js.map +1 -0
  188. package/dist/capabilities/realSecurityCapability.d.ts +26 -0
  189. package/dist/capabilities/realSecurityCapability.d.ts.map +1 -0
  190. package/dist/capabilities/realSecurityCapability.js +53 -0
  191. package/dist/capabilities/realSecurityCapability.js.map +1 -0
  192. package/dist/capabilities/securityCapability.d.ts +32 -0
  193. package/dist/capabilities/securityCapability.d.ts.map +1 -0
  194. package/dist/capabilities/securityCapability.js +57 -0
  195. package/dist/capabilities/securityCapability.js.map +1 -0
  196. package/dist/capabilities/ultimateSecurityCapability.d.ts +42 -0
  197. package/dist/capabilities/ultimateSecurityCapability.d.ts.map +1 -0
  198. package/dist/capabilities/ultimateSecurityCapability.js +96 -0
  199. package/dist/capabilities/ultimateSecurityCapability.js.map +1 -0
  200. package/dist/core/LazyLoader.d.ts +129 -0
  201. package/dist/core/LazyLoader.d.ts.map +1 -0
  202. package/dist/core/LazyLoader.js +240 -0
  203. package/dist/core/LazyLoader.js.map +1 -0
  204. package/dist/core/agent.d.ts.map +1 -1
  205. package/dist/core/agent.js +78 -8
  206. package/dist/core/agent.js.map +1 -1
  207. package/dist/core/contextManager.d.ts.map +1 -1
  208. package/dist/core/contextManager.js +117 -16
  209. package/dist/core/contextManager.js.map +1 -1
  210. package/dist/core/intelligenceTools.d.ts +19 -0
  211. package/dist/core/intelligenceTools.d.ts.map +1 -0
  212. package/dist/core/intelligenceTools.js +453 -0
  213. package/dist/core/intelligenceTools.js.map +1 -0
  214. package/dist/core/operationalTools.d.ts +19 -0
  215. package/dist/core/operationalTools.d.ts.map +1 -0
  216. package/dist/core/operationalTools.js +467 -0
  217. package/dist/core/operationalTools.js.map +1 -0
  218. package/dist/intelligence/codeIntelligence.d.ts.map +1 -1
  219. package/dist/intelligence/codeIntelligence.js +12 -0
  220. package/dist/intelligence/codeIntelligence.js.map +1 -1
  221. package/dist/offensive/core/offensive-engine.d.ts +171 -0
  222. package/dist/offensive/core/offensive-engine.d.ts.map +1 -0
  223. package/dist/offensive/core/offensive-engine.js +345 -0
  224. package/dist/offensive/core/offensive-engine.js.map +1 -0
  225. package/dist/offensive/core/offensive-integration.d.ts +129 -0
  226. package/dist/offensive/core/offensive-integration.d.ts.map +1 -0
  227. package/dist/offensive/core/offensive-integration.js +364 -0
  228. package/dist/offensive/core/offensive-integration.js.map +1 -0
  229. package/dist/offensive/core/offensive-tools.d.ts +55 -0
  230. package/dist/offensive/core/offensive-tools.d.ts.map +1 -0
  231. package/dist/offensive/core/offensive-tools.js +438 -0
  232. package/dist/offensive/core/offensive-tools.js.map +1 -0
  233. package/dist/offensive/offensive-cli.d.ts +48 -0
  234. package/dist/offensive/offensive-cli.d.ts.map +1 -0
  235. package/dist/offensive/offensive-cli.js +233 -0
  236. package/dist/offensive/offensive-cli.js.map +1 -0
  237. package/dist/plugins/index.d.ts +1 -1
  238. package/dist/plugins/index.d.ts.map +1 -1
  239. package/dist/plugins/index.js +2 -0
  240. package/dist/plugins/index.js.map +1 -1
  241. package/dist/security/active-stack-security.d.ts +112 -0
  242. package/dist/security/active-stack-security.d.ts.map +1 -0
  243. package/dist/security/active-stack-security.js +296 -0
  244. package/dist/security/active-stack-security.js.map +1 -0
  245. package/dist/security/advanced-persistence-research.d.ts +92 -0
  246. package/dist/security/advanced-persistence-research.d.ts.map +1 -0
  247. package/dist/security/advanced-persistence-research.js +195 -0
  248. package/dist/security/advanced-persistence-research.js.map +1 -0
  249. package/dist/security/advanced-targeting.d.ts +119 -0
  250. package/dist/security/advanced-targeting.d.ts.map +1 -0
  251. package/dist/security/advanced-targeting.js +233 -0
  252. package/dist/security/advanced-targeting.js.map +1 -0
  253. package/dist/security/apt-simulation-cli.d.ts +57 -0
  254. package/dist/security/apt-simulation-cli.d.ts.map +1 -0
  255. package/dist/security/apt-simulation-cli.js +278 -0
  256. package/dist/security/apt-simulation-cli.js.map +1 -0
  257. package/dist/security/apt-simulation-engine-complete.d.ts +97 -0
  258. package/dist/security/apt-simulation-engine-complete.d.ts.map +1 -0
  259. package/dist/security/apt-simulation-engine-complete.js +441 -0
  260. package/dist/security/apt-simulation-engine-complete.js.map +1 -0
  261. package/dist/security/apt-simulation-engine.d.ts +97 -0
  262. package/dist/security/apt-simulation-engine.d.ts.map +1 -0
  263. package/dist/security/apt-simulation-engine.js +441 -0
  264. package/dist/security/apt-simulation-engine.js.map +1 -0
  265. package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
  266. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
  267. package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
  268. package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
  269. package/dist/security/authorization/securityAuthorization.d.ts +88 -0
  270. package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
  271. package/dist/security/authorization/securityAuthorization.js +172 -0
  272. package/dist/security/authorization/securityAuthorization.js.map +1 -0
  273. package/dist/security/authorization.d.ts +45 -0
  274. package/dist/security/authorization.d.ts.map +1 -0
  275. package/dist/security/authorization.js +128 -0
  276. package/dist/security/authorization.js.map +1 -0
  277. package/dist/security/comprehensive-security-research.d.ts +84 -0
  278. package/dist/security/comprehensive-security-research.d.ts.map +1 -0
  279. package/dist/security/comprehensive-security-research.js +211 -0
  280. package/dist/security/comprehensive-security-research.js.map +1 -0
  281. package/dist/security/comprehensive-targeting.d.ts +85 -0
  282. package/dist/security/comprehensive-targeting.d.ts.map +1 -0
  283. package/dist/security/comprehensive-targeting.js +438 -0
  284. package/dist/security/comprehensive-targeting.js.map +1 -0
  285. package/dist/security/global-security-integration.d.ts +91 -0
  286. package/dist/security/global-security-integration.d.ts.map +1 -0
  287. package/dist/security/global-security-integration.js +218 -0
  288. package/dist/security/global-security-integration.js.map +1 -0
  289. package/dist/security/index.d.ts +38 -0
  290. package/dist/security/index.d.ts.map +1 -0
  291. package/dist/security/index.js +47 -0
  292. package/dist/security/index.js.map +1 -0
  293. package/dist/security/offensive/exploitationEngine.d.ts +54 -0
  294. package/dist/security/offensive/exploitationEngine.d.ts.map +1 -0
  295. package/dist/security/offensive/exploitationEngine.js +263 -0
  296. package/dist/security/offensive/exploitationEngine.js.map +1 -0
  297. package/dist/security/persistence-cli.d.ts +36 -0
  298. package/dist/security/persistence-cli.d.ts.map +1 -0
  299. package/dist/security/persistence-cli.js +160 -0
  300. package/dist/security/persistence-cli.js.map +1 -0
  301. package/dist/security/persistence-research.d.ts +11 -0
  302. package/dist/security/persistence-research.d.ts.map +1 -1
  303. package/dist/security/persistence-research.js +11 -0
  304. package/dist/security/persistence-research.js.map +1 -1
  305. package/dist/security/real/networkExploitation.d.ts +92 -0
  306. package/dist/security/real/networkExploitation.d.ts.map +1 -0
  307. package/dist/security/real/networkExploitation.js +316 -0
  308. package/dist/security/real/networkExploitation.js.map +1 -0
  309. package/dist/security/real/persistenceImplementation.d.ts +62 -0
  310. package/dist/security/real/persistenceImplementation.d.ts.map +1 -0
  311. package/dist/security/real/persistenceImplementation.js +323 -0
  312. package/dist/security/real/persistenceImplementation.js.map +1 -0
  313. package/dist/security/real/vulnerabilityScanner.d.ts +73 -0
  314. package/dist/security/real/vulnerabilityScanner.d.ts.map +1 -0
  315. package/dist/security/real/vulnerabilityScanner.js +341 -0
  316. package/dist/security/real/vulnerabilityScanner.js.map +1 -0
  317. package/dist/security/research/persistenceResearch.d.ts +97 -0
  318. package/dist/security/research/persistenceResearch.d.ts.map +1 -0
  319. package/dist/security/research/persistenceResearch.js +282 -0
  320. package/dist/security/research/persistenceResearch.js.map +1 -0
  321. package/dist/security/security-integration.d.ts +74 -0
  322. package/dist/security/security-integration.d.ts.map +1 -0
  323. package/dist/security/security-integration.js +137 -0
  324. package/dist/security/security-integration.js.map +1 -0
  325. package/dist/security/security-testing-framework.d.ts +120 -0
  326. package/dist/security/security-testing-framework.d.ts.map +1 -0
  327. package/dist/security/security-testing-framework.js +372 -0
  328. package/dist/security/security-testing-framework.js.map +1 -0
  329. package/dist/security/simulation/attackSimulation.d.ts +93 -0
  330. package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
  331. package/dist/security/simulation/attackSimulation.js +341 -0
  332. package/dist/security/simulation/attackSimulation.js.map +1 -0
  333. package/dist/security/strategic-operations.d.ts +100 -0
  334. package/dist/security/strategic-operations.d.ts.map +1 -0
  335. package/dist/security/strategic-operations.js +276 -0
  336. package/dist/security/strategic-operations.js.map +1 -0
  337. package/dist/security/tool-security-wrapper.d.ts +58 -0
  338. package/dist/security/tool-security-wrapper.d.ts.map +1 -0
  339. package/dist/security/tool-security-wrapper.js +156 -0
  340. package/dist/security/tool-security-wrapper.js.map +1 -0
  341. package/dist/shell/bracketedPasteManager.d.ts +33 -0
  342. package/dist/shell/bracketedPasteManager.d.ts.map +1 -1
  343. package/dist/shell/bracketedPasteManager.js +101 -0
  344. package/dist/shell/bracketedPasteManager.js.map +1 -1
  345. package/dist/shell/interactiveShell.d.ts +22 -1
  346. package/dist/shell/interactiveShell.d.ts.map +1 -1
  347. package/dist/shell/interactiveShell.js +257 -24
  348. package/dist/shell/interactiveShell.js.map +1 -1
  349. package/dist/shell/taskCompletionDetector.d.ts +101 -0
  350. package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
  351. package/dist/shell/taskCompletionDetector.js +343 -0
  352. package/dist/shell/taskCompletionDetector.js.map +1 -0
  353. package/dist/tools/cloudTools.d.ts +11 -0
  354. package/dist/tools/cloudTools.d.ts.map +1 -1
  355. package/dist/tools/cloudTools.js +11 -0
  356. package/dist/tools/cloudTools.js.map +1 -1
  357. package/dist/tools/codeAnalysisTools.d.ts.map +1 -1
  358. package/dist/tools/codeAnalysisTools.js +23 -1
  359. package/dist/tools/codeAnalysisTools.js.map +1 -1
  360. package/dist/tools/enhancedSecurityTools.d.ts +19 -0
  361. package/dist/tools/enhancedSecurityTools.d.ts.map +1 -0
  362. package/dist/tools/enhancedSecurityTools.js +215 -0
  363. package/dist/tools/enhancedSecurityTools.js.map +1 -0
  364. package/dist/tools/fileTools.d.ts.map +1 -1
  365. package/dist/tools/fileTools.js +7 -0
  366. package/dist/tools/fileTools.js.map +1 -1
  367. package/dist/tools/grepTools.d.ts.map +1 -1
  368. package/dist/tools/grepTools.js +6 -0
  369. package/dist/tools/grepTools.js.map +1 -1
  370. package/dist/tools/offensiveSecurityTools.d.ts +16 -0
  371. package/dist/tools/offensiveSecurityTools.d.ts.map +1 -0
  372. package/dist/tools/offensiveSecurityTools.js +285 -0
  373. package/dist/tools/offensiveSecurityTools.js.map +1 -0
  374. package/dist/tools/realSecurityTools.d.ts +18 -0
  375. package/dist/tools/realSecurityTools.d.ts.map +1 -0
  376. package/dist/tools/realSecurityTools.js +468 -0
  377. package/dist/tools/realSecurityTools.js.map +1 -0
  378. package/dist/tools/securityTools.d.ts +20 -0
  379. package/dist/tools/securityTools.d.ts.map +1 -0
  380. package/dist/tools/securityTools.js +449 -0
  381. package/dist/tools/securityTools.js.map +1 -0
  382. package/dist/tools/webTools.js +9 -0
  383. package/dist/tools/webTools.js.map +1 -1
  384. package/package.json +26 -11
  385. package/scripts/deploy-security-capabilities.js +178 -0
@@ -0,0 +1,372 @@
1
+ /**
2
+ * Security Testing Framework
3
+ *
4
+ * Comprehensive framework for security testing and validation
5
+ * Integrated with the Erosolar CLI ecosystem.
6
+ *
7
+ * @license MIT
8
+ * @author Bo Shang
9
+ *
10
+ * DISCLAIMER: This software is provided for both defensive and offensive security
11
+ * purposes and is open source (available via npm and GitHub) to anyone globally.
12
+ * The creator, Bo Shang, does not solicit or endorse unauthorized attacks.
13
+ * This tool is released with the belief that providing technological freedom
14
+ * globally is the right thing to do. Users are solely responsible for ensuring
15
+ * their use complies with applicable laws and regulations in their jurisdiction.
16
+ * Use responsibly and ethically.
17
+ */
18
+ import { PersistenceResearchToolkit } from './persistence-research.js';
19
+ /**
20
+ * Security Testing Framework Class
21
+ */
22
+ export class SecurityTestingFramework {
23
+ _persistenceToolkit;
24
+ securityTests;
25
+ constructor() {
26
+ this._persistenceToolkit = new PersistenceResearchToolkit();
27
+ this.securityTests = this.initializeSecurityTests();
28
+ }
29
+ /**
30
+ * Get the persistence research toolkit for advanced security analysis
31
+ */
32
+ get persistenceToolkit() {
33
+ return this._persistenceToolkit;
34
+ }
35
+ /**
36
+ * Initialize security tests based on persistence techniques
37
+ */
38
+ initializeSecurityTests() {
39
+ const tests = [];
40
+ // Windows Persistence Tests
41
+ tests.push({
42
+ id: 'test-win-registry-persistence',
43
+ name: 'Windows Registry Persistence Detection',
44
+ category: 'persistence',
45
+ platform: ['windows'],
46
+ description: 'Test detection of registry-based persistence mechanisms',
47
+ testSteps: [
48
+ 'Check HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
49
+ 'Check HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
50
+ 'Verify registry monitoring is enabled',
51
+ 'Test detection of new registry entries'
52
+ ],
53
+ expectedResults: [
54
+ 'Registry monitoring detects new entries',
55
+ 'Suspicious entries are flagged',
56
+ 'Automated response is triggered'
57
+ ],
58
+ riskLevel: 'high',
59
+ mitreId: 'T1547.001'
60
+ });
61
+ tests.push({
62
+ id: 'test-win-scheduled-tasks',
63
+ name: 'Windows Scheduled Tasks Detection',
64
+ category: 'persistence',
65
+ platform: ['windows'],
66
+ description: 'Test detection of scheduled task-based persistence',
67
+ testSteps: [
68
+ 'List all scheduled tasks using schtasks',
69
+ 'Check for tasks with SYSTEM privileges',
70
+ 'Monitor Task Scheduler events',
71
+ 'Test detection of new scheduled tasks'
72
+ ],
73
+ expectedResults: [
74
+ 'New scheduled tasks are detected',
75
+ 'Tasks with suspicious actions are flagged',
76
+ 'Automated response is triggered'
77
+ ],
78
+ riskLevel: 'high',
79
+ mitreId: 'T1053.005'
80
+ });
81
+ // Linux Persistence Tests
82
+ tests.push({
83
+ id: 'test-linux-cron-persistence',
84
+ name: 'Linux Cron Job Persistence Detection',
85
+ category: 'persistence',
86
+ platform: ['linux'],
87
+ description: 'Test detection of cron-based persistence mechanisms',
88
+ testSteps: [
89
+ 'Check /var/spool/cron/crontabs/',
90
+ 'Review /etc/crontab and /etc/cron.d/*',
91
+ 'Monitor cron job creation events',
92
+ 'Test detection of new cron entries'
93
+ ],
94
+ expectedResults: [
95
+ 'New cron jobs are detected',
96
+ 'Suspicious cron commands are flagged',
97
+ 'Automated response is triggered'
98
+ ],
99
+ riskLevel: 'high',
100
+ mitreId: 'T1053.003'
101
+ });
102
+ tests.push({
103
+ id: 'test-linux-systemd-persistence',
104
+ name: 'Linux Systemd Service Persistence Detection',
105
+ category: 'persistence',
106
+ platform: ['linux'],
107
+ description: 'Test detection of systemd service-based persistence',
108
+ testSteps: [
109
+ 'Check /etc/systemd/system/ directory',
110
+ 'List all systemd services',
111
+ 'Monitor service unit file creation',
112
+ 'Test detection of new systemd services'
113
+ ],
114
+ expectedResults: [
115
+ 'New systemd services are detected',
116
+ 'Services with suspicious commands are flagged',
117
+ 'Automated response is triggered'
118
+ ],
119
+ riskLevel: 'high',
120
+ mitreId: 'T1543.002'
121
+ });
122
+ // Cross-platform Tests
123
+ tests.push({
124
+ id: 'test-ssh-key-persistence',
125
+ name: 'SSH Authorized Keys Persistence Detection',
126
+ category: 'persistence',
127
+ platform: ['linux', 'macos'],
128
+ description: 'Test detection of SSH key-based persistence',
129
+ testSteps: [
130
+ 'Check ~/.ssh/authorized_keys files',
131
+ 'Monitor SSH key additions',
132
+ 'Verify SSH key validation',
133
+ 'Test detection of unauthorized keys'
134
+ ],
135
+ expectedResults: [
136
+ 'Unauthorized SSH keys are detected',
137
+ 'Key additions are logged and monitored',
138
+ 'Automated response is triggered'
139
+ ],
140
+ riskLevel: 'high',
141
+ mitreId: 'T1098.004'
142
+ });
143
+ return tests;
144
+ }
145
+ /**
146
+ * Get security tests by platform
147
+ */
148
+ getTestsByPlatform(platform) {
149
+ return this.securityTests.filter(test => test.platform.includes(platform) || test.platform.includes('cross-platform'));
150
+ }
151
+ /**
152
+ * Get security tests by category
153
+ */
154
+ getTestsByCategory(category) {
155
+ return this.securityTests.filter(test => test.category === category);
156
+ }
157
+ /**
158
+ * Execute a specific security test
159
+ */
160
+ async executeTest(testId, platform) {
161
+ const test = this.securityTests.find(t => t.id === testId);
162
+ if (!test) {
163
+ throw new Error(`Test not found: ${testId}`);
164
+ }
165
+ if (!test.platform.includes(platform) && !test.platform.includes('cross-platform')) {
166
+ return {
167
+ testId,
168
+ status: 'skipped',
169
+ executionTime: 0,
170
+ output: `Test skipped: Platform ${platform} not supported`
171
+ };
172
+ }
173
+ const startTime = Date.now();
174
+ try {
175
+ // Simulate test execution (in a real implementation, this would execute actual commands)
176
+ const output = await this.simulateTestExecution(test, platform);
177
+ const executionTime = Date.now() - startTime;
178
+ return {
179
+ testId,
180
+ status: 'passed',
181
+ executionTime,
182
+ output,
183
+ evidence: `Simulated evidence for ${testId}`,
184
+ recommendations: ['Implement automated monitoring', 'Review security controls']
185
+ };
186
+ }
187
+ catch (error) {
188
+ const executionTime = Date.now() - startTime;
189
+ return {
190
+ testId,
191
+ status: 'error',
192
+ executionTime,
193
+ output: `Test execution failed: ${error}`,
194
+ recommendations: ['Review test configuration', 'Check system permissions']
195
+ };
196
+ }
197
+ }
198
+ /**
199
+ * Execute multiple security tests
200
+ */
201
+ async executeTestSuite(testIds, platform) {
202
+ const results = [];
203
+ const systemInfo = await this.getSystemInfo(platform);
204
+ for (const testId of testIds) {
205
+ const result = await this.executeTest(testId, platform);
206
+ results.push(result);
207
+ }
208
+ const testsPassed = results.filter(r => r.status === 'passed').length;
209
+ const testsFailed = results.filter(r => r.status === 'failed').length;
210
+ const riskScore = this.calculateRiskScore(results);
211
+ return {
212
+ timestamp: new Date(),
213
+ systemInfo,
214
+ testsExecuted: results.length,
215
+ testsPassed,
216
+ testsFailed,
217
+ riskScore,
218
+ results,
219
+ summary: this.generateSummary(results)
220
+ };
221
+ }
222
+ /**
223
+ * Generate test report in various formats
224
+ */
225
+ generateTestReport(assessment, format) {
226
+ switch (format) {
227
+ case 'json':
228
+ return JSON.stringify(assessment, null, 2);
229
+ case 'html':
230
+ return this.generateHTMLReport(assessment);
231
+ default:
232
+ return this.generateTextReport(assessment);
233
+ }
234
+ }
235
+ /**
236
+ * Generate remediation guidance based on test results
237
+ */
238
+ generateRemediationGuidance(results) {
239
+ const guidance = [];
240
+ results.forEach(result => {
241
+ if (result.status !== 'passed' && result.recommendations) {
242
+ guidance.push(`Test: ${result.testId}`);
243
+ guidance.push(`Status: ${result.status}`);
244
+ guidance.push('Recommendations:');
245
+ result.recommendations.forEach(rec => {
246
+ guidance.push(` - ${rec}`);
247
+ });
248
+ guidance.push('');
249
+ }
250
+ });
251
+ return guidance;
252
+ }
253
+ /**
254
+ * Simulate test execution (placeholder for actual implementation)
255
+ */
256
+ async simulateTestExecution(test, platform) {
257
+ // Simulate test execution delay
258
+ await new Promise(resolve => setTimeout(resolve, 1000 + Math.random() * 2000));
259
+ return `Simulated execution of ${test.name} on ${platform}\n` +
260
+ `Test Steps: ${test.testSteps.join(', ')}\n` +
261
+ `Expected Results: ${test.expectedResults.join(', ')}\n` +
262
+ `Risk Level: ${test.riskLevel}`;
263
+ }
264
+ /**
265
+ * Get system information (placeholder for actual implementation)
266
+ */
267
+ async getSystemInfo(platform) {
268
+ return {
269
+ platform,
270
+ architecture: 'x64',
271
+ version: 'simulated',
272
+ user: 'test-user',
273
+ privileges: ['user']
274
+ };
275
+ }
276
+ /**
277
+ * Calculate risk score based on test results
278
+ */
279
+ calculateRiskScore(results) {
280
+ const failedTests = results.filter(r => r.status === 'failed');
281
+ const totalTests = results.length;
282
+ if (totalTests === 0)
283
+ return 0;
284
+ return Math.round((failedTests.length / totalTests) * 100);
285
+ }
286
+ /**
287
+ * Generate summary of test results
288
+ */
289
+ generateSummary(results) {
290
+ const passed = results.filter(r => r.status === 'passed').length;
291
+ const failed = results.filter(r => r.status === 'failed').length;
292
+ const skipped = results.filter(r => r.status === 'skipped').length;
293
+ const errors = results.filter(r => r.status === 'error').length;
294
+ return `Security Assessment Summary:\n` +
295
+ ` Passed: ${passed}\n` +
296
+ ` Failed: ${failed}\n` +
297
+ ` Skipped: ${skipped}\n` +
298
+ ` Errors: ${errors}\n` +
299
+ ` Total: ${results.length}`;
300
+ }
301
+ /**
302
+ * Generate text report
303
+ */
304
+ generateTextReport(assessment) {
305
+ const report = [];
306
+ report.push('SECURITY ASSESSMENT REPORT');
307
+ report.push('='.repeat(50));
308
+ report.push(`Timestamp: ${assessment.timestamp.toISOString()}`);
309
+ report.push(`Platform: ${assessment.systemInfo.platform}`);
310
+ report.push(`Risk Score: ${assessment.riskScore}%`);
311
+ report.push('');
312
+ report.push('TEST RESULTS:');
313
+ report.push('-'.repeat(30));
314
+ assessment.results.forEach(result => {
315
+ report.push(`Test: ${result.testId}`);
316
+ report.push(` Status: ${result.status}`);
317
+ report.push(` Execution Time: ${result.executionTime}ms`);
318
+ if (result.output) {
319
+ report.push(` Output: ${result.output.split('\n')[0]}...`);
320
+ }
321
+ report.push('');
322
+ });
323
+ report.push('SUMMARY:');
324
+ report.push('-'.repeat(30));
325
+ report.push(assessment.summary);
326
+ return report.join('\n');
327
+ }
328
+ /**
329
+ * Generate HTML report
330
+ */
331
+ generateHTMLReport(assessment) {
332
+ return `
333
+ <!DOCTYPE html>
334
+ <html>
335
+ <head>
336
+ <title>Security Assessment Report</title>
337
+ <style>
338
+ body { font-family: Arial, sans-serif; margin: 20px; }
339
+ .header { background: #f0f0f0; padding: 20px; border-radius: 5px; }
340
+ .test-result { margin: 10px 0; padding: 10px; border-left: 4px solid #ccc; }
341
+ .passed { border-color: green; background: #f0fff0; }
342
+ .failed { border-color: red; background: #fff0f0; }
343
+ .summary { background: #e0e0e0; padding: 15px; border-radius: 5px; }
344
+ </style>
345
+ </head>
346
+ <body>
347
+ <div class="header">
348
+ <h1>Security Assessment Report</h1>
349
+ <p><strong>Timestamp:</strong> ${assessment.timestamp.toISOString()}</p>
350
+ <p><strong>Platform:</strong> ${assessment.systemInfo.platform}</p>
351
+ <p><strong>Risk Score:</strong> ${assessment.riskScore}%</p>
352
+ </div>
353
+
354
+ <h2>Test Results</h2>
355
+ ${assessment.results.map(result => `
356
+ <div class="test-result ${result.status}">
357
+ <h3>${result.testId}</h3>
358
+ <p><strong>Status:</strong> ${result.status}</p>
359
+ <p><strong>Execution Time:</strong> ${result.executionTime}ms</p>
360
+ <pre>${result.output}</pre>
361
+ </div>
362
+ `).join('')}
363
+
364
+ <div class="summary">
365
+ <h2>Summary</h2>
366
+ <pre>${assessment.summary}</pre>
367
+ </div>
368
+ </body>
369
+ </html>`;
370
+ }
371
+ }
372
+ //# sourceMappingURL=security-testing-framework.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-testing-framework.js","sourceRoot":"","sources":["../../src/security/security-testing-framework.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,0BAA0B,EAA6B,MAAM,2BAA2B,CAAC;AA6ClG;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAC3B,mBAAmB,CAA6B;IAChD,aAAa,CAAiB;IAEtC;QACE,IAAI,CAAC,mBAAmB,GAAG,IAAI,0BAA0B,EAAE,CAAC;QAC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MAAM,CAAC,MAAM,EAAE,CAAC;gBAClB,MAAM,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC9D,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEhC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACK,kBAAkB,CAAC,UAA8B;QACvD,OAAO;;;;;;;;;;;;;;;;;yCAiB8B,UAAU,CAAC,SAAS,CAAC,WAAW,EAAE;wCACnC,UAAU,CAAC,UAAU,CAAC,QAAQ;0CAC5B,UAAU,CAAC,SAAS;;;;MAIxD,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;kCACL,MAAM,CAAC,MAAM;kBAC7B,MAAM,CAAC,MAAM;0CACW,MAAM,CAAC,MAAM;kDACL,MAAM,CAAC,aAAa;mBACnD,MAAM,CAAC,MAAM;;KAE3B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;eAIA,UAAU,CAAC,OAAO;;;QAGzB,CAAC;IACP,CAAC;CACF"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Attack Simulation Engine
3
+ *
4
+ * Provides attack simulation capabilities for authorized security testing
5
+ * and red team exercises.
6
+ *
7
+ * LEGAL NOTICE:
8
+ * For authorized security research, penetration testing, and red team exercises only.
9
+ */
10
+ export interface AttackSimulationRequest {
11
+ attackType: 'web_application' | 'authentication' | 'injection' | 'persistence' | 'privilege_escalation';
12
+ target: string;
13
+ stealthLevel: number;
14
+ }
15
+ export interface AttackSimulationResult {
16
+ attackType: string;
17
+ target: string;
18
+ stealthLevel: number;
19
+ steps: string[];
20
+ successProbability: number;
21
+ detectionProbability: number;
22
+ impactAssessment: string;
23
+ recommendations: string[];
24
+ }
25
+ export interface PayloadGenerationRequest {
26
+ payloadType: 'sql_injection' | 'xss' | 'command_injection' | 'file_upload' | 'authentication_bypass';
27
+ target: string;
28
+ count: number;
29
+ }
30
+ export interface PayloadGenerationResult {
31
+ payloadType: string;
32
+ target: string;
33
+ count: number;
34
+ payloads: string[];
35
+ usageInstructions: string;
36
+ detectionMethods: string[];
37
+ }
38
+ /**
39
+ * Attack Simulation Engine
40
+ */
41
+ export declare class AttackSimulationEngine {
42
+ private attackTemplates;
43
+ constructor();
44
+ /**
45
+ * Simulate attack scenario
46
+ */
47
+ simulateAttack(request: AttackSimulationRequest): Promise<AttackSimulationResult>;
48
+ /**
49
+ * Generate payloads for security testing
50
+ */
51
+ generatePayloads(request: PayloadGenerationRequest): Promise<PayloadGenerationResult>;
52
+ /**
53
+ * Get available attack types
54
+ */
55
+ getAvailableAttackTypes(): string[];
56
+ /**
57
+ * Generate attack steps based on template and stealth level
58
+ */
59
+ private generateAttackSteps;
60
+ /**
61
+ * Calculate success probability
62
+ */
63
+ private calculateSuccessProbability;
64
+ /**
65
+ * Calculate detection probability
66
+ */
67
+ private calculateDetectionProbability;
68
+ /**
69
+ * Generate impact assessment
70
+ */
71
+ private generateImpactAssessment;
72
+ /**
73
+ * Generate attack recommendations
74
+ */
75
+ private generateAttackRecommendations;
76
+ /**
77
+ * Generate payloads by type
78
+ */
79
+ private generatePayloadsByType;
80
+ /**
81
+ * Generate usage instructions
82
+ */
83
+ private generateUsageInstructions;
84
+ /**
85
+ * Generate detection methods
86
+ */
87
+ private generateDetectionMethods;
88
+ /**
89
+ * Initialize attack templates
90
+ */
91
+ private initializeAttackTemplates;
92
+ }
93
+ //# sourceMappingURL=attackSimulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attackSimulation.d.ts","sourceRoot":"","sources":["../../../src/security/simulation/attackSimulation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,WAAW,GAAG,aAAa,GAAG,sBAAsB,CAAC;IACxG,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,eAAe,GAAG,KAAK,GAAG,mBAAmB,GAAG,aAAa,GAAG,uBAAuB,CAAC;IACrG,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,eAAe,CAA8B;;IAOrD;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAyBvF;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAe3F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