openclaw/test/helpers/extensions
M1a0 7847e67f8a
plugin-runtime: expose runHeartbeatOnce in system API (#40299)
* plugin-runtime: expose runHeartbeatOnce in system API

Plugins that enqueue system events and need the agent to deliver
responses to the originating channel currently have no way to
override the default `heartbeat.target: "none"` behaviour.

Expose `runHeartbeatOnce` in the plugin runtime `system` namespace
so plugins can trigger a single heartbeat cycle with an explicit
`heartbeat: { target: "last" }` override — the same pattern the
cron service already uses (see #28508).

Changes:
- Add `RunHeartbeatOnceOptions` type and `runHeartbeatOnce` to
  `PluginRuntimeCore.system` (types-core.ts)
- Wire the function through a thin wrapper in runtime-system.ts
- Update the test-utils plugin-runtime mock

Made-with: Cursor

* feat(plugins): expose runHeartbeatOnce in system API (#40299) (thanks @loveyana)

---------

Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
2026-03-25 10:47:01 -07:00
..
bluebubbles-monitor.ts
chunk-test-helpers.ts
configured-binding-runtime.ts refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
directory.ts
discord-component-runtime.ts refactor: dedupe test and script helpers 2026-03-24 15:48:35 +00:00
discord-provider.test-support.ts
env.ts
feishu-lifecycle.ts refactor: dedupe tests and harden suite isolation 2026-03-24 19:16:19 +00:00
fetch-mock.ts
frozen-time.ts
jiti-runtime-api.ts test: harden linux runtime smoke guards 2026-03-24 03:23:52 +00:00
matrix-monitor-route.ts
matrix-route-test.ts
mock-http-response.ts
plugin-api.ts
plugin-command.ts
plugin-registration.ts
plugin-routing.ts
plugin-runtime-mock.ts plugin-runtime: expose runHeartbeatOnce in system API (#40299) 2026-03-25 10:47:01 -07:00
plugin-sdk-stub.cjs fix: unblock runtime-api smoke checks 2026-03-24 03:00:51 +00:00
provider-registration.ts refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
provider-usage-fetch.ts
runtime-env.ts
send-config.ts
setup-wizard.ts
start-account-context.ts
start-account-lifecycle.ts
status-issues.ts
subagent-hooks.ts
telegram-plugin-command.ts
temp-dir.ts
typed-cases.ts
zalo-lifecycle.ts refactor: dedupe test and script helpers 2026-03-24 15:48:35 +00:00