MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / isGeneratedIdempotencyKey

Function isGeneratedIdempotencyKey

scripts/build-compliance.cjs:284–289  ·  view source on GitHub ↗
(value, generatedContextNames)

Source from the content-addressed store, hash-verified

282 ]);
283
284 function isGeneratedIdempotencyKey(value, generatedContextNames) {
285 if (typeof value !== 'string') return false;
286 if (value.startsWith('$generate:uuid_v4')) return true;
287 const contextMatch = value.match(/^\$context\.([A-Za-z0-9_]+)$/);
288 return Boolean(contextMatch && generatedContextNames.has(contextMatch[1]));
289 }
290
291 function rememberGeneratedUuidContextOutputs(step, generatedContextNames) {
292 for (const output of step?.context_outputs ?? []) {

Callers 1

lintFileFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected