MCPcopy Create free account
hub / github.com/apache/maka / validateProtocolRange

Function validateProtocolRange

packages/runtime-host/src/protocol/index.ts:185–194  ·  view source on GitHub ↗
(range: ProtocolRange)

Source from the content-addressed store, hash-verified

183}
184
185export function validateProtocolRange(range: ProtocolRange): void {
186 if (
187 !Number.isSafeInteger(range.min) ||
188 !Number.isSafeInteger(range.max) ||
189 range.min < 0 ||
190 range.max < range.min
191 ) {
192 throw invalidProtocolFrame('Invalid protocol range');
193 }
194}
195
196export function requireClientInstanceId(value: unknown): string {
197 return requireId(value, 'clientInstanceId');

Callers 7

negotiateProtocolFunction · 0.85
decodeClientFrameFunction · 0.85
decodeHostFrameFunction · 0.85
decodeHostRegistrationFunction · 0.85

Calls 1

invalidProtocolFrameFunction · 0.85

Tested by

no test coverage detected