(params: {
runId: string
rootDir?: string
currentDir?: string
priority?: 'now' | 'next' | 'later'
workload?: string
nowMs?: number
})
| 789 | } |
| 790 | |
| 791 | export 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 | |
| 817 | export async function finalizeAutonomyRunFailed(params: { |
| 818 | runId: string |
no test coverage detected