MCPcopy Create free account
hub / github.com/backnotprop/plannotator / resolveAtReference

Function resolveAtReference

packages/shared/at-reference.ts:44–52  ·  view source on GitHub ↗
(
  input: string,
  exists: (candidate: string) => boolean,
)

Source from the content-addressed store, hash-verified

42 * predicates. The helper itself is filesystem-agnostic.
43 */
44export function resolveAtReference(
45 input: string,
46 exists: (candidate: string) => boolean,
47): string | null {
48 const stripped = stripAtPrefix(input);
49 if (exists(stripped)) return stripped;
50 if (stripped !== input && exists(input)) return input;
51 return null;
52}

Callers 3

index.tsFile · 0.90
plannotatorFunction · 0.85

Calls 2

stripAtPrefixFunction · 0.85
existsFunction · 0.85

Tested by

no test coverage detected