MCPcopy
hub / github.com/rohitg00/agentmemory / generateId

Function generateId

src/state/schema.ts:83–87  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

81} as const;
82
83export function generateId(prefix: string): string {
84 const ts = Date.now().toString(36);
85 const rand = crypto.randomUUID().replace(/-/g, "").slice(0, 12);
86 return `${prefix}_${ts}_${rand}`;
87}
88
89export function fingerprintId(prefix: string, content: string): string {
90 const hash = createHash("sha256").update(content).digest("hex");

Callers 15

schema.test.tsFile · 0.85
buildDemoSessionsFunction · 0.85
createIndexGenerationFunction · 0.85
registerMeshFunctionFunction · 0.85
parseTemporalGraphXmlFunction · 0.85
registerObserveFunctionFunction · 0.85
addEntityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected