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,543 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured code review schema definitions used by cr-aia prompts and validators.
|
|
3
|
+
*
|
|
4
|
+
* We keep the TypeScript interfaces with matching Zod schemas so the runtime,
|
|
5
|
+
* validator, and prompt generator all stay in sync.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Priority level for code review issues
|
|
10
|
+
*/
|
|
11
|
+
export declare enum IssuePriority {
|
|
12
|
+
HIGH = "HIGH",
|
|
13
|
+
MEDIUM = "MEDIUM",
|
|
14
|
+
LOW = "LOW"
|
|
15
|
+
}
|
|
16
|
+
export declare const issuePrioritySchema: z.ZodNativeEnum<typeof IssuePriority>;
|
|
17
|
+
/**
|
|
18
|
+
* Location of an issue in the code
|
|
19
|
+
*/
|
|
20
|
+
export interface IssueLocation {
|
|
21
|
+
startLine: number;
|
|
22
|
+
endLine: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const issueLocationSchema: z.ZodObject<{
|
|
25
|
+
startLine: z.ZodNumber;
|
|
26
|
+
endLine: z.ZodNumber;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
startLine: number;
|
|
29
|
+
endLine: number;
|
|
30
|
+
}, {
|
|
31
|
+
startLine: number;
|
|
32
|
+
endLine: number;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* A single issue identified in the code review
|
|
36
|
+
*/
|
|
37
|
+
export interface ReviewIssue {
|
|
38
|
+
id: string;
|
|
39
|
+
priority: IssuePriority;
|
|
40
|
+
description: string;
|
|
41
|
+
location: IssueLocation;
|
|
42
|
+
currentCode: string;
|
|
43
|
+
suggestedCode: string;
|
|
44
|
+
explanation: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const reviewIssueSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
priority: z.ZodNativeEnum<typeof IssuePriority>;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
location: z.ZodObject<{
|
|
51
|
+
startLine: z.ZodNumber;
|
|
52
|
+
endLine: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
startLine: number;
|
|
55
|
+
endLine: number;
|
|
56
|
+
}, {
|
|
57
|
+
startLine: number;
|
|
58
|
+
endLine: number;
|
|
59
|
+
}>;
|
|
60
|
+
currentCode: z.ZodString;
|
|
61
|
+
suggestedCode: z.ZodString;
|
|
62
|
+
explanation: z.ZodString;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
id: string;
|
|
65
|
+
priority: IssuePriority;
|
|
66
|
+
description: string;
|
|
67
|
+
location: {
|
|
68
|
+
startLine: number;
|
|
69
|
+
endLine: number;
|
|
70
|
+
};
|
|
71
|
+
currentCode: string;
|
|
72
|
+
suggestedCode: string;
|
|
73
|
+
explanation: string;
|
|
74
|
+
}, {
|
|
75
|
+
id: string;
|
|
76
|
+
priority: IssuePriority;
|
|
77
|
+
description: string;
|
|
78
|
+
location: {
|
|
79
|
+
startLine: number;
|
|
80
|
+
endLine: number;
|
|
81
|
+
};
|
|
82
|
+
currentCode: string;
|
|
83
|
+
suggestedCode: string;
|
|
84
|
+
explanation: string;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Review results for a single file
|
|
88
|
+
*/
|
|
89
|
+
export interface FileReview {
|
|
90
|
+
filePath: string;
|
|
91
|
+
issues: ReviewIssue[];
|
|
92
|
+
}
|
|
93
|
+
export declare const fileReviewSchema: z.ZodObject<{
|
|
94
|
+
filePath: z.ZodString;
|
|
95
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
priority: z.ZodNativeEnum<typeof IssuePriority>;
|
|
98
|
+
description: z.ZodString;
|
|
99
|
+
location: z.ZodObject<{
|
|
100
|
+
startLine: z.ZodNumber;
|
|
101
|
+
endLine: z.ZodNumber;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
startLine: number;
|
|
104
|
+
endLine: number;
|
|
105
|
+
}, {
|
|
106
|
+
startLine: number;
|
|
107
|
+
endLine: number;
|
|
108
|
+
}>;
|
|
109
|
+
currentCode: z.ZodString;
|
|
110
|
+
suggestedCode: z.ZodString;
|
|
111
|
+
explanation: z.ZodString;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
id: string;
|
|
114
|
+
priority: IssuePriority;
|
|
115
|
+
description: string;
|
|
116
|
+
location: {
|
|
117
|
+
startLine: number;
|
|
118
|
+
endLine: number;
|
|
119
|
+
};
|
|
120
|
+
currentCode: string;
|
|
121
|
+
suggestedCode: string;
|
|
122
|
+
explanation: string;
|
|
123
|
+
}, {
|
|
124
|
+
id: string;
|
|
125
|
+
priority: IssuePriority;
|
|
126
|
+
description: string;
|
|
127
|
+
location: {
|
|
128
|
+
startLine: number;
|
|
129
|
+
endLine: number;
|
|
130
|
+
};
|
|
131
|
+
currentCode: string;
|
|
132
|
+
suggestedCode: string;
|
|
133
|
+
explanation: string;
|
|
134
|
+
}>, "many">;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
issues: {
|
|
137
|
+
id: string;
|
|
138
|
+
priority: IssuePriority;
|
|
139
|
+
description: string;
|
|
140
|
+
location: {
|
|
141
|
+
startLine: number;
|
|
142
|
+
endLine: number;
|
|
143
|
+
};
|
|
144
|
+
currentCode: string;
|
|
145
|
+
suggestedCode: string;
|
|
146
|
+
explanation: string;
|
|
147
|
+
}[];
|
|
148
|
+
filePath: string;
|
|
149
|
+
}, {
|
|
150
|
+
issues: {
|
|
151
|
+
id: string;
|
|
152
|
+
priority: IssuePriority;
|
|
153
|
+
description: string;
|
|
154
|
+
location: {
|
|
155
|
+
startLine: number;
|
|
156
|
+
endLine: number;
|
|
157
|
+
};
|
|
158
|
+
currentCode: string;
|
|
159
|
+
suggestedCode: string;
|
|
160
|
+
explanation: string;
|
|
161
|
+
}[];
|
|
162
|
+
filePath: string;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Summary statistics for the code review
|
|
166
|
+
*/
|
|
167
|
+
export interface ReviewSummary {
|
|
168
|
+
highPriorityIssues: number;
|
|
169
|
+
mediumPriorityIssues: number;
|
|
170
|
+
lowPriorityIssues: number;
|
|
171
|
+
totalIssues: number;
|
|
172
|
+
}
|
|
173
|
+
export declare const reviewSummarySchema: z.ZodObject<{
|
|
174
|
+
highPriorityIssues: z.ZodNumber;
|
|
175
|
+
mediumPriorityIssues: z.ZodNumber;
|
|
176
|
+
lowPriorityIssues: z.ZodNumber;
|
|
177
|
+
totalIssues: z.ZodNumber;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
highPriorityIssues: number;
|
|
180
|
+
mediumPriorityIssues: number;
|
|
181
|
+
lowPriorityIssues: number;
|
|
182
|
+
totalIssues: number;
|
|
183
|
+
}, {
|
|
184
|
+
highPriorityIssues: number;
|
|
185
|
+
mediumPriorityIssues: number;
|
|
186
|
+
lowPriorityIssues: number;
|
|
187
|
+
totalIssues: number;
|
|
188
|
+
}>;
|
|
189
|
+
/**
|
|
190
|
+
* Complete code review results
|
|
191
|
+
*/
|
|
192
|
+
export interface CodeReview {
|
|
193
|
+
version: string;
|
|
194
|
+
timestamp: string;
|
|
195
|
+
files: FileReview[];
|
|
196
|
+
summary: ReviewSummary;
|
|
197
|
+
}
|
|
198
|
+
export declare const codeReviewSchema: z.ZodObject<{
|
|
199
|
+
version: z.ZodString;
|
|
200
|
+
timestamp: z.ZodString;
|
|
201
|
+
files: z.ZodArray<z.ZodObject<{
|
|
202
|
+
filePath: z.ZodString;
|
|
203
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
priority: z.ZodNativeEnum<typeof IssuePriority>;
|
|
206
|
+
description: z.ZodString;
|
|
207
|
+
location: z.ZodObject<{
|
|
208
|
+
startLine: z.ZodNumber;
|
|
209
|
+
endLine: z.ZodNumber;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
startLine: number;
|
|
212
|
+
endLine: number;
|
|
213
|
+
}, {
|
|
214
|
+
startLine: number;
|
|
215
|
+
endLine: number;
|
|
216
|
+
}>;
|
|
217
|
+
currentCode: z.ZodString;
|
|
218
|
+
suggestedCode: z.ZodString;
|
|
219
|
+
explanation: z.ZodString;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
id: string;
|
|
222
|
+
priority: IssuePriority;
|
|
223
|
+
description: string;
|
|
224
|
+
location: {
|
|
225
|
+
startLine: number;
|
|
226
|
+
endLine: number;
|
|
227
|
+
};
|
|
228
|
+
currentCode: string;
|
|
229
|
+
suggestedCode: string;
|
|
230
|
+
explanation: string;
|
|
231
|
+
}, {
|
|
232
|
+
id: string;
|
|
233
|
+
priority: IssuePriority;
|
|
234
|
+
description: string;
|
|
235
|
+
location: {
|
|
236
|
+
startLine: number;
|
|
237
|
+
endLine: number;
|
|
238
|
+
};
|
|
239
|
+
currentCode: string;
|
|
240
|
+
suggestedCode: string;
|
|
241
|
+
explanation: string;
|
|
242
|
+
}>, "many">;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
issues: {
|
|
245
|
+
id: string;
|
|
246
|
+
priority: IssuePriority;
|
|
247
|
+
description: string;
|
|
248
|
+
location: {
|
|
249
|
+
startLine: number;
|
|
250
|
+
endLine: number;
|
|
251
|
+
};
|
|
252
|
+
currentCode: string;
|
|
253
|
+
suggestedCode: string;
|
|
254
|
+
explanation: string;
|
|
255
|
+
}[];
|
|
256
|
+
filePath: string;
|
|
257
|
+
}, {
|
|
258
|
+
issues: {
|
|
259
|
+
id: string;
|
|
260
|
+
priority: IssuePriority;
|
|
261
|
+
description: string;
|
|
262
|
+
location: {
|
|
263
|
+
startLine: number;
|
|
264
|
+
endLine: number;
|
|
265
|
+
};
|
|
266
|
+
currentCode: string;
|
|
267
|
+
suggestedCode: string;
|
|
268
|
+
explanation: string;
|
|
269
|
+
}[];
|
|
270
|
+
filePath: string;
|
|
271
|
+
}>, "many">;
|
|
272
|
+
summary: z.ZodObject<{
|
|
273
|
+
highPriorityIssues: z.ZodNumber;
|
|
274
|
+
mediumPriorityIssues: z.ZodNumber;
|
|
275
|
+
lowPriorityIssues: z.ZodNumber;
|
|
276
|
+
totalIssues: z.ZodNumber;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
highPriorityIssues: number;
|
|
279
|
+
mediumPriorityIssues: number;
|
|
280
|
+
lowPriorityIssues: number;
|
|
281
|
+
totalIssues: number;
|
|
282
|
+
}, {
|
|
283
|
+
highPriorityIssues: number;
|
|
284
|
+
mediumPriorityIssues: number;
|
|
285
|
+
lowPriorityIssues: number;
|
|
286
|
+
totalIssues: number;
|
|
287
|
+
}>;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
version: string;
|
|
290
|
+
timestamp: string;
|
|
291
|
+
files: {
|
|
292
|
+
issues: {
|
|
293
|
+
id: string;
|
|
294
|
+
priority: IssuePriority;
|
|
295
|
+
description: string;
|
|
296
|
+
location: {
|
|
297
|
+
startLine: number;
|
|
298
|
+
endLine: number;
|
|
299
|
+
};
|
|
300
|
+
currentCode: string;
|
|
301
|
+
suggestedCode: string;
|
|
302
|
+
explanation: string;
|
|
303
|
+
}[];
|
|
304
|
+
filePath: string;
|
|
305
|
+
}[];
|
|
306
|
+
summary: {
|
|
307
|
+
highPriorityIssues: number;
|
|
308
|
+
mediumPriorityIssues: number;
|
|
309
|
+
lowPriorityIssues: number;
|
|
310
|
+
totalIssues: number;
|
|
311
|
+
};
|
|
312
|
+
}, {
|
|
313
|
+
version: string;
|
|
314
|
+
timestamp: string;
|
|
315
|
+
files: {
|
|
316
|
+
issues: {
|
|
317
|
+
id: string;
|
|
318
|
+
priority: IssuePriority;
|
|
319
|
+
description: string;
|
|
320
|
+
location: {
|
|
321
|
+
startLine: number;
|
|
322
|
+
endLine: number;
|
|
323
|
+
};
|
|
324
|
+
currentCode: string;
|
|
325
|
+
suggestedCode: string;
|
|
326
|
+
explanation: string;
|
|
327
|
+
}[];
|
|
328
|
+
filePath: string;
|
|
329
|
+
}[];
|
|
330
|
+
summary: {
|
|
331
|
+
highPriorityIssues: number;
|
|
332
|
+
mediumPriorityIssues: number;
|
|
333
|
+
lowPriorityIssues: number;
|
|
334
|
+
totalIssues: number;
|
|
335
|
+
};
|
|
336
|
+
}>;
|
|
337
|
+
/**
|
|
338
|
+
* Root object for the code review schema
|
|
339
|
+
*/
|
|
340
|
+
export interface ReviewSchema {
|
|
341
|
+
review: CodeReview;
|
|
342
|
+
}
|
|
343
|
+
export declare const reviewSchema: z.ZodObject<{
|
|
344
|
+
review: z.ZodObject<{
|
|
345
|
+
version: z.ZodString;
|
|
346
|
+
timestamp: z.ZodString;
|
|
347
|
+
files: z.ZodArray<z.ZodObject<{
|
|
348
|
+
filePath: z.ZodString;
|
|
349
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
350
|
+
id: z.ZodString;
|
|
351
|
+
priority: z.ZodNativeEnum<typeof IssuePriority>;
|
|
352
|
+
description: z.ZodString;
|
|
353
|
+
location: z.ZodObject<{
|
|
354
|
+
startLine: z.ZodNumber;
|
|
355
|
+
endLine: z.ZodNumber;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
startLine: number;
|
|
358
|
+
endLine: number;
|
|
359
|
+
}, {
|
|
360
|
+
startLine: number;
|
|
361
|
+
endLine: number;
|
|
362
|
+
}>;
|
|
363
|
+
currentCode: z.ZodString;
|
|
364
|
+
suggestedCode: z.ZodString;
|
|
365
|
+
explanation: z.ZodString;
|
|
366
|
+
}, "strip", z.ZodTypeAny, {
|
|
367
|
+
id: string;
|
|
368
|
+
priority: IssuePriority;
|
|
369
|
+
description: string;
|
|
370
|
+
location: {
|
|
371
|
+
startLine: number;
|
|
372
|
+
endLine: number;
|
|
373
|
+
};
|
|
374
|
+
currentCode: string;
|
|
375
|
+
suggestedCode: string;
|
|
376
|
+
explanation: string;
|
|
377
|
+
}, {
|
|
378
|
+
id: string;
|
|
379
|
+
priority: IssuePriority;
|
|
380
|
+
description: string;
|
|
381
|
+
location: {
|
|
382
|
+
startLine: number;
|
|
383
|
+
endLine: number;
|
|
384
|
+
};
|
|
385
|
+
currentCode: string;
|
|
386
|
+
suggestedCode: string;
|
|
387
|
+
explanation: string;
|
|
388
|
+
}>, "many">;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
issues: {
|
|
391
|
+
id: string;
|
|
392
|
+
priority: IssuePriority;
|
|
393
|
+
description: string;
|
|
394
|
+
location: {
|
|
395
|
+
startLine: number;
|
|
396
|
+
endLine: number;
|
|
397
|
+
};
|
|
398
|
+
currentCode: string;
|
|
399
|
+
suggestedCode: string;
|
|
400
|
+
explanation: string;
|
|
401
|
+
}[];
|
|
402
|
+
filePath: string;
|
|
403
|
+
}, {
|
|
404
|
+
issues: {
|
|
405
|
+
id: string;
|
|
406
|
+
priority: IssuePriority;
|
|
407
|
+
description: string;
|
|
408
|
+
location: {
|
|
409
|
+
startLine: number;
|
|
410
|
+
endLine: number;
|
|
411
|
+
};
|
|
412
|
+
currentCode: string;
|
|
413
|
+
suggestedCode: string;
|
|
414
|
+
explanation: string;
|
|
415
|
+
}[];
|
|
416
|
+
filePath: string;
|
|
417
|
+
}>, "many">;
|
|
418
|
+
summary: z.ZodObject<{
|
|
419
|
+
highPriorityIssues: z.ZodNumber;
|
|
420
|
+
mediumPriorityIssues: z.ZodNumber;
|
|
421
|
+
lowPriorityIssues: z.ZodNumber;
|
|
422
|
+
totalIssues: z.ZodNumber;
|
|
423
|
+
}, "strip", z.ZodTypeAny, {
|
|
424
|
+
highPriorityIssues: number;
|
|
425
|
+
mediumPriorityIssues: number;
|
|
426
|
+
lowPriorityIssues: number;
|
|
427
|
+
totalIssues: number;
|
|
428
|
+
}, {
|
|
429
|
+
highPriorityIssues: number;
|
|
430
|
+
mediumPriorityIssues: number;
|
|
431
|
+
lowPriorityIssues: number;
|
|
432
|
+
totalIssues: number;
|
|
433
|
+
}>;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
version: string;
|
|
436
|
+
timestamp: string;
|
|
437
|
+
files: {
|
|
438
|
+
issues: {
|
|
439
|
+
id: string;
|
|
440
|
+
priority: IssuePriority;
|
|
441
|
+
description: string;
|
|
442
|
+
location: {
|
|
443
|
+
startLine: number;
|
|
444
|
+
endLine: number;
|
|
445
|
+
};
|
|
446
|
+
currentCode: string;
|
|
447
|
+
suggestedCode: string;
|
|
448
|
+
explanation: string;
|
|
449
|
+
}[];
|
|
450
|
+
filePath: string;
|
|
451
|
+
}[];
|
|
452
|
+
summary: {
|
|
453
|
+
highPriorityIssues: number;
|
|
454
|
+
mediumPriorityIssues: number;
|
|
455
|
+
lowPriorityIssues: number;
|
|
456
|
+
totalIssues: number;
|
|
457
|
+
};
|
|
458
|
+
}, {
|
|
459
|
+
version: string;
|
|
460
|
+
timestamp: string;
|
|
461
|
+
files: {
|
|
462
|
+
issues: {
|
|
463
|
+
id: string;
|
|
464
|
+
priority: IssuePriority;
|
|
465
|
+
description: string;
|
|
466
|
+
location: {
|
|
467
|
+
startLine: number;
|
|
468
|
+
endLine: number;
|
|
469
|
+
};
|
|
470
|
+
currentCode: string;
|
|
471
|
+
suggestedCode: string;
|
|
472
|
+
explanation: string;
|
|
473
|
+
}[];
|
|
474
|
+
filePath: string;
|
|
475
|
+
}[];
|
|
476
|
+
summary: {
|
|
477
|
+
highPriorityIssues: number;
|
|
478
|
+
mediumPriorityIssues: number;
|
|
479
|
+
lowPriorityIssues: number;
|
|
480
|
+
totalIssues: number;
|
|
481
|
+
};
|
|
482
|
+
}>;
|
|
483
|
+
}, "strip", z.ZodTypeAny, {
|
|
484
|
+
review: {
|
|
485
|
+
version: string;
|
|
486
|
+
timestamp: string;
|
|
487
|
+
files: {
|
|
488
|
+
issues: {
|
|
489
|
+
id: string;
|
|
490
|
+
priority: IssuePriority;
|
|
491
|
+
description: string;
|
|
492
|
+
location: {
|
|
493
|
+
startLine: number;
|
|
494
|
+
endLine: number;
|
|
495
|
+
};
|
|
496
|
+
currentCode: string;
|
|
497
|
+
suggestedCode: string;
|
|
498
|
+
explanation: string;
|
|
499
|
+
}[];
|
|
500
|
+
filePath: string;
|
|
501
|
+
}[];
|
|
502
|
+
summary: {
|
|
503
|
+
highPriorityIssues: number;
|
|
504
|
+
mediumPriorityIssues: number;
|
|
505
|
+
lowPriorityIssues: number;
|
|
506
|
+
totalIssues: number;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
}, {
|
|
510
|
+
review: {
|
|
511
|
+
version: string;
|
|
512
|
+
timestamp: string;
|
|
513
|
+
files: {
|
|
514
|
+
issues: {
|
|
515
|
+
id: string;
|
|
516
|
+
priority: IssuePriority;
|
|
517
|
+
description: string;
|
|
518
|
+
location: {
|
|
519
|
+
startLine: number;
|
|
520
|
+
endLine: number;
|
|
521
|
+
};
|
|
522
|
+
currentCode: string;
|
|
523
|
+
suggestedCode: string;
|
|
524
|
+
explanation: string;
|
|
525
|
+
}[];
|
|
526
|
+
filePath: string;
|
|
527
|
+
}[];
|
|
528
|
+
summary: {
|
|
529
|
+
highPriorityIssues: number;
|
|
530
|
+
mediumPriorityIssues: number;
|
|
531
|
+
lowPriorityIssues: number;
|
|
532
|
+
totalIssues: number;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
}>;
|
|
536
|
+
/**
|
|
537
|
+
* Get the schema as a string for inclusion in prompts
|
|
538
|
+
*/
|
|
539
|
+
export declare function getSchemaAsString(): string;
|
|
540
|
+
/**
|
|
541
|
+
* Get schema instructions for inclusion in prompts
|
|
542
|
+
*/
|
|
543
|
+
export declare function getSchemaInstructions(): string;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Structured code review schema definitions used by cr-aia prompts and validators.
|
|
4
|
+
*
|
|
5
|
+
* We keep the TypeScript interfaces with matching Zod schemas so the runtime,
|
|
6
|
+
* validator, and prompt generator all stay in sync.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.reviewSchema = exports.codeReviewSchema = exports.reviewSummarySchema = exports.fileReviewSchema = exports.reviewIssueSchema = exports.issueLocationSchema = exports.issuePrioritySchema = exports.IssuePriority = void 0;
|
|
10
|
+
exports.getSchemaAsString = getSchemaAsString;
|
|
11
|
+
exports.getSchemaInstructions = getSchemaInstructions;
|
|
12
|
+
const zod_1 = require("zod");
|
|
13
|
+
/**
|
|
14
|
+
* Priority level for code review issues
|
|
15
|
+
*/
|
|
16
|
+
var IssuePriority;
|
|
17
|
+
(function (IssuePriority) {
|
|
18
|
+
IssuePriority["HIGH"] = "HIGH";
|
|
19
|
+
IssuePriority["MEDIUM"] = "MEDIUM";
|
|
20
|
+
IssuePriority["LOW"] = "LOW";
|
|
21
|
+
})(IssuePriority || (exports.IssuePriority = IssuePriority = {}));
|
|
22
|
+
// Zod schema for issue priority
|
|
23
|
+
exports.issuePrioritySchema = zod_1.z.nativeEnum(IssuePriority);
|
|
24
|
+
// Zod schema for issue location
|
|
25
|
+
exports.issueLocationSchema = zod_1.z.object({
|
|
26
|
+
startLine: zod_1.z.number(),
|
|
27
|
+
endLine: zod_1.z.number(),
|
|
28
|
+
});
|
|
29
|
+
// Zod schema for review issue
|
|
30
|
+
exports.reviewIssueSchema = zod_1.z.object({
|
|
31
|
+
id: zod_1.z.string(),
|
|
32
|
+
priority: exports.issuePrioritySchema,
|
|
33
|
+
description: zod_1.z.string(),
|
|
34
|
+
location: exports.issueLocationSchema,
|
|
35
|
+
currentCode: zod_1.z.string(),
|
|
36
|
+
suggestedCode: zod_1.z.string(),
|
|
37
|
+
explanation: zod_1.z.string(),
|
|
38
|
+
});
|
|
39
|
+
// Zod schema for file review
|
|
40
|
+
exports.fileReviewSchema = zod_1.z.object({
|
|
41
|
+
filePath: zod_1.z.string(),
|
|
42
|
+
issues: zod_1.z.array(exports.reviewIssueSchema),
|
|
43
|
+
});
|
|
44
|
+
// Zod schema for review summary
|
|
45
|
+
exports.reviewSummarySchema = zod_1.z.object({
|
|
46
|
+
highPriorityIssues: zod_1.z.number(),
|
|
47
|
+
mediumPriorityIssues: zod_1.z.number(),
|
|
48
|
+
lowPriorityIssues: zod_1.z.number(),
|
|
49
|
+
totalIssues: zod_1.z.number(),
|
|
50
|
+
});
|
|
51
|
+
// Zod schema for code review
|
|
52
|
+
exports.codeReviewSchema = zod_1.z.object({
|
|
53
|
+
version: zod_1.z.string(),
|
|
54
|
+
timestamp: zod_1.z.string(),
|
|
55
|
+
files: zod_1.z.array(exports.fileReviewSchema),
|
|
56
|
+
summary: exports.reviewSummarySchema,
|
|
57
|
+
});
|
|
58
|
+
// Zod schema for review schema
|
|
59
|
+
exports.reviewSchema = zod_1.z.object({
|
|
60
|
+
review: exports.codeReviewSchema,
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Get the schema as a string for inclusion in prompts
|
|
64
|
+
*/
|
|
65
|
+
function getSchemaAsString() {
|
|
66
|
+
return `
|
|
67
|
+
{
|
|
68
|
+
"review": {
|
|
69
|
+
"version": "1.0",
|
|
70
|
+
"timestamp": "2024-04-06T12:00:00Z",
|
|
71
|
+
"files": [
|
|
72
|
+
{
|
|
73
|
+
"filePath": "path/to/file.ts",
|
|
74
|
+
"issues": [
|
|
75
|
+
{
|
|
76
|
+
"id": "ISSUE-1",
|
|
77
|
+
"priority": "HIGH",
|
|
78
|
+
"description": "Description of the issue",
|
|
79
|
+
"location": {
|
|
80
|
+
"startLine": 10,
|
|
81
|
+
"endLine": 15
|
|
82
|
+
},
|
|
83
|
+
"currentCode": "function example() {\\n // Problematic code here\\n}",
|
|
84
|
+
"suggestedCode": "function example() {\\n // Improved code here\\n}",
|
|
85
|
+
"explanation": "Detailed explanation of why this change is recommended"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"summary": {
|
|
91
|
+
"highPriorityIssues": 1,
|
|
92
|
+
"mediumPriorityIssues": 2,
|
|
93
|
+
"lowPriorityIssues": 3,
|
|
94
|
+
"totalIssues": 6
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get schema instructions for inclusion in prompts
|
|
102
|
+
*/
|
|
103
|
+
function getSchemaInstructions() {
|
|
104
|
+
return `
|
|
105
|
+
IMPORTANT: In interactive mode, you MUST format your response as a valid JSON object following this exact schema:
|
|
106
|
+
|
|
107
|
+
${getSchemaAsString()}
|
|
108
|
+
|
|
109
|
+
Guidelines for filling the schema:
|
|
110
|
+
1. Each issue must have a unique ID (e.g., "ISSUE-1", "ISSUE-2")
|
|
111
|
+
2. Priority must be one of: "HIGH", "MEDIUM", "LOW"
|
|
112
|
+
3. Location should include the start and end line numbers of the affected code
|
|
113
|
+
4. Current code should be the exact code snippet that needs to be changed
|
|
114
|
+
5. Suggested code should be the improved version of the code
|
|
115
|
+
6. Explanation should provide a detailed rationale for the suggested change
|
|
116
|
+
7. The summary should accurately count the number of issues by priority
|
|
117
|
+
|
|
118
|
+
Your response must be valid JSON that can be parsed programmatically. Do not include any text outside of the JSON structure.
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=reviewSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewSchema.js","sourceRoot":"","sources":["../../src/types/reviewSchema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuHH,8CAkCC;AAKD,sDAiBC;AA7KD,6BAAwB;AAExB;;GAEG;AACH,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,4BAAW,CAAA;AACb,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,gCAAgC;AACnB,QAAA,mBAAmB,GAAG,OAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAU/D,gCAAgC;AACnB,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAeH,8BAA8B;AACjB,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,QAAQ,EAAE,2BAAmB;IAC7B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,2BAAmB;IAC7B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AAUH,6BAA6B;AAChB,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC;CACnC,CAAC,CAAC;AAYH,gCAAgC;AACnB,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC9B,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE;IAChC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AAYH,6BAA6B;AAChB,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;IAChC,OAAO,EAAE,2BAAmB;CAC7B,CAAC,CAAC;AASH,+BAA+B;AAClB,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,wBAAgB;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,OAAO;;;EAGP,iBAAiB,EAAE;;;;;;;;;;;;CAYpB,CAAC;AACF,CAAC"}
|