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

Function createAutonomyRunCore

src/utils/autonomyRuns.ts:484–505  ·  view source on GitHub ↗
(
  params: CreateAutonomyRunParams,
  skipIfActiveSource: boolean,
)

Source from the content-addressed store, hash-verified

482}
483
484async function createAutonomyRunCore(
485 params: CreateAutonomyRunParams,
486 skipIfActiveSource: boolean,
487): Promise<AutonomyRunRecord | null> {
488 const rootDir = resolve(params.rootDir ?? getProjectRoot())
489 const currentDir = resolve(params.currentDir ?? rootDir)
490 const record = buildAutonomyRunRecord(params, rootDir, currentDir)
491
492 const { created, recoveredStaleRuns } = await persistAutonomyRunRecord(
493 record,
494 rootDir,
495 skipIfActiveSource,
496 )
497 for (const recovered of recoveredStaleRuns) {
498 await syncFailedManagedFlowForRun(recovered, rootDir)
499 }
500 if (!created) {
501 return null
502 }
503 await queueManagedFlowStepRunForRecord(record, rootDir)
504 return record
505}
506
507export async function createAutonomyRun(
508 params: CreateAutonomyRunParams,

Callers 3

createAutonomyRunFunction · 0.85

Calls 6

getProjectRootFunction · 0.85
buildAutonomyRunRecordFunction · 0.85
persistAutonomyRunRecordFunction · 0.85
resolveFunction · 0.70

Tested by

no test coverage detected