@arcgis/ai-components 5.2.0-next.110 → 5.2.0-next.112
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.d.ts +4 -5
- package/dist/agent-utils/LLMAgent.js +59 -59
- 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/agentic-workflow/jsonTypes.d.ts +48 -8
- package/dist/agentic-workflow/nodes/HumanInTheLoopNode.d.ts +37 -0
- package/dist/agentic-workflow/types.d.ts +1 -1
- package/dist/agents/runtime/skill/createSkillAgent.d.ts +0 -1
- package/dist/agents/runtime/skill/createSkillAgent.js +50 -50
- package/dist/agents/runtime/skill/types.d.ts +2 -10
- 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/2BNQ6A6J.js +2 -0
- package/dist/cdn/{FV6FHLYW.js → 2MWUBKWI.js} +2 -2
- package/dist/cdn/{GW3IVAAZ.js → 2O4DON37.js} +2 -2
- package/dist/cdn/33PB7ALY.js +2 -0
- package/dist/cdn/{FK2CVSXW.js → 33SFAZQG.js} +4 -4
- package/dist/cdn/{LLY5A2E2.js → 34O57OGV.js} +1 -1
- package/dist/cdn/{OALQBAZR.js → 3UEKINYC.js} +2 -2
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/4AQBRGO2.js +3 -0
- package/dist/cdn/{ZWIKFBOU.js → 4IU63OWQ.js} +2 -2
- package/dist/cdn/{XRVGYRXL.js → 5A355PGH.js} +2 -2
- package/dist/cdn/5BBXNT75.js +66 -0
- package/dist/cdn/{TB2GJALS.js → 5HBAJ57P.js} +2 -2
- package/dist/cdn/{7Y43R7QJ.js → 5MK44FNO.js} +2 -2
- package/dist/cdn/{LXIKAXUT.js → 5Q2XRQS6.js} +2 -2
- package/dist/cdn/{UAZPINUQ.js → 6ECRQVHY.js} +2 -2
- package/dist/cdn/{BBEGLIZC.js → 6OOZSZRJ.js} +2 -2
- package/dist/cdn/6OUIUXAJ.js +2 -0
- package/dist/cdn/{Y4TYL2AL.js → 6P44KOKX.js} +2 -2
- package/dist/cdn/{LBTGOMCT.js → 73TMZQI5.js} +2 -2
- package/dist/cdn/{BJMGT6GV.js → 74CVYM72.js} +2 -2
- package/dist/cdn/{PJPP6LOS.js → 7EHOFQ2P.js} +2 -2
- package/dist/cdn/{24EIZVUM.js → 7KSFIRXB.js} +2 -2
- package/dist/cdn/{STOGCXJH.js → AHCXG7XF.js} +2 -2
- package/dist/cdn/{VLPELJUS.js → AOVJ34QE.js} +2 -2
- package/dist/cdn/{3KNLFIM3.js → APFZY4PI.js} +2 -2
- package/dist/cdn/{KBSXHSBX.js → AVRS6UCQ.js} +2 -2
- package/dist/cdn/{YOW3YKWR.js → AVZ5Y6BK.js} +2 -2
- package/dist/cdn/{477I66FH.js → AXTQU5YL.js} +11 -11
- package/dist/cdn/BBPD2AS7.js +2 -0
- package/dist/cdn/{HV7MVIQV.js → BFZ5S7NF.js} +2 -2
- package/dist/cdn/{HMMYCSOK.js → BL273EGZ.js} +2 -2
- package/dist/cdn/C7JPWFZE.js +2 -0
- package/dist/cdn/{KKCLHXHG.js → CCC6LBMY.js} +1 -1
- package/dist/cdn/{NNPA3NLK.js → CEKOEHB3.js} +2 -2
- package/dist/cdn/{W54XYT2A.js → CFAC4FN3.js} +2 -2
- package/dist/cdn/{53KIFJFA.js → COH3QXWG.js} +2 -2
- package/dist/cdn/{CX2HJ67C.js → DB2TFPIO.js} +2 -2
- package/dist/cdn/{EYGZJKVD.js → DE26DAW5.js} +2 -2
- package/dist/cdn/DG27JEYG.js +50 -0
- package/dist/cdn/DKA6PSYN.js +2 -0
- package/dist/cdn/DWH23NJN.js +2 -0
- package/dist/cdn/EDXTPEEU.js +2 -0
- package/dist/cdn/{6KWGSXIN.js → ENM3L4AC.js} +2 -2
- package/dist/cdn/{XV7RMYLR.js → EVMIYZWD.js} +2 -2
- package/dist/cdn/{FHBRXZLV.js → EYOWRGDP.js} +2 -2
- package/dist/cdn/{45BDE3MG.js → EYY367WR.js} +2 -2
- package/dist/cdn/{2UJPYWWZ.js → F3CSORDI.js} +2 -2
- package/dist/cdn/{27CK3JHY.js → F5NIRETW.js} +2 -2
- package/dist/cdn/{TFAJNKBC.js → FCI6M62J.js} +2 -2
- package/dist/cdn/{V4PJMCJZ.js → FDOMMK2M.js} +1 -1
- package/dist/cdn/{4OI4QEV7.js → FS7GXTTQ.js} +2 -2
- package/dist/cdn/{IHUWQOMK.js → FYZATVB3.js} +2 -2
- package/dist/cdn/{3PPXAIRE.js → H6P3WP5D.js} +2 -2
- package/dist/cdn/HHP5YLUI.js +2 -0
- package/dist/cdn/HIAQARIQ.js +2 -0
- package/dist/cdn/HMIDFTEI.js +2 -0
- package/dist/cdn/{4CFCV47G.js → HMNBUGH2.js} +2 -2
- package/dist/cdn/HR6GWPKX.js +2 -0
- package/dist/cdn/{V266DJ5V.js → ICBIUFK7.js} +2 -2
- package/dist/cdn/{BTOBEN7Q.js → IH26MIYY.js} +2 -2
- package/dist/cdn/{QAX6UF4L.js → IHP25JWI.js} +2 -2
- package/dist/cdn/{M2U456J5.js → IYLFJCJ2.js} +4 -4
- package/dist/cdn/{JMXXRRKQ.js → J6A4AS7E.js} +2 -2
- package/dist/cdn/{QTEPFTAU.js → JEBRN3EU.js} +2 -2
- package/dist/cdn/{G24MNC7D.js → JICNSK6Y.js} +2 -2
- package/dist/cdn/JQYLMTDP.js +2 -0
- package/dist/cdn/{275FFTBE.js → K5JVB6FU.js} +2 -2
- package/dist/cdn/K7XWGSLN.js +2 -0
- package/dist/cdn/{M3KKORBG.js → K7YQIJFT.js} +2 -2
- package/dist/cdn/KH4V4I3W.js +2 -0
- package/dist/cdn/KMLJS2VW.js +2 -0
- package/dist/cdn/{HNTSDY3J.js → LAVFUDUG.js} +2 -2
- package/dist/cdn/{LL324IL6.js → LFQLCCJJ.js} +2 -2
- package/dist/cdn/{L3BTURBA.js → LK7ZIQW6.js} +2 -2
- package/dist/cdn/{ZJWR4W2S.js → LOQ2PKV5.js} +58 -58
- package/dist/cdn/{X42ACC66.js → LXPGQNXQ.js} +2 -2
- package/dist/cdn/{TXZQZR3I.js → MJSIYEWN.js} +2 -2
- package/dist/cdn/{CSE6BHOJ.js → MWYBF3F3.js} +2 -2
- package/dist/cdn/{FDRAKF5D.js → MXTXJKFE.js} +2 -2
- package/dist/cdn/{7DOYUO7L.js → NEV6OZN3.js} +2 -2
- package/dist/cdn/{NBDOPGSN.js → O4NVW75A.js} +2 -2
- package/dist/cdn/{ZA7ZU2F7.js → OKVLGJAG.js} +2 -2
- package/dist/cdn/{SUC2MIGE.js → OMF6ITSG.js} +2 -2
- package/dist/cdn/{A6LBMS7A.js → ONQ6JSBJ.js} +1 -1
- package/dist/cdn/{CKUUYQLO.js → OZAZ277H.js} +2 -2
- package/dist/cdn/{XNUWVZN7.js → P4XZMBU5.js} +2 -2
- package/dist/cdn/{L2HLFWCV.js → POL6HKCG.js} +3 -3
- package/dist/cdn/{AP3KPOHN.js → POZYDAU2.js} +2 -2
- package/dist/cdn/{FTTLFIBV.js → PQ2DPOFM.js} +2 -2
- package/dist/cdn/{ZY3JQCZQ.js → QNXI3WOF.js} +36 -36
- package/dist/cdn/{4VBOTWC3.js → QRMRID2M.js} +2 -2
- package/dist/cdn/{TLPZELG3.js → R74ZHFA6.js} +1 -1
- package/dist/cdn/{OF3TAARW.js → RHYNE5OE.js} +1 -1
- package/dist/cdn/{4YOG5F3W.js → RLEHNAIA.js} +1 -1
- package/dist/cdn/RXF2NUOL.js +2 -0
- package/dist/cdn/{MZUDIQQH.js → SDWWUWAF.js} +2 -2
- package/dist/cdn/SHI76XUV.js +2 -0
- package/dist/cdn/SITY6L4S.js +2 -0
- package/dist/cdn/{RSM7MEVT.js → SLR75R32.js} +2 -2
- package/dist/cdn/STHBRTTD.js +2 -0
- package/dist/cdn/{7UBTNDV6.js → SXM4NUT5.js} +2 -2
- package/dist/cdn/{XVJFPZTW.js → SZRJTQ54.js} +2 -2
- package/dist/cdn/TO2NY7EA.js +2 -0
- package/dist/cdn/{4IWDBEMN.js → TPULIO6I.js} +2 -2
- package/dist/cdn/TVEEQSMF.js +2 -0
- package/dist/cdn/TWU3QXAS.js +2 -0
- package/dist/cdn/{EGRRZTF6.js → TYATJUNF.js} +2 -2
- package/dist/cdn/UCTC4JN4.js +3 -0
- package/dist/cdn/{HI3XKFHD.js → UDRKUVZP.js} +2 -2
- package/dist/cdn/{JYNHWJUZ.js → UHEYPSOR.js} +2 -2
- package/dist/cdn/{VGLBH473.js → UHICISBZ.js} +2 -2
- package/dist/cdn/UO5PBOQR.js +2 -0
- package/dist/cdn/{BVUCNXC5.js → UZLQALHY.js} +1 -1
- package/dist/cdn/{SNG3WODY.js → V6HOUZPZ.js} +2 -2
- package/dist/cdn/{V52GSTOC.js → V7Y22FRP.js} +2 -2
- package/dist/cdn/{I72ST4JR.js → VAXH6RUQ.js} +2 -2
- package/dist/cdn/{NV7CL4S3.js → VNLSYVPE.js} +2 -2
- package/dist/cdn/VR3CF3ZY.js +2 -0
- package/dist/cdn/{VK6CCPTG.js → VWP2B4LB.js} +2 -2
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/WKZHFSH3.js +2 -0
- package/dist/cdn/{OXC2WP7W.js → WSWB3B7B.js} +2 -2
- package/dist/cdn/{EK3PM4L5.js → WVP73XWD.js} +2 -2
- package/dist/cdn/{SJMAKF4P.js → WXQ26G5Q.js} +2 -2
- package/dist/cdn/{2F4TPWZQ.js → XQ3NBBQ3.js} +1 -1
- package/dist/cdn/{JUNMTIB3.js → XV3DHHYJ.js} +2 -2
- package/dist/cdn/{VXLKTQ36.js → YHWYTHID.js} +2 -2
- package/dist/cdn/{XOTPSCNF.js → YIZ7PR2G.js} +2 -2
- package/dist/cdn/{T6W6F4TF.js → Z5XQLSYH.js} +2 -2
- package/dist/cdn/{Y6CV2NZR.js → ZFOG3KXV.js} +2 -2
- package/dist/cdn/{FPH52WOH.js → ZU2FHVNK.js} +2 -2
- package/dist/cdn/agent-utils/index.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -3
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/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 +56 -50
- package/dist/chunks/arcgisKnowledgeGraph.js +2 -2
- package/dist/chunks/arcgisToolRegistry.js +1 -1
- 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 +1 -1
- 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 +60 -63
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +26 -26
- 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.d.ts +6 -0
- package/dist/components/arcgis-assistant/customElement.js +126 -114
- package/dist/components/arcgis-assistant-agent/customElement.js +362 -220
- 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 +3 -3
- package/package.json +11 -11
- package/dist/cdn/25MBI4PD.js +0 -2
- package/dist/cdn/2LVYAXHG.js +0 -44
- package/dist/cdn/2WXXSZP5.js +0 -2
- package/dist/cdn/5X23DDDZ.js +0 -2
- package/dist/cdn/65LCK3GG.js +0 -3
- package/dist/cdn/AUCKEB52.js +0 -2
- package/dist/cdn/B3HXSEBN.js +0 -2
- package/dist/cdn/BTTCBEPW.js +0 -2
- package/dist/cdn/CAOMMQSY.js +0 -66
- package/dist/cdn/EXMEB4X2.js +0 -2
- package/dist/cdn/FLUI6GCU.js +0 -2
- package/dist/cdn/FRYS2PZJ.js +0 -2
- package/dist/cdn/FSLQCZRN.js +0 -2
- package/dist/cdn/HKIA5PWU.js +0 -2
- package/dist/cdn/I3SUE2TR.js +0 -2
- package/dist/cdn/KAX4A7SF.js +0 -2
- package/dist/cdn/LIRT72WY.js +0 -2
- package/dist/cdn/M5B6X46F.js +0 -2
- package/dist/cdn/NGR5NVZE.js +0 -2
- package/dist/cdn/PUZ6RAFQ.js +0 -2
- package/dist/cdn/ROS22KOA.js +0 -2
- package/dist/cdn/SBNNJ5WA.js +0 -2
- package/dist/cdn/SDX46GZY.js +0 -2
- package/dist/cdn/SI22EJLC.js +0 -2
- package/dist/cdn/SXYKNDOF.js +0 -2
- package/dist/cdn/SZ2L5556.js +0 -2
- package/dist/cdn/UGIHS7OA.js +0 -2
- package/dist/cdn/VT5EWFH7.js +0 -2
- package/dist/cdn/XZF7Y6B2.js +0 -2
- package/dist/cdn/Y4ZOB6UH.js +0 -2
- package/dist/cdn/YIXASZUW.js +0 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { getCurrentTaskInput as I, Annotation as q, StateGraph as D, START as G, END as K, isGraphInterrupt as J } from "@langchain/langgraph/web";
|
|
3
|
-
import { createMiddleware as y, createAgent as L } from "langchain";
|
|
3
|
+
import { createMiddleware as y, createAgent as L, providerStrategy as _ } from "langchain";
|
|
4
4
|
import d, { z as m } from "zod";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as U } from "../../../chunks/aiFactory.js";
|
|
6
6
|
import { s as p } from "../../../chunks/index.js";
|
|
7
|
-
import { a as
|
|
8
|
-
import { ToolMessage as
|
|
7
|
+
import { a as B } from "../../../chunks/baseAgentState.js";
|
|
8
|
+
import { ToolMessage as H } from "@langchain/core/messages";
|
|
9
9
|
import { tool as R } from "@langchain/core/tools";
|
|
10
|
-
import { r as
|
|
11
|
-
const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e),
|
|
10
|
+
import { r as Q } from "../../../chunks/arcgisToolRegistry.js";
|
|
11
|
+
const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), W = ["point", "polyline", "polygon", "extent", "custom"], X = (e) => typeof e == "string" && W.some((t) => t === e), Y = (e, t) => {
|
|
12
12
|
if (!(!w(e) || !("value" in e))) {
|
|
13
13
|
if (w(e.sharedStatePatch)) {
|
|
14
14
|
const s = { ...t.sharedStatePatch };
|
|
@@ -18,13 +18,13 @@ const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Q = ["
|
|
|
18
18
|
}
|
|
19
19
|
if (Array.isArray(e.sharedResourceAdditions))
|
|
20
20
|
for (const s of e.sharedResourceAdditions)
|
|
21
|
-
w(s) &&
|
|
21
|
+
w(s) && X(s.kind) && typeof s.description == "string" && "payload" in s && t.sharedResourceAdditions.push({
|
|
22
22
|
kind: s.kind,
|
|
23
23
|
description: s.description,
|
|
24
24
|
payload: s.payload
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, Z = () => {
|
|
28
28
|
const e = { sharedResourceAdditions: [] };
|
|
29
29
|
return {
|
|
30
30
|
middleware: y({
|
|
@@ -35,16 +35,16 @@ const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Q = ["
|
|
|
35
35
|
const s = t.messages;
|
|
36
36
|
if (Array.isArray(s)) {
|
|
37
37
|
for (const o of s)
|
|
38
|
-
if (
|
|
38
|
+
if (H.isInstance(o) && o.status !== "error") {
|
|
39
39
|
const r = o.artifact;
|
|
40
|
-
|
|
40
|
+
Y(r, e);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}),
|
|
45
45
|
collectedEffects: e
|
|
46
46
|
};
|
|
47
|
-
},
|
|
47
|
+
}, V = (e) => y({
|
|
48
48
|
name: "TraceMiddleware",
|
|
49
49
|
wrapModelCall: async (t, s) => {
|
|
50
50
|
await p({ text: "Determining the next step" }, e);
|
|
@@ -65,23 +65,23 @@ const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Q = ["
|
|
|
65
65
|
throw await p({ text: `Failed executing ${t.toolCall.name}` }, e), o;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
}), M = ["custom", "extent", "point", "polygon", "polyline"],
|
|
68
|
+
}), M = ["custom", "extent", "point", "polygon", "polyline"], ee = d.object({
|
|
69
69
|
id: d.string(),
|
|
70
70
|
kind: d.enum(M),
|
|
71
71
|
description: d.string()
|
|
72
|
-
}),
|
|
72
|
+
}), te = d.object({
|
|
73
73
|
kinds: d.array(d.enum(M)).optional().describe("Optional resource kinds to include. Omit to list all available resources.")
|
|
74
|
-
}),
|
|
74
|
+
}), oe = ({ kinds: e }, t) => {
|
|
75
75
|
const s = I(t), o = e ? new Set(e) : void 0, r = (s.agentExecutionContext?.sharedResources ?? []).flatMap((n) => {
|
|
76
|
-
const i =
|
|
76
|
+
const i = ee.safeParse(n);
|
|
77
77
|
return i.success && (!o || o.has(i.data.kind)) ? [i.data] : [];
|
|
78
78
|
});
|
|
79
79
|
return JSON.stringify({ resources: r }, null, 2);
|
|
80
|
-
},
|
|
80
|
+
}, se = R(oe, {
|
|
81
81
|
name: "listSharedResources",
|
|
82
82
|
description: "List IDs, kinds, and descriptions for resources created by earlier agents. Use this to reuse prior results instead of repeating work. Resource payloads are hidden.",
|
|
83
|
-
schema:
|
|
84
|
-
}),
|
|
83
|
+
schema: te
|
|
84
|
+
}), re = (e) => {
|
|
85
85
|
if (e.size === 0)
|
|
86
86
|
throw new Error("At least one skill is required.");
|
|
87
87
|
const t = [...e.keys()];
|
|
@@ -98,7 +98,7 @@ const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Q = ["
|
|
|
98
98
|
schema: d.object({ name: d.enum(t) })
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
|
-
},
|
|
101
|
+
}, ae = (e) => {
|
|
102
102
|
const t = /^---\r?\nname: (?<name>[^\r\n]+)\r?\ndescription: (?<description>[^\r\n]+)\r?\n(?:allowed-tools: (?<allowedTools>[^\r\n]+)\r?\n)?---\r?\n(?<instructions>[\s\S]+)$/u.exec(
|
|
103
103
|
e
|
|
104
104
|
)?.groups;
|
|
@@ -110,66 +110,66 @@ const w = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Q = ["
|
|
|
110
110
|
description: t.description,
|
|
111
111
|
instructions: t.instructions.trim()
|
|
112
112
|
};
|
|
113
|
-
},
|
|
114
|
-
const t = await Promise.all(e.map(async (o) =>
|
|
113
|
+
}, ne = async (e) => {
|
|
114
|
+
const t = await Promise.all(e.map(async (o) => ae(await o()))), s = /* @__PURE__ */ new Map();
|
|
115
115
|
for (const o of t) {
|
|
116
116
|
if (s.has(o.name))
|
|
117
117
|
throw new Error(`Skill name must be unique: ${o.name}`);
|
|
118
118
|
s.set(o.name, o);
|
|
119
119
|
}
|
|
120
120
|
return s;
|
|
121
|
-
},
|
|
121
|
+
}, v = "load_skill", T = (e) => typeof e == "object" && e !== null && "name" in e && typeof e.name == "string" ? e.name : void 0, ie = (e, t, s = []) => {
|
|
122
122
|
let o = t;
|
|
123
123
|
return y({
|
|
124
124
|
name: "ActiveSkillMiddleware",
|
|
125
125
|
wrapModelCall: async (r, n) => {
|
|
126
126
|
const i = /* @__PURE__ */ new Set([
|
|
127
|
-
|
|
127
|
+
v,
|
|
128
128
|
...s,
|
|
129
129
|
...o?.allowedTools ?? []
|
|
130
130
|
]);
|
|
131
131
|
return await n({
|
|
132
132
|
...r,
|
|
133
133
|
tools: r.tools.filter((l) => {
|
|
134
|
-
const a =
|
|
134
|
+
const a = T(l);
|
|
135
135
|
return a !== void 0 && i.has(a);
|
|
136
136
|
})
|
|
137
137
|
});
|
|
138
138
|
},
|
|
139
139
|
wrapToolCall: async (r, n) => {
|
|
140
140
|
const i = await n(r);
|
|
141
|
-
if (r.toolCall.name ===
|
|
142
|
-
const l =
|
|
141
|
+
if (r.toolCall.name === v) {
|
|
142
|
+
const l = T(r.toolCall.args), a = l ? e.get(l) : void 0;
|
|
143
143
|
a && (o = a);
|
|
144
144
|
}
|
|
145
145
|
return i;
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
},
|
|
148
|
+
}, le = async (e, t = {}) => {
|
|
149
149
|
const s = new Set([...e.values()].flatMap((o) => o.allowedTools));
|
|
150
150
|
return await Promise.all(
|
|
151
151
|
[...s].map(async (o) => {
|
|
152
|
-
const r = t[o], n = r ? await r() : await
|
|
152
|
+
const r = t[o], n = r ? await r() : await Q(o);
|
|
153
153
|
if (n.name !== o)
|
|
154
154
|
throw new Error(`Skill tool "${o}" resolved to "${n.name}".`);
|
|
155
155
|
return n;
|
|
156
156
|
})
|
|
157
157
|
);
|
|
158
|
-
},
|
|
159
|
-
const s = await
|
|
158
|
+
}, ce = async (e, t = {}) => {
|
|
159
|
+
const s = await ne(e), o = [...s.values()];
|
|
160
160
|
if (o.length === 0)
|
|
161
161
|
throw new Error("createSkillRuntime requires at least one skill.");
|
|
162
|
-
const r = [
|
|
162
|
+
const r = [se], n = new Set(r.map((a) => a.name));
|
|
163
163
|
for (const a of o) {
|
|
164
|
-
const h = a.allowedTools.find((
|
|
164
|
+
const h = a.allowedTools.find((g) => n.has(g));
|
|
165
165
|
if (h)
|
|
166
166
|
throw new Error(
|
|
167
167
|
`Skill "${a.name}" must not declare framework tool "${h}" in allowed-tools; it is provided automatically.`
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
|
-
const i = await
|
|
170
|
+
const i = await le(s, t), l = o.length === 1 ? o[0] : void 0;
|
|
171
171
|
return {
|
|
172
|
-
activeSkillMiddleware:
|
|
172
|
+
activeSkillMiddleware: ie(
|
|
173
173
|
s,
|
|
174
174
|
l,
|
|
175
175
|
r.map((a) => a.name)
|
|
@@ -182,9 +182,9 @@ ${o.map((a) => `- ${a.name}: ${a.description}`).join(`
|
|
|
182
182
|
`)}
|
|
183
183
|
|
|
184
184
|
Call load_skill before using a skill and follow its instructions. Framework tools and the active skill's tools are available. Switch skills when another skill is needed to complete the task.`,
|
|
185
|
-
tools: l ? [...r, ...i] : [
|
|
185
|
+
tools: l ? [...r, ...i] : [re(s), ...r, ...i]
|
|
186
186
|
};
|
|
187
|
-
},
|
|
187
|
+
}, $ = q.Root({ ...B() }), de = m.object({
|
|
188
188
|
agentExecutionContext: m.custom()
|
|
189
189
|
}), x = m.object({
|
|
190
190
|
outcome: m.enum(["completed", "blocked"]).describe(
|
|
@@ -196,7 +196,7 @@ Call load_skill before using a skill and follow its instructions. Framework tool
|
|
|
196
196
|
summary: m.string().describe(
|
|
197
197
|
"A concise orchestration summary. For a blocker, identify the missing prerequisite and capability needed."
|
|
198
198
|
)
|
|
199
|
-
}),
|
|
199
|
+
}), be = ({
|
|
200
200
|
id: e,
|
|
201
201
|
name: t,
|
|
202
202
|
description: s,
|
|
@@ -207,17 +207,17 @@ Call load_skill before using a skill and follow its instructions. Framework tool
|
|
|
207
207
|
runtimeContextLoader: l,
|
|
208
208
|
instructions: a,
|
|
209
209
|
fallbackMessage: h = `${t} request completed.`,
|
|
210
|
-
failureMessage:
|
|
210
|
+
failureMessage: g = "I couldn't complete this request."
|
|
211
211
|
}) => {
|
|
212
212
|
const C = async (S, u) => {
|
|
213
213
|
await p({ text: `Running ${t}` }, u);
|
|
214
214
|
try {
|
|
215
|
-
const { activeSkillMiddleware: c, skillsPrompt: k, tools: E } = await
|
|
216
|
-
model: await
|
|
215
|
+
const { activeSkillMiddleware: c, skillsPrompt: k, tools: E } = await ce(o, r), { collectedEffects: P, middleware: N } = Z(), { assignedTask: j, priorSteps: O, userRequest: z } = S.agentExecutionContext, A = await l?.({ config: u }), F = await L({
|
|
216
|
+
model: await U({ modelTier: n, config: u }),
|
|
217
217
|
tools: E,
|
|
218
|
-
stateSchema:
|
|
219
|
-
responseFormat: x,
|
|
220
|
-
middleware: [c, N,
|
|
218
|
+
stateSchema: de,
|
|
219
|
+
responseFormat: _(x),
|
|
220
|
+
middleware: [c, N, V(u)],
|
|
221
221
|
systemPrompt: `${i}
|
|
222
222
|
|
|
223
223
|
Primary task assigned by the orchestrator: ${j}
|
|
@@ -233,11 +233,11 @@ Call load_skill before using a skill and follow its instructions. Framework tool
|
|
|
233
233
|
|
|
234
234
|
${k}
|
|
235
235
|
${a ?? ""}`
|
|
236
|
-
}).invoke({ messages: [], agentExecutionContext: S.agentExecutionContext }, u),
|
|
236
|
+
}).invoke({ messages: [], agentExecutionContext: S.agentExecutionContext }, u), f = x.parse(F.structuredResponse), b = f.outputMessage || h;
|
|
237
237
|
return {
|
|
238
238
|
outputMessage: b,
|
|
239
|
-
status:
|
|
240
|
-
summary:
|
|
239
|
+
status: f.outcome === "completed" ? "success" : "failed",
|
|
240
|
+
summary: f.summary || b,
|
|
241
241
|
...P
|
|
242
242
|
};
|
|
243
243
|
} catch (c) {
|
|
@@ -245,7 +245,7 @@ Call load_skill before using a skill and follow its instructions. Framework tool
|
|
|
245
245
|
throw c;
|
|
246
246
|
const k = c instanceof Error ? c.message : String(c);
|
|
247
247
|
return {
|
|
248
|
-
outputMessage: `${
|
|
248
|
+
outputMessage: `${g}
|
|
249
249
|
|
|
250
250
|
Reason: ${k}`,
|
|
251
251
|
status: "failed",
|
|
@@ -253,8 +253,8 @@ Reason: ${k}`,
|
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
|
-
return { id: e, name: t, description: s, createGraph: () => new D(
|
|
256
|
+
return { id: e, name: t, description: s, createGraph: () => new D($).addNode("agent", C).addEdge(G, "agent").addEdge("agent", K), workspace: $ };
|
|
257
257
|
};
|
|
258
258
|
export {
|
|
259
|
-
|
|
259
|
+
be as createSkillAgent
|
|
260
260
|
};
|
|
@@ -4,11 +4,7 @@ import type { StructuredToolInterface } from "@langchain/core/tools";
|
|
|
4
4
|
/** Maps skill tool names to custom or configured lazy tool loaders. */
|
|
5
5
|
export type ToolLoaders = Readonly<Record<string, ToolLoader>>;
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Parsed metadata and instructions for a bundled agent skill.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
7
|
+
/** Parsed metadata and instructions for a bundled agent skill. */
|
|
12
8
|
export type AgentSkill = {
|
|
13
9
|
name: string;
|
|
14
10
|
description: string;
|
|
@@ -16,11 +12,7 @@ export type AgentSkill = {
|
|
|
16
12
|
allowedTools: readonly string[];
|
|
17
13
|
};
|
|
18
14
|
|
|
19
|
-
/**
|
|
20
|
-
* Options supplied when loading context for a skill agent run.
|
|
21
|
-
*
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
15
|
+
/** Options supplied when loading context for a skill agent run. */
|
|
24
16
|
export type RuntimeContextLoaderOptions = {
|
|
25
17
|
config?: RunnableConfig;
|
|
26
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/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/5.2/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/5.2/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/5.2/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,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { tool as v } from "@langchain/core/tools";
|
|
3
3
|
import { a as C } from "../../../../chunks/formatFeatureAttributes.js";
|
|
4
4
|
import { g as R, i as F, a as I, s as G, r as O } from "../../../../chunks/resolvePointGeometryFilter.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { ToolMessage as a } from "@langchain/core/messages";
|
|
3
3
|
const i = (r) => typeof r == "object" && r !== null && "value" in r, c = ({ messages: r, schema: n, toolName: t }) => {
|
|
4
4
|
for (let o = r.length - 1; o >= 0; o--) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import a from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import a from"./EVMIYZWD.js";import"./JQYLMTDP.js";import"./FS7GXTTQ.js";import"./LOQ2PKV5.js";import"./IYLFJCJ2.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:g,subclass:p},{c:d,d:u}])=>{var f=Object.defineProperty,w=Object.getOwnPropertyDescriptor,c=(e,r,n,o)=>{for(var t=o>1?void 0:o?w(r,n):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(t=(o?a(r,n,t):a(t))||t);return o&&t&&f(r,n,t),t},s=class extends u{constructor(e){super(e)}getAgents(){return this.agents}buildNodes(e){let r=super.buildNodes(e);return r[l]=()=>({}),r}buildEdges(e){let r=this.condition;if(!r)throw new Error("ConditionalWorkflow requires a condition.");let n=d(e[0],0),o=d(e[1],1);return[{from:l,decide:async(t,i)=>await Promise.resolve(r(t,i))?n:o}]}getEntryNode(){return l}isTerminalAgent(){return!0}validateAgents(e){if(super.validateAgents(e),e.length!==2)throw new Error(`ConditionalWorkflow requires exactly 2 agents; received ${e.length}.`)}};c([g()],s.prototype,"condition",2);c([g()],s.prototype,"agents",2);s=c([p("ConditionalWorkflow")],s);var l="__conditional_decide";return s},"core/accessorSupport/decorators",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as y}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{b as y}from"./6OOZSZRJ.js";import{a as v}from"./RLEHNAIA.js";import{g as p,h as r,n as o,t as n,u as c,v as g,w as m,z as f}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([b])=>{var w=p`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.status-indicator{width:9px;height:9px;border-radius:100%;background-color:var(--calcite-color-status-success)}.status-indicator[data-status=working]{background-color:var(--calcite-color-status-warning)}.status-indicator[data-status=error]{background-color:var(--calcite-color-status-danger)}.status-text{text-transform:capitalize}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}`,l=class extends g{constructor(){super(...arguments),this.#s=n(),this.#a=n(),this.#t=-1,this.#e="",this.#i=t=>{t.stopPropagation();let s=t.detail;this._setDraftValue(s.value),s.focusInput&&this.#s.value&&this.#s.value.setFocus()},this.#r=t=>{let s=t.target.value??"";this.inputValue=s,this.#e=s},this._messages=y({blocking:!0}),this._inFocus=!1,this.keyboardShortcutsDisabled=!1,this.awaitingResponse=!1,this.inputValue="",this.voiceInputEnabled=!1,this.messages=new b([]),this.disabled=!1,this.arcgisCancel=o(),this.arcgisSubmit=o()}static{this.properties={_inFocus:16,_userMessages:16,keyboardShortcutsDisabled:5,entryPlaceholder:1,awaitingResponse:5,inputValue:1,status:1,voiceInputEnabled:5,messages:0,disabled:5}}static{this.styles=w}#s;#a;#t;#e;#i;#r;get _userMessages(){return this.messages.toArray().filter(t=>t.role==="user").map(({content:t})=>t)}async submitMessage(){if(this.awaitingResponse){this.arcgisCancel.emit();return}let t=this.inputValue.trim();t&&(this.arcgisSubmit.emit(t),this.inputValue="",this.#t=-1,this.#e="",this.#a.value?.clearDraftSession(),this.#s.value&&await this.#s.value.setFocus())}loaded(){this.manager.onLifecycle(()=>(this.el.addEventListener("arcgisVoiceInputDraftChange",this.#i),{remove:()=>{this.el.removeEventListener("arcgisVoiceInputDraftChange",this.#i)}}))}async _navigateHistory(t,s){let i=this.#s.value;if(!i)return;let e=this._userMessages;if(e.length===0)return;let u=i.value??"",h=i.shadowRoot?.querySelector("textarea"),a=h?.selectionStart,d=h?.selectionEnd;if(!(a==null||d==null)&&!(a!==d||t==="up"&&a!==0||t==="down"&&a!==u.length)){if(t==="up"){this.#t===-1?(this.#e=u,this.#t=e.length-1):this.#t=Math.max(0,this.#t-1),this.inputValue=e[this.#t]??"",s.preventDefault();return}this.#t!==-1&&(this.#t<e.length-1?(this.#t+=1,this.inputValue=e[this.#t]??""):(this.#t=-1,this.inputValue=this.#e),s.preventDefault())}}_setDraftValue(t){this.inputValue=t,this.#t=-1,this.#e=t}_onFocusIn(){this._inFocus=!0}_onFocusOut(){this._inFocus=!1}render(){return r`<div class="input-container"><calcite-text-area class=${m(v({focused:this._inFocus}))} .value=${this.inputValue} .placeholder=${this.entryPlaceholder??this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#r} .disabled=${this.disabled} @keydown=${async t=>{t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this.keyboardShortcutsDisabled||(t.key==="Enter"?(t.preventDefault(),await this.submitMessage()):t.key==="ArrowUp"?await this._navigateHistory("up",t):t.key==="ArrowDown"&&await this._navigateHistory("down",t))}} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${c(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled?r`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${c(this.#a)}></arcgis-assistant-speech-input>`:null}<slot name=entry-actions-end></slot></div></calcite-text-area></div>`}};f("arcgis-assistant-chat-entry",l);return l},"core/Collection")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{b as L,c as M}from"./V6HOUZPZ.js";import{a as B}from"./TWU3QXAS.js";import"./3UEKINYC.js";import"./RLEHNAIA.js";import d from"./SHI76XUV.js";import"./P4XZMBU5.js";import b from"./TYATJUNF.js";import{a as V,b as F,e as H}from"./JQYLMTDP.js";import a from"./DG27JEYG.js";import{e as $}from"./FS7GXTTQ.js";import{v as D,z as q}from"./COH3QXWG.js";import"./R74ZHFA6.js";import{c as U}from"./UCTC4JN4.js";import"./V7Y22FRP.js";import"./QRMRID2M.js";import"./AXTQU5YL.js";import{J as W,_ as E,ka as J}from"./LOQ2PKV5.js";import"./IYLFJCJ2.js";import"./VXFQANGJ.js";import{Dd as c}from"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([Q,ie,{property:a,subclass:h},_,C,,,,,,,G,z])=>{var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,y=(e,t,r,s)=>{for(var o=s>1?void 0:s?ce(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&ae(t,r,o),o},p=class extends C{constructor(e){super(e)}static fromJSON(e){return new p({id:e.id,sourceAnchorId:e.source_anchor_id,sourceNodeId:e.source_node_id,targetAnchorId:e.target_anchor_id,targetNodeId:e.target_node_id})}};y([a()],p.prototype,"id",2);y([a()],p.prototype,"sourceAnchorId",2);y([a()],p.prototype,"sourceNodeId",2);y([a()],p.prototype,"targetAnchorId",2);y([a()],p.prototype,"targetNodeId",2);p=y([h("Edge")],p);var pe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,I=(e,t,r,s)=>{for(var o=s>1?void 0:s?de(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&pe(t,r,o),o},d=class extends C{constructor(e){super(e)}async load(){return await Promise.resolve(this)}compile(e){return{runtimeNode:this.createRuntimeNode(),edges:e.outgoingEdges.map(t=>({from:this.id,to:t.targetNodeId}))}}static fromJSON(e){throw new Error("BaseNode is abstract and cannot be instantiated directly.")}};I([a()],d.prototype,"id",2);I([a()],d.prototype,"label",2);I([a()],d.prototype,"type",2);d=I([h("BaseNode")],d);function X(e){let t=new Set(e.required),r=Object.fromEntries(Object.entries(e.properties).map(([s,o])=>{let n=Y(o);return[s,t.has(s)?n:n.optional()]}));return c.object(r)}function Y(e){let t;switch(e.type){case"array":t=c.array(e.items?Y(e.items):c.unknown());break;case"boolean":t=c.boolean();break;case"number":t=c.number();break;case"object":t=X({properties:e.properties??{},required:e.required});break;case"string":t=e.enum?.length?c.enum(e.enum):c.string();break}return e.description?t.describe(e.description):t}var ue=Object.defineProperty,me=Object.getOwnPropertyDescriptor,j=(e,t,r,s)=>{for(var o=s>1?void 0:s?me(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&ue(t,r,o),o},he=e=>e.replace(/_([a-z])/gu,(t,r)=>r.toUpperCase()),l=class extends C{constructor(e){super(e),this.type="arcgis-tool"}async createRuntimeTools(){if(!this.name)throw new Error("ArcgisTool name is required");return[await B(he(this.name))]}static fromJSON(e){return new l({name:e.name,requireApproval:e.require_approval})}};j([a()],l.prototype,"name",2);j([a()],l.prototype,"requireApproval",2);j([a()],l.prototype,"type",2);l=j([h("ArcgisTool")],l);var le=Object.defineProperty,ge=Object.getOwnPropertyDescriptor,Z=e=>{throw TypeError(e)},w=(e,t,r,s)=>{for(var o=s>1?void 0:s?ge(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&le(t,r,o),o},fe=(e,t,r)=>t.has(e)||Z("Cannot "+r),ye=(e,t,r)=>t.has(e)?Z("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),we=(e,t,r)=>(fe(e,t,"access private method"),r),k,ee,u=class extends d{constructor(e){super(e),ye(this,k),this.type="agent-node"}createRuntimeNode(){let e;return async(t,r)=>{e??=we(this,k,ee).call(this);let s=await(await e).run(t,r),o=this.outputSchema?.safeParse(s);if(o&&!o.success)throw o.error;let n=o?.data,i=n??s.outputMessage;return{agentExecutionContext:s.agentExecutionContext,...n?{}:{outputMessage:s.outputMessage},status:s.status,summary:s.summary,nodes:{[this.id]:{output:i}}}}}compile(e){let t=e.outgoingEdges[0]?.targetNodeId;return{runtimeNode:this.createRuntimeNode(),edges:[{from:this.id,decide:r=>r.status==="failed"?void 0:t}],schemas:[c.object({output:this.outputSchema??c.string()})]}}static fromJSON(e){let t=new u({id:e.id,label:e.label,prompt:e.prompt?.content,type:"agent-node",modelTier:e.llm_model?.model_tier});return e.structured_output&&(t.outputSchema=X(e.structured_output)),t.tools=e.tools?.filter(r=>r.type==="arcgis_tool").map(r=>l.fromJSON(r)),t}};k=new WeakSet;ee=async function(){let e=this.prompt;if(!e?.trim())throw new Error(`WebAgent agent node "${this.id}" requires a prompt.`);let t=[];if(this.tools)for(let r of this.tools){let s=await r.createRuntimeTools();t.push(...s)}return new z({name:this.id,outputSchema:this.outputSchema,modelTier:this.modelTier,prompt:e,tools:t})};w([a()],u.prototype,"type",2);w([a()],u.prototype,"prompt",2);w([a()],u.prototype,"outputSchema",2);w([a()],u.prototype,"tools",2);w([a()],u.prototype,"modelTier",2);u=w([h("AgentNode")],u);var be=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,T=(e,t,r,s)=>{for(var o=s>1?void 0:s?Ne(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&be(t,r,o),o},g=class extends d{constructor(e){super(e),this.type="end-message-node"}createRuntimeNode(){return async e=>{let t=await E.fromTemplate(this.message,{templateFormat:"mustache"}).format(e);return{outputMessage:t,status:"success",summary:t}}}compile(e){return{runtimeNode:this.createRuntimeNode(),edges:[]}}static fromJSON(e){let t=new g({id:e.id,label:e.label,type:"end-message-node"});return t.message=e.message,t}};T([a()],g.prototype,"type",2);T([a()],g.prototype,"message",2);g=T([h("EndMessageNode")],g);var Oe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,te=e=>{throw TypeError(e)},O=(e,t,r,s)=>{for(var o=s>1?void 0:s?Se(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&Oe(t,r,o),o},_e=(e,t,r)=>t.has(e)||te("Cannot "+r),ve=(e,t,r)=>t.has(e)?te("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r)=>(_e(e,t,"access private method"),r),v,re,oe,m=class extends d{constructor(e){super(e),ve(this,v),this.type="human-in-the-loop-node",this.conditions=[]}createRuntimeNode(){return async(e,t)=>{let r=Ie(t,this.id),s=`${r}:${this.id}`,o=U(t);if(o===void 0||!Ae(o,this.response?.type))throw new W({agentId:r,id:s,kind:je(this.response?.type),message:await K(this,v,re).call(this,e),metadata:K(this,v,oe).call(this,e)});return{nodes:{[this.id]:{output:o}}}}}compile(e){return{runtimeNode:this.createRuntimeNode(),edges:[{from:this.id,decide:t=>{if(!this.conditions.length)return e.outgoingEdges[0]?.targetNodeId;let r=t.nodes?.[this.id]?.output,s=this.conditions.find(o=>Ee(o.optionValue,r));if(s)return e.outgoingEdges.find(o=>o.sourceAnchorId===s.sourceAnchorId)?.targetNodeId}}]}}static fromJSON(e){let t=new m({id:e.id,label:e.label,type:"human-in-the-loop-node"});return t.message=e.message,t.response=e.response,t.conditions=(e.conditions??[]).map(({optionValue:r,source_anchor_id:s})=>({optionValue:r,sourceAnchorId:s})),t}};v=new WeakSet;re=async function(e){if(this.message?.source==="generated")throw new Error(`Human-in-the-loop node "${this.id}" does not support generated messages yet.`);let t=this.message?.content;if(!t)throw new Error(`Human-in-the-loop node "${this.id}" requires a message content.`);return await E.fromTemplate(t,{templateFormat:"mustache"}).format(e)};oe=function(e){let t=this.response;if(!t||t.type==="confirmation"||t.type==="textInput")return;let r=t.choices;return r?.source==="fixed"?r.items?.map(s=>s.value??s.label??""):r?.source==="reference"?Je(e,r.reference)?.map(String):void 0};O([a()],m.prototype,"type",2);O([a()],m.prototype,"message",2);O([a()],m.prototype,"response",2);O([a()],m.prototype,"conditions",2);m=O([h("HumanInTheLoopNode")],m);function Ie(e,t){let r=e?.configurable?.agentId;return typeof r=="string"&&r?r:t}function je(e){switch(e){case"singleSelect":return"singleSelection";case"multipleSelect":return"multipleSelection";case"textInput":return"textInput";default:return"booleanChoice"}}function Ae(e,t){switch(t){case"confirmation":return typeof e=="boolean";case"singleSelect":return typeof e=="string"||Array.isArray(e)&&e.length===1&&typeof e[0]=="string";case"multipleSelect":return Array.isArray(e)&&e.every(r=>typeof r=="string");case"textInput":return typeof e=="string";default:return!0}}function Ee(e,t){return Array.isArray(t)?t.some(r=>r===e):t===e}function Je(e,t){if(!t)return;let r=t.split(".").reduce((s,o)=>{if(s&&typeof s=="object"&&o in s)return s[o]},e);return Array.isArray(r)?r:typeof r=="string"?[r]:void 0}var ke=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,se=(e,t,r,s)=>{for(var o=s>1?void 0:s?xe(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&ke(t,r,o),o},N=class extends d{constructor(e){super(e),this.type="start-node"}createRuntimeNode(){return e=>({question:e.agentExecutionContext.userRequest})}static fromJSON(e){return new N({id:e.id,label:e.label,type:"start-node"})}};se([a()],N.prototype,"type",2);N=se([h("StartNode")],N);function Pe(e){switch(e.type){case"agent_node":return u.fromJSON(e);case"end_message_node":return g.fromJSON(e);case"human_in_the_loop_node":return m.fromJSON(e);case"start_node":return N.fromJSON(e);default:throw new Error(`WebAgent node "${e.id}" uses unsupported type "${e.type}".`)}}function Ce(e={}){let t=Object.keys(e);if(V(t),t.includes("nodes"))throw new Error("node state cannot define reserved field: nodes.");let r=F(e);return J.Root({...r,nodes:J({reducer:(s,o)=>({...s,...o}),default:()=>({})}),...$()})}function ne(e,t={}){let r=new Set;for(let o of e)for(let n of Object.keys(o.shape??{}))n!=="nodes"&&r.add(n);let s=Object.fromEntries([...r].map(o=>[o,t[o]]));for(let[o,n]of Object.entries(t))s[o]=n;return Ce(s)}var x=class e{constructor(t,r,s){this.sourceJSON=t,this.edges=r,this.nodes=s,this._loaded=!1}static fromJSON(t){return new e(t,t.graph.edges.map(r=>p.fromJSON(r)),t.graph.nodes.map(r=>Pe(r)))}async load(){return this._loadPromise??=Promise.all(this.nodes.map(async t=>await t.load())).then(()=>{this._loaded=!0}),await this._loadPromise,this}getSchemas(){let t=Object.fromEntries(this._getNodeCompilations().flatMap((r,s)=>{let o=this.nodes[s];return r.schemas?.map(n=>[o.id,n])??[]}));return[c.object({loopCounts:c.record(c.string(),c.number()).optional(),nodes:c.object(t).partial().optional(),question:c.string().optional(),variables:this._getVariablesSchema()})]}generate(){this._assertLoaded(),this._nodeCompilations=void 0;let t=this._getNodeCompilations(),r=Object.fromEntries(this.sourceJSON.variables.map(({key:b,value:A})=>[b,A])),s=ne(this.getSchemas(),{variables:r}),o=this.nodes.find(b=>b.type==="start-node")?.id,n={},i=[];for(let[b,A]of this.nodes.entries()){let S=t[b];S&&(S.runtimeNode&&(n[A.id]=S.runtimeNode),i.push(...S.edges))}return{createGraph:()=>H(n,i,s,{entryNode:o}),workspace:s}}_assertLoaded(){if(!this._loaded)throw new Error("AgenticWorkflowRuntime must be loaded before it can generate a graph.")}_getNodeCompilations(){return this._assertLoaded(),this._nodeCompilations??=this.nodes.map(t=>t.compile({outgoingEdges:this.edges.filter(r=>r.sourceNodeId===t.id)}))}_getVariablesSchema(){return c.object(Object.fromEntries(this.sourceJSON.variables.map(({key:t})=>[t,c.unknown()])))}},Te=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,R=(e,t,r,s)=>{for(var o=s>1?void 0:s?Re(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(s?i(t,r,o):i(o))||o);return s&&o&&Te(t,r,o),o},De=()=>{throw new Error("WebAgent must be loaded before it can run.")},f=class extends G{constructor(e){super(e)}async load(){if(this.portalItem){try{await this.portalItem.load()}catch(r){throw new _("web-agent:load-portal-item","Failed to load portal item",{error:r})}let t=await this.portalItem.fetchData();if(this.sourceJSON=t,!this.portalItem.title)throw new _("web-agent:missing-title","The portal item is missing a title")}if(!this.sourceJSON)throw new _("web-agent:missing-source-json","The source JSON is missing");if(!this.sourceJSON.description)throw new _("web-agent:missing-description","The source JSON is missing a description");let e=x.fromJSON(this.sourceJSON);return await e.load(),this._runtime=e,this.description=this.sourceJSON.description,this.name=this.portalItem?.title??`web-agent-${Date.now()}`,this.generate(),this}getSchemas(){return this._runtime?.getSchemas()??[]}generate(){if(!this._runtime){this._set("workspace",ne([])),this._set("createGraph",De);return}let{createGraph:e,workspace:t}=this._runtime.generate();this._set("workspace",t),this._set("createGraph",e)}};R([a({type:Q})],f.prototype,"portalItem",2);R([a()],f.prototype,"sourceJSON",2);f=R([h("WebAgent")],f);var P=class extends D{static{this.properties={agent:0,context:0,itemId:1,workflow:0}}#e;async getContext(){return L(this.context)?await this.context():this.context}async load(){let t;if(this.itemId){let r=ie.getDefault();t=new f({portalItem:new Q({id:this.itemId,portal:r})})}else this.workflow&&(t=new f({sourceJSON:this.workflow}));if(t&&(await t.load(),this.agent=t.registration),!this.agent)throw new Error("Failed to initialize the assistant agent because the agent registration is missing.");this.#e=M(this)}disconnectedCallback(){this.#e?.unregister(this.agent.id),super.disconnectedCallback()}};q("arcgis-assistant-agent",P);return P},"portal/PortalItem","portal/Portal","core/accessorSupport/decorators","core/Error","core/Accessor","identity/IdentityManager","request","config","core/reactiveUtils","layers/FeatureLayer",a,b,d)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as R}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as R}from"./XQ3NBBQ3.js";import b from"./QNXI3WOF.js";import a from"./DG27JEYG.js";import{a as c,b as k}from"./V7Y22FRP.js";import{A as f,Ya as x,r as w,s as d}from"./LOQ2PKV5.js";import{ta as u}from"./IYLFJCJ2.js";export default $arcgis.t(([,,,,,,{n:_,p:b},{A:S,B:M,C:T,D:E,E:C,F:G,G:N,b:v,d:m,e:h,w:y,x:A,y:K,z:q}])=>{var z=[M,T,G,E,S,N,C];async function $(e,a){let o=await m("arcgis_knowledge_tool_prompt"),s=A(a),n={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,contextType:s},r=await b({promptText:o,messages:e.arcgisKnowledgeMessages,inputVariables:n,tools:z,config:a}),i=(r.tool_calls?.length??0)>0,t=typeof r.text=="string"?r.text.trim():"",l=t.length>0,p=r.text;return!i&&(s==="map"||s==="knowledgeGraph")?{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,r],outputMessage:s==="map"?"No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries.":"No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",status:"success"}:{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,r],outputMessage:i?p:t,status:i?e.status:l?"success":"failed",summary:p?h(p):"ArcGIS Knowledge Agent tool executed."}}var L={generateCypher:"generated-cypher-query",queryGraphData:"graph-query-result",searchGraphData:"graph-search-result",addRecords:"added-records",applyLayout:"applied-layout",changeNonspatialVisibility:"changed-nonspatial-visibility",createLinkChart:"created-link-chart"};function I(e){return!!e&&e.status==="success"&&!!L[e.toolName]}function D(e){return{type:L[e.toolName],data:e.details}}async function F(e,a){let o=new v(z,{handleToolErrors:!1});try{let s=await o.invoke({messages:e.arcgisKnowledgeMessages},a),n=[];for(let t of s.messages){let l;if(typeof t.content!="string")throw new Error(`Unexpected tool message content type: ${typeof t.content}. Expected string.`);try{l=JSON.parse(t.content)}catch{throw new Error(`Failed to parse tool message content as JSON. Tool: ${t.name??"unknown"}.
|
|
3
3
|
|
|
4
|
-
Original Content: ${t.content}`)}if(!l||typeof l!="object"||!("toolName"in l))throw new Error(`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(l)}`);n.push(l)}await c({text:`Finished executing ArcGIS Knowledge Agent tools: ${
|
|
4
|
+
Original Content: ${t.content}`)}if(!l||typeof l!="object"||!("toolName"in l))throw new Error(`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(l)}`);n.push(l)}await c({text:`Finished executing ArcGIS Knowledge Agent tools: ${s.messages.filter(t=>t.name).map(t=>t.name).join(", ")}`},a);let r=n.filter(t=>typeof t!="string").map(t=>`- Called Tool: ${t.toolName}, Status: ${t.status}`),i=n[0];return i&&I(i)&&await k(D(i),a),{...e,outputMessage:r.join(`
|
|
5
5
|
`),summary:r.length?h(r.join(`
|
|
6
|
-
`)):"ArcGIS Knowledge Agent did not execute any tools or return any results.",arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,...
|
|
6
|
+
`)):"ArcGIS Knowledge Agent did not execute any tools or return any results.",arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,...s.messages],arcgisKnowledgeToolResult:n}}catch(s){let n=s instanceof Error?s.message:String(s);return await c({text:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`},a),{...e,outputMessage:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`,status:"failed",summary:h(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages]}}}var V=(e,a)=>R([],"ArcgisKnowledge Agent")(e,a);async function O(e,a){let o=(e.arcgisKnowledgeToolResult??[]).map(l=>({...l,details:void 0})),{knowledgeGraph:s}=await K(a),n=q.getDataModelTypesSummary(s.dataModel),r={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,toolResult:o,dataModelSummary:n},i=await _({promptText:await m("arcgis_knowledge_summarize_result_prompt"),modelTier:"default",inputVariables:r,config:a}),t=typeof i=="string"?i:i.content;return{...e,outputMessage:t,status:"success",summary:h(t),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,new u(t)]}}async function j(e){let a=e.arcgisKnowledgeToolResult?.[0],o=a?.status==="success"?a.summary:"ArcGIS Knowledge Agent tool execution failed.";return{...e,outputMessage:o,status:"success",summary:h(o),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,new u(o)]}}function g(e){return async(a,o)=>o?.signal?.aborted?(await c({text:"Knowledge Agent execution cancelled"},o),new f({goto:d,update:{outputMessage:"Knowledge Agent execution cancelled",summary:"Knowledge Agent execution cancelled",status:"failed"}})):await e(a,o)}var J=()=>new x(y).addNode("requireArcgisKnowledgeServices",V).addNode("agent",g($)).addNode("tools",g(F)).addNode("summarizationLLM",g(O)).addNode("finalizeToolSummary",g(j)).addEdge(w,"requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices","agent").addConditionalEdges("agent",e=>(e.arcgisKnowledgeMessages[e.arcgisKnowledgeMessages.length-1]?.tool_calls?.length??0)>0?"tools":d).addConditionalEdges("tools",e=>{if(e.status==="failed")return d;let a=e.arcgisKnowledgeToolResult?.[0];return a?.status==="success"&&["applyLayout","changeNonspatialVisibility"].includes(a.toolName)?"finalizeToolSummary":"summarizationLLM"}).addEdge("summarizationLLM",d).addEdge("finalizeToolSummary",d),P=String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
|
|
7
7
|
This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
|
|
8
8
|
For link charts, the agent enables users to interact with a link chart by adding new entities (also called nodes) or relationships (also called edges), removing existing entities or relationships,
|
|
9
9
|
expanding the graph from particular entities, finding relationships between specified entities on the link chart and adding them to the link chart, finding all relationships
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
var n=(r,e,a)=>{if(!(a?r.hasAllFeaturesInView:r.hasAllFeatures))return!1;let l=new Set((r.availableFields??[]).map(t=>t.toLowerCase()));return l.has("*")?!0:e.every(t=>l.has(t.toLowerCase()))};function s(r,e){let a=r??"";return e!=null&&e&&(a=a?`(${a}) AND (${e})`:e),a||null}export{n as a,s as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{c as r}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{c as r}from"./RLEHNAIA.js";function s(e,n){return n?typeof n=="string"?l(e,n)??null:n:r(e,"arcgis-map")??null}function c(e,n){return n?typeof n=="string"?l(e,n)??null:n:r(e,"arcgis-link-chart")??r(e,"arcgis-map")??null}function l(e,n){let i=n.includes("#")||n.includes(".")||n.includes("["),t=e.getRootNode();return(i?void 0:t.querySelector(`#${n}`))??t.querySelector(n)??void 0}export{s as a,c as b};
|