(root: string)
| 139 | } |
| 140 | |
| 141 | function readLockPid(root: string): number | null { |
| 142 | try { |
| 143 | const raw = fs.readFileSync(path.join(root, '.codegraph', 'daemon.pid'), 'utf8'); |
| 144 | const info = JSON.parse(raw); |
| 145 | return typeof info.pid === 'number' ? info.pid : null; |
| 146 | } catch { return null; } |
| 147 | } |
| 148 | |
| 149 | function readDaemonLog(root: string): string { |
| 150 | try { return fs.readFileSync(path.join(root, '.codegraph', 'daemon.log'), 'utf8'); } |