openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
27 lines (26 loc) • 1.2 kB
JavaScript
import { r as getBoundLegacyPluginSdkResourceHost } from "./legacy-sdk-resource-host-DWmF5HWc.mjs";
import "./redact-BEIE6NCT.mjs";
import "./logger-DQckz-uQ.mjs";
import "./subsystem-BlrgtxyM.mjs";
import "./logger-CYgsNcie.mjs";
import { f as startGatewayDiagnosticHeartbeat, p as stopGatewayDiagnosticHeartbeat } from "./diagnostic-DRiDG71y.mjs";
import { t as GatewayScheduler } from "./gateway-scheduler-DyVQgsqN.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 };