MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / matchesPattern

Method matchesPattern

projects/runtime/src/server.ts:389–393  ·  view source on GitHub ↗
(method: string, pattern: string)

Source from the content-addressed store, hash-verified

387 }
388
389 private matchesPattern(method: string, pattern: string): boolean {
390 if (pattern === "*" || pattern === method) return true
391 if (pattern.endsWith("/*")) return method.startsWith(pattern.slice(0, -1))
392 return false
393 }
394
395 private canReceiveNotification(method: string, connection: RuntimeConnection): boolean {
396 if (!connection.notificationPermissions || connection.notificationPermissions.length === 0) return true

Callers 2

canInvokeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected