MCPcopy
hub / github.com/cobusgreyling/loop-engineering / resolveProjectRoot

Function resolveProjectRoot

tools/mcp-server/src/resolver.ts:36–41  ·  view source on GitHub ↗
(hint?: string)

Source from the content-addressed store, hash-verified

34}
35
36export async function resolveProjectRoot(hint?: string): Promise<string> {
37 if (hint) return path.resolve(hint);
38 return process.env.LOOP_PROJECT_ROOT
39 ? path.resolve(process.env.LOOP_PROJECT_ROOT)
40 : process.cwd();
41}
42
43export async function readFileIfExists(filePath: string): Promise<string | null> {
44 try {

Callers 2

server.test.mjsFile · 0.85
index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected