( flows: AutonomyFlowRecord[], rootDir: string = getProjectRoot(), )
| 419 | } |
| 420 | |
| 421 | async function writeAutonomyFlows( |
| 422 | flows: AutonomyFlowRecord[], |
| 423 | rootDir: string = getProjectRoot(), |
| 424 | ): Promise<void> { |
| 425 | const path = resolveAutonomyFlowsPath(rootDir) |
| 426 | await mkdir(dirname(path), { recursive: true }) |
| 427 | await writeFile( |
| 428 | path, |
| 429 | `${JSON.stringify( |
| 430 | { |
| 431 | flows: selectPersistedAutonomyFlows(flows), |
| 432 | } satisfies AutonomyFlowsFile, |
| 433 | null, |
| 434 | 2, |
| 435 | )}\n`, |
| 436 | 'utf-8', |
| 437 | ) |
| 438 | } |
| 439 | |
| 440 | async function updateAutonomyFlowById( |
| 441 | flowId: string, |
no test coverage detected