chore(release): add changeset for stale-task safeguards + heartbeat-on-creation

Covers the three FN-2274 commits (engine guard, dashboard preflight, docs) plus
the AgentStore default-heartbeat-interval fix. Bumps @runfusion/fusion one
patch so the Version Packages PR opens automatically on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-22 21:22:38 -07:00
parent 085c3cd8c3
commit 95a65f6175

View File

@@ -0,0 +1,10 @@
---
"@runfusion/fusion": patch
---
Harden agent lifecycle around closed tasks and heartbeat defaults.
- `HeartbeatMonitor.executeHeartbeat()` now exits before session creation when the resolved task is done/archived (reason `task_closed`) and clears the stale `agent.taskId` linkage so the guard isn't re-tripped on every tick.
- `HeartbeatTriggerScheduler.watchAssignments()` skips callback dispatch when the assigned task is already closed (when a `taskStore` is wired in).
- `POST /api/agents/:id/runs` performs the same preflight check and returns 409 with a structured error naming the task id + column, keeping the existing active-run 409 precedence.
- `AgentStore.createAgent()` now persists `runtimeConfig.heartbeatIntervalMs` (default 1h) on non-ephemeral agents so the dashboard's freshness signal matches the scheduler's effective cadence instead of depending on whether the user ever opened the heartbeat dropdown. Exports a new `DEFAULT_AGENT_HEARTBEAT_INTERVAL_MS` constant.