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

Function validateRuntimeListParams

projects/runtime-protocol/src/protocol.ts:608–624  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

606}
607
608export function validateRuntimeListParams(value: unknown): RuntimeValidationResult<RuntimeListParams> {
609 const record = paramsRecord(value)
610 if (!record.ok) return record
611
612 const ownerType = optionalString(record.value, "ownerType")
613 if (!ownerType.ok) return ownerType
614 const ownerId = optionalString(record.value, "ownerId")
615 if (!ownerId.ok) return ownerId
616
617 return {
618 ok: true,
619 value: {
620 ...(ownerType.value ? { ownerType: ownerType.value } : {}),
621 ...(ownerId.value ? { ownerId: ownerId.value } : {}),
622 },
623 }
624}
625
626export function validateRuntimeIdParams(value: unknown): RuntimeValidationResult<RuntimeIdParams> {
627 const record = paramsRecord(value)

Callers

nothing calls this directly

Calls 2

paramsRecordFunction · 0.70
optionalStringFunction · 0.70

Tested by

no test coverage detected