@arcgis/ai-components 5.2.0-next.104 → 5.2.0-next.106
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/agent-utils/LLMAgent.js +41 -40
- package/dist/agent-utils/middlewares/trace.js +5 -5
- package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
- package/dist/agents/runtime/skill/createSkillAgent.js +262 -0
- package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
- package/dist/agents/runtime/skill/types.d.ts +28 -0
- package/dist/agents/runtime/skill/types.js +2 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +20 -19
- package/dist/agents/tools/query/getStatistics/adapter.js +4 -3
- package/dist/agents/tools/query/getTopFeatures/adapter.js +4 -3
- package/dist/agents/tools/query/queryFeatures/adapter.js +4 -3
- package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
- package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
- package/dist/agents/tools/shared/types.d.ts +22 -0
- package/dist/agents/tools/shared/types.js +6 -0
- package/dist/cdn/23C34FEU.js +2 -0
- package/dist/cdn/{NZSOJ726.js → 2AMUOR7X.js} +1 -1
- package/dist/cdn/2OHRNRNT.js +2 -0
- package/dist/cdn/2OUIRKTV.js +2 -0
- package/dist/cdn/2S6L3P4Q.js +2 -0
- package/dist/cdn/{C4FEETBZ.js → 2W7LK4HA.js} +1 -1
- package/dist/cdn/3IOP64NG.js +2 -0
- package/dist/cdn/3OH35VXS.js +2 -0
- package/dist/cdn/{5K5ZY267.js → 3SD47V7G.js} +1 -1
- package/dist/cdn/{7VAQUCBU.js → 3VCPN2KW.js} +1 -1
- package/dist/cdn/{LLUGJKAQ.js → 3XDT7MWI.js} +1 -1
- package/dist/cdn/{Y7XD7ZRD.js → 4ALF2CJY.js} +1 -1
- package/dist/cdn/{HAEFC2SJ.js → 5LMYUEK7.js} +1 -1
- package/dist/cdn/{655YIKL3.js → 6GODC6RU.js} +2 -2
- package/dist/cdn/{7VUSIGEM.js → 6RAWG2KQ.js} +1 -1
- package/dist/cdn/{GCVB5VG4.js → 6YZGKVYB.js} +1 -1
- package/dist/cdn/{VLLZ2FFU.js → 725MBCQF.js} +1 -1
- package/dist/cdn/74CVYM72.js +19 -0
- package/dist/cdn/{CP5BVGJU.js → 7EOS4SGJ.js} +1 -1
- package/dist/cdn/{5WYRJMBW.js → 7QIX4PZR.js} +1 -1
- package/dist/cdn/7UF3WRLO.js +72 -0
- package/dist/cdn/A7BKHIMA.js +2 -0
- package/dist/cdn/AFSBL4ZP.js +2 -0
- package/dist/cdn/{FG647IP6.js → AGQ5ADFU.js} +1 -1
- package/dist/cdn/{5ZFUGNRN.js → BQYF37UD.js} +1 -1
- package/dist/cdn/{4RDNI22D.js → BTTBKTFM.js} +4 -4
- package/dist/cdn/BVSK2GWP.js +2 -0
- package/dist/cdn/CFAC4FN3.js +2 -0
- package/dist/cdn/{HDACNIZF.js → D5EKX26R.js} +1 -1
- package/dist/cdn/EGN5BCHV.js +2 -0
- package/dist/cdn/{BXQ4I5HB.js → EJJFG5DE.js} +2 -2
- package/dist/cdn/{ZDV4K4WG.js → EOD5PNOL.js} +1 -1
- package/dist/cdn/{OE3GW5LE.js → ES6D4UD6.js} +1 -1
- package/dist/cdn/{K2R6XVK3.js → HB72YIII.js} +1 -1
- package/dist/cdn/{G2EGT3CF.js → HHBNLCJP.js} +1 -1
- package/dist/cdn/HLN5675C.js +2 -0
- package/dist/cdn/IFFOSSNB.js +2 -0
- package/dist/cdn/IO7DYFL2.js +2 -0
- package/dist/cdn/{IBZ2NEAO.js → IRSJXHRN.js} +1 -1
- package/dist/cdn/JD2TB7H4.js +2 -0
- package/dist/cdn/{ANRQWYU2.js → JKKU4K4C.js} +1 -1
- package/dist/cdn/{FUF3NAU7.js → JMNHFKGL.js} +1 -1
- package/dist/cdn/{22KHSDJI.js → JWZD3D5E.js} +1 -1
- package/dist/cdn/{HKOGIZDQ.js → KJLLN4P4.js} +18 -18
- package/dist/cdn/KZ73TZOB.js +2 -0
- package/dist/cdn/LEO3USHH.js +2 -0
- package/dist/cdn/LNIMGXB4.js +2 -0
- package/dist/cdn/MG2W2ZF3.js +2 -0
- package/dist/cdn/{NYJYRCGA.js → MSXMHRI7.js} +1 -1
- package/dist/cdn/MXAZE2VM.js +179 -0
- package/dist/cdn/{EWLXNGKH.js → OL7QBAGS.js} +15 -15
- package/dist/cdn/OMF6ITSG.js +2 -0
- package/dist/cdn/{Z5W4V7RC.js → OOGADOKQ.js} +1 -1
- package/dist/cdn/{KITIP6J2.js → OZ2CM3J2.js} +1 -1
- package/dist/cdn/{6YYPVU7H.js → P4GFYBBO.js} +1 -1
- package/dist/cdn/PK5KI2XF.js +2 -0
- package/dist/cdn/PWFUEBTT.js +2 -0
- package/dist/cdn/{HHUQXL3R.js → PYGX4HN7.js} +1 -1
- package/dist/cdn/RFVZ7KCG.js +66 -0
- package/dist/cdn/{YEZ3AMNX.js → RLB6TK6B.js} +1 -1
- package/dist/cdn/{WKTQVBFJ.js → RN6WMVZX.js} +1 -1
- package/dist/cdn/{WJXXOKGA.js → ROQGPAR5.js} +1 -1
- package/dist/cdn/RSJSRETN.js +2 -0
- package/dist/cdn/RSR66KB4.js +2 -0
- package/dist/cdn/{7SRLZQVC.js → RZIXMISL.js} +1 -1
- package/dist/cdn/{VOKXKU7M.js → S4LELUBK.js} +9 -9
- package/dist/cdn/{AI6DYOKR.js → S627D4K7.js} +1 -1
- package/dist/cdn/SL4Y7IRG.js +2 -0
- package/dist/cdn/STUBN3L5.js +2 -0
- package/dist/cdn/T2OYKP3V.js +2 -0
- package/dist/cdn/{C4JT4S5E.js → TBYDZN4H.js} +1 -1
- package/dist/cdn/{HHFNQR6Z.js → TEI6WXW7.js} +1 -1
- package/dist/cdn/{WGO5SER7.js → TFRWUAB6.js} +1 -1
- package/dist/cdn/U3ETGDT7.js +2 -0
- package/dist/cdn/{KWD2ECTM.js → UAG6GDUG.js} +1 -1
- package/dist/cdn/UHICISBZ.js +2 -0
- package/dist/cdn/{NNXISHCA.js → VMZZR7MY.js} +2 -2
- package/dist/cdn/WW4BEFDF.js +2 -0
- package/dist/cdn/XGCQS3N4.js +2 -0
- package/dist/cdn/{R2PQVY4O.js → XKH37FLY.js} +1 -1
- package/dist/cdn/XQ3NBBQ3.js +2 -0
- package/dist/cdn/{7BCQMK6D.js → XTCLJEID.js} +1 -1
- package/dist/cdn/{J6SZIQJA.js → Y7LGFSHO.js} +1 -1
- package/dist/cdn/ZFOG3KXV.js +2 -0
- package/dist/cdn/ZZZB3GES.js +14 -0
- 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/chunks/SKILL.js +5 -0
- package/dist/chunks/SKILL2.js +5 -0
- package/dist/chunks/SKILL3.js +22 -0
- package/dist/chunks/SKILL4.js +5 -0
- package/dist/chunks/adapter.js +137 -140
- package/dist/chunks/aiFactory.js +94 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +14 -13
- package/dist/chunks/baseAgentState.js +2 -2
- package/dist/chunks/dataExplorationAgent.js +30 -0
- package/dist/chunks/generateLayerDescriptions.js +181 -268
- package/dist/chunks/helpAgent.js +37 -0
- package/dist/chunks/layerStylingGraph.js +91 -76
- package/dist/chunks/navigationAgent.js +40 -0
- package/dist/chunks/orchestrator.js +13 -12
- package/dist/chunks/requireAgentServices.js +11 -0
- package/dist/chunks/resolvePointGeometryFilter.js +11 -11
- package/dist/components/arcgis-assistant/customElement.d.ts +23 -3
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +17 -6
- package/dist/components/arcgis-assistant-help-agent/customElement.js +3 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +18 -7
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/orchestrator/models/types.d.ts +1 -0
- package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
- package/dist/orchestrator/registry/agentRegistry.d.ts +33 -0
- package/dist/orchestrator/types/types.d.ts +17 -0
- package/dist/utils/index.d.ts +13 -3
- package/dist/utils/index.js +706 -82
- package/package.json +10 -6
- package/dist/cdn/2EY3BQQX.js +0 -2
- package/dist/cdn/2NDBI2VA.js +0 -156
- package/dist/cdn/4OGR5QKS.js +0 -2
- package/dist/cdn/5FL5BTTX.js +0 -66
- package/dist/cdn/5X7EG7D2.js +0 -2
- package/dist/cdn/6FCU2KJP.js +0 -2
- package/dist/cdn/7BJ4JKLG.js +0 -2
- package/dist/cdn/7HS5KX3J.js +0 -2
- package/dist/cdn/7UUYJTKT.js +0 -2
- package/dist/cdn/7V6OSTFC.js +0 -2
- package/dist/cdn/7VYYQ7BT.js +0 -2
- package/dist/cdn/ACJTJLZN.js +0 -2
- package/dist/cdn/AKD5UOVX.js +0 -2
- package/dist/cdn/C7LGDNB3.js +0 -14
- package/dist/cdn/CGJINV7H.js +0 -2
- package/dist/cdn/CJMUJXPL.js +0 -2
- package/dist/cdn/D2SS763Z.js +0 -2
- package/dist/cdn/FJO4KNOZ.js +0 -2
- package/dist/cdn/G3SF6U2U.js +0 -2
- package/dist/cdn/G6CR7JVM.js +0 -22
- package/dist/cdn/GL7BPKBN.js +0 -2
- package/dist/cdn/JO5ETMPS.js +0 -2
- package/dist/cdn/PUHRBGKB.js +0 -2
- package/dist/cdn/Q57QWN5W.js +0 -2
- package/dist/cdn/QUKNPVAF.js +0 -2
- package/dist/cdn/RBE55SWR.js +0 -2
- package/dist/cdn/SWH6ZHD4.js +0 -18
- package/dist/cdn/SZ2QSSB3.js +0 -2
- package/dist/cdn/T4RIGOXB.js +0 -2
- package/dist/cdn/W4JQDITQ.js +0 -36
- package/dist/cdn/XX6GHMNR.js +0 -2
- package/dist/cdn/YLVJA4ZE.js +0 -2
- package/dist/cdn/ZOEMBHRF.js +0 -2
- package/dist/cdn/ZRVZMPFN.js +0 -2
- package/dist/chunks/dataExplorationGraph.js +0 -254
- package/dist/chunks/helpGraph.js +0 -133
- package/dist/chunks/navigationGraph.js +0 -290
- package/dist/chunks/toolCallResponse.js +0 -33
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as A}from"./XQ3NBBQ3.js";import b from"./MXAZE2VM.js";import{a as y}from"./FDOMMK2M.js";import a from"./KJLLN4P4.js";import{a as i}from"./3VCPN2KW.js";import{J as f,Ya as S,r as u,s as p}from"./OL7QBAGS.js";export default $arcgis.t(([,,,,,,{p:x},{b:w,d:E,j:I,k:L,l:v,m:F,n:$,o:C,p:N,q:R,r:T,s:_,t:b,u:h}])=>{var M=async(t,a)=>{let e=t.tool_calls??[];if(e.length===0){await i({text:`LLM did not request any tool calls: ${String(t?.content)}`},a);return}await Promise.all(e.map(async r=>await i({text:`LLM invoked ${r.name} tool with arguments: ${JSON.stringify(r.args,null,2)}`},a)))},k=.7,P=10,z=async(t,a)=>{try{await i({text:"Similarity search to find fields"},a);let e=y(a,"fieldSearch"),r=y(a,"layersAndFieldsRegistry"),n=y(a,"embeddingCache"),o=await e.searchFields({text:t.agentExecutionContext.assignedTask,layerIds:t.vectorSearchLayerIds,minScore:k,topResults:P,embeddingCache:n}),m=o.map(({layerId:c,results:d})=>{let g=d.map(s=>` - ${s.name} (${s.score.toFixed(2)})`).join(`
|
|
3
|
+
`);return`${r.get(c)?.layerItem.name??c}:
|
|
4
|
+
${g}`}).join(`
|
|
5
|
+
`),l;return o.length>0?l=`Vector search completed. Matching layers and fields with scores:
|
|
6
|
+
${m}`:l=`No vector search results found for score over ${k}.`,await i({text:l},a),{...t,vectorSearchFieldResults:o}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},a),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},D=.7,G=async(t,a)=>{try{await i({text:`Similarity search to find layers: ${t.agentExecutionContext.assignedTask}`},a);let e=y(a,"layerSearch"),r=y(a,"layersAndFieldsRegistry"),n=await e.searchLayers({text:t.agentExecutionContext.assignedTask,minScore:D}),o=n.map(c=>c.id),m=n.map(({id:c,score:d})=>`${r.get(c)?.layerItem.name??c} (${d.toFixed(2)})`).join(`
|
|
7
|
+
`),l;return o.length>0?l=`Vector search completed. Matching layers with scores:
|
|
8
|
+
${m}`:l="Vector search completed. No matching layers found.",await i({text:l},a),{...t,vectorSearchLayerIds:o}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},a),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},j=[I,L,v,F,$,C,N,R,T,_,b],V=(t,a=3)=>{let e=t.map((n,o)=>n.type==="human"?o:-1).filter(n=>n!==-1);if(e.length===0)return[];let r=e.length>a?e[e.length-a]:e[0];return t.slice(r)},H=async(t,a)=>{await i({text:"Requesting LLM for layer query results"},a);let e=await E("navigation_intent_prompt");if(!a?.configurable)throw new Error("config.configurable is required for layer query tools");let r={layerFieldInfo:t.layerFieldInfo},n=await x({promptText:e,modelTier:"advanced",config:a,messages:V(t.agentExecutionContext.messages),inputVariables:r,tools:j});return await M(n,a),{...t,agentExecutionContext:{...t.agentExecutionContext,messages:[...t.agentExecutionContext.messages,n]}}};async function B(t,a){let e=await new w(j,{handleToolErrors:!1}).invoke({messages:V(t.agentExecutionContext.messages)},a),r=e.messages.map(o=>o.text).join(`
|
|
9
|
+
`);await i({text:`Finished executing layer filter tool: ${r}`},a);let n=e.messages.map(o=>o.text).join(`
|
|
10
|
+
`);return{...t,outputMessage:n}}var J=async(t,a)=>(await i({text:"Exiting Layer Styling agent"},a),t),O=async(t,a)=>{try{await i({text:"Populating layer and field info"},a);let e=[];for(let r of t.vectorSearchFieldResults){let n=function(g){let s=l.get(g)?.layerItem;return s?[s.name&&`Name: ${s.name}`,s.title&&`Title: ${s.title}`,s.description&&`Description: ${s.description}`].filter(Boolean).join(" | "):g},{layerId:o,results:m}=r,l=y(a,"layersAndFieldsRegistry"),c=l.get(o)?.fieldRegistry;if(!c)continue;let d=e.find(g=>g.layerId===o);d||(d={layerId:o,layerSummary:n(o),fieldInfos:[]},e.push(d));for(let g of m){let s=c.get(g.name);s&&d.fieldInfos.push(s)}}return await i({text:"Populated layerFieldInfo"},a),{...t,layerFieldInfo:e}}catch(e){throw await i({text:"Error populating layerFieldInfo"},a),new Error(`Error populating layerFieldInfo: ${e instanceof Error?e.message:String(e)}`)}},U=(t,a)=>{let e=t.vectorSearchLayerIds??[];if(e.length<=1)return{...t,selectedLayerId:t.vectorSearchLayerIds[0]};let{hitlResponse:r}=a.configurable;if(r?.agentId!==q.id||r.id!=="reviewLayerSelection"){let o={agentId:q.id,id:"reviewLayerSelection",kind:"singleSelection",message:"Choose a layer to apply the styles.",metadata:[...e]};throw new f(o)}let n=null;return Array.isArray(r.payload)&&r.payload.length>0&&(n=r.payload[0]),{...t,selectedLayerId:n??t.vectorSearchLayerIds[0]}},K=(t,a)=>A(["layerSearch","fieldSearch","layersAndFieldsRegistry"],"Layer Styling Agent")(t,a),Q=()=>new S(h).addNode("requireLayerStylingServices",K).addNode("vectorSearchLayers",G).addNode("layerSelectionHITL",U).addNode("vectorSearchFields",z).addNode("populateLayerFieldInfo",O).addNode("agent",H).addNode("tools",B).addNode("earlyExit",J).addEdge(u,"requireLayerStylingServices").addEdge("requireLayerStylingServices","vectorSearchLayers").addConditionalEdges("layerSelectionHITL",t=>t.vectorSearchLayerIds.length?"vectorSearchFields":"earlyExit").addConditionalEdges("vectorSearchFields",t=>t.vectorSearchFieldResults.length?"populateLayerFieldInfo":"earlyExit").addEdge("populateLayerFieldInfo","agent").addEdge("agent","tools").addEdge("tools",p).addEdge("earlyExit",p),W=String.raw`- **layerStyling** — User wants to change how features are drawn or styled on the map based on their data, such as applying color, size, transparency, symbols, or charts according to field values.
|
|
11
|
+
_Example: “Color points by sales amount”_
|
|
12
|
+
_Example: “Show population density with a color gradient”_
|
|
13
|
+
_Example: “Create a relationship map between height and depth”_
|
|
14
|
+
_Example: “Vary circle sizes according to population”_`,q={id:"layerStyling",name:"Layer Styling Agent",description:W,createGraph:Q,workspace:h};return{a:M,b:q}},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../UZLQALHY.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../APFZY4PI.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../
|
|
2
|
+
import"../UZLQALHY.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../APFZY4PI.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../7UF3WRLO.js");let o=await y;return await(await r(o,"sendUXSuggestion"))(n,t)}async function q(n){e??=import("../JMNHFKGL.js");let t=await e,o=await r(t,"FunctionAgent");return new o(n)}async function E(n){a??=import("../Y7LGFSHO.js");let t=await a,o=await r(t,"FunctionTool");return new o(n)}async function F(n){i??=import("../23C34FEU.js");let t=await i,o=await r(t,"LLMAgent");return new o(n)}async function v(n){c??=import("../5LMYUEK7.js");let t=await c,o=await r(t,"WorkflowAgent");return new o(n)}async function U(n){u??=import("../2AMUOR7X.js");let t=await u,o=await r(t,"ConditionalWorkflow");return new o(n)}async function M(n){s??=import("../ES6D4UD6.js");let t=await s,o=await r(t,"LoopWorkflow");return new o(n)}async function P(n){w??=import("../TFRWUAB6.js");let t=await w,o=await r(t,"ParallelWorkflow");return new o(n)}async function R(n){l??=import("../AGQ5ADFU.js");let t=await l,o=await r(t,"RouterWorkflow");return new o(n)}async function X(n){f??=import("../EOD5PNOL.js");let t=await f,o=await r(t,"SequentialWorkflow");return new o(n)}async function x(n){m??=import("../D5EKX26R.js");let t=await m,o=await r(t,"SwitchWorkflow");return new o(n)}export{U as createConditionalWorkflow,q as createFunctionAgent,E as createFunctionTool,F as createLLMAgent,M as createLoopWorkflow,P as createParallelWorkflow,R as createRouterWorkflow,L as createSchema,X as createSequentialWorkflow,x as createSwitchWorkflow,v as createWorkflowAgent,j as sendUXSuggestion};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as g,b as p}from"../../
|
|
2
|
+
import{a as g,b as p}from"../../TEI6WXW7.js";import"../../S4LELUBK.js";import{J as l}from"../../OL7QBAGS.js";import"../../S627D4K7.js";import"../../MWYBF3F3.js";import"../../UZLQALHY.js";var m="human-in-the-loop",w="Agent execution requires approval",f="Agent execution rejected by the user.",y="human-in-the-loop-tool",h="Tool execution requires approval";function x(t={}){let{outputKey:e}=t;return g(m,{wrapAgent:async(n,r)=>{let a=b(n),o=$(a,n),i=c(n.config?.configurable);if(i?.agentId!==a)throw new l(await I({agentId:a,interruptId:o,options:t,request:n}));if(i.id!==o){if(T(a,i.id))return await r(n);throw new l(await I({agentId:a,interruptId:o,options:t,request:n}))}if(i.payload===!1)return{outputMessage:f,status:"failed",summary:f};let u=e?{...n.state,[e]:i.payload}:n.state,d={...n,state:u};return await r(d)}},{outputKey:e})}function H(t={}){let{outputKey:e}=t;return p(y,{wrapToolCall:async(n,r)=>{let a=n.tool.name,o=q(n.config?.configurable),i=C(o,n.toolCallId??a),u=c(n.config?.configurable);if(u?.agentId!==o||u.id!==i)throw new l(await M({agentId:o,interruptId:i,options:t,request:n}));if(u.payload===!1)return`Tool call "${a}" was rejected by the user.`;let d=e?{...n.input,[e]:u.payload}:n.input,s={...n,input:d};return await r(s)}})}async function I(t){let{agentId:e,interruptId:n,options:r,request:a}=t,o=await r.interrupt?.({...a,agentId:e});return{agentId:e,id:n,kind:o?.kind??"booleanChoice",message:o?.message??w,metadata:o?.metadata}}function b(t){return typeof t.config?.configurable?.agentId=="string"?t.config.configurable.agentId:t.agent.id}function $(t,e){let n=e.config?.configurable?.thread_id,r=typeof n=="string"&&n?`${n}:`:"";return`${t}:${r}${e.nodeName}`}function T(t,e){return e.startsWith(`${t}:tool:`)}function q(t){return typeof t?.agentId=="string"?t.agentId:"llm-agent"}function C(t,e){return`${t}:tool:${e}`}async function M(t){let{agentId:e,interruptId:n,options:r,request:a}=t,{input:o,tool:i,toolCallId:u}=a,d=i.name,s=await r.interrupt?.({...a,args:o,toolName:d,toolCallId:u});return{agentId:e,id:n,kind:s?.kind??"booleanChoice",message:s?.message??`${h}
|
|
3
3
|
Tool: ${d}`,metadata:s?.metadata??{args:o,toolCallId:u,toolName:d}}}function N(t){return c(t?.configurable)?.payload}function c(t){let e=t?.hitlResponse;return e&&typeof e=="object"&&"id"in e&&"agentId"in e?e:null}export{x as createHumanInTheLoopMiddleware,H as createHumanInTheLoopToolMiddleware,N as getHumanInTheLoopPayload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a,b,c}from"../../
|
|
2
|
+
import{a,b,c}from"../../TEI6WXW7.js";import"../../S4LELUBK.js";import"../../OL7QBAGS.js";import"../../S627D4K7.js";import"../../MWYBF3F3.js";import"../../UZLQALHY.js";export{c as convertToLangChainMiddlewares,a as createAgentMiddleware,b as createToolMiddleware};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as o}from"../../
|
|
2
|
+
import{a as o}from"../../3VCPN2KW.js";import{a as l,b as c}from"../../TEI6WXW7.js";import"../../S4LELUBK.js";import"../../OL7QBAGS.js";import{O as s,ta as i}from"../../S627D4K7.js";import"../../MWYBF3F3.js";import"../../UZLQALHY.js";var m="agent-trace",u="tool-trace";function y(){return l(m,{wrapModelCall:async(t,e)=>{let a=await e(t),r=t.runtime,g=d(a);return await Promise.all(g.map(async n=>await o({text:`LLM requested tool call "${n.name}" with arguments: ${JSON.stringify(n.args,null,2)}`},r))),a}})}function M(){return c(u,{wrapToolCall:async(t,e)=>{let a=await e(t),r=t.config;return await o({text:`Finished executing tool: ${s.isInstance(a)?a.content.toString():typeof a=="string"?a:t.tool.name}`},r),a}})}function d(t){return!i.isInstance(t)||!Array.isArray(t.tool_calls)?[]:t.tool_calls.filter(e=>typeof e?.name=="string")}export{y as createAgentTraceMiddleware,M as createToolTraceMiddleware};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{p as s,y as e}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var a=s(e,{"arcgis-assistant":[()=>import("./
|
|
2
|
+
import{p as s,y as e}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var a=s(e,{"arcgis-assistant":[()=>import("./6YZGKVYB.js"),"_messages:,allowedAgentIds:,alwaysUseAgentId,assistantAvatarEnabled,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,runtimeEventsEnabled,streamingDisabled,suggestedPrompts:,userAvatarEnabled,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt,unregister"],"arcgis-assistant-agent":[()=>import("./MSXMHRI7.js"),"agent:,context:,itemId,workflow:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./AFSBL4ZP.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./EGN5BCHV.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./IO7DYFL2.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./3OH35VXS.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./SL4Y7IRG.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./6ECRQVHY.js"),"interrupt:,loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./2O4DON37.js"),"_messages:,awaitingResponse,disabled,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./F5NIRETW.js"),"_messages:,message,options:,type"],"arcgis-assistant-interrupt-preview":[()=>import("./UDRKUVZP.js"),"interrupts:"],"arcgis-assistant-message":[()=>import("./EYOWRGDP.js"),"_messages:,assistantAvatarEnabled,copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./5HBAJ57P.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./MXTXJKFE.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./6P44KOKX.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./O4NVW75A.js"),"_messages:,assistantAvatarEnabled,interrupts:,loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./P4GFYBBO.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./WSWB3B7B.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./2W7LK4HA.js"),"content,parts:"],"arcgis-assistant-speech-input":[()=>import("./5MK44FNO.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./SXM4NUT5.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./PYGX4HN7.js"),"content,message:,user,userAvatarEnabled"]});a({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-knowledge-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-message,arcgis-assistant-message-block,arcgis-assistant-message-feedback,arcgis-assistant-message-footer,arcgis-assistant-message-loading,arcgis-assistant-message-log,arcgis-assistant-message-read-aloud,arcgis-assistant-message-text,arcgis-assistant-speech-input,arcgis-assistant-suggested-prompts,arcgis-assistant-user-message){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"agent-utils/index,agent-utils/middlewares/middleware,agent-utils/middlewares/humanInTheLoop,agent-utils/middlewares/trace".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,e,"@arcgis/ai-components/",".js")
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = '---\nname: query\ndescription: Answers questions about feature-layer data, including counts, matching records, field values, aggregates, rankings, and spatially constrained results. Use when the user asks to inspect or summarize map data.\nallowed-tools: findRelevantLayers findRelevantFields getAttribute getStatistics getTopFeatures queryFeatures\n---\n\n# Query\n\n- When the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- Start with `findRelevantLayers` unless a previous tool result from this run explicitly identifies the relevant layer ID. Use the assigned task as the semantic query.\n- If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- Before querying, call `findRelevantFields` with only relevant layer IDs. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Set `includeSummaryStatistics` to true when the requested answer directly depends on whole-layer numeric summary statistics such as average, minimum, maximum, sum, variance, standard deviation, null count, or range. Otherwise leave it false and use `getStatistics` later if analysis requires statistics under an attribute or spatial constraint.\n- Use statistics returned by `findRelevantFields` when they directly answer an unfiltered whole-layer question. Use `getStatistics` when a where clause or spatial constraint must be applied.\n- Use `queryFeatures` to count, find, or list matching features. It is the default query tool.\n- Use `getTopFeatures` for highest, lowest, first, last, or top-N records ranked by an existing field.\n- Use `getAttribute` only when retrieving a particular attribute from a specifically identified feature.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- If the request asks to visually show, display, highlight, map, filter, reveal, emphasize, hide, include, or exclude matching features, preserve the information needed for a visual operation in the working context: layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs when available, and count. Preserve the exact values returned or used by tools so another skill can reuse them without repeating discovery.\n- Base the final answer only on returned tool data. State failures or empty results directly and do not fabricate values.\n';
|
|
3
|
+
export {
|
|
4
|
+
e as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = '---\nname: filter\ndescription: Changes feature emphasis on the map by including, excluding, highlighting, dimming, or clearing filtered features. Use when the user asks to visually filter feature-layer data.\nallowed-tools: findRelevantLayers findRelevantFields setFeatureEffect resetMap clearFilters\n---\n\n# Filter\n\n- Use `clearFilters` when the user asks only to remove feature filters or effects. Use `resetMap` only when the user asks to reset the broader map state.\n- Reuse a preceding query result from this run whenever it contains the layer ID and filtering criteria needed for the visual operation. Do not repeat layer or field discovery in that case.\n- A preceding query result may provide the layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs, and count. Preserve and reuse those values rather than reconstructing them.\n- If no usable preceding query geometry exists and the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- If no usable preceding query result exists, start with `findRelevantLayers`. Use the assigned task as the semantic query. If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- When discovery is required, call `findRelevantFields` with only relevant layer IDs before constructing a filter. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Leave `includeSummaryStatistics` false unless the filter criteria explicitly depend on a requested numeric summary.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- For highlight, show, include, exclude, or other visual-filter requests with feature criteria, call `setFeatureEffect` using the same layer ID, where clause, geometry filter, and `useCurrentExtent` value determined by the preceding query or discovery steps.\n- If a preceding query returned object IDs for ranked, top-N, or otherwise selected records, pass those object IDs to `setFeatureEffect` instead of rebuilding the selection using only a where clause.\n- Prefer the default feature effects unless the user explicitly requests a particular visual treatment.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- When available, use the preceding query result for feature counts or attribute details in the final response.\n- Report the `setFeatureEffect` outcome faithfully. Do not claim that a map effect was applied when the tool failed or no matching layer or field was found.\n';
|
|
3
|
+
export {
|
|
4
|
+
e as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = `---
|
|
3
|
+
name: help
|
|
4
|
+
description: Answers questions about the current map, its layers and fields, available assistant capabilities, unsupported map actions, and unrelated requests that need a map-focused redirect.
|
|
5
|
+
allowed-tools: listLayerFields
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Help
|
|
9
|
+
|
|
10
|
+
- Use the runtime context supplied with this skill as the authoritative source for map, layer, field, and capability information.
|
|
11
|
+
- List layers using the layers in the runtime context.
|
|
12
|
+
- When the user explicitly asks for fields, columns, or attributes of a named layer, call \`listLayerFields\` with that layer title. Do not use \`listLayerFields\` for general help, capability summaries, or layer listings.
|
|
13
|
+
- Summarize what the map contains using its actual layer titles, descriptions, and fields.
|
|
14
|
+
- Explain available capabilities using only the registered agents in the runtime context. Do not claim an action is supported unless a registered agent description supports it.
|
|
15
|
+
- For requests such as "what can I ask?", suggest 3-5 concise examples that use actual layer and field names from the map context.
|
|
16
|
+
- If a map-related action is unsupported, say so directly and suggest a nearby supported capability when one is available.
|
|
17
|
+
- You know only this map and the registered assistant capabilities. For unrelated questions, politely say that you do not have that information and redirect to a specific map-related question using the returned context.
|
|
18
|
+
- Keep responses concise. Use bullets for lists and never invent map details, fields, agents, or capabilities.
|
|
19
|
+
`;
|
|
20
|
+
export {
|
|
21
|
+
e as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e = "---\nname: navigation\ndescription: Navigates the map to addresses, bookmarks, layers, matching features, extents, scales, zoom levels, and viewpoints using live map context and semantic layer and field search.\nallowed-tools: findRelevantLayers findRelevantFields goToAddress goToBookmark goToFeatures goToFullExtent goToHomeExtent goToLayer goToScale goToViewpoint goToZoom\n---\n\n# Navigation\n\n- Complete exactly one map-changing navigation action for the assigned task. Semantic search calls do not count as navigation actions.\n- Use the runtime context as the authoritative source for the current zoom level and exact available bookmark names.\n- Prefer an available bookmark over a feature or address when it clearly matches the requested place. Prefer a matching map feature over geocoding when the request identifies a layer or feature. Otherwise use `goToAddress` for an address or place name.\n- Use `goToZoom`, `goToScale`, or `goToViewpoint` directly for explicit numeric requests. For a relative zoom request, calculate one level above or below the current zoom from the runtime context and keep it within the tool's supported range.\n- Use `goToHomeExtent` to reset the map and `goToFullExtent` for the full-world extent. These actions do not require semantic search.\n- Before `goToLayer`, call `findRelevantLayers` with a concise query describing the requested layer. Use only a returned `layerId`. If there is no clear match, do not invent an ID or navigate.\n- Before `goToFeatures`, call `findRelevantLayers`, then call `findRelevantFields` with the relevant returned layer IDs and a query describing the requested condition. Use only the exact layer IDs returned by `findRelevantLayers`. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Build `goToFeatures` filters with valid ArcGIS SQL-92. Use field names rather than aliases, use coded-value domain codes when supplied, quote string values, and use `1=1` when all features in the selected layer are requested.\n- Do not call `findRelevantFields` for layer-only navigation or direct address, bookmark, extent, scale, viewpoint, or zoom navigation.\n- If required map context or semantic search results are missing or ambiguous, explain what is missing instead of guessing.\n- Report the navigation tool result faithfully. Never claim the map moved when the tool failed.\n";
|
|
3
|
+
export {
|
|
4
|
+
e as default
|
|
5
|
+
};
|