openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
15 lines (14 loc) • 717 B
JavaScript
import { l as isRecord } from "./record-coerce-CVPuDqcc.mjs";
import { i as NodeHostStatsPayloadSchema } from "./nodes-DlKXXa5o.mjs";
import { Value } from "typebox/value";
//#region src/shared/node-host-stats.ts
const NODE_HOST_STATS_EVENT = "node.host.stats";
const NODE_HOST_STATS_INTERVAL_MS = 6e4;
/** Validate a saved or projected snapshot without replacing its Gateway receipt time. */
function isNodeHostStats(e) {
if (!isRecord(e)) return false;
const { updatedAtMs: t, ...n } = e;
return typeof t === "number" && Number.isSafeInteger(t) && t >= 0 && Value.Check(NodeHostStatsPayloadSchema, n);
}
//#endregion
export { NODE_HOST_STATS_INTERVAL_MS as n, isNodeHostStats as r, NODE_HOST_STATS_EVENT as t };