feat(FN-3323): recover orphaned agents and add reports health section to he

The merge lands FN-3323's self-healing system: a new "reports health" prompt section and `agent-heartbeat.ts` module that detect orphaned agents and recover their state (clearing stale error states and re-enabling heartbeat execution). The engine's `self-healing.ts` was expanded with wired recovery

Fusion-Task-Id: FN-3323
This commit is contained in:
Fusion
2026-05-04 16:41:00 -07:00
committed by gsxdsm
parent 1dce4ee002
commit 525787edb7
6 changed files with 378 additions and 3 deletions

View File

@@ -668,6 +668,7 @@ export class InProcessRuntime
// 7. Initialize SelfHealingManager
this.selfHealingManager = new SelfHealingManager(this.taskStore, {
rootDir: this.config.workingDirectory,
agentStore: this.agentStore,
recoverCompletedTask: (task) => this.executor.recoverCompletedTask(task),
recoverFailedPreMergeStep: (task) => this.executor.recoverFailedPreMergeWorkflowStep(task),
getExecutingTaskIds: () => this.executor.getExecutingTaskIds(),