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 @@
|
|
|
1
|
+
{"version":3,"file":"stdioClient.d.ts","sourceRoot":"","sources":["../../src/mcp/stdioClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAmB9F,qBAAa,cAAc;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqC;IAC7D,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAgB;gBAErB,MAAM,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM;IAsBtD,SAAS,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAM1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IASrF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAUhB,UAAU;YAgBV,WAAW;YA0BX,gBAAgB;IAa9B,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,aAAa;IA2BrB,OAAO,CAAC,SAAS;CAOlB"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { once } from 'node:events';
|
|
3
|
+
import { sanitizeErrorMessage } from '../core/secretStore.js';
|
|
4
|
+
export class McpStdioClient {
|
|
5
|
+
id;
|
|
6
|
+
description;
|
|
7
|
+
process;
|
|
8
|
+
pending = new Map();
|
|
9
|
+
buffer = Buffer.alloc(0);
|
|
10
|
+
nextId = 1;
|
|
11
|
+
ready;
|
|
12
|
+
disposed = false;
|
|
13
|
+
stderrLog = [];
|
|
14
|
+
constructor(config, workingDir) {
|
|
15
|
+
this.id = config.id;
|
|
16
|
+
this.description = config.description;
|
|
17
|
+
this.process = spawn(config.command, config.args, {
|
|
18
|
+
cwd: config.cwd ?? workingDir,
|
|
19
|
+
env: { ...process.env, ...config.env },
|
|
20
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
21
|
+
});
|
|
22
|
+
this.process.stdout.on('data', (chunk) => this.handleStdout(chunk));
|
|
23
|
+
this.process.stderr.on('data', (chunk) => this.handleStderr(chunk));
|
|
24
|
+
this.process.on('exit', (code, signal) => {
|
|
25
|
+
if (!this.disposed) {
|
|
26
|
+
const message = signal
|
|
27
|
+
? `MCP server "${this.id}" exited via signal ${signal}.`
|
|
28
|
+
: `MCP server "${this.id}" exited with code ${code}.`;
|
|
29
|
+
this.rejectAll(new Error(message));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
this.ready = this.initialize();
|
|
33
|
+
}
|
|
34
|
+
async listTools() {
|
|
35
|
+
await this.ready;
|
|
36
|
+
const response = (await this.sendRequest('tools/list', {}));
|
|
37
|
+
return response?.tools ?? [];
|
|
38
|
+
}
|
|
39
|
+
async callTool(toolName, args) {
|
|
40
|
+
await this.ready;
|
|
41
|
+
const response = (await this.sendRequest('tools/call', {
|
|
42
|
+
name: toolName,
|
|
43
|
+
arguments: args ?? {},
|
|
44
|
+
}));
|
|
45
|
+
return response;
|
|
46
|
+
}
|
|
47
|
+
async dispose() {
|
|
48
|
+
if (this.disposed) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.disposed = true;
|
|
52
|
+
this.rejectAll(new Error(`MCP server "${this.id}" disposed.`));
|
|
53
|
+
this.process.kill();
|
|
54
|
+
await once(this.process, 'close').catch(() => { });
|
|
55
|
+
}
|
|
56
|
+
async initialize() {
|
|
57
|
+
await this.sendRequest('initialize', {
|
|
58
|
+
protocolVersion: '2024-11-05',
|
|
59
|
+
capabilities: {
|
|
60
|
+
tools: {
|
|
61
|
+
listChanged: true,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
clientInfo: {
|
|
65
|
+
name: 'Erosolar CLI',
|
|
66
|
+
version: process.env['EROSOLAR_VERSION'] ?? 'dev',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
await this.sendNotification('notifications/initialized', {});
|
|
70
|
+
}
|
|
71
|
+
async sendRequest(method, params) {
|
|
72
|
+
if (this.disposed) {
|
|
73
|
+
throw new Error(`MCP server "${this.id}" is not running.`);
|
|
74
|
+
}
|
|
75
|
+
const id = this.nextId++;
|
|
76
|
+
const payload = {
|
|
77
|
+
jsonrpc: '2.0',
|
|
78
|
+
id,
|
|
79
|
+
method,
|
|
80
|
+
params,
|
|
81
|
+
};
|
|
82
|
+
const serialized = JSON.stringify(payload);
|
|
83
|
+
this.process.stdin.write(`Content-Length: ${Buffer.byteLength(serialized, 'utf8')}\r\n\r\n${serialized}`);
|
|
84
|
+
return await new Promise((resolve, reject) => {
|
|
85
|
+
const timer = setTimeout(() => {
|
|
86
|
+
if (this.pending.has(id)) {
|
|
87
|
+
this.pending.delete(id);
|
|
88
|
+
reject(new Error(`Timed out waiting for "${method}" from MCP server "${this.id}".`));
|
|
89
|
+
}
|
|
90
|
+
}, 60_000);
|
|
91
|
+
this.pending.set(id, { resolve, reject, method, timer });
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async sendNotification(method, params) {
|
|
95
|
+
if (this.disposed) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const payload = {
|
|
99
|
+
jsonrpc: '2.0',
|
|
100
|
+
method,
|
|
101
|
+
params,
|
|
102
|
+
};
|
|
103
|
+
const serialized = JSON.stringify(payload);
|
|
104
|
+
this.process.stdin.write(`Content-Length: ${Buffer.byteLength(serialized, 'utf8')}\r\n\r\n${serialized}`);
|
|
105
|
+
}
|
|
106
|
+
handleStdout(chunk) {
|
|
107
|
+
this.buffer = Buffer.concat([this.buffer, chunk]);
|
|
108
|
+
while (true) {
|
|
109
|
+
let headerIndex = this.buffer.indexOf('\r\n\r\n');
|
|
110
|
+
let delimiterLength = 4;
|
|
111
|
+
if (headerIndex === -1) {
|
|
112
|
+
headerIndex = this.buffer.indexOf('\n\n');
|
|
113
|
+
delimiterLength = 2;
|
|
114
|
+
}
|
|
115
|
+
if (headerIndex === -1) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
const header = this.buffer.slice(0, headerIndex).toString('utf8');
|
|
119
|
+
const lengthMatch = header.match(/Content-Length:\s*(\d+)/i);
|
|
120
|
+
if (!lengthMatch) {
|
|
121
|
+
this.buffer = this.buffer.slice(headerIndex + 4);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const bodyLength = Number(lengthMatch[1]);
|
|
125
|
+
const totalLength = headerIndex + delimiterLength + bodyLength;
|
|
126
|
+
if (this.buffer.length < totalLength) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
const body = this.buffer.slice(headerIndex + delimiterLength, totalLength).toString('utf8');
|
|
130
|
+
this.buffer = this.buffer.slice(totalLength);
|
|
131
|
+
this.handleMessage(body);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
handleStderr(chunk) {
|
|
135
|
+
const text = chunk.toString('utf8').trim();
|
|
136
|
+
if (!text) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.stderrLog.push(text);
|
|
140
|
+
if (this.stderrLog.length > 5) {
|
|
141
|
+
this.stderrLog.shift();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
handleMessage(payload) {
|
|
145
|
+
try {
|
|
146
|
+
const message = JSON.parse(payload);
|
|
147
|
+
if (typeof message.id === 'number' && this.pending.has(message.id)) {
|
|
148
|
+
const pending = this.pending.get(message.id);
|
|
149
|
+
this.pending.delete(message.id);
|
|
150
|
+
clearTimeout(pending.timer);
|
|
151
|
+
if (message.error) {
|
|
152
|
+
const errorMessage = message.error.message || `MCP server "${this.id}" returned an error.`;
|
|
153
|
+
// SECURITY: Sanitize stderr output to prevent token leakage from MCP server debug output
|
|
154
|
+
const details = this.stderrLog.length ? `\n${sanitizeErrorMessage(this.stderrLog.join('\n'))}` : '';
|
|
155
|
+
pending.reject(new Error(`${sanitizeErrorMessage(errorMessage)}${details}`));
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
pending.resolve(message.result);
|
|
159
|
+
}
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (message.method === 'notifications/tools/list_changed') {
|
|
163
|
+
// Tool list changed notification; callers can refresh by calling listTools again.
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
// Ignore malformed messages.
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
rejectAll(error) {
|
|
172
|
+
for (const pending of this.pending.values()) {
|
|
173
|
+
clearTimeout(pending.timer);
|
|
174
|
+
pending.reject(error);
|
|
175
|
+
}
|
|
176
|
+
this.pending.clear();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=stdioClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdioClient.js","sourceRoot":"","sources":["../../src/mcp/stdioClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAuC,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAkB9D,MAAM,OAAO,cAAc;IAChB,EAAE,CAAS;IACX,WAAW,CAAU;IACb,OAAO,CAAiC;IACxC,OAAO,GAAG,IAAI,GAAG,EAA0B,CAAC;IACrD,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,GAAG,CAAC,CAAC;IACX,KAAK,CAAgB;IACrB,QAAQ,GAAG,KAAK,CAAC;IACjB,SAAS,GAAa,EAAE,CAAC;IAEjC,YAAY,MAA4B,EAAE,UAAkB;QAC1D,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE;YAChD,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,UAAU;YAC7B,GAAG,EAAE,EAAE,GAAG,OAA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AC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACpG,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;gBAC/E,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClC,CAAC;gBACD,OAAO;YACT,CAAC;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,kCAAkC,EAAE,CAAC;gBAC1D,kFAAkF;gBAClF,OAAO;YACT,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,6BAA6B;QAC/B,CAAC;IACH,CAAC;IAEO,SAAS,CAAC,KAAY;QAC5B,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;YAC5C,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CapabilityContext } from '../runtime/agentHost.js';
|
|
2
|
+
import type { ToolSuite } from '../core/toolRuntime.js';
|
|
3
|
+
export declare class McpToolBridge {
|
|
4
|
+
private readonly context;
|
|
5
|
+
private servers;
|
|
6
|
+
constructor(context: CapabilityContext);
|
|
7
|
+
initialize(): Promise<ToolSuite[]>;
|
|
8
|
+
private createClient;
|
|
9
|
+
dispose(): Promise<void>;
|
|
10
|
+
private buildToolDefinition;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=toolBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolBridge.d.ts","sourceRoot":"","sources":["../../src/mcp/toolBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAqBxE,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,OAAO,CAAsB;gBAEzB,OAAO,EAAE,iBAAiB;IAIhC,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IA4CxC,OAAO,CAAC,YAAY;IAOd,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,OAAO,CAAC,mBAAmB;CAoB5B"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { loadMcpServers } from './config.js';
|
|
2
|
+
import { McpStdioClient } from './stdioClient.js';
|
|
3
|
+
import { McpSseClient } from './sseClient.js';
|
|
4
|
+
export class McpToolBridge {
|
|
5
|
+
context;
|
|
6
|
+
servers = [];
|
|
7
|
+
constructor(context) {
|
|
8
|
+
this.context = context;
|
|
9
|
+
}
|
|
10
|
+
async initialize() {
|
|
11
|
+
const configs = await loadMcpServers({
|
|
12
|
+
workingDir: this.context.workingDir,
|
|
13
|
+
env: this.context.env,
|
|
14
|
+
});
|
|
15
|
+
if (!configs.length) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const suites = [];
|
|
19
|
+
for (const config of configs) {
|
|
20
|
+
try {
|
|
21
|
+
const client = this.createClient(config);
|
|
22
|
+
const tools = await client.listTools();
|
|
23
|
+
if (!tools.length) {
|
|
24
|
+
await client.dispose();
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
this.servers.push({ config, client, tools });
|
|
28
|
+
// Build description based on transport type
|
|
29
|
+
const serverDescription = config.type === 'sse'
|
|
30
|
+
? `MCP server at ${config.description ?? config.url}`
|
|
31
|
+
: `MCP server at ${config.description ?? config.command}`;
|
|
32
|
+
suites.push({
|
|
33
|
+
id: `mcp.${config.id}`,
|
|
34
|
+
description: serverDescription,
|
|
35
|
+
tools: tools.map((tool) => this.buildToolDefinition(config.id, client, tool)),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
// eslint-disable-next-line no-console
|
|
40
|
+
console.warn(`Failed to load MCP server "${config.id}" (${config.source}): ${error instanceof Error ? error.message : String(error)}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return suites;
|
|
44
|
+
}
|
|
45
|
+
createClient(config) {
|
|
46
|
+
if (config.type === 'sse') {
|
|
47
|
+
return new McpSseClient(config);
|
|
48
|
+
}
|
|
49
|
+
return new McpStdioClient(config, this.context.workingDir);
|
|
50
|
+
}
|
|
51
|
+
async dispose() {
|
|
52
|
+
await Promise.allSettled(this.servers.map((entry) => entry.client.dispose()));
|
|
53
|
+
this.servers = [];
|
|
54
|
+
}
|
|
55
|
+
buildToolDefinition(serverId, client, tool) {
|
|
56
|
+
const name = buildToolName(serverId, tool.name);
|
|
57
|
+
const description = tool.description
|
|
58
|
+
? `[${serverId}] ${tool.description}`
|
|
59
|
+
: `MCP tool "${tool.name}" from ${serverId}`;
|
|
60
|
+
return {
|
|
61
|
+
name,
|
|
62
|
+
description,
|
|
63
|
+
parameters: normalizeSchema(tool.inputSchema),
|
|
64
|
+
handler: async (args) => {
|
|
65
|
+
const response = await client.callTool(tool.name, args);
|
|
66
|
+
return formatToolResponse(response);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function buildToolName(serverId, toolName) {
|
|
72
|
+
const safeServer = serverId.replace(/[^a-z0-9_-]/gi, '_');
|
|
73
|
+
const safeTool = toolName.replace(/[^a-z0-9_-]/gi, '_');
|
|
74
|
+
return `mcp__${safeServer}__${safeTool}`;
|
|
75
|
+
}
|
|
76
|
+
function normalizeSchema(schema) {
|
|
77
|
+
if (schema && typeof schema === 'object') {
|
|
78
|
+
return schema;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
type: 'object',
|
|
82
|
+
additionalProperties: true,
|
|
83
|
+
properties: {},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function formatToolResponse(result) {
|
|
87
|
+
const blocks = Array.isArray(result?.content) ? result.content : [];
|
|
88
|
+
if (!blocks.length) {
|
|
89
|
+
return 'MCP tool completed without returning content.';
|
|
90
|
+
}
|
|
91
|
+
return blocks.map(formatContentBlock).join('\n\n');
|
|
92
|
+
}
|
|
93
|
+
function formatContentBlock(block) {
|
|
94
|
+
switch (block.type) {
|
|
95
|
+
case 'text':
|
|
96
|
+
return getStringField(block, 'text') ?? '';
|
|
97
|
+
case 'markdown':
|
|
98
|
+
return getStringField(block, 'markdown') ?? '';
|
|
99
|
+
case 'json': {
|
|
100
|
+
const jsonValue = block['json'];
|
|
101
|
+
return jsonValue !== undefined ? JSON.stringify(jsonValue, null, 2) : '';
|
|
102
|
+
}
|
|
103
|
+
case 'resource': {
|
|
104
|
+
const uri = getStringField(block, 'uri') ?? '(unknown uri)';
|
|
105
|
+
const description = getStringField(block, 'description');
|
|
106
|
+
return `Resource: ${uri}${description ? `\n${description}` : ''}`;
|
|
107
|
+
}
|
|
108
|
+
default:
|
|
109
|
+
return JSON.stringify(block, null, 2);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function getStringField(block, key) {
|
|
113
|
+
const record = block;
|
|
114
|
+
const value = record[key];
|
|
115
|
+
return typeof value === 'string' ? value : null;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=toolBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolBridge.js","sourceRoot":"","sources":["../../src/mcp/toolBridge.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAA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
|
|
4
|
+
id?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
command?: string;
|
|
7
|
+
args?: string[];
|
|
8
|
+
cwd?: string;
|
|
9
|
+
env?: Record<string, string>;
|
|
10
|
+
url?: string;
|
|
11
|
+
headers?: Record<string, string>;
|
|
12
|
+
description?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface McpServerConfigBase {
|
|
16
|
+
id: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
source: string;
|
|
19
|
+
}
|
|
20
|
+
export interface McpStdioServerConfig extends McpServerConfigBase {
|
|
21
|
+
type: 'stdio';
|
|
22
|
+
command: string;
|
|
23
|
+
args: string[];
|
|
24
|
+
cwd?: string;
|
|
25
|
+
env: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export interface McpSseServerConfig extends McpServerConfigBase {
|
|
28
|
+
type: 'sse';
|
|
29
|
+
url: string;
|
|
30
|
+
headers: Record<string, string>;
|
|
31
|
+
}
|
|
32
|
+
export type McpServerConfig = McpStdioServerConfig | McpSseServerConfig;
|
|
33
|
+
export interface McpToolDescription {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
inputSchema?: JSONSchemaObject;
|
|
37
|
+
}
|
|
38
|
+
export type McpContentBlock = {
|
|
39
|
+
type: 'text';
|
|
40
|
+
text: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: 'markdown';
|
|
43
|
+
markdown: string;
|
|
44
|
+
} | {
|
|
45
|
+
type: 'json';
|
|
46
|
+
json: unknown;
|
|
47
|
+
} | {
|
|
48
|
+
type: 'resource';
|
|
49
|
+
uri: string;
|
|
50
|
+
mimeType?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: string;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
};
|
|
56
|
+
export interface McpToolCallResult {
|
|
57
|
+
content?: McpContentBlock[];
|
|
58
|
+
isError?: boolean;
|
|
59
|
+
}
|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C,CAAC;CACjC;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/mcp/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin System - Root Index
|
|
3
|
+
*
|
|
4
|
+
* Aggregates all plugin functionality for easy import.
|
|
5
|
+
*
|
|
6
|
+
* Principal Investigator: Bo Shang
|
|
7
|
+
* Framework: erosolar-cli
|
|
8
|
+
*/
|
|
9
|
+
export { registerToolPlugin, unregisterToolPlugin, listRegisteredToolPlugins, instantiateToolPlugins, type ToolPlugin, type ToolPluginContext, type ToolPluginTarget, } from './tools/index.js';
|
|
10
|
+
export { registerDefaultNodeToolPlugins } from './tools/nodeDefaults.js';
|
|
11
|
+
export interface LoadedPlugin {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
version: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Register a plugin as loaded
|
|
19
|
+
*/
|
|
20
|
+
export declare function markPluginLoaded(plugin: LoadedPlugin): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get a loaded plugin by ID
|
|
23
|
+
*/
|
|
24
|
+
export declare function getLoadedPlugin(id: string): LoadedPlugin | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* List all loaded plugins
|
|
27
|
+
*/
|
|
28
|
+
export declare function listLoadedPlugins(): LoadedPlugin[];
|
|
29
|
+
/**
|
|
30
|
+
* List available plugins (combines loaded + builtin)
|
|
31
|
+
*/
|
|
32
|
+
export declare function listAvailablePlugins(): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Get all plugin tool suites
|
|
35
|
+
*/
|
|
36
|
+
export declare function getAllPluginToolSuites(): LoadedPlugin[];
|
|
37
|
+
/**
|
|
38
|
+
* Load a plugin by ID
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadPlugin(id: string): Promise<LoadedPlugin | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Get plugin IDs from command line flags
|
|
43
|
+
*/
|
|
44
|
+
export declare function getPluginIdsFromFlags(flags: Record<string, boolean>): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Builtin plugin identifiers
|
|
47
|
+
*/
|
|
48
|
+
export declare const BUILTIN_PLUGINS: readonly ["local-filesystem", "local-bash", "local-search", "edit", "glob", "web", "mcp", "code-analysis", "code-quality", "dependency", "development", "enhanced-git", "interaction", "notebook", "planning", "refactoring", "skills", "task-management", "testing", "agent-spawning", "local-repo-checks", "cloud", "email"];
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAGzE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAKD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,EAAE,CAElD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAS/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,YAAY,EAAE,CAEvD;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAsBzE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAQ9E;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,gUAwBlB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin System - Root Index
|
|
3
|
+
*
|
|
4
|
+
* Aggregates all plugin functionality for easy import.
|
|
5
|
+
*
|
|
6
|
+
* Principal Investigator: Bo Shang
|
|
7
|
+
* Framework: erosolar-cli
|
|
8
|
+
*/
|
|
9
|
+
// Re-export tool plugin system
|
|
10
|
+
export { registerToolPlugin, unregisterToolPlugin, listRegisteredToolPlugins, instantiateToolPlugins, } from './tools/index.js';
|
|
11
|
+
export { registerDefaultNodeToolPlugins } from './tools/nodeDefaults.js';
|
|
12
|
+
// Track loaded plugins
|
|
13
|
+
const loadedPlugins = new Map();
|
|
14
|
+
/**
|
|
15
|
+
* Register a plugin as loaded
|
|
16
|
+
*/
|
|
17
|
+
export function markPluginLoaded(plugin) {
|
|
18
|
+
loadedPlugins.set(plugin.id, plugin);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get a loaded plugin by ID
|
|
22
|
+
*/
|
|
23
|
+
export function getLoadedPlugin(id) {
|
|
24
|
+
return loadedPlugins.get(id);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List all loaded plugins
|
|
28
|
+
*/
|
|
29
|
+
export function listLoadedPlugins() {
|
|
30
|
+
return Array.from(loadedPlugins.values());
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* List available plugins (combines loaded + builtin)
|
|
34
|
+
*/
|
|
35
|
+
export function listAvailablePlugins() {
|
|
36
|
+
const available = new Set();
|
|
37
|
+
for (const id of BUILTIN_PLUGINS) {
|
|
38
|
+
available.add(id);
|
|
39
|
+
}
|
|
40
|
+
for (const id of loadedPlugins.keys()) {
|
|
41
|
+
available.add(id);
|
|
42
|
+
}
|
|
43
|
+
return Array.from(available);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get all plugin tool suites
|
|
47
|
+
*/
|
|
48
|
+
export function getAllPluginToolSuites() {
|
|
49
|
+
return listLoadedPlugins().filter((p) => p.enabled);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Load a plugin by ID
|
|
53
|
+
*/
|
|
54
|
+
export async function loadPlugin(id) {
|
|
55
|
+
// Check if already loaded
|
|
56
|
+
const existing = loadedPlugins.get(id);
|
|
57
|
+
if (existing) {
|
|
58
|
+
return existing;
|
|
59
|
+
}
|
|
60
|
+
// Check if it's a builtin plugin
|
|
61
|
+
if (!BUILTIN_PLUGINS.includes(id)) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
// Create a loaded plugin entry
|
|
65
|
+
const plugin = {
|
|
66
|
+
id,
|
|
67
|
+
name: id.replace(/-/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()),
|
|
68
|
+
version: '1.0.0',
|
|
69
|
+
enabled: true,
|
|
70
|
+
};
|
|
71
|
+
loadedPlugins.set(id, plugin);
|
|
72
|
+
return plugin;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get plugin IDs from command line flags
|
|
76
|
+
*/
|
|
77
|
+
export function getPluginIdsFromFlags(flags) {
|
|
78
|
+
const ids = [];
|
|
79
|
+
for (const [flag, enabled] of Object.entries(flags)) {
|
|
80
|
+
if (enabled && BUILTIN_PLUGINS.includes(flag)) {
|
|
81
|
+
ids.push(flag);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return ids;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Builtin plugin identifiers
|
|
88
|
+
*/
|
|
89
|
+
export const BUILTIN_PLUGINS = [
|
|
90
|
+
'local-filesystem',
|
|
91
|
+
'local-bash',
|
|
92
|
+
'local-search',
|
|
93
|
+
'edit',
|
|
94
|
+
'glob',
|
|
95
|
+
'web',
|
|
96
|
+
'mcp',
|
|
97
|
+
'code-analysis',
|
|
98
|
+
'code-quality',
|
|
99
|
+
'dependency',
|
|
100
|
+
'development',
|
|
101
|
+
'enhanced-git',
|
|
102
|
+
'interaction',
|
|
103
|
+
'notebook',
|
|
104
|
+
'planning',
|
|
105
|
+
'refactoring',
|
|
106
|
+
'skills',
|
|
107
|
+
'task-management',
|
|
108
|
+
'testing',
|
|
109
|
+
'agent-spawning',
|
|
110
|
+
'local-repo-checks',
|
|
111
|
+
'cloud',
|
|
112
|
+
'email',
|
|
113
|
+
];
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+BAA+B;AAC/B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,GAIvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAUzE,uBAAuB;AACvB,MAAM,aAAa,GAAG,IAAI,GAAG,EAAwB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAoB;IACnD,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,OAAO,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,KAAK,MAAM,EAAE,IAAI,eAAe,EAAE,CAAC;QACjC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,KAAK,MAAM,EAAE,IAAI,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC;QACtC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,iBAAiB,EAAE,CAA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IACd,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,eAAe;IACf,cAAc;IACd,YAAY;IACZ,aAAa;IACb,cAAc;IACd,aAAa;IACb,UAAU;IACV,UAAU;IACV,aAAa;IACb,QAAQ;IACR,iBAAiB;IACjB,SAAS;IACT,gBAAgB;IAChB,mBAAmB;IACnB,OAAO;IACP,OAAO;CACC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anthropic (Claude) Provider Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the Anthropic provider with hardened error handling for:
|
|
5
|
+
* - Network failures (premature close, connection reset)
|
|
6
|
+
* - Stream errors (gunzip, decompression failures)
|
|
7
|
+
* - Rate limiting with exponential backoff
|
|
8
|
+
* - Circuit breaker for cascading failure prevention
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerAnthropicProviderPlugin(): void;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/providers/anthropic/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAmBtD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AnthropicMessagesProvider } from '../../../providers/anthropicProvider.js';
|
|
2
|
+
import { registerProvider } from '../../../providers/providerFactory.js';
|
|
3
|
+
import { withProviderResilience } from '../../../providers/resilientProvider.js';
|
|
4
|
+
let registered = false;
|
|
5
|
+
/**
|
|
6
|
+
* Anthropic (Claude) Provider Plugin
|
|
7
|
+
*
|
|
8
|
+
* Registers the Anthropic provider with hardened error handling for:
|
|
9
|
+
* - Network failures (premature close, connection reset)
|
|
10
|
+
* - Stream errors (gunzip, decompression failures)
|
|
11
|
+
* - Rate limiting with exponential backoff
|
|
12
|
+
* - Circuit breaker for cascading failure prevention
|
|
13
|
+
*/
|
|
14
|
+
export function registerAnthropicProviderPlugin() {
|
|
15
|
+
if (registered) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
registerProvider('anthropic', (config) => {
|
|
19
|
+
const options = {
|
|
20
|
+
apiKey: requireEnv('ANTHROPIC_API_KEY'),
|
|
21
|
+
model: config.model,
|
|
22
|
+
...(typeof config.temperature === 'number' ? { temperature: config.temperature } : {}),
|
|
23
|
+
...(typeof config.maxTokens === 'number' ? { maxTokens: config.maxTokens } : {}),
|
|
24
|
+
};
|
|
25
|
+
const baseProvider = new AnthropicMessagesProvider(options);
|
|
26
|
+
// Wrap with resilience layer
|
|
27
|
+
return withProviderResilience(baseProvider, 'anthropic');
|
|
28
|
+
});
|
|
29
|
+
registered = true;
|
|
30
|
+
}
|
|
31
|
+
function requireEnv(name) {
|
|
32
|
+
const value = process.env[name];
|
|
33
|
+
if (!value) {
|
|
34
|
+
throw new Error(`Missing required environment variable ${name}.`);
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/providers/anthropic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B;IAC7C,IAAI,UAAU,EAAE,CAAC;QACf,OAAO;IACT,CAAC;IAED,gBAAgB,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE;QACvC,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,UAAU,CAAC,mBAAmB,CAAC;YACvC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,GAAG,CAAC,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtF,GAAG,CAAC,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACjF,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAE5D,6BAA6B;QAC7B,OAAO,sBAAsB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,yCAAyC,IAAI,GAAG,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeepSeek Provider Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the DeepSeek provider with hardened error handling for:
|
|
5
|
+
* - Network failures (premature close, connection reset)
|
|
6
|
+
* - Stream errors (gunzip, decompression failures)
|
|
7
|
+
* - Rate limiting with exponential backoff
|
|
8
|
+
* - Circuit breaker for cascading failure prevention
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerDeepSeekProviderPlugin(): void;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|