UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 449 B
import{coalesceTurnInputs}from"#harness/messages.js";const COALESCED_DELIVER_FIELDS=[`context`,`inputResponses`,`message`,`outputSchema`];function coalesceDeliverPayloads(n){if(n.length===0)return{};if(n.length===1)return n[0]??{};let r={},i={};for(let t of n){for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);i=coalesceTurnInputs(i,t)}for(let e of COALESCED_DELIVER_FIELDS)delete r[e];return Object.assign(r,i)}export{coalesceDeliverPayloads};