erosolar-cli 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/security-deployment.json +54 -0
- package/dist/active-stack-security.d.ts +110 -0
- package/dist/active-stack-security.js +313 -0
- package/dist/active-stack-security.js.map +1 -0
- package/dist/advanced-targeting.d.ts +113 -0
- package/dist/advanced-targeting.js +252 -0
- package/dist/advanced-targeting.js.map +1 -0
- package/dist/bin/adapters/node/index.js +33 -0
- package/dist/bin/adapters/types.js +1 -0
- package/dist/bin/alpha-zero/agentWrapper.js +165 -0
- package/dist/bin/alpha-zero/codeEvaluator.js +272 -0
- package/dist/bin/alpha-zero/competitiveRunner.js +219 -0
- package/dist/bin/alpha-zero/index.js +98 -0
- package/dist/bin/alpha-zero/introspection.js +298 -0
- package/dist/bin/alpha-zero/metricsTracker.js +207 -0
- package/dist/bin/alpha-zero/security/core.js +269 -0
- package/dist/bin/alpha-zero/security/google.js +308 -0
- package/dist/bin/alpha-zero/security/googleLoader.js +40 -0
- package/dist/bin/alpha-zero/security/index.js +31 -0
- package/dist/bin/alpha-zero/security/simulation.js +274 -0
- package/dist/bin/alpha-zero/selfModification.js +231 -0
- package/dist/bin/alpha-zero/types.js +30 -0
- package/dist/bin/bin/erosolar-optimized.js +205 -0
- package/dist/bin/capabilities/agentSpawningCapability.js +116 -0
- package/dist/bin/capabilities/bashCapability.js +22 -0
- package/dist/bin/capabilities/cloudCapability.js +36 -0
- package/dist/bin/capabilities/codeAnalysisCapability.js +22 -0
- package/dist/bin/capabilities/codeQualityCapability.js +23 -0
- package/dist/bin/capabilities/dependencySecurityCapability.js +22 -0
- package/dist/bin/capabilities/devCapability.js +22 -0
- package/dist/bin/capabilities/editCapability.js +28 -0
- package/dist/bin/capabilities/emailCapability.js +20 -0
- package/dist/bin/capabilities/enhancedGitCapability.js +221 -0
- package/dist/bin/capabilities/filesystemCapability.js +22 -0
- package/dist/bin/capabilities/globCapability.js +28 -0
- package/dist/bin/capabilities/interactionCapability.js +20 -0
- package/dist/bin/capabilities/learnCapability.js +22 -0
- package/dist/bin/capabilities/mcpCapability.js +20 -0
- package/dist/bin/capabilities/notebookCapability.js +28 -0
- package/dist/bin/capabilities/planningCapability.js +27 -0
- package/dist/bin/capabilities/refactoringCapability.js +23 -0
- package/dist/bin/capabilities/repoChecksCapability.js +22 -0
- package/dist/bin/capabilities/searchCapability.js +22 -0
- package/dist/bin/capabilities/skillCapability.js +76 -0
- package/dist/bin/capabilities/taskManagementCapability.js +20 -0
- package/dist/bin/capabilities/testingCapability.js +23 -0
- package/dist/bin/capabilities/toolManifest.js +159 -0
- package/dist/bin/capabilities/toolRegistry.js +114 -0
- package/dist/bin/capabilities/webCapability.js +20 -0
- package/dist/bin/config.js +139 -0
- package/dist/bin/contracts/v1/agent.js +7 -0
- package/dist/bin/contracts/v1/agentProfileManifest.js +8 -0
- package/dist/bin/contracts/v1/agentRules.js +9 -0
- package/dist/bin/contracts/v1/toolAccess.js +8 -0
- package/dist/bin/core/agent.js +362 -0
- package/dist/bin/core/agentProfileManifest.js +187 -0
- package/dist/bin/core/agentProfiles.js +34 -0
- package/dist/bin/core/agentRulebook.js +135 -0
- package/dist/bin/core/agentSchemaLoader.js +233 -0
- package/dist/bin/core/contextManager.js +412 -0
- package/dist/bin/core/contextWindow.js +122 -0
- package/dist/bin/core/customCommands.js +80 -0
- package/dist/bin/core/errors/apiKeyErrors.js +114 -0
- package/dist/bin/core/errors/errorTypes.js +340 -0
- package/dist/bin/core/errors/safetyValidator.js +304 -0
- package/dist/bin/core/errors.js +32 -0
- package/dist/bin/core/modelDiscovery.js +755 -0
- package/dist/bin/core/preferences.js +224 -0
- package/dist/bin/core/schemaValidator.js +92 -0
- package/dist/bin/core/secretStore.js +199 -0
- package/dist/bin/core/sessionStore.js +187 -0
- package/dist/bin/core/toolRuntime.js +290 -0
- package/dist/bin/core/types.js +1 -0
- package/dist/bin/erosolar-optimized.d.ts +12 -0
- package/dist/bin/erosolar-optimized.d.ts.map +1 -0
- package/dist/bin/erosolar-optimized.js +239 -0
- package/dist/bin/erosolar-optimized.js.map +1 -0
- package/dist/bin/erosolar.js +14 -0
- package/dist/bin/erosolar.js.map +1 -1
- package/dist/bin/headless/headlessApp.js +172 -0
- package/dist/bin/mcp/config.js +202 -0
- package/dist/bin/mcp/stdioClient.js +172 -0
- package/dist/bin/mcp/toolBridge.js +104 -0
- package/dist/bin/mcp/types.js +1 -0
- package/dist/bin/plugins/index.js +113 -0
- package/dist/bin/plugins/providers/anthropic/index.js +25 -0
- package/dist/bin/plugins/providers/deepseek/index.js +24 -0
- package/dist/bin/plugins/providers/google/index.js +26 -0
- package/dist/bin/plugins/providers/index.js +19 -0
- package/dist/bin/plugins/providers/ollama/index.js +59 -0
- package/dist/bin/plugins/providers/openai/index.js +26 -0
- package/dist/bin/plugins/providers/xai/index.js +24 -0
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +8 -0
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +13 -0
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +13 -0
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +13 -0
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +11 -0
- package/dist/bin/plugins/tools/development/devPlugin.js +13 -0
- package/dist/bin/plugins/tools/edit/editPlugin.js +14 -0
- package/dist/bin/plugins/tools/email/emailPlugin.js +11 -0
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +8 -0
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +13 -0
- package/dist/bin/plugins/tools/glob/globPlugin.js +14 -0
- package/dist/bin/plugins/tools/index.js +2 -0
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +11 -0
- package/dist/bin/plugins/tools/learn/learnPlugin.js +13 -0
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +8 -0
- package/dist/bin/plugins/tools/nodeDefaults.js +56 -0
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +14 -0
- package/dist/bin/plugins/tools/planning/planningPlugin.js +14 -0
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +11 -0
- package/dist/bin/plugins/tools/registry.js +57 -0
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +13 -0
- package/dist/bin/plugins/tools/skills/skillPlugin.js +8 -0
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +11 -0
- package/dist/bin/plugins/tools/testing/testingPlugin.js +11 -0
- package/dist/bin/plugins/tools/web/webPlugin.js +11 -0
- package/dist/bin/providers/anthropicProvider.js +329 -0
- package/dist/bin/providers/googleProvider.js +203 -0
- package/dist/bin/providers/openaiChatCompletionsProvider.js +208 -0
- package/dist/bin/providers/openaiResponsesProvider.js +249 -0
- package/dist/bin/providers/providerFactory.js +24 -0
- package/dist/bin/runtime/agentController.js +321 -0
- package/dist/bin/runtime/agentHost.js +153 -0
- package/dist/bin/runtime/agentSession.js +195 -0
- package/dist/bin/runtime/node.js +10 -0
- package/dist/bin/runtime/universal.js +28 -0
- package/dist/bin/shell/bracketedPasteManager.js +350 -0
- package/dist/bin/shell/fileChangeTracker.js +65 -0
- package/dist/bin/shell/interactiveShell.js +2908 -0
- package/dist/bin/shell/liveStatus.js +78 -0
- package/dist/bin/shell/shellApp.js +290 -0
- package/dist/bin/shell/systemPrompt.js +60 -0
- package/dist/bin/shell/updateManager.js +108 -0
- package/dist/bin/skills/skillRepository.js +236 -0
- package/dist/bin/skills/types.js +1 -0
- package/dist/bin/subagents/taskRunner.js +269 -0
- package/dist/bin/tools/backgroundBashTools.js +211 -0
- package/dist/bin/tools/bashTools.js +159 -0
- package/dist/bin/tools/cloudTools.js +864 -0
- package/dist/bin/tools/codeAnalysisTools.js +641 -0
- package/dist/bin/tools/codeQualityTools.js +294 -0
- package/dist/bin/tools/dependencyTools.js +282 -0
- package/dist/bin/tools/devTools.js +238 -0
- package/dist/bin/tools/diffUtils.js +137 -0
- package/dist/bin/tools/editTools.js +134 -0
- package/dist/bin/tools/emailTools.js +448 -0
- package/dist/bin/tools/fileTools.js +282 -0
- package/dist/bin/tools/globTools.js +173 -0
- package/dist/bin/tools/grepTools.js +332 -0
- package/dist/bin/tools/interactionTools.js +170 -0
- package/dist/bin/tools/learnTools.js +1818 -0
- package/dist/bin/tools/notebookEditTools.js +196 -0
- package/dist/bin/tools/planningTools.js +46 -0
- package/dist/bin/tools/refactoringTools.js +293 -0
- package/dist/bin/tools/repoChecksTools.js +160 -0
- package/dist/bin/tools/searchTools.js +206 -0
- package/dist/bin/tools/skillTools.js +177 -0
- package/dist/bin/tools/taskManagementTools.js +156 -0
- package/dist/bin/tools/testingTools.js +232 -0
- package/dist/bin/tools/webTools.js +480 -0
- package/dist/bin/ui/ShellUIAdapter.js +459 -0
- package/dist/bin/ui/UnifiedUIController.js +183 -0
- package/dist/bin/ui/animation/AnimationScheduler.js +430 -0
- package/dist/bin/ui/codeHighlighter.js +854 -0
- package/dist/bin/ui/designSystem.js +121 -0
- package/dist/bin/ui/display.js +1222 -0
- package/dist/bin/ui/interrupts/InterruptManager.js +437 -0
- package/dist/bin/ui/layout.js +139 -0
- package/dist/bin/ui/orchestration/StatusOrchestrator.js +403 -0
- package/dist/bin/ui/outputMode.js +38 -0
- package/dist/bin/ui/persistentPrompt.js +183 -0
- package/dist/bin/ui/richText.js +338 -0
- package/dist/bin/ui/shortcutsHelp.js +87 -0
- package/dist/bin/ui/telemetry/UITelemetry.js +443 -0
- package/dist/bin/ui/textHighlighter.js +210 -0
- package/dist/bin/ui/theme.js +116 -0
- package/dist/bin/ui/toolDisplay.js +423 -0
- package/dist/bin/ui/toolDisplayAdapter.js +357 -0
- package/dist/bin/workspace.js +106 -0
- package/dist/bin/workspace.validator.js +213 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts +26 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/offensiveSecurityCapability.js +58 -0
- package/dist/capabilities/offensiveSecurityCapability.js.map +1 -0
- package/dist/capabilities/realSecurityCapability.d.ts +26 -0
- package/dist/capabilities/realSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/realSecurityCapability.js +53 -0
- package/dist/capabilities/realSecurityCapability.js.map +1 -0
- package/dist/capabilities/securityCapability.d.ts +32 -0
- package/dist/capabilities/securityCapability.d.ts.map +1 -0
- package/dist/capabilities/securityCapability.js +57 -0
- package/dist/capabilities/securityCapability.js.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts +42 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.js +96 -0
- package/dist/capabilities/ultimateSecurityCapability.js.map +1 -0
- package/dist/core/LazyLoader.d.ts +129 -0
- package/dist/core/LazyLoader.d.ts.map +1 -0
- package/dist/core/LazyLoader.js +240 -0
- package/dist/core/LazyLoader.js.map +1 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +78 -8
- package/dist/core/agent.js.map +1 -1
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js +117 -16
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/intelligenceTools.d.ts +19 -0
- package/dist/core/intelligenceTools.d.ts.map +1 -0
- package/dist/core/intelligenceTools.js +453 -0
- package/dist/core/intelligenceTools.js.map +1 -0
- package/dist/core/operationalTools.d.ts +19 -0
- package/dist/core/operationalTools.d.ts.map +1 -0
- package/dist/core/operationalTools.js +467 -0
- package/dist/core/operationalTools.js.map +1 -0
- package/dist/intelligence/codeIntelligence.d.ts.map +1 -1
- package/dist/intelligence/codeIntelligence.js +12 -0
- package/dist/intelligence/codeIntelligence.js.map +1 -1
- package/dist/offensive/core/offensive-engine.d.ts +171 -0
- package/dist/offensive/core/offensive-engine.d.ts.map +1 -0
- package/dist/offensive/core/offensive-engine.js +345 -0
- package/dist/offensive/core/offensive-engine.js.map +1 -0
- package/dist/offensive/core/offensive-integration.d.ts +129 -0
- package/dist/offensive/core/offensive-integration.d.ts.map +1 -0
- package/dist/offensive/core/offensive-integration.js +364 -0
- package/dist/offensive/core/offensive-integration.js.map +1 -0
- package/dist/offensive/core/offensive-tools.d.ts +55 -0
- package/dist/offensive/core/offensive-tools.d.ts.map +1 -0
- package/dist/offensive/core/offensive-tools.js +438 -0
- package/dist/offensive/core/offensive-tools.js.map +1 -0
- package/dist/offensive/offensive-cli.d.ts +48 -0
- package/dist/offensive/offensive-cli.d.ts.map +1 -0
- package/dist/offensive/offensive-cli.js +233 -0
- package/dist/offensive/offensive-cli.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/security/active-stack-security.d.ts +112 -0
- package/dist/security/active-stack-security.d.ts.map +1 -0
- package/dist/security/active-stack-security.js +296 -0
- package/dist/security/active-stack-security.js.map +1 -0
- package/dist/security/advanced-persistence-research.d.ts +92 -0
- package/dist/security/advanced-persistence-research.d.ts.map +1 -0
- package/dist/security/advanced-persistence-research.js +195 -0
- package/dist/security/advanced-persistence-research.js.map +1 -0
- package/dist/security/advanced-targeting.d.ts +119 -0
- package/dist/security/advanced-targeting.d.ts.map +1 -0
- package/dist/security/advanced-targeting.js +233 -0
- package/dist/security/advanced-targeting.js.map +1 -0
- package/dist/security/apt-simulation-cli.d.ts +57 -0
- package/dist/security/apt-simulation-cli.d.ts.map +1 -0
- package/dist/security/apt-simulation-cli.js +278 -0
- package/dist/security/apt-simulation-cli.js.map +1 -0
- package/dist/security/apt-simulation-engine-complete.d.ts +97 -0
- package/dist/security/apt-simulation-engine-complete.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine-complete.js +441 -0
- package/dist/security/apt-simulation-engine-complete.js.map +1 -0
- package/dist/security/apt-simulation-engine.d.ts +97 -0
- package/dist/security/apt-simulation-engine.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine.js +441 -0
- package/dist/security/apt-simulation-engine.js.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
- package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
- package/dist/security/authorization/securityAuthorization.d.ts +88 -0
- package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
- package/dist/security/authorization/securityAuthorization.js +172 -0
- package/dist/security/authorization/securityAuthorization.js.map +1 -0
- package/dist/security/authorization.d.ts +45 -0
- package/dist/security/authorization.d.ts.map +1 -0
- package/dist/security/authorization.js +128 -0
- package/dist/security/authorization.js.map +1 -0
- package/dist/security/comprehensive-security-research.d.ts +84 -0
- package/dist/security/comprehensive-security-research.d.ts.map +1 -0
- package/dist/security/comprehensive-security-research.js +211 -0
- package/dist/security/comprehensive-security-research.js.map +1 -0
- package/dist/security/comprehensive-targeting.d.ts +85 -0
- package/dist/security/comprehensive-targeting.d.ts.map +1 -0
- package/dist/security/comprehensive-targeting.js +438 -0
- package/dist/security/comprehensive-targeting.js.map +1 -0
- package/dist/security/global-security-integration.d.ts +91 -0
- package/dist/security/global-security-integration.d.ts.map +1 -0
- package/dist/security/global-security-integration.js +218 -0
- package/dist/security/global-security-integration.js.map +1 -0
- package/dist/security/index.d.ts +38 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +47 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/offensive/exploitationEngine.d.ts +54 -0
- package/dist/security/offensive/exploitationEngine.d.ts.map +1 -0
- package/dist/security/offensive/exploitationEngine.js +263 -0
- package/dist/security/offensive/exploitationEngine.js.map +1 -0
- package/dist/security/persistence-cli.d.ts +36 -0
- package/dist/security/persistence-cli.d.ts.map +1 -0
- package/dist/security/persistence-cli.js +160 -0
- package/dist/security/persistence-cli.js.map +1 -0
- package/dist/security/persistence-research.d.ts +11 -0
- package/dist/security/persistence-research.d.ts.map +1 -1
- package/dist/security/persistence-research.js +11 -0
- package/dist/security/persistence-research.js.map +1 -1
- package/dist/security/real/networkExploitation.d.ts +92 -0
- package/dist/security/real/networkExploitation.d.ts.map +1 -0
- package/dist/security/real/networkExploitation.js +316 -0
- package/dist/security/real/networkExploitation.js.map +1 -0
- package/dist/security/real/persistenceImplementation.d.ts +62 -0
- package/dist/security/real/persistenceImplementation.d.ts.map +1 -0
- package/dist/security/real/persistenceImplementation.js +323 -0
- package/dist/security/real/persistenceImplementation.js.map +1 -0
- package/dist/security/real/vulnerabilityScanner.d.ts +73 -0
- package/dist/security/real/vulnerabilityScanner.d.ts.map +1 -0
- package/dist/security/real/vulnerabilityScanner.js +341 -0
- package/dist/security/real/vulnerabilityScanner.js.map +1 -0
- package/dist/security/research/persistenceResearch.d.ts +97 -0
- package/dist/security/research/persistenceResearch.d.ts.map +1 -0
- package/dist/security/research/persistenceResearch.js +282 -0
- package/dist/security/research/persistenceResearch.js.map +1 -0
- package/dist/security/security-integration.d.ts +74 -0
- package/dist/security/security-integration.d.ts.map +1 -0
- package/dist/security/security-integration.js +137 -0
- package/dist/security/security-integration.js.map +1 -0
- package/dist/security/security-testing-framework.d.ts +120 -0
- package/dist/security/security-testing-framework.d.ts.map +1 -0
- package/dist/security/security-testing-framework.js +372 -0
- package/dist/security/security-testing-framework.js.map +1 -0
- package/dist/security/simulation/attackSimulation.d.ts +93 -0
- package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
- package/dist/security/simulation/attackSimulation.js +341 -0
- package/dist/security/simulation/attackSimulation.js.map +1 -0
- package/dist/security/strategic-operations.d.ts +100 -0
- package/dist/security/strategic-operations.d.ts.map +1 -0
- package/dist/security/strategic-operations.js +276 -0
- package/dist/security/strategic-operations.js.map +1 -0
- package/dist/security/tool-security-wrapper.d.ts +58 -0
- package/dist/security/tool-security-wrapper.d.ts.map +1 -0
- package/dist/security/tool-security-wrapper.js +156 -0
- package/dist/security/tool-security-wrapper.js.map +1 -0
- package/dist/shell/bracketedPasteManager.d.ts +33 -0
- package/dist/shell/bracketedPasteManager.d.ts.map +1 -1
- package/dist/shell/bracketedPasteManager.js +101 -0
- package/dist/shell/bracketedPasteManager.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +22 -1
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +257 -24
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/taskCompletionDetector.d.ts +101 -0
- package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
- package/dist/shell/taskCompletionDetector.js +343 -0
- package/dist/shell/taskCompletionDetector.js.map +1 -0
- package/dist/tools/cloudTools.d.ts +11 -0
- package/dist/tools/cloudTools.d.ts.map +1 -1
- package/dist/tools/cloudTools.js +11 -0
- package/dist/tools/cloudTools.js.map +1 -1
- package/dist/tools/codeAnalysisTools.d.ts.map +1 -1
- package/dist/tools/codeAnalysisTools.js +23 -1
- package/dist/tools/codeAnalysisTools.js.map +1 -1
- package/dist/tools/enhancedSecurityTools.d.ts +19 -0
- package/dist/tools/enhancedSecurityTools.d.ts.map +1 -0
- package/dist/tools/enhancedSecurityTools.js +215 -0
- package/dist/tools/enhancedSecurityTools.js.map +1 -0
- package/dist/tools/fileTools.d.ts.map +1 -1
- package/dist/tools/fileTools.js +7 -0
- package/dist/tools/fileTools.js.map +1 -1
- package/dist/tools/grepTools.d.ts.map +1 -1
- package/dist/tools/grepTools.js +6 -0
- package/dist/tools/grepTools.js.map +1 -1
- package/dist/tools/offensiveSecurityTools.d.ts +16 -0
- package/dist/tools/offensiveSecurityTools.d.ts.map +1 -0
- package/dist/tools/offensiveSecurityTools.js +285 -0
- package/dist/tools/offensiveSecurityTools.js.map +1 -0
- package/dist/tools/realSecurityTools.d.ts +18 -0
- package/dist/tools/realSecurityTools.d.ts.map +1 -0
- package/dist/tools/realSecurityTools.js +468 -0
- package/dist/tools/realSecurityTools.js.map +1 -0
- package/dist/tools/securityTools.d.ts +20 -0
- package/dist/tools/securityTools.d.ts.map +1 -0
- package/dist/tools/securityTools.js +449 -0
- package/dist/tools/securityTools.js.map +1 -0
- package/dist/tools/webTools.js +9 -0
- package/dist/tools/webTools.js.map +1 -1
- package/package.json +26 -11
- package/scripts/deploy-security-capabilities.js +178 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AgentHost } from './agentHost.js';
|
|
2
|
+
export async function createUniversalRuntime(options) {
|
|
3
|
+
const env = options.env ? { ...options.env } : { ...process.env };
|
|
4
|
+
const host = new AgentHost({
|
|
5
|
+
profile: options.profile,
|
|
6
|
+
workspaceContext: options.workspaceContext,
|
|
7
|
+
workingDir: options.workingDir,
|
|
8
|
+
toolObserver: options.toolObserver,
|
|
9
|
+
env,
|
|
10
|
+
});
|
|
11
|
+
const adapterContext = {
|
|
12
|
+
profile: options.profile,
|
|
13
|
+
workspaceContext: options.workspaceContext,
|
|
14
|
+
workingDir: options.workingDir,
|
|
15
|
+
env,
|
|
16
|
+
};
|
|
17
|
+
const adapterModules = await options.adapter.createCapabilityModules(adapterContext);
|
|
18
|
+
const additionalModules = options.additionalModules ?? [];
|
|
19
|
+
if (adapterModules.length || additionalModules.length) {
|
|
20
|
+
await host.loadModules([...adapterModules, ...additionalModules]);
|
|
21
|
+
}
|
|
22
|
+
const session = await host.getSession();
|
|
23
|
+
return {
|
|
24
|
+
host,
|
|
25
|
+
session,
|
|
26
|
+
adapter: options.adapter,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bracketed paste manager for handling terminal paste operations.
|
|
3
|
+
*
|
|
4
|
+
* This class handles the bracketed paste mode in terminals, which allows
|
|
5
|
+
* pasted text to be distinguished from typed input. This is particularly
|
|
6
|
+
* useful for handling multi-line pastes and preventing unwanted execution
|
|
7
|
+
* of commands during paste operations.
|
|
8
|
+
*/
|
|
9
|
+
export class BracketedPasteManager {
|
|
10
|
+
constructor(enabled) {
|
|
11
|
+
this.inPaste = false;
|
|
12
|
+
this.pasteBuffer = [];
|
|
13
|
+
/** Tracks accumulated multi-line input even without bracketed paste support */
|
|
14
|
+
this.multiLineBuffer = [];
|
|
15
|
+
this.multiLineMode = false;
|
|
16
|
+
this.lastInputTime = 0;
|
|
17
|
+
/** Time threshold (ms) to consider rapid input as paste */
|
|
18
|
+
this.PASTE_THRESHOLD_MS = 50;
|
|
19
|
+
/** Raw data buffer for capturing complete bracketed paste content */
|
|
20
|
+
this.rawPasteBuffer = '';
|
|
21
|
+
/** Callback for when raw paste is complete */
|
|
22
|
+
this.onRawPasteComplete = null;
|
|
23
|
+
/** Whether we're currently capturing raw data */
|
|
24
|
+
this.capturingRaw = false;
|
|
25
|
+
this.enabled = enabled;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Process raw data from stdin before readline handles it.
|
|
29
|
+
* This intercepts bracketed paste content and captures it in full.
|
|
30
|
+
* Returns true if the data was consumed (should not be passed to readline).
|
|
31
|
+
*/
|
|
32
|
+
processRawData(data) {
|
|
33
|
+
if (!this.enabled) {
|
|
34
|
+
return { consumed: false };
|
|
35
|
+
}
|
|
36
|
+
const startIdx = data.indexOf(BracketedPasteManager.START_MARKER);
|
|
37
|
+
const endIdx = data.indexOf(BracketedPasteManager.END_MARKER);
|
|
38
|
+
// Case 1: Not in paste mode and no start marker - pass through
|
|
39
|
+
if (!this.capturingRaw && startIdx === -1) {
|
|
40
|
+
return { consumed: false };
|
|
41
|
+
}
|
|
42
|
+
// Case 2: Found start marker - begin capturing
|
|
43
|
+
if (!this.capturingRaw && startIdx !== -1) {
|
|
44
|
+
this.capturingRaw = true;
|
|
45
|
+
const beforeStart = data.substring(0, startIdx);
|
|
46
|
+
const afterStart = data.substring(startIdx + BracketedPasteManager.START_MARKER.length);
|
|
47
|
+
// Check if end marker is in same chunk
|
|
48
|
+
const endInAfter = afterStart.indexOf(BracketedPasteManager.END_MARKER);
|
|
49
|
+
if (endInAfter !== -1) {
|
|
50
|
+
// Complete paste in single chunk
|
|
51
|
+
const pasteContent = afterStart.substring(0, endInAfter);
|
|
52
|
+
const afterEnd = afterStart.substring(endInAfter + BracketedPasteManager.END_MARKER.length);
|
|
53
|
+
this.capturingRaw = false;
|
|
54
|
+
this.rawPasteBuffer = '';
|
|
55
|
+
// Emit the complete paste
|
|
56
|
+
if (this.onRawPasteComplete) {
|
|
57
|
+
this.onRawPasteComplete(pasteContent);
|
|
58
|
+
}
|
|
59
|
+
// Return any content before/after markers to be passed through
|
|
60
|
+
const passThrough = beforeStart + afterEnd;
|
|
61
|
+
return { consumed: true, passThrough: passThrough || undefined };
|
|
62
|
+
}
|
|
63
|
+
// Start marker found but no end marker yet
|
|
64
|
+
this.rawPasteBuffer = afterStart;
|
|
65
|
+
// Pass through anything before the start marker
|
|
66
|
+
return { consumed: true, passThrough: beforeStart || undefined };
|
|
67
|
+
}
|
|
68
|
+
// Case 3: Currently capturing and found end marker
|
|
69
|
+
if (this.capturingRaw && endIdx !== -1) {
|
|
70
|
+
const beforeEnd = data.substring(0, endIdx);
|
|
71
|
+
const afterEnd = data.substring(endIdx + BracketedPasteManager.END_MARKER.length);
|
|
72
|
+
const pasteContent = this.rawPasteBuffer + beforeEnd;
|
|
73
|
+
this.capturingRaw = false;
|
|
74
|
+
this.rawPasteBuffer = '';
|
|
75
|
+
// Emit the complete paste
|
|
76
|
+
if (this.onRawPasteComplete) {
|
|
77
|
+
this.onRawPasteComplete(pasteContent);
|
|
78
|
+
}
|
|
79
|
+
// Pass through anything after end marker
|
|
80
|
+
return { consumed: true, passThrough: afterEnd || undefined };
|
|
81
|
+
}
|
|
82
|
+
// Case 4: Currently capturing, no end marker - accumulate
|
|
83
|
+
if (this.capturingRaw) {
|
|
84
|
+
this.rawPasteBuffer += data;
|
|
85
|
+
return { consumed: true };
|
|
86
|
+
}
|
|
87
|
+
return { consumed: false };
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Set callback for when a complete paste is captured via raw data processing
|
|
91
|
+
*/
|
|
92
|
+
setRawPasteCallback(callback) {
|
|
93
|
+
this.onRawPasteComplete = callback;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Check if currently capturing raw paste data
|
|
97
|
+
*/
|
|
98
|
+
isCapturingRaw() {
|
|
99
|
+
return this.capturingRaw;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get current raw buffer size (for display)
|
|
103
|
+
*/
|
|
104
|
+
getRawBufferLineCount() {
|
|
105
|
+
if (!this.rawPasteBuffer)
|
|
106
|
+
return 0;
|
|
107
|
+
return this.rawPasteBuffer.split('\n').length;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get preview of raw buffer content
|
|
111
|
+
*/
|
|
112
|
+
getRawBufferPreview() {
|
|
113
|
+
if (!this.rawPasteBuffer)
|
|
114
|
+
return '';
|
|
115
|
+
const lines = this.rawPasteBuffer.split('\n');
|
|
116
|
+
return this.getPreview(lines);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Process input text, handling bracketed paste sequences
|
|
120
|
+
*/
|
|
121
|
+
process(input) {
|
|
122
|
+
if (!this.enabled) {
|
|
123
|
+
return this.processWithoutBracketed(input);
|
|
124
|
+
}
|
|
125
|
+
const startMarker = '\u001b[200~';
|
|
126
|
+
const endMarker = '\u001b[201~';
|
|
127
|
+
// If we're already in a paste, look for end marker
|
|
128
|
+
if (this.inPaste) {
|
|
129
|
+
const endIndex = input.indexOf(endMarker);
|
|
130
|
+
if (endIndex !== -1) {
|
|
131
|
+
// End of paste found
|
|
132
|
+
const beforeEnd = input.substring(0, endIndex);
|
|
133
|
+
const afterEnd = input.substring(endIndex + endMarker.length);
|
|
134
|
+
this.pasteBuffer.push(beforeEnd);
|
|
135
|
+
const result = this.pasteBuffer.join('\n');
|
|
136
|
+
const lineCount = this.pasteBuffer.length;
|
|
137
|
+
const preview = this.getPreview(this.pasteBuffer);
|
|
138
|
+
// Reset state
|
|
139
|
+
this.inPaste = false;
|
|
140
|
+
this.pasteBuffer = [];
|
|
141
|
+
// If there's text after the end marker, process it normally
|
|
142
|
+
if (afterEnd) {
|
|
143
|
+
const afterResult = this.process(afterEnd);
|
|
144
|
+
if (afterResult.handled && afterResult.result !== undefined) {
|
|
145
|
+
return {
|
|
146
|
+
handled: true,
|
|
147
|
+
result: result + afterResult.result,
|
|
148
|
+
lineCount,
|
|
149
|
+
preview,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
handled: true,
|
|
154
|
+
result: result + afterEnd,
|
|
155
|
+
lineCount,
|
|
156
|
+
preview,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
handled: true,
|
|
161
|
+
result,
|
|
162
|
+
lineCount,
|
|
163
|
+
preview,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
// Still in paste, no end marker found
|
|
168
|
+
this.pasteBuffer.push(input);
|
|
169
|
+
return {
|
|
170
|
+
handled: true,
|
|
171
|
+
isPending: true,
|
|
172
|
+
lineCount: this.pasteBuffer.length,
|
|
173
|
+
preview: this.getPreview(this.pasteBuffer),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Not in paste, look for start marker
|
|
178
|
+
const startIndex = input.indexOf(startMarker);
|
|
179
|
+
if (startIndex !== -1) {
|
|
180
|
+
// Start of paste found
|
|
181
|
+
const beforeStart = input.substring(0, startIndex);
|
|
182
|
+
const afterStart = input.substring(startIndex + startMarker.length);
|
|
183
|
+
// Start paste mode
|
|
184
|
+
this.inPaste = true;
|
|
185
|
+
this.pasteBuffer = [];
|
|
186
|
+
// Process the text after the start marker
|
|
187
|
+
if (afterStart) {
|
|
188
|
+
const afterResult = this.process(afterStart);
|
|
189
|
+
if (afterResult.handled && afterResult.result !== undefined) {
|
|
190
|
+
return {
|
|
191
|
+
handled: true,
|
|
192
|
+
result: beforeStart + afterResult.result,
|
|
193
|
+
lineCount: afterResult.lineCount,
|
|
194
|
+
preview: afterResult.preview,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
// Still pending
|
|
198
|
+
return {
|
|
199
|
+
handled: true,
|
|
200
|
+
result: beforeStart,
|
|
201
|
+
isPending: this.inPaste,
|
|
202
|
+
lineCount: this.pasteBuffer.length,
|
|
203
|
+
preview: this.getPreview(this.pasteBuffer),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
handled: true,
|
|
208
|
+
result: beforeStart,
|
|
209
|
+
isPending: true,
|
|
210
|
+
lineCount: 0,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
// No paste markers found
|
|
214
|
+
return { handled: false };
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Process input when bracketed paste is not enabled
|
|
218
|
+
* Uses timing heuristics to detect rapid multi-line input (likely paste)
|
|
219
|
+
*/
|
|
220
|
+
processWithoutBracketed(input) {
|
|
221
|
+
const now = Date.now();
|
|
222
|
+
const timeSinceLastInput = now - this.lastInputTime;
|
|
223
|
+
this.lastInputTime = now;
|
|
224
|
+
// Check if this looks like part of a rapid paste
|
|
225
|
+
if (timeSinceLastInput < this.PASTE_THRESHOLD_MS && this.multiLineBuffer.length > 0) {
|
|
226
|
+
// Continue accumulating
|
|
227
|
+
this.multiLineBuffer.push(input);
|
|
228
|
+
this.multiLineMode = true;
|
|
229
|
+
return {
|
|
230
|
+
handled: true,
|
|
231
|
+
isPending: true,
|
|
232
|
+
lineCount: this.multiLineBuffer.length,
|
|
233
|
+
preview: this.getPreview(this.multiLineBuffer),
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
// If we were in multi-line mode and there's a pause, finalize
|
|
237
|
+
if (this.multiLineMode && this.multiLineBuffer.length > 0) {
|
|
238
|
+
this.multiLineBuffer.push(input);
|
|
239
|
+
const result = this.multiLineBuffer.join('\n');
|
|
240
|
+
const lineCount = this.multiLineBuffer.length;
|
|
241
|
+
const preview = this.getPreview(this.multiLineBuffer);
|
|
242
|
+
this.multiLineBuffer = [];
|
|
243
|
+
this.multiLineMode = false;
|
|
244
|
+
return {
|
|
245
|
+
handled: true,
|
|
246
|
+
result,
|
|
247
|
+
lineCount,
|
|
248
|
+
preview,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
// Check for embedded newlines in a single input (indicates paste)
|
|
252
|
+
if (input.includes('\n')) {
|
|
253
|
+
const lines = input.split('\n');
|
|
254
|
+
return {
|
|
255
|
+
handled: true,
|
|
256
|
+
result: input,
|
|
257
|
+
lineCount: lines.length,
|
|
258
|
+
preview: this.getPreview(lines),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
// Start tracking for potential multi-line paste
|
|
262
|
+
this.multiLineBuffer = [input];
|
|
263
|
+
return { handled: false };
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Generate a preview string for multi-line content
|
|
267
|
+
*/
|
|
268
|
+
getPreview(lines) {
|
|
269
|
+
if (lines.length === 0) {
|
|
270
|
+
return '';
|
|
271
|
+
}
|
|
272
|
+
const firstLine = lines[0] || '';
|
|
273
|
+
const truncatedFirst = firstLine.length > 50
|
|
274
|
+
? firstLine.slice(0, 47) + '...'
|
|
275
|
+
: firstLine;
|
|
276
|
+
if (lines.length === 1) {
|
|
277
|
+
return truncatedFirst;
|
|
278
|
+
}
|
|
279
|
+
return `${truncatedFirst} [+${lines.length - 1} more lines]`;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Get current multi-line state for display purposes
|
|
283
|
+
*/
|
|
284
|
+
getMultiLineState() {
|
|
285
|
+
const buffer = this.inPaste ? this.pasteBuffer :
|
|
286
|
+
this.multiLineMode ? this.multiLineBuffer : null;
|
|
287
|
+
if (!buffer || buffer.length === 0) {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
const firstLine = buffer[0] || '';
|
|
291
|
+
const lastLine = buffer[buffer.length - 1] || '';
|
|
292
|
+
return {
|
|
293
|
+
content: buffer.join('\n'),
|
|
294
|
+
lineCount: buffer.length,
|
|
295
|
+
firstLinePreview: firstLine.length > 40 ? firstLine.slice(0, 37) + '...' : firstLine,
|
|
296
|
+
lastLinePreview: lastLine.length > 40 ? lastLine.slice(0, 37) + '...' : lastLine,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Format a multi-line paste as a collapsed block for display
|
|
301
|
+
*/
|
|
302
|
+
static formatCollapsedBlock(content, maxPreviewLength = 60) {
|
|
303
|
+
const lines = content.split('\n');
|
|
304
|
+
if (lines.length <= 1) {
|
|
305
|
+
return content;
|
|
306
|
+
}
|
|
307
|
+
const firstLine = (lines[0] || '').trim();
|
|
308
|
+
const truncatedFirst = firstLine.length > maxPreviewLength
|
|
309
|
+
? firstLine.slice(0, maxPreviewLength - 3) + '...'
|
|
310
|
+
: firstLine;
|
|
311
|
+
return `📋 ${truncatedFirst} [${lines.length} lines]`;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Check if currently processing a paste
|
|
315
|
+
*/
|
|
316
|
+
isInPaste() {
|
|
317
|
+
return this.inPaste || this.multiLineMode;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Get the current paste buffer
|
|
321
|
+
*/
|
|
322
|
+
getPasteBuffer() {
|
|
323
|
+
return this.inPaste ? [...this.pasteBuffer] : [...this.multiLineBuffer];
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Finalize any pending multi-line input
|
|
327
|
+
*/
|
|
328
|
+
finalize() {
|
|
329
|
+
if (this.multiLineMode && this.multiLineBuffer.length > 1) {
|
|
330
|
+
const result = this.multiLineBuffer.join('\n');
|
|
331
|
+
this.multiLineBuffer = [];
|
|
332
|
+
this.multiLineMode = false;
|
|
333
|
+
return result;
|
|
334
|
+
}
|
|
335
|
+
return null;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Reset the paste state
|
|
339
|
+
*/
|
|
340
|
+
reset() {
|
|
341
|
+
this.inPaste = false;
|
|
342
|
+
this.pasteBuffer = [];
|
|
343
|
+
this.multiLineMode = false;
|
|
344
|
+
this.multiLineBuffer = [];
|
|
345
|
+
this.rawPasteBuffer = '';
|
|
346
|
+
this.capturingRaw = false;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
BracketedPasteManager.START_MARKER = '\u001b[200~';
|
|
350
|
+
BracketedPasteManager.END_MARKER = '\u001b[201~';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Change Tracker
|
|
3
|
+
* Tracks file modifications during a session to display summary stats
|
|
4
|
+
*/
|
|
5
|
+
export class FileChangeTracker {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.changes = new Map();
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Record a file edit/write operation
|
|
11
|
+
*/
|
|
12
|
+
recordChange(path, type, additions = 0, removals = 0) {
|
|
13
|
+
const existing = this.changes.get(path);
|
|
14
|
+
if (existing) {
|
|
15
|
+
// Accumulate changes for the same file
|
|
16
|
+
existing.additions += additions;
|
|
17
|
+
existing.removals += removals;
|
|
18
|
+
existing.timestamp = Date.now();
|
|
19
|
+
existing.type = type; // Update to latest operation type
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.changes.set(path, {
|
|
23
|
+
path,
|
|
24
|
+
type,
|
|
25
|
+
additions,
|
|
26
|
+
removals,
|
|
27
|
+
timestamp: Date.now(),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get summary of all changes
|
|
33
|
+
*/
|
|
34
|
+
getSummary() {
|
|
35
|
+
let totalAdditions = 0;
|
|
36
|
+
let totalRemovals = 0;
|
|
37
|
+
for (const change of this.changes.values()) {
|
|
38
|
+
totalAdditions += change.additions;
|
|
39
|
+
totalRemovals += change.removals;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
files: this.changes.size,
|
|
43
|
+
additions: totalAdditions,
|
|
44
|
+
removals: totalRemovals,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get all changes
|
|
49
|
+
*/
|
|
50
|
+
getAllChanges() {
|
|
51
|
+
return Array.from(this.changes.values()).sort((a, b) => b.timestamp - a.timestamp);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Clear all tracked changes
|
|
55
|
+
*/
|
|
56
|
+
clear() {
|
|
57
|
+
this.changes.clear();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get change for specific file
|
|
61
|
+
*/
|
|
62
|
+
getChange(path) {
|
|
63
|
+
return this.changes.get(path);
|
|
64
|
+
}
|
|
65
|
+
}
|