@arcgis/ai-components 5.2.0-next.37 → 5.2.0-next.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cdn/{KRE4U7V7.js → 2K3FTW7J.js} +1 -1
  2. package/dist/cdn/{TSEQVE2H.js → 32B6ZVYG.js} +1 -1
  3. package/dist/cdn/{L77BTGXY.js → 3RPE2QMJ.js} +1 -1
  4. package/dist/cdn/{4RZPOYZ7.js → 3X7JLPXS.js} +1 -1
  5. package/dist/cdn/53TGCGSX.js +18 -0
  6. package/dist/cdn/{JEIMRNYM.js → 7GE723EX.js} +1 -1
  7. package/dist/cdn/{S27EJSLC.js → B7W5WD4R.js} +1 -1
  8. package/dist/cdn/BLKXZEPZ.js +56 -0
  9. package/dist/cdn/{IGZWQJW7.js → D36UDLAY.js} +1 -1
  10. package/dist/cdn/{7IFCBXV7.js → DFF2LGQI.js} +1 -1
  11. package/dist/cdn/{YRBANNQ5.js → E2JBQWHX.js} +1 -1
  12. package/dist/cdn/{O7TGCM5P.js → EJ2LRQVR.js} +1 -1
  13. package/dist/cdn/{Q73PK7Q7.js → FDPJ5Y3M.js} +1 -1
  14. package/dist/cdn/FK7ENS6I.js +2 -0
  15. package/dist/cdn/{CIW3QMKV.js → FNFJYOHX.js} +1 -1
  16. package/dist/cdn/{2NMR43NW.js → GJHBXGNP.js} +1 -1
  17. package/dist/cdn/HW2FV2RU.js +48 -0
  18. package/dist/cdn/{XVQJBUMY.js → I4A2LAZS.js} +1 -1
  19. package/dist/cdn/{O3F47IO5.js → I5QIEV37.js} +1 -1
  20. package/dist/cdn/{YYY7HKYX.js → IBKTXP76.js} +1 -1
  21. package/dist/cdn/MU52B4SV.js +181 -0
  22. package/dist/cdn/{SMADRJ67.js → NV2KTZTO.js} +1 -1
  23. package/dist/cdn/ON5PWODA.js +208 -0
  24. package/dist/cdn/{IXAKT6L3.js → P22UEKRX.js} +1 -1
  25. package/dist/cdn/PA5W5PWE.js +2 -0
  26. package/dist/cdn/{WAVKMZA6.js → QA7IATZC.js} +1 -1
  27. package/dist/cdn/{IC5P5NYY.js → QJJ6YSAC.js} +1 -1
  28. package/dist/cdn/{HOCTVCHH.js → RHM3WKYV.js} +1 -1
  29. package/dist/cdn/{E7TMP4YV.js → SHFSDORL.js} +1 -1
  30. package/dist/cdn/{AMVOJNWN.js → TIEV263K.js} +1 -1
  31. package/dist/cdn/{HXOSLGWU.js → TKSWXCCJ.js} +1 -1
  32. package/dist/cdn/{AFLQZIKS.js → VAX3IAC3.js} +31 -31
  33. package/dist/cdn/{WDE3HN7K.js → XHJTT7BG.js} +1 -1
  34. package/dist/cdn/XNITXZDU.js +2 -0
  35. package/dist/cdn/{C7E7MJSR.js → XXIKORXX.js} +1 -1
  36. package/dist/cdn/{HBYZSLEZ.js → Y7KEZCVG.js} +1 -1
  37. package/dist/cdn/agent-utils/index.js +1 -1
  38. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -1
  39. package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
  40. package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
  41. package/dist/cdn/index.js +1 -1
  42. package/dist/docs/api.json +1 -1
  43. package/dist/docs/docs.json +1 -1
  44. package/dist/docs/web-types.json +1 -1
  45. package/package.json +9 -9
  46. package/dist/cdn/6LZ6GOHF.js +0 -56
  47. package/dist/cdn/CJIV4KJZ.js +0 -179
  48. package/dist/cdn/CVHJMR5X.js +0 -2
  49. package/dist/cdn/EBRNMPPO.js +0 -48
  50. package/dist/cdn/IKEF7ZHH.js +0 -181
  51. package/dist/cdn/LODKJRS4.js +0 -2
  52. package/dist/cdn/PKHQW7QU.js +0 -18
  53. package/dist/cdn/VKU4WAQV.js +0 -2
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{_ as h,a as E,b as y,ta as k}from"./CJIV4KJZ.js";var j=new Set(["agentExecutionContext","outputMessage","summary","status"]);function x(){return{assignedTask:"",messages:[],priorSteps:[],sharedState:{},userRequest:""}}function O(r){let o=[...new Set([...r].filter(n=>j.has(n)))];if(o.length!==0)throw new Error(`custom state cannot define reserved runtime fields: ${o.join(", ")}.`)}function S(r){let o=Object.entries(r);return Object.fromEntries(o.map(([n,t])=>[n,h({reducer:(i,g)=>g,default:()=>t})]))}function $(r={}){O(Object.keys(r));let o=S(r);return h.Root({...o,agentExecutionContext:h({reducer:(n,t)=>({...n,...t}),default:x}),outputMessage:h({reducer:(n="",t)=>typeof t=="string"&&t.trim()?t:n,default:()=>""}),summary:h({reducer:(n="",t)=>typeof t=="string"?t:n,default:()=>""}),status:h({reducer:(n,t)=>t??n,default:()=>{}})})}function M(r){let o=new Set;for(let t of r)for(let i of Object.keys(t.shape??{}))o.add(i);let n=Object.fromEntries([...o].map(t=>[t,void 0]));return $(n)}function T(r,o,n,t={}){let{agent:i,entryNode:g,middlewares:c=[]}=t,a=new k(n);if(Object.keys(r).length===0)throw new Error("Graph requires at least one node.");if(o.length===0)throw new Error("Graph requires at least one edge.");if(c.length>0&&!i)throw new Error("Graph middleware requires agent metadata.");let s=new Set(Object.keys(r)),l=new Map,w=new Map;for(let e of s)l.set(e,0),w.set(e,0);for(let e of o)"to"in e?(s.has(e.from)&&w.set(e.from,(w.get(e.from)??0)+1),s.has(e.to)&&l.set(e.to,(l.get(e.to)??0)+1)):s.has(e.from)&&w.set(e.from,(w.get(e.from)??0)+1);for(let[e,f]of Object.entries(r)){let u=N(i,e,c,async(d,p)=>await Promise.resolve(f(d,p))),m=async(d,p)=>await u(d,p);a=a.addNode(e,m)}for(let e of o)if("to"in e){let f=e.from,u=e.to;if(!s.has(f))throw new Error(`Graph edge references unknown from-node: ${f}`);if(!s.has(u))throw new Error(`Graph edge references unknown to-node: ${u}`);a.addEdge(f,u)}else{let f=e.from;if(!s.has(f))throw new Error(`Graph conditional edge references unknown from-node: ${f}`);a.addConditionalEdges(f,async(u,m)=>{let d=await e.decide(u,m);if(!d)return y;if(!s.has(d))throw new Error(`Graph conditional edge returned unknown node: ${d}`);return d})}let G=q(s,l,g);a.addEdge(E,G);let b=[...s].filter(e=>(w.get(e)??0)===0);for(let e of b)a.addEdge(e,y);return a}function N(r,o,n,t){return!n.length||!r?t:async(i,g)=>await n.reduceRight((c,a)=>async s=>await a.handler(s,c),async c=>{let a=await t(c.state,c.config);return{...c.state,...a}})({agent:r,config:g,nodeName:o,state:i})}function q(r,o,n){if(n){if(!r.has(n))throw new Error(`Graph entry node references unknown node: ${n}`);return n}let t=[...r].filter(i=>(o.get(i)??0)===0);if(t.length!==1)throw new Error(`Graph could not infer a single entry node (found ${t.length}). Provide an explicit entryNode or ensure exactly one node has no incoming edges.`);return t[0]}export{$ as a,M as b,T as c};