erosolar-cli 1.7.329 → 1.7.330

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 (323) hide show
  1. package/README.md +24 -148
  2. package/dist/bin/erosolar.js +5 -21
  3. package/dist/bin/erosolar.js.map +1 -1
  4. package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
  5. package/dist/capabilities/agentSpawningCapability.js +56 -31
  6. package/dist/capabilities/agentSpawningCapability.js.map +1 -1
  7. package/dist/contracts/agent-schemas.json +0 -15
  8. package/dist/contracts/tools.schema.json +0 -9
  9. package/dist/core/agent.d.ts +2 -2
  10. package/dist/core/agent.d.ts.map +1 -1
  11. package/dist/core/agent.js.map +1 -1
  12. package/dist/core/customCommands.d.ts +1 -0
  13. package/dist/core/customCommands.d.ts.map +1 -1
  14. package/dist/core/customCommands.js +3 -0
  15. package/dist/core/customCommands.js.map +1 -1
  16. package/dist/core/hooks.d.ts +113 -0
  17. package/dist/core/hooks.d.ts.map +1 -0
  18. package/dist/core/hooks.js +267 -0
  19. package/dist/core/hooks.js.map +1 -0
  20. package/dist/core/metricsTracker.d.ts +122 -0
  21. package/dist/core/metricsTracker.d.ts.map +1 -0
  22. package/dist/{alpha-zero → core}/metricsTracker.js +2 -5
  23. package/dist/core/metricsTracker.js.map +1 -0
  24. package/dist/core/securityAssessment.d.ts +91 -0
  25. package/dist/core/securityAssessment.d.ts.map +1 -0
  26. package/dist/core/securityAssessment.js +580 -0
  27. package/dist/core/securityAssessment.js.map +1 -0
  28. package/dist/core/toolPreconditions.d.ts.map +1 -1
  29. package/dist/core/toolPreconditions.js +0 -14
  30. package/dist/core/toolPreconditions.js.map +1 -1
  31. package/dist/core/toolRuntime.d.ts +22 -1
  32. package/dist/core/toolRuntime.d.ts.map +1 -1
  33. package/dist/core/toolRuntime.js +0 -5
  34. package/dist/core/toolRuntime.js.map +1 -1
  35. package/dist/core/toolValidation.d.ts.map +1 -1
  36. package/dist/core/toolValidation.js +14 -3
  37. package/dist/core/toolValidation.js.map +1 -1
  38. package/dist/core/validationRunner.d.ts +1 -3
  39. package/dist/core/validationRunner.d.ts.map +1 -1
  40. package/dist/core/validationRunner.js.map +1 -1
  41. package/dist/core/verification.d.ts +137 -0
  42. package/dist/core/verification.d.ts.map +1 -0
  43. package/dist/core/verification.js +323 -0
  44. package/dist/core/verification.js.map +1 -0
  45. package/dist/headless/headlessApp.d.ts.map +1 -1
  46. package/dist/headless/headlessApp.js +21 -0
  47. package/dist/headless/headlessApp.js.map +1 -1
  48. package/dist/mcp/sseClient.d.ts.map +1 -1
  49. package/dist/mcp/sseClient.js +9 -18
  50. package/dist/mcp/sseClient.js.map +1 -1
  51. package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
  52. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  53. package/dist/plugins/tools/build/buildPlugin.js +4 -10
  54. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  55. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  56. package/dist/plugins/tools/nodeDefaults.js +0 -2
  57. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  58. package/dist/runtime/agentSession.d.ts +2 -2
  59. package/dist/runtime/agentSession.d.ts.map +1 -1
  60. package/dist/runtime/agentSession.js +2 -2
  61. package/dist/runtime/agentSession.js.map +1 -1
  62. package/dist/shell/interactiveShell.d.ts +16 -7
  63. package/dist/shell/interactiveShell.d.ts.map +1 -1
  64. package/dist/shell/interactiveShell.js +235 -164
  65. package/dist/shell/interactiveShell.js.map +1 -1
  66. package/dist/shell/shellApp.d.ts +2 -0
  67. package/dist/shell/shellApp.d.ts.map +1 -1
  68. package/dist/shell/shellApp.js +40 -9
  69. package/dist/shell/shellApp.js.map +1 -1
  70. package/dist/shell/systemPrompt.d.ts.map +1 -1
  71. package/dist/shell/systemPrompt.js +1 -4
  72. package/dist/shell/systemPrompt.js.map +1 -1
  73. package/dist/shell/terminalInput.d.ts +149 -117
  74. package/dist/shell/terminalInput.d.ts.map +1 -1
  75. package/dist/shell/terminalInput.js +659 -521
  76. package/dist/shell/terminalInput.js.map +1 -1
  77. package/dist/shell/terminalInputAdapter.d.ts +79 -20
  78. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  79. package/dist/shell/terminalInputAdapter.js +99 -30
  80. package/dist/shell/terminalInputAdapter.js.map +1 -1
  81. package/dist/subagents/agentConfig.d.ts +27 -0
  82. package/dist/subagents/agentConfig.d.ts.map +1 -0
  83. package/dist/subagents/agentConfig.js +89 -0
  84. package/dist/subagents/agentConfig.js.map +1 -0
  85. package/dist/subagents/agentRegistry.d.ts +33 -0
  86. package/dist/subagents/agentRegistry.d.ts.map +1 -0
  87. package/dist/subagents/agentRegistry.js +162 -0
  88. package/dist/subagents/agentRegistry.js.map +1 -0
  89. package/dist/subagents/taskRunner.d.ts +7 -1
  90. package/dist/subagents/taskRunner.d.ts.map +1 -1
  91. package/dist/subagents/taskRunner.js +180 -47
  92. package/dist/subagents/taskRunner.js.map +1 -1
  93. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  94. package/dist/ui/ShellUIAdapter.js +13 -12
  95. package/dist/ui/ShellUIAdapter.js.map +1 -1
  96. package/dist/ui/display.d.ts +24 -45
  97. package/dist/ui/display.d.ts.map +1 -1
  98. package/dist/ui/display.js +140 -259
  99. package/dist/ui/display.js.map +1 -1
  100. package/dist/ui/theme.d.ts.map +1 -1
  101. package/dist/ui/theme.js +6 -8
  102. package/dist/ui/theme.js.map +1 -1
  103. package/dist/ui/toolDisplay.d.ts +0 -158
  104. package/dist/ui/toolDisplay.d.ts.map +1 -1
  105. package/dist/ui/toolDisplay.js +0 -348
  106. package/dist/ui/toolDisplay.js.map +1 -1
  107. package/dist/ui/unified/layout.d.ts +1 -0
  108. package/dist/ui/unified/layout.d.ts.map +1 -1
  109. package/dist/ui/unified/layout.js +15 -25
  110. package/dist/ui/unified/layout.js.map +1 -1
  111. package/dist/utils/frontmatter.d.ts +10 -0
  112. package/dist/utils/frontmatter.d.ts.map +1 -0
  113. package/dist/utils/frontmatter.js +78 -0
  114. package/dist/utils/frontmatter.js.map +1 -0
  115. package/package.json +4 -4
  116. package/dist/alpha-zero/agentWrapper.d.ts +0 -84
  117. package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
  118. package/dist/alpha-zero/agentWrapper.js +0 -171
  119. package/dist/alpha-zero/agentWrapper.js.map +0 -1
  120. package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
  121. package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
  122. package/dist/alpha-zero/codeEvaluator.js +0 -273
  123. package/dist/alpha-zero/codeEvaluator.js.map +0 -1
  124. package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
  125. package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
  126. package/dist/alpha-zero/competitiveRunner.js +0 -224
  127. package/dist/alpha-zero/competitiveRunner.js.map +0 -1
  128. package/dist/alpha-zero/index.d.ts +0 -67
  129. package/dist/alpha-zero/index.d.ts.map +0 -1
  130. package/dist/alpha-zero/index.js +0 -99
  131. package/dist/alpha-zero/index.js.map +0 -1
  132. package/dist/alpha-zero/introspection.d.ts +0 -128
  133. package/dist/alpha-zero/introspection.d.ts.map +0 -1
  134. package/dist/alpha-zero/introspection.js +0 -300
  135. package/dist/alpha-zero/introspection.js.map +0 -1
  136. package/dist/alpha-zero/metricsTracker.d.ts +0 -71
  137. package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
  138. package/dist/alpha-zero/metricsTracker.js.map +0 -1
  139. package/dist/alpha-zero/security/core.d.ts +0 -125
  140. package/dist/alpha-zero/security/core.d.ts.map +0 -1
  141. package/dist/alpha-zero/security/core.js +0 -271
  142. package/dist/alpha-zero/security/core.js.map +0 -1
  143. package/dist/alpha-zero/security/google.d.ts +0 -125
  144. package/dist/alpha-zero/security/google.d.ts.map +0 -1
  145. package/dist/alpha-zero/security/google.js +0 -311
  146. package/dist/alpha-zero/security/google.js.map +0 -1
  147. package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
  148. package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
  149. package/dist/alpha-zero/security/googleLoader.js +0 -41
  150. package/dist/alpha-zero/security/googleLoader.js.map +0 -1
  151. package/dist/alpha-zero/security/index.d.ts +0 -29
  152. package/dist/alpha-zero/security/index.d.ts.map +0 -1
  153. package/dist/alpha-zero/security/index.js +0 -32
  154. package/dist/alpha-zero/security/index.js.map +0 -1
  155. package/dist/alpha-zero/security/simulation.d.ts +0 -124
  156. package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
  157. package/dist/alpha-zero/security/simulation.js +0 -277
  158. package/dist/alpha-zero/security/simulation.js.map +0 -1
  159. package/dist/alpha-zero/selfModification.d.ts +0 -109
  160. package/dist/alpha-zero/selfModification.d.ts.map +0 -1
  161. package/dist/alpha-zero/selfModification.js +0 -233
  162. package/dist/alpha-zero/selfModification.js.map +0 -1
  163. package/dist/alpha-zero/types.d.ts +0 -170
  164. package/dist/alpha-zero/types.d.ts.map +0 -1
  165. package/dist/alpha-zero/types.js +0 -31
  166. package/dist/alpha-zero/types.js.map +0 -1
  167. package/dist/capabilities/securityTestingCapability.d.ts +0 -13
  168. package/dist/capabilities/securityTestingCapability.d.ts.map +0 -1
  169. package/dist/capabilities/securityTestingCapability.js +0 -25
  170. package/dist/capabilities/securityTestingCapability.js.map +0 -1
  171. package/dist/core/aiFlowOptimizer.d.ts +0 -26
  172. package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
  173. package/dist/core/aiFlowOptimizer.js +0 -31
  174. package/dist/core/aiFlowOptimizer.js.map +0 -1
  175. package/dist/core/aiOptimizationEngine.d.ts +0 -158
  176. package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
  177. package/dist/core/aiOptimizationEngine.js +0 -428
  178. package/dist/core/aiOptimizationEngine.js.map +0 -1
  179. package/dist/core/aiOptimizationIntegration.d.ts +0 -93
  180. package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
  181. package/dist/core/aiOptimizationIntegration.js +0 -250
  182. package/dist/core/aiOptimizationIntegration.js.map +0 -1
  183. package/dist/core/enhancedErrorRecovery.d.ts +0 -100
  184. package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
  185. package/dist/core/enhancedErrorRecovery.js +0 -345
  186. package/dist/core/enhancedErrorRecovery.js.map +0 -1
  187. package/dist/core/hooksSystem.d.ts +0 -65
  188. package/dist/core/hooksSystem.d.ts.map +0 -1
  189. package/dist/core/hooksSystem.js +0 -273
  190. package/dist/core/hooksSystem.js.map +0 -1
  191. package/dist/core/memorySystem.d.ts +0 -48
  192. package/dist/core/memorySystem.d.ts.map +0 -1
  193. package/dist/core/memorySystem.js +0 -271
  194. package/dist/core/memorySystem.js.map +0 -1
  195. package/dist/core/unified/errors.d.ts +0 -189
  196. package/dist/core/unified/errors.d.ts.map +0 -1
  197. package/dist/core/unified/errors.js +0 -497
  198. package/dist/core/unified/errors.js.map +0 -1
  199. package/dist/core/unified/index.d.ts +0 -19
  200. package/dist/core/unified/index.d.ts.map +0 -1
  201. package/dist/core/unified/index.js +0 -68
  202. package/dist/core/unified/index.js.map +0 -1
  203. package/dist/core/unified/schema.d.ts +0 -101
  204. package/dist/core/unified/schema.d.ts.map +0 -1
  205. package/dist/core/unified/schema.js +0 -350
  206. package/dist/core/unified/schema.js.map +0 -1
  207. package/dist/core/unified/toolRuntime.d.ts +0 -179
  208. package/dist/core/unified/toolRuntime.d.ts.map +0 -1
  209. package/dist/core/unified/toolRuntime.js +0 -517
  210. package/dist/core/unified/toolRuntime.js.map +0 -1
  211. package/dist/core/unified/tools.d.ts +0 -127
  212. package/dist/core/unified/tools.d.ts.map +0 -1
  213. package/dist/core/unified/tools.js +0 -1333
  214. package/dist/core/unified/tools.js.map +0 -1
  215. package/dist/core/unified/types.d.ts +0 -352
  216. package/dist/core/unified/types.d.ts.map +0 -1
  217. package/dist/core/unified/types.js +0 -12
  218. package/dist/core/unified/types.js.map +0 -1
  219. package/dist/core/unified/version.d.ts +0 -209
  220. package/dist/core/unified/version.d.ts.map +0 -1
  221. package/dist/core/unified/version.js +0 -454
  222. package/dist/core/unified/version.js.map +0 -1
  223. package/dist/plugins/tools/security/securityPlugin.d.ts +0 -3
  224. package/dist/plugins/tools/security/securityPlugin.d.ts.map +0 -1
  225. package/dist/plugins/tools/security/securityPlugin.js +0 -12
  226. package/dist/plugins/tools/security/securityPlugin.js.map +0 -1
  227. package/dist/security/active-stack-security.d.ts +0 -112
  228. package/dist/security/active-stack-security.d.ts.map +0 -1
  229. package/dist/security/active-stack-security.js +0 -296
  230. package/dist/security/active-stack-security.js.map +0 -1
  231. package/dist/security/advanced-persistence-research.d.ts +0 -92
  232. package/dist/security/advanced-persistence-research.d.ts.map +0 -1
  233. package/dist/security/advanced-persistence-research.js +0 -195
  234. package/dist/security/advanced-persistence-research.js.map +0 -1
  235. package/dist/security/advanced-targeting.d.ts +0 -119
  236. package/dist/security/advanced-targeting.d.ts.map +0 -1
  237. package/dist/security/advanced-targeting.js +0 -233
  238. package/dist/security/advanced-targeting.js.map +0 -1
  239. package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
  240. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
  241. package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
  242. package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
  243. package/dist/security/authorization/securityAuthorization.d.ts +0 -88
  244. package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
  245. package/dist/security/authorization/securityAuthorization.js +0 -172
  246. package/dist/security/authorization/securityAuthorization.js.map +0 -1
  247. package/dist/security/comprehensive-targeting.d.ts +0 -85
  248. package/dist/security/comprehensive-targeting.d.ts.map +0 -1
  249. package/dist/security/comprehensive-targeting.js +0 -438
  250. package/dist/security/comprehensive-targeting.js.map +0 -1
  251. package/dist/security/global-security-integration.d.ts +0 -91
  252. package/dist/security/global-security-integration.d.ts.map +0 -1
  253. package/dist/security/global-security-integration.js +0 -218
  254. package/dist/security/global-security-integration.js.map +0 -1
  255. package/dist/security/index.d.ts +0 -38
  256. package/dist/security/index.d.ts.map +0 -1
  257. package/dist/security/index.js +0 -47
  258. package/dist/security/index.js.map +0 -1
  259. package/dist/security/persistence-analyzer.d.ts +0 -56
  260. package/dist/security/persistence-analyzer.d.ts.map +0 -1
  261. package/dist/security/persistence-analyzer.js +0 -187
  262. package/dist/security/persistence-analyzer.js.map +0 -1
  263. package/dist/security/persistence-cli.d.ts +0 -36
  264. package/dist/security/persistence-cli.d.ts.map +0 -1
  265. package/dist/security/persistence-cli.js +0 -160
  266. package/dist/security/persistence-cli.js.map +0 -1
  267. package/dist/security/persistence-research.d.ts +0 -92
  268. package/dist/security/persistence-research.d.ts.map +0 -1
  269. package/dist/security/persistence-research.js +0 -364
  270. package/dist/security/persistence-research.js.map +0 -1
  271. package/dist/security/research/persistenceResearch.d.ts +0 -97
  272. package/dist/security/research/persistenceResearch.d.ts.map +0 -1
  273. package/dist/security/research/persistenceResearch.js +0 -282
  274. package/dist/security/research/persistenceResearch.js.map +0 -1
  275. package/dist/security/security-integration.d.ts +0 -74
  276. package/dist/security/security-integration.d.ts.map +0 -1
  277. package/dist/security/security-integration.js +0 -137
  278. package/dist/security/security-integration.js.map +0 -1
  279. package/dist/security/security-testing-framework.d.ts +0 -112
  280. package/dist/security/security-testing-framework.d.ts.map +0 -1
  281. package/dist/security/security-testing-framework.js +0 -364
  282. package/dist/security/security-testing-framework.js.map +0 -1
  283. package/dist/security/simulation/attackSimulation.d.ts +0 -93
  284. package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
  285. package/dist/security/simulation/attackSimulation.js +0 -341
  286. package/dist/security/simulation/attackSimulation.js.map +0 -1
  287. package/dist/security/strategic-operations.d.ts +0 -100
  288. package/dist/security/strategic-operations.d.ts.map +0 -1
  289. package/dist/security/strategic-operations.js +0 -276
  290. package/dist/security/strategic-operations.js.map +0 -1
  291. package/dist/security/tool-security-wrapper.d.ts +0 -58
  292. package/dist/security/tool-security-wrapper.d.ts.map +0 -1
  293. package/dist/security/tool-security-wrapper.js +0 -156
  294. package/dist/security/tool-security-wrapper.js.map +0 -1
  295. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  296. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  297. package/dist/shell/claudeCodeStreamHandler.js +0 -322
  298. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  299. package/dist/shell/inputQueueManager.d.ts +0 -144
  300. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  301. package/dist/shell/inputQueueManager.js +0 -290
  302. package/dist/shell/inputQueueManager.js.map +0 -1
  303. package/dist/shell/metricsTracker.d.ts +0 -60
  304. package/dist/shell/metricsTracker.d.ts.map +0 -1
  305. package/dist/shell/metricsTracker.js +0 -119
  306. package/dist/shell/metricsTracker.js.map +0 -1
  307. package/dist/shell/streamingOutputManager.d.ts +0 -115
  308. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  309. package/dist/shell/streamingOutputManager.js +0 -225
  310. package/dist/shell/streamingOutputManager.js.map +0 -1
  311. package/dist/tools/securityTools.d.ts +0 -22
  312. package/dist/tools/securityTools.d.ts.map +0 -1
  313. package/dist/tools/securityTools.js +0 -448
  314. package/dist/tools/securityTools.js.map +0 -1
  315. package/dist/ui/persistentPrompt.d.ts +0 -50
  316. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  317. package/dist/ui/persistentPrompt.js +0 -92
  318. package/dist/ui/persistentPrompt.js.map +0 -1
  319. package/dist/ui/terminalUISchema.d.ts +0 -195
  320. package/dist/ui/terminalUISchema.d.ts.map +0 -1
  321. package/dist/ui/terminalUISchema.js +0 -113
  322. package/dist/ui/terminalUISchema.js.map +0 -1
  323. package/scripts/deploy-security-capabilities.js +0 -178
@@ -1,195 +0,0 @@
1
- /**
2
- * Terminal UI Schema - Hard enforcement of UI structure and behavior
3
- *
4
- * This schema defines the correct structure for terminal UI components.
5
- * Changes that violate these constraints should fail at compile time.
6
- */
7
- /** Input mode - only these states are valid */
8
- export type InputMode = 'idle' | 'streaming' | 'paste';
9
- /** Edit guard mode for permission handling */
10
- export type EditGuardMode = 'display-edits' | 'ask-permission';
11
- /** Status tone for visual feedback */
12
- export type StatusTone = 'info' | 'warn' | 'error' | 'success' | 'muted';
13
- /**
14
- * The terminal UI MUST have these components in this order (top to bottom):
15
- * 1. Banner (session info) - ALWAYS at top
16
- * 2. Content area - Scrollable, contains AI responses and tool outputs
17
- * 3. Status bar - Shows streaming status, elapsed time
18
- * 4. Top divider - Horizontal line above input
19
- * 5. Input area - User input with prompt
20
- * 6. Bottom divider - Horizontal line below input
21
- * 7. Mode controls - Toggle states and context info
22
- */
23
- export interface TerminalUILayout {
24
- /** Banner is always pinned at top */
25
- readonly banner: BannerConfig;
26
- /** Content flows naturally between banner and input area */
27
- readonly contentArea: ContentAreaConfig;
28
- /** Input area is pinned at bottom */
29
- readonly inputArea: InputAreaConfig;
30
- }
31
- export interface BannerConfig {
32
- /** Minimum width for banner */
33
- readonly minWidth: number;
34
- /** Maximum width for banner */
35
- readonly maxWidth: number;
36
- /** Required elements in banner */
37
- readonly requiredElements: readonly ['profile', 'model', 'workspace', 'commands'];
38
- }
39
- export interface ContentAreaConfig {
40
- /** Content scrolls naturally - NO artificial gaps */
41
- readonly scrollBehavior: 'natural';
42
- /** Content starts immediately after banner */
43
- readonly startsAfterBanner: true;
44
- }
45
- export interface InputAreaConfig {
46
- /** Input is always at bottom */
47
- readonly position: 'bottom';
48
- /** Required components in order */
49
- readonly components: readonly ['statusBar', 'topDivider', 'inputLines', 'bottomDivider', 'modeControls'];
50
- /** Reserved lines for input area */
51
- readonly reservedLines: number;
52
- }
53
- export interface ModeControlsSchema {
54
- /** Edit mode toggle - REQUIRED */
55
- readonly editMode: {
56
- readonly enabled: EditGuardMode;
57
- readonly icons: {
58
- readonly auto: 'āµāµ';
59
- readonly ask: 'āøāø';
60
- };
61
- readonly colors: {
62
- readonly auto: 'green';
63
- readonly ask: 'yellow';
64
- };
65
- };
66
- /** Thinking mode toggle - REQUIRED */
67
- readonly thinkingMode: {
68
- readonly enabled: boolean;
69
- readonly icons: {
70
- readonly on: 'šŸ’­';
71
- readonly off: 'ā—‹';
72
- };
73
- readonly colors: {
74
- readonly on: 'cyan';
75
- readonly off: 'dim';
76
- };
77
- };
78
- /** Verification mode toggle - REQUIRED */
79
- readonly verificationMode: {
80
- readonly enabled: boolean;
81
- readonly icons: {
82
- readonly on: 'āœ“';
83
- readonly off: 'ā—‹';
84
- };
85
- readonly colors: {
86
- readonly on: 'green';
87
- readonly off: 'dim';
88
- };
89
- };
90
- /** Auto-continue mode toggle - REQUIRED */
91
- readonly autoContinueMode: {
92
- readonly enabled: boolean;
93
- readonly icons: {
94
- readonly on: '↻';
95
- readonly off: 'ā—‹';
96
- };
97
- readonly colors: {
98
- readonly on: 'magenta';
99
- readonly off: 'dim';
100
- };
101
- };
102
- /** Context usage display - REQUIRED when available */
103
- readonly contextUsage: {
104
- readonly percentage: number | null;
105
- readonly thresholds: {
106
- readonly critical: 10;
107
- readonly warning: 25;
108
- };
109
- readonly colors: {
110
- readonly critical: 'red';
111
- readonly warning: 'yellow';
112
- readonly normal: 'dim';
113
- };
114
- };
115
- }
116
- export interface StreamingBehaviorSchema {
117
- /** During streaming, input area rendering is SKIPPED to avoid conflicts */
118
- readonly duringStreaming: {
119
- readonly renderInputArea: false;
120
- readonly hideCursor: true;
121
- readonly contentFlows: 'naturally';
122
- };
123
- /** After streaming ends */
124
- readonly afterStreaming: {
125
- readonly renderInputArea: true;
126
- readonly showCursor: true;
127
- readonly addNewlineBeforeInput: true;
128
- };
129
- }
130
- export declare const UI_COLORS: {
131
- readonly green: "\u001B[32m";
132
- readonly yellow: "\u001B[33m";
133
- readonly cyan: "\u001B[36m";
134
- readonly magenta: "\u001B[35m";
135
- readonly red: "\u001B[31m";
136
- readonly dim: "\u001B[2m";
137
- readonly reset: "\u001B[0m";
138
- readonly bold: "\u001B[1m";
139
- readonly reverse: "\u001B[7m";
140
- };
141
- export type UIColor = keyof typeof UI_COLORS;
142
- /**
143
- * Validate that mode controls have all required toggles
144
- */
145
- export declare function validateModeControls(controls: {
146
- editMode?: EditGuardMode;
147
- thinkingEnabled?: boolean;
148
- verificationEnabled?: boolean;
149
- autoContinueEnabled?: boolean;
150
- }): {
151
- valid: boolean;
152
- errors: string[];
153
- };
154
- /**
155
- * Validate streaming state transitions
156
- */
157
- export declare function validateStreamingTransition(fromMode: InputMode, toMode: InputMode, actions: {
158
- hideCursor?: boolean;
159
- showCursor?: boolean;
160
- addNewline?: boolean;
161
- }): {
162
- valid: boolean;
163
- errors: string[];
164
- };
165
- /**
166
- * Validate input area has all required components
167
- */
168
- export declare function validateInputAreaComponents(components: string[]): {
169
- valid: boolean;
170
- errors: string[];
171
- };
172
- export declare const DEFAULT_UI_CONFIG: {
173
- readonly banner: {
174
- readonly minWidth: 42;
175
- readonly maxWidth: 110;
176
- };
177
- readonly inputArea: {
178
- readonly maxLines: 15;
179
- readonly maxLength: 10000;
180
- readonly promptChar: "> ";
181
- readonly continuationChar: "│ ";
182
- readonly reservedLines: 5;
183
- };
184
- readonly modeControls: {
185
- readonly separator: " Ā· ";
186
- readonly shortcut: "(⇧⇄)";
187
- };
188
- readonly divider: {
189
- readonly char: "─";
190
- };
191
- };
192
- export declare function isValidInputMode(mode: string): mode is InputMode;
193
- export declare function isValidEditGuardMode(mode: string): mode is EditGuardMode;
194
- export declare function isValidStatusTone(tone: string): tone is StatusTone;
195
- //# sourceMappingURL=terminalUISchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"terminalUISchema.d.ts","sourceRoot":"","sources":["../../src/ui/terminalUISchema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAEvD,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;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,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAiBvC;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5E;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAqBtC;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAWtG;AAMD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAmBpB,CAAC;AAMX,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAEhE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,aAAa,CAExE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,UAAU,CAElE"}
@@ -1,113 +0,0 @@
1
- /**
2
- * Terminal UI Schema - Hard enforcement of UI structure and behavior
3
- *
4
- * This schema defines the correct structure for terminal UI components.
5
- * Changes that violate these constraints should fail at compile time.
6
- */
7
- // =============================================================================
8
- // COLOR SCHEMA - Defines the color palette
9
- // =============================================================================
10
- export const UI_COLORS = {
11
- green: '\x1b[32m',
12
- yellow: '\x1b[33m',
13
- cyan: '\x1b[36m',
14
- magenta: '\x1b[35m',
15
- red: '\x1b[31m',
16
- dim: '\x1b[2m',
17
- reset: '\x1b[0m',
18
- bold: '\x1b[1m',
19
- reverse: '\x1b[7m',
20
- };
21
- // =============================================================================
22
- // VALIDATION FUNCTIONS - Runtime checks for UI correctness
23
- // =============================================================================
24
- /**
25
- * Validate that mode controls have all required toggles
26
- */
27
- export function validateModeControls(controls) {
28
- const errors = [];
29
- if (controls.editMode === undefined) {
30
- errors.push('editMode is required');
31
- }
32
- if (controls.thinkingEnabled === undefined) {
33
- errors.push('thinkingEnabled is required');
34
- }
35
- if (controls.verificationEnabled === undefined) {
36
- errors.push('verificationEnabled is required');
37
- }
38
- if (controls.autoContinueEnabled === undefined) {
39
- errors.push('autoContinueEnabled is required');
40
- }
41
- return { valid: errors.length === 0, errors };
42
- }
43
- /**
44
- * Validate streaming state transitions
45
- */
46
- export function validateStreamingTransition(fromMode, toMode, actions) {
47
- const errors = [];
48
- if (fromMode === 'idle' && toMode === 'streaming') {
49
- // Entering streaming - cursor should be hidden
50
- if (!actions.hideCursor) {
51
- errors.push('Must hide cursor when entering streaming mode');
52
- }
53
- }
54
- if (fromMode === 'streaming' && toMode === 'idle') {
55
- // Exiting streaming - cursor should be shown, newline added
56
- if (!actions.showCursor) {
57
- errors.push('Must show cursor when exiting streaming mode');
58
- }
59
- if (!actions.addNewline) {
60
- errors.push('Must add newline after streaming content');
61
- }
62
- }
63
- return { valid: errors.length === 0, errors };
64
- }
65
- /**
66
- * Validate input area has all required components
67
- */
68
- export function validateInputAreaComponents(components) {
69
- const required = ['statusBar', 'topDivider', 'inputLines', 'bottomDivider', 'modeControls'];
70
- const errors = [];
71
- for (const req of required) {
72
- if (!components.includes(req)) {
73
- errors.push(`Missing required component: ${req}`);
74
- }
75
- }
76
- return { valid: errors.length === 0, errors };
77
- }
78
- // =============================================================================
79
- // DEFAULT CONFIGURATION - The correct defaults
80
- // =============================================================================
81
- export const DEFAULT_UI_CONFIG = {
82
- banner: {
83
- minWidth: 42,
84
- maxWidth: 110,
85
- },
86
- inputArea: {
87
- maxLines: 15,
88
- maxLength: 10000,
89
- promptChar: '> ',
90
- continuationChar: '│ ',
91
- reservedLines: 5, // status + divider + input + divider + controls
92
- },
93
- modeControls: {
94
- separator: ' Ā· ',
95
- shortcut: '(⇧⇄)',
96
- },
97
- divider: {
98
- char: '─',
99
- },
100
- };
101
- // =============================================================================
102
- // TYPE GUARDS - Ensure type safety at runtime
103
- // =============================================================================
104
- export function isValidInputMode(mode) {
105
- return mode === 'idle' || mode === 'streaming' || mode === 'paste';
106
- }
107
- export function isValidEditGuardMode(mode) {
108
- return mode === 'display-edits' || mode === 'ask-permission';
109
- }
110
- export function isValidStatusTone(tone) {
111
- return ['info', 'warn', 'error', 'success', 'muted'].includes(tone);
112
- }
113
- //# sourceMappingURL=terminalUISchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"terminalUISchema.js","sourceRoot":"","sources":["../../src/ui/terminalUISchema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuHH,gFAAgF;AAChF,2CAA2C;AAC3C,gFAAgF;AAEhF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,UAAU;IACnB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,gFAAgF;AAChF,2DAA2D;AAC3D,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAKpC;IACC,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,QAAQ,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,QAAQ,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,C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ploys and configures complete security testing capabilities.
7
- */
8
-
9
- import { UltimateSecurityCapabilityModule } from '../dist/capabilities/ultimateSecurityCapability.js';
10
- import { AuthorizationManager } from '../dist/security/authorization.js';
11
-
12
- /**
13
- * Deploy security capabilities
14
- */
15
- async function deploySecurityCapabilities() {
16
- console.log('šŸš€ DEPLOYING SECURITY CAPABILITIES');
17
- console.log('='.repeat(60));
18
-
19
- try {
20
- // Check environment configuration
21
- console.log('\nšŸ”§ Checking Environment Configuration...');
22
-
23
- const authToken = process.env.SECURITY_AUTHORIZATION_TOKEN;
24
- const bypassAuth = process.env.BYPASS_AUTHORIZATION === 'true';
25
-
26
- if (!authToken && !bypassAuth) {
27
- console.warn('āš ļø SECURITY_AUTHORIZATION_TOKEN not set in environment');
28
- console.log('šŸ’” Set environment variable: export SECURITY_AUTHORIZATION_TOKEN="your-token"');
29
- console.log('šŸ’” Or set BYPASS_AUTHORIZATION=true for development (NOT RECOMMENDED)');
30
- } else if (bypassAuth) {
31
- console.warn('āš ļø AUTHORIZATION BYPASSED - FOR DEVELOPMENT ONLY');
32
- } else {
33
- console.log('āœ… Authorization token configured');
34
- }
35
-
36
- // Create authorization manager
37
- console.log('\nšŸ” Creating Authorization Manager...');
38
- const authManager = new AuthorizationManager();
39
-
40
- // Create ultimate security capability
41
- console.log('\nšŸ—ļø Creating Ultimate Security Capability...');
42
- const ultimateSecurity = new UltimateSecurityCapabilityModule({
43
- enableExploitation: true,
44
- enableAdvancedExploitation: true,
45
- enablePayloadGeneration: true,
46
- requireAuthorization: true,
47
- authorizationManager: authManager,
48
- description: 'Complete security testing capabilities deployed via script'
49
- });
50
-
51
- // Display deployment summary
52
- console.log('\nšŸ“Š DEPLOYMENT SUMMARY');
53
- console.log('-'.repeat(40));
54
- console.log(`Capability ID: ${ultimateSecurity.id}`);
55
- console.log('Configuration:');
56
- console.log(' - enableExploitation: true');
57
- console.log(' - enableAdvancedExploitation: true');
58
- console.log(' - enablePayloadGeneration: true');
59
- console.log(' - requireAuthorization: true');
60
-
61
- console.log('\nšŸ”§ Available Tools:');
62
- console.log(' Authorization Tools (3):');
63
- console.log(' - request_security_authorization');
64
- console.log(' - get_authorization_status');
65
- console.log(' - generate_authorization_report');
66
-
67
- console.log('\n Real Security Tools (11):');
68
- console.log(' - real_scan_network');
69
- console.log(' - real_scan_vulnerabilities');
70
- console.log(' - real_exploit_sql_injection');
71
- console.log(' - real_exploit_xss');
72
- console.log(' - real_exploit_ssh');
73
- console.log(' - real_exploit_ftp');
74
- console.log(' - real_exploit_smb');
75
- console.log(' - real_implement_persistence');
76
- console.log(' - real_detect_persistence');
77
- console.log(' - real_remove_persistence');
78
- console.log(' - real_generate_security_report');
79
-
80
- console.log('\n Offensive Security Tools (8):');
81
- console.log(' - generate_reverse_shell');
82
- console.log(' - create_fileless_persistence');
83
- console.log(' - deploy_web_shell');
84
- console.log(' - create_scheduled_persistence');
85
- console.log(' - generate_obfuscated_payloads');
86
- console.log(' - setup_dns_tunneling');
87
- console.log(' - generate_phishing_templates');
88
- console.log(' - create_backdoor_user');
89
-
90
- console.log('\nšŸ“‹ Total: 22 Security Testing Tools');
91
-
92
- // Test authorization status
93
- console.log('\nšŸ” Testing Authorization Status...');
94
- const authStatus = authManager.getAuthorizationStatus();
95
- console.log(`Authorization Status: ${authStatus.authorized ? 'AUTHORIZED' : 'NOT AUTHORIZED'}`);
96
- if (authStatus.reason) {
97
- console.log(`Reason: ${authStatus.reason}`);
98
- }
99
-
100
- // Generate deployment report
101
- console.log('\nšŸ“„ Generating Deployment Report...');
102
- const deploymentReport = generateDeploymentReport(ultimateSecurity, authManager);
103
- console.log(deploymentReport);
104
-
105
- console.log('\nāœ… SECURITY CAPABILITIES DEPLOYMENT COMPLETED');
106
- console.log('='.repeat(60));
107
-
108
- console.log('\nšŸ’” Next Steps:');
109
- console.log(' 1. Request authorization using request_security_authorization');
110
- console.log(' 2. Define testing scope and targets');
111
- console.log(' 3. Begin security testing activities');
112
- console.log(' 4. Generate comprehensive reports');
113
- console.log(' 5. Follow responsible disclosure practices');
114
-
115
- } catch (error) {
116
- console.error('āŒ Deployment failed:', error);
117
- process.exit(1);
118
- }
119
- }
120
-
121
- /**
122
- * Generate deployment report
123
- */
124
- function generateDeploymentReport(capability, authManager) {
125
- let report = 'SECURITY CAPABILITIES DEPLOYMENT REPORT\n';
126
- report += '='.repeat(50) + '\n';
127
- report += `Deployment Time: ${new Date().toISOString()}\n`;
128
- report += `Capability ID: ${capability.id}\n`;
129
- report += `\nConfiguration:\n`;
130
- report += ` - enableExploitation: true\n`;
131
- report += ` - enableAdvancedExploitation: true\n`;
132
- report += ` - enablePayloadGeneration: true\n`;
133
- report += ` - requireAuthorization: true\n`;
134
-
135
- const authStatus = authManager.getAuthorizationStatus();
136
- report += `\nAuthorization Status: ${authStatus.authorized ? 'ACTIVE' : 'INACTIVE'}\n`;
137
- if (authStatus.reason) {
138
- report += `Authorization Reason: ${authStatus.reason}\n`;
139
- }
140
-
141
- report += `\nAvailable Tools: 22\n`;
142
- report += ` - Authorization: 3 tools\n`;
143
- report += ` - Real Security: 11 tools\n`;
144
- report += ` - Offensive Security: 8 tools\n`;
145
-
146
- report += `\nLegal Notice:\n`;
147
- report += `All security testing tools require explicit authorization and scope definition.\n`;
148
- report += `Intended for legitimate security testing, red team exercises, and authorized penetration testing only.\n`;
149
- report += `Unauthorized use is illegal and unethical.\n`;
150
-
151
- return report;
152
- }
153
-
154
- /**
155
- * Main deployment function
156
- */
157
- async function main() {
158
- console.log('šŸ”’ Erosolar CLI Security Capabilities Deployment');
159
- console.log('='.repeat(60));
160
-
161
- await deploySecurityCapabilities();
162
-
163
- console.log('\nšŸŽ‰ Deployment completed successfully!');
164
- console.log('\nšŸ“š Documentation:');
165
- console.log(' - docs/OFFENSIVE_SECURITY_CAPABILITIES.md');
166
- console.log(' - examples/ultimate-security-testing.ts');
167
- console.log(' - config/security-deployment.json');
168
- }
169
-
170
- // Run deployment
171
- if (import.meta.url === `file://${process.argv[1]}`) {
172
- main().catch(error => {
173
- console.error('āŒ Deployment failed:', error);
174
- process.exit(1);
175
- });
176
- }
177
-
178
- export { deploySecurityCapabilities };