UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

24 lines (23 loc) • 685 B
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs"; //#region src/gateway/node-invoke-request.ts function buildNodeInvokeRequest(e) { return { id: e.id, nodeId: e.nodeId, command: e.command, paramsJSON: e.params === void 0 ? null : JSON.stringify(e.params), timeoutMs: e.timeoutMs, idempotencyKey: e.idempotencyKey, sessionKey: normalizeOptionalString(e.sessionKey) }; } /** Measure the same outer encoding sent to nodes, including paramsJSON escaping. */ function serializeNodeEvent(e, t) { return JSON.stringify({ type: "event", event: e, payload: t }); } //#endregion export { serializeNodeEvent as n, buildNodeInvokeRequest as t };