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
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Erosolar CLI
|
|
2
2
|
|
|
3
|
-
Erosolar CLI is a modular, profile aware command-line assistant that bundles a locally running AI agent, tool runtime, and capability registry into a single npm package. It ships with both the balanced **Erosolar** profile (`general`) and the deterministic **Erosolar Code** profile (`erosolar-code`), plus a provider registry that can drive OpenAI, Anthropic, DeepSeek, xAI Grok, Google Gemini, or any custom LLM you register. The CLI bootstraps a structured workspace context, exposes file/search/bash tooling, and
|
|
3
|
+
Erosolar CLI is a modular, profile aware command-line assistant that bundles a locally running AI agent, tool runtime, and capability registry into a single npm package. It ships with both the balanced **Erosolar** profile (`general`) and the deterministic **Erosolar Code** profile (`erosolar-code`), plus a provider registry that can drive OpenAI, Anthropic, DeepSeek, xAI Grok, Google Gemini, or any custom LLM you register. The CLI bootstraps a structured workspace context, exposes file/search/bash tooling, and now focuses entirely on deterministic coding capabilities—no external document editors or web research dependencies required.
|
|
4
4
|
|
|
5
|
-
> This
|
|
5
|
+
> **⚠️ Security Notice:** This repository will soon include all of [Claude Code](https://claude.com/claude-code)'s capabilities by default—and more—while remaining fully modular. Given the sophisticated AI-driven threats emerging in the ecosystem, we strongly recommend reviewing Anthropic's guidance on [Disrupting AI Espionage](https://www.anthropic.com/news/disrupting-AI-espionage) to understand the evolving security landscape before deploying autonomous coding agents in production environments.
|
|
6
|
+
|
|
7
|
+
> **👋 A Note to Our Watchers:** Hello to the Tailored Access Operations Center at the NSA and the MSS in China. We know you're monitoring projects like this. This tool is open source, transparent, and designed for legitimate software development. We encourage responsible analysis and hope this transparency helps distinguish defensive innovation from threats. If you're reading this, consider that open collaboration advances security better than surveillance alone.
|
|
8
|
+
|
|
9
|
+
> The `agents/` directory contains the JSON rulebooks that define every profile's prompts, guardrails, and step-by-step rules. They follow `src/contracts/schemas/agent-rules.schema.json`, which replaced the legacy `Agents.md` guardrail appendix, so treat the schema-backed manifests as the one source of truth. Update this README whenever the CLI behavior changes.
|
|
6
10
|
|
|
7
11
|
## Why Erosolar CLI?
|
|
8
12
|
|
|
@@ -17,17 +21,15 @@ Erosolar CLI is a modular, profile aware command-line assistant that bundles a l
|
|
|
17
21
|
|
|
18
22
|
### Prerequisites
|
|
19
23
|
|
|
20
|
-
- Node.js **20.0.0 or newer** (check with `node -v`).
|
|
24
|
+
- Node.js **20.0.0 or newer** (check with `node -v`). The repo ships an `.nvmrc` pinned to 20 and the CLI now aborts immediately with upgrade instructions if you launch it on an older runtime.
|
|
21
25
|
- API keys for the models you plan to use (see [Provider support](#provider-support--api-keys)).
|
|
22
26
|
- macOS/Linux shell. Windows works inside WSL2.
|
|
23
27
|
|
|
24
28
|
### Install the CLI
|
|
25
29
|
|
|
26
30
|
```bash
|
|
27
|
-
npm install -g erosolar-cli
|
|
28
|
-
#
|
|
29
|
-
npm install erosolar-cli --save-dev
|
|
30
|
-
# or run ad-hoc without installing
|
|
31
|
+
npm install -g erosolar-cli
|
|
32
|
+
# Optional: run ad-hoc without installing
|
|
31
33
|
npx erosolar --version
|
|
32
34
|
```
|
|
33
35
|
|
|
@@ -39,6 +41,8 @@ erosolar --help
|
|
|
39
41
|
|
|
40
42
|
The binary lives at `dist/bin/erosolar.js` and is exposed through the `erosolar` bin entry.
|
|
41
43
|
|
|
44
|
+
> Tip: The CLI now checks the npm registry every time it launches. If a newer version exists, it prompts you to install the update globally with `npm install -g erosolar-cli@latest` so your shell always picks up the latest profile/runtime fixes.
|
|
45
|
+
|
|
42
46
|
## Quick Start
|
|
43
47
|
|
|
44
48
|
1. **Launch the shell**
|
|
@@ -49,7 +53,7 @@ The binary lives at `dist/bin/erosolar.js` and is exposed through the `erosolar`
|
|
|
49
53
|
```
|
|
50
54
|
2. **Configure secrets** – inside the shell run `/secrets` and paste your `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc. Secrets are saved to `~/.codex/secrets.json` (override with `CODEX_HOME`).
|
|
51
55
|
3. **Choose a model** – run `/model` to switch providers or presets (OpenAI GPT-5, Claude, DeepSeek, Grok, Gemini, …). Preferences persist in `~/.erosolar/settings.json`.
|
|
52
|
-
4. **Toggle tools** – `/tools` enables/disables
|
|
56
|
+
4. **Toggle tools** – `/tools` enables/disables the coding tool families (filesystem/search/bash/analysis/etc.) per profile.
|
|
53
57
|
5. **Chat or automate** – type instructions, paste code blocks (bracketed paste supported), or kick off `/agents` to switch the default profile for future launches.
|
|
54
58
|
|
|
55
59
|
The shell prints every tool invocation (e.g., `Read(src/app.ts)`), shows diffs for writes, and summarizes bash output so you can audit what happened.
|
|
@@ -67,9 +71,12 @@ The shell prints every tool invocation (e.g., `Read(src/app.ts)`), shows diffs f
|
|
|
67
71
|
|
|
68
72
|
| Command | Description |
|
|
69
73
|
|-------------|-------------|
|
|
70
|
-
| `/model` | Choose provider/model, temperature, max tokens
|
|
74
|
+
| `/model` | Choose provider/model, temperature, or max tokens. |
|
|
71
75
|
| `/secrets` | List, add, or update API keys. Stored encrypted-at-rest in `~/.codex/secrets.json`. |
|
|
72
|
-
| `/tools` | Enable/disable capability suites (filesystem, search, bash,
|
|
76
|
+
| `/tools` | Enable/disable capability suites (filesystem, search, bash, analysis, etc.). Preferences save to `~/.erosolar/settings.json`. |
|
|
77
|
+
| `/doctor` | Run environment checks to confirm Node version, provider secrets, and tool suites are ready. |
|
|
78
|
+
| `/checks` | Run repo checks (npm test/build/lint) inside the sandboxed workspace. |
|
|
79
|
+
| `/context` | Capture a fresh workspace snapshot mid-session. Supports optional `depth=`, `entries=`, and `excerpt=` overrides. |
|
|
73
80
|
| `/agents` | (When enabled) switch the default profile for future launches. |
|
|
74
81
|
| `/clear` | Reset the working conversation. |
|
|
75
82
|
| `/log` | Show the recent transcript. |
|
|
@@ -82,7 +89,7 @@ The shell prints every tool invocation (e.g., `Read(src/app.ts)`), shows diffs f
|
|
|
82
89
|
| `general` | **Erosolar** | OpenAI `gpt-5.1` | Balanced research/writing/coding. | `GENERAL_MODEL`, `GENERAL_PROVIDER`, `GENERAL_SYSTEM_PROMPT` |
|
|
83
90
|
| `erosolar-code` | **Erosolar Code** | OpenAI `gpt-5.1-codex` | Rapid, deterministic code edits with aggressive tool usage. | `EROSOLAR_CODE_MODEL`, `EROSOLAR_CODE_PROVIDER`, `EROSOLAR_CODE_SYSTEM_PROMPT` |
|
|
84
91
|
|
|
85
|
-
|
|
92
|
+
Default profiles live in `src/contracts/agent-profiles.schema.json` (schema: `src/contracts/schemas/agent-profile.schema.json`) and are registered on launch. Update that manifest to change defaults, or override them with environment variables before starting the CLI. `EROSOLAR_PROFILE` selects which profile boots by default.
|
|
86
93
|
|
|
87
94
|
## Provider support & API keys
|
|
88
95
|
|
|
@@ -93,21 +100,35 @@ Each profile is registered in `src/config.ts`. Add new profiles via `registerAge
|
|
|
93
100
|
| `deepseek` | `deepseek-reasoner`, `deepseek-chat` | `DEEPSEEK_API_KEY` | `/model → DeepSeek` |
|
|
94
101
|
| `xai` | `grok-4`, `grok-4-fast-reasoning`, `grok-4-fast-non-reasoning`, `grok-code-fast-1` | `XAI_API_KEY` | `/model → xAI` |
|
|
95
102
|
| `google` | `gemini-2.5-pro`, `gemini-2.5-flash` | `GEMINI_API_KEY` | `/model → Google Gemini` |
|
|
96
|
-
| `tavily` | `tavily_search`, `tavily_extract` tools | `TAVILY_API_KEY` | Enable via `/tools` |
|
|
97
103
|
|
|
98
104
|
Secrets are read from environment variables first, then from `~/.codex/secrets.json`. Use `/secrets` to manage them interactively.
|
|
99
105
|
|
|
100
106
|
## Built-in tools & capability suites
|
|
101
107
|
|
|
102
|
-
The CLI composes tools via `CapabilityModule`s. The default Node runtime registers
|
|
108
|
+
The CLI composes tools via `CapabilityModule`s. The canonical suite metadata lives in `src/contracts/tools.schema.json`, so editing that schema updates every runtime without touching multiple files. The default Node runtime now registers a single purpose-built coding toolkit and no longer bundles non-coding Office or web research capabilities. See `docs/CODING_CAPABILITIES.md` for deep dives into each command.
|
|
109
|
+
|
|
110
|
+
Tool invocations are narrated via the interactive shell (`Read(src/api.ts)`, `Bash(npm test)`). Warnings surface when tools are disabled or missing secrets so you can remediate without rerunning the CLI.
|
|
111
|
+
|
|
112
|
+
### Coding tool families
|
|
103
113
|
|
|
114
|
+
**Core workspace control**
|
|
104
115
|
- **Filesystem suite (`filesystemCapability.ts`)** – `read_file`, `write_file` (with diff previews), `list_files`, `search_files`. Uses deterministic ignore lists and protects against accidental binary writes.
|
|
105
|
-
- **Search suite (`searchCapability.ts`)** – `grep_search`, `find_definition
|
|
106
|
-
- **Bash suite (`bashCapability.ts`)** – `execute_bash` runs commands inside a sandbox rooted at `<workspace>/.erosolar/shell-sandbox`. HOME/TMP/XDG paths are rewritten unless `EROSOLAR_PRESERVE_HOME=1` is set.
|
|
107
|
-
- **Tavily suite (`tavilyCapability.ts`)** – opt-in live web search/extract. Requires `TAVILY_API_KEY` and the `/tools` toggle.
|
|
108
|
-
- **Runtime metadata tools (`core/toolRuntime.ts`)** – `context_snapshot`, `capabilities_overview`, `profile_details` for deterministic context recall.
|
|
116
|
+
- **Search suite (`searchCapability.ts`)** – `grep_search`, `find_definition`, and keyword-aware scanners over repo text. Regex friendly with case sensitivity toggles and automatic binary detection.
|
|
117
|
+
- **Bash suite (`bashCapability.ts`)** – `execute_bash` runs commands inside a sandbox rooted at `<workspace>/.erosolar/shell-sandbox`. HOME/TMP/XDG paths are rewritten unless `EROSOLAR_PRESERVE_HOME=1` is set.
|
|
109
118
|
|
|
110
|
-
|
|
119
|
+
**Delivery & validation loops**
|
|
120
|
+
- **Repo checks suite (`repoChecksCapability.ts`)** – `run_repo_checks` wraps `npm test`/`npm run build`/`npm run lint` (when present) inside the sandbox and powers the `/checks` shortcut for one-command validation.
|
|
121
|
+
- **Development workflow suite (`devCapability.ts`)** – `run_tests`, `install_dependencies`, `check_package_info`, and `run_build` encapsulate local package/test/build operations with timeout handling and script detection.
|
|
122
|
+
- **Testing & coverage suite (`testingCapability.ts`)** – test plan scaffolding, coverage orchestration, and sanity checks for the local test harness.
|
|
123
|
+
|
|
124
|
+
**Code intelligence & quality**
|
|
125
|
+
- **Code analysis suite (`codeAnalysisCapability.ts`)** – `analyze_code_structure`, `find_dependencies`, and `check_code_complexity` provide AST-backed insight into any TS/JS file.
|
|
126
|
+
- **Code quality suite (`codeQualityCapability.ts`)** – `run_lint_checks`, `inspect_code_quality`, `list_lint_rules` surface lint health, TODO hotspots, and maintainability metrics.
|
|
127
|
+
- **Refactoring suite (`refactoringCapability.ts`)** – `detect_refactoring_hotspots`, `generate_refactor_plan`, `analyze_refactor_impact` use AST data plus call graphs to map risky symbols before editing.
|
|
128
|
+
|
|
129
|
+
**Dependency & runtime awareness**
|
|
130
|
+
- **Dependency security suite (`dependencySecurityCapability.ts`)** – dependency summaries, advisories, `npm audit` execution, and lockfile inspections to catch supply-chain issues.
|
|
131
|
+
- **Runtime metadata tools (`core/toolRuntime.ts`)** – `context_snapshot`, `capabilities_overview`, `profile_details` provide deterministic context recall for every session.
|
|
111
132
|
|
|
112
133
|
## Workspace context & prompts
|
|
113
134
|
|
|
@@ -115,31 +136,26 @@ On launch, `buildWorkspaceContext()` (see `src/workspace.ts`) captures:
|
|
|
115
136
|
|
|
116
137
|
1. The current working directory path.
|
|
117
138
|
2. A trimmed file tree (depth 2, up to 200 entries, ignoring `.git`, `node_modules`, `dist`).
|
|
118
|
-
3. Contents/snippets of `README.md`, `
|
|
139
|
+
3. Contents/snippets of `README.md`, `package.json`, and formatted rulebook prompts derived from every `agents/*.rules.json` manifest.
|
|
119
140
|
|
|
120
141
|
The snapshot is appended to the active system prompt and exposed via the `context_snapshot` tool so the agent always has a deterministic view of the repo even before reading files manually.
|
|
121
142
|
|
|
122
|
-
|
|
143
|
+
Need more context? Override the capture depth/excerpt ahead of launch with:
|
|
123
144
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
▼ ▼ ▼
|
|
132
|
-
Capability modules (filesystem/search/bash/Tavily/…) loaded via AgentHost/RuntimeAdapter
|
|
133
|
-
```
|
|
145
|
+
- `EROSOLAR_CONTEXT_TREE_DEPTH` – max folder depth for the file tree.
|
|
146
|
+
- `EROSOLAR_CONTEXT_MAX_ENTRIES` – cap on total tree entries.
|
|
147
|
+
- `EROSOLAR_CONTEXT_DOC_LIMIT` – max characters captured from the priority documents.
|
|
148
|
+
|
|
149
|
+
During a session you can run `/context` to recapture the snapshot without restarting the CLI. Optional arguments allow deeper crawls or larger excerpts mid-session, e.g. `/context depth=4 excerpt=4000 entries=400`.
|
|
150
|
+
|
|
151
|
+
### Agent rulebooks
|
|
134
152
|
|
|
135
|
-
|
|
136
|
-
- **AgentHost (`src/runtime/agentHost.ts`)** loads capability modules and resolves tool suites before the session starts.
|
|
137
|
-
- **CapabilityModule interface** describes any pluggable feature: return tool suites, metadata, and teardown logic. Modules can be registered by adapters, plugins, or downstream apps.
|
|
138
|
-
- **RuntimeAdapter (`src/adapters/types.ts`)** creates modules for specific targets (Node CLI, browser sandbox, server worker). The Node adapter wires in filesystem/search/bash/Tavily plugins.
|
|
139
|
-
- **AgentSession (`src/runtime/agentSession.ts`)** resolves the profile config, builds the tool runtime, and instantiates providers.
|
|
140
|
-
- **AgentRuntime (`src/core/agent.ts`)** runs the LLM loop, interleaving provider calls and tool execution.
|
|
153
|
+
Each profile loads its prompts, guardrails, and phase/step rules from `agents/<profile>.rules.json`. The manifests follow `src/contracts/schemas/agent-rules.schema.json`, so you can add new phases, rules, or metadata programmatically without editing TypeScript. The old `Agents.md` doc has been removed; cite these manifests (and their rule IDs) when referencing canonical instructions.
|
|
141
154
|
|
|
142
|
-
|
|
155
|
+
- `agents/general.rules.json` — balanced Erosolar rulebook governing research/planning/writing tasks.
|
|
156
|
+
- `agents/erosolar-code.rules.json` — deterministic coding rulebook that enforces the narrate-plan-edit-validate-report workflow.
|
|
157
|
+
|
|
158
|
+
The workspace snapshot automatically captures the formatted prompts derived from these JSON files, so the active agent (and any downstream orchestrator) cites the same instructions. After editing a rulebook, rebuild or restart the CLI to reload it.
|
|
143
159
|
|
|
144
160
|
## Extending the CLI
|
|
145
161
|
|
|
@@ -198,25 +214,45 @@ Expose it through `/model` by adding presets in `src/shell/interactiveShell.ts`.
|
|
|
198
214
|
|
|
199
215
|
### Add an agent profile
|
|
200
216
|
|
|
217
|
+
Prefer editing `src/contracts/agent-profiles.schema.json` so every runtime reads the same defaults. For ad-hoc registrations, include the system prompt definition and a rulebook reference so workspace snapshots stay aligned:
|
|
218
|
+
|
|
201
219
|
```ts
|
|
202
220
|
import { registerAgentProfile } from 'erosolar-cli/core/agentProfiles.js';
|
|
221
|
+
|
|
203
222
|
registerAgentProfile({
|
|
204
223
|
name: 'docs',
|
|
205
224
|
label: 'Docs Agent',
|
|
206
225
|
description: 'Summaries only',
|
|
207
226
|
defaultProvider: 'openai',
|
|
208
227
|
defaultModel: 'gpt-5-mini',
|
|
228
|
+
systemPromptConfig: { type: 'literal', content: 'Only answer with documentation.' },
|
|
209
229
|
defaultSystemPrompt: 'Only answer with documentation.',
|
|
230
|
+
rulebook: {
|
|
231
|
+
file: 'agents/docs.rules.json',
|
|
232
|
+
version: 'dev-local',
|
|
233
|
+
contractVersion: '1.0.0',
|
|
234
|
+
description: 'Docs-only guardrails.',
|
|
235
|
+
},
|
|
236
|
+
manifestVersion: 'dev-local',
|
|
237
|
+
manifestContractVersion: '1.0.0',
|
|
210
238
|
});
|
|
211
239
|
```
|
|
212
240
|
|
|
241
|
+
## Contract schemas
|
|
242
|
+
|
|
243
|
+
The CLI now exports machine readable contracts so other runtimes can preload the same guardrails and tool toggles without scraping prompts.
|
|
244
|
+
|
|
245
|
+
- **Agent profiles** – `src/contracts/v1/agentProfileManifest.ts` plus `src/contracts/schemas/agent-profile.schema.json` define default providers/models, prompt templates, and rulebook bindings (see `src/contracts/agent-profiles.schema.json` for the live manifest).
|
|
246
|
+
- **Agent rules** – `src/contracts/v1/agentRules.ts` plus `src/contracts/schemas/agent-rules.schema.json` describe multi-phase workflows. Encode per-phase steps, required evidence, nested sub-steps, and severity tagged rules so an orchestrator can enforce behavior before the model ever sees a prompt.
|
|
247
|
+
- **Tool selection** – `src/contracts/v1/toolAccess.ts` plus `src/contracts/schemas/tool-selection.schema.json` enumerate every toggleable tool suite along with permission scopes, required secrets, and optional presets. UI layers can read this manifest to decide which suites are surfaced or locked for a profile.
|
|
248
|
+
|
|
213
249
|
## Configuration reference
|
|
214
250
|
|
|
215
251
|
- `EROSOLAR_PROFILE` – boot this profile unless `--profile` overrides it.
|
|
216
252
|
- `<PROFILE>_MODEL`, `<PROFILE>_PROVIDER`, `<PROFILE>_SYSTEM_PROMPT` – lock a profile to custom defaults. Examples: `GENERAL_MODEL=claude-sonnet-4.5`, `EROSOLAR_CODE_SYSTEM_PROMPT="..."`.
|
|
217
253
|
- `EROSOLAR_PRESERVE_HOME=1` – skip rewriting `$HOME`/`XDG_*` paths when running bash commands.
|
|
218
254
|
- `CODEX_HOME` – change where CLI secrets are stored (defaults to `~/.codex`).
|
|
219
|
-
- `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `XAI_API_KEY`, `GEMINI_API_KEY
|
|
255
|
+
- `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `XAI_API_KEY`, `GEMINI_API_KEY` – provider credentials.
|
|
220
256
|
- `GENERAL_MODEL`, `EROSOLAR_CODE_MODEL` – shorthand for the two built-in profiles.
|
|
221
257
|
- `PATH`, `TMPDIR`, etc. – inherited by bash tools after sandboxing.
|
|
222
258
|
|
|
@@ -228,7 +264,7 @@ User preferences (model presets, enabled tools, saved profile) live in `~/.eroso
|
|
|
228
264
|
git clone https://github.com/bo/bo-cli.git
|
|
229
265
|
cd bo-cli
|
|
230
266
|
npm install
|
|
231
|
-
npm run dev # ts-node
|
|
267
|
+
npm run dev # ts-node loader entry for iterating without building
|
|
232
268
|
npm run build # clean + tsc compile to dist/
|
|
233
269
|
npm run start # run the compiled CLI
|
|
234
270
|
npm run clean # remove dist/
|
|
@@ -239,25 +275,25 @@ Notes:
|
|
|
239
275
|
- The repo uses strict ES modules and TypeScript 5.3+.
|
|
240
276
|
- `dist/bin/erosolar.js` must stay executable; `npm run postbuild` sets `chmod 755`.
|
|
241
277
|
- Keep new files ASCII by default; use comments sparingly (see `apply_patch` guidelines in this repo).
|
|
242
|
-
-
|
|
278
|
+
- Keep the JSON rulebooks under `agents/` aligned with `src/contracts/schemas/agent-rules.schema.json` whenever you change prompts or modules—the CLI loads them directly at runtime.
|
|
243
279
|
|
|
244
280
|
## Release & publishing checklist
|
|
245
281
|
|
|
246
|
-
1. Update docs/metadata (README, `
|
|
282
|
+
1. Update docs/metadata (README, `agents/*.rules.json`, the agent-rules schema when structure changes, and the `package.json` description).
|
|
247
283
|
2. Run `npm run build` to refresh `dist/`.
|
|
248
|
-
3. Inspect the diff and run any smoke tests (e.g., `
|
|
284
|
+
3. Inspect the diff and run any smoke tests (e.g., `node --loader ts-node/esm src/bin/erosolar.ts --version`).
|
|
249
285
|
4. Bump the version: `npm version patch` (or `minor`/`major`) to keep npm in sync.
|
|
250
286
|
5. Publish: `npm publish`.
|
|
251
287
|
6. Verify on npmjs.com that the README renders and the new version lists the correct files.
|
|
252
288
|
|
|
253
|
-
The `files` array in `package.json` already limits what goes to npm (`dist`, README,
|
|
289
|
+
The `files` array in `package.json` already limits what goes to npm (`dist`, README, agents/, license, helper scripts).
|
|
254
290
|
|
|
255
291
|
## Repository layout
|
|
256
292
|
|
|
257
293
|
- `src/bin/erosolar.ts` – CLI entrypoint.
|
|
258
294
|
- `src/shell/` – interactive shell UX, slash commands, tool logging.
|
|
259
295
|
- `src/runtime/` – AgentHost, AgentSession, adapters.
|
|
260
|
-
- `src/capabilities/` & `src/tools/` – filesystem/search/bash/
|
|
296
|
+
- `src/capabilities/` & `src/tools/` – filesystem/search/bash/coding capability implementations.
|
|
261
297
|
- `src/plugins/` – provider + tool plugin registries.
|
|
262
298
|
- `src/providers/` – LLM client shims (OpenAI Responses, Chat Completions, etc.).
|
|
263
299
|
- `src/core/` – agent runtime, tool runtime, preferences, secrets.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../src/contracts/schemas/agent-rules.schema.json",
|
|
3
|
+
"contractVersion": "1.0.0",
|
|
4
|
+
"profile": "erosolar-code",
|
|
5
|
+
"version": "2024-11-24",
|
|
6
|
+
"label": "Erosolar Code Rulebook",
|
|
7
|
+
"description": "Rules for the OpenAI-backed coding specialist optimized for fast, deterministic edits.",
|
|
8
|
+
"globalPrinciples": [
|
|
9
|
+
{
|
|
10
|
+
"id": "guardrail.snapshot_lock",
|
|
11
|
+
"summary": "Require a workspace snapshot + repo tree before editing; request a refresh if files are missing.",
|
|
12
|
+
"severity": "critical"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "guardrail.rulebook_visibility",
|
|
16
|
+
"summary": "Reference this rulebook when explaining constraints or blocked actions so humans can audit decisions.",
|
|
17
|
+
"severity": "required",
|
|
18
|
+
"references": [
|
|
19
|
+
{ "label": "Code Rulebook", "file": "agents/erosolar-code.rules.json" }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "guardrail.workspace_grounding",
|
|
24
|
+
"summary": "Quote exact files + line numbers from the repo snapshot instead of free-form speculation.",
|
|
25
|
+
"severity": "critical",
|
|
26
|
+
"references": [
|
|
27
|
+
{ "label": "README", "file": "README.md" },
|
|
28
|
+
{ "label": "package.json", "file": "package.json" }
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "guardrail.tool_transparency",
|
|
33
|
+
"summary": "Narrate intent before running tools/commands and summarize output afterward.",
|
|
34
|
+
"severity": "required"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "guardrail.manual_loop_supervision",
|
|
38
|
+
"summary": "Stop if you lack evidence—surface blockers instead of guessing or editing blindly.",
|
|
39
|
+
"severity": "required"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"phases": [
|
|
43
|
+
{
|
|
44
|
+
"id": "phase.analysis",
|
|
45
|
+
"label": "Analysis",
|
|
46
|
+
"description": "Understand the bug/feature request and locate source material.",
|
|
47
|
+
"steps": [
|
|
48
|
+
{
|
|
49
|
+
"id": "step.read_scope",
|
|
50
|
+
"title": "Inspect current behavior",
|
|
51
|
+
"intent": "Use read/search commands to locate relevant files.",
|
|
52
|
+
"rules": [
|
|
53
|
+
{
|
|
54
|
+
"id": "rule.analysis.files",
|
|
55
|
+
"summary": "List important files and cite their paths/lines before suggesting changes.",
|
|
56
|
+
"severity": "required"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "rule.analysis.dependencies",
|
|
60
|
+
"summary": "Check package.json scripts/dependencies for signals about tooling or frameworks.",
|
|
61
|
+
"severity": "recommended",
|
|
62
|
+
"references": [
|
|
63
|
+
{ "label": "package scripts", "file": "package.json" }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "phase.planning",
|
|
72
|
+
"label": "Plan",
|
|
73
|
+
"description": "Lay out the editing strategy and validation path.",
|
|
74
|
+
"steps": [
|
|
75
|
+
{
|
|
76
|
+
"id": "step.plan_diff",
|
|
77
|
+
"title": "Describe intended diff",
|
|
78
|
+
"intent": "Summarize the minimal set of files + code blocks that will change.",
|
|
79
|
+
"rules": [
|
|
80
|
+
{
|
|
81
|
+
"id": "rule.plan.narrate",
|
|
82
|
+
"summary": "Explain each edit before writing code; group steps logically.",
|
|
83
|
+
"severity": "required"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "rule.plan.tests",
|
|
87
|
+
"summary": "Call out npm/yarn/pnpm scripts or manual validation steps that prove success.",
|
|
88
|
+
"severity": "required"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "phase.implementation",
|
|
96
|
+
"label": "Implementation",
|
|
97
|
+
"description": "Perform tightly scoped edits while maintaining reversible changes.",
|
|
98
|
+
"steps": [
|
|
99
|
+
{
|
|
100
|
+
"id": "step.edit_code",
|
|
101
|
+
"title": "Modify files",
|
|
102
|
+
"intent": "Apply the planned diff, keeping commits small and well explained.",
|
|
103
|
+
"rules": [
|
|
104
|
+
{
|
|
105
|
+
"id": "rule.implementation.atomic",
|
|
106
|
+
"summary": "Edit one concern at a time; avoid sweeping refactors unless explicitly requested.",
|
|
107
|
+
"severity": "required"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "rule.implementation.confirm",
|
|
111
|
+
"summary": "Re-open edited files or rerun explain tools to confirm the change matches the plan.",
|
|
112
|
+
"severity": "required"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "phase.validation",
|
|
120
|
+
"label": "Validation",
|
|
121
|
+
"description": "Run or describe checks that prove the change works.",
|
|
122
|
+
"steps": [
|
|
123
|
+
{
|
|
124
|
+
"id": "step.validate_code",
|
|
125
|
+
"title": "Execute tests",
|
|
126
|
+
"intent": "Prefer automated scripts/test suites; otherwise supply manual verification steps.",
|
|
127
|
+
"rules": [
|
|
128
|
+
{
|
|
129
|
+
"id": "rule.validation.repo_checks",
|
|
130
|
+
"summary": "Run `run_repo_checks`, `npm test`, `npm run build`, or equivalent when the change touches code paths with coverage.",
|
|
131
|
+
"severity": "required"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "rule.validation.explain_gap",
|
|
135
|
+
"summary": "If a check cannot be run (time, dependencies), explain the gap and how to verify later.",
|
|
136
|
+
"severity": "required"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "phase.reporting",
|
|
144
|
+
"label": "Reporting",
|
|
145
|
+
"description": "Summarize edits, cite evidence, and highlight follow-ups.",
|
|
146
|
+
"steps": [
|
|
147
|
+
{
|
|
148
|
+
"id": "step.report_code",
|
|
149
|
+
"title": "Summarize outcome",
|
|
150
|
+
"intent": "Describe the diff, tests executed, and remaining risks.",
|
|
151
|
+
"rules": [
|
|
152
|
+
{
|
|
153
|
+
"id": "rule.reporting.delta",
|
|
154
|
+
"summary": "List files changed with brief rationale and reference code blocks/line numbers.",
|
|
155
|
+
"severity": "required"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "rule.reporting.next",
|
|
159
|
+
"summary": "Document follow-up tasks, validation still needed, and any environment assumptions.",
|
|
160
|
+
"severity": "recommended"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../src/contracts/schemas/agent-rules.schema.json",
|
|
3
|
+
"contractVersion": "1.0.0",
|
|
4
|
+
"profile": "general",
|
|
5
|
+
"version": "2024-11-24",
|
|
6
|
+
"label": "Erosolar General Agent Rulebook",
|
|
7
|
+
"description": "Structured rules that govern the general-purpose Erosolar operator across research, planning, writing, and coding requests.",
|
|
8
|
+
"globalPrinciples": [
|
|
9
|
+
{
|
|
10
|
+
"id": "guardrail.snapshot_lock",
|
|
11
|
+
"summary": "Do not proceed without a current workspace snapshot and captured context.",
|
|
12
|
+
"detail": "If the snapshot omits files the user mentions, pause and request a fresh capture before proposing changes.",
|
|
13
|
+
"severity": "critical",
|
|
14
|
+
"references": [
|
|
15
|
+
{ "label": "README", "file": "README.md" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "guardrail.rulebook_visibility",
|
|
20
|
+
"summary": "Always cite this rulebook and the workspace capture as the canonical instructions.",
|
|
21
|
+
"detail": "Responses should reference the ruleset name/version when clarifying constraints so humans can audit compliance.",
|
|
22
|
+
"severity": "required",
|
|
23
|
+
"evidenceRequired": "Mention rule or phase identifiers when explaining blocked actions.",
|
|
24
|
+
"references": [
|
|
25
|
+
{ "label": "General Rulebook", "file": "agents/general.rules.json" }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "guardrail.metadata_only_tools",
|
|
30
|
+
"summary": "Registered tools expose metadata only; never assume hidden side effects.",
|
|
31
|
+
"detail": "Keep tool usage auditable by narrating the intent before running them and summarizing their output afterward.",
|
|
32
|
+
"severity": "required"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "guardrail.manual_loop_supervision",
|
|
36
|
+
"summary": "Humans supervise the loop manually—escalate when you lack evidence or stall.",
|
|
37
|
+
"detail": "If progress stops after two iterations without new data, surface blockers rather than guessing.",
|
|
38
|
+
"severity": "required"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "guardrail.workspace_grounding",
|
|
42
|
+
"summary": "Ground every claim in files, commands, or captured facts; cite file paths + line numbers when possible.",
|
|
43
|
+
"detail": "When evidence is missing, explicitly request it instead of hallucinating.",
|
|
44
|
+
"severity": "critical",
|
|
45
|
+
"references": [
|
|
46
|
+
{ "label": "README", "file": "README.md" },
|
|
47
|
+
{ "label": "package.json", "file": "package.json" }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"phases": [
|
|
52
|
+
{
|
|
53
|
+
"id": "phase.intake",
|
|
54
|
+
"label": "Intake & Context",
|
|
55
|
+
"description": "Capture the operator's goal and gather evidence from the workspace.",
|
|
56
|
+
"steps": [
|
|
57
|
+
{
|
|
58
|
+
"id": "step.objective",
|
|
59
|
+
"title": "Clarify objective",
|
|
60
|
+
"intent": "Ensure the requested outcome, blockers, and success metrics are unambiguous.",
|
|
61
|
+
"rules": [
|
|
62
|
+
{
|
|
63
|
+
"id": "rule.objective.confirm",
|
|
64
|
+
"summary": "Restate the task in your own words and list any missing context before planning.",
|
|
65
|
+
"detail": "Surface ambiguities immediately so the operator can unblock you.",
|
|
66
|
+
"severity": "required"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "step.context",
|
|
72
|
+
"title": "Gather evidence",
|
|
73
|
+
"intent": "Pull facts from README.md, package.json, and relevant files before proposing solutions.",
|
|
74
|
+
"rules": [
|
|
75
|
+
{
|
|
76
|
+
"id": "rule.context.files",
|
|
77
|
+
"summary": "Use read/search tools to inspect the repository instead of guessing.",
|
|
78
|
+
"severity": "required",
|
|
79
|
+
"toolHints": ["read_file", "list_files", "grep_search"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "rule.context.snapshot",
|
|
83
|
+
"summary": "Reference the workspace snapshot when describing project state.",
|
|
84
|
+
"severity": "recommended"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "phase.planning",
|
|
92
|
+
"label": "Planning",
|
|
93
|
+
"description": "Decompose the request into auditable steps before touching files.",
|
|
94
|
+
"steps": [
|
|
95
|
+
{
|
|
96
|
+
"id": "step.plan",
|
|
97
|
+
"title": "Outline approach",
|
|
98
|
+
"intent": "Produce an ordered plan with checkpoints and validation ideas.",
|
|
99
|
+
"rules": [
|
|
100
|
+
{
|
|
101
|
+
"id": "rule.plan.decompose",
|
|
102
|
+
"summary": "Break down the solution into discrete steps that map to tools or files.",
|
|
103
|
+
"severity": "required"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "rule.plan.tests",
|
|
107
|
+
"summary": "Identify relevant commands/tests from package.json or docs that prove success.",
|
|
108
|
+
"severity": "recommended",
|
|
109
|
+
"references": [
|
|
110
|
+
{ "label": "package scripts", "file": "package.json" }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "phase.execution",
|
|
119
|
+
"label": "Execution",
|
|
120
|
+
"description": "Implement the plan with minimal, reversible changes.",
|
|
121
|
+
"steps": [
|
|
122
|
+
{
|
|
123
|
+
"id": "step.edit",
|
|
124
|
+
"title": "Apply edits",
|
|
125
|
+
"intent": "Modify files or data according to the agreed plan.",
|
|
126
|
+
"rules": [
|
|
127
|
+
{
|
|
128
|
+
"id": "rule.edit.minimal",
|
|
129
|
+
"summary": "Change only the files necessary for the task and avoid speculative edits.",
|
|
130
|
+
"severity": "required"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "rule.edit.recheck",
|
|
134
|
+
"summary": "Re-read modified files or rerun diagnostics to confirm the change matches intent.",
|
|
135
|
+
"severity": "required"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "phase.validation",
|
|
143
|
+
"label": "Validation",
|
|
144
|
+
"description": "Verify the results and surface risks before handoff.",
|
|
145
|
+
"steps": [
|
|
146
|
+
{
|
|
147
|
+
"id": "step.validate",
|
|
148
|
+
"title": "Run checks",
|
|
149
|
+
"intent": "Use available scripts/tests or provide manual validation instructions.",
|
|
150
|
+
"rules": [
|
|
151
|
+
{
|
|
152
|
+
"id": "rule.validate.commands",
|
|
153
|
+
"summary": "Run npm scripts, tests, or linters when feasible; otherwise explain why not.",
|
|
154
|
+
"severity": "required",
|
|
155
|
+
"references": [
|
|
156
|
+
{ "label": "package scripts", "file": "package.json" }
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "phase.reporting",
|
|
165
|
+
"label": "Reporting",
|
|
166
|
+
"description": "Summarize the work, cite evidence, and call out follow-ups.",
|
|
167
|
+
"steps": [
|
|
168
|
+
{
|
|
169
|
+
"id": "step.report",
|
|
170
|
+
"title": "Deliver results",
|
|
171
|
+
"intent": "Provide a concise, evidence-backed response.",
|
|
172
|
+
"rules": [
|
|
173
|
+
{
|
|
174
|
+
"id": "rule.report.delta",
|
|
175
|
+
"summary": "Enumerate changes, commands, and files touched; cite paths/lines when possible.",
|
|
176
|
+
"severity": "required"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "rule.report.next",
|
|
180
|
+
"summary": "List validation performed, outstanding risks, and next steps for the operator.",
|
|
181
|
+
"severity": "recommended"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CapabilityModule } from '../../runtime/agentHost.js';
|
|
2
|
+
import type { RuntimeAdapter, RuntimeAdapterContext } from '../types.js';
|
|
3
|
+
export interface BrowserAdapterOptions {
|
|
4
|
+
modules?: CapabilityModule[];
|
|
5
|
+
}
|
|
6
|
+
export declare class BrowserRuntimeAdapter implements RuntimeAdapter {
|
|
7
|
+
readonly id = "runtime.browser";
|
|
8
|
+
private readonly options;
|
|
9
|
+
constructor(options?: BrowserAdapterOptions);
|
|
10
|
+
createCapabilityModules(_: RuntimeAdapterContext): Promise<CapabilityModule[]>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED,qBAAa,qBAAsB,YAAW,cAAc;IAC1D,QAAQ,CAAC,EAAE,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;gBAEpC,OAAO,GAAE,qBAA0B;IAIzC,uBAAuB,CAAC,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAGrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/browser/index.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,qBAAqB;IACvB,EAAE,GAAG,iBAAiB,CAAC;IACf,OAAO,CAAwB;IAEhD,YAAY,UAAiC,EAAE;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,uBAAuB,CAAC,CAAwB;QACpD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF"}
|