erosolar-cli 1.0.2 → 1.0.3
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/Agents.md +411 -200
- package/README.md +77 -44
- 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 +28 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +98 -23
- package/dist/config.js.map +1 -0
- package/dist/contracts/agent-profiles.schema.json +43 -0
- package/dist/contracts/agent-schema.snapshot.json +437 -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.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 +52 -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 +176 -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 +10 -0
- package/dist/core/agentRulebook.d.ts.map +1 -0
- package/dist/core/agentRulebook.js +153 -0
- package/dist/core/agentRulebook.js.map +1 -0
- package/dist/core/agentSchemaSnapshot.d.ts +14 -0
- package/dist/core/agentSchemaSnapshot.d.ts.map +1 -0
- package/dist/core/agentSchemaSnapshot.js +38 -0
- package/dist/core/agentSchemaSnapshot.js.map +1 -0
- package/dist/core/agentsDocument.d.ts +4 -0
- package/dist/core/agentsDocument.d.ts.map +1 -0
- package/dist/core/agentsDocument.js +70 -0
- package/dist/core/agentsDocument.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 +48 -0
- package/dist/core/toolRuntime.d.ts.map +1 -0
- package/dist/core/toolRuntime.js +34 -11
- 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 +23 -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 +128 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -0
- package/dist/shell/interactiveShell.js +264 -146
- package/dist/shell/interactiveShell.js.map +1 -0
- package/dist/shell/liveStatus.d.ts +33 -0
- package/dist/shell/liveStatus.d.ts.map +1 -0
- package/dist/shell/liveStatus.js +89 -0
- package/dist/shell/liveStatus.js.map +1 -0
- package/dist/shell/promptSkin.d.ts +50 -0
- package/dist/shell/promptSkin.d.ts.map +1 -0
- package/dist/shell/promptSkin.js +380 -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 +155 -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/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 +1 -0
- package/dist/ui/designSystem.js.map +1 -0
- package/dist/ui/display.d.ts +78 -0
- package/dist/ui/display.d.ts.map +1 -0
- package/dist/ui/display.js +211 -153
- package/dist/ui/display.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/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/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/ui/unified/UIEventBus.d.ts +93 -0
- package/dist/ui/unified/UIEventBus.d.ts.map +1 -0
- package/dist/ui/unified/UIEventBus.js +124 -0
- package/dist/ui/unified/UIEventBus.js.map +1 -0
- package/dist/ui/unified/UIState.d.ts +123 -0
- package/dist/ui/unified/UIState.d.ts.map +1 -0
- package/dist/ui/unified/UIState.js +188 -0
- package/dist/ui/unified/UIState.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 +68 -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 +63 -11
- package/dist/workspace.js.map +1 -0
- package/package.json +27 -14
- package/scripts/health-check.mjs +179 -0
- package/ARCHITECTURE.json +0 -157
- 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,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
|
|
6
|
+
// Simplified color handling using Node.js built-in support
|
|
7
|
+
const colors = {
|
|
8
|
+
reset: '\x1b[0m',
|
|
9
|
+
red: '\x1b[31m',
|
|
10
|
+
green: '\x1b[32m',
|
|
11
|
+
yellow: '\x1b[33m',
|
|
12
|
+
blue: '\x1b[34m',
|
|
13
|
+
magenta: '\x1b[35m',
|
|
14
|
+
cyan: '\x1b[36m'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function logSuccess(message) {
|
|
18
|
+
console.log(`${colors.green}✅${colors.reset} ${message}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function logError(message) {
|
|
22
|
+
console.log(`${colors.red}❌${colors.reset} ${message}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function logWarning(message) {
|
|
26
|
+
console.log(`${colors.yellow}⚠️${colors.reset} ${message}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function logInfo(message) {
|
|
30
|
+
console.log(`${colors.blue}ℹ️${colors.reset} ${message}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function checkFileExists(path, description = path) {
|
|
34
|
+
if (existsSync(path)) {
|
|
35
|
+
logSuccess(`${description} - Exists`);
|
|
36
|
+
return true;
|
|
37
|
+
} else {
|
|
38
|
+
logError(`${description} - Missing`);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function checkJsonFile(path, description = path) {
|
|
44
|
+
if (!existsSync(path)) {
|
|
45
|
+
logError(`${description} - Missing`);
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
const content = JSON.parse(readFileSync(path, 'utf8'));
|
|
51
|
+
logSuccess(`${description} - Valid JSON`);
|
|
52
|
+
return content;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
logError(`${description} - Invalid JSON: ${error.message}`);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log(`${colors.cyan}🧪 Erosolar CLI Health Check${colors.reset}\n`);
|
|
60
|
+
|
|
61
|
+
let hasErrors = false;
|
|
62
|
+
let hasWarnings = false;
|
|
63
|
+
|
|
64
|
+
// Check Node version
|
|
65
|
+
console.log(`${colors.magenta}📦 Node.js Environment${colors.reset}`);
|
|
66
|
+
const nodeVersion = process.version;
|
|
67
|
+
const [major] = process.versions.node.split('.').map(Number);
|
|
68
|
+
console.log(` Version: ${nodeVersion}`);
|
|
69
|
+
|
|
70
|
+
if (major >= 20) {
|
|
71
|
+
logSuccess(`Node.js version meets requirement (>=20.0.0)`);
|
|
72
|
+
} else {
|
|
73
|
+
logError(`Node.js 20.0.0 or newer is required`);
|
|
74
|
+
hasErrors = true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Check package.json configuration
|
|
78
|
+
console.log(`\n${colors.magenta}📋 Package Configuration${colors.reset}`);
|
|
79
|
+
const packageJson = checkJsonFile('package.json', 'Package.json');
|
|
80
|
+
|
|
81
|
+
if (packageJson) {
|
|
82
|
+
const requiredFields = ['name', 'version', 'description', 'main', 'bin'];
|
|
83
|
+
const missingFields = requiredFields.filter(field => !packageJson[field]);
|
|
84
|
+
|
|
85
|
+
if (missingFields.length === 0) {
|
|
86
|
+
logSuccess('Package.json configuration valid');
|
|
87
|
+
} else {
|
|
88
|
+
logError(`Missing required fields: ${missingFields.join(', ')}`);
|
|
89
|
+
hasErrors = true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Check erosolar-specific configuration
|
|
93
|
+
if (packageJson.erosolar?.rulebookSchema) {
|
|
94
|
+
logSuccess('Erosolar rulebook schema configured');
|
|
95
|
+
} else {
|
|
96
|
+
logWarning('Erosolar rulebook schema not configured in package.json');
|
|
97
|
+
hasWarnings = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Check TypeScript compilation
|
|
102
|
+
console.log(`\n${colors.magenta}🔧 TypeScript & Build${colors.reset}`);
|
|
103
|
+
if (checkFileExists('dist', 'Build directory')) {
|
|
104
|
+
// Check main binary
|
|
105
|
+
if (checkFileExists('dist/bin/erosolar.js', 'Main binary')) {
|
|
106
|
+
// Check bin file permissions
|
|
107
|
+
const binCheck = spawnSync('ls', ['-la', 'dist/bin/erosolar.js'], { encoding: 'utf8' });
|
|
108
|
+
if (binCheck.status === 0 && binCheck.stdout.includes('-rwx')) {
|
|
109
|
+
logSuccess('Binary is executable');
|
|
110
|
+
} else {
|
|
111
|
+
logWarning('Binary is not executable');
|
|
112
|
+
hasWarnings = true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
logWarning('Build directory does not exist - run \'npm run build\'');
|
|
117
|
+
hasWarnings = true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Check agent schema document
|
|
121
|
+
console.log(`\n${colors.magenta}📚 Agent Schema${colors.reset}`);
|
|
122
|
+
const agentsDocPath = 'Agents.md';
|
|
123
|
+
if (checkFileExists(agentsDocPath, 'Agents.md manifest')) {
|
|
124
|
+
const content = readFileSync(agentsDocPath, 'utf8');
|
|
125
|
+
if (/```json\s+manifest/.test(content)) {
|
|
126
|
+
logSuccess('Agents.md contains a manifest block');
|
|
127
|
+
} else {
|
|
128
|
+
logError('Agents.md is missing a ```json manifest block');
|
|
129
|
+
hasErrors = true;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const rulebookMatches = [...content.matchAll(/```json\s+rulebook\s+([^\s`]+)[\s\S]*?```/g)];
|
|
133
|
+
if (rulebookMatches.length >= 1) {
|
|
134
|
+
logSuccess(`Agents.md contains ${rulebookMatches.length} rulebook block(s)`);
|
|
135
|
+
} else {
|
|
136
|
+
logError('Agents.md must include at least one ```json rulebook <profile> block');
|
|
137
|
+
hasErrors = true;
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
hasErrors = true;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Check rulebook schema
|
|
144
|
+
console.log(`\n${colors.magenta}📄 Schema Validation${colors.reset}`);
|
|
145
|
+
checkFileExists('src/contracts/schemas/agent-rules.schema.json', 'Agent rules schema');
|
|
146
|
+
|
|
147
|
+
// Check core dependencies
|
|
148
|
+
console.log(`\n${colors.magenta}📦 Core Dependencies${colors.reset}`);
|
|
149
|
+
const coreFiles = [
|
|
150
|
+
'src/core/agent.ts',
|
|
151
|
+
'src/core/agentRulebook.ts',
|
|
152
|
+
'src/core/toolRuntime.ts',
|
|
153
|
+
'src/providers/providerFactory.ts',
|
|
154
|
+
'src/capabilities/index.ts'
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
coreFiles.forEach(file => checkFileExists(file, file));
|
|
158
|
+
|
|
159
|
+
// Summary
|
|
160
|
+
console.log(`\n${colors.cyan}📊 Health Check Summary${colors.reset}`);
|
|
161
|
+
|
|
162
|
+
if (hasErrors) {
|
|
163
|
+
console.log(`${colors.red}❌ Health check failed with errors${colors.reset}`);
|
|
164
|
+
console.log(`${colors.yellow}💡 Run 'npm run build' to rebuild the project${colors.reset}`);
|
|
165
|
+
console.log(`${colors.yellow}💡 Run 'npm test' to verify functionality${colors.reset}`);
|
|
166
|
+
process.exit(1);
|
|
167
|
+
} else if (hasWarnings) {
|
|
168
|
+
console.log(`${colors.yellow}⚠️ Health check completed with warnings${colors.reset}`);
|
|
169
|
+
console.log(`${colors.yellow}💡 Review warnings above and address as needed${colors.reset}`);
|
|
170
|
+
process.exit(0);
|
|
171
|
+
} else {
|
|
172
|
+
console.log(`${colors.green}🎉 Health check passed successfully!${colors.reset}`);
|
|
173
|
+
console.log(`${colors.green}✅ The CLI is ready for use${colors.reset}`);
|
|
174
|
+
console.log(`\n${colors.cyan}💡 Next steps:${colors.reset}`);
|
|
175
|
+
console.log(' Run \'erosolar\' to start the CLI');
|
|
176
|
+
console.log(' Run \'npm test\' for full test suite');
|
|
177
|
+
console.log(' Run \'npm run build\' to rebuild if needed');
|
|
178
|
+
process.exit(0);
|
|
179
|
+
}
|
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/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
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TavilyCapabilityModule } from '../../../capabilities/tavilyCapability.js';
|
|
2
|
-
import { getSecretValue } from '../../../core/secretStore.js';
|
|
3
|
-
export function createTavilyToolPlugin() {
|
|
4
|
-
return {
|
|
5
|
-
id: 'tool.tavily.web',
|
|
6
|
-
description: 'Tavily web search and extraction.',
|
|
7
|
-
targets: ['node', 'cloud'],
|
|
8
|
-
create: () => {
|
|
9
|
-
const apiKey = getSecretValue('TAVILY_API_KEY');
|
|
10
|
-
if (!apiKey) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return new TavilyCapabilityModule({ apiKey });
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import test from 'node:test';
|
|
3
|
-
import { BracketedPasteManager } from '../bracketedPasteManager.js';
|
|
4
|
-
const START = '\u001b[200~';
|
|
5
|
-
const END = '\u001b[201~';
|
|
6
|
-
test('combines bracketed paste across multiple lines', () => {
|
|
7
|
-
const manager = new BracketedPasteManager(true);
|
|
8
|
-
let result = manager.process(`${START}what happened in`);
|
|
9
|
-
assert.equal(result.handled, true);
|
|
10
|
-
assert.equal(result.result, undefined);
|
|
11
|
-
result = manager.process(` Trump\'s 2025 trip to${END}`);
|
|
12
|
-
assert.equal(result.handled, true);
|
|
13
|
-
assert.equal(result.result, "what happened in\n Trump's 2025 trip to");
|
|
14
|
-
});
|
|
15
|
-
test('captures pastes that end with a newline', () => {
|
|
16
|
-
const manager = new BracketedPasteManager(true);
|
|
17
|
-
manager.process(`${START}first line`);
|
|
18
|
-
manager.process('second line');
|
|
19
|
-
const result = manager.process(`${END}`);
|
|
20
|
-
assert.equal(result.handled, true);
|
|
21
|
-
assert.equal(result.result, 'first line\nsecond line\n');
|
|
22
|
-
});
|
|
23
|
-
test('preserves prefix and suffix text outside paste markers', () => {
|
|
24
|
-
const manager = new BracketedPasteManager(true);
|
|
25
|
-
const result = manager.process(`Tell me ${START}something${END} please`);
|
|
26
|
-
assert.equal(result.handled, true);
|
|
27
|
-
assert.equal(result.result, 'Tell me something please');
|
|
28
|
-
});
|
|
29
|
-
test('falls back gracefully when bracketed paste is disabled', () => {
|
|
30
|
-
const manager = new BracketedPasteManager(false);
|
|
31
|
-
let result = manager.process('just text');
|
|
32
|
-
assert.equal(result.handled, false);
|
|
33
|
-
result = manager.process(`${START}multi${END}`);
|
|
34
|
-
assert.equal(result.handled, false);
|
|
35
|
-
});
|