MCPcopy Create free account
hub / github.com/SethGammon/Citadel / resolveFile

Function resolveFile

mcp-servers/codebase-memory/index.js:66–72  ·  view source on GitHub ↗
(index, arg)

Source from the content-addressed store, hash-verified

64 return reverse;
65}
66
67function resolveFile(index, arg) {
68 const want = toPosix(arg);
69 if (index.files && index.files[want]) return want;
70 // tolerate a partial/suffix path the agent typed by hand
71 const matches = Object.keys(index.files || {}).filter((f) => f === want || f.endsWith('/' + want) || f.endsWith(want));
72 return matches.length === 1 ? matches[0] : matches.length ? matches : null;
73}
74
75function riskFor(fanIn, role) {

Callers 3

whoImportsFunction · 0.85
dependenciesOfFunction · 0.85
tracePathFunction · 0.85

Calls 1

toPosixFunction · 0.85

Tested by

no test coverage detected