erosolar-cli 1.7.412 → 1.7.414
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/shell/interactiveShell.d.ts +14 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +276 -89
- package/dist/shell/interactiveShell.js.map +1 -1
- package/package.json +1 -1
- package/dist/StringUtils.d.ts +0 -8
- package/dist/StringUtils.d.ts.map +0 -1
- package/dist/StringUtils.js +0 -11
- package/dist/StringUtils.js.map +0 -1
- package/dist/adapters/browser/index.d.ts +0 -12
- package/dist/adapters/browser/index.d.ts.map +0 -1
- package/dist/adapters/browser/index.js +0 -11
- package/dist/adapters/browser/index.js.map +0 -1
- package/dist/adapters/node/index.d.ts +0 -17
- package/dist/adapters/node/index.d.ts.map +0 -1
- package/dist/adapters/node/index.js +0 -35
- package/dist/adapters/node/index.js.map +0 -1
- package/dist/adapters/remote/index.d.ts +0 -13
- package/dist/adapters/remote/index.d.ts.map +0 -1
- package/dist/adapters/remote/index.js +0 -20
- package/dist/adapters/remote/index.js.map +0 -1
- package/dist/adapters/types.d.ts +0 -14
- package/dist/adapters/types.d.ts.map +0 -1
- package/dist/adapters/types.js +0 -2
- package/dist/adapters/types.js.map +0 -1
- package/dist/bin/erosolar.d.ts +0 -9
- package/dist/bin/erosolar.d.ts.map +0 -1
- package/dist/bin/erosolar.js +0 -93
- package/dist/bin/erosolar.js.map +0 -1
- package/dist/bin/selfTest.d.ts +0 -14
- package/dist/bin/selfTest.d.ts.map +0 -1
- package/dist/bin/selfTest.js +0 -304
- package/dist/bin/selfTest.js.map +0 -1
- package/dist/browser/BrowserSessionManager.d.ts +0 -307
- package/dist/browser/BrowserSessionManager.d.ts.map +0 -1
- package/dist/browser/BrowserSessionManager.js +0 -713
- package/dist/browser/BrowserSessionManager.js.map +0 -1
- package/dist/capabilities/advancedTestGenerationCapability.d.ts +0 -17
- package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +0 -1
- package/dist/capabilities/advancedTestGenerationCapability.js +0 -28
- package/dist/capabilities/advancedTestGenerationCapability.js.map +0 -1
- package/dist/capabilities/agentSpawningCapability.d.ts +0 -6
- package/dist/capabilities/agentSpawningCapability.d.ts.map +0 -1
- package/dist/capabilities/agentSpawningCapability.js +0 -168
- package/dist/capabilities/agentSpawningCapability.js.map +0 -1
- package/dist/capabilities/askUserCapability.d.ts +0 -21
- package/dist/capabilities/askUserCapability.d.ts.map +0 -1
- package/dist/capabilities/askUserCapability.js +0 -155
- package/dist/capabilities/askUserCapability.js.map +0 -1
- package/dist/capabilities/bashCapability.d.ts +0 -13
- package/dist/capabilities/bashCapability.d.ts.map +0 -1
- package/dist/capabilities/bashCapability.js +0 -24
- package/dist/capabilities/bashCapability.js.map +0 -1
- package/dist/capabilities/browserAutomationCapability.d.ts +0 -37
- package/dist/capabilities/browserAutomationCapability.d.ts.map +0 -1
- package/dist/capabilities/browserAutomationCapability.js +0 -49
- package/dist/capabilities/browserAutomationCapability.js.map +0 -1
- package/dist/capabilities/buildCapability.d.ts +0 -24
- package/dist/capabilities/buildCapability.d.ts.map +0 -1
- package/dist/capabilities/buildCapability.js +0 -25
- package/dist/capabilities/buildCapability.js.map +0 -1
- package/dist/capabilities/cloudCapability.d.ts +0 -13
- package/dist/capabilities/cloudCapability.d.ts.map +0 -1
- package/dist/capabilities/cloudCapability.js +0 -38
- package/dist/capabilities/cloudCapability.js.map +0 -1
- package/dist/capabilities/codeAnalysisCapability.d.ts +0 -13
- package/dist/capabilities/codeAnalysisCapability.d.ts.map +0 -1
- package/dist/capabilities/codeAnalysisCapability.js +0 -24
- package/dist/capabilities/codeAnalysisCapability.js.map +0 -1
- package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
- package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
- package/dist/capabilities/codeGenerationCapability.js +0 -25
- package/dist/capabilities/codeGenerationCapability.js.map +0 -1
- package/dist/capabilities/codeQualityCapability.d.ts +0 -13
- package/dist/capabilities/codeQualityCapability.d.ts.map +0 -1
- package/dist/capabilities/codeQualityCapability.js +0 -25
- package/dist/capabilities/codeQualityCapability.js.map +0 -1
- package/dist/capabilities/dependencySecurityCapability.d.ts +0 -13
- package/dist/capabilities/dependencySecurityCapability.d.ts.map +0 -1
- package/dist/capabilities/dependencySecurityCapability.js +0 -24
- package/dist/capabilities/dependencySecurityCapability.js.map +0 -1
- package/dist/capabilities/devCapability.d.ts +0 -13
- package/dist/capabilities/devCapability.d.ts.map +0 -1
- package/dist/capabilities/devCapability.js +0 -24
- package/dist/capabilities/devCapability.js.map +0 -1
- package/dist/capabilities/editCapability.d.ts +0 -17
- package/dist/capabilities/editCapability.d.ts.map +0 -1
- package/dist/capabilities/editCapability.js +0 -27
- package/dist/capabilities/editCapability.js.map +0 -1
- package/dist/capabilities/emailCapability.d.ts +0 -12
- package/dist/capabilities/emailCapability.d.ts.map +0 -1
- package/dist/capabilities/emailCapability.js +0 -22
- package/dist/capabilities/emailCapability.js.map +0 -1
- package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +0 -17
- package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +0 -1
- package/dist/capabilities/enhancedCodeIntelligenceCapability.js +0 -28
- package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +0 -1
- package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +0 -17
- package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +0 -1
- package/dist/capabilities/enhancedDevWorkflowCapability.js +0 -28
- package/dist/capabilities/enhancedDevWorkflowCapability.js.map +0 -1
- package/dist/capabilities/enhancedGitCapability.d.ts +0 -7
- package/dist/capabilities/enhancedGitCapability.d.ts.map +0 -1
- package/dist/capabilities/enhancedGitCapability.js +0 -220
- package/dist/capabilities/enhancedGitCapability.js.map +0 -1
- package/dist/capabilities/filesystemCapability.d.ts +0 -13
- package/dist/capabilities/filesystemCapability.d.ts.map +0 -1
- package/dist/capabilities/filesystemCapability.js +0 -24
- package/dist/capabilities/filesystemCapability.js.map +0 -1
- package/dist/capabilities/frontendTestingCapability.d.ts +0 -13
- package/dist/capabilities/frontendTestingCapability.d.ts.map +0 -1
- package/dist/capabilities/frontendTestingCapability.js +0 -28
- package/dist/capabilities/frontendTestingCapability.js.map +0 -1
- package/dist/capabilities/globCapability.d.ts +0 -17
- package/dist/capabilities/globCapability.d.ts.map +0 -1
- package/dist/capabilities/globCapability.js +0 -27
- package/dist/capabilities/globCapability.js.map +0 -1
- package/dist/capabilities/index.d.ts +0 -26
- package/dist/capabilities/index.d.ts.map +0 -1
- package/dist/capabilities/index.js +0 -26
- package/dist/capabilities/index.js.map +0 -1
- package/dist/capabilities/interactionCapability.d.ts +0 -12
- package/dist/capabilities/interactionCapability.d.ts.map +0 -1
- package/dist/capabilities/interactionCapability.js +0 -22
- package/dist/capabilities/interactionCapability.js.map +0 -1
- package/dist/capabilities/learnCapability.d.ts +0 -22
- package/dist/capabilities/learnCapability.d.ts.map +0 -1
- package/dist/capabilities/learnCapability.js +0 -37
- package/dist/capabilities/learnCapability.js.map +0 -1
- package/dist/capabilities/mcpCapability.d.ts +0 -6
- package/dist/capabilities/mcpCapability.d.ts.map +0 -1
- package/dist/capabilities/mcpCapability.js +0 -19
- package/dist/capabilities/mcpCapability.js.map +0 -1
- package/dist/capabilities/notebookCapability.d.ts +0 -17
- package/dist/capabilities/notebookCapability.d.ts.map +0 -1
- package/dist/capabilities/notebookCapability.js +0 -27
- package/dist/capabilities/notebookCapability.js.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
- package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.js +0 -176
- package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
- package/dist/capabilities/planningCapability.d.ts +0 -16
- package/dist/capabilities/planningCapability.d.ts.map +0 -1
- package/dist/capabilities/planningCapability.js +0 -26
- package/dist/capabilities/planningCapability.js.map +0 -1
- package/dist/capabilities/refactoringCapability.d.ts +0 -13
- package/dist/capabilities/refactoringCapability.d.ts.map +0 -1
- package/dist/capabilities/refactoringCapability.js +0 -25
- package/dist/capabilities/refactoringCapability.js.map +0 -1
- package/dist/capabilities/repoChecksCapability.d.ts +0 -10
- package/dist/capabilities/repoChecksCapability.d.ts.map +0 -1
- package/dist/capabilities/repoChecksCapability.js +0 -24
- package/dist/capabilities/repoChecksCapability.js.map +0 -1
- package/dist/capabilities/searchCapability.d.ts +0 -13
- package/dist/capabilities/searchCapability.d.ts.map +0 -1
- package/dist/capabilities/searchCapability.js +0 -24
- package/dist/capabilities/searchCapability.js.map +0 -1
- package/dist/capabilities/skillCapability.d.ts +0 -3
- package/dist/capabilities/skillCapability.d.ts.map +0 -1
- package/dist/capabilities/skillCapability.js +0 -77
- package/dist/capabilities/skillCapability.js.map +0 -1
- package/dist/capabilities/taskManagementCapability.d.ts +0 -12
- package/dist/capabilities/taskManagementCapability.d.ts.map +0 -1
- package/dist/capabilities/taskManagementCapability.js +0 -22
- package/dist/capabilities/taskManagementCapability.js.map +0 -1
- package/dist/capabilities/testingCapability.d.ts +0 -13
- package/dist/capabilities/testingCapability.d.ts.map +0 -1
- package/dist/capabilities/testingCapability.js +0 -25
- package/dist/capabilities/testingCapability.js.map +0 -1
- package/dist/capabilities/todoCapability.d.ts +0 -19
- package/dist/capabilities/todoCapability.d.ts.map +0 -1
- package/dist/capabilities/todoCapability.js +0 -169
- package/dist/capabilities/todoCapability.js.map +0 -1
- package/dist/capabilities/toolManifest.d.ts +0 -3
- package/dist/capabilities/toolManifest.d.ts.map +0 -1
- package/dist/capabilities/toolManifest.js +0 -160
- package/dist/capabilities/toolManifest.js.map +0 -1
- package/dist/capabilities/toolRegistry.d.ts +0 -24
- package/dist/capabilities/toolRegistry.d.ts.map +0 -1
- package/dist/capabilities/toolRegistry.js +0 -150
- package/dist/capabilities/toolRegistry.js.map +0 -1
- package/dist/capabilities/validationCapability.d.ts +0 -13
- package/dist/capabilities/validationCapability.d.ts.map +0 -1
- package/dist/capabilities/validationCapability.js +0 -24
- package/dist/capabilities/validationCapability.js.map +0 -1
- package/dist/capabilities/webCapability.d.ts +0 -12
- package/dist/capabilities/webCapability.d.ts.map +0 -1
- package/dist/capabilities/webCapability.js +0 -22
- package/dist/capabilities/webCapability.js.map +0 -1
- package/dist/config.d.ts +0 -25
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -140
- package/dist/config.js.map +0 -1
- package/dist/contracts/v1/agent.d.ts +0 -147
- package/dist/contracts/v1/agent.d.ts.map +0 -1
- package/dist/contracts/v1/agent.js +0 -8
- package/dist/contracts/v1/agent.js.map +0 -1
- package/dist/contracts/v1/agentProfileManifest.d.ts +0 -60
- package/dist/contracts/v1/agentProfileManifest.d.ts.map +0 -1
- package/dist/contracts/v1/agentProfileManifest.js +0 -9
- package/dist/contracts/v1/agentProfileManifest.js.map +0 -1
- package/dist/contracts/v1/agentRules.d.ts +0 -60
- package/dist/contracts/v1/agentRules.d.ts.map +0 -1
- package/dist/contracts/v1/agentRules.js +0 -10
- package/dist/contracts/v1/agentRules.js.map +0 -1
- package/dist/contracts/v1/provider.d.ts +0 -149
- package/dist/contracts/v1/provider.d.ts.map +0 -1
- package/dist/contracts/v1/provider.js +0 -7
- package/dist/contracts/v1/provider.js.map +0 -1
- package/dist/contracts/v1/tool.d.ts +0 -136
- package/dist/contracts/v1/tool.d.ts.map +0 -1
- package/dist/contracts/v1/tool.js +0 -7
- package/dist/contracts/v1/tool.js.map +0 -1
- package/dist/contracts/v1/toolAccess.d.ts +0 -43
- package/dist/contracts/v1/toolAccess.d.ts.map +0 -1
- package/dist/contracts/v1/toolAccess.js +0 -9
- package/dist/contracts/v1/toolAccess.js.map +0 -1
- package/dist/core/LazyLoader.d.ts +0 -129
- package/dist/core/LazyLoader.d.ts.map +0 -1
- package/dist/core/LazyLoader.js +0 -240
- package/dist/core/LazyLoader.js.map +0 -1
- package/dist/core/agent.d.ts +0 -153
- package/dist/core/agent.d.ts.map +0 -1
- package/dist/core/agent.js +0 -881
- package/dist/core/agent.js.map +0 -1
- package/dist/core/agentProfileManifest.d.ts +0 -3
- package/dist/core/agentProfileManifest.d.ts.map +0 -1
- package/dist/core/agentProfileManifest.js +0 -188
- package/dist/core/agentProfileManifest.js.map +0 -1
- package/dist/core/agentProfiles.d.ts +0 -22
- package/dist/core/agentProfiles.d.ts.map +0 -1
- package/dist/core/agentProfiles.js +0 -35
- package/dist/core/agentProfiles.js.map +0 -1
- package/dist/core/agentRulebook.d.ts +0 -11
- package/dist/core/agentRulebook.d.ts.map +0 -1
- package/dist/core/agentRulebook.js +0 -136
- package/dist/core/agentRulebook.js.map +0 -1
- package/dist/core/agentSchemaLoader.d.ts +0 -131
- package/dist/core/agentSchemaLoader.d.ts.map +0 -1
- package/dist/core/agentSchemaLoader.js +0 -234
- package/dist/core/agentSchemaLoader.js.map +0 -1
- package/dist/core/aiErrorFixer.d.ts +0 -70
- package/dist/core/aiErrorFixer.d.ts.map +0 -1
- package/dist/core/aiErrorFixer.js +0 -402
- package/dist/core/aiErrorFixer.js.map +0 -1
- package/dist/core/alphaZeroEngine.d.ts +0 -269
- package/dist/core/alphaZeroEngine.d.ts.map +0 -1
- package/dist/core/alphaZeroEngine.js +0 -523
- package/dist/core/alphaZeroEngine.js.map +0 -1
- package/dist/core/alphaZeroModular.d.ts +0 -186
- package/dist/core/alphaZeroModular.d.ts.map +0 -1
- package/dist/core/alphaZeroModular.js +0 -755
- package/dist/core/alphaZeroModular.js.map +0 -1
- package/dist/core/alphaZeroOrchestrator.d.ts +0 -140
- package/dist/core/alphaZeroOrchestrator.d.ts.map +0 -1
- package/dist/core/alphaZeroOrchestrator.js +0 -418
- package/dist/core/alphaZeroOrchestrator.js.map +0 -1
- package/dist/core/checkpoint.d.ts +0 -76
- package/dist/core/checkpoint.d.ts.map +0 -1
- package/dist/core/checkpoint.js +0 -278
- package/dist/core/checkpoint.js.map +0 -1
- package/dist/core/claudeCodeFeatures.d.ts +0 -64
- package/dist/core/claudeCodeFeatures.d.ts.map +0 -1
- package/dist/core/claudeCodeFeatures.js +0 -163
- package/dist/core/claudeCodeFeatures.js.map +0 -1
- package/dist/core/cliTestHarness.d.ts +0 -200
- package/dist/core/cliTestHarness.d.ts.map +0 -1
- package/dist/core/cliTestHarness.js +0 -549
- package/dist/core/cliTestHarness.js.map +0 -1
- package/dist/core/contextManager.d.ts +0 -263
- package/dist/core/contextManager.d.ts.map +0 -1
- package/dist/core/contextManager.js +0 -1073
- package/dist/core/contextManager.js.map +0 -1
- package/dist/core/contextWindow.d.ts +0 -42
- package/dist/core/contextWindow.d.ts.map +0 -1
- package/dist/core/contextWindow.js +0 -123
- package/dist/core/contextWindow.js.map +0 -1
- package/dist/core/costTracker.d.ts +0 -87
- package/dist/core/costTracker.d.ts.map +0 -1
- package/dist/core/costTracker.js +0 -285
- package/dist/core/costTracker.js.map +0 -1
- package/dist/core/customCommands.d.ts +0 -19
- package/dist/core/customCommands.d.ts.map +0 -1
- package/dist/core/customCommands.js +0 -84
- package/dist/core/customCommands.js.map +0 -1
- package/dist/core/errors/apiKeyErrors.d.ts +0 -11
- package/dist/core/errors/apiKeyErrors.d.ts.map +0 -1
- package/dist/core/errors/apiKeyErrors.js +0 -159
- package/dist/core/errors/apiKeyErrors.js.map +0 -1
- package/dist/core/errors/errorTypes.d.ts +0 -111
- package/dist/core/errors/errorTypes.d.ts.map +0 -1
- package/dist/core/errors/errorTypes.js +0 -348
- package/dist/core/errors/errorTypes.js.map +0 -1
- package/dist/core/errors/errorUtils.d.ts +0 -87
- package/dist/core/errors/errorUtils.d.ts.map +0 -1
- package/dist/core/errors/errorUtils.js +0 -158
- package/dist/core/errors/errorUtils.js.map +0 -1
- package/dist/core/errors/safetyValidator.d.ts +0 -71
- package/dist/core/errors/safetyValidator.d.ts.map +0 -1
- package/dist/core/errors/safetyValidator.js +0 -302
- package/dist/core/errors/safetyValidator.js.map +0 -1
- package/dist/core/errors.d.ts +0 -4
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -33
- package/dist/core/errors.js.map +0 -1
- package/dist/core/failureRecovery.d.ts +0 -122
- package/dist/core/failureRecovery.d.ts.map +0 -1
- package/dist/core/failureRecovery.js +0 -477
- package/dist/core/failureRecovery.js.map +0 -1
- package/dist/core/hooks.d.ts +0 -113
- package/dist/core/hooks.d.ts.map +0 -1
- package/dist/core/hooks.js +0 -267
- package/dist/core/hooks.js.map +0 -1
- package/dist/core/intelligentTestFlows.d.ts +0 -126
- package/dist/core/intelligentTestFlows.d.ts.map +0 -1
- package/dist/core/intelligentTestFlows.js +0 -678
- package/dist/core/intelligentTestFlows.js.map +0 -1
- package/dist/core/isolatedVerifier.d.ts +0 -40
- package/dist/core/isolatedVerifier.d.ts.map +0 -1
- package/dist/core/isolatedVerifier.js +0 -129
- package/dist/core/isolatedVerifier.js.map +0 -1
- package/dist/core/learningPersistence.d.ts +0 -145
- package/dist/core/learningPersistence.d.ts.map +0 -1
- package/dist/core/learningPersistence.js +0 -477
- package/dist/core/learningPersistence.js.map +0 -1
- package/dist/core/memorySystem.d.ts +0 -67
- package/dist/core/memorySystem.d.ts.map +0 -1
- package/dist/core/memorySystem.js +0 -334
- package/dist/core/memorySystem.js.map +0 -1
- package/dist/core/metricsTracker.d.ts +0 -157
- package/dist/core/metricsTracker.d.ts.map +0 -1
- package/dist/core/metricsTracker.js +0 -273
- package/dist/core/metricsTracker.js.map +0 -1
- package/dist/core/modelDiscovery.d.ts +0 -101
- package/dist/core/modelDiscovery.d.ts.map +0 -1
- package/dist/core/modelDiscovery.js +0 -780
- package/dist/core/modelDiscovery.js.map +0 -1
- package/dist/core/multilinePasteHandler.d.ts +0 -35
- package/dist/core/multilinePasteHandler.d.ts.map +0 -1
- package/dist/core/multilinePasteHandler.js +0 -80
- package/dist/core/multilinePasteHandler.js.map +0 -1
- package/dist/core/offsecAlphaZero.d.ts +0 -56
- package/dist/core/offsecAlphaZero.d.ts.map +0 -1
- package/dist/core/offsecAlphaZero.js +0 -395
- package/dist/core/offsecAlphaZero.js.map +0 -1
- package/dist/core/outputStyles.d.ts +0 -48
- package/dist/core/outputStyles.d.ts.map +0 -1
- package/dist/core/outputStyles.js +0 -270
- package/dist/core/outputStyles.js.map +0 -1
- package/dist/core/performanceMonitor.d.ts +0 -124
- package/dist/core/performanceMonitor.d.ts.map +0 -1
- package/dist/core/performanceMonitor.js +0 -192
- package/dist/core/performanceMonitor.js.map +0 -1
- package/dist/core/preferences.d.ts +0 -67
- package/dist/core/preferences.d.ts.map +0 -1
- package/dist/core/preferences.js +0 -314
- package/dist/core/preferences.js.map +0 -1
- package/dist/core/responseVerifier.d.ts +0 -98
- package/dist/core/responseVerifier.d.ts.map +0 -1
- package/dist/core/responseVerifier.js +0 -509
- package/dist/core/responseVerifier.js.map +0 -1
- package/dist/core/resultVerification.d.ts +0 -141
- package/dist/core/resultVerification.d.ts.map +0 -1
- package/dist/core/resultVerification.js +0 -482
- package/dist/core/resultVerification.js.map +0 -1
- package/dist/core/schemaValidator.d.ts +0 -44
- package/dist/core/schemaValidator.d.ts.map +0 -1
- package/dist/core/schemaValidator.js +0 -155
- package/dist/core/schemaValidator.js.map +0 -1
- package/dist/core/secretStore.d.ts +0 -48
- package/dist/core/secretStore.d.ts.map +0 -1
- package/dist/core/secretStore.js +0 -367
- package/dist/core/secretStore.js.map +0 -1
- package/dist/core/securityAssessment.d.ts +0 -91
- package/dist/core/securityAssessment.d.ts.map +0 -1
- package/dist/core/securityAssessment.js +0 -580
- package/dist/core/securityAssessment.js.map +0 -1
- package/dist/core/selfEvolution.d.ts +0 -155
- package/dist/core/selfEvolution.d.ts.map +0 -1
- package/dist/core/selfEvolution.js +0 -1000
- package/dist/core/selfEvolution.js.map +0 -1
- package/dist/core/selfImprovement.d.ts +0 -141
- package/dist/core/selfImprovement.d.ts.map +0 -1
- package/dist/core/selfImprovement.js +0 -700
- package/dist/core/selfImprovement.js.map +0 -1
- package/dist/core/sessionStore.d.ts +0 -35
- package/dist/core/sessionStore.d.ts.map +0 -1
- package/dist/core/sessionStore.js +0 -189
- package/dist/core/sessionStore.js.map +0 -1
- package/dist/core/testUtils.d.ts +0 -121
- package/dist/core/testUtils.d.ts.map +0 -1
- package/dist/core/testUtils.js +0 -235
- package/dist/core/testUtils.js.map +0 -1
- package/dist/core/toolPreconditions.d.ts +0 -42
- package/dist/core/toolPreconditions.d.ts.map +0 -1
- package/dist/core/toolPreconditions.js +0 -357
- package/dist/core/toolPreconditions.js.map +0 -1
- package/dist/core/toolRuntime.d.ts +0 -158
- package/dist/core/toolRuntime.d.ts.map +0 -1
- package/dist/core/toolRuntime.js +0 -415
- package/dist/core/toolRuntime.js.map +0 -1
- package/dist/core/toolValidation.d.ts +0 -117
- package/dist/core/toolValidation.d.ts.map +0 -1
- package/dist/core/toolValidation.js +0 -282
- package/dist/core/toolValidation.js.map +0 -1
- package/dist/core/types/utilityTypes.d.ts +0 -192
- package/dist/core/types/utilityTypes.d.ts.map +0 -1
- package/dist/core/types/utilityTypes.js +0 -272
- package/dist/core/types/utilityTypes.js.map +0 -1
- package/dist/core/types.d.ts +0 -306
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -76
- package/dist/core/types.js.map +0 -1
- package/dist/core/updateManager.d.ts +0 -62
- package/dist/core/updateManager.d.ts.map +0 -1
- package/dist/core/updateManager.js +0 -266
- package/dist/core/updateManager.js.map +0 -1
- package/dist/core/validationRunner.d.ts +0 -106
- package/dist/core/validationRunner.d.ts.map +0 -1
- package/dist/core/validationRunner.js +0 -888
- package/dist/core/validationRunner.js.map +0 -1
- package/dist/core/verification.d.ts +0 -137
- package/dist/core/verification.d.ts.map +0 -1
- package/dist/core/verification.js +0 -323
- package/dist/core/verification.js.map +0 -1
- package/dist/headless/headlessApp.d.ts +0 -5
- package/dist/headless/headlessApp.d.ts.map +0 -1
- package/dist/headless/headlessApp.js +0 -210
- package/dist/headless/headlessApp.js.map +0 -1
- package/dist/intelligence/codeIntelligence.d.ts +0 -118
- package/dist/intelligence/codeIntelligence.d.ts.map +0 -1
- package/dist/intelligence/codeIntelligence.js +0 -552
- package/dist/intelligence/codeIntelligence.js.map +0 -1
- package/dist/intelligence/docGenerator.d.ts +0 -86
- package/dist/intelligence/docGenerator.d.ts.map +0 -1
- package/dist/intelligence/docGenerator.js +0 -564
- package/dist/intelligence/docGenerator.js.map +0 -1
- package/dist/intelligence/index.d.ts +0 -51
- package/dist/intelligence/index.d.ts.map +0 -1
- package/dist/intelligence/index.js +0 -253
- package/dist/intelligence/index.js.map +0 -1
- package/dist/intelligence/refactoring.d.ts +0 -50
- package/dist/intelligence/refactoring.d.ts.map +0 -1
- package/dist/intelligence/refactoring.js +0 -354
- package/dist/intelligence/refactoring.js.map +0 -1
- package/dist/intelligence/testGenerator.d.ts +0 -74
- package/dist/intelligence/testGenerator.d.ts.map +0 -1
- package/dist/intelligence/testGenerator.js +0 -483
- package/dist/intelligence/testGenerator.js.map +0 -1
- package/dist/mcp/config.d.ts +0 -8
- package/dist/mcp/config.d.ts.map +0 -1
- package/dist/mcp/config.js +0 -252
- package/dist/mcp/config.js.map +0 -1
- package/dist/mcp/sseClient.d.ts +0 -34
- package/dist/mcp/sseClient.d.ts.map +0 -1
- package/dist/mcp/sseClient.js +0 -327
- package/dist/mcp/sseClient.js.map +0 -1
- package/dist/mcp/stdioClient.d.ts +0 -24
- package/dist/mcp/stdioClient.d.ts.map +0 -1
- package/dist/mcp/stdioClient.js +0 -179
- package/dist/mcp/stdioClient.js.map +0 -1
- package/dist/mcp/toolBridge.d.ts +0 -12
- package/dist/mcp/toolBridge.d.ts.map +0 -1
- package/dist/mcp/toolBridge.js +0 -117
- package/dist/mcp/toolBridge.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -60
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -2
- package/dist/mcp/types.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -49
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -114
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/providers/anthropic/index.d.ts +0 -11
- package/dist/plugins/providers/anthropic/index.d.ts.map +0 -1
- package/dist/plugins/providers/anthropic/index.js +0 -38
- package/dist/plugins/providers/anthropic/index.js.map +0 -1
- package/dist/plugins/providers/deepseek/index.d.ts +0 -11
- package/dist/plugins/providers/deepseek/index.d.ts.map +0 -1
- package/dist/plugins/providers/deepseek/index.js +0 -52
- package/dist/plugins/providers/deepseek/index.js.map +0 -1
- package/dist/plugins/providers/google/index.d.ts +0 -11
- package/dist/plugins/providers/google/index.d.ts.map +0 -1
- package/dist/plugins/providers/google/index.js +0 -40
- package/dist/plugins/providers/google/index.js.map +0 -1
- package/dist/plugins/providers/index.d.ts +0 -2
- package/dist/plugins/providers/index.d.ts.map +0 -1
- package/dist/plugins/providers/index.js +0 -20
- package/dist/plugins/providers/index.js.map +0 -1
- package/dist/plugins/providers/ollama/index.d.ts +0 -21
- package/dist/plugins/providers/ollama/index.d.ts.map +0 -1
- package/dist/plugins/providers/ollama/index.js +0 -69
- package/dist/plugins/providers/ollama/index.js.map +0 -1
- package/dist/plugins/providers/openai/index.d.ts +0 -12
- package/dist/plugins/providers/openai/index.d.ts.map +0 -1
- package/dist/plugins/providers/openai/index.js +0 -39
- package/dist/plugins/providers/openai/index.js.map +0 -1
- package/dist/plugins/providers/xai/index.d.ts +0 -11
- package/dist/plugins/providers/xai/index.d.ts.map +0 -1
- package/dist/plugins/providers/xai/index.js +0 -39
- package/dist/plugins/providers/xai/index.js.map +0 -1
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +0 -3
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -9
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +0 -1
- package/dist/plugins/tools/bash/localBashPlugin.d.ts +0 -3
- package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/bash/localBashPlugin.js +0 -14
- package/dist/plugins/tools/bash/localBashPlugin.js.map +0 -1
- package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +0 -14
- package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/browser/browserAutomationPlugin.js +0 -26
- package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +0 -1
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +0 -3
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js +0 -14
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +0 -1
- package/dist/plugins/tools/cloud/cloudPlugin.d.ts +0 -3
- package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/cloud/cloudPlugin.js +0 -14
- package/dist/plugins/tools/cloud/cloudPlugin.js.map +0 -1
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +0 -3
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -14
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +0 -1
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +0 -3
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +0 -14
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +0 -1
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +0 -3
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/dependency/dependencyPlugin.js +0 -12
- package/dist/plugins/tools/dependency/dependencyPlugin.js.map +0 -1
- package/dist/plugins/tools/development/devPlugin.d.ts +0 -3
- package/dist/plugins/tools/development/devPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/development/devPlugin.js +0 -14
- package/dist/plugins/tools/development/devPlugin.js.map +0 -1
- package/dist/plugins/tools/edit/editPlugin.d.ts +0 -9
- package/dist/plugins/tools/edit/editPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/edit/editPlugin.js +0 -15
- package/dist/plugins/tools/edit/editPlugin.js.map +0 -1
- package/dist/plugins/tools/email/emailPlugin.d.ts +0 -3
- package/dist/plugins/tools/email/emailPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/email/emailPlugin.js +0 -12
- package/dist/plugins/tools/email/emailPlugin.js.map +0 -1
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +0 -3
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -9
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +0 -1
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +0 -3
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +0 -14
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +0 -1
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +0 -3
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +0 -14
- package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +0 -1
- package/dist/plugins/tools/glob/globPlugin.d.ts +0 -9
- package/dist/plugins/tools/glob/globPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/glob/globPlugin.js +0 -15
- package/dist/plugins/tools/glob/globPlugin.js.map +0 -1
- package/dist/plugins/tools/index.d.ts +0 -3
- package/dist/plugins/tools/index.d.ts.map +0 -1
- package/dist/plugins/tools/index.js +0 -3
- package/dist/plugins/tools/index.js.map +0 -1
- package/dist/plugins/tools/interaction/interactionPlugin.d.ts +0 -3
- package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/interaction/interactionPlugin.js +0 -12
- package/dist/plugins/tools/interaction/interactionPlugin.js.map +0 -1
- package/dist/plugins/tools/learn/learnPlugin.d.ts +0 -3
- package/dist/plugins/tools/learn/learnPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/learn/learnPlugin.js +0 -14
- package/dist/plugins/tools/learn/learnPlugin.js.map +0 -1
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts +0 -3
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/mcp/mcpPlugin.js +0 -9
- package/dist/plugins/tools/mcp/mcpPlugin.js.map +0 -1
- package/dist/plugins/tools/nodeDefaults.d.ts +0 -2
- package/dist/plugins/tools/nodeDefaults.d.ts.map +0 -1
- package/dist/plugins/tools/nodeDefaults.js +0 -65
- package/dist/plugins/tools/nodeDefaults.js.map +0 -1
- package/dist/plugins/tools/notebook/notebookPlugin.d.ts +0 -9
- package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/notebook/notebookPlugin.js +0 -15
- package/dist/plugins/tools/notebook/notebookPlugin.js.map +0 -1
- package/dist/plugins/tools/planning/planningPlugin.d.ts +0 -9
- package/dist/plugins/tools/planning/planningPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/planning/planningPlugin.js +0 -15
- package/dist/plugins/tools/planning/planningPlugin.js.map +0 -1
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +0 -3
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/refactoring/refactoringPlugin.js +0 -12
- package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +0 -1
- package/dist/plugins/tools/registry.d.ts +0 -22
- package/dist/plugins/tools/registry.d.ts.map +0 -1
- package/dist/plugins/tools/registry.js +0 -58
- package/dist/plugins/tools/registry.js.map +0 -1
- package/dist/plugins/tools/search/localSearchPlugin.d.ts +0 -3
- package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/search/localSearchPlugin.js +0 -14
- package/dist/plugins/tools/search/localSearchPlugin.js.map +0 -1
- package/dist/plugins/tools/skills/skillPlugin.d.ts +0 -3
- package/dist/plugins/tools/skills/skillPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/skills/skillPlugin.js +0 -9
- package/dist/plugins/tools/skills/skillPlugin.js.map +0 -1
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +0 -3
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +0 -12
- package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +0 -1
- package/dist/plugins/tools/testing/testingPlugin.d.ts +0 -3
- package/dist/plugins/tools/testing/testingPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/testing/testingPlugin.js +0 -12
- package/dist/plugins/tools/testing/testingPlugin.js.map +0 -1
- package/dist/plugins/tools/validation/validationPlugin.d.ts +0 -3
- package/dist/plugins/tools/validation/validationPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/validation/validationPlugin.js +0 -14
- package/dist/plugins/tools/validation/validationPlugin.js.map +0 -1
- package/dist/plugins/tools/web/webPlugin.d.ts +0 -3
- package/dist/plugins/tools/web/webPlugin.d.ts.map +0 -1
- package/dist/plugins/tools/web/webPlugin.js +0 -12
- package/dist/plugins/tools/web/webPlugin.js.map +0 -1
- package/dist/providers/anthropicProvider.d.ts +0 -41
- package/dist/providers/anthropicProvider.d.ts.map +0 -1
- package/dist/providers/anthropicProvider.js +0 -446
- package/dist/providers/anthropicProvider.js.map +0 -1
- package/dist/providers/googleProvider.d.ts +0 -36
- package/dist/providers/googleProvider.d.ts.map +0 -1
- package/dist/providers/googleProvider.js +0 -312
- package/dist/providers/googleProvider.js.map +0 -1
- package/dist/providers/openaiChatCompletionsProvider.d.ts +0 -43
- package/dist/providers/openaiChatCompletionsProvider.d.ts.map +0 -1
- package/dist/providers/openaiChatCompletionsProvider.js +0 -475
- package/dist/providers/openaiChatCompletionsProvider.js.map +0 -1
- package/dist/providers/openaiResponsesProvider.d.ts +0 -38
- package/dist/providers/openaiResponsesProvider.d.ts.map +0 -1
- package/dist/providers/openaiResponsesProvider.js +0 -364
- package/dist/providers/openaiResponsesProvider.js.map +0 -1
- package/dist/providers/providerFactory.d.ts +0 -18
- package/dist/providers/providerFactory.d.ts.map +0 -1
- package/dist/providers/providerFactory.js +0 -25
- package/dist/providers/providerFactory.js.map +0 -1
- package/dist/providers/resilientProvider.d.ts +0 -94
- package/dist/providers/resilientProvider.d.ts.map +0 -1
- package/dist/providers/resilientProvider.js +0 -370
- package/dist/providers/resilientProvider.js.map +0 -1
- package/dist/runtime/agentController.d.ts +0 -65
- package/dist/runtime/agentController.d.ts.map +0 -1
- package/dist/runtime/agentController.js +0 -353
- package/dist/runtime/agentController.js.map +0 -1
- package/dist/runtime/agentHost.d.ts +0 -61
- package/dist/runtime/agentHost.d.ts.map +0 -1
- package/dist/runtime/agentHost.js +0 -156
- package/dist/runtime/agentHost.js.map +0 -1
- package/dist/runtime/agentSession.d.ts +0 -40
- package/dist/runtime/agentSession.d.ts.map +0 -1
- package/dist/runtime/agentSession.js +0 -206
- package/dist/runtime/agentSession.js.map +0 -1
- package/dist/runtime/browser.d.ts +0 -7
- package/dist/runtime/browser.d.ts.map +0 -1
- package/dist/runtime/browser.js +0 -10
- package/dist/runtime/browser.js.map +0 -1
- package/dist/runtime/cloud.d.ts +0 -7
- package/dist/runtime/cloud.d.ts.map +0 -1
- package/dist/runtime/cloud.js +0 -10
- package/dist/runtime/cloud.js.map +0 -1
- package/dist/runtime/node.d.ts +0 -8
- package/dist/runtime/node.d.ts.map +0 -1
- package/dist/runtime/node.js +0 -11
- package/dist/runtime/node.js.map +0 -1
- package/dist/runtime/universal.d.ts +0 -21
- package/dist/runtime/universal.d.ts.map +0 -1
- package/dist/runtime/universal.js +0 -29
- package/dist/runtime/universal.js.map +0 -1
- package/dist/shell/autoExecutor.d.ts +0 -70
- package/dist/shell/autoExecutor.d.ts.map +0 -1
- package/dist/shell/autoExecutor.js +0 -288
- package/dist/shell/autoExecutor.js.map +0 -1
- package/dist/shell/composableMessage.d.ts +0 -183
- package/dist/shell/composableMessage.d.ts.map +0 -1
- package/dist/shell/composableMessage.js +0 -420
- package/dist/shell/composableMessage.js.map +0 -1
- package/dist/shell/fileChangeTracker.d.ts +0 -39
- package/dist/shell/fileChangeTracker.d.ts.map +0 -1
- package/dist/shell/fileChangeTracker.js +0 -64
- package/dist/shell/fileChangeTracker.js.map +0 -1
- package/dist/shell/keyboardShortcuts.d.ts +0 -53
- package/dist/shell/keyboardShortcuts.d.ts.map +0 -1
- package/dist/shell/keyboardShortcuts.js +0 -166
- package/dist/shell/keyboardShortcuts.js.map +0 -1
- package/dist/shell/liveStatus.d.ts +0 -30
- package/dist/shell/liveStatus.d.ts.map +0 -1
- package/dist/shell/liveStatus.js +0 -102
- package/dist/shell/liveStatus.js.map +0 -1
- package/dist/shell/shellApp.d.ts +0 -19
- package/dist/shell/shellApp.d.ts.map +0 -1
- package/dist/shell/shellApp.js +0 -408
- package/dist/shell/shellApp.js.map +0 -1
- package/dist/shell/systemPrompt.d.ts +0 -3
- package/dist/shell/systemPrompt.d.ts.map +0 -1
- package/dist/shell/systemPrompt.js +0 -81
- package/dist/shell/systemPrompt.js.map +0 -1
- package/dist/shell/taskCompletionDetector.d.ts +0 -106
- package/dist/shell/taskCompletionDetector.d.ts.map +0 -1
- package/dist/shell/taskCompletionDetector.js +0 -402
- package/dist/shell/taskCompletionDetector.js.map +0 -1
- package/dist/shell/terminalInput.d.ts +0 -617
- package/dist/shell/terminalInput.d.ts.map +0 -1
- package/dist/shell/terminalInput.js +0 -2633
- package/dist/shell/terminalInput.js.map +0 -1
- package/dist/shell/terminalInputAdapter.d.ts +0 -263
- package/dist/shell/terminalInputAdapter.d.ts.map +0 -1
- package/dist/shell/terminalInputAdapter.js +0 -406
- package/dist/shell/terminalInputAdapter.js.map +0 -1
- package/dist/shell/updateManager.d.ts +0 -3
- package/dist/shell/updateManager.d.ts.map +0 -1
- package/dist/shell/updateManager.js +0 -120
- package/dist/shell/updateManager.js.map +0 -1
- package/dist/shell/vimMode.d.ts +0 -66
- package/dist/shell/vimMode.d.ts.map +0 -1
- package/dist/shell/vimMode.js +0 -434
- package/dist/shell/vimMode.js.map +0 -1
- package/dist/skills/skillRepository.d.ts +0 -103
- package/dist/skills/skillRepository.d.ts.map +0 -1
- package/dist/skills/skillRepository.js +0 -237
- package/dist/skills/skillRepository.js.map +0 -1
- package/dist/skills/types.d.ts +0 -37
- package/dist/skills/types.d.ts.map +0 -1
- package/dist/skills/types.js +0 -2
- package/dist/skills/types.js.map +0 -1
- package/dist/subagents/agentConfig.d.ts +0 -27
- package/dist/subagents/agentConfig.d.ts.map +0 -1
- package/dist/subagents/agentConfig.js +0 -89
- package/dist/subagents/agentConfig.js.map +0 -1
- package/dist/subagents/agentRegistry.d.ts +0 -33
- package/dist/subagents/agentRegistry.d.ts.map +0 -1
- package/dist/subagents/agentRegistry.js +0 -162
- package/dist/subagents/agentRegistry.js.map +0 -1
- package/dist/subagents/parallelAgentManager.d.ts +0 -99
- package/dist/subagents/parallelAgentManager.d.ts.map +0 -1
- package/dist/subagents/parallelAgentManager.js +0 -248
- package/dist/subagents/parallelAgentManager.js.map +0 -1
- package/dist/subagents/taskRunner.d.ts +0 -34
- package/dist/subagents/taskRunner.d.ts.map +0 -1
- package/dist/subagents/taskRunner.js +0 -459
- package/dist/subagents/taskRunner.js.map +0 -1
- package/dist/tools/advancedTestGenerationTools.d.ts +0 -21
- package/dist/tools/advancedTestGenerationTools.d.ts.map +0 -1
- package/dist/tools/advancedTestGenerationTools.js +0 -301
- package/dist/tools/advancedTestGenerationTools.js.map +0 -1
- package/dist/tools/backgroundBashTools.d.ts +0 -21
- package/dist/tools/backgroundBashTools.d.ts.map +0 -1
- package/dist/tools/backgroundBashTools.js +0 -215
- package/dist/tools/backgroundBashTools.js.map +0 -1
- package/dist/tools/bashTools.d.ts +0 -8
- package/dist/tools/bashTools.d.ts.map +0 -1
- package/dist/tools/bashTools.js +0 -251
- package/dist/tools/bashTools.js.map +0 -1
- package/dist/tools/browserAutomationTools.d.ts +0 -23
- package/dist/tools/browserAutomationTools.d.ts.map +0 -1
- package/dist/tools/browserAutomationTools.js +0 -916
- package/dist/tools/browserAutomationTools.js.map +0 -1
- package/dist/tools/buildTools.d.ts +0 -9
- package/dist/tools/buildTools.d.ts.map +0 -1
- package/dist/tools/buildTools.js +0 -344
- package/dist/tools/buildTools.js.map +0 -1
- package/dist/tools/cloudTools.d.ts +0 -49
- package/dist/tools/cloudTools.d.ts.map +0 -1
- package/dist/tools/cloudTools.js +0 -1258
- package/dist/tools/cloudTools.js.map +0 -1
- package/dist/tools/code-quality-dashboard.d.ts +0 -57
- package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
- package/dist/tools/code-quality-dashboard.js +0 -218
- package/dist/tools/code-quality-dashboard.js.map +0 -1
- package/dist/tools/codeAnalysisTools.d.ts +0 -74
- package/dist/tools/codeAnalysisTools.d.ts.map +0 -1
- package/dist/tools/codeAnalysisTools.js +0 -664
- package/dist/tools/codeAnalysisTools.js.map +0 -1
- package/dist/tools/codeGenerationTools.d.ts +0 -3
- package/dist/tools/codeGenerationTools.d.ts.map +0 -1
- package/dist/tools/codeGenerationTools.js +0 -439
- package/dist/tools/codeGenerationTools.js.map +0 -1
- package/dist/tools/codeQualityTools.d.ts +0 -3
- package/dist/tools/codeQualityTools.d.ts.map +0 -1
- package/dist/tools/codeQualityTools.js +0 -296
- package/dist/tools/codeQualityTools.js.map +0 -1
- package/dist/tools/dependencyTools.d.ts +0 -3
- package/dist/tools/dependencyTools.d.ts.map +0 -1
- package/dist/tools/dependencyTools.js +0 -283
- package/dist/tools/dependencyTools.js.map +0 -1
- package/dist/tools/devTools.d.ts +0 -10
- package/dist/tools/devTools.d.ts.map +0 -1
- package/dist/tools/devTools.js +0 -2125
- package/dist/tools/devTools.js.map +0 -1
- package/dist/tools/diffUtils.d.ts +0 -36
- package/dist/tools/diffUtils.d.ts.map +0 -1
- package/dist/tools/diffUtils.js +0 -528
- package/dist/tools/diffUtils.js.map +0 -1
- package/dist/tools/editTools.d.ts +0 -29
- package/dist/tools/editTools.d.ts.map +0 -1
- package/dist/tools/editTools.js +0 -419
- package/dist/tools/editTools.js.map +0 -1
- package/dist/tools/emailTools.d.ts +0 -21
- package/dist/tools/emailTools.d.ts.map +0 -1
- package/dist/tools/emailTools.js +0 -449
- package/dist/tools/emailTools.js.map +0 -1
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts +0 -27
- package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +0 -1
- package/dist/tools/enhancedCodeIntelligenceTools.js +0 -418
- package/dist/tools/enhancedCodeIntelligenceTools.js.map +0 -1
- package/dist/tools/enhancedDevWorkflowTools.d.ts +0 -15
- package/dist/tools/enhancedDevWorkflowTools.d.ts.map +0 -1
- package/dist/tools/enhancedDevWorkflowTools.js +0 -303
- package/dist/tools/enhancedDevWorkflowTools.js.map +0 -1
- package/dist/tools/fileTools.d.ts +0 -3
- package/dist/tools/fileTools.d.ts.map +0 -1
- package/dist/tools/fileTools.js +0 -334
- package/dist/tools/fileTools.js.map +0 -1
- package/dist/tools/frontendTestingTools.d.ts +0 -35
- package/dist/tools/frontendTestingTools.d.ts.map +0 -1
- package/dist/tools/frontendTestingTools.js +0 -1254
- package/dist/tools/frontendTestingTools.js.map +0 -1
- package/dist/tools/globTools.d.ts +0 -15
- package/dist/tools/globTools.d.ts.map +0 -1
- package/dist/tools/globTools.js +0 -174
- package/dist/tools/globTools.js.map +0 -1
- package/dist/tools/grepTools.d.ts +0 -19
- package/dist/tools/grepTools.d.ts.map +0 -1
- package/dist/tools/grepTools.js +0 -358
- package/dist/tools/grepTools.js.map +0 -1
- package/dist/tools/interactionTools.d.ts +0 -13
- package/dist/tools/interactionTools.d.ts.map +0 -1
- package/dist/tools/interactionTools.js +0 -171
- package/dist/tools/interactionTools.js.map +0 -1
- package/dist/tools/learnTools.d.ts +0 -152
- package/dist/tools/learnTools.d.ts.map +0 -1
- package/dist/tools/learnTools.js +0 -1942
- package/dist/tools/learnTools.js.map +0 -1
- package/dist/tools/localExplore.d.ts +0 -225
- package/dist/tools/localExplore.d.ts.map +0 -1
- package/dist/tools/localExplore.js +0 -1291
- package/dist/tools/localExplore.js.map +0 -1
- package/dist/tools/notebookEditTools.d.ts +0 -15
- package/dist/tools/notebookEditTools.d.ts.map +0 -1
- package/dist/tools/notebookEditTools.js +0 -197
- package/dist/tools/notebookEditTools.js.map +0 -1
- package/dist/tools/planningTools.d.ts +0 -21
- package/dist/tools/planningTools.d.ts.map +0 -1
- package/dist/tools/planningTools.js +0 -185
- package/dist/tools/planningTools.js.map +0 -1
- package/dist/tools/refactoringTools.d.ts +0 -3
- package/dist/tools/refactoringTools.d.ts.map +0 -1
- package/dist/tools/refactoringTools.js +0 -294
- package/dist/tools/refactoringTools.js.map +0 -1
- package/dist/tools/repoChecksTools.d.ts +0 -3
- package/dist/tools/repoChecksTools.d.ts.map +0 -1
- package/dist/tools/repoChecksTools.js +0 -161
- package/dist/tools/repoChecksTools.js.map +0 -1
- package/dist/tools/searchTools.d.ts +0 -3
- package/dist/tools/searchTools.d.ts.map +0 -1
- package/dist/tools/searchTools.js +0 -207
- package/dist/tools/searchTools.js.map +0 -1
- package/dist/tools/skillTools.d.ts +0 -8
- package/dist/tools/skillTools.d.ts.map +0 -1
- package/dist/tools/skillTools.js +0 -178
- package/dist/tools/skillTools.js.map +0 -1
- package/dist/tools/softwareEngineeringTools.d.ts +0 -7
- package/dist/tools/softwareEngineeringTools.d.ts.map +0 -1
- package/dist/tools/softwareEngineeringTools.js +0 -338
- package/dist/tools/softwareEngineeringTools.js.map +0 -1
- package/dist/tools/taskManagementTools.d.ts +0 -10
- package/dist/tools/taskManagementTools.d.ts.map +0 -1
- package/dist/tools/taskManagementTools.js +0 -157
- package/dist/tools/taskManagementTools.js.map +0 -1
- package/dist/tools/testingTools.d.ts +0 -3
- package/dist/tools/testingTools.d.ts.map +0 -1
- package/dist/tools/testingTools.js +0 -233
- package/dist/tools/testingTools.js.map +0 -1
- package/dist/tools/validationTools.d.ts +0 -7
- package/dist/tools/validationTools.d.ts.map +0 -1
- package/dist/tools/validationTools.js +0 -344
- package/dist/tools/validationTools.js.map +0 -1
- package/dist/tools/webTools.d.ts +0 -3
- package/dist/tools/webTools.d.ts.map +0 -1
- package/dist/tools/webTools.js +0 -502
- package/dist/tools/webTools.js.map +0 -1
- package/dist/ui/ShellUIAdapter.d.ts +0 -194
- package/dist/ui/ShellUIAdapter.d.ts.map +0 -1
- package/dist/ui/ShellUIAdapter.js +0 -1069
- package/dist/ui/ShellUIAdapter.js.map +0 -1
- package/dist/ui/UnifiedUIController.d.ts +0 -70
- package/dist/ui/UnifiedUIController.d.ts.map +0 -1
- package/dist/ui/UnifiedUIController.js +0 -190
- package/dist/ui/UnifiedUIController.js.map +0 -1
- package/dist/ui/animation/AnimationScheduler.d.ts +0 -192
- package/dist/ui/animation/AnimationScheduler.d.ts.map +0 -1
- package/dist/ui/animation/AnimationScheduler.js +0 -432
- package/dist/ui/animation/AnimationScheduler.js.map +0 -1
- package/dist/ui/codeHighlighter.d.ts +0 -6
- package/dist/ui/codeHighlighter.d.ts.map +0 -1
- package/dist/ui/codeHighlighter.js +0 -855
- package/dist/ui/codeHighlighter.js.map +0 -1
- package/dist/ui/compactRenderer.d.ts +0 -139
- package/dist/ui/compactRenderer.d.ts.map +0 -1
- package/dist/ui/compactRenderer.js +0 -398
- package/dist/ui/compactRenderer.js.map +0 -1
- package/dist/ui/designSystem.d.ts +0 -26
- package/dist/ui/designSystem.d.ts.map +0 -1
- package/dist/ui/designSystem.js +0 -122
- package/dist/ui/designSystem.js.map +0 -1
- package/dist/ui/display.d.ts +0 -324
- package/dist/ui/display.d.ts.map +0 -1
- package/dist/ui/display.js +0 -1328
- package/dist/ui/display.js.map +0 -1
- package/dist/ui/errorFormatter.d.ts +0 -54
- package/dist/ui/errorFormatter.d.ts.map +0 -1
- package/dist/ui/errorFormatter.js +0 -251
- package/dist/ui/errorFormatter.js.map +0 -1
- package/dist/ui/globalWriteLock.d.ts +0 -38
- package/dist/ui/globalWriteLock.d.ts.map +0 -1
- package/dist/ui/globalWriteLock.js +0 -54
- package/dist/ui/globalWriteLock.js.map +0 -1
- package/dist/ui/inPlaceUpdater.d.ts +0 -181
- package/dist/ui/inPlaceUpdater.d.ts.map +0 -1
- package/dist/ui/inPlaceUpdater.js +0 -515
- package/dist/ui/inPlaceUpdater.js.map +0 -1
- package/dist/ui/interrupts/InterruptManager.d.ts +0 -142
- package/dist/ui/interrupts/InterruptManager.d.ts.map +0 -1
- package/dist/ui/interrupts/InterruptManager.js +0 -439
- package/dist/ui/interrupts/InterruptManager.js.map +0 -1
- package/dist/ui/layout.d.ts +0 -17
- package/dist/ui/layout.d.ts.map +0 -1
- package/dist/ui/layout.js +0 -140
- package/dist/ui/layout.js.map +0 -1
- package/dist/ui/orchestration/StatusOrchestrator.d.ts +0 -156
- package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +0 -1
- package/dist/ui/orchestration/StatusOrchestrator.js +0 -406
- package/dist/ui/orchestration/StatusOrchestrator.js.map +0 -1
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts +0 -77
- package/dist/ui/orchestration/UIUpdateCoordinator.d.ts.map +0 -1
- package/dist/ui/orchestration/UIUpdateCoordinator.js +0 -265
- package/dist/ui/orchestration/UIUpdateCoordinator.js.map +0 -1
- package/dist/ui/outputMode.d.ts +0 -22
- package/dist/ui/outputMode.d.ts.map +0 -1
- package/dist/ui/outputMode.js +0 -40
- package/dist/ui/outputMode.js.map +0 -1
- package/dist/ui/richText.d.ts +0 -6
- package/dist/ui/richText.d.ts.map +0 -1
- package/dist/ui/richText.js +0 -391
- package/dist/ui/richText.js.map +0 -1
- package/dist/ui/shortcutsHelp.d.ts +0 -39
- package/dist/ui/shortcutsHelp.d.ts.map +0 -1
- package/dist/ui/shortcutsHelp.js +0 -152
- package/dist/ui/shortcutsHelp.js.map +0 -1
- package/dist/ui/streamingFormatter.d.ts +0 -17
- package/dist/ui/streamingFormatter.d.ts.map +0 -1
- package/dist/ui/streamingFormatter.js +0 -71
- package/dist/ui/streamingFormatter.js.map +0 -1
- package/dist/ui/telemetry/UITelemetry.d.ts +0 -181
- package/dist/ui/telemetry/UITelemetry.d.ts.map +0 -1
- package/dist/ui/telemetry/UITelemetry.js +0 -446
- package/dist/ui/telemetry/UITelemetry.js.map +0 -1
- package/dist/ui/textHighlighter.d.ts +0 -83
- package/dist/ui/textHighlighter.d.ts.map +0 -1
- package/dist/ui/textHighlighter.js +0 -267
- package/dist/ui/textHighlighter.js.map +0 -1
- package/dist/ui/theme.d.ts +0 -208
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js +0 -249
- package/dist/ui/theme.js.map +0 -1
- package/dist/ui/toolDisplay.d.ts +0 -195
- package/dist/ui/toolDisplay.d.ts.map +0 -1
- package/dist/ui/toolDisplay.js +0 -1527
- package/dist/ui/toolDisplay.js.map +0 -1
- package/dist/ui/unified/index.d.ts +0 -50
- package/dist/ui/unified/index.d.ts.map +0 -1
- package/dist/ui/unified/index.js +0 -77
- package/dist/ui/unified/index.js.map +0 -1
- package/dist/ui/unified/layout.d.ts +0 -12
- package/dist/ui/unified/layout.d.ts.map +0 -1
- package/dist/ui/unified/layout.js +0 -96
- package/dist/ui/unified/layout.js.map +0 -1
- package/dist/ui/writeLock.d.ts +0 -65
- package/dist/ui/writeLock.d.ts.map +0 -1
- package/dist/ui/writeLock.js +0 -114
- package/dist/ui/writeLock.js.map +0 -1
- package/dist/utils/asyncUtils.d.ts +0 -95
- package/dist/utils/asyncUtils.d.ts.map +0 -1
- package/dist/utils/asyncUtils.js +0 -286
- package/dist/utils/asyncUtils.js.map +0 -1
- package/dist/utils/errorUtils.d.ts +0 -16
- package/dist/utils/errorUtils.d.ts.map +0 -1
- package/dist/utils/errorUtils.js +0 -66
- package/dist/utils/errorUtils.js.map +0 -1
- package/dist/utils/frontmatter.d.ts +0 -10
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js +0 -78
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/planFormatter.d.ts +0 -34
- package/dist/utils/planFormatter.d.ts.map +0 -1
- package/dist/utils/planFormatter.js +0 -140
- package/dist/utils/planFormatter.js.map +0 -1
- package/dist/workspace.d.ts +0 -8
- package/dist/workspace.d.ts.map +0 -1
- package/dist/workspace.js +0 -107
- package/dist/workspace.js.map +0 -1
- package/dist/workspace.validator.d.ts +0 -49
- package/dist/workspace.validator.d.ts.map +0 -1
- package/dist/workspace.validator.js +0 -214
- package/dist/workspace.validator.js.map +0 -1
|
@@ -6,6 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
import { display } from '../ui/display.js';
|
|
7
7
|
import { isPlainOutputMode } from '../ui/outputMode.js';
|
|
8
8
|
import { theme } from '../ui/theme.js';
|
|
9
|
+
import { renderDivider } from '../ui/unified/layout.js';
|
|
9
10
|
import { StreamingResponseFormatter } from '../ui/streamingFormatter.js';
|
|
10
11
|
import { getContextWindowTokens } from '../core/contextWindow.js';
|
|
11
12
|
import { ensureSecretForProvider, getSecretDefinitionForProvider, getSecretValue, listSecretDefinitions, maskSecret, setSecretValue, } from '../core/secretStore.js';
|
|
@@ -71,7 +72,7 @@ const BASE_SLASH_COMMANDS = getSlashCommands().map((cmd) => ({
|
|
|
71
72
|
// Load PROVIDER_LABELS from centralized schema
|
|
72
73
|
const PROVIDER_LABELS = Object.fromEntries(getProviders().map((provider) => [provider.id, provider.label]));
|
|
73
74
|
// Allow enough time for paste detection to kick in before flushing buffered lines
|
|
74
|
-
const CONTEXT_USAGE_THRESHOLD = 0.
|
|
75
|
+
const CONTEXT_USAGE_THRESHOLD = 0.97;
|
|
75
76
|
const CONTEXT_AUTOCOMPACT_PERCENT = Math.round(CONTEXT_USAGE_THRESHOLD * 100);
|
|
76
77
|
const CONTEXT_AUTOCOMPACT_FLOOR = 0.6;
|
|
77
78
|
const MIN_COMPACTION_TOKEN_SAVINGS = 200;
|
|
@@ -79,12 +80,11 @@ const MIN_COMPACTION_PERCENT_SAVINGS = 0.5;
|
|
|
79
80
|
const CONTEXT_RECENT_MESSAGE_COUNT = 12;
|
|
80
81
|
const CONTEXT_CLEANUP_CHARS_PER_CHUNK = 6000;
|
|
81
82
|
const CONTEXT_CLEANUP_MAX_OUTPUT_TOKENS = 800;
|
|
82
|
-
const CONTEXT_CLEANUP_SYSTEM_PROMPT = `
|
|
83
|
-
- Merge any prior summary with the new
|
|
84
|
-
- Capture
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- Never call tools or run shell commands; respond with plain Markdown text only.`;
|
|
83
|
+
const CONTEXT_CLEANUP_SYSTEM_PROMPT = `Summarize earlier IDE collaboration so the agent can keep working.
|
|
84
|
+
- Merge any prior summary with the new chunk.
|
|
85
|
+
- Capture decisions, file edits/paths, tool findings, and open questions.
|
|
86
|
+
- Separate finished work from follow-ups; keep it under ~180 words with tight bullets.
|
|
87
|
+
- Respond in plain Markdown only (no tool or shell calls).`;
|
|
88
88
|
export class InteractiveShell {
|
|
89
89
|
agent = null;
|
|
90
90
|
profile;
|
|
@@ -124,6 +124,8 @@ export class InteractiveShell {
|
|
|
124
124
|
latestTokenUsage = { used: null, limit: null };
|
|
125
125
|
planApprovalBridgeRegistered = false;
|
|
126
126
|
contextCompactionInFlight = false;
|
|
127
|
+
contextCompactionLog = [];
|
|
128
|
+
bannerShown = false;
|
|
127
129
|
lastContextWarningLevel = null;
|
|
128
130
|
sessionPreferences;
|
|
129
131
|
autosaveEnabled;
|
|
@@ -163,11 +165,14 @@ export class InteractiveShell {
|
|
|
163
165
|
streamingHeartbeatFrame = 0;
|
|
164
166
|
streamingStatusLabel = null;
|
|
165
167
|
lastStreamingElapsedSeconds = null; // Preserve final elapsed time
|
|
168
|
+
aiRuntimeStart = null;
|
|
169
|
+
aiRuntimeTotalMs = 0;
|
|
166
170
|
streamingFormatter = null;
|
|
167
171
|
statusLineState = null;
|
|
168
172
|
statusMessageOverride = null;
|
|
169
173
|
promptRefreshTimer = null;
|
|
170
174
|
launchPaletteShown = false;
|
|
175
|
+
launchBannerText = null;
|
|
171
176
|
version;
|
|
172
177
|
alternateScreenEnabled;
|
|
173
178
|
constructor(config) {
|
|
@@ -373,7 +378,32 @@ export class InteractiveShell {
|
|
|
373
378
|
display.showInfo(this.sessionResumeNotice);
|
|
374
379
|
this.sessionResumeNotice = null;
|
|
375
380
|
}
|
|
381
|
+
renderWelcomeBanner(force = false) {
|
|
382
|
+
if (isPlainOutputMode() || !output.isTTY) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const header = `${theme.fields.model(this.sessionState.model)} ${theme.ui.muted('@')} ${theme.fields.agent(this.providerLabel(this.sessionState.provider))}`;
|
|
386
|
+
const profileLine = `${theme.fields.profile(this.profileLabel)} ${theme.ui.muted(`(${this.profile})`)}`;
|
|
387
|
+
const workspaceLine = theme.fields.workspace(this.workingDir);
|
|
388
|
+
const versionLine = this.version ? theme.ui.muted(`v${this.version} · support@ero.solar`) : null;
|
|
389
|
+
const hintLine = theme.ui.muted('/help for commands · /model to switch · /secrets for keys');
|
|
390
|
+
const width = output.columns ?? 80;
|
|
391
|
+
const banner = [header, profileLine, workspaceLine, versionLine, hintLine, renderDivider(width)]
|
|
392
|
+
.filter(Boolean)
|
|
393
|
+
.join('\n');
|
|
394
|
+
if (this.bannerShown && !force) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (this.launchBannerText === banner) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
display.stream(`${banner}\n`);
|
|
401
|
+
this.bannerShown = true;
|
|
402
|
+
this.launchBannerText = banner;
|
|
403
|
+
this.requestPromptRefresh(true);
|
|
404
|
+
}
|
|
376
405
|
async start(initialPrompt) {
|
|
406
|
+
this.renderWelcomeBanner();
|
|
377
407
|
if (initialPrompt) {
|
|
378
408
|
await this.processInputBlock(initialPrompt);
|
|
379
409
|
return;
|
|
@@ -583,26 +613,35 @@ export class InteractiveShell {
|
|
|
583
613
|
}
|
|
584
614
|
// Trigger context compaction
|
|
585
615
|
display.showInfo('Compacting context... This will summarize the conversation and free up space.');
|
|
586
|
-
void this.performContextCompaction();
|
|
616
|
+
void this.performContextCompaction('Manual shortcut compaction');
|
|
587
617
|
}
|
|
588
618
|
/**
|
|
589
619
|
* Perform context compaction by summarizing conversation history.
|
|
590
620
|
*/
|
|
591
|
-
async performContextCompaction() {
|
|
621
|
+
async performContextCompaction(reason = 'Manual context compaction') {
|
|
592
622
|
try {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
if (oldLength === 0) {
|
|
597
|
-
display.showInfo('Context is already empty.');
|
|
623
|
+
const agent = this.agent;
|
|
624
|
+
if (!agent) {
|
|
625
|
+
display.showWarning('No active agent to compact context.');
|
|
598
626
|
return;
|
|
599
627
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
628
|
+
const contextManager = agent.getContextManager();
|
|
629
|
+
if (!contextManager) {
|
|
630
|
+
display.showWarning('Context manager unavailable. Try sending a message first.');
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
const history = agent.getHistory();
|
|
634
|
+
if (history.length <= 1) {
|
|
635
|
+
display.showInfo('Context is already minimal.');
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
const stats = contextManager.getStats(history);
|
|
639
|
+
const windowTokens = this.activeContextWindowTokens ?? this.latestTokenUsage.limit ?? null;
|
|
640
|
+
await this.runContextCleanup(windowTokens, stats.totalTokens, {
|
|
641
|
+
reason,
|
|
642
|
+
forced: true,
|
|
643
|
+
source: 'manual',
|
|
644
|
+
});
|
|
606
645
|
}
|
|
607
646
|
catch (error) {
|
|
608
647
|
display.showError('Failed to compact context', error);
|
|
@@ -713,7 +752,8 @@ export class InteractiveShell {
|
|
|
713
752
|
: null;
|
|
714
753
|
// Stop any active spinner to prevent process hang
|
|
715
754
|
display.stopThinking(false);
|
|
716
|
-
this.stopStreamingHeartbeat();
|
|
755
|
+
this.stopStreamingHeartbeat('quit', { quiet: true });
|
|
756
|
+
this.endAiRuntime();
|
|
717
757
|
this.uiUpdates.dispose();
|
|
718
758
|
this.clearPromptRefreshTimer();
|
|
719
759
|
this.teardownStatusTracking();
|
|
@@ -721,8 +761,6 @@ export class InteractiveShell {
|
|
|
721
761
|
setGlobalAIEnhancer(null);
|
|
722
762
|
// Clear any pending cleanup to prevent hanging
|
|
723
763
|
this.pendingCleanup = null;
|
|
724
|
-
// Reset terminal state before disposing adapters
|
|
725
|
-
this.terminalInput.exitStreamingScrollRegion();
|
|
726
764
|
if (this.alternateScreenEnabled) {
|
|
727
765
|
this.terminalInput.exitAlternateScreen();
|
|
728
766
|
}
|
|
@@ -1159,6 +1197,25 @@ export class InteractiveShell {
|
|
|
1159
1197
|
process.stdout.write(content);
|
|
1160
1198
|
}, 'interactiveShell.stdout');
|
|
1161
1199
|
}
|
|
1200
|
+
beginAiRuntime() {
|
|
1201
|
+
if (this.aiRuntimeStart === null) {
|
|
1202
|
+
this.aiRuntimeStart = Date.now();
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
endAiRuntime() {
|
|
1206
|
+
if (this.aiRuntimeStart !== null) {
|
|
1207
|
+
this.aiRuntimeTotalMs += Date.now() - this.aiRuntimeStart;
|
|
1208
|
+
this.aiRuntimeStart = null;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
getAiRuntimeSeconds() {
|
|
1212
|
+
const runningMs = this.aiRuntimeStart ? Date.now() - this.aiRuntimeStart : 0;
|
|
1213
|
+
const totalMs = this.aiRuntimeTotalMs + runningMs;
|
|
1214
|
+
if (totalMs <= 0 && this.aiRuntimeStart === null) {
|
|
1215
|
+
return null;
|
|
1216
|
+
}
|
|
1217
|
+
return Math.max(0, Math.floor(totalMs / 1000));
|
|
1218
|
+
}
|
|
1162
1219
|
/**
|
|
1163
1220
|
* Refresh the status line in the persistent input area.
|
|
1164
1221
|
* Uses combined status display: streaming label + override + main status.
|
|
@@ -1173,20 +1230,7 @@ export class InteractiveShell {
|
|
|
1173
1230
|
const statusText = this.formatStatusLine(this.statusLineState);
|
|
1174
1231
|
this.terminalInput.setStatusMessage(statusText);
|
|
1175
1232
|
// Surface meta header (elapsed + context usage) above the divider
|
|
1176
|
-
|
|
1177
|
-
let elapsedSeconds = null;
|
|
1178
|
-
if (this.streamingHeartbeatStart) {
|
|
1179
|
-
// Actively streaming - compute live elapsed
|
|
1180
|
-
elapsedSeconds = Math.max(0, Math.floor((Date.now() - this.streamingHeartbeatStart) / 1000));
|
|
1181
|
-
}
|
|
1182
|
-
else if (this.lastStreamingElapsedSeconds !== null) {
|
|
1183
|
-
// Just finished streaming - use preserved final time
|
|
1184
|
-
elapsedSeconds = this.lastStreamingElapsedSeconds;
|
|
1185
|
-
}
|
|
1186
|
-
else if (this.statusLineState) {
|
|
1187
|
-
// Fallback to status line state elapsed
|
|
1188
|
-
elapsedSeconds = Math.max(0, Math.floor((Date.now() - this.statusLineState.startedAt) / 1000));
|
|
1189
|
-
}
|
|
1233
|
+
const elapsedSeconds = this.getAiRuntimeSeconds();
|
|
1190
1234
|
const thinkingMs = display.isSpinnerActive() ? display.getThinkingElapsedMs() : null;
|
|
1191
1235
|
const tokensUsed = this.latestTokenUsage.used;
|
|
1192
1236
|
const tokenLimit = this.latestTokenUsage.limit ?? this.activeContextWindowTokens;
|
|
@@ -1280,7 +1324,7 @@ export class InteractiveShell {
|
|
|
1280
1324
|
}
|
|
1281
1325
|
}
|
|
1282
1326
|
startStreamingHeartbeat(label = 'Streaming') {
|
|
1283
|
-
this.stopStreamingHeartbeat();
|
|
1327
|
+
this.stopStreamingHeartbeat('complete', { quiet: true });
|
|
1284
1328
|
// Enter global streaming mode - blocks all non-streaming UI output
|
|
1285
1329
|
enterStreamingMode();
|
|
1286
1330
|
// Set up scroll region for streaming content
|
|
@@ -1318,7 +1362,8 @@ export class InteractiveShell {
|
|
|
1318
1362
|
},
|
|
1319
1363
|
});
|
|
1320
1364
|
}
|
|
1321
|
-
stopStreamingHeartbeat() {
|
|
1365
|
+
stopStreamingHeartbeat(reason = 'complete', options = {}) {
|
|
1366
|
+
const quiet = options.quiet === true;
|
|
1322
1367
|
// Exit global streaming mode - allows UI to render again
|
|
1323
1368
|
exitStreamingMode();
|
|
1324
1369
|
// Preserve final elapsed time before clearing heartbeat start
|
|
@@ -1326,7 +1371,11 @@ export class InteractiveShell {
|
|
|
1326
1371
|
this.lastStreamingElapsedSeconds = Math.max(0, Math.floor((Date.now() - this.streamingHeartbeatStart) / 1000));
|
|
1327
1372
|
}
|
|
1328
1373
|
// Exit scroll region mode
|
|
1329
|
-
|
|
1374
|
+
const exitOptions = {
|
|
1375
|
+
renderPrompt: !quiet,
|
|
1376
|
+
statusMessage: quiet ? null : undefined,
|
|
1377
|
+
};
|
|
1378
|
+
this.terminalInput.exitStreamingScrollRegion(exitOptions);
|
|
1330
1379
|
this.uiUpdates.stopHeartbeat('streaming');
|
|
1331
1380
|
this.streamingHeartbeatStart = null;
|
|
1332
1381
|
this.streamingHeartbeatFrame = 0;
|
|
@@ -1335,8 +1384,15 @@ export class InteractiveShell {
|
|
|
1335
1384
|
this.terminalInput.setStreamingLabel(null);
|
|
1336
1385
|
// Clear streaming status from display
|
|
1337
1386
|
display.updateStreamingStatus(null);
|
|
1387
|
+
// Emit a streaming note for stop/quit so the status stays inside the stream
|
|
1388
|
+
if (reason === 'stop' || reason === 'quit') {
|
|
1389
|
+
const note = reason === 'quit' ? 'Session closed.' : 'Stream stopped.';
|
|
1390
|
+
this.finishStreamingFormatter(note, { refreshPrompt: !quiet });
|
|
1391
|
+
}
|
|
1338
1392
|
// Force refresh to update the input area now that streaming has ended
|
|
1339
|
-
|
|
1393
|
+
if (!quiet) {
|
|
1394
|
+
this.refreshStatusLine(true);
|
|
1395
|
+
}
|
|
1340
1396
|
}
|
|
1341
1397
|
handleStreamChunk(chunk) {
|
|
1342
1398
|
if (!chunk) {
|
|
@@ -1356,7 +1412,7 @@ export class InteractiveShell {
|
|
|
1356
1412
|
this.terminalInput.streamContent(formatted);
|
|
1357
1413
|
}
|
|
1358
1414
|
}
|
|
1359
|
-
finishStreamingFormatter(note) {
|
|
1415
|
+
finishStreamingFormatter(note, options) {
|
|
1360
1416
|
if (!this.streamingFormatter) {
|
|
1361
1417
|
return;
|
|
1362
1418
|
}
|
|
@@ -1365,6 +1421,10 @@ export class InteractiveShell {
|
|
|
1365
1421
|
this.terminalInput.streamContent(closing);
|
|
1366
1422
|
}
|
|
1367
1423
|
this.streamingFormatter = null;
|
|
1424
|
+
// Force the prompt to re-render after streaming so it stays below the last response
|
|
1425
|
+
if (options?.refreshPrompt ?? true) {
|
|
1426
|
+
this.requestPromptRefresh(true);
|
|
1427
|
+
}
|
|
1368
1428
|
}
|
|
1369
1429
|
buildStreamingStatus(label, _elapsedSeconds) {
|
|
1370
1430
|
// Model + elapsed time already live in the pinned meta header; keep the streaming
|
|
@@ -1678,7 +1738,7 @@ export class InteractiveShell {
|
|
|
1678
1738
|
this.handleCostCommand();
|
|
1679
1739
|
break;
|
|
1680
1740
|
case '/usage':
|
|
1681
|
-
this.handleUsageCommand();
|
|
1741
|
+
this.handleUsageCommand(input);
|
|
1682
1742
|
break;
|
|
1683
1743
|
case '/clear':
|
|
1684
1744
|
this.handleClearCommand();
|
|
@@ -3465,7 +3525,13 @@ export class InteractiveShell {
|
|
|
3465
3525
|
lines.push(theme.ui.muted('Token usage is tracked automatically during the session.'));
|
|
3466
3526
|
display.showSystemMessage(lines.join('\n'));
|
|
3467
3527
|
}
|
|
3468
|
-
handleUsageCommand() {
|
|
3528
|
+
handleUsageCommand(input) {
|
|
3529
|
+
const tokens = input ? input.trim().split(/\s+/) : [];
|
|
3530
|
+
const subcommand = tokens[1]?.toLowerCase();
|
|
3531
|
+
if (subcommand === 'history' || subcommand === 'log') {
|
|
3532
|
+
this.showCompactionHistory();
|
|
3533
|
+
return;
|
|
3534
|
+
}
|
|
3469
3535
|
const percentage = this.latestTokenUsage.limit && this.latestTokenUsage.used
|
|
3470
3536
|
? Math.round((this.latestTokenUsage.used / this.latestTokenUsage.limit) * 100)
|
|
3471
3537
|
: 0;
|
|
@@ -3486,6 +3552,37 @@ export class InteractiveShell {
|
|
|
3486
3552
|
else {
|
|
3487
3553
|
lines.push(theme.success('Plenty of context available.'));
|
|
3488
3554
|
}
|
|
3555
|
+
if (this.contextCompactionLog.length > 0) {
|
|
3556
|
+
lines.push('');
|
|
3557
|
+
lines.push(theme.secondary('Tip: /usage history shows recent context compactions.'));
|
|
3558
|
+
}
|
|
3559
|
+
display.showSystemMessage(lines.join('\n'));
|
|
3560
|
+
}
|
|
3561
|
+
showCompactionHistory() {
|
|
3562
|
+
if (!this.contextCompactionLog.length) {
|
|
3563
|
+
display.showInfo('No context compactions recorded yet.');
|
|
3564
|
+
return;
|
|
3565
|
+
}
|
|
3566
|
+
const entries = [...this.contextCompactionLog].slice(-10).reverse();
|
|
3567
|
+
const lines = [];
|
|
3568
|
+
lines.push(theme.bold('Context Compaction History'));
|
|
3569
|
+
lines.push('');
|
|
3570
|
+
for (const entry of entries) {
|
|
3571
|
+
const time = new Date(entry.timestamp).toLocaleTimeString();
|
|
3572
|
+
const reason = entry.reason || (entry.source === 'auto' ? 'Auto-compaction' : 'Manual compaction');
|
|
3573
|
+
const before = entry.beforeTokens.toLocaleString('en-US');
|
|
3574
|
+
const after = entry.afterTokens.toLocaleString('en-US');
|
|
3575
|
+
const saved = Math.max(0, entry.beforeTokens - entry.afterTokens);
|
|
3576
|
+
const savedLabel = saved > 0 ? `${saved.toLocaleString('en-US')} saved` : 'no savings';
|
|
3577
|
+
const pctBefore = entry.percentBefore ?? null;
|
|
3578
|
+
const pctAfter = entry.percentAfter ?? null;
|
|
3579
|
+
const pctLabel = pctBefore !== null && pctAfter !== null
|
|
3580
|
+
? `(${pctBefore}% → ${pctAfter}%)`
|
|
3581
|
+
: '';
|
|
3582
|
+
const summaryNote = entry.summarized ? 'summary applied' : 'prune only';
|
|
3583
|
+
lines.push(` ${time} · ${reason} [${entry.source} · ${entry.model}]`);
|
|
3584
|
+
lines.push(` ${before} → ${after} tokens ${pctLabel} · ${savedLabel} · ${summaryNote}`);
|
|
3585
|
+
}
|
|
3489
3586
|
display.showSystemMessage(lines.join('\n'));
|
|
3490
3587
|
}
|
|
3491
3588
|
handleClearCommand() {
|
|
@@ -3622,13 +3719,7 @@ export class InteractiveShell {
|
|
|
3622
3719
|
return;
|
|
3623
3720
|
}
|
|
3624
3721
|
display.showInfo('Compacting conversation context...');
|
|
3625
|
-
|
|
3626
|
-
const { used, limit } = this.latestTokenUsage;
|
|
3627
|
-
if (used && limit && used / limit < 0.5) {
|
|
3628
|
-
display.showInfo('Context usage is low. No compaction needed.');
|
|
3629
|
-
return;
|
|
3630
|
-
}
|
|
3631
|
-
await this.processRequest('Please summarize our conversation so far in a concise way, preserving key decisions, code changes, and next steps. This will help compact the context.');
|
|
3722
|
+
await this.performContextCompaction('Manual /compact request');
|
|
3632
3723
|
}
|
|
3633
3724
|
// ==================== End Claude Code Style Commands ====================
|
|
3634
3725
|
updateActiveSession(summary, remember = false) {
|
|
@@ -4570,12 +4661,13 @@ export class InteractiveShell {
|
|
|
4570
4661
|
this.currentToolCalls = [];
|
|
4571
4662
|
this.uiAdapter.startProcessing('Working on your request');
|
|
4572
4663
|
this.setProcessingStatus();
|
|
4664
|
+
this.beginAiRuntime();
|
|
4573
4665
|
let responseText = '';
|
|
4574
4666
|
try {
|
|
4575
4667
|
// Start streaming - no header needed, the input area already provides context
|
|
4576
4668
|
this.startStreamingHeartbeat('Streaming response');
|
|
4577
4669
|
responseText = await agent.send(request, true);
|
|
4578
|
-
this.finishStreamingFormatter();
|
|
4670
|
+
this.finishStreamingFormatter(undefined, { refreshPrompt: false });
|
|
4579
4671
|
await this.awaitPendingCleanup();
|
|
4580
4672
|
this.captureHistorySnapshot();
|
|
4581
4673
|
this.autosaveIfEnabled();
|
|
@@ -4631,10 +4723,11 @@ export class InteractiveShell {
|
|
|
4631
4723
|
}
|
|
4632
4724
|
}
|
|
4633
4725
|
finally {
|
|
4634
|
-
this.finishStreamingFormatter();
|
|
4726
|
+
this.finishStreamingFormatter(undefined, { refreshPrompt: false });
|
|
4635
4727
|
display.stopThinking(false);
|
|
4636
4728
|
this.uiUpdates.setMode('processing');
|
|
4637
|
-
this.stopStreamingHeartbeat();
|
|
4729
|
+
this.stopStreamingHeartbeat('complete', { quiet: true });
|
|
4730
|
+
this.endAiRuntime();
|
|
4638
4731
|
this.isProcessing = false;
|
|
4639
4732
|
this.terminalInput.setStreaming(false);
|
|
4640
4733
|
this.uiAdapter.endProcessing('Ready for prompts');
|
|
@@ -4645,7 +4738,6 @@ export class InteractiveShell {
|
|
|
4645
4738
|
// CRITICAL: Ensure readline prompt is active for user input
|
|
4646
4739
|
// Claude Code style: New prompt naturally appears at bottom
|
|
4647
4740
|
this.ensureReadlineReady();
|
|
4648
|
-
this.terminalInput.render();
|
|
4649
4741
|
this.scheduleQueueProcessing();
|
|
4650
4742
|
this.refreshQueueIndicators();
|
|
4651
4743
|
}
|
|
@@ -4690,6 +4782,7 @@ export class InteractiveShell {
|
|
|
4690
4782
|
display.showSystemMessage(`Continuous mode active. Ctrl+C to stop.`);
|
|
4691
4783
|
this.uiAdapter.startProcessing('Continuous execution mode');
|
|
4692
4784
|
this.setProcessingStatus();
|
|
4785
|
+
this.beginAiRuntime();
|
|
4693
4786
|
// No streaming header - just start streaming directly
|
|
4694
4787
|
this.startStreamingHeartbeat('Streaming');
|
|
4695
4788
|
let iteration = 0;
|
|
@@ -4723,7 +4816,7 @@ When truly finished with ALL tasks, explicitly state "TASK_FULLY_COMPLETE".`;
|
|
|
4723
4816
|
display.showThinking('Responding...');
|
|
4724
4817
|
this.refreshStatusLine(true);
|
|
4725
4818
|
const response = await agent.send(currentPrompt, true);
|
|
4726
|
-
this.finishStreamingFormatter();
|
|
4819
|
+
this.finishStreamingFormatter(undefined, { refreshPrompt: false });
|
|
4727
4820
|
await this.awaitPendingCleanup();
|
|
4728
4821
|
this.captureHistorySnapshot();
|
|
4729
4822
|
this.autosaveIfEnabled();
|
|
@@ -4856,7 +4949,7 @@ What's the next action?`;
|
|
|
4856
4949
|
}
|
|
4857
4950
|
}
|
|
4858
4951
|
finally {
|
|
4859
|
-
this.finishStreamingFormatter();
|
|
4952
|
+
this.finishStreamingFormatter(undefined, { refreshPrompt: false });
|
|
4860
4953
|
const totalElapsed = Date.now() - overallStartTime;
|
|
4861
4954
|
const minutes = Math.floor(totalElapsed / 60000);
|
|
4862
4955
|
const seconds = Math.floor((totalElapsed % 60000) / 1000);
|
|
@@ -4864,7 +4957,8 @@ What's the next action?`;
|
|
|
4864
4957
|
// Reset completion detector for next task
|
|
4865
4958
|
resetTaskCompletionDetector();
|
|
4866
4959
|
this.uiUpdates.setMode('processing');
|
|
4867
|
-
this.stopStreamingHeartbeat();
|
|
4960
|
+
this.stopStreamingHeartbeat('complete', { quiet: true });
|
|
4961
|
+
this.endAiRuntime();
|
|
4868
4962
|
this.isProcessing = false;
|
|
4869
4963
|
this.terminalInput.setStreaming(false);
|
|
4870
4964
|
this.uiAdapter.endProcessing('Ready for prompts');
|
|
@@ -5421,6 +5515,7 @@ Return ONLY JSON array:
|
|
|
5421
5515
|
try {
|
|
5422
5516
|
ensureSecretForProvider(this.sessionState.provider);
|
|
5423
5517
|
this.runtimeSession.updateToolContext(this.sessionState);
|
|
5518
|
+
this.ensureActiveSummarizer(this.runtimeSession.contextManager);
|
|
5424
5519
|
const selection = {
|
|
5425
5520
|
provider: this.sessionState.provider,
|
|
5426
5521
|
model: this.sessionState.model,
|
|
@@ -5532,10 +5627,9 @@ Return ONLY JSON array:
|
|
|
5532
5627
|
// Update UI to show operation was cancelled
|
|
5533
5628
|
display.showWarning('Operation cancelled.');
|
|
5534
5629
|
this.uiUpdates.setMode('processing');
|
|
5535
|
-
this.stopStreamingHeartbeat();
|
|
5630
|
+
this.stopStreamingHeartbeat('stop', { quiet: true });
|
|
5536
5631
|
this.updateStatusMessage(null);
|
|
5537
5632
|
this.terminalInput.setStreaming(false);
|
|
5538
|
-
this.terminalInput.render();
|
|
5539
5633
|
},
|
|
5540
5634
|
onVerificationNeeded: (response, context) => {
|
|
5541
5635
|
this.lastAssistantResponse = response;
|
|
@@ -5571,9 +5665,9 @@ Return ONLY JSON array:
|
|
|
5571
5665
|
* Ensures the input area is visible and ready for input, just like on startup.
|
|
5572
5666
|
*/
|
|
5573
5667
|
resetChatBoxAfterModelSwap() {
|
|
5668
|
+
this.renderWelcomeBanner(true);
|
|
5574
5669
|
this.updateStatusMessage(null);
|
|
5575
5670
|
this.terminalInput.setStreaming(false);
|
|
5576
|
-
this.terminalInput.render();
|
|
5577
5671
|
this.ensureReadlineReady();
|
|
5578
5672
|
}
|
|
5579
5673
|
/**
|
|
@@ -5686,7 +5780,7 @@ Return ONLY JSON array:
|
|
|
5686
5780
|
if (!trigger) {
|
|
5687
5781
|
return null;
|
|
5688
5782
|
}
|
|
5689
|
-
return this.runContextCleanup(windowTokens, total, trigger);
|
|
5783
|
+
return this.runContextCleanup(windowTokens, total, { ...trigger, source: 'auto' });
|
|
5690
5784
|
}
|
|
5691
5785
|
totalTokens(usage) {
|
|
5692
5786
|
if (!usage) {
|
|
@@ -5713,58 +5807,104 @@ Return ONLY JSON array:
|
|
|
5713
5807
|
if (history.length <= 1) {
|
|
5714
5808
|
return;
|
|
5715
5809
|
}
|
|
5810
|
+
if (!this.areToolTurnsComplete(history)) {
|
|
5811
|
+
display.showInfo('Context compaction postponed until all tool calls have returned results.');
|
|
5812
|
+
return;
|
|
5813
|
+
}
|
|
5814
|
+
this.ensureActiveSummarizer(contextManager);
|
|
5716
5815
|
this.cleanupInProgress = true;
|
|
5717
5816
|
this.contextCompactionInFlight = true;
|
|
5718
5817
|
const cleanupStatusId = 'context-cleanup';
|
|
5719
5818
|
let cleanupOverlayActive = false;
|
|
5720
5819
|
try {
|
|
5721
|
-
const
|
|
5722
|
-
const
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5820
|
+
const beforeStats = contextManager.getStats(history);
|
|
5821
|
+
const resolvedWindowTokens = windowTokens ?? this.activeContextWindowTokens ?? this.latestTokenUsage.limit ?? null;
|
|
5822
|
+
const resolvedTotalTokens = totalTokens ?? beforeStats.totalTokens;
|
|
5823
|
+
const percentUsed = resolvedWindowTokens && resolvedWindowTokens > 0
|
|
5824
|
+
? Math.min(100, Math.round((resolvedTotalTokens / resolvedWindowTokens) * 100))
|
|
5825
|
+
: beforeStats.percentage;
|
|
5826
|
+
const statusDetailParts = [
|
|
5827
|
+
`${percentUsed}% full`,
|
|
5828
|
+
trigger?.reason,
|
|
5829
|
+
].filter(Boolean);
|
|
5726
5830
|
this.statusTracker.pushOverride(cleanupStatusId, 'Running context cleanup', {
|
|
5727
5831
|
detail: statusDetailParts.join(' · '),
|
|
5728
5832
|
tone: 'warning',
|
|
5729
5833
|
});
|
|
5730
5834
|
cleanupOverlayActive = true;
|
|
5731
5835
|
const triggerReason = trigger?.reason ?? 'Context optimization';
|
|
5836
|
+
const limitLabel = resolvedWindowTokens
|
|
5837
|
+
? `of ${resolvedWindowTokens.toLocaleString('en-US')} tokens`
|
|
5838
|
+
: 'of estimated context';
|
|
5732
5839
|
display.showSystemMessage([
|
|
5733
|
-
`Context usage: ${
|
|
5840
|
+
`Context usage: ${resolvedTotalTokens.toLocaleString('en-US')} ${limitLabel}`,
|
|
5734
5841
|
`(${percentUsed}% full). Auto-compacting${triggerReason ? `: ${triggerReason}` : '...'}`,
|
|
5735
5842
|
].join(' '));
|
|
5736
|
-
const beforeStats = contextManager.getStats(history);
|
|
5737
5843
|
const result = await contextManager.intelligentCompact(history);
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
const
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5844
|
+
let afterStats = contextManager.getStats(result.compacted);
|
|
5845
|
+
let appliedHistory = result.compacted;
|
|
5846
|
+
let appliedSummarized = result.summarized;
|
|
5847
|
+
const initialTokenSavings = Math.max(0, beforeStats.totalTokens - afterStats.totalTokens);
|
|
5848
|
+
let bestTokenSavings = initialTokenSavings;
|
|
5849
|
+
let bestPercentSavings = beforeStats.totalTokens > 0 ? (initialTokenSavings / beforeStats.totalTokens) * 100 : 0;
|
|
5850
|
+
let changed = this.historiesDiffer(history, appliedHistory);
|
|
5851
|
+
if (!this.hasMeaningfulCompaction(changed, bestTokenSavings, bestPercentSavings, trigger?.forced)) {
|
|
5852
|
+
const fallback = await contextManager.pruneMessagesWithSummary(history, { force: true });
|
|
5853
|
+
const fallbackStats = contextManager.getStats(fallback.pruned);
|
|
5854
|
+
const fallbackTokenSavings = Math.max(0, beforeStats.totalTokens - fallbackStats.totalTokens);
|
|
5855
|
+
const fallbackPercentSavings = beforeStats.totalTokens > 0
|
|
5856
|
+
? (fallbackTokenSavings / beforeStats.totalTokens) * 100
|
|
5857
|
+
: 0;
|
|
5858
|
+
if (this.historiesDiffer(history, fallback.pruned) &&
|
|
5859
|
+
(fallbackTokenSavings > bestTokenSavings || !changed)) {
|
|
5860
|
+
appliedHistory = fallback.pruned;
|
|
5861
|
+
afterStats = fallbackStats;
|
|
5862
|
+
appliedSummarized = fallback.summarized;
|
|
5863
|
+
bestTokenSavings = fallbackTokenSavings;
|
|
5864
|
+
bestPercentSavings = fallbackPercentSavings;
|
|
5865
|
+
changed = true;
|
|
5747
5866
|
}
|
|
5867
|
+
}
|
|
5868
|
+
if (!changed) {
|
|
5869
|
+
display.showInfo('Context compaction completed but no changes were applied.');
|
|
5748
5870
|
return;
|
|
5749
5871
|
}
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5872
|
+
if (!this.hasMeaningfulCompaction(changed, bestTokenSavings, bestPercentSavings, trigger?.forced)) {
|
|
5873
|
+
display.showInfo('Auto-compaction completed but did not meaningfully reduce context size. Keeping existing history.');
|
|
5874
|
+
return;
|
|
5875
|
+
}
|
|
5876
|
+
agent.loadHistory(appliedHistory);
|
|
5877
|
+
this.cachedHistory = appliedHistory;
|
|
5878
|
+
const newPercentUsed = resolvedWindowTokens && resolvedWindowTokens > 0
|
|
5879
|
+
? Math.min(100, Math.round((afterStats.totalTokens / resolvedWindowTokens) * 100))
|
|
5754
5880
|
: afterStats.percentage;
|
|
5755
5881
|
this.latestTokenUsage = {
|
|
5756
5882
|
used: afterStats.totalTokens,
|
|
5757
|
-
limit:
|
|
5883
|
+
limit: resolvedWindowTokens,
|
|
5758
5884
|
};
|
|
5759
5885
|
this.updateContextUsage(newPercentUsed, CONTEXT_AUTOCOMPACT_PERCENT);
|
|
5760
5886
|
this.lastContextWarningLevel = this.getContextWarningLevel(newPercentUsed);
|
|
5761
5887
|
this.refreshStatusLine(true);
|
|
5762
5888
|
const primarySignal = result.analysis.signals[0]?.reason ?? triggerReason;
|
|
5889
|
+
const savingsLabel = bestTokenSavings > 0
|
|
5890
|
+
? `(saved ~${bestTokenSavings.toLocaleString('en-US')} tokens, ~${bestPercentSavings.toFixed(1)}%)`
|
|
5891
|
+
: '(no token savings)';
|
|
5763
5892
|
display.showSystemMessage([
|
|
5764
5893
|
`Context compacted: ${beforeStats.percentage}% → ${afterStats.percentage}%`,
|
|
5765
|
-
|
|
5894
|
+
savingsLabel,
|
|
5766
5895
|
primarySignal ? `Reason: ${primarySignal}.` : '',
|
|
5767
5896
|
].filter(Boolean).join(' '));
|
|
5897
|
+
this.recordContextCompaction({
|
|
5898
|
+
timestamp: Date.now(),
|
|
5899
|
+
source: trigger?.source ?? 'auto',
|
|
5900
|
+
reason: triggerReason,
|
|
5901
|
+
beforeTokens: beforeStats.totalTokens,
|
|
5902
|
+
afterTokens: afterStats.totalTokens,
|
|
5903
|
+
summarized: appliedSummarized,
|
|
5904
|
+
percentBefore: resolvedWindowTokens ? percentUsed : beforeStats.percentage,
|
|
5905
|
+
percentAfter: newPercentUsed,
|
|
5906
|
+
model: this.sessionState.model,
|
|
5907
|
+
});
|
|
5768
5908
|
}
|
|
5769
5909
|
catch (error) {
|
|
5770
5910
|
display.showError('Context compaction failed.', error);
|
|
@@ -5777,7 +5917,35 @@ Return ONLY JSON array:
|
|
|
5777
5917
|
this.contextCompactionInFlight = false;
|
|
5778
5918
|
}
|
|
5779
5919
|
}
|
|
5780
|
-
|
|
5920
|
+
recordContextCompaction(event) {
|
|
5921
|
+
this.contextCompactionLog.push(event);
|
|
5922
|
+
if (this.contextCompactionLog.length > 20) {
|
|
5923
|
+
this.contextCompactionLog.shift();
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
ensureActiveSummarizer(contextManager) {
|
|
5927
|
+
if (!contextManager?.updateConfig) {
|
|
5928
|
+
return;
|
|
5929
|
+
}
|
|
5930
|
+
const summarizer = async (messages) => {
|
|
5931
|
+
const summary = await this.buildContextSummary(messages);
|
|
5932
|
+
return summary ?? '[No content to summarize]';
|
|
5933
|
+
};
|
|
5934
|
+
contextManager.updateConfig({
|
|
5935
|
+
summarizationCallback: summarizer,
|
|
5936
|
+
useLLMSummarization: true,
|
|
5937
|
+
});
|
|
5938
|
+
}
|
|
5939
|
+
hasMeaningfulCompaction(changed, tokenSavings, percentSavings, forced) {
|
|
5940
|
+
if (!changed) {
|
|
5941
|
+
return false;
|
|
5942
|
+
}
|
|
5943
|
+
if (tokenSavings >= MIN_COMPACTION_TOKEN_SAVINGS || percentSavings >= MIN_COMPACTION_PERCENT_SAVINGS) {
|
|
5944
|
+
return true;
|
|
5945
|
+
}
|
|
5946
|
+
return Boolean(forced && tokenSavings > 0);
|
|
5947
|
+
}
|
|
5948
|
+
shouldAutoCompactContext(usageRatio, _windowTokens, _totalTokens) {
|
|
5781
5949
|
const featureFlags = loadFeatureFlags();
|
|
5782
5950
|
if (featureFlags.autoCompact === false) {
|
|
5783
5951
|
return null;
|
|
@@ -5898,6 +6066,25 @@ Return ONLY JSON array:
|
|
|
5898
6066
|
}
|
|
5899
6067
|
return false;
|
|
5900
6068
|
}
|
|
6069
|
+
areToolTurnsComplete(messages) {
|
|
6070
|
+
const pending = new Set();
|
|
6071
|
+
for (const message of messages) {
|
|
6072
|
+
if (message.role === 'assistant' && message.toolCalls && message.toolCalls.length > 0) {
|
|
6073
|
+
for (const call of message.toolCalls) {
|
|
6074
|
+
if (call.id) {
|
|
6075
|
+
pending.add(call.id);
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
if (message.role === 'tool') {
|
|
6080
|
+
const toolCallId = message.toolCallId;
|
|
6081
|
+
if (toolCallId && pending.has(toolCallId)) {
|
|
6082
|
+
pending.delete(toolCallId);
|
|
6083
|
+
}
|
|
6084
|
+
}
|
|
6085
|
+
}
|
|
6086
|
+
return pending.size === 0;
|
|
6087
|
+
}
|
|
5901
6088
|
partitionHistory(history) {
|
|
5902
6089
|
const system = [];
|
|
5903
6090
|
const conversation = [];
|
|
@@ -5989,10 +6176,10 @@ Return ONLY JSON array:
|
|
|
5989
6176
|
sections.push(`Conversation chunk:\n${chunk}`);
|
|
5990
6177
|
sections.push([
|
|
5991
6178
|
'Instructions:',
|
|
5992
|
-
'- Merge
|
|
5993
|
-
'-
|
|
5994
|
-
'-
|
|
5995
|
-
'-
|
|
6179
|
+
'- Merge with the running summary.',
|
|
6180
|
+
'- Keep TODOs/bugs/test gaps and file references.',
|
|
6181
|
+
'- Mark what is done vs. pending.',
|
|
6182
|
+
'- Stay concise (<180 words) with short bullets.',
|
|
5996
6183
|
].join('\n'));
|
|
5997
6184
|
return sections.join('\n\n');
|
|
5998
6185
|
}
|