feat(companion): add heartbeat loop getState snapshot

This commit is contained in:
William Valentin
2026-02-16 19:12:47 -08:00
parent 636f24016f
commit 1fb70ce0b1
5 changed files with 35 additions and 1 deletions
+1 -1
View File
@@ -1200,7 +1200,7 @@ Companion runtime helper:
- `createHeartbeatLoop()` convenience helper that returns a bound `CompanionHeartbeatLoop`
- optional `defaultSessionId` for canvas helper calls so `sessionId` can be omitted per call
- `dispose()` lifecycle helper for unified runtime teardown
- `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, success/error hooks, failure observability (`failureCount`, `lastFailure`), 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, success/error hooks, failure observability (`failureCount`, `lastFailure`, `getState()`), and optional auto-stop after repeated failures.
## Canvas / A2UI Foundation