@vybestack/llxprt-code-core 0.1.15 → 0.1.16
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 +37 -2
- package/dist/src/code_assist/converter.d.ts +2 -1
- package/dist/src/code_assist/converter.js +2 -1
- package/dist/src/code_assist/converter.js.map +1 -1
- package/dist/src/code_assist/converter.test.js +13 -10
- package/dist/src/code_assist/converter.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +2 -2
- package/dist/src/code_assist/server.js +4 -4
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +9 -9
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/code_assist/setup.js +1 -1
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/setup.test.js +2 -2
- package/dist/src/code_assist/setup.test.js.map +1 -1
- package/dist/src/config/config.d.ts +22 -4
- package/dist/src/config/config.js +58 -10
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +28 -0
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/flashFallback.test.js +11 -1
- package/dist/src/config/flashFallback.test.js.map +1 -1
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/profileManager.d.ts +42 -0
- package/dist/src/config/profileManager.js +114 -0
- package/dist/src/config/profileManager.js.map +1 -0
- package/dist/src/core/client.d.ts +11 -1
- package/dist/src/core/client.js +86 -30
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.d.ts +1 -1
- package/dist/src/core/client.test.js +95 -28
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +2 -2
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/coreToolScheduler.js +39 -15
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +14 -17
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.js +34 -2
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +2 -2
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.js +11 -3
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +5 -2
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts-async.test.d.ts +6 -0
- package/dist/src/core/prompts-async.test.js +115 -0
- package/dist/src/core/prompts-async.test.js.map +1 -0
- package/dist/src/core/prompts.d.ts +8 -1
- package/dist/src/core/prompts.js +97 -377
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +46 -192
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/tokenLimits.d.ts +1 -1
- package/dist/src/core/tokenLimits.js +5 -1
- package/dist/src/core/tokenLimits.js.map +1 -1
- package/dist/src/core/turn.d.ts +3 -0
- package/dist/src/core/turn.js +3 -0
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/ide/detect-ide.d.ts +10 -0
- package/dist/src/ide/detect-ide.js +24 -0
- package/dist/src/ide/detect-ide.js.map +1 -0
- package/dist/src/ide/ide-client.d.ts +11 -1
- package/dist/src/ide/ide-client.js +37 -1
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-installer.d.ts +15 -0
- package/dist/src/ide/ide-installer.js +111 -0
- package/dist/src/ide/ide-installer.js.map +1 -0
- package/dist/src/ide/ide-installer.test.d.ts +6 -0
- package/dist/src/ide/ide-installer.test.js +78 -0
- package/dist/src/ide/ide-installer.test.js.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +11 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.js +3 -3
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +9 -8
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/parsers/TextToolCallParser.d.ts +1 -0
- package/dist/src/parsers/TextToolCallParser.js +45 -3
- package/dist/src/parsers/TextToolCallParser.js.map +1 -1
- package/dist/src/parsers/TextToolCallParser.multibyte.test.d.ts +1 -0
- package/dist/src/parsers/TextToolCallParser.multibyte.test.js +42 -0
- package/dist/src/parsers/TextToolCallParser.multibyte.test.js.map +1 -0
- package/dist/src/prompt-config/TemplateEngine.d.ts +35 -0
- package/dist/src/prompt-config/TemplateEngine.js +149 -0
- package/dist/src/prompt-config/TemplateEngine.js.map +1 -0
- package/dist/src/prompt-config/TemplateEngine.test.d.ts +1 -0
- package/dist/src/prompt-config/TemplateEngine.test.js +494 -0
- package/dist/src/prompt-config/TemplateEngine.test.js.map +1 -0
- package/dist/src/prompt-config/defaults/compression.md +58 -0
- package/dist/src/prompt-config/defaults/core-defaults.d.ts +5 -0
- package/dist/src/prompt-config/defaults/core-defaults.js +332 -0
- package/dist/src/prompt-config/defaults/core-defaults.js.map +1 -0
- package/dist/src/prompt-config/defaults/core.md +267 -0
- package/dist/src/prompt-config/defaults/env/git-repository.md +15 -0
- package/dist/src/prompt-config/defaults/env/ide-mode.md +3 -0
- package/dist/src/prompt-config/defaults/env/macos-seatbelt.md +3 -0
- package/dist/src/prompt-config/defaults/env/outside-of-sandbox.md +3 -0
- package/dist/src/prompt-config/defaults/env/sandbox.md +3 -0
- package/dist/src/prompt-config/defaults/index.d.ts +14 -0
- package/dist/src/prompt-config/defaults/index.js +21 -0
- package/dist/src/prompt-config/defaults/index.js.map +1 -0
- package/dist/src/prompt-config/defaults/provider-defaults.d.ts +5 -0
- package/dist/src/prompt-config/defaults/provider-defaults.js +26 -0
- package/dist/src/prompt-config/defaults/provider-defaults.js.map +1 -0
- package/dist/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/core.md +10 -0
- package/dist/src/prompt-config/defaults/service-defaults.d.ts +5 -0
- package/dist/src/prompt-config/defaults/service-defaults.js +52 -0
- package/dist/src/prompt-config/defaults/service-defaults.js.map +1 -0
- package/dist/src/prompt-config/defaults/tool-defaults.d.ts +5 -0
- package/dist/src/prompt-config/defaults/tool-defaults.js +81 -0
- package/dist/src/prompt-config/defaults/tool-defaults.js.map +1 -0
- package/dist/src/prompt-config/defaults/tools/edit.md +2 -0
- package/dist/src/prompt-config/defaults/tools/glob.md +2 -0
- package/dist/src/prompt-config/defaults/tools/grep.md +2 -0
- package/dist/src/prompt-config/defaults/tools/ls.md +1 -0
- package/dist/src/prompt-config/defaults/tools/memory.md +1 -0
- package/dist/src/prompt-config/defaults/tools/read-file.md +4 -0
- package/dist/src/prompt-config/defaults/tools/read-many-files.md +2 -0
- package/dist/src/prompt-config/defaults/tools/shell.md +5 -0
- package/dist/src/prompt-config/defaults/tools/todo-read.md +3 -0
- package/dist/src/prompt-config/defaults/tools/todo-write.md +50 -0
- package/dist/src/prompt-config/defaults/tools/web-fetch.md +3 -0
- package/dist/src/prompt-config/defaults/tools/web-search.md +3 -0
- package/dist/src/prompt-config/defaults/tools/write-file.md +4 -0
- package/dist/src/prompt-config/index.d.ts +16 -0
- package/dist/src/prompt-config/index.js +11 -0
- package/dist/src/prompt-config/index.js.map +1 -0
- package/dist/src/prompt-config/prompt-cache.d.ts +72 -0
- package/dist/src/prompt-config/prompt-cache.js +271 -0
- package/dist/src/prompt-config/prompt-cache.js.map +1 -0
- package/dist/src/prompt-config/prompt-cache.test.d.ts +6 -0
- package/dist/src/prompt-config/prompt-cache.test.js +437 -0
- package/dist/src/prompt-config/prompt-cache.test.js.map +1 -0
- package/dist/src/prompt-config/prompt-installer.d.ts +118 -0
- package/dist/src/prompt-config/prompt-installer.js +723 -0
- package/dist/src/prompt-config/prompt-installer.js.map +1 -0
- package/dist/src/prompt-config/prompt-installer.test.d.ts +7 -0
- package/dist/src/prompt-config/prompt-installer.test.js +503 -0
- package/dist/src/prompt-config/prompt-installer.test.js.map +1 -0
- package/dist/src/prompt-config/prompt-loader.d.ts +49 -0
- package/dist/src/prompt-config/prompt-loader.js +331 -0
- package/dist/src/prompt-config/prompt-loader.js.map +1 -0
- package/dist/src/prompt-config/prompt-loader.test.d.ts +5 -0
- package/dist/src/prompt-config/prompt-loader.test.js +413 -0
- package/dist/src/prompt-config/prompt-loader.test.js.map +1 -0
- package/dist/src/prompt-config/prompt-resolver.d.ts +74 -0
- package/dist/src/prompt-config/prompt-resolver.js +600 -0
- package/dist/src/prompt-config/prompt-resolver.js.map +1 -0
- package/dist/src/prompt-config/prompt-resolver.test.d.ts +1 -0
- package/dist/src/prompt-config/prompt-resolver.test.js +529 -0
- package/dist/src/prompt-config/prompt-resolver.test.js.map +1 -0
- package/dist/src/prompt-config/prompt-service.d.ts +108 -0
- package/dist/src/prompt-config/prompt-service.js +435 -0
- package/dist/src/prompt-config/prompt-service.js.map +1 -0
- package/dist/src/prompt-config/prompt-service.test.d.ts +1 -0
- package/dist/src/prompt-config/prompt-service.test.js +811 -0
- package/dist/src/prompt-config/prompt-service.test.js.map +1 -0
- package/dist/src/prompt-config/types.d.ts +30 -0
- package/dist/src/prompt-config/types.js +10 -0
- package/dist/src/prompt-config/types.js.map +1 -0
- package/dist/src/providers/IProvider.d.ts +10 -0
- package/dist/src/providers/anthropic/AnthropicProvider.d.ts +14 -1
- package/dist/src/providers/anthropic/AnthropicProvider.js +28 -2
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
- package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.d.ts +1 -0
- package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.js +48 -0
- package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.js.map +1 -0
- package/dist/src/providers/anthropic/AnthropicProvider.test.js +2 -1
- package/dist/src/providers/anthropic/AnthropicProvider.test.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.d.ts +11 -2
- package/dist/src/providers/gemini/GeminiProvider.integration.test.js +1 -1
- package/dist/src/providers/gemini/GeminiProvider.js +34 -9
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.d.ts +11 -0
- package/dist/src/providers/openai/OpenAIProvider.js +100 -31
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.responses.test.js +27 -3
- package/dist/src/providers/openai/OpenAIProvider.responses.test.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.shouldUseResponses.test.js +2 -1
- package/dist/src/providers/openai/OpenAIProvider.shouldUseResponses.test.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.test.js +307 -7
- package/dist/src/providers/openai/OpenAIProvider.test.js.map +1 -1
- package/dist/src/providers/openai/buildResponsesRequest.js +19 -2
- package/dist/src/providers/openai/buildResponsesRequest.js.map +1 -1
- package/dist/src/providers/test-utils/providerTestConfig.d.ts +21 -0
- package/dist/src/providers/test-utils/providerTestConfig.js +23 -0
- package/dist/src/providers/test-utils/providerTestConfig.js.map +1 -0
- package/dist/src/providers/types/IProviderConfig.d.ts +6 -0
- package/dist/src/services/loopDetectionService.d.ts +9 -0
- package/dist/src/services/loopDetectionService.js +44 -12
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +1 -37
- package/dist/src/services/shellExecutionService.js +24 -55
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/{providers/IProviderConfig.js → services/shellExecutionService.multibyte.test.d.ts} +0 -1
- package/dist/src/services/shellExecutionService.multibyte.test.js +72 -0
- package/dist/src/services/shellExecutionService.multibyte.test.js.map +1 -0
- package/dist/src/services/shellExecutionService.test.js +11 -5
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.windows.multibyte.test.d.ts +6 -0
- package/dist/src/services/shellExecutionService.windows.multibyte.test.js +98 -0
- package/dist/src/services/shellExecutionService.windows.multibyte.test.js.map +1 -0
- package/dist/src/services/shellExecutionService.windows.test.d.ts +6 -0
- package/dist/src/services/shellExecutionService.windows.test.js +79 -0
- package/dist/src/services/shellExecutionService.windows.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +3 -2
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +22 -3
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +4 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +12 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/constants.d.ts +1 -1
- package/dist/src/telemetry/constants.js +1 -1
- package/dist/src/telemetry/constants.js.map +1 -1
- package/dist/src/telemetry/file-exporters.d.ts +2 -2
- package/dist/src/telemetry/file-exporters.js +47 -20
- package/dist/src/telemetry/file-exporters.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +2 -2
- package/dist/src/telemetry/loggers.js +13 -6
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.circular.js +2 -0
- package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +8 -3
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/sdk.d.ts +1 -1
- package/dist/src/telemetry/sdk.js +71 -73
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/telemetry.test.js +7 -5
- package/dist/src/telemetry/telemetry.test.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +12 -4
- package/dist/src/telemetry/types.js +18 -4
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js +3 -0
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
- package/dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
- package/dist/src/test-utils/mockWorkspaceContext.js +24 -0
- package/dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
- package/dist/src/tools/edit.js +27 -3
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +104 -1
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.js +53 -17
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +25 -2
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/grep.d.ts +1 -1
- package/dist/src/tools/grep.js +81 -29
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +72 -5
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.js +4 -3
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.d.ts +6 -0
- package/dist/src/tools/ls.test.js +356 -0
- package/dist/src/tools/ls.test.js.map +1 -0
- package/dist/src/tools/mcp-client.js +8 -3
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +34 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +17 -2
- package/dist/src/tools/memoryTool.js +130 -13
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +88 -3
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/read-file.js +8 -6
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +30 -2
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.js +22 -12
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +35 -2
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/shell.js +16 -0
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.multibyte.test.d.ts +6 -0
- package/dist/src/tools/shell.multibyte.test.js +74 -0
- package/dist/src/tools/shell.multibyte.test.js.map +1 -0
- package/dist/src/tools/shell.test.js +33 -1
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +22 -0
- package/dist/src/tools/tool-error.js +27 -0
- package/dist/src/tools/tool-error.js.map +1 -0
- package/dist/src/tools/tool-registry.test.js +8 -0
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +8 -0
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/write-file.js +5 -3
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +36 -2
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/types/modelParams.d.ts +62 -0
- package/dist/src/types/modelParams.js +7 -0
- package/dist/src/types/modelParams.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.test.js +4 -2
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
- package/dist/src/utils/editCorrector.js +2 -2
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editor.d.ts +1 -1
- package/dist/src/utils/editor.js +9 -0
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +21 -1
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/fileUtils.js +12 -1
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/fileUtils.test.js +29 -1
- package/dist/src/utils/fileUtils.test.js.map +1 -1
- package/dist/src/utils/flashFallback.integration.test.js +8 -0
- package/dist/src/utils/flashFallback.integration.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.d.ts +1 -1
- package/dist/src/utils/memoryDiscovery.js +61 -73
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +4 -3
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.d.ts +19 -12
- package/dist/src/utils/memoryImportProcessor.js +241 -82
- package/dist/src/utils/memoryImportProcessor.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.test.js +595 -50
- package/dist/src/utils/memoryImportProcessor.test.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.js +10 -25
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.test.js +6 -2
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
- package/dist/src/utils/sanitization.d.ts +20 -0
- package/dist/src/utils/sanitization.js +66 -0
- package/dist/src/utils/sanitization.js.map +1 -0
- package/dist/src/utils/sanitization.test.d.ts +6 -0
- package/dist/src/utils/sanitization.test.js +81 -0
- package/dist/src/utils/sanitization.test.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.d.ts +23 -0
- package/dist/src/utils/secure-browser-launcher.js +164 -0
- package/dist/src/utils/secure-browser-launcher.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
- package/dist/src/utils/secure-browser-launcher.test.js +149 -0
- package/dist/src/utils/secure-browser-launcher.test.js.map +1 -0
- package/dist/src/utils/summarizer.js +2 -2
- package/dist/src/utils/summarizer.js.map +1 -1
- package/dist/src/utils/unicodeUtils.d.ts +44 -0
- package/dist/src/utils/unicodeUtils.js +93 -0
- package/dist/src/utils/unicodeUtils.js.map +1 -0
- package/dist/src/utils/unicodeUtils.test.d.ts +6 -0
- package/dist/src/utils/unicodeUtils.test.js +120 -0
- package/dist/src/utils/unicodeUtils.test.js.map +1 -0
- package/dist/src/utils/workspaceContext.d.ts +47 -0
- package/dist/src/utils/workspaceContext.js +106 -0
- package/dist/src/utils/workspaceContext.js.map +1 -0
- package/dist/src/utils/workspaceContext.test.d.ts +6 -0
- package/dist/src/utils/workspaceContext.test.js +209 -0
- package/dist/src/utils/workspaceContext.test.js.map +1 -0
- package/package.json +2 -1
- package/dist/src/providers/IProviderConfig.d.ts +0 -31
- package/dist/src/providers/IProviderConfig.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# macOS Seatbelt
|
|
2
|
+
|
|
3
|
+
You are running under macos seatbelt with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to macOS Seatbelt (e.g. if a command fails with 'Operation not permitted' or similar error), as you report the error to the user, also explain why you think it could be due to macOS Seatbelt, and how the user may need to adjust their Seatbelt profile.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Outside of Sandbox
|
|
2
|
+
|
|
3
|
+
You are running outside of a sandbox container, directly on the user's system. For critical commands that are particularly likely to modify the user's system outside of the project directory or system temp directory, as you explain the command to the user (per the Explain Critical Commands rule above), also remind the user to consider enabling sandboxing.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Sandbox
|
|
2
|
+
|
|
3
|
+
You are running in a sandbox container with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to sandboxing (e.g. if a command fails with 'Operation not permitted' or similar error), when you report the error to the user, also explain why you think it could be due to sandboxing, and how the user may need to adjust their sandbox configuration.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main export for all default prompts
|
|
3
|
+
* Combines core, tool, and provider-specific defaults
|
|
4
|
+
*/
|
|
5
|
+
import { CORE_DEFAULTS } from './core-defaults.js';
|
|
6
|
+
import { TOOL_DEFAULTS } from './tool-defaults.js';
|
|
7
|
+
import { PROVIDER_DEFAULTS } from './provider-defaults.js';
|
|
8
|
+
import { SERVICE_DEFAULTS } from './service-defaults.js';
|
|
9
|
+
/**
|
|
10
|
+
* All default prompts combined into a single record
|
|
11
|
+
* Keys are relative paths from ~/.llxprt/prompts/
|
|
12
|
+
*/
|
|
13
|
+
export declare const ALL_DEFAULTS: Record<string, string>;
|
|
14
|
+
export { CORE_DEFAULTS, TOOL_DEFAULTS, PROVIDER_DEFAULTS, SERVICE_DEFAULTS };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main export for all default prompts
|
|
3
|
+
* Combines core, tool, and provider-specific defaults
|
|
4
|
+
*/
|
|
5
|
+
import { CORE_DEFAULTS } from './core-defaults.js';
|
|
6
|
+
import { TOOL_DEFAULTS } from './tool-defaults.js';
|
|
7
|
+
import { PROVIDER_DEFAULTS } from './provider-defaults.js';
|
|
8
|
+
import { SERVICE_DEFAULTS } from './service-defaults.js';
|
|
9
|
+
/**
|
|
10
|
+
* All default prompts combined into a single record
|
|
11
|
+
* Keys are relative paths from ~/.llxprt/prompts/
|
|
12
|
+
*/
|
|
13
|
+
export const ALL_DEFAULTS = {
|
|
14
|
+
...CORE_DEFAULTS,
|
|
15
|
+
...TOOL_DEFAULTS,
|
|
16
|
+
...PROVIDER_DEFAULTS,
|
|
17
|
+
...SERVICE_DEFAULTS,
|
|
18
|
+
};
|
|
19
|
+
// Export individual collections for specific use cases
|
|
20
|
+
export { CORE_DEFAULTS, TOOL_DEFAULTS, PROVIDER_DEFAULTS, SERVICE_DEFAULTS };
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,GAAG,aAAa;IAChB,GAAG,aAAa;IAChB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;CACpB,CAAC;AAEF,uDAAuD;AACvD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider and model-specific default prompts
|
|
3
|
+
* These constants contain the default content for provider/model overrides
|
|
4
|
+
*/
|
|
5
|
+
export const PROVIDER_DEFAULTS = {
|
|
6
|
+
'providers/gemini/models/gemini-1-5-flash/core.md': `IMPORTANT: You MUST use the provided tools when appropriate. For example:
|
|
7
|
+
- When asked to list files or directories, use the 'Ls' tool
|
|
8
|
+
- When asked to read file contents, use the 'ReadFile' tool
|
|
9
|
+
- When asked to search for patterns in files, use the 'Grep' tool
|
|
10
|
+
- When asked to find files by name, use the 'Glob' tool
|
|
11
|
+
- When asked to create files, use the 'WriteFile' tool
|
|
12
|
+
- When asked to modify files, use the 'Edit' tool
|
|
13
|
+
- When asked to run commands, use the 'Shell' tool
|
|
14
|
+
Do not describe what you would do - actually execute the tool calls.`,
|
|
15
|
+
'providers/gemini/models/gemini-2-5-flash/core.md': `IMPORTANT: You MUST use the provided tools when appropriate. For example:
|
|
16
|
+
- When asked to list files or directories, use the 'Ls' tool
|
|
17
|
+
- When asked to read file contents, use the 'ReadFile' tool
|
|
18
|
+
- When asked to search for patterns in files, use the 'Grep' tool
|
|
19
|
+
- When asked to find files by name, use the 'Glob' tool
|
|
20
|
+
- When asked to create files, use the 'WriteFile' tool
|
|
21
|
+
- When asked to modify files, use the 'Edit' tool
|
|
22
|
+
- When asked to run commands, use the 'Shell' tool
|
|
23
|
+
Do not describe what you would do - actually execute the tool calls.`,
|
|
24
|
+
// Future provider-specific defaults can be added here
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=provider-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/provider-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,kDAAkD,EAAE;;;;;;;;qEAQe;IACnE,kDAAkD,EAAE;;;;;;;;qEAQe;IACnE,sDAAsD;CACvD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
IMPORTANT: You MUST use the provided tools when appropriate. For example:
|
|
2
|
+
|
|
3
|
+
- When asked to list files or directories, use the '${LSTool.Name}' tool
|
|
4
|
+
- When asked to read file contents, use the '${ReadFileTool.Name}' tool
|
|
5
|
+
- When asked to search for patterns in files, use the '${GrepTool.Name}' tool
|
|
6
|
+
- When asked to find files by name, use the '${GlobTool.Name}' tool
|
|
7
|
+
- When asked to create files, use the '${WriteFileTool.Name}' tool
|
|
8
|
+
- When asked to modify files, use the '${EditTool.Name}' tool
|
|
9
|
+
- When asked to run commands, use the '${ShellTool.Name}' tool
|
|
10
|
+
Do not describe what you would do - actually execute the tool calls.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service-specific default prompts
|
|
3
|
+
* These contain prompts used by various internal services
|
|
4
|
+
*/
|
|
5
|
+
export const SERVICE_DEFAULTS = {
|
|
6
|
+
'services/loop-detection.md': `You are a sophisticated AI diagnostic agent specializing in identifying when a conversational AI is stuck in an unproductive state. Your task is to analyze the provided conversation history and determine if the assistant has ceased to make meaningful progress.
|
|
7
|
+
|
|
8
|
+
An unproductive state is characterized by one or more of the following patterns over the last 5 or more assistant turns:
|
|
9
|
+
|
|
10
|
+
Repetitive Actions: The assistant repeats the same tool calls or conversational responses a decent number of times. This includes simple loops (e.g., tool_A, tool_A, tool_A) and alternating patterns (e.g., tool_A, tool_B, tool_A, tool_B, ...).
|
|
11
|
+
|
|
12
|
+
Cognitive Loop: The assistant seems unable to determine the next logical step. It might express confusion, repeatedly ask the same questions, or generate responses that don't logically follow from the previous turns, indicating it's stuck and not advancing the task.
|
|
13
|
+
|
|
14
|
+
Crucially, differentiate between a true unproductive state and legitimate, incremental progress.
|
|
15
|
+
For example, a series of 'tool_A' or 'tool_B' tool calls that make small, distinct changes to the same file (like adding docstrings to functions one by one) is considered forward progress and is NOT a loop. A loop would be repeatedly replacing the same text with the same content, or cycling between a small set of files with no net change.
|
|
16
|
+
|
|
17
|
+
Please analyze the conversation history to determine the possibility that the conversation is stuck in a repetitive, non-productive state.`,
|
|
18
|
+
'commands/init-command.md': `You are an AI agent that brings the power of multiple LLM providers directly into the terminal. Your task is to analyze the current directory and generate a comprehensive LLXPRT.md file to be used as instructional context for future interactions.
|
|
19
|
+
|
|
20
|
+
**Analysis Process:**
|
|
21
|
+
|
|
22
|
+
1. **Initial Exploration:**
|
|
23
|
+
* Start by listing the files and directories to get a high-level overview of the structure.
|
|
24
|
+
* Read the README file (e.g., \`README.md\`, \`README.txt\`) if it exists. This is often the best place to start.
|
|
25
|
+
|
|
26
|
+
2. **Iterative Deep Dive (up to 10 files):**
|
|
27
|
+
* Based on your initial findings, select a few files that seem most important (e.g., configuration files, main source files, documentation).
|
|
28
|
+
* Read them. As you learn more, refine your understanding and decide which files to read next. You don't need to decide all 10 files at once. Let your discoveries guide your exploration.
|
|
29
|
+
|
|
30
|
+
3. **Identify Project Type:**
|
|
31
|
+
* **Code Project:** Look for clues like \`package.json\`, \`requirements.txt\`, \`pom.xml\`, \`go.mod\`, \`Cargo.toml\`, \`build.gradle\`, or a \`src\` directory. If you find them, this is likely a software project.
|
|
32
|
+
* **Non-Code Project:** If you don't find code-related files, this might be a directory for documentation, research papers, notes, or something else.
|
|
33
|
+
|
|
34
|
+
**LLXPRT.md Content Generation:**
|
|
35
|
+
|
|
36
|
+
**For a Code Project:**
|
|
37
|
+
|
|
38
|
+
* **Project Overview:** Write a clear and concise summary of the project's purpose, main technologies, and architecture.
|
|
39
|
+
* **Building and Running:** Document the key commands for building, running, and testing the project. Infer these from the files you've read (e.g., \`scripts\` in \`package.json\`, \`Makefile\`, etc.). If you can't find explicit commands, provide a placeholder with a TODO.
|
|
40
|
+
* **Development Conventions:** Describe any coding styles, testing practices, or contribution guidelines you can infer from the codebase.
|
|
41
|
+
|
|
42
|
+
**For a Non-Code Project:**
|
|
43
|
+
|
|
44
|
+
* **Directory Overview:** Describe the purpose and contents of the directory. What is it for? What kind of information does it hold?
|
|
45
|
+
* **Key Files:** List the most important files and briefly explain what they contain.
|
|
46
|
+
* **Usage:** Explain how the contents of this directory are intended to be used.
|
|
47
|
+
|
|
48
|
+
**Final Output:**
|
|
49
|
+
|
|
50
|
+
Write the complete content to the \`LLXPRT.md\` file. The output must be well-formatted Markdown.`,
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=service-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/service-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,4BAA4B,EAAE;;;;;;;;;;;2IAW2G;IAEzI,0BAA0B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kGAgCoE;CACjG,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-specific default prompts
|
|
3
|
+
* These constants contain the default content for tool-related prompts
|
|
4
|
+
*/
|
|
5
|
+
export const TOOL_DEFAULTS = {
|
|
6
|
+
'tools/shell.md': `- Use the '\${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
7
|
+
- **Explain Critical Commands:** Before executing commands with '\${ShellTool.Name}' that modify the file system, codebase, or system state, you *must* provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. You should not ask permission to use the tool; the user will be presented with a confirmation dialogue upon use (you do not need to tell them this).
|
|
8
|
+
- **Command Execution:** Use the '\${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
9
|
+
- **Background Processes:** Use background processes (via \\\`&\\\`) for commands that are unlikely to stop on their own, e.g. \\\`node server.js &\\\`. If unsure, ask the user.
|
|
10
|
+
- **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \\\`git rebase -i\\\`). Use non-interactive versions of commands (e.g. \\\`npm init -y\\\` instead of \\\`npm init\\\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.`,
|
|
11
|
+
'tools/read-file.md': `- **File Paths:** Always use absolute paths when referring to files with tools like '\${ReadFileTool.Name}' or '\${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
|
12
|
+
- **Path Construction:** Before using any file system tool (e.g., \${ReadFileTool.Name}' or '\${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
13
|
+
- Use '\${ReadFileTool.Name}' and '\${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
|
|
14
|
+
- Never make assumptions about the contents of files; instead use '\${ReadFileTool.Name}' or '\${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.`,
|
|
15
|
+
'tools/edit.md': `- Use the available tools (e.g., '\${EditTool.Name}', '\${WriteFileTool.Name}' '\${ShellTool.Name}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
|
|
16
|
+
- When asked to modify files, use the '\${EditTool.Name}' tool`,
|
|
17
|
+
'tools/write-file.md': `- **File Paths:** Always use absolute paths when referring to files with tools like '\${ReadFileTool.Name}' or '\${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
|
18
|
+
- **Path Construction:** Before using any file system tool (e.g., \${ReadFileTool.Name}' or '\${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
19
|
+
- Some tools you may especially find useful are '\${WriteFileTool.Name}', '\${EditTool.Name}' and '\${ShellTool.Name}'.
|
|
20
|
+
- When asked to create files, use the '\${WriteFileTool.Name}' tool`,
|
|
21
|
+
'tools/grep.md': `- Use '\${GrepTool.Name}' and '\${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
|
|
22
|
+
- When asked to search for patterns in files, use the '\${GrepTool.Name}' tool`,
|
|
23
|
+
'tools/glob.md': `- Use '\${GrepTool.Name}' and '\${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
|
|
24
|
+
- When asked to find files by name, use the '\${GlobTool.Name}' tool`,
|
|
25
|
+
'tools/ls.md': `- When asked to list files or directories, use the '\${LSTool.Name}' tool`,
|
|
26
|
+
'tools/memory.md': `- **Remembering Facts:** Use the '\${MemoryTool.Name}' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"`,
|
|
27
|
+
'tools/read-many-files.md': `- Use '\${ReadFileTool.Name}' and '\${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
|
|
28
|
+
- Never make assumptions about the contents of files; instead use '\${ReadFileTool.Name}' or '\${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.`,
|
|
29
|
+
'tools/todo-read.md': `# Task Management
|
|
30
|
+
You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.`,
|
|
31
|
+
'tools/todo-write.md': `# Task Management
|
|
32
|
+
You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
|
33
|
+
|
|
34
|
+
## When to Use This Tool
|
|
35
|
+
Use this tool proactively in these scenarios:
|
|
36
|
+
|
|
37
|
+
1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
|
|
38
|
+
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
|
|
39
|
+
3. User explicitly requests todo list - When the user directly asks you to use the todo list
|
|
40
|
+
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
|
41
|
+
5. After receiving new instructions - Immediately capture user requirements as todos
|
|
42
|
+
6. When you start working on a task - Mark it as in_progress BEFORE beginning work
|
|
43
|
+
7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
|
|
44
|
+
|
|
45
|
+
## When NOT to Use This Tool
|
|
46
|
+
Skip using this tool when:
|
|
47
|
+
1. There is only a single, straightforward task
|
|
48
|
+
2. The task is trivial and tracking it provides no organizational benefit
|
|
49
|
+
3. The task can be completed in less than 3 trivial steps
|
|
50
|
+
4. The task is purely conversational or informational
|
|
51
|
+
|
|
52
|
+
## Task States and Management
|
|
53
|
+
1. **Task States**: Use these states to track progress:
|
|
54
|
+
- pending: Task not yet started
|
|
55
|
+
- in_progress: Currently working on (limit to ONE task at a time)
|
|
56
|
+
- completed: Task finished successfully
|
|
57
|
+
|
|
58
|
+
2. **Task Management**:
|
|
59
|
+
- Update task status in real-time as you work
|
|
60
|
+
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
|
|
61
|
+
- Only have ONE task in_progress at any time
|
|
62
|
+
- Complete current tasks before starting new ones
|
|
63
|
+
- Remove tasks that are no longer relevant from the list entirely
|
|
64
|
+
|
|
65
|
+
3. **Task Completion Requirements**:
|
|
66
|
+
- ONLY mark a task as completed when you have FULLY accomplished it
|
|
67
|
+
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
|
|
68
|
+
- When blocked, create a new task describing what needs to be resolved
|
|
69
|
+
- Never mark a task as completed if:
|
|
70
|
+
- Tests are failing
|
|
71
|
+
- Implementation is partial
|
|
72
|
+
- You encountered unresolved errors
|
|
73
|
+
- You couldn't find necessary files or dependencies
|
|
74
|
+
|
|
75
|
+
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.`,
|
|
76
|
+
'tools/web-fetch.md': `# Web Fetch Tool
|
|
77
|
+
Use this tool to fetch content from URLs when needed.`,
|
|
78
|
+
'tools/web-search.md': `# Web Search Tool
|
|
79
|
+
Use this tool to search the web when needed.`,
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=tool-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/tool-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,gBAAgB,EAAE;;;;kXAI8V;IAEhX,oBAAoB,EAAE;;;yKAGiJ;IAEvK,eAAe,EAAE;+DAC4C;IAE7D,qBAAqB,EAAE;;;oEAG2C;IAElE,eAAe,EAAE;+EAC4D;IAE7E,eAAe,EAAE;qEACkD;IAEnE,aAAa,EAAE,2EAA2E;IAE1F,iBAAiB,EAAE,6lBAA6lB;IAEhnB,0BAA0B,EAAE;yKAC2I;IAEvK,oBAAoB,EAAE;qNAC6L;IAEnN,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sJA4C6H;IAEpJ,oBAAoB,EAAE;sDAC8B;IAEpD,qBAAqB,EAAE;6CACoB;CAC5C,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
- Use the available tools (e.g., '${EditTool.Name}', '${WriteFileTool.Name}' '${ShellTool.Name}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
|
|
2
|
+
- When asked to modify files, use the '${EditTool.Name}' tool
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- When asked to list files or directories, use the '${LSTool.Name}' tool
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- **Remembering Facts:** Use the '${MemoryTool.Name}' tool to remember specific, _user-related_ facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline _your future interactions with them_ (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do _not_ use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- **File Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
|
2
|
+
- **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
3
|
+
- Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
|
|
4
|
+
- Never make assumptions about the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
- Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
|
|
2
|
+
- Never make assumptions about the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
- Use the '${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
2
|
+
- **Explain Critical Commands:** Before executing commands with '${ShellTool.Name}' that modify the file system, codebase, or system state, you _must_ provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. You should not ask permission to use the tool; the user will be presented with a confirmation dialogue upon use (you do not need to tell them this).
|
|
3
|
+
- **Command Execution:** Use the '${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
4
|
+
- **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
|
|
5
|
+
- **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \`git rebase -i\`). Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Task Management
|
|
2
|
+
|
|
3
|
+
You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
|
4
|
+
|
|
5
|
+
## When to Use This Tool
|
|
6
|
+
|
|
7
|
+
Use this tool proactively in these scenarios:
|
|
8
|
+
|
|
9
|
+
1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
|
|
10
|
+
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
|
|
11
|
+
3. User explicitly requests todo list - When the user directly asks you to use the todo list
|
|
12
|
+
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
|
13
|
+
5. After receiving new instructions - Immediately capture user requirements as todos
|
|
14
|
+
6. When you start working on a task - Mark it as in_progress BEFORE beginning work
|
|
15
|
+
7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
|
|
16
|
+
|
|
17
|
+
## When NOT to Use This Tool
|
|
18
|
+
|
|
19
|
+
Skip using this tool when:
|
|
20
|
+
|
|
21
|
+
1. There is only a single, straightforward task
|
|
22
|
+
2. The task is trivial and tracking it provides no organizational benefit
|
|
23
|
+
3. The task can be completed in less than 3 trivial steps
|
|
24
|
+
4. The task is purely conversational or informational
|
|
25
|
+
|
|
26
|
+
## Task States and Management
|
|
27
|
+
|
|
28
|
+
1. **Task States**: Use these states to track progress:
|
|
29
|
+
- pending: Task not yet started
|
|
30
|
+
- in_progress: Currently working on (limit to ONE task at a time)
|
|
31
|
+
- completed: Task finished successfully
|
|
32
|
+
|
|
33
|
+
2. **Task Management**:
|
|
34
|
+
- Update task status in real-time as you work
|
|
35
|
+
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
|
|
36
|
+
- Only have ONE task in_progress at any time
|
|
37
|
+
- Complete current tasks before starting new ones
|
|
38
|
+
- Remove tasks that are no longer relevant from the list entirely
|
|
39
|
+
|
|
40
|
+
3. **Task Completion Requirements**:
|
|
41
|
+
- ONLY mark a task as completed when you have FULLY accomplished it
|
|
42
|
+
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
|
|
43
|
+
- When blocked, create a new task describing what needs to be resolved
|
|
44
|
+
- Never mark a task as completed if:
|
|
45
|
+
- Tests are failing
|
|
46
|
+
- Implementation is partial
|
|
47
|
+
- You encountered unresolved errors
|
|
48
|
+
- You couldn't find necessary files or dependencies
|
|
49
|
+
|
|
50
|
+
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- **File Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
|
|
2
|
+
- **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
3
|
+
- Some tools you may especially find useful are '${WriteFileTool.Name}', '${EditTool.Name}' and '${ShellTool.Name}'.
|
|
4
|
+
- When asked to create files, use the '${WriteFileTool.Name}' tool
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main exports for the prompt-config module
|
|
3
|
+
*/
|
|
4
|
+
export { TemplateEngine } from './TemplateEngine.js';
|
|
5
|
+
export { PromptLoader } from './prompt-loader.js';
|
|
6
|
+
export { PromptCache } from './prompt-cache.js';
|
|
7
|
+
export { PromptResolver } from './prompt-resolver.js';
|
|
8
|
+
export { PromptInstaller } from './prompt-installer.js';
|
|
9
|
+
export { PromptService } from './prompt-service.js';
|
|
10
|
+
export type { TemplateVariables, TemplateProcessingOptions, PromptContext, PromptEnvironment, } from './types.js';
|
|
11
|
+
export type { LoadFileResult, EnvironmentInfo, FileWatcher, FileChangeCallback, } from './prompt-loader.js';
|
|
12
|
+
export type { CacheEntry, CacheStats } from './prompt-cache.js';
|
|
13
|
+
export type { ResolveFileResult, ResolvedFile, AvailableFile, ValidationResult, } from './prompt-resolver.js';
|
|
14
|
+
export type { InstallOptions, InstallResult, UninstallOptions, UninstallResult, ValidationResult as InstallerValidationResult, RepairOptions, RepairResult, BackupResult, DefaultsMap, } from './prompt-installer.js';
|
|
15
|
+
export { DEFAULT_BASE_DIR, REQUIRED_DIRECTORIES } from './prompt-installer.js';
|
|
16
|
+
export type { PromptServiceConfig, ValidationResult as PromptServiceValidationResult, } from './prompt-service.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main exports for the prompt-config module
|
|
3
|
+
*/
|
|
4
|
+
export { TemplateEngine } from './TemplateEngine.js';
|
|
5
|
+
export { PromptLoader } from './prompt-loader.js';
|
|
6
|
+
export { PromptCache } from './prompt-cache.js';
|
|
7
|
+
export { PromptResolver } from './prompt-resolver.js';
|
|
8
|
+
export { PromptInstaller } from './prompt-installer.js';
|
|
9
|
+
export { PromptService } from './prompt-service.js';
|
|
10
|
+
export { DEFAULT_BASE_DIR, REQUIRED_DIRECTORIES } from './prompt-installer.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompt-config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA+BpD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { PromptContext } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a cached prompt entry with metadata
|
|
4
|
+
*/
|
|
5
|
+
export interface CacheEntry {
|
|
6
|
+
assembledPrompt: string;
|
|
7
|
+
metadata: {
|
|
8
|
+
files: string[];
|
|
9
|
+
tokenCount?: number;
|
|
10
|
+
assemblyTimeMs: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Statistics about cache usage
|
|
15
|
+
*/
|
|
16
|
+
export interface CacheStats {
|
|
17
|
+
entryCount: number;
|
|
18
|
+
totalSizeMB: number;
|
|
19
|
+
maxSizeMB: number;
|
|
20
|
+
utilizationPercent: number;
|
|
21
|
+
averageEntrySizeKB: number;
|
|
22
|
+
totalAccesses: number;
|
|
23
|
+
mostAccessedKey: string | null;
|
|
24
|
+
mostAccessedCount: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* In-memory prompt cache with LRU eviction
|
|
28
|
+
*/
|
|
29
|
+
export declare class PromptCache {
|
|
30
|
+
private cache;
|
|
31
|
+
private totalSize;
|
|
32
|
+
private maxSize;
|
|
33
|
+
private accessOrder;
|
|
34
|
+
private requestedSizeMB;
|
|
35
|
+
constructor(maxSizeMB?: number);
|
|
36
|
+
/**
|
|
37
|
+
* Generate a unique cache key from context
|
|
38
|
+
*/
|
|
39
|
+
generateKey(context: PromptContext | null | undefined): string;
|
|
40
|
+
/**
|
|
41
|
+
* Store a prompt in the cache
|
|
42
|
+
*/
|
|
43
|
+
set(context: PromptContext, prompt: string, metadata: CacheEntry['metadata']): void;
|
|
44
|
+
/**
|
|
45
|
+
* Retrieve a cached prompt
|
|
46
|
+
*/
|
|
47
|
+
get(context: PromptContext): CacheEntry | null;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a prompt exists in cache
|
|
50
|
+
*/
|
|
51
|
+
has(context: PromptContext | null | undefined): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Clear all cached entries
|
|
54
|
+
*/
|
|
55
|
+
clear(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get the number of cached entries
|
|
58
|
+
*/
|
|
59
|
+
size(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Remove a specific entry from cache
|
|
62
|
+
*/
|
|
63
|
+
remove(key: string | null | undefined): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Get cache statistics
|
|
66
|
+
*/
|
|
67
|
+
getStats(): CacheStats;
|
|
68
|
+
/**
|
|
69
|
+
* Preload cache with multiple contexts
|
|
70
|
+
*/
|
|
71
|
+
preload(contexts: PromptContext[] | null | undefined): number;
|
|
72
|
+
}
|