@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,26 +1,27 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import e from "zod";
|
|
3
3
|
import { tool as h } from "@langchain/core/tools";
|
|
4
4
|
import m from "@arcgis/core/layers/support/FeatureEffect.js";
|
|
5
5
|
import b from "@arcgis/core/layers/support/FeatureFilter.js";
|
|
6
|
-
import { g as y,
|
|
6
|
+
import { g as y, s as w, r as I } from "../../../../chunks/resolvePointGeometryFilter.js";
|
|
7
7
|
import { f as g } from "../../../../chunks/fetchAgentContext.js";
|
|
8
|
+
import { distanceUnitsSchema as d } from "../../shared/types.js";
|
|
8
9
|
const v = async (t, i, u, n, r, c) => {
|
|
9
|
-
const s = t.map?.allLayers.find((
|
|
10
|
+
const s = t.map?.allLayers.find((a) => a.id === i);
|
|
10
11
|
if (!s)
|
|
11
12
|
return { success: !1, error: `Layer '${i}' not found.` };
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
const o = s.createQuery();
|
|
14
|
+
o.where = u ?? "1=1", n && (o.geometry = n, o.spatialRelationship = "intersects", r && (o.distance = r), c && (o.units = c));
|
|
14
15
|
try {
|
|
15
|
-
const { extent:
|
|
16
|
-
return !
|
|
16
|
+
const { extent: a, count: l } = await s.queryExtent(o);
|
|
17
|
+
return !a || l === 0 ? {
|
|
17
18
|
success: !1,
|
|
18
|
-
error: `No features found for filter (where: ${
|
|
19
|
-
} : (await t.goTo(
|
|
20
|
-
} catch (
|
|
19
|
+
error: `No features found for filter (where: ${o.where}${n ? ", spatial filter used" : ""})`
|
|
20
|
+
} : (await t.goTo(a), { success: !0 });
|
|
21
|
+
} catch (a) {
|
|
21
22
|
return {
|
|
22
23
|
success: !1,
|
|
23
|
-
error:
|
|
24
|
+
error: a instanceof Error ? a.message : String(a)
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
}, x = async (t, i, u, n, r, c) => {
|
|
@@ -29,17 +30,17 @@ const v = async (t, i, u, n, r, c) => {
|
|
|
29
30
|
);
|
|
30
31
|
if (!s)
|
|
31
32
|
return `Could not find target layer with ID: ${t.layerId}`;
|
|
32
|
-
let
|
|
33
|
+
let o;
|
|
33
34
|
if (r) {
|
|
34
35
|
const f = await y(r, i);
|
|
35
36
|
if ("error" in f)
|
|
36
37
|
return f.error;
|
|
37
|
-
|
|
38
|
+
o = f.geometry;
|
|
38
39
|
}
|
|
39
40
|
if (s.featureEffect = null, s.featureEffect = new m({
|
|
40
41
|
filter: new b({
|
|
41
42
|
...t.objectIds?.length ? { objectIds: t.objectIds } : { where: t.where },
|
|
42
|
-
geometry:
|
|
43
|
+
geometry: o,
|
|
43
44
|
spatialRelationship: "intersects",
|
|
44
45
|
distance: r?.distance,
|
|
45
46
|
units: r?.units
|
|
@@ -48,11 +49,11 @@ const v = async (t, i, u, n, r, c) => {
|
|
|
48
49
|
excludedEffect: n
|
|
49
50
|
}), s.visible = !0, c)
|
|
50
51
|
return `Applied feature effects to "${s.title ?? t.layerId}" within current map extent.`;
|
|
51
|
-
const
|
|
52
|
+
const a = t.objectIds?.length ? `${s.objectIdField} IN (${t.objectIds.join(",")})` : t.where, l = await v(
|
|
52
53
|
i,
|
|
53
54
|
t.layerId,
|
|
54
|
-
o,
|
|
55
55
|
a,
|
|
56
|
+
o,
|
|
56
57
|
r?.distance,
|
|
57
58
|
r?.units
|
|
58
59
|
), p = s.title ?? t.layerId;
|
|
@@ -64,7 +65,7 @@ const v = async (t, i, u, n, r, c) => {
|
|
|
64
65
|
includedEffect: n = "drop-shadow(2px, 2px, 2px, gray)",
|
|
65
66
|
excludedEffect: r = "grayscale(100%) opacity(60%) blur(2px)"
|
|
66
67
|
}, c) => {
|
|
67
|
-
const { mapView: s } = g(c, ["mapView"]),
|
|
68
|
+
const { mapView: s } = g(c, ["mapView"]), o = I(
|
|
68
69
|
i,
|
|
69
70
|
c.state?.agentExecutionContext?.sharedResources
|
|
70
71
|
);
|
|
@@ -73,7 +74,7 @@ const v = async (t, i, u, n, r, c) => {
|
|
|
73
74
|
s,
|
|
74
75
|
n,
|
|
75
76
|
r,
|
|
76
|
-
|
|
77
|
+
o,
|
|
77
78
|
u
|
|
78
79
|
);
|
|
79
80
|
}, E = e.object({
|
|
@@ -111,11 +112,11 @@ const v = async (t, i, u, n, r, c) => {
|
|
|
111
112
|
excludedEffect: e.string().default("grayscale(100%) opacity(60%) blur(2px)").describe(
|
|
112
113
|
"The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."
|
|
113
114
|
)
|
|
114
|
-
}),
|
|
115
|
+
}), C = h(j, {
|
|
115
116
|
name: "setFeatureEffect",
|
|
116
117
|
description: "Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",
|
|
117
118
|
schema: T
|
|
118
119
|
});
|
|
119
120
|
export {
|
|
120
|
-
|
|
121
|
+
C as setFeatureEffectTool
|
|
121
122
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { z as i } from "zod";
|
|
3
3
|
import { tool as k } from "@langchain/core/tools";
|
|
4
4
|
import { f as s } from "../../../../chunks/fetchAgentContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { z as i } from "zod";
|
|
3
3
|
import { tool as u } from "@langchain/core/tools";
|
|
4
4
|
import { f as c } from "../../../../chunks/fetchAgentContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { z as r } from "zod";
|
|
3
3
|
import { tool as i } from "@langchain/core/tools";
|
|
4
4
|
import { f as c } from "../../../../chunks/fetchAgentContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { tool as f } from "@langchain/core/tools";
|
|
3
3
|
import i from "zod";
|
|
4
4
|
import { f as h, g } from "../../../../chunks/formatFeatureAttributes.js";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { tool as L } from "@langchain/core/tools";
|
|
3
3
|
import t from "zod";
|
|
4
4
|
import E from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
5
5
|
import R from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
6
6
|
import V from "@arcgis/core/layers/support/FeatureFilter.js";
|
|
7
7
|
import { c as x, m as v } from "../../../../chunks/mergeWhereClauses.js";
|
|
8
|
-
import { g as O, i as S, a as C,
|
|
8
|
+
import { g as O, i as S, a as C, s as N, r as G } from "../../../../chunks/resolvePointGeometryFilter.js";
|
|
9
9
|
import { f as U } from "../../../../chunks/fetchAgentContext.js";
|
|
10
10
|
import { f as W } from "../../../../chunks/fetchService.js";
|
|
11
|
+
import { distanceUnitsSchema as I } from "../../shared/types.js";
|
|
11
12
|
const j = async (h) => {
|
|
12
13
|
const { targetLayer: a, fieldName: n, statisticType: l, mapView: i, layersAndFieldsRegistry: p, geometryFilter: e } = h, s = i.map?.allLayers.find((r) => r.id === a.layerId);
|
|
13
14
|
if (!s)
|
|
@@ -135,7 +136,7 @@ const D = t.object({
|
|
|
135
136
|
),
|
|
136
137
|
fieldName: t.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),
|
|
137
138
|
statisticType: t.enum(["avg", "max", "median", "min", "stddev", "sum", "variance", "nullcount", "count"]).describe("The statistic type to calculate.")
|
|
138
|
-
}),
|
|
139
|
+
}), ee = L(A, {
|
|
139
140
|
name: "getStatistics",
|
|
140
141
|
description: `Computes a single aggregate statistic (max, min, avg, sum, median, stddev, variance) for a numeric field across matching features. Also returns frequency analysis for categorical fields.
|
|
141
142
|
|
|
@@ -153,5 +154,5 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
|
|
|
153
154
|
schema: $
|
|
154
155
|
});
|
|
155
156
|
export {
|
|
156
|
-
|
|
157
|
+
ee as getStatisticsTool
|
|
157
158
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { tool as S } from "@langchain/core/tools";
|
|
3
3
|
import e from "zod";
|
|
4
4
|
import T from "@arcgis/core/rest/support/TopFeaturesQuery.js";
|
|
5
5
|
import B from "@arcgis/core/rest/support/TopFilter.js";
|
|
6
6
|
import { m as C, c as v } from "../../../../chunks/mergeWhereClauses.js";
|
|
7
7
|
import { a as I } from "../../../../chunks/formatFeatureAttributes.js";
|
|
8
|
-
import { g as q,
|
|
8
|
+
import { g as q, s as x, r as G } from "../../../../chunks/resolvePointGeometryFilter.js";
|
|
9
9
|
import { f as N } from "../../../../chunks/fetchAgentContext.js";
|
|
10
|
+
import { distanceUnitsSchema as y } from "../../shared/types.js";
|
|
10
11
|
const k = (s) => s.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) => t.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((t) => !!t), R = async (s, t, n, i, l) => {
|
|
11
12
|
const a = n.map?.allLayers.find((o) => o.id === s.layerId), c = await n.whenLayerView(a), u = a.title ?? s.layerId;
|
|
12
13
|
let d;
|
|
@@ -134,11 +135,11 @@ const k = (s) => s.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) =>
|
|
|
134
135
|
useCurrentExtent: e.boolean().optional().describe(
|
|
135
136
|
"Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer)."
|
|
136
137
|
)
|
|
137
|
-
}),
|
|
138
|
+
}), K = S(j, {
|
|
138
139
|
name: "getTopFeatures",
|
|
139
140
|
description: 'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',
|
|
140
141
|
schema: U
|
|
141
142
|
});
|
|
142
143
|
export {
|
|
143
|
-
|
|
144
|
+
K as getTopFeaturesTool
|
|
144
145
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { tool as v } from "@langchain/core/tools";
|
|
3
3
|
import { a as C } from "../../../../chunks/formatFeatureAttributes.js";
|
|
4
|
-
import { g as R, i as F, a as I,
|
|
4
|
+
import { g as R, i as F, a as I, s as G, r as O } from "../../../../chunks/resolvePointGeometryFilter.js";
|
|
5
5
|
import { c as j, m as x } from "../../../../chunks/mergeWhereClauses.js";
|
|
6
6
|
import t from "zod";
|
|
7
7
|
import { f as N } from "../../../../chunks/fetchAgentContext.js";
|
|
8
|
+
import { distanceUnitsSchema as q } from "../../shared/types.js";
|
|
8
9
|
const p = 25, W = (i) => i.flatMap((r) => r.split(",")).map((r) => r.trim()).map((r) => r.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((r) => !!r), B = async (i, r, e, l) => {
|
|
9
10
|
const a = r.map?.allLayers.find((u) => u.id === i.layerId), d = await r.whenLayerView(a), f = a.title ?? i.layerId;
|
|
10
11
|
let h;
|
|
@@ -111,7 +112,7 @@ const D = t.object({
|
|
|
111
112
|
useCurrentExtent: t.boolean().optional().describe(
|
|
112
113
|
"Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer)."
|
|
113
114
|
)
|
|
114
|
-
}),
|
|
115
|
+
}), X = v(k, {
|
|
115
116
|
name: "queryFeatures",
|
|
116
117
|
description: `Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if ≤25 features match.
|
|
117
118
|
|
|
@@ -126,5 +127,5 @@ This is the DEFAULT tool for most queries. When in doubt, use this tool.`,
|
|
|
126
127
|
schema: U
|
|
127
128
|
});
|
|
128
129
|
export {
|
|
129
|
-
|
|
130
|
+
X as queryFeaturesTool
|
|
130
131
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseMessage } from "@langchain/core/messages";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the artifact from the most recent retained tool message with the requested tool name.
|
|
5
|
+
*
|
|
6
|
+
* @param parameter0
|
|
7
|
+
* @returns The validated artifact.
|
|
8
|
+
* @typeParam T - The validated artifact type.
|
|
9
|
+
* @throws If the matching message has no artifact, its artifact is invalid, or no matching message is available.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export function resolveLatestToolArtifact<T>(parameter0: ResolveToolArtifactOptions<T>): T;
|
|
13
|
+
|
|
14
|
+
export type ResolveToolArtifactOptions<T> = {
|
|
15
|
+
messages: readonly BaseMessage[];
|
|
16
|
+
schema: ArtifactSchema<T>;
|
|
17
|
+
toolName: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ArtifactSchema<T> = {
|
|
21
|
+
parse: (value: unknown) => T;
|
|
22
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import { ToolMessage as a } from "@langchain/core/messages";
|
|
3
|
+
const i = (r) => typeof r == "object" && r !== null && "value" in r, c = ({ messages: r, schema: n, toolName: t }) => {
|
|
4
|
+
for (let o = r.length - 1; o >= 0; o--) {
|
|
5
|
+
const e = r[o];
|
|
6
|
+
if (!(!a.isInstance(e) || e.name !== t)) {
|
|
7
|
+
if (!i(e.artifact))
|
|
8
|
+
throw new Error(`Tool "${t}" did not return an artifact.`);
|
|
9
|
+
try {
|
|
10
|
+
return n.parse(e.artifact.value);
|
|
11
|
+
} catch {
|
|
12
|
+
throw new Error(`Tool "${t}" returned an invalid artifact.`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
throw new Error(`No result from tool "${t}" is available.`);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
c as resolveLatestToolArtifact
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SharedResourceInput, SharedStatePatch } from "../../../orchestrator/types/types.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Artifact returned by an agent tool, including optional shared-context effects.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export type AgentToolArtifact<TValue, TSharedState extends Record<string, unknown> = Record<string, unknown>> = Readonly<{
|
|
9
|
+
value: TValue;
|
|
10
|
+
sharedStatePatch?: SharedStatePatch<TSharedState>;
|
|
11
|
+
sharedResourceAdditions?: readonly SharedResourceInput[];
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Content and artifact returned by an agent tool.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export type AgentToolResponse<TValue, TSharedState extends Record<string, unknown> = Record<string, unknown>> = [
|
|
20
|
+
content: string,
|
|
21
|
+
artifact: AgentToolArtifact<TValue, TSharedState>
|
|
22
|
+
];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import{a as n}from"./A6LBMS7A.js";import{Dc as o}from"./M2U456J5.js";import{a as i}from"./5X23DDDZ.js";async function a(e){let t=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(t)await e.goTo(t);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function m(e,t){let{mapView:r}=n(t,["mapView"]);return await a(r)}var s=i.object({}),f=o(m,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:s});export{f as a};
|