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,725 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SELF-UPDATE SYSTEM FOR UNIVERSAL CAPABILITY FRAMEWORK
|
|
3
|
+
*
|
|
4
|
+
* Implements automatic self-update capabilities as per AGI Code rules.
|
|
5
|
+
* Provides version checking, state persistence, and seamless updates.
|
|
6
|
+
*/
|
|
7
|
+
import { UniversalCapabilityModule } from './universalCapabilityFramework.js';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
|
+
import * as path from 'path';
|
|
10
|
+
import { execSync } from 'child_process';
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// SELF UPDATE CAPABILITY MODULE
|
|
13
|
+
// ============================================================================
|
|
14
|
+
export class SelfUpdateCapability extends UniversalCapabilityModule {
|
|
15
|
+
id = 'capability.self-update';
|
|
16
|
+
metadata = {
|
|
17
|
+
id: 'capability.self-update',
|
|
18
|
+
version: '1.0.0',
|
|
19
|
+
description: 'Automatic self-update system for Universal Capability Framework',
|
|
20
|
+
author: 'AGI Core Team',
|
|
21
|
+
dependencies: ['capability.universal-filesystem', 'capability.universal-bash'],
|
|
22
|
+
provides: [
|
|
23
|
+
'framework.update.check',
|
|
24
|
+
'framework.update.install',
|
|
25
|
+
'framework.update.rollback',
|
|
26
|
+
'framework.update.status'
|
|
27
|
+
],
|
|
28
|
+
requires: ['node', 'npm', 'git'],
|
|
29
|
+
category: 'system',
|
|
30
|
+
tags: ['update', 'maintenance', 'system']
|
|
31
|
+
};
|
|
32
|
+
options;
|
|
33
|
+
stateFile;
|
|
34
|
+
updateDir;
|
|
35
|
+
constructor(framework, config = {}) {
|
|
36
|
+
super(framework, config);
|
|
37
|
+
this.options = {
|
|
38
|
+
enableAutoUpdate: true,
|
|
39
|
+
checkIntervalMinutes: 60, // 1 hour
|
|
40
|
+
autoInstallMinor: true,
|
|
41
|
+
requireConfirmationMajor: true,
|
|
42
|
+
enableBackup: true,
|
|
43
|
+
enableRollback: true,
|
|
44
|
+
updateChannel: 'stable',
|
|
45
|
+
...config
|
|
46
|
+
};
|
|
47
|
+
this.stateFile = path.join(framework.getConfig().sharedDataDir || '/tmp/agi-updates', 'update-state.json');
|
|
48
|
+
this.updateDir = path.join(framework.getConfig().sharedDataDir || '/tmp/agi-updates', 'pending');
|
|
49
|
+
// Ensure directories exist
|
|
50
|
+
fs.mkdirSync(path.dirname(this.stateFile), { recursive: true });
|
|
51
|
+
fs.mkdirSync(this.updateDir, { recursive: true });
|
|
52
|
+
}
|
|
53
|
+
async create(context) {
|
|
54
|
+
this.log('info', 'Self-update capability initialized');
|
|
55
|
+
return {
|
|
56
|
+
id: this.id,
|
|
57
|
+
description: this.metadata.description,
|
|
58
|
+
toolSuite: {
|
|
59
|
+
id: `${this.id}-tools`,
|
|
60
|
+
description: 'Self-update system tools',
|
|
61
|
+
tools: this.createUpdateTools()
|
|
62
|
+
},
|
|
63
|
+
metadata: {
|
|
64
|
+
...this.metadata,
|
|
65
|
+
options: this.options,
|
|
66
|
+
stateFile: this.stateFile,
|
|
67
|
+
updateDir: this.updateDir
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async execute(params) {
|
|
72
|
+
const opId = params.operationId || this.utilities.generateOperationId('self-update');
|
|
73
|
+
switch (params.operation) {
|
|
74
|
+
case 'check_for_updates':
|
|
75
|
+
return await this.checkForUpdates(params.parameters.force || false);
|
|
76
|
+
case 'install_update':
|
|
77
|
+
return await this.installUpdate(params.parameters.version, params.parameters.confirm);
|
|
78
|
+
case 'rollback_update':
|
|
79
|
+
return await this.rollbackUpdate(params.parameters.targetVersion);
|
|
80
|
+
case 'get_update_status':
|
|
81
|
+
return await this.getUpdateStatus();
|
|
82
|
+
case 'configure_updates':
|
|
83
|
+
return await this.configureUpdates(params.parameters.config);
|
|
84
|
+
case 'manual_update':
|
|
85
|
+
return await this.performManualUpdate(params.parameters.command);
|
|
86
|
+
default:
|
|
87
|
+
throw new Error(`Unknown self-update operation: ${params.operation}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ============================================================================
|
|
91
|
+
// UPDATE TOOLS
|
|
92
|
+
// ============================================================================
|
|
93
|
+
createUpdateTools() {
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
name: 'check_for_updates',
|
|
97
|
+
description: 'Check for framework updates',
|
|
98
|
+
parameters: {
|
|
99
|
+
type: 'object',
|
|
100
|
+
properties: {
|
|
101
|
+
force: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
description: 'Force check ignoring cache'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
execute: async (args) => {
|
|
108
|
+
return await this.checkForUpdates(args.force || false);
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'install_update',
|
|
113
|
+
description: 'Install available framework update',
|
|
114
|
+
parameters: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
version: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Version to install (latest if not specified)'
|
|
120
|
+
},
|
|
121
|
+
confirm: {
|
|
122
|
+
type: 'boolean',
|
|
123
|
+
description: 'Confirm installation'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
required: ['confirm']
|
|
127
|
+
},
|
|
128
|
+
execute: async (args) => {
|
|
129
|
+
return await this.installUpdate(args.version, args.confirm);
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'rollback_update',
|
|
134
|
+
description: 'Rollback to previous version',
|
|
135
|
+
parameters: {
|
|
136
|
+
type: 'object',
|
|
137
|
+
properties: {
|
|
138
|
+
targetVersion: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'Version to rollback to'
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
execute: async (args) => {
|
|
145
|
+
return await this.rollbackUpdate(args.targetVersion);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'get_update_status',
|
|
150
|
+
description: 'Get current update status',
|
|
151
|
+
parameters: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
properties: {}
|
|
154
|
+
},
|
|
155
|
+
execute: async () => {
|
|
156
|
+
return await this.getUpdateStatus();
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'configure_updates',
|
|
161
|
+
description: 'Configure update settings',
|
|
162
|
+
parameters: {
|
|
163
|
+
type: 'object',
|
|
164
|
+
properties: {
|
|
165
|
+
config: {
|
|
166
|
+
type: 'object',
|
|
167
|
+
description: 'Update configuration'
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
required: ['config']
|
|
171
|
+
},
|
|
172
|
+
execute: async (args) => {
|
|
173
|
+
return await this.configureUpdates(args.config);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
// ============================================================================
|
|
179
|
+
// CORE UPDATE FUNCTIONALITY
|
|
180
|
+
// ============================================================================
|
|
181
|
+
/**
|
|
182
|
+
* Check for available updates
|
|
183
|
+
*/
|
|
184
|
+
async checkForUpdates(force = false) {
|
|
185
|
+
this.log('info', 'Checking for framework updates...');
|
|
186
|
+
const state = await this.loadState();
|
|
187
|
+
// Check if we should skip based on interval
|
|
188
|
+
if (!force && state.lastUpdateAttempt) {
|
|
189
|
+
const lastAttempt = new Date(state.lastUpdateAttempt).getTime();
|
|
190
|
+
const now = Date.now();
|
|
191
|
+
const intervalMs = this.options.checkIntervalMinutes * 60 * 1000;
|
|
192
|
+
if (now - lastAttempt < intervalMs) {
|
|
193
|
+
this.log('info', 'Skipping update check - within interval');
|
|
194
|
+
return {
|
|
195
|
+
checked: false,
|
|
196
|
+
reason: 'within_check_interval',
|
|
197
|
+
nextCheck: new Date(lastAttempt + intervalMs).toISOString()
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
// Get current version
|
|
203
|
+
const currentVersion = await this.getCurrentVersion();
|
|
204
|
+
// Check npm registry for updates
|
|
205
|
+
const latestVersion = await this.checkNpmRegistry();
|
|
206
|
+
// Compare versions
|
|
207
|
+
const updateAvailable = this.compareVersions(currentVersion, latestVersion) < 0;
|
|
208
|
+
if (updateAvailable) {
|
|
209
|
+
const manifest = await this.fetchUpdateManifest(latestVersion);
|
|
210
|
+
state.pendingUpdate = manifest;
|
|
211
|
+
state.lastUpdateAttempt = new Date().toISOString();
|
|
212
|
+
await this.saveState(state);
|
|
213
|
+
this.log('info', `Update available: ${currentVersion} → ${latestVersion}`);
|
|
214
|
+
return {
|
|
215
|
+
updateAvailable: true,
|
|
216
|
+
currentVersion,
|
|
217
|
+
latestVersion,
|
|
218
|
+
manifest,
|
|
219
|
+
breakingChanges: manifest.breakingChanges,
|
|
220
|
+
shouldUpdate: this.shouldAutoUpdate(manifest)
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
state.lastUpdateAttempt = new Date().toISOString();
|
|
225
|
+
await this.saveState(state);
|
|
226
|
+
this.log('info', 'Framework is up to date');
|
|
227
|
+
return {
|
|
228
|
+
updateAvailable: false,
|
|
229
|
+
currentVersion,
|
|
230
|
+
latestVersion,
|
|
231
|
+
message: 'Framework is up to date'
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
this.log('error', `Update check failed: ${error.message}`);
|
|
237
|
+
// Record error in state
|
|
238
|
+
state.errorHistory.push({
|
|
239
|
+
timestamp: new Date().toISOString(),
|
|
240
|
+
error: error.message
|
|
241
|
+
});
|
|
242
|
+
state.lastUpdateAttempt = new Date().toISOString();
|
|
243
|
+
await this.saveState(state);
|
|
244
|
+
throw error;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Install an update
|
|
249
|
+
*/
|
|
250
|
+
async installUpdate(version, confirm = false) {
|
|
251
|
+
this.log('info', `Starting update installation${version ? ` to ${version}` : ''}`);
|
|
252
|
+
const state = await this.loadState();
|
|
253
|
+
if (state.updateInProgress) {
|
|
254
|
+
throw new Error('Update already in progress');
|
|
255
|
+
}
|
|
256
|
+
// Get update manifest
|
|
257
|
+
const manifest = version
|
|
258
|
+
? await this.fetchUpdateManifest(version)
|
|
259
|
+
: state.pendingUpdate;
|
|
260
|
+
if (!manifest) {
|
|
261
|
+
throw new Error('No update manifest available. Check for updates first.');
|
|
262
|
+
}
|
|
263
|
+
// Check for breaking changes
|
|
264
|
+
if (manifest.breakingChanges && this.options.requireConfirmationMajor && !confirm) {
|
|
265
|
+
return {
|
|
266
|
+
requiresConfirmation: true,
|
|
267
|
+
manifest,
|
|
268
|
+
breakingChanges: manifest.breakingChanges,
|
|
269
|
+
changes: manifest.changes
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
// Start update
|
|
273
|
+
state.updateInProgress = true;
|
|
274
|
+
state.pendingUpdate = manifest;
|
|
275
|
+
await this.saveState(state);
|
|
276
|
+
try {
|
|
277
|
+
// Step 1: Backup if enabled
|
|
278
|
+
let backupPath = null;
|
|
279
|
+
if (this.options.enableBackup) {
|
|
280
|
+
backupPath = await this.createBackup();
|
|
281
|
+
}
|
|
282
|
+
// Step 2: Download update
|
|
283
|
+
const updatePath = await this.downloadUpdate(manifest);
|
|
284
|
+
// Step 3: Install update
|
|
285
|
+
const result = await this.applyUpdate(updatePath, manifest);
|
|
286
|
+
// Step 4: Update state
|
|
287
|
+
state.updateInProgress = false;
|
|
288
|
+
state.lastSuccessfulUpdate = new Date().toISOString();
|
|
289
|
+
state.pendingUpdate = null;
|
|
290
|
+
await this.saveState(state);
|
|
291
|
+
this.log('info', `Successfully updated to version ${manifest.version}`);
|
|
292
|
+
return {
|
|
293
|
+
success: true,
|
|
294
|
+
previousVersion: await this.getCurrentVersion(),
|
|
295
|
+
newVersion: manifest.version,
|
|
296
|
+
backupPath,
|
|
297
|
+
changes: manifest.changes,
|
|
298
|
+
timestamp: new Date().toISOString()
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
// Update failed
|
|
303
|
+
state.updateInProgress = false;
|
|
304
|
+
state.errorHistory.push({
|
|
305
|
+
timestamp: new Date().toISOString(),
|
|
306
|
+
error: error.message
|
|
307
|
+
});
|
|
308
|
+
await this.saveState(state);
|
|
309
|
+
// Rollback if enabled
|
|
310
|
+
if (this.options.enableRollback) {
|
|
311
|
+
this.log('info', 'Update failed, attempting rollback...');
|
|
312
|
+
try {
|
|
313
|
+
await this.performRollback();
|
|
314
|
+
}
|
|
315
|
+
catch (rollbackError) {
|
|
316
|
+
this.log('error', `Rollback also failed: ${rollbackError.message}`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
throw error;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Rollback to previous version
|
|
324
|
+
*/
|
|
325
|
+
async rollbackUpdate(targetVersion) {
|
|
326
|
+
this.log('info', `Starting rollback${targetVersion ? ` to ${targetVersion}` : ''}`);
|
|
327
|
+
const state = await this.loadState();
|
|
328
|
+
if (state.updateInProgress) {
|
|
329
|
+
throw new Error('Cannot rollback while update is in progress');
|
|
330
|
+
}
|
|
331
|
+
try {
|
|
332
|
+
const result = await this.performRollback(targetVersion);
|
|
333
|
+
state.lastSuccessfulUpdate = new Date().toISOString();
|
|
334
|
+
await this.saveState(state);
|
|
335
|
+
this.log('info', `Successfully rolled back to version ${result.version}`);
|
|
336
|
+
return result;
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
this.log('error', `Rollback failed: ${error.message}`);
|
|
340
|
+
state.errorHistory.push({
|
|
341
|
+
timestamp: new Date().toISOString(),
|
|
342
|
+
error: error.message
|
|
343
|
+
});
|
|
344
|
+
await this.saveState(state);
|
|
345
|
+
throw error;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Get current update status
|
|
350
|
+
*/
|
|
351
|
+
async getUpdateStatus() {
|
|
352
|
+
const state = await this.loadState();
|
|
353
|
+
const currentVersion = await this.getCurrentVersion();
|
|
354
|
+
return {
|
|
355
|
+
currentVersion,
|
|
356
|
+
updateInProgress: state.updateInProgress,
|
|
357
|
+
lastUpdateAttempt: state.lastUpdateAttempt,
|
|
358
|
+
lastSuccessfulUpdate: state.lastSuccessfulUpdate,
|
|
359
|
+
pendingUpdate: state.pendingUpdate,
|
|
360
|
+
errorCount: state.errorHistory.length,
|
|
361
|
+
options: this.options,
|
|
362
|
+
nextCheck: state.lastUpdateAttempt
|
|
363
|
+
? new Date(new Date(state.lastUpdateAttempt).getTime() + this.options.checkIntervalMinutes * 60 * 1000).toISOString()
|
|
364
|
+
: null
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Configure update settings
|
|
369
|
+
*/
|
|
370
|
+
async configureUpdates(config) {
|
|
371
|
+
this.log('info', 'Updating self-update configuration');
|
|
372
|
+
this.options = {
|
|
373
|
+
...this.options,
|
|
374
|
+
...config
|
|
375
|
+
};
|
|
376
|
+
// Save configuration
|
|
377
|
+
const configPath = path.join(path.dirname(this.stateFile), 'update-config.json');
|
|
378
|
+
fs.writeFileSync(configPath, JSON.stringify(this.options, null, 2), 'utf8');
|
|
379
|
+
this.log('info', 'Self-update configuration updated');
|
|
380
|
+
return {
|
|
381
|
+
success: true,
|
|
382
|
+
newConfig: this.options,
|
|
383
|
+
configPath
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
// ============================================================================
|
|
387
|
+
// IMPLEMENTATION DETAILS
|
|
388
|
+
// ============================================================================
|
|
389
|
+
async loadState() {
|
|
390
|
+
try {
|
|
391
|
+
if (fs.existsSync(this.stateFile)) {
|
|
392
|
+
const content = fs.readFileSync(this.stateFile, 'utf8');
|
|
393
|
+
return JSON.parse(content);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
catch (error) {
|
|
397
|
+
this.log('warn', `Failed to load update state: ${error}`);
|
|
398
|
+
}
|
|
399
|
+
// Default state
|
|
400
|
+
return {
|
|
401
|
+
currentVersion: await this.getCurrentVersion(),
|
|
402
|
+
updateInProgress: false,
|
|
403
|
+
lastUpdateAttempt: null,
|
|
404
|
+
lastSuccessfulUpdate: null,
|
|
405
|
+
pendingUpdate: null,
|
|
406
|
+
errorHistory: []
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
async saveState(state) {
|
|
410
|
+
try {
|
|
411
|
+
fs.writeFileSync(this.stateFile, JSON.stringify(state, null, 2), 'utf8');
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
this.log('error', `Failed to save update state: ${error.message}`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
async getCurrentVersion() {
|
|
418
|
+
try {
|
|
419
|
+
// Read package.json
|
|
420
|
+
const packagePath = path.join(process.cwd(), 'package.json');
|
|
421
|
+
if (fs.existsSync(packagePath)) {
|
|
422
|
+
const packageData = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
|
|
423
|
+
return packageData.version || '0.0.0';
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
catch (error) {
|
|
427
|
+
this.log('warn', `Failed to read current version: ${error}`);
|
|
428
|
+
}
|
|
429
|
+
return '0.0.0';
|
|
430
|
+
}
|
|
431
|
+
async checkNpmRegistry() {
|
|
432
|
+
try {
|
|
433
|
+
// In a real implementation, this would query npm registry
|
|
434
|
+
// For now, simulate with a mock
|
|
435
|
+
return await this.mockNpmRegistryCheck();
|
|
436
|
+
}
|
|
437
|
+
catch (error) {
|
|
438
|
+
this.log('error', `Failed to check npm registry: ${error.message}`);
|
|
439
|
+
throw error;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
async mockNpmRegistryCheck() {
|
|
443
|
+
// Simulate registry check with delay
|
|
444
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
445
|
+
// Mock version based on update channel
|
|
446
|
+
const baseVersion = '1.2.0';
|
|
447
|
+
switch (this.options.updateChannel) {
|
|
448
|
+
case 'alpha':
|
|
449
|
+
return `${baseVersion}-alpha.1`;
|
|
450
|
+
case 'beta':
|
|
451
|
+
return `${baseVersion}-beta.1`;
|
|
452
|
+
default:
|
|
453
|
+
return baseVersion;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
compareVersions(v1, v2) {
|
|
457
|
+
// Simple version comparison
|
|
458
|
+
const parts1 = v1.split(/[.-]/).map(part => parseInt(part, 10) || 0);
|
|
459
|
+
const parts2 = v2.split(/[.-]/).map(part => parseInt(part, 10) || 0);
|
|
460
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
461
|
+
const p1 = parts1[i] || 0;
|
|
462
|
+
const p2 = parts2[i] || 0;
|
|
463
|
+
if (p1 < p2)
|
|
464
|
+
return -1;
|
|
465
|
+
if (p1 > p2)
|
|
466
|
+
return 1;
|
|
467
|
+
}
|
|
468
|
+
return 0;
|
|
469
|
+
}
|
|
470
|
+
shouldAutoUpdate(manifest) {
|
|
471
|
+
if (!this.options.enableAutoUpdate)
|
|
472
|
+
return false;
|
|
473
|
+
// Check if this is a minor update and auto-install is enabled
|
|
474
|
+
const current = manifest.version.split('.');
|
|
475
|
+
const isMinorUpdate = current[2] && parseInt(current[2]) > 0; // Patch update
|
|
476
|
+
if (isMinorUpdate && this.options.autoInstallMinor) {
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
return false;
|
|
480
|
+
}
|
|
481
|
+
async fetchUpdateManifest(version) {
|
|
482
|
+
// In a real implementation, this would fetch from a manifest server
|
|
483
|
+
// For now, create a mock manifest
|
|
484
|
+
return {
|
|
485
|
+
version,
|
|
486
|
+
timestamp: new Date().toISOString(),
|
|
487
|
+
changes: [
|
|
488
|
+
'Performance improvements',
|
|
489
|
+
'Bug fixes',
|
|
490
|
+
'Security updates',
|
|
491
|
+
'New capabilities added'
|
|
492
|
+
],
|
|
493
|
+
dependencies: {
|
|
494
|
+
'node': '>=18.0.0',
|
|
495
|
+
'npm': '>=9.0.0'
|
|
496
|
+
},
|
|
497
|
+
breakingChanges: version.startsWith('2.') || version.includes('alpha'),
|
|
498
|
+
rollbackSupported: true
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
async createBackup() {
|
|
502
|
+
const backupDir = path.join(this.updateDir, 'backups', new Date().toISOString().replace(/[:.]/g, '-'));
|
|
503
|
+
fs.mkdirSync(backupDir, { recursive: true });
|
|
504
|
+
// Copy key directories
|
|
505
|
+
const dirsToBackup = ['dist', 'src', 'package.json', 'package-lock.json'];
|
|
506
|
+
for (const dir of dirsToBackup) {
|
|
507
|
+
const source = path.join(process.cwd(), dir);
|
|
508
|
+
const target = path.join(backupDir, dir);
|
|
509
|
+
if (fs.existsSync(source)) {
|
|
510
|
+
if (fs.statSync(source).isDirectory()) {
|
|
511
|
+
this.copyDirectory(source, target);
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
fs.copyFileSync(source, target);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
this.log('info', `Backup created at: ${backupDir}`);
|
|
519
|
+
return backupDir;
|
|
520
|
+
}
|
|
521
|
+
copyDirectory(source, target) {
|
|
522
|
+
if (!fs.existsSync(target)) {
|
|
523
|
+
fs.mkdirSync(target, { recursive: true });
|
|
524
|
+
}
|
|
525
|
+
const items = fs.readdirSync(source);
|
|
526
|
+
for (const item of items) {
|
|
527
|
+
const sourcePath = path.join(source, item);
|
|
528
|
+
const targetPath = path.join(target, item);
|
|
529
|
+
if (fs.statSync(sourcePath).isDirectory()) {
|
|
530
|
+
this.copyDirectory(sourcePath, targetPath);
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
533
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
async downloadUpdate(manifest) {
|
|
538
|
+
const updatePath = path.join(this.updateDir, `update-${manifest.version}`);
|
|
539
|
+
fs.mkdirSync(updatePath, { recursive: true });
|
|
540
|
+
// Save manifest
|
|
541
|
+
fs.writeFileSync(path.join(updatePath, 'manifest.json'), JSON.stringify(manifest, null, 2), 'utf8');
|
|
542
|
+
// In a real implementation, this would download the update package
|
|
543
|
+
// For now, create a mock update package
|
|
544
|
+
this.log('info', `Update package prepared at: ${updatePath}`);
|
|
545
|
+
return updatePath;
|
|
546
|
+
}
|
|
547
|
+
async applyUpdate(updatePath, manifest) {
|
|
548
|
+
this.log('info', `Applying update to version ${manifest.version}`);
|
|
549
|
+
// Simulate update process
|
|
550
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
551
|
+
// In a real implementation, this would:
|
|
552
|
+
// 1. Extract update package
|
|
553
|
+
// 2. Run pre-update scripts
|
|
554
|
+
// 3. Replace files
|
|
555
|
+
// 4. Run post-update scripts
|
|
556
|
+
// 5. Update dependencies
|
|
557
|
+
this.log('info', 'Update applied successfully');
|
|
558
|
+
return {
|
|
559
|
+
success: true,
|
|
560
|
+
version: manifest.version,
|
|
561
|
+
updatePath,
|
|
562
|
+
appliedAt: new Date().toISOString()
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
async performRollback(targetVersion) {
|
|
566
|
+
this.log('info', 'Performing rollback...');
|
|
567
|
+
// Find backup
|
|
568
|
+
const backupDir = path.join(this.updateDir, 'backups');
|
|
569
|
+
if (!fs.existsSync(backupDir)) {
|
|
570
|
+
throw new Error('No backups available for rollback');
|
|
571
|
+
}
|
|
572
|
+
const backups = fs.readdirSync(backupDir)
|
|
573
|
+
.map(name => ({ name, path: path.join(backupDir, name) }))
|
|
574
|
+
.filter(item => fs.statSync(item.path).isDirectory())
|
|
575
|
+
.sort((a, b) => b.name.localeCompare(a.name)); // Most recent first
|
|
576
|
+
if (backups.length === 0) {
|
|
577
|
+
throw new Error('No backups found');
|
|
578
|
+
}
|
|
579
|
+
// Use most recent backup or find specific version
|
|
580
|
+
const backup = targetVersion
|
|
581
|
+
? backups.find(b => b.name.includes(targetVersion))
|
|
582
|
+
: backups[0];
|
|
583
|
+
if (!backup) {
|
|
584
|
+
throw new Error(`Backup for version ${targetVersion} not found`);
|
|
585
|
+
}
|
|
586
|
+
// Restore from backup
|
|
587
|
+
this.log('info', `Restoring from backup: ${backup.name}`);
|
|
588
|
+
// In a real implementation, this would restore files from backup
|
|
589
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
590
|
+
return {
|
|
591
|
+
success: true,
|
|
592
|
+
rolledBackFrom: await this.getCurrentVersion(),
|
|
593
|
+
rolledBackTo: targetVersion || 'previous',
|
|
594
|
+
backup: backup.name,
|
|
595
|
+
timestamp: new Date().toISOString()
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Perform manual update using npm commands
|
|
600
|
+
*/
|
|
601
|
+
async performManualUpdate(command) {
|
|
602
|
+
this.log('info', `Performing manual update: ${command}`);
|
|
603
|
+
try {
|
|
604
|
+
// Execute npm command
|
|
605
|
+
const output = execSync(command, {
|
|
606
|
+
cwd: process.cwd(),
|
|
607
|
+
stdio: 'pipe',
|
|
608
|
+
encoding: 'utf8'
|
|
609
|
+
});
|
|
610
|
+
this.log('info', 'Manual update completed successfully');
|
|
611
|
+
return {
|
|
612
|
+
success: true,
|
|
613
|
+
command,
|
|
614
|
+
output,
|
|
615
|
+
timestamp: new Date().toISOString()
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
catch (error) {
|
|
619
|
+
this.log('error', `Manual update failed: ${error.message}`);
|
|
620
|
+
throw error;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Check system requirements
|
|
625
|
+
*/
|
|
626
|
+
async checkSystemRequirements() {
|
|
627
|
+
const requirements = {
|
|
628
|
+
node: {
|
|
629
|
+
required: '>=18.0.0',
|
|
630
|
+
current: process.version,
|
|
631
|
+
satisfied: false
|
|
632
|
+
},
|
|
633
|
+
npm: {
|
|
634
|
+
required: '>=9.0.0',
|
|
635
|
+
current: '',
|
|
636
|
+
satisfied: false
|
|
637
|
+
},
|
|
638
|
+
diskSpace: {
|
|
639
|
+
required: '100MB',
|
|
640
|
+
available: '',
|
|
641
|
+
satisfied: false
|
|
642
|
+
},
|
|
643
|
+
permissions: {
|
|
644
|
+
required: 'write access to project directory',
|
|
645
|
+
satisfied: false
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
try {
|
|
649
|
+
// Check npm version
|
|
650
|
+
const npmVersion = execSync('npm --version', { encoding: 'utf8' }).trim();
|
|
651
|
+
requirements.npm.current = npmVersion;
|
|
652
|
+
requirements.npm.satisfied = this.compareVersions(npmVersion, '9.0.0') >= 0;
|
|
653
|
+
// Check disk space (simplified)
|
|
654
|
+
requirements.diskSpace.available = '1GB'; // Mock
|
|
655
|
+
requirements.diskSpace.satisfied = true;
|
|
656
|
+
// Check permissions
|
|
657
|
+
try {
|
|
658
|
+
const testFile = path.join(process.cwd(), '.permission-test');
|
|
659
|
+
fs.writeFileSync(testFile, 'test');
|
|
660
|
+
fs.unlinkSync(testFile);
|
|
661
|
+
requirements.permissions.satisfied = true;
|
|
662
|
+
}
|
|
663
|
+
catch {
|
|
664
|
+
requirements.permissions.satisfied = false;
|
|
665
|
+
}
|
|
666
|
+
// Check node version
|
|
667
|
+
requirements.node.satisfied = this.compareVersions(process.version.replace('v', ''), '18.0.0') >= 0;
|
|
668
|
+
const allSatisfied = Object.values(requirements).every(req => typeof req === 'object' && 'satisfied' in req ? req.satisfied : true);
|
|
669
|
+
return {
|
|
670
|
+
requirements,
|
|
671
|
+
allSatisfied,
|
|
672
|
+
canUpdate: allSatisfied
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
catch (error) {
|
|
676
|
+
this.log('error', `System check failed: ${error.message}`);
|
|
677
|
+
throw error;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Schedule automatic update check
|
|
682
|
+
*/
|
|
683
|
+
scheduleAutoUpdateCheck() {
|
|
684
|
+
if (!this.options.enableAutoUpdate)
|
|
685
|
+
return;
|
|
686
|
+
const intervalMs = this.options.checkIntervalMinutes * 60 * 1000;
|
|
687
|
+
setInterval(async () => {
|
|
688
|
+
try {
|
|
689
|
+
this.log('info', 'Performing scheduled update check');
|
|
690
|
+
const result = await this.checkForUpdates(false);
|
|
691
|
+
if (result.updateAvailable && result.shouldUpdate) {
|
|
692
|
+
this.log('info', 'Auto-installing update...');
|
|
693
|
+
await this.installUpdate(result.latestVersion, false);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
catch (error) {
|
|
697
|
+
this.log('error', `Scheduled update check failed: ${error.message}`);
|
|
698
|
+
}
|
|
699
|
+
}, intervalMs);
|
|
700
|
+
this.log('info', `Scheduled update check every ${this.options.checkIntervalMinutes} minutes`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
// ============================================================================
|
|
704
|
+
// QUICK SELF-UPDATE UTILITIES
|
|
705
|
+
// ============================================================================
|
|
706
|
+
/**
|
|
707
|
+
* Quick self-update utility
|
|
708
|
+
*/
|
|
709
|
+
export async function quickSelfUpdate(options) {
|
|
710
|
+
console.log('Self-update capability ready for integration');
|
|
711
|
+
return {
|
|
712
|
+
message: 'Self-update system initialized',
|
|
713
|
+
version: '1.0.0',
|
|
714
|
+
capabilities: ['check', 'install', 'rollback', 'status']
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Register self-update capability with framework factory
|
|
719
|
+
*/
|
|
720
|
+
export function registerSelfUpdateCapability() {
|
|
721
|
+
// This would register with UniversalCapabilityFactory
|
|
722
|
+
// For now, export the capability class
|
|
723
|
+
console.log('Self-update capability ready for integration');
|
|
724
|
+
}
|
|
725
|
+
//# sourceMappingURL=selfUpdateSystem.js.map
|