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

Function queueManagedFlowStepRunForRecord

src/utils/autonomyRuns.ts:458–482  ·  view source on GitHub ↗
(
  record: AutonomyRunRecord,
  rootDir: string,
)

Source from the content-addressed store, hash-verified

456}
457
458async function queueManagedFlowStepRunForRecord(
459 record: AutonomyRunRecord,
460 rootDir: string,
461): Promise<void> {
462 if (
463 record.parentFlowId &&
464 record.flowStepId &&
465 record.parentFlowSyncMode === 'managed'
466 ) {
467 const stepIndex =
468 (
469 await getAutonomyFlowById(record.parentFlowId, rootDir)
470 )?.stateJson?.steps.findIndex(
471 step => step.stepId === record.flowStepId,
472 ) ?? 0
473 await queueManagedAutonomyFlowStepRun({
474 flowId: record.parentFlowId,
475 stepId: record.flowStepId,
476 stepIndex: stepIndex >= 0 ? stepIndex : 0,
477 runId: record.runId,
478 rootDir,
479 nowMs: record.createdAt,
480 })
481 }
482}
483
484async function createAutonomyRunCore(
485 params: CreateAutonomyRunParams,

Callers 1

createAutonomyRunCoreFunction · 0.85

Calls 2

getAutonomyFlowByIdFunction · 0.85

Tested by

no test coverage detected