(params: {
trigger: AutonomyTriggerKind
sourceId: string
rootDir?: string
ownerKey?: string
})
| 348 | } |
| 349 | |
| 350 | export async function hasActiveAutonomyRunForSource(params: { |
| 351 | trigger: AutonomyTriggerKind |
| 352 | sourceId: string |
| 353 | rootDir?: string |
| 354 | ownerKey?: string |
| 355 | }): Promise<boolean> { |
| 356 | const runs = await listAutonomyRuns(params.rootDir) |
| 357 | return runs.some( |
| 358 | run => |
| 359 | matchesActiveAutonomyRunSource(run, params) && |
| 360 | !isStaleActiveAutonomyRun(run), |
| 361 | ) |
| 362 | } |
| 363 | |
| 364 | function buildAutonomyRunRecord( |
| 365 | params: CreateAutonomyRunParams, |
no test coverage detected