(evolverRoot, projectDir)
| 360 | // Still returns null if even the FS write fails — callers must then NOT filter |
| 361 | // (show everything), preserving prior behavior rather than hiding all memory. |
| 362 | function resolveWorkspaceId(evolverRoot, projectDir) { |
| 363 | if (process.env.EVOLVER_WORKSPACE_ID) return String(process.env.EVOLVER_WORKSPACE_ID); |
| 364 | const root = evolverRoot || findEvolverRoot(); |
| 365 | if (root) { |
| 366 | try { |
| 367 | const paths = require(path.join(root, 'src', 'gep', 'paths.js')); |
| 368 | if (typeof paths.getWorkspaceId === 'function') return paths.getWorkspaceId(); |
| 369 | } catch { /* paths.js unreachable — fall through to FS-only */ } |
| 370 | } |
| 371 | return _fsWorkspaceId(projectDir || resolveProjectDir()); |
| 372 | } |
| 373 | |
| 374 | // Returns a path to the evolution memory graph, or a fallback location that |
| 375 | // is guaranteed to be writable. Never returns null — when no evolver root is |
no test coverage detected