MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolveGate

Function resolveGate

scripts/generate_slash_command_appendix.mjs:578–587  ·  view source on GitHub ↗
(entry, importInfo)

Source from the content-addressed store, hash-verified

576}
577
578function resolveGate(entry, importInfo) {
579 const rawGate = entry.gate || importInfo?.gate || 'always'
580 if (/^[A-Za-z_$][\w$]*$/.test(rawGate)) {
581 const referenced = importMap.get(rawGate)
582 if (referenced?.gate && referenced.gate !== 'always') {
583 return `${rawGate} => ${referenced.gate}`
584 }
585 }
586 return rawGate
587}
588
589const importMap = new Map([
590 ...parseImports(commandsSource),

Calls 1

getMethod · 0.45

Tested by

no test coverage detected