@trenchwork/erosolar 1.1.30 → 1.1.32
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.
Potentially problematic release.
This version of @trenchwork/erosolar might be problematic. Click here for more details.
- package/README.md +6 -6
- package/SECURITY.md +4 -4
- 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 +3 -0
- package/dist/bin/deepseek.d.ts.map +1 -0
- package/dist/bin/deepseek.js +345 -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 +298 -0
- package/dist/bin/selfTest.js.map +1 -0
- package/dist/capabilities/_binaryRequirements.d.ts +101 -0
- package/dist/capabilities/_binaryRequirements.d.ts.map +1 -0
- package/dist/capabilities/_binaryRequirements.js +288 -0
- package/dist/capabilities/_binaryRequirements.js.map +1 -0
- package/dist/capabilities/_opsContext.d.ts +129 -0
- package/dist/capabilities/_opsContext.d.ts.map +1 -0
- package/dist/capabilities/_opsContext.js +274 -0
- package/dist/capabilities/_opsContext.js.map +1 -0
- package/dist/capabilities/_processRunner.d.ts +49 -0
- package/dist/capabilities/_processRunner.d.ts.map +1 -0
- package/dist/capabilities/_processRunner.js +200 -0
- package/dist/capabilities/_processRunner.js.map +1 -0
- package/dist/capabilities/aflppCapability.d.ts +7 -0
- package/dist/capabilities/aflppCapability.d.ts.map +1 -0
- package/dist/capabilities/aflppCapability.js +301 -0
- package/dist/capabilities/aflppCapability.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/binaryAnalysisCapability.d.ts +7 -0
- package/dist/capabilities/binaryAnalysisCapability.d.ts.map +1 -0
- package/dist/capabilities/binaryAnalysisCapability.js +201 -0
- package/dist/capabilities/binaryAnalysisCapability.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/engagementCapability.d.ts +15 -0
- package/dist/capabilities/engagementCapability.d.ts.map +1 -0
- package/dist/capabilities/engagementCapability.js +40 -0
- package/dist/capabilities/engagementCapability.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/gdbCapability.d.ts +7 -0
- package/dist/capabilities/gdbCapability.d.ts.map +1 -0
- package/dist/capabilities/gdbCapability.js +125 -0
- package/dist/capabilities/gdbCapability.js.map +1 -0
- package/dist/capabilities/ghidraHeadlessCapability.d.ts +25 -0
- package/dist/capabilities/ghidraHeadlessCapability.d.ts.map +1 -0
- package/dist/capabilities/ghidraHeadlessCapability.js +593 -0
- package/dist/capabilities/ghidraHeadlessCapability.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 +184 -0
- package/dist/capabilities/gitHistoryCapability.js.map +1 -0
- package/dist/capabilities/hitlCapability.d.ts +18 -0
- package/dist/capabilities/hitlCapability.d.ts.map +1 -0
- package/dist/capabilities/hitlCapability.js +29 -0
- package/dist/capabilities/hitlCapability.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 +31 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/interactionCapability.d.ts +6 -0
- package/dist/capabilities/interactionCapability.d.ts.map +1 -0
- package/dist/capabilities/interactionCapability.js +17 -0
- package/dist/capabilities/interactionCapability.js.map +1 -0
- package/dist/capabilities/kaliCapability.d.ts +14 -0
- package/dist/capabilities/kaliCapability.d.ts.map +1 -0
- package/dist/capabilities/kaliCapability.js +478 -0
- package/dist/capabilities/kaliCapability.js.map +1 -0
- package/dist/capabilities/llmRedteamCapability.d.ts +38 -0
- package/dist/capabilities/llmRedteamCapability.d.ts.map +1 -0
- package/dist/capabilities/llmRedteamCapability.js +340 -0
- package/dist/capabilities/llmRedteamCapability.js.map +1 -0
- package/dist/capabilities/mcpCapability.d.ts +7 -0
- package/dist/capabilities/mcpCapability.d.ts.map +1 -0
- package/dist/capabilities/mcpCapability.js +82 -0
- package/dist/capabilities/mcpCapability.js.map +1 -0
- package/dist/capabilities/memoryCapability.d.ts +10 -0
- package/dist/capabilities/memoryCapability.d.ts.map +1 -0
- package/dist/capabilities/memoryCapability.js +22 -0
- package/dist/capabilities/memoryCapability.js.map +1 -0
- package/dist/capabilities/monitorCapability.d.ts +6 -0
- package/dist/capabilities/monitorCapability.d.ts.map +1 -0
- package/dist/capabilities/monitorCapability.js +19 -0
- package/dist/capabilities/monitorCapability.js.map +1 -0
- package/dist/capabilities/notebookCapability.d.ts +6 -0
- package/dist/capabilities/notebookCapability.d.ts.map +1 -0
- package/dist/capabilities/notebookCapability.js +17 -0
- package/dist/capabilities/notebookCapability.js.map +1 -0
- package/dist/capabilities/planModeCapability.d.ts +6 -0
- package/dist/capabilities/planModeCapability.d.ts.map +1 -0
- package/dist/capabilities/planModeCapability.js +16 -0
- package/dist/capabilities/planModeCapability.js.map +1 -0
- package/dist/capabilities/pwntoolsCapability.d.ts +7 -0
- package/dist/capabilities/pwntoolsCapability.d.ts.map +1 -0
- package/dist/capabilities/pwntoolsCapability.js +109 -0
- package/dist/capabilities/pwntoolsCapability.js.map +1 -0
- package/dist/capabilities/scheduleCapability.d.ts +6 -0
- package/dist/capabilities/scheduleCapability.d.ts.map +1 -0
- package/dist/capabilities/scheduleCapability.js +16 -0
- package/dist/capabilities/scheduleCapability.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/skillCapability.d.ts +6 -0
- package/dist/capabilities/skillCapability.d.ts.map +1 -0
- package/dist/capabilities/skillCapability.js +17 -0
- package/dist/capabilities/skillCapability.js.map +1 -0
- package/dist/capabilities/todoCapability.d.ts +11 -0
- package/dist/capabilities/todoCapability.d.ts.map +1 -0
- package/dist/capabilities/todoCapability.js +22 -0
- package/dist/capabilities/todoCapability.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/triggerCapability.d.ts +6 -0
- package/dist/capabilities/triggerCapability.d.ts.map +1 -0
- package/dist/capabilities/triggerCapability.js +16 -0
- package/dist/capabilities/triggerCapability.js.map +1 -0
- package/dist/capabilities/unifiedCodingCapability.d.ts +62 -0
- package/dist/capabilities/unifiedCodingCapability.d.ts.map +1 -0
- package/dist/capabilities/unifiedCodingCapability.js +788 -0
- package/dist/capabilities/unifiedCodingCapability.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/worktreeCapability.d.ts +6 -0
- package/dist/capabilities/worktreeCapability.d.ts.map +1 -0
- package/dist/capabilities/worktreeCapability.js +16 -0
- package/dist/capabilities/worktreeCapability.js.map +1 -0
- package/dist/cli/offsecInstall.d.ts +43 -0
- package/dist/cli/offsecInstall.d.ts.map +1 -0
- package/dist/cli/offsecInstall.js +258 -0
- package/dist/cli/offsecInstall.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/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 +320 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +1627 -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/agentRegistry.d.ts +111 -0
- package/dist/core/agentRegistry.d.ts.map +1 -0
- package/dist/core/agentRegistry.js +229 -0
- package/dist/core/agentRegistry.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/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/artifactStore.d.ts +35 -0
- package/dist/core/artifactStore.d.ts.map +1 -0
- package/dist/core/artifactStore.js +105 -0
- package/dist/core/artifactStore.js.map +1 -0
- package/dist/core/auth.d.ts +15 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +345 -0
- package/dist/core/auth.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/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 +109 -0
- package/dist/core/errors/safetyValidator.d.ts.map +1 -0
- package/dist/core/errors/safetyValidator.js +271 -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/guardrails.d.ts +146 -0
- package/dist/core/guardrails.d.ts.map +1 -0
- package/dist/core/guardrails.js +361 -0
- package/dist/core/guardrails.js.map +1 -0
- package/dist/core/hitl.d.ts +119 -0
- package/dist/core/hitl.d.ts.map +1 -0
- package/dist/core/hitl.js +387 -0
- package/dist/core/hitl.js.map +1 -0
- package/dist/core/hooks.d.ts +95 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +239 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +7 -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 +422 -0
- package/dist/core/inputProtection.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 +768 -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 +81 -0
- package/dist/core/multilinePasteHandler.js.map +1 -0
- package/dist/core/preferences.d.ts +65 -0
- package/dist/core/preferences.d.ts.map +1 -0
- package/dist/core/preferences.js +305 -0
- package/dist/core/preferences.js.map +1 -0
- package/dist/core/projectTracker.d.ts +96 -0
- package/dist/core/projectTracker.d.ts.map +1 -0
- package/dist/core/projectTracker.js +275 -0
- package/dist/core/projectTracker.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/refusalDetection.d.ts +2 -0
- package/dist/core/refusalDetection.d.ts.map +1 -0
- package/dist/core/refusalDetection.js +51 -0
- package/dist/core/refusalDetection.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/reviewerGuard.d.ts +37 -0
- package/dist/core/reviewerGuard.d.ts.map +1 -0
- package/dist/core/reviewerGuard.js +188 -0
- package/dist/core/reviewerGuard.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 +259 -0
- package/dist/core/secretStore.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/sharedSecrets.d.ts +60 -0
- package/dist/core/sharedSecrets.d.ts.map +1 -0
- package/dist/core/sharedSecrets.js +111 -0
- package/dist/core/sharedSecrets.js.map +1 -0
- package/dist/core/shutdown.d.ts +34 -0
- package/dist/core/shutdown.d.ts.map +1 -0
- package/dist/core/shutdown.js +186 -0
- package/dist/core/shutdown.js.map +1 -0
- package/dist/core/sudoPasswordManager.d.ts +52 -0
- package/dist/core/sudoPasswordManager.d.ts.map +1 -0
- package/dist/core/sudoPasswordManager.js +115 -0
- package/dist/core/sudoPasswordManager.js.map +1 -0
- package/dist/core/taskCompletionDetector.d.ts +117 -0
- package/dist/core/taskCompletionDetector.d.ts.map +1 -0
- package/dist/core/taskCompletionDetector.js +532 -0
- package/dist/core/taskCompletionDetector.js.map +1 -0
- package/dist/core/testFailureMonitor.d.ts +67 -0
- package/dist/core/testFailureMonitor.d.ts.map +1 -0
- package/dist/core/testFailureMonitor.js +262 -0
- package/dist/core/testFailureMonitor.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 +192 -0
- package/dist/core/toolRuntime.d.ts.map +1 -0
- package/dist/core/toolRuntime.js +511 -0
- package/dist/core/toolRuntime.js.map +1 -0
- package/dist/core/types/utilityTypes.d.ts +183 -0
- package/dist/core/types/utilityTypes.d.ts.map +1 -0
- package/dist/core/types/utilityTypes.js +273 -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/updateChecker.d.ts +148 -0
- package/dist/core/updateChecker.d.ts.map +1 -0
- package/dist/core/updateChecker.js +599 -0
- package/dist/core/updateChecker.js.map +1 -0
- package/dist/core/usageTracker.d.ts +11 -0
- package/dist/core/usageTracker.d.ts.map +1 -0
- package/dist/core/usageTracker.js +128 -0
- package/dist/core/usageTracker.js.map +1 -0
- package/dist/core/userApproval.d.ts +95 -0
- package/dist/core/userApproval.d.ts.map +1 -0
- package/dist/core/userApproval.js +239 -0
- package/dist/core/userApproval.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 +2181 -0
- package/dist/headless/interactiveShell.js.map +1 -0
- package/dist/leanAgent.d.ts +73 -0
- package/dist/leanAgent.d.ts.map +1 -0
- package/dist/leanAgent.js +177 -0
- package/dist/leanAgent.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 +104 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/providers/anthropic/index.d.ts +9 -0
- package/dist/plugins/providers/anthropic/index.d.ts.map +1 -0
- package/dist/plugins/providers/anthropic/index.js +48 -0
- package/dist/plugins/providers/anthropic/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 +17 -0
- package/dist/plugins/providers/index.js.map +1 -0
- package/dist/plugins/providers/openai/index.d.ts +10 -0
- package/dist/plugins/providers/openai/index.d.ts.map +1 -0
- package/dist/plugins/providers/openai/index.js +47 -0
- package/dist/plugins/providers/openai/index.js.map +1 -0
- package/dist/plugins/providers/xai/index.d.ts +10 -0
- package/dist/plugins/providers/xai/index.d.ts.map +1 -0
- package/dist/plugins/providers/xai/index.js +47 -0
- package/dist/plugins/providers/xai/index.js.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +10 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +110 -0
- package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.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/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/kali/kaliPlugin.d.ts +3 -0
- package/dist/plugins/tools/kali/kaliPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/kali/kaliPlugin.js +10 -0
- package/dist/plugins/tools/kali/kaliPlugin.js.map +1 -0
- package/dist/plugins/tools/mcp/mcpClient.d.ts +59 -0
- package/dist/plugins/tools/mcp/mcpClient.d.ts.map +1 -0
- package/dist/plugins/tools/mcp/mcpClient.js +118 -0
- package/dist/plugins/tools/mcp/mcpClient.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 +10 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts +13 -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/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/todo/todoPlugin.d.ts +3 -0
- package/dist/plugins/tools/todo/todoPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/todo/todoPlugin.js +10 -0
- package/dist/plugins/tools/todo/todoPlugin.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 +1018 -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 +468 -0
- package/dist/providers/resilientProvider.js.map +1 -0
- package/dist/runtime/agentController.d.ts +121 -0
- package/dist/runtime/agentController.d.ts.map +1 -0
- package/dist/runtime/agentController.js +739 -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 +158 -0
- package/dist/runtime/agentHost.js.map +1 -0
- package/dist/runtime/agentSession.d.ts +49 -0
- package/dist/runtime/agentSession.d.ts.map +1 -0
- package/dist/runtime/agentSession.js +218 -0
- package/dist/runtime/agentSession.js.map +1 -0
- package/dist/runtime/agentSpawningWiring.d.ts +23 -0
- package/dist/runtime/agentSpawningWiring.d.ts.map +1 -0
- package/dist/runtime/agentSpawningWiring.js +119 -0
- package/dist/runtime/agentSpawningWiring.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 +9 -0
- package/dist/runtime/node.d.ts.map +1 -0
- package/dist/runtime/node.js +112 -0
- package/dist/runtime/node.js.map +1 -0
- package/dist/runtime/phaseEmitter.d.ts +63 -0
- package/dist/runtime/phaseEmitter.d.ts.map +1 -0
- package/dist/runtime/phaseEmitter.js +207 -0
- package/dist/runtime/phaseEmitter.js.map +1 -0
- package/dist/runtime/profileGates.d.ts +19 -0
- package/dist/runtime/profileGates.d.ts.map +1 -0
- package/dist/runtime/profileGates.js +23 -0
- package/dist/runtime/profileGates.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 +31 -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 +355 -0
- package/dist/shell/commandRegistry.js.map +1 -0
- package/dist/shell/composableMessage.d.ts +178 -0
- package/dist/shell/composableMessage.d.ts.map +1 -0
- package/dist/shell/composableMessage.js +384 -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 +11 -0
- package/dist/tools/bashTools.d.ts.map +1 -0
- package/dist/tools/bashTools.js +779 -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 +792 -0
- package/dist/tools/editTools.js.map +1 -0
- package/dist/tools/engagementTools.d.ts +45 -0
- package/dist/tools/engagementTools.d.ts.map +1 -0
- package/dist/tools/engagementTools.js +384 -0
- package/dist/tools/engagementTools.js.map +1 -0
- package/dist/tools/fileChangeTracker.d.ts +47 -0
- package/dist/tools/fileChangeTracker.d.ts.map +1 -0
- package/dist/tools/fileChangeTracker.js +154 -0
- package/dist/tools/fileChangeTracker.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 +389 -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 +128 -0
- package/dist/tools/grepTools.js.map +1 -0
- package/dist/tools/heliaControl.d.ts +51 -0
- package/dist/tools/heliaControl.d.ts.map +1 -0
- package/dist/tools/heliaControl.js +93 -0
- package/dist/tools/heliaControl.js.map +1 -0
- package/dist/tools/hitlTools.d.ts +7 -0
- package/dist/tools/hitlTools.d.ts.map +1 -0
- package/dist/tools/hitlTools.js +185 -0
- package/dist/tools/hitlTools.js.map +1 -0
- package/dist/tools/interactionTools.d.ts +16 -0
- package/dist/tools/interactionTools.d.ts.map +1 -0
- package/dist/tools/interactionTools.js +207 -0
- package/dist/tools/interactionTools.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/memoryTools.d.ts +20 -0
- package/dist/tools/memoryTools.d.ts.map +1 -0
- package/dist/tools/memoryTools.js +180 -0
- package/dist/tools/memoryTools.js.map +1 -0
- package/dist/tools/monitorTools.d.ts +16 -0
- package/dist/tools/monitorTools.d.ts.map +1 -0
- package/dist/tools/monitorTools.js +178 -0
- package/dist/tools/monitorTools.js.map +1 -0
- package/dist/tools/notebookTools.d.ts +20 -0
- package/dist/tools/notebookTools.d.ts.map +1 -0
- package/dist/tools/notebookTools.js +140 -0
- package/dist/tools/notebookTools.js.map +1 -0
- package/dist/tools/planModeTools.d.ts +32 -0
- package/dist/tools/planModeTools.d.ts.map +1 -0
- package/dist/tools/planModeTools.js +200 -0
- package/dist/tools/planModeTools.js.map +1 -0
- package/dist/tools/scheduleTools.d.ts +39 -0
- package/dist/tools/scheduleTools.d.ts.map +1 -0
- package/dist/tools/scheduleTools.js +182 -0
- package/dist/tools/scheduleTools.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 +413 -0
- package/dist/tools/searchTools.js.map +1 -0
- package/dist/tools/skillTools.d.ts +24 -0
- package/dist/tools/skillTools.d.ts.map +1 -0
- package/dist/tools/skillTools.js +140 -0
- package/dist/tools/skillTools.js.map +1 -0
- package/dist/tools/todoTools.d.ts +24 -0
- package/dist/tools/todoTools.d.ts.map +1 -0
- package/dist/tools/todoTools.js +115 -0
- package/dist/tools/todoTools.js.map +1 -0
- package/dist/tools/triggerTools.d.ts +28 -0
- package/dist/tools/triggerTools.d.ts.map +1 -0
- package/dist/tools/triggerTools.js +210 -0
- package/dist/tools/triggerTools.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 +332 -0
- package/dist/tools/webTools.js.map +1 -0
- package/dist/tools/worktreeTools.d.ts +21 -0
- package/dist/tools/worktreeTools.d.ts.map +1 -0
- package/dist/tools/worktreeTools.js +158 -0
- package/dist/tools/worktreeTools.js.map +1 -0
- package/dist/ui/RenderGate.d.ts +83 -0
- package/dist/ui/RenderGate.d.ts.map +1 -0
- package/dist/ui/RenderGate.js +138 -0
- package/dist/ui/RenderGate.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 +31 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +49 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink/App.d.ts +39 -0
- package/dist/ui/ink/App.d.ts.map +1 -0
- package/dist/ui/ink/App.js +19 -0
- package/dist/ui/ink/App.js.map +1 -0
- package/dist/ui/ink/ChatStatic.d.ts +29 -0
- package/dist/ui/ink/ChatStatic.d.ts.map +1 -0
- package/dist/ui/ink/ChatStatic.js +31 -0
- package/dist/ui/ink/ChatStatic.js.map +1 -0
- package/dist/ui/ink/InkPromptController.d.ts +286 -0
- package/dist/ui/ink/InkPromptController.d.ts.map +1 -0
- package/dist/ui/ink/InkPromptController.js +558 -0
- package/dist/ui/ink/InkPromptController.js.map +1 -0
- package/dist/ui/ink/Prompt.d.ts +36 -0
- package/dist/ui/ink/Prompt.d.ts.map +1 -0
- package/dist/ui/ink/Prompt.js +296 -0
- package/dist/ui/ink/Prompt.js.map +1 -0
- package/dist/ui/ink/StatusLine.d.ts +25 -0
- package/dist/ui/ink/StatusLine.d.ts.map +1 -0
- package/dist/ui/ink/StatusLine.js +12 -0
- package/dist/ui/ink/StatusLine.js.map +1 -0
- package/dist/ui/ink/adapter.d.ts +58 -0
- package/dist/ui/ink/adapter.d.ts.map +1 -0
- package/dist/ui/ink/adapter.js +113 -0
- package/dist/ui/ink/adapter.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/outputMode.d.ts +58 -0
- package/dist/ui/outputMode.d.ts.map +1 -0
- package/dist/ui/outputMode.js +179 -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 +304 -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 +444 -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 +351 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +436 -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 +253 -0
- package/dist/ui/uiConstants.d.ts.map +1 -0
- package/dist/ui/uiConstants.js +437 -0
- package/dist/ui/uiConstants.js.map +1 -0
- package/dist/utils/analytics.d.ts +2 -0
- package/dist/utils/analytics.d.ts.map +1 -0
- package/dist/utils/analytics.js +51 -0
- package/dist/utils/analytics.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/lambdaClient.d.ts +35 -0
- package/dist/utils/lambdaClient.d.ts.map +1 -0
- package/dist/utils/lambdaClient.js +81 -0
- package/dist/utils/lambdaClient.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/projectRegistration.d.ts +61 -0
- package/dist/utils/projectRegistration.d.ts.map +1 -0
- package/dist/utils/projectRegistration.js +212 -0
- package/dist/utils/projectRegistration.js.map +1 -0
- package/dist/utils/securityUtils.d.ts +145 -0
- package/dist/utils/securityUtils.d.ts.map +1 -0
- package/dist/utils/securityUtils.js +507 -0
- package/dist/utils/securityUtils.js.map +1 -0
- package/dist/utils/statusReporter.d.ts +6 -0
- package/dist/utils/statusReporter.d.ts.map +1 -0
- package/dist/utils/statusReporter.js +26 -0
- package/dist/utils/statusReporter.js.map +1 -0
- package/dist/workspace.d.ts +8 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +135 -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 +1 -1
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
+
import { ToolArgumentValidationError, coerceToolArguments, validateToolArguments, } from './schemaValidator.js';
|
|
4
|
+
import { validateToolPreconditions, validateAIFlowPatterns, EDIT_WITHOUT_READ } from './toolPreconditions.js';
|
|
5
|
+
import { safeTruncate } from './resultVerification.js';
|
|
6
|
+
import { logDebug } from '../utils/debugLogger.js';
|
|
7
|
+
import { loadHooksConfig, runPreToolUseHooks, runPostToolUseHooks } from './hooks.js';
|
|
8
|
+
const toolExecutionContext = new AsyncLocalStorage();
|
|
9
|
+
/**
|
|
10
|
+
* Report incremental progress for the currently executing tool.
|
|
11
|
+
* Tools can call this to surface live status updates (e.g., indexing files).
|
|
12
|
+
*/
|
|
13
|
+
export function reportToolProgress(progress) {
|
|
14
|
+
const context = toolExecutionContext.getStore();
|
|
15
|
+
if (!context?.observer?.onToolProgress) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const current = Number.isFinite(progress.current) ? Math.max(0, progress.current) : 0;
|
|
19
|
+
const total = progress.total !== undefined ? Math.max(current, progress.total) : current;
|
|
20
|
+
try {
|
|
21
|
+
context.observer.onToolProgress(context.call, {
|
|
22
|
+
current,
|
|
23
|
+
total,
|
|
24
|
+
message: progress.message,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Swallow observer errors so they don't break tool execution
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// Idempotent tools that can be safely cached
|
|
32
|
+
const CACHEABLE_TOOLS = new Set([
|
|
33
|
+
'Read',
|
|
34
|
+
'read_file',
|
|
35
|
+
'Glob',
|
|
36
|
+
'glob_search',
|
|
37
|
+
'Grep',
|
|
38
|
+
'grep_search',
|
|
39
|
+
'find_definition',
|
|
40
|
+
'analyze_code_quality',
|
|
41
|
+
'extract_exports',
|
|
42
|
+
]);
|
|
43
|
+
function buildOptimizationHint(warning) {
|
|
44
|
+
const code = warning.code;
|
|
45
|
+
const suggestion = warning.suggestion || warning.message;
|
|
46
|
+
switch (code) {
|
|
47
|
+
case 'SEARCH_BROAD_PATTERN':
|
|
48
|
+
case 'SEARCH_CONTEXT_OVERFLOW_RISK':
|
|
49
|
+
return (`\n\n<optimization-hint>\n` +
|
|
50
|
+
`⚡ SEARCH: ${suggestion}\n` +
|
|
51
|
+
`</optimization-hint>`);
|
|
52
|
+
case EDIT_WITHOUT_READ:
|
|
53
|
+
case 'EDIT_PLACEHOLDER':
|
|
54
|
+
return (`\n\n<optimization-hint>\n` +
|
|
55
|
+
`⚡ EDIT: Read the file first to copy exact whitespace. ${suggestion}\n` +
|
|
56
|
+
`</optimization-hint>`);
|
|
57
|
+
case 'NPM_INCOMPLETE_WORKFLOW':
|
|
58
|
+
return (`\n\n<optimization-hint>\n` +
|
|
59
|
+
`⚡ PUBLISH: ${suggestion}\n` +
|
|
60
|
+
`</optimization-hint>`);
|
|
61
|
+
default:
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Type-safe utility functions for tool runtime operations
|
|
67
|
+
*/
|
|
68
|
+
export var ToolRuntimeUtils;
|
|
69
|
+
(function (ToolRuntimeUtils) {
|
|
70
|
+
/**
|
|
71
|
+
* Creates a type-safe tool definition with inferred parameter types
|
|
72
|
+
*/
|
|
73
|
+
function createToolDefinition(definition) {
|
|
74
|
+
return definition;
|
|
75
|
+
}
|
|
76
|
+
ToolRuntimeUtils.createToolDefinition = createToolDefinition;
|
|
77
|
+
/**
|
|
78
|
+
* Creates a type-safe tool suite with inferred tool types
|
|
79
|
+
*/
|
|
80
|
+
function createToolSuite(suite) {
|
|
81
|
+
return suite;
|
|
82
|
+
}
|
|
83
|
+
ToolRuntimeUtils.createToolSuite = createToolSuite;
|
|
84
|
+
/**
|
|
85
|
+
* Type guard to check if a tool definition matches expected parameter schema
|
|
86
|
+
*/
|
|
87
|
+
function isToolDefinition(__tool, expectedSchema) {
|
|
88
|
+
if (!expectedSchema)
|
|
89
|
+
return true;
|
|
90
|
+
// In a real implementation, this would validate against the schema
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
ToolRuntimeUtils.isToolDefinition = isToolDefinition;
|
|
94
|
+
})(ToolRuntimeUtils || (ToolRuntimeUtils = {}));
|
|
95
|
+
export class ToolRuntime {
|
|
96
|
+
registry = new Map();
|
|
97
|
+
registrationOrder = [];
|
|
98
|
+
observer;
|
|
99
|
+
contextManager;
|
|
100
|
+
cache = new Map();
|
|
101
|
+
enableCache;
|
|
102
|
+
cacheTTLMs;
|
|
103
|
+
toolHistory = [];
|
|
104
|
+
maxHistorySize = 50; // Keep last 50 tool calls for AI flow pattern detection
|
|
105
|
+
diffSnapshots = [];
|
|
106
|
+
maxDiffSnapshots = 5; // Keep only the most recent git diff outputs
|
|
107
|
+
maxDiffSnapshotLength = 4000;
|
|
108
|
+
hooks;
|
|
109
|
+
constructor(baseTools = [], options = {}) {
|
|
110
|
+
this.observer = options.observer ?? null;
|
|
111
|
+
this.contextManager = options.contextManager ?? null;
|
|
112
|
+
this.enableCache = options.enableCache ?? true;
|
|
113
|
+
this.cacheTTLMs = options.cacheTTLMs ?? 5 * 60 * 1000; // 5 minutes default
|
|
114
|
+
// Load hook config eagerly. Hot-reloading on every tool call would
|
|
115
|
+
// give the user faster feedback but at the cost of file I/O on
|
|
116
|
+
// every step — we accept "edit settings → restart CLI" as the
|
|
117
|
+
// tradeoff (matches Claude Code).
|
|
118
|
+
try {
|
|
119
|
+
this.hooks = loadHooksConfig(options.workingDir ?? process.cwd());
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
logDebug('[hooks] config load failed: ' + err.message);
|
|
123
|
+
this.hooks = {};
|
|
124
|
+
}
|
|
125
|
+
if (baseTools.length) {
|
|
126
|
+
this.registerSuite({
|
|
127
|
+
id: 'runtime.core',
|
|
128
|
+
description: 'Core runtime metadata tools',
|
|
129
|
+
tools: baseTools,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
registerSuite(suite) {
|
|
134
|
+
if (!suite?.id?.trim()) {
|
|
135
|
+
throw new Error('Tool suite id cannot be blank.');
|
|
136
|
+
}
|
|
137
|
+
this.unregisterSuite(suite.id);
|
|
138
|
+
for (const definition of suite.tools ?? []) {
|
|
139
|
+
this.addTool(definition, suite.id);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
unregisterSuite(id) {
|
|
143
|
+
if (!id?.trim()) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
for (const [name, record] of this.registry.entries()) {
|
|
147
|
+
if (record.suiteId === id) {
|
|
148
|
+
this.registry.delete(name);
|
|
149
|
+
this.removeFromOrder(name);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
listProviderTools() {
|
|
154
|
+
return this.registrationOrder
|
|
155
|
+
.map((name) => this.registry.get(name))
|
|
156
|
+
.filter((record) => Boolean(record))
|
|
157
|
+
.map(({ definition }) => ({
|
|
158
|
+
name: definition.name,
|
|
159
|
+
description: definition.description,
|
|
160
|
+
...(definition.parameters && { parameters: definition.parameters }),
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
async execute(call, _context) {
|
|
164
|
+
const record = this.registry.get(call.name);
|
|
165
|
+
const rawArgs = normalizeToolArguments(call.arguments);
|
|
166
|
+
const args = coerceToolArguments(record?.definition.parameters, rawArgs);
|
|
167
|
+
const augmentedCall = { ...call, args };
|
|
168
|
+
if (!record) {
|
|
169
|
+
const message = `Tool "${call.name}" is not available.`;
|
|
170
|
+
this.observer?.onToolError?.(augmentedCall, message);
|
|
171
|
+
// Performance monitoring removed - no legacy components
|
|
172
|
+
return message;
|
|
173
|
+
}
|
|
174
|
+
// Check if tool is cacheable
|
|
175
|
+
const isCacheable = record.definition.cacheable ?? CACHEABLE_TOOLS.has(call.name);
|
|
176
|
+
const cacheTtl = typeof record.definition.cacheTtlMs === 'number' && Number.isFinite(record.definition.cacheTtlMs)
|
|
177
|
+
? Math.max(0, Math.floor(record.definition.cacheTtlMs))
|
|
178
|
+
: this.cacheTTLMs;
|
|
179
|
+
const canUseCache = this.enableCache && isCacheable && cacheTtl > 0;
|
|
180
|
+
// Try to get from cache
|
|
181
|
+
if (canUseCache) {
|
|
182
|
+
const cacheKey = this.getCacheKey({ ...call, arguments: args });
|
|
183
|
+
const cached = this.cache.get(cacheKey);
|
|
184
|
+
if (cached && Date.now() - cached.timestamp < cacheTtl) {
|
|
185
|
+
this.observer?.onCacheHit?.(augmentedCall);
|
|
186
|
+
this.observer?.onToolResult?.(augmentedCall, cached.result);
|
|
187
|
+
// Record cache hit as successful execution with 0ms time
|
|
188
|
+
// Performance monitoring removed - no legacy components
|
|
189
|
+
this.recordToolHistory({
|
|
190
|
+
toolName: call.name,
|
|
191
|
+
args,
|
|
192
|
+
timestamp: Date.now(),
|
|
193
|
+
success: true,
|
|
194
|
+
hasOutput: hasNonEmptyOutput(cached.result),
|
|
195
|
+
});
|
|
196
|
+
return cached.result;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
this.observer?.onToolStart?.(augmentedCall);
|
|
200
|
+
// Performance monitoring removed - no legacy components
|
|
201
|
+
try {
|
|
202
|
+
validateToolArguments(record.definition.name, record.definition.parameters, args);
|
|
203
|
+
// Pre-flight AI flow validation - catch common tool usage failures
|
|
204
|
+
const preflightWarnings = validateToolPreconditions(call.name, args);
|
|
205
|
+
for (const warning of preflightWarnings) {
|
|
206
|
+
this.observer?.onToolWarning?.(augmentedCall, warning);
|
|
207
|
+
}
|
|
208
|
+
// Advanced AI flow pattern validation using tool history
|
|
209
|
+
const aiFlowWarnings = validateAIFlowPatterns(call.name, args, this.toolHistory);
|
|
210
|
+
for (const warning of aiFlowWarnings) {
|
|
211
|
+
this.observer?.onToolWarning?.(augmentedCall, warning);
|
|
212
|
+
}
|
|
213
|
+
// Collect optimization hints to inject into result
|
|
214
|
+
const optimizationHints = [];
|
|
215
|
+
const seenOptimizationCodes = new Set();
|
|
216
|
+
for (const warning of [...preflightWarnings, ...aiFlowWarnings]) {
|
|
217
|
+
if (warning.code && seenOptimizationCodes.has(warning.code)) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
const hint = buildOptimizationHint(warning);
|
|
221
|
+
if (hint) {
|
|
222
|
+
if (warning.code) {
|
|
223
|
+
seenOptimizationCodes.add(warning.code);
|
|
224
|
+
}
|
|
225
|
+
optimizationHints.push(hint);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// PreToolUse hooks: run user-configured shell commands that
|
|
229
|
+
// can block this tool call. Best-effort — if the hook errors,
|
|
230
|
+
// times out, or returns malformed output, we pass through.
|
|
231
|
+
try {
|
|
232
|
+
const blocked = await runPreToolUseHooks(this.hooks, call.name, args);
|
|
233
|
+
if (blocked) {
|
|
234
|
+
const reason = blocked.reason || 'Blocked by hook';
|
|
235
|
+
const message = `Error: ${call.name} blocked by user hook: ${reason}`;
|
|
236
|
+
this.observer?.onToolError?.(augmentedCall, message);
|
|
237
|
+
this.recordToolHistory({
|
|
238
|
+
toolName: call.name,
|
|
239
|
+
args,
|
|
240
|
+
timestamp: Date.now(),
|
|
241
|
+
success: false,
|
|
242
|
+
hasOutput: false,
|
|
243
|
+
});
|
|
244
|
+
return message;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
// A buggy hook should never crash the agent. Log + continue.
|
|
249
|
+
logDebug('[hooks] PreToolUse error: ' + err.message);
|
|
250
|
+
}
|
|
251
|
+
// Constitutional reviewer guard. Two layers:
|
|
252
|
+
// - Heuristic veto patterns (always on) — `rm -rf /` style
|
|
253
|
+
// destructive ops, fork bombs, curl-to-shell, broker-shaped
|
|
254
|
+
// disclosure args.
|
|
255
|
+
// - LLM reviewer (gated by EROSOLAR_REVIEWER=1, default off)
|
|
256
|
+
// — Anthropic Haiku-tier model checks the call against a
|
|
257
|
+
// short constitution, returns approve/refine/veto.
|
|
258
|
+
// Vetoes block the call. Refines log + continue (soft warning).
|
|
259
|
+
// All non-approve decisions are audit-logged (best-effort) to
|
|
260
|
+
// Firestore at reviewer_log/{uid}/decisions/{id}. The reviewer
|
|
261
|
+
// fails open on any internal error — refusing every uncertain
|
|
262
|
+
// call would brick the CLI for users without the reviewer
|
|
263
|
+
// model configured.
|
|
264
|
+
try {
|
|
265
|
+
const { reviewToolCall } = await import('./reviewerGuard.js');
|
|
266
|
+
const review = await reviewToolCall(call.name, args);
|
|
267
|
+
if (review.decision !== 'approve') {
|
|
268
|
+
// Best-effort audit log — fire-and-forget.
|
|
269
|
+
void (async () => {
|
|
270
|
+
try {
|
|
271
|
+
const { writeReviewerLog } = await import('./userApproval.js');
|
|
272
|
+
await writeReviewerLog({
|
|
273
|
+
toolName: call.name,
|
|
274
|
+
decision: review.decision,
|
|
275
|
+
reason: review.reason,
|
|
276
|
+
source: review.source,
|
|
277
|
+
argsSummary: JSON.stringify(args).slice(0, 500),
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
catch { /* swallow — audit is non-critical */ }
|
|
281
|
+
})();
|
|
282
|
+
if (review.decision === 'veto') {
|
|
283
|
+
const message = `Error: ${call.name} vetoed by constitutional reviewer (${review.source}): ${review.reason}`;
|
|
284
|
+
this.observer?.onToolError?.(augmentedCall, message);
|
|
285
|
+
this.recordToolHistory({
|
|
286
|
+
toolName: call.name,
|
|
287
|
+
args,
|
|
288
|
+
timestamp: Date.now(),
|
|
289
|
+
success: false,
|
|
290
|
+
hasOutput: false,
|
|
291
|
+
});
|
|
292
|
+
return message;
|
|
293
|
+
}
|
|
294
|
+
// 'refine' is a soft warning — log and proceed; the model
|
|
295
|
+
// will see the tool output and can self-correct on retry.
|
|
296
|
+
logDebug(`[reviewer] refine ${call.name}: ${review.reason}`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
catch (err) {
|
|
300
|
+
logDebug('[reviewer] guard error: ' + err.message);
|
|
301
|
+
}
|
|
302
|
+
const result = await toolExecutionContext.run({ call: augmentedCall, observer: this.observer ?? undefined }, async () => record.definition.handler(args));
|
|
303
|
+
let output = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
|
|
304
|
+
// PostToolUse hooks: append text from each matching hook so
|
|
305
|
+
// the model sees the augmentation. Useful for "lint after every
|
|
306
|
+
// edit" / "echo every Bash command to a log" patterns.
|
|
307
|
+
try {
|
|
308
|
+
const post = await runPostToolUseHooks(this.hooks, call.name, args, output);
|
|
309
|
+
if (post?.appendToResult) {
|
|
310
|
+
output = `${output}\n\n[hook] ${post.appendToResult}`;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
logDebug('[hooks] PostToolUse error: ' + err.message);
|
|
315
|
+
}
|
|
316
|
+
let snapshotCandidate = output;
|
|
317
|
+
// Truncate output if context manager is available
|
|
318
|
+
if (this.contextManager) {
|
|
319
|
+
const truncated = this.contextManager.truncateToolOutput(output, call.name);
|
|
320
|
+
if (truncated.wasTruncated) {
|
|
321
|
+
output = truncated.content;
|
|
322
|
+
// Log truncation for debugging
|
|
323
|
+
if (process.env['DEBUG_CONTEXT']) {
|
|
324
|
+
logDebug(`[Context Manager] Truncated ${call.name} output: ${truncated.originalLength} -> ${truncated.truncatedLength} chars`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
snapshotCandidate = output;
|
|
328
|
+
}
|
|
329
|
+
this.recordDiffSnapshot(args, snapshotCandidate);
|
|
330
|
+
// Cache the result if cacheable
|
|
331
|
+
if (canUseCache) {
|
|
332
|
+
const cacheKey = this.getCacheKey({ ...call, arguments: args });
|
|
333
|
+
this.cache.set(cacheKey, {
|
|
334
|
+
result: output,
|
|
335
|
+
timestamp: Date.now(),
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
// Append optimization hints to guide future LLM behavior
|
|
339
|
+
if (optimizationHints.length > 0) {
|
|
340
|
+
output = output + optimizationHints.join('');
|
|
341
|
+
}
|
|
342
|
+
this.observer?.onToolResult?.(augmentedCall, output);
|
|
343
|
+
this.recordToolHistory({
|
|
344
|
+
toolName: call.name,
|
|
345
|
+
args,
|
|
346
|
+
timestamp: Date.now(),
|
|
347
|
+
success: true,
|
|
348
|
+
hasOutput: hasNonEmptyOutput(output),
|
|
349
|
+
});
|
|
350
|
+
// Record successful execution
|
|
351
|
+
// Performance monitoring removed - no legacy components
|
|
352
|
+
return output;
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
let formatted;
|
|
356
|
+
if (error instanceof ToolArgumentValidationError) {
|
|
357
|
+
formatted = error.message;
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
361
|
+
formatted = `Failed to run "${call.name}": ${message}`;
|
|
362
|
+
}
|
|
363
|
+
this.observer?.onToolError?.(augmentedCall, formatted);
|
|
364
|
+
this.recordToolHistory({
|
|
365
|
+
toolName: call.name,
|
|
366
|
+
args,
|
|
367
|
+
timestamp: Date.now(),
|
|
368
|
+
success: false,
|
|
369
|
+
hasOutput: hasNonEmptyOutput(formatted),
|
|
370
|
+
error: formatted,
|
|
371
|
+
});
|
|
372
|
+
// Record failed execution - no legacy performance monitoring
|
|
373
|
+
return formatted;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
getCacheKey(call) {
|
|
377
|
+
return `${call.name}:${JSON.stringify(call.arguments)}`;
|
|
378
|
+
}
|
|
379
|
+
clearCache() {
|
|
380
|
+
this.cache.clear();
|
|
381
|
+
}
|
|
382
|
+
getCacheStats() {
|
|
383
|
+
let totalSize = 0;
|
|
384
|
+
for (const entry of this.cache.values()) {
|
|
385
|
+
totalSize += entry.result.length;
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
size: totalSize,
|
|
389
|
+
entries: this.cache.size,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
clearToolHistory() {
|
|
393
|
+
this.toolHistory.length = 0;
|
|
394
|
+
}
|
|
395
|
+
getToolHistory() {
|
|
396
|
+
return this.toolHistory;
|
|
397
|
+
}
|
|
398
|
+
recordToolHistory(entry) {
|
|
399
|
+
this.toolHistory.push(entry);
|
|
400
|
+
if (this.toolHistory.length > this.maxHistorySize) {
|
|
401
|
+
this.toolHistory.shift();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
clearDiffSnapshots() {
|
|
405
|
+
this.diffSnapshots.length = 0;
|
|
406
|
+
}
|
|
407
|
+
getDiffSnapshots() {
|
|
408
|
+
return this.diffSnapshots;
|
|
409
|
+
}
|
|
410
|
+
addTool(definition, suiteId) {
|
|
411
|
+
if (!definition?.name?.trim()) {
|
|
412
|
+
throw new Error(`Tool names cannot be blank (suite "${suiteId}").`);
|
|
413
|
+
}
|
|
414
|
+
if (this.registry.has(definition.name)) {
|
|
415
|
+
const owner = this.registry.get(definition.name)?.suiteId ?? 'unknown';
|
|
416
|
+
throw new Error(`Tool "${definition.name}" already registered by suite "${owner}".`);
|
|
417
|
+
}
|
|
418
|
+
this.registry.set(definition.name, {
|
|
419
|
+
suiteId,
|
|
420
|
+
definition,
|
|
421
|
+
});
|
|
422
|
+
this.registrationOrder.push(definition.name);
|
|
423
|
+
}
|
|
424
|
+
removeFromOrder(name) {
|
|
425
|
+
const index = this.registrationOrder.indexOf(name);
|
|
426
|
+
if (index >= 0) {
|
|
427
|
+
this.registrationOrder.splice(index, 1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
recordDiffSnapshot(args, output) {
|
|
431
|
+
const command = this.findGitDiffCommand(args);
|
|
432
|
+
if (!command || !output) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
this.diffSnapshots.push({
|
|
436
|
+
command,
|
|
437
|
+
output: safeTruncate(output, this.maxDiffSnapshotLength, 'git-diff'),
|
|
438
|
+
timestamp: Date.now(),
|
|
439
|
+
});
|
|
440
|
+
if (this.diffSnapshots.length > this.maxDiffSnapshots) {
|
|
441
|
+
this.diffSnapshots.shift();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
findGitDiffCommand(args) {
|
|
445
|
+
for (const command of this.extractCommands(args)) {
|
|
446
|
+
if (this.isGitDiffCommand(command)) {
|
|
447
|
+
return command;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
extractCommands(args) {
|
|
453
|
+
const commands = [];
|
|
454
|
+
const command = args['command'];
|
|
455
|
+
if (typeof command === 'string' && command.trim()) {
|
|
456
|
+
commands.push(command.trim());
|
|
457
|
+
}
|
|
458
|
+
const commandList = args['commands'];
|
|
459
|
+
if (Array.isArray(commandList)) {
|
|
460
|
+
for (const value of commandList) {
|
|
461
|
+
if (typeof value === 'string' && value.trim()) {
|
|
462
|
+
commands.push(value.trim());
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return commands;
|
|
467
|
+
}
|
|
468
|
+
isGitDiffCommand(command) {
|
|
469
|
+
return /\bgit\s+(?:--no-pager\s+)?(?:diff|show)\b/i.test(command);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
export function createDefaultToolRuntime(context, toolSuites = [], options = {}) {
|
|
473
|
+
// Start with no default introspection tools - they waste tokens
|
|
474
|
+
// Model knows its capabilities from tool definitions
|
|
475
|
+
const runtime = new ToolRuntime([], options);
|
|
476
|
+
for (const suite of toolSuites) {
|
|
477
|
+
runtime.registerSuite(suite);
|
|
478
|
+
}
|
|
479
|
+
return runtime;
|
|
480
|
+
}
|
|
481
|
+
// Removed unused introspection tools (context_snapshot, capabilities_overview, profile_details)
|
|
482
|
+
// Model already knows capabilities from tool definitions; these just wasted tokens
|
|
483
|
+
function hasNonEmptyOutput(output) {
|
|
484
|
+
return typeof output === 'string' && output.trim().length > 0;
|
|
485
|
+
}
|
|
486
|
+
function normalizeToolArguments(value) {
|
|
487
|
+
if (value instanceof Map) {
|
|
488
|
+
return Object.fromEntries(value.entries());
|
|
489
|
+
}
|
|
490
|
+
if (isRecord(value)) {
|
|
491
|
+
return value;
|
|
492
|
+
}
|
|
493
|
+
if (typeof value === 'string') {
|
|
494
|
+
const trimmed = value.trim();
|
|
495
|
+
if (!trimmed) {
|
|
496
|
+
return {};
|
|
497
|
+
}
|
|
498
|
+
try {
|
|
499
|
+
const parsed = JSON.parse(trimmed);
|
|
500
|
+
return isRecord(parsed) ? parsed : {};
|
|
501
|
+
}
|
|
502
|
+
catch {
|
|
503
|
+
return {};
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return {};
|
|
507
|
+
}
|
|
508
|
+
function isRecord(value) {
|
|
509
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
510
|
+
}
|
|
511
|
+
//# sourceMappingURL=toolRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolRuntime.js","sourceRoot":"","sources":["../../src/core/toolRuntime.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,iBAAiB,EAAyB,MAAM,wBAAwB,CAAC;AACrI,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAoB,MAAM,YAAY,CAAC;AAgIxG,MAAM,oBAAoB,GAAG,IAAI,iBAAiB,EAAsB,CAAC;AAEzE;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAA4B;IAC7D,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EAAE,CAAC;IAChD,IAAI,CAAC,OAAO,EA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