@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.
- package/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.d.ts +5 -2
- package/dist/agent-utils/LLMAgent.js +7 -4
- package/dist/agent-utils/WorkflowAgent.js +15 -16
- package/dist/agent-utils/index.d.ts +78 -0
- package/dist/agent-utils/index.js +117 -98
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/types.d.ts +13 -13
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
- package/dist/agentic-workflow/Edge.d.ts +16 -0
- package/dist/agentic-workflow/WebAgent.d.ts +39 -0
- package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
- package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
- package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
- package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
- package/dist/agentic-workflow/types.d.ts +29 -0
- package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
- package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
- package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
- package/dist/agents/runtime/skill/types.d.ts +28 -0
- package/dist/agents/runtime/skill/types.js +2 -0
- package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
- package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +122 -0
- package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
- package/dist/agents/tools/help/listFields/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
- package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
- package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
- package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getStatistics/adapter.js +158 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.js +145 -0
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/queryFeatures/adapter.js +131 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
- package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
- package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
- package/dist/agents/tools/shared/types.d.ts +22 -0
- package/dist/agents/tools/shared/types.js +6 -0
- package/dist/cdn/24EIZVUM.js +2 -0
- package/dist/cdn/25MBI4PD.js +2 -0
- package/dist/cdn/275FFTBE.js +2 -0
- package/dist/cdn/27CK3JHY.js +2 -0
- package/dist/cdn/2F4TPWZQ.js +2 -0
- package/dist/cdn/2LVYAXHG.js +44 -0
- package/dist/cdn/2UJPYWWZ.js +3 -0
- package/dist/cdn/2WXXSZP5.js +2 -0
- package/dist/cdn/{Q7TL5Q5N.js → 3KNLFIM3.js} +2 -2
- package/dist/cdn/3PPXAIRE.js +14 -0
- package/dist/cdn/45BDE3MG.js +2 -0
- package/dist/cdn/477I66FH.js +56 -0
- package/dist/cdn/4CFCV47G.js +2 -0
- package/dist/cdn/4IWDBEMN.js +34 -0
- package/dist/cdn/4OI4QEV7.js +6 -0
- package/dist/cdn/{DXVU45KM.js → 4VBOTWC3.js} +2 -2
- package/dist/cdn/4YOG5F3W.js +2 -0
- package/dist/cdn/53KIFJFA.js +4 -0
- package/dist/cdn/5X23DDDZ.js +2 -0
- package/dist/cdn/65LCK3GG.js +3 -0
- package/dist/cdn/6KWGSXIN.js +2 -0
- package/dist/cdn/7DOYUO7L.js +71 -0
- package/dist/cdn/{WAIFKDR3.js → 7UBTNDV6.js} +2 -2
- package/dist/cdn/7Y43R7QJ.js +2 -0
- package/dist/cdn/A6LBMS7A.js +2 -0
- package/dist/cdn/AP3KPOHN.js +2 -0
- package/dist/cdn/AUCKEB52.js +2 -0
- package/dist/cdn/B3HXSEBN.js +2 -0
- package/dist/cdn/BBEGLIZC.js +2 -0
- package/dist/cdn/BJMGT6GV.js +19 -0
- package/dist/cdn/BTOBEN7Q.js +2 -0
- package/dist/cdn/BTTCBEPW.js +2 -0
- package/dist/cdn/BVUCNXC5.js +2 -0
- package/dist/cdn/CAOMMQSY.js +66 -0
- package/dist/cdn/CKUUYQLO.js +2 -0
- package/dist/cdn/{ZEYIBYSF.js → CSE6BHOJ.js} +2 -2
- package/dist/cdn/CX2HJ67C.js +2 -0
- package/dist/cdn/EGRRZTF6.js +2 -0
- package/dist/cdn/EK3PM4L5.js +2 -0
- package/dist/cdn/EXMEB4X2.js +2 -0
- package/dist/cdn/EYGZJKVD.js +2 -0
- package/dist/cdn/{24QNMEFG.js → FDRAKF5D.js} +2 -2
- package/dist/cdn/FHBRXZLV.js +2 -0
- package/dist/cdn/{5CV7R5IS.js → FK2CVSXW.js} +6 -6
- package/dist/cdn/FLUI6GCU.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → FPH52WOH.js} +2 -2
- package/dist/cdn/FRYS2PZJ.js +2 -0
- package/dist/cdn/FSLQCZRN.js +2 -0
- package/dist/cdn/{LQ6R5YRN.js → FTTLFIBV.js} +2 -2
- package/dist/cdn/FV6FHLYW.js +2 -0
- package/dist/cdn/G24MNC7D.js +6 -0
- package/dist/cdn/{F6QHMKF5.js → GW3IVAAZ.js} +2 -2
- package/dist/cdn/HI3XKFHD.js +2 -0
- package/dist/cdn/HKIA5PWU.js +2 -0
- package/dist/cdn/{6ZW7Z36F.js → HMMYCSOK.js} +4 -4
- package/dist/cdn/HNTSDY3J.js +2 -0
- package/dist/cdn/HV7MVIQV.js +2 -0
- package/dist/cdn/I3SUE2TR.js +2 -0
- package/dist/cdn/I72ST4JR.js +134 -0
- package/dist/cdn/{T537PKP4.js → IHUWQOMK.js} +2 -2
- package/dist/cdn/JMXXRRKQ.js +22 -0
- package/dist/cdn/JUNMTIB3.js +2 -0
- package/dist/cdn/{6YMR4QSD.js → JYNHWJUZ.js} +2 -2
- package/dist/cdn/KAX4A7SF.js +2 -0
- package/dist/cdn/KBSXHSBX.js +2 -0
- package/dist/cdn/KKCLHXHG.js +2 -0
- package/dist/cdn/L2HLFWCV.js +72 -0
- package/dist/cdn/{7RCQFLPP.js → L3BTURBA.js} +2 -2
- package/dist/cdn/LBTGOMCT.js +2 -0
- package/dist/cdn/LIRT72WY.js +2 -0
- package/dist/cdn/LL324IL6.js +2 -0
- package/dist/cdn/LLY5A2E2.js +2 -0
- package/dist/cdn/LXIKAXUT.js +2 -0
- package/dist/cdn/M2U456J5.js +181 -0
- package/dist/cdn/M3KKORBG.js +2 -0
- package/dist/cdn/M5B6X46F.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → MZUDIQQH.js} +11 -6
- package/dist/cdn/NBDOPGSN.js +2 -0
- package/dist/cdn/NGR5NVZE.js +2 -0
- package/dist/cdn/{5ZZGKP7N.js → NNPA3NLK.js} +2 -2
- package/dist/cdn/NV7CL4S3.js +2 -0
- package/dist/cdn/{5W7S2RS4.js → OALQBAZR.js} +2 -2
- package/dist/cdn/OF3TAARW.js +2 -0
- package/dist/cdn/{AZGGTNA3.js → OXC2WP7W.js} +2 -2
- package/dist/cdn/PJPP6LOS.js +3 -0
- package/dist/cdn/PUZ6RAFQ.js +2 -0
- package/dist/cdn/QAX6UF4L.js +99 -0
- package/dist/cdn/{NE7E52YR.js → QTEPFTAU.js} +10 -4
- package/dist/cdn/ROS22KOA.js +2 -0
- package/dist/cdn/RSM7MEVT.js +9 -0
- package/dist/cdn/SBNNJ5WA.js +2 -0
- package/dist/cdn/SDX46GZY.js +2 -0
- package/dist/cdn/SI22EJLC.js +2 -0
- package/dist/cdn/SJMAKF4P.js +2 -0
- package/dist/cdn/SNG3WODY.js +2 -0
- package/dist/cdn/STOGCXJH.js +2 -0
- package/dist/cdn/SUC2MIGE.js +2 -0
- package/dist/cdn/SXYKNDOF.js +2 -0
- package/dist/cdn/SZ2L5556.js +2 -0
- package/dist/cdn/T6W6F4TF.js +2 -0
- package/dist/cdn/TB2GJALS.js +2 -0
- package/dist/cdn/TFAJNKBC.js +2 -0
- package/dist/cdn/TLPZELG3.js +2 -0
- package/dist/cdn/TXZQZR3I.js +2 -0
- package/dist/cdn/UAZPINUQ.js +2 -0
- package/dist/cdn/UGIHS7OA.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → V266DJ5V.js} +2 -2
- package/dist/cdn/V4PJMCJZ.js +2 -0
- package/dist/cdn/{P7DG5T3Z.js → V52GSTOC.js} +2 -2
- package/dist/cdn/VGLBH473.js +2 -0
- package/dist/cdn/VK6CCPTG.js +2 -0
- package/dist/cdn/{ZS2TZ6BF.js → VLPELJUS.js} +2 -2
- package/dist/cdn/VT5EWFH7.js +2 -0
- package/dist/cdn/{7CYGX4F4.js → VXLKTQ36.js} +2 -2
- package/dist/cdn/W54XYT2A.js +2 -0
- package/dist/cdn/X42ACC66.js +5 -0
- package/dist/cdn/XNUWVZN7.js +2 -0
- package/dist/cdn/XOTPSCNF.js +2 -0
- package/dist/cdn/XRVGYRXL.js +14 -0
- package/dist/cdn/XV7RMYLR.js +2 -0
- package/dist/cdn/XVJFPZTW.js +2 -0
- package/dist/cdn/XZF7Y6B2.js +2 -0
- package/dist/cdn/{UPEEHMSY.js → Y4TYL2AL.js} +2 -2
- package/dist/cdn/Y4ZOB6UH.js +2 -0
- package/dist/cdn/Y6CV2NZR.js +2 -0
- package/dist/cdn/YIXASZUW.js +2 -0
- package/dist/cdn/YOW3YKWR.js +11 -0
- package/dist/cdn/{23EQTPO3.js → ZA7ZU2F7.js} +2 -2
- package/dist/cdn/ZJWR4W2S.js +208 -0
- package/dist/cdn/ZWIKFBOU.js +2 -0
- package/dist/cdn/ZY3JQCZQ.js +179 -0
- package/dist/cdn/agent-utils/index.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +5 -0
- package/dist/chunks/SKILL2.js +5 -0
- package/dist/chunks/SKILL3.js +22 -0
- package/dist/chunks/SKILL4.js +5 -0
- package/dist/chunks/adapter.js +1127 -2011
- package/dist/chunks/aiFactory.js +94 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +97 -77
- package/dist/chunks/arcgisToolRegistry.js +88 -0
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +20 -3
- package/dist/chunks/arcgis_knowledge_current_map_context.js +32 -3
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +117 -28
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/baseAgentState.js +58 -0
- package/dist/chunks/converterUtils.js +67 -42
- package/dist/chunks/dataExplorationAgent.js +19 -0
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +10 -5
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +13 -0
- package/dist/chunks/fetchService.js +10 -0
- package/dist/chunks/fieldStatistics.js +79 -0
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +132 -0
- package/dist/chunks/generateLayerDescriptions.js +190 -311
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +34 -0
- package/dist/chunks/help_prompt.js +35 -18
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/intent_prompt.js +3 -3
- package/dist/chunks/layerStylingGraph.js +102 -84
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationAgent.js +27 -0
- package/dist/chunks/navigation_intent_prompt.js +9 -3
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/orchestrator.js +446 -235
- package/dist/chunks/requireAgentServices.js +11 -0
- package/dist/chunks/resolvePointGeometryFilter.js +92 -0
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +22 -28
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +12 -12
- package/dist/chunks/utils3.js +1 -1
- package/dist/components/arcgis-assistant/customElement.d.ts +102 -1
- package/dist/components/arcgis-assistant/customElement.js +332 -184
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +533 -11
- package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +35 -9
- package/dist/components/arcgis-assistant-help-agent/customElement.js +32 -9
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -13
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +13 -9
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +41 -17
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +31 -8
- package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message/customElement.js +10 -9
- package/dist/components/arcgis-assistant-message-block/customElement.js +2 -2
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message-loading/customElement.js +12 -11
- package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +13 -13
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +34 -10
- package/dist/components/arcgis-assistant-speech-input/customElement.js +35 -53
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
- package/dist/components/arcgis-assistant-user-message/customElement.js +16 -11
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +7 -7
- package/dist/oauth-callback.html +1 -1
- package/dist/orchestrator/models/types.d.ts +1 -0
- package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
- package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
- package/dist/orchestrator/types/types.d.ts +17 -0
- package/dist/types/lumina.d.ts +5 -4
- package/dist/types/preact.d.ts +5 -4
- package/dist/types/react.d.ts +5 -4
- package/dist/types/stencil.d.ts +7 -6
- package/dist/utils/index.d.ts +75 -39
- package/dist/utils/index.js +708 -84
- package/package.json +35 -12
- package/dist/cdn/34SG44C3.js +0 -72
- package/dist/cdn/3JGWGKT6.js +0 -2
- package/dist/cdn/3NBDVZ2I.js +0 -2
- package/dist/cdn/3VOQD2MR.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/53NTYC4I.js +0 -2
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/B7WJFBOZ.js +0 -2
- package/dist/cdn/BX7FSMUU.js +0 -56
- package/dist/cdn/CHPQM77M.js +0 -181
- package/dist/cdn/DHKUXLU3.js +0 -179
- package/dist/cdn/DQSEBKOX.js +0 -2
- package/dist/cdn/DZ2QWNUA.js +0 -3
- package/dist/cdn/EBISDZ5H.js +0 -2
- package/dist/cdn/ERL2CB2Y.js +0 -14
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FUIGPHBH.js +0 -2
- package/dist/cdn/H2CHHGGH.js +0 -2
- package/dist/cdn/HWKDNS4K.js +0 -4
- package/dist/cdn/IMQ4TVHF.js +0 -16
- package/dist/cdn/IOD3GDA7.js +0 -2
- package/dist/cdn/IR7PTESF.js +0 -2
- package/dist/cdn/IRZDTYO2.js +0 -2
- package/dist/cdn/JIWK6QK6.js +0 -2
- package/dist/cdn/JLKGS6Y5.js +0 -36
- package/dist/cdn/K3JCH4XW.js +0 -2
- package/dist/cdn/KHXUWZHB.js +0 -2
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/LIFK3QSD.js +0 -2
- package/dist/cdn/NXKKG5TK.js +0 -2
- package/dist/cdn/O3EN27N5.js +0 -2
- package/dist/cdn/O3RFFPU3.js +0 -6
- package/dist/cdn/PBO6FZN6.js +0 -2
- package/dist/cdn/Q3ZW4FYA.js +0 -3
- package/dist/cdn/Q6LRANX6.js +0 -2
- package/dist/cdn/QCSN44H4.js +0 -2
- package/dist/cdn/R56X6ZKR.js +0 -161
- package/dist/cdn/RUURNLTP.js +0 -2
- package/dist/cdn/T43LEBBE.js +0 -47
- package/dist/cdn/TR4GFL7X.js +0 -2
- package/dist/cdn/WNS5ZUF5.js +0 -2
- package/dist/cdn/X4XY5HIE.js +0 -2
- package/dist/cdn/XOH56EQ2.js +0 -2
- package/dist/cdn/XON27U6U.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
- package/dist/cdn/YLN2BZ5J.js +0 -2
- package/dist/cdn/YUKR4AZW.js +0 -2
- package/dist/cdn/Z2G7MP5L.js +0 -22
- package/dist/chunks/dataExplorationGraph.js +0 -310
- package/dist/chunks/helpGraph.js +0 -126
- package/dist/chunks/navigationGraph.js +0 -270
- package/dist/chunks/toolCallResponse.js +0 -31
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { StateGraph as b, START as $, END as C } from "@langchain/langgraph/web";
|
|
3
|
-
import { k as F, m as R, n as L, o as M, p as A, u as _, v as I, w as q, x as Z, g as T, y as k, t as j, f as u, r as P, N as w } from "./adapter.js";
|
|
4
|
-
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
|
-
import "@arcgis/core/portal/Portal.js";
|
|
6
|
-
import { h as V, i as z } from "./generateLayerDescriptions.js";
|
|
7
|
-
import "@langchain/core/messages";
|
|
8
|
-
import "@langchain/core/callbacks/dispatch/web";
|
|
9
|
-
import "@langchain/openai";
|
|
10
|
-
import "@arcgis/core/config.js";
|
|
11
|
-
import "@arcgis/core/core/reactiveUtils.js";
|
|
12
|
-
import "@arcgis/core/layers/FeatureLayer.js";
|
|
13
|
-
import "@arcgis/core/request.js";
|
|
14
|
-
import { s as h } from "./index.js";
|
|
15
|
-
import "@langchain/core/prompts";
|
|
16
|
-
import { ToolNode as G } from "@langchain/langgraph/prebuilt";
|
|
17
|
-
import x from "zod";
|
|
18
|
-
const S = [
|
|
19
|
-
F,
|
|
20
|
-
R,
|
|
21
|
-
L,
|
|
22
|
-
M,
|
|
23
|
-
A,
|
|
24
|
-
_,
|
|
25
|
-
I,
|
|
26
|
-
q,
|
|
27
|
-
Z
|
|
28
|
-
];
|
|
29
|
-
async function O(e, t) {
|
|
30
|
-
const o = await T("navigation_tool_prompt"), { mapView: s } = k(t), i = s.map.bookmarks?.map((p) => p.name).filter(Boolean) ?? [], l = e.vectorSearchLayerResults?.length > 0 ? e.vectorSearchLayerResults.map(
|
|
31
|
-
(p, E) => `${E + 1}. layerId=${p.id} | title=${p.title ?? ""} | name=${p.name ?? ""} | score=${p.score.toFixed(2)}`
|
|
32
|
-
).join(`
|
|
33
|
-
`) : "", c = e.vectorSearchFieldResults?.length > 0 ? JSON.stringify(e.vectorSearchFieldResults, null, 2) : "", a = e.intent === "goToBookmark" && i.length ? `Available bookmarks:
|
|
34
|
-
${i.map((p) => `- ${p}`).join(`
|
|
35
|
-
`)}` : "", r = (e.intent === "goToLayer" || e.intent === "goToFeatures") && e.vectorSearchLayerResults?.length ? `Candidate layers:
|
|
36
|
-
${l}` : "", d = e.intent === "goToFeatures" && e.vectorSearchFieldResults?.length ? `Candidate fields:
|
|
37
|
-
${c}` : "", y = {
|
|
38
|
-
intent: e.intent,
|
|
39
|
-
bookmarksSection: a,
|
|
40
|
-
layersSection: r,
|
|
41
|
-
fieldsSection: d,
|
|
42
|
-
currentZoom: s.zoom,
|
|
43
|
-
assignedTask: e.agentExecutionContext.assignedTask,
|
|
44
|
-
userRequest: e.agentExecutionContext.userRequest,
|
|
45
|
-
priorSteps: e.agentExecutionContext.priorSteps
|
|
46
|
-
}, n = await V({
|
|
47
|
-
promptText: o,
|
|
48
|
-
modelTier: "fast",
|
|
49
|
-
config: t,
|
|
50
|
-
inputVariables: y,
|
|
51
|
-
tools: S
|
|
52
|
-
}), m = (n.tool_calls?.length ?? 0) > 0, v = typeof n.text == "string" ? n.text.trim() : "", N = v.length > 0;
|
|
53
|
-
return {
|
|
54
|
-
...e,
|
|
55
|
-
navigationInternalState: {
|
|
56
|
-
...e.navigationInternalState,
|
|
57
|
-
toolCallMessage: m ? n : void 0
|
|
58
|
-
},
|
|
59
|
-
// No tool call => surface fallback text now. Tool call => tool node will set output.
|
|
60
|
-
outputMessage: m ? e.outputMessage : v,
|
|
61
|
-
status: m ? e.status : N ? "success" : "failed"
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const B = (e) => {
|
|
65
|
-
const t = typeof e == "string" ? e : String(e);
|
|
66
|
-
try {
|
|
67
|
-
const o = JSON.parse(t);
|
|
68
|
-
if (o && typeof o == "object" && typeof o.text == "string")
|
|
69
|
-
return o;
|
|
70
|
-
} catch {
|
|
71
|
-
console.warn("Failed to parse tool response as JSON:", t);
|
|
72
|
-
}
|
|
73
|
-
return { text: t };
|
|
74
|
-
};
|
|
75
|
-
async function D(e, t) {
|
|
76
|
-
const o = new G(S, { handleToolErrors: !1 });
|
|
77
|
-
try {
|
|
78
|
-
const s = e.navigationInternalState.toolCallMessage;
|
|
79
|
-
if (!s)
|
|
80
|
-
throw new Error("navigationToolCalling: missing navigationInternalState.toolCallMessage");
|
|
81
|
-
const { messages: g } = await o.invoke(
|
|
82
|
-
{
|
|
83
|
-
messages: [s]
|
|
84
|
-
},
|
|
85
|
-
t
|
|
86
|
-
);
|
|
87
|
-
let i = "", l;
|
|
88
|
-
for (const c of g) {
|
|
89
|
-
const a = B(c.content);
|
|
90
|
-
a.text && (i += `${a.text}
|
|
91
|
-
`), a.sharedStatePatch && (l = {
|
|
92
|
-
...l,
|
|
93
|
-
...a.sharedStatePatch
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return await h({ text: `Finished executing navigation tool: ${i}` }, t), {
|
|
97
|
-
...e,
|
|
98
|
-
outputMessage: i,
|
|
99
|
-
sharedStatePatch: l,
|
|
100
|
-
status: "success",
|
|
101
|
-
summary: i ? j(i) : "Navigation executed.",
|
|
102
|
-
navigationInternalState: {
|
|
103
|
-
...e.navigationInternalState,
|
|
104
|
-
toolCallMessage: void 0
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
} catch (s) {
|
|
108
|
-
const g = s instanceof Error ? s.message : String(s);
|
|
109
|
-
return await h({ text: `Navigation tool execution failed: ${g}` }, t), {
|
|
110
|
-
...e,
|
|
111
|
-
outputMessage: `Navigation tool execution failed: ${g}`,
|
|
112
|
-
status: "failed",
|
|
113
|
-
summary: `Navigation tool execution failed: ${g}`,
|
|
114
|
-
navigationInternalState: {
|
|
115
|
-
...e.navigationInternalState,
|
|
116
|
-
toolCallMessage: void 0
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
async function J(e, t) {
|
|
122
|
-
const o = await T("navigation_intent_prompt"), { mapView: s } = k(t), g = S.map((n) => ({
|
|
123
|
-
name: n.name,
|
|
124
|
-
description: n.description,
|
|
125
|
-
schema: n.schema
|
|
126
|
-
})), l = s.map.bookmarks?.map((n) => n.name).filter(Boolean) ?? [], c = l.length ? `Available bookmarks:
|
|
127
|
-
${l.map((n) => `- ${n}`).join(`
|
|
128
|
-
`)}` : "", a = {
|
|
129
|
-
tools: g.map(({ name: n, description: m, schema: v }) => `${n}: ${m}, ${JSON.stringify(v)}`).join(`
|
|
130
|
-
`),
|
|
131
|
-
bookmarks: c,
|
|
132
|
-
assignedTask: e.agentExecutionContext.assignedTask,
|
|
133
|
-
userRequest: e.agentExecutionContext.userRequest,
|
|
134
|
-
priorSteps: e.agentExecutionContext.priorSteps
|
|
135
|
-
}, r = x.object({
|
|
136
|
-
intent: x.string()
|
|
137
|
-
}), d = await z({
|
|
138
|
-
promptText: o,
|
|
139
|
-
config: t,
|
|
140
|
-
inputVariables: a,
|
|
141
|
-
schema: r,
|
|
142
|
-
modelTier: "fast"
|
|
143
|
-
}), y = typeof d.intent == "string" ? d.intent.trim().replace(/^"|"$/gu, "") : "";
|
|
144
|
-
return { ...e, intent: y || "" };
|
|
145
|
-
}
|
|
146
|
-
const H = 0.7, U = async (e, t) => {
|
|
147
|
-
try {
|
|
148
|
-
await h(
|
|
149
|
-
{ text: `Similarity search to find layers: ${e.agentExecutionContext.assignedTask}` },
|
|
150
|
-
t
|
|
151
|
-
);
|
|
152
|
-
const o = u(t, "layerSearch"), s = u(t, "layersAndFieldsRegistry"), g = u(t, "embeddingCache"), l = (await o.searchLayers({
|
|
153
|
-
text: e.agentExecutionContext.assignedTask,
|
|
154
|
-
minScore: H,
|
|
155
|
-
embeddingCache: g
|
|
156
|
-
})).map(({ id: a, score: r }) => {
|
|
157
|
-
const d = s.get(a)?.layerItem;
|
|
158
|
-
return {
|
|
159
|
-
id: a,
|
|
160
|
-
title: d?.title,
|
|
161
|
-
name: d?.name ?? void 0,
|
|
162
|
-
score: r
|
|
163
|
-
};
|
|
164
|
-
});
|
|
165
|
-
let c;
|
|
166
|
-
return l.length > 0 ? c = `Vector search completed. Matching layers:
|
|
167
|
-
${l.map((a) => `- layerId=${a.id} | title=${a.title ?? ""} | name=${a.name ?? ""} | score=${a.score.toFixed(2)}`).join(`
|
|
168
|
-
`)}` : c = "Vector search completed. No matching layers found.", await h({ text: c }, t), {
|
|
169
|
-
...e,
|
|
170
|
-
vectorSearchLayerResults: l
|
|
171
|
-
};
|
|
172
|
-
} catch (o) {
|
|
173
|
-
throw await h(
|
|
174
|
-
{ text: `Error during vector search layers: ${o instanceof Error ? o.message : String(o)}` },
|
|
175
|
-
t
|
|
176
|
-
), o;
|
|
177
|
-
}
|
|
178
|
-
}, f = 0.7, W = 10, K = async (e, t) => {
|
|
179
|
-
try {
|
|
180
|
-
await h(
|
|
181
|
-
{ text: `Similarity search to find fields: ${e.agentExecutionContext.assignedTask}` },
|
|
182
|
-
t
|
|
183
|
-
);
|
|
184
|
-
const o = u(t, "fieldSearch"), s = u(t, "layersAndFieldsRegistry"), g = u(t, "embeddingCache"), i = e.vectorSearchLayerResults?.map((r) => r.id) ?? [];
|
|
185
|
-
if (i.length === 0)
|
|
186
|
-
return await h({ text: "No candidate layers for field search" }, t), e;
|
|
187
|
-
const c = (await o.searchFields({
|
|
188
|
-
text: e.agentExecutionContext.assignedTask,
|
|
189
|
-
layerIds: i,
|
|
190
|
-
minScore: f,
|
|
191
|
-
topResults: W,
|
|
192
|
-
embeddingCache: g
|
|
193
|
-
})).map(({ layerId: r, results: d }) => {
|
|
194
|
-
const y = s.get(r)?.fieldRegistry;
|
|
195
|
-
return {
|
|
196
|
-
layerId: r,
|
|
197
|
-
layerName: s.get(r)?.layerItem.name,
|
|
198
|
-
results: d.map((n) => {
|
|
199
|
-
const m = y?.get(n.name);
|
|
200
|
-
return {
|
|
201
|
-
name: n.name,
|
|
202
|
-
score: n.score,
|
|
203
|
-
type: m?.type,
|
|
204
|
-
alias: m?.alias,
|
|
205
|
-
description: m?.description,
|
|
206
|
-
statistics: m?.statistics
|
|
207
|
-
};
|
|
208
|
-
})
|
|
209
|
-
};
|
|
210
|
-
});
|
|
211
|
-
let a;
|
|
212
|
-
return c.length > 0 ? a = `Vector search completed. Matching layers and fields:
|
|
213
|
-
${c.map(
|
|
214
|
-
(r) => `${r.layerName ?? r.layerId}:
|
|
215
|
-
${r.results.map((d) => ` - ${d.name} (${d.score.toFixed(2)})`).join(`
|
|
216
|
-
`)}`
|
|
217
|
-
).join(`
|
|
218
|
-
`)}` : a = `No vector search field results found for score over ${f}.`, await h({ text: a }, t), {
|
|
219
|
-
...e,
|
|
220
|
-
vectorSearchFieldResults: c
|
|
221
|
-
};
|
|
222
|
-
} catch (o) {
|
|
223
|
-
throw await h(
|
|
224
|
-
{ text: `Error during vector search fields: ${o instanceof Error ? o.message : String(o)}` },
|
|
225
|
-
t
|
|
226
|
-
), o;
|
|
227
|
-
}
|
|
228
|
-
}, Q = (e, t) => P(["layerSearch", "layersAndFieldsRegistry"], "Navigation Agent")(e, t), X = () => new b(w).addNode("requireNavigationServices", Q).addNode("intentLLM", J).addNode("vectorSearchLayers", U).addNode("vectorSearchFields", K).addNode("agent", O).addNode("tools", D).addEdge($, "requireNavigationServices").addEdge("requireNavigationServices", "intentLLM").addConditionalEdges(
|
|
229
|
-
"intentLLM",
|
|
230
|
-
(t) => t.intent === "goToLayer" || t.intent === "goToFeatures" ? "vectorSearchLayers" : "agent",
|
|
231
|
-
{
|
|
232
|
-
vectorSearchLayers: "vectorSearchLayers",
|
|
233
|
-
agent: "agent"
|
|
234
|
-
}
|
|
235
|
-
).addConditionalEdges(
|
|
236
|
-
"vectorSearchLayers",
|
|
237
|
-
(t) => t.intent === "goToFeatures" ? "vectorSearchFields" : "agent",
|
|
238
|
-
{
|
|
239
|
-
vectorSearchFields: "vectorSearchFields",
|
|
240
|
-
agent: "agent"
|
|
241
|
-
}
|
|
242
|
-
).addEdge("vectorSearchFields", "agent").addEdge("agent", "tools").addEdge("tools", C), Y = String.raw`- **navigation** — Enables users to interact with the map by navigating to specific locations, layers, features, or extents.
|
|
243
|
-
This includes zooming, panning, centering, or geocoding based on user input. The agent is designed to handle explicit map movement requests. NOTE: DO NOT call this agent if the user asks "show me...", that is meant to be handled by another agent. If the query is about where a certain address is, call this agent.
|
|
244
|
-
|
|
245
|
-
Supported actions:
|
|
246
|
-
- **Zooming**: Adjust the map's zoom level (e.g., "Zoom to level 10", "Zoom in").
|
|
247
|
-
- **Viewpoints**: Navigate to a specific center point with optional zoom or scale (e.g., "Center the map on San Francisco at zoom level 16").
|
|
248
|
-
- **Scales**: Set the map to a specific scale (e.g., "Set the map scale to 1:50,000").
|
|
249
|
-
- **Layers**: Zoom to the full extent of a specific layer (e.g., "Go to the water mains layer"). For the purposes of link charts, if the user requests to go to the extent of a link chart or the entities/nodes within it, that should be treated as a request to use the goToLayer tool on the link chart layer
|
|
250
|
-
- **Features**: Zoom to features in a layer that match a filter (e.g., "Zoom to all schools in the city").
|
|
251
|
-
- **Bookmarks**: Navigate to a predefined bookmark extent (e.g., "Go to the Downtown bookmark").
|
|
252
|
-
- **Extents**: Reset to the initial web map extent or zoom to the full world extent (e.g., "Reset the map", "Zoom to the full world extent").
|
|
253
|
-
- **Addresses**: Zoom to an address or place name (e.g., "Zoom to 1600 Pennsylvania Ave").
|
|
254
|
-
|
|
255
|
-
_Example: “Zoom to Texas”_
|
|
256
|
-
_Example: “Go to the water mains layer”_
|
|
257
|
-
_Example: “Zoom to to the extent of my link chart”_
|
|
258
|
-
_Example: “Center the map on San Francisco at scale 50000”_
|
|
259
|
-
_Example: “Zoom to the features in the schools layer where city = 'Austin'”_
|
|
260
|
-
_Example: “Go to the Downtown bookmark”_
|
|
261
|
-
_Example: “Where is Mount Rainier?”_`, ye = {
|
|
262
|
-
id: "navigation",
|
|
263
|
-
name: "Navigation Agent",
|
|
264
|
-
description: Y,
|
|
265
|
-
createGraph: X,
|
|
266
|
-
workspace: w
|
|
267
|
-
};
|
|
268
|
-
export {
|
|
269
|
-
ye as N
|
|
270
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import "@arcgis/core/identity/IdentityManager.js";
|
|
3
|
-
import "@arcgis/core/portal/Portal.js";
|
|
4
|
-
import "@langchain/langgraph/web";
|
|
5
|
-
import "./generateLayerDescriptions.js";
|
|
6
|
-
import "@langchain/core/messages";
|
|
7
|
-
import { s as r } from "./index.js";
|
|
8
|
-
import "@langchain/openai";
|
|
9
|
-
import "@arcgis/core/config.js";
|
|
10
|
-
import "@arcgis/core/core/reactiveUtils.js";
|
|
11
|
-
import "@arcgis/core/layers/FeatureLayer.js";
|
|
12
|
-
import "@arcgis/core/request.js";
|
|
13
|
-
import "@langchain/core/prompts";
|
|
14
|
-
const y = async (t, o) => {
|
|
15
|
-
const a = t.tool_calls ?? [];
|
|
16
|
-
if (a.length === 0) {
|
|
17
|
-
await r({ text: `LLM did not request any tool calls: ${String(t?.content)}` }, o);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
await Promise.all(
|
|
21
|
-
a.map(
|
|
22
|
-
async (i) => await r(
|
|
23
|
-
{ text: `LLM invoked ${i.name} tool with arguments: ${JSON.stringify(i.args, null, 2)}` },
|
|
24
|
-
o
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
y as h
|
|
31
|
-
};
|