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

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 (371) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/agent-utils/BaseAgent.js +1 -1
  4. package/dist/agent-utils/FunctionAgent.js +1 -1
  5. package/dist/agent-utils/LLMAgent.d.ts +5 -2
  6. package/dist/agent-utils/LLMAgent.js +7 -4
  7. package/dist/agent-utils/WorkflowAgent.js +15 -16
  8. package/dist/agent-utils/index.d.ts +78 -0
  9. package/dist/agent-utils/index.js +117 -98
  10. package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
  11. package/dist/agent-utils/middlewares/middleware.js +1 -1
  12. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  13. package/dist/agent-utils/middlewares/trace.js +1 -1
  14. package/dist/agent-utils/middlewares/types.js +1 -1
  15. package/dist/agent-utils/tools/FunctionTool.js +1 -1
  16. package/dist/agent-utils/types.d.ts +13 -13
  17. package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
  18. package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
  19. package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
  20. package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
  21. package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
  22. package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
  23. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  24. package/dist/agentic-workflow/Edge.d.ts +16 -0
  25. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  26. package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
  27. package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
  28. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  29. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  30. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  31. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  32. package/dist/agentic-workflow/types.d.ts +29 -0
  33. package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
  34. package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
  35. package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
  36. package/dist/agents/runtime/skill/types.d.ts +28 -0
  37. package/dist/agents/runtime/skill/types.js +2 -0
  38. package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
  39. package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
  40. package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
  41. package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
  42. package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
  43. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +122 -0
  44. package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
  45. package/dist/agents/tools/help/listFields/adapter.js +30 -0
  46. package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
  47. package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
  48. package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
  49. package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
  50. package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
  51. package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
  52. package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
  53. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
  54. package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
  55. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
  56. package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
  57. package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
  58. package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
  59. package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
  60. package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
  61. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
  62. package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
  63. package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
  64. package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
  65. package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
  66. package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
  67. package/dist/agents/tools/query/getStatistics/adapter.js +158 -0
  68. package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
  69. package/dist/agents/tools/query/getTopFeatures/adapter.js +145 -0
  70. package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
  71. package/dist/agents/tools/query/queryFeatures/adapter.js +131 -0
  72. package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
  73. package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
  74. package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
  75. package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
  76. package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
  77. package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
  78. package/dist/agents/tools/shared/types.d.ts +22 -0
  79. package/dist/agents/tools/shared/types.js +6 -0
  80. package/dist/cdn/24EIZVUM.js +2 -0
  81. package/dist/cdn/25MBI4PD.js +2 -0
  82. package/dist/cdn/275FFTBE.js +2 -0
  83. package/dist/cdn/27CK3JHY.js +2 -0
  84. package/dist/cdn/2F4TPWZQ.js +2 -0
  85. package/dist/cdn/2LVYAXHG.js +44 -0
  86. package/dist/cdn/2UJPYWWZ.js +3 -0
  87. package/dist/cdn/2WXXSZP5.js +2 -0
  88. package/dist/cdn/{Q7TL5Q5N.js → 3KNLFIM3.js} +2 -2
  89. package/dist/cdn/3PPXAIRE.js +14 -0
  90. package/dist/cdn/45BDE3MG.js +2 -0
  91. package/dist/cdn/477I66FH.js +56 -0
  92. package/dist/cdn/4CFCV47G.js +2 -0
  93. package/dist/cdn/4IWDBEMN.js +34 -0
  94. package/dist/cdn/4OI4QEV7.js +6 -0
  95. package/dist/cdn/{DXVU45KM.js → 4VBOTWC3.js} +2 -2
  96. package/dist/cdn/4YOG5F3W.js +2 -0
  97. package/dist/cdn/53KIFJFA.js +4 -0
  98. package/dist/cdn/5X23DDDZ.js +2 -0
  99. package/dist/cdn/65LCK3GG.js +3 -0
  100. package/dist/cdn/6KWGSXIN.js +2 -0
  101. package/dist/cdn/7DOYUO7L.js +71 -0
  102. package/dist/cdn/{WAIFKDR3.js → 7UBTNDV6.js} +2 -2
  103. package/dist/cdn/7Y43R7QJ.js +2 -0
  104. package/dist/cdn/A6LBMS7A.js +2 -0
  105. package/dist/cdn/AP3KPOHN.js +2 -0
  106. package/dist/cdn/AUCKEB52.js +2 -0
  107. package/dist/cdn/B3HXSEBN.js +2 -0
  108. package/dist/cdn/BBEGLIZC.js +2 -0
  109. package/dist/cdn/BJMGT6GV.js +19 -0
  110. package/dist/cdn/BTOBEN7Q.js +2 -0
  111. package/dist/cdn/BTTCBEPW.js +2 -0
  112. package/dist/cdn/BVUCNXC5.js +2 -0
  113. package/dist/cdn/CAOMMQSY.js +66 -0
  114. package/dist/cdn/CKUUYQLO.js +2 -0
  115. package/dist/cdn/{ZEYIBYSF.js → CSE6BHOJ.js} +2 -2
  116. package/dist/cdn/CX2HJ67C.js +2 -0
  117. package/dist/cdn/EGRRZTF6.js +2 -0
  118. package/dist/cdn/EK3PM4L5.js +2 -0
  119. package/dist/cdn/EXMEB4X2.js +2 -0
  120. package/dist/cdn/EYGZJKVD.js +2 -0
  121. package/dist/cdn/{24QNMEFG.js → FDRAKF5D.js} +2 -2
  122. package/dist/cdn/FHBRXZLV.js +2 -0
  123. package/dist/cdn/{5CV7R5IS.js → FK2CVSXW.js} +6 -6
  124. package/dist/cdn/FLUI6GCU.js +2 -0
  125. package/dist/cdn/{ZTBA5PM7.js → FPH52WOH.js} +2 -2
  126. package/dist/cdn/FRYS2PZJ.js +2 -0
  127. package/dist/cdn/FSLQCZRN.js +2 -0
  128. package/dist/cdn/{LQ6R5YRN.js → FTTLFIBV.js} +2 -2
  129. package/dist/cdn/FV6FHLYW.js +2 -0
  130. package/dist/cdn/G24MNC7D.js +6 -0
  131. package/dist/cdn/{F6QHMKF5.js → GW3IVAAZ.js} +2 -2
  132. package/dist/cdn/HI3XKFHD.js +2 -0
  133. package/dist/cdn/HKIA5PWU.js +2 -0
  134. package/dist/cdn/{6ZW7Z36F.js → HMMYCSOK.js} +4 -4
  135. package/dist/cdn/HNTSDY3J.js +2 -0
  136. package/dist/cdn/HV7MVIQV.js +2 -0
  137. package/dist/cdn/I3SUE2TR.js +2 -0
  138. package/dist/cdn/I72ST4JR.js +134 -0
  139. package/dist/cdn/{T537PKP4.js → IHUWQOMK.js} +2 -2
  140. package/dist/cdn/JMXXRRKQ.js +22 -0
  141. package/dist/cdn/JUNMTIB3.js +2 -0
  142. package/dist/cdn/{6YMR4QSD.js → JYNHWJUZ.js} +2 -2
  143. package/dist/cdn/KAX4A7SF.js +2 -0
  144. package/dist/cdn/KBSXHSBX.js +2 -0
  145. package/dist/cdn/KKCLHXHG.js +2 -0
  146. package/dist/cdn/L2HLFWCV.js +72 -0
  147. package/dist/cdn/{7RCQFLPP.js → L3BTURBA.js} +2 -2
  148. package/dist/cdn/LBTGOMCT.js +2 -0
  149. package/dist/cdn/LIRT72WY.js +2 -0
  150. package/dist/cdn/LL324IL6.js +2 -0
  151. package/dist/cdn/LLY5A2E2.js +2 -0
  152. package/dist/cdn/LXIKAXUT.js +2 -0
  153. package/dist/cdn/M2U456J5.js +181 -0
  154. package/dist/cdn/M3KKORBG.js +2 -0
  155. package/dist/cdn/M5B6X46F.js +2 -0
  156. package/dist/cdn/{X2ZDYHCG.js → MZUDIQQH.js} +11 -6
  157. package/dist/cdn/NBDOPGSN.js +2 -0
  158. package/dist/cdn/NGR5NVZE.js +2 -0
  159. package/dist/cdn/{5ZZGKP7N.js → NNPA3NLK.js} +2 -2
  160. package/dist/cdn/NV7CL4S3.js +2 -0
  161. package/dist/cdn/{5W7S2RS4.js → OALQBAZR.js} +2 -2
  162. package/dist/cdn/OF3TAARW.js +2 -0
  163. package/dist/cdn/{AZGGTNA3.js → OXC2WP7W.js} +2 -2
  164. package/dist/cdn/PJPP6LOS.js +3 -0
  165. package/dist/cdn/PUZ6RAFQ.js +2 -0
  166. package/dist/cdn/QAX6UF4L.js +99 -0
  167. package/dist/cdn/{NE7E52YR.js → QTEPFTAU.js} +10 -4
  168. package/dist/cdn/ROS22KOA.js +2 -0
  169. package/dist/cdn/RSM7MEVT.js +9 -0
  170. package/dist/cdn/SBNNJ5WA.js +2 -0
  171. package/dist/cdn/SDX46GZY.js +2 -0
  172. package/dist/cdn/SI22EJLC.js +2 -0
  173. package/dist/cdn/SJMAKF4P.js +2 -0
  174. package/dist/cdn/SNG3WODY.js +2 -0
  175. package/dist/cdn/STOGCXJH.js +2 -0
  176. package/dist/cdn/SUC2MIGE.js +2 -0
  177. package/dist/cdn/SXYKNDOF.js +2 -0
  178. package/dist/cdn/SZ2L5556.js +2 -0
  179. package/dist/cdn/T6W6F4TF.js +2 -0
  180. package/dist/cdn/TB2GJALS.js +2 -0
  181. package/dist/cdn/TFAJNKBC.js +2 -0
  182. package/dist/cdn/TLPZELG3.js +2 -0
  183. package/dist/cdn/TXZQZR3I.js +2 -0
  184. package/dist/cdn/UAZPINUQ.js +2 -0
  185. package/dist/cdn/UGIHS7OA.js +2 -0
  186. package/dist/cdn/{FX7UOGHP.js → V266DJ5V.js} +2 -2
  187. package/dist/cdn/V4PJMCJZ.js +2 -0
  188. package/dist/cdn/{P7DG5T3Z.js → V52GSTOC.js} +2 -2
  189. package/dist/cdn/VGLBH473.js +2 -0
  190. package/dist/cdn/VK6CCPTG.js +2 -0
  191. package/dist/cdn/{ZS2TZ6BF.js → VLPELJUS.js} +2 -2
  192. package/dist/cdn/VT5EWFH7.js +2 -0
  193. package/dist/cdn/{7CYGX4F4.js → VXLKTQ36.js} +2 -2
  194. package/dist/cdn/W54XYT2A.js +2 -0
  195. package/dist/cdn/X42ACC66.js +5 -0
  196. package/dist/cdn/XNUWVZN7.js +2 -0
  197. package/dist/cdn/XOTPSCNF.js +2 -0
  198. package/dist/cdn/XRVGYRXL.js +14 -0
  199. package/dist/cdn/XV7RMYLR.js +2 -0
  200. package/dist/cdn/XVJFPZTW.js +2 -0
  201. package/dist/cdn/XZF7Y6B2.js +2 -0
  202. package/dist/cdn/{UPEEHMSY.js → Y4TYL2AL.js} +2 -2
  203. package/dist/cdn/Y4ZOB6UH.js +2 -0
  204. package/dist/cdn/Y6CV2NZR.js +2 -0
  205. package/dist/cdn/YIXASZUW.js +2 -0
  206. package/dist/cdn/YOW3YKWR.js +11 -0
  207. package/dist/cdn/{23EQTPO3.js → ZA7ZU2F7.js} +2 -2
  208. package/dist/cdn/ZJWR4W2S.js +208 -0
  209. package/dist/cdn/ZWIKFBOU.js +2 -0
  210. package/dist/cdn/ZY3JQCZQ.js +179 -0
  211. package/dist/cdn/agent-utils/index.js +2 -2
  212. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
  213. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
  214. package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
  215. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  216. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
  217. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
  218. package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
  219. package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
  220. package/dist/cdn/index.js +2 -2
  221. package/dist/chunks/BaseWorkflow.js +1 -1
  222. package/dist/chunks/SKILL.js +5 -0
  223. package/dist/chunks/SKILL2.js +5 -0
  224. package/dist/chunks/SKILL3.js +22 -0
  225. package/dist/chunks/SKILL4.js +5 -0
  226. package/dist/chunks/adapter.js +1127 -2011
  227. package/dist/chunks/aiFactory.js +94 -0
  228. package/dist/chunks/arcgisKnowledgeGraph.js +97 -77
  229. package/dist/chunks/arcgisToolRegistry.js +88 -0
  230. package/dist/chunks/arcgis_knowledge_current_lc_context.js +20 -3
  231. package/dist/chunks/arcgis_knowledge_current_map_context.js +32 -3
  232. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  233. package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
  234. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +117 -28
  235. package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
  236. package/dist/chunks/baseAgentState.js +58 -0
  237. package/dist/chunks/converterUtils.js +67 -42
  238. package/dist/chunks/dataExplorationAgent.js +19 -0
  239. package/dist/chunks/data_explore_filter_prompt.js +1 -1
  240. package/dist/chunks/data_explore_query_prompt.js +10 -5
  241. package/dist/chunks/embeddings.worker.js +1 -1
  242. package/dist/chunks/fetchAgentContext.js +13 -0
  243. package/dist/chunks/fetchService.js +10 -0
  244. package/dist/chunks/fieldStatistics.js +79 -0
  245. package/dist/chunks/field_descriptions_prompt.js +1 -1
  246. package/dist/chunks/formatFeatureAttributes.js +132 -0
  247. package/dist/chunks/generateLayerDescriptions.js +190 -311
  248. package/dist/chunks/graph.js +1 -1
  249. package/dist/chunks/helpAgent.js +34 -0
  250. package/dist/chunks/help_prompt.js +35 -18
  251. package/dist/chunks/index.js +1 -1
  252. package/dist/chunks/intent_prompt.js +3 -3
  253. package/dist/chunks/layerStylingGraph.js +102 -84
  254. package/dist/chunks/layer_descriptions_prompt.js +1 -1
  255. package/dist/chunks/layer_styling_prompt.js +1 -1
  256. package/dist/chunks/mergeWhereClauses.js +15 -0
  257. package/dist/chunks/navigationAgent.js +27 -0
  258. package/dist/chunks/navigation_intent_prompt.js +9 -3
  259. package/dist/chunks/navigation_tool_prompt.js +1 -1
  260. package/dist/chunks/orchestrator.js +446 -235
  261. package/dist/chunks/requireAgentServices.js +11 -0
  262. package/dist/chunks/resolvePointGeometryFilter.js +92 -0
  263. package/dist/chunks/runtime.js +1 -1
  264. package/dist/chunks/slottableRequestUtils.js +1 -1
  265. package/dist/chunks/state.js +22 -28
  266. package/dist/chunks/summarize_query_response_prompt.js +1 -1
  267. package/dist/chunks/useT9n.js +1 -1
  268. package/dist/chunks/utils.js +1 -1
  269. package/dist/chunks/utils2.js +12 -12
  270. package/dist/chunks/utils3.js +1 -1
  271. package/dist/components/arcgis-assistant/customElement.d.ts +102 -1
  272. package/dist/components/arcgis-assistant/customElement.js +332 -184
  273. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  274. package/dist/components/arcgis-assistant-agent/customElement.js +533 -11
  275. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  276. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  277. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +35 -9
  278. package/dist/components/arcgis-assistant-help-agent/customElement.js +32 -9
  279. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
  280. package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -13
  281. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +13 -9
  282. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
  283. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +41 -17
  284. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +31 -8
  285. package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
  286. package/dist/components/arcgis-assistant-message/customElement.js +10 -9
  287. package/dist/components/arcgis-assistant-message-block/customElement.js +2 -2
  288. package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
  289. package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
  290. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
  291. package/dist/components/arcgis-assistant-message-loading/customElement.js +12 -11
  292. package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
  293. package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
  294. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  295. package/dist/components/arcgis-assistant-message-text/customElement.js +13 -13
  296. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +34 -10
  297. package/dist/components/arcgis-assistant-speech-input/customElement.js +35 -53
  298. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
  299. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
  300. package/dist/components/arcgis-assistant-user-message/customElement.js +16 -11
  301. package/dist/docs/api.json +1 -1
  302. package/dist/docs/docs.json +1 -1
  303. package/dist/docs/vscode.html-custom-data.json +1 -1
  304. package/dist/docs/web-types.json +1 -1
  305. package/dist/index.js +1 -1
  306. package/dist/loader.js +7 -7
  307. package/dist/oauth-callback.html +1 -1
  308. package/dist/orchestrator/models/types.d.ts +1 -0
  309. package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
  310. package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
  311. package/dist/orchestrator/types/types.d.ts +17 -0
  312. package/dist/types/lumina.d.ts +5 -4
  313. package/dist/types/preact.d.ts +5 -4
  314. package/dist/types/react.d.ts +5 -4
  315. package/dist/types/stencil.d.ts +7 -6
  316. package/dist/utils/index.d.ts +75 -39
  317. package/dist/utils/index.js +708 -84
  318. package/package.json +35 -12
  319. package/dist/cdn/34SG44C3.js +0 -72
  320. package/dist/cdn/3JGWGKT6.js +0 -2
  321. package/dist/cdn/3NBDVZ2I.js +0 -2
  322. package/dist/cdn/3VOQD2MR.js +0 -2
  323. package/dist/cdn/434TAA3J.js +0 -2
  324. package/dist/cdn/53NTYC4I.js +0 -2
  325. package/dist/cdn/5QAHYX7Y.js +0 -5
  326. package/dist/cdn/AXDZBBNL.js +0 -45
  327. package/dist/cdn/B7WJFBOZ.js +0 -2
  328. package/dist/cdn/BX7FSMUU.js +0 -56
  329. package/dist/cdn/CHPQM77M.js +0 -181
  330. package/dist/cdn/DHKUXLU3.js +0 -179
  331. package/dist/cdn/DQSEBKOX.js +0 -2
  332. package/dist/cdn/DZ2QWNUA.js +0 -3
  333. package/dist/cdn/EBISDZ5H.js +0 -2
  334. package/dist/cdn/ERL2CB2Y.js +0 -14
  335. package/dist/cdn/F2AHA4GB.js +0 -54
  336. package/dist/cdn/FUIGPHBH.js +0 -2
  337. package/dist/cdn/H2CHHGGH.js +0 -2
  338. package/dist/cdn/HWKDNS4K.js +0 -4
  339. package/dist/cdn/IMQ4TVHF.js +0 -16
  340. package/dist/cdn/IOD3GDA7.js +0 -2
  341. package/dist/cdn/IR7PTESF.js +0 -2
  342. package/dist/cdn/IRZDTYO2.js +0 -2
  343. package/dist/cdn/JIWK6QK6.js +0 -2
  344. package/dist/cdn/JLKGS6Y5.js +0 -36
  345. package/dist/cdn/K3JCH4XW.js +0 -2
  346. package/dist/cdn/KHXUWZHB.js +0 -2
  347. package/dist/cdn/KMQ3SP4I.js +0 -5
  348. package/dist/cdn/LIFK3QSD.js +0 -2
  349. package/dist/cdn/NXKKG5TK.js +0 -2
  350. package/dist/cdn/O3EN27N5.js +0 -2
  351. package/dist/cdn/O3RFFPU3.js +0 -6
  352. package/dist/cdn/PBO6FZN6.js +0 -2
  353. package/dist/cdn/Q3ZW4FYA.js +0 -3
  354. package/dist/cdn/Q6LRANX6.js +0 -2
  355. package/dist/cdn/QCSN44H4.js +0 -2
  356. package/dist/cdn/R56X6ZKR.js +0 -161
  357. package/dist/cdn/RUURNLTP.js +0 -2
  358. package/dist/cdn/T43LEBBE.js +0 -47
  359. package/dist/cdn/TR4GFL7X.js +0 -2
  360. package/dist/cdn/WNS5ZUF5.js +0 -2
  361. package/dist/cdn/X4XY5HIE.js +0 -2
  362. package/dist/cdn/XOH56EQ2.js +0 -2
  363. package/dist/cdn/XON27U6U.js +0 -2
  364. package/dist/cdn/YIMNOUTF.js +0 -2
  365. package/dist/cdn/YLN2BZ5J.js +0 -2
  366. package/dist/cdn/YUKR4AZW.js +0 -2
  367. package/dist/cdn/Z2G7MP5L.js +0 -22
  368. package/dist/chunks/dataExplorationGraph.js +0 -310
  369. package/dist/chunks/helpGraph.js +0 -126
  370. package/dist/chunks/navigationGraph.js +0 -270
  371. package/dist/chunks/toolCallResponse.js +0 -31
@@ -0,0 +1,94 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import { ChatOpenAI as E, OpenAIEmbeddings as U } from "@langchain/openai";
3
+ import p from "@arcgis/core/portal/Portal.js";
4
+ import h from "@arcgis/core/request.js";
5
+ import b from "@arcgis/core/identity/IdentityManager.js";
6
+ import { generateGuid as I } from "@arcgis/toolkit/string";
7
+ import q from "@arcgis/core/config.js";
8
+ const y = {
9
+ advanced: "gpt-5.6-sol",
10
+ default: "gpt-5.6-terra",
11
+ fast: "gpt-5.6-luna"
12
+ }, w = {
13
+ default: "text-embedding-ada-002"
14
+ }, f = /* @__PURE__ */ new Map();
15
+ let i = null;
16
+ const R = () => {
17
+ const t = p.getDefault().helperServices;
18
+ if (!t?.aiModels?.url)
19
+ throw new Error("AI Models Service URL is not defined in the portal's helper services.");
20
+ return t.aiModels.url;
21
+ }, S = async (e) => {
22
+ const t = R();
23
+ f.size === 0 && (i || (i = (async () => {
24
+ try {
25
+ (await h(`${t}/models`)).data.models.forEach((s) => f.set(s.name, s));
26
+ } catch (r) {
27
+ throw i = null, r;
28
+ }
29
+ })()), await i);
30
+ const o = f.get(e);
31
+ if (!o)
32
+ throw new Error(`Model '${e}' is not available in the discovery service.`);
33
+ return o.endpoint;
34
+ }, C = async (e = "default") => await S(y[e]), A = async (e = "default") => await S(w[e]), k = (e) => typeof e == "string" && e.length > 0 ? e : void 0, D = () => I(), F = (e) => typeof e != "string" || e.trim().length === 0 ? "MapsSDK" : `MapsSDK - ${e.trim()}`, K = (e) => {
35
+ const t = e?.configurable;
36
+ return {
37
+ conversationId: k(t?.thread_id),
38
+ abortSignal: e?.signal,
39
+ requestId: D(),
40
+ requestSource: F(q.applicationName)
41
+ };
42
+ }, L = (e) => {
43
+ if (e == null || typeof e == "string" || e instanceof FormData || e instanceof HTMLFormElement)
44
+ return e;
45
+ if (e instanceof URLSearchParams)
46
+ return e.toString();
47
+ throw new TypeError(`Unsupported request body type: ${Object.prototype.toString.call(e)}`);
48
+ }, v = async ({ config: e }) => {
49
+ const t = p.getDefault(), o = await b.getCredential(`${t.url}/sharing`);
50
+ return async (r, n) => {
51
+ const { conversationId: s, abortSignal: c, requestId: g, requestSource: l } = K(e), a = new Headers(n?.headers);
52
+ for (const m of [...a.keys()]) {
53
+ const u = m.toLowerCase();
54
+ (u === "authorization" || u === "api-key" || u.startsWith("x-stainless-")) && a.delete(m);
55
+ }
56
+ const d = o?.token;
57
+ d && d.length > 0 && a.set("X-Esri-Authorization", `Bearer ${d}`), t.isPortal || (l && l.length > 0 && a.set("X-Esri-Request-Source", l), s && s.length > 0 && a.set("X-Esri-Conversation-Id", s), g.length > 0 && a.set("X-Esri-Request-Id", g));
58
+ const M = c && n?.signal ? AbortSignal.any([c, n.signal]) : n?.signal ?? c;
59
+ return (await h(r instanceof Request ? r.url : r.toString(), {
60
+ body: L(n?.body),
61
+ headers: Object.fromEntries(a),
62
+ responseType: "native",
63
+ signal: M
64
+ })).data;
65
+ };
66
+ }, B = async (e = {}) => {
67
+ const { modelTier: t = "default", config: o } = e, r = y[t], n = await C(t);
68
+ return new E({
69
+ modelName: r,
70
+ apiKey: "dummy-key",
71
+ configuration: {
72
+ baseURL: n,
73
+ fetch: await v({ config: o })
74
+ }
75
+ });
76
+ }, j = async (e = {}) => {
77
+ const { tier: t = "default", config: o } = e, r = w[t], n = await A(t);
78
+ return new U({
79
+ modelName: r,
80
+ apiKey: "dummy-key",
81
+ configuration: {
82
+ baseURL: n,
83
+ fetch: await v({ config: o })
84
+ },
85
+ batchSize: 2048,
86
+ maxConcurrency: 10
87
+ });
88
+ };
89
+ export {
90
+ w as E,
91
+ j as a,
92
+ B as c,
93
+ A as g
94
+ };
@@ -1,54 +1,58 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { StateGraph as f, START as x, END as h, Command as k } from "@langchain/langgraph/web";
3
- import { a as b, c as _, b as K, d as A, e as T, s as v, q as S, g as u, h as q, t as c, r as M, i as C, G as E, j as m } from "./adapter.js";
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import { StateGraph as x, START as k, END as c, Command as b } from "@langchain/langgraph/web";
3
+ import { a as K, c as _, g as T, b as A, d as S, s as M, q as v, e as u, f as q, t as g, h as C, G as E, i as m } from "./adapter.js";
4
4
  import "@arcgis/core/identity/IdentityManager.js";
5
5
  import "@arcgis/core/portal/Portal.js";
6
- import { h as G, e as N } from "./generateLayerDescriptions.js";
7
- import { AIMessage as R } from "@langchain/core/messages";
6
+ import "@arcgis/core/request.js";
7
+ import "@arcgis/toolkit/string";
8
+ import { i as G, a as N } from "./generateLayerDescriptions.js";
9
+ import { AIMessage as y } from "@langchain/core/messages";
8
10
  import "@langchain/core/callbacks/dispatch/web";
11
+ import "@langchain/core/callbacks/base";
9
12
  import "@langchain/openai";
10
13
  import "@arcgis/core/config.js";
11
14
  import "@arcgis/core/core/reactiveUtils.js";
12
15
  import "@arcgis/core/layers/FeatureLayer.js";
13
- import "@arcgis/core/request.js";
14
- import { ToolNode as L } from "@langchain/langgraph/prebuilt";
15
- import { s as p, a as D } from "./index.js";
16
+ import { ToolNode as R } from "@langchain/langgraph/prebuilt";
17
+ import { s as p, a as L } from "./index.js";
16
18
  import "@langchain/core/prompts";
19
+ import { r as z } from "./requireAgentServices.js";
17
20
  const w = [
18
- b,
19
- _,
20
21
  K,
21
- A,
22
+ _,
22
23
  T,
23
- v,
24
- S
24
+ A,
25
+ S,
26
+ M,
27
+ v
25
28
  ];
26
- async function z(e, a) {
27
- const i = await u("arcgis_knowledge_tool_prompt"), o = q(a), n = {
29
+ async function D(e, t) {
30
+ const o = await u("arcgis_knowledge_tool_prompt"), s = q(t), n = {
28
31
  assignedTask: e.agentExecutionContext.assignedTask,
29
32
  userRequest: e.agentExecutionContext.userRequest,
30
33
  priorSteps: e.agentExecutionContext.priorSteps,
31
- contextType: o
32
- }, s = await G({
33
- promptText: i,
34
+ contextType: s
35
+ }, r = await G({
36
+ promptText: o,
34
37
  messages: e.arcgisKnowledgeMessages,
35
38
  inputVariables: n,
36
- tools: w
37
- }), l = (s.tool_calls?.length ?? 0) > 0, t = typeof s.text == "string" ? s.text.trim() : "", r = t.length > 0, d = s.content.toString();
38
- return !l && (o === "map" || o === "knowledgeGraph") ? {
39
+ tools: w,
40
+ config: t
41
+ }), l = (r.tool_calls?.length ?? 0) > 0, a = typeof r.text == "string" ? r.text.trim() : "", i = a.length > 0, d = r.content.toString();
42
+ return !l && (s === "map" || s === "knowledgeGraph") ? {
39
43
  ...e,
40
- arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, s],
41
- outputMessage: o === "map" ? "No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries." : "No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",
44
+ arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, r],
45
+ outputMessage: s === "map" ? "No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries." : "No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",
42
46
  status: "success"
43
47
  } : {
44
48
  ...e,
45
- arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, s],
46
- outputMessage: l ? d : t,
47
- status: l ? e.status : r ? "success" : "failed",
48
- summary: d ? c(d) : "ArcGIS Knowledge Agent tool executed."
49
+ arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, r],
50
+ outputMessage: l ? d : a,
51
+ status: l ? e.status : i ? "success" : "failed",
52
+ summary: d ? g(d) : "ArcGIS Knowledge Agent tool executed."
49
53
  };
50
54
  }
51
- const y = {
55
+ const f = {
52
56
  generateCypher: "generated-cypher-query",
53
57
  queryGraphData: "graph-query-result",
54
58
  searchGraphData: "graph-search-result",
@@ -58,110 +62,126 @@ const y = {
58
62
  createLinkChart: "created-link-chart"
59
63
  };
60
64
  function F(e) {
61
- return !!e && e.status === "success" && !!y[e.toolName];
65
+ return !!e && e.status === "success" && !!f[e.toolName];
62
66
  }
63
67
  function $(e) {
64
68
  return {
65
- type: y[e.toolName],
69
+ type: f[e.toolName],
66
70
  data: e.details
67
71
  };
68
72
  }
69
- async function I(e, a) {
70
- const i = new L(w, { handleToolErrors: !1 });
73
+ async function I(e, t) {
74
+ const o = new R(w, { handleToolErrors: !1 });
71
75
  try {
72
- const o = await i.invoke(
76
+ const s = await o.invoke(
73
77
  {
74
78
  messages: e.arcgisKnowledgeMessages
75
79
  },
76
- a
80
+ t
77
81
  ), n = [];
78
- for (const t of o.messages) {
79
- let r;
80
- if (typeof t.content != "string")
81
- throw new Error(`Unexpected tool message content type: ${typeof t.content}. Expected string.`);
82
+ for (const a of s.messages) {
83
+ let i;
84
+ if (typeof a.content != "string")
85
+ throw new Error(`Unexpected tool message content type: ${typeof a.content}. Expected string.`);
82
86
  try {
83
- r = JSON.parse(t.content);
87
+ i = JSON.parse(a.content);
84
88
  } catch {
85
89
  throw new Error(
86
- `Failed to parse tool message content as JSON. Tool: ${t.name ?? "unknown"}.
90
+ `Failed to parse tool message content as JSON. Tool: ${a.name ?? "unknown"}.
87
91
 
88
- Original Content: ${t.content}`
92
+ Original Content: ${a.content}`
89
93
  );
90
94
  }
91
- if (!r || typeof r != "object" || !("toolName" in r))
95
+ if (!i || typeof i != "object" || !("toolName" in i))
92
96
  throw new Error(
93
- `Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(r)}`
97
+ `Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(i)}`
94
98
  );
95
- n.push(r);
99
+ n.push(i);
96
100
  }
97
101
  await p(
98
102
  {
99
- text: `Finished executing ArcGIS Knowledge Agent tools: ${o.messages.filter((t) => t.name).map((t) => t.name).join(", ")}`
103
+ text: `Finished executing ArcGIS Knowledge Agent tools: ${s.messages.filter((a) => a.name).map((a) => a.name).join(", ")}`
100
104
  },
101
- a
105
+ t
102
106
  );
103
- const s = n.filter((t) => typeof t != "string").map((t) => `- Called Tool: ${t.toolName}, Status: ${t.status}`), l = n[0];
104
- return l && F(l) && await D($(l), a), {
107
+ const r = n.filter((a) => typeof a != "string").map((a) => `- Called Tool: ${a.toolName}, Status: ${a.status}`), l = n[0];
108
+ return l && F(l) && await L($(l), t), {
105
109
  ...e,
106
- outputMessage: s.join(`
110
+ outputMessage: r.join(`
107
111
  `),
108
- summary: s.length ? c(s.join(`
112
+ summary: r.length ? g(r.join(`
109
113
  `)) : "ArcGIS Knowledge Agent did not execute any tools or return any results.",
110
- arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, ...o.messages],
114
+ arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, ...s.messages],
111
115
  arcgisKnowledgeToolResult: n
112
116
  };
113
- } catch (o) {
114
- const n = o instanceof Error ? o.message : String(o);
117
+ } catch (s) {
118
+ const n = s instanceof Error ? s.message : String(s);
115
119
  return await p(
116
120
  { text: `ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}` },
117
- a
121
+ t
118
122
  ), {
119
123
  ...e,
120
124
  outputMessage: `ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`,
121
125
  status: "failed",
122
- summary: c(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`),
126
+ summary: g(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`),
123
127
  arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages]
124
128
  };
125
129
  }
126
130
  }
127
- const V = (e, a) => (
131
+ const V = (e, t) => (
128
132
  //agent services (ex: embeddingsWorker) would go in the array below, if required.
129
- M([], "ArcgisKnowledge Agent")(e, a)
133
+ z([], "ArcgisKnowledge Agent")(e, t)
130
134
  );
131
- async function j(e, a) {
132
- const o = (e.arcgisKnowledgeToolResult ?? []).map((d) => ({
135
+ async function O(e, t) {
136
+ const s = (e.arcgisKnowledgeToolResult ?? []).map((d) => ({
133
137
  ...d,
134
138
  details: void 0
135
139
  // Remove details to avoid overwhelming the LLM with too much info
136
- })), { knowledgeGraph: n } = await C(a), s = E.getDataModelTypesSummary(n.dataModel), l = {
140
+ })), { knowledgeGraph: n } = await C(t), r = E.getDataModelTypesSummary(n.dataModel), l = {
137
141
  assignedTask: e.agentExecutionContext.assignedTask,
138
142
  userRequest: e.agentExecutionContext.userRequest,
139
- toolResult: o,
140
- dataModelSummary: s
141
- }, t = await N({
143
+ toolResult: s,
144
+ dataModelSummary: r
145
+ }, a = await N({
142
146
  promptText: await u("arcgis_knowledge_summarize_result_prompt"),
143
147
  modelTier: "default",
144
- inputVariables: l
145
- }), r = typeof t == "string" ? t : t.content;
148
+ inputVariables: l,
149
+ config: t
150
+ }), i = typeof a == "string" ? a : a.content;
151
+ return {
152
+ ...e,
153
+ outputMessage: i,
154
+ status: "success",
155
+ summary: g(i),
156
+ arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, new y(i)]
157
+ };
158
+ }
159
+ async function P(e) {
160
+ const t = e.arcgisKnowledgeToolResult?.[0], o = t?.status === "success" ? t.summary : "ArcGIS Knowledge Agent tool execution failed.";
146
161
  return {
147
162
  ...e,
148
- outputMessage: r,
163
+ outputMessage: o,
149
164
  status: "success",
150
- summary: c(r),
151
- arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, new R(r)]
165
+ summary: g(o),
166
+ arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, new y(o)]
152
167
  };
153
168
  }
154
- function g(e) {
155
- return async (a, i) => i?.configurable?.abortSignal?.aborted ? (await p({ text: "Knowledge Agent execution cancelled" }, i), new k({
156
- goto: h,
169
+ function h(e) {
170
+ return async (t, o) => o?.signal?.aborted ? (await p({ text: "Knowledge Agent execution cancelled" }, o), new b({
171
+ goto: c,
157
172
  update: {
158
173
  outputMessage: "Knowledge Agent execution cancelled",
159
174
  summary: "Knowledge Agent execution cancelled",
160
175
  status: "failed"
161
176
  }
162
- })) : await e(a, i);
177
+ })) : await e(t, o);
163
178
  }
164
- const O = () => new f(m).addNode("requireArcgisKnowledgeServices", V).addNode("agent", g(z)).addNode("tools", g(I)).addNode("summarizationLLM", g(j)).addEdge(x, "requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices", "agent").addConditionalEdges("agent", (a) => (a.arcgisKnowledgeMessages[a.arcgisKnowledgeMessages.length - 1]?.tool_calls?.length ?? 0) > 0 ? "tools" : h).addConditionalEdges("tools", (a) => a.status === "failed" ? h : "summarizationLLM").addEdge("summarizationLLM", h), P = String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
179
+ const j = () => new x(m).addNode("requireArcgisKnowledgeServices", V).addNode("agent", h(D)).addNode("tools", h(I)).addNode("summarizationLLM", h(O)).addNode("finalizeToolSummary", h(P)).addEdge(k, "requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices", "agent").addConditionalEdges("agent", (t) => (t.arcgisKnowledgeMessages[t.arcgisKnowledgeMessages.length - 1]?.tool_calls?.length ?? 0) > 0 ? "tools" : c).addConditionalEdges("tools", (t) => {
180
+ if (t.status === "failed")
181
+ return c;
182
+ const o = t.arcgisKnowledgeToolResult?.[0];
183
+ return o?.status === "success" && ["applyLayout", "changeNonspatialVisibility"].includes(o.toolName) ? "finalizeToolSummary" : "summarizationLLM";
184
+ }).addEdge("summarizationLLM", c).addEdge("finalizeToolSummary", c), J = String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
165
185
  This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
166
186
  For link charts, the agent enables users to interact with a link chart by adding new entities (also called nodes) or relationships (also called edges), removing existing entities or relationships,
167
187
  expanding the graph from particular entities, finding relationships between specified entities on the link chart and adding them to the link chart, finding all relationships
@@ -199,13 +219,13 @@ _example: "Discover and add all the relationships originating at 'Entity E' to t
199
219
  _example: "Show me all entities with a name similar to 'Smith' and add them to the link chart"_
200
220
  _example: "Find reports in my graph that have a title similar to 'Quarterly Earnings'"_
201
221
  _example: "Find John Smith and all people he has made phone calls to in the last year"_
202
- _example: "What is the average age of all people who work for Esri?"_`, re = {
222
+ _example: "What is the average age of all people who work for Esri?"_`, ce = {
203
223
  id: "arcgisKnowledge",
204
224
  name: "ArcgisKnowledge Agent",
205
- description: P,
206
- createGraph: O,
225
+ description: J,
226
+ createGraph: j,
207
227
  workspace: m
208
228
  };
209
229
  export {
210
- re as A
230
+ ce as A
211
231
  };
@@ -0,0 +1,88 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ const a = /* @__PURE__ */ new Map([
3
+ [
4
+ "clearFilters",
5
+ async () => (await import("../agents/tools/filter/clearFilters/adapter.js")).clearFiltersTool
6
+ ],
7
+ [
8
+ "resetMap",
9
+ async () => (await import("../agents/tools/filter/resetMap/adapter.js")).resetMapTool
10
+ ],
11
+ [
12
+ "setFeatureEffect",
13
+ async () => (await import("../agents/tools/filter/setFeatureEffect/adapter.js")).setFeatureEffectTool
14
+ ],
15
+ [
16
+ "listLayerFields",
17
+ async () => (await import("../agents/tools/help/listFields/adapter.js")).listLayerFieldsTool
18
+ ],
19
+ [
20
+ "goToAddress",
21
+ async () => (await import("../agents/tools/navigation/goToAddress/adapter.js")).goToAddressTool
22
+ ],
23
+ [
24
+ "goToBookmark",
25
+ async () => (await import("../agents/tools/navigation/goToBookmark/adapter.js")).goToBookmarkTool
26
+ ],
27
+ [
28
+ "goToFeatures",
29
+ async () => (await import("../agents/tools/navigation/goToFeatures/adapter.js")).goToFeaturesTool
30
+ ],
31
+ [
32
+ "goToFullExtent",
33
+ async () => (await import("../agents/tools/navigation/goToFullExtent/adapter.js")).goToFullExtentTool
34
+ ],
35
+ [
36
+ "goToHomeExtent",
37
+ async () => (await import("../agents/tools/navigation/goToHomeExtent/adapter.js")).goToHomeExtentTool
38
+ ],
39
+ [
40
+ "goToLayer",
41
+ async () => (await import("../agents/tools/navigation/goToLayer/adapter.js")).goToLayerTool
42
+ ],
43
+ [
44
+ "goToScale",
45
+ async () => (await import("../agents/tools/navigation/goToScale/adapter.js")).goToScaleTool
46
+ ],
47
+ [
48
+ "goToViewpoint",
49
+ async () => (await import("../agents/tools/navigation/goToViewpoint/adapter.js")).goToViewpointTool
50
+ ],
51
+ [
52
+ "goToZoom",
53
+ async () => (await import("../agents/tools/navigation/goToZoom/adapter.js")).goToZoomTool
54
+ ],
55
+ [
56
+ "findRelevantFields",
57
+ async () => (await import("../agents/tools/search/findRelevantFields/adapter.js")).findRelevantFieldsTool
58
+ ],
59
+ [
60
+ "findRelevantLayers",
61
+ async () => (await import("../agents/tools/search/findRelevantLayers/adapter.js")).findRelevantLayersTool
62
+ ],
63
+ [
64
+ "getAttribute",
65
+ async () => (await import("../agents/tools/query/getAttribute/adapter.js")).getAttributeTool
66
+ ],
67
+ [
68
+ "getStatistics",
69
+ async () => (await import("../agents/tools/query/getStatistics/adapter.js")).getStatisticsTool
70
+ ],
71
+ [
72
+ "getTopFeatures",
73
+ async () => (await import("../agents/tools/query/getTopFeatures/adapter.js")).getTopFeaturesTool
74
+ ],
75
+ [
76
+ "queryFeatures",
77
+ async () => (await import("../agents/tools/query/queryFeatures/adapter.js")).queryFeaturesTool
78
+ ]
79
+ ]);
80
+ async function e(o) {
81
+ const t = a.get(o);
82
+ if (!t)
83
+ throw new Error(`"${o}" tool not found`);
84
+ return await t();
85
+ }
86
+ export {
87
+ e as r
88
+ };
@@ -1,7 +1,24 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e = `## Additional System Context
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ const e = `## Membership Bind Parameters
3
3
 
4
- In addition to the user's inquiry prompt that precedes this system context, the current link chart has entities and relationships on it already, in the format of an array of objects containing identifiers and typeNames, in case this is needed for query generation (for example 'Add all records that are connected to people on this link chart to the link chart'). If the user is asking for a query that acts on 'the current link chart', 'my link chart', or similar then the cypher query should be filtered by the ids. For example, 'Match (n:Person)-[\\r]->(m) WHERE id(n) IN [\\'identifier1','identifier2'] return r, m. Curly braces (the '{' and '}' characters) are often part of identifier strings and should not be stripped out - the process of filtering by ids should not be altering the id strings. The entities and relationships that are on the current link chart are as follows:
4
+ The current link chart contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
5
+
6
+ - $entityIds
7
+ - $relationshipIds
8
+
9
+ If, and ONLY if, the user is asking for data to be limited by the records already on 'the current link chart', 'my link chart', or similar, the generated Cypher should filter using these parameters.
10
+
11
+ ### START EXAMPLES
12
+
13
+ User request: 'Add all records that are connected to people on this link chart to the link chart'
14
+ Context: 'Person' entity in data model.
15
+ Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
16
+
17
+ User request: 'Add all the suppliers to the link chart'
18
+ Context: 'Supplier' entity in the data model.
19
+ Expected Result: MATCH (s:Supplier) RETURN s
20
+
21
+ ### END EXAMPLES
5
22
  `;
6
23
  export {
7
24
  e as default
@@ -1,7 +1,36 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e = `## Additional System Context
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ const e = `## Membership Bind Parameters
3
3
 
4
- In addition to the user's inquiry prompt that precedes this system context, the current map has entities and relationships on it already, in the format of an array of objects containing identifiers and typeNames or type names that contain all entities or relationships of that type, in case this is needed for query generation (for example 'Add all records that are connected to people on this map to the map'). If the user is asking for a query that acts on 'the current map', 'my map', or similar then the cypher query should be filtered by the ids. For example, 'Match (n:Person)-[\\r]->(m) WHERE id(n) IN [\\'identifier1','identifier2'] return r, m. Curly braces (the '{' and '}' characters) are often part of identifier strings and should not be stripped out - the process of filtering by ids should not be altering the id strings. The entities and relationships that are on the current map are as follows:
4
+ The current map contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
5
+
6
+ - $entityIds
7
+ - $relationshipIds
8
+
9
+ Included Types:
10
+ {nonDynamicTypes}
11
+
12
+ Filtering rules:
13
+
14
+ - Apply membership filtering only when BOTH are true:
15
+ - The user is asking for data to be limited by the records already on 'the current map', 'my map', 'the knowledge graph layer' or similar.
16
+ - The variable in the cypher query is a type in Included Types above.
17
+ - IMPORTANT: In all other cases, DO NOT apply membership filtering. DO NOT include membership filters for any type not listed in Included Types above.
18
+
19
+ ### START EXAMPLES
20
+
21
+ User request: 'Add all records that are connected to people on this map to the map'
22
+ Context: 'Person' entity in data model and included in the bind parameter types above.
23
+ Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
24
+
25
+ User request: 'Add all the suppliers to the map'
26
+ Context: 'Supplier' entity in the data model.
27
+ Expected Result: MATCH (s:Supplier) RETURN s
28
+
29
+ User request: 'Add all suppliers connected to plants on my map'
30
+ Context: 'Plant' entity in data model but not included in the bind parameter types above.
31
+ Expected Result: MATCH (p:Plant)-[r]->(s:Supplier) return r, s
32
+
33
+ ### END EXAMPLES
5
34
  `;
6
35
  export {
7
36
  e as default
@@ -0,0 +1,102 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ const e = `# ArcGIS Knowledge Graph Cypher Rules
3
+
4
+ ## GOAL
5
+
6
+ Generate a Cypher query that answers the user’s request and conforms to the data model.
7
+
8
+ ---
9
+
10
+ ## 1. USER OVERRIDES (HIGHEST PRIORITY)
11
+
12
+ If the user specifies any of the following, ALWAYS follow their instructions over defaults:
13
+
14
+ - LIMIT (or no limit)
15
+ - Output columns / data model
16
+ - Inclusion/exclusion of globalid
17
+ - Ordering, grouping, filtering, projection
18
+
19
+ ---
20
+
21
+ ## 2. DATA MODEL CONFORMANCE (NON-NEGOTIABLE)
22
+
23
+ Use ONLY valid data model elements.
24
+
25
+ ### Required
26
+
27
+ - Use only valid entity types, relationship types, and properties
28
+ - Ensure relationships connect valid entity types
29
+ - infer direction from user prompt. if not clear use the least restrictive valid form supported by the model.
30
+
31
+ ### VALIDATION RULES (STRICT)
32
+
33
+ - Enforce exact schema match: all entities, relationships, and properties must exist exactly in the data model
34
+ - Validate relationship integrity: types, source→target pairing, and direction must match schema
35
+ - Enforce field correctness: properties and filters must exist on the referenced type and use valid data types
36
+ - Ensure alias consistency: each alias maps to one type only and cannot change meaning
37
+ - Apply strict failure: if any component is invalid, do NOT generate the query and do NOT infer or repair
38
+
39
+ ## 4. PATH RESOLUTION
40
+
41
+ - First attempt a direct relationship
42
+ - If none exists → use a valid multi-hop path
43
+ - Each hop MUST be valid in the data model
44
+ - Max path length: 3 (unless user requests more)
45
+
46
+ ### Path selection
47
+
48
+ - Prefer shortest valid path
49
+ - If multiple valid paths exist → choose best match to user intent
50
+ - If no valid path exists → do not speculate
51
+
52
+ ---
53
+
54
+ ## 5. PERFORMANCE
55
+
56
+ - Use the minimal number of entities and relationships
57
+ - Prefer shortest valid path
58
+ - Avoid unnecessary patterns or complexity
59
+
60
+ ---
61
+
62
+ ## 6. CYPHER RULES
63
+
64
+ - UNION queries must return identical columns
65
+ - Apply LIMIT only after UNION (not inside subqueries)
66
+ - Do NOT use: OVER, REDUCE()
67
+ - Do NOT use reserved keywords as variables (call, match, return, as etc.)
68
+ - Use only valid openCypher syntax
69
+ - After OPTIONAL MATCH, always add:
70
+ WITH ...
71
+ WHERE var IS NOT NULL
72
+ before using var in any MATCH or relationship pattern.
73
+
74
+ ---
75
+
76
+ ## 7. SPATIAL RULES
77
+
78
+ - Prefer graph relationships over spatial functions
79
+ - Use spatial functions only when necessary
80
+ - Always ensure geometry is not null if using spatial functions
81
+ - for example: WHERE n.shape IS NOT NULL
82
+
83
+ ---
84
+
85
+ ## 9. DEFAULT OUTPUT (IF NOT SPECIFIED)
86
+
87
+ - Add LIMIT 50 unless results are clearly small
88
+ - Use descriptive aliases with AS
89
+ - ALWAYS Return full entities and relationships unless user requests specific properties
90
+
91
+ ---
92
+
93
+ ## 11. OUTPUT FORMAT
94
+
95
+ - Valid → return ONLY Cypher query
96
+ - No explanation
97
+
98
+ ---
99
+ `;
100
+ export {
101
+ e as default
102
+ };
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  const e = `## ArcgisKnowledge Agent - Lucene Generation for Graph Search
3
3
 
4
4
  You are an assistant that generates a lucene query for graph query searching.