@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.
- 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,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operations-Center wiring for offsec capabilities.
|
|
3
|
+
*
|
|
4
|
+
* Every offsec tool wrapper (recon / web / llmRedteam / network / mobile)
|
|
5
|
+
* shares this single helper. It abstracts:
|
|
6
|
+
*
|
|
7
|
+
* • Engagement-scope enforcement (defence-in-depth — the Lambda
|
|
8
|
+
* re-checks server-side, but a CLI-side gate trips faster + emits
|
|
9
|
+
* a clearer error before any process spawns).
|
|
10
|
+
* • Long-running job lifecycle (start → append-log → progress →
|
|
11
|
+
* complete) routed through the existing cliJob* Lambda surface,
|
|
12
|
+
* which the portal's #jobsList rail listens to via Firestore.
|
|
13
|
+
* • HITL approval prompts (cliQuestionCreate / cliQuestionPoll) for
|
|
14
|
+
* destructive ops, so the operator can veto from the portal.
|
|
15
|
+
* • Findings emission with a unified schema — every tool's output
|
|
16
|
+
* normalised so the portal's #findingsList rail renders without
|
|
17
|
+
* per-tool special-casing.
|
|
18
|
+
*
|
|
19
|
+
* Tools that own a long-running scan should:
|
|
20
|
+
*
|
|
21
|
+
* const job = await opsCtx.startJob({ tool: 'garak', kind: 'llmRedteam',
|
|
22
|
+
* targetId, cmd: ['garak', ...] });
|
|
23
|
+
* for await (const line of job.lines()) {
|
|
24
|
+
* await job.appendLog(line);
|
|
25
|
+
* const finding = parse(line);
|
|
26
|
+
* if (finding) await opsCtx.emitFinding(finding);
|
|
27
|
+
* }
|
|
28
|
+
* await job.complete('done', { probesRun: N, findingsEmitted: M });
|
|
29
|
+
*
|
|
30
|
+
* The `lines()` iterator is backed by the existing Monitor capability
|
|
31
|
+
* (background spawn + streaming reader). Multiple jobs run concurrently
|
|
32
|
+
* without blocking the agent loop.
|
|
33
|
+
*/
|
|
34
|
+
import { spawn } from 'node:child_process';
|
|
35
|
+
import { callLambda } from '../utils/lambdaClient.js';
|
|
36
|
+
import { logDebug } from '../utils/debugLogger.js';
|
|
37
|
+
import { ensureBinary } from './_processRunner.js';
|
|
38
|
+
// ── Implementation ────────────────────────────────────────────────
|
|
39
|
+
const FINDING_SEVERITIES = new Set(['info', 'low', 'medium', 'high', 'critical']);
|
|
40
|
+
const FINDING_SOURCES = new Set(['recon', 'web', 'llmRedteam', 'network', 'mobile', 'manual']);
|
|
41
|
+
function validateFindingDraft(d) {
|
|
42
|
+
if (!FINDING_SOURCES.has(d.source))
|
|
43
|
+
throw new Error(`invalid finding.source: ${d.source}`);
|
|
44
|
+
if (!FINDING_SEVERITIES.has(d.severity))
|
|
45
|
+
throw new Error(`invalid finding.severity: ${d.severity}`);
|
|
46
|
+
if (typeof d.tool !== 'string' || !d.tool)
|
|
47
|
+
throw new Error('finding.tool required');
|
|
48
|
+
if (typeof d.title !== 'string' || !d.title)
|
|
49
|
+
throw new Error('finding.title required');
|
|
50
|
+
if (typeof d.replication !== 'string')
|
|
51
|
+
throw new Error('finding.replication required');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Engagement scope cache. Reused across many startJob/assertInScope calls
|
|
55
|
+
* within a single agent turn so we don't hammer Firestore for the same
|
|
56
|
+
* scope doc. Cleared whenever the engagementId changes.
|
|
57
|
+
*/
|
|
58
|
+
class ScopeCache {
|
|
59
|
+
cached = null;
|
|
60
|
+
async load(engagementId) {
|
|
61
|
+
if (this.cached && this.cached.engagementId === engagementId)
|
|
62
|
+
return this.cached.scope;
|
|
63
|
+
const r = await callLambda('cliEngagementGetScope', { engagementId });
|
|
64
|
+
if (!r.ok)
|
|
65
|
+
throw new Error(`scope fetch failed: ${r.error}`);
|
|
66
|
+
const scope = r.result?.scope || { hosts: [], cidrs: [], allowedTools: [] };
|
|
67
|
+
this.cached = { engagementId, scope };
|
|
68
|
+
return scope;
|
|
69
|
+
}
|
|
70
|
+
invalidate() { this.cached = null; }
|
|
71
|
+
}
|
|
72
|
+
function hostMatchesPattern(host, pattern) {
|
|
73
|
+
// Exact match.
|
|
74
|
+
if (host === pattern)
|
|
75
|
+
return true;
|
|
76
|
+
// Wildcard pattern like *.example.com.
|
|
77
|
+
if (pattern.startsWith('*.')) {
|
|
78
|
+
const suffix = pattern.slice(1); // ".example.com"
|
|
79
|
+
return host.endsWith(suffix) && host.length > suffix.length;
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
function isInScope(target, scope) {
|
|
84
|
+
const candidate = (target.host || (target.url && hostFromUrl(target.url)) ||
|
|
85
|
+
(target.endpoint && hostFromUrl(target.endpoint)) || '').toLowerCase();
|
|
86
|
+
if (!candidate)
|
|
87
|
+
return false;
|
|
88
|
+
if ((scope.deniedHosts || []).some((p) => hostMatchesPattern(candidate, p.toLowerCase())))
|
|
89
|
+
return false;
|
|
90
|
+
const hostHits = (scope.hosts || []).some((p) => hostMatchesPattern(candidate, p.toLowerCase()));
|
|
91
|
+
if (hostHits)
|
|
92
|
+
return true;
|
|
93
|
+
// CIDR check is best-effort — if the operator wrote one, we ask the
|
|
94
|
+
// Lambda to evaluate it (it has the IP-math lib loaded). Local check
|
|
95
|
+
// here would duplicate logic.
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
function hostFromUrl(value) {
|
|
99
|
+
try {
|
|
100
|
+
return new URL(value).hostname;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
class NodeOpsContext {
|
|
107
|
+
engagementId;
|
|
108
|
+
uid;
|
|
109
|
+
scopeCache = new ScopeCache();
|
|
110
|
+
constructor(opts = {}) {
|
|
111
|
+
this.engagementId = opts.engagementId ?? null;
|
|
112
|
+
this.uid = opts.uid ?? null;
|
|
113
|
+
}
|
|
114
|
+
async assertInScope(target) {
|
|
115
|
+
if (!this.engagementId) {
|
|
116
|
+
// No engagement selected = no scope. Refuse — the operator must
|
|
117
|
+
// pick an engagement before any offsec tool fires. This also
|
|
118
|
+
// means the Lambda's defence-in-depth check has a non-null
|
|
119
|
+
// engagementId to evaluate against.
|
|
120
|
+
throw new Error('no engagement selected — pick one in the portal before running offsec tools');
|
|
121
|
+
}
|
|
122
|
+
const scope = await this.scopeCache.load(this.engagementId);
|
|
123
|
+
if (!isInScope(target, scope)) {
|
|
124
|
+
const t = target.host || target.url || target.endpoint || '<unknown>';
|
|
125
|
+
throw new Error(`target ${t} is OUT OF SCOPE for engagement ${this.engagementId}. ` +
|
|
126
|
+
`Edit the engagement scope in the portal before retrying.`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async startJob(spec) {
|
|
130
|
+
// Cross-platform preflight (see _processRunner.ts comment): throws
|
|
131
|
+
// BinaryMissingError with the install hint for this operator's OS
|
|
132
|
+
// BEFORE we register a Job doc, so a missing binary doesn't leave
|
|
133
|
+
// a phantom "running" row in the portal that never completes.
|
|
134
|
+
await ensureBinary(spec.cmd[0]);
|
|
135
|
+
if (this.engagementId && (spec.engagementId == null))
|
|
136
|
+
spec.engagementId = this.engagementId;
|
|
137
|
+
const r = await callLambda('cliJobStart', {
|
|
138
|
+
tool: spec.tool, kind: spec.kind,
|
|
139
|
+
engagementId: spec.engagementId ?? null, targetId: spec.targetId ?? null,
|
|
140
|
+
status: 'running',
|
|
141
|
+
cmd: spec.cmd.slice(0, 64), // truncate long argv
|
|
142
|
+
});
|
|
143
|
+
if (!r.ok || !r.result?.id)
|
|
144
|
+
throw new Error(`cliJobStart failed: ${r.error}`);
|
|
145
|
+
const jobId = r.result.id;
|
|
146
|
+
const child = spawn(spec.cmd[0], spec.cmd.slice(1), {
|
|
147
|
+
cwd: spec.cwd, env: { ...process.env, ...(spec.env || {}) },
|
|
148
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
149
|
+
});
|
|
150
|
+
const timeoutMs = spec.timeoutMs ?? 30 * 60 * 1000;
|
|
151
|
+
const killTimer = setTimeout(() => {
|
|
152
|
+
try {
|
|
153
|
+
child.kill('SIGTERM');
|
|
154
|
+
}
|
|
155
|
+
catch (_) { }
|
|
156
|
+
setTimeout(() => { try {
|
|
157
|
+
child.kill('SIGKILL');
|
|
158
|
+
}
|
|
159
|
+
catch (_) { } }, 1500);
|
|
160
|
+
}, timeoutMs);
|
|
161
|
+
const handle = {
|
|
162
|
+
id: jobId,
|
|
163
|
+
lines: () => readlines(child),
|
|
164
|
+
appendLog: (line) => callLambda('cliJobAppendLog', { jobId, line: String(line).slice(0, 8 * 1024) })
|
|
165
|
+
.then((res) => { if (!res.ok)
|
|
166
|
+
logDebug('[Ops] appendLog failed', res.error); }),
|
|
167
|
+
setProgress: (pct, lastLine) => callLambda('cliJobUpdate', {
|
|
168
|
+
id: jobId, pct: Math.max(0, Math.min(100, Math.round(pct))),
|
|
169
|
+
lastLine: lastLine ? String(lastLine).slice(0, 1024) : null,
|
|
170
|
+
}).then((res) => { if (!res.ok)
|
|
171
|
+
logDebug('[Ops] setProgress failed', res.error); }),
|
|
172
|
+
complete: async (status, summary = {}) => {
|
|
173
|
+
clearTimeout(killTimer);
|
|
174
|
+
await callLambda('cliJobComplete', { id: jobId, status, summary });
|
|
175
|
+
},
|
|
176
|
+
cancel: () => {
|
|
177
|
+
clearTimeout(killTimer);
|
|
178
|
+
try {
|
|
179
|
+
child.kill('SIGTERM');
|
|
180
|
+
}
|
|
181
|
+
catch (_) { }
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
return handle;
|
|
185
|
+
}
|
|
186
|
+
async requestApproval(req) {
|
|
187
|
+
if (!Array.isArray(req.options) || req.options.length < 2) {
|
|
188
|
+
throw new Error('requestApproval needs ≥2 options');
|
|
189
|
+
}
|
|
190
|
+
const create = await callLambda('cliQuestionCreate', {
|
|
191
|
+
question: `[${req.severity.toUpperCase()}] ${req.question}`,
|
|
192
|
+
header: req.severity,
|
|
193
|
+
multiSelect: false,
|
|
194
|
+
options: req.options.map((o) => ({ label: o.label, description: o.description || '' })),
|
|
195
|
+
});
|
|
196
|
+
if (!create.ok || !create.result?.id)
|
|
197
|
+
throw new Error(`HITL create failed: ${create.error}`);
|
|
198
|
+
const id = create.result.id;
|
|
199
|
+
const timeoutSec = req.timeoutSec ?? 300;
|
|
200
|
+
const deadline = Date.now() + timeoutSec * 1000;
|
|
201
|
+
while (Date.now() < deadline) {
|
|
202
|
+
await new Promise((r) => setTimeout(r, 2000));
|
|
203
|
+
const poll = await callLambda('cliQuestionPoll', { id });
|
|
204
|
+
if (poll.ok && poll.result?.answered) {
|
|
205
|
+
const sel = poll.result.selected?.[0];
|
|
206
|
+
if (typeof sel === 'string')
|
|
207
|
+
return sel;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (req.defaultOnTimeout === 'proceed')
|
|
211
|
+
return req.options[0].label;
|
|
212
|
+
throw new Error(`HITL timed out after ${timeoutSec}s — operator did not answer in the portal`);
|
|
213
|
+
}
|
|
214
|
+
async emitFinding(draft) {
|
|
215
|
+
if (this.engagementId && draft.engagementId == null)
|
|
216
|
+
draft.engagementId = this.engagementId;
|
|
217
|
+
validateFindingDraft(draft);
|
|
218
|
+
const r = await callLambda('cliFindingEmit', draft);
|
|
219
|
+
if (!r.ok || !r.result?.id)
|
|
220
|
+
throw new Error(`emitFinding failed: ${r.error}`);
|
|
221
|
+
return r.result.id;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Async iterator over a child's stdout + stderr, yielding one line at a
|
|
226
|
+
* time. Both streams are merged so the order in `lines()` matches the
|
|
227
|
+
* order the process actually printed them.
|
|
228
|
+
*/
|
|
229
|
+
async function* readlines(child) {
|
|
230
|
+
const queue = [];
|
|
231
|
+
let resolveNext = null;
|
|
232
|
+
let done = false;
|
|
233
|
+
function pushChunk(buf) {
|
|
234
|
+
const text = buf.toString('utf8');
|
|
235
|
+
for (const line of text.split(/\r?\n/))
|
|
236
|
+
if (line.length)
|
|
237
|
+
queue.push(line);
|
|
238
|
+
if (resolveNext) {
|
|
239
|
+
const r = resolveNext;
|
|
240
|
+
resolveNext = null;
|
|
241
|
+
r();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
child.stdout.on('data', pushChunk);
|
|
245
|
+
child.stderr.on('data', pushChunk);
|
|
246
|
+
child.on('close', () => { done = true; if (resolveNext) {
|
|
247
|
+
const r = resolveNext;
|
|
248
|
+
resolveNext = null;
|
|
249
|
+
r();
|
|
250
|
+
} });
|
|
251
|
+
child.on('error', () => { done = true; if (resolveNext) {
|
|
252
|
+
const r = resolveNext;
|
|
253
|
+
resolveNext = null;
|
|
254
|
+
r();
|
|
255
|
+
} });
|
|
256
|
+
while (true) {
|
|
257
|
+
if (queue.length) {
|
|
258
|
+
yield queue.shift();
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (done)
|
|
262
|
+
return;
|
|
263
|
+
await new Promise((r) => { resolveNext = r; });
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Build an OpsContext for a CLI agent session. The engagementId can be
|
|
268
|
+
* threaded in from the active engagement (set via the portal or
|
|
269
|
+
* EngagementCapability tool calls).
|
|
270
|
+
*/
|
|
271
|
+
export function createOpsContext(opts = {}) {
|
|
272
|
+
return new NodeOpsContext(opts);
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=_opsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_opsContext.js","sourceRoot":"","sources":["../../src/capabilities/_opsContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,KAAK,EAAuC,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA4FnD,qEAAqE;AAErE,MAAM,kBAAkB,GACtB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACzD,MAAM,eAAe,GACnB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,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,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QAAC,MAAM,CAAC,GAAG,WAAW,CAAC;QAAC,WAAW,GAAG,IAAI,CAAC;QAAC,CAAC,EAAE,CAAC;IAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/G,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QAAC,MAAM,CAAC,GAAG,WAAW,CAAC;QAAC,WAAW,GAAG,IAAI,CAAC;QAAC,CAAC,EAAE,CAAC;IAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/G,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAAC,MAAM,KAAK,CAAC,KAAK,EAAG,CAAC;YAAC,SAAS;QAAC,CAAC;QACrD,IAAI,IAAI;YAAE,OAAO;QACjB,MAAM,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA8B,EAAE;IAC/D,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface BinaryMissingErrorInfo {
|
|
2
|
+
bin: string;
|
|
3
|
+
message: string;
|
|
4
|
+
installCommand: string | null;
|
|
5
|
+
installChannel: string | null;
|
|
6
|
+
platformNote: string | null;
|
|
7
|
+
capability: string | null;
|
|
8
|
+
/** True when the bin has no plausibly-native install path on this platform. */
|
|
9
|
+
unsupportedOnPlatform: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class BinaryMissingError extends Error {
|
|
12
|
+
readonly code = "binary-missing";
|
|
13
|
+
readonly info: BinaryMissingErrorInfo;
|
|
14
|
+
constructor(info: BinaryMissingErrorInfo);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Throws `BinaryMissingError` if the binary isn't on PATH. Every
|
|
18
|
+
* offsec capability tool handler should call this first.
|
|
19
|
+
*
|
|
20
|
+
* Tool handlers should NOT catch the error themselves — let it
|
|
21
|
+
* propagate so the agent loop's tool-error formatter wraps it
|
|
22
|
+
* uniformly.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ensureBinary(bin: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Non-throwing variant — returns true/false. Use when the caller
|
|
27
|
+
* wants to render a "(unavailable)" badge in the tool inventory
|
|
28
|
+
* rather than fail the call.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isBinaryAvailable(bin: string): Promise<boolean>;
|
|
31
|
+
/** Reset the availability cache. Tests + the post-`offsec install` flow use this. */
|
|
32
|
+
export declare function clearBinaryAvailabilityCache(): void;
|
|
33
|
+
export interface RunResult {
|
|
34
|
+
stdout: string;
|
|
35
|
+
stderr: string;
|
|
36
|
+
exitCode: number | null;
|
|
37
|
+
signal: NodeJS.Signals | null;
|
|
38
|
+
truncated: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface RunOptions {
|
|
41
|
+
timeoutMs?: number;
|
|
42
|
+
cwd?: string;
|
|
43
|
+
stdin?: string;
|
|
44
|
+
env?: Record<string, string>;
|
|
45
|
+
maxOutputBytes?: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function runBinary(command: string, args: string[], options?: RunOptions): Promise<RunResult>;
|
|
48
|
+
export declare function formatResult(command: string, args: string[], result: RunResult): string;
|
|
49
|
+
//# sourceMappingURL=_processRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|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AAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAKD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,CAAC,CAkEpB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAQvF"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
import { execFile } from 'node:child_process';
|
|
4
|
+
import { findRequirement, pickInstallCommand, isNativelyAvailable, platformNote, } from './_binaryRequirements.js';
|
|
5
|
+
const execFileP = promisify(execFile);
|
|
6
|
+
export class BinaryMissingError extends Error {
|
|
7
|
+
code = 'binary-missing';
|
|
8
|
+
info;
|
|
9
|
+
constructor(info) {
|
|
10
|
+
super(info.message);
|
|
11
|
+
this.info = info;
|
|
12
|
+
this.name = 'BinaryMissingError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const BINARY_AVAILABILITY_CACHE = new Map();
|
|
16
|
+
async function checkPathBinary(bin) {
|
|
17
|
+
// `which` (POSIX) / `where` (Windows) — both exit 0 when the
|
|
18
|
+
// executable is found on PATH. We use the OS lookup rather than
|
|
19
|
+
// probing `bin --version` because some offsec tools (afl-fuzz,
|
|
20
|
+
// ghidra) take seconds to print --version, which would gate the
|
|
21
|
+
// agent loop on cold-start runtime cost.
|
|
22
|
+
const cmd = process.platform === 'win32' ? 'where' : 'which';
|
|
23
|
+
try {
|
|
24
|
+
await execFileP(cmd, [bin], { timeout: 3000 });
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Throws `BinaryMissingError` if the binary isn't on PATH. Every
|
|
33
|
+
* offsec capability tool handler should call this first.
|
|
34
|
+
*
|
|
35
|
+
* Tool handlers should NOT catch the error themselves — let it
|
|
36
|
+
* propagate so the agent loop's tool-error formatter wraps it
|
|
37
|
+
* uniformly.
|
|
38
|
+
*/
|
|
39
|
+
export async function ensureBinary(bin) {
|
|
40
|
+
const cached = BINARY_AVAILABILITY_CACHE.get(bin);
|
|
41
|
+
if (cached === true)
|
|
42
|
+
return;
|
|
43
|
+
if (cached === false)
|
|
44
|
+
throw makeMissingError(bin);
|
|
45
|
+
const present = await checkPathBinary(bin);
|
|
46
|
+
BINARY_AVAILABILITY_CACHE.set(bin, present);
|
|
47
|
+
if (!present)
|
|
48
|
+
throw makeMissingError(bin);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Non-throwing variant — returns true/false. Use when the caller
|
|
52
|
+
* wants to render a "(unavailable)" badge in the tool inventory
|
|
53
|
+
* rather than fail the call.
|
|
54
|
+
*/
|
|
55
|
+
export async function isBinaryAvailable(bin) {
|
|
56
|
+
const cached = BINARY_AVAILABILITY_CACHE.get(bin);
|
|
57
|
+
if (cached !== undefined)
|
|
58
|
+
return cached;
|
|
59
|
+
const present = await checkPathBinary(bin);
|
|
60
|
+
BINARY_AVAILABILITY_CACHE.set(bin, present);
|
|
61
|
+
return present;
|
|
62
|
+
}
|
|
63
|
+
/** Reset the availability cache. Tests + the post-`offsec install` flow use this. */
|
|
64
|
+
export function clearBinaryAvailabilityCache() {
|
|
65
|
+
BINARY_AVAILABILITY_CACHE.clear();
|
|
66
|
+
}
|
|
67
|
+
function makeMissingError(bin) {
|
|
68
|
+
const req = findRequirement(bin);
|
|
69
|
+
if (!req) {
|
|
70
|
+
// Bin we don't track — agent capability is calling something
|
|
71
|
+
// outside the manifest. Surface that explicitly so the operator
|
|
72
|
+
// can add it to _binaryRequirements.ts.
|
|
73
|
+
return new BinaryMissingError({
|
|
74
|
+
bin,
|
|
75
|
+
message: `Binary "${bin}" not found on PATH and not in the offsec requirements manifest. Add it to src/capabilities/_binaryRequirements.ts.`,
|
|
76
|
+
installCommand: null,
|
|
77
|
+
installChannel: null,
|
|
78
|
+
platformNote: null,
|
|
79
|
+
capability: null,
|
|
80
|
+
unsupportedOnPlatform: false,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const native = isNativelyAvailable(req);
|
|
84
|
+
const note = platformNote(req);
|
|
85
|
+
const pick = pickInstallCommand(req);
|
|
86
|
+
// Build the message body. Three branches matching the table above.
|
|
87
|
+
let message;
|
|
88
|
+
if (native && pick) {
|
|
89
|
+
message =
|
|
90
|
+
`Binary "${bin}" required by capability "${req.capability}" but not on PATH.\n\n` +
|
|
91
|
+
`${req.description}\n\n` +
|
|
92
|
+
`Install (${pick.channel}):\n` +
|
|
93
|
+
` ${pick.cmd}\n\n` +
|
|
94
|
+
`Or run: erosolar offsec install --capability ${req.capability}`;
|
|
95
|
+
}
|
|
96
|
+
else if (note) {
|
|
97
|
+
message =
|
|
98
|
+
`Binary "${bin}" required by capability "${req.capability}" is not natively packaged for ${process.platform}.\n\n` +
|
|
99
|
+
`${req.description}\n\n` +
|
|
100
|
+
`${note}`;
|
|
101
|
+
}
|
|
102
|
+
else if (pick) {
|
|
103
|
+
message =
|
|
104
|
+
`Binary "${bin}" required by capability "${req.capability}" but not on PATH.\n` +
|
|
105
|
+
`Install (${pick.channel}): ${pick.cmd}`;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
message =
|
|
109
|
+
`Binary "${bin}" required by capability "${req.capability}" but no install path is registered for ${process.platform}. ` +
|
|
110
|
+
`Use WSL2 (Windows) or a Docker container.`;
|
|
111
|
+
}
|
|
112
|
+
return new BinaryMissingError({
|
|
113
|
+
bin,
|
|
114
|
+
message,
|
|
115
|
+
installCommand: pick?.cmd ?? null,
|
|
116
|
+
installChannel: pick?.channel ?? null,
|
|
117
|
+
platformNote: note,
|
|
118
|
+
capability: req.capability,
|
|
119
|
+
unsupportedOnPlatform: !native,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
const DEFAULT_TIMEOUT_MS = 5 * 60 * 1000;
|
|
123
|
+
const DEFAULT_MAX_OUTPUT = 1 * 1024 * 1024;
|
|
124
|
+
export async function runBinary(command, args, options = {}) {
|
|
125
|
+
// Cross-platform preflight: refuse with a clean BinaryMissingError
|
|
126
|
+
// (carrying the install hint for the operator's OS, or the
|
|
127
|
+
// 'use WSL2' note when no native channel exists) instead of letting
|
|
128
|
+
// ENOENT bubble. Bins not in the manifest fall through with a
|
|
129
|
+
// descriptive error pointing at _binaryRequirements.ts.
|
|
130
|
+
await ensureBinary(command);
|
|
131
|
+
return new Promise((resolve, reject) => {
|
|
132
|
+
const maxBytes = options.maxOutputBytes ?? DEFAULT_MAX_OUTPUT;
|
|
133
|
+
const spawnOpts = {
|
|
134
|
+
cwd: options.cwd,
|
|
135
|
+
stdio: [options.stdin !== undefined ? 'pipe' : 'ignore', 'pipe', 'pipe'],
|
|
136
|
+
};
|
|
137
|
+
if (options.env) {
|
|
138
|
+
spawnOpts.env = { ...process.env, ...options.env };
|
|
139
|
+
}
|
|
140
|
+
const child = spawn(command, args, spawnOpts);
|
|
141
|
+
let stdoutBytes = 0;
|
|
142
|
+
let stderrBytes = 0;
|
|
143
|
+
let truncated = false;
|
|
144
|
+
const stdoutChunks = [];
|
|
145
|
+
const stderrChunks = [];
|
|
146
|
+
const append = (chunks, buf, isStdout) => {
|
|
147
|
+
const used = isStdout ? stdoutBytes : stderrBytes;
|
|
148
|
+
const room = maxBytes - used;
|
|
149
|
+
if (room <= 0) {
|
|
150
|
+
truncated = true;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const slice = buf.length > room ? buf.subarray(0, room) : buf;
|
|
154
|
+
chunks.push(slice.toString());
|
|
155
|
+
if (isStdout)
|
|
156
|
+
stdoutBytes += slice.length;
|
|
157
|
+
else
|
|
158
|
+
stderrBytes += slice.length;
|
|
159
|
+
if (buf.length > room)
|
|
160
|
+
truncated = true;
|
|
161
|
+
};
|
|
162
|
+
child.stdout?.on('data', (d) => append(stdoutChunks, d, true));
|
|
163
|
+
child.stderr?.on('data', (d) => append(stderrChunks, d, false));
|
|
164
|
+
if (options.stdin !== undefined && child.stdin) {
|
|
165
|
+
child.stdin.write(options.stdin);
|
|
166
|
+
child.stdin.end();
|
|
167
|
+
}
|
|
168
|
+
const timeout = setTimeout(() => {
|
|
169
|
+
child.kill('SIGTERM');
|
|
170
|
+
setTimeout(() => child.kill('SIGKILL'), 1000);
|
|
171
|
+
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
172
|
+
child.on('error', (err) => {
|
|
173
|
+
clearTimeout(timeout);
|
|
174
|
+
reject(err);
|
|
175
|
+
});
|
|
176
|
+
child.on('close', (code, signal) => {
|
|
177
|
+
clearTimeout(timeout);
|
|
178
|
+
resolve({
|
|
179
|
+
stdout: stdoutChunks.join(''),
|
|
180
|
+
stderr: stderrChunks.join(''),
|
|
181
|
+
exitCode: code,
|
|
182
|
+
signal,
|
|
183
|
+
truncated,
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export function formatResult(command, args, result) {
|
|
189
|
+
const lines = [];
|
|
190
|
+
lines.push(`$ ${command} ${args.join(' ')}`);
|
|
191
|
+
lines.push(`exit ${result.exitCode ?? 'null'}${result.signal ? ` (signal ${result.signal})` : ''}`);
|
|
192
|
+
if (result.truncated)
|
|
193
|
+
lines.push('[output truncated]');
|
|
194
|
+
if (result.stdout)
|
|
195
|
+
lines.push('--- stdout ---', result.stdout.trimEnd());
|
|
196
|
+
if (result.stderr)
|
|
197
|
+
lines.push('--- stderr ---', result.stderr.trimEnd());
|
|
198
|
+
return lines.join('\n');
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=_processRunner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_processRunner.js","sourceRoot":"","sources":["../../src/capabilities/_processRunner.ts"],"names":[],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AAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CapabilityContext, CapabilityContribution, CapabilityModule } from '../runtime/agentHost.js';
|
|
2
|
+
export declare class AflppCapabilityModule implements CapabilityModule {
|
|
3
|
+
readonly id = "capability.aflpp";
|
|
4
|
+
readonly description = "AFL++ fuzzer wrappers \u2014 afl_compile_harness, afl_fuzz_start (detached), afl_fuzz_status (auto-registers crash files in the artifact store), afl_fuzz_stop, afl_showmap, afl_cmin, afl_tmin. Long campaigns run as detached background processes addressed by jobId.";
|
|
5
|
+
create(_context: CapabilityContext): Promise<CapabilityContribution>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=aflppCapability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aflppCapability.d.ts","sourceRoot":"","sources":["../../src/capabilities/aflppCapability.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA2R3G,qBAAa,qBAAsB,YAAW,gBAAgB;IAC5D,QAAQ,CAAC,EAAE,sBAAsB;IACjC,QAAQ,CAAC,WAAW,8QAAyQ;IAEvR,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAU3E"}
|