erosolar-cli 1.0.2 → 1.0.5
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 +80 -44
- package/agents/erosolar-code.rules.json +167 -0
- package/agents/general.rules.json +188 -0
- package/dist/adapters/browser/index.d.ts +12 -0
- package/dist/adapters/browser/index.d.ts.map +1 -0
- package/dist/adapters/browser/index.js +1 -0
- package/dist/adapters/browser/index.js.map +1 -0
- package/dist/adapters/node/index.d.ts +17 -0
- package/dist/adapters/node/index.d.ts.map +1 -0
- package/dist/adapters/node/index.js +1 -0
- package/dist/adapters/node/index.js.map +1 -0
- package/dist/adapters/remote/index.d.ts +13 -0
- package/dist/adapters/remote/index.d.ts.map +1 -0
- package/dist/adapters/remote/index.js +1 -0
- package/dist/adapters/remote/index.js.map +1 -0
- package/dist/adapters/types.d.ts +14 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +1 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/bin/erosolar.d.ts +3 -0
- package/dist/bin/erosolar.d.ts.map +1 -0
- package/dist/bin/erosolar.js +1 -0
- package/dist/bin/erosolar.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 +1 -0
- package/dist/capabilities/bashCapability.js.map +1 -0
- package/dist/capabilities/codeAnalysisCapability.d.ts +13 -0
- package/dist/capabilities/codeAnalysisCapability.d.ts.map +1 -0
- package/dist/capabilities/codeAnalysisCapability.js +24 -0
- package/dist/capabilities/codeAnalysisCapability.js.map +1 -0
- package/dist/capabilities/codeGenerationCapability.d.ts +13 -0
- package/dist/capabilities/codeGenerationCapability.d.ts.map +1 -0
- package/dist/capabilities/codeGenerationCapability.js +25 -0
- package/dist/capabilities/codeGenerationCapability.js.map +1 -0
- package/dist/capabilities/codeQualityCapability.d.ts +13 -0
- package/dist/capabilities/codeQualityCapability.d.ts.map +1 -0
- package/dist/capabilities/codeQualityCapability.js +25 -0
- package/dist/capabilities/codeQualityCapability.js.map +1 -0
- package/dist/capabilities/dependencySecurityCapability.d.ts +13 -0
- package/dist/capabilities/dependencySecurityCapability.d.ts.map +1 -0
- package/dist/capabilities/dependencySecurityCapability.js +24 -0
- package/dist/capabilities/dependencySecurityCapability.js.map +1 -0
- package/dist/capabilities/devCapability.d.ts +13 -0
- package/dist/capabilities/devCapability.d.ts.map +1 -0
- package/dist/capabilities/devCapability.js +24 -0
- package/dist/capabilities/devCapability.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 +1 -0
- package/dist/capabilities/filesystemCapability.js.map +1 -0
- package/dist/capabilities/index.d.ts +10 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +7 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/refactoringCapability.d.ts +13 -0
- package/dist/capabilities/refactoringCapability.d.ts.map +1 -0
- package/dist/capabilities/refactoringCapability.js +25 -0
- package/dist/capabilities/refactoringCapability.js.map +1 -0
- package/dist/capabilities/repoChecksCapability.d.ts +10 -0
- package/dist/capabilities/repoChecksCapability.d.ts.map +1 -0
- package/dist/capabilities/repoChecksCapability.js +24 -0
- package/dist/capabilities/repoChecksCapability.js.map +1 -0
- package/dist/capabilities/searchCapability.d.ts +13 -0
- package/dist/capabilities/searchCapability.d.ts.map +1 -0
- package/dist/capabilities/searchCapability.js +1 -0
- package/dist/capabilities/searchCapability.js.map +1 -0
- package/dist/capabilities/testingCapability.d.ts +13 -0
- package/dist/capabilities/testingCapability.d.ts.map +1 -0
- package/dist/capabilities/testingCapability.js +25 -0
- package/dist/capabilities/testingCapability.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 +160 -0
- package/dist/capabilities/toolManifest.js.map +1 -0
- package/dist/capabilities/toolRegistry.d.ts +22 -0
- package/dist/capabilities/toolRegistry.d.ts.map +1 -0
- package/dist/capabilities/toolRegistry.js +49 -32
- package/dist/capabilities/toolRegistry.js.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +103 -23
- package/dist/config.js.map +1 -0
- package/dist/contracts/agent-profiles.schema.json +43 -0
- package/dist/contracts/agent-schemas.json +293 -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 +89 -0
- package/dist/contracts/schemas/tool-selection.schema.json +174 -0
- package/dist/contracts/tools.schema.json +100 -0
- package/dist/contracts/v1/agent.d.ts +147 -0
- package/dist/contracts/v1/agent.d.ts.map +1 -0
- package/dist/contracts/v1/agent.js +1 -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 +1 -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 +1 -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 +35 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js +17 -9
- 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 +1 -0
- package/dist/core/agentProfiles.js.map +1 -0
- package/dist/core/agentRulebook.d.ts +11 -0
- package/dist/core/agentRulebook.d.ts.map +1 -0
- package/dist/core/agentRulebook.js +136 -0
- package/dist/core/agentRulebook.js.map +1 -0
- package/dist/core/agentSchemaLoader.d.ts +131 -0
- package/dist/core/agentSchemaLoader.d.ts.map +1 -0
- package/dist/core/agentSchemaLoader.js +221 -0
- package/dist/core/agentSchemaLoader.js.map +1 -0
- package/dist/core/contextWindow.d.ts +6 -0
- package/dist/core/contextWindow.d.ts.map +1 -0
- package/dist/core/contextWindow.js +1 -0
- package/dist/core/contextWindow.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 +1 -0
- package/dist/core/errors/apiKeyErrors.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/preferences.d.ts +21 -0
- package/dist/core/preferences.d.ts.map +1 -0
- package/dist/core/preferences.js +13 -7
- package/dist/core/preferences.js.map +1 -0
- package/dist/core/schemaValidator.d.ts +6 -0
- package/dist/core/schemaValidator.d.ts.map +1 -0
- package/dist/core/schemaValidator.js +93 -0
- package/dist/core/schemaValidator.js.map +1 -0
- package/dist/core/secretStore.d.ts +20 -0
- package/dist/core/secretStore.d.ts.map +1 -0
- package/dist/core/secretStore.js +3 -8
- package/dist/core/secretStore.js.map +1 -0
- package/dist/core/toolRuntime.d.ts +42 -0
- package/dist/core/toolRuntime.d.ts.map +1 -0
- package/dist/core/toolRuntime.js +25 -10
- package/dist/core/toolRuntime.js.map +1 -0
- package/dist/core/types.d.ts +86 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -0
- package/dist/plugins/providers/anthropic/index.d.ts +2 -0
- package/dist/plugins/providers/anthropic/index.d.ts.map +1 -0
- package/dist/plugins/providers/anthropic/index.js +6 -4
- package/dist/plugins/providers/anthropic/index.js.map +1 -0
- package/dist/plugins/providers/deepseek/index.d.ts +2 -0
- package/dist/plugins/providers/deepseek/index.d.ts.map +1 -0
- package/dist/plugins/providers/deepseek/index.js +1 -0
- package/dist/plugins/providers/deepseek/index.js.map +1 -0
- package/dist/plugins/providers/google/index.d.ts +2 -0
- package/dist/plugins/providers/google/index.d.ts.map +1 -0
- package/dist/plugins/providers/google/index.js +6 -4
- package/dist/plugins/providers/google/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 +1 -0
- package/dist/plugins/providers/index.js.map +1 -0
- package/dist/plugins/providers/openai/index.d.ts +3 -0
- package/dist/plugins/providers/openai/index.d.ts.map +1 -0
- package/dist/plugins/providers/openai/index.js +6 -4
- package/dist/plugins/providers/openai/index.js.map +1 -0
- package/dist/plugins/providers/xai/index.d.ts +2 -0
- package/dist/plugins/providers/xai/index.d.ts.map +1 -0
- package/dist/plugins/providers/xai/index.js +1 -0
- package/dist/plugins/providers/xai/index.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 +1 -0
- package/dist/plugins/tools/bash/localBashPlugin.js.map +1 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +3 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js +14 -0
- package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +1 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +3 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +14 -0
- package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +1 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +3 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +14 -0
- package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +1 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +3 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.js +12 -0
- package/dist/plugins/tools/dependency/dependencyPlugin.js.map +1 -0
- package/dist/plugins/tools/development/devPlugin.d.ts +3 -0
- package/dist/plugins/tools/development/devPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/development/devPlugin.js +14 -0
- package/dist/plugins/tools/development/devPlugin.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 +1 -0
- package/dist/plugins/tools/filesystem/localFilesystemPlugin.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 +1 -0
- package/dist/plugins/tools/index.js.map +1 -0
- package/dist/plugins/tools/nodeDefaults.d.ts +2 -0
- package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
- package/dist/plugins/tools/nodeDefaults.js +15 -2
- package/dist/plugins/tools/nodeDefaults.js.map +1 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +3 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.js +12 -0
- package/dist/plugins/tools/refactoring/refactoringPlugin.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 +1 -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 +1 -0
- package/dist/plugins/tools/search/localSearchPlugin.js.map +1 -0
- package/dist/plugins/tools/testing/testingPlugin.d.ts +3 -0
- package/dist/plugins/tools/testing/testingPlugin.d.ts.map +1 -0
- package/dist/plugins/tools/testing/testingPlugin.js +12 -0
- package/dist/plugins/tools/testing/testingPlugin.js.map +1 -0
- package/dist/providers/anthropicProvider.d.ts +23 -0
- package/dist/providers/anthropicProvider.d.ts.map +1 -0
- package/dist/providers/anthropicProvider.js +3 -2
- package/dist/providers/anthropicProvider.js.map +1 -0
- package/dist/providers/googleProvider.d.ts +19 -0
- package/dist/providers/googleProvider.d.ts.map +1 -0
- package/dist/providers/googleProvider.js +1 -1
- package/dist/providers/googleProvider.js.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts +16 -0
- package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
- package/dist/providers/openaiChatCompletionsProvider.js +1 -0
- package/dist/providers/openaiChatCompletionsProvider.js.map +1 -0
- package/dist/providers/openaiResponsesProvider.d.ts +20 -0
- package/dist/providers/openaiResponsesProvider.d.ts.map +1 -0
- package/dist/providers/openaiResponsesProvider.js +1 -0
- package/dist/providers/openaiResponsesProvider.js.map +1 -0
- package/dist/providers/providerFactory.d.ts +18 -0
- package/dist/providers/providerFactory.d.ts.map +1 -0
- package/dist/providers/providerFactory.js +5 -1
- package/dist/providers/providerFactory.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 +5 -1
- package/dist/runtime/agentHost.js.map +1 -0
- package/dist/runtime/agentSession.d.ts +32 -0
- package/dist/runtime/agentSession.d.ts.map +1 -0
- package/dist/runtime/agentSession.js +17 -1
- package/dist/runtime/agentSession.js.map +1 -0
- package/dist/runtime/browser.d.ts +7 -0
- package/dist/runtime/browser.d.ts.map +1 -0
- package/dist/runtime/browser.js +1 -0
- package/dist/runtime/browser.js.map +1 -0
- package/dist/runtime/cloud.d.ts +7 -0
- package/dist/runtime/cloud.d.ts.map +1 -0
- package/dist/runtime/cloud.js +1 -0
- package/dist/runtime/cloud.js.map +1 -0
- package/dist/runtime/node.d.ts +8 -0
- package/dist/runtime/node.d.ts.map +1 -0
- package/dist/runtime/node.js +1 -0
- package/dist/runtime/node.js.map +1 -0
- package/dist/runtime/universal.d.ts +21 -0
- package/dist/runtime/universal.d.ts.map +1 -0
- package/dist/runtime/universal.js +1 -0
- package/dist/runtime/universal.js.map +1 -0
- package/dist/shell/bracketedPasteManager.d.ts +23 -0
- package/dist/shell/bracketedPasteManager.d.ts.map +1 -0
- package/dist/shell/bracketedPasteManager.js +1 -0
- package/dist/shell/bracketedPasteManager.js.map +1 -0
- package/dist/shell/interactiveShell.d.ts +131 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -0
- package/dist/shell/interactiveShell.js +325 -262
- package/dist/shell/interactiveShell.js.map +1 -0
- package/dist/shell/liveStatus.d.ts +29 -0
- package/dist/shell/liveStatus.d.ts.map +1 -0
- package/dist/shell/liveStatus.js +77 -0
- package/dist/shell/liveStatus.js.map +1 -0
- package/dist/shell/promptSkin.d.ts +43 -0
- package/dist/shell/promptSkin.d.ts.map +1 -0
- package/dist/shell/promptSkin.js +330 -0
- package/dist/shell/promptSkin.js.map +1 -0
- package/dist/shell/shellApp.d.ts +10 -0
- package/dist/shell/shellApp.d.ts.map +1 -0
- package/dist/shell/shellApp.js +149 -78
- package/dist/shell/shellApp.js.map +1 -0
- package/dist/shell/systemPrompt.d.ts +3 -0
- package/dist/shell/systemPrompt.d.ts.map +1 -0
- package/dist/shell/systemPrompt.js +64 -0
- package/dist/shell/systemPrompt.js.map +1 -0
- package/dist/shell/updateManager.d.ts +2 -0
- package/dist/shell/updateManager.d.ts.map +1 -0
- package/dist/shell/updateManager.js +109 -0
- package/dist/shell/updateManager.js.map +1 -0
- package/dist/tools/bashTools.d.ts +8 -0
- package/dist/tools/bashTools.d.ts.map +1 -0
- package/dist/tools/bashTools.js +18 -15
- package/dist/tools/bashTools.js.map +1 -0
- package/dist/tools/codeAnalysisTools.d.ts +74 -0
- package/dist/tools/codeAnalysisTools.d.ts.map +1 -0
- package/dist/tools/codeAnalysisTools.js +642 -0
- package/dist/tools/codeAnalysisTools.js.map +1 -0
- package/dist/tools/codeGenerationTools.d.ts +3 -0
- package/dist/tools/codeGenerationTools.d.ts.map +1 -0
- package/dist/tools/codeGenerationTools.js +369 -0
- package/dist/tools/codeGenerationTools.js.map +1 -0
- package/dist/tools/codeQualityTools.d.ts +3 -0
- package/dist/tools/codeQualityTools.d.ts.map +1 -0
- package/dist/tools/codeQualityTools.js +295 -0
- package/dist/tools/codeQualityTools.js.map +1 -0
- package/dist/tools/dependencyTools.d.ts +3 -0
- package/dist/tools/dependencyTools.d.ts.map +1 -0
- package/dist/tools/dependencyTools.js +283 -0
- package/dist/tools/dependencyTools.js.map +1 -0
- package/dist/tools/devTools.d.ts +10 -0
- package/dist/tools/devTools.d.ts.map +1 -0
- package/dist/tools/devTools.js +239 -0
- package/dist/tools/devTools.js.map +1 -0
- package/dist/tools/diffUtils.d.ts +8 -0
- package/dist/tools/diffUtils.d.ts.map +1 -0
- package/dist/tools/diffUtils.js +2 -1
- package/dist/tools/diffUtils.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 +72 -21
- package/dist/tools/fileTools.js.map +1 -0
- package/dist/tools/refactoringTools.d.ts +3 -0
- package/dist/tools/refactoringTools.d.ts.map +1 -0
- package/dist/tools/refactoringTools.js +294 -0
- package/dist/tools/refactoringTools.js.map +1 -0
- package/dist/tools/repoChecksTools.d.ts +3 -0
- package/dist/tools/repoChecksTools.d.ts.map +1 -0
- package/dist/tools/repoChecksTools.js +161 -0
- package/dist/tools/repoChecksTools.js.map +1 -0
- package/dist/tools/searchTools.d.ts +3 -0
- package/dist/tools/searchTools.d.ts.map +1 -0
- package/dist/tools/searchTools.js +50 -22
- package/dist/tools/searchTools.js.map +1 -0
- package/dist/tools/testingTools.d.ts +3 -0
- package/dist/tools/testingTools.d.ts.map +1 -0
- package/dist/tools/testingTools.js +233 -0
- package/dist/tools/testingTools.js.map +1 -0
- package/dist/ui/ShellUIAdapter.d.ts +96 -0
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -0
- package/dist/ui/ShellUIAdapter.js +442 -0
- package/dist/ui/ShellUIAdapter.js.map +1 -0
- package/dist/ui/UnifiedUIController.d.ts +196 -0
- package/dist/ui/UnifiedUIController.d.ts.map +1 -0
- package/dist/ui/UnifiedUIController.js +640 -0
- package/dist/ui/UnifiedUIController.js.map +1 -0
- package/dist/ui/animation/AnimationScheduler.d.ts +192 -0
- package/dist/ui/animation/AnimationScheduler.d.ts.map +1 -0
- package/dist/ui/animation/AnimationScheduler.js +432 -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 +41 -29
- 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 +17 -1
- package/dist/ui/designSystem.js.map +1 -0
- package/dist/ui/display.d.ts +160 -0
- package/dist/ui/display.d.ts.map +1 -0
- package/dist/ui/display.js +492 -231
- package/dist/ui/display.js.map +1 -0
- package/dist/ui/interrupts/InterruptManager.d.ts +142 -0
- package/dist/ui/interrupts/InterruptManager.d.ts.map +1 -0
- package/dist/ui/interrupts/InterruptManager.js +439 -0
- package/dist/ui/interrupts/InterruptManager.js.map +1 -0
- package/dist/ui/layout.d.ts +17 -0
- package/dist/ui/layout.d.ts.map +1 -0
- package/dist/ui/layout.js +12 -7
- package/dist/ui/layout.js.map +1 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts +156 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +1 -0
- package/dist/ui/orchestration/StatusOrchestrator.js +405 -0
- package/dist/ui/orchestration/StatusOrchestrator.js.map +1 -0
- package/dist/ui/overlay/OverlayManager.d.ts +105 -0
- package/dist/ui/overlay/OverlayManager.d.ts.map +1 -0
- package/dist/ui/overlay/OverlayManager.js +291 -0
- package/dist/ui/overlay/OverlayManager.js.map +1 -0
- package/dist/ui/richText.d.ts +6 -0
- package/dist/ui/richText.d.ts.map +1 -0
- package/dist/ui/richText.js +13 -4
- package/dist/ui/richText.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/theme.d.ts +77 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +19 -6
- package/dist/ui/theme.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +16 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +66 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/nodeVersion.d.ts +3 -0
- package/dist/utils/nodeVersion.d.ts.map +1 -0
- package/dist/utils/nodeVersion.js +51 -0
- package/dist/utils/nodeVersion.js.map +1 -0
- package/dist/workspace.d.ts +8 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +72 -11
- package/dist/workspace.js.map +1 -0
- package/package.json +35 -16
- package/scripts/health-check.mjs +176 -0
- package/ARCHITECTURE.json +0 -157
- package/Agents.md +0 -207
- package/SOURCE_OF_TRUTH.json +0 -103
- package/dist/capabilities/tavilyCapability.js +0 -26
- package/dist/plugins/tools/tavily/tavilyPlugin.js +0 -16
- package/dist/shell/__tests__/bracketedPasteManager.test.js +0 -35
- package/dist/tools/tavilyTools.js +0 -176
- package/dist/ui/__tests__/richText.test.js +0 -36
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
|
|
6
|
+
// Use Node.js built-in color support for better cross-platform compatibility
|
|
7
|
+
const hasColors = process.stdout.isTTY && process.stdout.hasColors?.();
|
|
8
|
+
const colors = {
|
|
9
|
+
reset: hasColors ? '\x1b[0m' : '',
|
|
10
|
+
red: hasColors ? '\x1b[31m' : '',
|
|
11
|
+
green: hasColors ? '\x1b[32m' : '',
|
|
12
|
+
yellow: hasColors ? '\x1b[33m' : '',
|
|
13
|
+
blue: hasColors ? '\x1b[34m' : '',
|
|
14
|
+
magenta: hasColors ? '\x1b[35m' : '',
|
|
15
|
+
cyan: hasColors ? '\x1b[36m' : ''
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function logSuccess(message) {
|
|
19
|
+
console.log(`${colors.green}✅${colors.reset} ${message}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function logError(message) {
|
|
23
|
+
console.log(`${colors.red}❌${colors.reset} ${message}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function logWarning(message) {
|
|
27
|
+
console.log(`${colors.yellow}⚠️${colors.reset} ${message}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function logInfo(message) {
|
|
31
|
+
console.log(`${colors.blue}ℹ️${colors.reset} ${message}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function checkFileExists(path, description = path) {
|
|
35
|
+
if (existsSync(path)) {
|
|
36
|
+
logSuccess(`${description} - Exists`);
|
|
37
|
+
return true;
|
|
38
|
+
} else {
|
|
39
|
+
logError(`${description} - Missing`);
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function checkJsonFile(path, description = path) {
|
|
45
|
+
if (!checkFileExists(path, description)) return false;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const content = JSON.parse(readFileSync(path, 'utf8'));
|
|
49
|
+
logSuccess(`${description} - Valid JSON`);
|
|
50
|
+
return content;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
logError(`${description} - Invalid JSON: ${error.message}`);
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
console.log(`${colors.cyan}🧪 Erosolar CLI Comprehensive Health Check${colors.reset}\n`);
|
|
58
|
+
|
|
59
|
+
let hasErrors = false;
|
|
60
|
+
let hasWarnings = false;
|
|
61
|
+
|
|
62
|
+
// Check Node version using proper semver comparison
|
|
63
|
+
console.log(`${colors.magenta}📦 Node.js Environment${colors.reset}`);
|
|
64
|
+
const nodeVersion = process.version;
|
|
65
|
+
const [major] = process.versions.node.split('.').map(Number);
|
|
66
|
+
console.log(` Version: ${nodeVersion}`);
|
|
67
|
+
|
|
68
|
+
if (major >= 20) {
|
|
69
|
+
logSuccess(`Node.js version meets requirement (>=20.0.0)`);
|
|
70
|
+
} else {
|
|
71
|
+
logError(`Node.js 20.0.0 or newer is required`);
|
|
72
|
+
hasErrors = true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Check package.json configuration
|
|
76
|
+
console.log(`\n${colors.magenta}📋 Package Configuration${colors.reset}`);
|
|
77
|
+
const packageJson = checkJsonFile('package.json', 'Package.json');
|
|
78
|
+
|
|
79
|
+
if (packageJson) {
|
|
80
|
+
const requiredFields = ['name', 'version', 'description', 'main', 'bin'];
|
|
81
|
+
const missingFields = requiredFields.filter(field => !packageJson[field]);
|
|
82
|
+
|
|
83
|
+
if (missingFields.length === 0) {
|
|
84
|
+
logSuccess('Package.json configuration valid');
|
|
85
|
+
} else {
|
|
86
|
+
logError(`Missing required fields: ${missingFields.join(', ')}`);
|
|
87
|
+
hasErrors = true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Check erosolar-specific configuration
|
|
91
|
+
if (packageJson.erosolar?.rulebookSchema) {
|
|
92
|
+
logSuccess('Erosolar rulebook schema configured');
|
|
93
|
+
} else {
|
|
94
|
+
logWarning('Erosolar rulebook schema not configured in package.json');
|
|
95
|
+
hasWarnings = true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Check TypeScript compilation
|
|
100
|
+
console.log(`\n${colors.magenta}🔧 TypeScript & Build${colors.reset}`);
|
|
101
|
+
if (checkFileExists('dist', 'Build directory')) {
|
|
102
|
+
// Check main binary
|
|
103
|
+
if (checkFileExists('dist/bin/erosolar.js', 'Main binary')) {
|
|
104
|
+
// Check bin file permissions
|
|
105
|
+
const binCheck = spawnSync('ls', ['-la', 'dist/bin/erosolar.js'], { encoding: 'utf8' });
|
|
106
|
+
if (binCheck.status === 0 && binCheck.stdout.includes('-rwx')) {
|
|
107
|
+
logSuccess('Binary is executable');
|
|
108
|
+
} else {
|
|
109
|
+
logWarning('Binary is not executable');
|
|
110
|
+
hasWarnings = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
logWarning('Build directory does not exist - run \'npm run build\'');
|
|
115
|
+
hasWarnings = true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Check agent rulebooks
|
|
119
|
+
console.log(`\n${colors.magenta}📚 Agent Rulebooks${colors.reset}`);
|
|
120
|
+
const agentFiles = [
|
|
121
|
+
{ path: 'agents/erosolar-code.rules.json', name: 'Erosolar Code rulebook' },
|
|
122
|
+
{ path: 'agents/general.rules.json', name: 'General rulebook' }
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
agentFiles.forEach(({ path, name }) => {
|
|
126
|
+
const content = checkJsonFile(path, name);
|
|
127
|
+
if (content) {
|
|
128
|
+
const requiredFields = ['profile', 'version', 'label', 'globalPrinciples', 'phases'];
|
|
129
|
+
const missingFields = requiredFields.filter(field => !content[field]);
|
|
130
|
+
|
|
131
|
+
if (missingFields.length === 0) {
|
|
132
|
+
logSuccess(`${name} - Valid structure`);
|
|
133
|
+
} else {
|
|
134
|
+
logError(`${name} - Missing required fields: ${missingFields.join(', ')}`);
|
|
135
|
+
hasErrors = true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// Check rulebook schema
|
|
141
|
+
console.log(`\n${colors.magenta}📄 Schema Validation${colors.reset}`);
|
|
142
|
+
checkFileExists('src/contracts/schemas/agent-rules.schema.json', 'Agent rules schema');
|
|
143
|
+
|
|
144
|
+
// Check core dependencies
|
|
145
|
+
console.log(`\n${colors.magenta}📦 Core Dependencies${colors.reset}`);
|
|
146
|
+
const coreFiles = [
|
|
147
|
+
'src/core/agent.ts',
|
|
148
|
+
'src/core/agentRulebook.ts',
|
|
149
|
+
'src/core/toolRuntime.ts',
|
|
150
|
+
'src/providers/providerFactory.ts',
|
|
151
|
+
'src/capabilities/index.ts'
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
coreFiles.forEach(file => checkFileExists(file, file));
|
|
155
|
+
|
|
156
|
+
// Summary
|
|
157
|
+
console.log(`\n${colors.cyan}📊 Health Check Summary${colors.reset}`);
|
|
158
|
+
|
|
159
|
+
if (hasErrors) {
|
|
160
|
+
console.log(`${colors.red}❌ Health check failed with errors${colors.reset}`);
|
|
161
|
+
console.log(`${colors.yellow}💡 Run 'npm run build' to rebuild the project${colors.reset}`);
|
|
162
|
+
console.log(`${colors.yellow}💡 Run 'npm test' to verify functionality${colors.reset}`);
|
|
163
|
+
process.exit(1);
|
|
164
|
+
} else if (hasWarnings) {
|
|
165
|
+
console.log(`${colors.yellow}⚠️ Health check completed with warnings${colors.reset}`);
|
|
166
|
+
console.log(`${colors.yellow}💡 Review warnings above and address as needed${colors.reset}`);
|
|
167
|
+
process.exit(0);
|
|
168
|
+
} else {
|
|
169
|
+
console.log(`${colors.green}🎉 Health check passed successfully!${colors.reset}`);
|
|
170
|
+
console.log(`${colors.green}✅ The CLI is ready for use${colors.reset}`);
|
|
171
|
+
console.log(`\n${colors.cyan}💡 Next steps:${colors.reset}`);
|
|
172
|
+
console.log(' Run \'erosolar\' to start the CLI');
|
|
173
|
+
console.log(' Run \'npm test\' for full test suite');
|
|
174
|
+
console.log(' Run \'npm run build\' to rebuild if needed');
|
|
175
|
+
process.exit(0);
|
|
176
|
+
}
|
package/ARCHITECTURE.json
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"document": {
|
|
3
|
-
"title": "erosolar Editing Architecture",
|
|
4
|
-
"schema": "architecture.v2",
|
|
5
|
-
"version": "2.0.0",
|
|
6
|
-
"lastUpdated": "2025-11-16",
|
|
7
|
-
"maintainer": "Minimal Erosolar Code Agent"
|
|
8
|
-
},
|
|
9
|
-
"editingNorthStar": "Every edit must cite deterministic workspace evidence so hallucinations cannot slip into patches or reviews.",
|
|
10
|
-
"hallucinationObjectives": [
|
|
11
|
-
{
|
|
12
|
-
"id": "lock_truth",
|
|
13
|
-
"statement": "Freeze the exact repo snapshot before editing begins so subsequent reasoning cannot invent files, paths, or metadata."
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "minimize_context",
|
|
17
|
-
"statement": "Keep the prompt appendix to the essential tree + canonical docs so LLM context windows are not wasted on stale chatter."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"id": "metadata_reentry",
|
|
21
|
-
"statement": "Expose metadata-only tools that replay the frozen snapshot verbatim whenever the model needs to re-ground itself mid-edit."
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "operator_loop_supervision",
|
|
25
|
-
"statement": "Let the agent continue calling tools until it ships a cited answer while making it easy for humans to interrupt if it stalls."
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"knowledgeChannels": [
|
|
29
|
-
{
|
|
30
|
-
"id": "deterministic_snapshot",
|
|
31
|
-
"source": "src/workspace.ts",
|
|
32
|
-
"payload": "Depth-2 directory tree plus 2000-character excerpts from README.md, SOURCE_OF_TRUTH.json, ARCHITECTURE.json, and package.json.",
|
|
33
|
-
"purpose": "Provides the single editing reference frame shared by prompts and tools."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"id": "prompt_appendix",
|
|
37
|
-
"source": "src/config.ts",
|
|
38
|
-
"payload": "Agent guardrails from Agents.md plus the frozen snapshot appended to the system prompt of both Erosolar Code and General agents.",
|
|
39
|
-
"purpose": "Bootstraps the very first editing turn with verifiable facts."
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"id": "metadata_tools",
|
|
43
|
-
"source": "src/core/toolRuntime.ts",
|
|
44
|
-
"payload": ["context_snapshot", "capabilities_overview", "profile_details"],
|
|
45
|
-
"purpose": "Replay the captured data verbatim mid-edit without re-reading the filesystem."
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"editingPipeline": [
|
|
49
|
-
{
|
|
50
|
-
"stage": "capture_lock",
|
|
51
|
-
"module": "src/workspace.ts",
|
|
52
|
-
"responsibility": "Scan the repo deterministically, drop noisy folders (.git, node_modules, dist), and output the frozen editing snapshot.",
|
|
53
|
-
"editingImpact": "Gives editing sessions a canonical baseline and surfaces an explicit error when capture fails."
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"stage": "prompt_appendix",
|
|
57
|
-
"module": "src/config.ts",
|
|
58
|
-
"responsibility": "Resolve the active agent, merge env overrides, and glue the snapshot to the model system prompt.",
|
|
59
|
-
"editingImpact": "Keeps the first editing turn grounded and identical across providers."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"stage": "capability_composer",
|
|
63
|
-
"module": "src/runtime/agentHost.ts",
|
|
64
|
-
"responsibility": "Load capability modules (filesystem, bash, research connectors, MCP bridges) and emit the exact tool suites that enter the runtime.",
|
|
65
|
-
"editingImpact": "Decouples tooling from the UI so the same agent can run inside a CLI, browser worker, or cloud orchestrator without refactoring."
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"stage": "metadata_runtime",
|
|
69
|
-
"module": "src/core/toolRuntime.ts",
|
|
70
|
-
"responsibility": "Register metadata-only tools that simply echo cached truth blobs.",
|
|
71
|
-
"editingImpact": "Lets the model rehearse facts repeatedly without risking hallucinated side effects."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"stage": "agent_loop",
|
|
75
|
-
"module": "src/core/agent.ts",
|
|
76
|
-
"responsibility": "Orchestrate prompts, respond to tool calls synchronously, and stream until the provider emits a final message.",
|
|
77
|
-
"editingImpact": "Allows legitimate multi-step edits to finish while keeping operators aware of every intermediate turn."
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"components": [
|
|
81
|
-
{
|
|
82
|
-
"id": "WorkspaceContext",
|
|
83
|
-
"file": "src/workspace.ts",
|
|
84
|
-
"responsibilities": [
|
|
85
|
-
"Produce a deterministic directory map capped at depth 2 / 200 entries.",
|
|
86
|
-
"Slice README.md, SOURCE_OF_TRUTH.json, ARCHITECTURE.json, and package.json to 2000 characters each.",
|
|
87
|
-
"Emit descriptive errors when capture cannot complete so the agent pauses editing until a new snapshot is available."
|
|
88
|
-
],
|
|
89
|
-
"editingBenefit": "The edit session can quote exact file paths and doc excerpts without guessing."
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"id": "PromptAppendix",
|
|
93
|
-
"file": "src/config.ts",
|
|
94
|
-
"responsibilities": [
|
|
95
|
-
"Resolve provider + model for the general and Erosolar Code agents with safe env overrides.",
|
|
96
|
-
"Append the frozen snapshot to the guardrail text before the agent speaks.",
|
|
97
|
-
"Mirror prompts between providers so edits look identical regardless of backend."
|
|
98
|
-
],
|
|
99
|
-
"editingBenefit": "Both providers share the same edit-ready context, preventing provider-specific hallucinations."
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"id": "MetadataToolRuntime",
|
|
103
|
-
"file": "src/core/toolRuntime.ts",
|
|
104
|
-
"responsibilities": [
|
|
105
|
-
"Expose context_snapshot, capabilities_overview, and profile_details (see Agents.md) as immutable tools.",
|
|
106
|
-
"Serialize responses exactly as captured—no synthesis, no side effects.",
|
|
107
|
-
"Log tool start/result/error events for auditability."
|
|
108
|
-
],
|
|
109
|
-
"editingBenefit": "Editors can re-check facts mid-patch without touching the filesystem or adding new context noise."
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"id": "AgentRuntimeController",
|
|
113
|
-
"file": "src/core/agent.ts",
|
|
114
|
-
"responsibilities": [
|
|
115
|
-
"Inject the prompt appendix, record conversation state, and gate tool responses.",
|
|
116
|
-
"Stream unlimited tool passes so complex edits can finish without artificial cutoffs.",
|
|
117
|
-
"Emit each assistant/tool turn so operators can interrupt and gather more evidence whenever the run stalls."
|
|
118
|
-
],
|
|
119
|
-
"editingBenefit": "Keeps humans informed without forcing premature stops during legitimate multi-step refactors."
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"id": "CapabilityHost",
|
|
123
|
-
"file": "src/runtime/agentHost.ts",
|
|
124
|
-
"responsibilities": [
|
|
125
|
-
"Compose CapabilityModule implementations into deterministic ToolSuite arrays before AgentSession spins up.",
|
|
126
|
-
"Track contribution metadata and enforce unique suite ids so multiple connectors (e.g., Google Sheets, MCP servers, or archive movers) can coexist.",
|
|
127
|
-
"Provide a deployment-agnostic manifest that any frontend (shell, browser, CI runner) can inspect to decide which modules are active."
|
|
128
|
-
],
|
|
129
|
-
"editingBenefit": "Operators can add or remove integrations without touching UI code, which keeps deployments reliable across different environments."
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"guardrails": [
|
|
133
|
-
{
|
|
134
|
-
"id": "snapshot_lock",
|
|
135
|
-
"statement": "No editing session proceeds without a freshly captured workspace context; failures raise blocking errors."
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"id": "appendix_required",
|
|
139
|
-
"statement": "System prompts for every agent must include the Agents.md guardrails + snapshot verbatim so every answer cites the same data."
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"id": "metadata_only_tools",
|
|
143
|
-
"statement": "Registered tools are limited to replaying captured metadata; runtime rejects side-effect handlers."
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"id": "manual_loop_supervision",
|
|
147
|
-
"statement": "Agent runs are no longer capped; humans stop the session themselves if the tool loop thrashes or lacks evidence, replacing the previous 6+6 pass guard that aborted speculative turns."
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"contextBudget": {
|
|
151
|
-
"treeDepth": 2,
|
|
152
|
-
"maxEntries": 200,
|
|
153
|
-
"documentExcerptLimit": 2000,
|
|
154
|
-
"excludedFolders": [".git", "node_modules", "dist"],
|
|
155
|
-
"comment": "Tool passes are now unlimited; appendix sizing stays the same so prompts remain deterministic."
|
|
156
|
-
}
|
|
157
|
-
}
|
package/Agents.md
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# Agents (Optional)
|
|
2
|
-
|
|
3
|
-
This optional reference summarizes the agent personalities that ship with the erosolar CLI.
|
|
4
|
-
All executable defaults still live in `src/config.ts`; this document simply mirrors them so
|
|
5
|
-
operators can reason about the available choices without scanning TypeScript.
|
|
6
|
-
|
|
7
|
-
## Agent overview
|
|
8
|
-
|
|
9
|
-
| Agent | Provider | Default model | Primary intent |
|
|
10
|
-
| --- | --- | --- | --- |
|
|
11
|
-
| Erosolar | OpenAI | `gpt-5.1` | General-purpose reasoning across planning, writing, research, and coding. |
|
|
12
|
-
| Erosolar Code | OpenAI | `gpt-5.1-codex` | Fast editing feedback with deterministic grounding. |
|
|
13
|
-
|
|
14
|
-
## Erosolar agent (General)
|
|
15
|
-
|
|
16
|
-
- **Provider/model**: Uses the OpenAI SDK with `gpt-5.1` as the balanced default model.
|
|
17
|
-
- **System prompt**: Frames the assistant as a multi-domain operator that can plan, research, write, and code with equal rigor.
|
|
18
|
-
- **CLI entrypoint**: `erosolar` (package `bin` field) now boots the Erosolar Code profile; select this general agent via `/agents`, `--profile=general`, or by setting it as the default.
|
|
19
|
-
- **Tool stack**: This profile is slated to inherit the broader research+planning tool bundle once it is finalized, so keep it handy for those workflows.
|
|
20
|
-
- **Ideal for**: General operations where you need a mix of reasoning, writing, and software edits without switching personas.
|
|
21
|
-
- **Model presets**: Switch between `gpt-5.1` (default), `gpt-5.1-codex`, or any other registered preset via `/model`.
|
|
22
|
-
- **Agent selector**: Run `/agents` in the CLI to make Erosolar or any other profile the default for future launches.
|
|
23
|
-
|
|
24
|
-
## Erosolar Code agent (OpenAI)
|
|
25
|
-
|
|
26
|
-
- **Provider/model**: Uses the OpenAI SDK with `gpt-5.1-codex` as the baked-in model
|
|
27
|
-
(`src/config.ts` blueprint).
|
|
28
|
-
- **System prompt**: Frames the assistant as a proactive coding agent that can read/write files,
|
|
29
|
-
execute bash commands, and chain tools to finish multi-step tasks.
|
|
30
|
-
- **CLI entrypoint**: `erosolar` (package `bin` field). Use `/agents` to switch profiles after launching.
|
|
31
|
-
- **Ideal for**: Rapid iteration when the operator prefers OpenAI latency/behavior.
|
|
32
|
-
- **Model presets**: Switch between `gpt-5.1-codex` (default), `gpt-5.1`, `gpt-5-pro`,
|
|
33
|
-
`gpt-5-mini`, or `gpt-5-nano` directly from `/model` in the CLI.
|
|
34
|
-
|
|
35
|
-
## DeepSeek provider (OpenAI-compatible)
|
|
36
|
-
|
|
37
|
-
- **Provider/model**: Uses the OpenAI SDK pointed at DeepSeek’s API gateway so both
|
|
38
|
-
`deepseek-reasoner` and `deepseek-chat` appear in `/model`.
|
|
39
|
-
- **Authentication**: Requires `DEEPSEEK_API_KEY` (set via `/secrets` or exported as an env var).
|
|
40
|
-
- **Usage**: The CLI reuses the same OpenAI client plumbing:
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
import OpenAI from 'openai';
|
|
44
|
-
|
|
45
|
-
const openai = new OpenAI({
|
|
46
|
-
baseURL: 'https://api.deepseek.com',
|
|
47
|
-
apiKey: process.env.DEEPSEEK_API_KEY,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
async function main() {
|
|
51
|
-
const completion = await openai.chat.completions.create({
|
|
52
|
-
messages: [{ role: 'system', content: 'You are a helpful assistant.' }],
|
|
53
|
-
model: 'deepseek-reasoner',
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
console.log(completion.choices[0].message.content);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
main();
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
- **Ideal for**: When you want DeepSeek’s open weights but still expect the CLI to behave like the
|
|
63
|
-
OpenAI-backed Erosolar Code workflow.
|
|
64
|
-
|
|
65
|
-
## xAI provider (OpenAI-compatible)
|
|
66
|
-
|
|
67
|
-
- **Provider/model**: Reuses the OpenAI Chat Completions client but points it at `https://api.x.ai/v1`
|
|
68
|
-
so the CLI can drive Grok models natively.
|
|
69
|
-
- **Authentication**: Requires `XAI_API_KEY` (store it via `/secrets` or export it before launching).
|
|
70
|
-
- **Model presets**: `/model` now exposes `grok-4`, `grok-4-fast-reasoning`, `grok-4-fast-non-reasoning`,
|
|
71
|
-
and `grok-code-fast-1`.
|
|
72
|
-
- **Usage**: You can also call xAI directly with their official SDK:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
import { xai } from '@ai-sdk/xai';
|
|
76
|
-
import { generateText } from 'ai';
|
|
77
|
-
|
|
78
|
-
const result = await generateText({
|
|
79
|
-
model: xai('grok-4'),
|
|
80
|
-
system:
|
|
81
|
-
"You are Grok, a chatbot inspired by the Hitchhiker's Guide to the Galaxy.",
|
|
82
|
-
prompt: 'What is the meaning of life, the universe, and everything?',
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
console.log(result.text);
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
- **Ideal for**: When you want Grok’s Hitchhiker-inspired tone without losing the CLI workflow.
|
|
89
|
-
|
|
90
|
-
## Google provider (Gemini)
|
|
91
|
-
|
|
92
|
-
- **Provider/model**: Uses Google’s official `@google/genai` SDK so the CLI can talk to Gemini natively. The built-in config exposes both `gemini-2.5-pro` and `gemini-2.5-flash` models under the new `google` provider id.
|
|
93
|
-
- **Authentication**: Requires `GEMINI_API_KEY`, which the CLI passes directly to the SDK client.
|
|
94
|
-
- **Usage**: Mirrors the standalone SDK experience:
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
import { GoogleGenAI } from '@google/genai';
|
|
98
|
-
|
|
99
|
-
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
|
|
100
|
-
|
|
101
|
-
async function main() {
|
|
102
|
-
const response = await ai.models.generateContent({
|
|
103
|
-
model: 'gemini-2.5-flash',
|
|
104
|
-
contents: 'Explain how AI works in a few words',
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
console.log(response.text);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
main();
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
- **Ideal for**: When you want Gemini’s multi-modal reasoning or prefer Google’s governance defaults without going through an OpenAI-compatible shim.
|
|
114
|
-
|
|
115
|
-
## Environment overrides
|
|
116
|
-
|
|
117
|
-
All agents honor the same override pattern. Set these before launching the CLI if you need to
|
|
118
|
-
tune a run without editing the repo:
|
|
119
|
-
|
|
120
|
-
- `GENERAL_MODEL`, `GENERAL_PROVIDER`, `GENERAL_SYSTEM_PROMPT`
|
|
121
|
-
- `EROSOLAR_CODE_MODEL`, `EROSOLAR_CODE_PROVIDER`, `EROSOLAR_CODE_SYSTEM_PROMPT`
|
|
122
|
-
|
|
123
|
-
Unset or unknown providers automatically fall back to the safe defaults in `src/config.ts`.
|
|
124
|
-
|
|
125
|
-
## Shell sandbox behavior
|
|
126
|
-
|
|
127
|
-
- The bash tool now rewrites `HOME`, `TMPDIR`, and the `XDG_*` cache/config/data paths to
|
|
128
|
-
`<workspace>/.erosolar/shell-sandbox` so commands like `firebase`, `gcloud`, or `curl` can create
|
|
129
|
-
their runtime state even when the host blocks writes to the real home directory.
|
|
130
|
-
- Set `EROSOLAR_PRESERVE_HOME=1` before launching `erosolar` if you need to opt out and expose your
|
|
131
|
-
actual home directory (only do this when the host allows writing outside the repo).
|
|
132
|
-
|
|
133
|
-
## Selecting agents at runtime
|
|
134
|
-
|
|
135
|
-
Launch `erosolar` and run `/agents` to view the registered profiles (Erosolar and Erosolar Code, plus any
|
|
136
|
-
custom entries). The selection persists in `~/.erosolar/settings.json` and the CLI reloads that
|
|
137
|
-
profile on the next launch unless you override it with `--profile=<name>` or the corresponding
|
|
138
|
-
environment variables.
|
|
139
|
-
|
|
140
|
-
## Adding custom agents
|
|
141
|
-
|
|
142
|
-
`src/core/agentProfiles.ts` exposes a lightweight registry so you can call
|
|
143
|
-
`registerAgentProfile()` anywhere before `resolveProfileConfig()` runs. Each profile entry defines
|
|
144
|
-
its label, default provider/model pair, and guardrailed system prompt. The CLI automatically
|
|
145
|
-
recognizes the new profile name with no additional wiring and the `AgentSession` runtime
|
|
146
|
-
(`src/runtime/agentSession.ts`) keeps the prompt/tool context in sync across frontends.
|
|
147
|
-
|
|
148
|
-
## Provider registry
|
|
149
|
-
|
|
150
|
-
`src/providers/providerFactory.ts` is now a registry rather than a hard-coded switch. Call
|
|
151
|
-
`registerProvider('my-provider', factory)` once during startup to plug in new SDKs. All agents—
|
|
152
|
-
including the interactive shell, cloud workers, or browser embeddings—reuse the same provider IDs,
|
|
153
|
-
so adding new connections never requires editing the UI layer.
|
|
154
|
-
|
|
155
|
-
## Tool suites & sessions
|
|
156
|
-
|
|
157
|
-
Tool handlers are grouped into suites (`src/core/toolRuntime.ts`) which can be registered or
|
|
158
|
-
removed at runtime. The shared `AgentSession` helper composes a profile, provider selection, and
|
|
159
|
-
tool suites into a reusable runtime so the CLI, a browser UI, or a hosted workflow can all spin up
|
|
160
|
-
the same agent contract without reimplementing orchestration code.
|
|
161
|
-
|
|
162
|
-
## Capability host & modular expansions
|
|
163
|
-
|
|
164
|
-
- `src/runtime/agentHost.ts` introduces an `AgentHost` facade that fronts every frontend (CLI,
|
|
165
|
-
daemon, browser worker, or cloud function). It accepts any number of `CapabilityModule`
|
|
166
|
-
instances—each module can contribute tool suites, external connectors, or metadata without
|
|
167
|
-
touching the UI.
|
|
168
|
-
- Default modules in `src/capabilities/` wrap the local filesystem, structured repo search, and the
|
|
169
|
-
sandboxed bash executor. Operators can add new modules (Google Sheets, MCP servers, legacy file
|
|
170
|
-
migrations, etc.) by registering them before the session starts:
|
|
171
|
-
|
|
172
|
-
```ts
|
|
173
|
-
import { AgentHost } from './runtime/agentHost.js';
|
|
174
|
-
import { CapabilityModule } from './runtime/agentHost.js';
|
|
175
|
-
|
|
176
|
-
const googleSheetsModule: CapabilityModule = {
|
|
177
|
-
id: 'capability.google_sheets',
|
|
178
|
-
async create(context) {
|
|
179
|
-
const sheets = await connectToSheets(process.env.GOOGLE_CREDENTIALS!);
|
|
180
|
-
return {
|
|
181
|
-
id: 'sheets.tools.analytics',
|
|
182
|
-
description: 'Plan + edit spreadsheet models via Google Sheets API',
|
|
183
|
-
toolSuites: [sheets.asToolSuite()],
|
|
184
|
-
metadata: { scopes: sheets.requestedScopes },
|
|
185
|
-
dispose: () => sheets.disconnect(),
|
|
186
|
-
};
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
const host = new AgentHost({ profile: 'erosolar-code', workspaceContext, workingDir });
|
|
191
|
-
await host.loadModules([googleSheetsModule]);
|
|
192
|
-
const session = await host.getSession();
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
- Because `AgentHost` only passes plain tool suites into `AgentSession`, the same capability stack
|
|
196
|
-
works from a CLI shell, a remote orchestrator, or a browser sandbox. No frontend changes are
|
|
197
|
-
required as long as new modules obey the shared `CapabilityModule` contract.
|
|
198
|
-
- Modules can bridge to MCP servers, SaaS APIs, or on-prem systems by emitting their own tool suites
|
|
199
|
-
(e.g., a “research” module that shells into SLURM, or a “filesystem migration” module that wraps a
|
|
200
|
-
bespoke archivist API). Frontends decide which modules to load based on deployment policy without
|
|
201
|
-
recompiling the CLI.
|
|
202
|
-
|
|
203
|
-
## Maintenance
|
|
204
|
-
|
|
205
|
-
Update this file whenever `src/config.ts` changes guardrails, default models, or provider
|
|
206
|
-
identifiers. If the repo only needs a single agent, you may delete this file altogether; the CLI
|
|
207
|
-
will continue to use the TypeScript blueprints directly.
|
package/SOURCE_OF_TRUTH.json
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"document": {
|
|
3
|
-
"title": "Source of Truth — Hallucination-Free Editing",
|
|
4
|
-
"schemaVersion": "5.0.0",
|
|
5
|
-
"snapshotId": "editing_grounding_refresh",
|
|
6
|
-
"snapshotLabel": "Editing Context Discipline",
|
|
7
|
-
"lastUpdated": "2025-11-16",
|
|
8
|
-
"maintainedBy": "erosolar Dual Provider Runtime"
|
|
9
|
-
},
|
|
10
|
-
"northStar": "Make every edit cite deterministic evidence so hallucinations and contextual overload never reach the file system.",
|
|
11
|
-
"mission": "Describe the frozen truth inputs, replay-only tooling, and loop controls that make erosolar the safest place to edit with LLMs.",
|
|
12
|
-
"authoritativeCorpus": {
|
|
13
|
-
"priorityFiles": [
|
|
14
|
-
"README.md",
|
|
15
|
-
"Agents.md",
|
|
16
|
-
"SOURCE_OF_TRUTH.json",
|
|
17
|
-
"ARCHITECTURE.json",
|
|
18
|
-
"package.json",
|
|
19
|
-
"src/config.ts"
|
|
20
|
-
],
|
|
21
|
-
"refreshExpectation": "Capture a new workspace snapshot on every CLI launch before any editing instructions are issued.",
|
|
22
|
-
"allowedExpansion": "Only add files that contain objective reference specs or canonical configuration. Narrative changelogs live elsewhere."
|
|
23
|
-
},
|
|
24
|
-
"agentsDocumentation": {
|
|
25
|
-
"optionalFile": "Agents.md",
|
|
26
|
-
"purpose": "Describe the available CLI agents (Erosolar general via OpenAI and Erosolar Code via OpenAI) without bloating this canonical JSON snapshot.",
|
|
27
|
-
"contents": [
|
|
28
|
-
"Provider + model defaults copied from src/config.ts blueprint values.",
|
|
29
|
-
"Guidance on when to use each agent and how system prompts differ.",
|
|
30
|
-
"Environment variable overrides that map directly to the implementation."
|
|
31
|
-
],
|
|
32
|
-
"refreshGuidance": "Regenerate or update Agents.md whenever src/config.ts changes guardrails, models, or environment override names."
|
|
33
|
-
},
|
|
34
|
-
"preferencePersistence": {
|
|
35
|
-
"mechanism": "src/core/preferences.ts writes ~/.erosolar/settings.json whenever the operator changes models via /model.",
|
|
36
|
-
"behavior": "On startup the CLI reloads the last saved provider/model for a profile unless the corresponding EROSOLAR_CODE_* environment variables pin a specific configuration."
|
|
37
|
-
},
|
|
38
|
-
"hallucinationControls": [
|
|
39
|
-
{
|
|
40
|
-
"id": "deterministic_snapshot",
|
|
41
|
-
"mechanism": "src/workspace.ts builds a depth-2 tree (max 200 entries) and ingests 2000-character excerpts from every priority file.",
|
|
42
|
-
"editingImpact": "Locks an identical evidence base for both providers before edits start."
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"id": "prompt_appendix",
|
|
46
|
-
"mechanism": "src/config.ts concatenates the guardrail text with the frozen snapshot for each agent defined in Agents.md.",
|
|
47
|
-
"editingImpact": "Reduces contextual overload by giving every agent the same curated evidence instead of raw workspace noise."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": "metadata_tools",
|
|
51
|
-
"mechanism": "src/core/toolRuntime.ts exposes `context_snapshot`, `capabilities_overview`, and `profile_details` as replay-only handlers.",
|
|
52
|
-
"editingImpact": "Allows the model to rehearse the snapshot verbatim mid-edit instead of guessing.",
|
|
53
|
-
"contextDiscipline": "Tools never re-read the workspace or shell out, so the prompt stays small and predictable."
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"id": "loop_monitoring",
|
|
57
|
-
"mechanism": "src/core/agent.ts streams every assistant/tool turn without a hard pass cap, relying on operators to interrupt if necessary and replacing the previous 6+6 pass guardrail.",
|
|
58
|
-
"editingImpact": "Long-running refactors can finish in one turn, yet humans still decide when to stop and gather more evidence."
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"editingWorkflow": [
|
|
62
|
-
{
|
|
63
|
-
"stage": "intent_capture",
|
|
64
|
-
"description": "Operator issues an editing request; agent confirms which files are in scope using the frozen tree."
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"stage": "snapshot_rehearsal",
|
|
68
|
-
"description": "Model replays `context_snapshot` or `profile_details` (documented in Agents.md) if any evidence feels uncertain."
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"stage": "patch_reasoning",
|
|
72
|
-
"description": "Model plans edits strictly against cited files and excerpts from the appendix."
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"stage": "answer_or_escalate",
|
|
76
|
-
"description": "The model keeps iterating until it can deliver a cited patch plan or explain what evidence is missing; humans interrupt manually if execution thrashes."
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"contextManagement": {
|
|
80
|
-
"treeDepth": 2,
|
|
81
|
-
"maxEntries": 200,
|
|
82
|
-
"documentExcerptLimit": 2000,
|
|
83
|
-
"excludedFolders": [".git", "node_modules", "dist"],
|
|
84
|
-
"rationale": "Unlimited tool passes keep the editing loop flexible; the appendix guardrails stay focused on keeping captured context compact."
|
|
85
|
-
},
|
|
86
|
-
"verificationRules": [
|
|
87
|
-
"Reference only the files listed in `authoritativeCorpus.priorityFiles` or paths that appear in the captured tree.",
|
|
88
|
-
"Quote line numbers or excerpt boundaries whenever describing an edit.",
|
|
89
|
-
"If the snapshot omits the needed file (e.g., because of depth limits), stop and request a refreshed capture.",
|
|
90
|
-
"Never suggest creating speculative files to satisfy a request; direct contributors back to this Source of Truth."
|
|
91
|
-
],
|
|
92
|
-
"responseBoundaries": [
|
|
93
|
-
"All answers must cite which captured file or tool output justified the claim.",
|
|
94
|
-
"If an editing action would require fresh context (new file, new dependency), instruct the operator to refresh the snapshot first.",
|
|
95
|
-
"Do not fabricate configuration guidance—reference src/config.ts or this document.",
|
|
96
|
-
"Keep reasoning concise; defer to the metadata tools instead of repeating the entire snapshot inside free-form text."
|
|
97
|
-
],
|
|
98
|
-
"escalationPolicy": {
|
|
99
|
-
"missing_snapshot": "Abort the editing session and instruct the operator to re-run the CLI to capture a new snapshot.",
|
|
100
|
-
"long_running_loop": "If the agent keeps issuing tool calls without converging, stop the session manually and gather more evidence before retrying.",
|
|
101
|
-
"tool_error": "Surface the exact error string (no paraphrasing) and request human intervention."
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createTavilyTools } from '../tools/tavilyTools.js';
|
|
2
|
-
export class TavilyCapabilityModule {
|
|
3
|
-
id = 'capability.tavily';
|
|
4
|
-
options;
|
|
5
|
-
constructor(options) {
|
|
6
|
-
if (!options?.apiKey) {
|
|
7
|
-
throw new Error('TavilyCapabilityModule requires an API key.');
|
|
8
|
-
}
|
|
9
|
-
this.options = options;
|
|
10
|
-
}
|
|
11
|
-
async create(_context) {
|
|
12
|
-
const tools = createTavilyTools({
|
|
13
|
-
apiKey: this.options.apiKey,
|
|
14
|
-
baseUrl: this.options.baseUrl,
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
id: 'tavily.tools.web',
|
|
18
|
-
description: 'Live Tavily web search and extraction tools.',
|
|
19
|
-
toolSuite: {
|
|
20
|
-
id: 'tavily.web',
|
|
21
|
-
description: 'Internet search and content extraction via Tavily.',
|
|
22
|
-
tools,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|