MCPcopy
hub / github.com/CopilotKit/CopilotKit / resolveKey

Function resolveKey

showcase/scripts/railway-envs.ts:2095–2104  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

2093 // mirroring resolveTargetServices. Fail loud on an unknown name.
2094 const closure = new Set<string>();
2095 const resolveKey = (raw: string): string => {
2096 const name = raw.trim();
2097 if (Object.hasOwn(services, name)) return name;
2098 for (const [key, entry] of Object.entries(services)) {
2099 if (entry.dispatchName === name) return key;
2100 }
2101 throw new Error(
2102 `computePromoteClosure: unknown service "${raw}" — not an SSOT key or dispatch_name in railway-envs.ts.`,
2103 );
2104 };
2105 for (const raw of requested) {
2106 if (raw.trim() === "") continue;
2107 closure.add(resolveKey(raw));

Callers 1

computePromoteClosureFunction · 0.85

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…