@arcgis/ai-components 5.2.0-next.105 → 5.2.0-next.107
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/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.js +42 -41
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/index.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +6 -6
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- 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/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.js +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +21 -20
- package/dist/agents/tools/help/listFields/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
- package/dist/agents/tools/query/getStatistics/adapter.js +5 -4
- package/dist/agents/tools/query/getTopFeatures/adapter.js +5 -4
- package/dist/agents/tools/query/queryFeatures/adapter.js +5 -4
- package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
- 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/25MBI4PD.js +2 -0
- package/dist/cdn/{LLUGJKAQ.js → 275FFTBE.js} +2 -2
- package/dist/cdn/2F4TPWZQ.js +2 -0
- package/dist/cdn/{HKOGIZDQ.js → 2LVYAXHG.js} +19 -19
- package/dist/cdn/{5MK44FNO.js → 2NRCE53B.js} +2 -2
- package/dist/cdn/{R2PQVY4O.js → 2WXXSZP5.js} +2 -2
- package/dist/cdn/{APFZY4PI.js → 3KNLFIM3.js} +2 -2
- package/dist/cdn/{NNXISHCA.js → 3PPXAIRE.js} +3 -3
- package/dist/cdn/{FUF3NAU7.js → 45BDE3MG.js} +2 -2
- package/dist/cdn/{VOKXKU7M.js → 477I66FH.js} +10 -10
- package/dist/cdn/4CFCV47G.js +2 -0
- package/dist/cdn/{TPULIO6I.js → 4IWDBEMN.js} +2 -2
- package/dist/cdn/{G2EGT3CF.js → 4OI4QEV7.js} +2 -2
- package/dist/cdn/{2W7LK4HA.js → 4UAREC76.js} +2 -2
- package/dist/cdn/{HHFNQR6Z.js → 4VBOTWC3.js} +2 -2
- package/dist/cdn/{RLEHNAIA.js → 4YOG5F3W.js} +1 -1
- package/dist/cdn/5X23DDDZ.js +2 -0
- package/dist/cdn/65ZACLYB.js +2 -0
- package/dist/cdn/{HDACNIZF.js → 6KWGSXIN.js} +2 -2
- package/dist/cdn/{O4NVW75A.js → 6MRTZ4OM.js} +2 -2
- package/dist/cdn/{DKZYPPJV.js → 77NAJM5H.js} +2 -2
- package/dist/cdn/{NEV6OZN3.js → 7DOYUO7L.js} +2 -2
- package/dist/cdn/{EYOWRGDP.js → 7JJX6VGI.js} +2 -2
- package/dist/cdn/{ONQ6JSBJ.js → A6LBMS7A.js} +1 -1
- package/dist/cdn/{ZDV4K4WG.js → AP3KPOHN.js} +2 -2
- package/dist/cdn/AUCKEB52.js +2 -0
- package/dist/cdn/B3HXSEBN.js +2 -0
- package/dist/cdn/{6ECRQVHY.js → BAKJLCYO.js} +2 -2
- package/dist/cdn/BJMGT6GV.js +19 -0
- package/dist/cdn/{HAEFC2SJ.js → BTOBEN7Q.js} +2 -2
- package/dist/cdn/BTTCBEPW.js +2 -0
- package/dist/cdn/{UZLQALHY.js → BVUCNXC5.js} +1 -1
- package/dist/cdn/{RFVZ7KCG.js → CAOMMQSY.js} +1 -1
- package/dist/cdn/{P4GFYBBO.js → CBYBFBD3.js} +2 -2
- package/dist/cdn/{VLLZ2FFU.js → CKUUYQLO.js} +2 -2
- package/dist/cdn/{MWYBF3F3.js → CSE6BHOJ.js} +2 -2
- package/dist/cdn/{7BCQMK6D.js → CX2HJ67C.js} +2 -2
- package/dist/cdn/EELMDCPV.js +2 -0
- package/dist/cdn/{7VUSIGEM.js → EGRRZTF6.js} +2 -2
- package/dist/cdn/EHYDAEGL.js +2 -0
- package/dist/cdn/{C4JT4S5E.js → EK3PM4L5.js} +2 -2
- package/dist/cdn/{PYGX4HN7.js → ENAEE4UU.js} +2 -2
- package/dist/cdn/EXMEB4X2.js +2 -0
- package/dist/cdn/{FG647IP6.js → EYGZJKVD.js} +2 -2
- package/dist/cdn/{4RDNI22D.js → FK2CVSXW.js} +5 -5
- package/dist/cdn/FLUI6GCU.js +2 -0
- package/dist/cdn/{ZU2FHVNK.js → FPH52WOH.js} +2 -2
- package/dist/cdn/FRYS2PZJ.js +2 -0
- package/dist/cdn/FSLQCZRN.js +2 -0
- package/dist/cdn/{PQ2DPOFM.js → FTTLFIBV.js} +2 -2
- package/dist/cdn/{NZSOJ726.js → FV6FHLYW.js} +2 -2
- package/dist/cdn/{WGO5SER7.js → G24MNC7D.js} +2 -2
- package/dist/cdn/{6OOZSZRJ.js → GN56DOYL.js} +2 -2
- package/dist/cdn/{ROQGPAR5.js → HIJGY4GU.js} +2 -2
- package/dist/cdn/{BL273EGZ.js → HMMYCSOK.js} +2 -2
- package/dist/cdn/{OE3GW5LE.js → HNTSDY3J.js} +2 -2
- package/dist/cdn/HQOK6DDH.js +2 -0
- package/dist/cdn/{K2R6XVK3.js → HV7MVIQV.js} +2 -2
- package/dist/cdn/I3SUE2TR.js +2 -0
- package/dist/cdn/{VAXH6RUQ.js → I72ST4JR.js} +2 -2
- package/dist/cdn/{FYZATVB3.js → IHUWQOMK.js} +2 -2
- package/dist/cdn/{J6A4AS7E.js → JMXXRRKQ.js} +2 -2
- package/dist/cdn/{5HBAJ57P.js → JPXEMNPR.js} +2 -2
- package/dist/cdn/{UHEYPSOR.js → JYNHWJUZ.js} +2 -2
- package/dist/cdn/KAX4A7SF.js +2 -0
- package/dist/cdn/{5ZFUGNRN.js → KBSXHSBX.js} +2 -2
- package/dist/cdn/{CCC6LBMY.js → KKCLHXHG.js} +1 -1
- package/dist/cdn/L2HLFWCV.js +72 -0
- package/dist/cdn/{LK7ZIQW6.js → L3BTURBA.js} +2 -2
- package/dist/cdn/{IBZ2NEAO.js → LBTGOMCT.js} +2 -2
- package/dist/cdn/{34O57OGV.js → LLY5A2E2.js} +1 -1
- package/dist/cdn/{Z5W4V7RC.js → LXIKAXUT.js} +2 -2
- package/dist/cdn/{AI6DYOKR.js → M2U456J5.js} +3 -3
- package/dist/cdn/{KWD2ECTM.js → M3KKORBG.js} +2 -2
- package/dist/cdn/M5B6X46F.js +2 -0
- package/dist/cdn/{SDWWUWAF.js → MZUDIQQH.js} +2 -2
- package/dist/cdn/{CEKOEHB3.js → NNPA3NLK.js} +2 -2
- package/dist/cdn/{MXTXJKFE.js → NPWLYHMU.js} +2 -2
- package/dist/cdn/NV7CL4S3.js +2 -0
- package/dist/cdn/{3UEKINYC.js → OALQBAZR.js} +2 -2
- package/dist/cdn/{RHYNE5OE.js → OF3TAARW.js} +1 -1
- package/dist/cdn/{F5NIRETW.js → P53TDER7.js} +2 -2
- package/dist/cdn/{SXM4NUT5.js → PJLGCS33.js} +2 -2
- package/dist/cdn/{BXQ4I5HB.js → PJPP6LOS.js} +3 -3
- package/dist/cdn/PUZ6RAFQ.js +2 -0
- package/dist/cdn/{IHP25JWI.js → QAX6UF4L.js} +2 -2
- package/dist/cdn/{JEBRN3EU.js → QTEPFTAU.js} +2 -2
- package/dist/cdn/ROS22KOA.js +2 -0
- package/dist/cdn/RPOFBIE7.js +2 -0
- package/dist/cdn/{COH3QXWG.js → S5GFNIHC.js} +3 -3
- package/dist/cdn/SBNNJ5WA.js +2 -0
- package/dist/cdn/SI22EJLC.js +2 -0
- package/dist/cdn/{5WYRJMBW.js → SJMAKF4P.js} +2 -2
- package/dist/cdn/{6P44KOKX.js → SKCUGZ7G.js} +2 -2
- package/dist/cdn/{V6HOUZPZ.js → SNG3WODY.js} +2 -2
- package/dist/cdn/{22KHSDJI.js → STOGCXJH.js} +2 -2
- package/dist/cdn/SUC2MIGE.js +2 -0
- package/dist/cdn/SXYKNDOF.js +2 -0
- package/dist/cdn/SZ2L5556.js +2 -0
- package/dist/cdn/{Y7XD7ZRD.js → T6W6F4TF.js} +2 -2
- package/dist/cdn/{WKTQVBFJ.js → TFAJNKBC.js} +2 -2
- package/dist/cdn/{R74ZHFA6.js → TLPZELG3.js} +1 -1
- package/dist/cdn/{2O4DON37.js → TNLFUXIB.js} +2 -2
- package/dist/cdn/{YEZ3AMNX.js → TXZQZR3I.js} +2 -2
- package/dist/cdn/UGIHS7OA.js +2 -0
- package/dist/cdn/{UDRKUVZP.js → UX457AQR.js} +2 -2
- package/dist/cdn/{ICBIUFK7.js → V266DJ5V.js} +2 -2
- package/dist/cdn/{FDOMMK2M.js → V4PJMCJZ.js} +1 -1
- package/dist/cdn/{7VAQUCBU.js → V52GSTOC.js} +2 -2
- package/dist/cdn/VGLBH473.js +2 -0
- package/dist/cdn/{WSWB3B7B.js → VHNTHPH7.js} +2 -2
- package/dist/cdn/{KITIP6J2.js → VK6CCPTG.js} +2 -2
- package/dist/cdn/{AOVJ34QE.js → VLPELJUS.js} +2 -2
- package/dist/cdn/VT5EWFH7.js +2 -0
- package/dist/cdn/{J6SZIQJA.js → VXLKTQ36.js} +2 -2
- package/dist/cdn/W54XYT2A.js +2 -0
- package/dist/cdn/{7SRLZQVC.js → X42ACC66.js} +2 -2
- package/dist/cdn/{CP5BVGJU.js → XNUWVZN7.js} +2 -2
- package/dist/cdn/XOTPSCNF.js +2 -0
- package/dist/cdn/XRVGYRXL.js +14 -0
- package/dist/cdn/{ANRQWYU2.js → XV7RMYLR.js} +2 -2
- package/dist/cdn/{5K5ZY267.js → XVJFPZTW.js} +2 -2
- package/dist/cdn/XZF7Y6B2.js +2 -0
- package/dist/cdn/Y4ZOB6UH.js +2 -0
- package/dist/cdn/Y6CV2NZR.js +2 -0
- package/dist/cdn/YMJKT5OK.js +2 -0
- package/dist/cdn/{655YIKL3.js → YOW3YKWR.js} +3 -3
- package/dist/cdn/{OKVLGJAG.js → ZA7ZU2F7.js} +2 -2
- package/dist/cdn/{EWLXNGKH.js → ZJWR4W2S.js} +16 -16
- 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/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 +138 -141
- package/dist/chunks/aiFactory.js +94 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +15 -14
- package/dist/chunks/arcgisToolRegistry.js +88 -0
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/baseAgentState.js +3 -3
- package/dist/chunks/converterUtils.js +1 -1
- 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 +1 -1
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +1 -1
- package/dist/chunks/fetchService.js +1 -1
- package/dist/chunks/fieldStatistics.js +1 -1
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +1 -1
- package/dist/chunks/generateLayerDescriptions.js +182 -269
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +34 -0
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/intent_prompt.js +1 -1
- package/dist/chunks/layerStylingGraph.js +92 -77
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/navigationAgent.js +27 -0
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/orchestrator.js +14 -13
- package/dist/chunks/requireAgentServices.js +11 -0
- package/dist/chunks/resolvePointGeometryFilter.js +12 -12
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +1 -1
- 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 +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +130 -212
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +18 -7
- package/dist/components/arcgis-assistant-help-agent/customElement.js +4 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +2 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +2 -1
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +19 -8
- package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/orchestrator/models/types.d.ts +1 -0
- package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
- package/dist/orchestrator/registry/agentRegistry.d.ts +33 -0
- package/dist/orchestrator/types/types.d.ts +17 -0
- package/dist/utils/index.d.ts +13 -3
- package/dist/utils/index.js +707 -83
- package/package.json +9 -5
- package/dist/cdn/2EY3BQQX.js +0 -2
- package/dist/cdn/2NDBI2VA.js +0 -156
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/4OGR5QKS.js +0 -2
- package/dist/cdn/5X7EG7D2.js +0 -2
- package/dist/cdn/6FCU2KJP.js +0 -2
- package/dist/cdn/7BJ4JKLG.js +0 -2
- package/dist/cdn/7HS5KX3J.js +0 -2
- package/dist/cdn/7UUYJTKT.js +0 -2
- package/dist/cdn/7V6OSTFC.js +0 -2
- package/dist/cdn/7VYYQ7BT.js +0 -2
- package/dist/cdn/ACJTJLZN.js +0 -2
- package/dist/cdn/AKD5UOVX.js +0 -2
- package/dist/cdn/C7LGDNB3.js +0 -14
- package/dist/cdn/CGJINV7H.js +0 -2
- package/dist/cdn/CJMUJXPL.js +0 -2
- package/dist/cdn/D2SS763Z.js +0 -2
- package/dist/cdn/FJO4KNOZ.js +0 -2
- package/dist/cdn/G3SF6U2U.js +0 -2
- package/dist/cdn/G6CR7JVM.js +0 -22
- package/dist/cdn/GL7BPKBN.js +0 -2
- package/dist/cdn/JO5ETMPS.js +0 -2
- package/dist/cdn/NYJYRCGA.js +0 -2
- package/dist/cdn/PUHRBGKB.js +0 -2
- package/dist/cdn/Q57QWN5W.js +0 -2
- package/dist/cdn/QUKNPVAF.js +0 -2
- package/dist/cdn/RBE55SWR.js +0 -2
- package/dist/cdn/SWH6ZHD4.js +0 -18
- package/dist/cdn/SZ2QSSB3.js +0 -2
- package/dist/cdn/T4RIGOXB.js +0 -2
- package/dist/cdn/VXFQANGJ.js +0 -2
- package/dist/cdn/W4JQDITQ.js +0 -36
- package/dist/cdn/XX6GHMNR.js +0 -2
- package/dist/cdn/YLVJA4ZE.js +0 -2
- package/dist/cdn/ZOEMBHRF.js +0 -2
- package/dist/cdn/ZRVZMPFN.js +0 -2
- package/dist/chunks/dataExplorationGraph.js +0 -254
- package/dist/chunks/helpGraph.js +0 -133
- package/dist/chunks/navigationGraph.js +0 -290
- package/dist/chunks/toolCallResponse.js +0 -33
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { StateGraph as E, START as $, END as R } from "@langchain/langgraph/web";
|
|
3
|
-
import { g as T, t as C, r as F, N as k } from "./adapter.js";
|
|
4
|
-
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
|
-
import "@arcgis/core/portal/Portal.js";
|
|
6
|
-
import "@arcgis/core/request.js";
|
|
7
|
-
import "@arcgis/toolkit/string";
|
|
8
|
-
import { h as L, i as M } from "./generateLayerDescriptions.js";
|
|
9
|
-
import "@langchain/core/messages";
|
|
10
|
-
import "@langchain/core/callbacks/dispatch/web";
|
|
11
|
-
import "@langchain/core/callbacks/base";
|
|
12
|
-
import "@langchain/openai";
|
|
13
|
-
import "@arcgis/core/config.js";
|
|
14
|
-
import "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
-
import "@arcgis/core/layers/FeatureLayer.js";
|
|
16
|
-
import { goToAddressTool as A } from "../agents/tools/navigation/goToAddress/adapter.js";
|
|
17
|
-
import { goToBookmarkTool as _ } from "../agents/tools/navigation/goToBookmark/adapter.js";
|
|
18
|
-
import { goToFeaturesTool as I } from "../agents/tools/navigation/goToFeatures/adapter.js";
|
|
19
|
-
import { goToFullExtentTool as q } from "../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
20
|
-
import { goToHomeExtentTool as Z } from "../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
21
|
-
import { goToLayerTool as V } from "../agents/tools/navigation/goToLayer/adapter.js";
|
|
22
|
-
import { goToScaleTool as j } from "../agents/tools/navigation/goToScale/adapter.js";
|
|
23
|
-
import { goToViewpointTool as P } from "../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
24
|
-
import { goToZoomTool as z } from "../agents/tools/navigation/goToZoom/adapter.js";
|
|
25
|
-
import { f as w } from "./fetchAgentContext.js";
|
|
26
|
-
import { h as G } from "./toolCallResponse.js";
|
|
27
|
-
import { s as p } from "./index.js";
|
|
28
|
-
import "@langchain/core/prompts";
|
|
29
|
-
import { ToolNode as O } from "@langchain/langgraph/prebuilt";
|
|
30
|
-
import S from "zod";
|
|
31
|
-
import { f as y } from "./fetchService.js";
|
|
32
|
-
const f = [
|
|
33
|
-
A,
|
|
34
|
-
_,
|
|
35
|
-
I,
|
|
36
|
-
q,
|
|
37
|
-
Z,
|
|
38
|
-
V,
|
|
39
|
-
j,
|
|
40
|
-
P,
|
|
41
|
-
z
|
|
42
|
-
];
|
|
43
|
-
async function B(e, t) {
|
|
44
|
-
const o = await T("navigation_tool_prompt"), { mapView: s } = w(t, ["mapView"]), c = s.map.bookmarks?.map((u) => u.name).filter(Boolean) ?? [], m = e.vectorSearchLayerResults?.length > 0 ? e.vectorSearchLayerResults.map(
|
|
45
|
-
(u, b) => `${b + 1}. layerId=${u.id} | title=${u.title ?? ""} | name=${u.name ?? ""} | score=${u.score.toFixed(2)}`
|
|
46
|
-
).join(`
|
|
47
|
-
`) : "", l = e.vectorSearchFieldResults?.length > 0 ? JSON.stringify(e.vectorSearchFieldResults, null, 2) : "", r = e.intent === "goToBookmark" && c.length ? `Available bookmarks:
|
|
48
|
-
${c.map((u) => `- ${u}`).join(`
|
|
49
|
-
`)}` : "", a = (e.intent === "goToLayer" || e.intent === "goToFeatures") && e.vectorSearchLayerResults?.length ? `Candidate layers:
|
|
50
|
-
${m}` : "", i = e.intent === "goToFeatures" && e.vectorSearchFieldResults?.length ? `Candidate fields:
|
|
51
|
-
${l}` : "", h = {
|
|
52
|
-
intent: e.intent,
|
|
53
|
-
bookmarksSection: r,
|
|
54
|
-
layersSection: a,
|
|
55
|
-
fieldsSection: i,
|
|
56
|
-
currentZoom: s.zoom,
|
|
57
|
-
assignedTask: e.agentExecutionContext.assignedTask,
|
|
58
|
-
userRequest: e.agentExecutionContext.userRequest,
|
|
59
|
-
priorSteps: e.agentExecutionContext.priorSteps
|
|
60
|
-
}, n = await L({
|
|
61
|
-
promptText: o,
|
|
62
|
-
modelTier: "fast",
|
|
63
|
-
config: t,
|
|
64
|
-
inputVariables: h,
|
|
65
|
-
tools: f
|
|
66
|
-
});
|
|
67
|
-
await G(n, t);
|
|
68
|
-
const g = (n.tool_calls?.length ?? 0) > 0, v = typeof n.text == "string" ? n.text.trim() : "", N = v.length > 0;
|
|
69
|
-
return {
|
|
70
|
-
...e,
|
|
71
|
-
navigationInternalState: {
|
|
72
|
-
...e.navigationInternalState,
|
|
73
|
-
toolCallMessage: g ? n : void 0
|
|
74
|
-
},
|
|
75
|
-
// No tool call => surface fallback text now. Tool call => tool node will set output.
|
|
76
|
-
outputMessage: g ? e.outputMessage : v,
|
|
77
|
-
status: g ? e.status : N ? "success" : "failed"
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
const D = (e) => {
|
|
81
|
-
const t = typeof e == "string" ? e : String(e);
|
|
82
|
-
try {
|
|
83
|
-
const o = JSON.parse(t);
|
|
84
|
-
if (o && typeof o == "object" && typeof o.text == "string")
|
|
85
|
-
return o;
|
|
86
|
-
} catch {
|
|
87
|
-
console.warn("Failed to parse tool response as JSON:", t);
|
|
88
|
-
}
|
|
89
|
-
return { text: t };
|
|
90
|
-
};
|
|
91
|
-
async function J(e, t) {
|
|
92
|
-
const o = new O(f, { handleToolErrors: !1 });
|
|
93
|
-
try {
|
|
94
|
-
const s = e.navigationInternalState.toolCallMessage;
|
|
95
|
-
if (!s)
|
|
96
|
-
throw new Error("navigationToolCalling: missing navigationInternalState.toolCallMessage");
|
|
97
|
-
const { messages: d } = await o.invoke(
|
|
98
|
-
{
|
|
99
|
-
messages: [s]
|
|
100
|
-
},
|
|
101
|
-
t
|
|
102
|
-
);
|
|
103
|
-
let c = "", m, l;
|
|
104
|
-
for (const r of d) {
|
|
105
|
-
const a = D(r.content), i = r.artifact;
|
|
106
|
-
a.text && (c += `${a.text}
|
|
107
|
-
`);
|
|
108
|
-
const h = i?.sharedStatePatch ?? a.sharedStatePatch;
|
|
109
|
-
h && (m = {
|
|
110
|
-
...m,
|
|
111
|
-
...h
|
|
112
|
-
}), i?.sharedResourceAdditions && (l = [...l ?? [], ...i.sharedResourceAdditions]);
|
|
113
|
-
}
|
|
114
|
-
return await p({ text: `Finished executing navigation tool: ${c}` }, t), {
|
|
115
|
-
...e,
|
|
116
|
-
outputMessage: c,
|
|
117
|
-
sharedStatePatch: m,
|
|
118
|
-
sharedResourceAdditions: l,
|
|
119
|
-
status: "success",
|
|
120
|
-
summary: c ? C(c) : "Navigation executed.",
|
|
121
|
-
navigationInternalState: {
|
|
122
|
-
...e.navigationInternalState,
|
|
123
|
-
toolCallMessage: void 0
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
} catch (s) {
|
|
127
|
-
const d = s instanceof Error ? s.message : String(s);
|
|
128
|
-
return await p({ text: `Navigation tool execution failed: ${d}` }, t), {
|
|
129
|
-
...e,
|
|
130
|
-
outputMessage: `Navigation tool execution failed: ${d}`,
|
|
131
|
-
status: "failed",
|
|
132
|
-
summary: `Navigation tool execution failed: ${d}`,
|
|
133
|
-
navigationInternalState: {
|
|
134
|
-
...e.navigationInternalState,
|
|
135
|
-
toolCallMessage: void 0
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
async function H(e, t) {
|
|
141
|
-
const o = await T("navigation_intent_prompt"), { mapView: s } = w(t, ["mapView"]), d = f.map((n) => ({
|
|
142
|
-
name: n.name,
|
|
143
|
-
description: n.description,
|
|
144
|
-
schema: n.schema
|
|
145
|
-
})), m = s.map.bookmarks?.map((n) => n.name).filter(Boolean) ?? [], l = m.length ? `Available bookmarks:
|
|
146
|
-
${m.map((n) => `- ${n}`).join(`
|
|
147
|
-
`)}` : "No bookmarks are available in this map.", r = {
|
|
148
|
-
tools: d.map(({ name: n, description: g, schema: v }) => `${n}: ${g}, ${JSON.stringify(v)}`).join(`
|
|
149
|
-
`),
|
|
150
|
-
bookmarks: l,
|
|
151
|
-
assignedTask: e.agentExecutionContext.assignedTask,
|
|
152
|
-
userRequest: e.agentExecutionContext.userRequest,
|
|
153
|
-
priorSteps: e.agentExecutionContext.priorSteps
|
|
154
|
-
}, a = S.object({
|
|
155
|
-
intent: S.string()
|
|
156
|
-
}), i = await M({
|
|
157
|
-
promptText: o,
|
|
158
|
-
config: t,
|
|
159
|
-
inputVariables: r,
|
|
160
|
-
schema: a,
|
|
161
|
-
modelTier: "fast"
|
|
162
|
-
}), h = typeof i.intent == "string" ? i.intent.trim().replace(/^"|"$/gu, "") : "";
|
|
163
|
-
return { ...e, intent: h || "" };
|
|
164
|
-
}
|
|
165
|
-
const U = 0.7, W = async (e, t) => {
|
|
166
|
-
try {
|
|
167
|
-
await p(
|
|
168
|
-
{ text: `Similarity search to find layers: ${e.agentExecutionContext.assignedTask}` },
|
|
169
|
-
t
|
|
170
|
-
);
|
|
171
|
-
const o = y(t, "layerSearch"), s = y(t, "layersAndFieldsRegistry"), d = y(t, "embeddingCache"), m = (await o.searchLayers({
|
|
172
|
-
text: e.agentExecutionContext.assignedTask,
|
|
173
|
-
minScore: U,
|
|
174
|
-
embeddingCache: d
|
|
175
|
-
})).map(({ id: r, score: a }) => {
|
|
176
|
-
const i = s.get(r)?.layerItem;
|
|
177
|
-
return {
|
|
178
|
-
id: r,
|
|
179
|
-
title: i?.title,
|
|
180
|
-
name: i?.name ?? void 0,
|
|
181
|
-
score: a
|
|
182
|
-
};
|
|
183
|
-
});
|
|
184
|
-
let l;
|
|
185
|
-
return m.length > 0 ? l = `Vector search completed. Matching layers:
|
|
186
|
-
${m.map((r) => `- layerId=${r.id} | title=${r.title ?? ""} | name=${r.name ?? ""} | score=${r.score.toFixed(2)}`).join(`
|
|
187
|
-
`)}` : l = "Vector search completed. No matching layers found.", await p({ text: l }, t), {
|
|
188
|
-
...e,
|
|
189
|
-
vectorSearchLayerResults: m
|
|
190
|
-
};
|
|
191
|
-
} catch (o) {
|
|
192
|
-
throw await p(
|
|
193
|
-
{ text: `Error during vector search layers: ${o instanceof Error ? o.message : String(o)}` },
|
|
194
|
-
t
|
|
195
|
-
), o;
|
|
196
|
-
}
|
|
197
|
-
}, x = 0.7, K = 10, Q = async (e, t) => {
|
|
198
|
-
try {
|
|
199
|
-
await p(
|
|
200
|
-
{ text: `Similarity search to find fields: ${e.agentExecutionContext.assignedTask}` },
|
|
201
|
-
t
|
|
202
|
-
);
|
|
203
|
-
const o = y(t, "fieldSearch"), s = y(t, "layersAndFieldsRegistry"), d = y(t, "embeddingCache"), c = e.vectorSearchLayerResults?.map((a) => a.id) ?? [];
|
|
204
|
-
if (c.length === 0)
|
|
205
|
-
return await p({ text: "No candidate layers for field search" }, t), e;
|
|
206
|
-
const l = (await o.searchFields({
|
|
207
|
-
text: e.agentExecutionContext.assignedTask,
|
|
208
|
-
layerIds: c,
|
|
209
|
-
minScore: x,
|
|
210
|
-
topResults: K,
|
|
211
|
-
embeddingCache: d
|
|
212
|
-
})).map(({ layerId: a, results: i }) => {
|
|
213
|
-
const h = s.get(a)?.fieldRegistry;
|
|
214
|
-
return {
|
|
215
|
-
layerId: a,
|
|
216
|
-
layerName: s.get(a)?.layerItem.name,
|
|
217
|
-
results: i.map((n) => {
|
|
218
|
-
const g = h?.get(n.name);
|
|
219
|
-
return {
|
|
220
|
-
name: n.name,
|
|
221
|
-
score: n.score,
|
|
222
|
-
type: g?.type,
|
|
223
|
-
alias: g?.alias,
|
|
224
|
-
description: g?.description,
|
|
225
|
-
statistics: g?.statistics,
|
|
226
|
-
domain: g?.domain
|
|
227
|
-
};
|
|
228
|
-
})
|
|
229
|
-
};
|
|
230
|
-
});
|
|
231
|
-
let r;
|
|
232
|
-
return l.length > 0 ? r = `Vector search completed. Matching layers and fields:
|
|
233
|
-
${l.map(
|
|
234
|
-
(a) => `${a.layerName ?? a.layerId}:
|
|
235
|
-
${a.results.map((i) => ` - ${i.name} (${i.score.toFixed(2)})`).join(`
|
|
236
|
-
`)}`
|
|
237
|
-
).join(`
|
|
238
|
-
`)}` : r = `No vector search field results found for score over ${x}.`, await p({ text: r }, t), {
|
|
239
|
-
...e,
|
|
240
|
-
vectorSearchFieldResults: l
|
|
241
|
-
};
|
|
242
|
-
} catch (o) {
|
|
243
|
-
throw await p(
|
|
244
|
-
{ text: `Error during vector search fields: ${o instanceof Error ? o.message : String(o)}` },
|
|
245
|
-
t
|
|
246
|
-
), o;
|
|
247
|
-
}
|
|
248
|
-
}, X = (e, t) => F(["layerSearch", "layersAndFieldsRegistry"], "Navigation Agent")(e, t), Y = () => new E(k).addNode("requireNavigationServices", X).addNode("intentLLM", H).addNode("vectorSearchLayers", W).addNode("vectorSearchFields", Q).addNode("agent", B).addNode("tools", J).addEdge($, "requireNavigationServices").addEdge("requireNavigationServices", "intentLLM").addConditionalEdges(
|
|
249
|
-
"intentLLM",
|
|
250
|
-
(t) => t.intent === "goToLayer" || t.intent === "goToFeatures" ? "vectorSearchLayers" : "agent",
|
|
251
|
-
{
|
|
252
|
-
vectorSearchLayers: "vectorSearchLayers",
|
|
253
|
-
agent: "agent"
|
|
254
|
-
}
|
|
255
|
-
).addConditionalEdges(
|
|
256
|
-
"vectorSearchLayers",
|
|
257
|
-
(t) => t.intent === "goToFeatures" ? "vectorSearchFields" : "agent",
|
|
258
|
-
{
|
|
259
|
-
vectorSearchFields: "vectorSearchFields",
|
|
260
|
-
agent: "agent"
|
|
261
|
-
}
|
|
262
|
-
).addEdge("vectorSearchFields", "agent").addEdge("agent", "tools").addEdge("tools", R), ee = String.raw`- **navigation** — Enables users to interact with the map by navigating to specific locations, layers, features, or extents.
|
|
263
|
-
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.
|
|
264
|
-
|
|
265
|
-
Supported actions:
|
|
266
|
-
- **Zooming**: Adjust the map's zoom level (e.g., "Zoom to level 10", "Zoom in").
|
|
267
|
-
- **Viewpoints**: Navigate to a specific center point with optional zoom or scale (e.g., "Center the map on San Francisco at zoom level 16").
|
|
268
|
-
- **Scales**: Set the map to a specific scale (e.g., "Set the map scale to 1:50,000").
|
|
269
|
-
- **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
|
|
270
|
-
- **Features**: Zoom to features in a layer that match a filter (e.g., "Zoom to all schools in the city").
|
|
271
|
-
- **Bookmarks**: Navigate to a predefined bookmark extent (e.g., "Go to the Downtown bookmark").
|
|
272
|
-
- **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").
|
|
273
|
-
- **Addresses**: Zoom to an address or place name (e.g., "Zoom to 1600 Pennsylvania Ave").
|
|
274
|
-
|
|
275
|
-
_Example: “Zoom to Texas”_
|
|
276
|
-
_Example: “Go to the water mains layer”_
|
|
277
|
-
_Example: “Zoom to to the extent of my link chart”_
|
|
278
|
-
_Example: “Center the map on San Francisco at scale 50000”_
|
|
279
|
-
_Example: “Zoom to the features in the schools layer where city = 'Austin'”_
|
|
280
|
-
_Example: “Go to the Downtown bookmark”_
|
|
281
|
-
_Example: “Where is Mount Rainier?”_`, Le = {
|
|
282
|
-
id: "navigation",
|
|
283
|
-
name: "Navigation Agent",
|
|
284
|
-
description: ee,
|
|
285
|
-
createGraph: Y,
|
|
286
|
-
workspace: k
|
|
287
|
-
};
|
|
288
|
-
export {
|
|
289
|
-
Le as N
|
|
290
|
-
};
|
|
@@ -1,33 +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 "@arcgis/core/request.js";
|
|
5
|
-
import "@langchain/langgraph/web";
|
|
6
|
-
import "@arcgis/toolkit/string";
|
|
7
|
-
import "./generateLayerDescriptions.js";
|
|
8
|
-
import "@langchain/core/messages";
|
|
9
|
-
import { s as a } from "./index.js";
|
|
10
|
-
import "@langchain/core/callbacks/base";
|
|
11
|
-
import "@langchain/openai";
|
|
12
|
-
import "@arcgis/core/config.js";
|
|
13
|
-
import "@arcgis/core/core/reactiveUtils.js";
|
|
14
|
-
import "@arcgis/core/layers/FeatureLayer.js";
|
|
15
|
-
import "@langchain/core/prompts";
|
|
16
|
-
const x = async (t, o) => {
|
|
17
|
-
const i = t.tool_calls ?? [];
|
|
18
|
-
if (i.length === 0) {
|
|
19
|
-
await a({ text: `LLM did not request any tool calls: ${String(t?.content)}` }, o);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
await Promise.all(
|
|
23
|
-
i.map(
|
|
24
|
-
async (r) => await a(
|
|
25
|
-
{ text: `LLM invoked ${r.name} tool with arguments: ${JSON.stringify(r.args, null, 2)}` },
|
|
26
|
-
o
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
x as h
|
|
33
|
-
};
|