web: add heartbeat and bounded reconnect tuning

This commit is contained in:
Peter Steinberger
2025-11-26 02:34:43 +01:00
parent e482e7768b
commit baf20af17f
19 changed files with 541 additions and 63 deletions

View File

@@ -1248,11 +1248,12 @@ describe("monitoring", () => {
const replySpy = vi.fn();
const sendMediaSpy = vi.fn();
const listenerFactory = vi.fn(
async (
opts: Parameters<typeof index.monitorWebProvider>[1] extends undefined
? never
: NonNullable<Parameters<typeof index.monitorWebProvider>[1]>,
) => {
async (opts: {
verbose: boolean;
onMessage: (
msg: import("./web/inbound.js").WebInboundMessage,
) => Promise<void>;
}) => {
await opts.onMessage({
body: "hello",
from: "+1",