MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / candidatePaths

Function candidatePaths

src/extraction/kernel/loader.ts:103–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101let cached: KernelModule | null | undefined;
102
103function candidatePaths(): string[] {
104 const candidates: string[] = [];
105 if (process.env.CODEGRAPH_KERNEL_PATH) candidates.push(process.env.CODEGRAPH_KERNEL_PATH);
106 const packageRoot = path.resolve(__dirname, '..', '..', '..');
107 candidates.push(path.join(packageRoot, 'kernel', 'codegraph-kernel.node'));
108 candidates.push(
109 path.join(
110 packageRoot,
111 'codegraph-kernel',
112 'prebuilds',
113 `${process.platform}-${process.arch}`,
114 'codegraph-kernel.node'
115 )
116 );
117 return candidates;
118}
119
120/**
121 * Verify the binary speaks our wire contract: same ABI version and byte-equal

Callers 1

getKernelFunction · 0.85

Calls 2

resolveMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected