feat(FN-1053): add AI prompt executor for cron workflow steps

- Define AiPromptExecutor type and update CronRunner constructor to accept injected executor
- Implement executeAiPromptStep with real agent session execution in worktrees
- Create createAiPromptStepExecutor factory and wire up in dashboard CLI
- Add comprehensive tests for AI prompt step execution (mock agent, errors, output capture)
- Fix mock typing for dashboard test build compatibility
This commit is contained in:
gsxdsm
2026-04-07 11:20:48 -07:00
parent 1c10f2f27b
commit 7af1317f34
5 changed files with 388 additions and 23 deletions

View File

@@ -122,6 +122,7 @@ vi.mock("@fusion/engine", async (importOriginal) => {
})),
scanIdleWorktrees: vi.fn().mockResolvedValue([]),
cleanupOrphanedWorktrees: vi.fn().mockResolvedValue(0),
createAiPromptExecutor: vi.fn().mockResolvedValue(vi.fn().mockResolvedValue("mock AI response")),
};
});