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

Function invalidDefaultTarget

packages/runtime-host/src/protocol/runtime-policy.ts:763–773  ·  view source on GitHub ↗
(
  value: unknown,
  label: string,
)

Source from the content-addressed store, hash-verified

761}
762
763function invalidDefaultTarget(
764 value: unknown,
765 label: string,
766): { kind: 'invalid_default_target'; target: ConnectionTarget } {
767 const item = requireExactRecord(value, label, ['kind', 'target']);
768 if (item.kind !== 'invalid_default_target') throw invalidProtocolFrame(`Invalid ${label}`);
769 return {
770 kind: 'invalid_default_target',
771 target: decodeDomain(() => decodeConnectionTarget(item.target)),
772 };
773}
774
775function decodeCredentialQueryInput(value: unknown): CredentialVaultQueryInput {
776 const item = requireExactRecord(value, 'credential query input', ['locator']);

Callers 1

Calls 4

decodeConnectionTargetFunction · 0.90
invalidProtocolFrameFunction · 0.85
requireExactRecordFunction · 0.70
decodeDomainFunction · 0.70

Tested by

no test coverage detected