@arcgis/ai-components 5.2.0-next.110 → 5.2.0-next.111
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/{LL324IL6.js → 2W7LK4HA.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/{ZWIKFBOU.js → 4IU63OWQ.js} +2 -2
- package/dist/cdn/{XRVGYRXL.js → 5A355PGH.js} +2 -2
- 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/{65LCK3GG.js → DQ2Z65UO.js} +2 -2
- 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/{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/{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/{2UJPYWWZ.js → P4GFYBBO.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/{JUNMTIB3.js → PYGX4HN7.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/{CAOMMQSY.js → RFVZ7KCG.js} +1 -1
- package/dist/cdn/{OF3TAARW.js → RHYNE5OE.js} +1 -1
- package/dist/cdn/{4YOG5F3W.js → RLEHNAIA.js} +1 -1
- package/dist/cdn/{RSM7MEVT.js → ROQGPAR5.js} +2 -2
- 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/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/{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/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.js +1 -1
- 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 +9 -9
- 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/AUCKEB52.js +0 -2
- package/dist/cdn/B3HXSEBN.js +0 -2
- package/dist/cdn/BTTCBEPW.js +0 -2
- 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,55 +1,55 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import { Annotation as
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { Annotation as p } from "@langchain/langgraph/web";
|
|
3
3
|
import { b as j, r as T, m as P, c as q } from "./baseAgentState.js";
|
|
4
|
-
import
|
|
5
|
-
import { ChatPromptTemplate as
|
|
4
|
+
import l, { z as s } from "zod";
|
|
5
|
+
import { ChatPromptTemplate as S, SystemMessagePromptTemplate as N } from "@langchain/core/prompts";
|
|
6
6
|
import { s as g } from "./index.js";
|
|
7
7
|
import { AIMessage as O, isAIMessage as $, isToolMessage as U } from "@langchain/core/messages";
|
|
8
8
|
import { createAgent as V, summarizationMiddleware as L, modelCallLimitMiddleware as z } from "langchain";
|
|
9
|
-
import { c as
|
|
10
|
-
const
|
|
11
|
-
agentExecutionContext:
|
|
9
|
+
import { c as y, E as W } from "./aiFactory.js";
|
|
10
|
+
const he = p.Root({
|
|
11
|
+
agentExecutionContext: p({
|
|
12
12
|
default: q,
|
|
13
13
|
reducer: P
|
|
14
14
|
}),
|
|
15
|
-
currentIntent:
|
|
15
|
+
currentIntent: p({
|
|
16
16
|
default: () => "none",
|
|
17
17
|
reducer: T
|
|
18
18
|
}),
|
|
19
|
-
routing:
|
|
19
|
+
routing: p({
|
|
20
20
|
default: () => ({ mode: "auto" }),
|
|
21
21
|
reducer: T
|
|
22
22
|
}),
|
|
23
|
-
lastExecutedAgent:
|
|
23
|
+
lastExecutedAgent: p({
|
|
24
24
|
default: () => "",
|
|
25
25
|
reducer: T
|
|
26
26
|
}),
|
|
27
|
-
requiresFollowUp:
|
|
27
|
+
requiresFollowUp: p({
|
|
28
28
|
default: () => !0,
|
|
29
29
|
reducer: T
|
|
30
30
|
}),
|
|
31
|
-
stepCount:
|
|
31
|
+
stepCount: p({
|
|
32
32
|
default: () => 0,
|
|
33
33
|
reducer: (e, t) => t ?? e + 1
|
|
34
34
|
}),
|
|
35
|
-
finalOutputMessage:
|
|
35
|
+
finalOutputMessage: p({
|
|
36
36
|
default: () => "",
|
|
37
37
|
reducer: j
|
|
38
38
|
})
|
|
39
|
-
}),
|
|
39
|
+
}), B = (e) => {
|
|
40
40
|
if (!e || typeof e != "object" || !("services" in e))
|
|
41
41
|
return !1;
|
|
42
42
|
const t = e.services;
|
|
43
43
|
return !!t && typeof t == "object" && "agentRegistry" in t;
|
|
44
|
-
},
|
|
44
|
+
}, G = (e) => {
|
|
45
45
|
const t = e?.configurable;
|
|
46
|
-
return
|
|
47
|
-
},
|
|
46
|
+
return B(t) ? t : void 0;
|
|
47
|
+
}, H = (e, t, i) => {
|
|
48
48
|
const n = e[t];
|
|
49
49
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((r, o) => {
|
|
50
50
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + t + (t.split("/").length !== i ? ". Note that variables only represent file names one level deep." : ""))));
|
|
51
51
|
});
|
|
52
|
-
}, v = async (e) => (await
|
|
52
|
+
}, v = async (e) => (await H(/* @__PURE__ */ Object.assign({ "./field_descriptions_prompt.md": () => import("./field_descriptions_prompt.js"), "./intent_prompt.md": () => import("./intent_prompt.js"), "./layer_descriptions_prompt.md": () => import("./layer_descriptions_prompt.js") }), `./${e}.md`, 2)).default, J = async (e) => {
|
|
53
53
|
const { agent: t, messages: i, config: n } = e;
|
|
54
54
|
return { structuredResponse: (await t.invoke(
|
|
55
55
|
{
|
|
@@ -70,8 +70,8 @@ const I = (e) => JSON.stringify(e, null, 2), Q = (e) => {
|
|
|
70
70
|
assignedTask: s.string().nullable(),
|
|
71
71
|
requiresFollowUp: s.boolean()
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
const i =
|
|
73
|
+
}, ye = async (e, t) => {
|
|
74
|
+
const i = G(t);
|
|
75
75
|
if (t?.signal?.aborted)
|
|
76
76
|
return await g({ text: "Run cancelled; skipping intent routing" }, t), {
|
|
77
77
|
...e,
|
|
@@ -92,24 +92,24 @@ const I = (e) => JSON.stringify(e, null, 2), Q = (e) => {
|
|
|
92
92
|
currentIntent: "none",
|
|
93
93
|
finalOutputMessage: "No agents registered; skipping intent detection."
|
|
94
94
|
};
|
|
95
|
-
const a = await v("intent_prompt"), c = I(o),
|
|
95
|
+
const a = await v("intent_prompt"), c = I(o), m = Q(o), d = {
|
|
96
96
|
registeredAgents: c,
|
|
97
97
|
priorSteps: I(e.agentExecutionContext.priorSteps),
|
|
98
98
|
userRequest: e.agentExecutionContext.userRequest
|
|
99
|
-
}, k = await
|
|
100
|
-
model: await
|
|
99
|
+
}, k = await S.fromTemplate(a).format(d), D = V({
|
|
100
|
+
model: await y({
|
|
101
101
|
modelTier: "fast",
|
|
102
102
|
config: t
|
|
103
103
|
}),
|
|
104
104
|
tools: [],
|
|
105
105
|
systemPrompt: k,
|
|
106
|
-
responseFormat:
|
|
106
|
+
responseFormat: m,
|
|
107
107
|
middleware: [
|
|
108
108
|
// Preserve recent conversation context while summarizing older messages
|
|
109
109
|
// to control token usage without losing important intent signals.
|
|
110
110
|
// The trigger and keep parameters can be tuned based on token limits and behavior.
|
|
111
111
|
L({
|
|
112
|
-
model: await
|
|
112
|
+
model: await y({
|
|
113
113
|
modelTier: "fast",
|
|
114
114
|
config: t
|
|
115
115
|
}),
|
|
@@ -120,11 +120,11 @@ const I = (e) => JSON.stringify(e, null, 2), Q = (e) => {
|
|
|
120
120
|
// 1 usual LLM call and 1 optional summarization call.
|
|
121
121
|
z({ runLimit: 2 })
|
|
122
122
|
]
|
|
123
|
-
}), { structuredResponse: R } = await
|
|
123
|
+
}), { structuredResponse: R } = await J({
|
|
124
124
|
agent: D,
|
|
125
125
|
messages: e.agentExecutionContext.messages,
|
|
126
126
|
config: t
|
|
127
|
-
}), f =
|
|
127
|
+
}), f = m.parse(
|
|
128
128
|
R ?? { intent: null, assignedTask: null, requiresFollowUp: !1 }
|
|
129
129
|
), x = f.intent ?? "none", F = {
|
|
130
130
|
...e,
|
|
@@ -171,7 +171,7 @@ Requires Follow-Up: ${f.requiresFollowUp}`
|
|
|
171
171
|
} catch (n) {
|
|
172
172
|
throw await g({ text: "Error during intent detection" }, t), new Error(`Error during intent detection: ${n instanceof Error ? n.message : String(n)}`);
|
|
173
173
|
}
|
|
174
|
-
}, X = "0.1",
|
|
174
|
+
}, X = "0.1", h = 1536, Y = "openai", Z = W.default, ee = `Name: {name}
|
|
175
175
|
Title: {title}
|
|
176
176
|
Description: {description}`, te = `Name: {name}
|
|
177
177
|
Alias: {alias}
|
|
@@ -181,7 +181,7 @@ Description: {description}`, we = s.object({
|
|
|
181
181
|
embeddings: s.object({
|
|
182
182
|
modelProvider: s.literal(Y),
|
|
183
183
|
model: s.literal(Z),
|
|
184
|
-
dimensions: s.literal(
|
|
184
|
+
dimensions: s.literal(h),
|
|
185
185
|
templates: s.object({
|
|
186
186
|
layer: s.string().default(ee),
|
|
187
187
|
field: s.string().default(te)
|
|
@@ -193,16 +193,16 @@ Description: {description}`, we = s.object({
|
|
|
193
193
|
name: s.string().min(1),
|
|
194
194
|
title: s.string().catch(""),
|
|
195
195
|
description: s.string().catch(""),
|
|
196
|
-
vector: s.array(s.number()).length(
|
|
197
|
-
message: `Layer vector must be exactly ${
|
|
196
|
+
vector: s.array(s.number()).length(h, {
|
|
197
|
+
message: `Layer vector must be exactly ${h} dimensions`
|
|
198
198
|
}),
|
|
199
199
|
fields: s.array(
|
|
200
200
|
s.object({
|
|
201
201
|
name: s.string().min(1),
|
|
202
202
|
alias: s.string().catch(""),
|
|
203
203
|
description: s.string().catch(""),
|
|
204
|
-
vector: s.array(s.number()).length(
|
|
205
|
-
message: `Field vector must be exactly ${
|
|
204
|
+
vector: s.array(s.number()).length(h, {
|
|
205
|
+
message: `Field vector must be exactly ${h} dimensions`
|
|
206
206
|
})
|
|
207
207
|
})
|
|
208
208
|
)
|
|
@@ -226,9 +226,9 @@ Description: {description}`, we = s.object({
|
|
|
226
226
|
});
|
|
227
227
|
}, M = (e, t) => {
|
|
228
228
|
const i = N.fromTemplate(e);
|
|
229
|
-
return
|
|
229
|
+
return S.fromMessages([i, ...t]);
|
|
230
230
|
}, se = async (e) => {
|
|
231
|
-
const { promptText: t, modelTier: i, messages: n, config: r } = e, o = M(t, n ?? []), a = await
|
|
231
|
+
const { promptText: t, modelTier: i, messages: n, config: r } = e, o = M(t, n ?? []), a = await y({ modelTier: i, config: r });
|
|
232
232
|
return o.pipe(a);
|
|
233
233
|
}, xe = async (e) => {
|
|
234
234
|
const { promptText: t, modelTier: i = "default", messages: n, inputVariables: r, config: o } = e, c = await (await se({
|
|
@@ -237,31 +237,28 @@ Description: {description}`, we = s.object({
|
|
|
237
237
|
messages: n,
|
|
238
238
|
config: o
|
|
239
239
|
})).invoke(r ?? {}, o);
|
|
240
|
-
|
|
241
|
-
return c;
|
|
242
|
-
const l = c.content;
|
|
243
|
-
return typeof l == "string" ? l : JSON.stringify(l);
|
|
240
|
+
return typeof c == "string" ? c : c.text;
|
|
244
241
|
}, A = async (e) => {
|
|
245
|
-
const { promptText: t, modelTier: i = "default", messages: n, inputVariables: r, schema: o, config: a } = e, c = M(t, n ?? []), d = (await
|
|
242
|
+
const { promptText: t, modelTier: i = "default", messages: n, inputVariables: r, schema: o, config: a } = e, c = M(t, n ?? []), d = (await y({ modelTier: i, config: a })).withStructuredOutput(o);
|
|
246
243
|
return await c.pipe(d).invoke(r ?? {}, a);
|
|
247
244
|
}, Te = async (e) => {
|
|
248
|
-
const { promptText: t, modelTier: i = "default", messages: n, inputVariables: r, tools: o, config: a } = e, c = o.length > 0 ? ne(n ?? []) : n ?? [],
|
|
249
|
-
return await
|
|
250
|
-
}, ie =
|
|
251
|
-
name:
|
|
252
|
-
description:
|
|
253
|
-
valueType:
|
|
254
|
-
alias:
|
|
255
|
-
}), oe =
|
|
256
|
-
fields:
|
|
245
|
+
const { promptText: t, modelTier: i = "default", messages: n, inputVariables: r, tools: o, config: a } = e, c = o.length > 0 ? ne(n ?? []) : n ?? [], m = M(t, c), d = await y({ modelTier: i, config: a });
|
|
246
|
+
return await m.pipe(d.bindTools(o)).invoke(r ?? {}, a);
|
|
247
|
+
}, ie = l.object({
|
|
248
|
+
name: l.string(),
|
|
249
|
+
description: l.string(),
|
|
250
|
+
valueType: l.string(),
|
|
251
|
+
alias: l.string()
|
|
252
|
+
}), oe = l.object({
|
|
253
|
+
fields: l.array(ie)
|
|
257
254
|
}), C = (e, t) => e.getFieldAlias(t) ?? void 0, b = (e, t) => C(e, t.name) ?? t.alias ?? "", re = (e, t) => {
|
|
258
255
|
const i = C(e, t.name);
|
|
259
256
|
return !!(i && i !== (t.alias ?? ""));
|
|
260
257
|
};
|
|
261
|
-
function
|
|
258
|
+
function E(e, t) {
|
|
262
259
|
const i = /* @__PURE__ */ new Map();
|
|
263
260
|
for (const n of e.fields) {
|
|
264
|
-
const r = t.fields.find((
|
|
261
|
+
const r = t.fields.find((m) => m.name === n.name), o = b(e, n), a = re(e, n), c = {
|
|
265
262
|
name: n.name,
|
|
266
263
|
type: n.type,
|
|
267
264
|
alias: a ? o : r?.alias ?? o,
|
|
@@ -275,12 +272,12 @@ function S(e, t) {
|
|
|
275
272
|
}
|
|
276
273
|
const be = async (e) => {
|
|
277
274
|
const i = await v("field_descriptions_prompt"), n = e.fields.filter((a) => !(b(e, a) && a.description)).map((a) => {
|
|
278
|
-
const { name: c, type:
|
|
279
|
-
return [`Name: ${c}`, `Type: ${
|
|
275
|
+
const { name: c, type: m, description: d } = a, w = b(e, a);
|
|
276
|
+
return [`Name: ${c}`, `Type: ${m}`, `Alias: ${w}`, `Description: ${d ?? "N/A"}`].join(", ");
|
|
280
277
|
}).join(`
|
|
281
278
|
`);
|
|
282
279
|
if (n.length === 0)
|
|
283
|
-
return
|
|
280
|
+
return E(e, { fields: [] });
|
|
284
281
|
const r = {
|
|
285
282
|
existingItemTitle: e.portalItem?.title,
|
|
286
283
|
existingItemDescription: e.portalItem?.description,
|
|
@@ -292,11 +289,11 @@ const be = async (e) => {
|
|
|
292
289
|
schema: oe,
|
|
293
290
|
inputVariables: r
|
|
294
291
|
});
|
|
295
|
-
return
|
|
296
|
-
}, ae =
|
|
297
|
-
title:
|
|
298
|
-
description:
|
|
299
|
-
name:
|
|
292
|
+
return E(e, o);
|
|
293
|
+
}, ae = l.object({
|
|
294
|
+
title: l.string(),
|
|
295
|
+
description: l.string(),
|
|
296
|
+
name: l.string().nullable()
|
|
300
297
|
}), ve = async (e, t) => {
|
|
301
298
|
const n = await v("layer_descriptions_prompt"), r = Array.from(t.values()), o = {
|
|
302
299
|
fieldInformation: JSON.stringify(r, null, 2),
|
|
@@ -312,15 +309,15 @@ const be = async (e) => {
|
|
|
312
309
|
}), name: e.title ?? null };
|
|
313
310
|
};
|
|
314
311
|
export {
|
|
315
|
-
|
|
312
|
+
he as D,
|
|
316
313
|
we as W,
|
|
317
314
|
xe as a,
|
|
318
|
-
|
|
315
|
+
ye as b,
|
|
319
316
|
be as c,
|
|
320
317
|
ve as d,
|
|
321
|
-
|
|
318
|
+
h as e,
|
|
322
319
|
te as f,
|
|
323
|
-
|
|
320
|
+
G as g,
|
|
324
321
|
Y as h,
|
|
325
322
|
Te as i,
|
|
326
323
|
A as j,
|
package/dist/chunks/graph.js
CHANGED
|
@@ -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 { StateGraph as G, END as p, START as k } from "@langchain/langgraph/web";
|
|
3
3
|
function b(t, c, o, s = {}) {
|
|
4
4
|
const { agent: h, entryNode: u, middlewares: l = [] } = s;
|
package/dist/chunks/helpAgent.js
CHANGED
|
@@ -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 { createSkillAgent as o } from "../agents/runtime/skill/createSkillAgent.js";
|
|
3
3
|
const d = (a, e) => {
|
|
4
4
|
const l = Array.from(a?.values() ?? []).map(({ fieldRegistry: r, layerItem: t }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
const n = `## Who you are
|
|
3
3
|
|
|
4
4
|
You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
|
package/dist/chunks/index.js
CHANGED
|
@@ -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 { dispatchCustomEvent as e } from "@langchain/core/callbacks/dispatch/web";
|
|
3
3
|
const n = async (s, a) => {
|
|
4
4
|
await e("trace_message", s, a);
|
|
@@ -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 { NodeInterrupt as w, StateGraph as L, START as E, END as m } from "@langchain/langgraph/web";
|
|
3
3
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
4
4
|
import "@arcgis/core/portal/Portal.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
|
const e = `This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
|
|
3
3
|
The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
|
|
4
4
|
The geometry type for this layer is {layerGeometryType}.
|
|
@@ -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 { createSkillAgent as r } from "../agents/runtime/skill/createSkillAgent.js";
|
|
3
3
|
import { f as n } from "./fetchAgentContext.js";
|
|
4
4
|
const s = ({ config: a }) => {
|
|
@@ -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 M from "@arcgis/core/identity/IdentityManager.js";
|
|
3
3
|
import _ from "@arcgis/core/portal/Portal.js";
|
|
4
4
|
import { g as $, a as D } from "./aiFactory.js";
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -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 "../cdn/main.css";
|
|
3
3
|
import { makeRuntime as e } from "@arcgis/lumina";
|
|
4
4
|
import { trackAccess as s, createObservable as a, createTrackingTarget as r, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
package/dist/chunks/state.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { Annotation as o } from "@langchain/langgraph/web";
|
|
3
3
|
import { c } from "./baseAgentState.js";
|
|
4
4
|
const i = /* @__PURE__ */ new Set(["agentExecutionContext", "outputMessage", "summary", "status"]);
|
|
5
|
-
function u(
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
8
|
-
throw new Error(`custom state cannot define reserved runtime fields: ${
|
|
5
|
+
function u(n) {
|
|
6
|
+
const r = [...new Set([...n].filter((e) => i.has(e)))];
|
|
7
|
+
if (r.length !== 0)
|
|
8
|
+
throw new Error(`custom state cannot define reserved runtime fields: ${r.join(", ")}.`);
|
|
9
9
|
}
|
|
10
|
-
function f(
|
|
11
|
-
const
|
|
10
|
+
function f(n) {
|
|
11
|
+
const r = Object.entries(n);
|
|
12
12
|
return Object.fromEntries(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
r.map(([e, t]) => [
|
|
14
|
+
e,
|
|
15
15
|
o({
|
|
16
16
|
reducer: (s, a) => a,
|
|
17
|
-
default: () =>
|
|
17
|
+
default: () => t
|
|
18
18
|
})
|
|
19
19
|
])
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
function m(
|
|
23
|
-
u(Object.keys(
|
|
24
|
-
const
|
|
22
|
+
function m(n = {}) {
|
|
23
|
+
u(Object.keys(n));
|
|
24
|
+
const r = f(n);
|
|
25
25
|
return o.Root({
|
|
26
|
-
...
|
|
26
|
+
...r,
|
|
27
27
|
agentExecutionContext: o({
|
|
28
|
-
reducer: (
|
|
29
|
-
...
|
|
30
|
-
...
|
|
28
|
+
reducer: (e, t) => ({
|
|
29
|
+
...e,
|
|
30
|
+
...t
|
|
31
31
|
}),
|
|
32
32
|
default: c
|
|
33
33
|
}),
|
|
34
34
|
outputMessage: o({
|
|
35
35
|
// Preserve the last meaningful user-facing message produced by the graph.
|
|
36
|
-
reducer: (
|
|
36
|
+
reducer: (e = "", t) => typeof t == "string" && t.trim() ? t : e,
|
|
37
37
|
default: () => ""
|
|
38
38
|
}),
|
|
39
39
|
summary: o({
|
|
40
40
|
// Summary is a compact orchestrator-facing outcome, so replacement semantics are enough.
|
|
41
|
-
reducer: (
|
|
41
|
+
reducer: (e = "", t) => typeof t == "string" ? t : e,
|
|
42
42
|
default: () => ""
|
|
43
43
|
}),
|
|
44
44
|
status: o({
|
|
45
45
|
// Keep the first meaningful status until a later node explicitly replaces it.
|
|
46
|
-
reducer: (
|
|
46
|
+
reducer: (e, t) => t ?? e,
|
|
47
47
|
default: () => {
|
|
48
48
|
}
|
|
49
49
|
})
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function g(r) {
|
|
53
|
-
const
|
|
54
|
-
for (const
|
|
55
|
-
for (const
|
|
56
|
-
|
|
57
|
-
const t = Object.fromEntries([...
|
|
52
|
+
function g(n, r = []) {
|
|
53
|
+
const e = new Set(r);
|
|
54
|
+
for (const s of n)
|
|
55
|
+
for (const a of Object.keys(s.shape ?? {}))
|
|
56
|
+
e.add(a);
|
|
57
|
+
const t = Object.fromEntries([...e].map((s) => [s, void 0]));
|
|
58
58
|
return m(t);
|
|
59
59
|
}
|
|
60
60
|
export {
|
package/dist/chunks/useT9n.js
CHANGED
package/dist/chunks/utils.js
CHANGED
package/dist/chunks/utils2.js
CHANGED
package/dist/chunks/utils3.js
CHANGED
|
@@ -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 { getClosestElement as s } from "@arcgis/toolkit/dom";
|
|
3
3
|
function l(t, o) {
|
|
4
4
|
return o ? typeof o == "string" ? u(t, o) ?? null : o : s(t, "arcgis-map") ?? null;
|