MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / normalizeWorkflowStep

Function normalizeWorkflowStep

src/utils/workflowRuns.ts:57–72  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

55}
56
57function normalizeWorkflowStep(value: unknown): WorkflowRunStepRecord | null {
58 if (!isRecord(value)) return null
59 if (typeof value.name !== 'string') return null
60 if (!isWorkflowStepStatus(value.status)) return null
61 return {
62 name: value.name,
63 ...(typeof value.prompt === 'string' ? { prompt: value.prompt } : {}),
64 status: value.status,
65 ...(typeof value.startedAt === 'number'
66 ? { startedAt: value.startedAt }
67 : {}),
68 ...(typeof value.completedAt === 'number'
69 ? { completedAt: value.completedAt }
70 : {}),
71 }
72}
73
74function normalizeWorkflowRun(value: unknown): WorkflowRunRecord | null {
75 if (!isRecord(value)) return null

Callers

nothing calls this directly

Calls 2

isWorkflowStepStatusFunction · 0.85
isRecordFunction · 0.70

Tested by

no test coverage detected