(params: {
flowId: string
rootDir?: string
currentDir?: string
priority?: 'now' | 'next' | 'later'
workload?: string
nowMs?: number
})
| 839 | } |
| 840 | |
| 841 | export async function resumeManagedAutonomyFlowPrompt(params: { |
| 842 | flowId: string |
| 843 | rootDir?: string |
| 844 | currentDir?: string |
| 845 | priority?: 'now' | 'next' | 'later' |
| 846 | workload?: string |
| 847 | nowMs?: number |
| 848 | }): Promise<QueuedCommand | null> { |
| 849 | const resumed = await resumeManagedAutonomyFlow({ |
| 850 | flowId: params.flowId, |
| 851 | rootDir: params.rootDir, |
| 852 | nowMs: params.nowMs, |
| 853 | }) |
| 854 | if (!resumed) { |
| 855 | return recoverManagedAutonomyFlowPrompt({ |
| 856 | flowId: params.flowId, |
| 857 | rootDir: params.rootDir, |
| 858 | currentDir: params.currentDir, |
| 859 | priority: params.priority, |
| 860 | workload: params.workload, |
| 861 | }) |
| 862 | } |
| 863 | return createOrRecoverManagedFlowStepCommand({ |
| 864 | flowId: resumed.flow.flowId, |
| 865 | rootDir: params.rootDir, |
| 866 | currentDir: params.currentDir ?? resumed.flow.currentDir, |
| 867 | priority: params.priority, |
| 868 | workload: params.workload, |
| 869 | }) |
| 870 | } |
| 871 | |
| 872 | export async function createAutonomyQueuedPrompt(params: { |
| 873 | trigger: AutonomyTriggerKind |
no test coverage detected