fix(engine): make heartbeat helper imports static to fail fast on partial dist

Convert the dynamic await import("./agent-session-helpers.js") and
await import("./session-skill-context.js") calls inside the heartbeat
executor to static top-level imports, matching the rationale of
38933c770 (which already made the sibling pi.js import static).
This surfaces ERR_MODULE_NOT_FOUND at engine load time rather than
mid-heartbeat when a worktree is on a branch missing the helpers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-06 06:49:30 -07:00
parent 9be551b3a2
commit a143bcc4f5
2 changed files with 11 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
---
"@runfusion/fusion": patch
---
Convert the heartbeat executor's dynamic `import("./agent-session-helpers.js")`
and `import("./session-skill-context.js")` calls to static imports. This makes
missing or partial engine dist surface at module load time (matching the
existing static `pi.js` import) instead of failing mid-heartbeat with a
confusing `ERR_MODULE_NOT_FOUND`.