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,451 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.detectRepoSignals = detectRepoSignals;
|
|
37
|
+
exports.fileExistsAt = fileExistsAt;
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const fs = __importStar(require("fs/promises"));
|
|
40
|
+
const file_1 = require("../utils/file");
|
|
41
|
+
const text_1 = require("../utils/text");
|
|
42
|
+
const path_1 = require("../utils/path");
|
|
43
|
+
// Workspace/build orchestration — structural signals, not app tech
|
|
44
|
+
const STRUCTURAL_SIGNALS = new Set([
|
|
45
|
+
"Turborepo", "Lerna", "Nx", "pnpm-workspace", "npm workspaces",
|
|
46
|
+
]);
|
|
47
|
+
function addTech(tech, name) {
|
|
48
|
+
tech.add(name);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Extract tech signals from a deps map.
|
|
52
|
+
* `rootOnly`: if true, includes high-specificity signals (Electron, React Native, etc.)
|
|
53
|
+
* that should only fire when found at root level to avoid false positives
|
|
54
|
+
* from deep sub-packages that use them incidentally.
|
|
55
|
+
*/
|
|
56
|
+
function extractTechFromDeps(deps, tech, rootOnly = false) {
|
|
57
|
+
const has = (n) => n in deps;
|
|
58
|
+
// Frontend frameworks
|
|
59
|
+
if (has("next"))
|
|
60
|
+
addTech(tech, "Next.js");
|
|
61
|
+
if (has("react") || has("react-dom"))
|
|
62
|
+
addTech(tech, "React");
|
|
63
|
+
if (has("vue") || has("@vue/core") || has("@vue/runtime-core"))
|
|
64
|
+
addTech(tech, "Vue");
|
|
65
|
+
if (has("svelte"))
|
|
66
|
+
addTech(tech, "Svelte");
|
|
67
|
+
if (has("@sveltejs/kit"))
|
|
68
|
+
addTech(tech, "SvelteKit");
|
|
69
|
+
if (has("astro"))
|
|
70
|
+
addTech(tech, "Astro");
|
|
71
|
+
if (has("nuxt") || has("nuxt3") || has("@nuxt/core"))
|
|
72
|
+
addTech(tech, "Nuxt");
|
|
73
|
+
if (has("@remix-run/react") || has("@remix-run/node") || has("@remix-run/server-runtime"))
|
|
74
|
+
addTech(tech, "Remix");
|
|
75
|
+
if (has("@angular/core"))
|
|
76
|
+
addTech(tech, "Angular");
|
|
77
|
+
if (has("gatsby"))
|
|
78
|
+
addTech(tech, "Gatsby");
|
|
79
|
+
if (has("vite"))
|
|
80
|
+
addTech(tech, "Vite");
|
|
81
|
+
// Backend frameworks
|
|
82
|
+
if (has("@nestjs/core"))
|
|
83
|
+
addTech(tech, "NestJS");
|
|
84
|
+
if (has("express"))
|
|
85
|
+
addTech(tech, "Express");
|
|
86
|
+
if (has("fastify"))
|
|
87
|
+
addTech(tech, "Fastify");
|
|
88
|
+
if (has("koa"))
|
|
89
|
+
addTech(tech, "Koa");
|
|
90
|
+
if (has("hono"))
|
|
91
|
+
addTech(tech, "Hono");
|
|
92
|
+
if (has("@hapi/hapi"))
|
|
93
|
+
addTech(tech, "Hapi");
|
|
94
|
+
// API / data
|
|
95
|
+
if (has("@trpc/server") || has("@trpc/client"))
|
|
96
|
+
addTech(tech, "tRPC");
|
|
97
|
+
if (has("graphql") || has("apollo-server") || has("@apollo/server"))
|
|
98
|
+
addTech(tech, "GraphQL");
|
|
99
|
+
if (has("@apollo/client"))
|
|
100
|
+
addTech(tech, "Apollo");
|
|
101
|
+
// Databases / ORMs
|
|
102
|
+
if (has("prisma") || has("@prisma/client"))
|
|
103
|
+
addTech(tech, "Prisma");
|
|
104
|
+
if (has("drizzle-orm"))
|
|
105
|
+
addTech(tech, "Drizzle");
|
|
106
|
+
if (has("typeorm"))
|
|
107
|
+
addTech(tech, "TypeORM");
|
|
108
|
+
if (has("sequelize"))
|
|
109
|
+
addTech(tech, "Sequelize");
|
|
110
|
+
if (has("mongoose"))
|
|
111
|
+
addTech(tech, "Mongoose");
|
|
112
|
+
if (has("@supabase/supabase-js"))
|
|
113
|
+
addTech(tech, "Supabase");
|
|
114
|
+
if (has("ioredis") || has("redis"))
|
|
115
|
+
addTech(tech, "Redis");
|
|
116
|
+
if (has("pg") || has("postgres") || has("@neondatabase/serverless"))
|
|
117
|
+
addTech(tech, "PostgreSQL");
|
|
118
|
+
if (has("mysql2") || has("mysql"))
|
|
119
|
+
addTech(tech, "MySQL");
|
|
120
|
+
if (has("mongodb"))
|
|
121
|
+
addTech(tech, "MongoDB");
|
|
122
|
+
// Styling
|
|
123
|
+
if (has("tailwindcss"))
|
|
124
|
+
addTech(tech, "Tailwind");
|
|
125
|
+
// Storybook (signals ui-library when in devDeps)
|
|
126
|
+
if (has("@storybook/react") || has("@storybook/vue3") || has("@storybook/svelte") || has("storybook")) {
|
|
127
|
+
addTech(tech, "Storybook");
|
|
128
|
+
}
|
|
129
|
+
// Testing frameworks (root-only: signals the repo IS a test suite, not just has tests)
|
|
130
|
+
if (rootOnly) {
|
|
131
|
+
if (has("cypress"))
|
|
132
|
+
addTech(tech, "Cypress");
|
|
133
|
+
if (has("playwright") || has("@playwright/test"))
|
|
134
|
+
addTech(tech, "Playwright");
|
|
135
|
+
if (has("jest") || has("@jest/core"))
|
|
136
|
+
addTech(tech, "Jest");
|
|
137
|
+
if (has("vitest"))
|
|
138
|
+
addTech(tech, "Vitest");
|
|
139
|
+
}
|
|
140
|
+
// Language
|
|
141
|
+
if (has("typescript"))
|
|
142
|
+
addTech(tech, "TypeScript");
|
|
143
|
+
// ── High-specificity signals — only trust when found at root level ──────
|
|
144
|
+
// These fire false positives when found in deep sub-packages (test fixtures,
|
|
145
|
+
// example apps, integrations). Only use when rootOnly=true.
|
|
146
|
+
if (rootOnly) {
|
|
147
|
+
// Mobile
|
|
148
|
+
if (has("expo"))
|
|
149
|
+
addTech(tech, "Expo");
|
|
150
|
+
if (has("react-native"))
|
|
151
|
+
addTech(tech, "React Native");
|
|
152
|
+
// Desktop
|
|
153
|
+
if (has("electron") || has("electron-builder"))
|
|
154
|
+
addTech(tech, "Electron");
|
|
155
|
+
if (has("@tauri-apps/api") || has("@tauri-apps/cli"))
|
|
156
|
+
addTech(tech, "Tauri");
|
|
157
|
+
// Serverless / edge
|
|
158
|
+
if (has("@vercel/functions") || has("@vercel/node"))
|
|
159
|
+
addTech(tech, "Vercel Functions");
|
|
160
|
+
if (has("@cloudflare/workers-types") || has("wrangler"))
|
|
161
|
+
addTech(tech, "Cloudflare Workers");
|
|
162
|
+
if (has("aws-lambda") || has("@aws-sdk/client-lambda"))
|
|
163
|
+
addTech(tech, "AWS Lambda");
|
|
164
|
+
// Workers / queues
|
|
165
|
+
if (has("bullmq"))
|
|
166
|
+
addTech(tech, "BullMQ");
|
|
167
|
+
if (has("bull"))
|
|
168
|
+
addTech(tech, "Bull");
|
|
169
|
+
if (has("agenda"))
|
|
170
|
+
addTech(tech, "Agenda");
|
|
171
|
+
if (has("node-cron") || has("cron"))
|
|
172
|
+
addTech(tech, "Cron");
|
|
173
|
+
// CLI tooling
|
|
174
|
+
if (has("commander"))
|
|
175
|
+
addTech(tech, "Commander");
|
|
176
|
+
if (has("@oclif/core") || has("@oclif/command"))
|
|
177
|
+
addTech(tech, "oclif");
|
|
178
|
+
if (has("yargs"))
|
|
179
|
+
addTech(tech, "Yargs");
|
|
180
|
+
if (has("meow"))
|
|
181
|
+
addTech(tech, "Meow");
|
|
182
|
+
// Bots
|
|
183
|
+
if (has("discord.js") || has("@discordjs/core"))
|
|
184
|
+
addTech(tech, "Discord.js");
|
|
185
|
+
if (has("@slack/bolt") || has("@slack/web-api"))
|
|
186
|
+
addTech(tech, "Slack");
|
|
187
|
+
if (has("telegraf") || has("grammy"))
|
|
188
|
+
addTech(tech, "Telegram Bot");
|
|
189
|
+
// Browser extension
|
|
190
|
+
if (has("web-ext") || has("@types/chrome") || has("@types/firefox-webext-browser")) {
|
|
191
|
+
addTech(tech, "Browser Extension");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Reads root-level manifests and filenames to infer stack and monorepo layout.
|
|
197
|
+
*
|
|
198
|
+
* rootTech = signals from ROOT package.json + root config files only.
|
|
199
|
+
* Used for primary type classification (desktop, mobile, CLI, bot).
|
|
200
|
+
*
|
|
201
|
+
* techStack = all tech across entire repo (root + sub-packages).
|
|
202
|
+
* Used for display and LLM context.
|
|
203
|
+
*/
|
|
204
|
+
async function detectRepoSignals(repoRoot) {
|
|
205
|
+
const rootTechSet = new Set(); // root-only, high-confidence
|
|
206
|
+
const allTechSet = new Set(); // all packages, for display
|
|
207
|
+
const structural = new Set(); // workspace/build tooling
|
|
208
|
+
const packageManagers = new Set();
|
|
209
|
+
const signalPaths = [];
|
|
210
|
+
const rootNames = await (0, file_1.listDirNames)(repoRoot);
|
|
211
|
+
const nameSet = new Set(rootNames);
|
|
212
|
+
// Package managers
|
|
213
|
+
if (nameSet.has("pnpm-lock.yaml")) {
|
|
214
|
+
packageManagers.add("pnpm");
|
|
215
|
+
signalPaths.push("pnpm-lock.yaml");
|
|
216
|
+
}
|
|
217
|
+
if (nameSet.has("yarn.lock")) {
|
|
218
|
+
packageManagers.add("yarn");
|
|
219
|
+
signalPaths.push("yarn.lock");
|
|
220
|
+
}
|
|
221
|
+
if (nameSet.has("package-lock.json")) {
|
|
222
|
+
packageManagers.add("npm");
|
|
223
|
+
signalPaths.push("package-lock.json");
|
|
224
|
+
}
|
|
225
|
+
if (nameSet.has("bun.lockb")) {
|
|
226
|
+
packageManagers.add("bun");
|
|
227
|
+
signalPaths.push("bun.lockb");
|
|
228
|
+
}
|
|
229
|
+
const hasAppsDir = nameSet.has("apps");
|
|
230
|
+
const hasPackagesDir = nameSet.has("packages");
|
|
231
|
+
// Workspace / monorepo tooling (structural, not tech)
|
|
232
|
+
const workspaceYaml = (await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "pnpm-workspace.yaml"))) ??
|
|
233
|
+
(await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "pnpm-workspace.yml")));
|
|
234
|
+
if (workspaceYaml) {
|
|
235
|
+
signalPaths.push(nameSet.has("pnpm-workspace.yaml") ? "pnpm-workspace.yaml" : "pnpm-workspace.yml");
|
|
236
|
+
structural.add("pnpm-workspace");
|
|
237
|
+
}
|
|
238
|
+
const turboRaw = await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "turbo.json"));
|
|
239
|
+
if (turboRaw) {
|
|
240
|
+
signalPaths.push("turbo.json");
|
|
241
|
+
structural.add("Turborepo");
|
|
242
|
+
}
|
|
243
|
+
const lernaRaw = await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "lerna.json"));
|
|
244
|
+
if (lernaRaw) {
|
|
245
|
+
signalPaths.push("lerna.json");
|
|
246
|
+
structural.add("Lerna");
|
|
247
|
+
}
|
|
248
|
+
const nxRaw = await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "nx.json"));
|
|
249
|
+
if (nxRaw) {
|
|
250
|
+
signalPaths.push("nx.json");
|
|
251
|
+
structural.add("Nx");
|
|
252
|
+
}
|
|
253
|
+
// Root package.json — primary source for classification
|
|
254
|
+
const pkgRaw = await (0, file_1.readTextSafe)((0, path_1.joinRelative)(repoRoot, "package.json"));
|
|
255
|
+
let hasBinField = false; // ROOT only — sub-package bins don't make a repo a CLI tool
|
|
256
|
+
if (pkgRaw) {
|
|
257
|
+
signalPaths.push("package.json");
|
|
258
|
+
const pkg = (0, text_1.parseJsonLoose)(pkgRaw);
|
|
259
|
+
if (pkg) {
|
|
260
|
+
const deps = {
|
|
261
|
+
...(pkg.dependencies || {}),
|
|
262
|
+
...(pkg.devDependencies || {}),
|
|
263
|
+
...(pkg.peerDependencies || {}),
|
|
264
|
+
};
|
|
265
|
+
extractTechFromDeps(deps, rootTechSet, true); // rootOnly=true
|
|
266
|
+
extractTechFromDeps(deps, allTechSet, true);
|
|
267
|
+
if (pkg.workspaces)
|
|
268
|
+
structural.add("npm workspaces");
|
|
269
|
+
if (pkg.bin != null)
|
|
270
|
+
hasBinField = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// Root config files — additional root-level framework signals
|
|
274
|
+
for (const fname of ["next.config.js", "next.config.mjs", "next.config.ts"]) {
|
|
275
|
+
if (nameSet.has(fname)) {
|
|
276
|
+
signalPaths.push(fname);
|
|
277
|
+
rootTechSet.add("Next.js");
|
|
278
|
+
allTechSet.add("Next.js");
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
for (const fname of ["vite.config.ts", "vite.config.js", "vite.config.mjs"]) {
|
|
282
|
+
if (nameSet.has(fname)) {
|
|
283
|
+
signalPaths.push(fname);
|
|
284
|
+
rootTechSet.add("Vite");
|
|
285
|
+
allTechSet.add("Vite");
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (nameSet.has("nest-cli.json")) {
|
|
289
|
+
signalPaths.push("nest-cli.json");
|
|
290
|
+
rootTechSet.add("NestJS");
|
|
291
|
+
allTechSet.add("NestJS");
|
|
292
|
+
}
|
|
293
|
+
if (nameSet.has("astro.config.mjs") || nameSet.has("astro.config.ts")) {
|
|
294
|
+
rootTechSet.add("Astro");
|
|
295
|
+
allTechSet.add("Astro");
|
|
296
|
+
}
|
|
297
|
+
if (nameSet.has("svelte.config.js") || nameSet.has("svelte.config.ts")) {
|
|
298
|
+
rootTechSet.add("SvelteKit");
|
|
299
|
+
allTechSet.add("SvelteKit");
|
|
300
|
+
}
|
|
301
|
+
if (nameSet.has("nuxt.config.ts") || nameSet.has("nuxt.config.js")) {
|
|
302
|
+
rootTechSet.add("Nuxt");
|
|
303
|
+
allTechSet.add("Nuxt");
|
|
304
|
+
}
|
|
305
|
+
if (nameSet.has("remix.config.js") || nameSet.has("remix.config.ts")) {
|
|
306
|
+
rootTechSet.add("Remix");
|
|
307
|
+
allTechSet.add("Remix");
|
|
308
|
+
}
|
|
309
|
+
// Infrastructure
|
|
310
|
+
if (nameSet.has("docker-compose.yml") || nameSet.has("docker-compose.yaml")) {
|
|
311
|
+
const fname = nameSet.has("docker-compose.yml") ? "docker-compose.yml" : "docker-compose.yaml";
|
|
312
|
+
signalPaths.push(fname);
|
|
313
|
+
allTechSet.add("Docker Compose");
|
|
314
|
+
}
|
|
315
|
+
if (nameSet.has("Dockerfile")) {
|
|
316
|
+
signalPaths.push("Dockerfile");
|
|
317
|
+
allTechSet.add("Docker");
|
|
318
|
+
}
|
|
319
|
+
// Serverless config files (root-level, high confidence)
|
|
320
|
+
const hasVercelJson = nameSet.has("vercel.json");
|
|
321
|
+
const hasWranglerToml = nameSet.has("wrangler.toml");
|
|
322
|
+
const hasServerlessYml = nameSet.has("serverless.yml") || nameSet.has("serverless.yaml");
|
|
323
|
+
if (hasVercelJson) {
|
|
324
|
+
signalPaths.push("vercel.json");
|
|
325
|
+
rootTechSet.add("Vercel");
|
|
326
|
+
allTechSet.add("Vercel");
|
|
327
|
+
}
|
|
328
|
+
if (hasWranglerToml) {
|
|
329
|
+
signalPaths.push("wrangler.toml");
|
|
330
|
+
rootTechSet.add("Cloudflare Workers");
|
|
331
|
+
allTechSet.add("Cloudflare Workers");
|
|
332
|
+
}
|
|
333
|
+
if (hasServerlessYml) {
|
|
334
|
+
rootTechSet.add("Serverless Framework");
|
|
335
|
+
allTechSet.add("Serverless Framework");
|
|
336
|
+
}
|
|
337
|
+
// Browser extension (root manifest.json)
|
|
338
|
+
const hasManifestJson = nameSet.has("manifest.json");
|
|
339
|
+
if (hasManifestJson)
|
|
340
|
+
signalPaths.push("manifest.json");
|
|
341
|
+
// Storybook dir (root .storybook/ = this project USES storybook → ui-library signal)
|
|
342
|
+
const hasStorybookDir = nameSet.has(".storybook");
|
|
343
|
+
if (hasStorybookDir) {
|
|
344
|
+
signalPaths.push(".storybook");
|
|
345
|
+
rootTechSet.add("Storybook");
|
|
346
|
+
allTechSet.add("Storybook");
|
|
347
|
+
}
|
|
348
|
+
// Language detection
|
|
349
|
+
if (nameSet.has("tsconfig.json") || nameSet.has("tsconfig.base.json")) {
|
|
350
|
+
rootTechSet.add("TypeScript");
|
|
351
|
+
allTechSet.add("TypeScript");
|
|
352
|
+
signalPaths.push("tsconfig.json");
|
|
353
|
+
}
|
|
354
|
+
if (nameSet.has("go.mod")) {
|
|
355
|
+
rootTechSet.add("Go");
|
|
356
|
+
allTechSet.add("Go");
|
|
357
|
+
signalPaths.push("go.mod");
|
|
358
|
+
}
|
|
359
|
+
if (nameSet.has("Cargo.toml")) {
|
|
360
|
+
rootTechSet.add("Rust");
|
|
361
|
+
allTechSet.add("Rust");
|
|
362
|
+
signalPaths.push("Cargo.toml");
|
|
363
|
+
}
|
|
364
|
+
if (nameSet.has("Gemfile")) {
|
|
365
|
+
rootTechSet.add("Ruby");
|
|
366
|
+
allTechSet.add("Ruby");
|
|
367
|
+
signalPaths.push("Gemfile");
|
|
368
|
+
}
|
|
369
|
+
if (nameSet.has("pyproject.toml") || nameSet.has("setup.py") || nameSet.has("requirements.txt")) {
|
|
370
|
+
rootTechSet.add("Python");
|
|
371
|
+
allTechSet.add("Python");
|
|
372
|
+
}
|
|
373
|
+
if (nameSet.has("pom.xml") || nameSet.has("build.gradle") || nameSet.has("build.gradle.kts")) {
|
|
374
|
+
rootTechSet.add("Java");
|
|
375
|
+
allTechSet.add("Java");
|
|
376
|
+
}
|
|
377
|
+
// Sub-package scanning — enriches allTechSet only (NOT rootTechSet, NOT hasBinField)
|
|
378
|
+
// Scans common workspace dirs including code/ (used by Storybook, etc.)
|
|
379
|
+
const wsDirs = ["apps", "packages", "libs", "services", "modules", "code"];
|
|
380
|
+
for (const wsDir of wsDirs) {
|
|
381
|
+
const wsPath = path.join(repoRoot, wsDir);
|
|
382
|
+
try {
|
|
383
|
+
const entries = await fs.readdir(wsPath, { withFileTypes: true });
|
|
384
|
+
const dirs = entries.filter((e) => e.isDirectory() && !e.name.startsWith("."));
|
|
385
|
+
const limit = Math.min(dirs.length, 40);
|
|
386
|
+
for (let i = 0; i < limit; i++) {
|
|
387
|
+
const subPkgRaw = await (0, file_1.readTextSafe)(path.join(wsPath, dirs[i].name, "package.json"));
|
|
388
|
+
if (!subPkgRaw)
|
|
389
|
+
continue;
|
|
390
|
+
const subPkg = (0, text_1.parseJsonLoose)(subPkgRaw);
|
|
391
|
+
if (!subPkg)
|
|
392
|
+
continue;
|
|
393
|
+
const deps = {
|
|
394
|
+
...(subPkg.dependencies || {}),
|
|
395
|
+
...(subPkg.devDependencies || {}),
|
|
396
|
+
...(subPkg.peerDependencies || {}),
|
|
397
|
+
};
|
|
398
|
+
extractTechFromDeps(deps, allTechSet, false); // rootOnly=false — safe sub-package scan
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
catch { /* dir doesn't exist */ }
|
|
402
|
+
}
|
|
403
|
+
const isMonorepoLayout = hasAppsDir ||
|
|
404
|
+
hasPackagesDir ||
|
|
405
|
+
!!workspaceYaml ||
|
|
406
|
+
!!turboRaw ||
|
|
407
|
+
!!lernaRaw ||
|
|
408
|
+
!!nxRaw ||
|
|
409
|
+
structural.has("npm workspaces");
|
|
410
|
+
// Collect subdirectory names under apps/ and packages/
|
|
411
|
+
const appNames = [];
|
|
412
|
+
const packageNames = [];
|
|
413
|
+
for (const [dirName, collector] of [["apps", appNames], ["packages", packageNames]]) {
|
|
414
|
+
try {
|
|
415
|
+
const entries = await fs.readdir(path.join(repoRoot, dirName), { withFileTypes: true });
|
|
416
|
+
for (const e of entries) {
|
|
417
|
+
if (e.isDirectory() && !e.name.startsWith("."))
|
|
418
|
+
collector.push(e.name);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
catch { /* dir doesn't exist */ }
|
|
422
|
+
}
|
|
423
|
+
// frameworks = all tech + structural (backward compat with rest of pipeline)
|
|
424
|
+
const allFrameworks = new Set([...allTechSet, ...structural]);
|
|
425
|
+
// techStack = meaningful tech only (no workspace tooling)
|
|
426
|
+
const techStack = [...allTechSet].filter((t) => !STRUCTURAL_SIGNALS.has(t)).sort();
|
|
427
|
+
const rootTech = [...rootTechSet].filter((t) => !STRUCTURAL_SIGNALS.has(t)).sort();
|
|
428
|
+
return {
|
|
429
|
+
frameworks: [...allFrameworks].sort(),
|
|
430
|
+
rootTech,
|
|
431
|
+
techStack,
|
|
432
|
+
isMonorepoLayout,
|
|
433
|
+
hasAppsDir,
|
|
434
|
+
hasPackagesDir,
|
|
435
|
+
packageManagers: [...packageManagers].sort(),
|
|
436
|
+
signalPaths: [...new Set(signalPaths)].sort(),
|
|
437
|
+
appNames,
|
|
438
|
+
packageNames,
|
|
439
|
+
hasBinField,
|
|
440
|
+
hasStorybookDir,
|
|
441
|
+
hasVercelJson,
|
|
442
|
+
hasWranglerToml,
|
|
443
|
+
hasServerlessYml,
|
|
444
|
+
hasManifestJson,
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
async function fileExistsAt(repoRoot, relativePath) {
|
|
448
|
+
const full = path.join(repoRoot, ...relativePath.split("/"));
|
|
449
|
+
return (0, file_1.pathExists)(full);
|
|
450
|
+
}
|
|
451
|
+
//# sourceMappingURL=detectRepoSignals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectRepoSignals.js","sourceRoot":"","sources":["../../src/RepoTypeDetection/detectRepoSignals.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIA,8CA6KC;AAED,oCAMC;AAzTD,2CAA6B;AAC7B,gDAAkC;AAClC,wCAAuE;AACvE,wCAA+C;AAE/C,wCAA6C;AAE7C,mEAAmE;AACnE,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB;CAC/D,CAAC,CAAC;AAEH,SAAS,OAAO,CAAC,IAAiB,EAAE,IAAY;IAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,IAA4B,EAAE,IAAiB,EAAE,QAAQ,GAAG,KAAK;IAC5F,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC;IAErC,sBAAsB;IACtB,IAAI,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,C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V,cAAc;QACd,eAAe,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,IAAI,EAAE;QAC5C,WAAW,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE;QAC7C,QAAQ;QACR,YAAY;QACZ,WAAW;QACX,eAAe;QACf,aAAa;QACb,eAAe;QACf,gBAAgB;QAChB,eAAe;KAChB,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAgB,EAChB,YAAoB;IAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,OAAO,IAAA,iBAAU,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MemorSystem, RepoMode, SupportRole } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Infers a lightweight support role for non-center systems
|
|
4
|
+
* where archetype or role hint is weak/missing. Returns undefined
|
|
5
|
+
* when no role can be confidently inferred.
|
|
6
|
+
*/
|
|
7
|
+
export declare function inferSupportRole(system: MemorSystem, repoMode: RepoMode): SupportRole | undefined;
|
|
8
|
+
//# sourceMappingURL=inferSupportRole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inferSupportRole.d.ts","sourceRoot":"","sources":["../../src/RepoTypeDetection/inferSupportRole.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAwH9E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,QAAQ,GACjB,WAAW,GAAG,SAAS,CA2DzB"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inferSupportRole = inferSupportRole;
|
|
4
|
+
const BLOCK_ROLE_MAP = {
|
|
5
|
+
cli: [{ role: "cli-utility", weight: 0.7 }],
|
|
6
|
+
scripts: [{ role: "development-tooling", weight: 0.4 }],
|
|
7
|
+
tests: [{ role: "test-harness", weight: 0.18 }],
|
|
8
|
+
mocks: [{ role: "test-harness", weight: 0.12 }],
|
|
9
|
+
config: [{ role: "infra-config-support", weight: 0.3 }],
|
|
10
|
+
docs: [{ role: "docs-content", weight: 0.35 }],
|
|
11
|
+
examples: [{ role: "docs-content", weight: 0.25 }],
|
|
12
|
+
schemas: [{ role: "shared-contracts", weight: 0.5 }],
|
|
13
|
+
"type-definitions": [{ role: "shared-contracts", weight: 0.5 }],
|
|
14
|
+
adapters: [{ role: "adapter-bridge", weight: 0.6 }],
|
|
15
|
+
transport: [{ role: "adapter-bridge", weight: 0.5 }],
|
|
16
|
+
providers: [{ role: "ecosystem-extension", weight: 0.55 }],
|
|
17
|
+
operators: [{ role: "ecosystem-extension", weight: 0.55 }],
|
|
18
|
+
plugins: [{ role: "ecosystem-extension", weight: 0.55 }],
|
|
19
|
+
sdks: [{ role: "ecosystem-extension", weight: 0.5 }],
|
|
20
|
+
integrations: [{ role: "ecosystem-extension", weight: 0.45 }],
|
|
21
|
+
workflows: [{ role: "workflow-logic", weight: 0.6 }],
|
|
22
|
+
tasks: [{ role: "workflow-logic", weight: 0.5 }],
|
|
23
|
+
orchestration: [{ role: "workflow-logic", weight: 0.6 }],
|
|
24
|
+
"source-tree": [{ role: "runtime-support", weight: 0.15 }],
|
|
25
|
+
"library-code": [{ role: "runtime-support", weight: 0.25 }],
|
|
26
|
+
utilities: [{ role: "runtime-support", weight: 0.2 }],
|
|
27
|
+
"static-assets": [{ role: "packaging-distribution", weight: 0.2 }],
|
|
28
|
+
templates: [{ role: "packaging-distribution", weight: 0.25 }],
|
|
29
|
+
"generated-code": [{ role: "packaging-distribution", weight: 0.2 }],
|
|
30
|
+
};
|
|
31
|
+
const NAME_ROLE_PATTERNS = [
|
|
32
|
+
{ pattern: /devtools|dev-tools|debug-tools|profil/, role: "devtools-instrumentation", weight: 0.7 },
|
|
33
|
+
{ pattern: /test-renderer|test-utils|testing|jest-|vitest-|cypress|playwright/, role: "test-harness", weight: 0.65 },
|
|
34
|
+
{ pattern: /eslint|prettier|lint|stylelint|commitlint/, role: "development-tooling", weight: 0.7 },
|
|
35
|
+
{ pattern: /cli$|[-/]cli$|^cli[-/]|ctl$|[-/]ctl$/, role: "cli-utility", weight: 0.7 },
|
|
36
|
+
{ pattern: /^scripts$|build-tools|tooling|codemods?|codegen|generator/, role: "development-tooling", weight: 0.6 },
|
|
37
|
+
{ pattern: /renderer|bindings|dom-bindings|native-renderer/, role: "renderer-binding", weight: 0.65 },
|
|
38
|
+
{ pattern: /server-dom|server-components/, role: "renderer-binding", weight: 0.6 },
|
|
39
|
+
{ pattern: /adapter|bridge|gateway|proxy/, role: "adapter-bridge", weight: 0.6 },
|
|
40
|
+
{ pattern: /provider|operators|hooks-ecosystem/, role: "ecosystem-extension", weight: 0.55 },
|
|
41
|
+
{ pattern: /sdk|sdks|client-lib/, role: "ecosystem-extension", weight: 0.5 },
|
|
42
|
+
{ pattern: /^docs$|documentation|guidebook|content/, role: "docs-content", weight: 0.6 },
|
|
43
|
+
{ pattern: /types|typings|contracts|schemas/, role: "shared-contracts", weight: 0.55 },
|
|
44
|
+
{ pattern: /shared|common|utils|helpers|core-util/, role: "runtime-support", weight: 0.4 },
|
|
45
|
+
{ pattern: /infra|deploy|docker|k8s|helm|terraform/, role: "infra-config-support", weight: 0.6 },
|
|
46
|
+
{ pattern: /config|tsconfig|eslint-config/, role: "infra-config-support", weight: 0.5 },
|
|
47
|
+
{ pattern: /workflow|dags|scheduler|executor|orchestrat/, role: "workflow-logic", weight: 0.55 },
|
|
48
|
+
{ pattern: /dist|publish|release|packaging/, role: "packaging-distribution", weight: 0.5 },
|
|
49
|
+
{ pattern: /icons|assets|fonts|images|media/, role: "packaging-distribution", weight: 0.4 },
|
|
50
|
+
];
|
|
51
|
+
function scoreBlocks(system) {
|
|
52
|
+
const scores = new Map();
|
|
53
|
+
for (const block of system.blocks) {
|
|
54
|
+
const mappings = BLOCK_ROLE_MAP[block.type];
|
|
55
|
+
if (!mappings)
|
|
56
|
+
continue;
|
|
57
|
+
for (const m of mappings) {
|
|
58
|
+
scores.set(m.role, (scores.get(m.role) || 0) + m.weight);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return [...scores.entries()].map(([role, score]) => ({ role, score }));
|
|
62
|
+
}
|
|
63
|
+
function scoreName(name) {
|
|
64
|
+
const n = name.toLowerCase();
|
|
65
|
+
const hits = [];
|
|
66
|
+
for (const p of NAME_ROLE_PATTERNS) {
|
|
67
|
+
if (p.pattern.test(n)) {
|
|
68
|
+
hits.push({ role: p.role, score: p.weight });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return hits;
|
|
72
|
+
}
|
|
73
|
+
function repoModeBoost(role, repoMode) {
|
|
74
|
+
if (repoMode === "workflow-platform") {
|
|
75
|
+
if (role === "workflow-logic" || role === "ecosystem-extension")
|
|
76
|
+
return 0.15;
|
|
77
|
+
}
|
|
78
|
+
if (repoMode === "framework-core") {
|
|
79
|
+
if (role === "renderer-binding" || role === "adapter-bridge")
|
|
80
|
+
return 0.15;
|
|
81
|
+
if (role === "devtools-instrumentation" || role === "test-harness")
|
|
82
|
+
return 0.1;
|
|
83
|
+
if (role === "runtime-support")
|
|
84
|
+
return 0.15;
|
|
85
|
+
}
|
|
86
|
+
if (repoMode === "library-tooling") {
|
|
87
|
+
if (role === "development-tooling")
|
|
88
|
+
return 0.1;
|
|
89
|
+
}
|
|
90
|
+
if (repoMode === "product-domain-machine") {
|
|
91
|
+
if (role === "workflow-logic")
|
|
92
|
+
return -0.2;
|
|
93
|
+
}
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* For framework-core repos, packages with the framework name prefix
|
|
98
|
+
* and minimal structure are likely runtime support modules.
|
|
99
|
+
*/
|
|
100
|
+
function frameworkPackageFallback(system, repoMode) {
|
|
101
|
+
if (repoMode !== "framework-core")
|
|
102
|
+
return undefined;
|
|
103
|
+
const meaningfulBlocks = system.blocks.filter((b) => b.type !== "source-tree" && b.type !== "tests" && b.type !== "config" &&
|
|
104
|
+
b.type !== "scripts" && b.type !== "unknown");
|
|
105
|
+
if (meaningfulBlocks.length > 0)
|
|
106
|
+
return undefined;
|
|
107
|
+
const n = system.name.toLowerCase();
|
|
108
|
+
if (/renderer|bindings|dom-binding|native-renderer/.test(n))
|
|
109
|
+
return "renderer-binding";
|
|
110
|
+
if (/devtools|debug|profil/.test(n))
|
|
111
|
+
return "devtools-instrumentation";
|
|
112
|
+
if (/test-renderer|test-util|testing/.test(n))
|
|
113
|
+
return "test-harness";
|
|
114
|
+
if (/eslint|lint/.test(n))
|
|
115
|
+
return "development-tooling";
|
|
116
|
+
if (/refresh|hot/.test(n))
|
|
117
|
+
return "development-tooling";
|
|
118
|
+
return "runtime-support";
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Infers a lightweight support role for non-center systems
|
|
122
|
+
* where archetype or role hint is weak/missing. Returns undefined
|
|
123
|
+
* when no role can be confidently inferred.
|
|
124
|
+
*/
|
|
125
|
+
function inferSupportRole(system, repoMode) {
|
|
126
|
+
if (system.isRepoCenter)
|
|
127
|
+
return undefined;
|
|
128
|
+
if (system.systemRoleHint && system.systemRoleHint !== "unknown" && system.systemRoleHint !== "workflow-support-package") {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
// Primary runnable systems already have strong identity from type + archetype
|
|
132
|
+
if (system.systemTier === "primary" &&
|
|
133
|
+
system.runtimeRole === "runnable" &&
|
|
134
|
+
(system.type === "web-app" || system.type === "api-service")) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
// Docs-site and infra systems have clear type-based identity
|
|
138
|
+
if (system.type === "docs-site" || system.type === "infra") {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const allScores = new Map();
|
|
142
|
+
const merge = (items) => {
|
|
143
|
+
for (const { role, score } of items) {
|
|
144
|
+
allScores.set(role, (allScores.get(role) || 0) + score);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
merge(scoreBlocks(system));
|
|
148
|
+
merge(scoreName(system.name));
|
|
149
|
+
// UI-dominant systems should never be classified as development-tooling
|
|
150
|
+
const blockTypes = new Set(system.blocks.map(b => b.type));
|
|
151
|
+
const isUISystem = blockTypes.has("ui-components") || blockTypes.has("hooks") ||
|
|
152
|
+
system.packageArchetype === "ui-library";
|
|
153
|
+
if (isUISystem) {
|
|
154
|
+
allScores.delete("development-tooling");
|
|
155
|
+
}
|
|
156
|
+
for (const [role, base] of allScores) {
|
|
157
|
+
const boost = repoModeBoost(role, repoMode);
|
|
158
|
+
if (boost !== 0)
|
|
159
|
+
allScores.set(role, base + boost);
|
|
160
|
+
}
|
|
161
|
+
const sorted = [...allScores.entries()].sort((a, b) => b[1] - a[1]);
|
|
162
|
+
if (sorted.length === 0) {
|
|
163
|
+
return frameworkPackageFallback(system, repoMode);
|
|
164
|
+
}
|
|
165
|
+
const [bestRole, bestScore] = sorted[0];
|
|
166
|
+
if (bestScore < 0.4) {
|
|
167
|
+
return frameworkPackageFallback(system, repoMode) ?? undefined;
|
|
168
|
+
}
|
|
169
|
+
if (sorted.length >= 2) {
|
|
170
|
+
const gap = bestScore - sorted[1][1];
|
|
171
|
+
if (gap < 0.1 && bestScore < 0.6) {
|
|
172
|
+
return frameworkPackageFallback(system, repoMode) ?? undefined;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return bestRole;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=inferSupportRole.js.map
|