@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.
- package/dist/cdn/{KRE4U7V7.js → 2K3FTW7J.js} +1 -1
- package/dist/cdn/{TSEQVE2H.js → 32B6ZVYG.js} +1 -1
- package/dist/cdn/{L77BTGXY.js → 3RPE2QMJ.js} +1 -1
- package/dist/cdn/{4RZPOYZ7.js → 3X7JLPXS.js} +1 -1
- package/dist/cdn/53TGCGSX.js +18 -0
- package/dist/cdn/{JEIMRNYM.js → 7GE723EX.js} +1 -1
- package/dist/cdn/{S27EJSLC.js → B7W5WD4R.js} +1 -1
- package/dist/cdn/BLKXZEPZ.js +56 -0
- package/dist/cdn/{IGZWQJW7.js → D36UDLAY.js} +1 -1
- package/dist/cdn/{7IFCBXV7.js → DFF2LGQI.js} +1 -1
- package/dist/cdn/{YRBANNQ5.js → E2JBQWHX.js} +1 -1
- package/dist/cdn/{O7TGCM5P.js → EJ2LRQVR.js} +1 -1
- package/dist/cdn/{Q73PK7Q7.js → FDPJ5Y3M.js} +1 -1
- package/dist/cdn/FK7ENS6I.js +2 -0
- package/dist/cdn/{CIW3QMKV.js → FNFJYOHX.js} +1 -1
- package/dist/cdn/{2NMR43NW.js → GJHBXGNP.js} +1 -1
- package/dist/cdn/HW2FV2RU.js +48 -0
- package/dist/cdn/{XVQJBUMY.js → I4A2LAZS.js} +1 -1
- package/dist/cdn/{O3F47IO5.js → I5QIEV37.js} +1 -1
- package/dist/cdn/{YYY7HKYX.js → IBKTXP76.js} +1 -1
- package/dist/cdn/MU52B4SV.js +181 -0
- package/dist/cdn/{SMADRJ67.js → NV2KTZTO.js} +1 -1
- package/dist/cdn/ON5PWODA.js +208 -0
- package/dist/cdn/{IXAKT6L3.js → P22UEKRX.js} +1 -1
- package/dist/cdn/PA5W5PWE.js +2 -0
- package/dist/cdn/{WAVKMZA6.js → QA7IATZC.js} +1 -1
- package/dist/cdn/{IC5P5NYY.js → QJJ6YSAC.js} +1 -1
- package/dist/cdn/{HOCTVCHH.js → RHM3WKYV.js} +1 -1
- package/dist/cdn/{E7TMP4YV.js → SHFSDORL.js} +1 -1
- package/dist/cdn/{AMVOJNWN.js → TIEV263K.js} +1 -1
- package/dist/cdn/{HXOSLGWU.js → TKSWXCCJ.js} +1 -1
- package/dist/cdn/{AFLQZIKS.js → VAX3IAC3.js} +31 -31
- package/dist/cdn/{WDE3HN7K.js → XHJTT7BG.js} +1 -1
- package/dist/cdn/XNITXZDU.js +2 -0
- package/dist/cdn/{C7E7MJSR.js → XXIKORXX.js} +1 -1
- package/dist/cdn/{HBYZSLEZ.js → Y7KEZCVG.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
- package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +9 -9
- package/dist/cdn/6LZ6GOHF.js +0 -56
- package/dist/cdn/CJIV4KJZ.js +0 -179
- package/dist/cdn/CVHJMR5X.js +0 -2
- package/dist/cdn/EBRNMPPO.js +0 -48
- package/dist/cdn/IKEF7ZHH.js +0 -181
- package/dist/cdn/LODKJRS4.js +0 -2
- package/dist/cdn/PKHQW7QU.js +0 -18
- package/dist/cdn/VKU4WAQV.js +0 -2
package/dist/cdn/LODKJRS4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{Z as c}from"./IKEF7ZHH.js";function f(e,s,t){return{...e,status:s,summary:t}}function g(e){let s=Object.entries(e).filter(([t,n])=>t!=="agentExecutionContext"&&t!=="outputMessage"&&t!=="summary"&&t!=="status"&&n!==void 0);if(s.length!==0)try{return JSON.stringify(Object.fromEntries(s),null,2)}catch{return}}function m(e,s,t=[]){let n=s.safeParse(e);if(n.success){let u={...n.data},r=g(u),a=r??"LLMAgent produced structured output.",o=r??u.outputMessage,i={...u,...o?{outputMessage:o}:{},agentExecutionContext:{messages:[...t,new c(typeof o=="string"&&o.trim()?o:a)]}};return f(i,"success",a)}else throw new Error(`LLMAgent output schema validation failed: ${n.error.message}`)}function l(e,s){let t={outputMessage:e.outputMessage};if(s){let n=s.shape,u=e;for(let r of Object.keys(n??{}))r in e&&(t[r]=u[r])}return t}export{f as a,m as b,l as c};
|
package/dist/cdn/PKHQW7QU.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import c from"./HOCTVCHH.js";import b from"./AFLQZIKS.js";import a from"./EBRNMPPO.js";import{a as n}from"./4RZPOYZ7.js";import{a as I,b as S,ta as N}from"./CJIV4KJZ.js";import{Z as $}from"./IKEF7ZHH.js";export default $arcgis.t(([,,,,,,P,U,{p:k,r:T},{C:M,D:z,E:L,F:D,G:F,H:O,a:A,m:w,n:R,o:y,p:V},b])=>{var W=async(e,t)=>(await n({text:"Exiting Data Exploration agent"},t),e),B=async(e,t)=>{await n({text:"Requesting LLM for layer filter results"},t);let a=await w("data_explore_filter_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer filter tools");let{userTimezone:d,userTimezoneOffset:o}=L(),s={layerFieldInfo:e.layerFieldInfo,userTimezone:d,userTimezoneOffset:o,queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},i=await T({promptText:a,modelTier:"advanced",config:t,messages:e.dataExplorationMessages,inputVariables:s,tools:F}),r=[...e.dataExplorationMessages,i];if(!((i.tool_calls?.length??0)>0))return await n({text:"LLM determined no filter changes needed"},t),{...e,dataExplorationMessages:r};let c=r,l=i.content.toString();return await b(i,t),{...e,dataExplorationMessages:c,outputMessage:l}},H=async(e,t)=>{await n({text:"Requesting LLM for layer query results"},t);let a=await w("data_explore_query_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer query tools");let{userTimezone:d,userTimezoneOffset:o}=L(),s=e.agentExecutionContext.sharedState,i=s.lastNavigatedFeatures?.value,r=s.lastResolvedLocation?.value,c="none";if(i!=null)try{c=JSON.stringify(i)}catch{c="none"}let l="none";if(r!=null)try{l=JSON.stringify({address:r.address,location:r.location})}catch{l="none"}let g={layerFieldInfo:e.layerFieldInfo,userTimezone:d,userTimezoneOffset:o,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,lastNavigatedFeatures:c,lastResolvedLocation:l},m=await T({promptText:a,modelTier:"advanced",config:t,messages:e.dataExplorationMessages,inputVariables:g,tools:D}),h=(m.tool_calls?.length??0)>0,f=m.content.toString();return await b(m,t),{...e,dataExplorationMessages:[...e.dataExplorationMessages,m],...h?{}:{outputMessage:f},status:"success",summary:f&&!h?R(f):"Query planning completed."}},J=async(e,t)=>{try{await n({text:"Requesting LLM for summary on query results"},t);let a=await w("summarize_query_response_prompt"),d={queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},o=await k({promptText:a,modelTier:"fast",config:t,messages:e.dataExplorationMessages,inputVariables:d}),s=typeof o=="string"?o:o.content,i=new $(s);await n({text:`Received response from LLM: ${s}`},t);let r=s;return{...e,outputMessage:r,status:"success",summary:r?R(r):"Summary generated.",dataExplorationMessages:[...e.dataExplorationMessages,i]}}catch(a){throw await n({text:"Error during filter LLM request"},t),new Error(`Error during filter LLM request: ${a instanceof Error?a.message:String(a)}`)}};async function K(e,t){if((e.queryResponse??[]).some(d=>{let o=d.details;return typeof o=="object"&&o!==null&&"error"in o}))return await n({text:"Skipping layer filter tool because query response contains an error."},t),{...e};let a=await new A(F,{handleToolErrors:!1}).invoke({messages:e.dataExplorationMessages},t);return await n({text:`Finished executing layer filter tool: ${a.messages.map(d=>d.content).join(", ")}`},t),{...e}}var X=10,Y=["string","small-integer","integer"],Z=async(e,t,{includeSummaryStatistics:a=!0,includeUniqueValues:d=!0}={})=>{let o=null,s=null;try{if(t.type!=="geometry"&&t.type!=="oid"&&t.type!=="global-id"){a&&(o=await P({layer:e,field:t.name}));let i=t.domain?.type==="coded-value"?t.domain:null;d&&(Y.includes(t.type)||i)&&(s=(await U({layer:e,field:t.name})).uniqueValueInfos.sort((r,c)=>c.count-r.count).slice(0,X),i&&(s=s.map(r=>({...r,value:i.getName(r.value)??r.value}))))}}catch(i){console.error(`Error fetching statistics for field ${t.name}:`,i)}return{summaryStatistics:o,uniqueValues:s}};function ee(e,t){return["string","small-integer","integer"].includes(e)||t==="coded-value"}async function te(e,t,a,d=!0){let o=[],s=[],i=[];for(let r of e){let c=function(p){let u=t.get(p)?.layerItem;return u?[u.name&&`Name: ${u.name}`,u.title&&`Title: ${u.title}`,u.description&&`Description: ${u.description}`].filter(Boolean).join(" | "):p},{layerId:l,results:g}=r,m=a.map?.allLayers.find(p=>p.id===l),h=t.get(l)?.fieldRegistry;if(!h)continue;let f=o.find(p=>p.layerId===l);f||(f={layerId:l,layerSummary:c(l),fieldInfos:[]},o.push(f));for(let p of g){let u=h.get(p.name);if(!u)continue;let x=u.statistics,v=d&&!x?.summaryStatistics,q=ee(u.type,u.domain?.type)&&!x?.uniqueValues,_=v||q;if(i.push({layerId:l,fieldName:u.name,didFetchStatistics:_}),_){let G=Z(m,u,{includeSummaryStatistics:v,includeUniqueValues:q}).then(C=>{let E={summaryStatistics:x?.summaryStatistics??null,uniqueValues:x?.uniqueValues??null};v&&(E.summaryStatistics=C.summaryStatistics),q&&(E.uniqueValues=C.uniqueValues),h.set(u.name,{...u,statistics:E}),u.statistics=E});s.push(G)}f.fieldInfos.push(u)}}return await Promise.all(s),{layerFieldInfo:o,didFetchStatistics:s.length>0,fieldStatisticsFetchStatus:i}}var j=/\b(average|avg|mean|median|max(?:imum)?|min(?:imum)?|sum|total|count|std(?:dev|\s*deviation)|variance|null\s*count|missing\s*values?|range)\b/iu;function ae(e,t){return j.test(e)||j.test(t)}var se=async(e,t)=>{try{await n({text:"Preparing field information for vector search results"},t);let a=y(t,"layersAndFieldsRegistry"),{mapView:d}=z(t),{assignedTask:o,userRequest:s}=e.agentExecutionContext,i=ae(o,s),{layerFieldInfo:r,didFetchStatistics:c,fieldStatisticsFetchStatus:l}=await te(e.vectorSearchFieldResults,a,d,i);c?await n({text:"Statistics fetched"},t):await n({text:"Statistics skipped"},t);for(let g of l)await n({text:` - ${g.fieldName} - stats ${g.didFetchStatistics?"fetched":"skipped"}`},t);return await n({text:"Field information prepared"},t),{...e,layerFieldInfo:r}}catch(a){throw await n({text:"Error during fetching statistics"},t),new Error(`Error during fetching statistics: ${a instanceof Error?a.message:String(a)}`)}},Q=.7,re=10,ie=async(e,t)=>{try{await n({text:"Similarity search to find fields"},t);let a=y(t,"fieldSearch"),d=y(t,"layersAndFieldsRegistry"),o=y(t,"embeddingCache"),s=await a.searchFields({text:e.agentExecutionContext.assignedTask,layerIds:e.vectorSearchLayerIds,minScore:Q,topResults:re,embeddingCache:o}),i=s.map(({layerId:c,results:l})=>{let g=l.map(m=>` - ${m.name} (${m.score.toFixed(2)})`).join(`
|
|
3
|
-
`);return`${d.get(c)?.layerItem.name??c}:
|
|
4
|
-
${g}`}).join(`
|
|
5
|
-
`),r;return s.length>0?r=`Vector search completed. Matching layers and fields with scores:
|
|
6
|
-
${i}`:r=`No vector search results found for score over ${Q}.`,await n({text:r},t),{...e,vectorSearchFieldResults:s}}catch(a){throw await n({text:`Error during vector search: ${a instanceof Error?a.message:String(a)}`},t),new Error(`Vector search failed: ${a instanceof Error?a.message:String(a)}`)}},oe=.7,ne=async(e,t)=>{try{await n({text:`Similarity search to find layers: ${e.agentExecutionContext.assignedTask}`},t);let a=y(t,"layerSearch"),d=y(t,"layersAndFieldsRegistry"),o=y(t,"embeddingCache"),s=await a.searchLayers({text:e.agentExecutionContext.assignedTask,minScore:oe,embeddingCache:o}),i=s.map(l=>l.id),r=s.map(({id:l,score:g})=>`${d.get(l)?.layerItem.name??l} (${g.toFixed(2)})`).join(`
|
|
7
|
-
`),c;return i.length>0?c=`Vector search completed. Matching layers with scores:
|
|
8
|
-
${r}`:c="Vector search completed. No matching layers found.",await n({text:c},t),{...e,vectorSearchLayerIds:i}}catch(a){throw await n({text:`Error during vector search: ${a instanceof Error?a.message:String(a)}`},t),new Error(`Vector search failed: ${a instanceof Error?a.message:String(a)}`)}},le=(e,t)=>V(["layerSearch","fieldSearch","layersAndFieldsRegistry"],"Data Exploration Agent")(e,t),de=()=>new N(M).addNode("requireDataExplorationServices",le).addNode("vectorSearchLayers",ne).addNode("vectorSearchFields",ie).addNode("fieldStatistics",se).addNode("queryAgent",H).addNode("queryTools",O).addNode("summarizeQueryResponseLLM",J).addNode("filterAgent",B).addNode("filterTools",K).addNode("earlyExit",W).addEdge(I,"requireDataExplorationServices").addEdge("requireDataExplorationServices","vectorSearchLayers").addConditionalEdges("vectorSearchLayers",e=>e.vectorSearchLayerIds.length?"vectorSearchFields":"earlyExit").addConditionalEdges("vectorSearchFields",e=>e.vectorSearchFieldResults.length?"fieldStatistics":"earlyExit").addEdge("fieldStatistics","queryAgent").addConditionalEdges("queryAgent",e=>(e.dataExplorationMessages[e.dataExplorationMessages.length-1]?.tool_calls?.length??0)>0?"queryTools":"filterAgent").addConditionalEdges("queryTools",e=>e.queryResponse.length?"summarizeQueryResponseLLM":"filterAgent").addEdge("summarizeQueryResponseLLM","filterAgent").addConditionalEdges("filterAgent",e=>(e.dataExplorationMessages[e.dataExplorationMessages.length-1]?.tool_calls?.length??0)>0?"filterTools":S).addEdge("filterTools",S).addEdge("earlyExit",S),ce=String.raw`- **data exploration** — User is asking about the feature layer’s data (e.g. counts, summaries, statistics, field values), either for all features, a subset based on a condition, or for a subset based on the current view. And/Or user wants to include or exclude features based on field values, or visually style features differently (e.g., highlight or deemphasize them).
|
|
9
|
-
The Data Exploration Agent will automatically zoom to the affected features for action taken by this agent. In this case, no need to call navigation tool separately.
|
|
10
|
-
_Example: “Only show stations where Brand is Shell”_
|
|
11
|
-
_Example: “Make Shell stations stand out on the map”_
|
|
12
|
-
_Example: “Gray out all stations that aren’t Shell”_
|
|
13
|
-
This also includes questions that ask which feature meets a given condition or where a particular feature in the data is located (e.g., “Where is the spring with the highest elevation?”). However, this agent does not handle addresses.
|
|
14
|
-
_Example: “How many features are there?”_
|
|
15
|
-
_Example: “What’s the average population?”_
|
|
16
|
-
_Example: “Which values are in the status field?”_
|
|
17
|
-
|
|
18
|
-
This agent does NOT handle help/metadata requests such as listing available layers, listing field names/columns/attributes for a layer, or capability guidance.`,Fe={id:"dataExploration",name:"Data Exploration Agent",description:ce,createGraph:de,workspace:M};return Fe},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues",a,b,c)
|
package/dist/cdn/VKU4WAQV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{$ as M,A as z,Aa as ia,B as A,Ba as ja,C as B,Ca as ka,Da as la,R as C,S as D,T as E,U as F,V as G,W as H,X as I,Y as J,Z as K,_ as L,a,aa as N,b,ba as O,c,ca as P,d,da as Q,e,f,fa as R,ga as S,h as g,ha as T,i as h,ia as U,j as i,ja as V,k as j,ka as W,l as k,la as X,m as l,ma as Y,n as m,na as Z,o as n,oa as _,p as o,pa as $,q as p,qa as aa,r as q,s as r,t as s,ta as ba,u as t,ua as ca,v as u,va as da,w as v,wa as ea,x as w,xa as fa,y as x,ya as ga,z as y,za as ha}from"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export{L as Annotation,H as AsyncBatchedStore,J as BaseChannel,E as BaseCheckpointSaver,k as BaseLangGraphError,G as BaseStore,K as BinaryOperatorAggregate,d as COMMAND_SYMBOL,i as Command,e as CommandInstance,ca as CompiledStateGraph,b as END,v as EmptyChannelError,u as EmptyInputError,R as Graph,l as GraphBubbleUp,o as GraphInterrupt,m as GraphRecursionError,n as GraphValueError,c as INTERRUPT,I as InMemoryStore,w as InvalidUpdateError,F as MemorySaver,da as MessageGraph,ia as MessagesAnnotation,aa as MessagesValue,ja as MessagesZodMeta,ka as MessagesZodState,x as MultipleSubgraphsError,p as NodeInterrupt,g as Overwrite,q as ParentCommand,_ as REMOVE_ALL_MESSAGES,X as ReducedValue,z as RemoteException,a as START,f as Send,ba as StateGraph,A as StateGraphInputError,Z as StateSchema,y as UnreachableNodeError,Y as UntrackedValue,W as UntrackedValueChannel,$ as addMessages,D as copyCheckpoint,C as emptyCheckpoint,ga as entrypoint,O as getConfig,P as getCurrentTaskInput,U as getJsonSchemaFromSchema,ha as getPreviousState,V as getSchemaDefaultGetter,M as getStore,B as getSubgraphsSeenSet,N as getWriter,Q as interrupt,j as isCommand,s as isGraphBubbleUp,t as isGraphInterrupt,h as isInterrupted,r as isParentCommand,T as isSerializableSchema,S as isStandardSchema,$ as messagesStateReducer,ea as pushMessage,fa as task,la as writer};
|