feat(companion): add heartbeat loop jitter controls

This commit is contained in:
William Valentin
2026-02-16 18:57:56 -08:00
parent fd59d88c0c
commit 01b24e71b9
4 changed files with 58 additions and 2 deletions
+1 -1
View File
@@ -1199,7 +1199,7 @@ Companion runtime helper:
- shared `publishHeartbeat()` helper for periodic `node.status.set` updates with safe defaults
- `createHeartbeatLoop()` convenience helper that returns a bound `CompanionHeartbeatLoop`
- optional `defaultSessionId` for canvas helper calls so `sessionId` can be omitted per call
- `src/companion/heartbeatLoop.ts` provides `CompanionHeartbeatLoop` for periodic heartbeat scheduling (`publishHeartbeat`) with start/stop safety, `tickNow()` for manual sends, error hooks, and optional auto-stop after repeated failures.
- `src/companion/heartbeatLoop.ts` provides `CompanionHeartbeatLoop` for periodic heartbeat scheduling (`publishHeartbeat`) with start/stop safety, optional interval jitter (`jitterRatio`) to spread load, `tickNow()` for manual sends, error hooks, and optional auto-stop after repeated failures.
## Canvas / A2UI Foundation