MCPcopy Create free account
hub / github.com/VPSDance/ai-proxy-rules / defaultGetFileAtRef

Function defaultGetFileAtRef

scripts/checks/guard.ts:110–117  ·  view source on GitHub ↗
(ref: string, relPath: string)

Source from the content-addressed store, hash-verified

108}
109
110async function defaultGetFileAtRef(ref: string, relPath: string): Promise<string | null> {
111 try {
112 const { stdout } = await exec("git", ["show", `${ref}:${relPath}`], { maxBuffer: 10 * 1024 * 1024 });
113 return stdout;
114 } catch {
115 return null;
116 }
117}
118
119export function countRulesFromText(text: string): number {
120 const parsed = parse(text) as

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected