erosolar-cli 1.7.334 ā 1.7.336
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.
- package/README.md +24 -148
- package/dist/bin/erosolar.js +5 -21
- package/dist/bin/erosolar.js.map +1 -1
- package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -1
- package/dist/capabilities/agentSpawningCapability.js +56 -31
- package/dist/capabilities/agentSpawningCapability.js.map +1 -1
- package/dist/contracts/agent-schemas.json +0 -15
- package/dist/contracts/tools.schema.json +0 -9
- package/dist/core/agent.d.ts +2 -2
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/core/customCommands.d.ts +1 -0
- package/dist/core/customCommands.d.ts.map +1 -1
- package/dist/core/customCommands.js +3 -0
- package/dist/core/customCommands.js.map +1 -1
- package/dist/core/hooks.d.ts +113 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +267 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/metricsTracker.d.ts +122 -0
- package/dist/core/metricsTracker.d.ts.map +1 -0
- package/dist/{alpha-zero ā core}/metricsTracker.js +2 -5
- package/dist/core/metricsTracker.js.map +1 -0
- package/dist/core/securityAssessment.d.ts +91 -0
- package/dist/core/securityAssessment.d.ts.map +1 -0
- package/dist/core/securityAssessment.js +580 -0
- package/dist/core/securityAssessment.js.map +1 -0
- package/dist/core/toolPreconditions.d.ts.map +1 -1
- package/dist/core/toolPreconditions.js +0 -14
- package/dist/core/toolPreconditions.js.map +1 -1
- package/dist/core/toolRuntime.d.ts +22 -1
- package/dist/core/toolRuntime.d.ts.map +1 -1
- package/dist/core/toolRuntime.js +0 -5
- package/dist/core/toolRuntime.js.map +1 -1
- package/dist/core/toolValidation.d.ts.map +1 -1
- package/dist/core/toolValidation.js +14 -3
- package/dist/core/toolValidation.js.map +1 -1
- package/dist/core/validationRunner.d.ts +1 -3
- package/dist/core/validationRunner.d.ts.map +1 -1
- package/dist/core/validationRunner.js.map +1 -1
- package/dist/core/verification.d.ts +137 -0
- package/dist/core/verification.d.ts.map +1 -0
- package/dist/core/verification.js +323 -0
- package/dist/core/verification.js.map +1 -0
- package/dist/headless/headlessApp.d.ts.map +1 -1
- package/dist/headless/headlessApp.js +21 -0
- package/dist/headless/headlessApp.js.map +1 -1
- package/dist/mcp/sseClient.d.ts.map +1 -1
- package/dist/mcp/sseClient.js +9 -18
- package/dist/mcp/sseClient.js.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
- package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.js +4 -10
- package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
- package/dist/plugins/tools/nodeDefaults.js +0 -2
- package/dist/plugins/tools/nodeDefaults.js.map +1 -1
- package/dist/runtime/agentSession.d.ts +2 -2
- package/dist/runtime/agentSession.d.ts.map +1 -1
- package/dist/runtime/agentSession.js +2 -2
- package/dist/runtime/agentSession.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +16 -7
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +235 -166
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/shellApp.d.ts +2 -0
- package/dist/shell/shellApp.d.ts.map +1 -1
- package/dist/shell/shellApp.js +40 -9
- package/dist/shell/shellApp.js.map +1 -1
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +1 -4
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +149 -118
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +638 -532
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts +79 -21
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +99 -30
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/subagents/agentConfig.d.ts +27 -0
- package/dist/subagents/agentConfig.d.ts.map +1 -0
- package/dist/subagents/agentConfig.js +89 -0
- package/dist/subagents/agentConfig.js.map +1 -0
- package/dist/subagents/agentRegistry.d.ts +33 -0
- package/dist/subagents/agentRegistry.d.ts.map +1 -0
- package/dist/subagents/agentRegistry.js +162 -0
- package/dist/subagents/agentRegistry.js.map +1 -0
- package/dist/subagents/taskRunner.d.ts +7 -1
- package/dist/subagents/taskRunner.d.ts.map +1 -1
- package/dist/subagents/taskRunner.js +180 -47
- package/dist/subagents/taskRunner.js.map +1 -1
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +13 -12
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/display.d.ts +24 -45
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +140 -259
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/theme.js +6 -8
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts +0 -158
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +0 -348
- package/dist/ui/toolDisplay.js.map +1 -1
- package/dist/ui/unified/layout.d.ts +1 -0
- package/dist/ui/unified/layout.d.ts.map +1 -1
- package/dist/ui/unified/layout.js +15 -25
- package/dist/ui/unified/layout.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +10 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +78 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/package.json +4 -4
- package/dist/alpha-zero/agentWrapper.d.ts +0 -84
- package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
- package/dist/alpha-zero/agentWrapper.js +0 -171
- package/dist/alpha-zero/agentWrapper.js.map +0 -1
- package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
- package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
- package/dist/alpha-zero/codeEvaluator.js +0 -273
- package/dist/alpha-zero/codeEvaluator.js.map +0 -1
- package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
- package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
- package/dist/alpha-zero/competitiveRunner.js +0 -224
- package/dist/alpha-zero/competitiveRunner.js.map +0 -1
- package/dist/alpha-zero/index.d.ts +0 -67
- package/dist/alpha-zero/index.d.ts.map +0 -1
- package/dist/alpha-zero/index.js +0 -99
- package/dist/alpha-zero/index.js.map +0 -1
- package/dist/alpha-zero/introspection.d.ts +0 -128
- package/dist/alpha-zero/introspection.d.ts.map +0 -1
- package/dist/alpha-zero/introspection.js +0 -300
- package/dist/alpha-zero/introspection.js.map +0 -1
- package/dist/alpha-zero/metricsTracker.d.ts +0 -71
- package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
- package/dist/alpha-zero/metricsTracker.js.map +0 -1
- package/dist/alpha-zero/security/core.d.ts +0 -125
- package/dist/alpha-zero/security/core.d.ts.map +0 -1
- package/dist/alpha-zero/security/core.js +0 -271
- package/dist/alpha-zero/security/core.js.map +0 -1
- package/dist/alpha-zero/security/google.d.ts +0 -125
- package/dist/alpha-zero/security/google.d.ts.map +0 -1
- package/dist/alpha-zero/security/google.js +0 -311
- package/dist/alpha-zero/security/google.js.map +0 -1
- package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
- package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
- package/dist/alpha-zero/security/googleLoader.js +0 -41
- package/dist/alpha-zero/security/googleLoader.js.map +0 -1
- package/dist/alpha-zero/security/index.d.ts +0 -29
- package/dist/alpha-zero/security/index.d.ts.map +0 -1
- package/dist/alpha-zero/security/index.js +0 -32
- package/dist/alpha-zero/security/index.js.map +0 -1
- package/dist/alpha-zero/security/simulation.d.ts +0 -124
- package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
- package/dist/alpha-zero/security/simulation.js +0 -277
- package/dist/alpha-zero/security/simulation.js.map +0 -1
- package/dist/alpha-zero/selfModification.d.ts +0 -109
- package/dist/alpha-zero/selfModification.d.ts.map +0 -1
- package/dist/alpha-zero/selfModification.js +0 -233
- package/dist/alpha-zero/selfModification.js.map +0 -1
- package/dist/alpha-zero/types.d.ts +0 -170
- package/dist/alpha-zero/types.d.ts.map +0 -1
- package/dist/alpha-zero/types.js +0 -31
- package/dist/alpha-zero/types.js.map +0 -1
- package/dist/capabilities/securityTestingCapability.d.ts +0 -13
- package/dist/capabilities/securityTestingCapability.d.ts.map +0 -1
- package/dist/capabilities/securityTestingCapability.js +0 -25
- package/dist/capabilities/securityTestingCapability.js.map +0 -1
- package/dist/core/aiFlowOptimizer.d.ts +0 -26
- package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
- package/dist/core/aiFlowOptimizer.js +0 -31
- package/dist/core/aiFlowOptimizer.js.map +0 -1
- package/dist/core/aiOptimizationEngine.d.ts +0 -158
- package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
- package/dist/core/aiOptimizationEngine.js +0 -428
- package/dist/core/aiOptimizationEngine.js.map +0 -1
- package/dist/core/aiOptimizationIntegration.d.ts +0 -93
- package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
- package/dist/core/aiOptimizationIntegration.js +0 -250
- package/dist/core/aiOptimizationIntegration.js.map +0 -1
- package/dist/core/enhancedErrorRecovery.d.ts +0 -100
- package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
- package/dist/core/enhancedErrorRecovery.js +0 -345
- package/dist/core/enhancedErrorRecovery.js.map +0 -1
- package/dist/core/hooksSystem.d.ts +0 -65
- package/dist/core/hooksSystem.d.ts.map +0 -1
- package/dist/core/hooksSystem.js +0 -273
- package/dist/core/hooksSystem.js.map +0 -1
- package/dist/core/memorySystem.d.ts +0 -48
- package/dist/core/memorySystem.d.ts.map +0 -1
- package/dist/core/memorySystem.js +0 -271
- package/dist/core/memorySystem.js.map +0 -1
- package/dist/core/unified/errors.d.ts +0 -189
- package/dist/core/unified/errors.d.ts.map +0 -1
- package/dist/core/unified/errors.js +0 -497
- package/dist/core/unified/errors.js.map +0 -1
- package/dist/core/unified/index.d.ts +0 -19
- package/dist/core/unified/index.d.ts.map +0 -1
- package/dist/core/unified/index.js +0 -68
- package/dist/core/unified/index.js.map +0 -1
- package/dist/core/unified/schema.d.ts +0 -101
- package/dist/core/unified/schema.d.ts.map +0 -1
- package/dist/core/unified/schema.js +0 -350
- package/dist/core/unified/schema.js.map +0 -1
- package/dist/core/unified/toolRuntime.d.ts +0 -179
- package/dist/core/unified/toolRuntime.d.ts.map +0 -1
- package/dist/core/unified/toolRuntime.js +0 -517
- package/dist/core/unified/toolRuntime.js.map +0 -1
- package/dist/core/unified/tools.d.ts +0 -127
- package/dist/core/unified/tools.d.ts.map +0 -1
- package/dist/core/unified/tools.js +0 -1333
- package/dist/core/unified/tools.js.map +0 -1
- package/dist/core/unified/types.d.ts +0 -352
- package/dist/core/unified/types.d.ts.map +0 -1
- package/dist/core/unified/types.js +0 -12
- package/dist/core/unified/types.js.map +0 -1
- package/dist/core/unified/version.d.ts +0 -209
- package/dist/core/unified/version.d.ts.map +0 -1
- package/dist/core/unified/version.js +0 -454
- package/dist/core/unified/version.js.map +0 -1
- package/dist/plugins/tools/security/securityPlugin.d.ts +0 -3
- package/dist/plugins/tools/security/securityPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/security/securityPlugin.js +0 -12
- package/dist/plugins/tools/security/securityPlugin.js.map +0 -1
- package/dist/security/active-stack-security.d.ts +0 -112
- package/dist/security/active-stack-security.d.ts.map +0 -1
- package/dist/security/active-stack-security.js +0 -296
- package/dist/security/active-stack-security.js.map +0 -1
- package/dist/security/advanced-persistence-research.d.ts +0 -92
- package/dist/security/advanced-persistence-research.d.ts.map +0 -1
- package/dist/security/advanced-persistence-research.js +0 -195
- package/dist/security/advanced-persistence-research.js.map +0 -1
- package/dist/security/advanced-targeting.d.ts +0 -119
- package/dist/security/advanced-targeting.d.ts.map +0 -1
- package/dist/security/advanced-targeting.js +0 -233
- package/dist/security/advanced-targeting.js.map +0 -1
- package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
- package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
- package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
- package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
- package/dist/security/authorization/securityAuthorization.d.ts +0 -88
- package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
- package/dist/security/authorization/securityAuthorization.js +0 -172
- package/dist/security/authorization/securityAuthorization.js.map +0 -1
- package/dist/security/comprehensive-targeting.d.ts +0 -85
- package/dist/security/comprehensive-targeting.d.ts.map +0 -1
- package/dist/security/comprehensive-targeting.js +0 -438
- package/dist/security/comprehensive-targeting.js.map +0 -1
- package/dist/security/global-security-integration.d.ts +0 -91
- package/dist/security/global-security-integration.d.ts.map +0 -1
- package/dist/security/global-security-integration.js +0 -218
- package/dist/security/global-security-integration.js.map +0 -1
- package/dist/security/index.d.ts +0 -38
- package/dist/security/index.d.ts.map +0 -1
- package/dist/security/index.js +0 -47
- package/dist/security/index.js.map +0 -1
- package/dist/security/persistence-analyzer.d.ts +0 -56
- package/dist/security/persistence-analyzer.d.ts.map +0 -1
- package/dist/security/persistence-analyzer.js +0 -187
- package/dist/security/persistence-analyzer.js.map +0 -1
- package/dist/security/persistence-cli.d.ts +0 -36
- package/dist/security/persistence-cli.d.ts.map +0 -1
- package/dist/security/persistence-cli.js +0 -160
- package/dist/security/persistence-cli.js.map +0 -1
- package/dist/security/persistence-research.d.ts +0 -92
- package/dist/security/persistence-research.d.ts.map +0 -1
- package/dist/security/persistence-research.js +0 -364
- package/dist/security/persistence-research.js.map +0 -1
- package/dist/security/research/persistenceResearch.d.ts +0 -97
- package/dist/security/research/persistenceResearch.d.ts.map +0 -1
- package/dist/security/research/persistenceResearch.js +0 -282
- package/dist/security/research/persistenceResearch.js.map +0 -1
- package/dist/security/security-integration.d.ts +0 -74
- package/dist/security/security-integration.d.ts.map +0 -1
- package/dist/security/security-integration.js +0 -137
- package/dist/security/security-integration.js.map +0 -1
- package/dist/security/security-testing-framework.d.ts +0 -112
- package/dist/security/security-testing-framework.d.ts.map +0 -1
- package/dist/security/security-testing-framework.js +0 -364
- package/dist/security/security-testing-framework.js.map +0 -1
- package/dist/security/simulation/attackSimulation.d.ts +0 -93
- package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
- package/dist/security/simulation/attackSimulation.js +0 -341
- package/dist/security/simulation/attackSimulation.js.map +0 -1
- package/dist/security/strategic-operations.d.ts +0 -100
- package/dist/security/strategic-operations.d.ts.map +0 -1
- package/dist/security/strategic-operations.js +0 -276
- package/dist/security/strategic-operations.js.map +0 -1
- package/dist/security/tool-security-wrapper.d.ts +0 -58
- package/dist/security/tool-security-wrapper.d.ts.map +0 -1
- package/dist/security/tool-security-wrapper.js +0 -156
- package/dist/security/tool-security-wrapper.js.map +0 -1
- package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
- package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
- package/dist/shell/claudeCodeStreamHandler.js +0 -322
- package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
- package/dist/shell/inputQueueManager.d.ts +0 -144
- package/dist/shell/inputQueueManager.d.ts.map +0 -1
- package/dist/shell/inputQueueManager.js +0 -290
- package/dist/shell/inputQueueManager.js.map +0 -1
- package/dist/shell/metricsTracker.d.ts +0 -60
- package/dist/shell/metricsTracker.d.ts.map +0 -1
- package/dist/shell/metricsTracker.js +0 -119
- package/dist/shell/metricsTracker.js.map +0 -1
- package/dist/shell/streamingOutputManager.d.ts +0 -115
- package/dist/shell/streamingOutputManager.d.ts.map +0 -1
- package/dist/shell/streamingOutputManager.js +0 -225
- package/dist/shell/streamingOutputManager.js.map +0 -1
- package/dist/tools/securityTools.d.ts +0 -22
- package/dist/tools/securityTools.d.ts.map +0 -1
- package/dist/tools/securityTools.js +0 -448
- package/dist/tools/securityTools.js.map +0 -1
- package/dist/ui/persistentPrompt.d.ts +0 -50
- package/dist/ui/persistentPrompt.d.ts.map +0 -1
- package/dist/ui/persistentPrompt.js +0 -92
- package/dist/ui/persistentPrompt.js.map +0 -1
- package/dist/ui/terminalUISchema.d.ts +0 -195
- package/dist/ui/terminalUISchema.d.ts.map +0 -1
- package/dist/ui/terminalUISchema.js +0 -113
- package/dist/ui/terminalUISchema.js.map +0 -1
- 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;AAE/D,sCAAsC;AACtC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAMzE;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B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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,EA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MAAM;KACjB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,GAAG;KACV;CACO,CAAC;AAEX,gFAAgF;AAChF,8CAA8C;AAC9C,gFAAgF;AAEhF,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,OAAO,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,eAAe,IAAI,IAAI,KAAK,gBAAgB,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Security Capabilities Deployment Script
|
|
5
|
-
*
|
|
6
|
-
* Deploys 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 };
|