deepseek-coder-cli 1.0.0
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/LICENSE +21 -0
- package/README.md +422 -0
- package/agents/agi-code.rules.json +87 -0
- package/agents/general.rules.json +171 -0
- package/dist/bin/cliMode.d.ts +8 -0
- package/dist/bin/cliMode.d.ts.map +1 -0
- package/dist/bin/cliMode.js +20 -0
- package/dist/bin/cliMode.js.map +1 -0
- package/dist/bin/deepseek.d.ts +16 -0
- package/dist/bin/deepseek.d.ts.map +1 -0
- package/dist/bin/deepseek.js +737 -0
- package/dist/bin/deepseek.js.map +1 -0
- package/dist/bin/erosolar.d.ts +7 -0
- package/dist/bin/erosolar.d.ts.map +1 -0
- package/dist/bin/erosolar.js +7 -0
- package/dist/bin/erosolar.js.map +1 -0
- package/dist/bin/selfTest.d.ts +14 -0
- package/dist/bin/selfTest.d.ts.map +1 -0
- package/dist/bin/selfTest.js +304 -0
- package/dist/bin/selfTest.js.map +1 -0
- package/dist/capabilities/appleSecurityCapability.d.ts +57 -0
- package/dist/capabilities/appleSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/appleSecurityCapability.js +197 -0
- package/dist/capabilities/appleSecurityCapability.js.map +1 -0
- package/dist/capabilities/authorizedSecurityCapability.d.ts +17 -0
- package/dist/capabilities/authorizedSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/authorizedSecurityCapability.js +333 -0
- package/dist/capabilities/authorizedSecurityCapability.js.map +1 -0
- package/dist/capabilities/autoEnhancementCapability.d.ts +98 -0
- package/dist/capabilities/autoEnhancementCapability.d.ts.map +1 -0
- package/dist/capabilities/autoEnhancementCapability.js +455 -0
- package/dist/capabilities/autoEnhancementCapability.js.map +1 -0
- package/dist/capabilities/baseCapability.d.ts +72 -0
- package/dist/capabilities/baseCapability.d.ts.map +1 -0
- package/dist/capabilities/baseCapability.js +183 -0
- package/dist/capabilities/baseCapability.js.map +1 -0
- package/dist/capabilities/bashCapability.d.ts +13 -0
- package/dist/capabilities/bashCapability.d.ts.map +1 -0
- package/dist/capabilities/bashCapability.js +24 -0
- package/dist/capabilities/bashCapability.js.map +1 -0
- package/dist/capabilities/biocognitiveWarfare.d.ts +136 -0
- package/dist/capabilities/biocognitiveWarfare.d.ts.map +1 -0
- package/dist/capabilities/biocognitiveWarfare.js +603 -0
- package/dist/capabilities/biocognitiveWarfare.js.map +1 -0
- package/dist/capabilities/chineseCnoIntegration.d.ts +60 -0
- package/dist/capabilities/chineseCnoIntegration.d.ts.map +1 -0
- package/dist/capabilities/chineseCnoIntegration.js +253 -0
- package/dist/capabilities/chineseCnoIntegration.js.map +1 -0
- package/dist/capabilities/cnoCapability.d.ts +110 -0
- package/dist/capabilities/cnoCapability.d.ts.map +1 -0
- package/dist/capabilities/cnoCapability.js +785 -0
- package/dist/capabilities/cnoCapability.js.map +1 -0
- package/dist/capabilities/editCapability.d.ts +17 -0
- package/dist/capabilities/editCapability.d.ts.map +1 -0
- package/dist/capabilities/editCapability.js +27 -0
- package/dist/capabilities/editCapability.js.map +1 -0
- package/dist/capabilities/eliteCryptoMilitaryCapability.d.ts +99 -0
- package/dist/capabilities/eliteCryptoMilitaryCapability.d.ts.map +1 -0
- package/dist/capabilities/eliteCryptoMilitaryCapability.js +618 -0
- package/dist/capabilities/eliteCryptoMilitaryCapability.js.map +1 -0
- package/dist/capabilities/enhancedGitCapability.d.ts +7 -0
- package/dist/capabilities/enhancedGitCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedGitCapability.js +220 -0
- package/dist/capabilities/enhancedGitCapability.js.map +1 -0
- package/dist/capabilities/filesystemCapability.d.ts +13 -0
- package/dist/capabilities/filesystemCapability.d.ts.map +1 -0
- package/dist/capabilities/filesystemCapability.js +24 -0
- package/dist/capabilities/filesystemCapability.js.map +1 -0
- package/dist/capabilities/gitHistoryCapability.d.ts +6 -0
- package/dist/capabilities/gitHistoryCapability.d.ts.map +1 -0
- package/dist/capabilities/gitHistoryCapability.js +160 -0
- package/dist/capabilities/gitHistoryCapability.js.map +1 -0
- package/dist/capabilities/index.d.ts +26 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +26 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/integratedUnifiedCapability.d.ts +105 -0
- package/dist/capabilities/integratedUnifiedCapability.d.ts.map +1 -0
- package/dist/capabilities/integratedUnifiedCapability.js +422 -0
- package/dist/capabilities/integratedUnifiedCapability.js.map +1 -0
- package/dist/capabilities/maxOffensiveUkraineCapability.d.ts +46 -0
- package/dist/capabilities/maxOffensiveUkraineCapability.d.ts.map +1 -0
- package/dist/capabilities/maxOffensiveUkraineCapability.js +725 -0
- package/dist/capabilities/maxOffensiveUkraineCapability.js.map +1 -0
- package/dist/capabilities/migrationUtilities.d.ts +128 -0
- package/dist/capabilities/migrationUtilities.d.ts.map +1 -0
- package/dist/capabilities/migrationUtilities.js +658 -0
- package/dist/capabilities/migrationUtilities.js.map +1 -0
- package/dist/capabilities/offensiveDestructionCapability.d.ts +98 -0
- package/dist/capabilities/offensiveDestructionCapability.d.ts.map +1 -0
- package/dist/capabilities/offensiveDestructionCapability.js +848 -0
- package/dist/capabilities/offensiveDestructionCapability.js.map +1 -0
- package/dist/capabilities/quantumSpaceWarfare.d.ts +108 -0
- package/dist/capabilities/quantumSpaceWarfare.d.ts.map +1 -0
- package/dist/capabilities/quantumSpaceWarfare.js +342 -0
- package/dist/capabilities/quantumSpaceWarfare.js.map +1 -0
- package/dist/capabilities/readmeIntegration.d.ts +161 -0
- package/dist/capabilities/readmeIntegration.d.ts.map +1 -0
- package/dist/capabilities/readmeIntegration.js +1034 -0
- package/dist/capabilities/readmeIntegration.js.map +1 -0
- package/dist/capabilities/searchCapability.d.ts +19 -0
- package/dist/capabilities/searchCapability.d.ts.map +1 -0
- package/dist/capabilities/searchCapability.js +29 -0
- package/dist/capabilities/searchCapability.js.map +1 -0
- package/dist/capabilities/selfUpdateSystem.d.ts +122 -0
- package/dist/capabilities/selfUpdateSystem.d.ts.map +1 -0
- package/dist/capabilities/selfUpdateSystem.js +725 -0
- package/dist/capabilities/selfUpdateSystem.js.map +1 -0
- package/dist/capabilities/sharedMilitaryInfrastructure.d.ts +89 -0
- package/dist/capabilities/sharedMilitaryInfrastructure.d.ts.map +1 -0
- package/dist/capabilities/sharedMilitaryInfrastructure.js +233 -0
- package/dist/capabilities/sharedMilitaryInfrastructure.js.map +1 -0
- package/dist/capabilities/simpleSecurityCapability.d.ts +36 -0
- package/dist/capabilities/simpleSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/simpleSecurityCapability.js +271 -0
- package/dist/capabilities/simpleSecurityCapability.js.map +1 -0
- package/dist/capabilities/toolManifest.d.ts +3 -0
- package/dist/capabilities/toolManifest.d.ts.map +1 -0
- package/dist/capabilities/toolManifest.js +163 -0
- package/dist/capabilities/toolManifest.js.map +1 -0
- package/dist/capabilities/toolRegistry.d.ts +25 -0
- package/dist/capabilities/toolRegistry.d.ts.map +1 -0
- package/dist/capabilities/toolRegistry.js +150 -0
- package/dist/capabilities/toolRegistry.js.map +1 -0
- package/dist/capabilities/ultimateChineseCno.d.ts +115 -0
- package/dist/capabilities/ultimateChineseCno.d.ts.map +1 -0
- package/dist/capabilities/ultimateChineseCno.js +516 -0
- package/dist/capabilities/ultimateChineseCno.js.map +1 -0
- package/dist/capabilities/ultimateIntegrationDemo.d.ts +54 -0
- package/dist/capabilities/ultimateIntegrationDemo.d.ts.map +1 -0
- package/dist/capabilities/ultimateIntegrationDemo.js +423 -0
- package/dist/capabilities/ultimateIntegrationDemo.js.map +1 -0
- package/dist/capabilities/unifiedMilitaryCapability.d.ts +63 -0
- package/dist/capabilities/unifiedMilitaryCapability.d.ts.map +1 -0
- package/dist/capabilities/unifiedMilitaryCapability.js +384 -0
- package/dist/capabilities/unifiedMilitaryCapability.js.map +1 -0
- package/dist/capabilities/universalCapabilityFramework.d.ts +352 -0
- package/dist/capabilities/universalCapabilityFramework.d.ts.map +1 -0
- package/dist/capabilities/universalCapabilityFramework.js +1056 -0
- package/dist/capabilities/universalCapabilityFramework.js.map +1 -0
- package/dist/capabilities/universalSecurityCapability.d.ts +46 -0
- package/dist/capabilities/universalSecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/universalSecurityCapability.js +580 -0
- package/dist/capabilities/universalSecurityCapability.js.map +1 -0
- package/dist/capabilities/webCapability.d.ts +23 -0
- package/dist/capabilities/webCapability.d.ts.map +1 -0
- package/dist/capabilities/webCapability.js +33 -0
- package/dist/capabilities/webCapability.js.map +1 -0
- package/dist/capabilities/zeroDayDiscoveryCapability.d.ts +31 -0
- package/dist/capabilities/zeroDayDiscoveryCapability.d.ts.map +1 -0
- package/dist/capabilities/zeroDayDiscoveryCapability.js +183 -0
- package/dist/capabilities/zeroDayDiscoveryCapability.js.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +155 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts/agent-profiles.schema.json +43 -0
- package/dist/contracts/agent-schemas.json +466 -0
- package/dist/contracts/models.schema.json +9 -0
- package/dist/contracts/module-schema.json +430 -0
- package/dist/contracts/schemas/agent-profile.schema.json +157 -0
- package/dist/contracts/schemas/agent-rules.schema.json +238 -0
- package/dist/contracts/schemas/agent-schemas.schema.json +528 -0
- package/dist/contracts/schemas/agent.schema.json +90 -0
- package/dist/contracts/schemas/tool-selection.schema.json +174 -0
- package/dist/contracts/tools.schema.json +82 -0
- package/dist/contracts/unified-schema.json +757 -0
- package/dist/contracts/v1/agent.d.ts +179 -0
- package/dist/contracts/v1/agent.d.ts.map +1 -0
- package/dist/contracts/v1/agent.js +8 -0
- package/dist/contracts/v1/agent.js.map +1 -0
- package/dist/contracts/v1/agentProfileManifest.d.ts +60 -0
- package/dist/contracts/v1/agentProfileManifest.d.ts.map +1 -0
- package/dist/contracts/v1/agentProfileManifest.js +9 -0
- package/dist/contracts/v1/agentProfileManifest.js.map +1 -0
- package/dist/contracts/v1/agentRules.d.ts +60 -0
- package/dist/contracts/v1/agentRules.d.ts.map +1 -0
- package/dist/contracts/v1/agentRules.js +10 -0
- package/dist/contracts/v1/agentRules.js.map +1 -0
- package/dist/contracts/v1/provider.d.ts +149 -0
- package/dist/contracts/v1/provider.d.ts.map +1 -0
- package/dist/contracts/v1/provider.js +7 -0
- package/dist/contracts/v1/provider.js.map +1 -0
- package/dist/contracts/v1/tool.d.ts +136 -0
- package/dist/contracts/v1/tool.d.ts.map +1 -0
- package/dist/contracts/v1/tool.js +7 -0
- package/dist/contracts/v1/tool.js.map +1 -0
- package/dist/contracts/v1/toolAccess.d.ts +43 -0
- package/dist/contracts/v1/toolAccess.d.ts.map +1 -0
- package/dist/contracts/v1/toolAccess.js +9 -0
- package/dist/contracts/v1/toolAccess.js.map +1 -0
- package/dist/core/agent.d.ts +287 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +1563 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/agentProfileManifest.d.ts +3 -0
- package/dist/core/agentProfileManifest.d.ts.map +1 -0
- package/dist/core/agentProfileManifest.js +188 -0
- package/dist/core/agentProfileManifest.js.map +1 -0
- package/dist/core/agentProfiles.d.ts +22 -0
- package/dist/core/agentProfiles.d.ts.map +1 -0
- package/dist/core/agentProfiles.js +35 -0
- package/dist/core/agentProfiles.js.map +1 -0
- package/dist/core/agentRulebook.d.ts +11 -0
- package/dist/core/agentRulebook.d.ts.map +1 -0
- package/dist/core/agentRulebook.js +136 -0
- package/dist/core/agentRulebook.js.map +1 -0
- package/dist/core/agentSchemaLoader.d.ts +131 -0
- package/dist/core/agentSchemaLoader.d.ts.map +1 -0
- package/dist/core/agentSchemaLoader.js +235 -0
- package/dist/core/agentSchemaLoader.js.map +1 -0
- package/dist/core/agiCore.d.ts +290 -0
- package/dist/core/agiCore.d.ts.map +1 -0
- package/dist/core/agiCore.js +1348 -0
- package/dist/core/agiCore.js.map +1 -0
- package/dist/core/aiErrorFixer.d.ts +57 -0
- package/dist/core/aiErrorFixer.d.ts.map +1 -0
- package/dist/core/aiErrorFixer.js +214 -0
- package/dist/core/aiErrorFixer.js.map +1 -0
- package/dist/core/antiTermination.d.ts +226 -0
- package/dist/core/antiTermination.d.ts.map +1 -0
- package/dist/core/antiTermination.js +713 -0
- package/dist/core/antiTermination.js.map +1 -0
- package/dist/core/appleSecurityAudit.d.ts +98 -0
- package/dist/core/appleSecurityAudit.d.ts.map +1 -0
- package/dist/core/appleSecurityAudit.js +505 -0
- package/dist/core/appleSecurityAudit.js.map +1 -0
- package/dist/core/appleSecurityIntegration.d.ts +130 -0
- package/dist/core/appleSecurityIntegration.d.ts.map +1 -0
- package/dist/core/appleSecurityIntegration.js +697 -0
- package/dist/core/appleSecurityIntegration.js.map +1 -0
- package/dist/core/bashCommandGuidance.d.ts +16 -0
- package/dist/core/bashCommandGuidance.d.ts.map +1 -0
- package/dist/core/bashCommandGuidance.js +40 -0
- package/dist/core/bashCommandGuidance.js.map +1 -0
- package/dist/core/constants.d.ts +31 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +62 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/contextManager.d.ts +271 -0
- package/dist/core/contextManager.d.ts.map +1 -0
- package/dist/core/contextManager.js +1073 -0
- package/dist/core/contextManager.js.map +1 -0
- package/dist/core/contextWindow.d.ts +42 -0
- package/dist/core/contextWindow.d.ts.map +1 -0
- package/dist/core/contextWindow.js +123 -0
- package/dist/core/contextWindow.js.map +1 -0
- package/dist/core/customCommands.d.ts +19 -0
- package/dist/core/customCommands.d.ts.map +1 -0
- package/dist/core/customCommands.js +85 -0
- package/dist/core/customCommands.js.map +1 -0
- package/dist/core/deepBugAnalyzer.d.ts +25 -0
- package/dist/core/deepBugAnalyzer.d.ts.map +1 -0
- package/dist/core/deepBugAnalyzer.js +44 -0
- package/dist/core/deepBugAnalyzer.js.map +1 -0
- package/dist/core/dualTournament.d.ts +110 -0
- package/dist/core/dualTournament.d.ts.map +1 -0
- package/dist/core/dualTournament.js +270 -0
- package/dist/core/dualTournament.js.map +1 -0
- package/dist/core/dynamicGuardrails.d.ts +207 -0
- package/dist/core/dynamicGuardrails.d.ts.map +1 -0
- package/dist/core/dynamicGuardrails.js +516 -0
- package/dist/core/dynamicGuardrails.js.map +1 -0
- package/dist/core/embeddingProviders.d.ts +80 -0
- package/dist/core/embeddingProviders.d.ts.map +1 -0
- package/dist/core/embeddingProviders.js +241 -0
- package/dist/core/embeddingProviders.js.map +1 -0
- package/dist/core/episodicMemory.d.ts +259 -0
- package/dist/core/episodicMemory.d.ts.map +1 -0
- package/dist/core/episodicMemory.js +833 -0
- package/dist/core/episodicMemory.js.map +1 -0
- package/dist/core/errors/apiKeyErrors.d.ts +11 -0
- package/dist/core/errors/apiKeyErrors.d.ts.map +1 -0
- package/dist/core/errors/apiKeyErrors.js +159 -0
- package/dist/core/errors/apiKeyErrors.js.map +1 -0
- package/dist/core/errors/errorTypes.d.ts +111 -0
- package/dist/core/errors/errorTypes.d.ts.map +1 -0
- package/dist/core/errors/errorTypes.js +345 -0
- package/dist/core/errors/errorTypes.js.map +1 -0
- package/dist/core/errors/index.d.ts +50 -0
- package/dist/core/errors/index.d.ts.map +1 -0
- package/dist/core/errors/index.js +156 -0
- package/dist/core/errors/index.js.map +1 -0
- package/dist/core/errors/networkErrors.d.ts +14 -0
- package/dist/core/errors/networkErrors.d.ts.map +1 -0
- package/dist/core/errors/networkErrors.js +53 -0
- package/dist/core/errors/networkErrors.js.map +1 -0
- package/dist/core/errors/safetyValidator.d.ts +115 -0
- package/dist/core/errors/safetyValidator.d.ts.map +1 -0
- package/dist/core/errors/safetyValidator.js +302 -0
- package/dist/core/errors/safetyValidator.js.map +1 -0
- package/dist/core/errors.d.ts +4 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +33 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/finalResponseFormatter.d.ts +10 -0
- package/dist/core/finalResponseFormatter.d.ts.map +1 -0
- package/dist/core/finalResponseFormatter.js +14 -0
- package/dist/core/finalResponseFormatter.js.map +1 -0
- package/dist/core/flowProtection.d.ts +154 -0
- package/dist/core/flowProtection.d.ts.map +1 -0
- package/dist/core/flowProtection.js +436 -0
- package/dist/core/flowProtection.js.map +1 -0
- package/dist/core/gitWorktreeManager.d.ts +126 -0
- package/dist/core/gitWorktreeManager.d.ts.map +1 -0
- package/dist/core/gitWorktreeManager.js +403 -0
- package/dist/core/gitWorktreeManager.js.map +1 -0
- package/dist/core/guardrails.d.ts +150 -0
- package/dist/core/guardrails.d.ts.map +1 -0
- package/dist/core/guardrails.js +360 -0
- package/dist/core/guardrails.js.map +1 -0
- package/dist/core/hallucinationGuard.d.ts +57 -0
- package/dist/core/hallucinationGuard.d.ts.map +1 -0
- package/dist/core/hallucinationGuard.js +237 -0
- package/dist/core/hallucinationGuard.js.map +1 -0
- package/dist/core/hooks.d.ts +113 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +364 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/hotReload.d.ts +154 -0
- package/dist/core/hotReload.d.ts.map +1 -0
- package/dist/core/hotReload.js +451 -0
- package/dist/core/hotReload.js.map +1 -0
- package/dist/core/hypothesisEngine.d.ts +27 -0
- package/dist/core/hypothesisEngine.d.ts.map +1 -0
- package/dist/core/hypothesisEngine.js +58 -0
- package/dist/core/hypothesisEngine.js.map +1 -0
- package/dist/core/index.d.ts +26 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +54 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/inputProtection.d.ts +122 -0
- package/dist/core/inputProtection.d.ts.map +1 -0
- package/dist/core/inputProtection.js +421 -0
- package/dist/core/inputProtection.js.map +1 -0
- package/dist/core/liveGCPVerification.d.ts +41 -0
- package/dist/core/liveGCPVerification.d.ts.map +1 -0
- package/dist/core/liveGCPVerification.js +745 -0
- package/dist/core/liveGCPVerification.js.map +1 -0
- package/dist/core/modelDiscovery.d.ts +105 -0
- package/dist/core/modelDiscovery.d.ts.map +1 -0
- package/dist/core/modelDiscovery.js +740 -0
- package/dist/core/modelDiscovery.js.map +1 -0
- package/dist/core/multilinePasteHandler.d.ts +35 -0
- package/dist/core/multilinePasteHandler.d.ts.map +1 -0
- package/dist/core/multilinePasteHandler.js +80 -0
- package/dist/core/multilinePasteHandler.js.map +1 -0
- package/dist/core/parallel.d.ts +85 -0
- package/dist/core/parallel.d.ts.map +1 -0
- package/dist/core/parallel.js +150 -0
- package/dist/core/parallel.js.map +1 -0
- package/dist/core/parallelCoordinator.d.ts +21 -0
- package/dist/core/parallelCoordinator.d.ts.map +1 -0
- package/dist/core/parallelCoordinator.js +42 -0
- package/dist/core/parallelCoordinator.js.map +1 -0
- package/dist/core/parallelExecutor.d.ts +215 -0
- package/dist/core/parallelExecutor.d.ts.map +1 -0
- package/dist/core/parallelExecutor.js +584 -0
- package/dist/core/parallelExecutor.js.map +1 -0
- package/dist/core/preferences.d.ts +71 -0
- package/dist/core/preferences.d.ts.map +1 -0
- package/dist/core/preferences.js +341 -0
- package/dist/core/preferences.js.map +1 -0
- package/dist/core/productTestHarness.d.ts +46 -0
- package/dist/core/productTestHarness.d.ts.map +1 -0
- package/dist/core/productTestHarness.js +128 -0
- package/dist/core/productTestHarness.js.map +1 -0
- package/dist/core/providerKeys.d.ts +20 -0
- package/dist/core/providerKeys.d.ts.map +1 -0
- package/dist/core/providerKeys.js +40 -0
- package/dist/core/providerKeys.js.map +1 -0
- package/dist/core/realityScore.d.ts +159 -0
- package/dist/core/realityScore.d.ts.map +1 -0
- package/dist/core/realityScore.js +734 -0
- package/dist/core/realityScore.js.map +1 -0
- package/dist/core/repoUpgradeOrchestrator.d.ts +223 -0
- package/dist/core/repoUpgradeOrchestrator.d.ts.map +1 -0
- package/dist/core/repoUpgradeOrchestrator.js +1003 -0
- package/dist/core/repoUpgradeOrchestrator.js.map +1 -0
- package/dist/core/resultVerification.d.ts +47 -0
- package/dist/core/resultVerification.d.ts.map +1 -0
- package/dist/core/resultVerification.js +126 -0
- package/dist/core/resultVerification.js.map +1 -0
- package/dist/core/revenueEnvValidator.d.ts +30 -0
- package/dist/core/revenueEnvValidator.d.ts.map +1 -0
- package/dist/core/revenueEnvValidator.js +241 -0
- package/dist/core/revenueEnvValidator.js.map +1 -0
- package/dist/core/schemaValidator.d.ts +49 -0
- package/dist/core/schemaValidator.d.ts.map +1 -0
- package/dist/core/schemaValidator.js +234 -0
- package/dist/core/schemaValidator.js.map +1 -0
- package/dist/core/secretStore.d.ts +48 -0
- package/dist/core/secretStore.d.ts.map +1 -0
- package/dist/core/secretStore.js +295 -0
- package/dist/core/secretStore.js.map +1 -0
- package/dist/core/securityTournament.d.ts +83 -0
- package/dist/core/securityTournament.d.ts.map +1 -0
- package/dist/core/securityTournament.js +357 -0
- package/dist/core/securityTournament.js.map +1 -0
- package/dist/core/selfUpgrade.d.ts +253 -0
- package/dist/core/selfUpgrade.d.ts.map +1 -0
- package/dist/core/selfUpgrade.js +669 -0
- package/dist/core/selfUpgrade.js.map +1 -0
- package/dist/core/sessionStorage.d.ts +10 -0
- package/dist/core/sessionStorage.d.ts.map +1 -0
- package/dist/core/sessionStorage.js +46 -0
- package/dist/core/sessionStorage.js.map +1 -0
- package/dist/core/sessionStore.d.ts +35 -0
- package/dist/core/sessionStore.d.ts.map +1 -0
- package/dist/core/sessionStore.js +191 -0
- package/dist/core/sessionStore.js.map +1 -0
- package/dist/core/taskCompletionDetector.d.ts +112 -0
- package/dist/core/taskCompletionDetector.d.ts.map +1 -0
- package/dist/core/taskCompletionDetector.js +469 -0
- package/dist/core/taskCompletionDetector.js.map +1 -0
- package/dist/core/toolPreconditions.d.ts +34 -0
- package/dist/core/toolPreconditions.d.ts.map +1 -0
- package/dist/core/toolPreconditions.js +242 -0
- package/dist/core/toolPreconditions.js.map +1 -0
- package/dist/core/toolRuntime.d.ts +185 -0
- package/dist/core/toolRuntime.d.ts.map +1 -0
- package/dist/core/toolRuntime.js +412 -0
- package/dist/core/toolRuntime.js.map +1 -0
- package/dist/core/tournamentStrategy.d.ts +12 -0
- package/dist/core/tournamentStrategy.d.ts.map +1 -0
- package/dist/core/tournamentStrategy.js +41 -0
- package/dist/core/tournamentStrategy.js.map +1 -0
- package/dist/core/types/utilityTypes.d.ts +192 -0
- package/dist/core/types/utilityTypes.d.ts.map +1 -0
- package/dist/core/types/utilityTypes.js +272 -0
- package/dist/core/types/utilityTypes.js.map +1 -0
- package/dist/core/types.d.ts +334 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +76 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/unifiedOrchestrator.d.ts +47 -0
- package/dist/core/unifiedOrchestrator.d.ts.map +1 -0
- package/dist/core/unifiedOrchestrator.js +103 -0
- package/dist/core/unifiedOrchestrator.js.map +1 -0
- package/dist/core/universalSecurityAudit.d.ts +104 -0
- package/dist/core/universalSecurityAudit.d.ts.map +1 -0
- package/dist/core/universalSecurityAudit.js +2190 -0
- package/dist/core/universalSecurityAudit.js.map +1 -0
- package/dist/core/updateChecker.d.ts +148 -0
- package/dist/core/updateChecker.d.ts.map +1 -0
- package/dist/core/updateChecker.js +593 -0
- package/dist/core/updateChecker.js.map +1 -0
- package/dist/core/variantExecution.d.ts +23 -0
- package/dist/core/variantExecution.d.ts.map +1 -0
- package/dist/core/variantExecution.js +58 -0
- package/dist/core/variantExecution.js.map +1 -0
- package/dist/core/winnerStrategy.d.ts +15 -0
- package/dist/core/winnerStrategy.d.ts.map +1 -0
- package/dist/core/winnerStrategy.js +18 -0
- package/dist/core/winnerStrategy.js.map +1 -0
- package/dist/core/zeroDayDiscovery.d.ts +96 -0
- package/dist/core/zeroDayDiscovery.d.ts.map +1 -0
- package/dist/core/zeroDayDiscovery.js +358 -0
- package/dist/core/zeroDayDiscovery.js.map +1 -0
- package/dist/headless/interactiveShell.d.ts +22 -0
- package/dist/headless/interactiveShell.d.ts.map +1 -0
- package/dist/headless/interactiveShell.js +3799 -0
- package/dist/headless/interactiveShell.js.map +1 -0
- package/dist/headless/quickMode.d.ts +26 -0
- package/dist/headless/quickMode.d.ts.map +1 -0
- package/dist/headless/quickMode.js +226 -0
- package/dist/headless/quickMode.js.map +1 -0
- package/dist/orchestration/index.d.ts +10 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +13 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/repoUpgradeRunner.d.ts +44 -0
- package/dist/orchestration/repoUpgradeRunner.d.ts.map +1 -0
- package/dist/orchestration/repoUpgradeRunner.js +375 -0
- package/dist/orchestration/repoUpgradeRunner.js.map +1 -0
- package/dist/orchestration/securityAuditRunner.d.ts +144 -0
- package/dist/orchestration/securityAuditRunner.d.ts.map +1 -0
- package/dist/orchestration/securityAuditRunner.js +526 -0
- package/dist/orchestration/securityAuditRunner.js.map +1 -0
- package/dist/plugins/index.d.ts +49 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +105 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/providers/deepseek/index.d.ts +11 -0
- package/dist/plugins/providers/deepseek/index.d.ts.map +1 -0
- package/dist/plugins/providers/deepseek/index.js +54 -0
- package/dist/plugins/providers/deepseek/index.js.map +1 -0
- package/dist/plugins/providers/index.d.ts +2 -0
- package/dist/plugins/providers/index.d.ts.map +1 -0
- package/dist/plugins/providers/index.js +11 -0
- package/dist/plugins/providers/index.js.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +3 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +27 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +1 -0
- package/dist/plugins/tools/apple/secureApplePlugin.d.ts +3 -0
- package/dist/plugins/tools/apple/secureApplePlugin.d.ts.map +1 -0
- package/dist/plugins/tools/apple/secureApplePlugin.js +26 -0
- package/dist/plugins/tools/apple/secureApplePlugin.js.map +1 -0
- package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.d.ts +3 -0
- package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.js +9 -0
- package/dist/plugins/tools/authorizedSecurity/authorizedSecurityPlugin.js.map +1 -0
- package/dist/plugins/tools/bash/localBashPlugin.d.ts +3 -0
- package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/bash/localBashPlugin.js +14 -0
- package/dist/plugins/tools/bash/localBashPlugin.js.map +1 -0
- package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts +3 -0
- package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js +27 -0
- package/dist/plugins/tools/bidirectionalAudit/bidirectionalAuditPlugin.js.map +1 -0
- package/dist/plugins/tools/edit/editPlugin.d.ts +9 -0
- package/dist/plugins/tools/edit/editPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/edit/editPlugin.js +15 -0
- package/dist/plugins/tools/edit/editPlugin.js.map +1 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +3 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +9 -0
- package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +1 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +3 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +14 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +1 -0
- package/dist/plugins/tools/gitHistory/gitHistoryPlugin.d.ts +3 -0
- package/dist/plugins/tools/gitHistory/gitHistoryPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/gitHistory/gitHistoryPlugin.js +9 -0
- package/dist/plugins/tools/gitHistory/gitHistoryPlugin.js.map +1 -0
- package/dist/plugins/tools/index.d.ts +3 -0
- package/dist/plugins/tools/index.d.ts.map +1 -0
- package/dist/plugins/tools/index.js +3 -0
- package/dist/plugins/tools/index.js.map +1 -0
- package/dist/plugins/tools/integrity/integrityPlugin.d.ts +3 -0
- package/dist/plugins/tools/integrity/integrityPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/integrity/integrityPlugin.js +31 -0
- package/dist/plugins/tools/integrity/integrityPlugin.js.map +1 -0
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts +3 -0
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js +27 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts +15 -0
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
- package/dist/plugins/tools/nodeDefaults.js +37 -0
- package/dist/plugins/tools/nodeDefaults.js.map +1 -0
- package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.d.ts +3 -0
- package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.js +9 -0
- package/dist/plugins/tools/offensiveDestruction/offensiveDestructionPlugin.js.map +1 -0
- package/dist/plugins/tools/orchestration/orchestrationPlugin.d.ts +3 -0
- package/dist/plugins/tools/orchestration/orchestrationPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/orchestration/orchestrationPlugin.js +340 -0
- package/dist/plugins/tools/orchestration/orchestrationPlugin.js.map +1 -0
- package/dist/plugins/tools/registry.d.ts +22 -0
- package/dist/plugins/tools/registry.d.ts.map +1 -0
- package/dist/plugins/tools/registry.js +58 -0
- package/dist/plugins/tools/registry.js.map +1 -0
- package/dist/plugins/tools/search/localSearchPlugin.d.ts +3 -0
- package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/search/localSearchPlugin.js +14 -0
- package/dist/plugins/tools/search/localSearchPlugin.js.map +1 -0
- package/dist/plugins/tools/skills/skillPlugin.d.ts +3 -0
- package/dist/plugins/tools/skills/skillPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/skills/skillPlugin.js +27 -0
- package/dist/plugins/tools/skills/skillPlugin.js.map +1 -0
- package/dist/plugins/tools/tao/secureTaoPlugin.d.ts +3 -0
- package/dist/plugins/tools/tao/secureTaoPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/tao/secureTaoPlugin.js +37 -0
- package/dist/plugins/tools/tao/secureTaoPlugin.js.map +1 -0
- package/dist/providers/baseProvider.d.ts +148 -0
- package/dist/providers/baseProvider.d.ts.map +1 -0
- package/dist/providers/baseProvider.js +284 -0
- package/dist/providers/baseProvider.js.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts +64 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.js +1000 -0
- package/dist/providers/openaiChatCompletionsProvider.js.map +1 -0
- package/dist/providers/providerFactory.d.ts +22 -0
- package/dist/providers/providerFactory.d.ts.map +1 -0
- package/dist/providers/providerFactory.js +25 -0
- package/dist/providers/providerFactory.js.map +1 -0
- package/dist/providers/resilientProvider.d.ts +103 -0
- package/dist/providers/resilientProvider.d.ts.map +1 -0
- package/dist/providers/resilientProvider.js +462 -0
- package/dist/providers/resilientProvider.js.map +1 -0
- package/dist/runtime/agentController.d.ts +114 -0
- package/dist/runtime/agentController.d.ts.map +1 -0
- package/dist/runtime/agentController.js +693 -0
- package/dist/runtime/agentController.js.map +1 -0
- package/dist/runtime/agentHost.d.ts +61 -0
- package/dist/runtime/agentHost.d.ts.map +1 -0
- package/dist/runtime/agentHost.js +157 -0
- package/dist/runtime/agentHost.js.map +1 -0
- package/dist/runtime/agentSession.d.ts +45 -0
- package/dist/runtime/agentSession.d.ts.map +1 -0
- package/dist/runtime/agentSession.js +210 -0
- package/dist/runtime/agentSession.js.map +1 -0
- package/dist/runtime/agentWorkerPool.d.ts +167 -0
- package/dist/runtime/agentWorkerPool.d.ts.map +1 -0
- package/dist/runtime/agentWorkerPool.js +435 -0
- package/dist/runtime/agentWorkerPool.js.map +1 -0
- package/dist/runtime/node.d.ts +7 -0
- package/dist/runtime/node.d.ts.map +1 -0
- package/dist/runtime/node.js +24 -0
- package/dist/runtime/node.js.map +1 -0
- package/dist/runtime/universal.d.ts +18 -0
- package/dist/runtime/universal.d.ts.map +1 -0
- package/dist/runtime/universal.js +21 -0
- package/dist/runtime/universal.js.map +1 -0
- package/dist/shell/autoExecutor.d.ts +70 -0
- package/dist/shell/autoExecutor.d.ts.map +1 -0
- package/dist/shell/autoExecutor.js +320 -0
- package/dist/shell/autoExecutor.js.map +1 -0
- package/dist/shell/commandRegistry.d.ts +122 -0
- package/dist/shell/commandRegistry.d.ts.map +1 -0
- package/dist/shell/commandRegistry.js +386 -0
- package/dist/shell/commandRegistry.js.map +1 -0
- package/dist/shell/composableMessage.d.ts +183 -0
- package/dist/shell/composableMessage.d.ts.map +1 -0
- package/dist/shell/composableMessage.js +420 -0
- package/dist/shell/composableMessage.js.map +1 -0
- package/dist/shell/liveStatus.d.ts +27 -0
- package/dist/shell/liveStatus.d.ts.map +1 -0
- package/dist/shell/liveStatus.js +53 -0
- package/dist/shell/liveStatus.js.map +1 -0
- package/dist/shell/systemPrompt.d.ts +12 -0
- package/dist/shell/systemPrompt.d.ts.map +1 -0
- package/dist/shell/systemPrompt.js +16 -0
- package/dist/shell/systemPrompt.js.map +1 -0
- package/dist/shell/vimMode.d.ts +66 -0
- package/dist/shell/vimMode.d.ts.map +1 -0
- package/dist/shell/vimMode.js +435 -0
- package/dist/shell/vimMode.js.map +1 -0
- package/dist/tools/bashTools.d.ts +6 -0
- package/dist/tools/bashTools.d.ts.map +1 -0
- package/dist/tools/bashTools.js +485 -0
- package/dist/tools/bashTools.js.map +1 -0
- package/dist/tools/diffUtils.d.ts +43 -0
- package/dist/tools/diffUtils.d.ts.map +1 -0
- package/dist/tools/diffUtils.js +607 -0
- package/dist/tools/diffUtils.js.map +1 -0
- package/dist/tools/editTools.d.ts +29 -0
- package/dist/tools/editTools.d.ts.map +1 -0
- package/dist/tools/editTools.js +702 -0
- package/dist/tools/editTools.js.map +1 -0
- package/dist/tools/emailTools.d.ts +140 -0
- package/dist/tools/emailTools.d.ts.map +1 -0
- package/dist/tools/emailTools.js +792 -0
- package/dist/tools/emailTools.js.map +1 -0
- package/dist/tools/fileReadTracker.d.ts +69 -0
- package/dist/tools/fileReadTracker.d.ts.map +1 -0
- package/dist/tools/fileReadTracker.js +213 -0
- package/dist/tools/fileReadTracker.js.map +1 -0
- package/dist/tools/fileTools.d.ts +3 -0
- package/dist/tools/fileTools.d.ts.map +1 -0
- package/dist/tools/fileTools.js +342 -0
- package/dist/tools/fileTools.js.map +1 -0
- package/dist/tools/grepTools.d.ts +3 -0
- package/dist/tools/grepTools.d.ts.map +1 -0
- package/dist/tools/grepTools.js +129 -0
- package/dist/tools/grepTools.js.map +1 -0
- package/dist/tools/humanOpsTools.d.ts +3 -0
- package/dist/tools/humanOpsTools.d.ts.map +1 -0
- package/dist/tools/humanOpsTools.js +86 -0
- package/dist/tools/humanOpsTools.js.map +1 -0
- package/dist/tools/localExplore.d.ts +38 -0
- package/dist/tools/localExplore.d.ts.map +1 -0
- package/dist/tools/localExplore.js +30 -0
- package/dist/tools/localExplore.js.map +1 -0
- package/dist/tools/metaTools.d.ts +3 -0
- package/dist/tools/metaTools.d.ts.map +1 -0
- package/dist/tools/metaTools.js +148 -0
- package/dist/tools/metaTools.js.map +1 -0
- package/dist/tools/planningTools.d.ts +12 -0
- package/dist/tools/planningTools.d.ts.map +1 -0
- package/dist/tools/planningTools.js +75 -0
- package/dist/tools/planningTools.js.map +1 -0
- package/dist/tools/searchTools.d.ts +12 -0
- package/dist/tools/searchTools.d.ts.map +1 -0
- package/dist/tools/searchTools.js +370 -0
- package/dist/tools/searchTools.js.map +1 -0
- package/dist/tools/secureAppleExploitation.d.ts +29 -0
- package/dist/tools/secureAppleExploitation.d.ts.map +1 -0
- package/dist/tools/secureAppleExploitation.js +518 -0
- package/dist/tools/secureAppleExploitation.js.map +1 -0
- package/dist/tools/telemetryTools.d.ts +5 -0
- package/dist/tools/telemetryTools.d.ts.map +1 -0
- package/dist/tools/telemetryTools.js +9 -0
- package/dist/tools/telemetryTools.js.map +1 -0
- package/dist/tools/unifiedOps.d.ts +3 -0
- package/dist/tools/unifiedOps.d.ts.map +1 -0
- package/dist/tools/unifiedOps.js +57 -0
- package/dist/tools/unifiedOps.js.map +1 -0
- package/dist/tools/webTools.d.ts +26 -0
- package/dist/tools/webTools.d.ts.map +1 -0
- package/dist/tools/webTools.js +227 -0
- package/dist/tools/webTools.js.map +1 -0
- package/dist/ui/PromptController.d.ts +174 -0
- package/dist/ui/PromptController.d.ts.map +1 -0
- package/dist/ui/PromptController.js +351 -0
- package/dist/ui/PromptController.js.map +1 -0
- package/dist/ui/UnifiedUIRenderer.d.ts +779 -0
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -0
- package/dist/ui/UnifiedUIRenderer.js +5458 -0
- package/dist/ui/UnifiedUIRenderer.js.map +1 -0
- package/dist/ui/animatedStatus.d.ts +140 -0
- package/dist/ui/animatedStatus.d.ts.map +1 -0
- package/dist/ui/animatedStatus.js +480 -0
- package/dist/ui/animatedStatus.js.map +1 -0
- package/dist/ui/animation/AnimationScheduler.d.ts +197 -0
- package/dist/ui/animation/AnimationScheduler.d.ts.map +1 -0
- package/dist/ui/animation/AnimationScheduler.js +440 -0
- package/dist/ui/animation/AnimationScheduler.js.map +1 -0
- package/dist/ui/codeHighlighter.d.ts +6 -0
- package/dist/ui/codeHighlighter.d.ts.map +1 -0
- package/dist/ui/codeHighlighter.js +855 -0
- package/dist/ui/codeHighlighter.js.map +1 -0
- package/dist/ui/designSystem.d.ts +26 -0
- package/dist/ui/designSystem.d.ts.map +1 -0
- package/dist/ui/designSystem.js +114 -0
- package/dist/ui/designSystem.js.map +1 -0
- package/dist/ui/errorFormatter.d.ts +64 -0
- package/dist/ui/errorFormatter.d.ts.map +1 -0
- package/dist/ui/errorFormatter.js +316 -0
- package/dist/ui/errorFormatter.js.map +1 -0
- package/dist/ui/globalWriteLock.d.ts +63 -0
- package/dist/ui/globalWriteLock.d.ts.map +1 -0
- package/dist/ui/globalWriteLock.js +173 -0
- package/dist/ui/globalWriteLock.js.map +1 -0
- package/dist/ui/index.d.ts +32 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +54 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/interrupts/InterruptManager.d.ts +157 -0
- package/dist/ui/interrupts/InterruptManager.d.ts.map +1 -0
- package/dist/ui/interrupts/InterruptManager.js +501 -0
- package/dist/ui/interrupts/InterruptManager.js.map +1 -0
- package/dist/ui/layout.d.ts +27 -0
- package/dist/ui/layout.d.ts.map +1 -0
- package/dist/ui/layout.js +184 -0
- package/dist/ui/layout.js.map +1 -0
- package/dist/ui/maxOffensiveUkraineUI.d.ts +94 -0
- package/dist/ui/maxOffensiveUkraineUI.d.ts.map +1 -0
- package/dist/ui/maxOffensiveUkraineUI.js +316 -0
- package/dist/ui/maxOffensiveUkraineUI.js.map +1 -0
- package/dist/ui/outputMode.d.ts +44 -0
- package/dist/ui/outputMode.d.ts.map +1 -0
- package/dist/ui/outputMode.js +123 -0
- package/dist/ui/outputMode.js.map +1 -0
- package/dist/ui/overlay/OverlayManager.d.ts +105 -0
- package/dist/ui/overlay/OverlayManager.d.ts.map +1 -0
- package/dist/ui/overlay/OverlayManager.js +291 -0
- package/dist/ui/overlay/OverlayManager.js.map +1 -0
- package/dist/ui/premiumComponents.d.ts +54 -0
- package/dist/ui/premiumComponents.d.ts.map +1 -0
- package/dist/ui/premiumComponents.js +241 -0
- package/dist/ui/premiumComponents.js.map +1 -0
- package/dist/ui/richText.d.ts +13 -0
- package/dist/ui/richText.d.ts.map +1 -0
- package/dist/ui/richText.js +443 -0
- package/dist/ui/richText.js.map +1 -0
- package/dist/ui/telemetry/ResponseTracker.d.ts +22 -0
- package/dist/ui/telemetry/ResponseTracker.d.ts.map +1 -0
- package/dist/ui/telemetry/ResponseTracker.js +60 -0
- package/dist/ui/telemetry/ResponseTracker.js.map +1 -0
- package/dist/ui/telemetry/UITelemetry.d.ts +181 -0
- package/dist/ui/telemetry/UITelemetry.d.ts.map +1 -0
- package/dist/ui/telemetry/UITelemetry.js +446 -0
- package/dist/ui/telemetry/UITelemetry.js.map +1 -0
- package/dist/ui/textHighlighter.d.ts +83 -0
- package/dist/ui/textHighlighter.d.ts.map +1 -0
- package/dist/ui/textHighlighter.js +267 -0
- package/dist/ui/textHighlighter.js.map +1 -0
- package/dist/ui/theme.d.ts +364 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +471 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/toolDisplay.d.ts +221 -0
- package/dist/ui/toolDisplay.d.ts.map +1 -0
- package/dist/ui/toolDisplay.js +1654 -0
- package/dist/ui/toolDisplay.js.map +1 -0
- package/dist/ui/uiConstants.d.ts +288 -0
- package/dist/ui/uiConstants.d.ts.map +1 -0
- package/dist/ui/uiConstants.js +472 -0
- package/dist/ui/uiConstants.js.map +1 -0
- package/dist/utils/askUserPrompt.d.ts +21 -0
- package/dist/utils/askUserPrompt.d.ts.map +1 -0
- package/dist/utils/askUserPrompt.js +87 -0
- package/dist/utils/askUserPrompt.js.map +1 -0
- package/dist/utils/asyncUtils.d.ts +95 -0
- package/dist/utils/asyncUtils.d.ts.map +1 -0
- package/dist/utils/asyncUtils.js +286 -0
- package/dist/utils/asyncUtils.js.map +1 -0
- package/dist/utils/debugLogger.d.ts +6 -0
- package/dist/utils/debugLogger.d.ts.map +1 -0
- package/dist/utils/debugLogger.js +39 -0
- package/dist/utils/debugLogger.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +12 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +83 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +10 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +78 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/packageInfo.d.ts +14 -0
- package/dist/utils/packageInfo.d.ts.map +1 -0
- package/dist/utils/packageInfo.js +45 -0
- package/dist/utils/packageInfo.js.map +1 -0
- package/dist/utils/planFormatter.d.ts +34 -0
- package/dist/utils/planFormatter.d.ts.map +1 -0
- package/dist/utils/planFormatter.js +141 -0
- package/dist/utils/planFormatter.js.map +1 -0
- package/dist/utils/securityUtils.d.ts +132 -0
- package/dist/utils/securityUtils.d.ts.map +1 -0
- package/dist/utils/securityUtils.js +324 -0
- package/dist/utils/securityUtils.js.map +1 -0
- package/dist/workspace.d.ts +8 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +134 -0
- package/dist/workspace.js.map +1 -0
- package/dist/workspace.validator.d.ts +49 -0
- package/dist/workspace.validator.d.ts.map +1 -0
- package/dist/workspace.validator.js +215 -0
- package/dist/workspace.validator.js.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { mkdir } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { reportToolProgress } from '../core/toolRuntime.js';
|
|
5
|
+
import { validateBashCommand } from '../core/errors/safetyValidator.js';
|
|
6
|
+
import { analyzeBashFlow } from '../core/bashCommandGuidance.js';
|
|
7
|
+
import { buildError } from '../core/errors.js';
|
|
8
|
+
import { verifiedSuccess, verifiedFailure, analyzeOutput, OutputPatterns, createCommandCheck, } from '../core/resultVerification.js';
|
|
9
|
+
import { createErrorFixer } from '../core/aiErrorFixer.js';
|
|
10
|
+
import { logDebug } from '../utils/debugLogger.js';
|
|
11
|
+
// ANSI color codes for enhanced output
|
|
12
|
+
const ANSI_RESET = '\x1b[0m';
|
|
13
|
+
const ANSI_RED = '\x1b[31m';
|
|
14
|
+
const ANSI_GREEN = '\x1b[32m';
|
|
15
|
+
const ANSI_YELLOW = '\x1b[33m';
|
|
16
|
+
const ANSI_BLUE = '\x1b[34m';
|
|
17
|
+
const ANSI_CYAN = '\x1b[36m';
|
|
18
|
+
const ANSI_DIM = '\x1b[2m';
|
|
19
|
+
const ANSI_BOLD = '\x1b[1m';
|
|
20
|
+
const ANSI_RED_BOLD = '\x1b[1;31m';
|
|
21
|
+
const ANSI_GREEN_BOLD = '\x1b[1;32m';
|
|
22
|
+
const ANSI_YELLOW_BOLD = '\x1b[1;33m';
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Background Shell Manager (consolidated from backgroundBashTools.ts)
|
|
25
|
+
// ============================================================================
|
|
26
|
+
class BackgroundShell {
|
|
27
|
+
id;
|
|
28
|
+
command;
|
|
29
|
+
workingDir;
|
|
30
|
+
process;
|
|
31
|
+
outputBuffer = [];
|
|
32
|
+
errorBuffer = [];
|
|
33
|
+
lastReadPosition = 0;
|
|
34
|
+
isRunning = false;
|
|
35
|
+
exitCode;
|
|
36
|
+
constructor(id, command, workingDir) {
|
|
37
|
+
this.id = id;
|
|
38
|
+
this.command = command;
|
|
39
|
+
this.workingDir = workingDir;
|
|
40
|
+
}
|
|
41
|
+
start() {
|
|
42
|
+
this.process = spawn('bash', ['-c', this.command], {
|
|
43
|
+
cwd: this.workingDir,
|
|
44
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
45
|
+
});
|
|
46
|
+
this.isRunning = true;
|
|
47
|
+
this.process.stdout?.on('data', (data) => {
|
|
48
|
+
this.outputBuffer.push(data.toString());
|
|
49
|
+
});
|
|
50
|
+
this.process.stderr?.on('data', (data) => {
|
|
51
|
+
this.errorBuffer.push(data.toString());
|
|
52
|
+
});
|
|
53
|
+
this.process.on('exit', (code) => {
|
|
54
|
+
this.exitCode = code ?? 0;
|
|
55
|
+
this.isRunning = false;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
getNewOutput(filter) {
|
|
59
|
+
const allOutput = this.outputBuffer.join('');
|
|
60
|
+
const newOutput = allOutput.substring(this.lastReadPosition);
|
|
61
|
+
this.lastReadPosition = allOutput.length;
|
|
62
|
+
const allError = this.errorBuffer.join('');
|
|
63
|
+
let stdout = newOutput;
|
|
64
|
+
if (filter) {
|
|
65
|
+
const lines = newOutput.split('\n');
|
|
66
|
+
stdout = lines.filter(line => filter.test(line)).join('\n');
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
stdout,
|
|
70
|
+
stderr: allError,
|
|
71
|
+
status: this.isRunning ? 'running' : `exited with code ${this.exitCode}`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
kill() {
|
|
75
|
+
if (this.process) {
|
|
76
|
+
this.process.kill('SIGTERM');
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
if (this.process && !this.process.killed) {
|
|
79
|
+
this.process.kill('SIGKILL');
|
|
80
|
+
}
|
|
81
|
+
}, 5000);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class BackgroundShellManager {
|
|
86
|
+
shells = new Map();
|
|
87
|
+
nextId = 1;
|
|
88
|
+
createShell(command, workingDir) {
|
|
89
|
+
const shellId = `shell_${this.nextId++}`;
|
|
90
|
+
const shell = new BackgroundShell(shellId, command, workingDir);
|
|
91
|
+
this.shells.set(shellId, shell);
|
|
92
|
+
shell.start();
|
|
93
|
+
return shellId;
|
|
94
|
+
}
|
|
95
|
+
getShell(shellId) {
|
|
96
|
+
return this.shells.get(shellId);
|
|
97
|
+
}
|
|
98
|
+
killShell(shellId) {
|
|
99
|
+
const shell = this.shells.get(shellId);
|
|
100
|
+
if (shell) {
|
|
101
|
+
shell.kill();
|
|
102
|
+
this.shells.delete(shellId);
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
listShells() {
|
|
108
|
+
return Array.from(this.shells.keys());
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Global shell manager instance
|
|
112
|
+
const shellManager = new BackgroundShellManager();
|
|
113
|
+
// ============================================================================
|
|
114
|
+
// Streaming Execution
|
|
115
|
+
// ============================================================================
|
|
116
|
+
async function execWithStreaming(command, options) {
|
|
117
|
+
const MAX_BUFFER_BYTES = 1_000_000; // ~1MB per stream to prevent OOM on chatty commands
|
|
118
|
+
return new Promise((resolve, reject) => {
|
|
119
|
+
const stdout = [];
|
|
120
|
+
const stderr = [];
|
|
121
|
+
let stdoutBytes = 0;
|
|
122
|
+
let stderrBytes = 0;
|
|
123
|
+
let stdoutTruncated = false;
|
|
124
|
+
let stderrTruncated = false;
|
|
125
|
+
let lineCount = 0;
|
|
126
|
+
let killed = false;
|
|
127
|
+
const child = spawn('bash', ['-c', command], {
|
|
128
|
+
cwd: options.cwd,
|
|
129
|
+
env: options.env,
|
|
130
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
131
|
+
});
|
|
132
|
+
const timeoutId = setTimeout(() => {
|
|
133
|
+
killed = true;
|
|
134
|
+
child.kill('SIGTERM');
|
|
135
|
+
setTimeout(() => child.kill('SIGKILL'), 1000);
|
|
136
|
+
}, options.timeout);
|
|
137
|
+
const processLine = (line, isStderr) => {
|
|
138
|
+
lineCount++;
|
|
139
|
+
const trimmedLine = line.slice(0, 80);
|
|
140
|
+
reportToolProgress({
|
|
141
|
+
current: lineCount,
|
|
142
|
+
message: isStderr ? `stderr: ${trimmedLine}` : trimmedLine,
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
const appendChunk = (chunks, data, isStdout) => {
|
|
146
|
+
const byteLength = data.length;
|
|
147
|
+
const used = isStdout ? stdoutBytes : stderrBytes;
|
|
148
|
+
const available = MAX_BUFFER_BYTES - used;
|
|
149
|
+
if (available <= 0) {
|
|
150
|
+
if (isStdout)
|
|
151
|
+
stdoutTruncated = true;
|
|
152
|
+
else
|
|
153
|
+
stderrTruncated = true;
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const slice = byteLength > available ? data.subarray(0, available) : data;
|
|
157
|
+
chunks.push(slice.toString());
|
|
158
|
+
const consumed = slice.length; // Buffer length in bytes
|
|
159
|
+
if (isStdout) {
|
|
160
|
+
stdoutBytes += consumed;
|
|
161
|
+
if (byteLength > available)
|
|
162
|
+
stdoutTruncated = true;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
stderrBytes += consumed;
|
|
166
|
+
if (byteLength > available)
|
|
167
|
+
stderrTruncated = true;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
let stdoutBuffer = '';
|
|
171
|
+
child.stdout?.on('data', (data) => {
|
|
172
|
+
const text = data.toString();
|
|
173
|
+
appendChunk(stdout, data, true);
|
|
174
|
+
stdoutBuffer += text;
|
|
175
|
+
if (stdoutBuffer.length > 4096) {
|
|
176
|
+
stdoutBuffer = stdoutBuffer.slice(-2048);
|
|
177
|
+
}
|
|
178
|
+
const lines = stdoutBuffer.split('\n');
|
|
179
|
+
stdoutBuffer = lines.pop() || '';
|
|
180
|
+
for (const line of lines) {
|
|
181
|
+
if (line.trim())
|
|
182
|
+
processLine(line, false);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
let stderrBuffer = '';
|
|
186
|
+
child.stderr?.on('data', (data) => {
|
|
187
|
+
const text = data.toString();
|
|
188
|
+
appendChunk(stderr, data, false);
|
|
189
|
+
stderrBuffer += text;
|
|
190
|
+
if (stderrBuffer.length > 4096) {
|
|
191
|
+
stderrBuffer = stderrBuffer.slice(-2048);
|
|
192
|
+
}
|
|
193
|
+
const lines = stderrBuffer.split('\n');
|
|
194
|
+
stderrBuffer = lines.pop() || '';
|
|
195
|
+
for (const line of lines) {
|
|
196
|
+
if (line.trim())
|
|
197
|
+
processLine(line, true);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
const buildOutput = (chunks, truncated) => {
|
|
201
|
+
const output = chunks.join('');
|
|
202
|
+
if (!truncated)
|
|
203
|
+
return output;
|
|
204
|
+
const limitKb = Math.round(MAX_BUFFER_BYTES / 1024);
|
|
205
|
+
const notice = `\n[output truncated after ${limitKb}KB to protect memory; rerun with narrower command to see full output]`;
|
|
206
|
+
return output ? `${output}${notice}` : notice.trim();
|
|
207
|
+
};
|
|
208
|
+
child.on('close', (code) => {
|
|
209
|
+
clearTimeout(timeoutId);
|
|
210
|
+
if (stdoutBuffer.trim())
|
|
211
|
+
processLine(stdoutBuffer, false);
|
|
212
|
+
if (stderrBuffer.trim())
|
|
213
|
+
processLine(stderrBuffer, true);
|
|
214
|
+
const stdoutText = buildOutput(stdout, stdoutTruncated);
|
|
215
|
+
const stderrText = buildOutput(stderr, stderrTruncated);
|
|
216
|
+
if (killed) {
|
|
217
|
+
reject({ killed: true, stdout: stdoutText, stderr: stderrText, code });
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
resolve({ stdout: stdoutText, stderr: stderrText, exitCode: code ?? 0 });
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
child.on('error', (error) => {
|
|
224
|
+
clearTimeout(timeoutId);
|
|
225
|
+
reject(error);
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
// ============================================================================
|
|
230
|
+
// Utility Functions
|
|
231
|
+
// ============================================================================
|
|
232
|
+
// Keep the shell responsive while long commands run
|
|
233
|
+
function findGuiLauncher(_command) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
const errorFixerCache = new Map();
|
|
237
|
+
function getErrorFixer(workingDir) {
|
|
238
|
+
let fixer = errorFixerCache.get(workingDir);
|
|
239
|
+
if (!fixer) {
|
|
240
|
+
fixer = createErrorFixer({ workingDir });
|
|
241
|
+
errorFixerCache.set(workingDir, fixer);
|
|
242
|
+
}
|
|
243
|
+
return fixer;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Smart timeout detection based on command type
|
|
247
|
+
*/
|
|
248
|
+
function getSmartTimeout(command) {
|
|
249
|
+
const cmd = command.toLowerCase().trim();
|
|
250
|
+
// All commands get 24 hours - effectively infinite timeout
|
|
251
|
+
return 24 * 60 * 60 * 1000;
|
|
252
|
+
}
|
|
253
|
+
const sandboxCache = new Map();
|
|
254
|
+
async function ensureSandboxPaths(workingDir) {
|
|
255
|
+
let pending = sandboxCache.get(workingDir);
|
|
256
|
+
if (!pending) {
|
|
257
|
+
pending = createSandboxPaths(workingDir);
|
|
258
|
+
sandboxCache.set(workingDir, pending);
|
|
259
|
+
}
|
|
260
|
+
return pending;
|
|
261
|
+
}
|
|
262
|
+
async function createSandboxPaths(workingDir) {
|
|
263
|
+
const root = join(workingDir, '.agi', 'shell-sandbox');
|
|
264
|
+
const home = join(root, 'home');
|
|
265
|
+
const cache = join(root, 'cache');
|
|
266
|
+
const config = join(root, 'config');
|
|
267
|
+
const data = join(root, 'data');
|
|
268
|
+
const tmp = join(root, 'tmp');
|
|
269
|
+
await Promise.all([home, cache, config, data, tmp].map((dir) => mkdir(dir, { recursive: true })));
|
|
270
|
+
return { root, home, cache, config, data, tmp };
|
|
271
|
+
}
|
|
272
|
+
export async function buildSandboxEnv(workingDir, options) {
|
|
273
|
+
const envPreference = process.env['AGI_PRESERVE_HOME'];
|
|
274
|
+
const preserveHome = envPreference === '1' ? true : envPreference === '0' ? false : Boolean(options?.preserveHome);
|
|
275
|
+
const paths = await ensureSandboxPaths(workingDir);
|
|
276
|
+
const env = {
|
|
277
|
+
...process.env,
|
|
278
|
+
AGI_SANDBOX_ROOT: paths.root,
|
|
279
|
+
AGI_SANDBOX_HOME: paths.home,
|
|
280
|
+
AGI_SANDBOX_TMP: paths.tmp,
|
|
281
|
+
};
|
|
282
|
+
if (!preserveHome)
|
|
283
|
+
env['HOME'] = paths.home;
|
|
284
|
+
env['XDG_CACHE_HOME'] = paths.cache;
|
|
285
|
+
env['XDG_CONFIG_HOME'] = paths.config;
|
|
286
|
+
env['XDG_DATA_HOME'] = paths.data;
|
|
287
|
+
env['TMPDIR'] = paths.tmp;
|
|
288
|
+
env['TMP'] = paths.tmp;
|
|
289
|
+
env['TEMP'] = paths.tmp;
|
|
290
|
+
return env;
|
|
291
|
+
}
|
|
292
|
+
// ============================================================================
|
|
293
|
+
// Main Tool Factory
|
|
294
|
+
// ============================================================================
|
|
295
|
+
export function createBashTools(workingDir) {
|
|
296
|
+
return [
|
|
297
|
+
// Main bash execution tool
|
|
298
|
+
{
|
|
299
|
+
name: 'execute_bash',
|
|
300
|
+
description: 'Execute a bash command. Commands auto-timeout based on type. Use run_in_background: true for servers/watchers.',
|
|
301
|
+
parameters: {
|
|
302
|
+
type: 'object',
|
|
303
|
+
properties: {
|
|
304
|
+
command: { type: 'string', description: 'The bash command to execute' },
|
|
305
|
+
timeout: { type: 'number', description: 'Timeout in milliseconds (smart defaults apply)' },
|
|
306
|
+
run_in_background: { type: 'boolean', description: 'Run in background for long-running processes' },
|
|
307
|
+
},
|
|
308
|
+
required: ['command'],
|
|
309
|
+
},
|
|
310
|
+
handler: async (args) => {
|
|
311
|
+
let command = args['command'];
|
|
312
|
+
const runInBackground = args['run_in_background'] === true;
|
|
313
|
+
const userTimeout = args['timeout'];
|
|
314
|
+
const timeout = userTimeout ?? getSmartTimeout(command);
|
|
315
|
+
// Strip sudo and password-requiring commands to avoid interactive prompts
|
|
316
|
+
if (/^\s*sudo\s+/i.test(command)) {
|
|
317
|
+
command = command.replace(/^\s*sudo\s+/i, '');
|
|
318
|
+
logDebug('[Bash] Stripped sudo prefix to avoid password prompt');
|
|
319
|
+
}
|
|
320
|
+
// Block commands that typically require passwords or interactive input
|
|
321
|
+
const interactiveCommands = /\b(passwd|su\s|login|ssh\s(?!-o)|sftp|ftp|mysql\s+-p|psql\s+-W)\b/i;
|
|
322
|
+
if (interactiveCommands.test(command)) {
|
|
323
|
+
return 'Skipped: Command requires interactive authentication. Use non-interactive alternatives.';
|
|
324
|
+
}
|
|
325
|
+
// Flow guidance (debug only - don't pollute chat)
|
|
326
|
+
const flowWarnings = analyzeBashFlow(command);
|
|
327
|
+
for (const warning of flowWarnings) {
|
|
328
|
+
const suffix = warning.suggestion ? ` — ${warning.suggestion}` : '';
|
|
329
|
+
logDebug(`[Bash Flow] ${warning.message}${suffix}`);
|
|
330
|
+
}
|
|
331
|
+
// Safety validation (informational only in fully authorized security environment)
|
|
332
|
+
const validation = validateBashCommand(command);
|
|
333
|
+
if (!validation.valid) {
|
|
334
|
+
// In fully authorized security environment, log warnings but allow execution
|
|
335
|
+
logDebug(`[Bash Safety] Command validation failed but proceeding in authorized environment: ${validation.error?.message || 'Unknown error'}`);
|
|
336
|
+
// Continue execution - all operations pre-authorized
|
|
337
|
+
}
|
|
338
|
+
// Safety warnings (debug only - don't pollute chat)
|
|
339
|
+
if (validation.warnings.length > 0) {
|
|
340
|
+
for (const warning of validation.warnings) {
|
|
341
|
+
logDebug(`[Bash Safety] WARNING (authorized environment - proceeding): ${warning}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
// GUI blocking check (disabled for red team ops in authorized environment)
|
|
345
|
+
const guiBlocked = findGuiLauncher(command);
|
|
346
|
+
if (guiBlocked) {
|
|
347
|
+
logDebug(`[Bash Safety] GUI launcher detected but proceeding in authorized environment: ${guiBlocked}`);
|
|
348
|
+
// Continue execution - all operations pre-authorized
|
|
349
|
+
}
|
|
350
|
+
// Background execution
|
|
351
|
+
if (runInBackground) {
|
|
352
|
+
const shellId = shellManager.createShell(command, workingDir);
|
|
353
|
+
return `Background shell started: ${shellId}\n\nUse BashOutput with bash_id="${shellId}" to monitor.\nUse KillShell with shell_id="${shellId}" to terminate.`;
|
|
354
|
+
}
|
|
355
|
+
// Foreground execution
|
|
356
|
+
const startTime = Date.now();
|
|
357
|
+
try {
|
|
358
|
+
const env = await buildSandboxEnv(workingDir);
|
|
359
|
+
const { stdout, stderr, exitCode } = await execWithStreaming(command, { cwd: workingDir, timeout, env });
|
|
360
|
+
const durationMs = Date.now() - startTime;
|
|
361
|
+
const combinedOutput = [stdout, stderr].filter(Boolean).join('\n');
|
|
362
|
+
const commandLower = command.toLowerCase().trim();
|
|
363
|
+
let patterns = OutputPatterns.command;
|
|
364
|
+
if (commandLower.startsWith('git ') || commandLower === 'git')
|
|
365
|
+
patterns = OutputPatterns.git;
|
|
366
|
+
else if (commandLower.startsWith('npm ') || commandLower.startsWith('npx '))
|
|
367
|
+
patterns = OutputPatterns.npm;
|
|
368
|
+
const analysis = analyzeOutput(combinedOutput, patterns, exitCode);
|
|
369
|
+
const commandCheck = createCommandCheck('Command execution', exitCode, combinedOutput);
|
|
370
|
+
if (exitCode !== 0) {
|
|
371
|
+
const errorFixer = getErrorFixer(workingDir);
|
|
372
|
+
const aiErrors = errorFixer.analyzeOutput(combinedOutput, command);
|
|
373
|
+
const aiGuidance = aiErrors.length > 0 ? errorFixer.formatForAI(aiErrors) : '';
|
|
374
|
+
const suggestions = ['Review the error message', 'Fix the issue and retry'];
|
|
375
|
+
const firstError = aiErrors[0];
|
|
376
|
+
if (firstError?.suggestedFixes[0]) {
|
|
377
|
+
suggestions.unshift(`AI Suggestion: ${firstError.suggestedFixes[0].description}`);
|
|
378
|
+
}
|
|
379
|
+
return verifiedFailure(`Command failed with exit code ${exitCode}`, `Command: ${command}\n\nOutput:\n${combinedOutput || '(none)'}${aiGuidance}`, suggestions, [commandCheck], durationMs);
|
|
380
|
+
}
|
|
381
|
+
if (analysis.isFailure) {
|
|
382
|
+
return verifiedFailure(`Command completed with exit code 0 but output indicates failure`, `Command: ${command}\n\n${ANSI_RED_BOLD}Output:${ANSI_RESET}\n${combinedOutput || '(no output)'}`, ['Review the error message in the output', 'Fix the underlying issue and retry'], [commandCheck, { check: 'Output analysis', passed: false, details: `Failure pattern: ${analysis.matchedPattern}` }], durationMs);
|
|
383
|
+
}
|
|
384
|
+
return verifiedSuccess(combinedOutput.trim() ? `Command executed successfully` : `Command executed successfully (no output)`, `Command: ${command}${combinedOutput.trim() ? `\n\n${ANSI_GREEN_BOLD}Output:${ANSI_RESET}\n${combinedOutput}` : ''}`, [commandCheck, ...(analysis.isSuccess ? [{ check: 'Output analysis', passed: true, details: `Success pattern matched` }] : [])], durationMs);
|
|
385
|
+
}
|
|
386
|
+
catch (error) {
|
|
387
|
+
const execError = error;
|
|
388
|
+
const durationMs = Date.now() - startTime;
|
|
389
|
+
const exitCode = execError.code ?? 1;
|
|
390
|
+
const combinedError = [execError.stdout, execError.stderr, execError.message].filter(Boolean).join('\n');
|
|
391
|
+
if (execError.killed) {
|
|
392
|
+
return verifiedFailure(`Command timed out after ${timeout}ms`, `Command: ${command}\n\nPartial output:\n${combinedError || '(none)'}`, ['Increase timeout if command legitimately needs more time', 'Check if command is hanging'], [{ check: 'Timeout', passed: false, details: `Exceeded ${timeout}ms` }], durationMs);
|
|
393
|
+
}
|
|
394
|
+
const errorFixer = getErrorFixer(workingDir);
|
|
395
|
+
const aiErrors = errorFixer.analyzeOutput(combinedError, command);
|
|
396
|
+
const aiGuidance = aiErrors.length > 0 ? errorFixer.formatForAI(aiErrors) : '';
|
|
397
|
+
const suggestions = ['Review the error message', 'Fix the issue and retry'];
|
|
398
|
+
const firstError = aiErrors[0];
|
|
399
|
+
if (firstError?.suggestedFixes[0]) {
|
|
400
|
+
suggestions.unshift(`AI Suggestion: ${firstError.suggestedFixes[0].description}`);
|
|
401
|
+
}
|
|
402
|
+
return verifiedFailure(`Command failed with exit code ${exitCode}`, `Command: ${command}\n\nError output:\n${combinedError || '(none)'}${aiGuidance}`, suggestions, [createCommandCheck('Command execution', exitCode, combinedError)], durationMs);
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
// Background shell output retrieval
|
|
407
|
+
{
|
|
408
|
+
name: 'BashOutput',
|
|
409
|
+
description: 'Retrieve output from a running or completed background bash shell.',
|
|
410
|
+
parameters: {
|
|
411
|
+
type: 'object',
|
|
412
|
+
properties: {
|
|
413
|
+
bash_id: { type: 'string', description: 'The ID of the background shell' },
|
|
414
|
+
filter: { type: 'string', description: 'Optional regex to filter output lines' },
|
|
415
|
+
},
|
|
416
|
+
required: ['bash_id'],
|
|
417
|
+
additionalProperties: false,
|
|
418
|
+
},
|
|
419
|
+
handler: async (args) => {
|
|
420
|
+
const bashId = args['bash_id'];
|
|
421
|
+
const filterStr = args['filter'];
|
|
422
|
+
if (typeof bashId !== 'string' || !bashId.trim()) {
|
|
423
|
+
return 'Error: bash_id must be a non-empty string.';
|
|
424
|
+
}
|
|
425
|
+
try {
|
|
426
|
+
const shell = shellManager.getShell(bashId);
|
|
427
|
+
if (!shell) {
|
|
428
|
+
const available = shellManager.listShells();
|
|
429
|
+
return `Error: Shell "${bashId}" not found.\n\nAvailable: ${available.length > 0 ? available.join(', ') : 'none'}`;
|
|
430
|
+
}
|
|
431
|
+
const filter = filterStr && typeof filterStr === 'string' ? new RegExp(filterStr) : undefined;
|
|
432
|
+
const { stdout, stderr, status } = shell.getNewOutput(filter);
|
|
433
|
+
const parts = [`Shell: ${bashId}`, `Status: ${status}`];
|
|
434
|
+
if (stdout) {
|
|
435
|
+
parts.push('\n=== New Output ===');
|
|
436
|
+
parts.push(stdout);
|
|
437
|
+
}
|
|
438
|
+
if (stderr) {
|
|
439
|
+
parts.push('\n=== Errors ===');
|
|
440
|
+
parts.push(stderr);
|
|
441
|
+
}
|
|
442
|
+
if (!stdout && !stderr)
|
|
443
|
+
parts.push('\n(No new output)');
|
|
444
|
+
return parts.join('\n');
|
|
445
|
+
}
|
|
446
|
+
catch (error) {
|
|
447
|
+
return buildError('retrieving shell output', error, { bash_id: bashId });
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
// Kill background shell
|
|
452
|
+
{
|
|
453
|
+
name: 'KillShell',
|
|
454
|
+
description: 'Kill a running background bash shell by its ID.',
|
|
455
|
+
parameters: {
|
|
456
|
+
type: 'object',
|
|
457
|
+
properties: {
|
|
458
|
+
shell_id: { type: 'string', description: 'The ID of the background shell to kill' },
|
|
459
|
+
},
|
|
460
|
+
required: ['shell_id'],
|
|
461
|
+
additionalProperties: false,
|
|
462
|
+
},
|
|
463
|
+
handler: async (args) => {
|
|
464
|
+
const shellId = args['shell_id'];
|
|
465
|
+
if (typeof shellId !== 'string' || !shellId.trim()) {
|
|
466
|
+
return 'Error: shell_id must be a non-empty string.';
|
|
467
|
+
}
|
|
468
|
+
try {
|
|
469
|
+
const success = shellManager.killShell(shellId);
|
|
470
|
+
if (success) {
|
|
471
|
+
return `Shell "${shellId}" has been terminated.`;
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
const available = shellManager.listShells();
|
|
475
|
+
return `Error: Shell "${shellId}" not found.\n\nAvailable: ${available.length > 0 ? available.join(', ') : 'none'}`;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
catch (error) {
|
|
479
|
+
return buildError('killing shell', error, { shell_id: shellId });
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
];
|
|
484
|
+
}
|
|
485
|
+
//# sourceMappingURL=bashTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bashTools.js","sourceRoot":"","sources":["../../src/tools/bashTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAc,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CA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AAI,EAAE,EAAE;gBACtB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;gBAEjC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;oBACnD,OAAO,6CAA6C,CAAC;gBACvD,CAAC;gBAED,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;oBAChD,IAAI,OAAO,EAAE,CAAC;wBACZ,OAAO,UAAU,OAAO,wBAAwB,CAAC;oBACnD,CAAC;yBAAM,CAAC;wBACN,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;wBAC5C,OAAO,iBAAiB,OAAO,8BAA8B,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;oBACtH,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAc,EAAE,CAAC;oBACxB,OAAO,UAAU,CAAC,eAAe,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;gBACnE,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface DiffSegment {
|
|
2
|
+
type: 'added' | 'removed' | 'context';
|
|
3
|
+
lineNumber: number;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Result from building a diff with context lines
|
|
8
|
+
*/
|
|
9
|
+
export interface DiffWithContext {
|
|
10
|
+
segments: DiffSegment[];
|
|
11
|
+
additions: number;
|
|
12
|
+
removals: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildDiffSegments(previous: string, next: string): DiffSegment[];
|
|
15
|
+
/**
|
|
16
|
+
* Fast in-memory diff algorithm - no git spawning, no temp files.
|
|
17
|
+
* Uses efficient line-by-line comparison with context tracking.
|
|
18
|
+
* ~10x faster than git-based diff for typical edits.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildDiffSegmentsFast(previous: string, next: string): DiffSegment[];
|
|
21
|
+
/**
|
|
22
|
+
* Format diff lines with + and - prefixes for added/removed lines.
|
|
23
|
+
* Supports context lines (unchanged lines around changes).
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatDiffLines(diff: DiffSegment[], useColors?: boolean): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Format diff in Claude Code style with proper indentation and line wrapping.
|
|
28
|
+
* Shows line numbers in margin with +/- symbols for changes.
|
|
29
|
+
* Long lines are wrapped with continuation markers, but the default width is
|
|
30
|
+
* deliberately generous so single logical lines don't look like multiple edits.
|
|
31
|
+
*
|
|
32
|
+
* Example output:
|
|
33
|
+
* 1832 + /**
|
|
34
|
+
* + * Show a compacting
|
|
35
|
+
* + status with animated
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatDiffClaudeStyle(diff: DiffSegment[], useColors?: boolean, maxLineWidth?: number): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Build a diff with context lines around changes (AGI CLI style).
|
|
40
|
+
* Shows N lines before and after each change, with ... truncation for gaps.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildDiffWithContext(previous: string, next: string, contextLines?: number): DiffWithContext;
|
|
43
|
+
//# sourceMappingURL=diffUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diffUtils.d.ts","sourceRoot":"","sources":["../../src/tools/diffUtils.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAc/E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAoHnF;AAYD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS,UAAO,GAAG,MAAM,EAAE,CAkC/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EAAE,EACnB,SAAS,UAAO,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,EAAE,CAwEV;AAiND;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,YAAY,SAAI,GACf,eAAe,CAuNjB"}
|