(loc: Location)
| 94 | } |
| 95 | |
| 96 | detect(loc: Location): DetectionResult { |
| 97 | const mcpPath = mcpJsonPath(loc); |
| 98 | const config = readJsonFile(mcpPath); |
| 99 | const alreadyConfigured = !!config.mcpServers?.codegraph; |
| 100 | // "Installed" heuristic: does ~/.cursor exist (global) or has the |
| 101 | // user opted into a project-local cursor config dir? |
| 102 | const installed = loc === 'global' |
| 103 | ? fs.existsSync(path.join(os.homedir(), '.cursor')) |
| 104 | : fs.existsSync(path.join(process.cwd(), '.cursor')); |
| 105 | return { installed, alreadyConfigured, configPath: mcpPath }; |
| 106 | } |
| 107 | |
| 108 | install(loc: Location, _opts: InstallOptions): WriteResult { |
| 109 | const files: WriteResult['files'] = []; |
nothing calls this directly
no test coverage detected