@vybestack/llxprt-code-core 0.1.15 → 0.1.16-hotfix1
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 +36 -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/mcp/oauth-utils.js +12 -4
- package/dist/src/mcp/oauth-utils.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.stateful.integration.test.js +1 -1
- package/dist/src/providers/openai/OpenAIProvider.stateful.integration.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 +32 -11
- 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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from 'fs/promises';
|
|
7
7
|
import * as path from 'path';
|
|
8
|
+
import { marked } from 'marked';
|
|
8
9
|
// Simple console logger for import processing
|
|
9
10
|
const logger = {
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14,119 +15,275 @@ const logger = {
|
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
16
|
error: (...args) => console.error('[ERROR] [ImportProcessor]', ...args),
|
|
16
17
|
};
|
|
18
|
+
// Helper to find the project root (looks for .git directory)
|
|
19
|
+
async function findProjectRoot(startDir) {
|
|
20
|
+
let currentDir = path.resolve(startDir);
|
|
21
|
+
while (true) {
|
|
22
|
+
const gitPath = path.join(currentDir, '.git');
|
|
23
|
+
try {
|
|
24
|
+
const stats = await fs.lstat(gitPath);
|
|
25
|
+
if (stats.isDirectory()) {
|
|
26
|
+
return currentDir;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// .git not found, continue to parent
|
|
31
|
+
}
|
|
32
|
+
const parentDir = path.dirname(currentDir);
|
|
33
|
+
if (parentDir === currentDir) {
|
|
34
|
+
// Reached filesystem root
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
currentDir = parentDir;
|
|
38
|
+
}
|
|
39
|
+
// Fallback to startDir if .git not found
|
|
40
|
+
return path.resolve(startDir);
|
|
41
|
+
}
|
|
42
|
+
// Add a type guard for error objects
|
|
43
|
+
function hasMessage(err) {
|
|
44
|
+
return (typeof err === 'object' &&
|
|
45
|
+
err !== null &&
|
|
46
|
+
'message' in err &&
|
|
47
|
+
typeof err.message === 'string');
|
|
48
|
+
}
|
|
49
|
+
// Helper to find all code block and inline code regions using marked
|
|
50
|
+
/**
|
|
51
|
+
* Finds all import statements in content without using regex
|
|
52
|
+
* @returns Array of {start, _end, path} objects for each import found
|
|
53
|
+
*/
|
|
54
|
+
function findImports(content) {
|
|
55
|
+
const imports = [];
|
|
56
|
+
let i = 0;
|
|
57
|
+
const len = content.length;
|
|
58
|
+
while (i < len) {
|
|
59
|
+
// Find next @ symbol
|
|
60
|
+
i = content.indexOf('@', i);
|
|
61
|
+
if (i === -1)
|
|
62
|
+
break;
|
|
63
|
+
// Check if it's a word boundary (not part of another word)
|
|
64
|
+
if (i > 0 && !isWhitespace(content[i - 1])) {
|
|
65
|
+
i++;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
// Find the end of the import path (whitespace or newline)
|
|
69
|
+
let j = i + 1;
|
|
70
|
+
while (j < len &&
|
|
71
|
+
!isWhitespace(content[j]) &&
|
|
72
|
+
content[j] !== '\n' &&
|
|
73
|
+
content[j] !== '\r') {
|
|
74
|
+
j++;
|
|
75
|
+
}
|
|
76
|
+
// Extract the path (everything after @)
|
|
77
|
+
const importPath = content.slice(i + 1, j);
|
|
78
|
+
// Basic validation (starts with ./ or / or letter)
|
|
79
|
+
if (importPath.length > 0 &&
|
|
80
|
+
(importPath[0] === '.' ||
|
|
81
|
+
importPath[0] === '/' ||
|
|
82
|
+
isLetter(importPath[0]))) {
|
|
83
|
+
imports.push({
|
|
84
|
+
start: i,
|
|
85
|
+
_end: j,
|
|
86
|
+
path: importPath,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
i = j + 1;
|
|
90
|
+
}
|
|
91
|
+
return imports;
|
|
92
|
+
}
|
|
93
|
+
function isWhitespace(char) {
|
|
94
|
+
return char === ' ' || char === '\t' || char === '\n' || char === '\r';
|
|
95
|
+
}
|
|
96
|
+
function isLetter(char) {
|
|
97
|
+
const code = char.charCodeAt(0);
|
|
98
|
+
return ((code >= 65 && code <= 90) || // A-Z
|
|
99
|
+
(code >= 97 && code <= 122)); // a-z
|
|
100
|
+
}
|
|
101
|
+
function findCodeRegions(content) {
|
|
102
|
+
const regions = [];
|
|
103
|
+
const tokens = marked.lexer(content);
|
|
104
|
+
// Map from raw content to a queue of its start indices in the original content.
|
|
105
|
+
const rawContentIndices = new Map();
|
|
106
|
+
function walk(token) {
|
|
107
|
+
if (token.type === 'code' || token.type === 'codespan') {
|
|
108
|
+
if (!rawContentIndices.has(token.raw)) {
|
|
109
|
+
const indices = [];
|
|
110
|
+
let lastIndex = -1;
|
|
111
|
+
while ((lastIndex = content.indexOf(token.raw, lastIndex + 1)) !== -1) {
|
|
112
|
+
indices.push(lastIndex);
|
|
113
|
+
}
|
|
114
|
+
rawContentIndices.set(token.raw, indices);
|
|
115
|
+
}
|
|
116
|
+
const indices = rawContentIndices.get(token.raw);
|
|
117
|
+
if (indices && indices.length > 0) {
|
|
118
|
+
// Assume tokens are processed in order of appearance.
|
|
119
|
+
// Dequeue the next available index for this raw content.
|
|
120
|
+
const idx = indices.shift();
|
|
121
|
+
regions.push([idx, idx + token.raw.length]);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if ('tokens' in token && token.tokens) {
|
|
125
|
+
for (const child of token.tokens) {
|
|
126
|
+
walk(child);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for (const token of tokens) {
|
|
131
|
+
walk(token);
|
|
132
|
+
}
|
|
133
|
+
return regions;
|
|
134
|
+
}
|
|
17
135
|
/**
|
|
18
136
|
* Processes import statements in LLXPRT.md content
|
|
19
|
-
* Supports @path/to/file
|
|
20
|
-
*
|
|
137
|
+
* Supports @path/to/file syntax for importing content from other files
|
|
21
138
|
* @param content - The content to process for imports
|
|
22
139
|
* @param basePath - The directory path where the current file is located
|
|
23
140
|
* @param debugMode - Whether to enable debug logging
|
|
24
141
|
* @param importState - State tracking for circular import prevention
|
|
25
|
-
* @
|
|
142
|
+
* @param projectRoot - The project root directory for allowed directories
|
|
143
|
+
* @param importFormat - The format of the import tree
|
|
144
|
+
* @returns Processed content with imports resolved and import tree
|
|
26
145
|
*/
|
|
27
146
|
export async function processImports(content, basePath, debugMode = false, importState = {
|
|
28
147
|
processedFiles: new Set(),
|
|
29
|
-
maxDepth:
|
|
148
|
+
maxDepth: 5,
|
|
30
149
|
currentDepth: 0,
|
|
31
|
-
}) {
|
|
150
|
+
}, projectRoot, importFormat = 'tree') {
|
|
151
|
+
if (!projectRoot) {
|
|
152
|
+
projectRoot = await findProjectRoot(basePath);
|
|
153
|
+
}
|
|
32
154
|
if (importState.currentDepth >= importState.maxDepth) {
|
|
33
155
|
if (debugMode) {
|
|
34
156
|
logger.warn(`Maximum import depth (${importState.maxDepth}) reached. Stopping import processing.`);
|
|
35
157
|
}
|
|
36
|
-
return
|
|
158
|
+
return {
|
|
159
|
+
content,
|
|
160
|
+
importTree: { path: importState.currentFile || 'unknown' },
|
|
161
|
+
};
|
|
37
162
|
}
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
163
|
+
// --- FLAT FORMAT LOGIC ---
|
|
164
|
+
if (importFormat === 'flat') {
|
|
165
|
+
// Use a queue to process files in order of first encounter, and a set to avoid duplicates
|
|
166
|
+
const flatFiles = [];
|
|
167
|
+
// Track processed files across the entire operation
|
|
168
|
+
const processedFiles = new Set();
|
|
169
|
+
// Helper to recursively process imports
|
|
170
|
+
async function processFlat(fileContent, fileBasePath, filePath, depth) {
|
|
171
|
+
// Normalize the file path to ensure consistent comparison
|
|
172
|
+
const normalizedPath = path.normalize(filePath);
|
|
173
|
+
// Skip if already processed
|
|
174
|
+
if (processedFiles.has(normalizedPath))
|
|
175
|
+
return;
|
|
176
|
+
// Mark as processed before processing to prevent infinite recursion
|
|
177
|
+
processedFiles.add(normalizedPath);
|
|
178
|
+
// Add this file to the flat list
|
|
179
|
+
flatFiles.push({ path: normalizedPath, content: fileContent });
|
|
180
|
+
// Find imports in this file
|
|
181
|
+
const codeRegions = findCodeRegions(fileContent);
|
|
182
|
+
const imports = findImports(fileContent);
|
|
183
|
+
// Process imports in reverse order to handle indices correctly
|
|
184
|
+
for (let i = imports.length - 1; i >= 0; i--) {
|
|
185
|
+
const { start, _end, path: importPath } = imports[i];
|
|
186
|
+
// Skip if inside a code region
|
|
187
|
+
if (codeRegions.some(([regionStart, regionEnd]) => start >= regionStart && start < regionEnd)) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
// Validate import path
|
|
191
|
+
if (!validateImportPath(importPath, fileBasePath, [projectRoot || ''])) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const fullPath = path.resolve(fileBasePath, importPath);
|
|
195
|
+
const normalizedFullPath = path.normalize(fullPath);
|
|
196
|
+
// Skip if already processed
|
|
197
|
+
if (processedFiles.has(normalizedFullPath))
|
|
198
|
+
continue;
|
|
199
|
+
try {
|
|
200
|
+
await fs.access(fullPath);
|
|
201
|
+
const importedContent = await fs.readFile(fullPath, 'utf-8');
|
|
202
|
+
// Process the imported file
|
|
203
|
+
await processFlat(importedContent, path.dirname(fullPath), normalizedFullPath, depth + 1);
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
if (debugMode) {
|
|
207
|
+
logger.warn(`Failed to import ${fullPath}: ${hasMessage(error) ? error.message : 'Unknown error'}`);
|
|
208
|
+
}
|
|
209
|
+
// Continue with other imports even if one fails
|
|
210
|
+
}
|
|
211
|
+
}
|
|
50
212
|
}
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
213
|
+
// Start with the root file (current file)
|
|
214
|
+
const rootPath = path.normalize(importState.currentFile || path.resolve(basePath));
|
|
215
|
+
await processFlat(content, basePath, rootPath, 0);
|
|
216
|
+
// Concatenate all unique files in order, Claude-style
|
|
217
|
+
const flatContent = flatFiles
|
|
218
|
+
.map((f) => `--- File: ${f.path} ---\n${f.content.trim()}\n--- End of File: ${f.path} ---`)
|
|
219
|
+
.join('\n\n');
|
|
220
|
+
return {
|
|
221
|
+
content: flatContent,
|
|
222
|
+
importTree: { path: rootPath }, // Tree not meaningful in flat mode
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
// --- TREE FORMAT LOGIC (existing) ---
|
|
226
|
+
const codeRegions = findCodeRegions(content);
|
|
227
|
+
let result = '';
|
|
228
|
+
let lastIndex = 0;
|
|
229
|
+
const imports = [];
|
|
230
|
+
const importsList = findImports(content);
|
|
231
|
+
for (const { start, _end, path: importPath } of importsList) {
|
|
232
|
+
// Add content before this import
|
|
233
|
+
result += content.substring(lastIndex, start);
|
|
234
|
+
lastIndex = _end;
|
|
235
|
+
// Skip if inside a code region
|
|
236
|
+
if (codeRegions.some(([s, e]) => start >= s && start < e)) {
|
|
237
|
+
result += `@${importPath}`;
|
|
56
238
|
continue;
|
|
57
239
|
}
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
// Check for circular imports - if we're already processing this file
|
|
63
|
-
if (importState.currentFile === fullPath) {
|
|
64
|
-
if (debugMode) {
|
|
65
|
-
logger.warn(`Circular import detected: ${importPath}`);
|
|
66
|
-
}
|
|
67
|
-
// Replace the import with a warning comment
|
|
68
|
-
processedContent = processedContent.replace(match[0], `<!-- Circular import detected: ${importPath} -->`);
|
|
240
|
+
// Validate import path to prevent path traversal attacks
|
|
241
|
+
if (!validateImportPath(importPath, basePath, [projectRoot || ''])) {
|
|
242
|
+
result += `<!-- Import failed: ${importPath} - Path traversal attempt -->`;
|
|
69
243
|
continue;
|
|
70
244
|
}
|
|
71
|
-
|
|
245
|
+
const fullPath = path.resolve(basePath, importPath);
|
|
72
246
|
if (importState.processedFiles.has(fullPath)) {
|
|
73
|
-
|
|
74
|
-
logger.warn(`File already processed in this chain: ${importPath}`);
|
|
75
|
-
}
|
|
76
|
-
// Replace the import with a warning comment
|
|
77
|
-
processedContent = processedContent.replace(match[0], `<!-- File already processed: ${importPath} -->`);
|
|
247
|
+
result += `<!-- File already processed: ${importPath} -->`;
|
|
78
248
|
continue;
|
|
79
249
|
}
|
|
80
|
-
// Check for potential circular imports by looking at the import chain
|
|
81
|
-
if (importState.currentFile) {
|
|
82
|
-
const currentFileDir = path.dirname(importState.currentFile);
|
|
83
|
-
const potentialCircularPath = path.resolve(currentFileDir, importPath);
|
|
84
|
-
if (potentialCircularPath === importState.currentFile) {
|
|
85
|
-
if (debugMode) {
|
|
86
|
-
logger.warn(`Circular import detected: ${importPath}`);
|
|
87
|
-
}
|
|
88
|
-
// Replace the import with a warning comment
|
|
89
|
-
processedContent = processedContent.replace(match[0], `<!-- Circular import detected: ${importPath} -->`);
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
250
|
try {
|
|
94
|
-
// Check if the file exists
|
|
95
251
|
await fs.access(fullPath);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
logger.debug(`Successfully read imported file: ${fullPath}`);
|
|
100
|
-
}
|
|
101
|
-
// Recursively process imports in the imported content
|
|
102
|
-
const processedImportedContent = await processImports(importedContent, path.dirname(fullPath), debugMode, {
|
|
252
|
+
const fileContent = await fs.readFile(fullPath, 'utf-8');
|
|
253
|
+
// Mark this file as processed for this import chain
|
|
254
|
+
const newImportState = {
|
|
103
255
|
...importState,
|
|
104
|
-
processedFiles: new Set(
|
|
256
|
+
processedFiles: new Set(importState.processedFiles),
|
|
105
257
|
currentDepth: importState.currentDepth + 1,
|
|
106
|
-
currentFile: fullPath,
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
258
|
+
currentFile: fullPath,
|
|
259
|
+
};
|
|
260
|
+
newImportState.processedFiles.add(fullPath);
|
|
261
|
+
const imported = await processImports(fileContent, path.dirname(fullPath), debugMode, newImportState, projectRoot, importFormat);
|
|
262
|
+
result += `<!-- Imported from: ${importPath} -->\n${imported.content}\n<!-- End of import from: ${importPath} -->`;
|
|
263
|
+
imports.push(imported.importTree);
|
|
110
264
|
}
|
|
111
|
-
catch (
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
|
|
265
|
+
catch (err) {
|
|
266
|
+
let message = 'Unknown error';
|
|
267
|
+
if (hasMessage(err)) {
|
|
268
|
+
message = err.message;
|
|
115
269
|
}
|
|
116
|
-
|
|
117
|
-
|
|
270
|
+
else if (typeof err === 'string') {
|
|
271
|
+
message = err;
|
|
272
|
+
}
|
|
273
|
+
logger.error(`Failed to import ${importPath}: ${message}`);
|
|
274
|
+
result += `<!-- Import failed: ${importPath} - ${message} -->`;
|
|
118
275
|
}
|
|
119
276
|
}
|
|
120
|
-
|
|
277
|
+
// Add any remaining content after the last match
|
|
278
|
+
result += content.substring(lastIndex);
|
|
279
|
+
return {
|
|
280
|
+
content: result,
|
|
281
|
+
importTree: {
|
|
282
|
+
path: importState.currentFile || 'unknown',
|
|
283
|
+
imports: imports.length > 0 ? imports : undefined,
|
|
284
|
+
},
|
|
285
|
+
};
|
|
121
286
|
}
|
|
122
|
-
/**
|
|
123
|
-
* Validates import paths to ensure they are safe and within allowed directories
|
|
124
|
-
*
|
|
125
|
-
* @param importPath - The import path to validate
|
|
126
|
-
* @param basePath - The base directory for resolving relative paths
|
|
127
|
-
* @param allowedDirectories - Array of allowed directory paths
|
|
128
|
-
* @returns Whether the import path is valid
|
|
129
|
-
*/
|
|
130
287
|
export function validateImportPath(importPath, basePath, allowedDirectories) {
|
|
131
288
|
// Reject URLs
|
|
132
289
|
if (/^(file|https?):\/\//.test(importPath)) {
|
|
@@ -135,7 +292,9 @@ export function validateImportPath(importPath, basePath, allowedDirectories) {
|
|
|
135
292
|
const resolvedPath = path.resolve(basePath, importPath);
|
|
136
293
|
return allowedDirectories.some((allowedDir) => {
|
|
137
294
|
const normalizedAllowedDir = path.resolve(allowedDir);
|
|
138
|
-
|
|
295
|
+
const isSamePath = resolvedPath === normalizedAllowedDir;
|
|
296
|
+
const isSubPath = resolvedPath.startsWith(normalizedAllowedDir + path.sep);
|
|
297
|
+
return isSamePath || isSubPath;
|
|
139
298
|
});
|
|
140
299
|
}
|
|
141
300
|
//# sourceMappingURL=memoryImportProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryImportProcessor.js","sourceRoot":"","sources":["../../../src/utils/memoryImportProcessor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"memoryImportProcessor.js","sourceRoot":"","sources":["../../../src/utils/memoryImportProcessor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,MAAM,GAAG;IACb,8DAA8D;IAC9D,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CACxB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,IAAI,CAAC;IACrD,8DAA8D;IAC9D,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,IAAI,CAAC;IAC3E,8DAA8D;IAC9D,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CACxB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,IAAI,CAAC;CACtD,CAAC;AA4BF,6DAA6D;AAC7D,KAAK,UAAU,eAAe,CAAC,QAAgB;IAC7C,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO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