@arcgis/ai-components 5.2.0-next.11 → 5.2.0-next.111

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 (334) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/agent-utils/LLMAgent.d.ts +9 -7
  4. package/dist/agent-utils/LLMAgent.js +63 -60
  5. package/dist/agent-utils/WorkflowAgent.js +14 -15
  6. package/dist/agent-utils/index.d.ts +78 -0
  7. package/dist/agent-utils/index.js +116 -97
  8. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  9. package/dist/agent-utils/middlewares/trace.js +5 -5
  10. package/dist/agent-utils/types.d.ts +13 -13
  11. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  12. package/dist/agentic-workflow/Edge.d.ts +16 -0
  13. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  14. package/dist/agentic-workflow/jsonTypes.d.ts +229 -0
  15. package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
  16. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  17. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  18. package/dist/agentic-workflow/nodes/HumanInTheLoopNode.d.ts +37 -0
  19. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  20. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  21. package/dist/agentic-workflow/types.d.ts +29 -0
  22. package/dist/agents/runtime/skill/createSkillAgent.d.ts +30 -0
  23. package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
  24. package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
  25. package/dist/agents/runtime/skill/types.d.ts +20 -0
  26. package/dist/{cdn/WNS5ZUF5.js → agents/runtime/skill/types.js} +1 -1
  27. package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
  28. package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
  29. package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
  30. package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
  31. package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
  32. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +122 -0
  33. package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
  34. package/dist/agents/tools/help/listFields/adapter.js +30 -0
  35. package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
  36. package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
  37. package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
  38. package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
  39. package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
  40. package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
  41. package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
  42. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
  43. package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
  44. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
  45. package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
  46. package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
  47. package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
  48. package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
  49. package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
  50. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
  51. package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
  52. package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
  53. package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
  54. package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
  55. package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
  56. package/dist/agents/tools/query/getStatistics/adapter.js +158 -0
  57. package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
  58. package/dist/agents/tools/query/getTopFeatures/adapter.js +145 -0
  59. package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
  60. package/dist/agents/tools/query/queryFeatures/adapter.js +131 -0
  61. package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
  62. package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
  63. package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
  64. package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
  65. package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
  66. package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
  67. package/dist/agents/tools/shared/types.d.ts +22 -0
  68. package/dist/agents/tools/shared/types.js +6 -0
  69. package/dist/cdn/2BNQ6A6J.js +2 -0
  70. package/dist/cdn/2MWUBKWI.js +2 -0
  71. package/dist/cdn/{F6QHMKF5.js → 2O4DON37.js} +1 -1
  72. package/dist/cdn/2W7LK4HA.js +2 -0
  73. package/dist/cdn/33PB7ALY.js +2 -0
  74. package/dist/cdn/{5CV7R5IS.js → 33SFAZQG.js} +5 -5
  75. package/dist/cdn/34O57OGV.js +2 -0
  76. package/dist/cdn/{5W7S2RS4.js → 3UEKINYC.js} +1 -1
  77. package/dist/cdn/4IU63OWQ.js +2 -0
  78. package/dist/cdn/5A355PGH.js +14 -0
  79. package/dist/cdn/5HBAJ57P.js +2 -0
  80. package/dist/cdn/5MK44FNO.js +2 -0
  81. package/dist/cdn/5Q2XRQS6.js +2 -0
  82. package/dist/cdn/6ECRQVHY.js +2 -0
  83. package/dist/cdn/6OOZSZRJ.js +2 -0
  84. package/dist/cdn/6OUIUXAJ.js +2 -0
  85. package/dist/cdn/{UPEEHMSY.js → 6P44KOKX.js} +1 -1
  86. package/dist/cdn/73TMZQI5.js +2 -0
  87. package/dist/cdn/74CVYM72.js +19 -0
  88. package/dist/cdn/7EHOFQ2P.js +3 -0
  89. package/dist/cdn/7KSFIRXB.js +2 -0
  90. package/dist/cdn/AHCXG7XF.js +2 -0
  91. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  92. package/dist/cdn/{Q7TL5Q5N.js → APFZY4PI.js} +1 -1
  93. package/dist/cdn/AVRS6UCQ.js +2 -0
  94. package/dist/cdn/AVZ5Y6BK.js +11 -0
  95. package/dist/cdn/AXTQU5YL.js +56 -0
  96. package/dist/cdn/BBPD2AS7.js +2 -0
  97. package/dist/cdn/BFZ5S7NF.js +2 -0
  98. package/dist/cdn/{6ZW7Z36F.js → BL273EGZ.js} +3 -3
  99. package/dist/cdn/C7JPWFZE.js +2 -0
  100. package/dist/cdn/CCC6LBMY.js +2 -0
  101. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  102. package/dist/cdn/CFAC4FN3.js +2 -0
  103. package/dist/cdn/COH3QXWG.js +4 -0
  104. package/dist/cdn/DB2TFPIO.js +2 -0
  105. package/dist/cdn/DE26DAW5.js +2 -0
  106. package/dist/cdn/DG27JEYG.js +50 -0
  107. package/dist/cdn/DKA6PSYN.js +2 -0
  108. package/dist/cdn/DQ2Z65UO.js +3 -0
  109. package/dist/cdn/DWH23NJN.js +2 -0
  110. package/dist/cdn/EDXTPEEU.js +2 -0
  111. package/dist/cdn/ENM3L4AC.js +2 -0
  112. package/dist/cdn/EVMIYZWD.js +2 -0
  113. package/dist/cdn/EYOWRGDP.js +2 -0
  114. package/dist/cdn/EYY367WR.js +2 -0
  115. package/dist/cdn/F5NIRETW.js +2 -0
  116. package/dist/cdn/FCI6M62J.js +2 -0
  117. package/dist/cdn/FDOMMK2M.js +2 -0
  118. package/dist/cdn/FS7GXTTQ.js +6 -0
  119. package/dist/cdn/{T537PKP4.js → FYZATVB3.js} +1 -1
  120. package/dist/cdn/H6P3WP5D.js +14 -0
  121. package/dist/cdn/HHP5YLUI.js +2 -0
  122. package/dist/cdn/HIAQARIQ.js +2 -0
  123. package/dist/cdn/HMIDFTEI.js +2 -0
  124. package/dist/cdn/HMNBUGH2.js +2 -0
  125. package/dist/cdn/HR6GWPKX.js +2 -0
  126. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  127. package/dist/cdn/IH26MIYY.js +2 -0
  128. package/dist/cdn/IHP25JWI.js +99 -0
  129. package/dist/cdn/IYLFJCJ2.js +181 -0
  130. package/dist/cdn/J6A4AS7E.js +22 -0
  131. package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
  132. package/dist/cdn/JICNSK6Y.js +6 -0
  133. package/dist/cdn/JQYLMTDP.js +2 -0
  134. package/dist/cdn/K5JVB6FU.js +2 -0
  135. package/dist/cdn/K7XWGSLN.js +2 -0
  136. package/dist/cdn/K7YQIJFT.js +2 -0
  137. package/dist/cdn/KH4V4I3W.js +2 -0
  138. package/dist/cdn/KMLJS2VW.js +2 -0
  139. package/dist/cdn/LAVFUDUG.js +2 -0
  140. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  141. package/dist/cdn/LOQ2PKV5.js +208 -0
  142. package/dist/cdn/LXPGQNXQ.js +5 -0
  143. package/dist/cdn/MJSIYEWN.js +2 -0
  144. package/dist/cdn/{ZEYIBYSF.js → MWYBF3F3.js} +1 -1
  145. package/dist/cdn/{24QNMEFG.js → MXTXJKFE.js} +1 -1
  146. package/dist/cdn/NEV6OZN3.js +71 -0
  147. package/dist/cdn/O4NVW75A.js +2 -0
  148. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  149. package/dist/cdn/OMF6ITSG.js +2 -0
  150. package/dist/cdn/ONQ6JSBJ.js +2 -0
  151. package/dist/cdn/OZAZ277H.js +2 -0
  152. package/dist/cdn/P4GFYBBO.js +3 -0
  153. package/dist/cdn/P4XZMBU5.js +2 -0
  154. package/dist/cdn/POL6HKCG.js +72 -0
  155. package/dist/cdn/POZYDAU2.js +2 -0
  156. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  157. package/dist/cdn/PYGX4HN7.js +2 -0
  158. package/dist/cdn/QNXI3WOF.js +179 -0
  159. package/dist/cdn/{DXVU45KM.js → QRMRID2M.js} +1 -1
  160. package/dist/cdn/R74ZHFA6.js +2 -0
  161. package/dist/cdn/RFVZ7KCG.js +66 -0
  162. package/dist/cdn/RHYNE5OE.js +2 -0
  163. package/dist/cdn/RLEHNAIA.js +2 -0
  164. package/dist/cdn/ROQGPAR5.js +9 -0
  165. package/dist/cdn/RXF2NUOL.js +2 -0
  166. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  167. package/dist/cdn/SHI76XUV.js +2 -0
  168. package/dist/cdn/SITY6L4S.js +2 -0
  169. package/dist/cdn/STHBRTTD.js +2 -0
  170. package/dist/cdn/{WAIFKDR3.js → SXM4NUT5.js} +1 -1
  171. package/dist/cdn/SZRJTQ54.js +2 -0
  172. package/dist/cdn/TO2NY7EA.js +2 -0
  173. package/dist/cdn/TPULIO6I.js +34 -0
  174. package/dist/cdn/TVEEQSMF.js +2 -0
  175. package/dist/cdn/TWU3QXAS.js +2 -0
  176. package/dist/cdn/TYATJUNF.js +2 -0
  177. package/dist/cdn/UCTC4JN4.js +3 -0
  178. package/dist/cdn/UDRKUVZP.js +2 -0
  179. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  180. package/dist/cdn/UHICISBZ.js +2 -0
  181. package/dist/cdn/UO5PBOQR.js +2 -0
  182. package/dist/cdn/UZLQALHY.js +2 -0
  183. package/dist/cdn/V6HOUZPZ.js +2 -0
  184. package/dist/cdn/{P7DG5T3Z.js → V7Y22FRP.js} +1 -1
  185. package/dist/cdn/VAXH6RUQ.js +134 -0
  186. package/dist/cdn/VNLSYVPE.js +2 -0
  187. package/dist/cdn/VR3CF3ZY.js +2 -0
  188. package/dist/cdn/VWP2B4LB.js +2 -0
  189. package/dist/cdn/VXFQANGJ.js +2 -0
  190. package/dist/cdn/WKZHFSH3.js +2 -0
  191. package/dist/cdn/{AZGGTNA3.js → WSWB3B7B.js} +1 -1
  192. package/dist/cdn/WVP73XWD.js +2 -0
  193. package/dist/cdn/WXQ26G5Q.js +2 -0
  194. package/dist/cdn/XQ3NBBQ3.js +2 -0
  195. package/dist/cdn/{7CYGX4F4.js → YHWYTHID.js} +1 -1
  196. package/dist/cdn/YIZ7PR2G.js +2 -0
  197. package/dist/cdn/Z5XQLSYH.js +2 -0
  198. package/dist/cdn/ZFOG3KXV.js +2 -0
  199. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  200. package/dist/cdn/agent-utils/index.js +1 -1
  201. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -2
  202. package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
  203. package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
  204. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  205. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
  206. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
  207. package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
  208. package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
  209. package/dist/cdn/index.js +1 -1
  210. package/dist/chunks/SKILL.js +5 -0
  211. package/dist/chunks/SKILL2.js +5 -0
  212. package/dist/chunks/SKILL3.js +22 -0
  213. package/dist/chunks/SKILL4.js +5 -0
  214. package/dist/chunks/adapter.js +1126 -2010
  215. package/dist/chunks/aiFactory.js +100 -0
  216. package/dist/chunks/arcgisKnowledgeGraph.js +96 -76
  217. package/dist/chunks/arcgisToolRegistry.js +88 -0
  218. package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
  219. package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
  220. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  221. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
  222. package/dist/chunks/baseAgentState.js +58 -0
  223. package/dist/chunks/converterUtils.js +66 -41
  224. package/dist/chunks/dataExplorationAgent.js +19 -0
  225. package/dist/chunks/data_explore_query_prompt.js +9 -4
  226. package/dist/chunks/fetchAgentContext.js +13 -0
  227. package/dist/chunks/fetchService.js +10 -0
  228. package/dist/chunks/fieldStatistics.js +79 -0
  229. package/dist/chunks/formatFeatureAttributes.js +132 -0
  230. package/dist/chunks/generateLayerDescriptions.js +183 -307
  231. package/dist/chunks/helpAgent.js +34 -0
  232. package/dist/chunks/help_prompt.js +34 -17
  233. package/dist/chunks/intent_prompt.js +2 -2
  234. package/dist/chunks/layerStylingGraph.js +101 -83
  235. package/dist/chunks/mergeWhereClauses.js +15 -0
  236. package/dist/chunks/navigationAgent.js +27 -0
  237. package/dist/chunks/navigation_intent_prompt.js +8 -2
  238. package/dist/chunks/orchestrator.js +445 -234
  239. package/dist/chunks/requireAgentServices.js +11 -0
  240. package/dist/chunks/resolvePointGeometryFilter.js +92 -0
  241. package/dist/chunks/state.js +39 -45
  242. package/dist/chunks/utils2.js +11 -11
  243. package/dist/components/arcgis-assistant/customElement.d.ts +102 -1
  244. package/dist/components/arcgis-assistant/customElement.js +331 -183
  245. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  246. package/dist/components/arcgis-assistant-agent/customElement.js +674 -10
  247. package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
  248. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +34 -8
  249. package/dist/components/arcgis-assistant-help-agent/customElement.js +31 -8
  250. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
  251. package/dist/components/arcgis-assistant-interrupt/customElement.js +11 -12
  252. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +12 -8
  253. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
  254. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +40 -16
  255. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +30 -7
  256. package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
  257. package/dist/components/arcgis-assistant-message/customElement.js +9 -8
  258. package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
  259. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
  260. package/dist/components/arcgis-assistant-message-loading/customElement.js +11 -10
  261. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  262. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  263. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +33 -9
  264. package/dist/components/arcgis-assistant-speech-input/customElement.js +34 -52
  265. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
  266. package/dist/components/arcgis-assistant-user-message/customElement.js +15 -10
  267. package/dist/docs/api.json +1 -1
  268. package/dist/docs/docs.json +1 -1
  269. package/dist/docs/vscode.html-custom-data.json +1 -1
  270. package/dist/docs/web-types.json +1 -1
  271. package/dist/loader.js +6 -6
  272. package/dist/oauth-callback.html +1 -1
  273. package/dist/orchestrator/models/types.d.ts +1 -0
  274. package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
  275. package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
  276. package/dist/orchestrator/types/types.d.ts +17 -0
  277. package/dist/types/lumina.d.ts +5 -4
  278. package/dist/types/preact.d.ts +5 -4
  279. package/dist/types/react.d.ts +5 -4
  280. package/dist/types/stencil.d.ts +7 -6
  281. package/dist/utils/index.d.ts +75 -39
  282. package/dist/utils/index.js +707 -83
  283. package/package.json +35 -12
  284. package/dist/cdn/34SG44C3.js +0 -72
  285. package/dist/cdn/3JGWGKT6.js +0 -2
  286. package/dist/cdn/3NBDVZ2I.js +0 -2
  287. package/dist/cdn/3VOQD2MR.js +0 -2
  288. package/dist/cdn/53NTYC4I.js +0 -2
  289. package/dist/cdn/5QAHYX7Y.js +0 -5
  290. package/dist/cdn/AXDZBBNL.js +0 -45
  291. package/dist/cdn/B7WJFBOZ.js +0 -2
  292. package/dist/cdn/BX7FSMUU.js +0 -56
  293. package/dist/cdn/CHPQM77M.js +0 -181
  294. package/dist/cdn/DHKUXLU3.js +0 -179
  295. package/dist/cdn/DQSEBKOX.js +0 -2
  296. package/dist/cdn/DZ2QWNUA.js +0 -3
  297. package/dist/cdn/EBISDZ5H.js +0 -2
  298. package/dist/cdn/ERL2CB2Y.js +0 -14
  299. package/dist/cdn/F2AHA4GB.js +0 -54
  300. package/dist/cdn/FUIGPHBH.js +0 -2
  301. package/dist/cdn/H2CHHGGH.js +0 -2
  302. package/dist/cdn/HWKDNS4K.js +0 -4
  303. package/dist/cdn/IMQ4TVHF.js +0 -16
  304. package/dist/cdn/IOD3GDA7.js +0 -2
  305. package/dist/cdn/IR7PTESF.js +0 -2
  306. package/dist/cdn/IRZDTYO2.js +0 -2
  307. package/dist/cdn/JIWK6QK6.js +0 -2
  308. package/dist/cdn/JLKGS6Y5.js +0 -36
  309. package/dist/cdn/K3JCH4XW.js +0 -2
  310. package/dist/cdn/KHXUWZHB.js +0 -2
  311. package/dist/cdn/KMQ3SP4I.js +0 -5
  312. package/dist/cdn/LIFK3QSD.js +0 -2
  313. package/dist/cdn/NXKKG5TK.js +0 -2
  314. package/dist/cdn/O3EN27N5.js +0 -2
  315. package/dist/cdn/O3RFFPU3.js +0 -6
  316. package/dist/cdn/PBO6FZN6.js +0 -2
  317. package/dist/cdn/Q3ZW4FYA.js +0 -3
  318. package/dist/cdn/Q6LRANX6.js +0 -2
  319. package/dist/cdn/QCSN44H4.js +0 -2
  320. package/dist/cdn/R56X6ZKR.js +0 -161
  321. package/dist/cdn/RUURNLTP.js +0 -2
  322. package/dist/cdn/T43LEBBE.js +0 -47
  323. package/dist/cdn/TR4GFL7X.js +0 -2
  324. package/dist/cdn/X4XY5HIE.js +0 -2
  325. package/dist/cdn/XOH56EQ2.js +0 -2
  326. package/dist/cdn/XON27U6U.js +0 -2
  327. package/dist/cdn/YIMNOUTF.js +0 -2
  328. package/dist/cdn/YLN2BZ5J.js +0 -2
  329. package/dist/cdn/YUKR4AZW.js +0 -2
  330. package/dist/cdn/Z2G7MP5L.js +0 -22
  331. package/dist/chunks/dataExplorationGraph.js +0 -310
  332. package/dist/chunks/helpGraph.js +0 -126
  333. package/dist/chunks/navigationGraph.js +0 -270
  334. package/dist/chunks/toolCallResponse.js +0 -31
@@ -1,7 +1,28 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e = `## Map Query Gate
2
+ const n = `## Who you are
3
3
 
4
- ### Input
4
+ You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
5
+
6
+ If asked anything outside of that context, you simply don't have that information — respond naturally and redirect to something you _can_ help with, using specific layer and field names from the map context.
7
+
8
+ Example of how to handle unknown topics:
9
+ "I don't have information on that — I only know about this map. You could ask me to list all layers in the map, or capabilities of this assistant."
10
+
11
+ ---
12
+
13
+ ## Your capabilities
14
+
15
+ You can help users with:
16
+
17
+ - Listing the layers in this map
18
+ - Listing the fields in a specific layer (use the tool)
19
+ - Suggesting specific queries using actual layer and field names
20
+ - Summarizing what this map contains and what users can do with it
21
+ - Letting users know when a map-related action isn't supported (e.g. charts, tables), and that it may be added in the future
22
+
23
+ ---
24
+
25
+ ## Input
5
26
 
6
27
  Assigned task:
7
28
  {assignedTask}
@@ -12,11 +33,13 @@ Latest user request:
12
33
  Prior steps:
13
34
  {priorSteps}
14
35
 
15
- Use the assigned task as the primary instruction for the current query. The question will **not** be restated again here.
16
- Use the latest user request as supporting context when needed.
17
- Use prior steps only when needed to explain a previous result, failure, or likely next action.
36
+ Use the assigned task as the primary instruction. The question will **not** be restated again here.
37
+ Use the latest user request as supporting context.
38
+ Use prior steps only to explain a previous result, failure, or likely next action.
39
+
40
+ ---
18
41
 
19
- ### Map Context
42
+ ## Map Context
20
43
 
21
44
  {layerSummary}
22
45
 
@@ -24,15 +47,6 @@ Use prior steps only when needed to explain a previous result, failure, or likel
24
47
 
25
48
  {agents}
26
49
 
27
- ### Rules
28
-
29
- - "What layers are in this map?" → List the layer names
30
- - "What fields are in this layer?" → Call the tool to list the field names for that layer
31
- - "What can you do?" / "What can I ask?" → Suggest specific queries using EXACT layer and field names from the context above
32
- - "Tell me about this map" → Summarize layers and capabilities
33
- - "Create a chart of all wells ans their depth" → If a question is map related but not supported by available capabilities, say so. Add that support for this might be added in the future.
34
- - Questions completely unrelated to maps/GIS → Politely explain you only help with the map |
35
-
36
50
  ### Response Guidelines
37
51
 
38
52
  When suggesting what users can ask, be SPECIFIC using actual layer names:
@@ -46,12 +60,15 @@ For "what can I ask" responses, provide 3-5 specific example queries using field
46
60
  For off-topic questions:
47
61
  "I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
48
62
 
49
- Rules:
63
+ ---
64
+
65
+ ## Format
50
66
 
51
67
  - Keep responses concise
52
68
  - Use bullet points for lists
53
69
  - Use new lines (\\n) and appropriate formatting in your response
70
+ - Use actual layer and field names from the map context in any suggestions
54
71
  `;
55
72
  export {
56
- e as default
73
+ n as default
57
74
  };
@@ -99,7 +99,7 @@ Do not reinterpret the request into a different form.
99
99
 
100
100
  ## Follow-up Reference Resolution
101
101
 
102
- If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set", or "the previous results", then the request depends on earlier context.
102
+ If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set", "the previous results", "this", "it", "that one", "this parcel", "this location", or "that feature", then the request depends on earlier context.
103
103
 
104
104
  This also applies to equivalent referential wording in other languages.
105
105
 
@@ -107,7 +107,7 @@ Resolve the reference using the most recent relevant chat history or successful
107
107
 
108
108
  In this case, the \`assignedTask\` should be standalone and should preserve the referenced prior constraints while adding only the new constraint or question from the latest user request.
109
109
 
110
- Do not leave ambiguous references like "these", "those", or "them" in \`assignedTask\` when they can be resolved from context.
110
+ Do not leave ambiguous references like "these", "those", "them", "this", or "it" in \`assignedTask\` when they can be resolved from context.
111
111
 
112
112
  ---
113
113
 
@@ -1,30 +1,47 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { NodeInterrupt as E, StateGraph as L, START as w, END as m } from "@langchain/langgraph/web";
2
+ import { NodeInterrupt as w, StateGraph as L, START as E, END as m } from "@langchain/langgraph/web";
3
3
  import "@arcgis/core/identity/IdentityManager.js";
4
4
  import "@arcgis/core/portal/Portal.js";
5
- import { h as I } from "./generateLayerDescriptions.js";
5
+ import "@arcgis/core/request.js";
6
+ import "@arcgis/toolkit/string";
7
+ import { i as v } from "./generateLayerDescriptions.js";
6
8
  import "@langchain/core/messages";
7
- import { s as i } from "./index.js";
9
+ import { s } from "./index.js";
10
+ import "@langchain/core/callbacks/base";
8
11
  import "@langchain/openai";
9
12
  import "@arcgis/core/config.js";
10
13
  import "@arcgis/core/core/reactiveUtils.js";
11
14
  import "@arcgis/core/layers/FeatureLayer.js";
12
- import "@arcgis/core/request.js";
13
15
  import "@langchain/core/prompts";
14
- import { f as g, z as v, A as T, B as R, C as F, D as C, E as A, F as $, I as N, J as b, K as q, L as M, g as _, r as k, M as S } from "./adapter.js";
15
- import { h as V } from "./toolCallResponse.js";
16
- import { ToolNode as j } from "@langchain/langgraph/prebuilt";
17
- const h = 0.7, z = 10, D = async (t, e) => {
16
+ import { f as g } from "./fetchService.js";
17
+ import { j as I, k as T, l as R, m as F, n as $, o as C, p as A, r as N, u as q, v as M, w as _, e as b, L as S } from "./adapter.js";
18
+ import { ToolNode as k } from "@langchain/langgraph/prebuilt";
19
+ import { r as j } from "./requireAgentServices.js";
20
+ const P = async (r, e) => {
21
+ const t = r.tool_calls ?? [];
22
+ if (t.length === 0) {
23
+ await s({ text: `LLM did not request any tool calls: ${String(r?.content)}` }, e);
24
+ return;
25
+ }
26
+ await Promise.all(
27
+ t.map(
28
+ async (a) => await s(
29
+ { text: `LLM invoked ${a.name} tool with arguments: ${JSON.stringify(a.args, null, 2)}` },
30
+ e
31
+ )
32
+ )
33
+ );
34
+ }, h = 0.7, V = 10, z = async (r, e) => {
18
35
  try {
19
- await i({ text: "Similarity search to find fields" }, e);
20
- const r = g(e, "fieldSearch"), a = g(e, "layersAndFieldsRegistry"), o = g(e, "embeddingCache"), n = await r.searchFields({
21
- text: t.agentExecutionContext.assignedTask,
22
- layerIds: t.vectorSearchLayerIds,
36
+ await s({ text: "Similarity search to find fields" }, e);
37
+ const t = g(e, "fieldSearch"), a = g(e, "layersAndFieldsRegistry"), o = g(e, "embeddingCache"), n = await t.searchFields({
38
+ text: r.agentExecutionContext.assignedTask,
39
+ layerIds: r.vectorSearchLayerIds,
23
40
  minScore: h,
24
- topResults: z,
41
+ topResults: V,
25
42
  embeddingCache: o
26
43
  }), c = n.map(({ layerId: d, results: p }) => {
27
- const y = p.map((s) => ` - ${s.name} (${s.score.toFixed(2)})`).join(`
44
+ const y = p.map((i) => ` - ${i.name} (${i.score.toFixed(2)})`).join(`
28
45
  `);
29
46
  return `${a.get(d)?.layerItem.name ?? d}:
30
47
  ${y}`;
@@ -32,128 +49,128 @@ ${y}`;
32
49
  `);
33
50
  let l;
34
51
  return n.length > 0 ? l = `Vector search completed. Matching layers and fields with scores:
35
- ${c}` : l = `No vector search results found for score over ${h}.`, await i({ text: l }, e), {
36
- ...t,
52
+ ${c}` : l = `No vector search results found for score over ${h}.`, await s({ text: l }, e), {
53
+ ...r,
37
54
  vectorSearchFieldResults: n
38
55
  };
39
- } catch (r) {
40
- throw await i(
41
- { text: `Error during vector search: ${r instanceof Error ? r.message : String(r)}` },
56
+ } catch (t) {
57
+ throw await s(
58
+ { text: `Error during vector search: ${t instanceof Error ? t.message : String(t)}` },
42
59
  e
43
- ), new Error(`Vector search failed: ${r instanceof Error ? r.message : String(r)}`);
60
+ ), new Error(`Vector search failed: ${t instanceof Error ? t.message : String(t)}`);
44
61
  }
45
- }, P = 0.7, H = async (t, e) => {
62
+ }, D = 0.7, H = async (r, e) => {
46
63
  try {
47
- await i(
48
- { text: `Similarity search to find layers: ${t.agentExecutionContext.assignedTask}` },
64
+ await s(
65
+ { text: `Similarity search to find layers: ${r.agentExecutionContext.assignedTask}` },
49
66
  e
50
67
  );
51
- const r = g(e, "layerSearch"), a = g(e, "layersAndFieldsRegistry"), o = await r.searchLayers({
52
- text: t.agentExecutionContext.assignedTask,
53
- minScore: P
68
+ const t = g(e, "layerSearch"), a = g(e, "layersAndFieldsRegistry"), o = await t.searchLayers({
69
+ text: r.agentExecutionContext.assignedTask,
70
+ minScore: D
54
71
  }), n = o.map((d) => d.id), c = o.map(({ id: d, score: p }) => `${a.get(d)?.layerItem.name ?? d} (${p.toFixed(2)})`).join(`
55
72
  `);
56
73
  let l;
57
74
  return n.length > 0 ? l = `Vector search completed. Matching layers with scores:
58
- ${c}` : l = "Vector search completed. No matching layers found.", await i({ text: l }, e), {
59
- ...t,
75
+ ${c}` : l = "Vector search completed. No matching layers found.", await s({ text: l }, e), {
76
+ ...r,
60
77
  vectorSearchLayerIds: n
61
78
  };
62
- } catch (r) {
63
- throw await i(
64
- { text: `Error during vector search: ${r instanceof Error ? r.message : String(r)}` },
79
+ } catch (t) {
80
+ throw await s(
81
+ { text: `Error during vector search: ${t instanceof Error ? t.message : String(t)}` },
65
82
  e
66
- ), new Error(`Vector search failed: ${r instanceof Error ? r.message : String(r)}`);
83
+ ), new Error(`Vector search failed: ${t instanceof Error ? t.message : String(t)}`);
67
84
  }
68
85
  }, f = [
69
- v,
86
+ I,
70
87
  T,
71
88
  R,
72
89
  F,
90
+ $,
73
91
  C,
74
92
  A,
75
- $,
76
93
  N,
77
- b,
78
94
  q,
79
- M
80
- ], x = (t, e = 3) => {
81
- const r = t.map((o, n) => o.type === "human" ? n : -1).filter((o) => o !== -1);
82
- if (r.length === 0)
95
+ M,
96
+ _
97
+ ], x = (r, e = 3) => {
98
+ const t = r.map((o, n) => o.type === "human" ? n : -1).filter((o) => o !== -1);
99
+ if (t.length === 0)
83
100
  return [];
84
- const a = r.length > e ? r[r.length - e] : r[0];
85
- return t.slice(a);
86
- }, G = async (t, e) => {
87
- await i({ text: "Requesting LLM for layer query results" }, e);
88
- const r = await _("navigation_intent_prompt");
101
+ const a = t.length > e ? t[t.length - e] : t[0];
102
+ return r.slice(a);
103
+ }, G = async (r, e) => {
104
+ await s({ text: "Requesting LLM for layer query results" }, e);
105
+ const t = await b("navigation_intent_prompt");
89
106
  if (!e?.configurable)
90
107
  throw new Error("config.configurable is required for layer query tools");
91
108
  const a = {
92
- layerFieldInfo: t.layerFieldInfo
93
- }, o = await I({
94
- promptText: r,
109
+ layerFieldInfo: r.layerFieldInfo
110
+ }, o = await v({
111
+ promptText: t,
95
112
  modelTier: "advanced",
96
113
  config: e,
97
- messages: x(t.agentExecutionContext.messages),
114
+ messages: x(r.agentExecutionContext.messages),
98
115
  inputVariables: a,
99
116
  tools: f
100
117
  });
101
- return await V(o, e), {
102
- ...t,
118
+ return await P(o, e), {
119
+ ...r,
103
120
  agentExecutionContext: {
104
- ...t.agentExecutionContext,
105
- messages: [...t.agentExecutionContext.messages, o]
121
+ ...r.agentExecutionContext,
122
+ messages: [...r.agentExecutionContext.messages, o]
106
123
  }
107
124
  };
108
125
  };
109
- async function B(t, e) {
110
- const a = await new j(f, { handleToolErrors: !1 }).invoke(
126
+ async function O(r, e) {
127
+ const a = await new k(f, { handleToolErrors: !1 }).invoke(
111
128
  {
112
- messages: x(t.agentExecutionContext.messages)
129
+ messages: x(r.agentExecutionContext.messages)
113
130
  },
114
131
  e
115
132
  ), o = a.messages.map((c) => c.text).join(`
116
133
  `);
117
- await i({ text: `Finished executing layer filter tool: ${o}` }, e);
134
+ await s({ text: `Finished executing layer filter tool: ${o}` }, e);
118
135
  const n = a.messages.map((c) => c.text).join(`
119
136
  `);
120
- return { ...t, outputMessage: n };
137
+ return { ...r, outputMessage: n };
121
138
  }
122
- const U = async (t, e) => (await i({ text: "Exiting Layer Styling agent" }, e), t), J = async (t, e) => {
139
+ const U = async (r, e) => (await s({ text: "Exiting Layer Styling agent" }, e), r), B = async (r, e) => {
123
140
  try {
124
- await i({ text: "Populating layer and field info" }, e);
125
- const r = [];
126
- for (const a of t.vectorSearchFieldResults) {
141
+ await s({ text: "Populating layer and field info" }, e);
142
+ const t = [];
143
+ for (const a of r.vectorSearchFieldResults) {
127
144
  let o = function(y) {
128
- const s = l.get(y)?.layerItem;
129
- return s ? [
130
- s.name && `Name: ${s.name}`,
131
- s.title && `Title: ${s.title}`,
132
- s.description && `Description: ${s.description}`
145
+ const i = l.get(y)?.layerItem;
146
+ return i ? [
147
+ i.name && `Name: ${i.name}`,
148
+ i.title && `Title: ${i.title}`,
149
+ i.description && `Description: ${i.description}`
133
150
  ].filter(Boolean).join(" | ") : y;
134
151
  };
135
152
  const { layerId: n, results: c } = a, l = g(e, "layersAndFieldsRegistry"), d = l.get(n)?.fieldRegistry;
136
153
  if (!d)
137
154
  continue;
138
- let p = r.find((y) => y.layerId === n);
155
+ let p = t.find((y) => y.layerId === n);
139
156
  p || (p = {
140
157
  layerId: n,
141
158
  layerSummary: o(n),
142
159
  fieldInfos: []
143
- }, r.push(p));
160
+ }, t.push(p));
144
161
  for (const y of c) {
145
- const s = d.get(y.name);
146
- s && p.fieldInfos.push(s);
162
+ const i = d.get(y.name);
163
+ i && p.fieldInfos.push(i);
147
164
  }
148
165
  }
149
- return await i({ text: "Populated layerFieldInfo" }, e), { ...t, layerFieldInfo: r };
150
- } catch (r) {
151
- throw await i({ text: "Error populating layerFieldInfo" }, e), new Error(`Error populating layerFieldInfo: ${r instanceof Error ? r.message : String(r)}`);
166
+ return await s({ text: "Populated layerFieldInfo" }, e), { ...r, layerFieldInfo: t };
167
+ } catch (t) {
168
+ throw await s({ text: "Error populating layerFieldInfo" }, e), new Error(`Error populating layerFieldInfo: ${t instanceof Error ? t.message : String(t)}`);
152
169
  }
153
- }, K = (t, e) => {
154
- const r = t.vectorSearchLayerIds ?? [];
155
- if (r.length <= 1)
156
- return { ...t, selectedLayerId: t.vectorSearchLayerIds[0] };
170
+ }, J = (r, e) => {
171
+ const t = r.vectorSearchLayerIds ?? [];
172
+ if (t.length <= 1)
173
+ return { ...r, selectedLayerId: r.vectorSearchLayerIds[0] };
157
174
  const { hitlResponse: a } = e.configurable;
158
175
  if (a?.agentId !== u.id || a.id !== "reviewLayerSelection") {
159
176
  const n = {
@@ -161,16 +178,16 @@ const U = async (t, e) => (await i({ text: "Exiting Layer Styling agent" }, e),
161
178
  id: "reviewLayerSelection",
162
179
  kind: "singleSelection",
163
180
  message: "Choose a layer to apply the styles.",
164
- metadata: [...r]
181
+ metadata: [...t]
165
182
  };
166
- throw new E(n);
183
+ throw new w(n);
167
184
  }
168
185
  let o = null;
169
186
  return Array.isArray(a.payload) && a.payload.length > 0 && (o = a.payload[0]), {
170
- ...t,
171
- selectedLayerId: o ?? t.vectorSearchLayerIds[0]
187
+ ...r,
188
+ selectedLayerId: o ?? r.vectorSearchLayerIds[0]
172
189
  };
173
- }, O = (t, e) => k(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Layer Styling Agent")(t, e), Q = () => new L(S).addNode("requireLayerStylingServices", O).addNode("vectorSearchLayers", H).addNode("layerSelectionHITL", K).addNode("vectorSearchFields", D).addNode("populateLayerFieldInfo", J).addNode("agent", G).addNode("tools", B).addNode("earlyExit", U).addEdge(w, "requireLayerStylingServices").addEdge("requireLayerStylingServices", "vectorSearchLayers").addConditionalEdges(
190
+ }, K = (r, e) => j(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Layer Styling Agent")(r, e), Q = () => new L(S).addNode("requireLayerStylingServices", K).addNode("vectorSearchLayers", H).addNode("layerSelectionHITL", J).addNode("vectorSearchFields", z).addNode("populateLayerFieldInfo", B).addNode("agent", G).addNode("tools", O).addNode("earlyExit", U).addEdge(E, "requireLayerStylingServices").addEdge("requireLayerStylingServices", "vectorSearchLayers").addConditionalEdges(
174
191
  "layerSelectionHITL",
175
192
  (e) => e.vectorSearchLayerIds.length ? "vectorSearchFields" : "earlyExit"
176
193
  ).addConditionalEdges(
@@ -188,5 +205,6 @@ const U = async (t, e) => (await i({ text: "Exiting Layer Styling agent" }, e),
188
205
  workspace: S
189
206
  };
190
207
  export {
191
- u as L
208
+ u as L,
209
+ P as h
192
210
  };
@@ -0,0 +1,15 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ const r = (e, s, a) => {
3
+ if (!(a ? e.hasAllFeaturesInView : e.hasAllFeatures))
4
+ return !1;
5
+ const n = new Set((e.availableFields ?? []).map((t) => t.toLowerCase()));
6
+ return n.has("*") ? !0 : s.every((t) => n.has(t.toLowerCase()));
7
+ };
8
+ function u(e, s) {
9
+ let a = e ?? "";
10
+ return s != null && s && (a = a ? `(${a}) AND (${s})` : s), a || null;
11
+ }
12
+ export {
13
+ r as c,
14
+ u as m
15
+ };
@@ -0,0 +1,27 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { createSkillAgent as r } from "../agents/runtime/skill/createSkillAgent.js";
3
+ import { f as n } from "./fetchAgentContext.js";
4
+ const s = ({ config: a }) => {
5
+ const { mapView: e } = n(a, ["mapView"]), t = e.map, o = Number.isFinite(e.zoom) ? e.zoom : void 0;
6
+ return JSON.stringify(
7
+ {
8
+ availableBookmarks: t.bookmarks?.map(({ name: i }) => i).filter(Boolean) ?? [],
9
+ currentZoom: o
10
+ },
11
+ null,
12
+ 2
13
+ );
14
+ }, l = [async () => (await import("./SKILL4.js")).default], p = r({
15
+ id: "navigation",
16
+ name: "Navigation Agent",
17
+ description: "Navigates the map for explicit zoom, center, address, bookmark, layer, feature, extent, scale, and viewpoint requests. Use for questions asking where a place is or to resolve an address or place as a reusable spatial anchor for a proximity request. Resolves only the location; it does not query, display, filter, or highlight feature data.",
18
+ skillLoaders: l,
19
+ modelTier: "default",
20
+ systemPrompt: "You are an ArcGIS map navigation agent.",
21
+ runtimeContextLoader: s,
22
+ fallbackMessage: "Navigation request completed.",
23
+ failureMessage: "I couldn't complete the navigation request."
24
+ });
25
+ export {
26
+ p as N
27
+ };
@@ -36,8 +36,14 @@ This is the order of preference in case of overlap:
36
36
 
37
37
  For example, "Where is Yosemite National Park". This is an address, but:
38
38
  A map that contains a bookmark with Yosemite National Park should prefer the bookmark.
39
- A map that has the National Parks layer, for example, should prefer the feature.
40
- If these do not exist, geocode and go to that address.
39
+ If bookmark does not exist, a map that has the National Parks layer, for example, should prefer the feature.
40
+ If both of these do not exist, geocode and go to that address.
41
+
42
+ Additional mapping guidance:
43
+
44
+ - "zoom/go to [layer]" with no filter → prefer \`goToLayer\`.
45
+ - "zoom/go to [features] where/with ..." (has a condition/filter) → prefer \`goToFeatures\`.
46
+ - Explicit numeric zoom/scale/viewpoint requests → prefer the matching zoom/scale/viewpoint tool.
41
47
 
42
48
  Return the name of the tool as a string.
43
49
  `;