@arcgis/ai-components 5.2.0-next.5 → 5.2.0-next.51

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 (218) hide show
  1. package/dist/agent-utils/FunctionAgent.d.ts +2 -2
  2. package/dist/agent-utils/LLMAgent.d.ts +2 -2
  3. package/dist/agent-utils/LLMAgent.js +1 -0
  4. package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
  5. package/dist/agent-utils/index.d.ts +177 -0
  6. package/dist/agent-utils/index.js +167 -0
  7. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  8. package/dist/agent-utils/middlewares/trace.js +25 -33
  9. package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
  10. package/dist/agent-utils/types.d.ts +36 -7
  11. package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
  12. package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
  13. package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
  14. package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
  15. package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
  16. package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
  17. package/dist/cdn/2ER3LN6U.js +2 -0
  18. package/dist/cdn/2W6XPTA6.js +9 -0
  19. package/dist/cdn/3DJDRAGV.js +2 -0
  20. package/dist/cdn/3LCF5HIE.js +3 -0
  21. package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
  22. package/dist/cdn/434TAA3J.js +2 -0
  23. package/dist/cdn/4CEMUECT.js +2 -0
  24. package/dist/cdn/4G5XCUE5.js +2 -0
  25. package/dist/cdn/57OMVTIU.js +2 -0
  26. package/dist/cdn/5I35MJXT.js +48 -0
  27. package/dist/cdn/6O6KMX3M.js +2 -0
  28. package/dist/cdn/6U7TEAAJ.js +2 -0
  29. package/dist/cdn/7FY4G4K2.js +2 -0
  30. package/dist/cdn/7YIRK2E3.js +2 -0
  31. package/dist/cdn/A4JLOAOH.js +2 -0
  32. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  33. package/dist/cdn/APFZY4PI.js +2 -0
  34. package/dist/cdn/BE7ZN5FZ.js +2 -0
  35. package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
  36. package/dist/cdn/BMGQJYTE.js +2 -0
  37. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  38. package/dist/cdn/CMG2NY3K.js +2 -0
  39. package/dist/cdn/DMLRWHBA.js +2 -0
  40. package/dist/cdn/EQLRFZVU.js +18 -0
  41. package/dist/cdn/EW6AYEUX.js +36 -0
  42. package/dist/cdn/F5SUU35Z.js +2 -0
  43. package/dist/cdn/FYW633VX.js +2 -0
  44. package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
  45. package/dist/cdn/{H7422XUG.js → GYVSHAUI.js} +1 -1
  46. package/dist/cdn/HBLRVXEB.js +2 -0
  47. package/dist/cdn/HJG7QM2R.js +9 -0
  48. package/dist/cdn/HQXPPYMD.js +2 -0
  49. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  50. package/dist/cdn/ICYUPLZM.js +56 -0
  51. package/dist/cdn/IEHPNCTL.js +2 -0
  52. package/dist/cdn/IHP25JWI.js +99 -0
  53. package/dist/cdn/J6A4AS7E.js +22 -0
  54. package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
  55. package/dist/cdn/JEL5M7FA.js +2 -0
  56. package/dist/cdn/{CXWBEDXN.js → JSIGEUX7.js} +6 -4
  57. package/dist/cdn/JSJ4RMOE.js +2 -0
  58. package/dist/cdn/JVYPIWEU.js +2 -0
  59. package/dist/cdn/KJJAXCP4.js +2 -0
  60. package/dist/cdn/LHLO6PTD.js +2 -0
  61. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  62. package/dist/cdn/LUY6V4TP.js +181 -0
  63. package/dist/cdn/M3MRIGDZ.js +2 -0
  64. package/dist/cdn/MS5EA2KY.js +2 -0
  65. package/dist/cdn/MWYBF3F3.js +66 -0
  66. package/dist/cdn/NAKAZDJ7.js +4 -0
  67. package/dist/cdn/NEV6OZN3.js +71 -0
  68. package/dist/cdn/O5TONDCH.js +2 -0
  69. package/dist/cdn/OC5GA5ZQ.js +3 -0
  70. package/dist/cdn/OGMMYFHR.js +2 -0
  71. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  72. package/dist/cdn/OYNIFMCJ.js +2 -0
  73. package/dist/cdn/PNFBQ6JV.js +180 -0
  74. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  75. package/dist/cdn/PVE7Q43N.js +2 -0
  76. package/dist/cdn/R74ZHFA6.js +2 -0
  77. package/dist/cdn/RLEHNAIA.js +2 -0
  78. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  79. package/dist/cdn/SJR4IR57.js +2 -0
  80. package/dist/cdn/SPVOBZAL.js +2 -0
  81. package/dist/cdn/SUA3YJTU.js +22 -0
  82. package/dist/cdn/T7DYMSJV.js +65 -0
  83. package/dist/cdn/TFT6HK3O.js +208 -0
  84. package/dist/cdn/THR22OXW.js +2 -0
  85. package/dist/cdn/TPULIO6I.js +34 -0
  86. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  87. package/dist/cdn/UK7PR2FE.js +2 -0
  88. package/dist/cdn/UZLQALHY.js +2 -0
  89. package/dist/cdn/V6HOUZPZ.js +2 -0
  90. package/dist/cdn/VAXH6RUQ.js +134 -0
  91. package/dist/cdn/VPFIUEKT.js +14 -0
  92. package/dist/cdn/VXFQANGJ.js +2 -0
  93. package/dist/cdn/XCRR2EEG.js +6 -0
  94. package/dist/cdn/YHQJ66WJ.js +2 -0
  95. package/dist/cdn/YYSMCB4A.js +2 -0
  96. package/dist/cdn/Z6I6JACX.js +3 -0
  97. package/dist/cdn/ZB57WYHC.js +2 -0
  98. package/dist/cdn/ZS6SXJP2.js +2 -0
  99. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  100. package/dist/cdn/agent-utils/index.js +2 -0
  101. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
  102. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
  103. package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
  104. package/dist/cdn/index.js +1 -1
  105. package/dist/cdn/main.css +1 -1
  106. package/dist/chunks/adapter.js +1794 -1597
  107. package/dist/chunks/arcgisKnowledgeGraph.js +126 -71
  108. package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
  109. package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
  110. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  111. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
  112. package/dist/chunks/converterUtils.js +39 -32
  113. package/dist/chunks/dataExplorationGraph.js +139 -113
  114. package/dist/chunks/data_explore_query_prompt.js +9 -4
  115. package/dist/chunks/generateLayerDescriptions.js +248 -228
  116. package/dist/chunks/helpGraph.js +17 -13
  117. package/dist/chunks/help_prompt.js +34 -17
  118. package/dist/chunks/index.js +11 -0
  119. package/dist/chunks/intent_prompt.js +16 -0
  120. package/dist/chunks/layerStylingGraph.js +24 -20
  121. package/dist/chunks/navigationGraph.js +33 -28
  122. package/dist/chunks/navigation_intent_prompt.js +8 -2
  123. package/dist/chunks/orchestrator.js +110 -108
  124. package/dist/chunks/slottableRequestUtils.js +3 -7
  125. package/dist/chunks/state.js +1 -1
  126. package/dist/chunks/summarize_query_response_prompt.js +9 -7
  127. package/dist/chunks/toolCallResponse.js +12 -9
  128. package/dist/chunks/utils2.js +8 -8
  129. package/dist/components/arcgis-assistant/customElement.d.ts +27 -0
  130. package/dist/components/arcgis-assistant/customElement.js +385 -152
  131. package/dist/components/arcgis-assistant/index.js +2 -3
  132. package/dist/components/arcgis-assistant/types.d.ts +14 -1
  133. package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
  134. package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -2
  135. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  136. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
  137. package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
  138. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +11 -5
  139. package/dist/components/arcgis-assistant-help-agent/customElement.js +8 -2
  140. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
  141. package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -8
  142. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
  143. package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
  144. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
  145. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +17 -11
  146. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +10 -4
  147. package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
  148. package/dist/components/arcgis-assistant-message/customElement.js +28 -26
  149. package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
  150. package/dist/components/arcgis-assistant-message/index.js +2 -0
  151. package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
  152. package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
  153. package/dist/components/arcgis-assistant-message-block/index.js +1 -0
  154. package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
  155. package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
  156. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
  157. package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
  158. package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
  159. package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
  160. package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
  161. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +5 -1
  162. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  163. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +11 -5
  164. package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
  165. package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
  166. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
  167. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
  168. package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
  169. package/dist/docs/api.json +1 -1
  170. package/dist/docs/docs.json +1 -1
  171. package/dist/docs/vscode.html-custom-data.json +1 -1
  172. package/dist/docs/web-types.json +1 -1
  173. package/dist/index.d.ts +4 -0
  174. package/dist/loader.js +7 -6
  175. package/dist/oauth-callback.html +1 -1
  176. package/dist/types/lumina.d.ts +11 -5
  177. package/dist/types/preact.d.ts +12 -5
  178. package/dist/types/react.d.ts +13 -5
  179. package/dist/types/stencil.d.ts +11 -5
  180. package/dist/utils/index.d.ts +85 -47
  181. package/dist/utils/index.js +48 -47
  182. package/package.json +13 -12
  183. package/dist/cdn/2AXF774U.js +0 -2
  184. package/dist/cdn/3BKUCFKS.js +0 -36
  185. package/dist/cdn/3PKJWIC3.js +0 -2
  186. package/dist/cdn/3WINIQWY.js +0 -2
  187. package/dist/cdn/462JBSEV.js +0 -422
  188. package/dist/cdn/5QAHYX7Y.js +0 -5
  189. package/dist/cdn/7BCR6TUO.js +0 -2
  190. package/dist/cdn/7GH7VSB2.js +0 -2
  191. package/dist/cdn/7PLV4QH6.js +0 -2
  192. package/dist/cdn/AO7BQHKC.js +0 -2
  193. package/dist/cdn/AXDZBBNL.js +0 -45
  194. package/dist/cdn/DDLZOMUY.js +0 -2
  195. package/dist/cdn/DHOVCT6R.js +0 -2
  196. package/dist/cdn/DO2P3PWF.js +0 -106
  197. package/dist/cdn/ERBQSEPQ.js +0 -22
  198. package/dist/cdn/F2AHA4GB.js +0 -54
  199. package/dist/cdn/FX5JFRDL.js +0 -2
  200. package/dist/cdn/GBNUMN4J.js +0 -16
  201. package/dist/cdn/GJUXVEOF.js +0 -166
  202. package/dist/cdn/HB5A5R2E.js +0 -2
  203. package/dist/cdn/J5CMRCPS.js +0 -3
  204. package/dist/cdn/KMQ3SP4I.js +0 -5
  205. package/dist/cdn/M6F4MXDK.js +0 -14
  206. package/dist/cdn/MH5RPXHM.js +0 -2
  207. package/dist/cdn/NAUXSHIE.js +0 -72
  208. package/dist/cdn/NVI3I46B.js +0 -2
  209. package/dist/cdn/OAVEHGB6.js +0 -2
  210. package/dist/cdn/OH64RMOR.js +0 -4
  211. package/dist/cdn/P6OPJQMC.js +0 -3
  212. package/dist/cdn/QR54T33D.js +0 -2
  213. package/dist/cdn/RVOAPUBN.js +0 -2
  214. package/dist/cdn/SXDLXCIM.js +0 -2
  215. package/dist/cdn/USMDJUFS.js +0 -2
  216. package/dist/cdn/V2P4AIGG.js +0 -2
  217. package/dist/cdn/Y333DGV6.js +0 -2
  218. package/dist/cdn/YIMNOUTF.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/ai-components",
3
- "version": "5.2.0-next.5",
3
+ "version": "5.2.0-next.51",
4
4
  "description": "ArcGIS AI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,7 @@
9
9
  "exports": {
10
10
  ".": "./dist/index.js",
11
11
  "./loader": "./dist/loader.js",
12
+ "./agent-utils/index.js": "./dist/agent-utils/index.js",
12
13
  "./agent-utils/BaseAgent.js": "./dist/agent-utils/BaseAgent.js",
13
14
  "./agent-utils/FunctionAgent.js": "./dist/agent-utils/FunctionAgent.js",
14
15
  "./agent-utils/LLMAgent.js": "./dist/agent-utils/LLMAgent.js",
@@ -39,21 +40,21 @@
39
40
  "license": "SEE LICENSE IN LICENSE.md",
40
41
  "dependencies": {
41
42
  "@esri/arcgis-html-sanitizer": "~4.1.0",
42
- "@langchain/core": "^1.1.39",
43
- "@langchain/langgraph": "^1.2.6",
44
- "@langchain/openai": "^1.4.3",
45
- "langchain": "^1.3.1",
43
+ "@langchain/core": "^1.2.1",
44
+ "@langchain/langgraph": "^1.4.7",
45
+ "@langchain/openai": "^1.5.3",
46
+ "langchain": "^1.5.2",
46
47
  "lit": "^3.3.0",
47
- "marked": "~18.0.4",
48
+ "marked": "~18.0.6",
48
49
  "tslib": "^2.8.1",
49
- "zod": "^4.3.6",
50
- "@arcgis/toolkit": "5.2.0-next.5",
51
- "@arcgis/lumina": "5.2.0-next.5"
50
+ "zod": "^4.4.3",
51
+ "@arcgis/toolkit": "5.2.0-next.51",
52
+ "@arcgis/lumina": "5.2.0-next.51"
52
53
  },
53
54
  "peerDependencies": {
54
- "@arcgis/core": "^5.1.0-next",
55
- "@esri/calcite-components": "^5.1.0-next.60",
56
- "@arcgis/map-components": "~5.2.0-next.5"
55
+ "@arcgis/core": "^5.2.0-next",
56
+ "@esri/calcite-components": "^5.1.1",
57
+ "@arcgis/map-components": "~5.2.0-next.51"
57
58
  },
58
59
  "css.customData": [
59
60
  "dist/docs/vscode.css-custom-data.json"
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{g as s,h as e,v as i,y as t}from"./OH64RMOR.js";import"./YIMNOUTF.js";var o=s`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,a=class extends i{constructor(){super(...arguments),this.loading=!1,this.loadingMessage=""}static{this.properties={loading:5,loadingMessage:1}}static{this.styles=o}render(){return this.loading?e`<arcgis-assistant-message footer-disabled><slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot><slot name=content slot=content><div class="loading-container"><div class="loading"><calcite-loader label=loading inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};t("arcgis-assistant-message-loading",a);export{a as ArcgisAssistantMessageLoading};
@@ -1,36 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./GJUXVEOF.js";import a from"./DO2P3PWF.js";import{Fb as C,a as N,b as T}from"./462JBSEV.js";import{a as L,c as R}from"./HB5A5R2E.js";import"./AMP6IALT.js";import"./OAVEHGB6.js";import{v as E,y as $}from"./OH64RMOR.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{a:f,f:d,m:b,n:F},{a:_,b:v,c:x,d:I,e:A,f:M,g:Z,h:q,i:j,j:V,k:O,l:z,m:S,n:G,o:h,p:B}])=>{var w=[I,A,M,Z,q,j,V,O,z];async function H(e,t){let a=await S("navigation_tool_prompt"),{mapView:r}=x(t),l=r.map.bookmarks?.map(p=>p.name).filter(Boolean)??[],i=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((p,W)=>`${W+1}. layerId=${p.id} | title=${p.title??""} | name=${p.name??""} | score=${p.score.toFixed(2)}`).join(`
3
- `):"",c=e.vectorSearchFieldResults?.length>0?JSON.stringify(e.vectorSearchFieldResults,null,2):"",n=e.intent==="goToBookmark"&&l.length?`Available bookmarks:
4
- ${l.map(p=>`- ${p}`).join(`
5
- `)}`:"",o=(e.intent==="goToLayer"||e.intent==="goToFeatures")&&e.vectorSearchLayerResults?.length?`Candidate layers:
6
- ${i}`:"",m=e.intent==="goToFeatures"&&e.vectorSearchFieldResults?.length?`Candidate fields:
7
- ${c}`:"",u={intent:e.intent,bookmarksSection:n,layersSection:o,fieldsSection:m,currentZoom:r.zoom,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},s=await F({promptText:a,modelTier:"fast",inputVariables:u,tools:w}),g=(s.tool_calls?.length??0)>0,y=typeof s.text=="string"?s.text.trim():"",P=y.length>0;return{...e,navigationInternalState:{...e.navigationInternalState,toolCallMessage:g?s:void 0},outputMessage:g?e.outputMessage:y,status:g?e.status:P?"success":"failed"}}var K=e=>{let t=typeof e=="string"?e:String(e);try{let a=JSON.parse(t);if(a&&typeof a=="object"&&typeof a.text=="string")return a}catch{console.warn("Failed to parse tool response as JSON:",t)}return{text:t}};async function Q(e,t){let a=new _(w);try{let r=e.navigationInternalState.toolCallMessage;if(!r)throw new Error("navigationToolCalling: missing navigationInternalState.toolCallMessage");let{messages:l}=await a.invoke({messages:[r]},t),i="",c;for(let n of l){let o=K(n.content);o.text&&(i+=`${o.text}
8
- `),o.sharedStatePatch&&(c={...c,...o.sharedStatePatch})}return await d({text:`Finished executing navigation tool: ${i}`},t),{...e,outputMessage:i,sharedStatePatch:c,status:"success",summary:i?G(i):"Navigation executed.",navigationInternalState:{...e.navigationInternalState,toolCallMessage:void 0}}}catch(r){let l=r instanceof Error?r.message:String(r);return await d({text:`Navigation tool execution failed: ${l}`},t),{...e,outputMessage:`Navigation tool execution failed: ${l}`,status:"failed",summary:`Navigation tool execution failed: ${l}`,navigationInternalState:{...e.navigationInternalState,toolCallMessage:void 0}}}}async function U(e,t){let a=await S("navigation_intent_prompt"),{mapView:r}=x(t),l=w.map(s=>({name:s.name,description:s.description,schema:s.schema})),i=r.map.bookmarks?.map(s=>s.name).filter(Boolean)??[],c=i.length?`Available bookmarks:
9
- ${i.map(s=>`- ${s}`).join(`
10
- `)}`:"",n={tools:l.map(({name:s,description:g,schema:y})=>`${s}: ${g}, ${JSON.stringify(y)}`).join(`
11
- `),bookmarks:c,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},o=f.object({intent:f.string()}),m=await b({promptText:a,inputVariables:n,schema:o,modelTier:"fast"}),u=typeof m.intent=="string"?m.intent.trim().replace(/^"|"$/gu,""):"";return{...e,intent:u||""}}var X=.7,Y=async(e,t)=>{try{await d({text:`Similarity search to find layers: ${e.agentExecutionContext.assignedTask}`},t);let a=h(t,"layerSearch"),r=h(t,"layersAndFieldsRegistry"),l=h(t,"embeddingCache"),i=(await a.searchLayers({text:e.agentExecutionContext.assignedTask,minScore:X,embeddingCache:l})).map(({id:n,score:o})=>{let m=r.get(n)?.layerItem;return{id:n,title:m?.title,name:m?.name??void 0,score:o}}),c;return i.length>0?c=`Vector search completed. Matching layers:
12
- ${i.map(n=>`- layerId=${n.id} | title=${n.title??""} | name=${n.name??""} | score=${n.score.toFixed(2)}`).join(`
13
- `)}`:c="Vector search completed. No matching layers found.",await d({text:c},t),{...e,vectorSearchLayerResults:i}}catch(a){throw await d({text:`Error during vector search layers: ${a instanceof Error?a.message:String(a)}`},t),a}},D=.7,ee=10,te=async(e,t)=>{try{await d({text:`Similarity search to find fields: ${e.agentExecutionContext.assignedTask}`},t);let a=h(t,"fieldSearch"),r=h(t,"layersAndFieldsRegistry"),l=h(t,"embeddingCache"),i=e.vectorSearchLayerResults?.map(o=>o.id)??[];if(i.length===0)return await d({text:"No candidate layers for field search"},t),e;let c=(await a.searchFields({text:e.agentExecutionContext.assignedTask,layerIds:i,minScore:D,topResults:ee,embeddingCache:l})).map(({layerId:o,results:m})=>{let u=r.get(o)?.fieldRegistry;return{layerId:o,layerName:r.get(o)?.layerItem.name,results:m.map(s=>{let g=u?.get(s.name);return{name:s.name,score:s.score,type:g?.type,alias:g?.alias,description:g?.description,statistics:g?.statistics}})}}),n;return c.length>0?n=`Vector search completed. Matching layers and fields:
14
- ${c.map(o=>`${o.layerName??o.layerId}:
15
- ${o.results.map(m=>` - ${m.name} (${m.score.toFixed(2)})`).join(`
16
- `)}`).join(`
17
- `)}`:n=`No vector search field results found for score over ${D}.`,await d({text:n},t),{...e,vectorSearchFieldResults:c}}catch(a){throw await d({text:`Error during vector search fields: ${a instanceof Error?a.message:String(a)}`},t),a}},ae=(e,t)=>B(["layerSearch","layersAndFieldsRegistry"],"Navigation Agent")(e,t),oe=()=>new C(v).addNode("requireNavigationServices",ae).addNode("intentLLM",U).addNode("vectorSearchLayers",Y).addNode("vectorSearchFields",te).addNode("agent",H).addNode("tools",Q).addEdge(N,"requireNavigationServices").addEdge("requireNavigationServices","intentLLM").addConditionalEdges("intentLLM",e=>e.intent==="goToLayer"||e.intent==="goToFeatures"?"vectorSearchLayers":"agent",{vectorSearchLayers:"vectorSearchLayers",agent:"agent"}).addConditionalEdges("vectorSearchLayers",e=>e.intent==="goToFeatures"?"vectorSearchFields":"agent",{vectorSearchFields:"vectorSearchFields",agent:"agent"}).addEdge("vectorSearchFields","agent").addEdge("agent","tools").addEdge("tools",T),se=String.raw`- **navigation** — Enables users to interact with the map by navigating to specific locations, layers, features, or extents.
18
- This includes zooming, panning, centering, or geocoding based on user input. The agent is designed to handle explicit map movement requests. NOTE: DO NOT call this agent if the user asks "show me...", that is meant to be handled by another agent. If the query is about where a certain address is, call this agent.
19
-
20
- Supported actions:
21
- - **Zooming**: Adjust the map's zoom level (e.g., "Zoom to level 10", "Zoom in").
22
- - **Viewpoints**: Navigate to a specific center point with optional zoom or scale (e.g., "Center the map on San Francisco at zoom level 16").
23
- - **Scales**: Set the map to a specific scale (e.g., "Set the map scale to 1:50,000").
24
- - **Layers**: Zoom to the full extent of a specific layer (e.g., "Go to the water mains layer"). For the purposes of link charts, if the user requests to go to the extent of a link chart or the entities/nodes within it, that should be treated as a request to use the goToLayer tool on the link chart layer
25
- - **Features**: Zoom to features in a layer that match a filter (e.g., "Zoom to all schools in the city").
26
- - **Bookmarks**: Navigate to a predefined bookmark extent (e.g., "Go to the Downtown bookmark").
27
- - **Extents**: Reset to the initial web map extent or zoom to the full world extent (e.g., "Reset the map", "Zoom to the full world extent").
28
- - **Addresses**: Zoom to an address or place name (e.g., "Zoom to 1600 Pennsylvania Ave").
29
-
30
- _Example: “Zoom to Texas”_
31
- _Example: “Go to the water mains layer”_
32
- _Example: “Zoom to to the extent of my link chart”_
33
- _Example: “Center the map on San Francisco at scale 50000”_
34
- _Example: “Zoom to the features in the schools layer where city = 'Austin'”_
35
- _Example: “Go to the Downtown bookmark”_
36
- _Example: “Where is Mount Rainier?”_`,J={id:"navigation",name:"Navigation Agent",description:se,createGraph:oe,workspace:v};var k=class extends E{constructor(){super(...arguments),this.agent=J}static{this.properties={referenceElement:1}}#e;getContext(){if(!this.#e)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#e}}load(){this.#e=L(this,"arcgis-assistant-navigation-agent"),R(this)}};$("arcgis-assistant-navigation-agent",k);return k},"identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request","identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","views/LinkChartView","rest/knowledgeGraphService",a,b)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l}from"./H7422XUG.js";import"./MH5RPXHM.js";import"./OAVEHGB6.js";import{g as a,h as e,k as o,t as i,u as n,v as r,y as c}from"./OH64RMOR.js";import"./YIMNOUTF.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./DO2P3PWF.js";export default $arcgis.t(([,,,,,{f:t}])=>{var y=async(o,r)=>{let i=o.tool_calls??[];if(i.length===0){await t({text:`LLM did not request any tool calls: ${String(o?.content)}`},r);return}await Promise.all(i.map(async a=>await t({text:`LLM invoked ${a.name} tool with arguments: ${JSON.stringify(a.args,null,2)}`},r)))};return y},"identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request",a)