From ebbb572639915bb096812f3d207fccb79dc305fd Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 3 Mar 2026 01:40:11 +0000 Subject: [PATCH] fix: add requestHeartbeatNow runtime coverage (#19464) (thanks @AustinEral) --- CHANGELOG.md | 1 + src/plugins/runtime/index.test.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03619fa79..086354ae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai - Plugin runtime/STT: add `api.runtime.stt.transcribeAudioFile(...)` so extensions can transcribe local audio files through OpenClaw's configured media-understanding audio providers. (#22402) Thanks @benthecarman. - Plugin SDK/channel extensibility: expose `channelRuntime` on `ChannelGatewayContext` so external channel plugins can access shared runtime helpers (reply/routing/session/text/media/commands) without internal imports. (#25462) Thanks @guxiaobo. - Plugin runtime/events: expose `runtime.events.onAgentEvent` and `runtime.events.onSessionTranscriptUpdate` for extension-side subscriptions, and isolate transcript-listener failures so one faulty listener cannot break the entire update fanout. (#16044) Thanks @scifantastic. +- Plugin runtime/system: expose `runtime.system.requestHeartbeatNow(...)` so extensions can wake targeted sessions immediately after enqueueing system events. (#19464) Thanks @AustinEral. - Sessions/Attachments: add inline file attachment support for `sessions_spawn` (subagent runtime only) with base64/utf8 encoding, transcript content redaction, lifecycle cleanup, and configurable limits via `tools.sessions_spawn.attachments`. (#16761) Thanks @napetrov. - Tools/PDF analysis: add a first-class `pdf` tool with native Anthropic and Google PDF provider support, extraction fallback for non-native models, configurable defaults (`agents.defaults.pdfModel`, `pdfMaxBytesMb`, `pdfMaxPages`), and docs/tests covering routing, validation, and registration. (#31319) Thanks @tyler6204. - Zalo Personal plugin (`@openclaw/zalouser`): rebuilt channel runtime to use native `zca-js` integration in-process, removing external CLI transport usage and keeping QR/login + send/listen flows fully inside OpenClaw. diff --git a/src/plugins/runtime/index.test.ts b/src/plugins/runtime/index.test.ts index ae40e463b..77b3de660 100644 --- a/src/plugins/runtime/index.test.ts +++ b/src/plugins/runtime/index.test.ts @@ -1,5 +1,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import { onAgentEvent } from "../../infra/agent-events.js"; +import { requestHeartbeatNow } from "../../infra/heartbeat-wake.js"; import { onSessionTranscriptUpdate } from "../../sessions/transcript-events.js"; const runCommandWithTimeoutMock = vi.hoisted(() => vi.fn()); @@ -47,4 +48,9 @@ describe("plugin runtime command execution", () => { expect(runtime.events.onAgentEvent).toBe(onAgentEvent); expect(runtime.events.onSessionTranscriptUpdate).toBe(onSessionTranscriptUpdate); }); + + it("exposes runtime.system.requestHeartbeatNow", () => { + const runtime = createPluginRuntime(); + expect(runtime.system.requestHeartbeatNow).toBe(requestHeartbeatNow); + }); });