| 92 | process.exit(0); |
| 93 | }); |
| 94 | } |
| 95 | |
| 96 | function syncRepositoryMemory(filePath, relativePath) { |
| 97 | try { |
| 98 | const memory = require('../core/memory/repository-store'); |
| 99 | if (!memory.isDurablePath(relativePath)) return; |
| 100 | memory.syncRepository(PROJECT_ROOT, { filePath }); |
| 101 | } catch { /* optional, best-effort, and never blocks file notifications */ } |
| 102 | } |
| 103 | |
| 104 | function queueDocSync(relative, trigger) { |
| 105 | try { |
| 106 | if (!fs.existsSync(TELEMETRY_DIR)) return; |
| 107 | const queuePath = path.join(TELEMETRY_DIR, 'doc-sync-queue.jsonl'); |
| 108 | const entry = JSON.stringify({ |
| 109 | event: 'file-changed', |
| 110 | file: relative, |