@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
package/LICENSE.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # Licensing
2
2
 
3
- COPYRIGHT © Esri
3
+ COPYRIGHT Esri
4
4
 
5
5
  All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
6
 
7
- This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
7
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
8
8
  You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
9
9
 
10
+ See use restrictions at https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf.
11
+
10
12
  For additional information, contact:
11
13
  Environmental Systems Research Institute, Inc.
12
14
  Attn: Contracts and Legal Services Department
package/README.md CHANGED
@@ -6,5 +6,5 @@ The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI component
6
6
 
7
7
  ## License
8
8
 
9
- This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.1/LICENSE.txt.
10
- For third party notices, see https://js.arcgis.com/5.1/third-party-notices.txt.
9
+ This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
10
+ For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
@@ -1,7 +1,10 @@
1
+ import type { StructuredToolInterface } from "@langchain/core/tools";
1
2
  import type { BaseAgent } from "./BaseAgent.js";
2
3
  import type { FunctionToolLike } from "./tools/FunctionTool.js";
3
4
  import type { AgentCustomState, AgentData, ZodObjectSchema } from "./types.js";
4
5
 
6
+ export type LLMAgentTool = FunctionToolLike | StructuredToolInterface;
7
+
5
8
  /**
6
9
  * LLMAgent uses a language model to generate its output based on a provided prompt template and optional tools.
7
10
  * It supports structured input and output through Zod schemas, allowing for validation and type safety. The agent's logic is defined by the prompt and the tools it has access to, making it a flexible option for a wide range of use cases.
@@ -11,9 +14,8 @@ import type { AgentCustomState, AgentData, ZodObjectSchema } from "./types.js";
11
14
  export class LLMAgent<TInput extends AgentData = AgentData, TOutput extends AgentData = AgentData> extends BaseAgent<AgentCustomState<TInput, TOutput>> {
12
15
  constructor(properties?: LLMAgentConstructProperties<TInput, TOutput>);
13
16
  /**
14
- * The inputSchema property is an optional Zod schema describing the expected structured input for the agent.
15
- * This can be used for validation of the input state before execution and also to extract variables from the input
16
- * state for prompt formatting.
17
+ * Defines the structured input fields available in the agent's graph state.
18
+ * Prompt variables are resolved directly from graph state and do not need to be declared in this schema.
17
19
  */
18
20
  accessor inputSchema: ZodObjectSchema<TInput> | undefined;
19
21
  /**
@@ -30,17 +32,17 @@ export class LLMAgent<TInput extends AgentData = AgentData, TOutput extends Agen
30
32
  accessor outputSchema: ZodObjectSchema<TOutput> | undefined;
31
33
  /**
32
34
  * Defines the prompt template the agent will use to generate its output.
33
- * This prompt can include variables that are populated from the agent's state at runtime through the input schema,
35
+ * This prompt can include variables that are populated directly from the agent's state at runtime,
34
36
  * allowing for dynamic and context-aware responses from the language model.
35
37
  *
36
- * In this example below, {location} and {weather} would be variables extracted from the agent's state according to the input schema.
38
+ * In this example below, {location} and {weather} would be variables extracted from the agent's state.
37
39
  *
38
40
  * @example "Generate a weather report for {location} based on the current {weather} conditions."
39
41
  * @required
40
42
  */
41
43
  accessor prompt: string;
42
- /** The tools property is an optional array of FunctionTools that the agent can use during execution. */
43
- accessor tools: FunctionToolLike[] | undefined;
44
+ /** The tools property is an optional array of tools that the agent can use during execution. */
45
+ accessor tools: LLMAgentTool[] | undefined;
44
46
  /**
45
47
  * Rebuilds internal workspace and createGraph wiring. This is automatically called during initialization and whenever
46
48
  * the name or description properties change, but can also be called manually if needed to refresh the agent's graph definition.
@@ -1,27 +1,30 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import "@arcgis/core/identity/IdentityManager.js";
3
3
  import "@arcgis/core/portal/Portal.js";
4
+ import "@arcgis/core/request.js";
4
5
  import { isGraphInterrupt as f } from "@langchain/langgraph/web";
5
- import { c as u } from "../chunks/generateLayerDescriptions.js";
6
+ import "@arcgis/toolkit/string";
7
+ import "../chunks/generateLayerDescriptions.js";
6
8
  import "@langchain/core/messages";
7
9
  import "@langchain/core/callbacks/dispatch/web";
10
+ import "@langchain/core/callbacks/base";
11
+ import { c } from "../chunks/aiFactory.js";
8
12
  import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
9
13
  import "@arcgis/core/layers/FeatureLayer.js";
10
- import "@arcgis/core/request.js";
11
- import { ChatPromptTemplate as S } from "@langchain/core/prompts";
12
- import { property as m, subclass as _ } from "@arcgis/core/core/accessorSupport/decorators.js";
13
- import { createAgent as h } from "langchain";
14
- import { BaseAgent as v } from "./BaseAgent.js";
14
+ import { ChatPromptTemplate as u } from "@langchain/core/prompts";
15
+ import { property as n, subclass as v } from "@arcgis/core/core/accessorSupport/decorators.js";
16
+ import { createAgent as h, providerStrategy as _ } from "langchain";
17
+ import { BaseAgent as S } from "./BaseAgent.js";
15
18
  import { convertToLangChainMiddlewares as l } from "./middlewares/middleware.js";
16
- import { c as y } from "../chunks/graph.js";
17
- import { c as T } from "../chunks/state.js";
18
- import { c as d, h as M, g as x } from "../chunks/utils.js";
19
- var P = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (t, r, s, e) => {
20
- for (var o = e > 1 ? void 0 : e ? b(r, s) : r, p = t.length - 1, i; p >= 0; p--)
21
- (i = t[p]) && (o = (e ? i(r, s, o) : i(o)) || o);
22
- return e && o && P(r, s, o), o;
19
+ import { c as T } from "../chunks/graph.js";
20
+ import { c as y } from "../chunks/state.js";
21
+ import { c as d, h as x } from "../chunks/utils.js";
22
+ var M = Object.defineProperty, P = Object.getOwnPropertyDescriptor, m = (t, e, r, s) => {
23
+ for (var o = s > 1 ? void 0 : s ? P(e, r) : e, p = t.length - 1, a; p >= 0; p--)
24
+ (a = t[p]) && (o = (s ? a(e, r, o) : a(o)) || o);
25
+ return s && o && M(e, r, o), o;
23
26
  };
24
- let a = class extends v {
27
+ let i = class extends S {
25
28
  //#region Lifecycle
26
29
  constructor(t) {
27
30
  super(t), this.modelTier = "default";
@@ -51,13 +54,16 @@ let a = class extends v {
51
54
  return [this.inputSchema, this.outputSchema].filter(Boolean);
52
55
  }
53
56
  generate() {
54
- const t = T(this.getSchemas());
55
- this._set("workspace", t);
56
- const r = this.id, s = { [r]: this._invoke.bind(this) }, e = [{ from: r, decide: () => {
57
+ const t = this.prompt ? u.fromTemplate(this.prompt).inputVariables : [], e = y(
58
+ this.getSchemas(),
59
+ t
60
+ );
61
+ this._set("workspace", e);
62
+ const r = this.id, s = { [r]: this._invoke.bind(this) }, o = [{ from: r, decide: () => {
57
63
  } }];
58
64
  this._set(
59
65
  "createGraph",
60
- () => y(s, e, t, {
66
+ () => T(s, o, e, {
61
67
  agent: this,
62
68
  entryNode: r,
63
69
  middlewares: this.middlewares
@@ -66,74 +72,71 @@ let a = class extends v {
66
72
  }
67
73
  //#endregion
68
74
  //#region Private Methods
69
- async _invoke(t, r) {
75
+ async _invoke(t, e) {
70
76
  try {
71
- return this.outputSchema ? await this._invokeStructured(t, r) : await this._invokeUnstructured(t, r);
72
- } catch (s) {
73
- if (f(s))
74
- throw s;
75
- const e = s instanceof Error ? s.message : String(s);
76
- return d({ outputMessage: e }, "failed", e);
77
+ return this.outputSchema ? await this._invokeStructured(t, e) : await this._invokeUnstructured(t, e);
78
+ } catch (r) {
79
+ if (f(r))
80
+ throw r;
81
+ const s = r instanceof Error ? r.message : String(r);
82
+ return d({ outputMessage: s }, "failed", s);
77
83
  }
78
84
  }
79
- async _invokeStructured(t, r) {
85
+ async _invokeStructured(t, e) {
80
86
  if (!this.outputSchema)
81
87
  throw new Error("Output schema is required for structured invocation.");
82
- const e = await h({
83
- model: await u({ modelTier: this.modelTier }),
88
+ const s = await h({
89
+ model: await c({ modelTier: this.modelTier }),
84
90
  systemPrompt: await this._getPromptWithInputVariables(t),
85
91
  tools: this._getTools(),
86
92
  checkpointer: !0,
87
93
  middleware: l(this.middlewares),
88
- responseFormat: this.outputSchema
89
- }).invoke({ messages: t.agentExecutionContext.messages }, r);
90
- if (!("structuredResponse" in e) || e.structuredResponse === void 0)
94
+ responseFormat: _(this.outputSchema)
95
+ }).invoke({ messages: t.agentExecutionContext.messages }, e);
96
+ if (!("structuredResponse" in s) || s.structuredResponse === void 0)
91
97
  throw new Error("LLMAgent did not receive structured output from createAgent.");
92
- return M(e.structuredResponse, this.outputSchema, e.messages);
98
+ return x(s.structuredResponse, this.outputSchema, s.messages);
93
99
  }
94
- async _invokeUnstructured(t, r) {
100
+ async _invokeUnstructured(t, e) {
95
101
  const o = (await h({
96
- model: await u({ modelTier: this.modelTier }),
102
+ model: await c({ modelTier: this.modelTier }),
97
103
  systemPrompt: await this._getPromptWithInputVariables(t),
98
104
  tools: this._getTools(),
99
105
  checkpointer: !0,
100
106
  middleware: l(this.middlewares)
101
- }).invoke({ messages: t.agentExecutionContext.messages }, r)).messages, i = o.at(-1)?.content ?? "", c = typeof i == "string" ? i : JSON.stringify(i), g = c.trim() || "LLMAgent completed.";
107
+ }).invoke({ messages: t.agentExecutionContext.messages }, e)).messages, a = o.at(-1)?.text ?? "", g = a.trim() || "LLMAgent completed.";
102
108
  return d(
103
- { agentExecutionContext: { ...t.agentExecutionContext, messages: o }, outputMessage: c },
109
+ { agentExecutionContext: { ...t.agentExecutionContext, messages: o }, outputMessage: a },
104
110
  "success",
105
111
  g
106
112
  );
107
113
  }
108
114
  async _getPromptWithInputVariables(t) {
109
- const r = x(t, this.inputSchema);
110
- for (const { outputKey: e } of this.middlewares)
111
- e && (r[String(e)] = t[e]);
112
- return await S.fromTemplate(this.prompt).format(r);
115
+ return await u.fromTemplate(this.prompt).format(t);
113
116
  }
114
117
  _getTools() {
115
- return this.tools?.map((t) => t.getTool()) ?? [];
118
+ return this.tools?.map((t) => "getTool" in t ? t.getTool() : t) ?? [];
116
119
  }
117
120
  //#endregion
118
121
  };
119
- n([
120
- m()
121
- ], a.prototype, "prompt", 2);
122
- n([
123
- m()
124
- ], a.prototype, "tools", 2);
125
- n([
126
- m()
127
- ], a.prototype, "inputSchema", 2);
128
- n([
129
- m()
130
- ], a.prototype, "outputSchema", 2);
131
- n([
132
- m()
133
- ], a.prototype, "modelTier", 2);
134
- a = n([
135
- _("LLMAgent")
136
- ], a);
122
+ m([
123
+ n()
124
+ ], i.prototype, "prompt", 2);
125
+ m([
126
+ n()
127
+ ], i.prototype, "tools", 2);
128
+ m([
129
+ n()
130
+ ], i.prototype, "inputSchema", 2);
131
+ m([
132
+ n()
133
+ ], i.prototype, "outputSchema", 2);
134
+ m([
135
+ n()
136
+ ], i.prototype, "modelTier", 2);
137
+ i = m([
138
+ v("LLMAgent")
139
+ ], i);
137
140
  export {
138
- a as LLMAgent
141
+ i as LLMAgent
139
142
  };
@@ -3,13 +3,12 @@ import { property as h, subclass as c } from "@arcgis/core/core/accessorSupport/
3
3
  import { watch as l } from "@arcgis/core/core/reactiveUtils.js";
4
4
  import { BaseAgent as m } from "./BaseAgent.js";
5
5
  import { c as u } from "../chunks/graph.js";
6
- import "../chunks/BaseWorkflow.js";
7
- var f = Object.defineProperty, w = Object.getOwnPropertyDescriptor, n = (e, r, s, o) => {
8
- for (var t = o > 1 ? void 0 : o ? w(r, s) : r, i = e.length - 1, a; i >= 0; i--)
9
- (a = e[i]) && (t = (o ? a(r, s, t) : a(t)) || t);
6
+ var f = Object.defineProperty, w = Object.getOwnPropertyDescriptor, p = (e, r, s, o) => {
7
+ for (var t = o > 1 ? void 0 : o ? w(r, s) : r, a = e.length - 1, i; a >= 0; a--)
8
+ (i = e[a]) && (t = (o ? i(r, s, t) : i(t)) || t);
10
9
  return o && t && f(r, s, t), t;
11
10
  };
12
- let p = class extends m {
11
+ let n = class extends m {
13
12
  //#region Lifecycle
14
13
  constructor(e) {
15
14
  super(e);
@@ -38,7 +37,7 @@ let p = class extends m {
38
37
  this._set("createGraph", r);
39
38
  else {
40
39
  const s = this.id, o = {
41
- [s]: async (i, a) => await r().compile().invoke(i, a)
40
+ [s]: async (a, i) => await r().compile().invoke(a, i)
42
41
  }, t = [{ from: s, decide: () => {
43
42
  } }];
44
43
  this._set(
@@ -53,18 +52,18 @@ let p = class extends m {
53
52
  }
54
53
  //#endregion
55
54
  };
56
- n([
55
+ p([
57
56
  h()
58
- ], p.prototype, "workflow", 2);
59
- n([
57
+ ], n.prototype, "workflow", 2);
58
+ p([
60
59
  h()
61
- ], p.prototype, "inputSchema", 2);
62
- n([
60
+ ], n.prototype, "inputSchema", 2);
61
+ p([
63
62
  h()
64
- ], p.prototype, "outputSchema", 2);
65
- p = n([
63
+ ], n.prototype, "outputSchema", 2);
64
+ n = p([
66
65
  c("WorkflowAgent")
67
- ], p);
66
+ ], n);
68
67
  export {
69
- p as WorkflowAgent
68
+ n as WorkflowAgent
70
69
  };
@@ -9,15 +9,93 @@ import type { ParallelWorkflow, ParallelWorkflowConstructProperties } from "./wo
9
9
  import type { RouterWorkflow, RouterWorkflowConstructProperties } from "./workflows/RouterWorkflow.js";
10
10
  import type { SequentialWorkflow, SequentialWorkflowConstructProperties } from "./workflows/SequentialWorkflow.js";
11
11
  import type { SwitchWorkflow, SwitchWorkflowConstructProperties } from "./workflows/SwitchWorkflow.js";
12
+ import type { RunnableConfig } from "@langchain/core/runnables";
12
13
 
13
14
  /**
14
15
  * Creates a Zod schema from a plain object schema definition.
15
16
  *
17
+ * Supports all schema field variants:
18
+ * - `string` (with optional `enum`)
19
+ * - `number`
20
+ * - `boolean`
21
+ * - `array` with primitive or nested item definitions
22
+ * - `object` with nested `fields`
23
+ *
16
24
  * @param definition
25
+ * @example
26
+ * ```ts
27
+ * const primitiveSchema = await createSchema({
28
+ * name: { type: "string", description: "Search location name", required: true },
29
+ * radius: { type: "number", description: "Search radius in miles" },
30
+ * active: { type: "boolean", description: "Whether the search is enabled" },
31
+ * });
32
+ * ```
33
+ * @example
34
+ * ```ts
35
+ * const nestedObjectSchema = await createSchema({
36
+ * query: { type: "string", description: "User search text", required: true },
37
+ * options: {
38
+ * type: "object",
39
+ * description: "Search options",
40
+ * required: true,
41
+ * fields: {
42
+ * center: {
43
+ * type: "object",
44
+ * description: "Map center point",
45
+ * fields: {
46
+ * latitude: { type: "number", description: "Center latitude", required: true },
47
+ * longitude: { type: "number", description: "Center longitude", required: true },
48
+ * },
49
+ * },
50
+ * categories: { type: "array", description: "Selected categories", itemType: "string" },
51
+ * },
52
+ * },
53
+ * });
54
+ * ```
55
+ * @example
56
+ * ```ts
57
+ * const arrayOfObjectsSchema = await createSchema({
58
+ * constraints: {
59
+ * type: "array",
60
+ * description: "Constraint rules",
61
+ * itemType: {
62
+ * type: "object",
63
+ * description: "Single constraint rule",
64
+ * fields: {
65
+ * key: { type: "string", description: "Constraint key", required: true },
66
+ * enabled: { type: "boolean", description: "Whether this rule is active" },
67
+ * values: { type: "array", description: "Rule values", itemType: "string" },
68
+ * },
69
+ * },
70
+ * },
71
+ * });
72
+ * ```
17
73
  * @since 5.1
18
74
  */
19
75
  export function createSchema<const TDefinition extends SchemaDefinition>(definition: TDefinition): Promise<ZodObjectSchema<SchemaDefinitionData<TDefinition>>>;
20
76
 
77
+ /**
78
+ * The suggestions emitted by the agent to the user interface.
79
+ *
80
+ * @since 5.1
81
+ */
82
+ export type UXSuggestion = {
83
+ /** The type of suggestion being made. */
84
+ type: string;
85
+ /** Optional additional data associated with the suggestion. */
86
+ data?: Record<string, unknown>;
87
+ };
88
+
89
+ /**
90
+ * Sends an optional UX suggestion from an agent run to the host application.
91
+ * Use this for non-blocking hints (for example, recommended next actions or UI prompts) that the app may choose to display.
92
+ *
93
+ * @param suggestion
94
+ * @param config
95
+ * @since 5.1
96
+ */
97
+ export function sendUXSuggestion(suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>;
98
+
21
99
  /**
22
100
  * Creates a FunctionAgent instance from the existing agent implementation.
23
101
  *