erosolar-cli 1.5.3 ā 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/security-deployment.json +54 -0
- package/dist/active-stack-security.d.ts +110 -0
- package/dist/active-stack-security.js +313 -0
- package/dist/active-stack-security.js.map +1 -0
- package/dist/advanced-targeting.d.ts +113 -0
- package/dist/advanced-targeting.js +252 -0
- package/dist/advanced-targeting.js.map +1 -0
- package/dist/bin/adapters/node/index.js +33 -0
- package/dist/bin/adapters/types.js +1 -0
- package/dist/bin/alpha-zero/agentWrapper.js +165 -0
- package/dist/bin/alpha-zero/codeEvaluator.js +272 -0
- package/dist/bin/alpha-zero/competitiveRunner.js +219 -0
- package/dist/bin/alpha-zero/index.js +98 -0
- package/dist/bin/alpha-zero/introspection.js +298 -0
- package/dist/bin/alpha-zero/metricsTracker.js +207 -0
- package/dist/bin/alpha-zero/security/core.js +269 -0
- package/dist/bin/alpha-zero/security/google.js +308 -0
- package/dist/bin/alpha-zero/security/googleLoader.js +40 -0
- package/dist/bin/alpha-zero/security/index.js +31 -0
- package/dist/bin/alpha-zero/security/simulation.js +274 -0
- package/dist/bin/alpha-zero/selfModification.js +231 -0
- package/dist/bin/alpha-zero/types.js +30 -0
- package/dist/bin/bin/erosolar-optimized.js +205 -0
- package/dist/bin/capabilities/agentSpawningCapability.js +116 -0
- package/dist/bin/capabilities/bashCapability.js +22 -0
- package/dist/bin/capabilities/cloudCapability.js +36 -0
- package/dist/bin/capabilities/codeAnalysisCapability.js +22 -0
- package/dist/bin/capabilities/codeQualityCapability.js +23 -0
- package/dist/bin/capabilities/dependencySecurityCapability.js +22 -0
- package/dist/bin/capabilities/devCapability.js +22 -0
- package/dist/bin/capabilities/editCapability.js +28 -0
- package/dist/bin/capabilities/emailCapability.js +20 -0
- package/dist/bin/capabilities/enhancedGitCapability.js +221 -0
- package/dist/bin/capabilities/filesystemCapability.js +22 -0
- package/dist/bin/capabilities/globCapability.js +28 -0
- package/dist/bin/capabilities/interactionCapability.js +20 -0
- package/dist/bin/capabilities/learnCapability.js +22 -0
- package/dist/bin/capabilities/mcpCapability.js +20 -0
- package/dist/bin/capabilities/notebookCapability.js +28 -0
- package/dist/bin/capabilities/planningCapability.js +27 -0
- package/dist/bin/capabilities/refactoringCapability.js +23 -0
- package/dist/bin/capabilities/repoChecksCapability.js +22 -0
- package/dist/bin/capabilities/searchCapability.js +22 -0
- package/dist/bin/capabilities/skillCapability.js +76 -0
- package/dist/bin/capabilities/taskManagementCapability.js +20 -0
- package/dist/bin/capabilities/testingCapability.js +23 -0
- package/dist/bin/capabilities/toolManifest.js +159 -0
- package/dist/bin/capabilities/toolRegistry.js +114 -0
- package/dist/bin/capabilities/webCapability.js +20 -0
- package/dist/bin/config.js +139 -0
- package/dist/bin/contracts/v1/agent.js +7 -0
- package/dist/bin/contracts/v1/agentProfileManifest.js +8 -0
- package/dist/bin/contracts/v1/agentRules.js +9 -0
- package/dist/bin/contracts/v1/toolAccess.js +8 -0
- package/dist/bin/core/agent.js +362 -0
- package/dist/bin/core/agentProfileManifest.js +187 -0
- package/dist/bin/core/agentProfiles.js +34 -0
- package/dist/bin/core/agentRulebook.js +135 -0
- package/dist/bin/core/agentSchemaLoader.js +233 -0
- package/dist/bin/core/contextManager.js +412 -0
- package/dist/bin/core/contextWindow.js +122 -0
- package/dist/bin/core/customCommands.js +80 -0
- package/dist/bin/core/errors/apiKeyErrors.js +114 -0
- package/dist/bin/core/errors/errorTypes.js +340 -0
- package/dist/bin/core/errors/safetyValidator.js +304 -0
- package/dist/bin/core/errors.js +32 -0
- package/dist/bin/core/modelDiscovery.js +755 -0
- package/dist/bin/core/preferences.js +224 -0
- package/dist/bin/core/schemaValidator.js +92 -0
- package/dist/bin/core/secretStore.js +199 -0
- package/dist/bin/core/sessionStore.js +187 -0
- package/dist/bin/core/toolRuntime.js +290 -0
- package/dist/bin/core/types.js +1 -0
- package/dist/bin/erosolar-optimized.d.ts +12 -0
- package/dist/bin/erosolar-optimized.d.ts.map +1 -0
- package/dist/bin/erosolar-optimized.js +239 -0
- package/dist/bin/erosolar-optimized.js.map +1 -0
- package/dist/bin/erosolar.js +14 -0
- package/dist/bin/erosolar.js.map +1 -1
- package/dist/bin/headless/headlessApp.js +172 -0
- package/dist/bin/mcp/config.js +202 -0
- package/dist/bin/mcp/stdioClient.js +172 -0
- package/dist/bin/mcp/toolBridge.js +104 -0
- package/dist/bin/mcp/types.js +1 -0
- package/dist/bin/plugins/index.js +113 -0
- package/dist/bin/plugins/providers/anthropic/index.js +25 -0
- package/dist/bin/plugins/providers/deepseek/index.js +24 -0
- package/dist/bin/plugins/providers/google/index.js +26 -0
- package/dist/bin/plugins/providers/index.js +19 -0
- package/dist/bin/plugins/providers/ollama/index.js +59 -0
- package/dist/bin/plugins/providers/openai/index.js +26 -0
- package/dist/bin/plugins/providers/xai/index.js +24 -0
- package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +8 -0
- package/dist/bin/plugins/tools/bash/localBashPlugin.js +13 -0
- package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +13 -0
- package/dist/bin/plugins/tools/cloud/cloudPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +13 -0
- package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +13 -0
- package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +11 -0
- package/dist/bin/plugins/tools/development/devPlugin.js +13 -0
- package/dist/bin/plugins/tools/edit/editPlugin.js +14 -0
- package/dist/bin/plugins/tools/email/emailPlugin.js +11 -0
- package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +8 -0
- package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +13 -0
- package/dist/bin/plugins/tools/glob/globPlugin.js +14 -0
- package/dist/bin/plugins/tools/index.js +2 -0
- package/dist/bin/plugins/tools/interaction/interactionPlugin.js +11 -0
- package/dist/bin/plugins/tools/learn/learnPlugin.js +13 -0
- package/dist/bin/plugins/tools/mcp/mcpPlugin.js +8 -0
- package/dist/bin/plugins/tools/nodeDefaults.js +56 -0
- package/dist/bin/plugins/tools/notebook/notebookPlugin.js +14 -0
- package/dist/bin/plugins/tools/planning/planningPlugin.js +14 -0
- package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +11 -0
- package/dist/bin/plugins/tools/registry.js +57 -0
- package/dist/bin/plugins/tools/search/localSearchPlugin.js +13 -0
- package/dist/bin/plugins/tools/skills/skillPlugin.js +8 -0
- package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +11 -0
- package/dist/bin/plugins/tools/testing/testingPlugin.js +11 -0
- package/dist/bin/plugins/tools/web/webPlugin.js +11 -0
- package/dist/bin/providers/anthropicProvider.js +329 -0
- package/dist/bin/providers/googleProvider.js +203 -0
- package/dist/bin/providers/openaiChatCompletionsProvider.js +208 -0
- package/dist/bin/providers/openaiResponsesProvider.js +249 -0
- package/dist/bin/providers/providerFactory.js +24 -0
- package/dist/bin/runtime/agentController.js +321 -0
- package/dist/bin/runtime/agentHost.js +153 -0
- package/dist/bin/runtime/agentSession.js +195 -0
- package/dist/bin/runtime/node.js +10 -0
- package/dist/bin/runtime/universal.js +28 -0
- package/dist/bin/shell/bracketedPasteManager.js +350 -0
- package/dist/bin/shell/fileChangeTracker.js +65 -0
- package/dist/bin/shell/interactiveShell.js +2908 -0
- package/dist/bin/shell/liveStatus.js +78 -0
- package/dist/bin/shell/shellApp.js +290 -0
- package/dist/bin/shell/systemPrompt.js +60 -0
- package/dist/bin/shell/updateManager.js +108 -0
- package/dist/bin/skills/skillRepository.js +236 -0
- package/dist/bin/skills/types.js +1 -0
- package/dist/bin/subagents/taskRunner.js +269 -0
- package/dist/bin/tools/backgroundBashTools.js +211 -0
- package/dist/bin/tools/bashTools.js +159 -0
- package/dist/bin/tools/cloudTools.js +864 -0
- package/dist/bin/tools/codeAnalysisTools.js +641 -0
- package/dist/bin/tools/codeQualityTools.js +294 -0
- package/dist/bin/tools/dependencyTools.js +282 -0
- package/dist/bin/tools/devTools.js +238 -0
- package/dist/bin/tools/diffUtils.js +137 -0
- package/dist/bin/tools/editTools.js +134 -0
- package/dist/bin/tools/emailTools.js +448 -0
- package/dist/bin/tools/fileTools.js +282 -0
- package/dist/bin/tools/globTools.js +173 -0
- package/dist/bin/tools/grepTools.js +332 -0
- package/dist/bin/tools/interactionTools.js +170 -0
- package/dist/bin/tools/learnTools.js +1818 -0
- package/dist/bin/tools/notebookEditTools.js +196 -0
- package/dist/bin/tools/planningTools.js +46 -0
- package/dist/bin/tools/refactoringTools.js +293 -0
- package/dist/bin/tools/repoChecksTools.js +160 -0
- package/dist/bin/tools/searchTools.js +206 -0
- package/dist/bin/tools/skillTools.js +177 -0
- package/dist/bin/tools/taskManagementTools.js +156 -0
- package/dist/bin/tools/testingTools.js +232 -0
- package/dist/bin/tools/webTools.js +480 -0
- package/dist/bin/ui/ShellUIAdapter.js +459 -0
- package/dist/bin/ui/UnifiedUIController.js +183 -0
- package/dist/bin/ui/animation/AnimationScheduler.js +430 -0
- package/dist/bin/ui/codeHighlighter.js +854 -0
- package/dist/bin/ui/designSystem.js +121 -0
- package/dist/bin/ui/display.js +1222 -0
- package/dist/bin/ui/interrupts/InterruptManager.js +437 -0
- package/dist/bin/ui/layout.js +139 -0
- package/dist/bin/ui/orchestration/StatusOrchestrator.js +403 -0
- package/dist/bin/ui/outputMode.js +38 -0
- package/dist/bin/ui/persistentPrompt.js +183 -0
- package/dist/bin/ui/richText.js +338 -0
- package/dist/bin/ui/shortcutsHelp.js +87 -0
- package/dist/bin/ui/telemetry/UITelemetry.js +443 -0
- package/dist/bin/ui/textHighlighter.js +210 -0
- package/dist/bin/ui/theme.js +116 -0
- package/dist/bin/ui/toolDisplay.js +423 -0
- package/dist/bin/ui/toolDisplayAdapter.js +357 -0
- package/dist/bin/workspace.js +106 -0
- package/dist/bin/workspace.validator.js +213 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts +26 -0
- package/dist/capabilities/offensiveSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/offensiveSecurityCapability.js +58 -0
- package/dist/capabilities/offensiveSecurityCapability.js.map +1 -0
- package/dist/capabilities/realSecurityCapability.d.ts +26 -0
- package/dist/capabilities/realSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/realSecurityCapability.js +53 -0
- package/dist/capabilities/realSecurityCapability.js.map +1 -0
- package/dist/capabilities/securityCapability.d.ts +32 -0
- package/dist/capabilities/securityCapability.d.ts.map +1 -0
- package/dist/capabilities/securityCapability.js +57 -0
- package/dist/capabilities/securityCapability.js.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts +42 -0
- package/dist/capabilities/ultimateSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/ultimateSecurityCapability.js +96 -0
- package/dist/capabilities/ultimateSecurityCapability.js.map +1 -0
- package/dist/core/LazyLoader.d.ts +129 -0
- package/dist/core/LazyLoader.d.ts.map +1 -0
- package/dist/core/LazyLoader.js +240 -0
- package/dist/core/LazyLoader.js.map +1 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +78 -8
- package/dist/core/agent.js.map +1 -1
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js +117 -16
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/intelligenceTools.d.ts +19 -0
- package/dist/core/intelligenceTools.d.ts.map +1 -0
- package/dist/core/intelligenceTools.js +453 -0
- package/dist/core/intelligenceTools.js.map +1 -0
- package/dist/core/operationalTools.d.ts +19 -0
- package/dist/core/operationalTools.d.ts.map +1 -0
- package/dist/core/operationalTools.js +467 -0
- package/dist/core/operationalTools.js.map +1 -0
- package/dist/intelligence/codeIntelligence.d.ts.map +1 -1
- package/dist/intelligence/codeIntelligence.js +12 -0
- package/dist/intelligence/codeIntelligence.js.map +1 -1
- package/dist/offensive/core/offensive-engine.d.ts +171 -0
- package/dist/offensive/core/offensive-engine.d.ts.map +1 -0
- package/dist/offensive/core/offensive-engine.js +345 -0
- package/dist/offensive/core/offensive-engine.js.map +1 -0
- package/dist/offensive/core/offensive-integration.d.ts +129 -0
- package/dist/offensive/core/offensive-integration.d.ts.map +1 -0
- package/dist/offensive/core/offensive-integration.js +364 -0
- package/dist/offensive/core/offensive-integration.js.map +1 -0
- package/dist/offensive/core/offensive-tools.d.ts +55 -0
- package/dist/offensive/core/offensive-tools.d.ts.map +1 -0
- package/dist/offensive/core/offensive-tools.js +438 -0
- package/dist/offensive/core/offensive-tools.js.map +1 -0
- package/dist/offensive/offensive-cli.d.ts +48 -0
- package/dist/offensive/offensive-cli.d.ts.map +1 -0
- package/dist/offensive/offensive-cli.js +233 -0
- package/dist/offensive/offensive-cli.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/security/active-stack-security.d.ts +112 -0
- package/dist/security/active-stack-security.d.ts.map +1 -0
- package/dist/security/active-stack-security.js +296 -0
- package/dist/security/active-stack-security.js.map +1 -0
- package/dist/security/advanced-persistence-research.d.ts +92 -0
- package/dist/security/advanced-persistence-research.d.ts.map +1 -0
- package/dist/security/advanced-persistence-research.js +195 -0
- package/dist/security/advanced-persistence-research.js.map +1 -0
- package/dist/security/advanced-targeting.d.ts +119 -0
- package/dist/security/advanced-targeting.d.ts.map +1 -0
- package/dist/security/advanced-targeting.js +233 -0
- package/dist/security/advanced-targeting.js.map +1 -0
- package/dist/security/apt-simulation-cli.d.ts +57 -0
- package/dist/security/apt-simulation-cli.d.ts.map +1 -0
- package/dist/security/apt-simulation-cli.js +278 -0
- package/dist/security/apt-simulation-cli.js.map +1 -0
- package/dist/security/apt-simulation-engine-complete.d.ts +97 -0
- package/dist/security/apt-simulation-engine-complete.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine-complete.js +441 -0
- package/dist/security/apt-simulation-engine-complete.js.map +1 -0
- package/dist/security/apt-simulation-engine.d.ts +97 -0
- package/dist/security/apt-simulation-engine.d.ts.map +1 -0
- package/dist/security/apt-simulation-engine.js +441 -0
- package/dist/security/apt-simulation-engine.js.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
- package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
- package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
- package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
- package/dist/security/authorization/securityAuthorization.d.ts +88 -0
- package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
- package/dist/security/authorization/securityAuthorization.js +172 -0
- package/dist/security/authorization/securityAuthorization.js.map +1 -0
- package/dist/security/authorization.d.ts +45 -0
- package/dist/security/authorization.d.ts.map +1 -0
- package/dist/security/authorization.js +128 -0
- package/dist/security/authorization.js.map +1 -0
- package/dist/security/comprehensive-security-research.d.ts +84 -0
- package/dist/security/comprehensive-security-research.d.ts.map +1 -0
- package/dist/security/comprehensive-security-research.js +211 -0
- package/dist/security/comprehensive-security-research.js.map +1 -0
- package/dist/security/comprehensive-targeting.d.ts +85 -0
- package/dist/security/comprehensive-targeting.d.ts.map +1 -0
- package/dist/security/comprehensive-targeting.js +438 -0
- package/dist/security/comprehensive-targeting.js.map +1 -0
- package/dist/security/global-security-integration.d.ts +91 -0
- package/dist/security/global-security-integration.d.ts.map +1 -0
- package/dist/security/global-security-integration.js +218 -0
- package/dist/security/global-security-integration.js.map +1 -0
- package/dist/security/index.d.ts +38 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +47 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/offensive/exploitationEngine.d.ts +54 -0
- package/dist/security/offensive/exploitationEngine.d.ts.map +1 -0
- package/dist/security/offensive/exploitationEngine.js +263 -0
- package/dist/security/offensive/exploitationEngine.js.map +1 -0
- package/dist/security/persistence-cli.d.ts +36 -0
- package/dist/security/persistence-cli.d.ts.map +1 -0
- package/dist/security/persistence-cli.js +160 -0
- package/dist/security/persistence-cli.js.map +1 -0
- package/dist/security/persistence-research.d.ts +11 -0
- package/dist/security/persistence-research.d.ts.map +1 -1
- package/dist/security/persistence-research.js +11 -0
- package/dist/security/persistence-research.js.map +1 -1
- package/dist/security/real/networkExploitation.d.ts +92 -0
- package/dist/security/real/networkExploitation.d.ts.map +1 -0
- package/dist/security/real/networkExploitation.js +316 -0
- package/dist/security/real/networkExploitation.js.map +1 -0
- package/dist/security/real/persistenceImplementation.d.ts +62 -0
- package/dist/security/real/persistenceImplementation.d.ts.map +1 -0
- package/dist/security/real/persistenceImplementation.js +323 -0
- package/dist/security/real/persistenceImplementation.js.map +1 -0
- package/dist/security/real/vulnerabilityScanner.d.ts +73 -0
- package/dist/security/real/vulnerabilityScanner.d.ts.map +1 -0
- package/dist/security/real/vulnerabilityScanner.js +341 -0
- package/dist/security/real/vulnerabilityScanner.js.map +1 -0
- package/dist/security/research/persistenceResearch.d.ts +97 -0
- package/dist/security/research/persistenceResearch.d.ts.map +1 -0
- package/dist/security/research/persistenceResearch.js +282 -0
- package/dist/security/research/persistenceResearch.js.map +1 -0
- package/dist/security/security-integration.d.ts +74 -0
- package/dist/security/security-integration.d.ts.map +1 -0
- package/dist/security/security-integration.js +137 -0
- package/dist/security/security-integration.js.map +1 -0
- package/dist/security/security-testing-framework.d.ts +120 -0
- package/dist/security/security-testing-framework.d.ts.map +1 -0
- package/dist/security/security-testing-framework.js +372 -0
- package/dist/security/security-testing-framework.js.map +1 -0
- package/dist/security/simulation/attackSimulation.d.ts +93 -0
- package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
- package/dist/security/simulation/attackSimulation.js +341 -0
- package/dist/security/simulation/attackSimulation.js.map +1 -0
- package/dist/security/strategic-operations.d.ts +100 -0
- package/dist/security/strategic-operations.d.ts.map +1 -0
- package/dist/security/strategic-operations.js +276 -0
- package/dist/security/strategic-operations.js.map +1 -0
- package/dist/security/tool-security-wrapper.d.ts +58 -0
- package/dist/security/tool-security-wrapper.d.ts.map +1 -0
- package/dist/security/tool-security-wrapper.js +156 -0
- package/dist/security/tool-security-wrapper.js.map +1 -0
- package/dist/shell/bracketedPasteManager.d.ts +33 -0
- package/dist/shell/bracketedPasteManager.d.ts.map +1 -1
- package/dist/shell/bracketedPasteManager.js +101 -0
- package/dist/shell/bracketedPasteManager.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +22 -1
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +257 -24
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/taskCompletionDetector.d.ts +101 -0
- package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
- package/dist/shell/taskCompletionDetector.js +343 -0
- package/dist/shell/taskCompletionDetector.js.map +1 -0
- package/dist/tools/cloudTools.d.ts +11 -0
- package/dist/tools/cloudTools.d.ts.map +1 -1
- package/dist/tools/cloudTools.js +11 -0
- package/dist/tools/cloudTools.js.map +1 -1
- package/dist/tools/codeAnalysisTools.d.ts.map +1 -1
- package/dist/tools/codeAnalysisTools.js +23 -1
- package/dist/tools/codeAnalysisTools.js.map +1 -1
- package/dist/tools/enhancedSecurityTools.d.ts +19 -0
- package/dist/tools/enhancedSecurityTools.d.ts.map +1 -0
- package/dist/tools/enhancedSecurityTools.js +215 -0
- package/dist/tools/enhancedSecurityTools.js.map +1 -0
- package/dist/tools/fileTools.d.ts.map +1 -1
- package/dist/tools/fileTools.js +7 -0
- package/dist/tools/fileTools.js.map +1 -1
- package/dist/tools/grepTools.d.ts.map +1 -1
- package/dist/tools/grepTools.js +6 -0
- package/dist/tools/grepTools.js.map +1 -1
- package/dist/tools/offensiveSecurityTools.d.ts +16 -0
- package/dist/tools/offensiveSecurityTools.d.ts.map +1 -0
- package/dist/tools/offensiveSecurityTools.js +285 -0
- package/dist/tools/offensiveSecurityTools.js.map +1 -0
- package/dist/tools/realSecurityTools.d.ts +18 -0
- package/dist/tools/realSecurityTools.d.ts.map +1 -0
- package/dist/tools/realSecurityTools.js +468 -0
- package/dist/tools/realSecurityTools.js.map +1 -0
- package/dist/tools/securityTools.d.ts +20 -0
- package/dist/tools/securityTools.d.ts.map +1 -0
- package/dist/tools/securityTools.js +449 -0
- package/dist/tools/securityTools.js.map +1 -0
- package/dist/tools/webTools.js +9 -0
- package/dist/tools/webTools.js.map +1 -1
- package/package.json +26 -11
- package/scripts/deploy-security-capabilities.js +178 -0
|
@@ -10,6 +10,7 @@ import { BracketedPasteManager } from './bracketedPasteManager.js';
|
|
|
10
10
|
import { detectApiKeyError } from '../core/errors/apiKeyErrors.js';
|
|
11
11
|
import { buildWorkspaceContext } from '../workspace.js';
|
|
12
12
|
import { buildInteractiveSystemPrompt } from './systemPrompt.js';
|
|
13
|
+
import { getTaskCompletionDetector, resetTaskCompletionDetector, } from './taskCompletionDetector.js';
|
|
13
14
|
import { discoverAllModels } from '../core/modelDiscovery.js';
|
|
14
15
|
import { getModels, getSlashCommands, getProviders } from '../core/agentSchemaLoader.js';
|
|
15
16
|
import { clearAutosaveSnapshot, deleteSession, listSessions, loadAutosaveSnapshot, loadSessionById, saveAutosaveSnapshot, saveSessionSnapshot, } from '../core/sessionStore.js';
|
|
@@ -80,6 +81,7 @@ export class InteractiveShell {
|
|
|
80
81
|
cleanupInProgress = false;
|
|
81
82
|
slashPreviewVisible = false;
|
|
82
83
|
keypressHandler = null;
|
|
84
|
+
rawDataHandler = null;
|
|
83
85
|
skillRepository;
|
|
84
86
|
skillToolHandlers = new Map();
|
|
85
87
|
thinkingMode = 'balanced';
|
|
@@ -92,6 +94,8 @@ export class InteractiveShell {
|
|
|
92
94
|
persistentPrompt;
|
|
93
95
|
alphaZeroMetrics; // Alpha Zero 2 performance tracking
|
|
94
96
|
statusSubscription = null;
|
|
97
|
+
followUpQueue = [];
|
|
98
|
+
isDrainingQueue = false;
|
|
95
99
|
activeContextWindowTokens = null;
|
|
96
100
|
sessionPreferences;
|
|
97
101
|
autosaveEnabled;
|
|
@@ -367,7 +371,16 @@ export class InteractiveShell {
|
|
|
367
371
|
display.showInfo(`${this.agentMenuLabel(profileName)} will load the next time you start the CLI. Restart to switch now.`);
|
|
368
372
|
}
|
|
369
373
|
setupHandlers() {
|
|
374
|
+
// Set up raw data interception for bracketed paste
|
|
375
|
+
this.setupRawPasteHandler();
|
|
370
376
|
this.rl.on('line', (line) => {
|
|
377
|
+
// If we're capturing raw paste data, ignore readline line events
|
|
378
|
+
// (they've already been handled by the raw data handler)
|
|
379
|
+
if (this.bracketedPaste.isCapturingRaw()) {
|
|
380
|
+
// Show paste progress
|
|
381
|
+
this.showMultiLinePastePreview(this.bracketedPaste.getRawBufferLineCount(), this.bracketedPaste.getRawBufferPreview());
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
371
384
|
const normalized = this.bracketedPaste.process(line);
|
|
372
385
|
if (normalized.handled) {
|
|
373
386
|
// If still accumulating multi-line paste, show preview
|
|
@@ -401,6 +414,11 @@ export class InteractiveShell {
|
|
|
401
414
|
inputStream.off('keypress', this.keypressHandler);
|
|
402
415
|
this.keypressHandler = null;
|
|
403
416
|
}
|
|
417
|
+
// Remove raw data handler
|
|
418
|
+
if (inputStream && this.rawDataHandler) {
|
|
419
|
+
inputStream.off('data', this.rawDataHandler);
|
|
420
|
+
this.rawDataHandler = null;
|
|
421
|
+
}
|
|
404
422
|
// Clear any pending cleanup to prevent hanging
|
|
405
423
|
this.pendingCleanup = null;
|
|
406
424
|
// Dispose persistent prompt
|
|
@@ -430,6 +448,42 @@ export class InteractiveShell {
|
|
|
430
448
|
// Show initial persistent prompt
|
|
431
449
|
this.persistentPrompt.show();
|
|
432
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Set up raw stdin data interception for bracketed paste mode.
|
|
453
|
+
* This intercepts data before readline processes it, allowing us to
|
|
454
|
+
* capture complete multi-line pastes without readline splitting them.
|
|
455
|
+
*/
|
|
456
|
+
setupRawPasteHandler() {
|
|
457
|
+
if (!this.bracketedPasteEnabled) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const inputStream = input;
|
|
461
|
+
if (!inputStream || !inputStream.isTTY) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
// Set up callback for when a complete paste is captured
|
|
465
|
+
this.bracketedPaste.setRawPasteCallback((content) => {
|
|
466
|
+
this.clearMultiLinePastePreview();
|
|
467
|
+
const lines = content.split('\n');
|
|
468
|
+
const lineCount = lines.length;
|
|
469
|
+
// Show collapsed summary for multi-line pastes
|
|
470
|
+
if (lineCount > 1) {
|
|
471
|
+
this.displayMultiLineSubmission(content, lineCount);
|
|
472
|
+
}
|
|
473
|
+
// Submit the pasted content
|
|
474
|
+
this.enqueueUserInput(content, true);
|
|
475
|
+
// Restore the prompt
|
|
476
|
+
this.persistentPrompt.updateInput('', 0);
|
|
477
|
+
this.rl.prompt();
|
|
478
|
+
});
|
|
479
|
+
// We need to intercept raw data, but we can't easily do this with
|
|
480
|
+
// readline already consuming stdin. Instead, we handle paste detection
|
|
481
|
+
// via the bracketed paste markers that appear in line events.
|
|
482
|
+
// The raw handler approach works better when we control the input stream.
|
|
483
|
+
//
|
|
484
|
+
// For now, we rely on the line-event-based approach with enhanced
|
|
485
|
+
// detection in the BracketedPasteManager.
|
|
486
|
+
}
|
|
433
487
|
setupSlashCommandPreviewHandler() {
|
|
434
488
|
const inputStream = input;
|
|
435
489
|
if (!inputStream || typeof inputStream.on !== 'function' || !inputStream.isTTY) {
|
|
@@ -466,16 +520,24 @@ export class InteractiveShell {
|
|
|
466
520
|
}
|
|
467
521
|
setIdleStatus(detail) {
|
|
468
522
|
this.statusTracker.setBase('Ready for prompts', {
|
|
469
|
-
detail:
|
|
523
|
+
detail: this.describeStatusDetail(detail),
|
|
470
524
|
tone: 'success',
|
|
471
525
|
});
|
|
472
526
|
}
|
|
473
527
|
setProcessingStatus(detail) {
|
|
474
528
|
this.statusTracker.setBase('Working on your request', {
|
|
475
|
-
detail:
|
|
529
|
+
detail: this.describeStatusDetail(detail),
|
|
476
530
|
tone: 'info',
|
|
477
531
|
});
|
|
478
532
|
}
|
|
533
|
+
describeStatusDetail(detail) {
|
|
534
|
+
const parts = [detail?.trim() || this.describeModelDetail()];
|
|
535
|
+
const queued = this.followUpQueue.length;
|
|
536
|
+
if (queued > 0) {
|
|
537
|
+
parts.push(`${queued} follow-up${queued === 1 ? '' : 's'} queued`);
|
|
538
|
+
}
|
|
539
|
+
return parts.join(' ⢠');
|
|
540
|
+
}
|
|
479
541
|
describeModelDetail() {
|
|
480
542
|
const provider = this.providerLabel(this.sessionState.provider);
|
|
481
543
|
return `${provider} Ā· ${this.sessionState.model}`;
|
|
@@ -657,6 +719,85 @@ export class InteractiveShell {
|
|
|
657
719
|
this.rl.prompt();
|
|
658
720
|
}
|
|
659
721
|
}
|
|
722
|
+
refreshQueueIndicators() {
|
|
723
|
+
const queued = this.followUpQueue.length;
|
|
724
|
+
// Build status message based on processing state and queue
|
|
725
|
+
let message;
|
|
726
|
+
if (this.isProcessing) {
|
|
727
|
+
const queueSuffix = queued > 0 ? ` (${queued} queued)` : ' (type to queue follow-up)';
|
|
728
|
+
message = `ā³ Processing...${queueSuffix}`;
|
|
729
|
+
}
|
|
730
|
+
else if (queued > 0) {
|
|
731
|
+
message = `${queued} follow-up${queued === 1 ? '' : 's'} queued`;
|
|
732
|
+
}
|
|
733
|
+
this.persistentPrompt.updateStatusBar({ message });
|
|
734
|
+
if (this.isProcessing) {
|
|
735
|
+
this.setProcessingStatus();
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
this.setIdleStatus();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
enqueueFollowUpAction(action) {
|
|
742
|
+
this.followUpQueue.push(action);
|
|
743
|
+
const normalized = action.text.replace(/\s+/g, ' ').trim();
|
|
744
|
+
const previewLimit = 80;
|
|
745
|
+
const preview = normalized.length > previewLimit ? `${normalized.slice(0, previewLimit - 3)}...` : normalized;
|
|
746
|
+
const position = this.followUpQueue.length === 1 ? 'to run next' : `#${this.followUpQueue.length} in queue`;
|
|
747
|
+
const label = action.type === 'continuous' ? 'continuous command' : 'follow-up';
|
|
748
|
+
const queueCount = this.followUpQueue.length;
|
|
749
|
+
// Show immediate acknowledgment with checkmark
|
|
750
|
+
const queueLabel = queueCount === 1 ? '1 queued' : `${queueCount} queued`;
|
|
751
|
+
if (preview) {
|
|
752
|
+
display.showInfo(`ā ${theme.info(label)} ${position}: ${theme.ui.muted(preview)}`);
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
display.showInfo(`ā ${theme.info(label)} queued ${position}.`);
|
|
756
|
+
}
|
|
757
|
+
// Update status bar to show queue count
|
|
758
|
+
this.persistentPrompt.updateStatusBar({
|
|
759
|
+
message: `ā³ Processing... (${queueLabel})`
|
|
760
|
+
});
|
|
761
|
+
this.refreshQueueIndicators();
|
|
762
|
+
this.scheduleQueueProcessing();
|
|
763
|
+
// Re-show the prompt so user can continue typing more follow-ups
|
|
764
|
+
this.rl.prompt();
|
|
765
|
+
}
|
|
766
|
+
scheduleQueueProcessing() {
|
|
767
|
+
if (!this.followUpQueue.length) {
|
|
768
|
+
this.refreshQueueIndicators();
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
queueMicrotask(() => {
|
|
772
|
+
void this.processQueuedActions();
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
async processQueuedActions() {
|
|
776
|
+
if (this.isDrainingQueue || this.isProcessing || !this.followUpQueue.length) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
this.isDrainingQueue = true;
|
|
780
|
+
try {
|
|
781
|
+
while (!this.isProcessing && this.followUpQueue.length) {
|
|
782
|
+
const next = this.followUpQueue.shift();
|
|
783
|
+
const remaining = this.followUpQueue.length;
|
|
784
|
+
const label = next.type === 'continuous' ? 'continuous command' : 'follow-up';
|
|
785
|
+
const suffix = remaining ? ` (${remaining} left after this)` : '';
|
|
786
|
+
display.showSystemMessage(`ā¶ Running queued ${label}${suffix}.`);
|
|
787
|
+
this.refreshQueueIndicators();
|
|
788
|
+
if (next.type === 'continuous') {
|
|
789
|
+
await this.processContinuousRequest(next.text);
|
|
790
|
+
}
|
|
791
|
+
else {
|
|
792
|
+
await this.processRequest(next.text);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
finally {
|
|
797
|
+
this.isDrainingQueue = false;
|
|
798
|
+
this.refreshQueueIndicators();
|
|
799
|
+
}
|
|
800
|
+
}
|
|
660
801
|
async processInputBlock(line, _wasRapidMultiLine = false) {
|
|
661
802
|
this.slashPreviewVisible = false;
|
|
662
803
|
this.uiAdapter.hideSlashCommandPreview();
|
|
@@ -1774,7 +1915,7 @@ export class InteractiveShell {
|
|
|
1774
1915
|
}
|
|
1775
1916
|
async processRequest(request) {
|
|
1776
1917
|
if (this.isProcessing) {
|
|
1777
|
-
|
|
1918
|
+
this.enqueueFollowUpAction({ type: 'request', text: request });
|
|
1778
1919
|
return;
|
|
1779
1920
|
}
|
|
1780
1921
|
if (!this.agent && !this.rebuildAgent()) {
|
|
@@ -1787,8 +1928,9 @@ export class InteractiveShell {
|
|
|
1787
1928
|
}
|
|
1788
1929
|
this.isProcessing = true;
|
|
1789
1930
|
const requestStartTime = Date.now(); // Alpha Zero 2 timing
|
|
1790
|
-
//
|
|
1791
|
-
|
|
1931
|
+
// Keep persistent prompt visible during processing so users can type follow-up requests
|
|
1932
|
+
// The prompt will show a "processing" indicator but remain interactive
|
|
1933
|
+
this.persistentPrompt.updateStatusBar({ message: 'ā³ Processing... (type to queue follow-up)' });
|
|
1792
1934
|
this.uiAdapter.startProcessing('Working on your request');
|
|
1793
1935
|
this.setProcessingStatus();
|
|
1794
1936
|
try {
|
|
@@ -1816,30 +1958,32 @@ export class InteractiveShell {
|
|
|
1816
1958
|
this.uiAdapter.endProcessing('Ready for prompts');
|
|
1817
1959
|
this.setIdleStatus();
|
|
1818
1960
|
display.newLine();
|
|
1819
|
-
//
|
|
1961
|
+
// Clear the processing status and ensure persistent prompt is visible
|
|
1962
|
+
this.persistentPrompt.updateStatusBar({ message: undefined });
|
|
1820
1963
|
this.persistentPrompt.show();
|
|
1821
1964
|
// CRITICAL: Ensure readline prompt is active for user input
|
|
1822
1965
|
// This is a safety net in case the caller doesn't call rl.prompt()
|
|
1823
1966
|
this.rl.prompt();
|
|
1967
|
+
this.scheduleQueueProcessing();
|
|
1968
|
+
this.refreshQueueIndicators();
|
|
1824
1969
|
}
|
|
1825
1970
|
}
|
|
1826
1971
|
/**
|
|
1827
1972
|
* Process a continuous/infinite loop request.
|
|
1828
1973
|
* Runs the agent in a loop until:
|
|
1829
|
-
* 1. The agent indicates completion (
|
|
1974
|
+
* 1. The agent indicates completion (verified by AI confirmation)
|
|
1830
1975
|
* 2. User interrupts (Ctrl+C)
|
|
1831
1976
|
* 3. Maximum iterations reached (safety limit)
|
|
1832
1977
|
*
|
|
1978
|
+
* Uses intelligent task completion detection with AI verification
|
|
1979
|
+
* to ensure tasks are truly complete before stopping.
|
|
1980
|
+
*
|
|
1833
1981
|
* Context is automatically managed - overflow errors trigger auto-recovery.
|
|
1834
1982
|
*/
|
|
1835
1983
|
async processContinuousRequest(initialRequest) {
|
|
1836
1984
|
const MAX_ITERATIONS = 100; // Safety limit to prevent truly infinite loops
|
|
1837
|
-
const COMPLETION_PATTERNS = [
|
|
1838
|
-
/\b(completed?|done|finished|all.*done|task.*complete|nothing.*left|no.*more.*tasks?)\b/i,
|
|
1839
|
-
/\b(everything.*done|all.*tasks?.*complete|successfully.*completed?)\b/i,
|
|
1840
|
-
];
|
|
1841
1985
|
if (this.isProcessing) {
|
|
1842
|
-
|
|
1986
|
+
this.enqueueFollowUpAction({ type: 'continuous', text: initialRequest });
|
|
1843
1987
|
return;
|
|
1844
1988
|
}
|
|
1845
1989
|
if (!this.agent && !this.rebuildAgent()) {
|
|
@@ -1852,15 +1996,22 @@ export class InteractiveShell {
|
|
|
1852
1996
|
}
|
|
1853
1997
|
this.isProcessing = true;
|
|
1854
1998
|
const overallStartTime = Date.now();
|
|
1855
|
-
//
|
|
1856
|
-
|
|
1999
|
+
// Initialize the task completion detector
|
|
2000
|
+
const completionDetector = getTaskCompletionDetector();
|
|
2001
|
+
completionDetector.reset();
|
|
2002
|
+
// Keep persistent prompt visible during processing so users can type follow-up requests
|
|
2003
|
+
this.persistentPrompt.updateStatusBar({ message: 'š Continuous mode... (type to queue follow-up)' });
|
|
1857
2004
|
display.showSystemMessage(`š Starting continuous execution mode. Press Ctrl+C to stop.`);
|
|
2005
|
+
display.showSystemMessage(`š Using intelligent task completion detection with AI verification.`);
|
|
1858
2006
|
this.uiAdapter.startProcessing('Continuous execution mode');
|
|
1859
2007
|
this.setProcessingStatus();
|
|
1860
2008
|
let iteration = 0;
|
|
1861
2009
|
let lastResponse = '';
|
|
1862
2010
|
let consecutiveNoProgress = 0;
|
|
1863
|
-
const MAX_NO_PROGRESS =
|
|
2011
|
+
const MAX_NO_PROGRESS = 5; // Increased to allow more attempts before giving up
|
|
2012
|
+
let pendingVerification = false;
|
|
2013
|
+
let verificationAttempts = 0;
|
|
2014
|
+
const MAX_VERIFICATION_ATTEMPTS = 2;
|
|
1864
2015
|
try {
|
|
1865
2016
|
// Enhance initial prompt with git context for self-improvement tasks
|
|
1866
2017
|
let currentPrompt = initialRequest;
|
|
@@ -1873,7 +2024,8 @@ IMPORTANT: You have full git access. After making improvements:
|
|
|
1873
2024
|
3. Use bash to run: git commit -m "descriptive message" (commit)
|
|
1874
2025
|
4. Use bash to run: git push (when milestone reached)
|
|
1875
2026
|
|
|
1876
|
-
Commit frequently with descriptive messages. Push when ready
|
|
2027
|
+
Commit frequently with descriptive messages. Push when ready.
|
|
2028
|
+
When truly finished with ALL tasks, explicitly state "TASK_FULLY_COMPLETE".`;
|
|
1877
2029
|
}
|
|
1878
2030
|
while (iteration < MAX_ITERATIONS) {
|
|
1879
2031
|
iteration++;
|
|
@@ -1889,18 +2041,67 @@ Commit frequently with descriptive messages. Push when ready.`;
|
|
|
1889
2041
|
const elapsedMs = Date.now() - overallStartTime;
|
|
1890
2042
|
this.alphaZeroMetrics.recordMessage(elapsedMs);
|
|
1891
2043
|
display.stopThinking(false);
|
|
1892
|
-
//
|
|
1893
|
-
const
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
2044
|
+
// Extract tools used from the response (look for tool call patterns)
|
|
2045
|
+
const toolsUsed = this.extractToolsFromResponse(response);
|
|
2046
|
+
completionDetector.recordToolCall.bind(completionDetector);
|
|
2047
|
+
toolsUsed.forEach(tool => completionDetector.recordToolCall(tool, true, true));
|
|
2048
|
+
// Use intelligent completion detection
|
|
2049
|
+
const completionAnalysis = completionDetector.analyzeCompletion(response, toolsUsed);
|
|
2050
|
+
display.showSystemMessage(`š Completion confidence: ${(completionAnalysis.confidence * 100).toFixed(0)}%`);
|
|
2051
|
+
// Check for explicit TASK_FULLY_COMPLETE marker (highest priority)
|
|
2052
|
+
if (response.includes('TASK_FULLY_COMPLETE')) {
|
|
2053
|
+
display.showSystemMessage(`\nā
Task explicitly marked complete after ${iteration} iteration(s).`);
|
|
2054
|
+
break;
|
|
2055
|
+
}
|
|
2056
|
+
// High confidence completion without verification needed
|
|
2057
|
+
if (completionAnalysis.isComplete && completionAnalysis.confidence >= 0.85) {
|
|
2058
|
+
display.showSystemMessage(`\nā
Task completed with high confidence after ${iteration} iteration(s).`);
|
|
2059
|
+
display.showSystemMessage(` Reason: ${completionAnalysis.reason}`);
|
|
1897
2060
|
break;
|
|
1898
2061
|
}
|
|
2062
|
+
// Medium confidence - run verification round
|
|
2063
|
+
if (completionAnalysis.shouldVerify && completionAnalysis.verificationPrompt && !pendingVerification) {
|
|
2064
|
+
if (verificationAttempts < MAX_VERIFICATION_ATTEMPTS) {
|
|
2065
|
+
display.showSystemMessage(`\nš Running verification round (confidence: ${(completionAnalysis.confidence * 100).toFixed(0)}%)...`);
|
|
2066
|
+
pendingVerification = true;
|
|
2067
|
+
verificationAttempts++;
|
|
2068
|
+
currentPrompt = completionAnalysis.verificationPrompt;
|
|
2069
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
2070
|
+
continue;
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
// If we were in verification mode, check the result
|
|
2074
|
+
if (pendingVerification) {
|
|
2075
|
+
pendingVerification = false;
|
|
2076
|
+
if (completionDetector.isVerificationConfirmed(response)) {
|
|
2077
|
+
display.showSystemMessage(`\nā
Task completion verified by AI after ${iteration} iteration(s).`);
|
|
2078
|
+
break;
|
|
2079
|
+
}
|
|
2080
|
+
else {
|
|
2081
|
+
display.showSystemMessage(`š Verification indicates more work needed. Continuing...`);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
1899
2084
|
// Check for no progress (same response multiple times)
|
|
2085
|
+
const responseChanged = response !== lastResponse;
|
|
1900
2086
|
if (!responseChanged) {
|
|
1901
2087
|
consecutiveNoProgress++;
|
|
1902
2088
|
if (consecutiveNoProgress >= MAX_NO_PROGRESS) {
|
|
1903
|
-
|
|
2089
|
+
// Before giving up, ask one final verification
|
|
2090
|
+
if (verificationAttempts < MAX_VERIFICATION_ATTEMPTS) {
|
|
2091
|
+
display.showSystemMessage(`\nā ļø No progress for ${MAX_NO_PROGRESS} iterations. Running final verification...`);
|
|
2092
|
+
currentPrompt = `I notice you may be stuck or finished. Please confirm:
|
|
2093
|
+
|
|
2094
|
+
1. Is the original task FULLY complete?
|
|
2095
|
+
2. If yes, respond with exactly: "TASK_FULLY_COMPLETE"
|
|
2096
|
+
3. If no, what specific action should be taken next?
|
|
2097
|
+
|
|
2098
|
+
Be explicit about the current state.`;
|
|
2099
|
+
verificationAttempts++;
|
|
2100
|
+
consecutiveNoProgress = 0;
|
|
2101
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
2102
|
+
continue;
|
|
2103
|
+
}
|
|
2104
|
+
display.showSystemMessage(`\nā ļø No progress detected for ${MAX_NO_PROGRESS} iterations and verification exhausted. Stopping.`);
|
|
1904
2105
|
break;
|
|
1905
2106
|
}
|
|
1906
2107
|
}
|
|
@@ -1908,12 +2109,15 @@ Commit frequently with descriptive messages. Push when ready.`;
|
|
|
1908
2109
|
consecutiveNoProgress = 0;
|
|
1909
2110
|
}
|
|
1910
2111
|
lastResponse = response;
|
|
1911
|
-
// Prepare next iteration prompt - explicitly encourage
|
|
2112
|
+
// Prepare next iteration prompt - explicitly encourage progress reporting
|
|
1912
2113
|
currentPrompt = `Continue with the next step. Remember:
|
|
1913
2114
|
- Use bash to run git commands (git status, git add, git commit, git push)
|
|
1914
2115
|
- Commit your changes with descriptive messages after completing improvements
|
|
1915
2116
|
- Push changes when a logical milestone is reached
|
|
1916
|
-
If all tasks are complete,
|
|
2117
|
+
- If all tasks are complete, respond with exactly: "TASK_FULLY_COMPLETE"
|
|
2118
|
+
- If there are errors or blockers, explain what's preventing progress
|
|
2119
|
+
|
|
2120
|
+
What's the next action?`;
|
|
1917
2121
|
// Small delay between iterations to prevent rate limiting
|
|
1918
2122
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
1919
2123
|
}
|
|
@@ -1944,15 +2148,44 @@ If all tasks are complete, say "done".`;
|
|
|
1944
2148
|
const minutes = Math.floor(totalElapsed / 60000);
|
|
1945
2149
|
const seconds = Math.floor((totalElapsed % 60000) / 1000);
|
|
1946
2150
|
display.showSystemMessage(`\nš Continuous execution completed: ${iteration} iterations, ${minutes}m ${seconds}s total`);
|
|
2151
|
+
// Reset completion detector for next task
|
|
2152
|
+
resetTaskCompletionDetector();
|
|
1947
2153
|
this.isProcessing = false;
|
|
1948
2154
|
this.uiAdapter.endProcessing('Ready for prompts');
|
|
1949
2155
|
this.setIdleStatus();
|
|
1950
2156
|
display.newLine();
|
|
2157
|
+
// Clear the processing status and ensure persistent prompt is visible
|
|
2158
|
+
this.persistentPrompt.updateStatusBar({ message: undefined });
|
|
1951
2159
|
this.persistentPrompt.show();
|
|
1952
2160
|
// CRITICAL: Ensure readline prompt is active for user input
|
|
1953
2161
|
// This is a safety net in case the caller doesn't call rl.prompt()
|
|
1954
2162
|
this.rl.prompt();
|
|
2163
|
+
this.scheduleQueueProcessing();
|
|
2164
|
+
this.refreshQueueIndicators();
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2168
|
+
* Extract tool names from a response by looking for tool call patterns
|
|
2169
|
+
*/
|
|
2170
|
+
extractToolsFromResponse(response) {
|
|
2171
|
+
const tools = [];
|
|
2172
|
+
// Look for common tool call patterns in the response
|
|
2173
|
+
const toolPatterns = [
|
|
2174
|
+
/(?:running|executing|called?|using)\s+(?:the\s+)?(\w+(?:_\w+)*)\s+tool/gi,
|
|
2175
|
+
/tool[:\s]+(\w+(?:_\w+)*)/gi,
|
|
2176
|
+
/āæ\s*(\w+)/g, // Tool result prefix pattern
|
|
2177
|
+
/(?:read_file|write_file|edit_file|bash|grep|glob|search)/gi,
|
|
2178
|
+
];
|
|
2179
|
+
for (const pattern of toolPatterns) {
|
|
2180
|
+
let match;
|
|
2181
|
+
while ((match = pattern.exec(response)) !== null) {
|
|
2182
|
+
const toolName = match[1] || match[0];
|
|
2183
|
+
if (toolName && !tools.includes(toolName.toLowerCase())) {
|
|
2184
|
+
tools.push(toolName.toLowerCase());
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
1955
2187
|
}
|
|
2188
|
+
return tools;
|
|
1956
2189
|
}
|
|
1957
2190
|
/**
|
|
1958
2191
|
* Check if an error is a context overflow error
|