MCPcopy
hub / github.com/colbymchenry/codegraph / projectHash

Function projectHash

src/mcp/daemon-paths.ts:40–42  ·  view source on GitHub ↗

Short stable identifier for a project root — used in tmpdir/pipe names.

(projectRoot: string)

Source from the content-addressed store, hash-verified

38
39/** Short stable identifier for a project root — used in tmpdir/pipe names. */
40function projectHash(projectRoot: string): string {
41 return crypto.createHash('sha256').update(path.resolve(projectRoot)).digest('hex').slice(0, 16);
42}
43
44/**
45 * The deterministic tmpdir socket path for `projectRoot` — the fallback used

Callers 2

tmpdirSocketPathFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected