MCPcopy Create free account
hub / github.com/EvoMap/evolver / resolveWorkspaceId

Function resolveWorkspaceId

src/adapters/scripts/_runtimePaths.js:362–372  ·  view source on GitHub ↗
(evolverRoot, projectDir)

Source from the content-addressed store, hash-verified

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.
362function 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

Callers 3

recordToLocalFunction · 0.85
runInjectionFunction · 0.85

Calls 3

findEvolverRootFunction · 0.85
_fsWorkspaceIdFunction · 0.85
resolveProjectDirFunction · 0.85

Tested by

no test coverage detected