memor-code-cli 0.2.0
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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/IntentionalStructure/index.d.ts +13 -0
- package/dist/IntentionalStructure/index.d.ts.map +1 -0
- package/dist/IntentionalStructure/index.js +46 -0
- package/dist/IntentionalStructure/index.js.map +1 -0
- package/dist/IntentionalStructure/parseCompose.d.ts +13 -0
- package/dist/IntentionalStructure/parseCompose.d.ts.map +1 -0
- package/dist/IntentionalStructure/parseCompose.js +234 -0
- package/dist/IntentionalStructure/parseCompose.js.map +1 -0
- package/dist/IntentionalStructure/parseDeployConfigs.d.ts +7 -0
- package/dist/IntentionalStructure/parseDeployConfigs.d.ts.map +1 -0
- package/dist/IntentionalStructure/parseDeployConfigs.js +168 -0
- package/dist/IntentionalStructure/parseDeployConfigs.js.map +1 -0
- package/dist/IntentionalStructure/parseEnvWiring.d.ts +7 -0
- package/dist/IntentionalStructure/parseEnvWiring.d.ts.map +1 -0
- package/dist/IntentionalStructure/parseEnvWiring.js +159 -0
- package/dist/IntentionalStructure/parseEnvWiring.js.map +1 -0
- package/dist/IntentionalStructure/parseWorkspaces.d.ts +8 -0
- package/dist/IntentionalStructure/parseWorkspaces.d.ts.map +1 -0
- package/dist/IntentionalStructure/parseWorkspaces.js +179 -0
- package/dist/IntentionalStructure/parseWorkspaces.js.map +1 -0
- package/dist/IntentionalStructure/types.d.ts +34 -0
- package/dist/IntentionalStructure/types.d.ts.map +1 -0
- package/dist/IntentionalStructure/types.js +8 -0
- package/dist/IntentionalStructure/types.js.map +1 -0
- package/dist/RepoTypeDetection/applyRepoModeConsistency.d.ts +11 -0
- package/dist/RepoTypeDetection/applyRepoModeConsistency.d.ts.map +1 -0
- package/dist/RepoTypeDetection/applyRepoModeConsistency.js +53 -0
- package/dist/RepoTypeDetection/applyRepoModeConsistency.js.map +1 -0
- package/dist/RepoTypeDetection/detectAppArchetype.d.ts +12 -0
- package/dist/RepoTypeDetection/detectAppArchetype.d.ts.map +1 -0
- package/dist/RepoTypeDetection/detectAppArchetype.js +162 -0
- package/dist/RepoTypeDetection/detectAppArchetype.js.map +1 -0
- package/dist/RepoTypeDetection/detectPackageArchetype.d.ts +10 -0
- package/dist/RepoTypeDetection/detectPackageArchetype.d.ts.map +1 -0
- package/dist/RepoTypeDetection/detectPackageArchetype.js +149 -0
- package/dist/RepoTypeDetection/detectPackageArchetype.js.map +1 -0
- package/dist/RepoTypeDetection/detectRepoCenterSystems.d.ts +11 -0
- package/dist/RepoTypeDetection/detectRepoCenterSystems.d.ts.map +1 -0
- package/dist/RepoTypeDetection/detectRepoCenterSystems.js +123 -0
- package/dist/RepoTypeDetection/detectRepoCenterSystems.js.map +1 -0
- package/dist/RepoTypeDetection/detectRepoMode.d.ts +16 -0
- package/dist/RepoTypeDetection/detectRepoMode.d.ts.map +1 -0
- package/dist/RepoTypeDetection/detectRepoMode.js +338 -0
- package/dist/RepoTypeDetection/detectRepoMode.js.map +1 -0
- package/dist/RepoTypeDetection/detectRepoSignals.d.ts +13 -0
- package/dist/RepoTypeDetection/detectRepoSignals.d.ts.map +1 -0
- package/dist/RepoTypeDetection/detectRepoSignals.js +451 -0
- package/dist/RepoTypeDetection/detectRepoSignals.js.map +1 -0
- package/dist/RepoTypeDetection/inferSupportRole.d.ts +8 -0
- package/dist/RepoTypeDetection/inferSupportRole.d.ts.map +1 -0
- package/dist/RepoTypeDetection/inferSupportRole.js +177 -0
- package/dist/RepoTypeDetection/inferSupportRole.js.map +1 -0
- package/dist/RuntimeInference/detectEnvConsumers.d.ts +7 -0
- package/dist/RuntimeInference/detectEnvConsumers.d.ts.map +1 -0
- package/dist/RuntimeInference/detectEnvConsumers.js +108 -0
- package/dist/RuntimeInference/detectEnvConsumers.js.map +1 -0
- package/dist/RuntimeInference/detectHttpEdges.d.ts +4 -0
- package/dist/RuntimeInference/detectHttpEdges.d.ts.map +1 -0
- package/dist/RuntimeInference/detectHttpEdges.js +146 -0
- package/dist/RuntimeInference/detectHttpEdges.js.map +1 -0
- package/dist/RuntimeInference/detectOrmConsumers.d.ts +5 -0
- package/dist/RuntimeInference/detectOrmConsumers.d.ts.map +1 -0
- package/dist/RuntimeInference/detectOrmConsumers.js +117 -0
- package/dist/RuntimeInference/detectOrmConsumers.js.map +1 -0
- package/dist/RuntimeInference/detectProxyRewrites.d.ts +5 -0
- package/dist/RuntimeInference/detectProxyRewrites.d.ts.map +1 -0
- package/dist/RuntimeInference/detectProxyRewrites.js +137 -0
- package/dist/RuntimeInference/detectProxyRewrites.js.map +1 -0
- package/dist/RuntimeInference/detectTrpcEdges.d.ts +4 -0
- package/dist/RuntimeInference/detectTrpcEdges.d.ts.map +1 -0
- package/dist/RuntimeInference/detectTrpcEdges.js +137 -0
- package/dist/RuntimeInference/detectTrpcEdges.js.map +1 -0
- package/dist/RuntimeInference/index.d.ts +17 -0
- package/dist/RuntimeInference/index.d.ts.map +1 -0
- package/dist/RuntimeInference/index.js +32 -0
- package/dist/RuntimeInference/index.js.map +1 -0
- package/dist/RuntimeInference/types.d.ts +8 -0
- package/dist/RuntimeInference/types.d.ts.map +1 -0
- package/dist/RuntimeInference/types.js +3 -0
- package/dist/RuntimeInference/types.js.map +1 -0
- package/dist/SystemSynthesis/index.d.ts +27 -0
- package/dist/SystemSynthesis/index.d.ts.map +1 -0
- package/dist/SystemSynthesis/index.js +31 -0
- package/dist/SystemSynthesis/index.js.map +1 -0
- package/dist/SystemSynthesis/mergeLayerOutputs.d.ts +13 -0
- package/dist/SystemSynthesis/mergeLayerOutputs.d.ts.map +1 -0
- package/dist/SystemSynthesis/mergeLayerOutputs.js +220 -0
- package/dist/SystemSynthesis/mergeLayerOutputs.js.map +1 -0
- package/dist/SystemSynthesis/stampDeterministic.d.ts +11 -0
- package/dist/SystemSynthesis/stampDeterministic.d.ts.map +1 -0
- package/dist/SystemSynthesis/stampDeterministic.js +177 -0
- package/dist/SystemSynthesis/stampDeterministic.js.map +1 -0
- package/dist/SystemSynthesis/synthesize.d.ts +15 -0
- package/dist/SystemSynthesis/synthesize.d.ts.map +1 -0
- package/dist/SystemSynthesis/synthesize.js +258 -0
- package/dist/SystemSynthesis/synthesize.js.map +1 -0
- package/dist/SystemSynthesis/types.d.ts +110 -0
- package/dist/SystemSynthesis/types.d.ts.map +1 -0
- package/dist/SystemSynthesis/types.js +12 -0
- package/dist/SystemSynthesis/types.js.map +1 -0
- package/dist/amGeneration/buildFlowGraph.d.ts +39 -0
- package/dist/amGeneration/buildFlowGraph.d.ts.map +1 -0
- package/dist/amGeneration/buildFlowGraph.js +643 -0
- package/dist/amGeneration/buildFlowGraph.js.map +1 -0
- package/dist/amGeneration/enrichAMEdges.d.ts +16 -0
- package/dist/amGeneration/enrichAMEdges.d.ts.map +1 -0
- package/dist/amGeneration/enrichAMEdges.js +291 -0
- package/dist/amGeneration/enrichAMEdges.js.map +1 -0
- package/dist/amGeneration/generateAM.d.ts +23 -0
- package/dist/amGeneration/generateAM.d.ts.map +1 -0
- package/dist/amGeneration/generateAM.js +131 -0
- package/dist/amGeneration/generateAM.js.map +1 -0
- package/dist/amGeneration/generateAMForRepo.d.ts +6 -0
- package/dist/amGeneration/generateAMForRepo.d.ts.map +1 -0
- package/dist/amGeneration/generateAMForRepo.js +130 -0
- package/dist/amGeneration/generateAMForRepo.js.map +1 -0
- package/dist/amGeneration/generateFlows.d.ts +27 -0
- package/dist/amGeneration/generateFlows.d.ts.map +1 -0
- package/dist/amGeneration/generateFlows.js +320 -0
- package/dist/amGeneration/generateFlows.js.map +1 -0
- package/dist/amGeneration/promptBuilder.d.ts +24 -0
- package/dist/amGeneration/promptBuilder.d.ts.map +1 -0
- package/dist/amGeneration/promptBuilder.js +299 -0
- package/dist/amGeneration/promptBuilder.js.map +1 -0
- package/dist/amGeneration/selectStrategicFiles.d.ts +42 -0
- package/dist/amGeneration/selectStrategicFiles.d.ts.map +1 -0
- package/dist/amGeneration/selectStrategicFiles.js +672 -0
- package/dist/amGeneration/selectStrategicFiles.js.map +1 -0
- package/dist/amGeneration/types.d.ts +83 -0
- package/dist/amGeneration/types.d.ts.map +1 -0
- package/dist/amGeneration/types.js +9 -0
- package/dist/amGeneration/types.js.map +1 -0
- package/dist/amSections.d.ts +29 -0
- package/dist/amSections.d.ts.map +1 -0
- package/dist/amSections.js +424 -0
- package/dist/amSections.js.map +1 -0
- package/dist/analysis/analysisCache.d.ts +4 -0
- package/dist/analysis/analysisCache.d.ts.map +1 -0
- package/dist/analysis/analysisCache.js +92 -0
- package/dist/analysis/analysisCache.js.map +1 -0
- package/dist/analysis/buildBranchStory.d.ts +95 -0
- package/dist/analysis/buildBranchStory.d.ts.map +1 -0
- package/dist/analysis/buildBranchStory.js +1264 -0
- package/dist/analysis/buildBranchStory.js.map +1 -0
- package/dist/analysis/buildDetailedFileXRay.d.ts +49 -0
- package/dist/analysis/buildDetailedFileXRay.d.ts.map +1 -0
- package/dist/analysis/buildDetailedFileXRay.js +607 -0
- package/dist/analysis/buildDetailedFileXRay.js.map +1 -0
- package/dist/analysis/buildFileXRay.d.ts +35 -0
- package/dist/analysis/buildFileXRay.d.ts.map +1 -0
- package/dist/analysis/buildFileXRay.js +305 -0
- package/dist/analysis/buildFileXRay.js.map +1 -0
- package/dist/analysis/classifySilentKiller.d.ts +14 -0
- package/dist/analysis/classifySilentKiller.d.ts.map +1 -0
- package/dist/analysis/classifySilentKiller.js +235 -0
- package/dist/analysis/classifySilentKiller.js.map +1 -0
- package/dist/analysis/diffChunks.d.ts +21 -0
- package/dist/analysis/diffChunks.d.ts.map +1 -0
- package/dist/analysis/diffChunks.js +302 -0
- package/dist/analysis/diffChunks.js.map +1 -0
- package/dist/analysis/extractRouteMap.d.ts +49 -0
- package/dist/analysis/extractRouteMap.d.ts.map +1 -0
- package/dist/analysis/extractRouteMap.js +354 -0
- package/dist/analysis/extractRouteMap.js.map +1 -0
- package/dist/analysis/generateFileInsight.d.ts +19 -0
- package/dist/analysis/generateFileInsight.d.ts.map +1 -0
- package/dist/analysis/generateFileInsight.js +103 -0
- package/dist/analysis/generateFileInsight.js.map +1 -0
- package/dist/analysis/llmXRay.d.ts +39 -0
- package/dist/analysis/llmXRay.d.ts.map +1 -0
- package/dist/analysis/llmXRay.js +208 -0
- package/dist/analysis/llmXRay.js.map +1 -0
- package/dist/analysis/simulateFailure.d.ts +44 -0
- package/dist/analysis/simulateFailure.d.ts.map +1 -0
- package/dist/analysis/simulateFailure.js +407 -0
- package/dist/analysis/simulateFailure.js.map +1 -0
- package/dist/anthropic.d.ts +3 -0
- package/dist/anthropic.d.ts.map +1 -0
- package/dist/anthropic.js +16 -0
- package/dist/anthropic.js.map +1 -0
- package/dist/app/buildAppPage.d.ts +34 -0
- package/dist/app/buildAppPage.d.ts.map +1 -0
- package/dist/app/buildAppPage.js +3085 -0
- package/dist/app/buildAppPage.js.map +1 -0
- package/dist/app-bundle.js +122 -0
- package/dist/buildAppData.d.ts +3 -0
- package/dist/buildAppData.d.ts.map +1 -0
- package/dist/buildAppData.js +207 -0
- package/dist/buildAppData.js.map +1 -0
- package/dist/builders/analyzeRepo.d.ts +25 -0
- package/dist/builders/analyzeRepo.d.ts.map +1 -0
- package/dist/builders/analyzeRepo.js +873 -0
- package/dist/builders/analyzeRepo.js.map +1 -0
- package/dist/builders/buildSystemConnections.d.ts +3 -0
- package/dist/builders/buildSystemConnections.d.ts.map +1 -0
- package/dist/builders/buildSystemConnections.js +388 -0
- package/dist/builders/buildSystemConnections.js.map +1 -0
- package/dist/builders/buildTextSummary.d.ts +61 -0
- package/dist/builders/buildTextSummary.d.ts.map +1 -0
- package/dist/builders/buildTextSummary.js +178 -0
- package/dist/builders/buildTextSummary.js.map +1 -0
- package/dist/builders/deriveRecommendedStartPath.d.ts +11 -0
- package/dist/builders/deriveRecommendedStartPath.d.ts.map +1 -0
- package/dist/builders/deriveRecommendedStartPath.js +140 -0
- package/dist/builders/deriveRecommendedStartPath.js.map +1 -0
- package/dist/builders/deriveRuntimeRole.d.ts +4 -0
- package/dist/builders/deriveRuntimeRole.d.ts.map +1 -0
- package/dist/builders/deriveRuntimeRole.js +30 -0
- package/dist/builders/deriveRuntimeRole.js.map +1 -0
- package/dist/builders/detectRunCommands.d.ts +16 -0
- package/dist/builders/detectRunCommands.d.ts.map +1 -0
- package/dist/builders/detectRunCommands.js +285 -0
- package/dist/builders/detectRunCommands.js.map +1 -0
- package/dist/builders/generateSystemNarrative.d.ts +12 -0
- package/dist/builders/generateSystemNarrative.d.ts.map +1 -0
- package/dist/builders/generateSystemNarrative.js +474 -0
- package/dist/builders/generateSystemNarrative.js.map +1 -0
- package/dist/builders/gitLogParser.d.ts +15 -0
- package/dist/builders/gitLogParser.d.ts.map +1 -0
- package/dist/builders/gitLogParser.js +116 -0
- package/dist/builders/gitLogParser.js.map +1 -0
- package/dist/builders/readRepoContext.d.ts +30 -0
- package/dist/builders/readRepoContext.d.ts.map +1 -0
- package/dist/builders/readRepoContext.js +323 -0
- package/dist/builders/readRepoContext.js.map +1 -0
- package/dist/builders/readSystemReadme.d.ts +39 -0
- package/dist/builders/readSystemReadme.d.ts.map +1 -0
- package/dist/builders/readSystemReadme.js +133 -0
- package/dist/builders/readSystemReadme.js.map +1 -0
- package/dist/builders/systemRanking.d.ts +24 -0
- package/dist/builders/systemRanking.d.ts.map +1 -0
- package/dist/builders/systemRanking.js +153 -0
- package/dist/builders/systemRanking.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +170 -0
- package/dist/cli.js.map +1 -0
- package/dist/detectors/applyRunnableConfidenceGate.d.ts +8 -0
- package/dist/detectors/applyRunnableConfidenceGate.d.ts.map +1 -0
- package/dist/detectors/applyRunnableConfidenceGate.js +166 -0
- package/dist/detectors/applyRunnableConfidenceGate.js.map +1 -0
- package/dist/detectors/classifySystemType.d.ts +17 -0
- package/dist/detectors/classifySystemType.d.ts.map +1 -0
- package/dist/detectors/classifySystemType.js +460 -0
- package/dist/detectors/classifySystemType.js.map +1 -0
- package/dist/detectors/detectAppInternalUnits.d.ts +20 -0
- package/dist/detectors/detectAppInternalUnits.d.ts.map +1 -0
- package/dist/detectors/detectAppInternalUnits.js +454 -0
- package/dist/detectors/detectAppInternalUnits.js.map +1 -0
- package/dist/detectors/detectBlocks.d.ts +6 -0
- package/dist/detectors/detectBlocks.d.ts.map +1 -0
- package/dist/detectors/detectBlocks.js +354 -0
- package/dist/detectors/detectBlocks.js.map +1 -0
- package/dist/detectors/detectComposeServices.d.ts +23 -0
- package/dist/detectors/detectComposeServices.d.ts.map +1 -0
- package/dist/detectors/detectComposeServices.js +255 -0
- package/dist/detectors/detectComposeServices.js.map +1 -0
- package/dist/detectors/detectEntryPoints.d.ts +6 -0
- package/dist/detectors/detectEntryPoints.d.ts.map +1 -0
- package/dist/detectors/detectEntryPoints.js +376 -0
- package/dist/detectors/detectEntryPoints.js.map +1 -0
- package/dist/detectors/detectSubsystems.d.ts +6 -0
- package/dist/detectors/detectSubsystems.d.ts.map +1 -0
- package/dist/detectors/detectSubsystems.js +376 -0
- package/dist/detectors/detectSubsystems.js.map +1 -0
- package/dist/detectors/detectSystemCandidates.d.ts +3 -0
- package/dist/detectors/detectSystemCandidates.d.ts.map +1 -0
- package/dist/detectors/detectSystemCandidates.js +577 -0
- package/dist/detectors/detectSystemCandidates.js.map +1 -0
- package/dist/devWatcher.d.ts +14 -0
- package/dist/devWatcher.d.ts.map +1 -0
- package/dist/devWatcher.js +96 -0
- package/dist/devWatcher.js.map +1 -0
- package/dist/graph/buildCodebaseGraph.d.ts +3 -0
- package/dist/graph/buildCodebaseGraph.d.ts.map +1 -0
- package/dist/graph/buildCodebaseGraph.js +602 -0
- package/dist/graph/buildCodebaseGraph.js.map +1 -0
- package/dist/graph/buildLLMPayload.d.ts +89 -0
- package/dist/graph/buildLLMPayload.d.ts.map +1 -0
- package/dist/graph/buildLLMPayload.js +715 -0
- package/dist/graph/buildLLMPayload.js.map +1 -0
- package/dist/graph/callLLM.d.ts +16 -0
- package/dist/graph/callLLM.d.ts.map +1 -0
- package/dist/graph/callLLM.js +274 -0
- package/dist/graph/callLLM.js.map +1 -0
- package/dist/graph/types.d.ts +76 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +5 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/walkExports.d.ts +2 -0
- package/dist/graph/walkExports.d.ts.map +1 -0
- package/dist/graph/walkExports.js +172 -0
- package/dist/graph/walkExports.js.map +1 -0
- package/dist/heuristics/file-patterns.json +325 -0
- package/dist/heuristics/known-packages.json +1022 -0
- package/dist/heuristics/loader.d.ts +121 -0
- package/dist/heuristics/loader.d.ts.map +1 -0
- package/dist/heuristics/loader.js +196 -0
- package/dist/heuristics/loader.js.map +1 -0
- package/dist/heuristics/repo-mode-signals.json +248 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +356 -0
- package/dist/mcp.js.map +1 -0
- package/dist/scanner/buildImportGraph.d.ts +23 -0
- package/dist/scanner/buildImportGraph.d.ts.map +1 -0
- package/dist/scanner/buildImportGraph.js +186 -0
- package/dist/scanner/buildImportGraph.js.map +1 -0
- package/dist/scanner/detectDBOps.d.ts +21 -0
- package/dist/scanner/detectDBOps.d.ts.map +1 -0
- package/dist/scanner/detectDBOps.js +346 -0
- package/dist/scanner/detectDBOps.js.map +1 -0
- package/dist/scanner/detectOutbound.d.ts +6 -0
- package/dist/scanner/detectOutbound.d.ts.map +1 -0
- package/dist/scanner/detectOutbound.js +101 -0
- package/dist/scanner/detectOutbound.js.map +1 -0
- package/dist/scanner/detectRepoPurpose.d.ts +19 -0
- package/dist/scanner/detectRepoPurpose.d.ts.map +1 -0
- package/dist/scanner/detectRepoPurpose.js +335 -0
- package/dist/scanner/detectRepoPurpose.js.map +1 -0
- package/dist/scanner/detectRoutes.d.ts +22 -0
- package/dist/scanner/detectRoutes.d.ts.map +1 -0
- package/dist/scanner/detectRoutes.js +406 -0
- package/dist/scanner/detectRoutes.js.map +1 -0
- package/dist/scanner/filterNoise.d.ts +4 -0
- package/dist/scanner/filterNoise.d.ts.map +1 -0
- package/dist/scanner/filterNoise.js +95 -0
- package/dist/scanner/filterNoise.js.map +1 -0
- package/dist/scanner/loadTsAliases.d.ts +20 -0
- package/dist/scanner/loadTsAliases.d.ts.map +1 -0
- package/dist/scanner/loadTsAliases.js +135 -0
- package/dist/scanner/loadTsAliases.js.map +1 -0
- package/dist/scanner/routeHandlers.d.ts +15 -0
- package/dist/scanner/routeHandlers.d.ts.map +1 -0
- package/dist/scanner/routeHandlers.js +154 -0
- package/dist/scanner/routeHandlers.js.map +1 -0
- package/dist/scanner/scanRepo.d.ts +10 -0
- package/dist/scanner/scanRepo.d.ts.map +1 -0
- package/dist/scanner/scanRepo.js +165 -0
- package/dist/scanner/scanRepo.js.map +1 -0
- package/dist/scanner/walkImports.d.ts +14 -0
- package/dist/scanner/walkImports.d.ts.map +1 -0
- package/dist/scanner/walkImports.js +162 -0
- package/dist/scanner/walkImports.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +956 -0
- package/dist/server.js.map +1 -0
- package/dist/session/diff.d.ts +4 -0
- package/dist/session/diff.d.ts.map +1 -0
- package/dist/session/diff.js +150 -0
- package/dist/session/diff.js.map +1 -0
- package/dist/session/snapshot.d.ts +5 -0
- package/dist/session/snapshot.d.ts.map +1 -0
- package/dist/session/snapshot.js +114 -0
- package/dist/session/snapshot.js.map +1 -0
- package/dist/session/store.d.ts +8 -0
- package/dist/session/store.d.ts.map +1 -0
- package/dist/session/store.js +101 -0
- package/dist/session/store.js.map +1 -0
- package/dist/session/types.d.ts +46 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +4 -0
- package/dist/session/types.js.map +1 -0
- package/dist/types.d.ts +350 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/file.d.ts +5 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +76 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/path.d.ts +7 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +62 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/text.d.ts +5 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +29 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/viewBuilders/buildSystemFolders.d.ts +39 -0
- package/dist/viewBuilders/buildSystemFolders.d.ts.map +1 -0
- package/dist/viewBuilders/buildSystemFolders.js +198 -0
- package/dist/viewBuilders/buildSystemFolders.js.map +1 -0
- package/dist/watcher/repoWatcher.d.ts +17 -0
- package/dist/watcher/repoWatcher.d.ts.map +1 -0
- package/dist/watcher/repoWatcher.js +87 -0
- package/dist/watcher/repoWatcher.js.map +1 -0
- package/package.json +102 -0
- package/public/memor_logo.svg +18 -0
- package/public/memor_transparent_logo.svg +25 -0
- package/public/tIcons/bun.svg +1 -0
- package/public/tIcons/css.svg +1 -0
- package/public/tIcons/docker.svg +3 -0
- package/public/tIcons/expressjs.svg +1 -0
- package/public/tIcons/html5.svg +6 -0
- package/public/tIcons/javascript.svg +1 -0
- package/public/tIcons/jest.svg +4 -0
- package/public/tIcons/json.svg +1 -0
- package/public/tIcons/markdown-light.svg +1 -0
- package/public/tIcons/nestjs.svg +1 -0
- package/public/tIcons/nextjs_icon_dark.svg +1 -0
- package/public/tIcons/npm.svg +1 -0
- package/public/tIcons/pnpm.svg +1 -0
- package/public/tIcons/prisma.svg +1 -0
- package/public/tIcons/react_dark.svg +11 -0
- package/public/tIcons/supabase.svg +15 -0
- package/public/tIcons/tailwindcss.svg +1 -0
- package/public/tIcons/turborepo-icon-light.svg +1 -0
- package/public/tIcons/typescript.svg +1 -0
- package/public/tIcons/vite.svg +1 -0
- package/public/tIcons/yarn.svg +1 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectRepoMode = detectRepoMode;
|
|
4
|
+
exports.deriveRepoCenter = deriveRepoCenter;
|
|
5
|
+
exports.buildRepoNarrative = buildRepoNarrative;
|
|
6
|
+
// ── Repo Type Classification ──────────────────────────────────────────────
|
|
7
|
+
const UI_LIB_NAME = /\b(ui|components?|design.?system|chakra|radix|shadcn|mantine|ant.?design|material.?ui|primer|panda)\b/i;
|
|
8
|
+
const INCIDENTAL_APP = /^(www|docs|storybook|website|marketing|playground|demo|sandbox|mcp|compositions|e2e|test|tests)$/i;
|
|
9
|
+
const DEVTOOL_NAME = /(-plugin|eslint-plugin|babel-plugin|webpack-|rollup-plugin|vite-plugin|codemod|transformer|jscodeshift|^storybook$)/i;
|
|
10
|
+
/**
|
|
11
|
+
* Classifies WHAT this repo IS — purpose and intent, not folder structure.
|
|
12
|
+
*
|
|
13
|
+
* Two signal tiers:
|
|
14
|
+
* rootTech — from ROOT package.json + root config files only.
|
|
15
|
+
* Used for high-confidence classifications (desktop, mobile, CLI, bot, serverless).
|
|
16
|
+
* Avoids false positives from incidental sub-package deps.
|
|
17
|
+
*
|
|
18
|
+
* techStack — from ALL packages across the repo.
|
|
19
|
+
* Used for lower-priority classifications (web-app, api-server, npm-library).
|
|
20
|
+
* A monorepo's web framework lives in apps/web, not the root.
|
|
21
|
+
*/
|
|
22
|
+
function classifyRepoType(signals, repoName) {
|
|
23
|
+
const root = new Set(signals.rootTech ?? []);
|
|
24
|
+
const all = new Set(signals.techStack ?? signals.frameworks);
|
|
25
|
+
const hasRoot = (t) => root.has(t);
|
|
26
|
+
const has = (t) => all.has(t);
|
|
27
|
+
const repoNameLow = repoName.toLowerCase();
|
|
28
|
+
const { appNames, packageNames, hasBinField, isMonorepoLayout, hasStorybookDir, hasVercelJson, hasWranglerToml, hasServerlessYml, hasManifestJson } = signals;
|
|
29
|
+
const allIncidentalApps = appNames.length === 0 || appNames.every((n) => INCIDENTAL_APP.test(n));
|
|
30
|
+
// ── 1. Mobile (root-only signal) ──────────────────────────────────────
|
|
31
|
+
if (hasRoot("React Native") || hasRoot("Expo"))
|
|
32
|
+
return { type: "mobile-app", confidence: 0.92 };
|
|
33
|
+
// ── 2. Desktop (root-only signal) ─────────────────────────────────────
|
|
34
|
+
// A published CLI (root `bin`) that also ships an Electron/Tauri build is a CLI first —
|
|
35
|
+
// the executable is the primary artifact, the desktop shell is secondary. Only treat as
|
|
36
|
+
// a desktop app when there is no root bin (e.g. memor: `npx memor` + an optional Electron wrapper).
|
|
37
|
+
if ((hasRoot("Electron") || hasRoot("Tauri")) && !hasBinField)
|
|
38
|
+
return { type: "desktop-app", confidence: 0.92 };
|
|
39
|
+
// ── 3. Browser extension ───────────────────────────────────────────────
|
|
40
|
+
if (hasManifestJson && (hasRoot("Browser Extension") || /extension|addon/.test(repoNameLow))) {
|
|
41
|
+
return { type: "browser-ext", confidence: 0.88 };
|
|
42
|
+
}
|
|
43
|
+
// ── 4. Bot (root-only signal) ──────────────────────────────────────────
|
|
44
|
+
// Guard: don't misclassify UI libraries / web products that use Slack for notifications
|
|
45
|
+
if (hasRoot("Discord.js") || hasRoot("Slack") || hasRoot("Telegram Bot")) {
|
|
46
|
+
const isWebProduct = hasRoot("Next.js") || hasRoot("React") || hasVercelJson
|
|
47
|
+
|| UI_LIB_NAME.test(repoName) || hasStorybookDir;
|
|
48
|
+
if (!isWebProduct)
|
|
49
|
+
return { type: "bot", confidence: 0.88 };
|
|
50
|
+
}
|
|
51
|
+
// ── 5. Serverless ──────────────────────────────────────────────────────
|
|
52
|
+
// Config files are root-level by definition; dep-based checks use rootTech
|
|
53
|
+
const rootServerless = hasVercelJson || hasWranglerToml || hasServerlessYml
|
|
54
|
+
|| hasRoot("Vercel Functions") || hasRoot("Cloudflare Workers") || hasRoot("AWS Lambda");
|
|
55
|
+
if (rootServerless) {
|
|
56
|
+
// Don't fire for web products / UI libraries that deploy via Vercel (vercel.json = deploy config)
|
|
57
|
+
const isWebProduct = hasRoot("Next.js") || hasRoot("Remix") || hasRoot("SvelteKit") || hasRoot("Nuxt")
|
|
58
|
+
|| hasRoot("Astro") || UI_LIB_NAME.test(repoName) || hasStorybookDir
|
|
59
|
+
|| (hasRoot("React") && packageNames.length >= 3);
|
|
60
|
+
if (!isWebProduct)
|
|
61
|
+
return { type: "serverless", confidence: 0.82 };
|
|
62
|
+
}
|
|
63
|
+
// ── 6. Workers / background jobs (root-only signal) ──────────────────
|
|
64
|
+
if (hasRoot("BullMQ") || hasRoot("Bull") || hasRoot("Agenda") || hasRoot("Cron")) {
|
|
65
|
+
const hasWebFramework = hasRoot("Next.js") || hasRoot("Remix") || hasRoot("NestJS") || hasRoot("Express");
|
|
66
|
+
if (!hasWebFramework)
|
|
67
|
+
return { type: "worker", confidence: 0.80 };
|
|
68
|
+
}
|
|
69
|
+
// ── 7. Test suite (root-only signal) ─────────────────────────────────
|
|
70
|
+
// Repo whose primary purpose IS the tests — not a product that happens to have tests
|
|
71
|
+
if (hasRoot("Cypress") || hasRoot("Playwright")) {
|
|
72
|
+
const hasProductFramework = hasRoot("Next.js") || hasRoot("React") || hasRoot("Express") || hasRoot("NestJS");
|
|
73
|
+
if (!hasProductFramework)
|
|
74
|
+
return { type: "test-suite", confidence: 0.85 };
|
|
75
|
+
}
|
|
76
|
+
// ── 8. Static site / docs ──────────────────────────────────────────────
|
|
77
|
+
// These frameworks are so specific they're reliable even from sub-packages
|
|
78
|
+
if (has("Docusaurus") || has("Nextra") || has("VitePress") || has("Gatsby")) {
|
|
79
|
+
return { type: "static-site", confidence: 0.88 };
|
|
80
|
+
}
|
|
81
|
+
// ── 8. UI component library ────────────────────────────────────────────
|
|
82
|
+
// A real backend (Express/Fastify/etc.) disqualifies ui-library — Storybook is just
|
|
83
|
+
// a dev tool in that context, not the primary product surface.
|
|
84
|
+
const hasAnyBackend = has("Express") || has("Fastify") || has("Hono") || has("Koa") || has("NestJS") || has("Hapi");
|
|
85
|
+
// Strong signal: .storybook/ dir at root + UI-named repo + only incidental apps
|
|
86
|
+
if (!hasAnyBackend && (hasStorybookDir || hasRoot("Storybook")) && UI_LIB_NAME.test(repoName) && allIncidentalApps) {
|
|
87
|
+
return { type: "ui-library", confidence: 0.85 };
|
|
88
|
+
}
|
|
89
|
+
// Weaker: require the actual .storybook/ dir (not just Storybook in devDeps —
|
|
90
|
+
// many product repos use Storybook for component development but are NOT UI libraries)
|
|
91
|
+
if (!hasAnyBackend && hasStorybookDir && allIncidentalApps && packageNames.length >= 2) {
|
|
92
|
+
return { type: "ui-library", confidence: 0.75 };
|
|
93
|
+
}
|
|
94
|
+
// Name-only: repos like material-ui, ant-design, chakra-ui that don't use Storybook
|
|
95
|
+
// but have a strong UI-library name, many packages, and only incidental apps (docs, website).
|
|
96
|
+
// Must check before the hasSSR path — Next.js in the docs/ package would otherwise
|
|
97
|
+
// misclassify as web-app.
|
|
98
|
+
if (!hasAnyBackend && UI_LIB_NAME.test(repoName) && allIncidentalApps && packageNames.length >= 5) {
|
|
99
|
+
return { type: "ui-library", confidence: 0.78 };
|
|
100
|
+
}
|
|
101
|
+
// ── 9. CLI tool (root-only bin + CLI framework) ────────────────────────
|
|
102
|
+
// hasBinField is root-only; CLI framework check uses rootTech
|
|
103
|
+
if (hasBinField && (hasRoot("Commander") || hasRoot("oclif") || hasRoot("Yargs") || hasRoot("Meow"))) {
|
|
104
|
+
return { type: "cli-tool", confidence: 0.88 };
|
|
105
|
+
}
|
|
106
|
+
// A root `bin` on a non-monorepo, non-SSR repo is a CLI/tool — even if it bundles a React
|
|
107
|
+
// viewer (a growing pattern: dev tools that ship a local web UI). Next.js still means a real
|
|
108
|
+
// web app, so it stays excluded; React alone no longer disqualifies a bin-having repo.
|
|
109
|
+
if (hasBinField && !hasRoot("Next.js") && packageNames.length <= 3) {
|
|
110
|
+
return { type: "cli-tool", confidence: 0.75 };
|
|
111
|
+
}
|
|
112
|
+
// ── 10. Web app (SSR frameworks — check full techStack, lives in sub-packages) ──
|
|
113
|
+
const hasSSR = has("Next.js") || has("Remix") || has("SvelteKit") || has("Nuxt") || has("Astro");
|
|
114
|
+
if (hasSSR)
|
|
115
|
+
return { type: "web-app", confidence: 0.85 };
|
|
116
|
+
// ── 11. API server ──────────────────────────────────────────────────────
|
|
117
|
+
const hasBackend = has("Express") || has("Fastify") || has("Hono") || has("Koa") || has("NestJS") || has("Hapi");
|
|
118
|
+
const hasFrontend = has("React") || has("Vue") || has("Svelte") || has("Angular");
|
|
119
|
+
if (hasBackend && hasFrontend)
|
|
120
|
+
return { type: "full-stack", confidence: 0.72 };
|
|
121
|
+
if (hasBackend && !hasFrontend) {
|
|
122
|
+
// Multi-package repos with backend deps are usually frameworks/libs using Express as a dev
|
|
123
|
+
// server or for examples (e.g. mermaid, jest). Not a running API server.
|
|
124
|
+
if (packageNames.length >= 3) { /* fall through to npm-library */ }
|
|
125
|
+
else
|
|
126
|
+
return { type: "api-server", confidence: 0.82 };
|
|
127
|
+
}
|
|
128
|
+
// ── 12. DevTool ─────────────────────────────────────────────────────────
|
|
129
|
+
// Checked before SPA so "storybook" repo (Vite + React in sub-packages) hits devtool not spa
|
|
130
|
+
if (DEVTOOL_NAME.test(repoNameLow)) {
|
|
131
|
+
return { type: "devtool", confidence: 0.72 };
|
|
132
|
+
}
|
|
133
|
+
// ── 13. SPA ─────────────────────────────────────────────────────────────
|
|
134
|
+
if ((hasRoot("Vite") || has("Vite")) && hasFrontend && !hasSSR) {
|
|
135
|
+
return { type: "spa", confidence: 0.78 };
|
|
136
|
+
}
|
|
137
|
+
// ── 14. ORM / DB schema ─────────────────────────────────────────────────
|
|
138
|
+
if ((has("Prisma") || has("Drizzle")) && !hasBackend && !hasSSR && !hasFrontend) {
|
|
139
|
+
return { type: "orm-db", confidence: 0.75 };
|
|
140
|
+
}
|
|
141
|
+
// ── 15. npm library ─────────────────────────────────────────────────────
|
|
142
|
+
// Has packages/ OR is a single-package repo with no app framework → published lib
|
|
143
|
+
if (packageNames.length >= 1 && !hasSSR) {
|
|
144
|
+
return { type: "npm-library", confidence: 0.65 };
|
|
145
|
+
}
|
|
146
|
+
if (!isMonorepoLayout) {
|
|
147
|
+
return { type: "npm-library", confidence: 0.60 };
|
|
148
|
+
}
|
|
149
|
+
return { type: "unknown", confidence: 0.38 };
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Maps the new RepoType + structure to the legacy RepoMode used by the internal pipeline.
|
|
153
|
+
* Keeps all existing pipeline logic (applyRepoModeConsistency, detectRepoCenterSystems, etc.) working.
|
|
154
|
+
*/
|
|
155
|
+
function toRepoMode(type, structure, signals) {
|
|
156
|
+
const appCount = signals.appNames.length;
|
|
157
|
+
const pkgCount = signals.packageNames.length;
|
|
158
|
+
if (structure === "monorepo") {
|
|
159
|
+
if (type === "web-app" || type === "spa" || type === "full-stack" || type === "api-server") {
|
|
160
|
+
if (appCount >= 4)
|
|
161
|
+
return "surface-platform";
|
|
162
|
+
if (appCount >= 1 && pkgCount >= 3)
|
|
163
|
+
return "product-domain-machine";
|
|
164
|
+
}
|
|
165
|
+
if ((type === "npm-library" || type === "ui-library") && pkgCount >= 8)
|
|
166
|
+
return "framework-core";
|
|
167
|
+
if (type === "npm-library")
|
|
168
|
+
return "library-tooling";
|
|
169
|
+
if (type === "ui-library")
|
|
170
|
+
return "ui-component-library";
|
|
171
|
+
}
|
|
172
|
+
switch (type) {
|
|
173
|
+
case "web-app":
|
|
174
|
+
case "spa":
|
|
175
|
+
case "full-stack":
|
|
176
|
+
return "product-web-app";
|
|
177
|
+
case "api-server":
|
|
178
|
+
return "product-web-app";
|
|
179
|
+
case "npm-library":
|
|
180
|
+
return pkgCount >= 8 ? "framework-core" : "library-tooling";
|
|
181
|
+
case "devtool":
|
|
182
|
+
case "cli-tool":
|
|
183
|
+
case "scripts":
|
|
184
|
+
case "orm-db":
|
|
185
|
+
case "static-site":
|
|
186
|
+
case "serverless":
|
|
187
|
+
return "library-tooling";
|
|
188
|
+
case "ui-library":
|
|
189
|
+
return "ui-component-library";
|
|
190
|
+
case "desktop-app":
|
|
191
|
+
case "mobile-app":
|
|
192
|
+
return "product-web-app"; // a runnable product application (closest existing mode)
|
|
193
|
+
case "worker":
|
|
194
|
+
return "workflow-platform";
|
|
195
|
+
case "docs-only":
|
|
196
|
+
case "test-suite":
|
|
197
|
+
return "library-tooling";
|
|
198
|
+
default:
|
|
199
|
+
return "unknown";
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Primary entry point for repo classification.
|
|
204
|
+
* Returns structure + type + techStack for display/LLM, plus mode for the internal pipeline.
|
|
205
|
+
*/
|
|
206
|
+
function detectRepoMode(signals, repoName) {
|
|
207
|
+
const structure = signals.isMonorepoLayout ? "monorepo" : "single";
|
|
208
|
+
const { type, confidence } = classifyRepoType(signals, repoName);
|
|
209
|
+
const mode = toRepoMode(type, structure, signals);
|
|
210
|
+
const techStack = signals.techStack ?? signals.frameworks.filter((f) => !["Turborepo", "Lerna", "Nx", "pnpm-workspace", "npm workspaces"].includes(f));
|
|
211
|
+
return { mode, structure, type, techStack, confidence };
|
|
212
|
+
}
|
|
213
|
+
// ── Center of gravity ─────────────────────────────────────────────────────
|
|
214
|
+
const CENTER_SENTENCES = {
|
|
215
|
+
"surface-platform": "Multi-surface platform composed of multiple user-facing applications.",
|
|
216
|
+
"product-domain-machine": "Product system centered around core domain workflows and business logic.",
|
|
217
|
+
"framework-core": "Framework core composed of modular runtime and extension packages.",
|
|
218
|
+
"library-tooling": "Primary library with supporting tooling and auxiliary packages.",
|
|
219
|
+
"ui-component-library": "UI component library providing reusable components for external consumption.",
|
|
220
|
+
"workflow-platform": "Workflow orchestration system composed of pipelines, tasks, and execution components.",
|
|
221
|
+
"product-web-app": "Product web application with internal architectural surfaces, data layers, and UI.",
|
|
222
|
+
unknown: "Repository structure did not match a clear high-level pattern.",
|
|
223
|
+
};
|
|
224
|
+
function deriveRepoCenter(mode) {
|
|
225
|
+
return CENTER_SENTENCES[mode];
|
|
226
|
+
}
|
|
227
|
+
// ── Narrative ─────────────────────────────────────────────────────────────
|
|
228
|
+
function buildRepoNarrative(analysis, mode) {
|
|
229
|
+
const { repoName, systems, summary } = analysis;
|
|
230
|
+
const n = systems.length;
|
|
231
|
+
const style = summary.detectedRepoStyle;
|
|
232
|
+
const primaries = systems.filter((s) => s.systemTier === "primary");
|
|
233
|
+
const primaryNames = primaries.slice(0, 3).map((s) => s.name);
|
|
234
|
+
const dominantTech = detectDominantTech(systems);
|
|
235
|
+
const techPhrase = dominantTech ? `built with ${dominantTech}` : "";
|
|
236
|
+
if (mode === "surface-platform") {
|
|
237
|
+
const surfaces = systems.filter((s) => s.runtimeRole === "runnable").map((s) => s.name).slice(0, 4);
|
|
238
|
+
const shared = systems.filter((s) => s.runtimeRole === "consumable");
|
|
239
|
+
const sharedNames = shared.slice(0, 2).map((s) => s.name);
|
|
240
|
+
return (`${repoName} is a multi-surface platform with ${surfaces.length} apps (${surfaces.join(", ")})` +
|
|
241
|
+
(sharedNames.length > 0 ? `, backed by shared packages like ${sharedNames.join(" and ")}` : "") +
|
|
242
|
+
`. ` + (techPhrase ? `${capitalize(techPhrase)}. ` : "") +
|
|
243
|
+
`Each app serves a different audience, sharing common logic underneath.`);
|
|
244
|
+
}
|
|
245
|
+
if (mode === "product-domain-machine") {
|
|
246
|
+
const runnables = systems.filter((s) => s.runtimeRole === "runnable").map((s) => s.name).slice(0, 3);
|
|
247
|
+
const shared = systems.filter((s) => s.runtimeRole === "consumable").slice(0, 2).map((s) => s.name);
|
|
248
|
+
const runDesc = runnables.length ? runnables.join(", ") : "its core apps";
|
|
249
|
+
return (`${repoName} is a product monorepo${techPhrase ? ` ${techPhrase}` : ""}, centered on ${runDesc}` +
|
|
250
|
+
(shared.length > 0 ? ` with shared packages like ${shared.join(" and ")}` : "") +
|
|
251
|
+
`. ${n} packages total.`);
|
|
252
|
+
}
|
|
253
|
+
if (mode === "framework-core") {
|
|
254
|
+
const center = systems.find((s) => s.isRepoCenter);
|
|
255
|
+
const adapters = systems.filter((s) => /adapter|platform|binding/i.test(s.name) || s.inferredSupportRole === "adapter-bridge").slice(0, 3).map((s) => s.name);
|
|
256
|
+
return (`${repoName} is ${techPhrase ? `a framework ${techPhrase}` : "a framework"} with ${n} packages` +
|
|
257
|
+
(center ? `, centered on ${center.name}` : "") +
|
|
258
|
+
(adapters.length > 0 ? `. Platform adapters: ${adapters.join(", ")}` : "") +
|
|
259
|
+
`. ` + (style === "monorepo" ? `Organized as a monorepo for unified development.` : `Packages are developed together for external consumption.`));
|
|
260
|
+
}
|
|
261
|
+
if (mode === "ui-component-library") {
|
|
262
|
+
const uiSystems = systems.filter((s) => s.type === "ui-library" || s.type === "shared-package");
|
|
263
|
+
const uiNames = uiSystems.slice(0, 3).map((s) => s.name);
|
|
264
|
+
const compCount = uiSystems.length;
|
|
265
|
+
return (`${repoName} is a UI component library${techPhrase ? ` ${techPhrase}` : ""}, ` +
|
|
266
|
+
`shipping ${compCount} component package${compCount !== 1 ? "s" : ""}` +
|
|
267
|
+
(uiNames.length > 0 ? ` (${uiNames.join(", ")})` : "") +
|
|
268
|
+
` for external consumption. Any runnable apps are demo or documentation surfaces.`);
|
|
269
|
+
}
|
|
270
|
+
if (mode === "library-tooling") {
|
|
271
|
+
const main = primaries[0];
|
|
272
|
+
const mainDesc = main
|
|
273
|
+
? `${main.name}${main.packageDescription ? ` — ${main.packageDescription}` : ""}`
|
|
274
|
+
: repoName;
|
|
275
|
+
return (`${repoName} is a library${techPhrase ? ` ${techPhrase}` : ""}. Primary package: ${mainDesc}. ` +
|
|
276
|
+
(n > 1 ? `${n - 1} supporting package${n > 2 ? "s" : ""} for tooling and utilities.` : ""));
|
|
277
|
+
}
|
|
278
|
+
if (mode === "product-web-app") {
|
|
279
|
+
const blocks = systems.flatMap((s) => s.blocks.map((b) => b.type));
|
|
280
|
+
const layers = [];
|
|
281
|
+
if (blocks.includes("routes"))
|
|
282
|
+
layers.push("routes");
|
|
283
|
+
if (blocks.includes("api-layer") || blocks.includes("services"))
|
|
284
|
+
layers.push("API layer");
|
|
285
|
+
if (blocks.includes("database"))
|
|
286
|
+
layers.push("data access");
|
|
287
|
+
const layerPhrase = layers.length > 0 ? ` with ${layers.join(", ")}` : "";
|
|
288
|
+
return (`${repoName} is a web application${techPhrase ? ` ${techPhrase}` : ""}${layerPhrase}. ` +
|
|
289
|
+
`${n} internal module${n !== 1 ? "s" : ""} form the application architecture.`);
|
|
290
|
+
}
|
|
291
|
+
if (mode === "workflow-platform") {
|
|
292
|
+
const coreNames = primaries.map((s) => s.name).slice(0, 2);
|
|
293
|
+
return (`${repoName} is a workflow platform${techPhrase ? ` ${techPhrase}` : ""}` +
|
|
294
|
+
(coreNames.length > 0 ? `, centered on ${coreNames.join(" and ")}` : "") +
|
|
295
|
+
`. Structured around task scheduling, execution, and orchestration across ${n} packages.`);
|
|
296
|
+
}
|
|
297
|
+
const infraCount = systems.filter((s) => s.type === "infra").length;
|
|
298
|
+
const docsCount = systems.filter((s) => s.type === "docs-site").length;
|
|
299
|
+
const testCount = systems.filter((s) => s.type !== "api-service" && s.type !== "web-app" &&
|
|
300
|
+
/^(tests?|specs?|e2e|cypress|playwright)[-_.]|[-_.](tests?|specs?|e2e)$|^(tests?|specs?|e2e)$|[-_](tests?|e2e)$/i.test(s.name)).length;
|
|
301
|
+
if (infraCount === n || (infraCount >= 1 && n <= 2)) {
|
|
302
|
+
return `${repoName} is an infrastructure repository${techPhrase ? `, ${techPhrase}` : ""} — Terraform, Docker, or cloud configuration.`;
|
|
303
|
+
}
|
|
304
|
+
if (docsCount >= 1 && n <= 2) {
|
|
305
|
+
return `${repoName} is a documentation site${techPhrase ? `, ${techPhrase}` : ""}.`;
|
|
306
|
+
}
|
|
307
|
+
if (testCount >= 1 && n <= 3) {
|
|
308
|
+
return `${repoName} is a test suite${techPhrase ? `, ${techPhrase}` : ""}.`;
|
|
309
|
+
}
|
|
310
|
+
const rn = repoName.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
311
|
+
const distinctPrimaries = primaryNames.filter((p) => p.toLowerCase().replace(/[^a-z0-9]/g, "") !== rn);
|
|
312
|
+
if (distinctPrimaries.length > 0) {
|
|
313
|
+
return (`${repoName}${techPhrase ? ` is ${techPhrase}` : ""} with ${n} modules, centered on ${distinctPrimaries.join(", ")}. ` +
|
|
314
|
+
`Architecture pattern could not be confidently classified.`);
|
|
315
|
+
}
|
|
316
|
+
return (`${repoName} contains ${n} detected module${n !== 1 ? "s" : ""}${techPhrase ? `, ${techPhrase}` : ""}. ` +
|
|
317
|
+
`Structure is flat or unconventional.`);
|
|
318
|
+
}
|
|
319
|
+
function detectDominantTech(systems) {
|
|
320
|
+
const counts = new Map();
|
|
321
|
+
for (const s of systems) {
|
|
322
|
+
for (const t of s.detectedTech || []) {
|
|
323
|
+
if (/^(TypeScript|JavaScript)$/i.test(t))
|
|
324
|
+
continue;
|
|
325
|
+
counts.set(t, (counts.get(t) || 0) + 1);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const sorted = [...counts.entries()].sort((a, b) => b[1] - a[1]);
|
|
329
|
+
const lang = systems.some((s) => s.detectedTech?.includes("TypeScript")) ? "TypeScript" : "JavaScript";
|
|
330
|
+
if (sorted.length === 0)
|
|
331
|
+
return lang;
|
|
332
|
+
const top = sorted.slice(0, 2).map(([t]) => t);
|
|
333
|
+
return `${lang} and ${top.join(", ")}`;
|
|
334
|
+
}
|
|
335
|
+
function capitalize(s) {
|
|
336
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=detectRepoMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectRepoMode.js","sourceRoot":"","sources":["../../src/RepoTypeDetection/detectRepoMode.ts"],"names":[],"mappings":";;AA6NA,wCASC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CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;IACvG,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,GAAG,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RepoSignals } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Reads root-level manifests and filenames to infer stack and monorepo layout.
|
|
4
|
+
*
|
|
5
|
+
* rootTech = signals from ROOT package.json + root config files only.
|
|
6
|
+
* Used for primary type classification (desktop, mobile, CLI, bot).
|
|
7
|
+
*
|
|
8
|
+
* techStack = all tech across entire repo (root + sub-packages).
|
|
9
|
+
* Used for display and LLM context.
|
|
10
|
+
*/
|
|
11
|
+
export declare function detectRepoSignals(repoRoot: string): Promise<RepoSignals>;
|
|
12
|
+
export declare function fileExistsAt(repoRoot: string, relativePath: string): Promise<boolean>;
|
|
13
|
+
//# sourceMappingURL=detectRepoSignals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectRepoSignals.d.ts","sourceRoot":"","sources":["../../src/RepoTypeDetection/detectRepoSignals.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAuH5C;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6K9E;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC,CAGlB"}
|