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,353 @@
|
|
|
1
|
+
import { createNodeRuntime } from './node.js';
|
|
2
|
+
import { AGENT_CONTRACT_VERSION } from '../contracts/v1/agent.js';
|
|
3
|
+
class EventStream {
|
|
4
|
+
queue = [];
|
|
5
|
+
pending = null;
|
|
6
|
+
closed = false;
|
|
7
|
+
failure = null;
|
|
8
|
+
push(value) {
|
|
9
|
+
if (this.closed || this.failure) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (this.pending) {
|
|
13
|
+
this.pending.resolve({ value, done: false });
|
|
14
|
+
this.pending = null;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.queue.push(value);
|
|
18
|
+
}
|
|
19
|
+
close() {
|
|
20
|
+
if (this.closed || this.failure) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.closed = true;
|
|
24
|
+
if (this.pending) {
|
|
25
|
+
this.pending.resolve({ value: undefined, done: true });
|
|
26
|
+
this.pending = null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
fail(error) {
|
|
30
|
+
if (this.closed || this.failure) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.failure = error;
|
|
34
|
+
if (this.pending) {
|
|
35
|
+
this.pending.reject(error);
|
|
36
|
+
this.pending = null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
next() {
|
|
40
|
+
if (this.queue.length) {
|
|
41
|
+
const value = this.queue.shift();
|
|
42
|
+
return Promise.resolve({ value, done: false });
|
|
43
|
+
}
|
|
44
|
+
if (this.failure) {
|
|
45
|
+
const error = this.failure;
|
|
46
|
+
this.failure = null;
|
|
47
|
+
return Promise.reject(error);
|
|
48
|
+
}
|
|
49
|
+
if (this.closed) {
|
|
50
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
51
|
+
}
|
|
52
|
+
return new Promise((resolve, reject) => {
|
|
53
|
+
this.pending = { resolve, reject };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return() {
|
|
57
|
+
this.close();
|
|
58
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
59
|
+
}
|
|
60
|
+
throw(error) {
|
|
61
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
62
|
+
this.fail(err);
|
|
63
|
+
return Promise.reject(err);
|
|
64
|
+
}
|
|
65
|
+
[Symbol.asyncIterator]() {
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function mergeToolObservers(primary, secondary) {
|
|
70
|
+
if (!secondary) {
|
|
71
|
+
return primary;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
onToolStart(call) {
|
|
75
|
+
primary.onToolStart?.(call);
|
|
76
|
+
secondary.onToolStart?.(call);
|
|
77
|
+
},
|
|
78
|
+
onToolResult(call, output) {
|
|
79
|
+
primary.onToolResult?.(call, output);
|
|
80
|
+
secondary.onToolResult?.(call, output);
|
|
81
|
+
},
|
|
82
|
+
onToolProgress(call, progress) {
|
|
83
|
+
primary.onToolProgress?.(call, progress);
|
|
84
|
+
secondary.onToolProgress?.(call, progress);
|
|
85
|
+
},
|
|
86
|
+
onToolError(call, error) {
|
|
87
|
+
primary.onToolError?.(call, error);
|
|
88
|
+
secondary.onToolError?.(call, error);
|
|
89
|
+
},
|
|
90
|
+
onCacheHit(call) {
|
|
91
|
+
primary.onCacheHit?.(call);
|
|
92
|
+
secondary.onCacheHit?.(call);
|
|
93
|
+
},
|
|
94
|
+
onToolWarning(call, warning) {
|
|
95
|
+
primary.onToolWarning?.(call, warning);
|
|
96
|
+
secondary.onToolWarning?.(call, warning);
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function createControllerToolObserver(ref) {
|
|
101
|
+
const emit = (event) => {
|
|
102
|
+
ref.current?.push(event);
|
|
103
|
+
};
|
|
104
|
+
const timestamp = () => Date.now();
|
|
105
|
+
return {
|
|
106
|
+
onToolStart(call) {
|
|
107
|
+
emit({
|
|
108
|
+
type: 'tool.start',
|
|
109
|
+
timestamp: timestamp(),
|
|
110
|
+
toolName: call.name,
|
|
111
|
+
toolCallId: call.id,
|
|
112
|
+
parameters: { ...call.arguments },
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
onToolResult(call, output) {
|
|
116
|
+
emit({
|
|
117
|
+
type: 'tool.complete',
|
|
118
|
+
timestamp: timestamp(),
|
|
119
|
+
toolName: call.name,
|
|
120
|
+
toolCallId: call.id,
|
|
121
|
+
result: output,
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
onToolError(call, error) {
|
|
125
|
+
emit({
|
|
126
|
+
type: 'tool.error',
|
|
127
|
+
timestamp: timestamp(),
|
|
128
|
+
toolName: call.name,
|
|
129
|
+
toolCallId: call.id,
|
|
130
|
+
error,
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export async function createAgentController(options, additionalObserver) {
|
|
136
|
+
const sinkRef = { current: null };
|
|
137
|
+
const observer = createControllerToolObserver(sinkRef);
|
|
138
|
+
const runtime = await createNodeRuntime({
|
|
139
|
+
profile: options.profile,
|
|
140
|
+
workspaceContext: options.workspaceContext,
|
|
141
|
+
workingDir: options.workingDir,
|
|
142
|
+
env: options.env,
|
|
143
|
+
toolObserver: mergeToolObservers(observer, additionalObserver),
|
|
144
|
+
additionalModules: options.modules,
|
|
145
|
+
adapterOptions: options.adapterOptions,
|
|
146
|
+
});
|
|
147
|
+
return new AgentController({ runtime, sinkRef, externalCallbacks: options.callbacks });
|
|
148
|
+
}
|
|
149
|
+
export class AgentController {
|
|
150
|
+
session;
|
|
151
|
+
sinkRef;
|
|
152
|
+
externalCallbacks;
|
|
153
|
+
activeSink = null;
|
|
154
|
+
agent = null;
|
|
155
|
+
cachedHistory = [];
|
|
156
|
+
selection;
|
|
157
|
+
constructor(dependencies) {
|
|
158
|
+
this.session = dependencies.runtime.session;
|
|
159
|
+
this.sinkRef = dependencies.sinkRef;
|
|
160
|
+
this.externalCallbacks = dependencies.externalCallbacks;
|
|
161
|
+
this.selection = this.buildInitialSelection();
|
|
162
|
+
}
|
|
163
|
+
buildInitialSelection() {
|
|
164
|
+
const config = this.session.profileConfig;
|
|
165
|
+
return {
|
|
166
|
+
provider: config.provider,
|
|
167
|
+
model: config.model,
|
|
168
|
+
temperature: config.temperature,
|
|
169
|
+
maxTokens: config.maxTokens,
|
|
170
|
+
systemPrompt: config.systemPrompt,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
ensureAgent() {
|
|
174
|
+
if (this.agent) {
|
|
175
|
+
return this.agent;
|
|
176
|
+
}
|
|
177
|
+
const agent = this.session.createAgent(this.selection, this.createAgentCallbacks());
|
|
178
|
+
if (this.cachedHistory.length) {
|
|
179
|
+
agent.loadHistory(this.cachedHistory);
|
|
180
|
+
}
|
|
181
|
+
this.agent = agent;
|
|
182
|
+
return agent;
|
|
183
|
+
}
|
|
184
|
+
createAgentCallbacks() {
|
|
185
|
+
return {
|
|
186
|
+
onAssistantMessage: (content, metadata) => {
|
|
187
|
+
this.handleAssistantMessage(content, metadata);
|
|
188
|
+
this.externalCallbacks?.onAssistantMessage?.(content, metadata);
|
|
189
|
+
},
|
|
190
|
+
onStreamChunk: (chunk) => {
|
|
191
|
+
this.emitDelta(chunk, false);
|
|
192
|
+
this.externalCallbacks?.onStreamChunk?.(chunk);
|
|
193
|
+
},
|
|
194
|
+
onContextPruned: (removedCount, stats) => {
|
|
195
|
+
this.externalCallbacks?.onContextPruned?.(removedCount, stats);
|
|
196
|
+
},
|
|
197
|
+
onContextSquishing: (message) => {
|
|
198
|
+
this.externalCallbacks?.onContextSquishing?.(message);
|
|
199
|
+
},
|
|
200
|
+
onContextRecovery: (attempt, maxAttempts, message) => {
|
|
201
|
+
this.externalCallbacks?.onContextRecovery?.(attempt, maxAttempts, message);
|
|
202
|
+
},
|
|
203
|
+
onContinueAfterRecovery: () => {
|
|
204
|
+
this.externalCallbacks?.onContinueAfterRecovery?.();
|
|
205
|
+
},
|
|
206
|
+
onAutoContinue: (attempt, maxAttempts, message) => {
|
|
207
|
+
this.externalCallbacks?.onAutoContinue?.(attempt, maxAttempts, message);
|
|
208
|
+
},
|
|
209
|
+
onMultilinePaste: (summary, metadata) => {
|
|
210
|
+
this.externalCallbacks?.onMultilinePaste?.(summary, metadata);
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
emitDelta(content, isFinal) {
|
|
215
|
+
if (!content?.trim()) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
this.activeSink?.push({
|
|
219
|
+
type: 'message.delta',
|
|
220
|
+
timestamp: Date.now(),
|
|
221
|
+
content,
|
|
222
|
+
isFinal,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
emitError(message) {
|
|
226
|
+
this.activeSink?.push({
|
|
227
|
+
type: 'error',
|
|
228
|
+
timestamp: Date.now(),
|
|
229
|
+
error: message,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
emitUsage(usage) {
|
|
233
|
+
if (!usage) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
this.activeSink?.push({
|
|
237
|
+
type: 'usage',
|
|
238
|
+
timestamp: Date.now(),
|
|
239
|
+
inputTokens: usage.inputTokens,
|
|
240
|
+
outputTokens: usage.outputTokens,
|
|
241
|
+
totalTokens: usage.totalTokens,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
handleAssistantMessage(content, metadata) {
|
|
245
|
+
if (!this.activeSink) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (!metadata.isFinal) {
|
|
249
|
+
this.emitDelta(content, false);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const elapsedMs = metadata.elapsedMs ?? 0;
|
|
253
|
+
this.activeSink.push({
|
|
254
|
+
type: 'message.complete',
|
|
255
|
+
timestamp: Date.now(),
|
|
256
|
+
content,
|
|
257
|
+
elapsedMs,
|
|
258
|
+
});
|
|
259
|
+
this.emitUsage(metadata.usage ?? null);
|
|
260
|
+
}
|
|
261
|
+
updateCachedHistory() {
|
|
262
|
+
if (this.agent) {
|
|
263
|
+
this.cachedHistory = this.agent.getHistory();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async *send(message) {
|
|
267
|
+
if (this.activeSink) {
|
|
268
|
+
throw new Error('Agent runtime is already processing a message. Please wait for the current run to finish.');
|
|
269
|
+
}
|
|
270
|
+
const agent = this.ensureAgent();
|
|
271
|
+
const sink = new EventStream();
|
|
272
|
+
this.activeSink = sink;
|
|
273
|
+
this.sinkRef.current = sink;
|
|
274
|
+
sink.push({ type: 'message.start', timestamp: Date.now() });
|
|
275
|
+
const run = agent
|
|
276
|
+
.send(message, true)
|
|
277
|
+
.then(() => {
|
|
278
|
+
this.updateCachedHistory();
|
|
279
|
+
sink.close();
|
|
280
|
+
})
|
|
281
|
+
.catch((error) => {
|
|
282
|
+
const messageText = error instanceof Error ? error.message : String(error);
|
|
283
|
+
this.emitError(messageText);
|
|
284
|
+
sink.fail(error instanceof Error ? error : new Error(messageText));
|
|
285
|
+
})
|
|
286
|
+
.finally(() => {
|
|
287
|
+
if (this.activeSink === sink) {
|
|
288
|
+
this.activeSink = null;
|
|
289
|
+
this.sinkRef.current = null;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
try {
|
|
293
|
+
for await (const event of sink) {
|
|
294
|
+
yield event;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
await run;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
async switchModel(config) {
|
|
302
|
+
this.updateCachedHistory();
|
|
303
|
+
this.agent = null;
|
|
304
|
+
this.selection = {
|
|
305
|
+
provider: config.provider,
|
|
306
|
+
model: config.model,
|
|
307
|
+
temperature: config.temperature,
|
|
308
|
+
maxTokens: config.maxTokens,
|
|
309
|
+
systemPrompt: this.selection.systemPrompt,
|
|
310
|
+
};
|
|
311
|
+
this.session.updateToolContext(this.selection);
|
|
312
|
+
}
|
|
313
|
+
getCapabilities() {
|
|
314
|
+
const tools = this.session.toolRuntime.listProviderTools();
|
|
315
|
+
const manifestTools = tools.map((tool) => ({
|
|
316
|
+
name: tool.name,
|
|
317
|
+
description: tool.description,
|
|
318
|
+
category: 'general',
|
|
319
|
+
}));
|
|
320
|
+
return {
|
|
321
|
+
contractVersion: AGENT_CONTRACT_VERSION,
|
|
322
|
+
profile: this.session.profile,
|
|
323
|
+
model: this.toModelConfig(this.selection),
|
|
324
|
+
tools: manifestTools,
|
|
325
|
+
features: ['streaming', 'tool-calls'],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
registerToolSuite(suiteId, suite) {
|
|
329
|
+
this.session.toolRuntime.registerSuite({ ...suite, id: suiteId });
|
|
330
|
+
}
|
|
331
|
+
unregisterToolSuite(suiteId) {
|
|
332
|
+
this.session.toolRuntime.unregisterSuite(suiteId);
|
|
333
|
+
}
|
|
334
|
+
getHistory() {
|
|
335
|
+
if (this.agent) {
|
|
336
|
+
return this.agent.getHistory();
|
|
337
|
+
}
|
|
338
|
+
return [...this.cachedHistory];
|
|
339
|
+
}
|
|
340
|
+
clearHistory() {
|
|
341
|
+
this.cachedHistory = [];
|
|
342
|
+
this.agent?.clearHistory();
|
|
343
|
+
}
|
|
344
|
+
toModelConfig(selection) {
|
|
345
|
+
return {
|
|
346
|
+
provider: selection.provider,
|
|
347
|
+
model: selection.model,
|
|
348
|
+
temperature: selection.temperature,
|
|
349
|
+
maxTokens: selection.maxTokens,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=agentController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentController.js","sourceRoot":"","sources":["../../src/runtime/agentController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,WAAW,CAAC;AAYvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,MAAM,WAAW;IACE,KAAK,GAAQ,EAAE,CAAC;IACzB,OAAO,GAA6F,IAAI,CAAC;IACzG,MAAM,GAAG,KAAK,CAAC;IACf,OAAO,GAAiB,IAAI,CAAC;IAErC,IAAI,CAAC,KAAQ;QACX,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC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e,EAAE,sBAAsB;YACvC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;YAC7B,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;YACzC,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;SACT,CAAC;IACjC,CAAC;IAED,iBAAiB,CAAC,OAAe,EAAE,KAAgB;QACjD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,mBAAmB,CAAC,OAAe;QACjC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,YAAY;QACV,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;IAC7B,CAAC;IAEO,aAAa,CAAC,SAAyB;QAC7C,OAAO;YACL,QAAQ,EAAE,SAAS,CAAC,QAAQ;YAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,SAAS,EAAE,SAAS,CAAC,SAAS;SACT,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ProfileName } from '../config.js';
|
|
2
|
+
import { AgentSession } from './agentSession.js';
|
|
3
|
+
import { type ToolRuntimeObserver, type ToolSuite } from '../core/toolRuntime.js';
|
|
4
|
+
export interface CapabilityContext {
|
|
5
|
+
profile: ProfileName;
|
|
6
|
+
workspaceContext: string | null;
|
|
7
|
+
workingDir: string;
|
|
8
|
+
env: NodeJS.ProcessEnv;
|
|
9
|
+
}
|
|
10
|
+
export interface CapabilityContribution {
|
|
11
|
+
id: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
toolSuite?: ToolSuite;
|
|
14
|
+
toolSuites?: ToolSuite[];
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
dispose?(): void | Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface CapabilityModule {
|
|
19
|
+
id: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
create(context: CapabilityContext): CapabilityContribution | CapabilityContribution[] | null | undefined | Promise<CapabilityContribution | CapabilityContribution[] | null | undefined>;
|
|
22
|
+
}
|
|
23
|
+
export interface CapabilityManifestEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
moduleId: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
metadata?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface AgentHostOptions {
|
|
30
|
+
profile: ProfileName;
|
|
31
|
+
workspaceContext: string | null;
|
|
32
|
+
workingDir: string;
|
|
33
|
+
modules?: CapabilityModule[];
|
|
34
|
+
toolObserver?: ToolRuntimeObserver;
|
|
35
|
+
env?: NodeJS.ProcessEnv;
|
|
36
|
+
}
|
|
37
|
+
export declare class AgentHost {
|
|
38
|
+
private readonly context;
|
|
39
|
+
private readonly toolObserver?;
|
|
40
|
+
private readonly modules;
|
|
41
|
+
private readonly contributions;
|
|
42
|
+
private readonly contributionOwners;
|
|
43
|
+
private readonly moduleContributions;
|
|
44
|
+
private session;
|
|
45
|
+
private disposed;
|
|
46
|
+
constructor(options: AgentHostOptions);
|
|
47
|
+
get profile(): ProfileName;
|
|
48
|
+
get workspaceContext(): string | null;
|
|
49
|
+
get workingDir(): string;
|
|
50
|
+
refreshWorkspaceContext(workspaceContext: string | null): void;
|
|
51
|
+
loadModules(modules: CapabilityModule[]): Promise<void>;
|
|
52
|
+
registerModule(module: CapabilityModule): Promise<void>;
|
|
53
|
+
getSession(): Promise<AgentSession>;
|
|
54
|
+
describeCapabilities(): CapabilityManifestEntry[];
|
|
55
|
+
dispose(): Promise<void>;
|
|
56
|
+
private collectToolSuites;
|
|
57
|
+
private validateContribution;
|
|
58
|
+
private assertMutable;
|
|
59
|
+
private removeModuleContributions;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=agentHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentHost.d.ts","sourceRoot":"","sources":["../../src/runtime/agentHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElF,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CACJ,OAAO,EAAE,iBAAiB,GACzB,sBAAsB,GAAG,sBAAsB,EAAE,GAAG,IAAI,GAAG,SAAS,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AM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBvD,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC;IAgBzC,oBAAoB,IAAI,uBAAuB,EAAE;IAS3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB9B,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,yBAAyB;CAclC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { AgentSession } from './agentSession.js';
|
|
2
|
+
export class AgentHost {
|
|
3
|
+
context;
|
|
4
|
+
toolObserver;
|
|
5
|
+
modules = new Map();
|
|
6
|
+
contributions = [];
|
|
7
|
+
contributionOwners = new Map();
|
|
8
|
+
moduleContributions = new Map();
|
|
9
|
+
session = null;
|
|
10
|
+
disposed = false;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.context = {
|
|
13
|
+
profile: options.profile,
|
|
14
|
+
workspaceContext: options.workspaceContext,
|
|
15
|
+
workingDir: options.workingDir,
|
|
16
|
+
env: options.env ? { ...options.env } : { ...process.env },
|
|
17
|
+
};
|
|
18
|
+
this.toolObserver = options.toolObserver;
|
|
19
|
+
}
|
|
20
|
+
get profile() {
|
|
21
|
+
return this.context.profile;
|
|
22
|
+
}
|
|
23
|
+
get workspaceContext() {
|
|
24
|
+
return this.context.workspaceContext ?? null;
|
|
25
|
+
}
|
|
26
|
+
get workingDir() {
|
|
27
|
+
return this.context.workingDir;
|
|
28
|
+
}
|
|
29
|
+
refreshWorkspaceContext(workspaceContext) {
|
|
30
|
+
this.context.workspaceContext = workspaceContext;
|
|
31
|
+
this.session?.refreshWorkspaceContext(workspaceContext);
|
|
32
|
+
}
|
|
33
|
+
async loadModules(modules) {
|
|
34
|
+
for (const module of modules) {
|
|
35
|
+
await this.registerModule(module);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async registerModule(module) {
|
|
39
|
+
this.assertMutable();
|
|
40
|
+
this.removeModuleContributions(module.id);
|
|
41
|
+
this.modules.set(module.id, module);
|
|
42
|
+
const result = await module.create(this.context);
|
|
43
|
+
const normalized = normalizeContributions(result);
|
|
44
|
+
for (const contribution of normalized) {
|
|
45
|
+
this.validateContribution(contribution, module.id);
|
|
46
|
+
this.contributions.push(contribution);
|
|
47
|
+
this.contributionOwners.set(contribution.id, module.id);
|
|
48
|
+
const contributionSet = this.moduleContributions.get(module.id) ?? new Set();
|
|
49
|
+
contributionSet.add(contribution.id);
|
|
50
|
+
this.moduleContributions.set(module.id, contributionSet);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async getSession() {
|
|
54
|
+
if (this.session) {
|
|
55
|
+
return this.session;
|
|
56
|
+
}
|
|
57
|
+
const toolSuites = this.collectToolSuites();
|
|
58
|
+
this.session = new AgentSession({
|
|
59
|
+
profile: this.context.profile,
|
|
60
|
+
workspaceContext: this.context.workspaceContext,
|
|
61
|
+
toolSuites,
|
|
62
|
+
toolObserver: this.toolObserver,
|
|
63
|
+
});
|
|
64
|
+
return this.session;
|
|
65
|
+
}
|
|
66
|
+
describeCapabilities() {
|
|
67
|
+
return this.contributions.map((contribution) => ({
|
|
68
|
+
id: contribution.id,
|
|
69
|
+
moduleId: this.contributionOwners.get(contribution.id) ?? 'unknown',
|
|
70
|
+
description: contribution.description,
|
|
71
|
+
metadata: contribution.metadata ?? undefined,
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
async dispose() {
|
|
75
|
+
if (this.disposed) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.disposed = true;
|
|
79
|
+
const tasks = this.contributions
|
|
80
|
+
.map((contribution) => contribution.dispose)
|
|
81
|
+
.filter((fn) => typeof fn === 'function')
|
|
82
|
+
.map(async (dispose) => {
|
|
83
|
+
try {
|
|
84
|
+
await dispose();
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
await Promise.all(tasks);
|
|
90
|
+
}
|
|
91
|
+
collectToolSuites() {
|
|
92
|
+
const suites = [];
|
|
93
|
+
const seen = new Set();
|
|
94
|
+
for (const contribution of this.contributions) {
|
|
95
|
+
const records = normalizeSuites(contribution);
|
|
96
|
+
for (const suite of records) {
|
|
97
|
+
if (seen.has(suite.id)) {
|
|
98
|
+
throw new Error(`Duplicate tool suite id "${suite.id}" detected while composing capabilities. ` +
|
|
99
|
+
'Ensure every capability module emits unique suite identifiers.');
|
|
100
|
+
}
|
|
101
|
+
suites.push(suite);
|
|
102
|
+
seen.add(suite.id);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return suites;
|
|
106
|
+
}
|
|
107
|
+
validateContribution(contribution, moduleId) {
|
|
108
|
+
if (!contribution?.id?.trim()) {
|
|
109
|
+
throw new Error(`Capability module "${moduleId}" emitted a contribution without an id.`);
|
|
110
|
+
}
|
|
111
|
+
const suites = normalizeSuites(contribution);
|
|
112
|
+
for (const suite of suites) {
|
|
113
|
+
if (!suite?.id?.trim()) {
|
|
114
|
+
throw new Error(`Capability contribution "${contribution.id}" from module "${moduleId}" ` +
|
|
115
|
+
'emitted a tool suite without an id.');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
assertMutable() {
|
|
120
|
+
if (this.session) {
|
|
121
|
+
throw new Error('Cannot register an additional capability module after the runtime session has been created. ' +
|
|
122
|
+
'Instantiate AgentHost earlier in the boot sequence or create a new host instance.');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
removeModuleContributions(moduleId) {
|
|
126
|
+
const ids = this.moduleContributions.get(moduleId);
|
|
127
|
+
if (!ids?.size) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
this.moduleContributions.delete(moduleId);
|
|
131
|
+
for (const id of ids) {
|
|
132
|
+
const index = this.contributions.findIndex((entry) => entry.id === id);
|
|
133
|
+
if (index >= 0) {
|
|
134
|
+
this.contributions.splice(index, 1);
|
|
135
|
+
}
|
|
136
|
+
this.contributionOwners.delete(id);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function normalizeContributions(value) {
|
|
141
|
+
if (!value) {
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
return Array.isArray(value) ? value : [value];
|
|
145
|
+
}
|
|
146
|
+
function normalizeSuites(contribution) {
|
|
147
|
+
const suites = [];
|
|
148
|
+
if (contribution.toolSuite) {
|
|
149
|
+
suites.push(contribution.toolSuite);
|
|
150
|
+
}
|
|
151
|
+
if (contribution.toolSuites?.length) {
|
|
152
|
+
suites.push(...contribution.toolSuites);
|
|
153
|
+
}
|
|
154
|
+
return suites;
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=agentHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentHost.js","sourceRoot":"","sources":["../../src/runtime/agentHost.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AA2C3E,MAAM,OAAO,SAAS;IACH,OAAO,CAAoB;IAC3B,YAAY,CAAuB;IACnC,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC9C,aAAa,GAA6B,EAAE,CAAC;IAC7C,kBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,mBAAmB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC9D,OAAO,GAAwB,IAAI,CAAC;IACpC,QAAQ,GAAG,KAAK,CAAC;IAEzB,YAAY,OAAyB;QACnC,IAAI,CAAC,OAAO,GAAG;YACb,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAA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E,CAAC;IACZ,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,eAAe,CAAC,YAAoC;IAC3D,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ProfileName, type ResolvedProfileConfig } from '../config.js';
|
|
2
|
+
import { type ToolExecutionContext, type ToolRuntime, type IToolRuntime, type ToolRuntimeObserver, type ToolSuite } from '../core/toolRuntime.js';
|
|
3
|
+
import type { ProviderId, ReasoningEffortLevel, TextVerbosityLevel } from '../core/types.js';
|
|
4
|
+
import { AgentRuntime, type AgentCallbacks } from '../core/agent.js';
|
|
5
|
+
import { ContextManager } from '../core/contextManager.js';
|
|
6
|
+
export interface AgentSessionOptions {
|
|
7
|
+
profile: ProfileName;
|
|
8
|
+
workspaceContext: string | null;
|
|
9
|
+
toolSuites?: ToolSuite[];
|
|
10
|
+
toolObserver?: ToolRuntimeObserver;
|
|
11
|
+
}
|
|
12
|
+
export interface ModelSelection {
|
|
13
|
+
provider: ProviderId;
|
|
14
|
+
model: string;
|
|
15
|
+
temperature?: number;
|
|
16
|
+
maxTokens?: number;
|
|
17
|
+
systemPrompt?: string;
|
|
18
|
+
reasoningEffort?: ReasoningEffortLevel;
|
|
19
|
+
textVerbosity?: TextVerbosityLevel;
|
|
20
|
+
/** Enable auto-continuation when model expresses intent but doesn't act */
|
|
21
|
+
autoContinue?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class AgentSession {
|
|
24
|
+
private readonly state;
|
|
25
|
+
constructor(options: AgentSessionOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Creates a context manager with LLM-based summarization support
|
|
28
|
+
*/
|
|
29
|
+
private createContextManagerWithSummarization;
|
|
30
|
+
get profile(): ProfileName;
|
|
31
|
+
get profileConfig(): ResolvedProfileConfig;
|
|
32
|
+
get workspaceContext(): string | null;
|
|
33
|
+
get toolRuntime(): ToolRuntime;
|
|
34
|
+
get toolContext(): ToolExecutionContext;
|
|
35
|
+
createAgent(selection: ModelSelection, callbacks?: AgentCallbacks, toolRuntimeOverride?: IToolRuntime): AgentRuntime;
|
|
36
|
+
updateToolContext(selection: ModelSelection): void;
|
|
37
|
+
refreshWorkspaceContext(workspaceContext: string | null): ResolvedProfileConfig;
|
|
38
|
+
get contextManager(): ContextManager;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=agentSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSession.d.ts","sourceRoot":"","sources":["../../src/runtime/agentSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,kBAAkB,EAAuB,MAAM,kBAAkB,CAAC;AAElH,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAA+B,cAAc,EAA8B,MAAM,2BAA2B,CAAC;AAYpH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,gBAAgB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