codereview-aia 0.1.0 → 0.1.2
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/dist/analysis/FindingsExtractor.d.ts +105 -0
- package/dist/analysis/FindingsExtractor.js +363 -0
- package/dist/analysis/FindingsExtractor.js.map +1 -0
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.d.ts +111 -0
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js +215 -0
- package/dist/analysis/ai-detection/analyzers/BaseAnalyzer.js.map +1 -0
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.d.ts +142 -0
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js +503 -0
- package/dist/analysis/ai-detection/analyzers/DocumentationAnalyzer.js.map +1 -0
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.d.ts +88 -0
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js +343 -0
- package/dist/analysis/ai-detection/analyzers/GitHistoryAnalyzer.js.map +1 -0
- package/dist/analysis/ai-detection/core/AIDetectionEngine.d.ts +104 -0
- package/dist/analysis/ai-detection/core/AIDetectionEngine.js +369 -0
- package/dist/analysis/ai-detection/core/AIDetectionEngine.js.map +1 -0
- package/dist/analysis/ai-detection/types/DetectionTypes.d.ts +364 -0
- package/dist/analysis/ai-detection/types/DetectionTypes.js +32 -0
- package/dist/analysis/ai-detection/types/DetectionTypes.js.map +1 -0
- package/dist/analysis/ai-detection/utils/SubmissionConverter.d.ts +97 -0
- package/dist/analysis/ai-detection/utils/SubmissionConverter.js +339 -0
- package/dist/analysis/ai-detection/utils/SubmissionConverter.js.map +1 -0
- package/dist/analysis/context/ReviewContext.d.ts +184 -0
- package/dist/analysis/context/ReviewContext.js +294 -0
- package/dist/analysis/context/ReviewContext.js.map +1 -0
- package/dist/analysis/context/index.d.ts +6 -0
- package/dist/analysis/context/index.js +23 -0
- package/dist/analysis/context/index.js.map +1 -0
- package/dist/analysis/index.d.ts +7 -0
- package/dist/analysis/index.js +24 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/analysis/tokens/TokenAnalysisFormatter.d.ts +27 -0
- package/dist/analysis/tokens/TokenAnalysisFormatter.js +143 -0
- package/dist/analysis/tokens/TokenAnalysisFormatter.js.map +1 -0
- package/dist/analysis/tokens/TokenAnalyzer.d.ts +155 -0
- package/dist/analysis/tokens/TokenAnalyzer.js +502 -0
- package/dist/analysis/tokens/TokenAnalyzer.js.map +1 -0
- package/dist/analysis/tokens/index.d.ts +7 -0
- package/dist/analysis/tokens/index.js +24 -0
- package/dist/analysis/tokens/index.js.map +1 -0
- package/dist/clients/base/abstractClient.d.ts +99 -0
- package/dist/clients/base/abstractClient.js +98 -0
- package/dist/clients/base/abstractClient.js.map +1 -0
- package/dist/clients/base/httpClient.d.ts +24 -0
- package/dist/clients/base/httpClient.js +147 -0
- package/dist/clients/base/httpClient.js.map +1 -0
- package/dist/clients/base/index.d.ts +11 -0
- package/dist/clients/base/index.js +28 -0
- package/dist/clients/base/index.js.map +1 -0
- package/dist/clients/base/modelDetection.d.ts +41 -0
- package/dist/clients/base/modelDetection.js +88 -0
- package/dist/clients/base/modelDetection.js.map +1 -0
- package/dist/clients/base/responseProcessor.d.ts +45 -0
- package/dist/clients/base/responseProcessor.js +495 -0
- package/dist/clients/base/responseProcessor.js.map +1 -0
- package/dist/clients/factory/clientFactory.d.ts +23 -0
- package/dist/clients/factory/clientFactory.js +50 -0
- package/dist/clients/factory/clientFactory.js.map +1 -0
- package/dist/clients/factory/index.d.ts +7 -0
- package/dist/clients/factory/index.js +24 -0
- package/dist/clients/factory/index.js.map +1 -0
- package/dist/clients/implementations/index.d.ts +7 -0
- package/dist/clients/implementations/index.js +24 -0
- package/dist/clients/implementations/index.js.map +1 -0
- package/dist/clients/implementations/openRouterClient.d.ts +69 -0
- package/dist/clients/implementations/openRouterClient.js +294 -0
- package/dist/clients/implementations/openRouterClient.js.map +1 -0
- package/dist/clients/openRouterClient.d.ts +42 -0
- package/dist/clients/openRouterClient.js +738 -0
- package/dist/clients/openRouterClient.js.map +1 -0
- package/dist/clients/openRouterClientWrapper.d.ts +22 -0
- package/dist/clients/openRouterClientWrapper.js +64 -0
- package/dist/clients/openRouterClientWrapper.js.map +1 -0
- package/dist/clients/utils/directoryStructure.d.ts +14 -0
- package/dist/clients/utils/directoryStructure.js +48 -0
- package/dist/clients/utils/directoryStructure.js.map +1 -0
- package/dist/clients/utils/index.d.ts +10 -0
- package/dist/clients/utils/index.js +31 -0
- package/dist/clients/utils/index.js.map +1 -0
- package/dist/clients/utils/languageDetection.d.ts +13 -0
- package/dist/clients/utils/languageDetection.js +46 -0
- package/dist/clients/utils/languageDetection.js.map +1 -0
- package/dist/clients/utils/promptFormatter.d.ts +36 -0
- package/dist/clients/utils/promptFormatter.js +92 -0
- package/dist/clients/utils/promptFormatter.js.map +1 -0
- package/dist/clients/utils/promptLoader.d.ts +27 -0
- package/dist/clients/utils/promptLoader.js +49 -0
- package/dist/clients/utils/promptLoader.js.map +1 -0
- package/dist/clients/utils/tokenCounter.d.ts +81 -0
- package/dist/clients/utils/tokenCounter.js +209 -0
- package/dist/clients/utils/tokenCounter.js.map +1 -0
- package/dist/core/ApiClientSelector.d.ts +8 -0
- package/dist/core/ApiClientSelector.js +29 -0
- package/dist/core/ApiClientSelector.js.map +1 -0
- package/dist/core/ConfigurationService.d.ts +286 -0
- package/dist/core/ConfigurationService.js +477 -0
- package/dist/core/ConfigurationService.js.map +1 -0
- package/dist/core/ConsolidationService.d.ts +99 -0
- package/dist/core/ConsolidationService.js +341 -0
- package/dist/core/ConsolidationService.js.map +1 -0
- package/dist/core/InteractiveDisplayManager.d.ts +22 -0
- package/dist/core/InteractiveDisplayManager.js +70 -0
- package/dist/core/InteractiveDisplayManager.js.map +1 -0
- package/dist/core/OutputManager.d.ts +26 -0
- package/dist/core/OutputManager.js +217 -0
- package/dist/core/OutputManager.js.map +1 -0
- package/dist/core/ReviewGenerator.d.ts +13 -0
- package/dist/core/ReviewGenerator.js +102 -0
- package/dist/core/ReviewGenerator.js.map +1 -0
- package/dist/core/fileDiscovery.d.ts +35 -0
- package/dist/core/fileDiscovery.js +202 -0
- package/dist/core/fileDiscovery.js.map +1 -0
- package/dist/core/handlers/EstimationHandler.d.ts +18 -0
- package/dist/core/handlers/EstimationHandler.js +110 -0
- package/dist/core/handlers/EstimationHandler.js.map +1 -0
- package/dist/core/handlers/FileProcessingHandler.d.ts +31 -0
- package/dist/core/handlers/FileProcessingHandler.js +159 -0
- package/dist/core/handlers/FileProcessingHandler.js.map +1 -0
- package/dist/core/handlers/OutputHandler.d.ts +27 -0
- package/dist/core/handlers/OutputHandler.js +127 -0
- package/dist/core/handlers/OutputHandler.js.map +1 -0
- package/dist/core/handlers/ReviewExecutor.d.ts +32 -0
- package/dist/core/handlers/ReviewExecutor.js +111 -0
- package/dist/core/handlers/ReviewExecutor.js.map +1 -0
- package/dist/core/reviewOrchestrator.d.ts +24 -0
- package/dist/core/reviewOrchestrator.js +294 -0
- package/dist/core/reviewOrchestrator.js.map +1 -0
- package/dist/core/utils/ModelInfoUtils.d.ts +16 -0
- package/dist/core/utils/ModelInfoUtils.js +54 -0
- package/dist/core/utils/ModelInfoUtils.js.map +1 -0
- package/dist/formatters/outputFormatter.d.ts +31 -0
- package/dist/formatters/outputFormatter.js +65 -0
- package/dist/formatters/outputFormatter.js.map +1 -0
- package/dist/formatters/utils/IssueFormatters.d.ts +20 -0
- package/dist/formatters/utils/IssueFormatters.js +67 -0
- package/dist/formatters/utils/IssueFormatters.js.map +1 -0
- package/dist/formatters/utils/JsonFormatter.d.ts +13 -0
- package/dist/formatters/utils/JsonFormatter.js +57 -0
- package/dist/formatters/utils/JsonFormatter.js.map +1 -0
- package/dist/formatters/utils/MarkdownFormatters.d.ts +51 -0
- package/dist/formatters/utils/MarkdownFormatters.js +456 -0
- package/dist/formatters/utils/MarkdownFormatters.js.map +1 -0
- package/dist/formatters/utils/MetadataFormatter.d.ts +65 -0
- package/dist/formatters/utils/MetadataFormatter.js +219 -0
- package/dist/formatters/utils/MetadataFormatter.js.map +1 -0
- package/dist/formatters/utils/ModelInfoExtractor.d.ts +33 -0
- package/dist/formatters/utils/ModelInfoExtractor.js +111 -0
- package/dist/formatters/utils/ModelInfoExtractor.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/PluginInterface.d.ts +44 -0
- package/dist/plugins/PluginInterface.js +9 -0
- package/dist/plugins/PluginInterface.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +51 -0
- package/dist/plugins/PluginManager.js +151 -0
- package/dist/plugins/PluginManager.js.map +1 -0
- package/dist/prompts/PromptManager.d.ts +30 -0
- package/dist/prompts/PromptManager.js +62 -0
- package/dist/prompts/PromptManager.js.map +1 -0
- package/dist/prompts/cache/PromptCache.d.ts +32 -0
- package/dist/prompts/cache/PromptCache.js +48 -0
- package/dist/prompts/cache/PromptCache.js.map +1 -0
- package/dist/runtime/auth/service.d.ts +2 -0
- package/dist/runtime/auth/service.js +41 -0
- package/dist/runtime/auth/service.js.map +1 -0
- package/dist/runtime/auth/session.d.ts +5 -0
- package/dist/runtime/auth/session.js +87 -0
- package/dist/runtime/auth/session.js.map +1 -0
- package/dist/runtime/auth/types.d.ts +9 -0
- package/dist/runtime/auth/types.js +3 -0
- package/dist/runtime/auth/types.js.map +1 -0
- package/dist/runtime/cliEntry.d.ts +1 -0
- package/dist/runtime/cliEntry.js +213 -0
- package/dist/runtime/cliEntry.js.map +1 -0
- package/dist/runtime/debug/logManager.d.ts +5 -0
- package/dist/runtime/debug/logManager.js +31 -0
- package/dist/runtime/debug/logManager.js.map +1 -0
- package/dist/runtime/errors.d.ts +5 -0
- package/dist/runtime/errors.js +15 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/fileCollector.d.ts +5 -0
- package/dist/runtime/fileCollector.js +167 -0
- package/dist/runtime/fileCollector.js.map +1 -0
- package/dist/runtime/manifest.d.ts +1 -0
- package/dist/runtime/manifest.js +65 -0
- package/dist/runtime/manifest.js.map +1 -0
- package/dist/runtime/openrouterProxy.d.ts +4 -0
- package/dist/runtime/openrouterProxy.js +43 -0
- package/dist/runtime/openrouterProxy.js.map +1 -0
- package/dist/runtime/preprod/webCheck.d.ts +1 -0
- package/dist/runtime/preprod/webCheck.js +98 -0
- package/dist/runtime/preprod/webCheck.js.map +1 -0
- package/dist/runtime/proxyConfig.d.ts +6 -0
- package/dist/runtime/proxyConfig.js +86 -0
- package/dist/runtime/proxyConfig.js.map +1 -0
- package/dist/runtime/proxyEnvironment.d.ts +3 -0
- package/dist/runtime/proxyEnvironment.js +63 -0
- package/dist/runtime/proxyEnvironment.js.map +1 -0
- package/dist/runtime/reportMerge.d.ts +30 -0
- package/dist/runtime/reportMerge.js +70 -0
- package/dist/runtime/reportMerge.js.map +1 -0
- package/dist/runtime/reporting/markdownReportBuilder.d.ts +15 -0
- package/dist/runtime/reporting/markdownReportBuilder.js +97 -0
- package/dist/runtime/reporting/markdownReportBuilder.js.map +1 -0
- package/dist/runtime/reporting/reportDataCollector.d.ts +31 -0
- package/dist/runtime/reporting/reportDataCollector.js +170 -0
- package/dist/runtime/reporting/reportDataCollector.js.map +1 -0
- package/dist/runtime/reporting/summaryGenerator.d.ts +10 -0
- package/dist/runtime/reporting/summaryGenerator.js +67 -0
- package/dist/runtime/reporting/summaryGenerator.js.map +1 -0
- package/dist/runtime/reviewPipeline.d.ts +28 -0
- package/dist/runtime/reviewPipeline.js +122 -0
- package/dist/runtime/reviewPipeline.js.map +1 -0
- package/dist/runtime/runAiCodeReview.d.ts +10 -0
- package/dist/runtime/runAiCodeReview.js +138 -0
- package/dist/runtime/runAiCodeReview.js.map +1 -0
- package/dist/runtime/runtimeConfig.d.ts +4 -0
- package/dist/runtime/runtimeConfig.js +7 -0
- package/dist/runtime/runtimeConfig.js.map +1 -0
- package/dist/runtime/ui/Layout.d.ts +11 -0
- package/dist/runtime/ui/Layout.js +47 -0
- package/dist/runtime/ui/Layout.js.map +1 -0
- package/dist/runtime/ui/RuntimeApp.d.ts +6 -0
- package/dist/runtime/ui/RuntimeApp.js +161 -0
- package/dist/runtime/ui/RuntimeApp.js.map +1 -0
- package/dist/runtime/ui/inkModules.d.ts +10 -0
- package/dist/runtime/ui/inkModules.js +63 -0
- package/dist/runtime/ui/inkModules.js.map +1 -0
- package/dist/runtime/ui/screens/AuthScreen.d.ts +6 -0
- package/dist/runtime/ui/screens/AuthScreen.js +67 -0
- package/dist/runtime/ui/screens/AuthScreen.js.map +1 -0
- package/dist/runtime/ui/screens/ModeSelection.d.ts +10 -0
- package/dist/runtime/ui/screens/ModeSelection.js +100 -0
- package/dist/runtime/ui/screens/ModeSelection.js.map +1 -0
- package/dist/runtime/ui/screens/ProgressScreen.d.ts +7 -0
- package/dist/runtime/ui/screens/ProgressScreen.js +38 -0
- package/dist/runtime/ui/screens/ProgressScreen.js.map +1 -0
- package/dist/runtime/ui/screens/ResultsScreen.d.ts +7 -0
- package/dist/runtime/ui/screens/ResultsScreen.js +22 -0
- package/dist/runtime/ui/screens/ResultsScreen.js.map +1 -0
- package/dist/strategies/ArchitecturalReviewStrategy.d.ts +29 -0
- package/dist/strategies/ArchitecturalReviewStrategy.js +42 -0
- package/dist/strategies/ArchitecturalReviewStrategy.js.map +1 -0
- package/dist/strategies/CodingTestReviewStrategy.d.ts +194 -0
- package/dist/strategies/CodingTestReviewStrategy.js +681 -0
- package/dist/strategies/CodingTestReviewStrategy.js.map +1 -0
- package/dist/strategies/ConsolidatedReviewStrategy.d.ts +25 -0
- package/dist/strategies/ConsolidatedReviewStrategy.js +45 -0
- package/dist/strategies/ConsolidatedReviewStrategy.js.map +1 -0
- package/dist/strategies/ExtractPatternsReviewStrategy.d.ts +30 -0
- package/dist/strategies/ExtractPatternsReviewStrategy.js +51 -0
- package/dist/strategies/ExtractPatternsReviewStrategy.js.map +1 -0
- package/dist/strategies/MultiPassReviewStrategy.d.ts +86 -0
- package/dist/strategies/MultiPassReviewStrategy.js +590 -0
- package/dist/strategies/MultiPassReviewStrategy.js.map +1 -0
- package/dist/strategies/ReviewStrategy.d.ts +45 -0
- package/dist/strategies/ReviewStrategy.js +24 -0
- package/dist/strategies/ReviewStrategy.js.map +1 -0
- package/dist/strategies/StrategyFactory.d.ts +19 -0
- package/dist/strategies/StrategyFactory.js +72 -0
- package/dist/strategies/StrategyFactory.js.map +1 -0
- package/dist/strategies/index.d.ts +13 -0
- package/dist/strategies/index.js +30 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/tokenizers/baseTokenizer.d.ts +25 -0
- package/dist/tokenizers/baseTokenizer.js +48 -0
- package/dist/tokenizers/baseTokenizer.js.map +1 -0
- package/dist/tokenizers/gptTokenizer.d.ts +7 -0
- package/dist/tokenizers/gptTokenizer.js +28 -0
- package/dist/tokenizers/gptTokenizer.js.map +1 -0
- package/dist/tokenizers/index.d.ts +7 -0
- package/dist/tokenizers/index.js +24 -0
- package/dist/tokenizers/index.js.map +1 -0
- package/dist/types/apiResponses.d.ts +39 -0
- package/dist/types/apiResponses.js +9 -0
- package/dist/types/apiResponses.js.map +1 -0
- package/dist/types/cli.d.ts +22 -0
- package/dist/types/cli.js +3 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/types/common.d.ts +22 -0
- package/dist/types/common.js +14 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/configuration.d.ts +682 -0
- package/dist/types/configuration.js +65 -0
- package/dist/types/configuration.js.map +1 -0
- package/dist/types/review.d.ts +258 -0
- package/dist/types/review.js +8 -0
- package/dist/types/review.js.map +1 -0
- package/dist/types/reviewSchema.d.ts +543 -0
- package/dist/types/reviewSchema.js +121 -0
- package/dist/types/reviewSchema.js.map +1 -0
- package/dist/types/structuredReview.d.ts +119 -0
- package/dist/types/structuredReview.js +6 -0
- package/dist/types/structuredReview.js.map +1 -0
- package/dist/types/tokenAnalysis.d.ts +44 -0
- package/dist/types/tokenAnalysis.js +4 -0
- package/dist/types/tokenAnalysis.js.map +1 -0
- package/dist/utils/FileReader.d.ts +33 -0
- package/dist/utils/FileReader.js +88 -0
- package/dist/utils/FileReader.js.map +1 -0
- package/dist/utils/FileWriter.d.ts +26 -0
- package/dist/utils/FileWriter.js +76 -0
- package/dist/utils/FileWriter.js.map +1 -0
- package/dist/utils/PathGenerator.d.ts +30 -0
- package/dist/utils/PathGenerator.js +82 -0
- package/dist/utils/PathGenerator.js.map +1 -0
- package/dist/utils/api/apiUtils.d.ts +3 -0
- package/dist/utils/api/apiUtils.js +20 -0
- package/dist/utils/api/apiUtils.js.map +1 -0
- package/dist/utils/api/index.d.ts +1 -0
- package/dist/utils/api/index.js +18 -0
- package/dist/utils/api/index.js.map +1 -0
- package/dist/utils/apiErrorHandler.d.ts +130 -0
- package/dist/utils/apiErrorHandler.js +256 -0
- package/dist/utils/apiErrorHandler.js.map +1 -0
- package/dist/utils/ciDataCollector.d.ts +51 -0
- package/dist/utils/ciDataCollector.js +197 -0
- package/dist/utils/ciDataCollector.js.map +1 -0
- package/dist/utils/codingTestConfigLoader.d.ts +66 -0
- package/dist/utils/codingTestConfigLoader.js +420 -0
- package/dist/utils/codingTestConfigLoader.js.map +1 -0
- package/dist/utils/dependencies/aiDependencyAnalyzer.d.ts +30 -0
- package/dist/utils/dependencies/aiDependencyAnalyzer.js +343 -0
- package/dist/utils/dependencies/aiDependencyAnalyzer.js.map +1 -0
- package/dist/utils/detection/frameworkDetector.d.ts +43 -0
- package/dist/utils/detection/frameworkDetector.js +795 -0
- package/dist/utils/detection/frameworkDetector.js.map +1 -0
- package/dist/utils/detection/index.d.ts +9 -0
- package/dist/utils/detection/index.js +28 -0
- package/dist/utils/detection/index.js.map +1 -0
- package/dist/utils/detection/projectTypeDetector.d.ts +27 -0
- package/dist/utils/detection/projectTypeDetector.js +469 -0
- package/dist/utils/detection/projectTypeDetector.js.map +1 -0
- package/dist/utils/diagramGenerator.d.ts +49 -0
- package/dist/utils/diagramGenerator.js +218 -0
- package/dist/utils/diagramGenerator.js.map +1 -0
- package/dist/utils/errorLogger.d.ts +24 -0
- package/dist/utils/errorLogger.js +59 -0
- package/dist/utils/errorLogger.js.map +1 -0
- package/dist/utils/estimationUtils.d.ts +139 -0
- package/dist/utils/estimationUtils.js +329 -0
- package/dist/utils/estimationUtils.js.map +1 -0
- package/dist/utils/fileFilters.d.ts +72 -0
- package/dist/utils/fileFilters.js +338 -0
- package/dist/utils/fileFilters.js.map +1 -0
- package/dist/utils/fileSystem.d.ts +22 -0
- package/dist/utils/fileSystem.js +45 -0
- package/dist/utils/fileSystem.js.map +1 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/index.js +52 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +77 -0
- package/dist/utils/logger.js +271 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/pathValidator.d.ts +40 -0
- package/dist/utils/pathValidator.js +98 -0
- package/dist/utils/pathValidator.js.map +1 -0
- package/dist/utils/priorityFilter.d.ts +34 -0
- package/dist/utils/priorityFilter.js +54 -0
- package/dist/utils/priorityFilter.js.map +1 -0
- package/dist/utils/projectDocs.d.ts +47 -0
- package/dist/utils/projectDocs.js +158 -0
- package/dist/utils/projectDocs.js.map +1 -0
- package/dist/utils/promptPaths.d.ts +6 -0
- package/dist/utils/promptPaths.js +33 -0
- package/dist/utils/promptPaths.js.map +1 -0
- package/dist/utils/promptTemplateManager.d.ts +34 -0
- package/dist/utils/promptTemplateManager.js +140 -0
- package/dist/utils/promptTemplateManager.js.map +1 -0
- package/dist/utils/review/consolidateReview.d.ts +15 -0
- package/dist/utils/review/consolidateReview.js +481 -0
- package/dist/utils/review/consolidateReview.js.map +1 -0
- package/dist/utils/review/fixDisplay.d.ts +20 -0
- package/dist/utils/review/fixDisplay.js +84 -0
- package/dist/utils/review/fixDisplay.js.map +1 -0
- package/dist/utils/review/fixImplementation.d.ts +28 -0
- package/dist/utils/review/fixImplementation.js +60 -0
- package/dist/utils/review/fixImplementation.js.map +1 -0
- package/dist/utils/review/index.d.ts +13 -0
- package/dist/utils/review/index.js +50 -0
- package/dist/utils/review/index.js.map +1 -0
- package/dist/utils/review/interactiveProcessing.d.ts +25 -0
- package/dist/utils/review/interactiveProcessing.js +251 -0
- package/dist/utils/review/interactiveProcessing.js.map +1 -0
- package/dist/utils/review/progressTracker.d.ts +106 -0
- package/dist/utils/review/progressTracker.js +227 -0
- package/dist/utils/review/progressTracker.js.map +1 -0
- package/dist/utils/review/reviewExtraction.d.ts +31 -0
- package/dist/utils/review/reviewExtraction.js +324 -0
- package/dist/utils/review/reviewExtraction.js.map +1 -0
- package/dist/utils/review/types.d.ts +45 -0
- package/dist/utils/review/types.js +18 -0
- package/dist/utils/review/types.js.map +1 -0
- package/dist/utils/reviewActionHandler.d.ts +16 -0
- package/dist/utils/reviewActionHandler.js +34 -0
- package/dist/utils/reviewActionHandler.js.map +1 -0
- package/dist/utils/reviewParser.d.ts +34 -0
- package/dist/utils/reviewParser.js +218 -0
- package/dist/utils/reviewParser.js.map +1 -0
- package/dist/utils/sanitizer.d.ts +82 -0
- package/dist/utils/sanitizer.js +239 -0
- package/dist/utils/sanitizer.js.map +1 -0
- package/dist/utils/smartFileSelector.d.ts +50 -0
- package/dist/utils/smartFileSelector.js +261 -0
- package/dist/utils/smartFileSelector.js.map +1 -0
- package/dist/utils/templateLoader.d.ts +44 -0
- package/dist/utils/templateLoader.js +431 -0
- package/dist/utils/templateLoader.js.map +1 -0
- package/dist/utils/treeGenerator.d.ts +12 -0
- package/dist/utils/treeGenerator.js +133 -0
- package/dist/utils/treeGenerator.js.map +1 -0
- package/package.json +11 -12
- package/src/index.ts +1 -0
- package/src/runtime/debug/logManager.ts +37 -0
- package/src/runtime/fileCollector.ts +58 -24
- package/src/runtime/preprod/webCheck.ts +104 -0
- package/src/runtime/reviewPipeline.ts +10 -4
- package/src/runtime/ui/RuntimeApp.tsx +96 -13
- package/src/runtime/ui/screens/ModeSelection.tsx +148 -15
- package/src/runtime/ui/screens/ProgressScreen.tsx +10 -3
- package/src/runtime/ui/screens/ResultsScreen.tsx +8 -1
- package/src/utils/logger.ts +64 -14
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Coding test configuration loader utility.
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for loading and parsing coding test configuration
|
|
5
|
+
* files in various formats (JSON, YAML) and converting them to the internal
|
|
6
|
+
* configuration format used by the CodingTestReviewStrategy.
|
|
7
|
+
*/
|
|
8
|
+
import type { CodingTestConfig } from '../strategies/CodingTestReviewStrategy';
|
|
9
|
+
/**
|
|
10
|
+
* Extended configuration interface that includes additional metadata
|
|
11
|
+
*/
|
|
12
|
+
export interface ExtendedCodingTestConfig extends CodingTestConfig {
|
|
13
|
+
/** Evaluation section with criteria and descriptions */
|
|
14
|
+
evaluation?: {
|
|
15
|
+
criteria?: Record<string, number | {
|
|
16
|
+
weight: number;
|
|
17
|
+
description?: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/** Additional evaluation criteria beyond the standard ones */
|
|
21
|
+
additionalCriteria?: Record<string, {
|
|
22
|
+
weight: number;
|
|
23
|
+
description: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Expected deliverables checklist */
|
|
26
|
+
deliverables?: string[];
|
|
27
|
+
/** Technical requirements */
|
|
28
|
+
technicalRequirements?: Record<string, string>;
|
|
29
|
+
/** Bonus points for optional features */
|
|
30
|
+
bonusPoints?: string[];
|
|
31
|
+
/** Common pitfalls to avoid */
|
|
32
|
+
commonPitfalls?: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Load coding test configuration from a file
|
|
36
|
+
* @param configPath Path to the configuration file
|
|
37
|
+
* @returns Parsed configuration object
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadCodingTestConfig(configPath: string): ExtendedCodingTestConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Load configuration from URL
|
|
42
|
+
* @param configUrl URL to the configuration file
|
|
43
|
+
* @returns Parsed configuration object
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadCodingTestConfigFromUrl(configUrl: string): Promise<ExtendedCodingTestConfig>;
|
|
46
|
+
/**
|
|
47
|
+
* Convert extended configuration to basic CodingTestConfig
|
|
48
|
+
* @param extendedConfig Extended configuration object
|
|
49
|
+
* @returns Basic configuration object
|
|
50
|
+
*/
|
|
51
|
+
export declare function convertToCodingTestConfig(extendedConfig: ExtendedCodingTestConfig): CodingTestConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Create a default configuration for testing
|
|
54
|
+
* @returns Default coding test configuration
|
|
55
|
+
*/
|
|
56
|
+
export declare function createDefaultCodingTestConfig(): CodingTestConfig;
|
|
57
|
+
/**
|
|
58
|
+
* Validate assignment text and extract basic requirements
|
|
59
|
+
* @param assignmentText Raw assignment text
|
|
60
|
+
* @returns Parsed assignment information
|
|
61
|
+
*/
|
|
62
|
+
export declare function parseAssignmentText(assignmentText: string): {
|
|
63
|
+
title?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
requirements?: string[];
|
|
66
|
+
};
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Coding test configuration loader utility.
|
|
4
|
+
*
|
|
5
|
+
* This module provides utilities for loading and parsing coding test configuration
|
|
6
|
+
* files in various formats (JSON, YAML) and converting them to the internal
|
|
7
|
+
* configuration format used by the CodingTestReviewStrategy.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
43
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.loadCodingTestConfig = loadCodingTestConfig;
|
|
47
|
+
exports.loadCodingTestConfigFromUrl = loadCodingTestConfigFromUrl;
|
|
48
|
+
exports.convertToCodingTestConfig = convertToCodingTestConfig;
|
|
49
|
+
exports.createDefaultCodingTestConfig = createDefaultCodingTestConfig;
|
|
50
|
+
exports.parseAssignmentText = parseAssignmentText;
|
|
51
|
+
const fs = __importStar(require("node:fs"));
|
|
52
|
+
const path = __importStar(require("node:path"));
|
|
53
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
54
|
+
/**
|
|
55
|
+
* Load coding test configuration from a file
|
|
56
|
+
* @param configPath Path to the configuration file
|
|
57
|
+
* @returns Parsed configuration object
|
|
58
|
+
*/
|
|
59
|
+
function loadCodingTestConfig(configPath) {
|
|
60
|
+
try {
|
|
61
|
+
if (!fs.existsSync(configPath)) {
|
|
62
|
+
throw new Error(`Configuration file not found: ${configPath}`);
|
|
63
|
+
}
|
|
64
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
65
|
+
const extension = path.extname(configPath).toLowerCase();
|
|
66
|
+
let config;
|
|
67
|
+
switch (extension) {
|
|
68
|
+
case '.json':
|
|
69
|
+
config = JSON.parse(configContent);
|
|
70
|
+
break;
|
|
71
|
+
case '.yaml':
|
|
72
|
+
case '.yml':
|
|
73
|
+
// Simple YAML parser for basic structures - in production, use js-yaml
|
|
74
|
+
config = parseBasicYaml(configContent);
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
throw new Error(`Unsupported configuration file format: ${extension}`);
|
|
78
|
+
}
|
|
79
|
+
// Validate and normalize the configuration
|
|
80
|
+
return validateAndNormalizeConfig(config, configPath);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
logger_1.default.error(`Failed to load coding test configuration from ${configPath}:`, error);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Load configuration from URL
|
|
89
|
+
* @param configUrl URL to the configuration file
|
|
90
|
+
* @returns Parsed configuration object
|
|
91
|
+
*/
|
|
92
|
+
async function loadCodingTestConfigFromUrl(configUrl) {
|
|
93
|
+
try {
|
|
94
|
+
const response = await fetch(configUrl);
|
|
95
|
+
if (!response.ok) {
|
|
96
|
+
throw new Error(`Failed to fetch configuration from ${configUrl}: ${response.statusText}`);
|
|
97
|
+
}
|
|
98
|
+
const configContent = await response.text();
|
|
99
|
+
const urlParts = new URL(configUrl);
|
|
100
|
+
const extension = path.extname(urlParts.pathname).toLowerCase();
|
|
101
|
+
let config;
|
|
102
|
+
switch (extension) {
|
|
103
|
+
case '.json':
|
|
104
|
+
config = JSON.parse(configContent);
|
|
105
|
+
break;
|
|
106
|
+
case '.yaml':
|
|
107
|
+
case '.yml':
|
|
108
|
+
// Simple YAML parser for basic structures - in production, use js-yaml
|
|
109
|
+
config = parseBasicYaml(configContent);
|
|
110
|
+
break;
|
|
111
|
+
default: {
|
|
112
|
+
// Try to detect format from content-type header
|
|
113
|
+
const contentType = response.headers.get('content-type') || '';
|
|
114
|
+
if (contentType.includes('application/json')) {
|
|
115
|
+
config = JSON.parse(configContent);
|
|
116
|
+
}
|
|
117
|
+
else if (contentType.includes('text/yaml') || contentType.includes('application/yaml')) {
|
|
118
|
+
// Simple YAML parser for basic structures - in production, use js-yaml
|
|
119
|
+
config = parseBasicYaml(configContent);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
throw new Error(`Unable to determine configuration format from URL: ${configUrl}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Validate and normalize the configuration
|
|
127
|
+
return validateAndNormalizeConfig(config, configUrl);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
logger_1.default.error(`Failed to load coding test configuration from URL ${configUrl}:`, error);
|
|
131
|
+
throw error;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Validate and normalize configuration
|
|
136
|
+
* @param config Raw configuration object
|
|
137
|
+
* @param source Source path or URL for error messages
|
|
138
|
+
* @returns Validated and normalized configuration
|
|
139
|
+
*/
|
|
140
|
+
function validateAndNormalizeConfig(config, source) {
|
|
141
|
+
const normalized = {
|
|
142
|
+
...config,
|
|
143
|
+
};
|
|
144
|
+
// Validate required sections
|
|
145
|
+
if (!normalized.assignment) {
|
|
146
|
+
throw new Error(`Missing 'assignment' section in configuration: ${source}`);
|
|
147
|
+
}
|
|
148
|
+
if (!normalized.evaluation) {
|
|
149
|
+
throw new Error(`Missing 'evaluation' section in configuration: ${source}`);
|
|
150
|
+
}
|
|
151
|
+
// Normalize assignment defaults
|
|
152
|
+
if (normalized.assignment) {
|
|
153
|
+
normalized.assignment = {
|
|
154
|
+
type: 'coding-challenge',
|
|
155
|
+
difficulty: 'mid',
|
|
156
|
+
timeLimit: 120,
|
|
157
|
+
...normalized.assignment,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
// Normalize evaluation criteria
|
|
161
|
+
if (normalized.evaluation?.criteria) {
|
|
162
|
+
const weights = [];
|
|
163
|
+
Object.values(normalized.evaluation.criteria).forEach((criterion) => {
|
|
164
|
+
if (typeof criterion === 'number') {
|
|
165
|
+
weights.push(criterion);
|
|
166
|
+
}
|
|
167
|
+
else if (criterion && typeof criterion === 'object' && 'weight' in criterion) {
|
|
168
|
+
weights.push(criterion.weight);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
const criteriaTotal = weights.reduce((sum, weight) => sum + weight, 0);
|
|
172
|
+
if (Math.abs(criteriaTotal - 100) > 0.1) {
|
|
173
|
+
logger_1.default.warn(`Criteria weights sum to ${criteriaTotal}, expected 100 (source: ${source}). Normalizing...`);
|
|
174
|
+
// Normalize weights to sum to 100
|
|
175
|
+
const normalizationFactor = 100 / criteriaTotal;
|
|
176
|
+
Object.keys(normalized.evaluation.criteria).forEach((key) => {
|
|
177
|
+
const criterion = normalized.evaluation?.criteria?.[key];
|
|
178
|
+
if (typeof criterion === 'number' && normalized.evaluation?.criteria) {
|
|
179
|
+
normalized.evaluation.criteria[key] = Math.round(criterion * normalizationFactor);
|
|
180
|
+
}
|
|
181
|
+
else if (criterion && typeof criterion === 'object' && 'weight' in criterion) {
|
|
182
|
+
criterion.weight = Math.round(criterion.weight * normalizationFactor);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// Normalize scoring defaults
|
|
188
|
+
if (normalized.scoring) {
|
|
189
|
+
normalized.scoring = {
|
|
190
|
+
system: 'numeric',
|
|
191
|
+
maxScore: 100,
|
|
192
|
+
passingThreshold: 70,
|
|
193
|
+
breakdown: true,
|
|
194
|
+
...normalized.scoring,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
// Normalize feedback defaults
|
|
198
|
+
if (normalized.feedback) {
|
|
199
|
+
normalized.feedback = {
|
|
200
|
+
level: 'detailed',
|
|
201
|
+
includeExamples: true,
|
|
202
|
+
includeSuggestions: true,
|
|
203
|
+
includeResources: false,
|
|
204
|
+
...normalized.feedback,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
// Validate constraints
|
|
208
|
+
if (normalized.constraints) {
|
|
209
|
+
if (normalized.constraints.allowedLibraries &&
|
|
210
|
+
!Array.isArray(normalized.constraints.allowedLibraries)) {
|
|
211
|
+
throw new Error(`'allowedLibraries' must be an array in configuration: ${source}`);
|
|
212
|
+
}
|
|
213
|
+
if (normalized.constraints.forbiddenPatterns &&
|
|
214
|
+
!Array.isArray(normalized.constraints.forbiddenPatterns)) {
|
|
215
|
+
throw new Error(`'forbiddenPatterns' must be an array in configuration: ${source}`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Validate additional criteria if present
|
|
219
|
+
if (normalized.additionalCriteria) {
|
|
220
|
+
Object.entries(normalized.additionalCriteria).forEach(([key, criterion]) => {
|
|
221
|
+
if (typeof criterion !== 'object' || typeof criterion.weight !== 'number') {
|
|
222
|
+
throw new Error(`Invalid additional criterion '${key}' in configuration: ${source}`);
|
|
223
|
+
}
|
|
224
|
+
if (criterion.weight < 0 || criterion.weight > 100) {
|
|
225
|
+
throw new Error(`Invalid weight for additional criterion '${key}' in configuration: ${source}`);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
return normalized;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Convert extended configuration to basic CodingTestConfig
|
|
233
|
+
* @param extendedConfig Extended configuration object
|
|
234
|
+
* @returns Basic configuration object
|
|
235
|
+
*/
|
|
236
|
+
function convertToCodingTestConfig(extendedConfig) {
|
|
237
|
+
const basicConfig = {
|
|
238
|
+
assignment: extendedConfig.assignment,
|
|
239
|
+
criteria: {},
|
|
240
|
+
scoring: extendedConfig.scoring,
|
|
241
|
+
feedback: extendedConfig.feedback,
|
|
242
|
+
constraints: extendedConfig.constraints,
|
|
243
|
+
};
|
|
244
|
+
// Convert evaluation criteria
|
|
245
|
+
if (extendedConfig.evaluation?.criteria) {
|
|
246
|
+
Object.entries(extendedConfig.evaluation.criteria).forEach(([key, criterion]) => {
|
|
247
|
+
if (typeof criterion === 'number') {
|
|
248
|
+
basicConfig.criteria[key] = criterion;
|
|
249
|
+
}
|
|
250
|
+
else if (criterion && typeof criterion === 'object' && 'weight' in criterion) {
|
|
251
|
+
basicConfig.criteria[key] = criterion.weight;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
// Merge additional criteria
|
|
256
|
+
if (extendedConfig.additionalCriteria) {
|
|
257
|
+
Object.entries(extendedConfig.additionalCriteria).forEach(([key, criterion]) => {
|
|
258
|
+
basicConfig.criteria[key] = criterion.weight;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
return basicConfig;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Create a default configuration for testing
|
|
265
|
+
* @returns Default coding test configuration
|
|
266
|
+
*/
|
|
267
|
+
function createDefaultCodingTestConfig() {
|
|
268
|
+
return {
|
|
269
|
+
assignment: {
|
|
270
|
+
type: 'coding-challenge',
|
|
271
|
+
difficulty: 'mid',
|
|
272
|
+
timeLimit: 120,
|
|
273
|
+
title: 'Coding Challenge',
|
|
274
|
+
description: 'Complete the coding challenge according to the provided requirements.',
|
|
275
|
+
requirements: [
|
|
276
|
+
'Implement the core functionality',
|
|
277
|
+
'Include proper error handling',
|
|
278
|
+
'Write comprehensive tests',
|
|
279
|
+
'Provide clear documentation',
|
|
280
|
+
],
|
|
281
|
+
},
|
|
282
|
+
criteria: {
|
|
283
|
+
correctness: 30,
|
|
284
|
+
codeQuality: 25,
|
|
285
|
+
architecture: 20,
|
|
286
|
+
performance: 15,
|
|
287
|
+
testing: 10,
|
|
288
|
+
},
|
|
289
|
+
scoring: {
|
|
290
|
+
system: 'numeric',
|
|
291
|
+
maxScore: 100,
|
|
292
|
+
passingThreshold: 70,
|
|
293
|
+
breakdown: true,
|
|
294
|
+
},
|
|
295
|
+
feedback: {
|
|
296
|
+
level: 'detailed',
|
|
297
|
+
includeExamples: true,
|
|
298
|
+
includeSuggestions: true,
|
|
299
|
+
includeResources: false,
|
|
300
|
+
},
|
|
301
|
+
constraints: {
|
|
302
|
+
targetLanguage: 'typescript',
|
|
303
|
+
forbiddenPatterns: ['eval', 'Function'],
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Validate assignment text and extract basic requirements
|
|
309
|
+
* @param assignmentText Raw assignment text
|
|
310
|
+
* @returns Parsed assignment information
|
|
311
|
+
*/
|
|
312
|
+
function parseAssignmentText(assignmentText) {
|
|
313
|
+
const lines = assignmentText
|
|
314
|
+
.split('\n')
|
|
315
|
+
.map((line) => line.trim())
|
|
316
|
+
.filter((line) => line);
|
|
317
|
+
let title;
|
|
318
|
+
let description;
|
|
319
|
+
const requirements = [];
|
|
320
|
+
let currentSection = 'description';
|
|
321
|
+
const descriptionLines = [];
|
|
322
|
+
for (const line of lines) {
|
|
323
|
+
// Check for title (first line or line starting with #)
|
|
324
|
+
if (!title && (line.startsWith('#') || lines.indexOf(line) === 0)) {
|
|
325
|
+
title = line.replace(/^#+\s*/, '').trim();
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
// Check for requirements section
|
|
329
|
+
if (line.toLowerCase().includes('requirement') || line.toLowerCase().includes('task')) {
|
|
330
|
+
currentSection = 'requirements';
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
// Parse requirements (lines starting with - or numbers)
|
|
334
|
+
if (currentSection === 'requirements' &&
|
|
335
|
+
(line.startsWith('-') || line.startsWith('*') || /^\d+\./.test(line))) {
|
|
336
|
+
const requirement = line.replace(/^[-*\d.)\s]+/, '').trim();
|
|
337
|
+
if (requirement) {
|
|
338
|
+
requirements.push(requirement);
|
|
339
|
+
}
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
// Add to description
|
|
343
|
+
if (currentSection === 'description') {
|
|
344
|
+
descriptionLines.push(line);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (descriptionLines.length > 0) {
|
|
348
|
+
description = descriptionLines.join('\n');
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
title,
|
|
352
|
+
description,
|
|
353
|
+
requirements: requirements.length > 0 ? requirements : undefined,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Simple YAML parser for basic configuration structures
|
|
358
|
+
* Note: This is a minimal implementation. For production use, consider js-yaml
|
|
359
|
+
* @param yamlContent YAML content string
|
|
360
|
+
* @returns Parsed object
|
|
361
|
+
*/
|
|
362
|
+
function parseBasicYaml(yamlContent) {
|
|
363
|
+
try {
|
|
364
|
+
// This is a very basic YAML parser - in production, use js-yaml
|
|
365
|
+
// For now, we'll try to parse as JSON if possible, or create a basic structure
|
|
366
|
+
// Remove comments and clean up
|
|
367
|
+
const _lines = yamlContent
|
|
368
|
+
.split('\n')
|
|
369
|
+
.map((line) => line.replace(/#.*$/, '').trim())
|
|
370
|
+
.filter((line) => line.length > 0);
|
|
371
|
+
// For this POC, we'll return a default structure if YAML parsing fails
|
|
372
|
+
// In production, implement proper YAML parsing or use js-yaml
|
|
373
|
+
return {
|
|
374
|
+
assignment: {
|
|
375
|
+
type: 'take-home',
|
|
376
|
+
difficulty: 'mid',
|
|
377
|
+
timeLimit: 240,
|
|
378
|
+
title: 'Events Platform API Development',
|
|
379
|
+
description: 'Build a RESTful API for an events platform',
|
|
380
|
+
requirements: [
|
|
381
|
+
'Implement user authentication',
|
|
382
|
+
'Create event management endpoints',
|
|
383
|
+
'Add event attendance functionality',
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
evaluation: {
|
|
387
|
+
criteria: {
|
|
388
|
+
correctness: 35,
|
|
389
|
+
codeQuality: 25,
|
|
390
|
+
architecture: 20,
|
|
391
|
+
performance: 10,
|
|
392
|
+
testing: 10,
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
scoring: {
|
|
396
|
+
system: 'numeric',
|
|
397
|
+
maxScore: 100,
|
|
398
|
+
passingThreshold: 75,
|
|
399
|
+
breakdown: true,
|
|
400
|
+
},
|
|
401
|
+
feedback: {
|
|
402
|
+
level: 'comprehensive',
|
|
403
|
+
includeExamples: true,
|
|
404
|
+
includeSuggestions: true,
|
|
405
|
+
includeResources: true,
|
|
406
|
+
},
|
|
407
|
+
constraints: {
|
|
408
|
+
targetLanguage: 'typescript',
|
|
409
|
+
framework: 'express',
|
|
410
|
+
allowedLibraries: ['express', 'joi', 'jsonwebtoken'],
|
|
411
|
+
forbiddenPatterns: ['eval', 'Function'],
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
catch (_error) {
|
|
416
|
+
logger_1.default.warn('Failed to parse YAML content, using default configuration');
|
|
417
|
+
throw new Error('YAML parsing failed. Please use JSON format or install js-yaml for YAML support.');
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=codingTestConfigLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codingTestConfigLoader.js","sourceRoot":"","sources":["../../src/utils/codingTestConfigLoader.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CH,oDA8BC;AAOD,kEA4CC;AAgID,8DA8BC;AAMD,sEAuCC;AAOD,kDAyDC;AArYD,4CAA8B;AAC9B,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B,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,cAAc,CAAC;gBACpD,iBAAiB,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;aACxC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,gBAAM,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;QACzE,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AI-powered dependency analysis for architectural reviews
|
|
3
|
+
*
|
|
4
|
+
* This module provides a dependency analysis approach that uses the AI model
|
|
5
|
+
* itself to analyze the project structure and dependencies, eliminating the
|
|
6
|
+
* need for external tools like dependency-cruiser that can cause installation issues.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Result of the AI-based dependency analysis
|
|
10
|
+
*/
|
|
11
|
+
export interface AIDependencyAnalysisResult {
|
|
12
|
+
/** Summary of dependencies in the project */
|
|
13
|
+
dependencySummary: string;
|
|
14
|
+
/** Potential architectural issues identified */
|
|
15
|
+
architecturalIssues: string;
|
|
16
|
+
/** Package.json analysis */
|
|
17
|
+
packageAnalysis: string;
|
|
18
|
+
/** Import/export structure analysis */
|
|
19
|
+
codeStructureAnalysis: string;
|
|
20
|
+
/** Recommendations for dependency management */
|
|
21
|
+
recommendations: string;
|
|
22
|
+
/** Raw AI response for debugging */
|
|
23
|
+
rawResponse?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a dependency analysis section for architectural reviews using AI
|
|
27
|
+
* @param projectPath The path to the project
|
|
28
|
+
* @returns Dependency analysis formatted for inclusion in reviews
|
|
29
|
+
*/
|
|
30
|
+
export declare function createAIDependencyAnalysis(projectPath: string): Promise<string>;
|