MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / buildPayload

Method buildPayload

webui/js/websocket.js:336–345  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

334 }
335
336 buildPayload(data) {
337 const ts = getCurrentUserISOString();
338 if (data == null) {
339 return { ts, data: {} };
340 }
341 if (typeof data !== "object" || Array.isArray(data)) {
342 throw new Error("WebSocket payload must be a plain object");
343 }
344 return { ts, data: { ...data } };
345 }
346
347 applyProducerOptions(payload, normalizedOptions, allowances) {
348 const result = payload;

Callers 2

emitMethod · 0.95
requestMethod · 0.95

Calls 1

getCurrentUserISOStringFunction · 0.90

Tested by

no test coverage detected