UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

27 lines (26 loc) • 1.2 kB
import "./redact-BV3wTtTv.mjs"; import "./logger-BhL9CiBr.mjs"; import "./subsystem-4NzR43uz.mjs"; import { t as GatewayScheduler } from "./gateway-scheduler-B6bteUrw.mjs"; import { r as getBoundLegacyPluginSdkResourceHost } from "./legacy-sdk-resource-host-Ck09VxpO.mjs"; import "./logger-DZaOV_pr.mjs"; import { f as startGatewayDiagnosticHeartbeat, p as stopGatewayDiagnosticHeartbeat } from "./diagnostic-jtgHaFVw.mjs"; //#region src/plugin-sdk/logging-core.ts /** * Public SDK subpath for logging, diagnostics, and redaction helpers. */ let standaloneDiagnosticScheduler; /** Standalone SDK callers own this schedule; Gateway plugins use their bound host. */ function startDiagnosticHeartbeat(config, opts) { const host = getBoundLegacyPluginSdkResourceHost(); const scheduler = host ? host.scheduler : standaloneDiagnosticScheduler ??= new GatewayScheduler(); startGatewayDiagnosticHeartbeat(scheduler, config, opts); } function stopDiagnosticHeartbeat() { stopGatewayDiagnosticHeartbeat(); const scheduler = standaloneDiagnosticScheduler; standaloneDiagnosticScheduler = void 0; scheduler?.stop(); } //#endregion export { stopDiagnosticHeartbeat as n, startDiagnosticHeartbeat as t };