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

Function validateRuntimeStopParams

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

Source from the content-addressed store, hash-verified

632}
633
634export function validateRuntimeStopParams(value: unknown): RuntimeValidationResult<RuntimeStopParams> {
635 const record = paramsRecord(value)
636 if (!record.ok) return record
637 const runtimeId = requiredString(record.value, "runtimeId")
638 if (!runtimeId.ok) return runtimeId
639 const reason = optionalString(record.value, "reason")
640 if (!reason.ok) return reason
641 return {
642 ok: true,
643 value: {
644 runtimeId: runtimeId.value,
645 ...(reason.value !== undefined ? { reason: reason.value } : {}),
646 },
647 }
648}
649
650export function validateAgentProviderIdParams(value: unknown): RuntimeValidationResult<AgentProviderIdParams> {
651 const record = paramsRecord(value)

Callers

nothing calls this directly

Calls 3

paramsRecordFunction · 0.70
requiredStringFunction · 0.70
optionalStringFunction · 0.70

Tested by

no test coverage detected