project-graph-mcp 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -13
- package/package.json +1 -1
- package/rules/test-rules.json +15 -0
- package/src/.project-graph-cache.json +1 -1
- package/src/analysis/analysis-cache.js +3 -1
- package/src/analysis/complexity.js +9 -13
- package/src/analysis/custom-rules.js +16 -35
- package/src/analysis/db-analysis.js +2 -6
- package/src/analysis/dead-code.js +8 -18
- package/src/analysis/full-analysis.js +9 -17
- package/src/analysis/jsdoc-checker.js +11 -23
- package/src/analysis/jsdoc-generator.js +8 -9
- package/src/analysis/similar-functions.js +8 -15
- package/src/analysis/test-annotations.js +12 -20
- package/src/analysis/type-checker.js +5 -7
- package/src/analysis/undocumented.js +10 -13
- package/src/cli/cli-handlers.js +4 -3
- package/src/compact/ai-context.js +2 -2
- package/src/compact/compact-migrate.js +8 -16
- package/src/compact/compact.js +3 -5
- package/src/compact/compress.js +7 -13
- package/src/compact/ctx-resolver.js +5 -0
- package/src/compact/ctx-to-jsdoc.js +13 -28
- package/src/compact/doc-dialect.js +18 -29
- package/src/compact/expand.js +10 -36
- package/src/compact/jsdoc-builder.js +5 -0
- package/src/compact/mode-config.js +6 -6
- package/src/compact/split-declarations.js +2 -0
- package/src/compact/validate-pipeline.js +7 -8
- package/src/core/event-bus.js +2 -1
- package/src/core/file-walker.js +4 -0
- package/src/core/filters.js +6 -5
- package/src/core/graph-builder.js +4 -11
- package/src/core/parser.js +19 -29
- package/src/core/utils.js +2 -0
- package/src/lang/lang-sql.js +7 -20
- package/src/mcp/mcp-server.js +2 -3
- package/src/mcp/tool-defs.js +1 -1
- package/src/mcp/tools.js +13 -21
- package/src/network/backend-lifecycle.js +15 -18
- package/src/network/local-gateway.js +10 -22
- package/src/network/mdns.js +5 -11
- package/src/network/server.js +1 -2
- package/src/network/web-server.js +7 -33
- package/web/app.js +19 -14
- package/web/components/code-block.js +1 -0
- package/web/components/quick-open.js +1 -0
- package/web/dashboard-state.js +1 -0
- package/web/panels/ActionBoard/ActionBoard.css.js +1 -0
- package/web/panels/ActionBoard/ActionBoard.js +5 -4
- package/web/panels/ActionBoard/ActionBoard.tpl.js +1 -0
- package/web/panels/EventItem/EventItem.css.js +1 -0
- package/web/panels/EventItem/EventItem.js +4 -4
- package/web/panels/EventItem/EventItem.tpl.js +1 -0
- package/web/panels/ProjectItem/ProjectItem.css.js +2 -1
- package/web/panels/ProjectItem/ProjectItem.js +3 -4
- package/web/panels/ProjectItem/ProjectItem.tpl.js +2 -1
- package/web/panels/ProjectList/ProjectList.css.js +1 -0
- package/web/panels/ProjectList/ProjectList.js +5 -4
- package/web/panels/ProjectList/ProjectList.tpl.js +1 -0
- package/web/panels/SettingsPanel/SettingsPanel.css.js +1 -0
- package/web/panels/SettingsPanel/SettingsPanel.js +2 -3
- package/web/panels/SettingsPanel/SettingsPanel.tpl.js +1 -0
- package/web/panels/code-viewer.js +1 -0
- package/web/panels/ctx-panel.js +1 -0
- package/web/panels/dep-graph.js +1 -0
- package/web/panels/file-tree.js +4 -188
- package/web/panels/health-panel.js +1 -0
- package/web/panels/live-monitor.js +1 -0
- package/web/state.js +7 -10
package/README.md
CHANGED
|
@@ -366,19 +366,11 @@ Best used together with [**agent-pool-mcp**](https://www.npmjs.com/package/agent
|
|
|
366
366
|
| **Primary IDE agent** | Navigates codebase, runs analysis | Delegates tasks, consults peer |
|
|
367
367
|
| **Gemini CLI workers** | Available as MCP tool inside workers | Executes delegated tasks |
|
|
368
368
|
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
"args": ["-y", "project-graph-mcp"]
|
|
375
|
-
},
|
|
376
|
-
"agent-pool": {
|
|
377
|
-
"command": "npx",
|
|
378
|
-
"args": ["-y", "agent-pool-mcp"]
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
369
|
+
```bash
|
|
370
|
+
# Generate configs with correct paths for both servers:
|
|
371
|
+
npx -y project-graph-mcp config
|
|
372
|
+
npx -y agent-pool-mcp config
|
|
373
|
+
# Merge both outputs into your IDE's MCP config file.
|
|
382
374
|
```
|
|
383
375
|
|
|
384
376
|
> [!IMPORTANT]
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "test-rules",
|
|
3
|
+
"description": "Custom rules for test-rules",
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"id": "no-console",
|
|
7
|
+
"name": "No Console",
|
|
8
|
+
"description": "Disallow console.log",
|
|
9
|
+
"pattern": "console\\.log",
|
|
10
|
+
"patternType": "regex",
|
|
11
|
+
"severity": "warning",
|
|
12
|
+
"filePattern": "*.js"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"path":"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src","mtimes":{"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/analysis-cache.js":1775932068076.741,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/complexity.js":1775932068098.837,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/custom-rules.js":1775932068138.1648,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/db-analysis.js":1775932068151.1123,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/dead-code.js":1775932068179.2783,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/full-analysis.js":1775932068199.422,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/jsdoc-checker.js":1775932068214.1042,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/jsdoc-generator.js":1775932068226.255,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/large-files.js":1775932068231.2554,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/outdated-patterns.js":1775932068241.3853,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/similar-functions.js":1775932068258.163,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/test-annotations.js":1775932068268.5154,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/type-checker.js":1775932068273.1277,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/undocumented.js":1775932068287.6243,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/cli/cli-handlers.js":1775932068298.3313,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/cli/cli.js":1775932068300.5159,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/ai-context.js":1775932068307.1665,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/compact.js":1775932562256.5852,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/compress.js":1775958722177.8923,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/ctx-to-jsdoc.js":1775932068348.9448,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/doc-dialect.js":1775932068402.0254,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/expand.js":1775932068432.0977,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/framework-references.js":1775932068436.373,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/instructions.js":1775932068437.6816,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/mode-config.js":1775932068441.0076,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/validate-pipeline.js":1775932068445.2222,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/event-bus.js":1775932068446.521,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/filters.js":1775932068453.1003,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/graph-builder.js":1775932068467.494,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/parser.js":1775932068524.0032,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/workspace.js":1775932068530.74,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-go.js":1775932068546.679,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-python.js":1775932068554.9434,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-sql.js":1775932068573.637,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-typescript.js":1775932068582.2983,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-utils.js":1775932068585.4934,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/mcp-server.js":1775932068611.3706,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/tool-defs.js":1775932068615.0066,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/tools.js":1775932068628.6646,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/backend-lifecycle.js":1775932068638.9226,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/backend.js":1775932249992.6167,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/local-gateway.js":1775932068657.378,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/mdns.js":1775932068663.7195,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/server.js":1775932211325.8235,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/web-server.js":1775942632249.3735},"graph":{"v":1,"legend":{"computeContentHash":"CH","getCachePath":"CP","readCache":"rC","writeCache":"wC","isCacheValid":"CV","findJSFiles":"JSF","calculateComplexity":"cC","getRating":"gR","analyzeComplexityFile":"CF","analyzeFile":"aF","getComplexity":"gC","parseGraphignore":"pG","isGraphignored":"iG","loadRuleSets":"RS","saveRuleSet":"RS1","findFiles":"fF","isExcluded":"iE","isInStringOrComment":"ISO","isWithinContext":"WC","checkFileAgainstRule":"FAR","getCustomRules":"CR","setCustomRule":"CR1","deleteCustomRule":"CR2","detectProjectRuleSets":"PRS","checkCustomRules":"CR3","getDBSchema":"DBS","getTableUsage":"TU","getDBDeadTables":"DBD","collectReferencedColumns":"RC","findProjectRoot":"PR","analyzeFileLocals":"FL","getDeadCode":"DC","calculateHealthScore":"HS","runCacheableAnalyses":"CA","aggregateComplexity":"aC","aggregateUndocumented":"aU","aggregateJSDoc":"JSD","getFullAnalysis":"FA","getAnalysisSummaryOnly":"ASO","extractJSDocComments":"JSD1","findJSDocBefore":"JSD2","extractParamName":"PN","inferTypeFromDefault":"TFD","hasReturnValue":"RV","validateFunction":"vF","checkJSDocFile":"JSD3","checkJSDocConsistency":"JSD4","generateJSDoc":"JSD5","buildJSDoc":"JSD6","inferParamType":"PT","generateJSDocFor":"JSD7","getLargeFiles":"LF","analyzeFilePatterns":"FP","analyzePackageJson":"PJ","getOutdatedPatterns":"OP","extractSignatures":"eS","buildSignature":"bS","hashBodyStructure":"BS","calculateSimilarity":"cS","getSimilarFunctions":"SF","findCtxMdFiles":"CMF","parseAnnotations":"pA","groupByName":"BN","getAllFeatures":"AF","getPendingTests":"PT1","markTestPassed":"TP","markTestFailed":"TF","updateTestState":"TS","getTestSummary":"TS1","resetTestState":"TS2","detectTsc":"dT","parseDiagnosticLine":"DL","buildArgs":"bA","checkTypes":"cT","extractComments":"eC","checkMissing":"cM","checkUndocumentedFile":"UF","getUndocumented":"gU","getUndocumentedSummary":"US","getArg":"gA","getPath":"gP","printHelp":"pH","runCLI":"CLI","estimateTokens":"eT","getAiContext":"AC","walkJSFiles":"JSF1","addTopLevelNewlines":"TLN","resolveCtxPath":"CP1","compactFile":"cF","beautifyFile":"bF","compactProject":"cP","expandProject":"eP","extractLegend":"eL","compressFile":"cF1","editCompressed":"eC1","findSymbolRange":"SR","parseCtxFile":"CF1","buildJSDocBlock":"JSD8","findCtxFile":"CF2","findExportStart":"ES","injectJSDoc":"JSD9","stripJSDoc":"JSD10","splitTopLevelParams":"TLP","validateCtxContracts":"CC","generateDocDialect":"DD","walkCtxFiles":"CF3","resolveCtxMdPath":"CMP","readContextDocs":"CD","getProjectDocs":"PD","computeSignature":"cS1","parseCtxDescriptions":"CD1","checkStaleness":"cS2","buildFileTemplate":"FT","generateContextFiles":"CF4","processFileCtx":"FC","parseCtxSignatures":"CS","parseCtxParams":"CP2","extractReturnType":"RT","sanitizeJSDocText":"JSD11","parseCtxVars":"CV1","parseCtxNames":"CN","collectLocals":"cL","collectLocalDecls":"LD","restoreNames":"rN","expandFile":"eF","resolveCtx":"rC1","fetchReference":"fR","listAvailable":"lA","getFrameworkReference":"FR","getInstructions":"gI","getConfig":"gC1","setConfig":"sC","getModeDescription":"MD","getModeWorkflow":"MW","validatePipeline":"vP","emitToolCall":"TC","emitToolResult":"TR","onToolCall":"TC1","onToolResult":"TR1","removeToolListener":"TL","getFilters":"gF","setFilters":"sF","addExcludes":"aE","removeExcludes":"rE","resetFilters":"rF","parseGitignore":"pG1","shouldExcludeDir":"ED","shouldExcludeFile":"EF","matchWildcard":"mW","matchGitignorePattern":"GP","minifyLegend":"mL","createShortName":"SN","buildGraph":"bG","createSkeleton":"cS3","parseFile":"pF","extractCallsAndSQL":"CAS","getTagName":"TN","getCallMethodName":"CMN","extractStringValue":"SV","templateToString":"TS3","discoverSubProjects":"SP","parseProject":"pP","parseFileByExtension":"FBE","isSourceFile":"SF1","findAllProjectFiles":"APF","buildJSDocTypeMap":"JSD12","findJSDocForNode":"JSD13","enrichParamsWithTypes":"PWT","setRoots":"sR","getWorkspaceRoot":"WR","resolvePath":"rP","parseGo":"pG2","extractImports":"eI","getBody":"gB","extractCalls":"eC2","parsePython":"pP1","isSQLString":"SQL","isValidTableName":"VTN","extractSQLFromString":"SQL1","parseSQL":"SQL2","parseColumns":"pC","splitByTopLevelComma":"BTL","extractSQLFromCode":"SQL3","extractORMFromCode":"ORM","parseTypeScript":"TS4","extractParams":"eP1","stripStringsAndComments":"SAC","createServer":"cS4","startStdioServer":"SS","saveDiskCache":"DC1","loadDiskCache":"DC2","getGraph":"gG","detectChanges":"dC","snapshotMtimes":"sM","getSkeleton":"gS","getFocusZone":"FZ","expand":"ex","deps":"de","usages":"us","extractMethod":"eM","getCallChain":"CC1","invalidateCache":"iC","getPortFilePath":"PFP","readPortFile":"PF","writePortFile":"PF1","removePortFile":"PF2","listBackends":"lB","ensureBackend":"eB","encodeClientFrame":"CF5","decodeFrame":"dF","startStdioProxy":"SP1","cleanup":"cl","readRegistry":"rR","writeRegistry":"wR","registerService":"rS","resolveBackend":"rB","readGatewayPid":"GP1","isGatewayRunning":"GR","getGatewayPort":"GP2","startListening":"sL","ensureGateway":"eG","stopGateway":"sG","registerLocal":"rL","registerDnsSd":"DS","tryAvahi":"tA","registerMcast":"rM","serveStatic":"sS","computeWSAccept":"WSA","encodeWSFrame":"WSF","decodeWSFrame":"WSF1","broadcastRPC":"RPC","patchState":"pS","ensureSkeleton":"eS1","hasActiveClients":"AC1","resetShutdownTimer":"ST","startShutdownTimer":"ST1","touchActivity":"tA1","handleAPI":"API","startWebServer":"WS"},"reverseLegend":{"CH":"computeContentHash","CP":"getCachePath","rC":"readCache","wC":"writeCache","CV":"isCacheValid","JSF":"findJSFiles","cC":"calculateComplexity","gR":"getRating","CF":"analyzeComplexityFile","aF":"analyzeFile","gC":"getComplexity","pG":"parseGraphignore","iG":"isGraphignored","RS":"loadRuleSets","RS1":"saveRuleSet","fF":"findFiles","iE":"isExcluded","ISO":"isInStringOrComment","WC":"isWithinContext","FAR":"checkFileAgainstRule","CR":"getCustomRules","CR1":"setCustomRule","CR2":"deleteCustomRule","PRS":"detectProjectRuleSets","CR3":"checkCustomRules","DBS":"getDBSchema","TU":"getTableUsage","DBD":"getDBDeadTables","RC":"collectReferencedColumns","PR":"findProjectRoot","FL":"analyzeFileLocals","DC":"getDeadCode","HS":"calculateHealthScore","CA":"runCacheableAnalyses","aC":"aggregateComplexity","aU":"aggregateUndocumented","JSD":"aggregateJSDoc","FA":"getFullAnalysis","ASO":"getAnalysisSummaryOnly","JSD1":"extractJSDocComments","JSD2":"findJSDocBefore","PN":"extractParamName","TFD":"inferTypeFromDefault","RV":"hasReturnValue","vF":"validateFunction","JSD3":"checkJSDocFile","JSD4":"checkJSDocConsistency","JSD5":"generateJSDoc","JSD6":"buildJSDoc","PT":"inferParamType","JSD7":"generateJSDocFor","LF":"getLargeFiles","FP":"analyzeFilePatterns","PJ":"analyzePackageJson","OP":"getOutdatedPatterns","eS":"extractSignatures","bS":"buildSignature","BS":"hashBodyStructure","cS":"calculateSimilarity","SF":"getSimilarFunctions","CMF":"findCtxMdFiles","pA":"parseAnnotations","BN":"groupByName","AF":"getAllFeatures","PT1":"getPendingTests","TP":"markTestPassed","TF":"markTestFailed","TS":"updateTestState","TS1":"getTestSummary","TS2":"resetTestState","dT":"detectTsc","DL":"parseDiagnosticLine","bA":"buildArgs","cT":"checkTypes","eC":"extractComments","cM":"checkMissing","UF":"checkUndocumentedFile","gU":"getUndocumented","US":"getUndocumentedSummary","gA":"getArg","gP":"getPath","pH":"printHelp","CLI":"runCLI","eT":"estimateTokens","AC":"getAiContext","JSF1":"walkJSFiles","TLN":"addTopLevelNewlines","CP1":"resolveCtxPath","cF":"compactFile","bF":"beautifyFile","cP":"compactProject","eP":"expandProject","eL":"extractLegend","cF1":"compressFile","eC1":"editCompressed","SR":"findSymbolRange","CF1":"parseCtxFile","JSD8":"buildJSDocBlock","CF2":"findCtxFile","ES":"findExportStart","JSD9":"injectJSDoc","JSD10":"stripJSDoc","TLP":"splitTopLevelParams","CC":"validateCtxContracts","DD":"generateDocDialect","CF3":"walkCtxFiles","CMP":"resolveCtxMdPath","CD":"readContextDocs","PD":"getProjectDocs","cS1":"computeSignature","CD1":"parseCtxDescriptions","cS2":"checkStaleness","FT":"buildFileTemplate","CF4":"generateContextFiles","FC":"processFileCtx","CS":"parseCtxSignatures","CP2":"parseCtxParams","RT":"extractReturnType","JSD11":"sanitizeJSDocText","CV1":"parseCtxVars","CN":"parseCtxNames","cL":"collectLocals","LD":"collectLocalDecls","rN":"restoreNames","eF":"expandFile","rC1":"resolveCtx","fR":"fetchReference","lA":"listAvailable","FR":"getFrameworkReference","gI":"getInstructions","gC1":"getConfig","sC":"setConfig","MD":"getModeDescription","MW":"getModeWorkflow","vP":"validatePipeline","TC":"emitToolCall","TR":"emitToolResult","TC1":"onToolCall","TR1":"onToolResult","TL":"removeToolListener","gF":"getFilters","sF":"setFilters","aE":"addExcludes","rE":"removeExcludes","rF":"resetFilters","pG1":"parseGitignore","ED":"shouldExcludeDir","EF":"shouldExcludeFile","mW":"matchWildcard","GP":"matchGitignorePattern","mL":"minifyLegend","SN":"createShortName","bG":"buildGraph","cS3":"createSkeleton","pF":"parseFile","CAS":"extractCallsAndSQL","TN":"getTagName","CMN":"getCallMethodName","SV":"extractStringValue","TS3":"templateToString","SP":"discoverSubProjects","pP":"parseProject","FBE":"parseFileByExtension","SF1":"isSourceFile","APF":"findAllProjectFiles","JSD12":"buildJSDocTypeMap","JSD13":"findJSDocForNode","PWT":"enrichParamsWithTypes","sR":"setRoots","WR":"getWorkspaceRoot","rP":"resolvePath","pG2":"parseGo","eI":"extractImports","gB":"getBody","eC2":"extractCalls","pP1":"parsePython","SQL":"isSQLString","VTN":"isValidTableName","SQL1":"extractSQLFromString","SQL2":"parseSQL","pC":"parseColumns","BTL":"splitByTopLevelComma","SQL3":"extractSQLFromCode","ORM":"extractORMFromCode","TS4":"parseTypeScript","eP1":"extractParams","SAC":"stripStringsAndComments","cS4":"createServer","SS":"startStdioServer","DC1":"saveDiskCache","DC2":"loadDiskCache","gG":"getGraph","dC":"detectChanges","sM":"snapshotMtimes","gS":"getSkeleton","FZ":"getFocusZone","ex":"expand","de":"deps","us":"usages","eM":"extractMethod","CC1":"getCallChain","iC":"invalidateCache","PFP":"getPortFilePath","PF":"readPortFile","PF1":"writePortFile","PF2":"removePortFile","lB":"listBackends","eB":"ensureBackend","CF5":"encodeClientFrame","dF":"decodeFrame","SP1":"startStdioProxy","cl":"cleanup","rR":"readRegistry","wR":"writeRegistry","rS":"registerService","rB":"resolveBackend","GP1":"readGatewayPid","GR":"isGatewayRunning","GP2":"getGatewayPort","sL":"startListening","eG":"ensureGateway","sG":"stopGateway","rL":"registerLocal","DS":"registerDnsSd","tA":"tryAvahi","rM":"registerMcast","sS":"serveStatic","WSA":"computeWSAccept","WSF":"encodeWSFrame","WSF1":"decodeWSFrame","RPC":"broadcastRPC","pS":"patchState","eS1":"ensureSkeleton","AC1":"hasActiveClients","ST":"resetShutdownTimer","ST1":"startShutdownTimer","tA1":"touchActivity","API":"handleAPI","WS":"startWebServer"},"stats":{"files":45,"classes":0,"functions":260,"tables":0},"nodes":{"CH":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"CP":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"rC":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"wC":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"CV":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"JSF":{"t":"F","e":true,"f":"core/parser.js"},"cC":{"t":"F","e":false,"f":"analysis/complexity.js"},"gR":{"t":"F","e":false,"f":"analysis/complexity.js"},"CF":{"t":"F","e":true,"f":"analysis/complexity.js"},"aF":{"t":"F","e":false,"f":"analysis/large-files.js"},"gC":{"t":"F","e":true,"f":"analysis/complexity.js"},"pG":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"iG":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"RS":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"RS1":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"fF":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"iE":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"ISO":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"WC":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"FAR":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"CR":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR1":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR2":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"PRS":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR3":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"DBS":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"TU":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"DBD":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"RC":{"t":"F","e":false,"f":"analysis/db-analysis.js"},"PR":{"t":"F","e":false,"f":"analysis/dead-code.js"},"FL":{"t":"F","e":false,"f":"analysis/dead-code.js"},"DC":{"t":"F","e":true,"f":"analysis/dead-code.js"},"HS":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"CA":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"aC":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"aU":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"JSD":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"FA":{"t":"F","e":true,"f":"analysis/full-analysis.js"},"ASO":{"t":"F","e":true,"f":"analysis/full-analysis.js"},"JSD1":{"t":"F","e":false,"f":"analysis/jsdoc-checker.js"},"JSD2":{"t":"F","e":false,"f":"analysis/undocumented.js"},"PN":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"TFD":{"t":"F","e":false,"f":"analysis/jsdoc-checker.js"},"RV":{"t":"F","e":false,"f":"analysis/jsdoc-checker.js"},"vF":{"t":"F","e":false,"f":"analysis/jsdoc-checker.js"},"JSD3":{"t":"F","e":true,"f":"analysis/jsdoc-checker.js"},"JSD4":{"t":"F","e":true,"f":"analysis/jsdoc-checker.js"},"JSD5":{"t":"F","e":false,"f":"compact/expand.js"},"JSD6":{"t":"F","e":false,"f":"analysis/jsdoc-generator.js"},"PT":{"t":"F","e":false,"f":"analysis/jsdoc-generator.js"},"JSD7":{"t":"F","e":true,"f":"analysis/jsdoc-generator.js"},"LF":{"t":"F","e":true,"f":"analysis/large-files.js"},"FP":{"t":"F","e":false,"f":"analysis/outdated-patterns.js"},"PJ":{"t":"F","e":false,"f":"analysis/outdated-patterns.js"},"OP":{"t":"F","e":true,"f":"analysis/outdated-patterns.js"},"eS":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"bS":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"BS":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"cS":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"SF":{"t":"F","e":true,"f":"analysis/similar-functions.js"},"CMF":{"t":"F","e":false,"f":"analysis/test-annotations.js"},"pA":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"BN":{"t":"F","e":false,"f":"analysis/test-annotations.js"},"AF":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"PT1":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TP":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TF":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TS":{"t":"F","e":false,"f":"analysis/test-annotations.js"},"TS1":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TS2":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"dT":{"t":"F","e":false,"f":"analysis/type-checker.js"},"DL":{"t":"F","e":false,"f":"analysis/type-checker.js"},"bA":{"t":"F","e":false,"f":"analysis/type-checker.js"},"cT":{"t":"F","e":true,"f":"analysis/type-checker.js"},"eC":{"t":"F","e":false,"f":"analysis/undocumented.js"},"cM":{"t":"F","e":false,"f":"analysis/undocumented.js"},"UF":{"t":"F","e":true,"f":"analysis/undocumented.js"},"gU":{"t":"F","e":true,"f":"analysis/undocumented.js"},"US":{"t":"F","e":true,"f":"analysis/undocumented.js"},"gA":{"t":"F","e":false,"f":"cli/cli-handlers.js"},"gP":{"t":"F","e":false,"f":"cli/cli-handlers.js"},"pH":{"t":"F","e":true,"f":"cli/cli.js"},"CLI":{"t":"F","e":true,"f":"cli/cli.js"},"eT":{"t":"F","e":false,"f":"compact/validate-pipeline.js"},"AC":{"t":"F","e":true,"f":"compact/ai-context.js"},"JSF1":{"t":"F","e":false,"f":"compact/validate-pipeline.js"},"TLN":{"t":"F","e":false,"f":"compact/compact.js"},"CP1":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"cF":{"t":"F","e":false,"f":"compact/compact.js"},"bF":{"t":"F","e":false,"f":"compact/compact.js"},"cP":{"t":"F","e":true,"f":"compact/compact.js"},"eP":{"t":"F","e":true,"f":"compact/expand.js"},"eL":{"t":"F","e":false,"f":"compact/compress.js"},"cF1":{"t":"F","e":true,"f":"compact/compress.js"},"eC1":{"t":"F","e":true,"f":"compact/compress.js"},"SR":{"t":"F","e":false,"f":"compact/compress.js"},"CF1":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"JSD8":{"t":"F","e":false,"f":"compact/ctx-to-jsdoc.js"},"CF2":{"t":"F","e":false,"f":"compact/ctx-to-jsdoc.js"},"ES":{"t":"F","e":false,"f":"compact/ctx-to-jsdoc.js"},"JSD9":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"JSD10":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"TLP":{"t":"F","e":false,"f":"compact/ctx-to-jsdoc.js"},"CC":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"DD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"CF3":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"CMP":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"CD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"PD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"cS1":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"CD1":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"cS2":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"FT":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"CF4":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"FC":{"t":"F","e":false,"f":"compact/doc-dialect.js"},"CS":{"t":"F","e":false,"f":"compact/expand.js"},"CP2":{"t":"F","e":false,"f":"compact/expand.js"},"RT":{"t":"F","e":false,"f":"compact/expand.js"},"JSD11":{"t":"F","e":false,"f":"compact/expand.js"},"CV1":{"t":"F","e":false,"f":"compact/expand.js"},"CN":{"t":"F","e":false,"f":"compact/expand.js"},"cL":{"t":"F","e":false,"f":"compact/expand.js"},"LD":{"t":"F","e":false,"f":"compact/expand.js"},"rN":{"t":"F","e":false,"f":"compact/expand.js"},"eF":{"t":"F","e":true,"f":"compact/expand.js"},"rC1":{"t":"F","e":false,"f":"compact/expand.js"},"fR":{"t":"F","e":false,"f":"compact/framework-references.js"},"lA":{"t":"F","e":false,"f":"compact/framework-references.js"},"FR":{"t":"F","e":true,"f":"compact/framework-references.js"},"gI":{"t":"F","e":true,"f":"compact/instructions.js"},"gC1":{"t":"F","e":true,"f":"compact/mode-config.js"},"sC":{"t":"F","e":true,"f":"compact/mode-config.js"},"MD":{"t":"F","e":true,"f":"compact/mode-config.js"},"MW":{"t":"F","e":true,"f":"compact/mode-config.js"},"vP":{"t":"F","e":true,"f":"compact/validate-pipeline.js"},"TC":{"t":"F","e":true,"f":"core/event-bus.js"},"TR":{"t":"F","e":true,"f":"core/event-bus.js"},"TC1":{"t":"F","e":true,"f":"core/event-bus.js"},"TR1":{"t":"F","e":true,"f":"core/event-bus.js"},"TL":{"t":"F","e":true,"f":"core/event-bus.js"},"gF":{"t":"F","e":true,"f":"core/filters.js"},"sF":{"t":"F","e":true,"f":"core/filters.js"},"aE":{"t":"F","e":true,"f":"core/filters.js"},"rE":{"t":"F","e":true,"f":"core/filters.js"},"rF":{"t":"F","e":true,"f":"core/filters.js"},"pG1":{"t":"F","e":true,"f":"core/filters.js"},"ED":{"t":"F","e":true,"f":"core/filters.js"},"EF":{"t":"F","e":true,"f":"core/filters.js"},"mW":{"t":"F","e":false,"f":"core/filters.js"},"GP":{"t":"F","e":false,"f":"core/filters.js"},"mL":{"t":"F","e":true,"f":"core/graph-builder.js"},"SN":{"t":"F","e":false,"f":"core/graph-builder.js"},"bG":{"t":"F","e":true,"f":"core/graph-builder.js"},"cS3":{"t":"F","e":true,"f":"core/graph-builder.js"},"pF":{"t":"F","e":true,"f":"core/parser.js"},"CAS":{"t":"F","e":false,"f":"core/parser.js"},"TN":{"t":"F","e":false,"f":"core/parser.js"},"CMN":{"t":"F","e":false,"f":"core/parser.js"},"SV":{"t":"F","e":false,"f":"core/parser.js"},"TS3":{"t":"F","e":false,"f":"core/parser.js"},"SP":{"t":"F","e":true,"f":"core/parser.js"},"pP":{"t":"F","e":true,"f":"core/parser.js"},"FBE":{"t":"F","e":false,"f":"core/parser.js"},"SF1":{"t":"F","e":false,"f":"core/parser.js"},"APF":{"t":"F","e":true,"f":"core/parser.js"},"JSD12":{"t":"F","e":false,"f":"core/parser.js"},"JSD13":{"t":"F","e":false,"f":"core/parser.js"},"PWT":{"t":"F","e":false,"f":"core/parser.js"},"sR":{"t":"F","e":true,"f":"core/workspace.js"},"WR":{"t":"F","e":true,"f":"core/workspace.js"},"rP":{"t":"F","e":true,"f":"core/workspace.js"},"pG2":{"t":"F","e":true,"f":"lang/lang-go.js"},"eI":{"t":"F","e":false,"f":"lang/lang-go.js"},"gB":{"t":"F","e":false,"f":"lang/lang-go.js"},"eC2":{"t":"F","e":false,"f":"lang/lang-go.js"},"pP1":{"t":"F","e":true,"f":"lang/lang-python.js"},"SQL":{"t":"F","e":true,"f":"lang/lang-sql.js"},"VTN":{"t":"F","e":false,"f":"lang/lang-sql.js"},"SQL1":{"t":"F","e":true,"f":"lang/lang-sql.js"},"SQL2":{"t":"F","e":true,"f":"lang/lang-sql.js"},"pC":{"t":"F","e":false,"f":"lang/lang-sql.js"},"BTL":{"t":"F","e":false,"f":"lang/lang-sql.js"},"SQL3":{"t":"F","e":true,"f":"lang/lang-sql.js"},"ORM":{"t":"F","e":true,"f":"lang/lang-sql.js"},"TS4":{"t":"F","e":true,"f":"lang/lang-typescript.js"},"eP1":{"t":"F","e":false,"f":"lang/lang-typescript.js"},"SAC":{"t":"F","e":true,"f":"lang/lang-utils.js"},"cS4":{"t":"F","e":true,"f":"mcp/mcp-server.js"},"SS":{"t":"F","e":true,"f":"mcp/mcp-server.js"},"DC1":{"t":"F","e":false,"f":"mcp/tools.js"},"DC2":{"t":"F","e":false,"f":"mcp/tools.js"},"gG":{"t":"F","e":true,"f":"mcp/tools.js"},"dC":{"t":"F","e":false,"f":"mcp/tools.js"},"sM":{"t":"F","e":false,"f":"mcp/tools.js"},"gS":{"t":"F","e":true,"f":"mcp/tools.js"},"FZ":{"t":"F","e":true,"f":"mcp/tools.js"},"ex":{"t":"F","e":true,"f":"mcp/tools.js"},"de":{"t":"F","e":true,"f":"mcp/tools.js"},"us":{"t":"F","e":true,"f":"mcp/tools.js"},"eM":{"t":"F","e":false,"f":"mcp/tools.js"},"CC1":{"t":"F","e":true,"f":"mcp/tools.js"},"iC":{"t":"F","e":true,"f":"mcp/tools.js"},"PFP":{"t":"F","e":false,"f":"network/backend-lifecycle.js"},"PF":{"t":"F","e":false,"f":"network/backend-lifecycle.js"},"PF1":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"PF2":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"lB":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"eB":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"CF5":{"t":"F","e":false,"f":"network/backend-lifecycle.js"},"dF":{"t":"F","e":false,"f":"network/backend-lifecycle.js"},"SP1":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"cl":{"t":"F","e":false,"f":"network/backend.js"},"rR":{"t":"F","e":false,"f":"network/local-gateway.js"},"wR":{"t":"F","e":false,"f":"network/local-gateway.js"},"rS":{"t":"F","e":true,"f":"network/local-gateway.js"},"rB":{"t":"F","e":false,"f":"network/local-gateway.js"},"GP1":{"t":"F","e":false,"f":"network/local-gateway.js"},"GR":{"t":"F","e":false,"f":"network/local-gateway.js"},"GP2":{"t":"F","e":true,"f":"network/local-gateway.js"},"sL":{"t":"F","e":false,"f":"network/local-gateway.js"},"eG":{"t":"F","e":false,"f":"network/local-gateway.js"},"sG":{"t":"F","e":false,"f":"network/local-gateway.js"},"rL":{"t":"F","e":true,"f":"network/mdns.js"},"DS":{"t":"F","e":false,"f":"network/mdns.js"},"tA":{"t":"F","e":false,"f":"network/mdns.js"},"rM":{"t":"F","e":false,"f":"network/mdns.js"},"sS":{"t":"F","e":false,"f":"network/web-server.js"},"WSA":{"t":"F","e":false,"f":"network/web-server.js"},"WSF":{"t":"F","e":false,"f":"network/web-server.js"},"WSF1":{"t":"F","e":false,"f":"network/web-server.js"},"RPC":{"t":"F","e":false,"f":"network/web-server.js"},"pS":{"t":"F","e":false,"f":"network/web-server.js"},"eS1":{"t":"F","e":false,"f":"network/web-server.js"},"AC1":{"t":"F","e":false,"f":"network/web-server.js"},"ST":{"t":"F","e":false,"f":"network/web-server.js"},"ST1":{"t":"F","e":false,"f":"network/web-server.js"},"tA1":{"t":"F","e":false,"f":"network/web-server.js"},"API":{"t":"F","e":false,"f":"network/web-server.js"},"WS":{"t":"F","e":true,"f":"network/web-server.js"}},"edges":[],"orphans":["calculateComplexity","getRating","analyzeFile","parseGraphignore","isGraphignored","loadRuleSets","saveRuleSet","findFiles","isExcluded","isInStringOrComment","isWithinContext","checkFileAgainstRule","collectReferencedColumns","findProjectRoot","analyzeFileLocals","calculateHealthScore","runCacheableAnalyses","aggregateComplexity","aggregateUndocumented","aggregateJSDoc","extractJSDocComments","findJSDocBefore","extractParamName","inferTypeFromDefault","hasReturnValue","validateFunction","generateJSDoc","buildJSDoc","inferParamType","analyzeFilePatterns","analyzePackageJson","extractSignatures","buildSignature","hashBodyStructure","calculateSimilarity","findCtxMdFiles","groupByName","updateTestState","detectTsc","parseDiagnosticLine","buildArgs","extractComments","checkMissing","getArg","getPath","estimateTokens","walkJSFiles","addTopLevelNewlines","resolveCtxPath","compactFile","beautifyFile","extractLegend","findSymbolRange","buildJSDocBlock","findCtxFile","findExportStart","splitTopLevelParams","walkCtxFiles","resolveCtxMdPath","computeSignature","parseCtxDescriptions","buildFileTemplate","processFileCtx","parseCtxSignatures","parseCtxParams","extractReturnType","sanitizeJSDocText","parseCtxVars","parseCtxNames","collectLocals","collectLocalDecls","restoreNames","resolveCtx","fetchReference","listAvailable","matchWildcard","matchGitignorePattern","createShortName","extractCallsAndSQL","getTagName","getCallMethodName","extractStringValue","templateToString","parseFileByExtension","isSourceFile","buildJSDocTypeMap","findJSDocForNode","enrichParamsWithTypes","extractImports","getBody","extractCalls","isValidTableName","parseColumns","splitByTopLevelComma","extractParams","saveDiskCache","loadDiskCache","detectChanges","snapshotMtimes","extractMethod","getPortFilePath","readPortFile","encodeClientFrame","decodeFrame","cleanup","readRegistry","writeRegistry","resolveBackend","readGatewayPid","isGatewayRunning","startListening","ensureGateway","stopGateway","registerDnsSd","tryAvahi","registerMcast","serveStatic","computeWSAccept","encodeWSFrame","decodeWSFrame","broadcastRPC","patchState","ensureSkeleton","hasActiveClients","resetShutdownTimer","startShutdownTimer","touchActivity","handleAPI"],"duplicates":{},"files":["analysis/analysis-cache.js","analysis/complexity.js","analysis/custom-rules.js","analysis/db-analysis.js","analysis/dead-code.js","analysis/full-analysis.js","analysis/jsdoc-checker.js","analysis/jsdoc-generator.js","analysis/large-files.js","analysis/outdated-patterns.js","analysis/similar-functions.js","analysis/test-annotations.js","analysis/type-checker.js","analysis/undocumented.js","cli/cli-handlers.js","cli/cli.js","compact/ai-context.js","compact/compact.js","compact/compress.js","compact/ctx-to-jsdoc.js","compact/doc-dialect.js","compact/expand.js","compact/framework-references.js","compact/instructions.js","compact/mode-config.js","compact/validate-pipeline.js","core/event-bus.js","core/filters.js","core/graph-builder.js","core/parser.js","core/workspace.js","lang/lang-go.js","lang/lang-python.js","lang/lang-sql.js","lang/lang-typescript.js","lang/lang-utils.js","mcp/mcp-server.js","mcp/tool-defs.js","mcp/tools.js","network/backend-lifecycle.js","network/backend.js","network/local-gateway.js","network/mdns.js","network/server.js","network/web-server.js"]}}
|
|
1
|
+
{"version":1,"path":"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src","mtimes":{"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/analysis-cache.js":1776021880954.865,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/complexity.js":1776020743745.4976,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/custom-rules.js":1776020743746.4695,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/db-analysis.js":1776020743747.036,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/dead-code.js":1776020743747.205,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/full-analysis.js":1776020743747.434,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/jsdoc-checker.js":1776020743747.778,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/jsdoc-generator.js":1776020743748.1309,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/large-files.js":1775932068231.2554,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/outdated-patterns.js":1775932068241.3853,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/similar-functions.js":1776020743748.3684,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/test-annotations.js":1776021880973.3127,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/type-checker.js":1776020743790.671,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/analysis/undocumented.js":1776020743791.3872,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/cli/cli-handlers.js":1776020743791.534,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/cli/cli.js":1776009281031.448,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/ai-context.js":1776024855845.1536,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/compact-migrate.js":1776025662126.3894,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/compact.js":1776025662121.6743,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/compress.js":1776024835288.3477,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/ctx-resolver.js":1776024988359.2908,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/ctx-to-jsdoc.js":1776025604473.7043,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/doc-dialect.js":1776021881027.7375,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/expand.js":1776025662125.8457,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/framework-references.js":1775932068436.373,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/instructions.js":1775932068437.6816,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/jsdoc-builder.js":1776024792784.1958,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/mode-config.js":1776021881032.5818,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/split-declarations.js":1776020731393.9968,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/compact/validate-pipeline.js":1776025626422.5903,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/event-bus.js":1776021881034.3083,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/file-walker.js":1776024739329.9265,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/filters.js":1776021881038.4585,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/graph-builder.js":1776020731524.8525,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/parser.js":1776021881058.1765,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/utils.js":1776024855849.509,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/core/workspace.js":1775932068530.74,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-go.js":1775932068546.679,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-python.js":1775932068554.9434,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-sql.js":1776021881068.4143,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-typescript.js":1775932068582.2983,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/lang/lang-utils.js":1775932068585.4934,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/mcp-server.js":1776017634423.9546,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/tool-defs.js":1776018403086.5388,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/mcp/tools.js":1776021881078.6213,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/backend-lifecycle.js":1776021881086.6484,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/backend.js":1775932249992.6167,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/local-gateway.js":1776020743913.1072,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/mdns.js":1776020743913.2654,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/server.js":1776016300633.3318,"/Users/v.matiyasevich/Documents/GitHub/project-graph-mcp/src/network/web-server.js":1776026310263.7048},"graph":{"v":1,"legend":{"computeContentHash":"CH","getCachePath":"CP","readCache":"rC","writeCache":"wC","isCacheValid":"CV","p":"p","u":"u","h":"h","analyzeComplexityFile":"CF","f":"f","getComplexity":"gC","y":"y","g":"g","x":"x","v":"v","$":"$","j":"j","S":"sS","b":"b","getCustomRules":"CR","setCustomRule":"CR1","deleteCustomRule":"CR2","detectProjectRuleSets":"PRS","checkCustomRules":"CR3","getDBSchema":"DBS","getTableUsage":"TU","getDBDeadTables":"DBD","m":"m","getDeadCode":"DC","w":"w","F":"fF","D":"dD","M":"mM","P":"pP","getFullAnalysis":"FA","getAnalysisSummaryOnly":"ASO","d":"d","checkJSDocFile":"JSD","checkJSDocConsistency":"JSD1","generateJSDoc":"JSD2","i":"i","o":"o","s":"s","generateJSDocFor":"JSD3","findJSFiles":"JSF","analyzeFile":"aF","getLargeFiles":"LF","analyzeFilePatterns":"FP","analyzePackageJson":"PJ","getOutdatedPatterns":"OP","getSimilarFunctions":"SF","a":"a","parseAnnotations":"pA","getAllFeatures":"AF","getPendingTests":"PT","markTestPassed":"TP","markTestFailed":"TF","getTestSummary":"TS","resetTestState":"TS1","l":"l","checkTypes":"cT","checkUndocumentedFile":"UF","getUndocumented":"gU","getUndocumentedSummary":"US","O":"oO","R":"rR","printHelp":"pH","runCLI":"CLI","getAiContext":"AC","compactMigrate":"cM","addTopLevelNewlines":"TLN","compactFile":"cF","beautifyFile":"bF","compactProject":"cP","expandProject":"eP","c":"c","compressFile":"cF1","editCompressed":"eC","resolveCtxPath":"CP1","resolveCtxRelPath":"CRP","readCtxFile":"CF1","parseCtxFile":"CF2","injectJSDoc":"JSD4","stripJSDoc":"JSD5","validateCtxContracts":"CC","generateDocDialect":"DD","readContextDocs":"CD","getProjectDocs":"PD","E":"eE","checkStaleness":"cS","generateContextFiles":"CF3","expandFile":"eF","fetchReference":"fR","listAvailable":"lA","getFrameworkReference":"FR","getInstructions":"gI","parseCtxParams":"CP2","sanitize":"sa","buildJSDocBlock":"JSD6","buildJSDocFromRaw":"JSD7","getConfig":"gC1","setConfig":"sC","getModeDescription":"MD","getModeWorkflow":"MW","splitDeclarations":"sD","isSingleLineBlob":"SLB","validatePipeline":"vP","emitToolCall":"TC","emitToolResult":"TR","onToolCall":"TC1","onToolResult":"TR1","removeToolListener":"TL","walkJSFiles":"JSF1","getFilters":"gF","setFilters":"sF","addExcludes":"aE","removeExcludes":"rE","resetFilters":"rF","parseGitignore":"pG","shouldExcludeDir":"ED","shouldExcludeFile":"EF","minifyLegend":"mL","e":"e","buildGraph":"bG","createSkeleton":"cS1","parseFile":"pF","discoverSubProjects":"SP","parseProject":"pP1","findAllProjectFiles":"APF","estimateTokens":"eT","setRoots":"sR","getWorkspaceRoot":"WR","resolvePath":"rP","parseGo":"pG1","extractImports":"eI","getBody":"gB","extractCalls":"eC1","parsePython":"pP2","isSQLString":"SQL","t":"t","extractSQLFromString":"SQL1","parseSQL":"SQL2","n":"n","extractSQLFromCode":"SQL3","extractORMFromCode":"ORM","parseTypeScript":"TS2","extractParams":"eP1","stripStringsAndComments":"SAC","createServer":"cS2","startStdioServer":"SS","getGraph":"gG","getSkeleton":"gS","getFocusZone":"FZ","expand":"ex","deps":"de","usages":"us","getCallChain":"CC1","invalidateCache":"iC","B":"bB","writePortFile":"PF","removePortFile":"PF1","listBackends":"lB","ensureBackend":"eB","startStdioProxy":"SP1","cleanup":"cl","registerService":"rS","getGatewayPort":"GP","registerLocal":"rL","k":"k","N":"nN","z":"z","A":"aA","startWebServer":"WS"},"reverseLegend":{"CH":"computeContentHash","CP":"getCachePath","rC":"readCache","wC":"writeCache","CV":"isCacheValid","p":"p","u":"u","h":"h","CF":"analyzeComplexityFile","f":"f","gC":"getComplexity","y":"y","g":"g","x":"x","v":"v","$":"$","j":"j","sS":"S","b":"b","CR":"getCustomRules","CR1":"setCustomRule","CR2":"deleteCustomRule","PRS":"detectProjectRuleSets","CR3":"checkCustomRules","DBS":"getDBSchema","TU":"getTableUsage","DBD":"getDBDeadTables","m":"m","DC":"getDeadCode","w":"w","fF":"F","dD":"D","mM":"M","pP":"P","FA":"getFullAnalysis","ASO":"getAnalysisSummaryOnly","d":"d","JSD":"checkJSDocFile","JSD1":"checkJSDocConsistency","JSD2":"generateJSDoc","i":"i","o":"o","s":"s","JSD3":"generateJSDocFor","JSF":"findJSFiles","aF":"analyzeFile","LF":"getLargeFiles","FP":"analyzeFilePatterns","PJ":"analyzePackageJson","OP":"getOutdatedPatterns","SF":"getSimilarFunctions","a":"a","pA":"parseAnnotations","AF":"getAllFeatures","PT":"getPendingTests","TP":"markTestPassed","TF":"markTestFailed","TS":"getTestSummary","TS1":"resetTestState","l":"l","cT":"checkTypes","UF":"checkUndocumentedFile","gU":"getUndocumented","US":"getUndocumentedSummary","oO":"O","rR":"R","pH":"printHelp","CLI":"runCLI","AC":"getAiContext","cM":"compactMigrate","TLN":"addTopLevelNewlines","cF":"compactFile","bF":"beautifyFile","cP":"compactProject","eP":"expandProject","c":"c","cF1":"compressFile","eC":"editCompressed","CP1":"resolveCtxPath","CRP":"resolveCtxRelPath","CF1":"readCtxFile","CF2":"parseCtxFile","JSD4":"injectJSDoc","JSD5":"stripJSDoc","CC":"validateCtxContracts","DD":"generateDocDialect","CD":"readContextDocs","PD":"getProjectDocs","eE":"E","cS":"checkStaleness","CF3":"generateContextFiles","eF":"expandFile","fR":"fetchReference","lA":"listAvailable","FR":"getFrameworkReference","gI":"getInstructions","CP2":"parseCtxParams","sa":"sanitize","JSD6":"buildJSDocBlock","JSD7":"buildJSDocFromRaw","gC1":"getConfig","sC":"setConfig","MD":"getModeDescription","MW":"getModeWorkflow","sD":"splitDeclarations","SLB":"isSingleLineBlob","vP":"validatePipeline","TC":"emitToolCall","TR":"emitToolResult","TC1":"onToolCall","TR1":"onToolResult","TL":"removeToolListener","JSF1":"walkJSFiles","gF":"getFilters","sF":"setFilters","aE":"addExcludes","rE":"removeExcludes","rF":"resetFilters","pG":"parseGitignore","ED":"shouldExcludeDir","EF":"shouldExcludeFile","mL":"minifyLegend","e":"e","bG":"buildGraph","cS1":"createSkeleton","pF":"parseFile","SP":"discoverSubProjects","pP1":"parseProject","APF":"findAllProjectFiles","eT":"estimateTokens","sR":"setRoots","WR":"getWorkspaceRoot","rP":"resolvePath","pG1":"parseGo","eI":"extractImports","gB":"getBody","eC1":"extractCalls","pP2":"parsePython","SQL":"isSQLString","t":"t","SQL1":"extractSQLFromString","SQL2":"parseSQL","n":"n","SQL3":"extractSQLFromCode","ORM":"extractORMFromCode","TS2":"parseTypeScript","eP1":"extractParams","SAC":"stripStringsAndComments","cS2":"createServer","SS":"startStdioServer","gG":"getGraph","gS":"getSkeleton","FZ":"getFocusZone","ex":"expand","de":"deps","us":"usages","CC1":"getCallChain","iC":"invalidateCache","bB":"B","PF":"writePortFile","PF1":"removePortFile","lB":"listBackends","eB":"ensureBackend","SP1":"startStdioProxy","cl":"cleanup","rS":"registerService","GP":"getGatewayPort","rL":"registerLocal","k":"k","nN":"N","z":"z","aA":"A","WS":"startWebServer"},"stats":{"files":51,"classes":0,"functions":240,"tables":0},"nodes":{"CH":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"CP":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"rC":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"wC":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"CV":{"t":"F","e":true,"f":"analysis/analysis-cache.js"},"p":{"t":"F","e":false,"f":"network/local-gateway.js"},"u":{"t":"F","e":false,"f":"network/web-server.js"},"h":{"t":"F","e":false,"f":"network/local-gateway.js"},"CF":{"t":"F","e":true,"f":"analysis/complexity.js"},"f":{"t":"F","e":false,"f":"network/local-gateway.js"},"gC":{"t":"F","e":true,"f":"analysis/complexity.js"},"y":{"t":"F","e":false,"f":"network/web-server.js"},"g":{"t":"F","e":false,"f":"network/web-server.js"},"x":{"t":"F","e":false,"f":"network/web-server.js"},"v":{"t":"F","e":false,"f":"core/parser.js"},"$":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"j":{"t":"F","e":false,"f":"core/parser.js"},"sS":{"t":"F","e":false,"f":"network/web-server.js"},"b":{"t":"F","e":false,"f":"analysis/custom-rules.js"},"CR":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR1":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR2":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"PRS":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"CR3":{"t":"F","e":true,"f":"analysis/custom-rules.js"},"DBS":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"TU":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"DBD":{"t":"F","e":true,"f":"analysis/db-analysis.js"},"m":{"t":"F","e":false,"f":"analysis/similar-functions.js"},"DC":{"t":"F","e":true,"f":"analysis/dead-code.js"},"w":{"t":"F","e":false,"f":"network/web-server.js"},"fF":{"t":"F","e":false,"f":"compact/ctx-to-jsdoc.js"},"dD":{"t":"F","e":false,"f":"compact/validate-pipeline.js"},"mM":{"t":"F","e":false,"f":"analysis/full-analysis.js"},"pP":{"t":"F","e":false,"f":"network/web-server.js"},"FA":{"t":"F","e":true,"f":"analysis/full-analysis.js"},"ASO":{"t":"F","e":true,"f":"analysis/full-analysis.js"},"d":{"t":"F","e":false,"f":"network/local-gateway.js"},"JSD":{"t":"F","e":true,"f":"analysis/jsdoc-checker.js"},"JSD1":{"t":"F","e":true,"f":"analysis/jsdoc-checker.js"},"JSD2":{"t":"F","e":true,"f":"analysis/jsdoc-generator.js"},"i":{"t":"F","e":false,"f":"analysis/type-checker.js"},"o":{"t":"F","e":false,"f":"network/mdns.js"},"s":{"t":"F","e":false,"f":"analysis/jsdoc-generator.js"},"JSD3":{"t":"F","e":true,"f":"analysis/jsdoc-generator.js"},"JSF":{"t":"F","e":true,"f":"core/parser.js"},"aF":{"t":"F","e":false,"f":"analysis/large-files.js"},"LF":{"t":"F","e":true,"f":"analysis/large-files.js"},"FP":{"t":"F","e":false,"f":"analysis/outdated-patterns.js"},"PJ":{"t":"F","e":false,"f":"analysis/outdated-patterns.js"},"OP":{"t":"F","e":true,"f":"analysis/outdated-patterns.js"},"SF":{"t":"F","e":true,"f":"analysis/similar-functions.js"},"a":{"t":"F","e":false,"f":"analysis/test-annotations.js"},"pA":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"AF":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"PT":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TP":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TF":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TS":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"TS1":{"t":"F","e":true,"f":"analysis/test-annotations.js"},"l":{"t":"F","e":false,"f":"network/local-gateway.js"},"cT":{"t":"F","e":true,"f":"analysis/type-checker.js"},"UF":{"t":"F","e":true,"f":"analysis/undocumented.js"},"gU":{"t":"F","e":true,"f":"analysis/undocumented.js"},"US":{"t":"F","e":true,"f":"analysis/undocumented.js"},"oO":{"t":"F","e":false,"f":"network/web-server.js"},"rR":{"t":"F","e":false,"f":"cli/cli-handlers.js"},"pH":{"t":"F","e":true,"f":"cli/cli.js"},"CLI":{"t":"F","e":true,"f":"cli/cli.js"},"AC":{"t":"F","e":true,"f":"compact/ai-context.js"},"cM":{"t":"F","e":true,"f":"compact/compact-migrate.js"},"TLN":{"t":"F","e":false,"f":"compact/compact.js"},"cF":{"t":"F","e":false,"f":"compact/compact.js"},"bF":{"t":"F","e":false,"f":"compact/compact.js"},"cP":{"t":"F","e":true,"f":"compact/compact.js"},"eP":{"t":"F","e":true,"f":"compact/expand.js"},"c":{"t":"F","e":false,"f":"network/mdns.js"},"cF1":{"t":"F","e":true,"f":"compact/compress.js"},"eC":{"t":"F","e":true,"f":"compact/compress.js"},"CP1":{"t":"F","e":true,"f":"compact/ctx-resolver.js"},"CRP":{"t":"F","e":true,"f":"compact/ctx-resolver.js"},"CF1":{"t":"F","e":true,"f":"compact/ctx-resolver.js"},"CF2":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"JSD4":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"JSD5":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"CC":{"t":"F","e":true,"f":"compact/ctx-to-jsdoc.js"},"DD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"CD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"PD":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"eE":{"t":"F","e":false,"f":"core/parser.js"},"cS":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"CF3":{"t":"F","e":true,"f":"compact/doc-dialect.js"},"eF":{"t":"F","e":true,"f":"compact/expand.js"},"fR":{"t":"F","e":false,"f":"compact/framework-references.js"},"lA":{"t":"F","e":false,"f":"compact/framework-references.js"},"FR":{"t":"F","e":true,"f":"compact/framework-references.js"},"gI":{"t":"F","e":true,"f":"compact/instructions.js"},"CP2":{"t":"F","e":true,"f":"compact/jsdoc-builder.js"},"sa":{"t":"F","e":false,"f":"compact/jsdoc-builder.js"},"JSD6":{"t":"F","e":true,"f":"compact/jsdoc-builder.js"},"JSD7":{"t":"F","e":true,"f":"compact/jsdoc-builder.js"},"gC1":{"t":"F","e":true,"f":"compact/mode-config.js"},"sC":{"t":"F","e":true,"f":"compact/mode-config.js"},"MD":{"t":"F","e":true,"f":"compact/mode-config.js"},"MW":{"t":"F","e":true,"f":"compact/mode-config.js"},"sD":{"t":"F","e":true,"f":"compact/split-declarations.js"},"SLB":{"t":"F","e":true,"f":"compact/split-declarations.js"},"vP":{"t":"F","e":true,"f":"compact/validate-pipeline.js"},"TC":{"t":"F","e":true,"f":"core/event-bus.js"},"TR":{"t":"F","e":true,"f":"core/event-bus.js"},"TC1":{"t":"F","e":true,"f":"core/event-bus.js"},"TR1":{"t":"F","e":true,"f":"core/event-bus.js"},"TL":{"t":"F","e":true,"f":"core/event-bus.js"},"JSF1":{"t":"F","e":true,"f":"core/file-walker.js"},"gF":{"t":"F","e":true,"f":"core/filters.js"},"sF":{"t":"F","e":true,"f":"core/filters.js"},"aE":{"t":"F","e":true,"f":"core/filters.js"},"rE":{"t":"F","e":true,"f":"core/filters.js"},"rF":{"t":"F","e":true,"f":"core/filters.js"},"pG":{"t":"F","e":true,"f":"core/filters.js"},"ED":{"t":"F","e":true,"f":"core/filters.js"},"EF":{"t":"F","e":true,"f":"core/filters.js"},"mL":{"t":"F","e":true,"f":"core/graph-builder.js"},"e":{"t":"F","e":false,"f":"core/graph-builder.js"},"bG":{"t":"F","e":true,"f":"core/graph-builder.js"},"cS1":{"t":"F","e":true,"f":"core/graph-builder.js"},"pF":{"t":"F","e":true,"f":"core/parser.js"},"SP":{"t":"F","e":true,"f":"core/parser.js"},"pP1":{"t":"F","e":true,"f":"core/parser.js"},"APF":{"t":"F","e":true,"f":"core/parser.js"},"eT":{"t":"F","e":true,"f":"core/utils.js"},"sR":{"t":"F","e":true,"f":"core/workspace.js"},"WR":{"t":"F","e":true,"f":"core/workspace.js"},"rP":{"t":"F","e":true,"f":"core/workspace.js"},"pG1":{"t":"F","e":true,"f":"lang/lang-go.js"},"eI":{"t":"F","e":false,"f":"lang/lang-go.js"},"gB":{"t":"F","e":false,"f":"lang/lang-go.js"},"eC1":{"t":"F","e":false,"f":"lang/lang-go.js"},"pP2":{"t":"F","e":true,"f":"lang/lang-python.js"},"SQL":{"t":"F","e":true,"f":"lang/lang-sql.js"},"t":{"t":"F","e":false,"f":"lang/lang-sql.js"},"SQL1":{"t":"F","e":true,"f":"lang/lang-sql.js"},"SQL2":{"t":"F","e":true,"f":"lang/lang-sql.js"},"n":{"t":"F","e":false,"f":"network/mdns.js"},"SQL3":{"t":"F","e":true,"f":"lang/lang-sql.js"},"ORM":{"t":"F","e":true,"f":"lang/lang-sql.js"},"TS2":{"t":"F","e":true,"f":"lang/lang-typescript.js"},"eP1":{"t":"F","e":false,"f":"lang/lang-typescript.js"},"SAC":{"t":"F","e":true,"f":"lang/lang-utils.js"},"cS2":{"t":"F","e":true,"f":"mcp/mcp-server.js"},"SS":{"t":"F","e":true,"f":"mcp/mcp-server.js"},"gG":{"t":"F","e":true,"f":"mcp/tools.js"},"gS":{"t":"F","e":true,"f":"mcp/tools.js"},"FZ":{"t":"F","e":true,"f":"mcp/tools.js"},"ex":{"t":"F","e":true,"f":"mcp/tools.js"},"de":{"t":"F","e":true,"f":"mcp/tools.js"},"us":{"t":"F","e":true,"f":"mcp/tools.js"},"CC1":{"t":"F","e":true,"f":"mcp/tools.js"},"iC":{"t":"F","e":true,"f":"mcp/tools.js"},"bB":{"t":"F","e":false,"f":"network/backend-lifecycle.js"},"PF":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"PF1":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"lB":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"eB":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"SP1":{"t":"F","e":true,"f":"network/backend-lifecycle.js"},"cl":{"t":"F","e":false,"f":"network/backend.js"},"rS":{"t":"F","e":true,"f":"network/local-gateway.js"},"GP":{"t":"F","e":true,"f":"network/local-gateway.js"},"rL":{"t":"F","e":true,"f":"network/mdns.js"},"k":{"t":"F","e":false,"f":"network/web-server.js"},"nN":{"t":"F","e":false,"f":"network/web-server.js"},"z":{"t":"F","e":false,"f":"network/web-server.js"},"aA":{"t":"F","e":false,"f":"network/web-server.js"},"WS":{"t":"F","e":true,"f":"network/web-server.js"}},"edges":[],"orphans":["p","u","h","f","y","g","x","v","$","j","S","b","m","w","F","D","M","P","d","i","o","s","analyzeFile","analyzeFilePatterns","analyzePackageJson","a","l","O","R","addTopLevelNewlines","compactFile","beautifyFile","c","E","fetchReference","listAvailable","sanitize","e","extractImports","getBody","extractCalls","t","n","extractParams","B","cleanup","k","N","z","A"],"duplicates":{},"files":["analysis/analysis-cache.js","analysis/complexity.js","analysis/custom-rules.js","analysis/db-analysis.js","analysis/dead-code.js","analysis/full-analysis.js","analysis/jsdoc-checker.js","analysis/jsdoc-generator.js","analysis/large-files.js","analysis/outdated-patterns.js","analysis/similar-functions.js","analysis/test-annotations.js","analysis/type-checker.js","analysis/undocumented.js","cli/cli-handlers.js","cli/cli.js","compact/ai-context.js","compact/compact-migrate.js","compact/compact.js","compact/compress.js","compact/ctx-resolver.js","compact/ctx-to-jsdoc.js","compact/doc-dialect.js","compact/expand.js","compact/framework-references.js","compact/instructions.js","compact/jsdoc-builder.js","compact/mode-config.js","compact/split-declarations.js","compact/validate-pipeline.js","core/event-bus.js","core/file-walker.js","core/filters.js","core/graph-builder.js","core/parser.js","core/utils.js","core/workspace.js","lang/lang-go.js","lang/lang-python.js","lang/lang-sql.js","lang/lang-typescript.js","lang/lang-utils.js","mcp/mcp-server.js","mcp/tool-defs.js","mcp/tools.js","network/backend-lifecycle.js","network/backend.js","network/local-gateway.js","network/mdns.js","network/server.js","network/web-server.js"]}}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/analysis-cache.ctx
|
|
2
|
-
import{readFileSync as t,writeFileSync as e,mkdirSync as n,existsSync as r}from"fs";
|
|
2
|
+
import{readFileSync as t,writeFileSync as e,mkdirSync as n,existsSync as r}from"fs";
|
|
3
|
+
import{join as c,dirname as a}from"path";
|
|
4
|
+
import{createHash as i}from"crypto";
|
|
3
5
|
export function computeContentHash(t){return i("md5").update(t).digest("hex").slice(0,8)}
|
|
4
6
|
export function getCachePath(t,e){const n=e.replace(/\.[^.]+$/,".json");return c(t,".cache",n)}
|
|
5
7
|
export function readCache(e,n){const c=getCachePath(e,n);try{return r(c)?JSON.parse(t(c,"utf-8")):null}catch(t){return null}}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/complexity.ctx
|
|
2
|
-
import{readFileSync as t,readdirSync as e,statSync as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const n=
|
|
9
|
-
|
|
10
|
-
const n=t.
|
|
11
|
-
function analyzeFile(e,i){let n;try{n=t(e,"utf-8")}catch(t){return[]}return analyzeComplexityFile(n,o(i,e))}
|
|
12
|
-
export async function getComplexity(t,e={}){const i=e.minComplexity||1,n=e.onlyProblematic||!1,o=r(t),a=findJSFiles(t);
|
|
13
|
-
let l=[];for(const t of a)l.push(...analyzeFile(t,o));l=l.filter(t=>!(t.complexity<i||n&&("low"===t.rating||"moderate"===t.rating))),l.sort((t,e)=>e.complexity-t.complexity);
|
|
14
|
-
const s={low:l.filter(t=>"low"===t.rating).length,moderate:l.filter(t=>"moderate"===t.rating).length,high:l.filter(t=>"high"===t.rating).length,critical:l.filter(t=>"critical"===t.rating).length,average:l.length>0?Math.round(l.reduce((t,e)=>t+e.complexity,0)/l.length*10)/10:0};return{total:l.length,stats:s,items:l.slice(0,30)}}
|
|
2
|
+
import{readFileSync as t,readdirSync as e,statSync as o}from"fs";import{join as n,relative as r,resolve as i}from"path";import{parse as a}from"../../vendor/acorn.mjs";
|
|
3
|
+
import*as l from"../../vendor/walk.mjs";
|
|
4
|
+
import{shouldExcludeDir as s,shouldExcludeFile as c,parseGitignore as m}from"../core/filters.js";
|
|
5
|
+
function p(t,i=t){t===i&&m(i);const a=[];try{for(const l of e(t)){const e=n(t,l),m=r(i,e);o(e).isDirectory()?s(l,m)||a.push(...p(e,i)):!l.endsWith(".js")||l.endsWith(".css.js")||l.endsWith(".tpl.js")||c(l,m)||a.push(e)}}catch(t){}return a}
|
|
6
|
+
function u(t){let e=1;return l.simple(t,{IfStatement(){e++},ConditionalExpression(){e++},ForStatement(){e++},ForOfStatement(){e++},ForInStatement(){e++},WhileStatement(){e++},DoWhileStatement(){e++},SwitchCase(t){t.test&&e++},LogicalExpression(t){"&&"!==t.operator&&"||"!==t.operator||e++},BinaryExpression(t){"??"===t.operator&&e++},CatchClause(){e++}}),e}
|
|
7
|
+
function h(t){return t<=5?"low":t<=10?"moderate":t<=20?"high":"critical"}
|
|
8
|
+
export function analyzeComplexityFile(t,e){const o=[];let n;try{n=a(t,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(t){return o}return l.simple(n,{FunctionDeclaration(t){if(!t.id)return;const n=u(t.body);o.push({name:t.id.name,type:"function",file:e,line:t.loc.start.line,complexity:n,rating:h(n)})},ArrowFunctionExpression(t){if("BlockStatement"!==t.body.type)return;const n=u(t.body);n>5&&o.push({name:"(arrow)",type:"function",file:e,line:t.loc.start.line,complexity:n,rating:h(n)})},MethodDefinition(t){if("method"!==t.kind)return;const n=t.key.name||t.key.value,r=u(t.value.body);o.push({name:n,type:"method",file:e,line:t.loc.start.line,complexity:r,rating:h(r)})}}),o}
|
|
9
|
+
function f(e,o){let n;try{n=t(e,"utf-8")}catch(t){return[]}return analyzeComplexityFile(n,r(o,e))}
|
|
10
|
+
export async function getComplexity(t,e={}){const o=e.minComplexity||1,n=e.onlyProblematic||!1,r=i(t),a=p(t);let l=[];for(const t of a)l.push(...f(t,r));l=l.filter(t=>!(t.complexity<o||n&&("low"===t.rating||"moderate"===t.rating))),l.sort((t,e)=>e.complexity-t.complexity);const s={low:l.filter(t=>"low"===t.rating).length,moderate:l.filter(t=>"moderate"===t.rating).length,high:l.filter(t=>"high"===t.rating).length,critical:l.filter(t=>"critical"===t.rating).length,average:l.length>0?Math.round(l.reduce((t,e)=>t+e.complexity,0)/l.length*10)/10:0};return{total:l.length,stats:s,items:l.slice(0,30)}}
|
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/custom-rules.ctx
|
|
2
|
-
import{readFileSync as e,writeFileSync as t,readdirSync as s,existsSync as n,statSync as r}from"fs";import{join as o,relative as
|
|
3
|
-
const p=
|
|
4
|
-
let m=[];
|
|
5
|
-
let s=t;for(;s!==
|
|
6
|
-
function
|
|
7
|
-
function
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
const r=[],o=e(t,"utf-8").split("\n"),c=i(n,t);for(let e=0;e<o.length;e++){const t=o[e];
|
|
19
|
-
let n=!1,i="";if("regex"===s.patternType)try{const e=new RegExp(s.pattern,"g");
|
|
20
|
-
let r;for(;null!==(r=e.exec(t));)if(!isInStringOrComment(t,r.index)){n=!0,i=r[0];break}}catch(e){}else{const e=t.indexOf(s.pattern);-1===e||isInStringOrComment(t,e)||(n=!0,i=s.pattern)}n&&s.contextRequired&&!isWithinContext(o,e,s.contextRequired)||n&&r.push({ruleId:s.id,ruleName:s.name,severity:s.severity,file:c,line:e+1,match:i,replacement:s.replacement})}return r}
|
|
21
|
-
export async function getCustomRules(){const e=loadRuleSets();
|
|
22
|
-
let t=0;
|
|
23
|
-
const s={};for(const[n,r]of Object.entries(e))s[n]={description:r.description,ruleCount:r.rules.length,rules:r.rules.map(e=>({id:e.id,name:e.name,severity:e.severity}))},t+=r.rules.length;return{ruleSets:s,totalRules:t}}
|
|
24
|
-
export async function setCustomRule(e,t){const s=loadRuleSets();s[e]||(s[e]={name:e,description:`Custom rules for ${e}`,rules:[]});
|
|
25
|
-
const n=s[e],r=n.rules.findIndex(e=>e.id===t.id);return r>=0?n.rules[r]=t:n.rules.push(t),saveRuleSet(n),{success:!0,message:r>=0?`Updated rule "${t.id}" in ${e}`:`Added rule "${t.id}" to ${e}`}}
|
|
26
|
-
export async function deleteCustomRule(e,t){const s=loadRuleSets();if(!s[e])return{success:!1,message:`Ruleset "${e}" not found`};
|
|
27
|
-
const n=s[e],r=n.rules.findIndex(e=>e.id===t);return r<0?{success:!1,message:`Rule "${t}" not found`}:(n.rules.splice(r,1),saveRuleSet(n),{success:!0,message:`Deleted rule "${t}" from ${e}`})}
|
|
28
|
-
export function detectProjectRuleSets(t){const s=loadRuleSets(),r=[],c={};
|
|
29
|
-
let l=[];try{const s=o(t,"package.json");if(n(s)){const t=JSON.parse(e(s,"utf-8"));l=[...Object.keys(t.dependencies||{}),...Object.keys(t.devDependencies||{})]}}catch(e){}for(const[n,o]of Object.entries(s)){if(!o.detect)continue;
|
|
30
|
-
const s=o.detect;if(s.packageJson)for(const e of s.packageJson)if(l.includes(e)){r.push(n),c[n]=`Found "${e}" in package.json`;break}if(!r.includes(n)&&(s.imports||s.patterns)){const o=findFiles(t,"*.js");e:for(const l of o.slice(0,50))try{const o=e(l,"utf-8");if(s.imports)for(const e of s.imports)if(o.includes(e)){r.push(n),c[n]=`Found "${e}" in ${i(t,l)}`;break e}if(s.patterns)for(const e of s.patterns)if(o.includes(e)){r.push(n),c[n]=`Found "${e}" in ${i(t,l)}`;break e}}catch(e){}}}return{detected:r,reasons:c}}
|
|
31
|
-
export async function checkCustomRules(e,t={}){const s=l(e),n=loadRuleSets();
|
|
32
|
-
let r=[],o=null;if(t.ruleSet)n[t.ruleSet]&&(r=n[t.ruleSet].rules);else if(!1!==t.autoDetect){if(o=detectProjectRuleSets(e),o.detected.length>0)for(const e of o.detected)n[e]&&r.push(...n[e].rules);for(const[e,t]of Object.entries(n))t.alwaysApply&&!o.detected.includes(e)&&r.push(...t.rules)}else for(const e of Object.values(n))r.push(...e.rules);
|
|
33
|
-
const i={};for(const e of r){const t=e.filePattern||"*.js";i[t]||(i[t]=[]),i[t].push(e)}const c=[];for(const[t,n]of Object.entries(i)){const r=findFiles(e,t);for(const e of r)for(const t of n){const n=checkFileAgainstRule(e,t,s);c.push(...n)}}const u=new Set,f=c.filter(e=>{const t=`${e.file}:${e.line}:${e.match}`;return!u.has(t)&&(u.add(t),!0)});
|
|
34
|
-
let a=f;t.severity&&(a=f.filter(e=>e.severity===t.severity));
|
|
35
|
-
const d={error:0,warning:1,info:2};a.sort((e,t)=>{const s=d[e.severity]-d[t.severity];return 0!==s?s:e.file.localeCompare(t.file)});
|
|
36
|
-
const p={error:a.filter(e=>"error"===e.severity).length,warning:a.filter(e=>"warning"===e.severity).length,info:a.filter(e=>"info"===e.severity).length},h={};for(const e of a)h[e.ruleId]=(h[e.ruleId]||0)+1;return{basePath:e,total:a.length,bySeverity:p,byRule:h,violations:a.slice(0,50),...o&&{detected:o}}}
|
|
2
|
+
import{readFileSync as e,writeFileSync as t,readdirSync as s,existsSync as n,statSync as r}from"fs";import{join as o,relative as c,dirname as i,resolve as l}from"path";import{fileURLToPath as u}from"url";import{shouldExcludeDir as f,shouldExcludeFile as a,parseGitignore as d}from"../core/filters.js";
|
|
3
|
+
const p=i(u(import.meta.url)),h=o(p,"..","..","rules");
|
|
4
|
+
let m=[];
|
|
5
|
+
function y(t){m=[];let s=t;for(;s!==i(s);){const t=o(s,".graphignore");if(n(t))try{const s=e(t,"utf-8");return void(m=s.split("\n").map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")))}catch(e){}s=i(s)}}
|
|
6
|
+
function g(e){const t=e.split("/").pop();for(const s of m)if(s.endsWith("*")){const n=s.slice(0,-1);if(e.startsWith(n)||t.startsWith(n))return!0}else if(s.startsWith("*")){const n=s.slice(1);if(e.endsWith(n)||t.endsWith(n))return!0}else if(e.includes(s)||t===s)return!0;return!1}
|
|
7
|
+
function x(){const t={};if(!n(h))return t;for(const n of s(h))if(n.endsWith(".json"))try{const s=e(o(h,n),"utf-8"),r=JSON.parse(s);t[r.name]=r}catch(e){}return t}
|
|
8
|
+
function v(e){const s=o(h,`${e.name}.json`);t(s,JSON.stringify(e,null,2))}
|
|
9
|
+
function $(e,t,n=e){e===n&&(d(n),y(n));const i=[],l=t.replace("*","");try{for(const u of s(e)){const s=o(e,u),d=c(n,s);r(s).isDirectory()?f(u,d)||i.push(...$(s,t,n)):u.endsWith(l)&&(a(u,d)||g(d)||i.push(s))}}catch(e){}return i}
|
|
10
|
+
function j(e,t){const s=e.indexOf("//");if(-1!==s&&t>s)return!0;let n=!1,r=null;for(let s=0;s<t;s++){const t=e[s],o=s>0?e[s-1]:"";n||'"'!==t&&"'"!==t&&"`"!==t?n&&t===r&&"\\"!==o&&(n=!1,r=null):(n=!0,r=t)}return n}
|
|
11
|
+
function S(e,t,s){const n=s,r=`</${n.replace(/[<>]/g,"")}>`;let o=0;for(let s=0;s<=t;s++){const t=e[s];let c=0;for(;c<t.length;){const e=t.indexOf(n,c),s=t.indexOf(r,c);if(-1===e&&-1===s)break;-1!==e&&(-1===s||e<s)?(o++,c=e+n.length):(o--,c=s+r.length)}}return o>0}
|
|
12
|
+
function b(t,s,n){if(function(e,t=[]){for(const s of t){const t=s.replace("*","");if(e.endsWith(t))return!0}return!1}(t,s.exclude))return[];const r=[],o=e(t,"utf-8").split("\n"),i=c(n,t);for(let e=0;e<o.length;e++){const t=o[e];let n=!1,c="";if("regex"===s.patternType)try{const e=new RegExp(s.pattern,"g");let r;for(;null!==(r=e.exec(t));)if(!j(t,r.index)){n=!0,c=r[0];break}}catch(e){}else{const e=t.indexOf(s.pattern);-1===e||j(t,e)||(n=!0,c=s.pattern)}n&&s.contextRequired&&!S(o,e,s.contextRequired)||n&&r.push({ruleId:s.id,ruleName:s.name,severity:s.severity,file:i,line:e+1,match:c,replacement:s.replacement})}return r}
|
|
13
|
+
export async function getCustomRules(){const e=x();let t=0;const s={};for(const[n,r]of Object.entries(e))s[n]={description:r.description,ruleCount:r.rules.length,rules:r.rules.map(e=>({id:e.id,name:e.name,severity:e.severity}))},t+=r.rules.length;return{ruleSets:s,totalRules:t}}
|
|
14
|
+
export async function setCustomRule(e,t){const s=x();s[e]||(s[e]={name:e,description:`Custom rules for ${e}`,rules:[]});const n=s[e],r=n.rules.findIndex(e=>e.id===t.id);return r>=0?n.rules[r]=t:n.rules.push(t),v(n),{success:!0,message:r>=0?`Updated rule "${t.id}" in ${e}`:`Added rule "${t.id}" to ${e}`}}
|
|
15
|
+
export async function deleteCustomRule(e,t){const s=x();if(!s[e])return{success:!1,message:`Ruleset "${e}" not found`};const n=s[e],r=n.rules.findIndex(e=>e.id===t);return r<0?{success:!1,message:`Rule "${t}" not found`}:(n.rules.splice(r,1),v(n),{success:!0,message:`Deleted rule "${t}" from ${e}`})}
|
|
16
|
+
export function detectProjectRuleSets(t){const s=x(),r=[],i={};let l=[];try{const s=o(t,"package.json");if(n(s)){const t=JSON.parse(e(s,"utf-8"));l=[...Object.keys(t.dependencies||{}),...Object.keys(t.devDependencies||{})]}}catch(e){}for(const[n,o]of Object.entries(s)){if(!o.detect)continue;const s=o.detect;if(s.packageJson)for(const e of s.packageJson)if(l.includes(e)){r.push(n),i[n]=`Found "${e}" in package.json`;break}if(!r.includes(n)&&(s.imports||s.patterns)){const o=$(t,"*.js");e:for(const l of o.slice(0,50))try{const o=e(l,"utf-8");if(s.imports)for(const e of s.imports)if(o.includes(e)){r.push(n),i[n]=`Found "${e}" in ${c(t,l)}`;break e}if(s.patterns)for(const e of s.patterns)if(o.includes(e)){r.push(n),i[n]=`Found "${e}" in ${c(t,l)}`;break e}}catch(e){}}}return{detected:r,reasons:i}}
|
|
17
|
+
export async function checkCustomRules(e,t={}){const s=l(e),n=x();let r=[],o=null;if(t.ruleSet)n[t.ruleSet]&&(r=n[t.ruleSet].rules);else if(!1!==t.autoDetect){if(o=detectProjectRuleSets(e),o.detected.length>0)for(const e of o.detected)n[e]&&r.push(...n[e].rules);for(const[e,t]of Object.entries(n))t.alwaysApply&&!o.detected.includes(e)&&r.push(...t.rules)}else for(const e of Object.values(n))r.push(...e.rules);const c={};for(const e of r){const t=e.filePattern||"*.js";c[t]||(c[t]=[]),c[t].push(e)}const i=[];for(const[t,n]of Object.entries(c)){const r=$(e,t);for(const e of r)for(const t of n){const n=b(e,t,s);i.push(...n)}}const u=new Set,f=i.filter(e=>{const t=`${e.file}:${e.line}:${e.match}`;return!u.has(t)&&(u.add(t),!0)});let a=f;t.severity&&(a=f.filter(e=>e.severity===t.severity));const d={error:0,warning:1,info:2};a.sort((e,t)=>{const s=d[e.severity]-d[t.severity];return 0!==s?s:e.file.localeCompare(t.file)});const p={error:a.filter(e=>"error"===e.severity).length,warning:a.filter(e=>"warning"===e.severity).length,info:a.filter(e=>"info"===e.severity).length},h={};for(const e of a)h[e.ruleId]=(h[e.ruleId]||0)+1;return{basePath:e,total:a.length,bySeverity:p,byRule:h,violations:a.slice(0,50),...o&&{detected:o}}}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/db-analysis.ctx
|
|
2
2
|
import{parseProject as e}from"../core/parser.js";import{buildGraph as t}from"../core/graph-builder.js";
|
|
3
3
|
export async function getDBSchema(t){const a=(await e(t)).tables||[];return{tables:a.map(e=>({name:e.name,columns:e.columns,file:e.file,line:e.line})),totalTables:a.length,totalColumns:a.reduce((e,t)=>e+t.columns.length,0)}}
|
|
4
|
-
export async function getTableUsage(a,s){const n=await e(a),o=t(n),r={};for(const[e,t,a]of o.edges){if("R→"!==t&&"W→"!==t)continue;
|
|
5
|
-
const n=
|
|
6
|
-
const l=o.reverseLegend[e]||e,d=o.nodes[e],c={name:l,file:d?.f||"?"};"R→"===t?r[n].readers.some(e=>e.name===l)||r[n].readers.push(c):r[n].writers.some(e=>e.name===l)||r[n].writers.push(c)}const l=Object.entries(r).map(([e,t])=>({table:e,readers:t.readers,writers:t.writers,totalReaders:t.readers.length,totalWriters:t.writers.length})).sort((e,t)=>t.totalReaders+t.totalWriters-(e.totalReaders+e.totalWriters));return{tables:l,totalTables:l.length,totalQueries:l.reduce((e,t)=>e+t.totalReaders+t.totalWriters,0)}}
|
|
7
|
-
export async function getDBDeadTables(a){const s=await e(a),n=t(s),o=s.tables||[],r=new Set;for(const[,e,t]of n.edges)"R→"!==e&&"W→"!==e||r.add(t);
|
|
8
|
-
const l=o.filter(e=>!r.has(e.name)).map(e=>({name:e.name,file:e.file,line:e.line,columnCount:e.columns.length})),d=collectReferencedColumns(s),c=[];for(const e of o)if(r.has(e.name))for(const t of e.columns)d.has(t.name)||c.push({table:e.name,column:t.name,type:t.type});return{deadTables:l,deadColumns:c,stats:{totalSchemaTables:o.length,totalSchemaColumns:o.reduce((e,t)=>e+t.columns.length,0),deadTableCount:l.length,deadColumnCount:c.length}}}
|
|
9
|
-
function collectReferencedColumns(e){const t=new Set;for(const a of e.functions||[])if(a.dbReads?.length||a.dbWrites?.length)for(const e of[...a.dbReads||[],...a.dbWrites||[]])t.add(e);for(const a of e.classes||[])if(a.dbReads?.length||a.dbWrites?.length)for(const e of[...a.dbReads||[],...a.dbWrites||[]])t.add(e);return t.add("id"),t.add("uuid"),t.add("created_at"),t.add("updated_at"),t}
|
|
4
|
+
export async function getTableUsage(a,s){const n=await e(a),o=t(n),r={};for(const[e,t,a]of o.edges){if("R→"!==t&&"W→"!==t)continue;const n=a;if(s&&n!==s)continue;r[n]||(r[n]={readers:[],writers:[]});const l=o.reverseLegend[e]||e,d=o.nodes[e],i={name:l,file:d?.f||"?"};"R→"===t?r[n].readers.some(e=>e.name===l)||r[n].readers.push(i):r[n].writers.some(e=>e.name===l)||r[n].writers.push(i)}const l=Object.entries(r).map(([e,t])=>({table:e,readers:t.readers,writers:t.writers,totalReaders:t.readers.length,totalWriters:t.writers.length})).sort((e,t)=>t.totalReaders+t.totalWriters-(e.totalReaders+e.totalWriters));return{tables:l,totalTables:l.length,totalQueries:l.reduce((e,t)=>e+t.totalReaders+t.totalWriters,0)}}
|
|
5
|
+
export async function getDBDeadTables(a){const s=await e(a),n=t(s),o=s.tables||[],r=new Set;for(const[,e,t]of n.edges)"R→"!==e&&"W→"!==e||r.add(t);const l=o.filter(e=>!r.has(e.name)).map(e=>({name:e.name,file:e.file,line:e.line,columnCount:e.columns.length})),d=function(e){const t=new Set;for(const a of e.functions||[])if(a.dbReads?.length||a.dbWrites?.length)for(const e of[...a.dbReads||[],...a.dbWrites||[]])t.add(e);for(const a of e.classes||[])if(a.dbReads?.length||a.dbWrites?.length)for(const e of[...a.dbReads||[],...a.dbWrites||[]])t.add(e);return t.add("id"),t.add("uuid"),t.add("created_at"),t.add("updated_at"),t}(s),i=[];for(const e of o)if(r.has(e.name))for(const t of e.columns)d.has(t.name)||i.push({table:e.name,column:t.name,type:t.type});return{deadTables:l,deadColumns:i,stats:{totalSchemaTables:o.length,totalSchemaColumns:o.reduce((e,t)=>e+t.columns.length,0),deadTableCount:l.length,deadColumnCount:i.length}}}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/dead-code.ctx
|
|
2
|
-
import{readFileSync as e,readdirSync as t,statSync as n,existsSync as s}from"fs";import{join as o,relative as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
let s;try{s=c(e,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(e){return{unusedVars:t,unusedImports:n}}const o=new Set,
|
|
9
|
-
const d=new Set;for(const
|
|
10
|
-
const s=new RegExp(`\\b${n.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"g"),o=e.match(s);o&&o.length<=1&&t.push({name:n.name,line:n.line})}for(const t of a){if("*"===t.name)continue;
|
|
11
|
-
const s=new RegExp(`\\b${t.local.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"g"),o=e.match(s);o&&o.length<=1&&n.push(t)}return{unusedVars:t,unusedImports:n}}
|
|
12
|
-
export async function getDeadCode(t){const n=a(t),s=findJSFiles(t),o=[],d=new Set,f=new Set,p=[],m=new Map,u=findJSFiles(findProjectRoot(t));for(const t of u){let s;try{s=e(t,"utf-8")}catch{continue}const o=i(n,t),{imports:c}=analyzeFile(s);for(const e of c){if(!e.source.startsWith("."))continue;
|
|
13
|
-
const s=r(t);
|
|
14
|
-
let c=a(s,e.source);c.endsWith(".js")||(c+=".js");
|
|
15
|
-
const l=i(n,c),d=`${e.name}@${l}`;m.has(d)||m.set(d,new Set),m.get(d).add(o)}}for(const t of s){const s=e(t,"utf-8"),o=i(n,t),{definitions:a,calls:r,exports:c,namedExports:l}=analyzeFile(s);for(const e of r)d.add(e);for(const e of c)f.add(e);p.push({file:o,code:s,definitions:a,calls:r,exports:c,namedExports:l})}for(const{file:e,code:t,definitions:n,exports:s}of p){if(e.includes(".test.")||e.includes("/tests/"))continue;if(e.endsWith(".css.js")||e.endsWith(".tpl.js"))continue;
|
|
16
|
-
let n;try{n=c(t,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(e){continue}l.simple(n,{FunctionDeclaration(t){if(!t.id)return;
|
|
17
|
-
const n=t.id.name;s.has(n)||f.has(n)||d.has(n)||n.startsWith("_")||o.push({name:n,type:"function",file:e,line:t.loc.start.line,reason:"Never called"})},ClassDeclaration(t){if(!t.id)return;
|
|
18
|
-
const n=t.id.name;s.has(n)||f.has(n)||d.has(n)||o.push({name:n,type:"class",file:e,line:t.loc.start.line,reason:"Never instantiated"})}})}for(const{file:e,calls:t,namedExports:n}of p)if(!e.includes(".test.")&&!e.includes("/tests/"))for(const s of n){if(t.has(s.name))continue;
|
|
19
|
-
const n=`${s.name}@${e}`,i=m.get(n);i&&0!==i.size||o.push({name:s.name,type:"export",file:e,line:s.line,reason:"Exported but never imported"})}for(const{file:e,code:t}of p){if(e.includes(".test.")||e.includes("/tests/"))continue;if(e.endsWith(".css.js")||e.endsWith(".tpl.js"))continue;const{unusedVars:n,unusedImports:s}=analyzeFileLocals(t);for(const t of n)o.push({name:t.name,type:"variable",file:e,line:t.line,reason:"Declared but never used"});for(const t of s)o.push({name:t.local,type:"import",file:e,line:t.line,reason:`Imported from '${t.source}' but never used`})}const h={function:o.filter(e=>"function"===e.type).length,class:o.filter(e=>"class"===e.type).length,export:o.filter(e=>"export"===e.type).length,variable:o.filter(e=>"variable"===e.type).length,import:o.filter(e=>"import"===e.type).length};return{total:o.length,byType:h,items:o.slice(0,50)}}
|
|
2
|
+
import{readFileSync as e,readdirSync as t,statSync as n,existsSync as s}from"fs";import{join as o,relative as a,resolve as i,dirname as r}from"path";import{parse as c}from"../../vendor/acorn.mjs";
|
|
3
|
+
import*as l from"../../vendor/walk.mjs";
|
|
4
|
+
import{shouldExcludeDir as d,shouldExcludeFile as f,parseGitignore as p}from"../core/filters.js";
|
|
5
|
+
function m(e,s=e){e===s&&p(s);const i=[];try{for(const r of t(e)){const t=o(e,r),c=a(s,t);n(t).isDirectory()?d(r,c)||i.push(...m(t,s)):!r.endsWith(".js")||r.endsWith(".css.js")||r.endsWith(".tpl.js")?(r.endsWith(".css.js")||r.endsWith(".tpl.js"))&&(f(r,c)||i.push(t)):f(r,c)||i.push(t)}}catch(e){}return i}
|
|
6
|
+
function u(e){let t=i(e);for(;t!==r(t);){if(s(o(t,"package.json")))return t;t=r(t)}return i(e)}
|
|
7
|
+
function h(e){const t=new Set,n=new Set,s=new Set,o=[],a=[];let i;try{i=c(e,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(e){return{definitions:t,calls:n,exports:s,imports:o,namedExports:a}}return l.simple(i,{FunctionDeclaration(e){e.id&&t.add(e.id.name)},ClassDeclaration(e){e.id&&t.add(e.id.name)},CallExpression(e){"Identifier"===e.callee.type?n.add(e.callee.name):"MemberExpression"===e.callee.type&&"Identifier"===e.callee.object.type&&n.add(e.callee.object.name);for(const t of e.arguments)"Identifier"===t.type&&n.add(t.name)},NewExpression(e){"Identifier"===e.callee.type&&n.add(e.callee.name)},ImportDeclaration(e){const t=e.source.value;for(const n of e.specifiers)"ImportSpecifier"===n.type?o.push({name:n.imported.name,source:t}):"ImportDefaultSpecifier"===n.type&&o.push({name:"default",source:t})},ExportNamedDeclaration(e){if(e.declaration)if(e.declaration.id){const t=e.declaration.id.name;s.add(t),a.push({name:t,line:e.loc.start.line})}else if(e.declaration.declarations)for(const t of e.declaration.declarations)if("Identifier"===t.id.type){const n=t.id.name;s.add(n),a.push({name:n,line:e.loc.start.line})}if(e.specifiers)for(const t of e.specifiers){const n=t.exported.name;s.add(n),a.push({name:n,line:e.loc.start.line})}},ExportDefaultDeclaration(e){e.declaration?.id&&s.add(e.declaration.id.name)}}),{definitions:t,calls:n,exports:s,imports:o,namedExports:a}}
|
|
8
|
+
function y(e){const t=[],n=[];let s;try{s=c(e,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(e){return{unusedVars:t,unusedImports:n}}const o=new Set,a=[],i=[],r=new Set;l.simple(s,{VariableDeclaration(e){const t="ExportNamedDeclaration"===e.parent?.type;for(const n of e.declarations)"Identifier"===n.id.type&&(a.push({name:n.id.name,line:n.loc.start.line,isExported:t}),r.add(n.id))},ImportDeclaration(e){for(const t of e.specifiers){const n=t.local.name,s="ImportSpecifier"===t.type?t.imported.name:"ImportDefaultSpecifier"===t.type?"default":"*";i.push({name:s,local:n,source:e.source.value,line:e.loc.start.line}),r.add(t.local)}}});const d=new Set;for(const e of s.body){if("ExportNamedDeclaration"===e.type&&e.declaration){if(e.declaration.declarations)for(const t of e.declaration.declarations)"Identifier"===t.id.type&&d.add(t.id.name);e.declaration.id&&d.add(e.declaration.id.name)}if("ExportNamedDeclaration"===e.type&&e.specifiers)for(const t of e.specifiers)d.add(t.local.name)}l.simple(s,{Identifier(e){o.add(e.name)}});for(const n of a){if(d.has(n.name))continue;if(n.name.startsWith("_"))continue;const s=new RegExp(`\\b${n.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"g"),o=e.match(s);o&&o.length<=1&&t.push({name:n.name,line:n.line})}for(const t of i){if("*"===t.name)continue;const s=new RegExp(`\\b${t.local.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"g"),o=e.match(s);o&&o.length<=1&&n.push(t)}return{unusedVars:t,unusedImports:n}}
|
|
9
|
+
export async function getDeadCode(t){const n=i(t),s=m(t),o=[],d=new Set,f=new Set,p=[],x=new Map,g=m(u(t));for(const t of g){let s;try{s=e(t,"utf-8")}catch{continue}const o=a(n,t),{imports:c}=h(s);for(const e of c){if(!e.source.startsWith("."))continue;const s=r(t);let c=i(s,e.source);c.endsWith(".js")||(c+=".js");const l=a(n,c),d=`${e.name}@${l}`;x.has(d)||x.set(d,new Set),x.get(d).add(o)}}for(const t of s){const s=e(t,"utf-8"),o=a(n,t),{definitions:i,calls:r,exports:c,namedExports:l}=h(s);for(const e of r)d.add(e);for(const e of c)f.add(e);p.push({file:o,code:s,definitions:i,calls:r,exports:c,namedExports:l})}for(const{file:e,code:t,definitions:n,exports:s}of p){if(e.includes(".test.")||e.includes("/tests/"))continue;if(e.endsWith(".css.js")||e.endsWith(".tpl.js"))continue;let n;try{n=c(t,{ecmaVersion:"latest",sourceType:"module",locations:!0})}catch(e){continue}l.simple(n,{FunctionDeclaration(t){if(!t.id)return;const n=t.id.name;s.has(n)||f.has(n)||d.has(n)||n.startsWith("_")||o.push({name:n,type:"function",file:e,line:t.loc.start.line,reason:"Never called"})},ClassDeclaration(t){if(!t.id)return;const n=t.id.name;s.has(n)||f.has(n)||d.has(n)||o.push({name:n,type:"class",file:e,line:t.loc.start.line,reason:"Never instantiated"})}})}for(const{file:e,calls:t,namedExports:n}of p)if(!e.includes(".test.")&&!e.includes("/tests/"))for(const s of n){if(t.has(s.name))continue;const n=`${s.name}@${e}`,a=x.get(n);a&&0!==a.size||o.push({name:s.name,type:"export",file:e,line:s.line,reason:"Exported but never imported"})}for(const{file:e,code:t}of p){if(e.includes(".test.")||e.includes("/tests/"))continue;if(e.endsWith(".css.js")||e.endsWith(".tpl.js"))continue;const{unusedVars:n,unusedImports:s}=y(t);for(const t of n)o.push({name:t.name,type:"variable",file:e,line:t.line,reason:"Declared but never used"});for(const t of s)o.push({name:t.local,type:"import",file:e,line:t.line,reason:`Imported from '${t.source}' but never used`})}const D={function:o.filter(e=>"function"===e.type).length,class:o.filter(e=>"class"===e.type).length,export:o.filter(e=>"export"===e.type).length,variable:o.filter(e=>"variable"===e.type).length,import:o.filter(e=>"import"===e.type).length};return{total:o.length,byType:D,items:o.slice(0,50)}}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
// @ctx .context/src/analysis/full-analysis.ctx
|
|
2
|
-
import{readFileSync as t,readdirSync as e,statSync as s}from"fs";import{join as a,relative as o,resolve as n}from"path";import{getDeadCode as i}from"./dead-code.js";import{checkUndocumentedFile as
|
|
3
|
-
const s=[];e-=Math.min(2*t.deadCode.total,20),t.deadCode.total>0&&s.push(`${t.deadCode.total} unused functions/classes`),e-=Math.min(.5*t.undocumented.total,15),t.undocumented.total>10&&s.push(`${t.undocumented.total} undocumented items`),e-=Math.min(3*t.similar.total,15),t.similar.total>0&&s.push(`${t.similar.total} similar function pairs`);
|
|
4
|
-
const a=
|
|
5
|
-
const n=
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
let b;try{b=t(e,"utf-8")}catch(t){continue}const C=y(b),S=p(s,r);if(S&&f(S,S.sig,C,"content"))x++,S.complexity&&d.push(...S.complexity),S.undocumented&&u.push(...S.undocumented),S.jsdocIssues&&m.push(...S.jsdocIssues);else{j++;
|
|
12
|
-
const t=c(b,n),e=l(b,n,"tests"),a=h(b,n);d.push(...t),u.push(...e),m.push(...a),g(s,r,{sig:S?.sig||C,contentHash:C,complexity:t,undocumented:e,jsdocIssues:a})}}return{complexity:d,undocumented:u,jsdocIssues:m,cacheStats:{hits:x,misses:j}}}
|
|
13
|
-
function aggregateComplexity(t,e=5){let s=t.filter(t=>t.complexity>=e);s.sort((t,e)=>e.complexity-t.complexity);
|
|
14
|
-
const a={low:s.filter(t=>"low"===t.rating).length,moderate:s.filter(t=>"moderate"===t.rating).length,high:s.filter(t=>"high"===t.rating).length,critical:s.filter(t=>"critical"===t.rating).length,average:s.length>0?Math.round(s.reduce((t,e)=>t+e.complexity,0)/s.length*10)/10:0};return{total:s.length,stats:a,items:s.slice(0,30)}}
|
|
15
|
-
function aggregateUndocumented(t){const e={class:t.filter(t=>"class"===t.type).length,function:t.filter(t=>"function"===t.type).length,method:t.filter(t=>"method"===t.type).length};return{total:t.length,byType:e,items:t.slice(0,20)}}
|
|
16
|
-
function aggregateJSDoc(t){const e=t.filter(t=>"error"===t.severity).length,s=t.filter(t=>"warning"===t.severity).length,a={};for(const e of t)a[e.file]=(a[e.file]||0)+1;return{issues:t,summary:{total:t.length,errors:e,warnings:s,byFile:a}}}
|
|
17
|
-
export async function getFullAnalysis(t,e={}){const s=e.includeItems||!1,o=(n(t),runCacheableAnalyses(t,a(C(),".context"))),l=aggregateComplexity(o.complexity),c=aggregateUndocumented(o.undocumented),h=aggregateJSDoc(o.jsdocIssues),[p,g,y,f,x]=await Promise.all([i(t).catch(()=>({total:0,byType:{},items:[]})),r(t,{threshold:70}).catch(()=>({total:0,pairs:[]})),d(t).catch(()=>({total:0,stats:{},items:[]})),u(t).catch(()=>({codePatterns:[],redundantDeps:[],stats:{totalPatterns:0,bySeverity:{},byPattern:{},redundantDeps:0}})),m(t).catch(()=>({tables:[],totalTables:0,totalQueries:0}))]),j=calculateHealthScore({deadCode:p,undocumented:c,similar:g,complexity:l,largeFiles:y,outdated:f,jsdocConsistency:h.summary}),b={deadCode:{total:p.total,byType:p.byType,...s&&{items:p.items.slice(0,10)}},undocumented:{total:c.total,byType:c.byType,...s&&{items:c.items.slice(0,10)}},similar:{total:g.total,...s&&{pairs:g.pairs.slice(0,5)}},complexity:{total:l.total,stats:l.stats,...s&&{items:l.items.slice(0,10)}},largeFiles:{total:y.total,stats:y.stats,...s&&{items:y.items.slice(0,10)}},outdated:{totalPatterns:f.stats.totalPatterns,redundantDeps:f.redundantDeps,...s&&{codePatterns:f.codePatterns.slice(0,10)}},jsdocConsistency:{total:h.summary.total,errors:h.summary.errors,warnings:h.summary.warnings,...s&&{issues:h.issues.slice(0,10)}},cache:o.cacheStats,overall:j};return x.totalTables>0&&(b.database={tablesUsed:x.totalTables,totalQueries:x.totalQueries,tables:x.tables.map(t=>({name:t.table,readers:t.totalReaders,writers:t.totalWriters}))}),b}
|
|
18
|
-
export function getAnalysisSummaryOnly(t){const e=runCacheableAnalyses(t,a(C(),".context")),s=aggregateComplexity(e.complexity),o=aggregateUndocumented(e.undocumented),n=aggregateJSDoc(e.jsdocIssues),i=calculateHealthScore({deadCode:{total:0},undocumented:o,similar:{total:0},complexity:s,largeFiles:{total:0},outdated:{stats:{totalPatterns:0}},jsdocConsistency:n.summary});return{healthScore:i.score,grade:i.rating,complexity:s.total,undocumented:o.total,jsdocIssues:n.summary.total,cache:e.cacheStats,note:"Partial score — cross-file analyses skipped for speed. Run get_full_analysis for complete health check."}}
|
|
2
|
+
import{readFileSync as t,readdirSync as e,statSync as s}from"fs";import{join as a,relative as o,resolve as n}from"path";import{getDeadCode as i}from"./dead-code.js";import{checkUndocumentedFile as r}from"./undocumented.js";import{getSimilarFunctions as l}from"./similar-functions.js";import{analyzeComplexityFile as c}from"./complexity.js";import{getLargeFiles as d}from"./large-files.js";import{getOutdatedPatterns as u}from"./outdated-patterns.js";import{getTableUsage as m}from"./db-analysis.js";import{checkJSDocFile as h}from"./jsdoc-checker.js";import{readCache as p,writeCache as y,computeContentHash as g,isCacheValid as f}from"./analysis-cache.js";import{shouldExcludeDir as j,shouldExcludeFile as x,parseGitignore as b}from"../core/filters.js";import{getWorkspaceRoot as C}from"../core/workspace.js";
|
|
3
|
+
function w(t){let e=100;const s=[];e-=Math.min(2*t.deadCode.total,20),t.deadCode.total>0&&s.push(`${t.deadCode.total} unused functions/classes`),e-=Math.min(.5*t.undocumented.total,15),t.undocumented.total>10&&s.push(`${t.undocumented.total} undocumented items`),e-=Math.min(3*t.similar.total,15),t.similar.total>0&&s.push(`${t.similar.total} similar function pairs`);const a=t.complexity.stats?.critical||0,o=t.complexity.stats?.high||0;e-=Math.min(5*a+2*o,20),a>0&&s.push(`${a} critical complexity functions`);const n=t.largeFiles.stats?.critical||0,i=t.largeFiles.stats?.warning||0;e-=Math.min(4*n+1*i,10),n>0&&s.push(`${n} files need splitting`);const r=t.outdated.stats?.bySeverity?.error||0,l=t.outdated.stats?.bySeverity?.warning||0;if(e-=Math.min(3*r+1*l,10),t.outdated.redundantDeps?.length>0&&s.push(`${t.outdated.redundantDeps.length} redundant npm dependencies`),t.jsdocConsistency){const a=t.jsdocConsistency.errors||0,o=t.jsdocConsistency.warnings||0;e-=Math.min(2*a+1*o,15),a>0&&s.push(`${a} JSDoc consistency errors`)}let c;return e=Math.max(0,Math.min(100,Math.round(e))),c=e>=90?"excellent":e>=70?"good":e>=50?"warning":"critical",{score:e,rating:c,topIssues:s.slice(0,5)}}
|
|
4
|
+
function F(t,n=t){t===n&&b(n);const i=[];try{for(const r of e(t)){const e=a(t,r),l=o(n,e);s(e).isDirectory()?j(r,l)||i.push(...F(e,n)):!r.endsWith(".js")||r.endsWith(".css.js")||r.endsWith(".tpl.js")||x(r,l)||i.push(e)}}catch(t){}return i}
|
|
5
|
+
function S(e,s){const a=n(e),i=C(),l=F(e),d=[],u=[],m=[];let j=0,x=0;for(const e of l){const n=o(a,e),l=o(i,e);let b;try{b=t(e,"utf-8")}catch(t){continue}const C=g(b),w=p(s,l);if(w&&f(w,w.sig,C,"content"))j++,w.complexity&&d.push(...w.complexity),w.undocumented&&u.push(...w.undocumented),w.jsdocIssues&&m.push(...w.jsdocIssues);else{x++;const t=c(b,n),e=r(b,n,"tests"),a=h(b,n);d.push(...t),u.push(...e),m.push(...a),y(s,l,{sig:w?.sig||C,contentHash:C,complexity:t,undocumented:e,jsdocIssues:a})}}return{complexity:d,undocumented:u,jsdocIssues:m,cacheStats:{hits:j,misses:x}}}
|
|
6
|
+
function D(t,e=5){let s=t.filter(t=>t.complexity>=e);s.sort((t,e)=>e.complexity-t.complexity);const a={low:s.filter(t=>"low"===t.rating).length,moderate:s.filter(t=>"moderate"===t.rating).length,high:s.filter(t=>"high"===t.rating).length,critical:s.filter(t=>"critical"===t.rating).length,average:s.length>0?Math.round(s.reduce((t,e)=>t+e.complexity,0)/s.length*10)/10:0};return{total:s.length,stats:a,items:s.slice(0,30)}}
|
|
7
|
+
function M(t){const e={class:t.filter(t=>"class"===t.type).length,function:t.filter(t=>"function"===t.type).length,method:t.filter(t=>"method"===t.type).length};return{total:t.length,byType:e,items:t.slice(0,20)}}
|
|
8
|
+
function P(t){const e=t.filter(t=>"error"===t.severity).length,s=t.filter(t=>"warning"===t.severity).length,a={};for(const e of t)a[e.file]=(a[e.file]||0)+1;return{issues:t,summary:{total:t.length,errors:e,warnings:s,byFile:a}}}
|
|
9
|
+
export async function getFullAnalysis(t,e={}){const s=e.includeItems||!1,o=(n(t),S(t,a(C(),".context"))),r=D(o.complexity),c=M(o.undocumented),h=P(o.jsdocIssues),[p,y,g,f,j]=await Promise.all([i(t).catch(()=>({total:0,byType:{},items:[]})),l(t,{threshold:70}).catch(()=>({total:0,pairs:[]})),d(t).catch(()=>({total:0,stats:{},items:[]})),u(t).catch(()=>({codePatterns:[],redundantDeps:[],stats:{totalPatterns:0,bySeverity:{},byPattern:{},redundantDeps:0}})),m(t).catch(()=>({tables:[],totalTables:0,totalQueries:0}))]),x=w({deadCode:p,undocumented:c,similar:y,complexity:r,largeFiles:g,outdated:f,jsdocConsistency:h.summary}),b={deadCode:{total:p.total,byType:p.byType,...s&&{items:p.items.slice(0,10)}},undocumented:{total:c.total,byType:c.byType,...s&&{items:c.items.slice(0,10)}},similar:{total:y.total,...s&&{pairs:y.pairs.slice(0,5)}},complexity:{total:r.total,stats:r.stats,...s&&{items:r.items.slice(0,10)}},largeFiles:{total:g.total,stats:g.stats,...s&&{items:g.items.slice(0,10)}},outdated:{totalPatterns:f.stats.totalPatterns,redundantDeps:f.redundantDeps,...s&&{codePatterns:f.codePatterns.slice(0,10)}},jsdocConsistency:{total:h.summary.total,errors:h.summary.errors,warnings:h.summary.warnings,...s&&{issues:h.issues.slice(0,10)}},cache:o.cacheStats,overall:x};return j.totalTables>0&&(b.database={tablesUsed:j.totalTables,totalQueries:j.totalQueries,tables:j.tables.map(t=>({name:t.table,readers:t.totalReaders,writers:t.totalWriters}))}),b}
|
|
10
|
+
export function getAnalysisSummaryOnly(t){const e=S(t,a(C(),".context")),s=D(e.complexity),o=M(e.undocumented),n=P(e.jsdocIssues),i=w({deadCode:{total:0},undocumented:o,similar:{total:0},complexity:s,largeFiles:{total:0},outdated:{stats:{totalPatterns:0}},jsdocConsistency:n.summary});return{healthScore:i.score,grade:i.rating,complexity:s.total,undocumented:o.total,jsdocIssues:n.summary.total,cache:e.cacheStats,note:"Partial score — cross-file analyses skipped for speed. Run get_full_analysis for complete health check."}}
|