erosolar-cli 1.7.439 → 1.7.440
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/dist/StringUtils.d.ts +8 -0
- package/dist/StringUtils.d.ts.map +1 -0
- package/dist/StringUtils.js +11 -0
- package/dist/StringUtils.js.map +1 -0
- package/dist/adapters/browser/index.d.ts +12 -0
- package/dist/adapters/browser/index.d.ts.map +1 -0
- package/dist/adapters/browser/index.js +11 -0
- package/dist/adapters/browser/index.js.map +1 -0
- package/dist/adapters/node/index.d.ts +17 -0
- package/dist/adapters/node/index.d.ts.map +1 -0
- package/dist/adapters/node/index.js +35 -0
- package/dist/adapters/node/index.js.map +1 -0
- package/dist/adapters/remote/index.d.ts +13 -0
- package/dist/adapters/remote/index.d.ts.map +1 -0
- package/dist/adapters/remote/index.js +20 -0
- package/dist/adapters/remote/index.js.map +1 -0
- package/dist/adapters/types.d.ts +14 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/bin/erosolar.d.ts +9 -0
- package/dist/bin/erosolar.d.ts.map +1 -0
- package/dist/bin/erosolar.js +93 -0
- package/dist/bin/erosolar.js.map +1 -0
- package/dist/bin/selfTest.d.ts +14 -0
- package/dist/bin/selfTest.d.ts.map +1 -0
- package/dist/bin/selfTest.js +304 -0
- package/dist/bin/selfTest.js.map +1 -0
- package/dist/browser/BrowserSessionManager.d.ts +307 -0
- package/dist/browser/BrowserSessionManager.d.ts.map +1 -0
- package/dist/browser/BrowserSessionManager.js +713 -0
- package/dist/browser/BrowserSessionManager.js.map +1 -0
- package/dist/capabilities/advancedTestGenerationCapability.d.ts +17 -0
- package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +1 -0
- package/dist/capabilities/advancedTestGenerationCapability.js +28 -0
- package/dist/capabilities/advancedTestGenerationCapability.js.map +1 -0
- package/dist/capabilities/agentSpawningCapability.d.ts +6 -0
- package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -0
- package/dist/capabilities/agentSpawningCapability.js +168 -0
- package/dist/capabilities/agentSpawningCapability.js.map +1 -0
- package/dist/capabilities/askUserCapability.d.ts +21 -0
- package/dist/capabilities/askUserCapability.d.ts.map +1 -0
- package/dist/capabilities/askUserCapability.js +155 -0
- package/dist/capabilities/askUserCapability.js.map +1 -0
- package/dist/capabilities/bashCapability.d.ts +13 -0
- package/dist/capabilities/bashCapability.d.ts.map +1 -0
- package/dist/capabilities/bashCapability.js +24 -0
- package/dist/capabilities/bashCapability.js.map +1 -0
- package/dist/capabilities/browserAutomationCapability.d.ts +37 -0
- package/dist/capabilities/browserAutomationCapability.d.ts.map +1 -0
- package/dist/capabilities/browserAutomationCapability.js +49 -0
- package/dist/capabilities/browserAutomationCapability.js.map +1 -0
- package/dist/capabilities/buildCapability.d.ts +24 -0
- package/dist/capabilities/buildCapability.d.ts.map +1 -0
- package/dist/capabilities/buildCapability.js +25 -0
- package/dist/capabilities/buildCapability.js.map +1 -0
- package/dist/capabilities/cloudCapability.d.ts +13 -0
- package/dist/capabilities/cloudCapability.d.ts.map +1 -0
- package/dist/capabilities/cloudCapability.js +38 -0
- package/dist/capabilities/cloudCapability.js.map +1 -0
- package/dist/capabilities/codeAnalysisCapability.d.ts +13 -0
- package/dist/capabilities/codeAnalysisCapability.d.ts.map +1 -0
- package/dist/capabilities/codeAnalysisCapability.js +24 -0
- package/dist/capabilities/codeAnalysisCapability.js.map +1 -0
- package/dist/capabilities/codeGenerationCapability.d.ts +13 -0
- package/dist/capabilities/codeGenerationCapability.d.ts.map +1 -0
- package/dist/capabilities/codeGenerationCapability.js +25 -0
- package/dist/capabilities/codeGenerationCapability.js.map +1 -0
- package/dist/capabilities/codeQualityCapability.d.ts +13 -0
- package/dist/capabilities/codeQualityCapability.d.ts.map +1 -0
- package/dist/capabilities/codeQualityCapability.js +25 -0
- package/dist/capabilities/codeQualityCapability.js.map +1 -0
- package/dist/capabilities/dependencySecurityCapability.d.ts +13 -0
- package/dist/capabilities/dependencySecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/dependencySecurityCapability.js +24 -0
- package/dist/capabilities/dependencySecurityCapability.js.map +1 -0
- package/dist/capabilities/devCapability.d.ts +13 -0
- package/dist/capabilities/devCapability.d.ts.map +1 -0
- package/dist/capabilities/devCapability.js +24 -0
- package/dist/capabilities/devCapability.js.map +1 -0
- package/dist/capabilities/editCapability.d.ts +17 -0
- package/dist/capabilities/editCapability.d.ts.map +1 -0
- package/dist/capabilities/editCapability.js +27 -0
- package/dist/capabilities/editCapability.js.map +1 -0
- package/dist/capabilities/emailCapability.d.ts +12 -0
- package/dist/capabilities/emailCapability.d.ts.map +1 -0
- package/dist/capabilities/emailCapability.js +22 -0
- package/dist/capabilities/emailCapability.js.map +1 -0
- package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +17 -0
- package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedCodeIntelligenceCapability.js +28 -0
- package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +1 -0
- package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +17 -0
- package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedDevWorkflowCapability.js +28 -0
- package/dist/capabilities/enhancedDevWorkflowCapability.js.map +1 -0
- package/dist/capabilities/enhancedGitCapability.d.ts +7 -0
- package/dist/capabilities/enhancedGitCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedGitCapability.js +220 -0
- package/dist/capabilities/enhancedGitCapability.js.map +1 -0
- package/dist/capabilities/filesystemCapability.d.ts +13 -0
- package/dist/capabilities/filesystemCapability.d.ts.map +1 -0
- package/dist/capabilities/filesystemCapability.js +24 -0
- package/dist/capabilities/filesystemCapability.js.map +1 -0
- package/dist/capabilities/frontendTestingCapability.d.ts +13 -0
- package/dist/capabilities/frontendTestingCapability.d.ts.map +1 -0
- package/dist/capabilities/frontendTestingCapability.js +28 -0
- package/dist/capabilities/frontendTestingCapability.js.map +1 -0
- package/dist/capabilities/globCapability.d.ts +17 -0
- package/dist/capabilities/globCapability.d.ts.map +1 -0
- package/dist/capabilities/globCapability.js +27 -0
- package/dist/capabilities/globCapability.js.map +1 -0
- package/dist/capabilities/index.d.ts +26 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +26 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/interactionCapability.d.ts +12 -0
- package/dist/capabilities/interactionCapability.d.ts.map +1 -0
- package/dist/capabilities/interactionCapability.js +22 -0
- package/dist/capabilities/interactionCapability.js.map +1 -0
- package/dist/capabilities/learnCapability.d.ts +22 -0
- package/dist/capabilities/learnCapability.d.ts.map +1 -0
- package/dist/capabilities/learnCapability.js +37 -0
- package/dist/capabilities/learnCapability.js.map +1 -0
- package/dist/capabilities/mcpCapability.d.ts +6 -0
- package/dist/capabilities/mcpCapability.d.ts.map +1 -0
- package/dist/capabilities/mcpCapability.js +19 -0
- package/dist/capabilities/mcpCapability.js.map +1 -0
- package/dist/capabilities/notebookCapability.d.ts +17 -0
- package/dist/capabilities/notebookCapability.d.ts.map +1 -0
- package/dist/capabilities/notebookCapability.js +27 -0
- package/dist/capabilities/notebookCapability.js.map +1 -0
- package/dist/capabilities/performanceMonitoringCapability.d.ts +108 -0
- package/dist/capabilities/performanceMonitoringCapability.d.ts.map +1 -0
- package/dist/capabilities/performanceMonitoringCapability.js +176 -0
- package/dist/capabilities/performanceMonitoringCapability.js.map +1 -0
- package/dist/capabilities/planningCapability.d.ts +16 -0
- package/dist/capabilities/planningCapability.d.ts.map +1 -0
- package/dist/capabilities/planningCapability.js +26 -0
- package/dist/capabilities/planningCapability.js.map +1 -0
- package/dist/capabilities/refactoringCapability.d.ts +13 -0
- package/dist/capabilities/refactoringCapability.d.ts.map +1 -0
- package/dist/capabilities/refactoringCapability.js +25 -0
- package/dist/capabilities/refactoringCapability.js.map +1 -0
- package/dist/capabilities/repoChecksCapability.d.ts +10 -0
- package/dist/capabilities/repoChecksCapability.d.ts.map +1 -0
- package/dist/capabilities/repoChecksCapability.js +24 -0
- package/dist/capabilities/repoChecksCapability.js.map +1 -0
- package/dist/capabilities/searchCapability.d.ts +13 -0
- package/dist/capabilities/searchCapability.d.ts.map +1 -0
- package/dist/capabilities/searchCapability.js +24 -0
- package/dist/capabilities/searchCapability.js.map +1 -0
- package/dist/capabilities/skillCapability.d.ts +3 -0
- package/dist/capabilities/skillCapability.d.ts.map +1 -0
- package/dist/capabilities/skillCapability.js +77 -0
- package/dist/capabilities/skillCapability.js.map +1 -0
- package/dist/capabilities/statusCapability.d.ts +4 -0
- package/dist/capabilities/statusCapability.d.ts.map +1 -0
- package/dist/capabilities/statusCapability.js +92 -0
- package/dist/capabilities/statusCapability.js.map +1 -0
- package/dist/capabilities/taskManagementCapability.d.ts +12 -0
- package/dist/capabilities/taskManagementCapability.d.ts.map +1 -0
- package/dist/capabilities/taskManagementCapability.js +22 -0
- package/dist/capabilities/taskManagementCapability.js.map +1 -0
- package/dist/capabilities/testingCapability.d.ts +13 -0
- package/dist/capabilities/testingCapability.d.ts.map +1 -0
- package/dist/capabilities/testingCapability.js +25 -0
- package/dist/capabilities/testingCapability.js.map +1 -0
- package/dist/capabilities/todoCapability.d.ts +19 -0
- package/dist/capabilities/todoCapability.d.ts.map +1 -0
- package/dist/capabilities/todoCapability.js +169 -0
- package/dist/capabilities/todoCapability.js.map +1 -0
- package/dist/capabilities/toolManifest.d.ts +3 -0
- package/dist/capabilities/toolManifest.d.ts.map +1 -0
- package/dist/capabilities/toolManifest.js +160 -0
- package/dist/capabilities/toolManifest.js.map +1 -0
- package/dist/capabilities/toolRegistry.d.ts +24 -0
- package/dist/capabilities/toolRegistry.d.ts.map +1 -0
- package/dist/capabilities/toolRegistry.js +150 -0
- package/dist/capabilities/toolRegistry.js.map +1 -0
- package/dist/capabilities/validationCapability.d.ts +13 -0
- package/dist/capabilities/validationCapability.d.ts.map +1 -0
- package/dist/capabilities/validationCapability.js +24 -0
- package/dist/capabilities/validationCapability.js.map +1 -0
- package/dist/capabilities/webCapability.d.ts +12 -0
- package/dist/capabilities/webCapability.d.ts.map +1 -0
- package/dist/capabilities/webCapability.js +22 -0
- package/dist/capabilities/webCapability.js.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +140 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts/v1/agent.d.ts +147 -0
- package/dist/contracts/v1/agent.d.ts.map +1 -0
- package/dist/contracts/v1/agent.js +8 -0
- package/dist/contracts/v1/agent.js.map +1 -0
- package/dist/contracts/v1/agentProfileManifest.d.ts +60 -0
- package/dist/contracts/v1/agentProfileManifest.d.ts.map +1 -0
- package/dist/contracts/v1/agentProfileManifest.js +9 -0
- package/dist/contracts/v1/agentProfileManifest.js.map +1 -0
- package/dist/contracts/v1/agentRules.d.ts +60 -0
- package/dist/contracts/v1/agentRules.d.ts.map +1 -0
- package/dist/contracts/v1/agentRules.js +10 -0
- package/dist/contracts/v1/agentRules.js.map +1 -0
- package/dist/contracts/v1/provider.d.ts +149 -0
- package/dist/contracts/v1/provider.d.ts.map +1 -0
- package/dist/contracts/v1/provider.js +7 -0
- package/dist/contracts/v1/provider.js.map +1 -0
- package/dist/contracts/v1/tool.d.ts +136 -0
- package/dist/contracts/v1/tool.d.ts.map +1 -0
- package/dist/contracts/v1/tool.js +7 -0
- package/dist/contracts/v1/tool.js.map +1 -0
- package/dist/contracts/v1/toolAccess.d.ts +43 -0
- package/dist/contracts/v1/toolAccess.d.ts.map +1 -0
- package/dist/contracts/v1/toolAccess.js +9 -0
- package/dist/contracts/v1/toolAccess.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 +153 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +889 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/agentProfileManifest.d.ts +3 -0
- package/dist/core/agentProfileManifest.d.ts.map +1 -0
- package/dist/core/agentProfileManifest.js +188 -0
- package/dist/core/agentProfileManifest.js.map +1 -0
- package/dist/core/agentProfiles.d.ts +22 -0
- package/dist/core/agentProfiles.d.ts.map +1 -0
- package/dist/core/agentProfiles.js +35 -0
- package/dist/core/agentProfiles.js.map +1 -0
- package/dist/core/agentRulebook.d.ts +11 -0
- package/dist/core/agentRulebook.d.ts.map +1 -0
- package/dist/core/agentRulebook.js +136 -0
- package/dist/core/agentRulebook.js.map +1 -0
- package/dist/core/agentSchemaLoader.d.ts +131 -0
- package/dist/core/agentSchemaLoader.d.ts.map +1 -0
- package/dist/core/agentSchemaLoader.js +234 -0
- package/dist/core/agentSchemaLoader.js.map +1 -0
- package/dist/core/aiErrorFixer.d.ts +70 -0
- package/dist/core/aiErrorFixer.d.ts.map +1 -0
- package/dist/core/aiErrorFixer.js +402 -0
- package/dist/core/aiErrorFixer.js.map +1 -0
- package/dist/core/alphaZeroEngine.d.ts +269 -0
- package/dist/core/alphaZeroEngine.d.ts.map +1 -0
- package/dist/core/alphaZeroEngine.js +523 -0
- package/dist/core/alphaZeroEngine.js.map +1 -0
- package/dist/core/alphaZeroModular.d.ts +186 -0
- package/dist/core/alphaZeroModular.d.ts.map +1 -0
- package/dist/core/alphaZeroModular.js +755 -0
- package/dist/core/alphaZeroModular.js.map +1 -0
- package/dist/core/alphaZeroOrchestrator.d.ts +140 -0
- package/dist/core/alphaZeroOrchestrator.d.ts.map +1 -0
- package/dist/core/alphaZeroOrchestrator.js +418 -0
- package/dist/core/alphaZeroOrchestrator.js.map +1 -0
- package/dist/core/bashCommandGuidance.d.ts +16 -0
- package/dist/core/bashCommandGuidance.d.ts.map +1 -0
- package/dist/core/bashCommandGuidance.js +40 -0
- package/dist/core/bashCommandGuidance.js.map +1 -0
- package/dist/core/checkpoint.d.ts +76 -0
- package/dist/core/checkpoint.d.ts.map +1 -0
- package/dist/core/checkpoint.js +278 -0
- package/dist/core/checkpoint.js.map +1 -0
- package/dist/core/cliTestHarness.d.ts +200 -0
- package/dist/core/cliTestHarness.d.ts.map +1 -0
- package/dist/core/cliTestHarness.js +549 -0
- package/dist/core/cliTestHarness.js.map +1 -0
- package/dist/core/contextManager.d.ts +265 -0
- package/dist/core/contextManager.d.ts.map +1 -0
- package/dist/core/contextManager.js +1060 -0
- package/dist/core/contextManager.js.map +1 -0
- package/dist/core/contextWindow.d.ts +42 -0
- package/dist/core/contextWindow.d.ts.map +1 -0
- package/dist/core/contextWindow.js +123 -0
- package/dist/core/contextWindow.js.map +1 -0
- package/dist/core/costTracker.d.ts +87 -0
- package/dist/core/costTracker.d.ts.map +1 -0
- package/dist/core/costTracker.js +285 -0
- package/dist/core/costTracker.js.map +1 -0
- package/dist/core/customCommands.d.ts +19 -0
- package/dist/core/customCommands.d.ts.map +1 -0
- package/dist/core/customCommands.js +84 -0
- package/dist/core/customCommands.js.map +1 -0
- package/dist/core/errors/apiKeyErrors.d.ts +11 -0
- package/dist/core/errors/apiKeyErrors.d.ts.map +1 -0
- package/dist/core/errors/apiKeyErrors.js +159 -0
- package/dist/core/errors/apiKeyErrors.js.map +1 -0
- package/dist/core/errors/errorTypes.d.ts +111 -0
- package/dist/core/errors/errorTypes.d.ts.map +1 -0
- package/dist/core/errors/errorTypes.js +348 -0
- package/dist/core/errors/errorTypes.js.map +1 -0
- package/dist/core/errors/errorUtils.d.ts +87 -0
- package/dist/core/errors/errorUtils.d.ts.map +1 -0
- package/dist/core/errors/errorUtils.js +158 -0
- package/dist/core/errors/errorUtils.js.map +1 -0
- package/dist/core/errors/safetyValidator.d.ts +71 -0
- package/dist/core/errors/safetyValidator.d.ts.map +1 -0
- package/dist/core/errors/safetyValidator.js +302 -0
- package/dist/core/errors/safetyValidator.js.map +1 -0
- package/dist/core/errors.d.ts +4 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +33 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/failureRecovery.d.ts +122 -0
- package/dist/core/failureRecovery.d.ts.map +1 -0
- package/dist/core/failureRecovery.js +477 -0
- package/dist/core/failureRecovery.js.map +1 -0
- 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/intelligentTestFlows.d.ts +126 -0
- package/dist/core/intelligentTestFlows.d.ts.map +1 -0
- package/dist/core/intelligentTestFlows.js +678 -0
- package/dist/core/intelligentTestFlows.js.map +1 -0
- package/dist/core/isolatedVerifier.d.ts +40 -0
- package/dist/core/isolatedVerifier.d.ts.map +1 -0
- package/dist/core/isolatedVerifier.js +129 -0
- package/dist/core/isolatedVerifier.js.map +1 -0
- package/dist/core/learningPersistence.d.ts +145 -0
- package/dist/core/learningPersistence.d.ts.map +1 -0
- package/dist/core/learningPersistence.js +477 -0
- package/dist/core/learningPersistence.js.map +1 -0
- package/dist/core/memorySystem.d.ts +67 -0
- package/dist/core/memorySystem.d.ts.map +1 -0
- package/dist/core/memorySystem.js +334 -0
- package/dist/core/memorySystem.js.map +1 -0
- package/dist/core/metricsTracker.d.ts +157 -0
- package/dist/core/metricsTracker.d.ts.map +1 -0
- package/dist/core/metricsTracker.js +273 -0
- package/dist/core/metricsTracker.js.map +1 -0
- package/dist/core/modelDiscovery.d.ts +101 -0
- package/dist/core/modelDiscovery.d.ts.map +1 -0
- package/dist/core/modelDiscovery.js +780 -0
- package/dist/core/modelDiscovery.js.map +1 -0
- package/dist/core/multilinePasteHandler.d.ts +35 -0
- package/dist/core/multilinePasteHandler.d.ts.map +1 -0
- package/dist/core/multilinePasteHandler.js +80 -0
- package/dist/core/multilinePasteHandler.js.map +1 -0
- package/dist/core/offsecAlphaZero.d.ts +56 -0
- package/dist/core/offsecAlphaZero.d.ts.map +1 -0
- package/dist/core/offsecAlphaZero.js +395 -0
- package/dist/core/offsecAlphaZero.js.map +1 -0
- package/dist/core/outputStyles.d.ts +48 -0
- package/dist/core/outputStyles.d.ts.map +1 -0
- package/dist/core/outputStyles.js +270 -0
- package/dist/core/outputStyles.js.map +1 -0
- package/dist/core/performanceMonitor.d.ts +124 -0
- package/dist/core/performanceMonitor.d.ts.map +1 -0
- package/dist/core/performanceMonitor.js +192 -0
- package/dist/core/performanceMonitor.js.map +1 -0
- package/dist/core/preferences.d.ts +69 -0
- package/dist/core/preferences.d.ts.map +1 -0
- package/dist/core/preferences.js +316 -0
- package/dist/core/preferences.js.map +1 -0
- package/dist/core/responseVerifier.d.ts +98 -0
- package/dist/core/responseVerifier.d.ts.map +1 -0
- package/dist/core/responseVerifier.js +509 -0
- package/dist/core/responseVerifier.js.map +1 -0
- package/dist/core/resultVerification.d.ts +141 -0
- package/dist/core/resultVerification.d.ts.map +1 -0
- package/dist/core/resultVerification.js +482 -0
- package/dist/core/resultVerification.js.map +1 -0
- package/dist/core/schemaValidator.d.ts +44 -0
- package/dist/core/schemaValidator.d.ts.map +1 -0
- package/dist/core/schemaValidator.js +155 -0
- package/dist/core/schemaValidator.js.map +1 -0
- package/dist/core/secretStore.d.ts +48 -0
- package/dist/core/secretStore.d.ts.map +1 -0
- package/dist/core/secretStore.js +367 -0
- package/dist/core/secretStore.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/selfEvolution.d.ts +155 -0
- package/dist/core/selfEvolution.d.ts.map +1 -0
- package/dist/core/selfEvolution.js +1000 -0
- package/dist/core/selfEvolution.js.map +1 -0
- package/dist/core/selfImprovement.d.ts +141 -0
- package/dist/core/selfImprovement.d.ts.map +1 -0
- package/dist/core/selfImprovement.js +700 -0
- package/dist/core/selfImprovement.js.map +1 -0
- package/dist/core/sessionStore.d.ts +35 -0
- package/dist/core/sessionStore.d.ts.map +1 -0
- package/dist/core/sessionStore.js +189 -0
- package/dist/core/sessionStore.js.map +1 -0
- package/dist/core/testUtils.d.ts +121 -0
- package/dist/core/testUtils.d.ts.map +1 -0
- package/dist/core/testUtils.js +235 -0
- package/dist/core/testUtils.js.map +1 -0
- package/dist/core/toolPreconditions.d.ts +42 -0
- package/dist/core/toolPreconditions.d.ts.map +1 -0
- package/dist/core/toolPreconditions.js +347 -0
- package/dist/core/toolPreconditions.js.map +1 -0
- package/dist/core/toolRuntime.d.ts +163 -0
- package/dist/core/toolRuntime.d.ts.map +1 -0
- package/dist/core/toolRuntime.js +439 -0
- package/dist/core/toolRuntime.js.map +1 -0
- package/dist/core/toolValidation.d.ts +116 -0
- package/dist/core/toolValidation.d.ts.map +1 -0
- package/dist/core/toolValidation.js +282 -0
- package/dist/core/toolValidation.js.map +1 -0
- package/dist/core/types/utilityTypes.d.ts +192 -0
- package/dist/core/types/utilityTypes.d.ts.map +1 -0
- package/dist/core/types/utilityTypes.js +272 -0
- package/dist/core/types/utilityTypes.js.map +1 -0
- package/dist/core/types.d.ts +306 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +76 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validationRunner.d.ts +106 -0
- package/dist/core/validationRunner.d.ts.map +1 -0
- package/dist/core/validationRunner.js +888 -0
- package/dist/core/validationRunner.js.map +1 -0
- 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 +5 -0
- package/dist/headless/headlessApp.d.ts.map +1 -0
- package/dist/headless/headlessApp.js +210 -0
- package/dist/headless/headlessApp.js.map +1 -0
- package/dist/intelligence/codeIntelligence.d.ts +118 -0
- package/dist/intelligence/codeIntelligence.d.ts.map +1 -0
- package/dist/intelligence/codeIntelligence.js +552 -0
- package/dist/intelligence/codeIntelligence.js.map +1 -0
- package/dist/intelligence/docGenerator.d.ts +86 -0
- package/dist/intelligence/docGenerator.d.ts.map +1 -0
- package/dist/intelligence/docGenerator.js +564 -0
- package/dist/intelligence/docGenerator.js.map +1 -0
- package/dist/intelligence/index.d.ts +51 -0
- package/dist/intelligence/index.d.ts.map +1 -0
- package/dist/intelligence/index.js +253 -0
- package/dist/intelligence/index.js.map +1 -0
- package/dist/intelligence/refactoring.d.ts +50 -0
- package/dist/intelligence/refactoring.d.ts.map +1 -0
- package/dist/intelligence/refactoring.js +354 -0
- package/dist/intelligence/refactoring.js.map +1 -0
- package/dist/intelligence/testGenerator.d.ts +74 -0
- package/dist/intelligence/testGenerator.d.ts.map +1 -0
- package/dist/intelligence/testGenerator.js +483 -0
- package/dist/intelligence/testGenerator.js.map +1 -0
- package/dist/mcp/config.d.ts +8 -0
- package/dist/mcp/config.d.ts.map +1 -0
- package/dist/mcp/config.js +252 -0
- package/dist/mcp/config.js.map +1 -0
- package/dist/mcp/sseClient.d.ts +34 -0
- package/dist/mcp/sseClient.d.ts.map +1 -0
- package/dist/mcp/sseClient.js +327 -0
- package/dist/mcp/sseClient.js.map +1 -0
- package/dist/mcp/stdioClient.d.ts +24 -0
- package/dist/mcp/stdioClient.d.ts.map +1 -0
- package/dist/mcp/stdioClient.js +179 -0
- package/dist/mcp/stdioClient.js.map +1 -0
- package/dist/mcp/toolBridge.d.ts +12 -0
- package/dist/mcp/toolBridge.d.ts.map +1 -0
- package/dist/mcp/toolBridge.js +117 -0
- package/dist/mcp/toolBridge.js.map +1 -0
- package/dist/mcp/types.d.ts +60 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +2 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/plugins/index.d.ts +49 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +114 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/providers/anthropic/index.d.ts +11 -0
- package/dist/plugins/providers/anthropic/index.d.ts.map +1 -0
- package/dist/plugins/providers/anthropic/index.js +38 -0
- package/dist/plugins/providers/anthropic/index.js.map +1 -0
- package/dist/plugins/providers/deepseek/index.d.ts +11 -0
- package/dist/plugins/providers/deepseek/index.d.ts.map +1 -0
- package/dist/plugins/providers/deepseek/index.js +52 -0
- package/dist/plugins/providers/deepseek/index.js.map +1 -0
- package/dist/plugins/providers/google/index.d.ts +11 -0
- package/dist/plugins/providers/google/index.d.ts.map +1 -0
- package/dist/plugins/providers/google/index.js +40 -0
- package/dist/plugins/providers/google/index.js.map +1 -0
- package/dist/plugins/providers/index.d.ts +2 -0
- package/dist/plugins/providers/index.d.ts.map +1 -0
- package/dist/plugins/providers/index.js +20 -0
- package/dist/plugins/providers/index.js.map +1 -0
- package/dist/plugins/providers/ollama/index.d.ts +21 -0
- package/dist/plugins/providers/ollama/index.d.ts.map +1 -0
- package/dist/plugins/providers/ollama/index.js +69 -0
- package/dist/plugins/providers/ollama/index.js.map +1 -0
- package/dist/plugins/providers/openai/index.d.ts +12 -0
- package/dist/plugins/providers/openai/index.d.ts.map +1 -0
- package/dist/plugins/providers/openai/index.js +39 -0
- package/dist/plugins/providers/openai/index.js.map +1 -0
- package/dist/plugins/providers/xai/index.d.ts +11 -0
- package/dist/plugins/providers/xai/index.d.ts.map +1 -0
- package/dist/plugins/providers/xai/index.js +39 -0
- package/dist/plugins/providers/xai/index.js.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +3 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +9 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +1 -0
- package/dist/plugins/tools/bash/localBashPlugin.d.ts +3 -0
- package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/bash/localBashPlugin.js +14 -0
- package/dist/plugins/tools/bash/localBashPlugin.js.map +1 -0
- package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +14 -0
- package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/browser/browserAutomationPlugin.js +26 -0
- package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +1 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +3 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js +14 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +1 -0
- package/dist/plugins/tools/cloud/cloudPlugin.d.ts +3 -0
- package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/cloud/cloudPlugin.js +14 -0
- package/dist/plugins/tools/cloud/cloudPlugin.js.map +1 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +3 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +14 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +1 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +3 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +14 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +1 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +3 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.js +12 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.js.map +1 -0
- package/dist/plugins/tools/development/devPlugin.d.ts +3 -0
- package/dist/plugins/tools/development/devPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/development/devPlugin.js +14 -0
- package/dist/plugins/tools/development/devPlugin.js.map +1 -0
- package/dist/plugins/tools/edit/editPlugin.d.ts +9 -0
- package/dist/plugins/tools/edit/editPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/edit/editPlugin.js +15 -0
- package/dist/plugins/tools/edit/editPlugin.js.map +1 -0
- package/dist/plugins/tools/email/emailPlugin.d.ts +3 -0
- package/dist/plugins/tools/email/emailPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/email/emailPlugin.js +12 -0
- package/dist/plugins/tools/email/emailPlugin.js.map +1 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +3 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +9 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +1 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +3 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +14 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +1 -0
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +3 -0
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +14 -0
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +1 -0
- package/dist/plugins/tools/glob/globPlugin.d.ts +9 -0
- package/dist/plugins/tools/glob/globPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/glob/globPlugin.js +15 -0
- package/dist/plugins/tools/glob/globPlugin.js.map +1 -0
- package/dist/plugins/tools/index.d.ts +3 -0
- package/dist/plugins/tools/index.d.ts.map +1 -0
- package/dist/plugins/tools/index.js +3 -0
- package/dist/plugins/tools/index.js.map +1 -0
- package/dist/plugins/tools/interaction/interactionPlugin.d.ts +3 -0
- package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/interaction/interactionPlugin.js +12 -0
- package/dist/plugins/tools/interaction/interactionPlugin.js.map +1 -0
- package/dist/plugins/tools/learn/learnPlugin.d.ts +3 -0
- package/dist/plugins/tools/learn/learnPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/learn/learnPlugin.js +14 -0
- package/dist/plugins/tools/learn/learnPlugin.js.map +1 -0
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts +3 -0
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js +9 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts +2 -0
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
- package/dist/plugins/tools/nodeDefaults.js +65 -0
- package/dist/plugins/tools/nodeDefaults.js.map +1 -0
- package/dist/plugins/tools/notebook/notebookPlugin.d.ts +9 -0
- package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/notebook/notebookPlugin.js +15 -0
- package/dist/plugins/tools/notebook/notebookPlugin.js.map +1 -0
- package/dist/plugins/tools/planning/planningPlugin.d.ts +9 -0
- package/dist/plugins/tools/planning/planningPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/planning/planningPlugin.js +15 -0
- package/dist/plugins/tools/planning/planningPlugin.js.map +1 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +3 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.js +12 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +1 -0
- package/dist/plugins/tools/registry.d.ts +22 -0
- package/dist/plugins/tools/registry.d.ts.map +1 -0
- package/dist/plugins/tools/registry.js +58 -0
- package/dist/plugins/tools/registry.js.map +1 -0
- package/dist/plugins/tools/search/localSearchPlugin.d.ts +3 -0
- package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/search/localSearchPlugin.js +14 -0
- package/dist/plugins/tools/search/localSearchPlugin.js.map +1 -0
- package/dist/plugins/tools/skills/skillPlugin.d.ts +3 -0
- package/dist/plugins/tools/skills/skillPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/skills/skillPlugin.js +9 -0
- package/dist/plugins/tools/skills/skillPlugin.js.map +1 -0
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +3 -0
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +12 -0
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +1 -0
- package/dist/plugins/tools/testing/testingPlugin.d.ts +3 -0
- package/dist/plugins/tools/testing/testingPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/testing/testingPlugin.js +12 -0
- package/dist/plugins/tools/testing/testingPlugin.js.map +1 -0
- package/dist/plugins/tools/validation/validationPlugin.d.ts +3 -0
- package/dist/plugins/tools/validation/validationPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/validation/validationPlugin.js +14 -0
- package/dist/plugins/tools/validation/validationPlugin.js.map +1 -0
- package/dist/plugins/tools/web/webPlugin.d.ts +3 -0
- package/dist/plugins/tools/web/webPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/web/webPlugin.js +12 -0
- package/dist/plugins/tools/web/webPlugin.js.map +1 -0
- package/dist/providers/anthropicProvider.d.ts +41 -0
- package/dist/providers/anthropicProvider.d.ts.map +1 -0
- package/dist/providers/anthropicProvider.js +446 -0
- package/dist/providers/anthropicProvider.js.map +1 -0
- package/dist/providers/googleProvider.d.ts +36 -0
- package/dist/providers/googleProvider.d.ts.map +1 -0
- package/dist/providers/googleProvider.js +312 -0
- package/dist/providers/googleProvider.js.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts +43 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.js +516 -0
- package/dist/providers/openaiChatCompletionsProvider.js.map +1 -0
- package/dist/providers/openaiResponsesProvider.d.ts +38 -0
- package/dist/providers/openaiResponsesProvider.d.ts.map +1 -0
- package/dist/providers/openaiResponsesProvider.js +364 -0
- package/dist/providers/openaiResponsesProvider.js.map +1 -0
- package/dist/providers/providerFactory.d.ts +18 -0
- package/dist/providers/providerFactory.d.ts.map +1 -0
- package/dist/providers/providerFactory.js +25 -0
- package/dist/providers/providerFactory.js.map +1 -0
- package/dist/providers/resilientProvider.d.ts +94 -0
- package/dist/providers/resilientProvider.d.ts.map +1 -0
- package/dist/providers/resilientProvider.js +370 -0
- package/dist/providers/resilientProvider.js.map +1 -0
- package/dist/runtime/agentController.d.ts +65 -0
- package/dist/runtime/agentController.d.ts.map +1 -0
- package/dist/runtime/agentController.js +353 -0
- package/dist/runtime/agentController.js.map +1 -0
- package/dist/runtime/agentHost.d.ts +61 -0
- package/dist/runtime/agentHost.d.ts.map +1 -0
- package/dist/runtime/agentHost.js +156 -0
- package/dist/runtime/agentHost.js.map +1 -0
- package/dist/runtime/agentSession.d.ts +40 -0
- package/dist/runtime/agentSession.d.ts.map +1 -0
- package/dist/runtime/agentSession.js +205 -0
- package/dist/runtime/agentSession.js.map +1 -0
- package/dist/runtime/browser.d.ts +7 -0
- package/dist/runtime/browser.d.ts.map +1 -0
- package/dist/runtime/browser.js +10 -0
- package/dist/runtime/browser.js.map +1 -0
- package/dist/runtime/cloud.d.ts +7 -0
- package/dist/runtime/cloud.d.ts.map +1 -0
- package/dist/runtime/cloud.js +10 -0
- package/dist/runtime/cloud.js.map +1 -0
- package/dist/runtime/node.d.ts +8 -0
- package/dist/runtime/node.d.ts.map +1 -0
- package/dist/runtime/node.js +11 -0
- package/dist/runtime/node.js.map +1 -0
- package/dist/runtime/universal.d.ts +21 -0
- package/dist/runtime/universal.d.ts.map +1 -0
- package/dist/runtime/universal.js +29 -0
- package/dist/runtime/universal.js.map +1 -0
- package/dist/shell/autoExecutor.d.ts +70 -0
- package/dist/shell/autoExecutor.d.ts.map +1 -0
- package/dist/shell/autoExecutor.js +288 -0
- package/dist/shell/autoExecutor.js.map +1 -0
- package/dist/shell/composableMessage.d.ts +183 -0
- package/dist/shell/composableMessage.d.ts.map +1 -0
- package/dist/shell/composableMessage.js +420 -0
- package/dist/shell/composableMessage.js.map +1 -0
- package/dist/shell/fileChangeTracker.d.ts +39 -0
- package/dist/shell/fileChangeTracker.d.ts.map +1 -0
- package/dist/shell/fileChangeTracker.js +64 -0
- package/dist/shell/fileChangeTracker.js.map +1 -0
- package/dist/shell/interactiveShell.d.ts +517 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -0
- package/dist/shell/interactiveShell.js +6646 -0
- package/dist/shell/interactiveShell.js.map +1 -0
- package/dist/shell/liveStatus.d.ts +30 -0
- package/dist/shell/liveStatus.d.ts.map +1 -0
- package/dist/shell/liveStatus.js +102 -0
- package/dist/shell/liveStatus.js.map +1 -0
- package/dist/shell/shellApp.d.ts +19 -0
- package/dist/shell/shellApp.d.ts.map +1 -0
- package/dist/shell/shellApp.js +411 -0
- package/dist/shell/shellApp.js.map +1 -0
- package/dist/shell/systemPrompt.d.ts +3 -0
- package/dist/shell/systemPrompt.d.ts.map +1 -0
- package/dist/shell/systemPrompt.js +64 -0
- package/dist/shell/systemPrompt.js.map +1 -0
- package/dist/shell/taskCompletionDetector.d.ts +106 -0
- package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
- package/dist/shell/taskCompletionDetector.js +402 -0
- package/dist/shell/taskCompletionDetector.js.map +1 -0
- package/dist/shell/vimMode.d.ts +66 -0
- package/dist/shell/vimMode.d.ts.map +1 -0
- package/dist/shell/vimMode.js +434 -0
- package/dist/shell/vimMode.js.map +1 -0
- package/dist/skills/skillRepository.d.ts +103 -0
- package/dist/skills/skillRepository.d.ts.map +1 -0
- package/dist/skills/skillRepository.js +237 -0
- package/dist/skills/skillRepository.js.map +1 -0
- package/dist/skills/types.d.ts +37 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +2 -0
- package/dist/skills/types.js.map +1 -0
- 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/parallelAgentManager.d.ts +99 -0
- package/dist/subagents/parallelAgentManager.d.ts.map +1 -0
- package/dist/subagents/parallelAgentManager.js +248 -0
- package/dist/subagents/parallelAgentManager.js.map +1 -0
- package/dist/subagents/taskRunner.d.ts +34 -0
- package/dist/subagents/taskRunner.d.ts.map +1 -0
- package/dist/subagents/taskRunner.js +459 -0
- package/dist/subagents/taskRunner.js.map +1 -0
- package/dist/tools/advancedTestGenerationTools.d.ts +21 -0
- package/dist/tools/advancedTestGenerationTools.d.ts.map +1 -0
- package/dist/tools/advancedTestGenerationTools.js +301 -0
- package/dist/tools/advancedTestGenerationTools.js.map +1 -0
- package/dist/tools/backgroundBashTools.d.ts +21 -0
- package/dist/tools/backgroundBashTools.d.ts.map +1 -0
- package/dist/tools/backgroundBashTools.js +215 -0
- package/dist/tools/backgroundBashTools.js.map +1 -0
- package/dist/tools/bashTools.d.ts +8 -0
- package/dist/tools/bashTools.d.ts.map +1 -0
- package/dist/tools/bashTools.js +240 -0
- package/dist/tools/bashTools.js.map +1 -0
- package/dist/tools/browserAutomationTools.d.ts +23 -0
- package/dist/tools/browserAutomationTools.d.ts.map +1 -0
- package/dist/tools/browserAutomationTools.js +916 -0
- package/dist/tools/browserAutomationTools.js.map +1 -0
- package/dist/tools/buildTools.d.ts +9 -0
- package/dist/tools/buildTools.d.ts.map +1 -0
- package/dist/tools/buildTools.js +344 -0
- package/dist/tools/buildTools.js.map +1 -0
- package/dist/tools/cloudTools.d.ts +49 -0
- package/dist/tools/cloudTools.d.ts.map +1 -0
- package/dist/tools/cloudTools.js +1258 -0
- package/dist/tools/cloudTools.js.map +1 -0
- package/dist/tools/code-quality-dashboard.d.ts +57 -0
- package/dist/tools/code-quality-dashboard.d.ts.map +1 -0
- package/dist/tools/code-quality-dashboard.js +218 -0
- package/dist/tools/code-quality-dashboard.js.map +1 -0
- package/dist/tools/codeAnalysisTools.d.ts +74 -0
- package/dist/tools/codeAnalysisTools.d.ts.map +1 -0
- package/dist/tools/codeAnalysisTools.js +664 -0
- package/dist/tools/codeAnalysisTools.js.map +1 -0
- package/dist/tools/codeGenerationTools.d.ts +3 -0
- package/dist/tools/codeGenerationTools.d.ts.map +1 -0
- package/dist/tools/codeGenerationTools.js +439 -0
- package/dist/tools/codeGenerationTools.js.map +1 -0
- package/dist/tools/codeQualityTools.d.ts +3 -0
- package/dist/tools/codeQualityTools.d.ts.map +1 -0
- package/dist/tools/codeQualityTools.js +296 -0
- package/dist/tools/codeQualityTools.js.map +1 -0
- package/dist/tools/dependencyTools.d.ts +3 -0
- package/dist/tools/dependencyTools.d.ts.map +1 -0
- package/dist/tools/dependencyTools.js +283 -0
- package/dist/tools/dependencyTools.js.map +1 -0
- package/dist/tools/devTools.d.ts +10 -0
- package/dist/tools/devTools.d.ts.map +1 -0
- package/dist/tools/devTools.js +2125 -0
- package/dist/tools/devTools.js.map +1 -0
- package/dist/tools/diffUtils.d.ts +36 -0
- package/dist/tools/diffUtils.d.ts.map +1 -0
- package/dist/tools/diffUtils.js +528 -0
- package/dist/tools/diffUtils.js.map +1 -0
- package/dist/tools/editTools.d.ts +29 -0
- package/dist/tools/editTools.d.ts.map +1 -0
- package/dist/tools/editTools.js +419 -0
- package/dist/tools/editTools.js.map +1 -0
- package/dist/tools/emailTools.d.ts +21 -0
- package/dist/tools/emailTools.d.ts.map +1 -0
- package/dist/tools/emailTools.js +449 -0
- package/dist/tools/emailTools.js.map +1 -0
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts +27 -0
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +1 -0
- package/dist/tools/enhancedCodeIntelligenceTools.js +418 -0
- package/dist/tools/enhancedCodeIntelligenceTools.js.map +1 -0
- package/dist/tools/enhancedDevWorkflowTools.d.ts +15 -0
- package/dist/tools/enhancedDevWorkflowTools.d.ts.map +1 -0
- package/dist/tools/enhancedDevWorkflowTools.js +303 -0
- package/dist/tools/enhancedDevWorkflowTools.js.map +1 -0
- package/dist/tools/fileTools.d.ts +3 -0
- package/dist/tools/fileTools.d.ts.map +1 -0
- package/dist/tools/fileTools.js +334 -0
- package/dist/tools/fileTools.js.map +1 -0
- package/dist/tools/frontendTestingTools.d.ts +35 -0
- package/dist/tools/frontendTestingTools.d.ts.map +1 -0
- package/dist/tools/frontendTestingTools.js +1254 -0
- package/dist/tools/frontendTestingTools.js.map +1 -0
- package/dist/tools/globTools.d.ts +15 -0
- package/dist/tools/globTools.d.ts.map +1 -0
- package/dist/tools/globTools.js +174 -0
- package/dist/tools/globTools.js.map +1 -0
- package/dist/tools/grepTools.d.ts +19 -0
- package/dist/tools/grepTools.d.ts.map +1 -0
- package/dist/tools/grepTools.js +358 -0
- package/dist/tools/grepTools.js.map +1 -0
- package/dist/tools/interactionTools.d.ts +13 -0
- package/dist/tools/interactionTools.d.ts.map +1 -0
- package/dist/tools/interactionTools.js +171 -0
- package/dist/tools/interactionTools.js.map +1 -0
- package/dist/tools/learnTools.d.ts +164 -0
- package/dist/tools/learnTools.d.ts.map +1 -0
- package/dist/tools/learnTools.js +2104 -0
- package/dist/tools/learnTools.js.map +1 -0
- package/dist/tools/localExplore.d.ts +225 -0
- package/dist/tools/localExplore.d.ts.map +1 -0
- package/dist/tools/localExplore.js +1365 -0
- package/dist/tools/localExplore.js.map +1 -0
- package/dist/tools/notebookEditTools.d.ts +15 -0
- package/dist/tools/notebookEditTools.d.ts.map +1 -0
- package/dist/tools/notebookEditTools.js +197 -0
- package/dist/tools/notebookEditTools.js.map +1 -0
- package/dist/tools/planningTools.d.ts +21 -0
- package/dist/tools/planningTools.d.ts.map +1 -0
- package/dist/tools/planningTools.js +185 -0
- package/dist/tools/planningTools.js.map +1 -0
- package/dist/tools/refactoringTools.d.ts +3 -0
- package/dist/tools/refactoringTools.d.ts.map +1 -0
- package/dist/tools/refactoringTools.js +294 -0
- package/dist/tools/refactoringTools.js.map +1 -0
- package/dist/tools/repoChecksTools.d.ts +3 -0
- package/dist/tools/repoChecksTools.d.ts.map +1 -0
- package/dist/tools/repoChecksTools.js +161 -0
- package/dist/tools/repoChecksTools.js.map +1 -0
- package/dist/tools/searchTools.d.ts +3 -0
- package/dist/tools/searchTools.d.ts.map +1 -0
- package/dist/tools/searchTools.js +241 -0
- package/dist/tools/searchTools.js.map +1 -0
- package/dist/tools/skillTools.d.ts +8 -0
- package/dist/tools/skillTools.d.ts.map +1 -0
- package/dist/tools/skillTools.js +178 -0
- package/dist/tools/skillTools.js.map +1 -0
- package/dist/tools/softwareEngineeringTools.d.ts +7 -0
- package/dist/tools/softwareEngineeringTools.d.ts.map +1 -0
- package/dist/tools/softwareEngineeringTools.js +338 -0
- package/dist/tools/softwareEngineeringTools.js.map +1 -0
- package/dist/tools/taskManagementTools.d.ts +10 -0
- package/dist/tools/taskManagementTools.d.ts.map +1 -0
- package/dist/tools/taskManagementTools.js +157 -0
- package/dist/tools/taskManagementTools.js.map +1 -0
- package/dist/tools/testingTools.d.ts +3 -0
- package/dist/tools/testingTools.d.ts.map +1 -0
- package/dist/tools/testingTools.js +233 -0
- package/dist/tools/testingTools.js.map +1 -0
- package/dist/tools/validationTools.d.ts +7 -0
- package/dist/tools/validationTools.d.ts.map +1 -0
- package/dist/tools/validationTools.js +344 -0
- package/dist/tools/validationTools.js.map +1 -0
- package/dist/tools/webTools.d.ts +3 -0
- package/dist/tools/webTools.d.ts.map +1 -0
- package/dist/tools/webTools.js +502 -0
- package/dist/tools/webTools.js.map +1 -0
- package/dist/ui/DisplayEventQueue.d.ts +99 -0
- package/dist/ui/DisplayEventQueue.d.ts.map +1 -0
- package/dist/ui/DisplayEventQueue.js +167 -0
- package/dist/ui/DisplayEventQueue.js.map +1 -0
- package/dist/ui/PromptController.d.ts +103 -0
- package/dist/ui/PromptController.d.ts.map +1 -0
- package/dist/ui/PromptController.js +171 -0
- package/dist/ui/PromptController.js.map +1 -0
- package/dist/ui/SequentialRenderer.d.ts +69 -0
- package/dist/ui/SequentialRenderer.d.ts.map +1 -0
- package/dist/ui/SequentialRenderer.js +137 -0
- package/dist/ui/SequentialRenderer.js.map +1 -0
- package/dist/ui/ShellUIAdapter.d.ts +207 -0
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -0
- package/dist/ui/ShellUIAdapter.js +1163 -0
- package/dist/ui/ShellUIAdapter.js.map +1 -0
- package/dist/ui/UnifiedUIController.d.ts +82 -0
- package/dist/ui/UnifiedUIController.d.ts.map +1 -0
- package/dist/ui/UnifiedUIController.js +207 -0
- package/dist/ui/UnifiedUIController.js.map +1 -0
- package/dist/ui/UnifiedUIRenderer.d.ts +188 -0
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -0
- package/dist/ui/UnifiedUIRenderer.js +580 -0
- package/dist/ui/UnifiedUIRenderer.js.map +1 -0
- package/dist/ui/animation/AnimationScheduler.d.ts +192 -0
- package/dist/ui/animation/AnimationScheduler.d.ts.map +1 -0
- package/dist/ui/animation/AnimationScheduler.js +432 -0
- package/dist/ui/animation/AnimationScheduler.js.map +1 -0
- package/dist/ui/codeHighlighter.d.ts +6 -0
- package/dist/ui/codeHighlighter.d.ts.map +1 -0
- package/dist/ui/codeHighlighter.js +855 -0
- package/dist/ui/codeHighlighter.js.map +1 -0
- package/dist/ui/compactRenderer.d.ts +139 -0
- package/dist/ui/compactRenderer.d.ts.map +1 -0
- package/dist/ui/compactRenderer.js +398 -0
- package/dist/ui/compactRenderer.js.map +1 -0
- package/dist/ui/designSystem.d.ts +26 -0
- package/dist/ui/designSystem.d.ts.map +1 -0
- package/dist/ui/designSystem.js +122 -0
- package/dist/ui/designSystem.js.map +1 -0
- package/dist/ui/display.d.ts +229 -0
- package/dist/ui/display.d.ts.map +1 -0
- package/dist/ui/display.js +756 -0
- package/dist/ui/display.js.map +1 -0
- package/dist/ui/errorFormatter.d.ts +54 -0
- package/dist/ui/errorFormatter.d.ts.map +1 -0
- package/dist/ui/errorFormatter.js +251 -0
- package/dist/ui/errorFormatter.js.map +1 -0
- package/dist/ui/globalWriteLock.d.ts +38 -0
- package/dist/ui/globalWriteLock.d.ts.map +1 -0
- package/dist/ui/globalWriteLock.js +54 -0
- package/dist/ui/globalWriteLock.js.map +1 -0
- package/dist/ui/inPlaceUpdater.d.ts +181 -0
- package/dist/ui/inPlaceUpdater.d.ts.map +1 -0
- package/dist/ui/inPlaceUpdater.js +515 -0
- package/dist/ui/inPlaceUpdater.js.map +1 -0
- package/dist/ui/interrupts/InterruptManager.d.ts +142 -0
- package/dist/ui/interrupts/InterruptManager.d.ts.map +1 -0
- package/dist/ui/interrupts/InterruptManager.js +439 -0
- package/dist/ui/interrupts/InterruptManager.js.map +1 -0
- package/dist/ui/layout.d.ts +17 -0
- package/dist/ui/layout.d.ts.map +1 -0
- package/dist/ui/layout.js +140 -0
- package/dist/ui/layout.js.map +1 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts +156 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +1 -0
- package/dist/ui/orchestration/StatusOrchestrator.js +406 -0
- package/dist/ui/orchestration/StatusOrchestrator.js.map +1 -0
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts +77 -0
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts.map +1 -0
- package/dist/ui/orchestration/UIUpdateCoordinator.js +265 -0
- package/dist/ui/orchestration/UIUpdateCoordinator.js.map +1 -0
- package/dist/ui/outputMode.d.ts +22 -0
- package/dist/ui/outputMode.d.ts.map +1 -0
- package/dist/ui/outputMode.js +40 -0
- package/dist/ui/outputMode.js.map +1 -0
- package/dist/ui/richText.d.ts +6 -0
- package/dist/ui/richText.d.ts.map +1 -0
- package/dist/ui/richText.js +391 -0
- package/dist/ui/richText.js.map +1 -0
- package/dist/ui/shortcutsHelp.d.ts +39 -0
- package/dist/ui/shortcutsHelp.d.ts.map +1 -0
- package/dist/ui/shortcutsHelp.js +152 -0
- package/dist/ui/shortcutsHelp.js.map +1 -0
- package/dist/ui/streamingFormatter.d.ts +19 -0
- package/dist/ui/streamingFormatter.d.ts.map +1 -0
- package/dist/ui/streamingFormatter.js +65 -0
- package/dist/ui/streamingFormatter.js.map +1 -0
- package/dist/ui/telemetry/ResponseTracker.d.ts +22 -0
- package/dist/ui/telemetry/ResponseTracker.d.ts.map +1 -0
- package/dist/ui/telemetry/ResponseTracker.js +60 -0
- package/dist/ui/telemetry/ResponseTracker.js.map +1 -0
- package/dist/ui/telemetry/UITelemetry.d.ts +181 -0
- package/dist/ui/telemetry/UITelemetry.d.ts.map +1 -0
- package/dist/ui/telemetry/UITelemetry.js +446 -0
- package/dist/ui/telemetry/UITelemetry.js.map +1 -0
- package/dist/ui/textHighlighter.d.ts +83 -0
- package/dist/ui/textHighlighter.d.ts.map +1 -0
- package/dist/ui/textHighlighter.js +267 -0
- package/dist/ui/textHighlighter.js.map +1 -0
- package/dist/ui/theme.d.ts +208 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +249 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/toolDisplay.d.ts +195 -0
- package/dist/ui/toolDisplay.d.ts.map +1 -0
- package/dist/ui/toolDisplay.js +1526 -0
- package/dist/ui/toolDisplay.js.map +1 -0
- package/dist/ui/unified/index.d.ts +50 -0
- package/dist/ui/unified/index.d.ts.map +1 -0
- package/dist/ui/unified/index.js +77 -0
- package/dist/ui/unified/index.js.map +1 -0
- package/dist/ui/unified/layout.d.ts +12 -0
- package/dist/ui/unified/layout.d.ts.map +1 -0
- package/dist/ui/unified/layout.js +96 -0
- package/dist/ui/unified/layout.js.map +1 -0
- package/dist/ui/writeLock.d.ts +65 -0
- package/dist/ui/writeLock.d.ts.map +1 -0
- package/dist/ui/writeLock.js +114 -0
- package/dist/ui/writeLock.js.map +1 -0
- package/dist/utils/asyncUtils.d.ts +95 -0
- package/dist/utils/asyncUtils.d.ts.map +1 -0
- package/dist/utils/asyncUtils.js +286 -0
- package/dist/utils/asyncUtils.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +16 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +66 -0
- package/dist/utils/errorUtils.js.map +1 -0
- 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/dist/utils/planFormatter.d.ts +34 -0
- package/dist/utils/planFormatter.d.ts.map +1 -0
- package/dist/utils/planFormatter.js +140 -0
- package/dist/utils/planFormatter.js.map +1 -0
- package/dist/workspace.d.ts +8 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +107 -0
- package/dist/workspace.js.map +1 -0
- package/dist/workspace.validator.d.ts +49 -0
- package/dist/workspace.validator.d.ts.map +1 -0
- package/dist/workspace.validator.js +214 -0
- package/dist/workspace.validator.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authorized Security Assessment Framework
|
|
3
|
+
*
|
|
4
|
+
* Ethical security testing that requires explicit authorization.
|
|
5
|
+
* Focuses on defensive assessment and remediation guidance.
|
|
6
|
+
*
|
|
7
|
+
* Use cases:
|
|
8
|
+
* - Scanning YOUR OWN code for vulnerabilities
|
|
9
|
+
* - OWASP-style security checklists
|
|
10
|
+
* - Dependency vulnerability analysis
|
|
11
|
+
* - Secret detection in codebases you own
|
|
12
|
+
* - CTF challenge assistance
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Authorization context for security testing
|
|
16
|
+
*/
|
|
17
|
+
export interface SecurityAuthorizationContext {
|
|
18
|
+
/** User explicitly confirms they own/have permission to test this target */
|
|
19
|
+
ownershipConfirmed: boolean;
|
|
20
|
+
/** Target scope (paths, URLs) they're authorized to test */
|
|
21
|
+
authorizedScope: string[];
|
|
22
|
+
/** Authorization timestamp */
|
|
23
|
+
authorizedAt: Date;
|
|
24
|
+
/** Type of testing authorized */
|
|
25
|
+
testingType: 'code-review' | 'dependency-scan' | 'secret-detection' | 'ctf' | 'full-assessment';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Vulnerability finding
|
|
29
|
+
*/
|
|
30
|
+
export interface VulnerabilityFinding {
|
|
31
|
+
id: string;
|
|
32
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
33
|
+
category: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
location: {
|
|
37
|
+
file?: string;
|
|
38
|
+
line?: number;
|
|
39
|
+
snippet?: string;
|
|
40
|
+
};
|
|
41
|
+
remediation: string;
|
|
42
|
+
references: string[];
|
|
43
|
+
cwe?: string;
|
|
44
|
+
owasp?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Security assessment result
|
|
48
|
+
*/
|
|
49
|
+
export interface SecurityAssessmentResult {
|
|
50
|
+
success: boolean;
|
|
51
|
+
scanType: string;
|
|
52
|
+
scope: string[];
|
|
53
|
+
timestamp: Date;
|
|
54
|
+
findings: VulnerabilityFinding[];
|
|
55
|
+
summary: {
|
|
56
|
+
critical: number;
|
|
57
|
+
high: number;
|
|
58
|
+
medium: number;
|
|
59
|
+
low: number;
|
|
60
|
+
info: number;
|
|
61
|
+
};
|
|
62
|
+
recommendations: string[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Verify authorization before any security testing
|
|
66
|
+
*/
|
|
67
|
+
export declare function verifyAuthorization(context: SecurityAuthorizationContext, targetPath: string): {
|
|
68
|
+
authorized: boolean;
|
|
69
|
+
reason?: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Scan source code for vulnerabilities
|
|
73
|
+
*/
|
|
74
|
+
export declare function scanSourceCode(directory: string, context: SecurityAuthorizationContext): SecurityAssessmentResult;
|
|
75
|
+
/**
|
|
76
|
+
* Scan for hardcoded secrets
|
|
77
|
+
*/
|
|
78
|
+
export declare function scanSecrets(directory: string, context: SecurityAuthorizationContext): SecurityAssessmentResult;
|
|
79
|
+
/**
|
|
80
|
+
* Scan npm dependencies for vulnerabilities
|
|
81
|
+
*/
|
|
82
|
+
export declare function scanDependencies(directory: string, context: SecurityAuthorizationContext): SecurityAssessmentResult;
|
|
83
|
+
/**
|
|
84
|
+
* Format assessment results for display
|
|
85
|
+
*/
|
|
86
|
+
export declare function formatAssessmentReport(result: SecurityAssessmentResult): string;
|
|
87
|
+
/**
|
|
88
|
+
* Create authorization context (requires user confirmation)
|
|
89
|
+
*/
|
|
90
|
+
export declare function createAuthorizationContext(scope: string[], testingType: SecurityAuthorizationContext['testingType']): SecurityAuthorizationContext;
|
|
91
|
+
//# sourceMappingURL=securityAssessment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityAssessment.d.ts","sourceRoot":"","sources":["../../src/core/securityAssessment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,4EAA4E;IAC5E,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4DAA4D;IAC5D,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,8BAA8B;IAC9B,YAAY,EAAE,IAAI,CAAC;IACnB,iCAAiC;IACjC,WAAW,EAAE,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,KAAK,GAAG,iBAAiB,CAAC;CACjG;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AA+JD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,4BAA4B,EACrC,UAAU,EAAE,MAAM,GACjB;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAiC1C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,4BAA4B,GACpC,wBAAwB,CA6F1B;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,4BAA4B,GACpC,wBAAwB,CAoG1B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,4BAA4B,GACpC,wBAAwB,CAqG1B;AAuCD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,CAuD/E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EAAE,EACf,WAAW,EAAE,4BAA4B,CAAC,aAAa,CAAC,GACvD,4BAA4B,CAO9B"}
|
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authorized Security Assessment Framework
|
|
3
|
+
*
|
|
4
|
+
* Ethical security testing that requires explicit authorization.
|
|
5
|
+
* Focuses on defensive assessment and remediation guidance.
|
|
6
|
+
*
|
|
7
|
+
* Use cases:
|
|
8
|
+
* - Scanning YOUR OWN code for vulnerabilities
|
|
9
|
+
* - OWASP-style security checklists
|
|
10
|
+
* - Dependency vulnerability analysis
|
|
11
|
+
* - Secret detection in codebases you own
|
|
12
|
+
* - CTF challenge assistance
|
|
13
|
+
*/
|
|
14
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
15
|
+
import { join, extname, relative } from 'node:path';
|
|
16
|
+
import { execSync } from 'node:child_process';
|
|
17
|
+
// Common vulnerability patterns for static analysis
|
|
18
|
+
const VULNERABILITY_PATTERNS = {
|
|
19
|
+
// Injection vulnerabilities
|
|
20
|
+
sqlInjection: {
|
|
21
|
+
patterns: [
|
|
22
|
+
/`.*\$\{.*\}.*`.*(?:SELECT|INSERT|UPDATE|DELETE|FROM|WHERE)/gi,
|
|
23
|
+
/(?:execute|query|prepare)\s*\(\s*[`'"].*\+/gi,
|
|
24
|
+
/\.(?:raw|unsafeRaw)\s*\(/gi,
|
|
25
|
+
],
|
|
26
|
+
severity: 'critical',
|
|
27
|
+
category: 'Injection',
|
|
28
|
+
title: 'Potential SQL Injection',
|
|
29
|
+
cwe: 'CWE-89',
|
|
30
|
+
owasp: 'A03:2021 Injection',
|
|
31
|
+
remediation: 'Use parameterized queries or prepared statements. Never concatenate user input into SQL strings.',
|
|
32
|
+
},
|
|
33
|
+
commandInjection: {
|
|
34
|
+
patterns: [
|
|
35
|
+
/exec(?:Sync)?\s*\(\s*[`'"].*\$\{/gi,
|
|
36
|
+
/spawn(?:Sync)?\s*\(\s*[`'"].*\$\{/gi,
|
|
37
|
+
/child_process.*exec.*\+/gi,
|
|
38
|
+
],
|
|
39
|
+
severity: 'critical',
|
|
40
|
+
category: 'Injection',
|
|
41
|
+
title: 'Potential Command Injection',
|
|
42
|
+
cwe: 'CWE-78',
|
|
43
|
+
owasp: 'A03:2021 Injection',
|
|
44
|
+
remediation: 'Avoid shell commands with user input. Use parameterized APIs or strict input validation.',
|
|
45
|
+
},
|
|
46
|
+
xss: {
|
|
47
|
+
patterns: [
|
|
48
|
+
/innerHTML\s*=\s*[^;]*\$/gi,
|
|
49
|
+
/dangerouslySetInnerHTML/gi,
|
|
50
|
+
/document\.write\s*\(/gi,
|
|
51
|
+
/\.html\s*\(\s*[^)]*\$/gi,
|
|
52
|
+
],
|
|
53
|
+
severity: 'high',
|
|
54
|
+
category: 'XSS',
|
|
55
|
+
title: 'Potential Cross-Site Scripting',
|
|
56
|
+
cwe: 'CWE-79',
|
|
57
|
+
owasp: 'A03:2021 Injection',
|
|
58
|
+
remediation: 'Use safe DOM manipulation methods. Sanitize all user input before rendering.',
|
|
59
|
+
},
|
|
60
|
+
pathTraversal: {
|
|
61
|
+
patterns: [
|
|
62
|
+
/(?:readFile|writeFile|unlink|rmdir).*\+.*(?:req\.|params\.|query\.)/gi,
|
|
63
|
+
/\.\.\/.*\$\{/gi,
|
|
64
|
+
/path\.join\s*\([^)]*(?:req\.|params\.|query\.)/gi,
|
|
65
|
+
],
|
|
66
|
+
severity: 'high',
|
|
67
|
+
category: 'Path Traversal',
|
|
68
|
+
title: 'Potential Path Traversal',
|
|
69
|
+
cwe: 'CWE-22',
|
|
70
|
+
owasp: 'A01:2021 Broken Access Control',
|
|
71
|
+
remediation: 'Validate and sanitize file paths. Use path.resolve() and verify paths stay within expected directories.',
|
|
72
|
+
},
|
|
73
|
+
// Authentication/Authorization
|
|
74
|
+
hardcodedCredentials: {
|
|
75
|
+
patterns: [
|
|
76
|
+
/(?:password|passwd|pwd|secret|api_key|apikey|token)\s*[:=]\s*['"]\w{8,}['"]/gi,
|
|
77
|
+
/(?:BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY)/gi,
|
|
78
|
+
/(?:aws_access_key_id|aws_secret_access_key)\s*[:=]/gi,
|
|
79
|
+
],
|
|
80
|
+
severity: 'critical',
|
|
81
|
+
category: 'Secrets',
|
|
82
|
+
title: 'Hardcoded Credentials',
|
|
83
|
+
cwe: 'CWE-798',
|
|
84
|
+
owasp: 'A07:2021 Identification and Authentication Failures',
|
|
85
|
+
remediation: 'Use environment variables or secure secret management. Never commit secrets to version control.',
|
|
86
|
+
},
|
|
87
|
+
weakCrypto: {
|
|
88
|
+
patterns: [
|
|
89
|
+
/createHash\s*\(\s*['"](?:md5|sha1)['"]\s*\)/gi,
|
|
90
|
+
/crypto\.(?:createCipher|createDecipher)\s*\(/gi,
|
|
91
|
+
/DES|RC4|Blowfish/gi,
|
|
92
|
+
],
|
|
93
|
+
severity: 'medium',
|
|
94
|
+
category: 'Cryptography',
|
|
95
|
+
title: 'Weak Cryptographic Algorithm',
|
|
96
|
+
cwe: 'CWE-327',
|
|
97
|
+
owasp: 'A02:2021 Cryptographic Failures',
|
|
98
|
+
remediation: 'Use strong algorithms: SHA-256+, AES-256-GCM, bcrypt/argon2 for passwords.',
|
|
99
|
+
},
|
|
100
|
+
// Insecure configuration
|
|
101
|
+
debugEnabled: {
|
|
102
|
+
patterns: [
|
|
103
|
+
/DEBUG\s*[:=]\s*['"]?true['"]?/gi,
|
|
104
|
+
/NODE_ENV\s*[:=]\s*['"]development['"]/gi,
|
|
105
|
+
/console\.(?:log|debug|trace)\s*\([^)]*(?:password|token|secret|key)/gi,
|
|
106
|
+
],
|
|
107
|
+
severity: 'medium',
|
|
108
|
+
category: 'Configuration',
|
|
109
|
+
title: 'Debug Mode / Sensitive Logging',
|
|
110
|
+
cwe: 'CWE-489',
|
|
111
|
+
owasp: 'A05:2021 Security Misconfiguration',
|
|
112
|
+
remediation: 'Disable debug mode in production. Never log sensitive data.',
|
|
113
|
+
},
|
|
114
|
+
corsWildcard: {
|
|
115
|
+
patterns: [
|
|
116
|
+
/Access-Control-Allow-Origin.*\*/gi,
|
|
117
|
+
/cors\s*\(\s*\{[^}]*origin\s*:\s*['"]\*['"]/gi,
|
|
118
|
+
/cors\s*\(\s*\)/gi,
|
|
119
|
+
],
|
|
120
|
+
severity: 'medium',
|
|
121
|
+
category: 'Configuration',
|
|
122
|
+
title: 'Overly Permissive CORS',
|
|
123
|
+
cwe: 'CWE-942',
|
|
124
|
+
owasp: 'A05:2021 Security Misconfiguration',
|
|
125
|
+
remediation: 'Restrict CORS to specific trusted origins. Avoid wildcard (*) in production.',
|
|
126
|
+
},
|
|
127
|
+
// Unsafe patterns
|
|
128
|
+
evalUsage: {
|
|
129
|
+
patterns: [
|
|
130
|
+
/\beval\s*\(/gi,
|
|
131
|
+
/new\s+Function\s*\(/gi,
|
|
132
|
+
/setTimeout\s*\(\s*['"]/gi,
|
|
133
|
+
/setInterval\s*\(\s*['"]/gi,
|
|
134
|
+
],
|
|
135
|
+
severity: 'high',
|
|
136
|
+
category: 'Code Execution',
|
|
137
|
+
title: 'Dynamic Code Execution',
|
|
138
|
+
cwe: 'CWE-95',
|
|
139
|
+
owasp: 'A03:2021 Injection',
|
|
140
|
+
remediation: 'Avoid eval() and new Function(). Use safe alternatives like JSON.parse() for data.',
|
|
141
|
+
},
|
|
142
|
+
prototypePollutiion: {
|
|
143
|
+
patterns: [
|
|
144
|
+
/Object\.assign\s*\([^,]+,\s*(?:req\.|params\.|query\.|body\.)/gi,
|
|
145
|
+
/\[.*\]\s*=.*(?:req\.|params\.|query\.|body\.)/gi,
|
|
146
|
+
/__proto__|constructor\.prototype/gi,
|
|
147
|
+
],
|
|
148
|
+
severity: 'high',
|
|
149
|
+
category: 'Object Manipulation',
|
|
150
|
+
title: 'Potential Prototype Pollution',
|
|
151
|
+
cwe: 'CWE-1321',
|
|
152
|
+
owasp: 'A03:2021 Injection',
|
|
153
|
+
remediation: 'Use Object.create(null) for dictionaries. Validate object keys before assignment.',
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
// Secret patterns for detection
|
|
157
|
+
const SECRET_PATTERNS = [
|
|
158
|
+
{ name: 'AWS Access Key', pattern: /AKIA[0-9A-Z]{16}/g },
|
|
159
|
+
{ name: 'AWS Secret Key', pattern: /[A-Za-z0-9/+=]{40}/g },
|
|
160
|
+
{ name: 'GitHub Token', pattern: /gh[pousr]_[A-Za-z0-9_]{36,}/g },
|
|
161
|
+
{ name: 'Slack Token', pattern: /xox[baprs]-[0-9]{10,13}-[0-9]{10,13}-[a-zA-Z0-9]{24}/g },
|
|
162
|
+
{ name: 'Stripe Key', pattern: /sk_live_[0-9a-zA-Z]{24}/g },
|
|
163
|
+
{ name: 'RSA Private Key', pattern: /-----BEGIN RSA PRIVATE KEY-----/g },
|
|
164
|
+
{ name: 'Generic API Key', pattern: /(?:api[_-]?key|apikey)\s*[:=]\s*['"][A-Za-z0-9_\-]{20,}['"]/gi },
|
|
165
|
+
{ name: 'Generic Secret', pattern: /(?:secret|password|passwd)\s*[:=]\s*['"][^'"]{8,}['"]/gi },
|
|
166
|
+
{ name: 'JWT Token', pattern: /eyJ[A-Za-z0-9_-]*\.eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*/g },
|
|
167
|
+
{ name: 'NPM Token', pattern: /npm_[A-Za-z0-9]{36}/g },
|
|
168
|
+
];
|
|
169
|
+
/**
|
|
170
|
+
* Verify authorization before any security testing
|
|
171
|
+
*/
|
|
172
|
+
export function verifyAuthorization(context, targetPath) {
|
|
173
|
+
if (!context.ownershipConfirmed) {
|
|
174
|
+
return {
|
|
175
|
+
authorized: false,
|
|
176
|
+
reason: 'You must confirm ownership/permission before security testing.',
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
// Check if target is within authorized scope
|
|
180
|
+
const isInScope = context.authorizedScope.some((scope) => {
|
|
181
|
+
if (scope.startsWith('/')) {
|
|
182
|
+
return targetPath.startsWith(scope);
|
|
183
|
+
}
|
|
184
|
+
return targetPath.includes(scope);
|
|
185
|
+
});
|
|
186
|
+
if (!isInScope) {
|
|
187
|
+
return {
|
|
188
|
+
authorized: false,
|
|
189
|
+
reason: `Target "${targetPath}" is not within authorized scope: ${context.authorizedScope.join(', ')}`,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
// Check authorization is recent (within 24 hours)
|
|
193
|
+
const hoursSinceAuth = (Date.now() - context.authorizedAt.getTime()) / (1000 * 60 * 60);
|
|
194
|
+
if (hoursSinceAuth > 24) {
|
|
195
|
+
return {
|
|
196
|
+
authorized: false,
|
|
197
|
+
reason: 'Authorization expired. Please re-authorize (valid for 24 hours).',
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
return { authorized: true };
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Scan source code for vulnerabilities
|
|
204
|
+
*/
|
|
205
|
+
export function scanSourceCode(directory, context) {
|
|
206
|
+
const authCheck = verifyAuthorization(context, directory);
|
|
207
|
+
if (!authCheck.authorized) {
|
|
208
|
+
return {
|
|
209
|
+
success: false,
|
|
210
|
+
scanType: 'source-code',
|
|
211
|
+
scope: [directory],
|
|
212
|
+
timestamp: new Date(),
|
|
213
|
+
findings: [],
|
|
214
|
+
summary: { critical: 0, high: 0, medium: 0, low: 0, info: 0 },
|
|
215
|
+
recommendations: [authCheck.reason ?? 'Authorization failed'],
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const findings = [];
|
|
219
|
+
const extensions = ['.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs'];
|
|
220
|
+
function scanFile(filePath) {
|
|
221
|
+
const ext = extname(filePath);
|
|
222
|
+
if (!extensions.includes(ext))
|
|
223
|
+
return;
|
|
224
|
+
let content;
|
|
225
|
+
try {
|
|
226
|
+
content = readFileSync(filePath, 'utf-8');
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const lines = content.split('\n');
|
|
232
|
+
for (const [vulnName, vulnConfig] of Object.entries(VULNERABILITY_PATTERNS)) {
|
|
233
|
+
for (const pattern of vulnConfig.patterns) {
|
|
234
|
+
const matches = content.matchAll(new RegExp(pattern.source, pattern.flags));
|
|
235
|
+
for (const match of matches) {
|
|
236
|
+
const lineNumber = content.substring(0, match.index ?? 0).split('\n').length;
|
|
237
|
+
const snippetLine = lines[lineNumber - 1] ?? '';
|
|
238
|
+
findings.push({
|
|
239
|
+
id: `${vulnName}-${filePath}-${lineNumber}`,
|
|
240
|
+
severity: vulnConfig.severity,
|
|
241
|
+
category: vulnConfig.category,
|
|
242
|
+
title: vulnConfig.title,
|
|
243
|
+
description: `Found pattern matching potential ${vulnConfig.title.toLowerCase()}.`,
|
|
244
|
+
location: {
|
|
245
|
+
file: relative(directory, filePath),
|
|
246
|
+
line: lineNumber,
|
|
247
|
+
snippet: snippetLine.trim().substring(0, 100),
|
|
248
|
+
},
|
|
249
|
+
remediation: vulnConfig.remediation,
|
|
250
|
+
references: [
|
|
251
|
+
`https://cwe.mitre.org/data/definitions/${vulnConfig.cwe?.replace('CWE-', '')}.html`,
|
|
252
|
+
],
|
|
253
|
+
cwe: vulnConfig.cwe,
|
|
254
|
+
owasp: vulnConfig.owasp,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function scanDirectory(dir) {
|
|
261
|
+
const entries = readdirSync(dir);
|
|
262
|
+
for (const entry of entries) {
|
|
263
|
+
if (entry === 'node_modules' || entry === '.git' || entry === 'dist')
|
|
264
|
+
continue;
|
|
265
|
+
const fullPath = join(dir, entry);
|
|
266
|
+
const stat = statSync(fullPath);
|
|
267
|
+
if (stat.isDirectory()) {
|
|
268
|
+
scanDirectory(fullPath);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
scanFile(fullPath);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
scanDirectory(directory);
|
|
276
|
+
const summary = {
|
|
277
|
+
critical: findings.filter((f) => f.severity === 'critical').length,
|
|
278
|
+
high: findings.filter((f) => f.severity === 'high').length,
|
|
279
|
+
medium: findings.filter((f) => f.severity === 'medium').length,
|
|
280
|
+
low: findings.filter((f) => f.severity === 'low').length,
|
|
281
|
+
info: findings.filter((f) => f.severity === 'info').length,
|
|
282
|
+
};
|
|
283
|
+
return {
|
|
284
|
+
success: true,
|
|
285
|
+
scanType: 'source-code',
|
|
286
|
+
scope: [directory],
|
|
287
|
+
timestamp: new Date(),
|
|
288
|
+
findings,
|
|
289
|
+
summary,
|
|
290
|
+
recommendations: generateRecommendations(findings),
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Scan for hardcoded secrets
|
|
295
|
+
*/
|
|
296
|
+
export function scanSecrets(directory, context) {
|
|
297
|
+
const authCheck = verifyAuthorization(context, directory);
|
|
298
|
+
if (!authCheck.authorized) {
|
|
299
|
+
return {
|
|
300
|
+
success: false,
|
|
301
|
+
scanType: 'secret-detection',
|
|
302
|
+
scope: [directory],
|
|
303
|
+
timestamp: new Date(),
|
|
304
|
+
findings: [],
|
|
305
|
+
summary: { critical: 0, high: 0, medium: 0, low: 0, info: 0 },
|
|
306
|
+
recommendations: [authCheck.reason ?? 'Authorization failed'],
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
const findings = [];
|
|
310
|
+
const extensions = ['.js', '.ts', '.jsx', '.tsx', '.json', '.env', '.yml', '.yaml', '.conf', '.config'];
|
|
311
|
+
function scanFile(filePath) {
|
|
312
|
+
const ext = extname(filePath);
|
|
313
|
+
const basename = filePath.split('/').pop() ?? '';
|
|
314
|
+
// Include .env files and config files
|
|
315
|
+
if (!extensions.includes(ext) && !basename.startsWith('.env') && !basename.includes('config')) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
let content;
|
|
319
|
+
try {
|
|
320
|
+
content = readFileSync(filePath, 'utf-8');
|
|
321
|
+
}
|
|
322
|
+
catch {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
const lines = content.split('\n');
|
|
326
|
+
for (const secretPattern of SECRET_PATTERNS) {
|
|
327
|
+
const matches = content.matchAll(new RegExp(secretPattern.pattern.source, secretPattern.pattern.flags));
|
|
328
|
+
for (const match of matches) {
|
|
329
|
+
const lineNumber = content.substring(0, match.index ?? 0).split('\n').length;
|
|
330
|
+
const snippetLine = lines[lineNumber - 1] ?? '';
|
|
331
|
+
// Mask the secret in the output
|
|
332
|
+
const masked = match[0].substring(0, 8) + '...[REDACTED]';
|
|
333
|
+
findings.push({
|
|
334
|
+
id: `secret-${filePath}-${lineNumber}`,
|
|
335
|
+
severity: 'critical',
|
|
336
|
+
category: 'Secrets',
|
|
337
|
+
title: `Potential ${secretPattern.name}`,
|
|
338
|
+
description: `Found what appears to be a ${secretPattern.name} in source code.`,
|
|
339
|
+
location: {
|
|
340
|
+
file: relative(directory, filePath),
|
|
341
|
+
line: lineNumber,
|
|
342
|
+
snippet: snippetLine.replace(match[0], masked).trim().substring(0, 100),
|
|
343
|
+
},
|
|
344
|
+
remediation: 'Remove secret from source code. Use environment variables or a secret management service.',
|
|
345
|
+
references: [
|
|
346
|
+
'https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/',
|
|
347
|
+
],
|
|
348
|
+
cwe: 'CWE-798',
|
|
349
|
+
owasp: 'A07:2021',
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function scanDirectory(dir) {
|
|
355
|
+
const entries = readdirSync(dir);
|
|
356
|
+
for (const entry of entries) {
|
|
357
|
+
if (entry === 'node_modules' || entry === '.git')
|
|
358
|
+
continue;
|
|
359
|
+
const fullPath = join(dir, entry);
|
|
360
|
+
const stat = statSync(fullPath);
|
|
361
|
+
if (stat.isDirectory()) {
|
|
362
|
+
scanDirectory(fullPath);
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
scanFile(fullPath);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
scanDirectory(directory);
|
|
370
|
+
const summary = {
|
|
371
|
+
critical: findings.filter((f) => f.severity === 'critical').length,
|
|
372
|
+
high: findings.filter((f) => f.severity === 'high').length,
|
|
373
|
+
medium: findings.filter((f) => f.severity === 'medium').length,
|
|
374
|
+
low: findings.filter((f) => f.severity === 'low').length,
|
|
375
|
+
info: findings.filter((f) => f.severity === 'info').length,
|
|
376
|
+
};
|
|
377
|
+
return {
|
|
378
|
+
success: true,
|
|
379
|
+
scanType: 'secret-detection',
|
|
380
|
+
scope: [directory],
|
|
381
|
+
timestamp: new Date(),
|
|
382
|
+
findings,
|
|
383
|
+
summary,
|
|
384
|
+
recommendations: generateRecommendations(findings),
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Scan npm dependencies for vulnerabilities
|
|
389
|
+
*/
|
|
390
|
+
export function scanDependencies(directory, context) {
|
|
391
|
+
const authCheck = verifyAuthorization(context, directory);
|
|
392
|
+
if (!authCheck.authorized) {
|
|
393
|
+
return {
|
|
394
|
+
success: false,
|
|
395
|
+
scanType: 'dependency-scan',
|
|
396
|
+
scope: [directory],
|
|
397
|
+
timestamp: new Date(),
|
|
398
|
+
findings: [],
|
|
399
|
+
summary: { critical: 0, high: 0, medium: 0, low: 0, info: 0 },
|
|
400
|
+
recommendations: [authCheck.reason ?? 'Authorization failed'],
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
const findings = [];
|
|
404
|
+
try {
|
|
405
|
+
const auditOutput = execSync('npm audit --json', {
|
|
406
|
+
cwd: directory,
|
|
407
|
+
encoding: 'utf-8',
|
|
408
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
409
|
+
});
|
|
410
|
+
const audit = JSON.parse(auditOutput);
|
|
411
|
+
if (audit.vulnerabilities) {
|
|
412
|
+
for (const [pkgName, vuln] of Object.entries(audit.vulnerabilities)) {
|
|
413
|
+
const v = vuln;
|
|
414
|
+
findings.push({
|
|
415
|
+
id: `dep-${pkgName}`,
|
|
416
|
+
severity: v.severity,
|
|
417
|
+
category: 'Dependencies',
|
|
418
|
+
title: `Vulnerable Dependency: ${pkgName}`,
|
|
419
|
+
description: v.via
|
|
420
|
+
.filter((x) => typeof x === 'object' && 'title' in x)
|
|
421
|
+
.map((x) => x.title)
|
|
422
|
+
.join(', '),
|
|
423
|
+
location: { file: 'package.json' },
|
|
424
|
+
remediation: v.fixAvailable
|
|
425
|
+
? typeof v.fixAvailable === 'object'
|
|
426
|
+
? `Update to ${v.fixAvailable.name}@${v.fixAvailable.version}`
|
|
427
|
+
: 'Run npm audit fix'
|
|
428
|
+
: 'No fix available - consider finding alternative package',
|
|
429
|
+
references: v.via
|
|
430
|
+
.filter((x) => typeof x === 'object' && 'url' in x)
|
|
431
|
+
.map((x) => x.url),
|
|
432
|
+
cwe: v.via
|
|
433
|
+
.filter((x) => typeof x === 'object' && 'cwe' in x)
|
|
434
|
+
.flatMap((x) => x.cwe)
|
|
435
|
+
.join(', '),
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
catch (error) {
|
|
441
|
+
// npm audit returns non-zero if vulnerabilities found
|
|
442
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
443
|
+
if (message.includes('ENOENT') || message.includes('package.json')) {
|
|
444
|
+
return {
|
|
445
|
+
success: false,
|
|
446
|
+
scanType: 'dependency-scan',
|
|
447
|
+
scope: [directory],
|
|
448
|
+
timestamp: new Date(),
|
|
449
|
+
findings: [],
|
|
450
|
+
summary: { critical: 0, high: 0, medium: 0, low: 0, info: 0 },
|
|
451
|
+
recommendations: ['No package.json found in directory'],
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
// Try to parse the output anyway
|
|
455
|
+
try {
|
|
456
|
+
const stdout = error.stdout;
|
|
457
|
+
if (stdout) {
|
|
458
|
+
const audit = JSON.parse(stdout);
|
|
459
|
+
// Process audit output...
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
catch {
|
|
463
|
+
// Ignore parse errors
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
const summary = {
|
|
467
|
+
critical: findings.filter((f) => f.severity === 'critical').length,
|
|
468
|
+
high: findings.filter((f) => f.severity === 'high').length,
|
|
469
|
+
medium: findings.filter((f) => f.severity === 'medium').length,
|
|
470
|
+
low: findings.filter((f) => f.severity === 'low').length,
|
|
471
|
+
info: findings.filter((f) => f.severity === 'info').length,
|
|
472
|
+
};
|
|
473
|
+
return {
|
|
474
|
+
success: true,
|
|
475
|
+
scanType: 'dependency-scan',
|
|
476
|
+
scope: [directory],
|
|
477
|
+
timestamp: new Date(),
|
|
478
|
+
findings,
|
|
479
|
+
summary,
|
|
480
|
+
recommendations: generateRecommendations(findings),
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Generate remediation recommendations
|
|
485
|
+
*/
|
|
486
|
+
function generateRecommendations(findings) {
|
|
487
|
+
const recommendations = [];
|
|
488
|
+
if (findings.some((f) => f.category === 'Secrets')) {
|
|
489
|
+
recommendations.push('Immediately rotate all exposed secrets and remove from source code.');
|
|
490
|
+
recommendations.push('Use environment variables or a secret management service (e.g., AWS Secrets Manager, HashiCorp Vault).');
|
|
491
|
+
recommendations.push('Add .env files to .gitignore to prevent future commits.');
|
|
492
|
+
}
|
|
493
|
+
if (findings.some((f) => f.category === 'Injection')) {
|
|
494
|
+
recommendations.push('Review all database queries and use parameterized queries exclusively.');
|
|
495
|
+
recommendations.push('Implement input validation on all user-controlled data.');
|
|
496
|
+
recommendations.push('Use ORMs with built-in SQL injection protection.');
|
|
497
|
+
}
|
|
498
|
+
if (findings.some((f) => f.category === 'XSS')) {
|
|
499
|
+
recommendations.push('Implement Content Security Policy (CSP) headers.');
|
|
500
|
+
recommendations.push('Use templating engines with automatic escaping.');
|
|
501
|
+
recommendations.push('Sanitize all user input before rendering in the DOM.');
|
|
502
|
+
}
|
|
503
|
+
if (findings.some((f) => f.category === 'Dependencies')) {
|
|
504
|
+
recommendations.push('Run npm audit fix to automatically fix vulnerabilities.');
|
|
505
|
+
recommendations.push('Update outdated dependencies regularly.');
|
|
506
|
+
recommendations.push('Consider using npm ci in CI/CD pipelines for reproducible builds.');
|
|
507
|
+
}
|
|
508
|
+
if (recommendations.length === 0) {
|
|
509
|
+
recommendations.push('No immediate actions required. Continue regular security reviews.');
|
|
510
|
+
}
|
|
511
|
+
return recommendations;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Format assessment results for display
|
|
515
|
+
*/
|
|
516
|
+
export function formatAssessmentReport(result) {
|
|
517
|
+
const lines = [];
|
|
518
|
+
lines.push('');
|
|
519
|
+
lines.push('='.repeat(60));
|
|
520
|
+
lines.push(' SECURITY ASSESSMENT REPORT');
|
|
521
|
+
lines.push('='.repeat(60));
|
|
522
|
+
lines.push('');
|
|
523
|
+
lines.push(`Scan Type: ${result.scanType}`);
|
|
524
|
+
lines.push(`Scope: ${result.scope.join(', ')}`);
|
|
525
|
+
lines.push(`Timestamp: ${result.timestamp.toISOString()}`);
|
|
526
|
+
lines.push('');
|
|
527
|
+
lines.push('-'.repeat(60));
|
|
528
|
+
lines.push(' SUMMARY');
|
|
529
|
+
lines.push('-'.repeat(60));
|
|
530
|
+
lines.push(` Critical: ${result.summary.critical}`);
|
|
531
|
+
lines.push(` High: ${result.summary.high}`);
|
|
532
|
+
lines.push(` Medium: ${result.summary.medium}`);
|
|
533
|
+
lines.push(` Low: ${result.summary.low}`);
|
|
534
|
+
lines.push(` Info: ${result.summary.info}`);
|
|
535
|
+
lines.push('');
|
|
536
|
+
if (result.findings.length > 0) {
|
|
537
|
+
lines.push('-'.repeat(60));
|
|
538
|
+
lines.push(' FINDINGS');
|
|
539
|
+
lines.push('-'.repeat(60));
|
|
540
|
+
for (const finding of result.findings) {
|
|
541
|
+
lines.push('');
|
|
542
|
+
lines.push(` [${finding.severity.toUpperCase()}] ${finding.title}`);
|
|
543
|
+
lines.push(` Category: ${finding.category}`);
|
|
544
|
+
if (finding.location.file) {
|
|
545
|
+
lines.push(` Location: ${finding.location.file}:${finding.location.line}`);
|
|
546
|
+
}
|
|
547
|
+
if (finding.location.snippet) {
|
|
548
|
+
lines.push(` Snippet: ${finding.location.snippet}`);
|
|
549
|
+
}
|
|
550
|
+
lines.push(` ${finding.description}`);
|
|
551
|
+
lines.push(` Remediation: ${finding.remediation}`);
|
|
552
|
+
if (finding.cwe)
|
|
553
|
+
lines.push(` CWE: ${finding.cwe}`);
|
|
554
|
+
if (finding.owasp)
|
|
555
|
+
lines.push(` OWASP: ${finding.owasp}`);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
lines.push('');
|
|
559
|
+
lines.push('-'.repeat(60));
|
|
560
|
+
lines.push(' RECOMMENDATIONS');
|
|
561
|
+
lines.push('-'.repeat(60));
|
|
562
|
+
for (const rec of result.recommendations) {
|
|
563
|
+
lines.push(` * ${rec}`);
|
|
564
|
+
}
|
|
565
|
+
lines.push('');
|
|
566
|
+
lines.push('='.repeat(60));
|
|
567
|
+
return lines.join('\n');
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Create authorization context (requires user confirmation)
|
|
571
|
+
*/
|
|
572
|
+
export function createAuthorizationContext(scope, testingType) {
|
|
573
|
+
return {
|
|
574
|
+
ownershipConfirmed: true, // User must explicitly call this
|
|
575
|
+
authorizedScope: scope,
|
|
576
|
+
authorizedAt: new Date(),
|
|
577
|
+
testingType,
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
//# sourceMappingURL=securityAssessment.js.map
|