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

Function normalizeWaitState

src/utils/autonomyFlows.ts:250–267  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

248}
249
250function normalizeWaitState(value: unknown): AutonomyFlowWaitState | undefined {
251 if (
252 !value ||
253 typeof value !== 'object' ||
254 typeof (value as { reason?: unknown }).reason !== 'string' ||
255 typeof (value as { stepId?: unknown }).stepId !== 'string' ||
256 typeof (value as { stepName?: unknown }).stepName !== 'string' ||
257 typeof (value as { stepIndex?: unknown }).stepIndex !== 'number'
258 ) {
259 return undefined
260 }
261 return {
262 reason: (value as { reason: string }).reason,
263 stepId: (value as { stepId: string }).stepId,
264 stepName: (value as { stepName: string }).stepName,
265 stepIndex: (value as { stepIndex: number }).stepIndex,
266 }
267}
268
269function isPosixBoundaryGlob(value: string): boolean {
270 if (!value || value.startsWith('/') || value.includes('\\')) {

Callers 1

normalizeFlowRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected