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,290 @@
1
+ import { ToolArgumentValidationError, validateToolArguments, } from './schemaValidator.js';
2
+ // Idempotent tools that can be safely cached
3
+ const CACHEABLE_TOOLS = new Set([
4
+ 'Read',
5
+ 'read_file',
6
+ 'Glob',
7
+ 'glob_search',
8
+ 'Grep',
9
+ 'grep_search',
10
+ 'find_definition',
11
+ 'analyze_code_quality',
12
+ 'extract_exports',
13
+ ]);
14
+ export class ToolRuntime {
15
+ constructor(baseTools = [], options = {}) {
16
+ this.registry = new Map();
17
+ this.registrationOrder = [];
18
+ this.cache = new Map();
19
+ this.observer = options.observer ?? null;
20
+ this.contextManager = options.contextManager ?? null;
21
+ this.enableCache = options.enableCache ?? true;
22
+ this.cacheTTLMs = options.cacheTTLMs ?? 5 * 60 * 1000; // 5 minutes default
23
+ if (baseTools.length) {
24
+ this.registerSuite({
25
+ id: 'runtime.core',
26
+ description: 'Core runtime metadata tools',
27
+ tools: baseTools,
28
+ });
29
+ }
30
+ }
31
+ registerSuite(suite) {
32
+ if (!suite?.id?.trim()) {
33
+ throw new Error('Tool suite id cannot be blank.');
34
+ }
35
+ this.unregisterSuite(suite.id);
36
+ for (const definition of suite.tools ?? []) {
37
+ this.addTool(definition, suite.id);
38
+ }
39
+ }
40
+ unregisterSuite(id) {
41
+ if (!id?.trim()) {
42
+ return;
43
+ }
44
+ for (const [name, record] of this.registry.entries()) {
45
+ if (record.suiteId === id) {
46
+ this.registry.delete(name);
47
+ this.removeFromOrder(name);
48
+ }
49
+ }
50
+ }
51
+ listProviderTools() {
52
+ return this.registrationOrder
53
+ .map((name) => this.registry.get(name))
54
+ .filter((record) => Boolean(record))
55
+ .map(({ definition }) => {
56
+ const tool = {
57
+ name: definition.name,
58
+ description: definition.description,
59
+ };
60
+ if (definition.parameters) {
61
+ tool.parameters = definition.parameters;
62
+ }
63
+ return tool;
64
+ });
65
+ }
66
+ async execute(call) {
67
+ const record = this.registry.get(call.name);
68
+ if (!record) {
69
+ const message = `Tool "${call.name}" is not available.`;
70
+ this.observer?.onToolError?.(call, message);
71
+ return message;
72
+ }
73
+ // Check if tool is cacheable
74
+ const isCacheable = record.definition.cacheable ?? CACHEABLE_TOOLS.has(call.name);
75
+ // Try to get from cache
76
+ if (this.enableCache && isCacheable) {
77
+ const cacheKey = this.getCacheKey(call);
78
+ const cached = this.cache.get(cacheKey);
79
+ if (cached && Date.now() - cached.timestamp < this.cacheTTLMs) {
80
+ this.observer?.onCacheHit?.(call);
81
+ this.observer?.onToolResult?.(call, cached.result);
82
+ return cached.result;
83
+ }
84
+ }
85
+ this.observer?.onToolStart?.(call);
86
+ try {
87
+ const args = normalizeToolArguments(call.arguments);
88
+ validateToolArguments(record.definition.name, record.definition.parameters, args);
89
+ const result = await record.definition.handler(args);
90
+ let output = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
91
+ // Truncate output if context manager is available
92
+ if (this.contextManager) {
93
+ const truncated = this.contextManager.truncateToolOutput(output, call.name);
94
+ if (truncated.wasTruncated) {
95
+ output = truncated.content;
96
+ // Log truncation for debugging
97
+ if (process.env['DEBUG_CONTEXT']) {
98
+ console.warn(`[Context Manager] Truncated ${call.name} output: ${truncated.originalLength} -> ${truncated.truncatedLength} chars`);
99
+ }
100
+ }
101
+ }
102
+ // Cache the result if cacheable
103
+ if (this.enableCache && isCacheable) {
104
+ const cacheKey = this.getCacheKey(call);
105
+ this.cache.set(cacheKey, {
106
+ result: output,
107
+ timestamp: Date.now(),
108
+ });
109
+ }
110
+ this.observer?.onToolResult?.(call, output);
111
+ return output;
112
+ }
113
+ catch (error) {
114
+ let formatted;
115
+ if (error instanceof ToolArgumentValidationError) {
116
+ formatted = error.message;
117
+ }
118
+ else {
119
+ const message = error instanceof Error ? error.message : String(error);
120
+ formatted = `Failed to run "${call.name}": ${message}`;
121
+ }
122
+ this.observer?.onToolError?.(call, formatted);
123
+ return formatted;
124
+ }
125
+ }
126
+ getCacheKey(call) {
127
+ return `${call.name}:${JSON.stringify(call.arguments)}`;
128
+ }
129
+ clearCache() {
130
+ this.cache.clear();
131
+ }
132
+ getCacheStats() {
133
+ let totalSize = 0;
134
+ for (const entry of this.cache.values()) {
135
+ totalSize += entry.result.length;
136
+ }
137
+ return {
138
+ size: totalSize,
139
+ entries: this.cache.size,
140
+ };
141
+ }
142
+ addTool(definition, suiteId) {
143
+ if (!definition?.name?.trim()) {
144
+ throw new Error(`Tool names cannot be blank (suite "${suiteId}").`);
145
+ }
146
+ if (this.registry.has(definition.name)) {
147
+ const owner = this.registry.get(definition.name)?.suiteId ?? 'unknown';
148
+ throw new Error(`Tool "${definition.name}" already registered by suite "${owner}".`);
149
+ }
150
+ this.registry.set(definition.name, {
151
+ suiteId,
152
+ definition,
153
+ });
154
+ this.registrationOrder.push(definition.name);
155
+ }
156
+ removeFromOrder(name) {
157
+ const index = this.registrationOrder.indexOf(name);
158
+ if (index >= 0) {
159
+ this.registrationOrder.splice(index, 1);
160
+ }
161
+ }
162
+ }
163
+ export function createDefaultToolRuntime(context, toolSuites = [], options = {}) {
164
+ const runtime = new ToolRuntime([
165
+ buildContextSnapshotTool(context.workspaceContext),
166
+ buildCapabilitiesTool(context),
167
+ buildProfileInspectorTool(context),
168
+ ], options);
169
+ for (const suite of toolSuites) {
170
+ runtime.registerSuite(suite);
171
+ }
172
+ return runtime;
173
+ }
174
+ function buildContextSnapshotTool(workspaceContext) {
175
+ return {
176
+ name: 'context_snapshot',
177
+ description: 'Returns a summary of the repository context. NOTE: Full context is already in your system prompt - only use this if you need to refresh or verify the context.',
178
+ parameters: {
179
+ type: 'object',
180
+ properties: {
181
+ format: {
182
+ type: 'string',
183
+ description: 'Use "plain" for raw text or "markdown" for a fenced block.',
184
+ enum: ['plain', 'markdown'],
185
+ },
186
+ },
187
+ },
188
+ handler: (args) => {
189
+ if (!workspaceContext?.trim()) {
190
+ return 'Workspace context is unavailable.';
191
+ }
192
+ // CRITICAL: Return only summary to prevent context duplication
193
+ // Full context is already in system prompt
194
+ const lines = workspaceContext.trim().split('\n');
195
+ const totalLines = lines.length;
196
+ // Return just first 20 lines + summary
197
+ const preview = lines.slice(0, 20).join('\n');
198
+ const summary = [
199
+ preview,
200
+ '',
201
+ `[Workspace context: ${totalLines} total lines]`,
202
+ `[Full context already available in system prompt - use Read/Glob tools for specific files]`
203
+ ].join('\n');
204
+ const format = args['format'] === 'markdown' ? 'markdown' : 'plain';
205
+ if (format === 'markdown') {
206
+ return ['```text', summary, '```'].join('\n');
207
+ }
208
+ return summary;
209
+ },
210
+ };
211
+ }
212
+ function buildCapabilitiesTool(context) {
213
+ return {
214
+ name: 'capabilities_overview',
215
+ description: 'Summarizes the agent runtime capabilities including available tools and features.',
216
+ parameters: {
217
+ type: 'object',
218
+ properties: {
219
+ audience: {
220
+ type: 'string',
221
+ enum: ['developer', 'model'],
222
+ description: 'Tailors the tone of the description.',
223
+ },
224
+ },
225
+ },
226
+ handler: (args) => {
227
+ const audience = args['audience'];
228
+ const adjective = audience === 'developer' ? 'Operator facing' : 'Model facing';
229
+ return [
230
+ `${adjective} capabilities summary:`,
231
+ '- Full file system access (read, write, list, search).',
232
+ '- Bash command execution for running scripts and tools.',
233
+ '- Advanced code search and pattern matching.',
234
+ '- Deterministic workspace context snapshot appended to the system prompt.',
235
+ '- Tool invocations are logged in realtime for transparency.',
236
+ `- Active provider: ${context.provider} (${context.model}).`,
237
+ ].join('\n');
238
+ },
239
+ };
240
+ }
241
+ function buildProfileInspectorTool(context) {
242
+ return {
243
+ name: 'profile_details',
244
+ description: 'Returns the configuration of the active CLI profile.',
245
+ parameters: {
246
+ type: 'object',
247
+ properties: {
248
+ includeWorkspaceContext: {
249
+ type: 'boolean',
250
+ description: 'Set true to append the workspace context snapshot if available.',
251
+ },
252
+ },
253
+ additionalProperties: false,
254
+ },
255
+ handler: (args) => {
256
+ const payload = {
257
+ profile: context.profileName,
258
+ provider: context.provider,
259
+ model: context.model,
260
+ workspaceContext: args['includeWorkspaceContext'] ? context.workspaceContext ?? null : null,
261
+ };
262
+ return JSON.stringify(payload, null, 2);
263
+ },
264
+ };
265
+ }
266
+ function normalizeToolArguments(value) {
267
+ if (value instanceof Map) {
268
+ return Object.fromEntries(value.entries());
269
+ }
270
+ if (isRecord(value)) {
271
+ return value;
272
+ }
273
+ if (typeof value === 'string') {
274
+ const trimmed = value.trim();
275
+ if (!trimmed) {
276
+ return {};
277
+ }
278
+ try {
279
+ const parsed = JSON.parse(trimmed);
280
+ return isRecord(parsed) ? parsed : {};
281
+ }
282
+ catch {
283
+ return {};
284
+ }
285
+ }
286
+ return {};
287
+ }
288
+ function isRecord(value) {
289
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
290
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Optimized Erosolar CLI Entry Point
4
+ *
5
+ * Features:
6
+ * - Fast-path commands for simple operations
7
+ * - Lazy loading for complex functionality
8
+ * - Performance monitoring
9
+ * - Graceful error handling
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=erosolar-optimized.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erosolar-optimized.d.ts","sourceRoot":"","sources":["../../src/bin/erosolar-optimized.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG"}
@@ -0,0 +1,239 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Optimized Erosolar CLI Entry Point
4
+ *
5
+ * Features:
6
+ * - Fast-path commands for simple operations
7
+ * - Lazy loading for complex functionality
8
+ * - Performance monitoring
9
+ * - Graceful error handling
10
+ */
11
+ import { readFileSync } from 'node:fs';
12
+ import { dirname, resolve } from 'node:path';
13
+ import { fileURLToPath } from 'node:url';
14
+ import { initializeLazyLoaders, LazyLoaderRegistry } from '../core/LazyLoader.js';
15
+ // Initialize lazy loading system
16
+ initializeLazyLoaders();
17
+ // Fast-path command handling
18
+ function handleFastPathCommand(argv) {
19
+ const command = argv[0];
20
+ switch (command) {
21
+ case '--version':
22
+ case 'version':
23
+ case '-v':
24
+ console.log(`Erosolar CLI v${getPackageVersion()}`);
25
+ return true;
26
+ case '--help':
27
+ case 'help':
28
+ case '-h':
29
+ showFastHelp();
30
+ return true;
31
+ case '--json':
32
+ // Defer to full implementation for JSON mode
33
+ return false;
34
+ case 'health-check':
35
+ // This will be handled in main async function
36
+ return false;
37
+ case 'status':
38
+ showStatus();
39
+ return true;
40
+ case 'performance':
41
+ showPerformanceStats();
42
+ return true;
43
+ }
44
+ return false;
45
+ }
46
+ // Get package version without full initialization
47
+ function getPackageVersion() {
48
+ try {
49
+ const filePath = fileURLToPath(import.meta.url);
50
+ const packagePath = resolve(dirname(filePath), '../../package.json');
51
+ const payload = JSON.parse(readFileSync(packagePath, 'utf8'));
52
+ return typeof payload.version === 'string' ? payload.version : '0.0.0';
53
+ }
54
+ catch {
55
+ return '0.0.0';
56
+ }
57
+ }
58
+ // Fast help without full initialization
59
+ function showFastHelp() {
60
+ console.log(`
61
+ Erosolar CLI v${getPackageVersion()} - Fast Help
62
+
63
+ Usage:
64
+ erosolar [command] [options]
65
+
66
+ Fast Commands:
67
+ version, -v Show version
68
+ help, -h Show this help
69
+ status Show system status
70
+ performance Show performance statistics
71
+
72
+ Full Commands:
73
+ [interactive] Start interactive shell
74
+ --json <command> Run command in JSON mode
75
+ health-check Run health check
76
+
77
+ Options:
78
+ --provider <name> Specify AI provider
79
+ --model <name> Specify AI model
80
+ --profile <name> Use specific agent profile
81
+
82
+ Examples:
83
+ erosolar version
84
+ erosolar --json "list files"
85
+ erosolar --provider openai --model gpt-4
86
+ `);
87
+ }
88
+ // Run health check without full initialization
89
+ async function runHealthCheck() {
90
+ console.log('🧪 Running fast health check...\n');
91
+ const checks = [
92
+ { name: 'Node.js version', check: checkNodeVersion },
93
+ { name: 'Package configuration', check: checkPackageConfig },
94
+ { name: 'Build directory', check: checkBuildDir },
95
+ { name: 'Main binary', check: checkMainBinary },
96
+ ];
97
+ let passed = 0;
98
+ let failed = 0;
99
+ for (const { name, check } of checks) {
100
+ try {
101
+ await check();
102
+ console.log(`✅ ${name}`);
103
+ passed++;
104
+ }
105
+ catch (error) {
106
+ console.log(`❌ ${name}: ${error instanceof Error ? error.message : error}`);
107
+ failed++;
108
+ }
109
+ }
110
+ console.log(`\n📊 Results: ${passed} passed, ${failed} failed`);
111
+ if (failed > 0) {
112
+ process.exit(1);
113
+ }
114
+ }
115
+ // Check Node.js version
116
+ function checkNodeVersion() {
117
+ const version = process.version;
118
+ const major = parseInt(version.slice(1).split('.')[0], 10);
119
+ if (major < 20) {
120
+ throw new Error(`Node.js ${version} is too old, requires >=20.0.0`);
121
+ }
122
+ }
123
+ // Check package configuration
124
+ function checkPackageConfig() {
125
+ const filePath = fileURLToPath(import.meta.url);
126
+ const packagePath = resolve(dirname(filePath), '../../package.json');
127
+ if (!readFileSync(packagePath, 'utf8')) {
128
+ throw new Error('Package.json not found or empty');
129
+ }
130
+ }
131
+ // Check build directory
132
+ function checkBuildDir() {
133
+ const filePath = fileURLToPath(import.meta.url);
134
+ const buildPath = resolve(dirname(filePath), '../../dist');
135
+ try {
136
+ const stats = readFileSync(buildPath);
137
+ if (!stats) {
138
+ throw new Error('Build directory does not exist');
139
+ }
140
+ }
141
+ catch {
142
+ throw new Error('Build directory does not exist');
143
+ }
144
+ }
145
+ // Check main binary
146
+ function checkMainBinary() {
147
+ const filePath = fileURLToPath(import.meta.url);
148
+ const binaryPath = resolve(dirname(filePath), '../../dist/bin/erosolar.js');
149
+ try {
150
+ const stats = readFileSync(binaryPath);
151
+ if (!stats) {
152
+ throw new Error('Main binary does not exist');
153
+ }
154
+ }
155
+ catch {
156
+ throw new Error('Main binary does not exist');
157
+ }
158
+ }
159
+ // Show system status
160
+ function showStatus() {
161
+ const registry = LazyLoaderRegistry.getInstance();
162
+ const stats = registry.getStats();
163
+ console.log(`
164
+ Erosolar CLI Status
165
+ ───────────────────
166
+ Version: ${getPackageVersion()}
167
+ Node.js: ${process.version}
168
+ Platform: ${process.platform} ${process.arch}
169
+ Working Directory: ${process.cwd()}
170
+
171
+ Lazy Loading Status:
172
+ ${Object.entries(stats).map(([name, loaderStats]) => ` ${name}: ${loaderStats.isLoaded ? '✅ Loaded' : loaderStats.isLoading ? '🔄 Loading' : '⏳ Not Loaded'} (${loaderStats.loadCount} loads)`).join('\n')}
173
+
174
+ Fast Commands: ✅ Available
175
+ Full Shell: ⚠️ May be slow to initialize
176
+ Health Check: ✅ Available
177
+ `);
178
+ }
179
+ // Show performance statistics
180
+ function showPerformanceStats() {
181
+ const registry = LazyLoaderRegistry.getInstance();
182
+ const stats = registry.getStats();
183
+ console.log(`
184
+ Erosolar CLI Performance Statistics
185
+ ──────────────────────────────────
186
+
187
+ Lazy Loader Status:
188
+ ${Object.entries(stats).map(([name, loaderStats]) => ` ${name}:
189
+ Status: ${loaderStats.isLoaded ? '✅ Loaded' : loaderStats.isLoading ? '🔄 Loading' : '⏳ Not Loaded'}
190
+ Load Count: ${loaderStats.loadCount}
191
+ Last Load: ${loaderStats.lastLoadTime ? new Date(loaderStats.lastLoadTime).toISOString() : 'Never'}`).join('\n\n')}
192
+
193
+ Performance Tips:
194
+ • Use fast commands (version, help, status) for instant response
195
+ • Complex commands load components on-demand
196
+ • Lazy loading prevents slow startup for simple operations
197
+ • Cached components improve subsequent command performance
198
+ `);
199
+ }
200
+ // Main execution
201
+ async function main() {
202
+ const argv = process.argv.slice(2);
203
+ // Handle fast-path commands
204
+ if (handleFastPathCommand(argv)) {
205
+ return;
206
+ }
207
+ // Handle health check (needs to be async)
208
+ if (argv[0] === 'health-check') {
209
+ await runHealthCheck();
210
+ return;
211
+ }
212
+ // Defer to full implementation for complex commands
213
+ console.log('🚀 Starting full Erosolar CLI...');
214
+ console.log('⏳ This may take a moment for complex initialization...\n');
215
+ try {
216
+ if (argv.includes('--json')) {
217
+ const { runHeadlessApp } = await import('../headless/headlessApp.js');
218
+ await runHeadlessApp({ argv });
219
+ }
220
+ else {
221
+ const { launchShell } = await import('../shell/shellApp.js');
222
+ await launchShell('erosolar-code', { enableProfileSelection: true });
223
+ }
224
+ }
225
+ catch (error) {
226
+ console.error('\n❌ CLI Error:', error instanceof Error ? error.message : error);
227
+ // Provide helpful suggestions
228
+ if (error instanceof Error && error.message.includes('Cannot find module')) {
229
+ console.log('\n💡 Try running: npm run build');
230
+ }
231
+ process.exit(1);
232
+ }
233
+ }
234
+ // Start the application
235
+ main().catch((error) => {
236
+ console.error('Fatal error:', error instanceof Error ? error.message : error);
237
+ process.exit(1);
238
+ });
239
+ //# sourceMappingURL=erosolar-optimized.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erosolar-optimized.js","sourceRoot":"","sources":["../../src/bin/erosolar-optimized.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAElF,iCAAiC;AACjC,qBAAqB,EAAE,CAAC;AAExB,6BAA6B;AAC7B,SAAS,qBAAqB,CAAC,IAAc;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,SAAS,CAAC;QACf,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,CAAC,iBAAiB,iBAAiB,EAAE,EAAE,CAAC,CAAC;YACpD,OAAO,IAAI,CAAC;QAEd,KAAK,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,IAAI;YACP,YAAY,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QAEd,KAAK,QAAQ;YACX,6CAA6C;YAC7C,OAAO,KAAK,CAAC;QA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C,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,wBAAwB;AACxB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,4 +1,18 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * Erosolar CLI - Unified AI Agent Framework
4
+ *
5
+ * @license MIT
6
+ * @author Bo Shang
7
+ *
8
+ * DISCLAIMER: This software is provided for both defensive and offensive security
9
+ * purposes and is open source (available via npm and GitHub) to anyone globally.
10
+ * The creator, Bo Shang, does not solicit or endorse unauthorized attacks.
11
+ * This tool is released with the belief that providing technological freedom
12
+ * globally is the right thing to do. Users are solely responsible for ensuring
13
+ * their use complies with applicable laws and regulations in their jurisdiction.
14
+ * Use responsibly and ethically.
15
+ */
2
16
  import { launchShell } from '../shell/shellApp.js';
3
17
  import { runHeadlessApp } from '../headless/headlessApp.js';
4
18
  const argv = process.argv.slice(2);
@@ -1 +1 @@
1
- {"version":3,"file":"erosolar.js","sourceRoot":"","sources":["../../src/bin/erosolar.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,KAAK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