feat(engine): gate executor and heartbeat on allowParallelExecution
When a permanent agent has allowParallelExecution=false, TaskExecutor.execute() defers if the agent has an active heartbeat run, and HeartbeatScheduler defers a heartbeat if the agent's bound task has an active executor session. Each side re-dispatches the other's deferred work on completion via resumeTaskForAgent and the in-process runtime's onRunCompleted hook. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
.changeset/agent-allow-parallel-execution.md
Normal file
10
.changeset/agent-allow-parallel-execution.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@fusion/core": minor
|
||||
"@fusion/engine": minor
|
||||
"@runfusion/fusion": minor
|
||||
"@fusion/dashboard": minor
|
||||
---
|
||||
|
||||
Per-agent setting `allowParallelExecution` (default true, permanent agents only): when disabled, an agent's heartbeat runs and task executor sessions serialize — a heartbeat will not start while the agent's bound task has an active executor session, and an executor session will not start while the agent has an active heartbeat run.
|
||||
|
||||
Field added to `AgentHeartbeatConfig` in `@fusion/core`. UI toggle surfaces in the agent's Heartbeat Settings tab alongside `runMissedHeartbeatOnStartup`. Engine gating: `TaskExecutor.execute()` defers when the assigned agent has an active heartbeat run; `HeartbeatMonitor` defers a heartbeat when the agent's bound task has an active executor session. After either side completes, the deferred work is re-dispatched.
|
||||
Reference in New Issue
Block a user