MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / finalizeAutonomyRunCompleted

Function finalizeAutonomyRunCompleted

src/utils/autonomyRuns.ts:791–815  ·  view source on GitHub ↗
(params: {
  runId: string
  rootDir?: string
  currentDir?: string
  priority?: 'now' | 'next' | 'later'
  workload?: string
  nowMs?: number
})

Source from the content-addressed store, hash-verified

789}
790
791export async function finalizeAutonomyRunCompleted(params: {
792 runId: string
793 rootDir?: string
794 currentDir?: string
795 priority?: 'now' | 'next' | 'later'
796 workload?: string
797 nowMs?: number
798}): Promise<QueuedCommand[]> {
799 const updated = await markAutonomyRunCompleted(
800 params.runId,
801 params.rootDir,
802 params.nowMs,
803 )
804 if (!updated?.parentFlowId || updated.parentFlowSyncMode !== 'managed') {
805 return []
806 }
807 const next = await queueCurrentManagedFlowStepCommand({
808 flowId: updated.parentFlowId,
809 rootDir: params.rootDir,
810 currentDir: params.currentDir ?? updated.currentDir,
811 priority: params.priority,
812 workload: params.workload,
813 })
814 return next ? [next] : []
815}
816
817export async function finalizeAutonomyRunFailed(params: {
818 runId: string

Calls 2

markAutonomyRunCompletedFunction · 0.85

Tested by

no test coverage detected