MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / fileFor

Function fileFor

packages/agent-core/src/utils/per-id-json-store.ts:91–96  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

89 const dir = join(rootDir, subdir);
90
91 function fileFor(id: string): string {
92 if (!idRegex.test(id)) {
93 throw new Error(`Invalid ${entityName}: "${id}"`);
94 }
95 return join(dir, `${id}.json`);
96 }
97
98 async function write(id: string, value: T): Promise<void> {
99 const target = fileFor(id);

Callers 3

writeFunction · 0.85
readFunction · 0.85
removeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected