@arcgis/ai-components 5.2.0-next.8 → 5.2.0-next.84

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 (313) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/agent-utils/FunctionAgent.d.ts +2 -2
  4. package/dist/agent-utils/LLMAgent.d.ts +7 -4
  5. package/dist/agent-utils/LLMAgent.js +3 -2
  6. package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
  7. package/dist/agent-utils/index.d.ts +177 -0
  8. package/dist/agent-utils/index.js +167 -0
  9. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  10. package/dist/agent-utils/middlewares/trace.js +25 -33
  11. package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
  12. package/dist/agent-utils/types.d.ts +37 -8
  13. package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
  14. package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
  15. package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
  16. package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
  17. package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
  18. package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
  19. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  20. package/dist/agentic-workflow/Edge.d.ts +16 -0
  21. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  22. package/dist/agentic-workflow/jsonTypes.d.ts +183 -0
  23. package/dist/agentic-workflow/nodes/AgentNode.d.ts +27 -0
  24. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  25. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  26. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  27. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  28. package/dist/agentic-workflow/types.d.ts +29 -0
  29. package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
  30. package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
  31. package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
  32. package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
  33. package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
  34. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +109 -0
  35. package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
  36. package/dist/agents/tools/help/listFields/adapter.js +30 -0
  37. package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
  38. package/dist/agents/tools/navigation/goToAddress/adapter.js +52 -0
  39. package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
  40. package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
  41. package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
  42. package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
  43. package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
  44. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
  45. package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
  46. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
  47. package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
  48. package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
  49. package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
  50. package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
  51. package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
  52. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
  53. package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
  54. package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
  55. package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
  56. package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
  57. package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
  58. package/dist/agents/tools/query/getStatistics/adapter.js +154 -0
  59. package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
  60. package/dist/agents/tools/query/getTopFeatures/adapter.js +141 -0
  61. package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
  62. package/dist/agents/tools/query/queryFeatures/adapter.js +127 -0
  63. package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
  64. package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
  65. package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
  66. package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
  67. package/dist/cdn/2EY3BQQX.js +2 -0
  68. package/dist/cdn/34O57OGV.js +2 -0
  69. package/dist/cdn/3POGAH2X.js +2 -0
  70. package/dist/cdn/3SEKXQVK.js +9 -0
  71. package/dist/cdn/{AMP6IALT.js → 3UEKINYC.js} +1 -1
  72. package/dist/cdn/434TAA3J.js +2 -0
  73. package/dist/cdn/4HDDRBIY.js +2 -0
  74. package/dist/cdn/4NJ2FF7H.js +2 -0
  75. package/dist/cdn/4OGR5QKS.js +2 -0
  76. package/dist/cdn/4QGVOLW6.js +22 -0
  77. package/dist/cdn/4WIDLQUH.js +2 -0
  78. package/dist/cdn/5WYRJMBW.js +2 -0
  79. package/dist/cdn/5X7EG7D2.js +2 -0
  80. package/dist/cdn/5ZFUGNRN.js +2 -0
  81. package/dist/cdn/6HF36IKA.js +2 -0
  82. package/dist/cdn/6KFMRBAA.js +2 -0
  83. package/dist/cdn/6NHYXISD.js +2 -0
  84. package/dist/cdn/6U4GTCLJ.js +66 -0
  85. package/dist/cdn/7BCQMK6D.js +2 -0
  86. package/dist/cdn/7FY7WAA5.js +2 -0
  87. package/dist/cdn/7GMCLVSZ.js +2 -0
  88. package/dist/cdn/7M6VKBTK.js +6 -0
  89. package/dist/cdn/{GGSZM7KV.js → 7Q5EESAR.js} +6 -4
  90. package/dist/cdn/7SRLZQVC.js +5 -0
  91. package/dist/cdn/7TXR75RG.js +2 -0
  92. package/dist/cdn/7V6OSTFC.js +2 -0
  93. package/dist/cdn/7VAQUCBU.js +9 -0
  94. package/dist/cdn/7ZFAFKJT.js +2 -0
  95. package/dist/cdn/ACJTJLZN.js +2 -0
  96. package/dist/cdn/AI6DYOKR.js +181 -0
  97. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  98. package/dist/cdn/APFZY4PI.js +2 -0
  99. package/dist/cdn/AT4XVTJR.js +44 -0
  100. package/dist/cdn/AZ5G7YZH.js +3 -0
  101. package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
  102. package/dist/cdn/BM3WFHJG.js +2 -0
  103. package/dist/cdn/{DHOVCT6R.js → BPCBE7J6.js} +1 -1
  104. package/dist/cdn/CCC6LBMY.js +2 -0
  105. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  106. package/dist/cdn/CJMUJXPL.js +2 -0
  107. package/dist/cdn/CP5BVGJU.js +2 -0
  108. package/dist/cdn/CZM4URK7.js +2 -0
  109. package/dist/cdn/DPALM2OW.js +2 -0
  110. package/dist/cdn/E7JZ7GUW.js +18 -0
  111. package/dist/cdn/EMLOVMD4.js +2 -0
  112. package/dist/cdn/EWLXNGKH.js +208 -0
  113. package/dist/cdn/F2J6BMMX.js +36 -0
  114. package/dist/cdn/FAR3DFFK.js +2 -0
  115. package/dist/cdn/FDOMMK2M.js +2 -0
  116. package/dist/cdn/{ZLXN7NMF.js → FYZATVB3.js} +10 -8
  117. package/dist/cdn/GFEOVHJK.js +2 -0
  118. package/dist/cdn/HDM2D2GD.js +2 -0
  119. package/dist/cdn/HHFNQR6Z.js +2 -0
  120. package/dist/cdn/HMUWQCXU.js +2 -0
  121. package/dist/cdn/I3ONG4AX.js +2 -0
  122. package/dist/cdn/IBZ2NEAO.js +2 -0
  123. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  124. package/dist/cdn/IFJM5XEQ.js +2 -0
  125. package/dist/cdn/IHP25JWI.js +99 -0
  126. package/dist/cdn/J6A4AS7E.js +22 -0
  127. package/dist/cdn/J6SZIQJA.js +2 -0
  128. package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
  129. package/dist/cdn/JKIESH74.js +2 -0
  130. package/dist/cdn/JO5ETMPS.js +2 -0
  131. package/dist/cdn/JWIE3YK3.js +2 -0
  132. package/dist/cdn/K2R6XVK3.js +2 -0
  133. package/dist/cdn/KITIP6J2.js +2 -0
  134. package/dist/cdn/KPO4XX6J.js +2 -0
  135. package/dist/cdn/KWD2ECTM.js +2 -0
  136. package/dist/cdn/L7XTRDFM.js +3 -0
  137. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  138. package/dist/cdn/LLUGJKAQ.js +2 -0
  139. package/dist/cdn/LMPNXXTQ.js +2 -0
  140. package/dist/cdn/LYKCYBGB.js +2 -0
  141. package/dist/cdn/{3PKJWIC3.js → M2L5R4LA.js} +1 -1
  142. package/dist/cdn/{V2P4AIGG.js → M4URMXDS.js} +1 -1
  143. package/dist/cdn/MDAKBX7N.js +2 -0
  144. package/dist/cdn/MWYBF3F3.js +66 -0
  145. package/dist/cdn/NEV6OZN3.js +71 -0
  146. package/dist/cdn/NQDOAPE3.js +2 -0
  147. package/dist/cdn/OAKRPM7D.js +2 -0
  148. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  149. package/dist/cdn/ONMNQBPO.js +2 -0
  150. package/dist/cdn/ONQ6JSBJ.js +2 -0
  151. package/dist/cdn/OWTGH34K.js +2 -0
  152. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  153. package/dist/cdn/PSYRZMX2.js +2 -0
  154. package/dist/cdn/PUHRBGKB.js +2 -0
  155. package/dist/cdn/Q57QWN5W.js +2 -0
  156. package/dist/cdn/QNNGPA3Q.js +2 -0
  157. package/dist/cdn/R74ZHFA6.js +2 -0
  158. package/dist/cdn/RBE55SWR.js +2 -0
  159. package/dist/cdn/RHYNE5OE.js +2 -0
  160. package/dist/cdn/RLEHNAIA.js +2 -0
  161. package/dist/cdn/RV55GABG.js +2 -0
  162. package/dist/cdn/RWWOOC7S.js +2 -0
  163. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  164. package/dist/cdn/T4RIGOXB.js +2 -0
  165. package/dist/cdn/TACBKKBI.js +2 -0
  166. package/dist/cdn/TMJMDCSA.js +4 -0
  167. package/dist/cdn/TPULIO6I.js +34 -0
  168. package/dist/cdn/U2D53TAX.js +14 -0
  169. package/dist/cdn/UEEH5ZQK.js +156 -0
  170. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  171. package/dist/cdn/UHZG7SKO.js +2 -0
  172. package/dist/cdn/UZLQALHY.js +2 -0
  173. package/dist/cdn/V52XWEGV.js +11 -0
  174. package/dist/cdn/V6HOUZPZ.js +2 -0
  175. package/dist/cdn/VAXH6RUQ.js +134 -0
  176. package/dist/cdn/VLLZ2FFU.js +2 -0
  177. package/dist/cdn/VNJMTA6O.js +2 -0
  178. package/dist/cdn/VOKXKU7M.js +56 -0
  179. package/dist/cdn/VXFQANGJ.js +2 -0
  180. package/dist/cdn/WKTQVBFJ.js +2 -0
  181. package/dist/cdn/WLH47YFC.js +14 -0
  182. package/dist/cdn/WP7ORLSB.js +6 -0
  183. package/dist/cdn/Y7XD7ZRD.js +2 -0
  184. package/dist/cdn/YEZ3AMNX.js +2 -0
  185. package/dist/cdn/YLVJA4ZE.js +2 -0
  186. package/dist/cdn/Z5W4V7RC.js +2 -0
  187. package/dist/cdn/ZLWWWTH4.js +2 -0
  188. package/dist/cdn/ZOEMBHRF.js +2 -0
  189. package/dist/cdn/ZQMBJ6MI.js +2 -0
  190. package/dist/cdn/ZRESBCJL.js +2 -0
  191. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  192. package/dist/cdn/ZUNLFO6M.js +3 -0
  193. package/dist/cdn/agent-utils/index.js +2 -0
  194. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
  195. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
  196. package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
  197. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  198. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
  199. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
  200. package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
  201. package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
  202. package/dist/cdn/index.js +1 -1
  203. package/dist/chunks/adapter.js +1294 -2112
  204. package/dist/chunks/arcgisKnowledgeGraph.js +127 -72
  205. package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
  206. package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
  207. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  208. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
  209. package/dist/chunks/baseAgentState.js +56 -0
  210. package/dist/chunks/converterUtils.js +66 -41
  211. package/dist/chunks/dataExplorationGraph.js +132 -177
  212. package/dist/chunks/data_explore_query_prompt.js +9 -4
  213. package/dist/chunks/fetchAgentContext.js +13 -0
  214. package/dist/chunks/fetchService.js +10 -0
  215. package/dist/chunks/fieldStatistics.js +79 -0
  216. package/dist/chunks/formatFeatureAttributes.js +132 -0
  217. package/dist/chunks/generateLayerDescriptions.js +259 -282
  218. package/dist/chunks/helpGraph.js +34 -25
  219. package/dist/chunks/help_prompt.js +34 -17
  220. package/dist/chunks/index.js +11 -0
  221. package/dist/chunks/intent_prompt.js +16 -0
  222. package/dist/chunks/layerStylingGraph.js +36 -31
  223. package/dist/chunks/mergeWhereClauses.js +15 -0
  224. package/dist/chunks/navigationGraph.js +123 -103
  225. package/dist/chunks/navigation_intent_prompt.js +8 -2
  226. package/dist/chunks/orchestrator.js +205 -175
  227. package/dist/chunks/slottableRequestUtils.js +3 -7
  228. package/dist/chunks/state.js +21 -27
  229. package/dist/chunks/summarize_query_response_prompt.js +9 -7
  230. package/dist/chunks/toolCallResponse.js +13 -10
  231. package/dist/chunks/types.js +59 -0
  232. package/dist/chunks/utils2.js +11 -11
  233. package/dist/components/arcgis-assistant/customElement.d.ts +56 -0
  234. package/dist/components/arcgis-assistant/customElement.js +387 -155
  235. package/dist/components/arcgis-assistant/index.js +2 -3
  236. package/dist/components/arcgis-assistant/types.d.ts +14 -1
  237. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  238. package/dist/components/arcgis-assistant-agent/customElement.js +608 -10
  239. package/dist/components/arcgis-assistant-chat/customElement.d.ts +2 -1
  240. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  241. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +2 -0
  242. package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
  243. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +19 -3
  244. package/dist/components/arcgis-assistant-help-agent/customElement.js +28 -6
  245. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
  246. package/dist/components/arcgis-assistant-interrupt/customElement.js +17 -14
  247. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +24 -0
  248. package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
  249. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
  250. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +39 -16
  251. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +29 -6
  252. package/dist/components/arcgis-assistant-message/customElement.d.ts +5 -0
  253. package/dist/components/arcgis-assistant-message/customElement.js +29 -26
  254. package/dist/components/arcgis-assistant-message/index.js +2 -0
  255. package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
  256. package/dist/components/arcgis-assistant-message-block/index.js +1 -0
  257. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +7 -0
  258. package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -7
  259. package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
  260. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  261. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  262. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +17 -3
  263. package/dist/components/arcgis-assistant-speech-input/customElement.js +29 -46
  264. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
  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 +9 -8
  272. package/dist/oauth-callback.html +1 -1
  273. package/dist/types/lumina.d.ts +9 -8
  274. package/dist/types/preact.d.ts +9 -8
  275. package/dist/types/react.d.ts +9 -8
  276. package/dist/types/stencil.d.ts +11 -10
  277. package/dist/utils/index.d.ts +10 -10
  278. package/dist/utils/index.js +56 -55
  279. package/package.json +32 -12
  280. package/dist/cdn/2AXF774U.js +0 -2
  281. package/dist/cdn/462JBSEV.js +0 -422
  282. package/dist/cdn/53ZCUPKK.js +0 -22
  283. package/dist/cdn/5QAHYX7Y.js +0 -5
  284. package/dist/cdn/5XRDJL7R.js +0 -14
  285. package/dist/cdn/7BCR6TUO.js +0 -2
  286. package/dist/cdn/7GH7VSB2.js +0 -2
  287. package/dist/cdn/7PLV4QH6.js +0 -2
  288. package/dist/cdn/AO7BQHKC.js +0 -2
  289. package/dist/cdn/AXDZBBNL.js +0 -45
  290. package/dist/cdn/DDLZOMUY.js +0 -2
  291. package/dist/cdn/EECZLT6C.js +0 -166
  292. package/dist/cdn/ETRWZ3MS.js +0 -108
  293. package/dist/cdn/F2AHA4GB.js +0 -54
  294. package/dist/cdn/FX5JFRDL.js +0 -2
  295. package/dist/cdn/H7422XUG.js +0 -2
  296. package/dist/cdn/HB5A5R2E.js +0 -2
  297. package/dist/cdn/I6HNBTWY.js +0 -2
  298. package/dist/cdn/IG6YKZH3.js +0 -3
  299. package/dist/cdn/KMQ3SP4I.js +0 -5
  300. package/dist/cdn/MH5RPXHM.js +0 -2
  301. package/dist/cdn/NAUXSHIE.js +0 -72
  302. package/dist/cdn/NVI3I46B.js +0 -2
  303. package/dist/cdn/OAVEHGB6.js +0 -2
  304. package/dist/cdn/OH64RMOR.js +0 -4
  305. package/dist/cdn/P26NON3Z.js +0 -16
  306. package/dist/cdn/P6OPJQMC.js +0 -3
  307. package/dist/cdn/QR54T33D.js +0 -2
  308. package/dist/cdn/RVOAPUBN.js +0 -2
  309. package/dist/cdn/S3VPZFWQ.js +0 -36
  310. package/dist/cdn/SXDLXCIM.js +0 -2
  311. package/dist/cdn/USMDJUFS.js +0 -2
  312. package/dist/cdn/Y333DGV6.js +0 -2
  313. package/dist/cdn/YIMNOUTF.js +0 -2
@@ -26,7 +26,7 @@ export type ConditionDecider<TState extends AgentData = AgentData> = (state: Age
26
26
  * @since 5.1
27
27
  */
28
28
  export class ConditionalWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
29
- constructor(properties: ConstructProperties<TState>);
29
+ constructor(properties: ConditionalWorkflowConstructProperties<TState>);
30
30
  /**
31
31
  * Must contain exactly two agents: `[trueAgent, falseAgent]`. The first agent is executed when
32
32
  * the condition is true, the second when the condition is false.
@@ -69,4 +69,4 @@ export class ConditionalWorkflow<TState extends AgentData = AgentData> extends B
69
69
  protected validateAgents(agents: BaseAgentLike<TState>[]): void;
70
70
  }
71
71
 
72
- export type ConstructProperties<TState extends AgentData> = Pick<ConditionalWorkflow<TState>, "agents" | "condition">;
72
+ export type ConditionalWorkflowConstructProperties<TState extends AgentData> = Pick<ConditionalWorkflow<TState>, "agents" | "condition">;
@@ -26,7 +26,7 @@ export type LoopDecider<TState extends AgentData = AgentData> = (state: AgentGra
26
26
  * @since 5.1
27
27
  */
28
28
  export class LoopWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
29
- constructor(properties: ConstructProperties<TState>);
29
+ constructor(properties: LoopWorkflowConstructProperties<TState>);
30
30
  /**
31
31
  * Function that decides whether the loop should continue.
32
32
  *
@@ -55,4 +55,4 @@ export class LoopWorkflow<TState extends AgentData = AgentData> extends BaseWork
55
55
  protected isTerminalAgent(): boolean;
56
56
  }
57
57
 
58
- export type ConstructProperties<TState extends AgentData> = Pick<LoopWorkflow<TState>, "decideContinue" | "workflow">;
58
+ export type LoopWorkflowConstructProperties<TState extends AgentData> = Pick<LoopWorkflow<TState>, "decideContinue" | "workflow">;
@@ -20,7 +20,7 @@ import type { BaseWorkflow, WorkflowGenerateResult } from "./BaseWorkflow.js";
20
20
  * @since 5.1
21
21
  */
22
22
  export class ParallelWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
23
- constructor(properties: ConstructProperties<TState>);
23
+ constructor(properties: ParallelWorkflowConstructProperties<TState>);
24
24
  /**
25
25
  * Agents to run in parallel from the same input snapshot.
26
26
  *
@@ -65,4 +65,4 @@ export class ParallelWorkflow<TState extends AgentData = AgentData> extends Base
65
65
  protected isTerminalAgent(_agents: BaseAgentLike<TState>[], _index: number): boolean;
66
66
  }
67
67
 
68
- export type ConstructProperties<TState extends AgentData> = Pick<ParallelWorkflow<TState>, "agents">;
68
+ export type ParallelWorkflowConstructProperties<TState extends AgentData> = Pick<ParallelWorkflow<TState>, "agents">;
@@ -16,7 +16,7 @@ import type { BaseWorkflow } from "./BaseWorkflow.js";
16
16
  * @since 5.1
17
17
  */
18
18
  export class RouterWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
19
- constructor(properties: ConstructProperties<TState>);
19
+ constructor(properties: RouterWorkflowConstructProperties<TState>);
20
20
  /**
21
21
  * Mapping of route keys to destination agents.
22
22
  *
@@ -60,4 +60,4 @@ export class RouterWorkflow<TState extends AgentData = AgentData> extends BaseWo
60
60
  protected validateAgents(agents: BaseAgentLike<TState>[]): void;
61
61
  }
62
62
 
63
- export type ConstructProperties<TState extends AgentData> = Pick<RouterWorkflow<TState>, "agentsMap" | "routerAgent" | "routerOutputKey">;
63
+ export type RouterWorkflowConstructProperties<TState extends AgentData> = Pick<RouterWorkflow<TState>, "agentsMap" | "routerAgent" | "routerOutputKey">;
@@ -17,7 +17,7 @@ import type { AgentData, AgentGraphState, BaseAgentLike, GraphEdge } from "../ty
17
17
  * @since 5.1
18
18
  */
19
19
  export class SequentialWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
20
- constructor(properties: ConstructProperties<TState>);
20
+ constructor(properties: SequentialWorkflowConstructProperties<TState>);
21
21
  /**
22
22
  * A list of agents to execute in the specified order.
23
23
  *
@@ -53,4 +53,4 @@ export class SequentialWorkflow<TState extends AgentData = AgentData> extends Ba
53
53
  protected validateAgents(agents: BaseAgentLike<TState>[]): void;
54
54
  }
55
55
 
56
- export type ConstructProperties<TState extends AgentData> = Pick<SequentialWorkflow<TState>, "agents">;
56
+ export type SequentialWorkflowConstructProperties<TState extends AgentData> = Pick<SequentialWorkflow<TState>, "agents">;
@@ -26,7 +26,7 @@ export type SwitchDecider<TState extends AgentData = AgentData> = (state: AgentG
26
26
  * @since 5.1
27
27
  */
28
28
  export class SwitchWorkflow<TState extends AgentData = AgentData> extends BaseWorkflow<TState> {
29
- constructor(properties: ConstructProperties<TState>);
29
+ constructor(properties: SwitchWorkflowConstructProperties<TState>);
30
30
  /**
31
31
  * Mapping of keys to destination agents.
32
32
  *
@@ -70,5 +70,5 @@ export class SwitchWorkflow<TState extends AgentData = AgentData> extends BaseWo
70
70
  protected validateAgents(agents: BaseAgentLike<TState>[]): void;
71
71
  }
72
72
 
73
- export type ConstructProperties<TState extends AgentData> = Partial<Pick<SwitchWorkflow<TState>, "defaultAgent">>
73
+ export type SwitchWorkflowConstructProperties<TState extends AgentData> = Partial<Pick<SwitchWorkflow<TState>, "defaultAgent">>
74
74
  & Pick<SwitchWorkflow<TState>, "agentsMap" | "resolver">;
@@ -0,0 +1,24 @@
1
+ import type { AgentCreateGraph, AgentCustomState, AgentData, AgentStateAnnotation, ZodObjectSchema } from "../agent-utils/types.js";
2
+ import type { AgenticWorkflowJson } from "./jsonTypes.js";
3
+ import type { GraphNodeResultsState } from "./types.js";
4
+
5
+ /**
6
+ * Loads and compiles an ArcGIS Agentic Workflow definition into an executable graph.
7
+ *
8
+ * @internal
9
+ */
10
+ export class AgenticWorkflowRuntime<TInput extends AgentData = AgentData, TOutput extends AgentData = AgentData> {
11
+ /** @param sourceJSON */
12
+ static fromJSON<TInput extends AgentData = AgentData, TOutput extends AgentData = AgentData>(sourceJSON: AgenticWorkflowJson): AgenticWorkflowRuntime<TInput, TOutput>;
13
+ generate(): AgenticWorkflowGenerateResult<TInput, TOutput>;
14
+ getSchemas(): ZodObjectSchema<object>[];
15
+ load(): Promise<this>;
16
+ }
17
+
18
+ export type AgenticWorkflowGenerateResult<TInput extends AgentData, TOutput extends AgentData> = {
19
+ createGraph: AgentCreateGraph<AgenticWorkflowState<TInput, TOutput>>;
20
+ workspace: AgentStateAnnotation<AgenticWorkflowState<TInput, TOutput>>;
21
+ };
22
+
23
+ export type AgenticWorkflowState<TInput extends AgentData, TOutput extends AgentData> = GraphNodeResultsState
24
+ & Omit<AgentCustomState<TInput, TOutput>, "nodes">;
@@ -0,0 +1,16 @@
1
+ import type Accessor from "@arcgis/core/core/Accessor.js";
2
+ import type { AgenticWorkflowEdgeJson } from "./jsonTypes.js";
3
+
4
+ /** @internal */
5
+ export class Edge extends Accessor {
6
+ /** @param json */
7
+ static fromJSON(json: AgenticWorkflowEdgeJson): Edge;
8
+ constructor(properties?: EdgeConstructProperties);
9
+ accessor id: string;
10
+ accessor sourceAnchorId: string;
11
+ accessor sourceNodeId: string;
12
+ accessor targetAnchorId: string | undefined;
13
+ accessor targetNodeId: string;
14
+ }
15
+
16
+ export type EdgeConstructProperties = Pick<Edge, "id" | "sourceAnchorId" | "sourceNodeId" | "targetAnchorId" | "targetNodeId">;
@@ -0,0 +1,39 @@
1
+ import type PortalItem from "@arcgis/core/portal/PortalItem.js";
2
+ import type { BaseAgent } from "../agent-utils/BaseAgent.js";
3
+ import type { AgentData, ZodObjectSchema } from "../agent-utils/types.js";
4
+ import type { AgenticWorkflowJson } from "./jsonTypes.js";
5
+ import type { AgenticWorkflowState } from "./AgenticWorkflowRuntime.js";
6
+
7
+ /** @internal */
8
+ export class WebAgent<TInput extends AgentData = AgentData, TOutput extends AgentData = AgentData> extends BaseAgent<WebAgentState<TInput, TOutput>> {
9
+ constructor(properties?: WebAgentConstructProperties<TInput, TOutput>);
10
+ /**
11
+ * The portal item associated with this web agent
12
+ *
13
+ * @required
14
+ */
15
+ accessor portalItem: PortalItem | undefined;
16
+ accessor sourceJSON: AgenticWorkflowJson | undefined;
17
+ /**
18
+ * Rebuilds internal workspace and createGraph wiring. This is automatically called during initialization and whenever
19
+ * the name or description properties change, but can also be called manually if needed to refresh the agent's graph definition.
20
+ *
21
+ * The agent implementation is responsible for defining the createGraph function and workspace structure in this method, which are then used during execution.
22
+ *
23
+ * @internal
24
+ */
25
+ generate(): void;
26
+ /**
27
+ * Returns all schemas required by this agent implementation.
28
+ *
29
+ * @returns An array of Zod object schemas that define the structure of the agent's expected input and output data.
30
+ * These schemas are used for validation and type inference during graph execution.
31
+ * @internal
32
+ */
33
+ getSchemas(): ZodObjectSchema<object>[];
34
+ load(): Promise<this>;
35
+ }
36
+
37
+ export type WebAgentState<TInput extends AgentData, TOutput extends AgentData> = AgenticWorkflowState<TInput, TOutput>;
38
+
39
+ export type WebAgentConstructProperties<TInput extends AgentData, TOutput extends AgentData> = Partial<Pick<WebAgent<TInput, TOutput>, "portalItem" | "sourceJSON">>;
@@ -0,0 +1,183 @@
1
+ export type AgenticWorkflowJson = AgenticWorkflowJsonObject
2
+ & {
3
+ readonly description?: string;
4
+ readonly graph: AgenticWorkflowGraphJson;
5
+ readonly variables: AgenticWorkflowVariableJson[];
6
+ readonly version: string;
7
+ };
8
+
9
+ export type AgenticWorkflowEdgeJson = AgenticWorkflowJsonObject
10
+ & {
11
+ readonly id: string;
12
+ readonly source_anchor_id: AgenticWorkflowSourceAnchorIdJson;
13
+ readonly source_node_id: AgenticWorkflowNodeIdJson;
14
+ readonly target_anchor_id?: AgenticWorkflowNodeIdJson;
15
+ readonly target_node_id: AgenticWorkflowNodeIdJson;
16
+ };
17
+
18
+ export type AgenticWorkflowNodeTypeJson = "agent_node" | "end_message_node" | "guardrails_node" | "hitl_node" | "loop_node" | "start_node";
19
+
20
+ export type AgenticWorkflowBaseNodeJson<TType extends AgenticWorkflowNodeTypeJson> = AgenticWorkflowJsonObject
21
+ & {
22
+ readonly id: AgenticWorkflowNodeIdJson;
23
+ readonly label: string;
24
+ readonly type: TType;
25
+ };
26
+
27
+ export type AgenticWorkflowStartNodeJson = AgenticWorkflowBaseNodeJson<"start_node">;
28
+
29
+ export type AgenticWorkflowEndMessageNodeJson = AgenticWorkflowBaseNodeJson<"end_message_node">
30
+ & {
31
+ readonly message: string;
32
+ };
33
+
34
+ export type AgenticWorkflowAgentNodeJson = AgenticWorkflowBaseNodeJson<"agent_node">
35
+ & {
36
+ readonly prompt?: AgenticWorkflowPromptJson;
37
+ readonly structured_output?: AgenticWorkflowStructuredJsonSchemaJson;
38
+ readonly tools?: AgenticWorkflowToolJson[];
39
+ };
40
+
41
+ export type AgenticWorkflowArcgisToolJson = AgenticWorkflowJsonObject
42
+ & {
43
+ readonly type: "arcgis_tool";
44
+ readonly name: string;
45
+ readonly require_approval: AgenticWorkflowApprovalRequirementJson;
46
+ };
47
+
48
+ export type AgenticWorkflowJsonObject = { readonly [key: string]: AgenticWorkflowJsonValue | undefined; };
49
+
50
+ export type AgenticWorkflowJsonValue = AgenticWorkflowJsonObject | AgenticWorkflowJsonPrimitive | AgenticWorkflowJsonValue[] | undefined;
51
+
52
+ export type AgenticWorkflowVariableJson = AgenticWorkflowJsonObject
53
+ & {
54
+ readonly data_type?: "array" | "boolean" | "number" | "object" | "string";
55
+ readonly description?: string;
56
+ readonly key: string;
57
+ readonly persisted: boolean;
58
+ readonly private: boolean;
59
+ readonly type: "value";
60
+ readonly value: AgenticWorkflowJsonValue;
61
+ };
62
+
63
+ export type AgenticWorkflowGraphJson = AgenticWorkflowJsonObject
64
+ & {
65
+ readonly edges: AgenticWorkflowEdgeJson[];
66
+ readonly nodes: AgenticWorkflowNodeJson[];
67
+ };
68
+
69
+ export type AgenticWorkflowNodeIdJson = `${string}_node_${number}`;
70
+
71
+ export type AgenticWorkflowSourceAnchorIdJson = `source_anchor_${string}`;
72
+
73
+ export type AgenticWorkflowNodeJson = AgenticWorkflowAgentNodeJson | AgenticWorkflowEndMessageNodeJson | AgenticWorkflowGuardrailsNodeJson | AgenticWorkflowHumanInTheLoopNodeJson | AgenticWorkflowLoopNodeJson | AgenticWorkflowStartNodeJson;
74
+
75
+ export type AgenticWorkflowGuardrailsNodeJson = AgenticWorkflowBaseNodeJson<"guardrails_node">
76
+ & {
77
+ readonly conditions: AgenticWorkflowConditionJson[];
78
+ readonly confidence_threshold: number;
79
+ readonly prompt?: AgenticWorkflowPromptJson;
80
+ };
81
+
82
+ export type AgenticWorkflowHumanInTheLoopNodeJson = AgenticWorkflowBaseNodeJson<"hitl_node">
83
+ & {
84
+ readonly conditions?: AgenticWorkflowConditionJson[];
85
+ readonly enable_feedback: boolean;
86
+ readonly human_input_description: string;
87
+ readonly human_input_description_type?: "dynamic" | "fixed";
88
+ };
89
+
90
+ export type AgenticWorkflowLoopNodeJson = AgenticWorkflowBaseNodeJson<"loop_node">
91
+ & {
92
+ readonly loop_back_node_id: AgenticWorkflowNodeIdJson;
93
+ readonly max_loop_count: number;
94
+ };
95
+
96
+ export type AgenticWorkflowConditionJson = AgenticWorkflowJsonObject
97
+ & {
98
+ readonly preset?: "process" | "reject";
99
+ readonly source_anchor_id: AgenticWorkflowSourceAnchorIdJson;
100
+ };
101
+
102
+ export type AgenticWorkflowPromptJson = AgenticWorkflowJsonObject
103
+ & {
104
+ readonly content?: string;
105
+ };
106
+
107
+ export type AgenticWorkflowStructuredJsonSchemaJson = AgenticWorkflowJsonObject
108
+ & {
109
+ readonly properties: Record<string, AgenticWorkflowStructuredJsonPropertyJson>;
110
+ readonly required?: string[];
111
+ readonly type: "object";
112
+ readonly additionalProperties: boolean;
113
+ };
114
+
115
+ export type AgenticWorkflowStructuredJsonPropertyJson = AgenticWorkflowJsonObject
116
+ & {
117
+ readonly description?: string;
118
+ readonly enum?: string[];
119
+ readonly items?: AgenticWorkflowStructuredJsonPropertyJson;
120
+ readonly properties?: Record<string, AgenticWorkflowStructuredJsonPropertyJson>;
121
+ readonly required?: string[];
122
+ readonly type: "array" | "boolean" | "number" | "object" | "string";
123
+ readonly additionalProperties?: boolean;
124
+ };
125
+
126
+ export type AgenticWorkflowToolJson = AgenticWorkflowArcgisToolJson | AgenticWorkflowMcpToolJson;
127
+
128
+ export type AgenticWorkflowMcpToolJson = AgenticWorkflowJsonObject
129
+ & {
130
+ readonly allowed_tools?: string[];
131
+ readonly args?: string[];
132
+ readonly auth?: AgenticWorkflowMcpToolAuthAPIKeyJson | AgenticWorkflowMcpToolAuthBearerJson | AgenticWorkflowMcpToolAuthOAuth2Json;
133
+ readonly command?: string;
134
+ readonly env?: Record<string, string>;
135
+ readonly label?: string;
136
+ readonly override_params?: AgenticWorkflowUpdateVariableJson[];
137
+ readonly require_approval: AgenticWorkflowApprovalRequirementJson;
138
+ readonly return_direct?: boolean;
139
+ readonly server_description?: string;
140
+ readonly server_label?: string;
141
+ readonly server_url?: string;
142
+ readonly type: "mcp";
143
+ };
144
+
145
+ export type AgenticWorkflowApprovalRequirementJson = "always" | "never";
146
+
147
+ export type AgenticWorkflowUpdateVariableJson = AgenticWorkflowJsonObject
148
+ & {
149
+ readonly key: string;
150
+ readonly value: AgenticWorkflowExpressionValueJson;
151
+ };
152
+
153
+ export type AgenticWorkflowExpressionValueJson = AgenticWorkflowJsonObject
154
+ & {
155
+ readonly return_type?: "array" | "boolean" | "number" | "object" | "string" | "unknown";
156
+ readonly type: "constant" | "variable";
157
+ readonly value: boolean | number | string;
158
+ };
159
+
160
+ export type AgenticWorkflowMcpToolAuthBearerJson = {
161
+ mode: string;
162
+ header_name?: string;
163
+ scheme?: string;
164
+ };
165
+
166
+ export type AgenticWorkflowMcpToolAuthAPIKeyJson = {
167
+ mode: string;
168
+ header_name?: string;
169
+ prefix?: string;
170
+ };
171
+
172
+ export type AgenticWorkflowMcpToolAuthOAuth2Json = {
173
+ mode: string;
174
+ discovery?: string;
175
+ client_id?: string;
176
+ authorization_url?: string;
177
+ token_url?: string;
178
+ refresh_url?: string;
179
+ redirect_url?: string;
180
+ scope?: string;
181
+ };
182
+
183
+ export type AgenticWorkflowJsonPrimitive = boolean | number | string | null;
@@ -0,0 +1,27 @@
1
+ import type { BaseNode } from "./BaseNode.js";
2
+ import type { AgenticWorkflowAgentNodeJson } from "../jsonTypes.js";
3
+ import type { AgentData, ZodObjectSchema } from "../../agent-utils/types.js";
4
+ import type { RuntimeNode, NodeCompilation, NodeCompilationContext } from "../types.js";
5
+ import type { ArcgisTool } from "./tools/ArcgisTool.js";
6
+
7
+ /** @internal */
8
+ export class AgentNode extends BaseNode {
9
+ /** @param json */
10
+ static fromJSON(json: AgenticWorkflowAgentNodeJson): AgentNode;
11
+ constructor(properties?: AgentNodeConstructProperties);
12
+ accessor outputSchema: ZodObjectSchema<AgentData> | undefined;
13
+ accessor prompt: string | undefined;
14
+ accessor tools: ArcgisTool[] | undefined;
15
+ /**
16
+ * The type of this node, which identifies it as an agent node within the workflow.
17
+ *
18
+ * @default "agent-node"
19
+ * @required
20
+ */
21
+ accessor type: "agent-node";
22
+ /** @param context */
23
+ compile<TCustomState extends AgentData>(context: NodeCompilationContext): NodeCompilation<TCustomState>;
24
+ createRuntimeNode<TCustomState extends AgentData>(): RuntimeNode<TCustomState>;
25
+ }
26
+
27
+ export type AgentNodeConstructProperties = Pick<AgentNode, "id" | "label" | "prompt" | "type">;
@@ -0,0 +1,35 @@
1
+ import type Accessor from "@arcgis/core/core/Accessor.js";
2
+ import type { AgenticWorkflowBaseNodeJson, AgenticWorkflowNodeTypeJson } from "../jsonTypes.js";
3
+ import type { AgentData } from "../../agent-utils/types.js";
4
+ import type { NodeCompilation, NodeCompilationContext, RuntimeNode } from "../types.js";
5
+
6
+ /** @internal */
7
+ export abstract class BaseNode extends Accessor {
8
+ /** @param _json */
9
+ static fromJSON(_json: AgenticWorkflowBaseNodeJson<AgenticWorkflowNodeTypeJson>): BaseNode;
10
+ constructor(properties?: BaseNodeConstructProperties);
11
+ /**
12
+ * The unique identifier for this node.
13
+ *
14
+ * @required
15
+ */
16
+ accessor id: string;
17
+ /**
18
+ * The label for this node, which is used for display purposes.
19
+ *
20
+ * @required
21
+ */
22
+ accessor label: string;
23
+ /**
24
+ * The type of this node, which can be used to categorize or differentiate nodes within the agent's workflow.
25
+ *
26
+ * @required
27
+ */
28
+ accessor type: string;
29
+ /** @param context */
30
+ compile<TCustomState extends AgentData>(context: NodeCompilationContext): NodeCompilation<TCustomState>;
31
+ abstract createRuntimeNode<TCustomState extends AgentData>(): RuntimeNode<TCustomState>;
32
+ load(): Promise<this>;
33
+ }
34
+
35
+ export type BaseNodeConstructProperties = Pick<BaseNode, "id" | "label" | "type">;
@@ -0,0 +1,25 @@
1
+ import type { BaseNode } from "./BaseNode.js";
2
+ import type { AgenticWorkflowEndMessageNodeJson } from "../jsonTypes.js";
3
+ import type { AgentData } from "../../agent-utils/types.js";
4
+ import type { NodeCompilation, NodeCompilationContext, RuntimeNode } from "../types.js";
5
+
6
+ /** @internal */
7
+ export class EndMessageNode extends BaseNode {
8
+ /** @param json */
9
+ static fromJSON(json: AgenticWorkflowEndMessageNodeJson): EndMessageNode;
10
+ constructor(properties?: EndMessageNodeConstructProperties);
11
+ /** The message associated with this end message node, which is displayed when the node is reached in the workflow. */
12
+ accessor message: string;
13
+ /**
14
+ * The type of this node, which identifies it as an end message node within the workflow.
15
+ *
16
+ * @default "end-message-node"
17
+ * @required
18
+ */
19
+ accessor type: "end-message-node";
20
+ /** @param _context */
21
+ compile<TCustomState extends AgentData>(_context: NodeCompilationContext): NodeCompilation<TCustomState>;
22
+ createRuntimeNode<TCustomState extends AgentData>(): RuntimeNode<TCustomState>;
23
+ }
24
+
25
+ export type EndMessageNodeConstructProperties = Pick<EndMessageNode, "id" | "label" | "type">;
@@ -0,0 +1,21 @@
1
+ import type { BaseNode } from "./BaseNode.js";
2
+ import type { AgenticWorkflowStartNodeJson } from "../jsonTypes.js";
3
+ import type { RuntimeNode } from "../types.js";
4
+ import type { AgentData } from "../../agent-utils/types.js";
5
+
6
+ /** @internal */
7
+ export class StartNode extends BaseNode {
8
+ /** @param json */
9
+ static fromJSON(json: AgenticWorkflowStartNodeJson): StartNode;
10
+ constructor(properties?: StartNodeConstructProperties);
11
+ /**
12
+ * The type of this node, which can be used to categorize or differentiate nodes within the agent's workflow.
13
+ *
14
+ * @default "start-node"
15
+ * @required
16
+ */
17
+ accessor type: "start-node";
18
+ createRuntimeNode<TCustomState extends AgentData>(): RuntimeNode<TCustomState>;
19
+ }
20
+
21
+ export type StartNodeConstructProperties = Pick<StartNode, "id" | "label" | "type">;
@@ -0,0 +1,21 @@
1
+ import type Accessor from "@arcgis/core/core/Accessor.js";
2
+ import type { AgenticWorkflowArcgisToolJson } from "../../jsonTypes.js";
3
+ import type { StructuredToolInterface } from "@langchain/core/tools";
4
+
5
+ /**
6
+ * Portal configuration for ArcGIS tools.
7
+ *
8
+ * @internal
9
+ */
10
+ export class ArcgisTool extends Accessor {
11
+ /** @param json */
12
+ static fromJSON(json: AgenticWorkflowArcgisToolJson): ArcgisTool;
13
+ constructor(properties?: ArcgisToolConstructProperties);
14
+ accessor name: string | undefined;
15
+ accessor requireApproval: "always" | "never" | undefined;
16
+ /** @default "arcgis-tool" */
17
+ accessor type: "arcgis-tool";
18
+ createRuntimeTools(): Promise<StructuredToolInterface[]>;
19
+ }
20
+
21
+ export type ArcgisToolConstructProperties = Pick<ArcgisTool, "name" | "requireApproval">;
@@ -0,0 +1,29 @@
1
+ import type { AgentData, AgentGraphState, AgentRuntimeState, GraphEdge, GraphNodes, ZodObjectSchema } from "../agent-utils/types.js";
2
+ import type { Edge } from "./Edge.js";
3
+
4
+ export type GraphNodeResultsState = {
5
+ nodes: GraphNodeResults;
6
+ };
7
+
8
+ export type RuntimeNode<TCustomState extends AgentData> = GraphNodes<AgentGraphState<GraphNodeResultsState & Omit<TCustomState, "nodes">>, AgentNodeGraphUpdate>[string];
9
+
10
+ export type NodeCompilationContext = {
11
+ outgoingEdges: Edge[];
12
+ };
13
+
14
+ export type NodeCompilation<TCustomState extends AgentData> = {
15
+ runtimeNode?: RuntimeNode<TCustomState>;
16
+ edges: GraphEdge<WebAgentRuntimeState<TCustomState>>[];
17
+ schemas?: ZodObjectSchema<object>[];
18
+ };
19
+
20
+ export type GraphNodeResults = Record<string, GraphNodeResult>;
21
+
22
+ export type AgentNodeGraphUpdate = Partial<AgentRuntimeState & GraphNodeResultsState>
23
+ & Record<string, unknown>;
24
+
25
+ export type WebAgentRuntimeState<TCustomState extends AgentData> = AgentGraphState<GraphNodeResultsState & Omit<TCustomState, "nodes">>;
26
+
27
+ export type GraphNodeResult<TOutput extends AgentData = AgentData> = {
28
+ output: Omit<TOutput, keyof AgentRuntimeState | "output"> | string;
29
+ };
@@ -0,0 +1,8 @@
1
+ import type { StructuredToolInterface } from "@langchain/core/tools";
2
+
3
+ /**
4
+ * Clears all feature effects without changing the current map view.
5
+ *
6
+ * @internal
7
+ */
8
+ export const clearFiltersTool: StructuredToolInterface;
@@ -0,0 +1,22 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { tool as l } from "@langchain/core/tools";
3
+ import o from "zod";
4
+ import { f } from "../../../../chunks/fetchAgentContext.js";
5
+ const i = (a) => {
6
+ const r = a.map?.allLayers.filter((t) => t.type === "feature");
7
+ let e = 0;
8
+ return r?.forEach((t) => {
9
+ const s = t;
10
+ s.featureEffect && (s.featureEffect = null, e++);
11
+ }), e > 0 ? `Cleared filters from ${e} layer(s). View unchanged.` : "No active filters to clear. View unchanged.";
12
+ }, n = async (a, r) => {
13
+ const { mapView: e } = f(r, ["mapView"]);
14
+ return i(e);
15
+ }, p = l(n, {
16
+ name: "clearFilters",
17
+ description: "Clears all feature effects/filters from the map but does NOT change the current view. Use when user says 'clear filters', 'reset filters', 'remove filters', 'show all features', or wants to remove emphasis without navigating anywhere.",
18
+ schema: o.object({})
19
+ });
20
+ export {
21
+ p as clearFiltersTool
22
+ };
@@ -0,0 +1,8 @@
1
+ import type { StructuredToolInterface } from "@langchain/core/tools";
2
+
3
+ /**
4
+ * Clears all feature effects and returns the map to its initial viewpoint.
5
+ *
6
+ * @internal
7
+ */
8
+ export const resetMapTool: StructuredToolInterface;
@@ -0,0 +1,22 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { tool as n } from "@langchain/core/tools";
3
+ import i from "zod";
4
+ import { f as l } from "../../../../chunks/fetchAgentContext.js";
5
+ const f = async (e) => {
6
+ e.map?.allLayers.filter((t) => t.type === "feature")?.forEach((t) => {
7
+ const s = t;
8
+ s.featureEffect && (s.featureEffect = null);
9
+ });
10
+ const o = e.map.initialViewProperties?.viewpoint?.targetGeometry;
11
+ return o ? (await e.goTo(o), "Cleared all filters and returned to home extent.") : "Cleared all filters. Could not determine home extent.";
12
+ }, p = async (e, r) => {
13
+ const { mapView: a } = l(r, ["mapView"]);
14
+ return await f(a);
15
+ }, h = n(p, {
16
+ name: "resetMap",
17
+ description: "Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",
18
+ schema: i.object({})
19
+ });
20
+ export {
21
+ h as resetMapTool
22
+ };
@@ -0,0 +1,8 @@
1
+ import type { StructuredToolInterface } from "@langchain/core/tools";
2
+
3
+ /**
4
+ * Applies include and exclude effects to layer features with optional spatial filtering.
5
+ *
6
+ * @internal
7
+ */
8
+ export const setFeatureEffectTool: StructuredToolInterface;