(location: InstallLocation)
| 50 | } |
| 51 | |
| 52 | export function hasPermissions(location: InstallLocation): boolean { |
| 53 | const file = location === 'global' |
| 54 | ? path.join(os.homedir(), '.claude', 'settings.json') |
| 55 | : path.join(process.cwd(), '.claude', 'settings.json'); |
| 56 | const settings = readJsonFile(file); |
| 57 | const allow = settings.permissions?.allow; |
| 58 | if (!Array.isArray(allow)) return false; |
| 59 | return allow.some((p: string) => p.startsWith('mcp__codegraph__')); |
| 60 | } |
nothing calls this directly
no test coverage detected