@trenchwork/erosolar 1.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +225 -0
- package/agents/erosolar-code.rules.json +199 -0
- package/dist/bin/cliMode.d.ts +8 -0
- package/dist/bin/cliMode.d.ts.map +1 -0
- package/dist/bin/cliMode.js +20 -0
- package/dist/bin/cliMode.js.map +1 -0
- package/dist/bin/deepseek.d.ts +3 -0
- package/dist/bin/deepseek.d.ts.map +1 -0
- package/dist/bin/deepseek.js +203 -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/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/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/enhancedGitCapability.d.ts +7 -0
- package/dist/capabilities/enhancedGitCapability.d.ts.map +1 -0
- package/dist/capabilities/enhancedGitCapability.js +220 -0
- package/dist/capabilities/enhancedGitCapability.js.map +1 -0
- package/dist/capabilities/filesystemCapability.d.ts +13 -0
- package/dist/capabilities/filesystemCapability.d.ts.map +1 -0
- package/dist/capabilities/filesystemCapability.js +24 -0
- package/dist/capabilities/filesystemCapability.js.map +1 -0
- package/dist/capabilities/gitHistoryCapability.d.ts +6 -0
- package/dist/capabilities/gitHistoryCapability.d.ts.map +1 -0
- package/dist/capabilities/gitHistoryCapability.js +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 +11 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +16 -0
- package/dist/capabilities/index.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/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/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/unifiedCodingCapability.d.ts +62 -0
- package/dist/capabilities/unifiedCodingCapability.d.ts.map +1 -0
- package/dist/capabilities/unifiedCodingCapability.js +790 -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/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +184 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts/agent-profiles.schema.json +43 -0
- package/dist/contracts/agent-schemas.json +470 -0
- package/dist/contracts/models.schema.json +9 -0
- package/dist/contracts/module-schema.json +367 -0
- package/dist/contracts/schemas/agent-profile.schema.json +157 -0
- package/dist/contracts/schemas/agent-rules.schema.json +238 -0
- package/dist/contracts/schemas/agent-schemas.schema.json +528 -0
- package/dist/contracts/schemas/agent.schema.json +90 -0
- package/dist/contracts/schemas/tool-selection.schema.json +174 -0
- package/dist/contracts/tools.schema.json +42 -0
- package/dist/contracts/unified-schema.json +660 -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/adversarial.d.ts +38 -0
- package/dist/core/adversarial.d.ts.map +1 -0
- package/dist/core/adversarial.js +106 -0
- package/dist/core/adversarial.js.map +1 -0
- package/dist/core/agent.d.ts +329 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +1668 -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/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 +272 -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 +236 -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 +67 -0
- package/dist/core/preferences.d.ts.map +1 -0
- package/dist/core/preferences.js +315 -0
- package/dist/core/preferences.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/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 +266 -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/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 +477 -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/headless/interactiveShell.d.ts +39 -0
- package/dist/headless/interactiveShell.d.ts.map +1 -0
- package/dist/headless/interactiveShell.js +2052 -0
- package/dist/headless/interactiveShell.js.map +1 -0
- package/dist/headless/printMode.d.ts +17 -0
- package/dist/headless/printMode.d.ts.map +1 -0
- package/dist/headless/printMode.js +40 -0
- package/dist/headless/printMode.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 +59 -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/mcp/mcpPlugin.d.ts +3 -0
- package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js +27 -0
- package/dist/plugins/tools/mcp/mcpPlugin.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts +13 -0
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
- package/dist/plugins/tools/nodeDefaults.js +33 -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 +70 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.js +1043 -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 +7 -0
- package/dist/runtime/node.d.ts.map +1 -0
- package/dist/runtime/node.js +50 -0
- package/dist/runtime/node.js.map +1 -0
- package/dist/runtime/universal.d.ts +18 -0
- package/dist/runtime/universal.d.ts.map +1 -0
- package/dist/runtime/universal.js +21 -0
- package/dist/runtime/universal.js.map +1 -0
- package/dist/shell/autoExecutor.d.ts +70 -0
- package/dist/shell/autoExecutor.d.ts.map +1 -0
- package/dist/shell/autoExecutor.js +320 -0
- package/dist/shell/autoExecutor.js.map +1 -0
- package/dist/shell/commandRegistry.d.ts +122 -0
- package/dist/shell/commandRegistry.d.ts.map +1 -0
- package/dist/shell/commandRegistry.js +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/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/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/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/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/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 +101 -0
- package/dist/tools/todoTools.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 +383 -0
- package/dist/tools/webTools.js.map +1 -0
- package/dist/ui/ink/App.d.ts +42 -0
- package/dist/ui/ink/App.d.ts.map +1 -0
- package/dist/ui/ink/App.js +10 -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 +14 -0
- package/dist/ui/ink/ChatStatic.js.map +1 -0
- package/dist/ui/ink/InkPromptController.d.ts +289 -0
- package/dist/ui/ink/InkPromptController.d.ts.map +1 -0
- package/dist/ui/ink/InkPromptController.js +552 -0
- package/dist/ui/ink/InkPromptController.js.map +1 -0
- package/dist/ui/ink/Menu.d.ts +21 -0
- package/dist/ui/ink/Menu.d.ts.map +1 -0
- package/dist/ui/ink/Menu.js +61 -0
- package/dist/ui/ink/Menu.js.map +1 -0
- package/dist/ui/ink/Prompt.d.ts +31 -0
- package/dist/ui/ink/Prompt.d.ts.map +1 -0
- package/dist/ui/ink/Prompt.js +197 -0
- package/dist/ui/ink/Prompt.js.map +1 -0
- package/dist/ui/ink/StatusLine.d.ts +21 -0
- package/dist/ui/ink/StatusLine.d.ts.map +1 -0
- package/dist/ui/ink/StatusLine.js +11 -0
- package/dist/ui/ink/StatusLine.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 +437 -0
- package/dist/ui/theme.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/asyncUtils.d.ts +95 -0
- package/dist/utils/asyncUtils.d.ts.map +1 -0
- package/dist/utils/asyncUtils.js +286 -0
- package/dist/utils/asyncUtils.js.map +1 -0
- package/dist/utils/debugLogger.d.ts +6 -0
- package/dist/utils/debugLogger.d.ts.map +1 -0
- package/dist/utils/debugLogger.js +39 -0
- package/dist/utils/debugLogger.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +12 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +83 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +10 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +78 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/packageInfo.d.ts +14 -0
- package/dist/utils/packageInfo.d.ts.map +1 -0
- package/dist/utils/packageInfo.js +45 -0
- package/dist/utils/packageInfo.js.map +1 -0
- package/dist/utils/planFormatter.d.ts +34 -0
- package/dist/utils/planFormatter.d.ts.map +1 -0
- package/dist/utils/planFormatter.js +141 -0
- package/dist/utils/planFormatter.js.map +1 -0
- package/dist/utils/securityUtils.d.ts +132 -0
- package/dist/utils/securityUtils.d.ts.map +1 -0
- package/dist/utils/securityUtils.js +324 -0
- package/dist/utils/securityUtils.js.map +1 -0
- package/dist/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 +123 -0
- package/scripts/postinstall.cjs +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/ui/ink/Menu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAU1C,SAAS,eAAe,CAAC,KAAiB;IACxC,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChF,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,GAAW,EAAE,GAAW,EAAU,EAAE;QACrE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;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GAAQ,CAAC,CAAC,CAAC,IAAI,EACxC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;gBACrB,MAAM,QAAQ,GAAG,CAAC,KAAK,MAAM,CAAC;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;gBACrE,OAAO,CACL,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,aAC7E,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,IAC9B,EACN,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAC,IAAI,IAAC,QAAQ,yBAAI,IAAI,CAAC,WAAW,IAAQ,CAAC,CAAC,CAAC,IAAI,KAJ7D,IAAI,CAAC,EAAE,CAKX,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt — Ink-rendered input box.
|
|
3
|
+
*
|
|
4
|
+
* Phase 2 of the Ink migration. Real text input via React reducer + Ink's
|
|
5
|
+
* useInput. The reducer is the single source of truth for buffer + cursor;
|
|
6
|
+
* keystrokes dispatch actions; Ink's reconciler renders. Frame coalescing,
|
|
7
|
+
* visual-column handling, and resize bookkeeping are owned by Ink.
|
|
8
|
+
*
|
|
9
|
+
* Render contract: this component is the only writer for the prompt row.
|
|
10
|
+
* No `process.stdout.write` side-effects — submission and cancellation
|
|
11
|
+
* surface through the `onSubmit` / `onCancel` props so the host can pipe
|
|
12
|
+
* to the existing event bus.
|
|
13
|
+
*
|
|
14
|
+
* Paste sanitization mirrors UnifiedUIRenderer.sanitizePasteContent: ANSI
|
|
15
|
+
* escapes, raw C0 control bytes, and bracketed-paste markers are stripped
|
|
16
|
+
* at intake (issues #3 + #8). The sanitizer runs on every batch of text
|
|
17
|
+
* Ink hands us, so a malicious paste can't survive into the buffer.
|
|
18
|
+
*/
|
|
19
|
+
import React from 'react';
|
|
20
|
+
export interface PromptProps {
|
|
21
|
+
initial?: string;
|
|
22
|
+
prefix?: string;
|
|
23
|
+
/** Hide the buffer (password mode). */
|
|
24
|
+
secret?: boolean;
|
|
25
|
+
/** Called with the final buffer when the user presses Enter. */
|
|
26
|
+
onSubmit: (text: string) => void;
|
|
27
|
+
/** Called when the user presses Ctrl+C with an empty buffer. */
|
|
28
|
+
onCancel: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare const Prompt: React.FC<PromptProps>;
|
|
31
|
+
//# sourceMappingURL=Prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../../src/ui/ink/Prompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAwC,MAAM,OAAO,CAAC;AAG7D,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAuED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqHxC,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Prompt — Ink-rendered input box.
|
|
4
|
+
*
|
|
5
|
+
* Phase 2 of the Ink migration. Real text input via React reducer + Ink's
|
|
6
|
+
* useInput. The reducer is the single source of truth for buffer + cursor;
|
|
7
|
+
* keystrokes dispatch actions; Ink's reconciler renders. Frame coalescing,
|
|
8
|
+
* visual-column handling, and resize bookkeeping are owned by Ink.
|
|
9
|
+
*
|
|
10
|
+
* Render contract: this component is the only writer for the prompt row.
|
|
11
|
+
* No `process.stdout.write` side-effects — submission and cancellation
|
|
12
|
+
* surface through the `onSubmit` / `onCancel` props so the host can pipe
|
|
13
|
+
* to the existing event bus.
|
|
14
|
+
*
|
|
15
|
+
* Paste sanitization mirrors UnifiedUIRenderer.sanitizePasteContent: ANSI
|
|
16
|
+
* escapes, raw C0 control bytes, and bracketed-paste markers are stripped
|
|
17
|
+
* at intake (issues #3 + #8). The sanitizer runs on every batch of text
|
|
18
|
+
* Ink hands us, so a malicious paste can't survive into the buffer.
|
|
19
|
+
*/
|
|
20
|
+
import { useReducer, useEffect, useRef } from 'react';
|
|
21
|
+
import { Box, Text, useInput } from 'ink';
|
|
22
|
+
function sanitize(text) {
|
|
23
|
+
if (!text)
|
|
24
|
+
return '';
|
|
25
|
+
// Full ANSI sequences (with the \x1b prefix intact).
|
|
26
|
+
let s = text.replace(/\x1b\[[0-9;?]*[A-Za-z~]|\x1b\][^\x07]*\x07|\x1b[PX^_][^\x1b]*\x1b\\|\x1b./g, '');
|
|
27
|
+
// Ink's parseKeypress sometimes splits a chunk such that the \x1b is
|
|
28
|
+
// consumed but the body lands in the next input string (e.g. "[2J" or
|
|
29
|
+
// "[201~"). Strip those leaked CSI bodies too. The pattern matches the
|
|
30
|
+
// standard CSI body shape; legitimate user text rarely matches.
|
|
31
|
+
s = s.replace(/\[[0-9;?]*[A-Za-z~]/g, '');
|
|
32
|
+
s = s.replace(/\r\n/g, '\n');
|
|
33
|
+
// Strip C0 controls EXCEPT the ones the walk-loop in useInput acts on:
|
|
34
|
+
// \x01 (Ctrl+A) → home, \x03 (Ctrl+C) → cancel, \x05 (Ctrl+E) → end,
|
|
35
|
+
// \x09 (tab, accepted as text), \x0a (\n) → submit, \x0d (\r) → submit.
|
|
36
|
+
// Everything else is hostile (NUL, BEL, BS, VT, FF, etc.).
|
|
37
|
+
s = s.replace(/[\x00\x02\x04\x06\x07\x08\x0b\x0c\x0e-\x1f\x7f]/g, '');
|
|
38
|
+
return s;
|
|
39
|
+
}
|
|
40
|
+
function reducer(state, action) {
|
|
41
|
+
switch (action.type) {
|
|
42
|
+
case 'insert': {
|
|
43
|
+
const clean = sanitize(action.text);
|
|
44
|
+
if (!clean)
|
|
45
|
+
return state;
|
|
46
|
+
const before = state.text.slice(0, state.cursor);
|
|
47
|
+
const after = state.text.slice(state.cursor);
|
|
48
|
+
return { text: before + clean + after, cursor: state.cursor + clean.length };
|
|
49
|
+
}
|
|
50
|
+
case 'backspace': {
|
|
51
|
+
if (state.cursor === 0)
|
|
52
|
+
return state;
|
|
53
|
+
const before = state.text.slice(0, state.cursor - 1);
|
|
54
|
+
const after = state.text.slice(state.cursor);
|
|
55
|
+
return { text: before + after, cursor: state.cursor - 1 };
|
|
56
|
+
}
|
|
57
|
+
case 'delete': {
|
|
58
|
+
if (state.cursor >= state.text.length)
|
|
59
|
+
return state;
|
|
60
|
+
const before = state.text.slice(0, state.cursor);
|
|
61
|
+
const after = state.text.slice(state.cursor + 1);
|
|
62
|
+
return { text: before + after, cursor: state.cursor };
|
|
63
|
+
}
|
|
64
|
+
case 'left':
|
|
65
|
+
return { ...state, cursor: Math.max(0, state.cursor - 1) };
|
|
66
|
+
case 'right':
|
|
67
|
+
return { ...state, cursor: Math.min(state.text.length, state.cursor + 1) };
|
|
68
|
+
case 'home':
|
|
69
|
+
return { ...state, cursor: 0 };
|
|
70
|
+
case 'end':
|
|
71
|
+
return { ...state, cursor: state.text.length };
|
|
72
|
+
case 'set':
|
|
73
|
+
return { text: action.text, cursor: action.cursor ?? action.text.length };
|
|
74
|
+
default:
|
|
75
|
+
return state;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export const Prompt = ({ initial = '', prefix = '> ', secret = false, onSubmit, onCancel }) => {
|
|
79
|
+
// Source of truth lives in a ref, not React state. useReducer's state
|
|
80
|
+
// commit is deferred to the next render; Ink can fire useInput multiple
|
|
81
|
+
// times in the same JS turn (parseKeypress splits a chunk into N
|
|
82
|
+
// events), and every closure would read the same stale state. Apply
|
|
83
|
+
// the reducer synchronously to the ref, then force a re-render so the
|
|
84
|
+
// UI catches up. The bumper is the only useState-style hook needed.
|
|
85
|
+
const stateRef = useRef({ text: initial, cursor: initial.length });
|
|
86
|
+
const [, bumpRender] = useReducer((n) => n + 1, 0);
|
|
87
|
+
// Sync the ref to externally-driven `initial` changes. The ref is
|
|
88
|
+
// only initialised once on mount, so when the host clears the buffer
|
|
89
|
+
// after a submit (sets `initial=''` via prop) the ref still holds
|
|
90
|
+
// the old text and the prompt keeps showing it. Watching `initial`
|
|
91
|
+
// here resets the ref whenever it transitions to a new value the
|
|
92
|
+
// user didn't type — the typical case is buffer clearing after
|
|
93
|
+
// submit. We don't reset when `initial` matches what's already in
|
|
94
|
+
// the ref so user keystrokes between renders aren't clobbered.
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
if (initial !== stateRef.current.text) {
|
|
97
|
+
stateRef.current = { text: initial, cursor: initial.length };
|
|
98
|
+
bumpRender();
|
|
99
|
+
}
|
|
100
|
+
}, [initial]);
|
|
101
|
+
const apply = (action) => {
|
|
102
|
+
stateRef.current = reducer(stateRef.current, action);
|
|
103
|
+
bumpRender();
|
|
104
|
+
};
|
|
105
|
+
useInput((input, key) => {
|
|
106
|
+
if (process.env['EROSOLAR_INK_DEBUG'] === '1') {
|
|
107
|
+
process.stderr.write(`KEY: input=${JSON.stringify(input)} ret=${key.return} bs=${key.backspace} ctrl=${key.ctrl}\n`);
|
|
108
|
+
}
|
|
109
|
+
if (key.return) {
|
|
110
|
+
onSubmit(stateRef.current.text);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (key.ctrl && (input === 'c' || input === 'C')) {
|
|
114
|
+
if (stateRef.current.text.length === 0) {
|
|
115
|
+
onCancel();
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
apply({ type: 'set', text: '', cursor: 0 });
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (key.leftArrow)
|
|
123
|
+
return apply({ type: 'left' });
|
|
124
|
+
if (key.rightArrow)
|
|
125
|
+
return apply({ type: 'right' });
|
|
126
|
+
if (key.backspace || key.delete)
|
|
127
|
+
return apply({ type: 'backspace' });
|
|
128
|
+
if (key.ctrl && (input === 'a' || input === 'A'))
|
|
129
|
+
return apply({ type: 'home' });
|
|
130
|
+
if (key.ctrl && (input === 'e' || input === 'E'))
|
|
131
|
+
return apply({ type: 'end' });
|
|
132
|
+
if (key.escape)
|
|
133
|
+
return; // ignored — main shell handles overlays
|
|
134
|
+
// Ink hands us paste / pre-buffered chunks as a single `input` string.
|
|
135
|
+
// parseKeypress only flags key.return / key.ctrl when the chunk is a
|
|
136
|
+
// pure single key. When a control byte is embedded mid-chunk (e.g.
|
|
137
|
+
// 'world\x01' or '[2J' after Ink ate the \x1b prefix) the flags stay
|
|
138
|
+
// false and the raw bytes sit inside `input`. Sanitise the WHOLE
|
|
139
|
+
// chunk first so multi-byte ANSI sequences like '[2J' are stripped
|
|
140
|
+
// as one, then walk for embedded \r / Ctrl+letter and insert the
|
|
141
|
+
// rest. Splitting into per-char dispatches without sanitising the
|
|
142
|
+
// chunk first would let CSI bodies through.
|
|
143
|
+
if (input) {
|
|
144
|
+
const cleaned = sanitize(input);
|
|
145
|
+
for (const ch of cleaned) {
|
|
146
|
+
const code = ch.charCodeAt(0);
|
|
147
|
+
if (ch === '\r' || ch === '\n') {
|
|
148
|
+
onSubmit(stateRef.current.text);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (code === 0x03) {
|
|
152
|
+
if (stateRef.current.text.length === 0) {
|
|
153
|
+
onCancel();
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
apply({ type: 'set', text: '', cursor: 0 });
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (code === 0x01) {
|
|
160
|
+
apply({ type: 'home' });
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (code === 0x05) {
|
|
164
|
+
apply({ type: 'end' });
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
// sanitize() above already stripped C0 bytes other than the
|
|
168
|
+
// shortlist we just handled, so this insert is always safe.
|
|
169
|
+
apply({ type: 'insert', text: ch });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
// Snapshot the ref into a local for the JSX below. Outside the input
|
|
174
|
+
// handler the latest committed render value is the right thing to draw.
|
|
175
|
+
const state = stateRef.current;
|
|
176
|
+
// Render the buffer with a visible cursor block. In secret mode we
|
|
177
|
+
// collapse the buffer to • characters but keep the cursor markers so
|
|
178
|
+
// the user can still see where they are editing.
|
|
179
|
+
// Children must be non-empty strings — empty <Text> siblings collide
|
|
180
|
+
// on React's auto-generated keys and the parent fails to mount, which
|
|
181
|
+
// also prevents useInput's effect from running. Render a single space
|
|
182
|
+
// when a slice would be empty.
|
|
183
|
+
const display = secret ? '•'.repeat(state.text.length) : state.text;
|
|
184
|
+
const before = display.slice(0, state.cursor) || ' ';
|
|
185
|
+
const at = display.slice(state.cursor, state.cursor + 1) || ' ';
|
|
186
|
+
const after = display.slice(state.cursor + 1) || ' ';
|
|
187
|
+
// Surface state via a hidden marker line for subprocess testing.
|
|
188
|
+
// EROSOLAR_INK_DEBUG=1 enables a `STATE: <buffer>|<cursor>` annotation
|
|
189
|
+
// that the test harness greps for. Off by default.
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
if (process.env['EROSOLAR_INK_DEBUG'] === '1') {
|
|
192
|
+
process.stderr.write(`STATE: ${state.text}|${state.cursor}\n`);
|
|
193
|
+
}
|
|
194
|
+
}, [state.text, state.cursor]);
|
|
195
|
+
return (_jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: prefix }, "prefix"), _jsx(Text, { children: before }, "before"), _jsx(Text, { inverse: true, children: at }, "cursor"), _jsx(Text, { children: after }, "after")] }));
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=Prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prompt.js","sourceRoot":"","sources":["../../../src/ui/ink/Prompt.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AA4B1C,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,qDAAqD;IACrD,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,4EAA4E,EAAE,EAAE,CAAC,CAAC;IACvG,qEAAqE;IACrE,sEAAsE;IACtE,uEAAuE;IACvE,gEAAgE;IAChE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7B,uEAAuE;IACvE,uEAAuE;IACvE,0EAA0E;IAC1E,2DAA2D;IAC3D,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,kDAAkD,EAAE,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,OAAO,CAAC,KAAY,EAAE,MAAc;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,KAAK,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AAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;IACrD,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;IAChE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;IAErD,iEAAiE;IACjE,uEAAuE;IACvE,mDAAmD;IACnD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,KAAK,GAAG,EAAE,CAAC;YAC9C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;QACjE,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/B,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAc,QAAQ,kBAAE,MAAM,IAAzB,QAAQ,CAAyB,EAC3C,KAAC,IAAI,cAAe,MAAM,IAAhB,QAAQ,CAAgB,EAClC,KAAC,IAAI,IAAc,OAAO,kBAAE,EAAE,IAApB,QAAQ,CAAoB,EACtC,KAAC,IAAI,cAAc,KAAK,IAAd,OAAO,CAAe,IAC5B,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusLine — Ink-rendered status bar. The CLI's renderer is Ink-only;
|
|
3
|
+
* this component owns the spinner / activity message / mode chips row.
|
|
4
|
+
*
|
|
5
|
+
* Render contract: this component is the *only* writer for its row. It
|
|
6
|
+
* does not call console.log, process.stdout.write, or other side-effect
|
|
7
|
+
* sinks. State comes in via props; React's reconciler diffs and Ink
|
|
8
|
+
* commits the minimal escape sequence to the terminal. Frame coalescing
|
|
9
|
+
* and visual-column counting are owned by Ink, not this code.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export interface StatusLineProps {
|
|
13
|
+
/** Active line shown next to the spinner. Empty/undefined hides the row. */
|
|
14
|
+
message?: string | null;
|
|
15
|
+
/** Optional secondary line (e.g. mode chips). */
|
|
16
|
+
modeMessage?: string | null;
|
|
17
|
+
/** Show a spinner glyph in front of `message`. */
|
|
18
|
+
spinning?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const StatusLine: React.FC<StatusLineProps>;
|
|
21
|
+
//# sourceMappingURL=StatusLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusLine.d.ts","sourceRoot":"","sources":["../../../src/ui/ink/StatusLine.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwBhD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import Spinner from 'ink-spinner';
|
|
4
|
+
export const StatusLine = ({ message, modeMessage, spinning }) => {
|
|
5
|
+
const hasMessage = Boolean(message && message.length);
|
|
6
|
+
const hasMode = Boolean(modeMessage && modeMessage.length);
|
|
7
|
+
if (!hasMessage && !hasMode)
|
|
8
|
+
return null;
|
|
9
|
+
return (_jsxs(Box, { flexDirection: "column", children: [hasMessage ? (_jsxs(Box, { children: [spinning ? (_jsxs(Text, { color: "cyan", children: [_jsx(Spinner, { type: "dots" }), ' '] })) : null, _jsx(Text, { color: "white", children: message })] })) : null, hasMode ? (_jsx(Box, { children: _jsx(Text, { color: "gray", children: modeMessage }) })) : null] }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=StatusLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusLine.js","sourceRoot":"","sources":["../../../src/ui/ink/StatusLine.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAWlC,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1F,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,CAAC,UAAU,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAEzC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACxB,UAAU,CAAC,CAAC,CAAC,CACZ,MAAC,GAAG,eACD,QAAQ,CAAC,CAAC,CAAC,CACV,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,aAChB,KAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,EAAC,GAAG,IACtB,CACR,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,OAAO,GAAQ,IAChC,CACP,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,WAAW,GAAQ,GACnC,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
type GradientFunction = (text: string) => string;
|
|
2
|
+
export declare const palette: {
|
|
3
|
+
obsidian: string;
|
|
4
|
+
onyx: string;
|
|
5
|
+
carbon: string;
|
|
6
|
+
gunmetal: string;
|
|
7
|
+
gold: string;
|
|
8
|
+
roseGold: string;
|
|
9
|
+
silver: string;
|
|
10
|
+
platinum: string;
|
|
11
|
+
titanium: string;
|
|
12
|
+
pearl: string;
|
|
13
|
+
emerald: string;
|
|
14
|
+
sapphire: string;
|
|
15
|
+
ruby: string;
|
|
16
|
+
amber: string;
|
|
17
|
+
cyan: string;
|
|
18
|
+
neonOrange: string;
|
|
19
|
+
neonCyan: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const neon: {
|
|
22
|
+
blue: {
|
|
23
|
+
text: import("chalk").ChalkInstance;
|
|
24
|
+
bright: import("chalk").ChalkInstance;
|
|
25
|
+
dim: import("chalk").ChalkInstance;
|
|
26
|
+
bg: import("chalk").ChalkInstance;
|
|
27
|
+
};
|
|
28
|
+
cyan: {
|
|
29
|
+
text: import("chalk").ChalkInstance;
|
|
30
|
+
bright: import("chalk").ChalkInstance;
|
|
31
|
+
dim: import("chalk").ChalkInstance;
|
|
32
|
+
bg: import("chalk").ChalkInstance;
|
|
33
|
+
};
|
|
34
|
+
orange: {
|
|
35
|
+
text: import("chalk").ChalkInstance;
|
|
36
|
+
bright: import("chalk").ChalkInstance;
|
|
37
|
+
dim: import("chalk").ChalkInstance;
|
|
38
|
+
bg: import("chalk").ChalkInstance;
|
|
39
|
+
};
|
|
40
|
+
gold: {
|
|
41
|
+
text: import("chalk").ChalkInstance;
|
|
42
|
+
bright: import("chalk").ChalkInstance;
|
|
43
|
+
dim: import("chalk").ChalkInstance;
|
|
44
|
+
bg: import("chalk").ChalkInstance;
|
|
45
|
+
};
|
|
46
|
+
silver: {
|
|
47
|
+
text: import("chalk").ChalkInstance;
|
|
48
|
+
bright: import("chalk").ChalkInstance;
|
|
49
|
+
dim: import("chalk").ChalkInstance;
|
|
50
|
+
bg: import("chalk").ChalkInstance;
|
|
51
|
+
};
|
|
52
|
+
purple: {
|
|
53
|
+
text: import("chalk").ChalkInstance;
|
|
54
|
+
bright: import("chalk").ChalkInstance;
|
|
55
|
+
dim: import("chalk").ChalkInstance;
|
|
56
|
+
bg: import("chalk").ChalkInstance;
|
|
57
|
+
};
|
|
58
|
+
pink: {
|
|
59
|
+
text: import("chalk").ChalkInstance;
|
|
60
|
+
bright: import("chalk").ChalkInstance;
|
|
61
|
+
dim: import("chalk").ChalkInstance;
|
|
62
|
+
bg: import("chalk").ChalkInstance;
|
|
63
|
+
};
|
|
64
|
+
green: {
|
|
65
|
+
text: import("chalk").ChalkInstance;
|
|
66
|
+
bright: import("chalk").ChalkInstance;
|
|
67
|
+
dim: import("chalk").ChalkInstance;
|
|
68
|
+
bg: import("chalk").ChalkInstance;
|
|
69
|
+
};
|
|
70
|
+
yellow: {
|
|
71
|
+
text: import("chalk").ChalkInstance;
|
|
72
|
+
bright: import("chalk").ChalkInstance;
|
|
73
|
+
dim: import("chalk").ChalkInstance;
|
|
74
|
+
bg: import("chalk").ChalkInstance;
|
|
75
|
+
};
|
|
76
|
+
magenta: {
|
|
77
|
+
text: import("chalk").ChalkInstance;
|
|
78
|
+
bright: import("chalk").ChalkInstance;
|
|
79
|
+
dim: import("chalk").ChalkInstance;
|
|
80
|
+
bg: import("chalk").ChalkInstance;
|
|
81
|
+
};
|
|
82
|
+
hologram: {
|
|
83
|
+
text: import("chalk").ChalkInstance;
|
|
84
|
+
bright: import("chalk").ChalkInstance;
|
|
85
|
+
dim: import("chalk").ChalkInstance;
|
|
86
|
+
bg: import("chalk").ChalkInstance;
|
|
87
|
+
};
|
|
88
|
+
laser: {
|
|
89
|
+
text: import("chalk").ChalkInstance;
|
|
90
|
+
bright: import("chalk").ChalkInstance;
|
|
91
|
+
dim: import("chalk").ChalkInstance;
|
|
92
|
+
bg: import("chalk").ChalkInstance;
|
|
93
|
+
};
|
|
94
|
+
plasma: {
|
|
95
|
+
text: import("chalk").ChalkInstance;
|
|
96
|
+
bright: import("chalk").ChalkInstance;
|
|
97
|
+
dim: import("chalk").ChalkInstance;
|
|
98
|
+
bg: import("chalk").ChalkInstance;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export declare const theme: {
|
|
102
|
+
primary: import("chalk").ChalkInstance;
|
|
103
|
+
secondary: import("chalk").ChalkInstance;
|
|
104
|
+
accent: import("chalk").ChalkInstance;
|
|
105
|
+
success: import("chalk").ChalkInstance;
|
|
106
|
+
warning: import("chalk").ChalkInstance;
|
|
107
|
+
error: import("chalk").ChalkInstance;
|
|
108
|
+
info: import("chalk").ChalkInstance;
|
|
109
|
+
dim: import("chalk").ChalkInstance;
|
|
110
|
+
bold: import("chalk").ChalkInstance;
|
|
111
|
+
italic: import("chalk").ChalkInstance;
|
|
112
|
+
underline: import("chalk").ChalkInstance;
|
|
113
|
+
inverse: import("chalk").ChalkInstance;
|
|
114
|
+
strikethrough: import("chalk").ChalkInstance;
|
|
115
|
+
user: import("chalk").ChalkInstance;
|
|
116
|
+
assistant: import("chalk").ChalkInstance;
|
|
117
|
+
system: import("chalk").ChalkInstance;
|
|
118
|
+
highlight: import("chalk").ChalkInstance;
|
|
119
|
+
gradient: Record<string, GradientFunction>;
|
|
120
|
+
neon: {
|
|
121
|
+
blue: import("chalk").ChalkInstance;
|
|
122
|
+
purple: import("chalk").ChalkInstance;
|
|
123
|
+
pink: import("chalk").ChalkInstance;
|
|
124
|
+
green: import("chalk").ChalkInstance;
|
|
125
|
+
cyan: import("chalk").ChalkInstance;
|
|
126
|
+
yellow: import("chalk").ChalkInstance;
|
|
127
|
+
orange: import("chalk").ChalkInstance;
|
|
128
|
+
};
|
|
129
|
+
ui: {
|
|
130
|
+
border: import("chalk").ChalkInstance;
|
|
131
|
+
background: import("chalk").ChalkInstance;
|
|
132
|
+
userPromptBackground: import("chalk").ChalkInstance;
|
|
133
|
+
muted: import("chalk").ChalkInstance;
|
|
134
|
+
text: import("chalk").ChalkInstance;
|
|
135
|
+
highlight: import("chalk").ChalkInstance;
|
|
136
|
+
emphasis: import("chalk").ChalkInstance;
|
|
137
|
+
code: import("chalk").ChalkInstance;
|
|
138
|
+
number: import("chalk").ChalkInstance;
|
|
139
|
+
string: import("chalk").ChalkInstance;
|
|
140
|
+
keyword: import("chalk").ChalkInstance;
|
|
141
|
+
operator: import("chalk").ChalkInstance;
|
|
142
|
+
};
|
|
143
|
+
metrics: {
|
|
144
|
+
elapsedLabel: import("chalk").ChalkInstance;
|
|
145
|
+
elapsedValue: import("chalk").ChalkInstance;
|
|
146
|
+
};
|
|
147
|
+
fields: {
|
|
148
|
+
label: import("chalk").ChalkInstance;
|
|
149
|
+
agent: import("chalk").ChalkInstance;
|
|
150
|
+
profile: import("chalk").ChalkInstance;
|
|
151
|
+
model: import("chalk").ChalkInstance;
|
|
152
|
+
workspace: import("chalk").ChalkInstance;
|
|
153
|
+
};
|
|
154
|
+
link: {
|
|
155
|
+
label: import("chalk").ChalkInstance;
|
|
156
|
+
url: import("chalk").ChalkInstance;
|
|
157
|
+
};
|
|
158
|
+
diff: {
|
|
159
|
+
header: import("chalk").ChalkInstance;
|
|
160
|
+
hunk: import("chalk").ChalkInstance;
|
|
161
|
+
added: import("chalk").ChalkInstance;
|
|
162
|
+
removed: import("chalk").ChalkInstance;
|
|
163
|
+
meta: import("chalk").ChalkInstance;
|
|
164
|
+
};
|
|
165
|
+
thinking: {
|
|
166
|
+
icon: import("chalk").ChalkInstance;
|
|
167
|
+
text: import("chalk").ChalkInstance;
|
|
168
|
+
border: import("chalk").ChalkInstance;
|
|
169
|
+
label: import("chalk").ChalkInstance;
|
|
170
|
+
};
|
|
171
|
+
badge: {
|
|
172
|
+
success: import("chalk").ChalkInstance;
|
|
173
|
+
error: import("chalk").ChalkInstance;
|
|
174
|
+
warning: import("chalk").ChalkInstance;
|
|
175
|
+
info: import("chalk").ChalkInstance;
|
|
176
|
+
muted: import("chalk").ChalkInstance;
|
|
177
|
+
primary: import("chalk").ChalkInstance;
|
|
178
|
+
accent: import("chalk").ChalkInstance;
|
|
179
|
+
cached: import("chalk").ChalkInstance;
|
|
180
|
+
};
|
|
181
|
+
inlineBadge: {
|
|
182
|
+
success: import("chalk").ChalkInstance;
|
|
183
|
+
error: import("chalk").ChalkInstance;
|
|
184
|
+
warning: import("chalk").ChalkInstance;
|
|
185
|
+
info: import("chalk").ChalkInstance;
|
|
186
|
+
muted: import("chalk").ChalkInstance;
|
|
187
|
+
primary: import("chalk").ChalkInstance;
|
|
188
|
+
accent: import("chalk").ChalkInstance;
|
|
189
|
+
};
|
|
190
|
+
progress: {
|
|
191
|
+
bar: import("chalk").ChalkInstance;
|
|
192
|
+
empty: import("chalk").ChalkInstance;
|
|
193
|
+
text: import("chalk").ChalkInstance;
|
|
194
|
+
percentage: import("chalk").ChalkInstance;
|
|
195
|
+
};
|
|
196
|
+
status: {
|
|
197
|
+
active: import("chalk").ChalkInstance;
|
|
198
|
+
pending: import("chalk").ChalkInstance;
|
|
199
|
+
completed: import("chalk").ChalkInstance;
|
|
200
|
+
separator: import("chalk").ChalkInstance;
|
|
201
|
+
};
|
|
202
|
+
file: {
|
|
203
|
+
path: import("chalk").ChalkInstance;
|
|
204
|
+
additions: import("chalk").ChalkInstance;
|
|
205
|
+
removals: import("chalk").ChalkInstance;
|
|
206
|
+
unchanged: import("chalk").ChalkInstance;
|
|
207
|
+
};
|
|
208
|
+
edit: {
|
|
209
|
+
header: import("chalk").ChalkInstance;
|
|
210
|
+
filePath: import("chalk").ChalkInstance;
|
|
211
|
+
lineNumber: import("chalk").ChalkInstance;
|
|
212
|
+
addedLine: import("chalk").ChalkInstance;
|
|
213
|
+
addedBg: import("chalk").ChalkInstance;
|
|
214
|
+
removedLine: import("chalk").ChalkInstance;
|
|
215
|
+
removedBg: import("chalk").ChalkInstance;
|
|
216
|
+
contextLine: import("chalk").ChalkInstance;
|
|
217
|
+
separator: import("chalk").ChalkInstance;
|
|
218
|
+
summary: import("chalk").ChalkInstance;
|
|
219
|
+
badge: import("chalk").ChalkInstance;
|
|
220
|
+
};
|
|
221
|
+
search: {
|
|
222
|
+
match: import("chalk").ChalkInstance;
|
|
223
|
+
context: import("chalk").ChalkInstance;
|
|
224
|
+
lineNum: import("chalk").ChalkInstance;
|
|
225
|
+
filename: import("chalk").ChalkInstance;
|
|
226
|
+
};
|
|
227
|
+
agent: {
|
|
228
|
+
name: import("chalk").ChalkInstance;
|
|
229
|
+
task: import("chalk").ChalkInstance;
|
|
230
|
+
result: import("chalk").ChalkInstance;
|
|
231
|
+
duration: import("chalk").ChalkInstance;
|
|
232
|
+
};
|
|
233
|
+
toolColors: {
|
|
234
|
+
bash: import("chalk").ChalkInstance;
|
|
235
|
+
execute: import("chalk").ChalkInstance;
|
|
236
|
+
read: import("chalk").ChalkInstance;
|
|
237
|
+
file: import("chalk").ChalkInstance;
|
|
238
|
+
write: import("chalk").ChalkInstance;
|
|
239
|
+
edit: import("chalk").ChalkInstance;
|
|
240
|
+
search: import("chalk").ChalkInstance;
|
|
241
|
+
grep: import("chalk").ChalkInstance;
|
|
242
|
+
glob: import("chalk").ChalkInstance;
|
|
243
|
+
web: import("chalk").ChalkInstance;
|
|
244
|
+
fetch: import("chalk").ChalkInstance;
|
|
245
|
+
task: import("chalk").ChalkInstance;
|
|
246
|
+
agent: import("chalk").ChalkInstance;
|
|
247
|
+
todo: import("chalk").ChalkInstance;
|
|
248
|
+
notebook: import("chalk").ChalkInstance;
|
|
249
|
+
ask: import("chalk").ChalkInstance;
|
|
250
|
+
default: import("chalk").ChalkInstance;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Erosolar CLI style icons
|
|
255
|
+
* Following the official Erosolar CLI UI conventions:
|
|
256
|
+
* - ⏺ (action): Used for tool calls, actions, and thinking/reasoning
|
|
257
|
+
* - ⎿ (subaction): Used for results, details, and nested information
|
|
258
|
+
* - ─ (separator): Horizontal lines for dividing sections (not in this object)
|
|
259
|
+
* - > (user prompt): User input prefix (used in formatUserPrompt)
|
|
260
|
+
*/
|
|
261
|
+
export declare const icons: {
|
|
262
|
+
success: string;
|
|
263
|
+
error: string;
|
|
264
|
+
warning: string;
|
|
265
|
+
info: string;
|
|
266
|
+
pending: string;
|
|
267
|
+
running: string;
|
|
268
|
+
cached: string;
|
|
269
|
+
arrow: string;
|
|
270
|
+
arrowRight: string;
|
|
271
|
+
arrowDown: string;
|
|
272
|
+
bullet: string;
|
|
273
|
+
dot: string;
|
|
274
|
+
thinking: string;
|
|
275
|
+
tool: string;
|
|
276
|
+
action: string;
|
|
277
|
+
subaction: string;
|
|
278
|
+
user: string;
|
|
279
|
+
assistant: string;
|
|
280
|
+
sparkle: string;
|
|
281
|
+
loading: string;
|
|
282
|
+
spinner: string[];
|
|
283
|
+
progress: string[];
|
|
284
|
+
file: string;
|
|
285
|
+
folder: string;
|
|
286
|
+
edit: string;
|
|
287
|
+
read: string;
|
|
288
|
+
write: string;
|
|
289
|
+
delete: string;
|
|
290
|
+
search: string;
|
|
291
|
+
match: string;
|
|
292
|
+
noMatch: string;
|
|
293
|
+
branch: string;
|
|
294
|
+
corner: string;
|
|
295
|
+
tee: string;
|
|
296
|
+
horizontal: string;
|
|
297
|
+
context: string;
|
|
298
|
+
time: string;
|
|
299
|
+
memory: string;
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Spinner animation frames (braille dots style)
|
|
303
|
+
*/
|
|
304
|
+
export declare const spinnerFrames: {
|
|
305
|
+
dots: string[];
|
|
306
|
+
arc: string[];
|
|
307
|
+
circle: string[];
|
|
308
|
+
bounce: string[];
|
|
309
|
+
braille: string[];
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Progress bar characters
|
|
313
|
+
*/
|
|
314
|
+
export declare const progressChars: {
|
|
315
|
+
filled: string;
|
|
316
|
+
empty: string;
|
|
317
|
+
partial: string[];
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Box drawing characters for panels
|
|
321
|
+
*/
|
|
322
|
+
export declare const boxChars: {
|
|
323
|
+
topLeft: string;
|
|
324
|
+
topRight: string;
|
|
325
|
+
bottomLeft: string;
|
|
326
|
+
bottomRight: string;
|
|
327
|
+
horizontal: string;
|
|
328
|
+
vertical: string;
|
|
329
|
+
teeRight: string;
|
|
330
|
+
teeLeft: string;
|
|
331
|
+
cross: string;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Get the appropriate color function for a tool name
|
|
335
|
+
* Returns different colors based on tool category
|
|
336
|
+
*/
|
|
337
|
+
export declare function getToolColor(toolName: string): (text: string) => string;
|
|
338
|
+
/**
|
|
339
|
+
* Format a tool name with category-specific coloring
|
|
340
|
+
*/
|
|
341
|
+
export declare function formatToolName(toolName: string): string;
|
|
342
|
+
export declare function formatBanner(profileLabel: string, model: string): string;
|
|
343
|
+
export declare function formatUserPrompt(_profile?: string): string;
|
|
344
|
+
/**
|
|
345
|
+
* Get the raw '>' prompt character for display consistency
|
|
346
|
+
*/
|
|
347
|
+
export declare const USER_PROMPT_PREFIX = "> ";
|
|
348
|
+
export declare function formatToolCall(name: string, status: 'running' | 'success' | 'error'): string;
|
|
349
|
+
export declare function formatMessage(role: 'user' | 'assistant' | 'system', content: string): string;
|
|
350
|
+
export {};
|
|
351
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAIA,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAyBjD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAwBnB,CAAC;AAIF,eAAO,MAAM,IAAI;;;;;;;;;;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