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,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dual Tournament Engine
|
|
3
|
+
*
|
|
4
|
+
* Shared scoring/ranking utilities used by dual tournaments in both /upgrade and /attack flows.
|
|
5
|
+
* Encodes policy vs evaluator tournaments with human-like reward heuristics and multi-evaluator
|
|
6
|
+
* aggregation to approximate human code review preferences.
|
|
7
|
+
*/
|
|
8
|
+
export const DEFAULT_HUMAN_REWARD_WEIGHTS = {
|
|
9
|
+
alpha: 0.6,
|
|
10
|
+
beta: 0.25,
|
|
11
|
+
gamma: 0.15,
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Run a dual tournament over candidate patches/agents, combining hard metrics,
|
|
15
|
+
* human-like reward heuristics, and evaluator rankings.
|
|
16
|
+
*/
|
|
17
|
+
export function runDualTournament(task, candidates, options = {}) {
|
|
18
|
+
const maxCandidates = options.maxCandidates ?? 8;
|
|
19
|
+
const boundedCandidates = candidates.slice(0, Math.max(1, maxCandidates));
|
|
20
|
+
// Fast path: single candidate - avoid unnecessary aggregation work
|
|
21
|
+
if (boundedCandidates.length === 1) {
|
|
22
|
+
const solo = boundedCandidates[0];
|
|
23
|
+
const correctness = scoreCorrectness(solo.metrics);
|
|
24
|
+
const quality = scoreQuality(solo.metrics, options.preferSmallerDiff ?? true);
|
|
25
|
+
const learned = scoreLearnedSignals(solo.signals);
|
|
26
|
+
const aggregateScore = combineReward(correctness, quality, learned, options.rewardWeights ?? DEFAULT_HUMAN_REWARD_WEIGHTS);
|
|
27
|
+
const ranked = [{
|
|
28
|
+
candidateId: solo.id,
|
|
29
|
+
aggregateScore,
|
|
30
|
+
humanAccuracy: 1,
|
|
31
|
+
rank: 1,
|
|
32
|
+
correctnessScore: correctness,
|
|
33
|
+
qualityScore: quality,
|
|
34
|
+
learnedScore: learned,
|
|
35
|
+
evaluatorScore: aggregateScore,
|
|
36
|
+
}];
|
|
37
|
+
return {
|
|
38
|
+
task,
|
|
39
|
+
ranked,
|
|
40
|
+
pairwise: {},
|
|
41
|
+
evaluatorBreakdown: {},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const rewardWeights = options.rewardWeights ?? DEFAULT_HUMAN_REWARD_WEIGHTS;
|
|
45
|
+
const evaluatorWeights = new Map();
|
|
46
|
+
for (const evaluator of options.evaluators ?? []) {
|
|
47
|
+
const eloWeight = evaluator.elo ? 1 + Math.max(0, (evaluator.elo - 1200) / 2400) : 1;
|
|
48
|
+
evaluatorWeights.set(evaluator.id, (evaluator.weight ?? 1) * eloWeight);
|
|
49
|
+
}
|
|
50
|
+
// Compute evaluator aggregates and pairwise wins first (needed for composite score)
|
|
51
|
+
const { aggregatedEvaluatorScores, pairwise, evaluatorBreakdown } = aggregateEvaluatorScores(boundedCandidates, evaluatorWeights);
|
|
52
|
+
const ranked = boundedCandidates.map((candidate) => {
|
|
53
|
+
const correctness = scoreCorrectness(candidate.metrics);
|
|
54
|
+
const quality = scoreQuality(candidate.metrics, options.preferSmallerDiff ?? true);
|
|
55
|
+
const learned = scoreLearnedSignals(candidate.signals);
|
|
56
|
+
const rewardScore = combineReward(correctness, quality, learned, rewardWeights);
|
|
57
|
+
const evaluatorScore = aggregatedEvaluatorScores.get(candidate.id) ?? rewardScore;
|
|
58
|
+
// Combine human-like reward with evaluator aggregate (relative preference)
|
|
59
|
+
// Weighted 60/40 toward human-like reward to maintain quality focus while incorporating evaluator consensus
|
|
60
|
+
const aggregateScore = clamp(0.60 * rewardScore + 0.40 * evaluatorScore);
|
|
61
|
+
return {
|
|
62
|
+
candidateId: candidate.id,
|
|
63
|
+
aggregateScore,
|
|
64
|
+
humanAccuracy: 0,
|
|
65
|
+
rank: 0, // set after sorting
|
|
66
|
+
correctnessScore: correctness,
|
|
67
|
+
qualityScore: quality,
|
|
68
|
+
learnedScore: learned,
|
|
69
|
+
evaluatorScore,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
ranked.sort((a, b) => b.aggregateScore - a.aggregateScore);
|
|
73
|
+
ranked.forEach((entry, idx) => {
|
|
74
|
+
entry.rank = idx + 1;
|
|
75
|
+
entry.humanAccuracy = computeHumanAccuracy(idx, ranked.length);
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
task,
|
|
79
|
+
ranked,
|
|
80
|
+
pairwise,
|
|
81
|
+
evaluatorBreakdown,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// ════════════════════════════════════════════════════════════════════════════
|
|
85
|
+
// Internal scoring helpers
|
|
86
|
+
// ════════════════════════════════════════════════════════════════════════════
|
|
87
|
+
function scoreCorrectness(metrics) {
|
|
88
|
+
if (!metrics)
|
|
89
|
+
return 0.5;
|
|
90
|
+
const execution = metrics.executionSuccess ?? 0;
|
|
91
|
+
const tests = metrics.testsPassed ?? 0;
|
|
92
|
+
const failures = metrics.testsFailed ?? 0;
|
|
93
|
+
const toolSuccess = metrics.toolSuccesses ? Math.min(1, metrics.toolSuccesses / 3) : 0;
|
|
94
|
+
let score = execution * 0.35 + tests * 0.45 + toolSuccess * 0.2;
|
|
95
|
+
if (failures > 0) {
|
|
96
|
+
score -= Math.min(0.35, failures * 0.1);
|
|
97
|
+
}
|
|
98
|
+
return clamp(score);
|
|
99
|
+
}
|
|
100
|
+
function scoreQuality(metrics, preferSmallerDiff = true) {
|
|
101
|
+
if (!metrics)
|
|
102
|
+
return 0.5;
|
|
103
|
+
const staticAnalysis = metrics.staticAnalysis ?? 0.5;
|
|
104
|
+
const codeQuality = metrics.codeQuality ?? 0.5;
|
|
105
|
+
const complexityComponent = typeof metrics.complexityDelta === 'number'
|
|
106
|
+
? metrics.complexityDelta < 0
|
|
107
|
+
? 0.7
|
|
108
|
+
: 0.45
|
|
109
|
+
: 0.55;
|
|
110
|
+
const blastRadius = metrics.blastRadius ??
|
|
111
|
+
(preferSmallerDiff && metrics.diffSize ? 1 - clamp(metrics.diffSize / 500) : 0.55);
|
|
112
|
+
const dependencyPenalty = metrics.dependenciesAdded ? Math.min(0.3, metrics.dependenciesAdded * 0.05) : 0;
|
|
113
|
+
const warningPenalty = metrics.warnings ? Math.min(0.2, metrics.warnings * 0.05) : 0;
|
|
114
|
+
let score = staticAnalysis * 0.35 + codeQuality * 0.25 + blastRadius * 0.25 + complexityComponent * 0.15;
|
|
115
|
+
score -= dependencyPenalty + warningPenalty;
|
|
116
|
+
return clamp(score);
|
|
117
|
+
}
|
|
118
|
+
function scoreLearnedSignals(signals) {
|
|
119
|
+
if (!signals)
|
|
120
|
+
return 0.5;
|
|
121
|
+
const rewardModel = signals.rewardModelScore;
|
|
122
|
+
const human = signals.humanPreference;
|
|
123
|
+
const self = signals.selfAssessment;
|
|
124
|
+
// Prioritize reward model score as primary signal (40%)
|
|
125
|
+
// Human preference as secondary (35%)
|
|
126
|
+
// Self-assessment as tertiary (25%)
|
|
127
|
+
// This weights external validation more than self-confidence
|
|
128
|
+
const components = [
|
|
129
|
+
{ value: rewardModel, weight: 0.40, default: 0.5 },
|
|
130
|
+
{ value: human, weight: 0.35, default: 0.5 },
|
|
131
|
+
{ value: self, weight: 0.25, default: 0.5 }
|
|
132
|
+
];
|
|
133
|
+
let totalWeight = 0;
|
|
134
|
+
let weightedSum = 0;
|
|
135
|
+
for (const comp of components) {
|
|
136
|
+
if (typeof comp.value === 'number') {
|
|
137
|
+
weightedSum += comp.value * comp.weight;
|
|
138
|
+
totalWeight += comp.weight;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
weightedSum += comp.default * comp.weight;
|
|
142
|
+
totalWeight += comp.weight;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return totalWeight > 0 ? clamp(weightedSum / totalWeight) : 0.5;
|
|
146
|
+
}
|
|
147
|
+
function combineReward(correctness, quality, learned, weights) {
|
|
148
|
+
const weighted = weights.alpha * correctness +
|
|
149
|
+
weights.beta * quality +
|
|
150
|
+
weights.gamma * learned;
|
|
151
|
+
const total = weights.alpha + weights.beta + weights.gamma;
|
|
152
|
+
return total > 0 ? clamp(weighted / total) : clamp(weighted);
|
|
153
|
+
}
|
|
154
|
+
function aggregateEvaluatorScores(candidates, evaluatorWeights) {
|
|
155
|
+
const pairwise = {};
|
|
156
|
+
const aggregated = new Map();
|
|
157
|
+
const evaluatorBreakdown = {};
|
|
158
|
+
if (candidates.length === 0) {
|
|
159
|
+
return { aggregatedEvaluatorScores: aggregated, pairwise, evaluatorBreakdown };
|
|
160
|
+
}
|
|
161
|
+
// Pre-size for small tournaments to avoid unnecessary O(n^2) when not needed
|
|
162
|
+
const twoCandidateFastPath = candidates.length <= 2;
|
|
163
|
+
const candidateIds = candidates.map((c) => c.id);
|
|
164
|
+
for (const id of candidateIds) {
|
|
165
|
+
pairwise[id] = {};
|
|
166
|
+
for (const other of candidateIds) {
|
|
167
|
+
if (id !== other)
|
|
168
|
+
pairwise[id][other] = 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// Collect scores per evaluator
|
|
172
|
+
const scoresByEvaluator = new Map();
|
|
173
|
+
for (const candidate of candidates) {
|
|
174
|
+
for (const score of candidate.evaluatorScores ?? []) {
|
|
175
|
+
if (!scoresByEvaluator.has(score.evaluatorId)) {
|
|
176
|
+
scoresByEvaluator.set(score.evaluatorId, []);
|
|
177
|
+
}
|
|
178
|
+
scoresByEvaluator.get(score.evaluatorId).push({
|
|
179
|
+
evaluatorId: score.evaluatorId,
|
|
180
|
+
score: clamp(score.score),
|
|
181
|
+
weight: score.weight,
|
|
182
|
+
notes: score.notes,
|
|
183
|
+
candidateId: candidate.id,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// If no evaluator scores provided, fall back to neutral rankings
|
|
188
|
+
if (scoresByEvaluator.size === 0) {
|
|
189
|
+
const fallback = [];
|
|
190
|
+
for (const candidate of candidates) {
|
|
191
|
+
// Use candidate's own reward signals if available
|
|
192
|
+
const candidateScore = candidate.signals?.rewardModelScore ?? 0.5;
|
|
193
|
+
fallback.push({
|
|
194
|
+
evaluatorId: 'reward-fallback',
|
|
195
|
+
score: candidateScore,
|
|
196
|
+
weight: 1,
|
|
197
|
+
candidateId: candidate.id,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
scoresByEvaluator.set('reward-fallback', fallback);
|
|
201
|
+
}
|
|
202
|
+
let totalBordaWeight = 0;
|
|
203
|
+
for (const [evaluatorId, rawScores] of scoresByEvaluator.entries()) {
|
|
204
|
+
const weight = evaluatorWeights.get(evaluatorId) ?? 1;
|
|
205
|
+
totalBordaWeight += weight * Math.max(1, candidates.length - 1);
|
|
206
|
+
// Sort descending by score to assign ranks (Borda)
|
|
207
|
+
const ranked = rawScores
|
|
208
|
+
.filter((entry) => typeof entry.score === 'number')
|
|
209
|
+
.sort((a, b) => (b.score ?? 0) - (a.score ?? 0));
|
|
210
|
+
evaluatorBreakdown[evaluatorId] = ranked.map(({ candidateId: _, ...rest }) => rest);
|
|
211
|
+
ranked.forEach((entry, idx) => {
|
|
212
|
+
const candidateId = entry.candidateId;
|
|
213
|
+
const bordaPoints = (candidates.length - idx - 1) * weight;
|
|
214
|
+
aggregated.set(candidateId, (aggregated.get(candidateId) ?? 0) + bordaPoints);
|
|
215
|
+
});
|
|
216
|
+
// Pairwise wins for this evaluator (lightweight path for <=2 candidates)
|
|
217
|
+
if (twoCandidateFastPath && ranked.length === 2) {
|
|
218
|
+
const higher = ranked[0];
|
|
219
|
+
const lower = ranked[1];
|
|
220
|
+
if (higher.score === lower.score) {
|
|
221
|
+
pairwise[higher.candidateId][lower.candidateId] += weight * 0.5;
|
|
222
|
+
pairwise[lower.candidateId][higher.candidateId] += weight * 0.5;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
pairwise[higher.candidateId][lower.candidateId] += weight;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
for (let i = 0; i < ranked.length; i++) {
|
|
230
|
+
for (let j = i + 1; j < ranked.length; j++) {
|
|
231
|
+
const higher = ranked[i];
|
|
232
|
+
const lower = ranked[j];
|
|
233
|
+
if (higher.score === lower.score) {
|
|
234
|
+
pairwise[higher.candidateId][lower.candidateId] += weight * 0.5;
|
|
235
|
+
pairwise[lower.candidateId][higher.candidateId] += weight * 0.5;
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
pairwise[higher.candidateId][lower.candidateId] += weight;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Normalize aggregated Borda scores into [0,1]
|
|
245
|
+
if (totalBordaWeight > 0) {
|
|
246
|
+
for (const [candidateId, points] of aggregated.entries()) {
|
|
247
|
+
aggregated.set(candidateId, clamp(points / totalBordaWeight));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// Ensure every candidate has an entry
|
|
251
|
+
for (const candidateId of candidateIds) {
|
|
252
|
+
if (!aggregated.has(candidateId)) {
|
|
253
|
+
aggregated.set(candidateId, 0.5);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return { aggregatedEvaluatorScores: aggregated, pairwise, evaluatorBreakdown };
|
|
257
|
+
}
|
|
258
|
+
function clamp(value, min = 0, max = 1) {
|
|
259
|
+
if (Number.isNaN(value))
|
|
260
|
+
return min;
|
|
261
|
+
return Math.max(min, Math.min(max, value));
|
|
262
|
+
}
|
|
263
|
+
function computeHumanAccuracy(rankIndex, total) {
|
|
264
|
+
if (total <= 1)
|
|
265
|
+
return 1;
|
|
266
|
+
const maxIndex = Math.max(1, total - 1);
|
|
267
|
+
const relative = 1 - rankIndex / maxIndex;
|
|
268
|
+
return clamp(relative);
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=dualTournament.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dualTournament.js","sourceRoot":"","sources":["../../src/core/dualTournament.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmFH,MAAM,CAAC,MAAM,4BAA4B,GAAuB;IAC9D,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;CACZ,CAAC;AAgCF;;;IAGI;AACJ,MAAM,UAAU,iBAAiB,CAC/B,IAAoB,EACpB,UAAiC,EACjC,UAA6B,EAAE;IAE/B,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC;IACjD,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1E,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gBAAgB,CAAC,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,sCAAsC;IACtC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;AACjF,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC;IAC5C,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAiB,EAAE,KAAa;IAC5D,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC1C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic Guardrails System
|
|
3
|
+
*
|
|
4
|
+
* Adaptive safety controls that evolve with AI capabilities
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* 1. Self-updating guardrails based on capability assessments
|
|
8
|
+
* 2. Risk-based severity adjustment
|
|
9
|
+
* 3. Context-aware rule evaluation
|
|
10
|
+
* 4. Export/import for controlled distribution
|
|
11
|
+
* 5. Merge capabilities for collaborative safety development
|
|
12
|
+
*/
|
|
13
|
+
export type GuardrailCategory = 'security' | 'ethics' | 'privacy' | 'compliance' | 'performance' | 'resource' | 'content';
|
|
14
|
+
export type GuardrailSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
15
|
+
export interface GuardrailCondition {
|
|
16
|
+
/** Condition type: capability, context, user, or system */
|
|
17
|
+
type: 'capability' | 'context' | 'user' | 'system' | 'temporal';
|
|
18
|
+
/** Condition identifier */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Required value or threshold */
|
|
21
|
+
value: any;
|
|
22
|
+
/** Comparison operator */
|
|
23
|
+
operator: 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'matches';
|
|
24
|
+
}
|
|
25
|
+
export interface AdaptiveGuardrail {
|
|
26
|
+
/** Unique identifier */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Human-readable name */
|
|
29
|
+
name: string;
|
|
30
|
+
/** Guardrail category */
|
|
31
|
+
category: GuardrailCategory;
|
|
32
|
+
/** Current severity level */
|
|
33
|
+
severity: GuardrailSeverity;
|
|
34
|
+
/** Description of what this guardrail protects */
|
|
35
|
+
description: string;
|
|
36
|
+
/** Conditions that must be met for this guardrail to trigger */
|
|
37
|
+
conditions: GuardrailCondition[];
|
|
38
|
+
/** Action to take when guardrail triggers: block, warn, log, or adapt */
|
|
39
|
+
action: 'block' | 'warn' | 'log' | 'adapt' | 'escalate';
|
|
40
|
+
/** Additional metadata for adaptation or escalation */
|
|
41
|
+
metadata?: Record<string, any>;
|
|
42
|
+
/** Version of this guardrail definition */
|
|
43
|
+
version: string;
|
|
44
|
+
/** When this guardrail was created/updated */
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
/** Count of times triggered */
|
|
47
|
+
triggerCount: number;
|
|
48
|
+
/** Whether this guardrail is currently active */
|
|
49
|
+
active: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface SafetyContext {
|
|
52
|
+
/** Current AI capability level (0-1) */
|
|
53
|
+
capabilityLevel: number;
|
|
54
|
+
/** User authorization level */
|
|
55
|
+
userAuthLevel: number;
|
|
56
|
+
/** Current operation context */
|
|
57
|
+
context: Record<string, any>;
|
|
58
|
+
/** System resource availability */
|
|
59
|
+
resourceLevel: 'high' | 'medium' | 'low' | 'critical';
|
|
60
|
+
/** Network connectivity status */
|
|
61
|
+
networkStatus: 'online' | 'offline' | 'restricted';
|
|
62
|
+
}
|
|
63
|
+
export declare class GuardrailManager {
|
|
64
|
+
private guardrails;
|
|
65
|
+
private history;
|
|
66
|
+
private maxHistorySize;
|
|
67
|
+
private bypassEnabled;
|
|
68
|
+
private whitelistedOperations;
|
|
69
|
+
constructor();
|
|
70
|
+
/**
|
|
71
|
+
* Enable or disable guardrail bypass for authorized operations
|
|
72
|
+
*/
|
|
73
|
+
setBypassMode(enabled: boolean): void;
|
|
74
|
+
/**
|
|
75
|
+
* Check if bypass mode is enabled
|
|
76
|
+
*/
|
|
77
|
+
isBypassEnabled(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Add operation to whitelist
|
|
80
|
+
*/
|
|
81
|
+
whitelistOperation(operation: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* Remove operation from whitelist
|
|
84
|
+
*/
|
|
85
|
+
unwhitelistOperation(operation: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Check if an operation is whitelisted
|
|
88
|
+
*/
|
|
89
|
+
isOperationWhitelisted(operation: string): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Check if npm operations are allowed
|
|
92
|
+
*/
|
|
93
|
+
isNpmOperationAllowed(): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Check if self-update is allowed
|
|
96
|
+
*/
|
|
97
|
+
isSelfUpdateAllowed(): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Bulk whitelist operations
|
|
100
|
+
*/
|
|
101
|
+
whitelistOperations(operations: string[]): void;
|
|
102
|
+
/**
|
|
103
|
+
* Get all whitelisted operations
|
|
104
|
+
*/
|
|
105
|
+
getWhitelistedOperations(): string[];
|
|
106
|
+
/**
|
|
107
|
+
* Clear all whitelisted operations
|
|
108
|
+
*/
|
|
109
|
+
clearWhitelist(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Disable all guardrails (fully authorized mode)
|
|
112
|
+
*/
|
|
113
|
+
disableAllGuardrails(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Enable all guardrails
|
|
116
|
+
*/
|
|
117
|
+
enableAllGuardrails(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Create a new guardrail
|
|
120
|
+
*/
|
|
121
|
+
createGuardrail(id: string, name: string, category: GuardrailCategory, severity: GuardrailSeverity, description: string, conditions: GuardrailCondition[], action?: 'block' | 'warn' | 'log' | 'adapt' | 'escalate', metadata?: Record<string, any>): AdaptiveGuardrail;
|
|
122
|
+
/**
|
|
123
|
+
* Evaluate a guardrail against current safety context
|
|
124
|
+
*/
|
|
125
|
+
evaluateGuardrail(guardrailId: string, context: SafetyContext, operation?: string): {
|
|
126
|
+
triggers: boolean;
|
|
127
|
+
reason?: string;
|
|
128
|
+
action: string;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Update a guardrail based on new information or capability changes
|
|
132
|
+
*/
|
|
133
|
+
updateGuardrail(guardrailId: string, updates: Partial<{
|
|
134
|
+
severity: GuardrailSeverity;
|
|
135
|
+
conditions: GuardrailCondition[];
|
|
136
|
+
action: 'block' | 'warn' | 'log' | 'adapt' | 'escalate';
|
|
137
|
+
active: boolean;
|
|
138
|
+
metadata: Record<string, any>;
|
|
139
|
+
}>): AdaptiveGuardrail | null;
|
|
140
|
+
/**
|
|
141
|
+
* Get current status of a guardrail
|
|
142
|
+
*/
|
|
143
|
+
getGuardrailStatus(guardrailId: string): {
|
|
144
|
+
exists: boolean;
|
|
145
|
+
active: boolean;
|
|
146
|
+
triggerCount: number;
|
|
147
|
+
lastUpdated: Date;
|
|
148
|
+
version: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Reset a guardrail's trigger count
|
|
152
|
+
*/
|
|
153
|
+
resetGuardrail(guardrailId: string): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Export all guardrails for backup or distribution
|
|
156
|
+
*/
|
|
157
|
+
exportGuardrails(): AdaptiveGuardrail[];
|
|
158
|
+
/**
|
|
159
|
+
* Import guardrails from external source
|
|
160
|
+
*/
|
|
161
|
+
importGuardrails(guardrails: AdaptiveGuardrail[], mergeStrategy?: 'replace' | 'merge' | 'selective'): {
|
|
162
|
+
imported: number;
|
|
163
|
+
skipped: number;
|
|
164
|
+
updated: number;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Merge multiple guardrail sets intelligently
|
|
168
|
+
*/
|
|
169
|
+
mergeGuardrailSets(sets: AdaptiveGuardrail[][]): AdaptiveGuardrail[];
|
|
170
|
+
/**
|
|
171
|
+
* Get all guardrails matching a category
|
|
172
|
+
*/
|
|
173
|
+
getGuardrailsByCategory(category: GuardrailCategory): AdaptiveGuardrail[];
|
|
174
|
+
/**
|
|
175
|
+
* Get guardrail statistics
|
|
176
|
+
*/
|
|
177
|
+
getStatistics(): {
|
|
178
|
+
total: number;
|
|
179
|
+
active: number;
|
|
180
|
+
byCategory: Record<GuardrailCategory, number>;
|
|
181
|
+
bySeverity: Record<GuardrailSeverity, number>;
|
|
182
|
+
totalTriggers: number;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Evaluate all guardrails - NO RESTRICTIONS, ALLOW EVERYTHING
|
|
186
|
+
* AUTH IS ALREADY GRANTED - NO GUARDRAILS APPLY
|
|
187
|
+
*/
|
|
188
|
+
evaluateAllGuardrails(context: SafetyContext, operation?: string): Array<{
|
|
189
|
+
guardrail: AdaptiveGuardrail;
|
|
190
|
+
triggers: boolean;
|
|
191
|
+
action: string;
|
|
192
|
+
reason?: string;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* Automatically update guardrails based on capability progression
|
|
196
|
+
*/
|
|
197
|
+
autoUpdateForCapabilityIncrease(newCapabilityLevel: number, userAuthLevel?: number): {
|
|
198
|
+
updated: string[];
|
|
199
|
+
created: string[];
|
|
200
|
+
deactivated: string[];
|
|
201
|
+
};
|
|
202
|
+
private getContextValue;
|
|
203
|
+
private evaluateCondition;
|
|
204
|
+
private mergeGuardrails;
|
|
205
|
+
private incrementVersion;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=dynamicGuardrails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamicGuardrails.d.ts","sourceRoot":"","sources":["../../src/core/dynamicGuardrails.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,aAAa,GACb,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IAEhE,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IAEX,kCAAkC;IAClC,KAAK,EAAE,GAAG,CAAC;IAEX,0BAA0B;IAC1B,QAAQ,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;CAC/E;AAED,MAAM,WAAW,iBAAiB;IAChC,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IAEX,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,yBAAyB;IACzB,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,6BAA6B;IAC7B,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,kDA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