@arcgis/ai-components 5.2.0-next.106 → 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/agents/runtime/skill/createSkillAgent.js +42 -44
- package/dist/agents/runtime/skill/types.d.ts +1 -1
- package/dist/agents/runtime/skill/types.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
- package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
- 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.js +1 -1
- package/dist/agents/tools/shared/types.js +1 -1
- package/dist/cdn/25MBI4PD.js +2 -0
- package/dist/cdn/{3XDT7MWI.js → 275FFTBE.js} +2 -2
- package/dist/cdn/{XQ3NBBQ3.js → 2F4TPWZQ.js} +1 -1
- package/dist/cdn/{KJLLN4P4.js → 2LVYAXHG.js} +3 -3
- package/dist/cdn/{5MK44FNO.js → 2NRCE53B.js} +2 -2
- package/dist/cdn/{XKH37FLY.js → 2WXXSZP5.js} +2 -2
- package/dist/cdn/{APFZY4PI.js → 3KNLFIM3.js} +2 -2
- package/dist/cdn/{VMZZR7MY.js → 3PPXAIRE.js} +2 -2
- package/dist/cdn/{JMNHFKGL.js → 45BDE3MG.js} +2 -2
- package/dist/cdn/{S4LELUBK.js → 477I66FH.js} +2 -2
- package/dist/cdn/4CFCV47G.js +2 -0
- package/dist/cdn/{TPULIO6I.js → 4IWDBEMN.js} +2 -2
- package/dist/cdn/{HHBNLCJP.js → 4OI4QEV7.js} +2 -2
- package/dist/cdn/{2W7LK4HA.js → 4UAREC76.js} +2 -2
- package/dist/cdn/{TEI6WXW7.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/{D5EKX26R.js → 6KWGSXIN.js} +2 -2
- package/dist/cdn/{O4NVW75A.js → 6MRTZ4OM.js} +2 -2
- package/dist/cdn/{6YZGKVYB.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/{EOD5PNOL.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/{74CVYM72.js → BJMGT6GV.js} +2 -2
- package/dist/cdn/{5LMYUEK7.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/{725MBCQF.js → CKUUYQLO.js} +2 -2
- package/dist/cdn/{MWYBF3F3.js → CSE6BHOJ.js} +2 -2
- package/dist/cdn/{XTCLJEID.js → CX2HJ67C.js} +2 -2
- package/dist/cdn/EELMDCPV.js +2 -0
- package/dist/cdn/{6RAWG2KQ.js → EGRRZTF6.js} +2 -2
- package/dist/cdn/EHYDAEGL.js +2 -0
- package/dist/cdn/{TBYDZN4H.js → EK3PM4L5.js} +2 -2
- package/dist/cdn/{PYGX4HN7.js → ENAEE4UU.js} +2 -2
- package/dist/cdn/EXMEB4X2.js +2 -0
- package/dist/cdn/{AGQ5ADFU.js → EYGZJKVD.js} +2 -2
- package/dist/cdn/{BTTBKTFM.js → FK2CVSXW.js} +2 -2
- 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/{2AMUOR7X.js → FV6FHLYW.js} +2 -2
- package/dist/cdn/{TFRWUAB6.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/{ES6D4UD6.js → HNTSDY3J.js} +2 -2
- package/dist/cdn/HQOK6DDH.js +2 -0
- package/dist/cdn/{HB72YIII.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/{BQYF37UD.js → KBSXHSBX.js} +2 -2
- package/dist/cdn/{CCC6LBMY.js → KKCLHXHG.js} +1 -1
- package/dist/cdn/{7UF3WRLO.js → L2HLFWCV.js} +2 -2
- package/dist/cdn/{LK7ZIQW6.js → L3BTURBA.js} +2 -2
- package/dist/cdn/{IRSJXHRN.js → LBTGOMCT.js} +2 -2
- package/dist/cdn/{34O57OGV.js → LLY5A2E2.js} +1 -1
- package/dist/cdn/{OOGADOKQ.js → LXIKAXUT.js} +2 -2
- package/dist/cdn/{S627D4K7.js → M2U456J5.js} +2 -2
- package/dist/cdn/{UAG6GDUG.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/{EJJFG5DE.js → PJPP6LOS.js} +2 -2
- 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/{A7BKHIMA.js → SBNNJ5WA.js} +2 -2
- package/dist/cdn/SI22EJLC.js +2 -0
- package/dist/cdn/{7QIX4PZR.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/{JWZD3D5E.js → STOGCXJH.js} +2 -2
- package/dist/cdn/{OMF6ITSG.js → SUC2MIGE.js} +2 -2
- package/dist/cdn/SXYKNDOF.js +2 -0
- package/dist/cdn/SZ2L5556.js +2 -0
- package/dist/cdn/{4ALF2CJY.js → T6W6F4TF.js} +2 -2
- package/dist/cdn/{RN6WMVZX.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/{RLB6TK6B.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/{3VCPN2KW.js → V52GSTOC.js} +2 -2
- package/dist/cdn/{UHICISBZ.js → VGLBH473.js} +2 -2
- package/dist/cdn/{WSWB3B7B.js → VHNTHPH7.js} +2 -2
- package/dist/cdn/{OZ2CM3J2.js → VK6CCPTG.js} +2 -2
- package/dist/cdn/{AOVJ34QE.js → VLPELJUS.js} +2 -2
- package/dist/cdn/VT5EWFH7.js +2 -0
- package/dist/cdn/{Y7LGFSHO.js → VXLKTQ36.js} +2 -2
- package/dist/cdn/{CFAC4FN3.js → W54XYT2A.js} +2 -2
- package/dist/cdn/{RZIXMISL.js → X42ACC66.js} +2 -2
- package/dist/cdn/{7EOS4SGJ.js → XNUWVZN7.js} +2 -2
- package/dist/cdn/{2OUIRKTV.js → XOTPSCNF.js} +2 -2
- package/dist/cdn/{ZZZB3GES.js → XRVGYRXL.js} +2 -2
- package/dist/cdn/{JKKU4K4C.js → XV7RMYLR.js} +2 -2
- package/dist/cdn/{3SD47V7G.js → XVJFPZTW.js} +2 -2
- package/dist/cdn/XZF7Y6B2.js +2 -0
- package/dist/cdn/Y4ZOB6UH.js +2 -0
- package/dist/cdn/{ZFOG3KXV.js → Y6CV2NZR.js} +2 -2
- package/dist/cdn/YMJKT5OK.js +2 -0
- package/dist/cdn/{6GODC6RU.js → YOW3YKWR.js} +2 -2
- package/dist/cdn/{OKVLGJAG.js → ZA7ZU2F7.js} +2 -2
- package/dist/cdn/{OL7QBAGS.js → ZJWR4W2S.js} +2 -2
- package/dist/cdn/ZWIKFBOU.js +2 -0
- package/dist/cdn/{MXAZE2VM.js → ZY3JQCZQ.js} +36 -36
- 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 +1 -1
- package/dist/chunks/SKILL2.js +1 -1
- package/dist/chunks/SKILL3.js +1 -1
- package/dist/chunks/SKILL4.js +1 -1
- package/dist/chunks/adapter.js +1 -1
- package/dist/chunks/aiFactory.js +1 -1
- package/dist/chunks/arcgisKnowledgeGraph.js +1 -1
- 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 +1 -1
- package/dist/chunks/converterUtils.js +1 -1
- package/dist/chunks/dataExplorationAgent.js +3 -14
- 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 +1 -1
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +11 -14
- 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 +1 -1
- 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 +7 -20
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/orchestrator.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolvePointGeometryFilter.js +1 -1
- 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 +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- 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 +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -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 +1 -1
- 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/utils/index.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/23C34FEU.js +0 -2
- package/dist/cdn/2OHRNRNT.js +0 -2
- package/dist/cdn/2S6L3P4Q.js +0 -2
- package/dist/cdn/3IOP64NG.js +0 -2
- package/dist/cdn/3OH35VXS.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/AFSBL4ZP.js +0 -2
- package/dist/cdn/BVSK2GWP.js +0 -2
- package/dist/cdn/EGN5BCHV.js +0 -2
- package/dist/cdn/HLN5675C.js +0 -2
- package/dist/cdn/IFFOSSNB.js +0 -2
- package/dist/cdn/IO7DYFL2.js +0 -2
- package/dist/cdn/JD2TB7H4.js +0 -2
- package/dist/cdn/KZ73TZOB.js +0 -2
- package/dist/cdn/LEO3USHH.js +0 -2
- package/dist/cdn/LNIMGXB4.js +0 -2
- package/dist/cdn/MG2W2ZF3.js +0 -2
- package/dist/cdn/MSXMHRI7.js +0 -2
- package/dist/cdn/PK5KI2XF.js +0 -2
- package/dist/cdn/PWFUEBTT.js +0 -2
- package/dist/cdn/RSJSRETN.js +0 -2
- package/dist/cdn/RSR66KB4.js +0 -2
- package/dist/cdn/SL4Y7IRG.js +0 -2
- package/dist/cdn/STUBN3L5.js +0 -2
- package/dist/cdn/T2OYKP3V.js +0 -2
- package/dist/cdn/U3ETGDT7.js +0 -2
- package/dist/cdn/VXFQANGJ.js +0 -2
- package/dist/cdn/WW4BEFDF.js +0 -2
- package/dist/cdn/XGCQS3N4.js +0 -2
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import { c as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { b as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import { c as W } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as F } from "@arcgis/lumina";
|
|
4
|
+
import { b as M, i as j } from "../../chunks/utils2.js";
|
|
5
|
+
import I from "@arcgis/core/portal/PortalItem.js";
|
|
6
|
+
import G from "@arcgis/core/portal/Portal.js";
|
|
7
7
|
import { property as n, subclass as l } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
8
|
-
import { BaseAgent as
|
|
9
|
-
import
|
|
8
|
+
import { BaseAgent as L } from "../../agent-utils/BaseAgent.js";
|
|
9
|
+
import y from "@arcgis/core/core/Error.js";
|
|
10
10
|
import { z as c } from "zod";
|
|
11
|
-
import { c as
|
|
12
|
-
import
|
|
13
|
-
import { LLMAgent as
|
|
11
|
+
import { c as z } from "../../chunks/graph.js";
|
|
12
|
+
import A from "@arcgis/core/core/Accessor.js";
|
|
13
|
+
import { LLMAgent as B } from "../../agent-utils/LLMAgent.js";
|
|
14
|
+
import { r as U } from "../../chunks/arcgisToolRegistry.js";
|
|
14
15
|
import { PromptTemplate as Z } from "@langchain/core/prompts";
|
|
15
16
|
import { Annotation as x } from "@langchain/langgraph";
|
|
16
|
-
import { b as H, d as
|
|
17
|
+
import { b as H, d as K } from "../../chunks/state.js";
|
|
17
18
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
18
19
|
import "@arcgis/core/request.js";
|
|
19
20
|
import "@langchain/langgraph/web";
|
|
@@ -26,13 +27,13 @@ import "@langchain/openai";
|
|
|
26
27
|
import "@arcgis/core/config.js";
|
|
27
28
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
28
29
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
29
|
-
import { a as
|
|
30
|
-
var
|
|
31
|
-
for (var
|
|
32
|
-
(i = e[a]) && (
|
|
33
|
-
return s &&
|
|
30
|
+
import { a as Q } from "../../chunks/baseAgentState.js";
|
|
31
|
+
var V = Object.defineProperty, X = Object.getOwnPropertyDescriptor, f = (e, t, o, s) => {
|
|
32
|
+
for (var r = s > 1 ? void 0 : s ? X(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
33
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
34
|
+
return s && r && V(t, o, r), r;
|
|
34
35
|
};
|
|
35
|
-
let p = class extends
|
|
36
|
+
let p = class extends A {
|
|
36
37
|
//#region Lifecycle
|
|
37
38
|
constructor(e) {
|
|
38
39
|
super(e);
|
|
@@ -68,12 +69,12 @@ f([
|
|
|
68
69
|
p = f([
|
|
69
70
|
l("Edge")
|
|
70
71
|
], p);
|
|
71
|
-
var
|
|
72
|
-
for (var
|
|
73
|
-
(i = e[a]) && (
|
|
74
|
-
return s &&
|
|
72
|
+
var Y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, v = (e, t, o, s) => {
|
|
73
|
+
for (var r = s > 1 ? void 0 : s ? k(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
74
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
75
|
+
return s && r && Y(t, o, r), r;
|
|
75
76
|
};
|
|
76
|
-
let
|
|
77
|
+
let d = class extends A {
|
|
77
78
|
//#region Lifecycle
|
|
78
79
|
constructor(e) {
|
|
79
80
|
super(e);
|
|
@@ -101,24 +102,24 @@ let u = class extends T {
|
|
|
101
102
|
};
|
|
102
103
|
v([
|
|
103
104
|
n()
|
|
104
|
-
],
|
|
105
|
+
], d.prototype, "id", 2);
|
|
105
106
|
v([
|
|
106
107
|
n()
|
|
107
|
-
],
|
|
108
|
+
], d.prototype, "label", 2);
|
|
108
109
|
v([
|
|
109
110
|
n()
|
|
110
|
-
],
|
|
111
|
-
|
|
111
|
+
], d.prototype, "type", 2);
|
|
112
|
+
d = v([
|
|
112
113
|
l("BaseNode")
|
|
113
|
-
],
|
|
114
|
-
function
|
|
115
|
-
const t = new Set(e.required),
|
|
116
|
-
Object.entries(e.properties).map(([s,
|
|
117
|
-
const a = $(
|
|
114
|
+
], d);
|
|
115
|
+
function J(e) {
|
|
116
|
+
const t = new Set(e.required), o = Object.fromEntries(
|
|
117
|
+
Object.entries(e.properties).map(([s, r]) => {
|
|
118
|
+
const a = $(r);
|
|
118
119
|
return [s, t.has(s) ? a : a.optional()];
|
|
119
120
|
})
|
|
120
121
|
);
|
|
121
|
-
return c.object(
|
|
122
|
+
return c.object(o);
|
|
122
123
|
}
|
|
123
124
|
function $(e) {
|
|
124
125
|
let t;
|
|
@@ -133,7 +134,7 @@ function $(e) {
|
|
|
133
134
|
t = c.number();
|
|
134
135
|
break;
|
|
135
136
|
case "object":
|
|
136
|
-
t =
|
|
137
|
+
t = J({
|
|
137
138
|
properties: e.properties ?? {},
|
|
138
139
|
required: e.required
|
|
139
140
|
});
|
|
@@ -144,96 +145,13 @@ function $(e) {
|
|
|
144
145
|
}
|
|
145
146
|
return e.description ? t.describe(e.description) : t;
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
],
|
|
152
|
-
[
|
|
153
|
-
"reset_map",
|
|
154
|
-
async () => (await import("../../agents/tools/filter/resetMap/adapter.js")).resetMapTool
|
|
155
|
-
],
|
|
156
|
-
[
|
|
157
|
-
"set_feature_effect",
|
|
158
|
-
async () => (await import("../../agents/tools/filter/setFeatureEffect/adapter.js")).setFeatureEffectTool
|
|
159
|
-
],
|
|
160
|
-
[
|
|
161
|
-
"list_layer_fields",
|
|
162
|
-
async () => (await import("../../agents/tools/help/listFields/adapter.js")).listLayerFieldsTool
|
|
163
|
-
],
|
|
164
|
-
[
|
|
165
|
-
"go_to_address",
|
|
166
|
-
async () => (await import("../../agents/tools/navigation/goToAddress/adapter.js")).goToAddressTool
|
|
167
|
-
],
|
|
168
|
-
[
|
|
169
|
-
"go_to_bookmark",
|
|
170
|
-
async () => (await import("../../agents/tools/navigation/goToBookmark/adapter.js")).goToBookmarkTool
|
|
171
|
-
],
|
|
172
|
-
[
|
|
173
|
-
"go_to_features",
|
|
174
|
-
async () => (await import("../../agents/tools/navigation/goToFeatures/adapter.js")).goToFeaturesTool
|
|
175
|
-
],
|
|
176
|
-
[
|
|
177
|
-
"go_to_full_extent",
|
|
178
|
-
async () => (await import("../../agents/tools/navigation/goToFullExtent/adapter.js")).goToFullExtentTool
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
"go_to_home_extent",
|
|
182
|
-
async () => (await import("../../agents/tools/navigation/goToHomeExtent/adapter.js")).goToHomeExtentTool
|
|
183
|
-
],
|
|
184
|
-
[
|
|
185
|
-
"go_to_layer",
|
|
186
|
-
async () => (await import("../../agents/tools/navigation/goToLayer/adapter.js")).goToLayerTool
|
|
187
|
-
],
|
|
188
|
-
[
|
|
189
|
-
"go_to_scale",
|
|
190
|
-
async () => (await import("../../agents/tools/navigation/goToScale/adapter.js")).goToScaleTool
|
|
191
|
-
],
|
|
192
|
-
[
|
|
193
|
-
"go_to_viewpoint",
|
|
194
|
-
async () => (await import("../../agents/tools/navigation/goToViewpoint/adapter.js")).goToViewpointTool
|
|
195
|
-
],
|
|
196
|
-
[
|
|
197
|
-
"go_to_zoom",
|
|
198
|
-
async () => (await import("../../agents/tools/navigation/goToZoom/adapter.js")).goToZoomTool
|
|
199
|
-
],
|
|
200
|
-
[
|
|
201
|
-
"find_relevant_fields",
|
|
202
|
-
async () => (await import("../../agents/tools/search/findRelevantFields/adapter.js")).findRelevantFieldsTool
|
|
203
|
-
],
|
|
204
|
-
[
|
|
205
|
-
"find_relevant_layers",
|
|
206
|
-
async () => (await import("../../agents/tools/search/findRelevantLayers/adapter.js")).findRelevantLayersTool
|
|
207
|
-
],
|
|
208
|
-
[
|
|
209
|
-
"get_attribute",
|
|
210
|
-
async () => (await import("../../agents/tools/query/getAttribute/adapter.js")).getAttributeTool
|
|
211
|
-
],
|
|
212
|
-
[
|
|
213
|
-
"get_statistics",
|
|
214
|
-
async () => (await import("../../agents/tools/query/getStatistics/adapter.js")).getStatisticsTool
|
|
215
|
-
],
|
|
216
|
-
[
|
|
217
|
-
"get_top_features",
|
|
218
|
-
async () => (await import("../../agents/tools/query/getTopFeatures/adapter.js")).getTopFeaturesTool
|
|
219
|
-
],
|
|
220
|
-
[
|
|
221
|
-
"query_features",
|
|
222
|
-
async () => (await import("../../agents/tools/query/queryFeatures/adapter.js")).queryFeaturesTool
|
|
223
|
-
]
|
|
224
|
-
]);
|
|
225
|
-
async function ee(e) {
|
|
226
|
-
const t = k.get(e);
|
|
227
|
-
if (!t)
|
|
228
|
-
throw new Error(`ArcGIS tool is not supported in the browser runtime: ${e}`);
|
|
229
|
-
return await t();
|
|
230
|
-
}
|
|
231
|
-
var te = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, N = (e, t, r, s) => {
|
|
232
|
-
for (var o = s > 1 ? void 0 : s ? oe(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
233
|
-
(i = e[a]) && (o = (s ? i(t, r, o) : i(o)) || o);
|
|
234
|
-
return s && o && te(t, r, o), o;
|
|
148
|
+
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, N = (e, t, o, s) => {
|
|
149
|
+
for (var r = s > 1 ? void 0 : s ? te(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
150
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
151
|
+
return s && r && ee(t, o, r), r;
|
|
235
152
|
};
|
|
236
|
-
|
|
153
|
+
const re = (e) => e.replace(/_([a-z])/gu, (t, o) => o.toUpperCase());
|
|
154
|
+
let u = class extends A {
|
|
237
155
|
//#region Lifecycle
|
|
238
156
|
constructor(e) {
|
|
239
157
|
super(e), this.type = "arcgis-tool";
|
|
@@ -243,10 +161,10 @@ let d = class extends T {
|
|
|
243
161
|
async createRuntimeTools() {
|
|
244
162
|
if (!this.name)
|
|
245
163
|
throw new Error("ArcgisTool name is required");
|
|
246
|
-
return [await
|
|
164
|
+
return [await U(re(this.name))];
|
|
247
165
|
}
|
|
248
166
|
static fromJSON(e) {
|
|
249
|
-
return new
|
|
167
|
+
return new u({
|
|
250
168
|
name: e.name,
|
|
251
169
|
requireApproval: e.require_approval
|
|
252
170
|
});
|
|
@@ -255,24 +173,24 @@ let d = class extends T {
|
|
|
255
173
|
};
|
|
256
174
|
N([
|
|
257
175
|
n()
|
|
258
|
-
],
|
|
176
|
+
], u.prototype, "name", 2);
|
|
259
177
|
N([
|
|
260
178
|
n()
|
|
261
|
-
],
|
|
179
|
+
], u.prototype, "requireApproval", 2);
|
|
262
180
|
N([
|
|
263
181
|
n()
|
|
264
|
-
],
|
|
265
|
-
|
|
182
|
+
], u.prototype, "type", 2);
|
|
183
|
+
u = N([
|
|
266
184
|
l("ArcgisTool")
|
|
267
|
-
],
|
|
268
|
-
var
|
|
185
|
+
], u);
|
|
186
|
+
var oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, T = (e) => {
|
|
269
187
|
throw TypeError(e);
|
|
270
|
-
}, _ = (e, t,
|
|
271
|
-
for (var
|
|
272
|
-
(i = e[a]) && (
|
|
273
|
-
return s &&
|
|
274
|
-
}, ae = (e, t,
|
|
275
|
-
let m = class extends
|
|
188
|
+
}, _ = (e, t, o, s) => {
|
|
189
|
+
for (var r = s > 1 ? void 0 : s ? se(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
190
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
191
|
+
return s && r && oe(t, o, r), r;
|
|
192
|
+
}, ae = (e, t, o) => t.has(e) || T("Cannot " + o), ie = (e, t, o) => t.has(e) ? T("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, o), ne = (e, t, o) => (ae(e, t, "access private method"), o), S, D;
|
|
193
|
+
let m = class extends d {
|
|
276
194
|
//#region Lifecycle
|
|
277
195
|
constructor(e) {
|
|
278
196
|
super(e), ie(this, S), this.type = "agent-node";
|
|
@@ -281,17 +199,17 @@ let m = class extends u {
|
|
|
281
199
|
//#region Public Methods
|
|
282
200
|
createRuntimeNode() {
|
|
283
201
|
let e;
|
|
284
|
-
return async (t,
|
|
285
|
-
e ??= ne(this, S,
|
|
286
|
-
const
|
|
202
|
+
return async (t, o) => {
|
|
203
|
+
e ??= ne(this, S, D).call(this);
|
|
204
|
+
const r = await (await e).run(t, o), a = this.outputSchema?.safeParse(r);
|
|
287
205
|
if (a && !a.success)
|
|
288
206
|
throw a.error;
|
|
289
|
-
const i = a?.data, O = i ??
|
|
207
|
+
const i = a?.data, O = i ?? r.outputMessage;
|
|
290
208
|
return {
|
|
291
|
-
agentExecutionContext:
|
|
292
|
-
...i ? {} : { outputMessage:
|
|
293
|
-
status:
|
|
294
|
-
summary:
|
|
209
|
+
agentExecutionContext: r.agentExecutionContext,
|
|
210
|
+
...i ? {} : { outputMessage: r.outputMessage },
|
|
211
|
+
status: r.status,
|
|
212
|
+
summary: r.summary,
|
|
295
213
|
nodes: {
|
|
296
214
|
[this.id]: { output: O }
|
|
297
215
|
}
|
|
@@ -305,7 +223,7 @@ let m = class extends u {
|
|
|
305
223
|
edges: [
|
|
306
224
|
{
|
|
307
225
|
from: this.id,
|
|
308
|
-
decide: (
|
|
226
|
+
decide: (o) => o.status === "failed" ? void 0 : t
|
|
309
227
|
}
|
|
310
228
|
],
|
|
311
229
|
schemas: [
|
|
@@ -323,22 +241,22 @@ let m = class extends u {
|
|
|
323
241
|
type: "agent-node",
|
|
324
242
|
modelTier: e.llm_model?.model_tier
|
|
325
243
|
});
|
|
326
|
-
return e.structured_output && (t.outputSchema =
|
|
244
|
+
return e.structured_output && (t.outputSchema = J(e.structured_output)), t.tools = e.tools?.filter((o) => o.type === "arcgis_tool").map((o) => u.fromJSON(o)), t;
|
|
327
245
|
}
|
|
328
246
|
//#endregion
|
|
329
247
|
};
|
|
330
248
|
S = /* @__PURE__ */ new WeakSet();
|
|
331
|
-
|
|
249
|
+
D = async function() {
|
|
332
250
|
const e = this.prompt;
|
|
333
251
|
if (!e?.trim())
|
|
334
252
|
throw new Error(`WebAgent agent node "${this.id}" requires a prompt.`);
|
|
335
253
|
const t = [];
|
|
336
254
|
if (this.tools)
|
|
337
|
-
for (const
|
|
338
|
-
const s = await
|
|
255
|
+
for (const o of this.tools) {
|
|
256
|
+
const s = await o.createRuntimeTools();
|
|
339
257
|
t.push(...s);
|
|
340
258
|
}
|
|
341
|
-
return new
|
|
259
|
+
return new B({
|
|
342
260
|
name: this.id,
|
|
343
261
|
// TODO: change to label
|
|
344
262
|
outputSchema: this.outputSchema,
|
|
@@ -365,12 +283,12 @@ _([
|
|
|
365
283
|
m = _([
|
|
366
284
|
l("AgentNode")
|
|
367
285
|
], m);
|
|
368
|
-
var ce = Object.defineProperty, pe = Object.getOwnPropertyDescriptor,
|
|
369
|
-
for (var
|
|
370
|
-
(i = e[a]) && (
|
|
371
|
-
return s &&
|
|
286
|
+
var ce = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, P = (e, t, o, s) => {
|
|
287
|
+
for (var r = s > 1 ? void 0 : s ? pe(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
288
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
289
|
+
return s && r && ce(t, o, r), r;
|
|
372
290
|
};
|
|
373
|
-
let h = class extends
|
|
291
|
+
let h = class extends d {
|
|
374
292
|
//#region Lifecycle
|
|
375
293
|
constructor(e) {
|
|
376
294
|
super(e), this.type = "end-message-node";
|
|
@@ -405,21 +323,21 @@ let h = class extends u {
|
|
|
405
323
|
//#region Private Methods
|
|
406
324
|
//#endregion
|
|
407
325
|
};
|
|
408
|
-
|
|
326
|
+
P([
|
|
409
327
|
n()
|
|
410
328
|
], h.prototype, "type", 2);
|
|
411
|
-
|
|
329
|
+
P([
|
|
412
330
|
n()
|
|
413
331
|
], h.prototype, "message", 2);
|
|
414
|
-
h =
|
|
332
|
+
h = P([
|
|
415
333
|
l("EndMessageNode")
|
|
416
334
|
], h);
|
|
417
|
-
var me = Object.defineProperty,
|
|
418
|
-
for (var
|
|
419
|
-
(i = e[a]) && (
|
|
420
|
-
return s &&
|
|
335
|
+
var me = Object.defineProperty, de = Object.getOwnPropertyDescriptor, R = (e, t, o, s) => {
|
|
336
|
+
for (var r = s > 1 ? void 0 : s ? de(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
337
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
338
|
+
return s && r && me(t, o, r), r;
|
|
421
339
|
};
|
|
422
|
-
let w = class extends
|
|
340
|
+
let w = class extends d {
|
|
423
341
|
//#region Lifecycle
|
|
424
342
|
constructor(e) {
|
|
425
343
|
super(e), this.type = "start-node";
|
|
@@ -440,13 +358,13 @@ let w = class extends u {
|
|
|
440
358
|
//#region Private Methods
|
|
441
359
|
//#endregion
|
|
442
360
|
};
|
|
443
|
-
|
|
361
|
+
R([
|
|
444
362
|
n()
|
|
445
363
|
], w.prototype, "type", 2);
|
|
446
|
-
w =
|
|
364
|
+
w = R([
|
|
447
365
|
l("StartNode")
|
|
448
366
|
], w);
|
|
449
|
-
function
|
|
367
|
+
function ue(e) {
|
|
450
368
|
switch (e.type) {
|
|
451
369
|
case "agent_node":
|
|
452
370
|
return m.fromJSON(e);
|
|
@@ -462,37 +380,37 @@ function le(e = {}) {
|
|
|
462
380
|
const t = Object.keys(e);
|
|
463
381
|
if (H(t), t.includes("nodes"))
|
|
464
382
|
throw new Error("node state cannot define reserved field: nodes.");
|
|
465
|
-
const
|
|
383
|
+
const o = K(e);
|
|
466
384
|
return x.Root({
|
|
467
|
-
...
|
|
385
|
+
...o,
|
|
468
386
|
nodes: x({
|
|
469
|
-
reducer: (s,
|
|
387
|
+
reducer: (s, r) => ({ ...s, ...r }),
|
|
470
388
|
default: () => ({})
|
|
471
389
|
}),
|
|
472
|
-
...
|
|
390
|
+
...Q()
|
|
473
391
|
});
|
|
474
392
|
}
|
|
475
|
-
function
|
|
393
|
+
function q(e) {
|
|
476
394
|
const t = /* @__PURE__ */ new Set();
|
|
477
395
|
for (const s of e)
|
|
478
|
-
for (const
|
|
479
|
-
|
|
480
|
-
const
|
|
481
|
-
return le(
|
|
396
|
+
for (const r of Object.keys(s.shape ?? {}))
|
|
397
|
+
r !== "nodes" && t.add(r);
|
|
398
|
+
const o = Object.fromEntries([...t].map((s) => [s, void 0]));
|
|
399
|
+
return le(o);
|
|
482
400
|
}
|
|
483
|
-
class
|
|
401
|
+
class E {
|
|
484
402
|
//#endregion Private Properties
|
|
485
403
|
//#region Lifecycle
|
|
486
|
-
constructor(t,
|
|
487
|
-
this.sourceJSON = t, this.edges =
|
|
404
|
+
constructor(t, o, s) {
|
|
405
|
+
this.sourceJSON = t, this.edges = o, this.nodes = s, this._loaded = !1;
|
|
488
406
|
}
|
|
489
407
|
//#endregion Lifecycle
|
|
490
408
|
//#region Public Methods
|
|
491
409
|
static fromJSON(t) {
|
|
492
|
-
return new
|
|
410
|
+
return new E(
|
|
493
411
|
t,
|
|
494
|
-
t.graph.edges.map((
|
|
495
|
-
t.graph.nodes.map((
|
|
412
|
+
t.graph.edges.map((o) => p.fromJSON(o)),
|
|
413
|
+
t.graph.nodes.map((o) => ue(o))
|
|
496
414
|
);
|
|
497
415
|
}
|
|
498
416
|
async load() {
|
|
@@ -502,8 +420,8 @@ class P {
|
|
|
502
420
|
}
|
|
503
421
|
getSchemas() {
|
|
504
422
|
const t = Object.fromEntries(
|
|
505
|
-
this._getNodeCompilations().flatMap((s,
|
|
506
|
-
const a = this.nodes[
|
|
423
|
+
this._getNodeCompilations().flatMap((s, r) => {
|
|
424
|
+
const a = this.nodes[r];
|
|
507
425
|
return s.schemas?.map((i) => [a.id, i]) ?? [];
|
|
508
426
|
})
|
|
509
427
|
);
|
|
@@ -515,14 +433,14 @@ class P {
|
|
|
515
433
|
}
|
|
516
434
|
generate() {
|
|
517
435
|
this._assertLoaded(), this._nodeCompilations = void 0;
|
|
518
|
-
const t = this._getNodeCompilations(),
|
|
436
|
+
const t = this._getNodeCompilations(), o = q(this.getSchemas()), s = this.nodes.find((i) => i.type === "start-node")?.id, r = {}, a = [];
|
|
519
437
|
for (const [i, O] of this.nodes.entries()) {
|
|
520
|
-
const
|
|
521
|
-
|
|
438
|
+
const b = t[i];
|
|
439
|
+
b && (b.runtimeNode && (r[O.id] = b.runtimeNode), a.push(...b.edges));
|
|
522
440
|
}
|
|
523
441
|
return {
|
|
524
|
-
createGraph: () =>
|
|
525
|
-
workspace:
|
|
442
|
+
createGraph: () => z(r, a, o, { entryNode: s }),
|
|
443
|
+
workspace: o
|
|
526
444
|
};
|
|
527
445
|
}
|
|
528
446
|
//#endregion Public Methods
|
|
@@ -534,21 +452,21 @@ class P {
|
|
|
534
452
|
_getNodeCompilations() {
|
|
535
453
|
return this._assertLoaded(), this._nodeCompilations ??= this.nodes.map(
|
|
536
454
|
(t) => t.compile({
|
|
537
|
-
outgoingEdges: this.edges.filter((
|
|
455
|
+
outgoingEdges: this.edges.filter((o) => o.sourceNodeId === t.id)
|
|
538
456
|
})
|
|
539
457
|
);
|
|
540
458
|
}
|
|
541
459
|
//#endregion Private Methods
|
|
542
460
|
}
|
|
543
|
-
var he = Object.defineProperty, ge = Object.getOwnPropertyDescriptor,
|
|
544
|
-
for (var
|
|
545
|
-
(i = e[a]) && (
|
|
546
|
-
return s &&
|
|
461
|
+
var he = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, C = (e, t, o, s) => {
|
|
462
|
+
for (var r = s > 1 ? void 0 : s ? ge(t, o) : t, a = e.length - 1, i; a >= 0; a--)
|
|
463
|
+
(i = e[a]) && (r = (s ? i(t, o, r) : i(r)) || r);
|
|
464
|
+
return s && r && he(t, o, r), r;
|
|
547
465
|
};
|
|
548
466
|
const fe = () => {
|
|
549
467
|
throw new Error("WebAgent must be loaded before it can run.");
|
|
550
468
|
};
|
|
551
|
-
let g = class extends
|
|
469
|
+
let g = class extends L {
|
|
552
470
|
//#region Lifecycle
|
|
553
471
|
constructor(e) {
|
|
554
472
|
super(e);
|
|
@@ -559,18 +477,18 @@ let g = class extends G {
|
|
|
559
477
|
if (this.portalItem) {
|
|
560
478
|
try {
|
|
561
479
|
await this.portalItem.load();
|
|
562
|
-
} catch (
|
|
563
|
-
throw new
|
|
480
|
+
} catch (o) {
|
|
481
|
+
throw new y("web-agent:load-portal-item", "Failed to load portal item", { error: o });
|
|
564
482
|
}
|
|
565
483
|
const t = await this.portalItem.fetchData();
|
|
566
484
|
if (this.sourceJSON = t, !this.portalItem.title)
|
|
567
|
-
throw new
|
|
485
|
+
throw new y("web-agent:missing-title", "The portal item is missing a title");
|
|
568
486
|
}
|
|
569
487
|
if (!this.sourceJSON)
|
|
570
|
-
throw new
|
|
488
|
+
throw new y("web-agent:missing-source-json", "The source JSON is missing");
|
|
571
489
|
if (!this.sourceJSON.description)
|
|
572
|
-
throw new
|
|
573
|
-
const e =
|
|
490
|
+
throw new y("web-agent:missing-description", "The source JSON is missing a description");
|
|
491
|
+
const e = E.fromJSON(this.sourceJSON);
|
|
574
492
|
return await e.load(), this._runtime = e, this.description = this.sourceJSON.description, this.name = this.portalItem?.title ?? `web-agent-${Date.now()}`, this.generate(), this;
|
|
575
493
|
}
|
|
576
494
|
getSchemas() {
|
|
@@ -578,7 +496,7 @@ let g = class extends G {
|
|
|
578
496
|
}
|
|
579
497
|
generate() {
|
|
580
498
|
if (!this._runtime) {
|
|
581
|
-
this._set("workspace",
|
|
499
|
+
this._set("workspace", q([])), this._set("createGraph", fe);
|
|
582
500
|
return;
|
|
583
501
|
}
|
|
584
502
|
const { createGraph: e, workspace: t } = this._runtime.generate();
|
|
@@ -586,38 +504,38 @@ let g = class extends G {
|
|
|
586
504
|
}
|
|
587
505
|
//#endregion
|
|
588
506
|
};
|
|
589
|
-
|
|
590
|
-
n({ type:
|
|
507
|
+
C([
|
|
508
|
+
n({ type: I })
|
|
591
509
|
], g.prototype, "portalItem", 2);
|
|
592
|
-
|
|
510
|
+
C([
|
|
593
511
|
n()
|
|
594
512
|
], g.prototype, "sourceJSON", 2);
|
|
595
|
-
g =
|
|
513
|
+
g = C([
|
|
596
514
|
l("WebAgent")
|
|
597
515
|
], g);
|
|
598
|
-
class _e extends
|
|
516
|
+
class _e extends F {
|
|
599
517
|
static {
|
|
600
518
|
this.properties = { agent: 0, context: 0, itemId: 1, workflow: 0 };
|
|
601
519
|
}
|
|
602
520
|
#e;
|
|
603
521
|
async getContext() {
|
|
604
|
-
return
|
|
522
|
+
return M(this.context) ? await this.context() : this.context;
|
|
605
523
|
}
|
|
606
524
|
async load() {
|
|
607
525
|
let t;
|
|
608
526
|
if (this.itemId) {
|
|
609
|
-
const
|
|
610
|
-
t = new g({ portalItem: new
|
|
527
|
+
const o = G.getDefault();
|
|
528
|
+
t = new g({ portalItem: new I({ id: this.itemId, portal: o }) });
|
|
611
529
|
} else this.workflow && (t = new g({ sourceJSON: this.workflow }));
|
|
612
530
|
if (t && (await t.load(), this.agent = t.registration), !this.agent)
|
|
613
531
|
throw new Error("Failed to initialize the assistant agent because the agent registration is missing.");
|
|
614
|
-
this.#e =
|
|
532
|
+
this.#e = j(this);
|
|
615
533
|
}
|
|
616
534
|
disconnectedCallback() {
|
|
617
535
|
this.#e?.unregister(this.agent.id), super.disconnectedCallback();
|
|
618
536
|
}
|
|
619
537
|
}
|
|
620
|
-
|
|
538
|
+
W("arcgis-assistant-agent", _e);
|
|
621
539
|
export {
|
|
622
540
|
_e as ArcgisAssistantAgent
|
|
623
541
|
};
|
|
@@ -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 { c as s } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as e, html as t } from "lit";
|
|
4
4
|
import { LitElement as i } from "@arcgis/lumina";
|
|
@@ -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 { c as d } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as p, html as c } from "lit";
|
|
4
4
|
import { LitElement as f, createEvent as l, safeClassMap as g } from "@arcgis/lumina";
|
|
@@ -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 { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../agents/runtime/skill/createSkillAgent.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 { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../agents/runtime/skill/createSkillAgent.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 { c } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as a, html as e } from "lit";
|
|
4
4
|
import { LitElement as l, createEvent as s } from "@arcgis/lumina";
|
|
@@ -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 { c as r } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as a, html as i } from "lit";
|
|
4
4
|
import { LitElement as l } from "@arcgis/lumina";
|
|
@@ -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 { c as r } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as e } from "@arcgis/lumina";
|
|
4
4
|
import "../../agents/runtime/skill/createSkillAgent.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 { c as t } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import "../../agents/runtime/skill/createSkillAgent.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 { c as o } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as l, html as e } from "lit";
|
|
4
4
|
import { LitElement as c, nothing as d } from "@arcgis/lumina";
|
|
@@ -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 { c as n } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as i, html as r } from "lit";
|
|
4
4
|
import { LitElement as o } from "@arcgis/lumina";
|